/* The African Languages Lab — interactive research demo.
   Redesign: "exercise book" aesthetic from Jemimah's mockups —
   ruled paper, red margin line, exercise-blue ink, highlighter yellow,
   red-pen annotations in Schoolbell. Body text is Andika (designed for
   literacy / beginning readers); model output is Gentium Book Plus,
   Arabic output Noto Naskh Arabic. Fonts load from Google Fonts. */

:root {
  --paper-bg: #fbfcfe;
  --rule: #c3d4f2;
  --ink: #1a1d26;
  --ink-mid: #3a4054;
  --ink-soft: #4d5366;
  --blue: #1f3fa0;
  --blue-dark: #16277c;
  --blue-deep: #0f1d5c;
  --blue-head: #1d2f8f;
  --blue-pale: #e3e9f6;
  --blue-hover: #eef3fd;
  --blue-track: #e1e4ec;
  --blue-line: #aab3e8;
  --yellow: #ffe94d;
  --yellow-hover: #ffdf1a;
  --yellow-pale: #fff6b8;
  --red: #c8231c;
  --red-soft: #e4585a;
  --red-dark: #a32a1f;
  --teal: #1b6f6a;
  --good: #17684a;
  --gold: #b8780a;
  --grey-dot: #8b93a3;
  --line: #d9dce3;
  --line-soft: #e6e8ee;
  --line-blue: #dfe5f1;
  --input-border: #b9bfcc;
  --tab-border: #c3c8d4;
  --card-shadow: 0 6px 18px rgba(26, 29, 38, .10);
  --btn-shadow: 0 2px 5px rgba(15, 29, 92, .35);
  --font-text: 'Andika', system-ui, sans-serif;
  --font-sample: 'Gentium Book Plus', Georgia, serif;
  --font-hand: 'Schoolbell', 'Andika', cursive;
  --font-ar: 'Noto Naskh Arabic', 'Gentium Book Plus', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { margin: 0; }

a { color: inherit; }
button, input, select, textarea { font: inherit; box-sizing: border-box; }
a, button { transition: transform .15s ease-out, background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
a:active, button:active { transform: scale(.97); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 3px;
}
.cover a:focus-visible { outline-color: #ffffff; }
::selection { background: var(--yellow); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.num { font-variant-numeric: tabular-nums; }

/* ---------- page / ruled paper ---------- */
.page {
  background-color: var(--paper-bg);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 32px;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 32px;
  min-height: 100vh;
}

/* content column with the red margin line */
.col {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 0 88px;
}
.col::before {
  content: "";
  position: absolute;
  left: 60px; top: 0; bottom: 0;
  width: 2px;
  background: var(--red-soft);
}

/* ---------- header ---------- */
.cover {
  background: var(--blue);
  color: #ffffff;
  border-bottom: 4px solid var(--blue-deep);
}
.cover-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  background: #ffffff;
  color: var(--blue-dark);
  border-radius: 6px;
  padding: 4px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
}
.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; line-height: 1.2; }
.mainnav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.mainnav a:hover { background: rgba(255, 255, 255, .16); }
.mainnav a.hl {
  padding: 0 18px;
  margin-left: 8px;
  background: var(--yellow);
  color: var(--ink);
}
.mainnav a.hl:hover { background: var(--yellow-hover); }

/* ---------- home: hero ---------- */
.hero { padding: 64px 0 32px; }
.hero h1, .ruled-title {
  margin: 0;
  display: inline-block;
  font-weight: 700;
  font-size: 60px;
  line-height: 64px;
  letter-spacing: -.01em;
  color: var(--blue-head);
  border-bottom: 4px double var(--red);
  padding-bottom: 2px;
  text-wrap: balance;
}
.hero .lede { margin: 32px 0 0; font-size: 21px; line-height: 32px; max-width: 32em; }
.hero .presented { margin: 32px 0 0; color: var(--ink-soft); font-size: 17px; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: var(--btn-shadow);
  border: 0;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.ghost {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  border-radius: 6px;
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.ghost:hover { background: var(--blue-hover); }

/* ---------- home: dictation ---------- */
.dictation { padding: 32px 0; }
.dictation h2, .section-h2 {
  margin: 0;
  font-weight: 700;
  font-size: 32px;
  line-height: 64px;
  color: var(--blue-head);
}
.dictation .sub { margin: 0; color: var(--ink-soft); }
.dictation .sentence { margin: 32px 0 0; font-size: 19px; max-width: 38em; }
.dictation .prompt { margin: 32px 0 12px; font-weight: 700; }
.lang-tabs { display: flex; gap: 8px; flex-wrap: wrap; line-height: 1.2; }
.tab {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.tab:hover { background: var(--yellow-pale); }
.tab[aria-pressed="true"] { background: var(--yellow); box-shadow: inset 0 -3px 0 var(--red); }
.dictation-output { margin-top: 24px; display: flex; gap: 16px; align-items: flex-start; }
.dictation-output svg { flex: none; margin-top: 8px; }
.dictation-text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 34em;
  font-family: var(--font-sample);
  font-size: 28px;
  line-height: 48px;
  color: var(--blue-head);
  min-height: 288px;
}
.dictation-text[dir="rtl"] { font-family: var(--font-ar); font-size: 27px; }
.redpen {
  font-family: var(--font-hand);
  color: var(--red);
}
.dictation .redpen { margin: 16px 0 0 50px; font-size: 22px; line-height: 28px; max-width: 30em; }

/* ---------- home: headline numbers ---------- */
.statsline { padding: 48px 0 32px; }
.statsline .big {
  margin: 0;
  font-weight: 700;
  font-size: 30px;
  line-height: 48px;
  max-width: 26em;
  color: var(--ink);
}
.mark {
  background: linear-gradient(transparent 52%, var(--yellow) 52%, var(--yellow) 92%, transparent 92%);
  padding: 0 2px;
}
.statsline .note { margin: 16px 0 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- home: problem ---------- */
.problem { padding: 48px 0 32px; }
.problem h2, .lab-does h2 {
  margin: 0 0 32px;
  font-weight: 700;
  font-size: 36px;
  line-height: 48px;
  color: var(--blue-head);
}
.problem h2 { max-width: 20em; text-wrap: balance; }
.problem-flex { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.problem-text { flex: 1 1 440px; min-width: 0; max-width: 33em; }
.problem-text p { margin: 0 0 32px; }
.problem-text p:last-child { margin-bottom: 0; }
.gap-card {
  flex: 1 1 400px;
  min-width: 0;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow: var(--card-shadow);
}
.gap-card .gap-title { font-weight: 700; line-height: 26px; margin-bottom: 12px; }
.gap-grid {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 64px;
  gap: 10px 12px;
  align-items: center;
  line-height: 26px;
  font-size: 17px;
}
.gap-track { display: block; height: 16px; background: var(--blue-pale); border-radius: 3px; }
.gap-fill { display: block; height: 16px; background: var(--blue); border-radius: 3px; }
.gap-grid strong { text-align: right; }
.gap-card .caption { margin: 10px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-soft); }

/* ---------- home: what the lab does ---------- */
.lab-does { padding: 48px 0 32px; }
.lab-does h2 { margin-bottom: 0; }
.lab-row { display: flex; flex-wrap: wrap; gap: 0 48px; padding: 16px 0; }
.lab-row h3 {
  margin: 0;
  flex: 0 0 240px;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: var(--blue-head);
}
.lab-row .lab-body { flex: 1 1 440px; min-width: 0; max-width: 34em; }
.lab-row p { margin: 0; }
.go {
  font-weight: 700;
  color: var(--blue);
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.go:hover { color: var(--blue-dark); }

/* ---------- home: CTA card ---------- */
.cta { padding: 48px 0 64px; }
.cta-card {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
}
.cta-card .cta-text { flex: 1 1 420px; min-width: 0; }
.cta-card h2 { margin: 0; font-weight: 700; font-size: 28px; line-height: 36px; color: var(--blue-head); }
.cta-card p { margin: 8px 0 0; line-height: 28px; color: var(--ink-mid); max-width: 34em; }
.cta-card .btn { padding: 0 26px; }

/* ---------- sub-pages (dataset / results / try it) ---------- */
.sheet { padding: 56px 0 72px; font-size: 17px; line-height: 1.55; }
.page-title {
  margin: 0;
  font-weight: 700;
  color: var(--blue-head);
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -.01em;
}
.page-title.ruled {
  display: inline-block;
  line-height: 64px;
  border-bottom: 4px double var(--red);
  padding-bottom: 2px;
}
.page-lede { margin: 16px 0 0; max-width: 36em; font-size: 19px; color: var(--ink-mid); }
.page-lede-lg { margin: 32px 0 0; max-width: 36em; font-size: 20px; line-height: 32px; }

.tools {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
}
.field-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
input[type="search"] {
  width: 300px;
  max-width: 100%;
  height: 48px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
}
.pick-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-btn {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 2px solid var(--tab-border);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.pick-btn:hover { border-color: var(--blue); }
.pick-btn[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #ffffff; }
.count {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 15px;
  padding-bottom: 12px;
}

/* data tables as ruled cards (dataset + results share the shell) */
.table-card {
  margin-top: 20px;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ds-grid { min-width: 760px; }
.rs-grid { min-width: 900px; }
.ds-head, .ds-row {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr) 120px minmax(0, 1fr);
  gap: 0 16px;
  padding: 0 20px;
}
.ds-head {
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 14px; color: var(--ink-mid);
}
.ds-row { align-items: center; min-height: 48px; border-bottom: 1px solid var(--line-soft); }
.ds-row:hover, .rs-row:hover { background: var(--blue-hover); }
.ds-row .rnum, .ds-head .rnum { text-align: right; }
.bar-track { display: block; height: 12px; }
.bar-fill { display: block; height: 12px; border-radius: 3px; background: var(--blue); }
.bar-fill.audio { background: var(--teal); }
.no-speech { color: var(--ink-soft); }

.rs-head, .rs-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 64px 64px 64px 84px 190px;
  gap: 0 12px;
  padding: 0 20px;
}
.rs-head {
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 14px; color: var(--ink-mid);
}
.rs-row { align-items: center; min-height: 56px; border-bottom: 1px solid var(--line-soft); }
.rs-head .rnum, .rs-row .rnum { text-align: right; }
.rs-row .muted { color: var(--ink-soft); }
.change-better { color: var(--good); }
.change-worse { color: var(--red-dark); }
.change-same { color: var(--ink-soft); }
.note-cell { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.note-beats { color: var(--blue-dark); }
.note-worse { color: var(--red-dark); }
.note-plain { color: var(--ink-soft); }

/* dumbbell plot */
.dumbbell { position: relative; display: block; height: 24px; }
.dumbbell .axis { position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--blue-track); }
.dumbbell .span { position: absolute; top: 10px; height: 4px; border-radius: 2px; background: var(--blue-line); }
.dumbbell .gt-mark { position: absolute; top: 4px; width: 4px; height: 16px; background: var(--gold); }
.dumbbell .base-dot {
  position: absolute; top: 6px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--grey-dot);
}
.dumbbell .ours-dot {
  position: absolute; top: 5px; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--blue);
}

.empty { padding: 48px 24px; text-align: center; }
.empty .empty-title { font-weight: 700; color: var(--blue-head); font-size: 26px; }
.empty p { margin: 8px auto 18px; color: var(--ink-soft); max-width: 30em; }
.pri {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  padding: 0 22px;
  font-weight: 600;
  cursor: pointer;
}
.pri:hover { background: var(--blue-dark); }

.caption { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); max-width: 52em; }
.ds-caption { max-width: 48em; }

/* results: summary + legend + findings */
.summary-card {
  margin-top: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 28px;
}
.summary-line { font-weight: 700; font-size: 26px; line-height: 1.35; color: var(--blue-head); }
.summary-card p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }
.metric-explain { margin: 12px 0 0; color: var(--ink-mid); max-width: 40em; }
.legend {
  margin-left: auto;
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 15px; padding-bottom: 12px; color: var(--ink-mid);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot-base { width: 12px; height: 12px; border-radius: 50%; background: var(--grey-dot); display: inline-block; }
.legend .dot-ours { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); display: inline-block; }
.legend .mark-gt { width: 4px; height: 16px; background: var(--gold); display: inline-block; }
.redpen-note { margin: 16px 0 0; font-size: 21px; line-height: 1.3; max-width: 44em; }
.findings-title {
  margin: 40px 0 12px;
  font-weight: 700;
  color: var(--blue-head);
  font-size: 30px;
  line-height: 1.15;
}
.findings { margin: 0; padding-left: 20px; max-width: 44em; color: #232836; }
.findings li { margin-bottom: 10px; }
.findings li:last-child { margin-bottom: 0; }

/* ---------- try it ---------- */
.tryit-block { margin-top: 48px; }
.tryit-block > h2 {
  margin: 0;
  font-weight: 700;
  font-size: 32px;
  line-height: 48px;
  color: var(--blue-head);
}
.tryit-block.second { margin-top: 64px; }
.lookup-controls {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: flex-end;
}
select {
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}
#lookup-lang { min-width: 240px; }
#translate-lang { min-width: 180px; }
.lookup-remark {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  max-width: 30em;
}
.score-card {
  margin-top: 20px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}
.score-grid { min-width: 560px; }
.score-head, .score-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 0 12px;
  padding: 0 20px;
}
.score-head {
  padding-top: 12px; padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  font-weight: 700; font-size: 15px; line-height: 24px;
}
.score-row {
  padding-top: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-blue);
  line-height: 28px;
}
.score-row:last-child { border-bottom: 0; }
.score-head .rnum, .score-row .rnum { text-align: right; }
.score-row.ours-row { background: var(--yellow-pale); }
.score-row .row-label { font-weight: 700; }

.sample-block { margin-top: 28px; max-width: 40em; }
.sample-block .sample-title { font-weight: 700; }
.sample-text {
  margin: 8px 0 0;
  font-family: var(--font-sample);
  font-size: 26px;
  line-height: 44px;
  color: var(--blue-head);
}
.sample-text[dir="rtl"] { font-family: var(--font-ar); font-size: 25px; }
.sample-block .sample-note { margin: 8px 0 0; font-size: 15px; line-height: 24px; color: var(--ink-soft); }
.no-sample { margin: 28px 0 0; max-width: 40em; color: var(--ink-soft); }

.translate-flex { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.translate-left { flex: 1 1 440px; min-width: 0; }
.translate-left label, .inline-label { font-weight: 700; font-size: 15px; line-height: 24px; }
.translate-left > label { display: block; margin-bottom: 6px; }
textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 18px;
  line-height: 28px;
  resize: vertical;
}
.translate-controls { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.translate-panel {
  flex: 1 1 440px;
  min-width: 0;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 20px 22px;
  min-height: 260px;
  box-shadow: var(--card-shadow);
}
.translate-panel .idle { color: var(--ink-soft); }
.translate-panel .out-lang { font-weight: 700; font-size: 15px; line-height: 24px; color: var(--ink-soft); }
.translate-panel .out-text {
  margin: 6px 0 0;
  font-family: var(--font-sample);
  font-size: 26px;
  line-height: 44px;
  color: var(--blue-head);
}
.translate-panel .out-text[dir="rtl"] { font-family: var(--font-ar); font-size: 25px; }
.translate-panel .out-note { margin: 12px 0 0; font-size: 21px; line-height: 26px; }
.translate-panel .offline-title { font-weight: 700; color: var(--red-dark); }
.translate-panel .offline-body { margin: 8px 0 14px; line-height: 28px; color: var(--ink-mid); }
.translate-panel .ghost { min-height: 44px; padding: 0 18px; }

/* ---------- footer ---------- */
footer.site {
  border-top: 4px solid var(--blue);
  background: #ffffff;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 32px 24px 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-soft);
}
.footer-inner .foot-note { max-width: 44em; }

/* ---------- phone (from the Phone: home mockup) ---------- */
@media (max-width: 640px) {
  .page { font-size: 17px; }
  .cover-inner { padding: 8px 16px; }
  .brand { padding: 4px 12px; font-size: 16px; }
  .mainnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 8px 6px;
    width: 100%;
  }
  .mainnav a { font-size: 15px; padding: 0 10px; white-space: nowrap; }
  .mainnav a.hl { margin-left: 0; padding: 0 14px; font-size: 15px; }
  .col { padding: 0 16px 0 40px; }
  .col::before { left: 26px; }
  .hero { padding: 40px 0 24px; }
  .hero h1, .ruled-title { font-size: 38px; line-height: 44px; }
  .hero .lede { font-size: 18px; margin-top: 24px; }
  .hero .presented { margin-top: 24px; font-size: 15px; line-height: 24px; }
  .hero-actions { margin-top: 24px; gap: 10px; }
  .dictation { padding: 24px 0; }
  .dictation h2, .section-h2 { font-size: 28px; line-height: 48px; }
  .dictation .sub { font-size: 15px; line-height: 24px; }
  .dictation .sentence { margin-top: 24px; font-size: 17px; }
  .dictation .prompt { margin: 24px 0 8px; }
  .tab { padding: 0 14px; }
  .dictation-output { margin-top: 20px; gap: 10px; }
  .dictation-output svg { width: 26px; height: 26px; margin-top: 10px; }
  .dictation-text { font-size: 23px; line-height: 40px; min-height: 520px; }
  .dictation-text[dir="rtl"] { font-size: 22px; }
  .dictation .redpen { margin: 12px 0 0; font-size: 20px; line-height: 26px; }
  .statsline { padding: 32px 0 24px; }
  .statsline .big { font-size: 23px; line-height: 40px; }
  .statsline .note { margin-top: 12px; font-size: 14px; line-height: 20px; }
  .problem, .lab-does { padding: 32px 0 24px; }
  .problem h2, .lab-does h2 { font-size: 28px; line-height: 36px; margin-bottom: 24px; }
  .lab-does h2 { margin-bottom: 16px; }
  .problem-text p { margin-bottom: 24px; }
  .gap-card { padding: 16px; }
  .gap-grid { grid-template-columns: 96px minmax(0, 1fr) 60px; gap: 8px 10px; line-height: 24px; font-size: 15px; }
  .gap-track, .gap-fill { height: 14px; }
  .lab-row { display: block; padding: 12px 0; }
  .lab-row h3 { font-size: 21px; }
  .lab-row .lab-body p { margin-top: 4px; }
  .cta { padding: 32px 0 48px; }
  .cta-card { padding: 20px; }
  .cta-card h2 { font-size: 24px; line-height: 32px; }
  .cta-card p { line-height: 26px; }
  .sheet { padding: 40px 0 56px; }
  .page-title { font-size: 36px; }
  .page-title.ruled { line-height: 44px; }
  .footer-inner { padding: 20px 16px 20px 40px; font-size: 14px; line-height: 22px; }
}
