/* Phase 8 survey client (v2) — mobile-first, dependency-free, no external hosts.
 *
 * VISUAL LANGUAGE (restyled 2026-08-03): this shell now speaks the same design
 * language as the stimulus review build (scenarios_v2/mobile-preview.html), which
 * in turn carries the Seavista Ops Console v3 tokens the stimuli themselves are
 * rendered in. Same page black, same accent, same hairlines, same outlined-pill
 * idiom, same glass surfaces, same 544 px column. The stimuli are PNGs with IBM
 * Plex baked in; the shell uses a system stack (no webfont fetch is permitted —
 * this app must contact NO external host), so only the letterforms differ.
 *
 * Four things from the review build are deliberately NOT carried over, because
 * they are reviewer-only and would unblind a respondent:
 *   1. the tier chip (BUNDLE / PROBE / UI)  — names the tier,
 *   2. the item id in the meta row (B1, …)  — names the entry,
 *   3. the "SHOWING OFF ⇄" variant toggle   — names the arm,
 *   4. "◀ Back"                             — respondents must not revise an
 *                                              answer after seeing later items.
 * Their STYLING is reused (the outlined pill is the idiom behind the Likert and
 * the action buttons); the elements themselves are absent.
 *
 * The v2 stimuli ARE mobile designs: 840x1488 renders of a 420x744 phone frame.
 * They are therefore shown at the full width of the column and read at rest —
 * there is no lightbox, no pinch-zoom and no "tap to enlarge" anywhere in this
 * stylesheet. They already CARRY the review build's frame treatment in their own
 * pixels — the export screenshots the `.frame` element, so the 1 px #1f2a38
 * hairline and the 20 px corners are baked in. This stylesheet therefore adds no
 * frame of its own; see the `.stimulus` rule for the measurement and for why a
 * wrapper frame produced two colliding corner curves.
 */

/* The app hides elements (screens, bars, errors) by toggling the `hidden`
 * attribute in JS. Author `display` rules otherwise override the attribute and
 * leave the element visible — which once left a full-screen overlay covering the
 * page and swallowing every tap. This global guard makes `hidden` always win.
 * Must stay above every component display rule. */
[hidden] { display: none !important; }

:root {
  color-scheme: dark;

  /* ── Console tokens, verbatim from the review build's :root ─────────────── */
  --page: #04070c;      /* page black, behind everything */
  --bg: #080c13;        /* panel black, inside the stimulus frame */
  --panel-2: #18212f;   /* raised control surface */
  --panel-3: #1f2a3a;   /* recessed surface (inputs, wells) */

  --text: #e8eef6;
  --text-2: #9fb0c4;
  --text-3: #708297;

  --accent: #3d8bff;
  --accent-text: #7fb0ff;
  --accent-wash: rgba(61, 139, 255, 0.16);
  --accent-rim: rgba(61, 139, 255, 0.42);

  --ok: #50b07c;
  --risk-high: #ffb23d;
  --risk-medium: #e8c24a;
  --risk-low: #859ac2;
  --risk-critical: #ff5c5c;

  --hair: #1f2a38;         /* subtle hairline: frames, dividers, wells */
  --hair-strong: #2a3647;  /* control hairline: buttons, inputs, pills */

  --glass-bg: linear-gradient(155deg, rgba(38, 52, 73, 0.52), rgba(13, 19, 29, 0.40));
  --glass-bg-strong: linear-gradient(160deg, rgba(26, 36, 51, 0.80), rgba(12, 18, 27, 0.74));
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --glass-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.42);

  /* ── Geometry ───────────────────────────────────────────────────────────── */
  /* The review build's column, to the pixel: 544 px at rest, shrinking with a
   * 12 px gutter each side rather than clipping on a narrow phone. */
  --col: min(544px, 100vw - 24px);
  --gap: 12px;      /* the review build's vertical rhythm */
  --inset: 16px;    /* the .qdesc / .qbox inner inset */

  --r-frame: 20px;  /* .frame */
  --r-card: 14px;   /* .qbox */
  --r-sm: 12px;
  --r-input: 11px;
  --pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --topbar-row: 44px;
  --topbar-h: 59px;    /* 10 rail margin + 4 rail + 44 row + 1 hairline (measured) */
  --actionbar-h: 76px; /* 14 + 46 button + 16 (measured) */
}

