:root {
  --ground: #edf1ef;
  --surface: #ffffff;
  --surface-2: #f5f8f6;
  --ink: #15201b;
  --muted: #58675f;
  --line: #d2dbd6;
  --line-strong: #a9b7b0;
  --accent: #0e6a70;
  --accent-soft: #d8ecec;
  --accent-ink: #ffffff;
  --good: #2c7549;
  --good-soft: #dcefe2;
  --warn: #9a6210;
  --warn-soft: #f6e8cf;
  --bad: #ae2a22;
  --bad-soft: #f7dcd9;
  --stage: #1d201f;
  --stage-ink: #d9dedb;
  --focus: #0e6a70;
  --shadow: 0 1px 2px rgb(20 32 27 / 0.06), 0 8px 24px rgb(20 32 27 / 0.06);

  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'Arial Narrow', 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.4rem;
  --step-3: 1.85rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101513;
    --surface: #182019;
    --surface-2: #1d2621;
    --ink: #e3eae6;
    --muted: #97a69e;
    --line: #2b3631;
    --line-strong: #46544d;
    --accent: #48a9ae;
    --accent-soft: #173a3c;
    --accent-ink: #06201f;
    --good: #6cc08c;
    --good-soft: #17301f;
    --warn: #e0a54b;
    --warn-soft: #33270f;
    --bad: #f08a80;
    --bad-soft: #3a1a17;
    --focus: #6cc5ca;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #101513;
  --surface: #182019;
  --surface-2: #1d2621;
  --ink: #e3eae6;
  --muted: #97a69e;
  --line: #2b3631;
  --line-strong: #46544d;
  --accent: #48a9ae;
  --accent-soft: #173a3c;
  --accent-ink: #06201f;
  --good: #6cc08c;
  --good-soft: #17301f;
  --warn: #e0a54b;
  --warn-soft: #33270f;
  --bad: #f08a80;
  --bad-soft: #3a1a17;
  --focus: #6cc5ca;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--cond); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
a { color: var(--accent); }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--cond);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.35rem; padding: 0 0.95rem;
  border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--surface); color: var(--ink);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); }
.btn.small { min-height: 1.9rem; padding: 0 0.6rem; font-size: var(--step--1); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* ---------- Shell ---------- */
.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: baseline; gap: 0.6rem; margin-right: auto; }
.wordmark strong { font-family: var(--cond); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 1rem; }
.wordmark span { color: var(--muted); font-size: var(--step--1); }
.who { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: var(--step--1); }
.who code { color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 0.05rem 0.4rem; border-radius: 4px; }
.demo-banner {
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line);
  padding: 0.4rem 1rem; font-size: var(--step--1); display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center;
}

