/* Anteproof site styles shared by every page (brand direction v1,
   2026-09-03): tokens, nav, buttons, footer, and the receipt card.
   Page-specific rules live in each page. */

:root {
  color-scheme: light dark;
  /* Ledger navy, cool Chalk, one Ante cyan accent; green and rust mean
     hit and miss, nothing else. */
  --bg: #EDF1F5; --surface: #F7F9FB; --surface-2: #E1E7ED;
  --ink: #0E1B2A; --ink-2: #5B6B7B; --ink-3: #8595A5; --line: #C9D3DC;
  --accent: #1489A8; --accent-soft: #D6EEF4;
  --hit: #1B8A60; --hit-soft: #D8F0E5;
  --miss: #B8562A; --miss-soft: #F5E2D7;
  --amber: #9A6A1E; --amber-soft: #F3E8D2;
  /* The receipt card is the one fixed object: identical in both themes. */
  --navy: #0E1B2A; --chalk: #EDF1F5; --chalk-2: #A9B8C7; --cyan: #35BEDD;
  --font-serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1622; --surface: #111F2E; --surface-2: #182A3B;
    --ink: #E4EAF0; --ink-2: #93A3B3; --ink-3: #6B7C8D; --line: #26394B;
    --accent: #35BEDD; --accent-soft: #123543;
    --hit: #3BB98A; --hit-soft: #123527;
    --miss: #E0794A; --miss-soft: #3A2114;
    --amber: #D5A04A; --amber-soft: #33290F;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.shell { max-width: 1040px; margin: 0 auto; padding: 28px 24px 96px; }
.empty { color: var(--ink-3); font-size: 14px; padding: 18px 2px; }

/* nav */
.nav { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.nav .mark { width: 30px; height: 18px; color: var(--ink); flex-shrink: 0; }
.nav .word { font-family: var(--font-serif); font-size: 21px; font-weight: 600; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.nav .links { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.nav .links a { color: var(--ink-2); text-decoration: none; }
.nav .links a:hover { color: var(--ink); }
/* Below 560px the links were `display: none`, on all 18 pages that carry
   this nav: the masthead became the wordmark alone, and a phone reader
   could reach Calibration, the API or their account only by scrolling to
   the footer. They wrap onto a second row instead -- CSS only, so there is
   nothing to fail with scripting off, and the nav's content and order are
   untouched. `.links` wraps too, so a narrow phone gets a third row rather
   than a row that runs off the side. */
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; row-gap: 0; }
  .nav .links { margin-left: 0; flex-basis: 100%; flex-wrap: wrap;
                gap: 0 18px; padding-top: 6px; font-size: 13.5px; }
  /* Measured at 375px: the links were a 21px tap target, against 44pt
     (Apple) and 48dp (Google). The padding takes the box to ~43-44px
     without moving the text, so the row still reads as one line of links
     rather than a stack of buttons. */
  .nav .links a { display: inline-block; padding: 11px 0; }
}

.crumb { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin: 28px 0 20px; }
.crumb a { color: var(--ink-2); text-decoration: none; }

.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* buttons */
.btn { display: inline-block; padding: 11px 18px; border-radius: 4px; font-weight: 600; font-size: 14.5px; text-decoration: none; border: 1px solid var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* receipt card: the signature object (rendered by foresight_api.receipt) */
.receipt {
  background: var(--navy); color: var(--chalk);
  border-radius: 6px; padding: 22px 22px 18px;
  position: relative; overflow: hidden;
  /* minmax(0, 1fr), not the implicit auto track: the header row's two
     nowrap mono spans give it a ~408px min-content, which an auto track
     has to honour, so on a phone the card's own rows ran past the card and
     were silently cut by overflow:hidden. With the minimum removed the
     spans ellipsize, which is what they are already styled to do. */
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px -24px rgba(14,27,42,.55);
  min-height: 268px;
}
.receipt .row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-2); }
.receipt .row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt > div.row:first-of-type { padding-right: 44px; } /* clear the brand mark in the corner */
.receipt .q { font-family: var(--font-serif); font-size: 19px; line-height: 1.3; }
.receipt .q a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--chalk-2); }
/* The big slot is not always a number: a withheld state is a word, and at
   a flat 56/64px mono "withheld" runs 307px and "not shown" 346px against
   roughly 327px of card on a phone. The scale comes down with the viewport
   so either fits; it reaches its full size at ~490px and above, so tablet
   and desktop are unchanged. */