* { box-sizing: border-box; letter-spacing: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  /* No webfont: the survey must contact no external host. This is the closest
   * system stack to the review build's IBM Plex Sans on each platform. */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

.mono, .session-id {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }

/* ── layout shell ─────────────────────────────────────────────────────────── */

#app { min-height: 100dvh; }

.shell {
  width: var(--col);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + var(--safe-t) + 16px) 0 calc(44px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

#screen-landing .shell { padding-top: calc(var(--safe-t) + 32px); }

.shell-item { padding-bottom: calc(var(--actionbar-h) + var(--safe-b) + 20px); }

.stack { display: flex; flex-direction: column; gap: 10px; }

/* ── top chrome: the review build's bar + position line ───────────────────── */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-top: var(--safe-t);
  background: rgba(4, 7, 12, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}

/* .rv-bar — 4 px, pill, hairline well, flat accent fill, .18s ease. */
.progress {
  width: var(--col);
  margin: 10px auto 0;
  height: 4px;
  border-radius: var(--pill);
  background: #111824;
  border: 1px solid var(--hair);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: var(--pill);
  background: var(--accent);
  transition: width 0.18s ease;
}

.topbar-inner {
  width: var(--col);
  margin: 0 auto;
  height: var(--topbar-row);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* .rv-pos */
.counter {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.counter-num { color: var(--text); font-variant-numeric: tabular-nums; }

/* .tog geometry at a smaller scale — an outlined pill, not a filled control. */
.btn-finish {
  appearance: none;
  flex: none;
  padding: 7px 15px;
  border-radius: var(--pill);
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.btn-finish:hover { border-color: var(--text-3); color: var(--text); }

/* ── hero / landing ───────────────────────────────────────────────────────── */

.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* The landing carries a title, the lede and the save note — nothing else.
 * Removed 2026-08-03 (user): the "RESEARCH STUDY · ABOUT 5 MINUTES" eyebrow pill,
 * the "No login / Anonymous / No right answers" chip row, and the
 * "A study of an AI maritime surveillance console" subtitle, along with their
 * rules (.eyebrow, .chips, .chips li, .hero-sub). The h1 no longer stacks a
 * subtitle, so it is a plain block again rather than a flex column. */
h1 {
  font-size: 25px;
  line-height: 1.2;
}

.hero-lede { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

/* Plain text, not a card (owner request 2026-08-05 — "remove the box, let it be just
   text"). It was the `.card.rec` idiom: tinted fill, accent border, radius, padding.
   The reassurance reads better unboxed — a bordered callout on the landing screen asks
   to be read as a warning, which is the opposite of what it says. Only the paint is
   gone: the flex row, the tick and the copy are untouched, and the copy is untouched
   deliberately — §7 forbids rewording approved consent CONTENT while changing its
   PRESENTATION, and this is presentation. No margin correction is needed: measured on
   the live page, the note, its tick and `.hero-lede` above it all sit at x=12, because
   the 12 px the padding used to add was the same 12 px the shell already indents by. */
/* "What one screen looks like" outline (2026-08-06) — plain text like the lede;
   the h2 is a quiet section label, not a competing headline. */
.what-outline { margin-top: 18px; gap: 6px; }
.what-title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-3); }

/* Three numbered, labelled parts mirroring the page order (2026-08-06 rework —
   the two-italic-quotes form read as fine print, not as a walkthrough). All tokens
   existing; the meter mock reuses the option-pill idiom at a reduced size. */
.what-example { margin: 4px 0 0; display: flex; flex-direction: column; gap: 14px;
  align-items: stretch; width: 100%; }
.wex-tag { align-self: flex-start; font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-text);
  border: 1px solid var(--accent-text); border-radius: 999px; padding: 2px 10px; }
.wex-part { display: flex; gap: 10px; align-items: flex-start; }
.wex-n { flex: none; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--text-3); color: var(--text-2);
  font-size: 11px; font-weight: 600; margin-top: 1px; }
.wex-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wex-label { font-size: 12px; font-weight: 600; color: var(--text); }
.wex-desc { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.wex-body img { width: min(230px, 100%); border-radius: 12px;
  border: 1px solid var(--glass-border); display: block; }
.wex-meter { display: flex; gap: 6px; }
.wex-meter span { width: 34px; padding: 6px 0; text-align: center; font-size: 13px;
  font-weight: 600; color: var(--text-2); border: 1px solid #2a3647; border-radius: 999px; }
.wex-meter .sel { background: rgba(61, 139, 255, .16); border-color: var(--accent);
  color: var(--accent-text); }
.wex-anchors { margin: 0; display: flex; justify-content: space-between; gap: 12px;
  width: 194px; font-size: 10px; color: var(--text-3); }

.save-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}
.save-note svg { flex: none; width: 15px; height: 15px; color: var(--accent-text); margin-top: 3px; }

/* Locks the page behind an open sheet so the backdrop does not scroll away. */
body.no-scroll { overflow: hidden; }

.fine { font-size: 11.5px; line-height: 1.45; color: var(--text-3); }

/* ── consent: short top layer on the landing, full notice in the sheet ────── */

#consent-block, #resume-block { display: flex; flex-direction: column; gap: 10px; }

.consent-line {
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}
.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 2px;
  margin: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkish:hover { color: var(--accent); }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Bottom sheet — the second layer of the notice. Scrollable, dismissible, and
 * sized for real reading on a phone rather than an alert-box squeeze. Glass
 * tokens, so it belongs to the same surface system as the question card. */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.74);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(88dvh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-strong), var(--bg);
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  border-radius: var(--r-frame) var(--r-frame) 0 0;
  box-shadow: var(--glass-rim), var(--glass-shadow);
}
.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--hair);
}
.sheet-head h2 { font-size: 16.5px; font-weight: 600; }
.sheet-grip {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 4px;
  border-radius: var(--pill);
  background: var(--hair-strong);
}
.sheet-close {
  appearance: none;
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.sheet-close:hover { border-color: var(--text-3); color: var(--text); }
.sheet-close:focus-visible, .sheet-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* .section-kicker register */
.sheet-body h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-top: 18px;
}
.sheet-body p { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.sheet-body strong { color: var(--text); font-weight: 600; }
.sheet-foot { padding: 12px 16px calc(16px + var(--safe-b)); border-top: 1px solid var(--hair); }

/* Explicit-consent mode only — hidden unless SURVEY_CONSENT_MODE=explicit. */
.agree {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  cursor: pointer;
  user-select: none;
}
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.agree-box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--hair-strong);
  display: grid;
  place-items: center;
  color: transparent;
  background: transparent;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.agree-text { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.agree:has(input:checked) { border-color: var(--accent-rim); background: var(--accent-wash); }
.agree:has(input:checked) .agree-box { background: var(--accent); border-color: var(--accent); color: #06101f; }
.agree:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── buttons: the .navbtn pill ────────────────────────────────────────────── */

.btn {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  flex: none;
  min-width: 118px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--pill);
  border: 1px solid var(--hair-strong);
  background: var(--panel-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}
/* The inline arrow/tick glyphs are authored at 19 px for the old type scale;
 * at 13.5 px label size they have to come down with it. */
.btn svg { flex: none; width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn:hover:not([aria-disabled="true"]) { border-color: var(--text-3); }

/* .navbtn.go */
.btn-primary {
  background: var(--accent-wash);
  border-color: var(--accent-rim);
  color: var(--accent-text);
}
.btn-primary:hover:not([aria-disabled="true"]) { border-color: var(--accent); }
.btn-primary[aria-disabled="true"] { opacity: 0.34; cursor: default; }
/* every required question on this item answered */
.btn-primary.ready { border-color: var(--accent); }

.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--hair-strong); }

.btn:focus-visible, .btn-finish:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── item screen ──────────────────────────────────────────────────────────── */

/* Framing text, verbatim from the pool's `description`. Plain text above the
 * stimulus — .qdesc: no card, no rule, the column's 16 px inner inset only. */
.description {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  padding: 0 var(--inset);
  margin: 2px 0 2px;
}

/* The stimulus, at the full width of the column and read at rest. The render is
 * a 420x744 phone frame, so it carries the review build's own .frame treatment —
 * hairline, 20 px radius, clipped. `aspect-ratio` reserves the box before the
 * image decodes so the questions never jump. */
/* NO border and NO radius here — the render already carries both.
 *
 * `export-stimuli.mjs` screenshots the review build's `.frame` ELEMENT, which is
 * itself `border:1px solid #1f2a38; border-radius:20px; overflow:hidden`. So the
 * PNG has the hairline and the rounded corners baked into its pixels, with the
 * corner area filled with the page black it was shot against. Measured on
 * `stimuli_v2/b1-off.png` (840x1488, i.e. 2x):
 *     (0,0)   = #04070c  <- page black, inside the rounded corner
 *     (12,12) = #1f2a38  <- the hairline itself
 *     (0,h/2) = #1f2a38  <- the border runs down the left edge at x=0
 *
 * Wrapping that in a second 1 px / 20 px frame drew two concentric rounded
 * rectangles whose corners could not align — the wrapper's radius starts 1 px
 * outside the image's own, so both curves were visible and collided. The frame
 * belongs to the render; this element only sizes and positions it.
 *
 * The baked corners are #04070c, which is exactly `--page`, so they blend into
 * the page with no seam. If the page black ever changes, the renders must be
 * re-exported to match — they are not independent of it. */
.stimulus {
  margin: 0;
  width: 100%;
  background: transparent;
  position: relative;
  line-height: 0;
}
.stimulus img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 420 / 744;
  object-fit: cover;
  object-position: top center;
}
/* The placeholder is the one case with no render behind it, so it has to draw
 * the frame itself — otherwise a missing stimulus is an unbordered void rather
 * than a visibly empty frame. */