.page { max-width: 68rem; margin: 0 auto; padding-inline: 1rem; padding-block: 2rem 4rem; display: grid; gap: 1.5rem; }
.narrow { max-width: 40rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; display: grid; gap: 1rem; }
.lede { color: var(--muted); max-width: 62ch; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* ---------- Sign in ---------- */
.signin { min-height: calc(100vh - 3rem); display: grid; place-items: center; padding-inline: 1rem; padding-block: 2rem; }
.signin .panel { width: min(100%, 26rem); box-shadow: var(--shadow); }
.field-input { display: grid; gap: 0.35rem; }
.field-input input, .field-input textarea, .field-input select {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
}
.hint { color: var(--muted); font-size: var(--step--1); }
.error { color: var(--bad); font-size: var(--step--1); }

/* ---------- Guide acknowledgement ---------- */
.rules { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.rules li { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.5rem; align-items: start; }
.rules li b { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; }
.check input { margin-top: 0.3rem; accent-color: var(--accent); width: 1rem; height: 1rem; }

/* ---------- Labeling workspace ---------- */
.work {
  display: grid; grid-template-columns: minmax(0, 1fr) 25rem;
  height: calc(100vh - 3.25rem); min-height: 32rem;
}
.demo .work { height: calc(100vh - 5.25rem); }
.stage-wrap { display: grid; grid-template-rows: auto 1fr; min-width: 0; background: var(--stage); color: var(--stage-ink); }
.stage-tools { display: flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.6rem; border-bottom: 1px solid #2c302e; flex-wrap: wrap; }
.stage-tools .btn { background: #2a2e2c; border-color: #3a3f3c; color: var(--stage-ink); min-height: 1.9rem; padding: 0 0.6rem; font-size: var(--step--1); }
.stage-tools .btn:hover { border-color: #8a918d; }
.stage-tools .zoom { font-family: var(--mono); font-size: var(--step--1); min-width: 3.5rem; text-align: center; }
.stage-tools .spacer { flex: 1; }
.stage { position: relative; overflow: hidden; cursor: grab; touch-action: none; }
.stage.dragging { cursor: grabbing; }
.stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; image-rendering: auto; }
.stage .stage-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; color: #aeb5b1; }

.sheet { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.sheet-head { padding: 0.9rem 1.1rem 0.75rem; border-bottom: 1px solid var(--line); display: grid; gap: 0.35rem; }
.sheet-head .row { justify-content: space-between; }
.timer { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); display: inline-flex; gap: 0.35rem; align-items: center; }
.timer .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--good); }
.timer.paused .dot { background: var(--warn); }
.timer.paused { color: var(--warn); }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }

.sheet-body { overflow-y: auto; padding: 0.4rem 1.1rem 1rem; }
.q { border: 0; margin: 0; padding: 0.8rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.45rem; min-width: 0; }
.q:last-child { border-bottom: 0; }
.q legend { padding: 0; display: contents; }
.q-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.q-label { font-family: var(--cond); font-weight: 600; font-size: 1rem; }
.q-text { color: var(--muted); font-size: var(--step--1); }
.q.missing .q-label::after { content: ' •'; color: var(--warn); }
.help-toggle { border: 1px solid var(--line); background: transparent; border-radius: 999px; width: 1.4rem; height: 1.4rem; font-size: 0.75rem; color: var(--muted); cursor: pointer; flex: none; }
.help-toggle[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.help { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.55rem 0.7rem; font-size: var(--step--1); color: var(--ink); }

.opts { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; min-height: 2rem; padding: 0 0.7rem;
  border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface);
  font-size: var(--step--1); font-weight: 500; cursor: pointer;
}
.opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.opt input:disabled + span { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.opt input:disabled { cursor: not-allowed; }
.opt.auto input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); text-decoration: none; opacity: 1; }
.auto-note { font-size: var(--step--1); color: var(--muted); }

.notes textarea { width: 100%; min-height: 4.5rem; resize: vertical; padding: 0.5rem 0.65rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.req { color: var(--warn); font-size: var(--step--1); font-weight: 500; }

.sheet-foot { border-top: 1px solid var(--line); padding: 0.75rem 1.1rem 0.9rem; display: grid; gap: 0.6rem; background: var(--surface); }
.todo { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.2rem; font-size: var(--step--1); color: var(--warn); max-height: 4.6rem; overflow-y: auto; }
.todo li::before { content: '○ '; }
.ready { font-size: var(--step--1); color: var(--good); }
.sheet-foot .btn.primary { width: 100%; min-height: 2.75rem; }

/* ---------- Feedback / comparisons ---------- */
.compare { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.compare th, .compare td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font-family: var(--cond); font-weight: 600; color: var(--muted); letter-spacing: 0.03em; }
.compare tr.diff td { background: var(--bad-soft); }
.mark { font-family: var(--mono); font-weight: 500; }
.mark.ok { color: var(--good); }
.mark.no { color: var(--bad); }
.explain { background: var(--accent-soft); border-radius: 6px; padding: 0.75rem 0.9rem; }

/* ---------- Status ---------- */
.status-card { display: grid; gap: 0.6rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.5rem; }
.step { border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.75rem; background: var(--surface); display: grid; gap: 0.15rem; }
.step .n { font-family: var(--mono); font-size: var(--step-1); }
.step.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.step.done .n { color: var(--good); }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Tables (dashboard) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data th { font-family: var(--cond); font-weight: 600; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.selected { background: var(--accent-soft); }
table.data select { padding: 0.2rem 0.3rem; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }

.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 0.6rem 0.9rem; font-family: var(--cond); font-weight: 600; font-size: 1rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.8rem; }
.stat b { display: block; font-family: var(--mono); font-weight: 500; font-size: var(--step-2); }
.stat span { color: var(--muted); font-size: var(--step--1); }
.legend { color: var(--muted); font-size: var(--step--1); max-width: 80ch; }
.cells { display: flex; gap: 2px; }
.cell { width: 1.35rem; height: 1.35rem; border-radius: 3px; display: grid; place-items: center; font-size: 0.7rem; font-family: var(--mono); }
.cell.ok { background: var(--good-soft); color: var(--good); }
.cell.no { background: var(--bad-soft); color: var(--bad); }
.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; }
.key-card { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 0.6rem; display: grid; gap: 0.35rem; text-align: left; cursor: pointer; }
.key-card:hover { border-color: var(--accent); }
.key-card .thumb { aspect-ratio: 4 / 3; max-width: 100%; background: var(--stage); border-radius: 4px; overflow: hidden; }
.key-card .thumb img { width: 100%; height: 100%; object-fit: contain; }

