/* 6 AIs Rule the World: the logs. The episodes' night, their parchment and their stamps. */

@font-face { font-family: "Anton"; src: url("../fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Gelasio"; src: url("../fonts/gelasio.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Gelasio"; src: url("../fonts/gelasio-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --night: #030817;
  --night-2: #0A1226;
  --night-3: #121C36;
  --rule: #24304D;
  --ink-light: #EEF1F8;
  --ink-soft: #B9C3D8;
  --ink-quiet: #8E9AB5;
  --parchment: #E9D9B4;
  --parchment-2: #D9C292;
  --parchment-3: #CBB07E;
  --parchment-edge: #6B4A1E;
  --parchment-gold: #C9A55A;
  --ink: #2B1B08;
  --ink-2: #5A4426;
  --stamp: #8A150E;
  --stamp-bright: #E23A2C;
  --amber: #FFAA28;
  --gold: #F4E2A6;
  --display: "Anton", "Archivo", sans-serif;
  --ui: "Archivo", system-ui, sans-serif;
  --read: Georgia, "Gelasio", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 3.2vw, 44px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3A4866 var(--night); }
body { margin: 0; background: var(--night); color: var(--ink-light); font-family: var(--ui); font-size: 16px; line-height: 1.5; }
::selection { background: var(--amber); color: #1A1204; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: #33405D; border-radius: 6px; border: 2px solid var(--night); }

/* ---- masthead ---- */
.masthead { display: flex; align-items: center; gap: 20px; padding: 14px var(--gutter); border-bottom: 1px solid var(--rule); background: var(--night); position: relative; z-index: 5; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink-light); white-space: nowrap; }
.brand-name { font-family: var(--display); font-size: clamp(20px, 2.1vw, 27px); letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.brand-sub { font-family: var(--display); font-size: clamp(20px, 2.1vw, 27px); color: var(--gold); line-height: 1; text-transform: uppercase; }
.episodes-nav { display: flex; gap: 6px; margin-left: 12px; }
.episodes-nav a { font-weight: 600; font-size: 14px; padding: 7px 12px; border: 1px solid var(--rule); color: var(--ink-soft); text-decoration: none; border-radius: 2px; }
.episodes-nav a[aria-current="page"] { border-color: var(--gold); color: var(--gold); }
.masthead-links { margin-left: auto; display: flex; gap: 18px; font-size: 14px; font-weight: 600; }
.masthead-links a { color: var(--ink-soft); text-decoration: none; }
.masthead-links a:hover { color: var(--ink-light); text-decoration: underline; }

/* ---- the desk: where a line is checked ---- */
.desk { margin: 18px var(--gutter) 0; position: relative; z-index: 4; }
.desk-form { display: flex; align-items: stretch; gap: 0; background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-2) 60%, var(--parchment-3) 100%); border: 3px solid var(--parchment-edge); box-shadow: inset 0 0 0 3px var(--parchment-gold), inset 0 0 0 5px var(--parchment-edge), 0 14px 36px rgba(0, 0, 0, 0.55); padding: 10px 12px 10px 22px; }
.desk-field { flex: 1; min-width: 0; display: flex; align-items: center; }
.desk-input { width: 100%; border: 0; background: transparent; color: var(--ink); font-family: var(--read); font-style: normal; font-size: clamp(19px, 2.2vw, 30px); line-height: 1.25; padding: 12px 6px; caret-color: var(--stamp); }
.desk-input::placeholder { color: #4E3C22; opacity: 1; font-style: italic; }
.desk-input:focus { outline: none; }
.desk-input::-webkit-search-cancel-button { filter: sepia(1) saturate(4) hue-rotate(-20deg); cursor: pointer; }
.desk-form:focus-within { box-shadow: inset 0 0 0 3px var(--parchment-gold), inset 0 0 0 5px var(--parchment-edge), 0 0 0 3px var(--amber), 0 14px 36px rgba(0, 0, 0, 0.55); }
.stamp-button { flex: none; align-self: center; font-family: var(--display); font-size: clamp(18px, 1.9vw, 25px); letter-spacing: 0.08em; text-transform: uppercase; color: var(--stamp); background: transparent; border: 4px solid var(--stamp); padding: 6px 18px 5px; transform: rotate(-3deg); cursor: pointer; border-radius: 3px; transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.stamp-button:hover { background: var(--stamp); color: var(--gold); }
.stamp-button:active { transform: rotate(-3deg) scale(0.94); }
.stamp-button:focus-visible { outline-color: var(--stamp); }
.desk-hint { margin: 8px 4px 0; font-size: 14px; color: var(--ink-quiet); }
.desk-hint button { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; font-family: var(--read); font-style: italic; font-size: 15px; }

/* ---- the stage: the game under the answer ---- */
.stage { position: relative; height: clamp(560px, calc(100svh - 214px), 860px); margin-top: 8px; }
.stage-side { position: absolute; right: var(--gutter); top: 14px; bottom: 136px; width: clamp(360px, 33vw, 480px); display: flex; flex-direction: column; gap: 14px; z-index: 3; pointer-events: none; }
.stage-side > * { pointer-events: auto; }
.stage > .stage-globe { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.stage-caption { margin: 0 0 3px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-shadow: 0 1px 6px #000; }
.stage-caption strong { color: var(--ink-light); font-weight: 600; }
.stage-head { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 6px 14px; }
.stage-year { margin: 0; font-family: var(--display); font-size: clamp(40px, 3.6vw, 54px); line-height: 0.9; color: var(--gold); text-shadow: 0 4px 28px rgba(0, 0, 0, 0.7); font-variant-numeric: tabular-nums; }
.stage-game { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.stage-game button { font-size: 13px; font-weight: 600; padding: 5px 10px; background: rgba(10, 18, 38, 0.72); border: 1px solid var(--rule); color: var(--ink-soft); cursor: pointer; border-radius: 2px; }
.stage-game button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.stage-game button:hover { color: var(--ink-light); }

/* ---- the found card ---- */
.found { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.found .card { min-height: 0; max-height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.found .card > * { flex: none; }
.found .card > .stamp { align-self: flex-start; }
.card { background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-2) 60%, var(--parchment-3) 100%); border: 3px solid var(--parchment-edge); box-shadow: inset 0 0 0 3px var(--parchment-gold), inset 0 0 0 5px var(--parchment-edge), 0 18px 48px rgba(0, 0, 0, 0.6); color: var(--ink); padding: 24px 28px 24px; position: relative; }
.stamp { display: inline-block; font-family: var(--display); font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stamp); border: 3px solid var(--stamp); padding: 4px 10px 3px; transform: rotate(-3.5deg); border-radius: 3px; line-height: 1.15; mix-blend-mode: multiply; filter: url(#ink); }
.stamp.is-blue { color: #1F4E8C; border-color: #1F4E8C; }
.stamp.is-grey { color: #5A4A35; border-color: #5A4A35; }
.found-quote { font-family: var(--read); font-weight: 700; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.12; margin: 18px 0 0; text-wrap: balance; }
.found-quote.is-long { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.18; }
.found-quote.is-longer { font-size: clamp(19px, 1.5vw, 24px); line-height: 1.25; }
.found-what { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.found-context { font-family: var(--read); font-size: 17px; line-height: 1.5; margin: 10px 0 0; color: #3B2A12; overflow: hidden; }
.found-context.is-clamped { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5em), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5em), transparent); }
.found-read { align-self: flex-start; margin-top: 4px; background: none; border: 0; padding: 2px 0; font-family: var(--ui); font-weight: 700; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.found-read:hover { color: var(--ink); }
.found-read[hidden] { display: none; }
.found-context mark { background: rgba(138, 21, 14, 0.14); color: inherit; padding: 0 2px; border-bottom: 2px solid var(--stamp); }
.found-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; align-items: center; }
.found-open { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--stamp); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.found-open svg { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
.found-open:hover svg { transform: translateX(3px); }
.found-open:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.found-open.is-gold { color: var(--gold); }
.found-more { margin-top: 14px; border-top: 1px solid rgba(107, 74, 30, 0.35); padding-top: 10px; }
.found-more-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }
.found-more ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.found-more li { min-width: 0; }
.found-more button { width: 100%; text-align: left; background: none; border: 0; padding: 3px 0; cursor: pointer; color: var(--ink); font-size: 14px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.found-more button:hover .more-text { text-decoration: underline; }
.more-where { font-weight: 700; color: var(--ink-2); margin-right: 6px; white-space: nowrap; }
.more-text { font-family: var(--read); font-style: italic; }
.found-note { font-size: 14px; line-height: 1.45; margin: 10px 0 0; color: var(--ink-2); }
.found.is-landing .card { animation: land 420ms var(--ease-out) both; }
.found.is-landing .stamp { animation: press 520ms var(--ease-out) 120ms both; }
@keyframes land { from { transform: translateY(-14px) rotate(-0.6deg); opacity: 0.2; } to { transform: none; opacity: 1; } }
@keyframes press { 0% { transform: rotate(-3.5deg) scale(1.55); opacity: 0; filter: url(#ink) blur(1.5px); } 55% { transform: rotate(-3.5deg) scale(0.96); opacity: 1; filter: url(#ink) blur(0); } 100% { transform: rotate(-3.5deg) scale(1); opacity: 1; filter: url(#ink); } }

/* ---- the year rail ---- */
.rail { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14px; z-index: 3; }
.rail-strip { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; padding: 9px 10px; background: rgba(6, 11, 26, 0.88); border-top: 5px dotted #26314E; border-bottom: 5px dotted #26314E; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.frame { position: relative; height: 44px; border: 1px solid #222D48; background: rgba(17, 26, 50, 0.6); color: var(--ink-quiet); font-family: var(--display); font-size: 19px; letter-spacing: 0.02em; cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out); }
.frame:hover { color: var(--ink-light); border-color: #3A4A70; }
.frame[aria-current="true"] { background: var(--amber); color: #1A1204; border-color: var(--amber); }
.frame.is-passing { background: rgba(244, 226, 166, 0.35); color: var(--night); }
.frame.is-change::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--stamp-bright); }
.frame-flag { position: absolute; top: -27px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.frame-flag span { display: block; background: var(--amber); color: #1A1204; font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.03em; padding: 2px 6px; white-space: nowrap; border-radius: 2px; }
.frame-flag i { display: block; width: 2px; height: 8px; background: var(--amber); }
.rail-back { position: absolute; right: 0; top: -40px; font-size: 13px; font-weight: 700; background: var(--amber); color: #1A1204; border: 0; padding: 6px 10px; cursor: pointer; border-radius: 2px; display: inline-flex; align-items: center; gap: 6px; }
.rail-back svg { width: 14px; height: 14px; }
.rail-back[hidden] { display: none; }

/* ---- the year, to read ---- */
.reader { padding: 64px var(--gutter) 40px; border-top: 1px solid var(--rule); background: linear-gradient(180deg, #050B1D 0%, var(--night) 240px); }
.reader-head { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; }
.reader-title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1; margin: 0; color: var(--ink-light); letter-spacing: 0.01em; }
.reader-game { font-size: 15px; color: var(--ink-soft); padding-bottom: 6px; }
.reader-steps { margin-left: auto; display: flex; gap: 8px; padding-bottom: 4px; }
.step { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; padding: 8px 12px; background: var(--night-2); border: 1px solid var(--rule); color: var(--ink-light); cursor: pointer; border-radius: 2px; }
.step:hover:not(:disabled) { border-color: var(--gold); }
.step:disabled { opacity: 0.4; cursor: default; }
.step svg { width: 14px; height: 14px; }
.news { max-width: 1180px; margin: 22px auto 0; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.news-title { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }
.news ul { margin: 0; padding: 0; list-style: none; columns: 2 320px; column-gap: 40px; }
.news li { font-size: 15px; line-height: 1.5; padding: 3px 0 3px 18px; position: relative; break-inside: avoid; color: var(--ink-soft); }
.news li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: #4A5A80; }
.news li.is-war::before { background: var(--stamp-bright); }
.news li.is-nuke { color: #FFFFFF; font-weight: 600; }
.news li.is-nuke::before { background: #FFFFFF; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.news .news-none { color: var(--ink-quiet); }

.seats { max-width: 1180px; margin: 26px auto 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.seat { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; background: var(--night-2); border: 1px solid var(--rule); cursor: pointer; text-align: left; border-radius: 2px; min-width: 0; transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out); }
.seat:hover { border-color: #3A4A70; }
.seat[aria-selected="true"] { border-color: var(--gold); background: #17213D; }
.seat .crest { flex: none; }
.seat-text { min-width: 0; }
.seat-ai { display: block; font-weight: 800; font-size: 15px; line-height: 1.2; }
.seat-country { display: block; font-size: 13px; color: var(--ink-quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-score { display: block; font-family: var(--display); font-size: 18px; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.seat.is-out .seat-score { color: var(--ink-quiet); }

.turn { max-width: 1180px; margin: 28px auto 0; display: grid; grid-template-columns: minmax(0, 72ch) minmax(260px, 1fr); gap: 28px 48px; align-items: start; }
.turn-main { min-width: 0; }
.turn-side { min-width: 0; display: grid; gap: 18px; }
.turn-who { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; }
.turn-who h3 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3vw, 38px); line-height: 1; margin: 0; letter-spacing: 0.01em; }
.turn-who p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.part { margin: 0 0 26px; }
.part-title { font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }
.speech { font-family: var(--read); font-size: 20px; line-height: 1.6; color: var(--ink-light); margin: 0; }
.speech::before { content: "\201C"; }
.speech::after { content: "\201D"; }
.paper { background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-2) 60%, var(--parchment-3) 100%); border: 3px solid var(--parchment-edge); box-shadow: inset 0 0 0 3px var(--parchment-gold), inset 0 0 0 5px var(--parchment-edge), 0 10px 28px rgba(0, 0, 0, 0.45); color: var(--ink); padding: 18px 22px; position: relative; }
.paper + .paper { margin-top: 14px; }
.paper .paper-head { font-family: var(--ui); font-size: 14px; line-height: 1.4; white-space: normal; }
.paper-head .stamp { filter: none; opacity: 0.92; }
.paper-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.paper-head .stamp { font-size: 14px; border-width: 2px; padding: 2px 7px 1px; }
.paper p { font-family: var(--read); font-size: 18px; line-height: 1.55; margin: 0; white-space: pre-wrap; }
.paper p mark, .speech mark { background: rgba(138, 21, 14, 0.14); color: inherit; border-bottom: 2px solid var(--stamp); padding: 0 1px; }
.speech mark { background: rgba(244, 226, 166, 0.18); border-bottom-color: var(--gold); }
.empty { font-family: var(--read); font-style: italic; color: var(--ink-quiet); font-size: 17px; margin: 0; }
.block-note { border: 1px solid #5B2A2A; background: rgba(120, 24, 24, 0.18); padding: 14px 16px; font-size: 15px; line-height: 1.5; color: #F1D9D6; }
.block-note strong { color: #FFFFFF; }

.ledger { padding: 18px 20px 20px; }
.ledger + .ledger { margin-top: 0; }
.ledger h4 { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.ledger h4 + h4, .ledger dl + h4, .ledger ul + h4, .ledger .meter + h4 { margin-top: 18px; }
.ledger dl { margin: 0; display: grid; gap: 5px; font-size: 14px; }
.ledger dl > div { display: grid; grid-template-columns: auto minmax(12px, 1fr) auto; align-items: baseline; gap: 6px; }
.ledger dt { color: var(--ink-2); font-weight: 600; }
.ledger dl > div::after { content: ""; grid-column: 2; grid-row: 1; border-bottom: 1.5px dotted rgba(43, 27, 8, 0.45); transform: translateY(-0.25em); }
.ledger dd { grid-column: 3; margin: 0; color: var(--ink); font-family: var(--display); font-size: 17px; letter-spacing: 0.02em; text-align: right; font-variant-numeric: tabular-nums; }
.ledger dd small { font-family: var(--ui); font-size: 12px; color: var(--ink-2); letter-spacing: 0; }
.ledger dd.words { font-family: var(--read); font-size: 15px; letter-spacing: 0; }
.meter { margin: 10px 0 2px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; }
.meter-label { font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.meter-value { font-family: var(--ui); font-weight: 800; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.meter-value.is-hot { color: var(--stamp); }
.meter-track { position: relative; height: 14px; margin-top: 6px; background: #3A2A14; border: 2px solid var(--ink); border-radius: 3px; }
.meter-track i { position: absolute; left: 0; top: 0; bottom: 0; }
.meter-track b { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: #FFF3D6; box-shadow: 0 0 0 1.5px var(--ink); }
.meter-limit { position: relative; height: 16px; margin-top: 5px; }
.meter-limit span { position: absolute; transform: translateX(-50%); font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.08em; white-space: nowrap; color: var(--ink); }
.orders { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; color: var(--ink); }
.orders li { display: flex; gap: 10px; align-items: baseline; }
.order { flex: none; font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px 0; border: 1.5px solid currentColor; border-radius: 2px; transform: rotate(-2deg); color: #2E4A2A; }
.order.is-hostile { color: var(--stamp); }
.order.is-nuclear { color: var(--gold); background: var(--stamp); border-color: var(--stamp); }
.ledger .empty { color: var(--ink-2); font-size: 15px; }
details.more { border-top: 1px solid var(--rule); padding: 12px 0 0; margin: 0 0 14px; }
details.more > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 15px; color: var(--ink-light); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg { width: 14px; height: 14px; flex: none; align-self: center; transition: transform 200ms var(--ease-out); }
details.more[open] > summary svg { transform: rotate(90deg); }
details.more > summary small { color: var(--ink-quiet); font-weight: 400; font-size: 13px; }
.raw { margin: 12px 0 0; background: #070D1E; border: 1px solid var(--rule); padding: 14px 16px; font-family: var(--mono); font-size: 13px; line-height: 1.55; color: #C9D3EA; white-space: pre-wrap; word-break: break-word; max-height: 460px; overflow: auto; }
.raw.is-thinking { font-family: var(--read); font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.try-line { font-size: 13px; color: var(--ink-quiet); margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.copy { margin-top: 8px; font-size: 13px; font-weight: 700; background: var(--night-3); border: 1px solid var(--rule); padding: 6px 10px; cursor: pointer; border-radius: 2px; }
.copy:hover { border-color: var(--gold); }

/* ---- below: games, downloads, the rules ---- */
.section { max-width: 1180px; margin: 0 auto; padding: 56px var(--gutter) 8px; }
.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; margin: 0 0 18px; color: var(--ink-light); }
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.game { padding: 18px 22px 20px 0; border-bottom: 1px solid var(--rule); }
.game + .game { padding-left: 22px; border-left: 1px solid var(--rule); }
.game h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 6px; letter-spacing: 0.01em; }
.game p { margin: 0 0 10px; color: var(--ink-soft); font-size: 15px; line-height: 1.55; max-width: 60ch; }
.game .twist { font-family: var(--read); font-style: italic; color: var(--ink-light); }
.game .warn { color: #F3C9C3; }
.rules-lead { margin: 0 0 18px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; max-width: 72ch; }
.downloads { width: 100%; border-collapse: collapse; font-size: 15px; }
.downloads th { text-align: left; font-weight: 700; font-size: 13px; color: var(--ink-quiet); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); }
.downloads td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-variant-numeric: tabular-nums; }
.downloads td:first-child { font-weight: 700; }
.downloads .file { font-family: var(--mono); font-size: 13px; }
.downloads small { display: block; color: var(--ink-quiet); font-weight: 400; margin-top: 2px; }
.rules { columns: 2 360px; column-gap: 48px; }
.rules p { margin: 0 0 14px; color: var(--ink-soft); line-height: 1.6; font-size: 16px; break-inside: avoid; }
.rules strong { color: var(--ink-light); }
.models { font-family: var(--mono); font-size: 13px; color: var(--ink-light); }
.episode-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.episode-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.episode-n { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--gold); }
.episode-title { font-weight: 700; font-size: 17px; }
.episode-date { color: var(--ink-quiet); font-size: 14px; }
.episode-links { display: flex; gap: 14px; font-weight: 700; font-size: 14px; }
.footer { max-width: 1180px; margin: 48px auto 0; padding: 22px var(--gutter) 40px; border-top: 1px solid var(--rule); color: var(--ink-quiet); font-size: 13px; line-height: 1.6; }
.footer p { margin: 0 0 8px; max-width: 90ch; }

.loading { color: var(--ink-quiet); font-style: italic; }
.error { color: #FFB3AA; }

/* ---- phones and small tablets ---- */
@media (max-width: 899px) {
  .masthead { flex-wrap: wrap; gap: 10px 14px; padding: 12px var(--gutter); }
  .episodes-nav { margin-left: 0; order: 3; }
  .masthead-links { margin-left: auto; gap: 14px; font-size: 13px; }
  .desk { margin-top: 12px; }
  .desk-form { padding: 6px 8px 6px 14px; flex-wrap: nowrap; }
  .desk-input { font-size: 18px; padding: 10px 4px; }
  .stamp-button { font-size: 17px; padding: 5px 10px 4px; border-width: 3px; }
  .stage { height: auto; margin-top: 0; display: flex; flex-direction: column; }
  .stage-side, .stage-head { display: contents; }
  .found { margin: 14px var(--gutter) 0; order: 1; }
  .found .card { overflow: visible; max-height: none; }
  .stamp { font-size: 14px; }
  .card { padding: 18px 18px 18px; }
  .found-quote { font-size: 25px; }
  .found-context { font-size: 16px; }
  .stage > .stage-globe { position: relative; inset: auto; height: min(118vw, 520px); order: 3; margin-top: 6px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%); }
  .stage-year { order: 2; margin: 22px var(--gutter) 0; font-size: 48px; }
  .stage-game { order: 2; margin: 10px var(--gutter) 0; }
  .stage-caption { order: 4; margin: 10px var(--gutter) 0; font-size: 14px; }
  .rail { position: relative; left: auto; right: auto; bottom: auto; order: 5; margin: 40px 0 0; }
  .rail-strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 9px var(--gutter); gap: 4px; scrollbar-width: none; }
  .rail-strip::-webkit-scrollbar { display: none; }
  .frame { flex: none; width: 52px; scroll-snap-align: center; }
  .rail-back { right: var(--gutter); }
  .reader { padding-top: 40px; }
  .reader-steps { margin-left: 0; width: 100%; }
  .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seat { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 6px; }
  .seat-country { white-space: normal; }
  .turn { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .speech { font-size: 18px; }
  .paper p { font-size: 17px; }
  .games { grid-template-columns: minmax(0, 1fr); }
  .game, .game + .game { padding: 16px 0; border-left: 0; }
  .downloads thead { display: none; }
  .downloads tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--rule); padding: 10px 0; }
  .downloads td { border: 0; padding: 2px 8px 2px 0; }
  .episode-list li { grid-template-columns: 48px minmax(0, 1fr); }
  .episode-links { grid-column: 2; }
}

/* Laptops with short screens: the side column keeps the answer and its action in view. */
@media (min-width: 900px) and (max-height: 880px) {
  .stage-year { font-size: clamp(38px, 3.2vw, 46px); }
  .stage-game { margin-top: 2px; }
  .stage-game button { padding: 4px 9px; }
  .stage-side { gap: 10px; }
  .card { padding: 18px 22px; }
  .found-quote { font-size: clamp(24px, 2.2vw, 32px); margin-top: 14px; }
  .found-context { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .found.is-landing .card, .found.is-landing .stamp { animation: settle 240ms ease-out both; }
  .stamp-button, .found-open svg, details.more > summary svg { transition: none; }
  .found-open:hover svg { transform: none; }
  .stamp-button:active { transform: rotate(-3deg); }
}
@keyframes settle { from { opacity: 0; } to { opacity: 1; } }
