/* The public homepage. Copied from the approved visual spec (2026-11-07-homepage), class
   names adapted where needed. System font stacks only: the page makes no third-party
   request. Light and dark through the tokens below. */
:root {
  --paper: #eef1f4; --sheet: #fbfcfd; --ink: #17212b; --pencil: #5b6875; --faint: #8794a0;
  --rule: #d8dee4; --rule-strong: #aeb8c2;
  --cobalt: #2743b8; --cobalt-soft: #e6ebfb; --band: #dde4f5; --on-cobalt: #ffffff;
  --gap: #b4372a; --gap-soft: #f7e3df;
  --mark: #fff0a8; --mark-line: #b58a00;
  --ok: #2b7146; --ok-soft: #dff0e5;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", "Noto Serif", "Liberation Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Noto Sans Mono", "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #12171c; --sheet: #1a2027; --ink: #e6eaee; --pencil: #a0acb7; --faint: #6f7c88;
  --rule: #2a333c; --rule-strong: #46525e;
  --cobalt: #8fa3ff; --cobalt-soft: #222b4a; --band: #1b2338; --on-cobalt: #12171c;
  --gap: #f08b7d; --gap-soft: #3b2320; --mark: #4d4214; --mark-line: #e2c25a;
  --ok: #7fcf9b; --ok-soft: #1d3326; color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #12171c; --sheet: #1a2027; --ink: #e6eaee; --pencil: #a0acb7; --faint: #6f7c88;
  --rule: #2a333c; --rule-strong: #46525e;
  --cobalt: #8fa3ff; --cobalt-soft: #222b4a; --band: #1b2338; --on-cobalt: #12171c;
  --gap: #f08b7d; --gap-soft: #3b2320; --mark: #4d4214; --mark-line: #e2c25a;
  --ok: #7fcf9b; --ok-soft: #1d3326; color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: break-word; overflow-x: clip; }
.shell { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: var(--cobalt); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.word { font: 600 22px/1 var(--serif); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.word .tick { display: inline-block; width: .5em; height: .5em; margin-left: .12em; border-right: 2.5px solid var(--cobalt); border-bottom: 2.5px solid var(--cobalt); transform: rotate(40deg) translateY(-.18em); }
.nav nav { display: flex; gap: 8px 22px; align-items: center; font-size: 15px; flex-wrap: wrap; }
.nav nav a { color: var(--pencil); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.cta { color: var(--cobalt); font-weight: 600; }

/* hero */
.hero { position: relative; padding-block: 26px 24px; display: grid; gap: 14px; justify-items: center; text-align: center; }
/* the band behind the first screen; it runs on behind the top of the panes */
.hero::before { content: ""; position: absolute; z-index: -1; top: -400px; bottom: -170px; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--band); }
/* the page's one visual idea: a source page, with the quote that was found on it */
.source { position: absolute; z-index: -1; top: 92px; left: 50%; width: min(100vw, 1560px); transform: translateX(-50%); display: flex; justify-content: space-between; pointer-events: none; font: 14px/1.75 var(--serif); color: var(--faint); text-align: left; }
.source p { margin: 0; width: 300px; padding-inline: 22px; }
.source p:first-child { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.source p:last-child { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
.source mark { background: var(--mark); color: var(--ink); padding: 1px 2px; border-radius: 2px; }
@media (max-width: 1240px) { .source { display: none; } }
.hero h1 { font: 600 clamp(32px, 3.05vw, 41px)/1.08 var(--serif); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.hero .lede { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.5; color: var(--pencil); margin: 0; max-width: 60ch; text-wrap: balance; }
.hero .lede b { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; font: 600 15px/1.2 var(--sans); background: var(--cobalt); color: var(--on-cobalt); border: 0; border-radius: 6px; padding: 11px 18px; cursor: pointer; text-decoration: none; }
.btn.quiet { background: transparent; color: var(--cobalt); border: 1px solid var(--rule-strong); padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: progress; }
.fine { font-size: 13.5px; color: var(--pencil); margin: 0; }
.fine.ok { color: var(--ok); font-weight: 600; }
.fine.err { color: var(--gap); font-weight: 600; }
.agents { margin: 0; font-size: 14.5px; color: var(--pencil); display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 18px; }
.agents b { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* examples */
.example { padding-block: 0 24px; display: grid; gap: 6px; position: relative; }
/* a taller screen has room for a bigger headline and more air */
@media (min-height: 900px) and (min-width: 821px) {
  .hero { padding-block: 56px 32px; gap: 20px; }
  .hero h1 { font-size: clamp(44px, 3.6vw, 58px); }
  .source { top: 186px; }
}
.how h2, .closing h2 { font: 600 20px/1.3 var(--sans); letter-spacing: 0; margin: 0; text-wrap: balance; }
.how { padding-top: 22px; display: grid; gap: 6px; justify-items: center; text-align: center; }
.how .sub, .closing .sub { margin: 0; color: var(--pencil); max-width: 66ch; text-wrap: balance; }
.tabs { display: flex; justify-content: center; gap: clamp(12px, 4vw, 40px); flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-top: 10px; }
.tabs button { font: 500 15px var(--sans); color: var(--pencil); background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 4px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--cobalt); border-bottom-color: var(--cobalt); font-weight: 600; }
.panel { display: grid; gap: 16px; }
.ask { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 0; }
.ask-side { display: flex; gap: 12px; align-items: center; }
.flag { font-size: 13px; color: var(--mark-line); }

.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .panes { grid-template-columns: minmax(0, 1fr); } }
.pane { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; min-width: 0; }
.pane.with { border-color: var(--cobalt); box-shadow: 0 0 0 1px var(--cobalt) inset; }
.pane > header { padding: 11px 18px 10px; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pane > header h3 { margin: 0; font: 600 17px/1.3 var(--serif); }
.pane > header p { margin: 0; font-size: 13.5px; color: var(--pencil); }
.pane.with > header h3 { color: var(--cobalt); }
.step { transition: opacity .3s ease, transform .3s ease; }
.step.wait { opacity: 0; transform: translateY(4px); }

/* side by side, the replay fits the first screen and scrolls to its payoff (home.js);
   without JavaScript or on a phone each session is shown in full */
@media (min-width: 821px) { .js .chat { max-height: max(340px, calc(100vh - 430px)); overflow-y: auto; } }

/* chat-style replay, modelled on how chat apps lay out a session (no product chrome) */
.chat { padding: 18px 18px 20px; display: grid; gap: 14px; font-size: 14.5px; align-content: start; }
.chat .you { justify-self: end; max-width: 86%; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 9px 13px; font-family: var(--sans); }
.said { font: 15px/1.6 var(--serif); }
.said p { margin: 0 0 8px; } .said p:last-child { margin: 0; }
.answer { border-top: 1px solid var(--rule); padding-top: 12px; }
.act { display: grid; gap: 6px; }
.act-sum { justify-self: start; font: 13.5px var(--sans); color: var(--pencil); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.chev { color: var(--faint); }
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.rows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 7px 11px; font-size: 13px; border-top: 1px solid var(--rule); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows .v { color: var(--pencil); }
.rows .d { color: var(--ink); min-width: 0; overflow-wrap: anywhere; flex: 1 1 120px; }
.rows .d.u { text-decoration: underline; text-underline-offset: 2px; }
.rows li.open { display: block; }
.rowline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.fail-word { color: var(--gap); }
.tag { font: 600 11.5px/1.6 var(--sans); padding: 0 7px; border-radius: 4px; white-space: nowrap; margin-left: auto; }
.tag.ok { color: var(--ok); background: var(--ok-soft); }
.tag.no { color: var(--gap); background: var(--gap-soft); }
.rows li.bad { box-shadow: inset 3px 0 0 var(--gap); }
pre.err { margin: 8px 0 2px; padding: 10px 12px; background: var(--paper); border-radius: 6px; font: 11.5px/1.6 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
pre.err .eh { color: var(--gap); font-family: var(--sans); font-size: 12.5px; }
pre.err .url { color: var(--faint); }
pre.err .qs { color: var(--ok); }
pre.err .num { color: var(--cobalt); }

/* left pane: proofreader marks (fails must-have: red; not on the page: yellow; no source:
   dashed), numbered notes under the answer */
.said mark { --mark-bg: var(--mark); background: linear-gradient(var(--mark-bg), var(--mark-bg)) no-repeat 0 100% / 0% 100%; color: inherit; padding: 1px 2px; border-radius: 2px; transition: background-size .5s ease; }
.said mark.on { background-size: 100% 100%; }
.said mark.m-fail { --mark-bg: var(--gap-soft); }
.said mark sup { font: 700 10.5px var(--sans); color: var(--gap); margin-left: 1px; }
.said mark.m-unsourced { background: none; border-bottom: 1.5px dashed var(--pencil); border-radius: 0; }
.said mark.m-unsourced sup { color: var(--pencil); }
.said mark.m-made sup { color: var(--mark-line); }
ol.notes { margin: 4px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--rule-strong); list-style: none; display: grid; gap: 8px; font-size: 13.5px; }
ol.notes li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
ol.notes li::before { content: attr(data-n); font: 700 12px/1.6 var(--sans); color: var(--gap); }
ol.notes li.m-made::before { color: var(--mark-line); }
ol.notes li.m-unsourced::before { color: var(--pencil); }
ol.notes b { font-weight: 600; }

/* result table */
.result { padding-block: 26px 8px; display: grid; gap: 12px; }
.result header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result h3 { font: 600 17px/1.3 var(--serif); margin: 0; }
.result .wts { font-size: 14px; color: var(--pencil); }
.result .wts b { color: var(--ink); }
.tbl { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
.tbl table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl thead th { font-weight: 600; font-size: 13px; color: var(--pencil); }
.tbl .o { font: 600 15px var(--serif); }
.tbl .n { text-align: right; font-weight: 600; }
.tbl thead th.n { font-weight: 600; }
.tbl tr.first > * { background: var(--cobalt-soft); }
.tbl tr.out > * { color: var(--gap); text-decoration: line-through; text-decoration-color: var(--gap); text-decoration-thickness: 1.5px; background: var(--gap-soft); }
.tbl tr.out .q { opacity: .5; }
/* the must-have column: pass green, fail red (scoped to the table: notes use m-* classes) */
.tbl td.pass { color: var(--ok); font-weight: 600; }
.tbl td.fail { color: var(--gap); font-weight: 600; }
.q { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: 6px; vertical-align: 2px; }
.key { margin: 0; font-size: 13.5px; color: var(--pencil); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.key .key-dot { margin: 0 6px 0 0; }
.key .key-struck { color: var(--gap); text-decoration: line-through; margin-right: 8px; }

/* the signup, in the first screen and again at the end */
.beta { width: min(500px, 100%); display: grid; gap: 7px; }
.beta-row { display: flex; gap: 8px; }
.beta input { flex: 1; font: inherit; padding: 10px 13px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--sheet); color: var(--ink); min-width: 0; }
.beta .fine { text-align: center; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) { .beta-row { flex-direction: column; } }

.closing { margin-top: 44px; padding: 40px 24px; border-radius: 12px; background: var(--band); display: grid; gap: 10px; justify-items: center; text-align: center; }
.closing .beta { margin-top: 8px; }

footer.foot { margin-top: 56px; border-top: 1px solid var(--rule); padding-block: 22px 40px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--pencil); }
footer.foot a { color: var(--pencil); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step, .said mark { transition: none; }
}
