/* ── Clyde screen v2 (spec pod/dev/specs/clyde-screen-v2.md §3–§4) ──────────
   Mason, 2026-10-04, from Iris's prototype (pod/qa/ux-review/clyde-v2/prototype/).
   Every rule is scoped to the Clyde screen (.cv / .cv-*), so it cannot re-skin
   another screen. GUI v2 tokens only; no new tokens. The one literal colour is
   the face's own ground (#0B0906), which the face canvas paints itself — the
   orb frames it, never recolours it.
   ⭐ One primary action, always visible: the screen is exactly the height left
   under the topbar (js/screens/clyde.js fit()), the conversation scrolls on its
   own, and the composer dock never moves. */
.cv { display: flex; position: relative; height: calc(100vh - 64px); min-height: 320px; }
.cv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cv .cv-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cv .cv-grow { flex: 1; min-width: 0; }
.cv .hint { color: var(--text-2); }

/* header: one slim row */
.cv-head { display: flex; align-items: center; gap: var(--s-3);
  /* ⭐ R-S2 (audit D-37): the title sits on the SAME left edge as every other
     screen's — the .page column (max --page-max, centred, --page-pad inside) —
     not at the bare page-pad of a full-bleed screen. */
  padding: var(--s-3) max(var(--page-pad), calc((100% - var(--page-max)) / 2 + var(--page-pad)));
  min-height: 72px; border-bottom: 1px solid transparent; transition: border-color var(--dur-2) var(--ease); }
.cv[data-docked] .cv-head { border-bottom-color: var(--hairline); }
.cv-slot { width: 0; height: 48px; flex: none; transition: width var(--dur-3) var(--ease); }
.cv[data-docked] .cv-slot { width: 48px; }
.cv-title { display: flex; flex-direction: column; min-width: 0; }
.cv-h1 { font-size: var(--t-title-1); font-weight: var(--w-bold); letter-spacing: var(--track-title);
  margin: 0; line-height: var(--lh-tight); }
.cv-status { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-small);
  color: var(--text-2); min-width: 0; }
.cv-status .clyde-state__text { overflow: hidden; text-overflow: ellipsis; }
.cv-status .dot.ok, .cv-foot .dot.ok, .cv-chip .dot.ok { background: var(--ok); }
.cv-status .dot.warn, .cv-foot .dot.warn { background: var(--warn); }
.cv-chip { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--hit); padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--t-small); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-1) var(--ease); }
.cv-chip:hover { background: var(--surface-2); }
.cv-chip[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.cv-chip:disabled { color: var(--text-3); cursor: progress; }
.cv-badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--warn-bg); color: var(--warn); font-size: var(--t-caption); font-weight: var(--w-bold); }
.cv-badge[hidden] { display: none; }
.cv-chip[aria-expanded="true"] .cv-badge { background: var(--on-accent); }
.cv-tdot, .cv-gear-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.cv-tdot[hidden], .cv-gear-dot[hidden] { display: none; }
.cv-gear { position: relative; }
.cv-gear-dot { position: absolute; top: 8px; right: 8px; }
.cv-badge--n { position: absolute; top: 2px; right: 0; padding: 0 5px; }
.cv-ptabs-phone { display: none; position: relative; }
.cv[data-panel] .cv-ptab { display: none; }
.cv[data-panel] .cv-ptabs-phone { display: inline-grid; }

/* Make-an-app mode bar */
.cv-mode { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-2) var(--page-pad);
  background: var(--info-bg); color: var(--text); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.cv-mode[hidden] { display: none; }
.cv-mode__name { color: var(--info); }
.cv-stepper { display: flex; align-items: center; gap: var(--s-2); list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.cv-stepper li { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--text-2); white-space: nowrap; }
.cv-stepper li + li::before { content: ""; width: 24px; height: 1px; background: var(--control-border); }
.cv-stepper .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--control-border); font-size: var(--t-caption); font-weight: var(--w-bold); }
.cv-stepper [aria-current] { color: var(--text); font-weight: var(--w-bold); }
.cv-stepper [aria-current] .n { background: var(--info); border-color: var(--info); color: var(--bg); }
.cv-stepper .done .n { border-color: var(--info); color: var(--info); }
.cv-mode .btn { gap: var(--s-1); }
/* A narrow mode bar (panel open, small window) keeps only the CURRENT step's
   name; the others stay as numbered dots, so the bar never overprints itself. */
