/* Pass Duke Elder — shared styles (landing, guide pages and the app) */
:root {
  --bg: #f6f4ee; --surface: #ffffff; --surface-2: #efece3; --ink: #14213d; --muted: #5a6478;
  --line: #dcd8cc; --accent: #0b7a75; --accent-ink: #ffffff; --accent-soft: #d9efed;
  --amber: #c9701c; --amber-soft: #fbead7; --good: #1c7c45; --good-soft: #dff3e6;
  --bad: #b83227; --bad-soft: #fbe3e0; --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px rgba(20,33,61,.07);
  --radius: 14px; --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --iris-1: #2aa79f; --iris-2: #0b5f6b; --sclera: #fffdf8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d131f; --surface: #151d2d; --surface-2: #1c2638; --ink: #e9edf5; --muted: #9aa5ba;
    --line: #2a3650; --accent: #46c7bd; --accent-ink: #062422; --accent-soft: #12383a;
    --amber: #f0a45a; --amber-soft: #3a2a17; --good: #5fd08c; --good-soft: #143424;
    --bad: #f08a80; --bad-soft: #3d1c1a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --iris-1: #58d6cc; --iris-2: #14707a; --sclera: #eef2f6;
  }
}
:root[data-theme="dark"] {
  --bg: #0d131f; --surface: #151d2d; --surface-2: #1c2638; --ink: #e9edf5; --muted: #9aa5ba;
  --line: #2a3650; --accent: #46c7bd; --accent-ink: #062422; --accent-soft: #12383a;
  --amber: #f0a45a; --amber-soft: #3a2a17; --good: #5fd08c; --good-soft: #143424;
  --bad: #f08a80; --bad-soft: #3d1c1a; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --iris-1: #58d6cc; --iris-2: #14707a; --sclera: #eef2f6;
}
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
:root { --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font: 600 1.1rem/1.25 var(--sans); letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 7px 11px; border-radius: 9px; font-size: .94rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.nav a.cta { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
@media (max-width: 720px) {
  .nav a.hide-sm { display: none; }
  .site-head .wrap { gap: 8px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 8px; font-size: .88rem; white-space: nowrap; }
  .nav .btn-sm { padding: 6px 9px; font-size: .86rem; white-space: nowrap; }
  .site-head.is-app .brand span { display: none; }
  .icon-btn { flex: none; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 11px 18px; font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--accent); padding-inline: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { padding: 7px 12px; font-size: .9rem; border-radius: 9px; }

/* hero */
.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(28px, 5vw, 56px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 11px; border-radius: 99px; margin-bottom: 16px; }
.hero p.lead { font-size: 1.18rem; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.eye-stage { position: relative; display: grid; place-items: center; }
.eye-stage svg.eye { width: min(420px, 100%); height: auto; filter: drop-shadow(0 18px 30px rgba(20,33,61,.18)); }
.eye .lid { transform-origin: 50% 50%; animation: blink 7s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(0); } 96% { transform: scaleY(1); } }
.eye .pupil { transition: r .35s ease; }
.eye .gaze { transition: transform .12s ease-out; }
.snellen { font-family: var(--serif); text-align: center; line-height: 1.12; color: var(--ink); margin-top: 18px; user-select: none; }
.snellen span { display: block; letter-spacing: .32em; padding-left: .32em; opacity: 0; animation: rise .6s ease forwards; }
.snellen span:nth-child(1) { font-size: 2rem; font-weight: 700; animation-delay: .15s; }
.snellen span:nth-child(2) { font-size: 1.35rem; animation-delay: .3s; }
.snellen span:nth-child(3) { font-size: .95rem; animation-delay: .45s; }
.snellen span:nth-child(4) { font-size: .68rem; color: var(--muted); animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .eye-stage { order: -1; } .eye-stage svg.eye { width: min(260px, 70%); } .snellen { display: none; } }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font: 400 2.3rem/1.1 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

section.block { padding: clamp(36px, 6vw, 68px) 0; }
section.alt { background: var(--surface-2); }
.section-head { max-width: 46em; margin-bottom: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.link { text-decoration: none; color: inherit; display: block; transition: transform .16s ease, border-color .16s ease; }
.card.link:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.card .glyph svg { width: 24px; height: 24px; }
.card p:last-child { margin-bottom: 0; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.topic { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.topic:hover { border-color: var(--accent); transform: translateX(2px); }
.topic small { color: var(--muted); white-space: nowrap; }

table.facts { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.facts th, table.facts td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 0; }
table.facts th { width: 34%; color: var(--muted); font-weight: 600; }
table.facts thead th { background: var(--surface-2); color: var(--ink); }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .2s ease; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

.site-foot { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--muted); font-size: .88rem; margin-top: 40px; }
.site-foot .wrap { display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

/* prose pages */
.prose { padding: clamp(28px, 5vw, 56px) 0; }
.prose h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 16px; margin: 18px 0; }
.callout.warn { background: var(--amber-soft); border-color: var(--amber); }

/* ---------- app ---------- */
.app { padding: 26px 0 60px; }
#view { animation: viewin .28s ease; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.opt.correct .letter { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }
.kpi, .row { transition: transform .15s ease, border-color .15s ease; }
.row:hover { border-color: var(--accent); }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title h1 { font-size: clamp(2rem, 3.8vw, 2.7rem); margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pill.core { background: var(--good-soft); color: var(--good); }
.pill.hard { background: var(--amber-soft); color: var(--amber); }
.pill.top-decile { background: var(--bad-soft); color: var(--bad); }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.check { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check input { accent-color: var(--accent); width: 17px; height: 17px; }
.check .count { margin-left: auto; white-space: nowrap; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--ink); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: 600 .92rem var(--sans); }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); color: var(--accent); }
.field { margin-bottom: 20px; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 8px; }

/* question */
.qbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.qbar .spacer { flex: 1; }
.timer { font: 700 1.05rem var(--sans); font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.timer.low { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); animation: qin .28s ease; }
@keyframes qin { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.qmeta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: .88rem; }
.stem { font-size: 1.14rem; line-height: 1.55; margin-bottom: 18px; }
.figure { margin: 0 0 18px; text-align: center; }
.figure svg.fields { width: min(420px, 100%); height: auto; }
.figure figcaption { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.f-bg { fill: #fbf8f1; } .f-ring { fill: none; stroke: #6f6c66; stroke-width: 1.5; }
.f-axis { stroke: #8f8b82; stroke-width: 1; stroke-dasharray: 3 3; }
.f-loss { fill: #050607; } .f-stroke { stroke: #050607; }
.f-spot { fill: none; stroke: #8f8b82; stroke-width: 1.2; } .f-label { fill: var(--muted); font: 600 12px var(--sans); }
.options { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; cursor: pointer; font: 1rem/1.45 var(--sans); transition: border-color .12s ease, background .12s ease, transform .12s ease; }
.opt:hover:not([disabled]) { border-color: var(--accent); transform: translateX(2px); }
.opt .letter { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); font-size: .9rem; }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt.selected .letter { background: var(--accent); color: var(--accent-ink); }
.opt.correct { border-color: var(--good); background: var(--good-soft); }
.opt.correct .letter { background: var(--good); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); animation: shake .3s ease; }
.opt.wrong .letter { background: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }
.opt .note { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.explain { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); animation: rise .35s ease; }
.explain h3 { margin-bottom: 6px; }
.explain .src { font-size: .88rem; color: var(--muted); margin: 10px 0 0; }
.qnav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.flag-on { background: var(--amber-soft) !important; color: var(--amber) !important; border-color: var(--amber) !important; }
.navigator { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.navigator button { height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: 600 .85rem var(--sans); position: relative; }
.navigator button.done { background: var(--accent-soft); border-color: var(--accent); }
.navigator button.here { outline: 2px solid var(--ink); outline-offset: 1px; }
.navigator button.flagged::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.navigator button.right { background: var(--good-soft); border-color: var(--good); }
.navigator button.miss { background: var(--bad-soft); border-color: var(--bad); }
.exam-layout { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 76px; }
@media (max-width: 900px) { .exam-layout { grid-template-columns: 1fr; } .side { position: static; } }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }

/* results */
.score-ring { display: grid; place-items: center; position: relative; width: 190px; height: 190px; margin: 0 auto; }
.score-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.score-ring circle { fill: none; stroke-width: 12; }
.score-ring .track { stroke: var(--surface-2); }
.score-ring .arc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.score-ring .num { position: absolute; text-align: center; }
.score-ring .num b { font: 400 3rem/1 var(--serif); display: block; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 64px; gap: 12px; align-items: center; font-size: .93rem; }
.bar .track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.bar .track i.low { background: var(--bad); } .bar .track i.mid { background: var(--amber); }
.bar .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bar { grid-template-columns: 1fr 56px; } .bar .track { grid-column: 1 / -1; order: 3; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font: 400 2rem/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .86rem; }
.list { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 160px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: all .25s ease; z-index: 50; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.streak { font-weight: 700; color: var(--amber); }
.qf-clock { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.qf-clock i { display: block; height: 100%; background: var(--amber); width: 100%; transform-origin: left; }
.modal-back { position: fixed; inset: 0; background: rgba(10,15,25,.55); display: grid; place-items: center; z-index: 40; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--radius); padding: 24px; max-width: 460px; width: 100%; box-shadow: var(--shadow); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.form-row { display: block; margin-bottom: 12px; }
.form-row > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 1rem var(--sans); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; }
.fb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fb textarea { flex-basis: 100%; }
.modal { max-height: calc(100vh - 32px); overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface); }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--surface-2); position: sticky; top: 60px; }
.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
kbd { font: 600 .78rem var(--sans); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .snellen span { opacity: 1; transform: none; }
  .eye .lid { transform: scaleY(0); }
}
@media print { .site-head, .site-foot, .qnav, .side { display: none; } }

/* site navigation: links sit in the bar on wide screens and fold into a menu on small ones */
.menu-btn { display: none; border: 1px solid var(--line); background: none; color: var(--ink); font: 600 .9rem var(--sans); padding: 8px 12px; border-radius: 9px; cursor: pointer; flex: none; }
@media (max-width: 900px) {
  .site-head:not(.is-app) .nav { flex-wrap: nowrap; overflow: visible; }
  .site-head:not(.is-app) .nav a.in-menu { display: none; }
  .site-head:not(.is-app) .nav a.cta { white-space: nowrap; }
  .menu-btn { display: inline-block; }
  /* open: the links drop below the bar as a full-width list; brand, button and menu stay where they are */
  .site-head.menu-open .wrap { flex-wrap: wrap; }
  .site-head.menu-open .nav { display: contents; }
  .site-head.menu-open .brand { order: 0; }
  .site-head.menu-open .nav a.cta { order: 1; margin-left: auto; }
  .site-head.menu-open .menu-btn { order: 2; }
  .site-head.menu-open .nav a.in-menu { display: block; order: 3; flex: 0 0 100%; padding: 15px 2px; font-size: 1.1rem; border-top: 1px solid var(--line); border-radius: 0; }
  .site-head.menu-open { background: var(--bg); }
}
@media (max-width: 440px) {
  .site-head:not(.is-app) .brand span { font-size: .95em; }
  .site-head:not(.is-app) .nav a.cta { font-size: 0; padding: 8px 10px; }
  .site-head:not(.is-app) .nav a.cta::after { content: "Questions"; font-size: .8rem; }
}