dialog.modal { border: 0; border-radius: 10px; padding: 0; width: min(96vw, 76rem); height: min(92vh, 52rem); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgb(10 14 12 / 0.6); }
.modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; height: 100%; }
.modal-side { overflow-y: auto; padding: 1rem; display: grid; gap: 0.9rem; align-content: start; border-left: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 0.6rem 1rem; border-radius: 6px; font-size: var(--step--1); z-index: 50; box-shadow: var(--shadow); max-width: calc(100vw - 2rem); }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 860px) {
  .work, .demo .work { grid-template-columns: 1fr; grid-template-rows: 60vh auto; height: auto; }
  .sheet { border-left: 0; border-top: 1px solid var(--line); }
  .sheet-body { overflow: visible; }
  .sheet-foot { position: sticky; bottom: 0; }
  .modal-grid { grid-template-columns: 1fr; grid-template-rows: 50vh auto; }
  .modal-side { border-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Arabic text flows right-to-left; image coordinates and identifiers do not. */
html[dir="rtl"] { --sans: Tahoma, 'Segoe UI', Arial, sans-serif; --cond: var(--sans); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.5; }
html[dir="rtl"] .eyebrow { letter-spacing: normal; }
html[dir="rtl"] .wordmark { margin-right: 0; margin-inline-end: auto; }
html[dir="rtl"] .sheet, html[dir="rtl"] .modal-side { border-left: 0; border-inline-start: 1px solid var(--line); }
html[dir="rtl"] .compare th, html[dir="rtl"] .compare td,
html[dir="rtl"] table.data th, html[dir="rtl"] table.data td,
html[dir="rtl"] .key-card { text-align: start; }
html[dir="rtl"] code, html[dir="rtl"] .mono, html[dir="rtl"] input[type="email"] { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .stage { direction: ltr; }
html[dir="rtl"] .stage-msg { direction: rtl; }
@media (max-width: 860px) {
  html[dir="rtl"] .sheet, html[dir="rtl"] .modal-side { border-inline-start: 0; }
}

/* ---------- Reading and interaction (1.2) ---------- */
html[dir="rtl"] {
  --sans: 'IBM Plex Sans Arabic', Tahoma, 'Segoe UI', Arial, sans-serif;
  --cond: var(--sans);
  --step--1: 0.875rem;
  --step-0: 1rem;
  font-size: 106.25%;
}
html[dir="rtl"] body { line-height: 1.75; }
html[dir="rtl"] .lede, html[dir="rtl"] .rules span { max-width: 60ch; }

/* Questions */
.q { padding: 0.9rem 0.25rem; transition: background-color 0.2s; }
.q-top { justify-content: flex-start; align-items: center; }
.q-top .help-toggle, .q-top .req, .q-top .hint { margin-inline-start: auto; }
.q-num {
  flex: none; display: inline-grid; place-items: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
}
.q.answered .q-num { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.q-label { font-size: 1.05rem; }
.q-text { font-size: 0.95rem; color: var(--ink); opacity: 0.85; padding-inline-start: 2.1rem; }
.q .opts, .q .help, .q .auto-note { margin-inline-start: 2.1rem; }
.q.missing .q-label::after { content: none; }
.q.attention, .opts.attention { background: var(--warn-soft); border-radius: 8px; box-shadow: 0 0 0 2px var(--warn); }
.help { font-size: 0.95rem; line-height: 1.85; }
.help-toggle { width: 1.9rem; height: 1.9rem; font-size: 0.9rem; font-weight: 600; }
.opt span { min-height: 2.6rem; padding: 0 1rem; font-size: 0.95rem; border-radius: 8px; }
.opt input:disabled + span { text-decoration: none; opacity: 0.3; }
.opts.reasons { padding: 0.5rem; }
.notes textarea { font-size: 1rem; line-height: 1.7; min-height: 5rem; }

/* Submit area */
.answer-progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.answer-progress i { display: block; height: 100%; width: 0; background: var(--good); transition: width 0.25s; }
.answer-status { font-size: 0.95rem; color: var(--muted); margin: 0; }
.answer-status.ready { color: var(--good); font-weight: 500; }
.sheet-foot .btn.primary { width: 100%; min-height: 3rem; font-size: 1.05rem; }
.sheet-foot .btn.primary.incomplete { background: var(--surface); color: var(--accent); border-color: var(--accent); }

/* Top bar and account menu */
.topbar { padding: 0.5rem 1rem; }
.who { gap: 0.25rem; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; gap: 0.4rem; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu code { color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 0.05rem 0.4rem; border-radius: 4px; }
.menu-panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 0.35rem); z-index: 30;
  display: grid; min-width: 12rem; padding: 0.35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.menu-panel .btn { justify-content: flex-start; width: 100%; color: var(--ink); }
.menu-panel .btn:hover { background: var(--surface-2); }
.demo-banner { padding-block: 0.3rem; align-items: center; }
.demo-banner .btn { margin-inline-start: auto; }

/* Status page */
.step .n { font-size: 1.5rem; }
.step.current { background: var(--accent-soft); }

@media (max-width: 860px) {
  /* Keep the photograph in view while answering on phones and tablets. */
  .work, .demo .work { display: block; height: auto; }
  .stage-wrap { position: sticky; top: 0; z-index: 10; height: 40vh; min-height: 13rem; box-shadow: 0 6px 12px rgb(0 0 0 / 0.18); }
  .stage-tools { padding: 0.3rem 0.5rem; }
  .stage-tools .spacer, .stage-tools .mono { display: none; }
  .sheet { display: block; }
  .sheet-head { padding: 0.75rem 1rem; }
  .sheet-body { padding-inline: 1rem; }
  .sheet-foot { position: sticky; bottom: 0; z-index: 11; box-shadow: 0 -6px 12px rgb(0 0 0 / 0.08); padding-block: 0.6rem; }
  .q-text, .q .opts, .q .help, .q .auto-note { padding-inline-start: 0; margin-inline-start: 0; }
  .wordmark span, .who-label { display: none; }
}
@media (max-width: 480px) {
  .opt { flex: 1 1 calc(50% - 0.35rem); }
  .opt span { width: 100%; justify-content: center; }
}
.q, .opts.reasons { scroll-margin-top: 1rem; }
@media (max-width: 860px) {
  .q, .opts.reasons { scroll-margin-top: calc(max(40vh, 13rem) + 0.75rem); }
  .toast { bottom: 9rem; }
  .demo-banner { flex-wrap: nowrap; font-size: 0.8rem; gap: 0.5rem; }
  .demo-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .demo-banner .btn { min-height: 1.8rem; padding: 0 0.5rem; }
}
.demo-banner strong { white-space: nowrap; }

/* Practice result */
.result-card { text-align: center; justify-items: center; }
.result-card .lede { margin-inline: auto; }
.score-big { font-family: var(--mono); font-size: 3.5rem; font-weight: 500; line-height: 1; color: var(--good); }
.result-list { text-align: start; margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 0.35rem; }
.result-card .btn.primary { min-width: 14rem; min-height: 3rem; font-size: 1.05rem; }

/* Research consent */
.consent-card { gap: 1rem; }
.consent-text { display: grid; gap: 0.75rem; line-height: 1.9; }
.consent-text h1 { font-size: var(--step-2); }
.consent-text h2 { font-size: var(--step-1); margin-top: 0.5rem; }
.consent-text ul { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 0.35rem; }
.consent-actions { display: grid; gap: 0.6rem; }
.consent-actions .btn { min-height: 3rem; font-size: 1.02rem; white-space: normal; }
/* Instructional media stays within the guide on narrow screens. */
.guide-video { display: block; width: 100%; max-width: 100%; height: auto; margin-block: 1rem; background: #103c40; border-radius: 8px; }