.cv-main { container-type: inline-size; container-name: cvmain; }
@container cvmain (max-width: 820px) {
  .cv-stepper li:not([aria-current]) .w { display: none; }
  .cv-stepper li + li::before { width: 12px; }
}
@container cvmain (max-width: 560px) {
  .cv-mode [data-build-restart] { display: none; }
  .cv-mode .cv-lbl { display: none; }
}

/* body */
.cv-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* ⛔ GUI sweep 2026-10-06 (D-39, still open since 10-04): at rest the
   briefing card runs into the scroller's bottom edge and is cut flat, a card
   with no foot, right above the composer — it read as broken at 1920, 1280
   and 390 alike. The edge now fades over the last --s-8, which is the col's
   own bottom padding, so only content that really continues is faded and
   the last line of a finished thread always scrolls clear of it. */
.cv-body { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--s-8)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--s-8)), transparent); }
.cv-col { max-width: 760px; margin: 0 auto; padding: var(--s-6) var(--s-8) var(--s-8); }
.cv-offline { margin-bottom: var(--s-4); }
.cv-offline[hidden] { display: none; }

/* the face: a calm orb at rest, docked small once the talk starts */
.cv-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(8px, 4vh, 56px); }
.cv-hero[hidden] { display: none; }
/* ⭐ PERSONA (2026-10-05, audit D-14): the orb is the face DISC plus the
   persona's MARK drawn around it (css/persona.css .cv-ring) — one ring, one
   colour, the same motes as the app icon. The coloured inset rings per mood
   are gone; the mark moves instead, and the word beside it still says. */
.cv-orb { --size: clamp(150px, 27vh, 320px); width: var(--size); height: var(--size); border-radius: 50%;
  position: relative; flex: none; margin: calc(var(--size) * .16); }
.cv-orb-face { position: absolute; inset: 0; border-radius: 50%; background: #0B0906; overflow: hidden;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-2); }
.cv-orb canvas { display: block; width: 100%; height: 100%; }
.cv-slot .cv-orb { --size: 40px; margin: 4px; }
.cv-slot .cv-orb-face { box-shadow: 0 0 0 1px var(--border); }
@keyframes cv-breathe { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .cv-orb::after { animation: none !important; } }
.cv-hero .cv-status { margin-top: var(--s-4); font-size: var(--t-body); }
.cv-hello { font-size: var(--t-title-2); font-weight: var(--w-bold); letter-spacing: var(--track-title); margin: var(--s-6) 0 var(--s-2); }
.cv-cap { color: var(--text-2); max-width: 46ch; margin: 0; }
.cv-starters { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; margin-top: var(--s-6); }

/* the once-a-day briefing at rest (it moves to the Today tab once you talk) */
.cv-brief-card { text-align: left; width: 100%; margin-top: var(--s-6); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5); }
.cv-brief-card[hidden] { display: none; }
.cv-brief-card h3 { margin: 0 0 var(--s-2); font-size: var(--t-small); color: var(--text-2); font-weight: var(--w-medium); }
.cv-brief-card .said { font-size: var(--t-lead); margin: 0; color: var(--text); }
.cv-disclose { margin-top: var(--s-3); font-size: var(--t-small); color: var(--text-2); }
.cv-disclose summary { cursor: pointer; min-height: var(--hit); display: flex; align-items: center; gap: var(--s-2); list-style: none; }
.cv-disclose summary::-webkit-details-marker { display: none; }
.cv-disclose summary::after { content: "›"; transition: transform var(--dur-2) var(--ease); }
.cv-disclose[open] summary::after { transform: rotate(90deg); }
.cv-disclose ul, .cv-disclose ol { margin: 0; padding: 0; list-style: none; }
.cv-disclose li { padding: var(--s-2) 0; border-top: 1px solid var(--hairline); }

