/* The clean layout, producer screens (Basecamp 10492667707). Every selector here starts
   with html[data-layout="clean"]; see docs/clean-layout.md. */

/* ============================================================
   THE PRODUCER (public/clean-producer.js). #/talk is the one dark
   room in the product: the machine's face, one sentence, one red
   button with a microphone. Everything else in the section is on
   paper: the questions waiting for an answer, what your producer
   heard, and past conversations.
   ============================================================ */
html[data-layout="clean"] .cl-talk-body { display: flex; flex-direction: column; gap: 14px; }

/* ---------- the room ----------
   Inside it the paper tokens point at the panel colours, the same values
   the dark machine window on Today re-points them to (the shared sheet),
   so a button, a drawer or a menu drawn in here inverts by itself. */
html[data-layout="clean"] .cl-room {
  --panel: #17140f; --panel-ink: #efe8da; --panel-ink-strong: #fffdf7;
  --ok: #79b587; --amber: #c99a4d; --warn: #c99a4d;
  --accent: #c1301b; --accent-deep: #8f2011; --accent-on: #fffdf7; --accent-live: #e75f43;
  --ink: #fffdf7; --ink-2: #efe8da; --ink-4: rgba(239, 232, 218, 0.5); --heading: #fffdf7;
  --muted: rgba(239, 232, 218, 0.62);
  --surface: #17140f; --paper-3: #17140f; --paper-4: rgba(239, 232, 218, 0.07); --paper-2: rgba(239, 232, 218, 0.14);
  --rule: rgba(239, 232, 218, 0.16); --rule-soft: rgba(239, 232, 218, 0.1);
  --cl-line: rgba(239, 232, 218, 0.34); --cl-lamp-ok: #79b587;
  --ink-press: #ffffff; --hover: rgba(239, 232, 218, 0.08);
  display: flex; flex-direction: column;
  box-sizing: border-box; min-height: 520px;
  background: #17140f; color: #efe8da;
  border: 1px solid #17140f; border-radius: var(--radius);
  padding: 16px 20px 30px;
}
/* On the dark desk the room keeps an edge, as the machine does there. */
html[data-layout="clean"][data-theme="dark"] .cl-room { border-color: rgba(239, 232, 218, 0.16); }
html[data-layout="clean"] .cl-room :focus-visible { outline-color: #fffdf7; }

html[data-layout="clean"] .cl-room-head { display: flex; align-items: center; gap: 12px; min-height: 36px; }
html[data-layout="clean"] .cl-room-label {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
html[data-layout="clean"] .cl-room[data-state="listening"] .cl-room-label,
html[data-layout="clean"] .cl-room[data-state="talking"] .cl-room-label,
html[data-layout="clean"] .cl-room[data-state="done"] .cl-room-label { color: var(--ok); }
html[data-layout="clean"] .cl-room-timer {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 13px; color: var(--panel-ink-strong);
}
html[data-layout="clean"] .cl-room-timer[hidden],
html[data-layout="clean"] .cl-room:not([data-state="listening"]):not([data-state="talking"]) .cl-room-timer { display: none; }
html[data-layout="clean"] .cl-room-corner { position: relative; margin-left: auto; display: flex; align-items: center; min-height: 36px; }
html[data-layout="clean"] .cl-room-corner[hidden] { display: none; }
html[data-layout="clean"] .cl-room-corner .cl-dots { margin: 0 -6px 0 0; }

html[data-layout="clean"] .cl-room-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 14px 0 4px; text-align: center;
}
html[data-layout="clean"] .cl-room-face { --talk-m: 128px; }
/* The body is the room's own colour; a hairline gives the face its edge. */
html[data-layout="clean"] .cl-room .machine { border-color: rgba(239, 232, 218, 0.22); }
html[data-layout="clean"] .cl-room-words {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%; max-width: 620px;
}
html[data-layout="clean"] .cl-room-line {
  font-size: 23px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25;
  color: var(--panel-ink-strong); text-wrap: balance;
}
html[data-layout="clean"] .cl-room-sub {
  margin: 0; max-width: 31em;
  font-size: 16.5px; line-height: 1.5; color: rgba(239, 232, 218, 0.8); text-wrap: pretty;
}
html[data-layout="clean"] .cl-room-sub[hidden],
html[data-layout="clean"] .cl-room-note[hidden] { display: none; }
html[data-layout="clean"] .cl-room-note {
  margin: 0; max-width: 31em;
  font-size: 15.5px; line-height: 1.45; font-style: italic; color: var(--amber); overflow-wrap: anywhere;
}
html[data-layout="clean"] .cl-room-acts {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px;
  padding-top: 10px;
}
html[data-layout="clean"] .cl-room-extra { display: contents; }
html[data-layout="clean"] .cl-room-extra[hidden] { display: none; }

/* Talking is the one red button, the machine's own, with a microphone. */
html[data-layout="clean"] .cl-talk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: none;
  background: var(--accent); color: var(--accent-on);
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-family: var(--font-text); font-size: 18px; font-weight: 600; line-height: 1.2;
  padding: 15px 30px 15px 24px;
  transition: background-color .15s, transform .1s;
}
html[data-layout="clean"] .cl-talk-btn:hover { background: var(--accent-deep); color: var(--accent-on); }
html[data-layout="clean"] .cl-talk-btn:active { transform: translateY(1px); }
html[data-layout="clean"] .cl-talk-btn:disabled { opacity: 0.6; cursor: default; }
html[data-layout="clean"] .cl-talk-btn[hidden],
html[data-layout="clean"] .cl-room-btn[hidden] { display: none; }
html[data-layout="clean"] .cl-mic { flex: none; width: 22px; height: 22px; }
/* A call already running elsewhere: one way out, not two. */
html[data-layout="clean"] .cl-room[data-state="busy"] .cl-room-acts > .cl-talk-btn { display: none; }
/* The other buttons in the room invert onto it. */
html[data-layout="clean"] .cl-room-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--panel-ink-strong); color: var(--panel);
  border: 0; border-radius: var(--radius-btn); cursor: pointer;
  font-family: var(--font-text); font-size: 16px; font-weight: 600;
  padding: 13px 24px;
  transition: background-color .15s, transform .1s;
}
html[data-layout="clean"] .cl-room-btn:hover { background: #ffffff; }
html[data-layout="clean"] .cl-room-btn:active { transform: translateY(1px); }
html[data-layout="clean"] .cl-room-btn:disabled { opacity: 0.6; cursor: default; }
html[data-layout="clean"] .cl-room-hand { color: #f0806c; font-size: 24px; }
html[data-layout="clean"] .cl-room-hand[hidden] { display: none; }

/* The note, and what comes after a conversation, open inside the room. */
html[data-layout="clean"] .cl-room-drawer { width: 100%; max-width: 520px; text-align: left; }
html[data-layout="clean"] .cl-room-drawer[hidden],
html[data-layout="clean"] .cl-room-next[hidden] { display: none; }
html[data-layout="clean"] .cl-room-drawer textarea {
  box-sizing: border-box; width: 100%; min-height: 76px;
  background: rgba(239, 232, 218, 0.06); color: var(--panel-ink-strong);
  border: 1px solid var(--cl-line); border-radius: var(--radius-btn);
  font-family: var(--font-text); font-size: 16.5px; line-height: 1.45; padding: 10px 12px;
}
html[data-layout="clean"] .cl-room-drawer textarea::placeholder { color: rgba(239, 232, 218, 0.45); }
html[data-layout="clean"] .cl-room-next { width: 100%; max-width: 460px; padding-top: 6px; text-align: left; }
html[data-layout="clean"] .cl-room-next > .btn { display: flex; width: auto; margin: 0 auto; }
/* While the feeds are asked for, and while a sign-in or Billing hand-off
   happens, the room holds one line. */
html[data-layout="clean"] .cl-room .panel-line { justify-content: center; gap: 12px; font-size: 19px; font-weight: 600; }
html[data-layout="clean"] .cl-room .panel-line .pl-label { color: var(--panel-ink-strong); }
html[data-layout="clean"] .cl-room .panel-line .lamp { width: 9px; height: 9px; border: 0; border-radius: 2px; background: var(--amber); }

/* ---------- on paper, under the room ---------- */
html[data-layout="clean"] .cl-talk-paper { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
html[data-layout="clean"] .cl-talk-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html[data-layout="clean"] .cl-talk .cl-card { padding: 18px 22px 10px; }
html[data-layout="clean"] .cl-talk .cl-card.cl-empty { padding: 20px 22px; }
html[data-layout="clean"] .cl-talk .cl-card-head { min-height: 24px; }
html[data-layout="clean"] .cl-talk-state { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 16.5px; line-height: 1.45; color: var(--ink); }
html[data-layout="clean"] .cl-talk-state .cl-mark { margin-top: 2px; }
html[data-layout="clean"] .cl-talk-acts { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0 8px; }
html[data-layout="clean"] .cl-talk-wait .panel-line { padding: 4px 0 12px; font-size: 16.5px; }
html[data-layout="clean"] .cl-talk-wait .panel-line .pl-label { color: var(--ink-2); }
html[data-layout="clean"] .cl-talk-wait .panel-line .lamp { width: 9px; height: 9px; border: 0; border-radius: 2px; background: var(--amber); }
html[data-layout="clean"] .cl-talk .cl-link {
  display: flex; align-items: center; min-height: 48px;
  border-top: 1px solid var(--rule-soft); text-decoration: none;
}
html[data-layout="clean"] .cl-talk .cl-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* A question: its words, then the one button; the answer opens under it. */
html[data-layout="clean"] .cl-qs-say { margin: 2px 0 8px; font-size: 15.5px; line-height: 1.45; color: var(--muted); }
html[data-layout="clean"] .cl-qs-list > .cl-q { padding: 14px 0; border-top: 1px solid var(--rule-soft); }
html[data-layout="clean"] .cl-q-list { display: flex; flex-direction: column; gap: 14px; }
html[data-layout="clean"] .cl-talk .cl-q.cl-card { padding: 18px 22px 18px; }
html[data-layout="clean"] .cl-q-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 18px; }
html[data-layout="clean"] .cl-q-ask {
  font-family: var(--font-text); text-transform: none; letter-spacing: 0; color: var(--ink);
  border-top: 0; padding: 0; margin: 0; min-width: 0;
  font-size: 16.5px; font-weight: 600; line-height: 1.4; text-wrap: pretty;
}
html[data-layout="clean"] .cl-q.is-done .cl-q-ask { font-size: 15.5px; color: var(--ink-2); }
html[data-layout="clean"] .cl-q-corner { position: relative; flex: none; display: flex; }
html[data-layout="clean"] .cl-q-corner:empty { display: none; }
/* While the answer is open under the question, its button has done its job. */
html[data-layout="clean"] .cl-q:has([data-drawer]:not([hidden])) .cl-q-corner > .cl-btn2 { display: none; }
html[data-layout="clean"] .cl-q-answer { margin: 8px 0 0; max-width: 40em; font-size: 17.5px; line-height: 1.5; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
html[data-layout="clean"] .cl-q-state { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; font-size: 14.5px; line-height: 1.4; color: var(--muted); }
html[data-layout="clean"] .cl-q-state .cl-lamp { margin-top: 5px; }
html[data-layout="clean"] .cl-q-state.problem,
html[data-layout="clean"] .cl-talk-state.problem { color: var(--accent-deep); }
html[data-layout="clean"] .cl-talk-clear .cl-q-state { margin: 2px 0 10px; font-size: 16.5px; color: var(--ink-2); }
html[data-layout="clean"] .cl-talk-clear .cl-q-state .cl-lamp { margin-top: 7px; }
html[data-layout="clean"] .cl-q [data-drawer] { margin-top: 12px; }
html[data-layout="clean"] .cl-q [data-drawer][hidden] { display: none; }
html[data-layout="clean"] .cl-q-drawer textarea {
  box-sizing: border-box; width: 100%; min-height: 104px;
  font-family: var(--font-text); font-size: 16.5px; line-height: 1.45;
}
html[data-layout="clean"] .cl-q-warn { font-size: 15px; color: var(--accent-deep); }
html[data-layout="clean"] .cl-q-warn[hidden] { display: none; }
html[data-layout="clean"] .cl-q-drawer .cl-drawer-acts { align-items: center; }
html[data-layout="clean"] .cl-q-say { gap: 8px; margin-left: 4px; }
html[data-layout="clean"] .cl-q-say .cl-mic { width: 18px; height: 18px; }
html[data-layout="clean"] .cl-q-recording { display: flex; align-items: center; gap: 10px; }
html[data-layout="clean"] .cl-q-recording .cl-rec { animation: cl-talk-rec 1.2s ease-in-out infinite; }
@keyframes cl-talk-rec { 50% { opacity: 0.35; } }
/* The finish line of the typed path. */
html[data-layout="clean"] .cl-q-finish {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  border-top: 1px solid var(--rule-soft); padding: 14px 0 8px;
  font-size: 15.5px; line-height: 1.45; color: var(--ink-2);
}
html[data-layout="clean"] .cl-q-finish > span { flex: 1 1 240px; }
html[data-layout="clean"] .cl-q-finish-card .cl-q-finish { border-top: 0; padding-top: 0; }

/* What your producer heard, in short. */
html[data-layout="clean"] .cl-heard-row { padding: 12px 0; border-top: 1px solid var(--rule-soft); }
html[data-layout="clean"] .cl-card-head + .cl-heard-row { border-top: 0; }
html[data-layout="clean"] .cl-heard-ask { font-size: 14.5px; line-height: 1.4; color: var(--muted); }
html[data-layout="clean"] .cl-heard-answer {
  margin-top: 3px; font-size: 16.5px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

/* Past conversations, as rows. */
html[data-layout="clean"] .cl-conv-row {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0 -22px; padding: 12px 22px;
  border-top: 1px solid var(--rule-soft);
  text-decoration: none; color: var(--ink);
  transition: background-color .15s;
}
html[data-layout="clean"] .cl-card-head + .cl-conv-row { border-top: 0; }
html[data-layout="clean"] .cl-conv-row:hover { background: var(--paper-4); color: var(--ink); }
html[data-layout="clean"] .cl-conv-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-layout="clean"] .cl-conv-row-title { font-size: 16.5px; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
html[data-layout="clean"] .cl-conv-row-note { font-size: 14.5px; color: var(--muted); }
html[data-layout="clean"] .cl-conv-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
html[data-layout="clean"] .cl-conv-state.problem { color: var(--accent-deep); }
/* A row says where its write-up stands only when something is not finished. */
html[data-layout="clean"] .cl-conv-row .cl-conv-state:not(.problem):not(:has(.cl-lamp.amber)) { display: none; }

/* One conversation in full. */
html[data-layout="clean"] .cl-heard-page,
html[data-layout="clean"] .cl-conv-page { display: flex; flex-direction: column; gap: 14px; max-width: 780px; }
html[data-layout="clean"] .cl-talk .cl-conv { padding: 18px 22px 14px; }
html[data-layout="clean"] .cl-conv.is-shown { border-color: var(--ink); }
html[data-layout="clean"] .cl-conv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
html[data-layout="clean"] .cl-conv-title {
  font-family: var(--font-text); text-transform: none; letter-spacing: -0.005em; color: var(--ink);
  border-top: 0; padding: 0; margin: 8px 0 0;
  font-size: 21px; font-weight: 700; line-height: 1.25; text-wrap: pretty;
}
html[data-layout="clean"] .cl-conv-topic { margin: 6px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
html[data-layout="clean"] .cl-conv-sum { margin: 10px 0 0; max-width: 40em; font-size: 17px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
html[data-layout="clean"] .cl-conv-part { margin-top: 16px; }
html[data-layout="clean"] .cl-conv-part ul { margin: 6px 0 0; padding-left: 20px; }
html[data-layout="clean"] .cl-conv-part li { padding: 3px 0; font-size: 16.5px; line-height: 1.4; color: var(--ink); }
html[data-layout="clean"] .cl-conv-part li::marker { color: var(--muted); }
html[data-layout="clean"] .cl-conv-error { margin: 10px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--accent-deep); }
html[data-layout="clean"] .cl-conv-scripts { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; font-size: 15px; color: var(--ink-2); }
html[data-layout="clean"] .cl-conv-scripts .cl-lamp { margin-top: 6px; }
html[data-layout="clean"] .cl-conv-acts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--rule-soft);
}
html[data-layout="clean"] .cl-conv [data-drawer] { margin-top: 8px; }
html[data-layout="clean"] .cl-conv [data-drawer][hidden] { display: none; }
html[data-layout="clean"] .cl-turns { display: block; max-height: 400px; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 4px; }
html[data-layout="clean"] .cl-turn { margin: 0 0 12px; max-width: 40em; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
html[data-layout="clean"] .cl-turn b {
  display: block; margin-bottom: 1px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
html[data-layout="clean"] .cl-turn.you b { color: var(--accent-deep); }
html[data-layout="clean"] .cl-turn-none { margin: 0 0 12px; font-size: 16px; color: var(--ink-2); }

/* On a phone a question is its words, then its button under them. */
@media (max-width: 599.98px) {
  html[data-layout="clean"] .cl-room-label { font-size: 11px; letter-spacing: 0.05em; }
  html[data-layout="clean"] .cl-q:not(.is-done) .cl-q-top { flex-direction: column; }
  html[data-layout="clean"] .cl-q-say { margin-left: 0; flex-basis: 100%; justify-content: flex-start; text-align: left; }
  html[data-layout="clean"] .cl-q-drawer { padding: 12px; }
  html[data-layout="clean"] .cl-talk .cl-page-sum { display: none; }
  html[data-layout="clean"] .cl-conv-top .cl-label { font-size: 11px; letter-spacing: 0.06em; }
  html[data-layout="clean"] .cl-q-finish .btn { width: 100%; }
}
@media (min-width: 900px) {
  html[data-layout="clean"] .view:has(.cl-talk) { max-width: 1160px; padding: 32px 40px 48px; }
  html[data-layout="clean"] .cl-talk-body { gap: 20px; }
  html[data-layout="clean"] .cl-room { min-height: 540px; padding: 18px 26px 40px; }
  html[data-layout="clean"] .cl-room-face { --talk-m: 156px; }
  html[data-layout="clean"] .cl-room-line { font-size: 29px; }
  html[data-layout="clean"] .cl-room-sub { font-size: 17.5px; }
  html[data-layout="clean"] .cl-talk-paper,
  html[data-layout="clean"] .cl-talk-col,
  html[data-layout="clean"] .cl-heard-page,
  html[data-layout="clean"] .cl-conv-page,
  html[data-layout="clean"] .cl-q-list { gap: 20px; }
  html[data-layout="clean"] .cl-talk .cl-card { padding: 18px 26px 10px; }
  html[data-layout="clean"] .cl-talk .cl-card.cl-empty { padding: 22px 26px; }
  html[data-layout="clean"] .cl-talk .cl-q.cl-card { padding: 20px 26px; }
  html[data-layout="clean"] .cl-talk .cl-conv { padding: 20px 26px 14px; }
  html[data-layout="clean"] .cl-conv-row { margin: 0 -26px; padding: 12px 26px; }
}
@media (min-width: 1000px) {
  html[data-layout="clean"] .cl-talk-paper:not(.one) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-layout="clean"] .cl-q-recording .cl-rec { animation: none; }
  html[data-layout="clean"] .cl-talk-btn,
  html[data-layout="clean"] .cl-room-btn { transition: none; }
}