.stimulus.is-placeholder {
  aspect-ratio: 420 / 744;
  display: grid;
  place-items: center;
  line-height: 1.5;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: var(--r-frame);
  overflow: hidden;
}
.placeholder-banner { text-align: center; padding: 24px; }
.placeholder-banner .tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--risk-critical);
  border: 1px solid var(--risk-critical);
  border-radius: var(--pill);
  padding: 3px 10px;
  display: inline-block;
}
.placeholder-banner .alt { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

/* ── questions: the .qbox glass card ──────────────────────────────────────── */

.questions {
  width: 100%;
  margin: 0;
  padding: 14px var(--inset) 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  background: var(--glass-bg-strong);
  box-shadow: var(--glass-rim);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.q { display: flex; flex-direction: column; gap: 9px; }
.qtext { font-size: 16.5px; font-weight: 600; line-height: 1.4; color: var(--text); }

/* The 1–5 meter: the review build's .scale-opts / .opt, verbatim in treatment.
 * Outlined pills; selected is the accent wash with an --accent rim. Padding is
 * one step up from the review build's 10 px so the target clears 44 px on a
 * phone — the only value here that is not lifted unchanged. */
.likert { display: flex; gap: 8px; }
.lk {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--hair-strong);
  border-radius: var(--pill);
  padding: 13px 0;
  cursor: pointer;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), color 130ms var(--ease);
}
.lk:hover { border-color: var(--text-3); color: var(--text); }
.lk[aria-pressed="true"] {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-text);
}
.lk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* .scale-anchors — pinned to the ends of the same box the options span. */
.anchors {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-3);
  margin-top: -2px;
}
.anchors span:last-child { text-align: right; }