/* the conversation */
.cv .clyde-thread { max-width: none; margin-top: 0; gap: var(--s-5); }
.cv .msg-q { background: var(--surface-2); border: 0; color: var(--text); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); max-width: 80%; }
.cv .msg-a { max-width: 100%; gap: var(--s-2); }
.cv .msg-a .who { font-size: var(--t-caption) !important; color: var(--text-3); font-weight: var(--w-regular); }
.cv .msg-a .who .dot.ok { background: var(--ok); }
.cv .msg-a .who .dot.warn { background: var(--warn); }
.cv .msg-a .body { color: var(--text); }
.cv .msg-a .body p { margin: 0 0 var(--s-3); }
.cv .msg-a .body p:last-child { margin-bottom: 0; }
.cv .msg-a .body blockquote { border-left-color: var(--border); color: var(--text); }
/* "Read before answering": one caption line, never hidden (honesty, spec §2.6). */
.cv .srcs { gap: 0 var(--s-2); align-items: baseline; font-size: var(--t-caption); color: var(--text-3); }
.cv .srcs__label { font-size: var(--t-caption) !important; color: var(--text-3); margin-right: 0; }
.cv .srcs__label::after { content: ":"; }
.cv .src { border: 0; background: none; padding: 0; font-size: var(--t-caption); color: var(--text-2); border-radius: 0;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--control-border); }
.cv .src.src--note { border: 0; font-style: italic; }

/* per-message actions: quiet — hover/focus on a pointer, always on the newest */
.cv .answer-acts { margin-top: 0; gap: var(--s-2); min-height: 32px; opacity: 0; transition: opacity var(--dur-1) var(--ease); }
.cv .msg-q-acts { align-self: flex-end; margin-top: calc(-1 * var(--s-4)); }
.cv .msg-a:hover .answer-acts, .cv .msg-q:hover + .answer-acts, .cv .answer-acts:hover,
.cv .answer-acts:focus-within, .cv .answer-acts.is-last, .cv .msg-a.is-last .answer-acts,
.cv .answer-acts.show-acts, .cv .answer-acts:has(.answer-acts__said:not(:empty)) { opacity: 1; }
.cv .cv-act { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: var(--r-sm);
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: var(--t-small); cursor: pointer; }
/* An icon PLUS the word, never an icon alone (spec §4 message). */
.cv .cv-act::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.cv .cv-act:hover { background: var(--surface-2); color: var(--text); }
.cv .cv-act:disabled { cursor: default; }
.cv .answer-acts__said { font-size: var(--t-caption); color: var(--text-2); max-width: 60ch; }
.cv .cv-offer { margin-top: var(--s-2); display: flex; align-items: center; gap: var(--s-2) var(--s-3); flex-wrap: wrap;
  padding: var(--s-3) var(--s-4); border: 1px dashed var(--control-border); border-radius: var(--r-md);
  font-size: var(--t-small); color: var(--text-2); }
.cv .cv-offer .answer-acts__offer { color: var(--text); font-style: normal; font-size: var(--t-small); }
.cv .cv-error { margin-top: var(--s-2); align-items: center; }
.cv .cv-error > .dot { margin-top: 0; background: var(--bad); }
.cv .cv-error b { color: var(--bad); }

/* Make an app: the step-1 line, the write-up, the choice */
.cv-step1 { text-align: center; margin-top: var(--s-6); }
.cv-step1[hidden] { display: none; }
.cv-said-line { font-size: var(--t-small); color: var(--text-2); margin: var(--s-3) auto 0; max-width: 60ch; }
.cv .cv-doc { max-width: none; margin-top: var(--s-6); }
.cv .cv-doc[hidden] { display: none; }
.cv .cv-doc .acts { margin-top: var(--s-4); }
.cv .cv-doc [hidden] { display: none; }
.cv .clyde-route { border-top: 0; margin-top: 0; padding-top: 0; }
.cv .clyde-route__advice { color: var(--text); }
.cv .clyde-route__choices { gap: var(--s-4); }
.cv .clyde-route__choice { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); display: flex;
  flex-direction: column; gap: var(--s-3); background: var(--bg); align-items: flex-start; }
