/* =====================================================================
   Campaign Archive: Seal & Voice
   Colour is evidence: only truth states get hue. Everything else is
   harbour ink and sea fog. How we know something is the VOICE a claim
   is set in; whether it is true is the SEAL in the left margin.
   Design record: DESIGN.md at the repo root.
   ===================================================================== */

/* Archivo (OFL, see /fonts/Archivo-OFL.txt), variable width, used at 75% for display. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* record voice: the system face (SF Pro on iPhone) */
  --f-ui: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  /* spoken voice: Charter ships with iOS and macOS */
  --f-voice: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  /* display: Archivo condensed */
  --f-display: "Archivo", "Arial Narrow", "Roboto Condensed", var(--f-ui);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --gutter: 16px;
  --tap: 44px;
  --measure: 720px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Dark is the default: the table is a dim room with a bright TV. */
  color-scheme: dark;
  --shell: #0b1a20;
  --ground: #10242b;
  --surface: #162f37;
  --surface-2: #1d3943;
  --line: #2b4a54;
  --ink: #e6eeea;
  --ink-2: #a9c0bd;
  --ink-3: #87a2a1;
  --slab: #e6eeea;
  --slab-ink: #0b1a20;
  --slab-ink-2: #3b5258;
  --t-confirmed: #62d3b0;
  --t-claimed: #a9c0bd;
  --t-disputed: #f2a93b;
  --t-lie: #ff6d4f;
  --t-lie-wash: rgba(255, 109, 79, .10);
  --t-disputed-wash: rgba(242, 169, 59, .10);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -12px rgba(0, 0, 0, .55);
}

/* Light: sea fog, for reading at home by daylight. Follows the phone's setting. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --shell: #dde7e6;
    --ground: #edf2f1;
    --surface: #fbfdfc;
    --surface-2: #e2ebea;
    --line: #c3d2d1;
    --ink: #10232a;
    --ink-2: #3d565c;
    --ink-3: #536b71;
    --slab: #10232a;
    --slab-ink: #edf2f1;
    --slab-ink-2: #b4c8c6;
    --t-confirmed: #12775c;
    --t-claimed: #3d565c;
    --t-disputed: #9a5500;
    --t-lie: #bf331a;
    --t-lie-wash: rgba(191, 51, 26, .07);
    --t-disputed-wash: rgba(154, 85, 0, .08);
    --shadow: 0 1px 2px rgba(16, 35, 42, .08), 0 8px 24px -14px rgba(16, 35, 42, .25);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { background: var(--shell); }

body.app {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.45 var(--f-ui);
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  hyphens: auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

::selection { background: var(--t-confirmed); color: var(--shell); }
a { color: inherit; text-decoration-color: var(--ink-3); text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
svg { flex: none; }
p, h1, h2, h3, ul, ol, dl, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- shell: top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 2;
  background: var(--shell);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 10px) max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter))) 10px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px;
}
.topbar__title {
  font: 700 22px/1.1 var(--f-display); font-stretch: 75%;
  color: var(--ink); text-decoration: none;
}
.topbar__sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.topbar__back {
  display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); justify-self: start;
  margin-left: -8px; padding: 0 8px 0 2px; color: var(--ink); text-decoration: none; font-size: 16px;
}
.topbar__back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar {
  width: var(--tap); height: var(--tap); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  font: 700 17px/1 var(--f-display); font-stretch: 75%; text-decoration: none;
}

/* segmented control: the sub-sections inside one tab */
.segmented {
  grid-column: 1 / -1;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px;
}
.segmented a {
  min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 7px; text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500;
  overflow-wrap: normal; hyphens: manual;
}
.segmented a[aria-current="page"] { background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow); }
.segmented .count { font-size: 13px; color: var(--ink-3); }

/* ---------- shell: tab bar ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 2; margin-top: auto;
  background: var(--shell); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px max(4px, calc((100% - var(--measure)) / 2)) calc(env(safe-area-inset-bottom) + 4px);
}
.tabbar a {
  position: relative; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 500; letter-spacing: .01em;
  overflow-wrap: normal; hyphens: manual;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { stroke-width: 2.1; }
.tabbar .dot {
  position: absolute; top: 4px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--slab); color: var(--slab-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------- page + sections ---------- */