.receipt .p { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(38px, 11.5vw, 56px); line-height: 1; font-weight: 500; color: var(--cyan); overflow-wrap: anywhere; }
.receipt .p small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-2); margin-top: 6px; font-weight: 400; }
.receipt.resolved .p { color: var(--chalk-2); }
.receipt .foot { border-top: 1px dashed rgba(169,184,199,.35); padding-top: 12px; text-transform: none; }
.receipt .foot a { color: var(--chalk-2); text-decoration: none; }
.receipt .brand { position: absolute; right: 18px; top: 16px; width: 34px; height: 22px; color: var(--chalk); opacity: .9; }
.receipt .loading { color: var(--chalk-2); font-size: 14px; }
.stamp {
  position: absolute; right: 22px; top: 44%; transform: rotate(-8deg);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  border: 2.5px solid currentColor; border-radius: 4px; padding: 7px 10px; line-height: 1.25; text-align: center;
  opacity: .92; background: rgba(14,27,42,.35);
}
.stamp.hit { color: #4CD39E; }
.stamp.miss { color: #F08A5B; }
/* A voided question was never scored: neutral chalk, never hit or miss. */
.stamp.void { color: var(--chalk-2); }
.stamp small { display: block; font-size: 10px; letter-spacing: .1em; opacity: .85; font-weight: 500; }
.receipt.compact { min-height: 0; padding: 16px 18px 14px; gap: 10px; }
.receipt.compact .q { font-size: 16px; }
.receipt.compact .p { font-size: 36px; }
.receipt.compact .p small { margin-top: 4px; }
.receipt.compact .stamp { font-size: 11px; padding: 6px 9px; top: 38%; right: 18px; }
.receipt-caption { font-size: 12.5px; color: var(--ink-3); margin: 12px 4px 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; line-height: 1.6; }
.receipt-caption a { color: var(--ink-2); }

/* notices: the draft-under-review banner on the legal pages, proposals, warnings */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--amber); background: var(--amber-soft); color: var(--ink); border-radius: 4px; padding: 12px 16px; font-size: 14px; line-height: 1.5; margin: 18px 0; }
.notice b { color: var(--amber); }
.notice.info { border-left-color: var(--accent); background: var(--accent-soft); }
.notice.info b { color: var(--accent); }

/* long-form documents (docs, terms, privacy, refunds, dpa, legal) */
.doc h1 { font-family: var(--font-serif); font-size: 34px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 6px; }
.doc .tagline { color: var(--ink-2); font-size: 15px; margin: 0 0 8px; max-width: 72ch; }
.doc .toc { font-size: 13.5px; color: var(--ink-2); margin: 18px 0 0; line-height: 2; }
.doc .toc a { margin-right: 14px; white-space: nowrap; }
.doc h2 { font-family: var(--font-serif); font-size: 24px; font-weight: 500; margin: 52px 0 4px; }
.doc h3 { font-size: 15px; font-weight: 600; margin: 26px 0 4px; }
.doc p, .doc li, .doc td, .doc th { font-size: 14.5px; color: var(--ink-2); }
.doc p { margin: 8px 0; max-width: 72ch; }
.doc ul, .doc ol { padding-left: 20px; margin: 6px 0; max-width: 72ch; }
.doc li { margin: 3px 0; }
.doc b { color: var(--ink); }
.doc .when { font-size: 13px; color: var(--ink-3); }
.doc a { text-decoration: none; }
.doc code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; color: var(--ink); }
.doc pre { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; overflow-x: auto; margin: 10px 0 14px; color: var(--ink); }
.doc pre code { background: none; padding: 0; font-size: inherit; }
.doc table { border-collapse: collapse; width: 100%; margin: 10px 0 14px; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--ink); font-weight: 600; font-size: 13px; }
.doc .shell, .shell.doc { max-width: 760px; }
.shell.doc.wide { max-width: 860px; }
@media print {
  .nav, .crumb, footer, .noprint { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .shell.doc { max-width: none; padding: 0; }
  .doc p, .doc li, .doc td, .doc th { color: #000; }
  .doc h2 { break-after: avoid; margin-top: 28pt; }
  .notice { border-color: #000; background: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 90%; }
}

/* footer */
footer { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
footer .started { font-family: var(--font-serif); font-size: 17px; color: var(--ink); margin-bottom: 8px; }
footer .started .mono { font-size: 13px; color: var(--ink-2); }
footer .legal { margin-top: 10px; }
footer .social { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
footer .social a { color: var(--ink-2); text-decoration: none; }
footer .social a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .receipt .p { transition: none; }
}