.cv .clyde-route__choice.suggested { border-color: var(--info); box-shadow: 0 0 0 1px var(--info); }
.cv .clyde-route__choice p { margin: 0; color: var(--text-2); font-size: var(--t-small); }
.cv .clyde-route__choice p b { color: var(--text); }
.cv-tag { font-size: var(--t-caption); font-weight: var(--w-bold); color: var(--info); background: var(--info-bg);
  padding: 2px 8px; border-radius: var(--r-pill); }
.cv-recap { margin: 0 0 var(--s-4); }
.cv .clyde-brief-parked { max-width: none; }
.cv .clyde-brief-parked[hidden] { display: none; }

/* the dock: the composer pinned to the foot */
.cv-dock { padding: var(--s-2) var(--s-8) var(--s-3); }
.cv-dock-in { max-width: 760px; margin: 0 auto; position: relative; }
.cv .clyde-composer { display: flex; align-items: flex-end; gap: var(--s-2); padding: var(--s-2); max-width: none; margin: 0;
  border-radius: var(--r-xl); }
.cv .clyde-composer textarea { flex: 1; min-width: 0; padding: 12px var(--s-2); min-height: var(--hit-lg); max-height: 30vh;
  line-height: 1.5; font-size: var(--t-body); resize: none; }
/* one height in the dock: the field, More and the mic are all --hit-lg, so a
   one-line composer holds them centred with the same 8 px on every side
   (controls-geometry: More was 48 beside a 56 mic, 16 px from the top). */
.cv .clyde-composer .cv-round { width: var(--hit-lg); height: var(--hit-lg); }
.cv-mic { width: var(--hit-lg); height: var(--hit-lg); border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; flex: none; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; transition: transform var(--dur-1) var(--ease), background var(--dur-2) var(--ease); }
.cv-mic .cv-i { width: 24px; height: 24px; }
.cv-mic[aria-pressed="true"] { background: var(--warn); color: var(--bg); transform: scale(1.08); }
.cv-mic[data-off] { background: var(--surface-2); color: var(--text-2); }
.cv-mic:disabled { cursor: progress; background: var(--surface-2); color: var(--text-2); }
.cv-round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center;
  flex: none; color: var(--text-2); cursor: pointer; }
.cv-round:hover, .cv-round[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.cv-foot { display: flex; align-items: center; justify-content: center; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-2) 0 0;
  font-size: var(--t-caption); color: var(--text-3); text-align: center; }
.cv-foot .sep { opacity: .6; }
.cv-foot .foot-short { display: none; }
.cv-image-note { margin: var(--s-1) 0 0; font-size: var(--t-small); text-align: center; }
.cv-image-note:empty { display: none; }
.cv-why-off { font-size: var(--t-small); color: var(--text-2); margin: 0 0 var(--s-2); padding: var(--s-3) var(--s-4);
  background: var(--surface-2); border-radius: var(--r-md); }
.cv-why-off[hidden] { display: none; }
.cv-listen { position: absolute; left: 0; right: 0; bottom: calc(100% + var(--s-3)); display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); z-index: 4; }
.cv-listen[hidden] { display: none; }
.cv-listen b { display: block; }
.cv-listen small { color: var(--text-2); font-size: var(--t-small); }
.cv-listen .cv-esc[hidden] { display: none; }
.cv-level { display: flex; gap: 3px; align-items: center; height: 28px; width: 46px; flex: none; }
.cv-level[hidden] { display: none; }
.cv-level i { width: 4px; border-radius: 2px; background: var(--warn); height: 12%; transition: height 80ms linear; }
.cv-menu { position: absolute; left: 0; bottom: calc(100% + var(--s-2)); min-width: 320px; max-width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: var(--s-2); z-index: 5; }
.cv-menu[hidden] { display: none; }
.cv-menu button { display: flex; gap: var(--s-3); width: 100%; text-align: left; padding: var(--s-3); border: 0; background: transparent;
  border-radius: var(--r-md); color: var(--text); font: inherit; cursor: pointer; min-height: var(--hit); }