/* .tog — the outlined content-sized pill. */
.text-toggle {
  appearance: none;
  align-self: flex-start;
  max-width: 100%;
  padding: 9px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease;
}
.text-toggle svg { flex: none; width: 13px; height: 13px; color: var(--text-3); }
.text-toggle:hover { border-color: var(--text-3); }
.text-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.text-wrap { display: none; flex-direction: column; gap: 8px; }
.text-wrap.open { display: flex; }
/* .input-row idiom */
.text-wrap textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 13px;
  border-radius: var(--r-input);
  border: 1px solid var(--hair-strong);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}
.text-wrap textarea::placeholder { color: var(--text-3); }
.text-wrap textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* ── action bar ───────────────────────────────────────────────────────────── */

.actionbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  padding-bottom: var(--safe-b);
  background: linear-gradient(180deg, rgba(4, 7, 12, 0), rgba(4, 7, 12, 0.92) 34%, var(--page));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.actionbar-inner {
  width: var(--col);
  margin: 0 auto;
  padding: 14px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#skip-btn { flex: 0 0 34%; min-width: 0; }
#submit-btn { flex: 1 1 auto; min-width: 0; }

/* ── done ─────────────────────────────────────────────────────────────────── */

.done-check { color: var(--ok); }
.done-check svg { width: 54px; height: 54px; }

/* .qbox — the same glass surface as the question card. */
.card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow: var(--glass-rim);
  padding: 14px var(--inset);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.card h3 { font-size: 13.5px; font-weight: 600; }
.session-id {
  font-size: 12px;
  line-height: 1.45;
  color: var(--accent-text);
  background: var(--panel-3);
  border: 1px solid var(--hair);
  border-radius: var(--r-input);
  padding: 9px 11px;
  word-break: break-all;
  user-select: all;
}

/* ── errors ───────────────────────────────────────────────────────────────── */

.err {
  color: var(--risk-critical);
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255, 92, 92, 0.09);
  border: 1px solid rgba(255, 92, 92, 0.30);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

/* ── motion ───────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .screen[data-anim] { animation: rise 300ms var(--ease) both; }
  .counter.bump .counter-num { animation: bump 380ms var(--ease); }
  .dc-ring { animation: draw 520ms var(--ease) both; stroke-dasharray: 145; stroke-dashoffset: 145; }
  .dc-tick { animation: draw 380ms 260ms var(--ease) both; stroke-dasharray: 40; stroke-dashoffset: 40; }
  .sheet:not([hidden]) .sheet-panel { animation: sheet-up 300ms var(--ease) both; }
  .sheet:not([hidden]) .sheet-backdrop { animation: fade-in 220ms var(--ease) both; }
}

@keyframes sheet-up { from { transform: translateY(26px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: none; } 35% { transform: scale(1.28); color: var(--accent-text); } 100% { transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