.page {
  width: 100%; max-width: var(--measure); margin: 0 auto;
  padding: 16px var(--gutter) 32px; display: flex; flex-direction: column; gap: 28px;
}
.page--tight { gap: 16px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section__title { font: 700 19px/1.15 var(--f-display); font-stretch: 75%; }
.section__aside { font-size: 13px; color: var(--ink-2); text-align: right; }
.section__more {
  font-size: 14px; color: var(--ink-2); text-decoration: none; min-height: var(--tap); flex: none;
  display: inline-flex; align-items: center; gap: 2px; margin: -12px 0;
}
.section__more svg, .row-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.page-title { font: 750 32px/1.05 var(--f-display); font-stretch: 75%; letter-spacing: -.01em; text-wrap: balance; }
.lede { font-size: 14px; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.empty { font-size: 14px; color: var(--ink-2); padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-md); }

/* .panel is the one grouping surface; never nested */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
/* list panels get a rule between rows; composed panels (quest, review, forms) space their parts instead */
.panel:not(.quest, .review, .signin, .user, .recap) > * + * { border-top: 1px solid var(--line); }
.panel__row { padding: 14px 14px 14px 12px; }
.row-link {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  min-height: var(--tap); text-decoration: none; color: inherit;
}
.row-link > span:first-child { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.row-link > svg { color: var(--ink-3); }

/* ---------- THE CLAIM: seal margin + voice + provenance ---------- */
.claim {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 4px;
  align-items: start;
}
.claim > :not(.seal) { grid-column: 2; }
.seal { width: 22px; height: 22px; margin-top: 1px; }
.seal--claimed, .seal--import { color: var(--t-claimed); }
.seal--corroborated, .seal--confirmed { color: var(--t-confirmed); }
.seal--disputed { color: var(--t-disputed); }
.seal--lie { color: var(--t-lie); }

.claim__text { font-size: 16px; line-height: 1.42; max-width: 62ch; }
/* modality is the voice the claim is set in */
.claim--said .claim__text { font-family: var(--f-voice); font-size: 17px; line-height: 1.38; }
.claim--said .claim__text::before { content: "\201C"; color: var(--ink-3); }
.claim--said .claim__text::after { content: "\201D"; color: var(--ink-3); }
.claim--rumour .claim__text { font-family: var(--f-voice); font-style: italic; font-size: 17px; line-height: 1.38; }
.claim--speculation .claim__text { font-style: italic; color: var(--ink-2); }
/* a lie changes the text itself */
.claim.is-lie .claim__text {
  color: var(--ink-2);
  text-decoration: line-through; text-decoration-color: var(--t-lie); text-decoration-thickness: 2px;
}

.prov {
  display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px;
  font-size: 13px; line-height: 1.35; color: var(--ink-2);
}
.prov > * + *::before { content: "\00B7"; margin: 0 .45em; color: var(--ink-3); }
.prov a { color: var(--ink); text-decoration-color: var(--line); }
.truth { font-weight: 650; }
.truth--claimed, .truth--import { color: var(--t-claimed); font-weight: 500; }
.truth--corroborated, .truth--confirmed { color: var(--t-confirmed); }
.truth--disputed { color: var(--t-disputed); }
.truth--lie { color: var(--t-lie); }
.step__state { font-weight: 650; }

/* the line under a lie: say it plainly */
.counter {
  margin-top: 6px; padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 14px; line-height: 1.4; color: var(--ink);
}
.counter--disputed { background: var(--t-disputed-wash); }
.counter--lie { background: var(--t-lie-wash); }
.counter b { font-weight: 650; }

/* informant record: how everything this speaker told us held up */
.record {
  margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  font-size: 13px; color: var(--ink-2);
}
.record__seals { display: inline-flex; gap: 2px; }
.record__seals .seal { width: 16px; height: 16px; margin: 0; }

.claims { display: flex; flex-direction: column; gap: 14px; }

/* entity mini-heading inside lists */
.who { font-weight: 650; font-size: 15px; text-decoration: none; display: block; margin-bottom: 2px; }
.who small { font-weight: 400; color: var(--ink-2); font-size: 13px; }

/* ---------- status (quest / mystery / ledger state): squares, never circles ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--ink);
  padding: 2px 7px; border: 1px solid var(--ink-3); border-radius: 3px; line-height: 18px;
  overflow-wrap: normal; hyphens: manual;
}
.status::before { content: ""; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 1px; }
.status--closed { color: var(--ink-2); border-color: var(--line); }
.status--closed::before { background: currentColor; }
.status--failed, .status--broken { color: var(--t-lie); border-color: currentColor; }

/* ---------- home: your-turn slab ---------- */
.slab {
  background: var(--slab); color: var(--slab-ink); border-radius: var(--r-lg); text-decoration: none;
  padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
  box-shadow: var(--shadow);
}
.slab__title { font: 700 21px/1.12 var(--f-display); font-stretch: 75%; grid-row: 1; grid-column: 1; }
.slab__sub { font-size: 14px; color: var(--slab-ink-2); grid-row: 2; grid-column: 1; }
.slab .btn { grid-row: 1 / span 2; grid-column: 2; }

.btn {
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 16px/1.1 var(--f-ui); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  background: var(--slab); color: var(--slab-ink);
  transition: transform .2s var(--ease-out), background-color .2s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--on-slab { background: var(--slab-ink); color: var(--slab); }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--danger { background: transparent; color: var(--t-lie); border-color: var(--t-lie); }
.btn--link { background: none; border: 0; padding: 0; min-height: var(--tap); color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); font-weight: 500; }

/* ---------- find: "Who's that again?" ---------- */
.find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.find input {
  min-height: var(--tap); font: 400 16px/1.3 var(--f-ui); color: var(--ink); width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px;
  caret-color: var(--t-confirmed);
}
.find input::placeholder { color: var(--ink-3); }

/* recap: prose someone wrote is set in their voice */
.recap__by { font-size: 13px; color: var(--ink-2); }
.recap__prose { font-family: var(--f-voice); font-size: 17px; line-height: 1.5; max-width: 62ch; }
.recap__points { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: disc; color: var(--ink-2); }
.recap__points li { color: var(--ink); font-family: var(--f-voice); font-size: 16px; }
.recap { padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- quest ---------- */
.quest { padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.quest__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.quest__title { font: 700 22px/1.12 var(--f-display); font-stretch: 75%; text-wrap: balance; }
.quest__title a { text-decoration: none; }
.quest__title--small { font-size: 19px; }
.quest--closed .quest__title { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 14px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.steps { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* priority (FR-1): a pennant and a word, in ink; colour stays reserved for truth */
.quest__marks { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.prio { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink); white-space: nowrap; }
.prio svg { width: 16px; height: 16px; }
.prio--low { color: var(--ink-3); font-weight: 500; }
.priority { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.priority__label { font-size: 13px; color: var(--ink-2); }
.priority__by { font-size: 13px; color: var(--ink-2); }
.priority .choice { min-height: var(--tap); }
.quest__flags { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--ink-2); }
.flag { display: inline-flex; align-items: center; gap: 5px; }
.flag .seal { width: 16px; height: 16px; margin: 0; }

/* ---------- entity page ---------- */
.entity__head { display: flex; flex-direction: column; gap: 6px; }
.entity__name { font: 750 38px/1.02 var(--f-display); font-stretch: 75%; letter-spacing: -.01em; text-wrap: balance; }
.entity__kind { font-size: 14px; color: var(--ink-2); }
.entity__summary { font-size: 16px; max-width: 62ch; }
.alias {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  padding: 12px 12px 12px 14px; border: 1px dashed var(--ink-3); border-radius: var(--r-md);
}
.alias__label { font-size: 13px; color: var(--ink-2); }
.alias__name { font-weight: 650; }
.alias__name small { font-weight: 400; color: var(--ink-2); font-size: 14px; }
.alias .btn { grid-row: 1 / span 2; grid-column: 2; }
.footing { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.footing__seals { display: flex; flex-wrap: wrap; gap: 4px; }
.footing__seals .seal { width: 26px; height: 26px; margin: 0; }
.footing__line { font-size: 15px; hyphens: manual; }
.footing__line b { font-weight: 650; }
.by-voice { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.by-voice div { padding: 10px 6px 12px; text-align: center; font-size: 12px; color: var(--ink-2); overflow-wrap: normal; }
.by-voice div + div { border-left: 1px solid var(--line); }
.by-voice b { display: block; font: 700 22px/1.1 var(--f-display); font-stretch: 75%; color: var(--ink); }
.by-voice .is-zero b { color: var(--ink-3); }
.ledger-line { display: flex; flex-direction: column; gap: 8px; }
.ledger-line__who { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ledger-line__arrow { width: 16px; height: 16px; stroke: var(--ink-2); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ledger-line__settled { font-size: 13px; color: var(--ink-2); }
.relation__kind { font-size: 13px; color: var(--ink-2); }

/* the seal key, folded away until someone asks */
.key { font-size: 14px; color: var(--ink-2); }
.key { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 14px; }
.key summary { cursor: pointer; min-height: var(--tap); padding: 10px 0; color: var(--ink); font-weight: 500; }
.key summary .seal { width: 16px; height: 16px; margin: 0 0 0 6px; vertical-align: -3px; }
.key[open] { padding-bottom: 12px; }
.key__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 6px 0 4px; }
.key__grid li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; align-items: center; color: var(--ink); }
.key__grid li .seal { margin: 0; }
.key__grid small { grid-column: 2; font-size: 12px; color: var(--ink-3); }
.key__voices { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.key__voices .claim { display: block; }
.key__voices .claim__text { font-size: 15px; }

/* ---------- people, factions, places ---------- */
.entity-row__name { font-weight: 650; }
.entity-row__also { font-size: 13px; color: var(--ink-2); }
.entity-row__latest { font-size: 14px; color: var(--ink-2); }
/* the teaser line keeps the voice of how we know it */
.voice--said { font-family: var(--f-voice); font-size: 15px; }
.voice--said::before { content: "\201C"; }
.voice--said::after { content: "\201D"; }
.voice--rumour { font-family: var(--f-voice); font-style: italic; font-size: 15px; }
.voice--speculation { font-style: italic; }
.entity-row__seals { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.entity-row__seals .seal { width: 14px; height: 14px; margin: 0; }

/* ---------- review ---------- */
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; grid-column: 1 / -1; }
.progress span { height: 4px; border-radius: 2px; background: var(--line); }
.progress span.is-done { background: var(--ink); }
.review { padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.review__kind { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.review__q { font: 700 24px/1.12 var(--f-display); font-stretch: 75%; text-wrap: balance; }
.review__claim .claim__text { font-size: 19px; font-weight: 600; line-height: 1.3; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pair > div { background: var(--surface-2); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pair__name { font: 700 19px/1.1 var(--f-display); font-stretch: 75%; }
.pair__name a { text-decoration: none; }
.pair__meta { font-size: 12px; color: var(--ink-2); }
.pair .claim { grid-template-columns: 16px minmax(0, 1fr); column-gap: 8px; }
.pair .seal { width: 16px; height: 16px; margin-top: 2px; }
.pair .claim__text { font-size: 14px; hyphens: manual; }
.pair .claim--said .claim__text, .pair .claim--rumour .claim__text { font-size: 15px; }
.pair .prov { font-size: 12px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices--row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice {
  min-height: 52px; padding: 8px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--ground); color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  font: 600 16px/1.2 var(--f-ui); text-align: left; cursor: pointer;
  transition: background-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.choice small { font-weight: 400; font-size: 13px; color: var(--ink-2); }
.choice:active { transform: scale(.98); }
/* not answerable yet: every choice the same quiet outline, so nothing looks already picked */
.choice:disabled, .choice--primary:disabled { cursor: not-allowed; background: transparent; color: var(--ink-2); border-color: var(--line); border-style: dashed; }
.choice:disabled small { color: var(--ink-3); }
.choice:disabled:active { transform: none; }
.choice--primary { background: var(--slab); color: var(--slab-ink); border-color: var(--slab); }
.choice--primary small { color: var(--slab-ink-2); }
.choices--row .choice { align-items: center; text-align: center; padding: 8px 6px; overflow-wrap: normal; hyphens: manual; }
.outcome { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.outcome .seal { width: 20px; height: 20px; margin: 0; }
.outcome__arrow { width: 16px; height: 16px; stroke: var(--ink-3); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* face-down answers: hidden until you answer the card yourself */
.table-says { display: flex; flex-direction: column; gap: 8px; }
.table-says__label { font-size: 13px; color: var(--ink-2); }
.table-says__cards { display: flex; flex-wrap: wrap; gap: 8px; }
.facecard { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); }
.facecard__face {
  width: 72px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line);
  display: grid; place-items: center; padding: 0 4px;
  font-size: 12px; font-weight: 650; color: var(--ink); text-align: center; line-height: 1.1; overflow-wrap: normal;
}
.facecard--down .facecard__face {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px);
}
.facecard--up .facecard__face { background: var(--surface-2); animation: flip .45s var(--ease-out); }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }

/* sealed since the wrap-up: the payoff after answering */
.sealed__you { padding-left: 34px; margin-top: 4px; }

/* ---------- forms: sign-in, account, admin ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field > span { font-size: 13px; color: var(--ink-2); }
.field input, .field select {
  min-height: var(--tap); font: 400 16px/1.3 var(--f-ui); color: var(--ink); width: 100%;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px;
  caret-color: var(--t-confirmed);
}
.field input.code { font-size: 26px; letter-spacing: .3em; text-align: center; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--t-confirmed); }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.error { color: var(--t-lie); font-size: 14px; }
.notice { font-size: 14px; color: var(--ink); background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; }
.signin { width: 100%; max-width: 420px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.user.is-disabled { opacity: .6; }
.user { padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.user__meta { font-size: 13px; color: var(--ink-2); }

/* ---------- admin rows ---------- */
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-row > span:first-child, .row-link .admin-row__title { min-width: 0; }
.admin-row > span:first-child { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-row__title { font-weight: 650; font-size: 16px; }
.admin-row__meta { font-size: 13px; color: var(--ink-2); }
.admin-row .btn { min-height: 36px; padding-inline: 12px; }

/* ---------- sessions ---------- */
.session-date { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.session-gist { font-family: var(--f-voice); font-size: 15px; line-height: 1.4; }
.notes { counter-reset: none; }
.note__text { font-family: var(--f-voice); font-size: 16px; line-height: 1.42; max-width: 62ch; overflow-wrap: anywhere; hyphens: auto; white-space: pre-line; }
.notes .panel__row:target { background: var(--surface-2); }
.note__edit { margin-top: 8px; font-size: 14px; }
.note__edit summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--ink-2); }
.pager { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- the note box ---------- */
.notebox { padding: 14px; }
.notebox__label { font: 700 19px/1.15 var(--f-display); font-stretch: 75%; }
.notebox__text, .ask__q {
  width: 100%; min-height: 88px; resize: vertical; font: 400 17px/1.4 var(--f-voice); color: var(--ink);
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px;
  caret-color: var(--t-confirmed);
}
.notebox__row { justify-content: space-between; }
.notebox__status { font-size: 14px; color: var(--ink-2); flex: 1; text-align: right; }
.notebox__hint { font-size: 13px; color: var(--ink-2); hyphens: manual; }
.notebox__hint b { color: var(--ink); font-weight: 650; }
.notebox__failed { display: flex; flex-direction: column; gap: 10px; }
.notebox__failed li { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.notebox__failed[hidden] { display: none; }

/* ---------- ask ---------- */
.answer { font-family: var(--f-voice); font-size: 17px; line-height: 1.5; max-width: 62ch; white-space: pre-line; }
.cite {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; margin-left: 2px;
  border: 1px solid var(--line); border-radius: var(--r-sm); font: 600 12px/1 var(--f-ui); text-decoration: none;
  vertical-align: 2px; color: var(--ink);
}
.sources .panel__row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.sources__n { font: 600 13px/1.6 var(--f-ui); color: var(--ink-2); }
.sources .claim__text { font-family: var(--f-voice); display: block; }

.foot {
  width: 100%; max-width: var(--measure); margin: 0 auto;
  padding: 0 var(--gutter) 20px; color: var(--ink-3); font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .choice { transition: none; }
  .facecard--up .facecard__face { animation: none; }
}

/* Wider screens: the same column, with room to breathe. */
@media (min-width: 760px) {
  .page { padding-top: 28px; }
  .entity__name { font-size: 46px; }
}

/* ---------- processing on the admin sessions page ---------- */
.processing { display: flex; flex-direction: column; gap: 8px; }
.processing__state { font-size: 14px; color: var(--ink-2); }
.ask-box { display: flex; flex-direction: column; gap: 8px; }
.ask-box .ask__q { min-height: 64px; }
.ask-box__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* waiting for an answer (ask.js): a busy bar, not a percentage, and one line at a time */
.ask-wait { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ask-wait[hidden] { display: none; }
.ask-wait__bar { position: relative; height: 4px; overflow: hidden; border-radius: 2px; background: var(--surface-2); }
.ask-wait__bar span {
  position: absolute; inset: 0 auto 0 0; width: 35%; border-radius: 2px; background: var(--t-confirmed);
  animation: ask-busy 1.6s ease-in-out infinite;
}
@keyframes ask-busy {
  from { transform: translateX(-100%); }
  to { transform: translateX(290%); }
}
.ask-wait__line {
  min-height: 4.2em; font: italic 400 16px/1.4 var(--f-voice); color: var(--ink-2); hyphens: manual;
  transition: opacity 400ms var(--ease-out);
}
.ask-wait__line--out { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .ask-wait__bar span { animation: none; width: 100%; opacity: .45; }
  .ask-wait__line { transition: none; }
}