.cv-menu button[hidden] { display: none; }
.cv-menu button:hover { background: var(--surface-2); }
.cv-menu button:disabled { color: var(--text-2); cursor: not-allowed; }
.cv-menu small { display: block; color: var(--text-2); font-size: var(--t-small); }

/* the side panel: Memory · Builds · Today */
.cv-panel { width: 400px; flex: none; border-left: 1px solid var(--hairline); background: var(--surface); display: flex;
  flex-direction: column; min-height: 0; }
.cv-panel[hidden] { display: none; }
.cv-panel > header { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--hairline); }
.cv-seg { display: flex; flex: 1; background: var(--surface-2); padding: 3px; border-radius: var(--r-md); }
.cv-seg button { flex: 1; min-height: 38px; border: 0; background: transparent; border-radius: 9px; font: inherit; font-size: var(--t-small);
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.cv-seg button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: var(--w-bold); box-shadow: var(--shadow-1); }
.cv-pbody { flex: 1; overflow-y: auto; padding: var(--s-5) var(--s-5) var(--s-8); }
.cv-pbody section[hidden] { display: none; }
.cv-pbody h2 { font-size: var(--t-lead); font-weight: var(--w-bold); margin: 0 0 var(--s-1); }
.cv-pane-head { display: flex; align-items: center; gap: var(--s-2); }
.cv-pane-head h2 { flex: 1; }
.cv-lede { color: var(--text-2); font-size: var(--t-small); margin: 0 0 var(--s-4); }
.cv-pfoot { font-size: var(--t-caption); color: var(--text-3); margin-top: var(--s-4); }
.cv .clyde-memory, .cv .clyde-builds { max-width: none; margin-top: 0; }
.cv .clyde-briefing { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.cv .clyde-briefing [hidden] { display: none; }
.cv .clyde-briefing .btn { margin-top: var(--s-4); }
.cv-pbody .setgroup { background: var(--bg); }
.cv-pbody .setrow { padding: var(--s-3) var(--s-4); flex-wrap: wrap; }
.cv-pbody .setrow .info > b { font-size: var(--t-body); }
.cv-pbody .clyde-note-row.is-target { background: var(--surface-2); }
.cv-empty { text-align: center; padding: var(--s-8) var(--s-4); color: var(--text-2); border: 1px dashed var(--border); border-radius: var(--r-md); }
.cv-empty b { display: block; color: var(--text); margin-bottom: var(--s-1); }
.cv-empty .btn { margin-top: var(--s-3); }

/* the settings sheet */
.cv-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 40; }
.cv-scrim[hidden] { display: none; }
.cv-sheet { position: fixed; top: 76px; right: var(--s-6); width: 420px; max-width: calc(100vw - 2 * var(--s-4));
  max-height: calc(100vh - 100px); overflow-y: auto; z-index: 41; outline: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-3); padding: var(--s-5); }
.cv-sheet[hidden] { display: none; }
.cv-sheet > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.cv-sheet h2 { font-size: var(--t-title-3); margin: 0; }
.cv-sheet h3 { font-size: var(--t-small); color: var(--text-2); font-weight: var(--w-medium); margin: var(--s-5) 0 var(--s-2); }
.cv-sheet .hint { font-size: var(--t-small); margin: var(--s-2) 0 0; }
.cv-opt { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); border: 1px solid var(--border);
  border-radius: var(--r-md); margin-bottom: var(--s-2); cursor: pointer; }
/* The Frontier reason is TEXT at --text-2 on --surface-2 — no opacity fade (F11). */
.cv-opt[aria-disabled="true"] { background: var(--surface-2); cursor: default; }
/* The input stays for the keyboard and screen readers, drawn as a 20px radio. */
.cv-opt { position: relative; min-height: var(--hit); }
.cv-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cv-opt__radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--control-border);
  background: var(--surface); flex: none; margin-top: 2px; display: grid; place-items: center; }
.cv-opt__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.cv-opt:has(input:checked) { border-color: var(--accent); }
.cv-opt:has(input:checked) .cv-opt__radio { border-color: var(--accent); }
.cv-opt:has(input:checked) .cv-opt__radio::after { background: var(--accent); }
.cv-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.cv-opt__text b { margin-right: var(--s-2); }
.cv-opt__text .state { vertical-align: middle; }
.cv-opt small { display: block; color: var(--text-2); font-size: var(--t-small); }
.cv-sw { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: var(--hit); }
.cv-toggle { width: 52px; height: 32px; border-radius: 16px; border: 0; background: var(--control-border); position: relative; flex: none; cursor: pointer; }
.cv-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); transition: transform var(--dur-2) var(--ease); }
.cv-toggle[aria-checked="true"] { background: var(--ok); }
.cv-toggle[aria-checked="true"]::after { transform: translateX(20px); }
.cv-toggle:disabled { cursor: not-allowed; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--control-border); }
.cv-sel { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.cv-sel[hidden] { display: none; }
.cv-sel select { flex: 1; min-height: var(--hit); padding: 0 var(--s-3); }

/* ⛔ AUDIT D-39 (P1): at 1280×720 the hero (orb 27vh + greeting + three-line
   caption + starters) was taller than the space between the header and the
   dock, so the quick-action chips were cut off mid-glyph at the dock's edge —
   it read as the composer covering them. On a short window the hero shrinks
   until the whole resting screen fits ABOVE the dock with no scroll. Measured
   by tests/ui/clyde-v2-rules.test.mjs at 1280×720. */
@media (max-height: 820px) {
  .cv-col { padding-top: var(--s-4); padding-bottom: var(--s-8); }
  .cv-hero { padding-top: 0; }
  .cv-orb { --size: clamp(96px, 18vh, 180px); }
  .cv-hero .cv-status { margin-top: var(--s-3); }
  .cv-hello { font-size: var(--t-title-3); margin: var(--s-4) 0 var(--s-1); }
  .cv-starters { margin-top: var(--s-4); }
  .cv-brief-card { margin-top: var(--s-4); }
}

/* glass (1920) */
@media (min-width: 1700px) {
  .cv-col, .cv-dock-in { max-width: 880px; }
  .cv-panel { width: 460px; }
}
/* narrow desktop: the panel overlays rather than squeezing the talk */
@media (max-width: 1180px) {
  .cv-panel { position: absolute; right: 0; top: 0; bottom: 0; box-shadow: var(--shadow-3); z-index: 10; }
  .cv-head .cv-lbl, .cv-mode .cv-lbl { display: none; }
}
/* phone */
@media (max-width: 760px) {
  .cv { height: calc(100vh - 56px - var(--tabbar-h)); }
  .cv-head { padding: var(--s-2) var(--s-4); min-height: 60px; gap: var(--s-2); }
  .cv[data-docked] .cv-slot { width: 40px; }
  .cv-slot { height: 40px; }
  .cv-slot .cv-orb { --size: 34px; }
  .cv-head .cv-route, .cv-head .cv-ptab { display: none; }
  .cv-ptabs-phone { display: inline-grid; }
  .cv-mode { padding: var(--s-2) var(--s-4); gap: var(--s-2); flex-wrap: nowrap; }
  .cv-stepper li .w { display: none; }
  .cv-stepper [aria-current] .w { display: inline; overflow: hidden; text-overflow: ellipsis; }
  .cv-stepper [aria-current] { min-width: 0; }
  .cv-stepper li + li::before { width: 12px; }
  .cv-mode [data-build-restart] { display: none; }
  .cv-col { padding: var(--s-4) var(--s-4) var(--s-8); }
  .cv-orb { --size: min(48vw, 200px); }
  .cv-hero { padding-top: var(--s-2); }
  .cv-hello { font-size: var(--t-title-3); margin-top: var(--s-4); }
  .cv-starters { margin-top: var(--s-4); }
  .cv-dock { padding: var(--s-2) var(--s-3) var(--s-2); }
  .cv .msg-q { max-width: 88%; }
  .cv-panel { position: fixed; inset: 0; width: auto; z-index: 30; border: 0; }
  .cv-sheet { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-width: none; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 86vh; }
  .cv .clyde-route__choices { grid-template-columns: 1fr; }
  .cv-menu { min-width: 0; right: 0; }
  .cv .cv-doc { padding: var(--s-4); }
  .cv-foot .foot-long { display: none; }
  .cv-foot .foot-short { display: inline; }
  /* no hover on a phone: the newest shows; older ones by long-press */
  .cv .clyde-thread > .msg-q-acts:not(.is-last):not(.show-acts):not(:has(.answer-acts__said:not(:empty))),
  .cv .msg-a:not(.is-last) .answer-acts:not(.show-acts):not(:has(.answer-acts__said:not(:empty))) { display: none; }
}
@media (hover: none) {
  .cv .answer-acts.is-last, .cv .msg-a.is-last .answer-acts, .cv .answer-acts.show-acts { opacity: 1; }
}

/* ── OxOnGPT (#/ask) — the assistants' second screen, on the same tokens ───
   Hopper, 2026-10-04, phase 2 "BUILD ALL" stream 3. The v1 rules for this
   screen live in app.css (Foundations' file); these, scoped to .ask-page,
   bring it onto the v2 scale (R-T1: every size a --t-* token; R-K2: every
   target ≥ 44px) without touching that file. Audit D-31…D-35. */
.ask-page .ask-layout { grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-8); margin-top: var(--s-8); }
.ask-page .ask-side { top: var(--s-6); gap: var(--s-2); }
.ask-page .ask-side__head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: nowrap; min-height: var(--hit); }
.ask-page .ask-side__title { flex: 1; margin: 0; font-size: var(--t-lead); font-weight: var(--w-bold); }
/* ⛔ The toggle is a phone affordance. `.btn` (v2.css, later than app.css)
   re-displayed it on every width — that was the second "button" beside
   "New conversation" on the glass (D-31). */
.ask-page .ask-side__toggle { display: none; }
.ask-page .ask-new { width: var(--hit); height: var(--hit); }
.ask-page .ask-new svg { width: 22px; height: 22px; }
.ask-page .convs-group { font-size: var(--t-small); font-weight: var(--w-medium); letter-spacing: 0; text-transform: none;
  color: var(--text-2); margin: var(--s-4) var(--s-3) var(--s-1); }
.ask-page .convs-group:first-child { margin-top: var(--s-1); }
.ask-page .conv { border-radius: var(--r-md); min-height: var(--hit); }
.ask-page .conv:hover, .ask-page .conv:focus-within { background: var(--surface-2); }
.ask-page .conv[aria-current="true"] { background: var(--surface); border-color: var(--border); }
.ask-page .conv__open { padding: var(--s-2) var(--s-1) var(--s-2) var(--s-3); gap: 2px; color: var(--text); font: inherit; cursor: pointer; }
.ask-page .conv__title { font-size: var(--t-body); color: var(--text); }
.ask-page .conv__when { font-size: var(--t-caption); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ask-page .conv__del { width: var(--hit); height: var(--hit); margin-right: 0; border-radius: var(--r-md); color: var(--text-3); }
.ask-page .conv__del svg { width: 18px; height: 18px; }
.ask-page .conv__del:hover { color: var(--bad); background: var(--bad-bg); }
.ask-page .conv.is-confirming { border-color: var(--bad); background: var(--surface); }
.ask-page .conv__confirm { gap: var(--s-2); padding: var(--s-3); }
.ask-page .conv__confirm-q { font-size: var(--t-small); color: var(--text); }
.ask-page .conv__confirm .conv-err { font-size: var(--t-caption); }
.ask-page .convs-state { font-size: var(--t-small); color: var(--text-2); padding: var(--s-1) var(--s-3); }
.ask-page .convs-state b { color: var(--text); font-weight: var(--w-medium); }
.ask-page .conv-head { gap: var(--s-3); margin-bottom: var(--s-4); }
.ask-page .conv-title { font-size: var(--t-title-3); font-weight: var(--w-bold); letter-spacing: 0; margin: 0; }
.ask-page .conv-rename input { font-size: var(--t-body); min-height: var(--hit); padding: 0 var(--s-3);
  background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--r-sm); }
.ask-page .conv-rename input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ask-page .conv-err { color: var(--bad); font-size: var(--t-small); }

/* The AI picker: the segmented control (R-K .seg), never a pill group. */
.ask-page .ask-tiers { flex-wrap: wrap; }
.ask-page .ask-tiers button { min-height: calc(var(--hit) - 6px); font-size: var(--t-body); }
.ask-page .ask-tiers button:disabled { color: var(--text-3); cursor: not-allowed; }
.ask-page .ask-tier-note { min-height: 0; margin: var(--s-2) 0 0; font-size: var(--t-small); }
.ask-page .ask-tier-note:empty { display: none; }

/* The thread on the v2 scale. */
.ask-page .thread { gap: var(--s-6); margin-top: var(--s-6); max-width: 760px; }
.ask-page .msg-q { background: var(--surface-2); border: 0; color: var(--text); font-size: var(--t-body);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); }
.ask-page .msg-a { gap: var(--s-3); }
.ask-page .msg-a .who { font-size: var(--t-caption); font-weight: var(--w-regular); letter-spacing: 0; text-transform: none; color: var(--text-3); }
.ask-page .msg-a .who .dot.ok { background: var(--ok); }
.ask-page .msg-a .body { font-size: var(--t-body); color: var(--text); }
.ask-page .src { font-size: var(--t-caption); color: var(--text-2); border-color: var(--border); background: var(--surface);
  min-height: 32px; padding: 0 var(--s-3); }
.ask-page .state-panel { border-radius: var(--r-lg); }
.ask-page .state-panel .chips { margin-top: var(--s-4); gap: var(--s-2); }
.ask-page .state-panel .chip { font-size: var(--t-body); color: var(--text); }

/* Per-message actions: quiet text actions, ≥ 44px, never bold floating words (D-33). */
.ask-page .answer-acts { gap: var(--s-1); margin-top: var(--s-1); }
.ask-page .msg-q-acts { margin-top: calc(-1 * var(--s-4)); }
.ask-page .answer-acts .btn { font-weight: var(--w-medium); color: var(--text-2); padding: 0 var(--s-3); }
.ask-page .answer-acts .btn:hover { color: var(--text); }
.ask-page .answer-acts__said, .ask-page .answer-acts__offer { font-size: var(--t-small); color: var(--text-2); }

/* The composer and the ONE line about where and what is kept. */
.ask-page .ask-wrap { margin-top: var(--s-8); max-width: 760px; }
.ask-page .composer { padding: var(--s-2); gap: var(--s-2); align-items: flex-end; }
/* the one-line field is exactly --hit, like the buttons beside it, so they sit
   centred with an even 8 px; it was 47.5 px and pushed them 1.5 px low */
.ask-page .composer textarea { font-size: var(--t-body); line-height: 1.5; min-height: var(--hit); padding: calc((var(--hit) - 1.5em) / 2) var(--s-3); }
.ask-page .attach-btn { width: var(--hit); height: var(--hit); display: grid; place-items: center; border-radius: var(--r-md);
  color: var(--text-2); cursor: pointer; flex: none; }
.ask-page .attach-btn:hover { background: var(--surface-2); color: var(--text); }
.ask-page .ask-foot { margin-top: var(--s-3); gap: var(--s-2); font-size: var(--t-small); color: var(--text-2); }
.ask-page .ask-foot .dot { flex: none; }
.ask-page .ask-foot .dot.ok { background: var(--ok); }
.ask-page .ask-foot .dot.warn { background: var(--warn); }
.ask-page #image-note:empty { display: none; }

@media (min-width: 1700px) {
  .ask-page .thread, .ask-page .ask-wrap { max-width: 880px; }
  .ask-page .ask-layout { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ask-page .ask-layout { grid-template-columns: 1fr; gap: var(--s-4); margin-top: var(--s-6); }
  .ask-page .ask-side__toggle { display: inline-flex; }
  .ask-page .ask-tiers { display: flex; flex-wrap: nowrap; width: 100%; }
  /* overflow:hidden (the ellipsis) clips the seg's ::after hit overhang, so on a phone the button itself is --hit tall */
  .ask-page .ask-tiers button { flex: 1 1 0; min-width: 0; min-height: var(--hit); padding: 0 var(--s-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ask-page .thread, .ask-page .ask-wrap { max-width: none; }
}
