@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; src: url("fonts/newsreader-italic-400-latin.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Newsreader"; font-style: italic; src: url("fonts/newsreader-italic-400-latin-ext.woff2") format("woff2"); font-display: swap; unicode-range: U+0100-02AF; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plexmono.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #f4f1ea; --fg: #1b1c20; --muted: #5a5b62; --line: #d5d0c4; --link: #8a2418; --chip: #e8e3d8;
  --night: #05070c; --glass: rgba(8, 11, 18, 0.72); --glass-line: rgba(255, 255, 255, 0.10);
  --ink: #f1ede4; --ink-2: #c9c5bc; --red: #ff4a3a; --amber: #ffcf8a; --green: #9fe3c5;
  --serif: "Newsreader", Georgia, serif; --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
html.dark { --bg: #0b0d12; --fg: #e9e6df; --muted: #a3a29c; --line: #2a2d35; --link: #ff9a85; --chip: #1a1d24; }
* { box-sizing: border-box; }
html { scroll-padding-top: 3.2rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--fg); font: 400 1.125rem/1.6 var(--serif); }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--bg); color: var(--fg); padding: .5rem .8rem; }
.skip:focus { left: .5rem; top: .5rem; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------------------------------------------------------------- top bar (house pattern) */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .8rem; height: 2.8rem; padding: 0 .9rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--fg); border-bottom: 1px solid var(--line);
  font: 500 .78rem/1 var(--mono); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar a { text-decoration: none; }
.home { white-space: nowrap; }
.topnav { display: flex; gap: .9rem; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto; }
.topnav { -webkit-mask-image: linear-gradient(90deg,#000 85%,transparent); mask-image: linear-gradient(90deg,#000 85%,transparent); padding-right: 1rem; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { white-space: nowrap; color: var(--muted); }
.topnav a:hover { color: var(--fg); }
.spacer { flex: 1; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: .3rem .55rem; background: var(--chip); }
.icon-btn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--chip); color: var(--fg); cursor: pointer; }
@media (max-width: 560px) { .home { display: none; } }

/* ---------------------------------------------------------------- rail */
.rail { position: fixed; right: 1rem; top: 50%; transform: translateY(-50%); z-index: 20; display: none; flex-direction: column; gap: .85rem; }
@media (min-width: 1100px) { .rail { display: flex; } }
.rail a { position: relative; display: block; width: .6rem; height: .6rem; }
.rail a i { display: block; width: .6rem; height: .6rem; border-radius: 50%; background: rgba(255,255,255,.28); }
.rail a.on i { background: var(--amber); }
.rail a span { position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 500 .72rem var(--mono); color: var(--ink); opacity: 0; transition: opacity .2s; pointer-events: none; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }

/* ---------------------------------------------------------------- stage */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--night); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .still { position: absolute; inset: 0; display: none; background: var(--night) url("img/still.webp") 50% calc(50% + 22px) / min(100vw, calc(100vh - 45px)) no-repeat; }
@media (min-width: 900px) { .stage .still { background-position: calc(50% + 17vw) calc(50% + 22px); } }
html.nogl .stage .still, html:not(.js) .stage .still { display: block; }
html:not(.js) .stage canvas { display: none; }
main { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- steps and cards */
.step { min-height: 100vh; display: flex; align-items: center; padding: 18vh 1rem; }
.card { width: min(34rem, 100%); background: var(--glass); color: var(--ink); border: 1px solid var(--glass-line); border-radius: 14px;
  padding: 1.3rem 1.4rem; backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.card p { margin: 0 0 .9rem; }
.card p:last-child { margin-bottom: 0; }
.card a { color: var(--amber); }
.card h2 { font: 500 1.7rem/1.15 var(--serif); margin: 0 0 .8rem; letter-spacing: -0.01em; }
.anchor { text-decoration: none; }
.anchor:hover { text-decoration: underline; text-decoration-thickness: 1px; }
@media (min-width: 900px) { .step { padding-left: 6vw; } .step.wide-card .card { width: min(38rem, 100%); } }

.hero { min-height: 100vh; align-items: flex-end; padding-bottom: 12vh; }
.hero-card { background: linear-gradient(180deg, rgba(5,7,12,.2), rgba(5,7,12,.78)); border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-left: 0; padding-right: 0; }
.kicker { font: 500 .8rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--amber); margin: 0 0 .6rem; }
h1 { font: 400 clamp(2.5rem, 7.2vw, 5.2rem)/1.02 var(--serif); letter-spacing: -0.02em; margin: 0 0 1rem; color: var(--ink); text-shadow: 0 2px 30px rgba(0,0,0,.6); }
.deck { font-size: 1.22rem; line-height: 1.5; color: var(--ink); margin: 0 0 .9rem; text-shadow: 0 1px 12px rgba(0,0,0,.8); }
.you-then, .you-now { font: 500 .9rem/1.4 var(--mono); color: var(--green); }
.cta { display: inline-flex; gap: .4rem; align-items: center; background: var(--red); color: #fff !important; text-decoration: none; border: 0; border-radius: 99px;
  padding: .65rem 1.1rem; font: 600 .95rem var(--mono); cursor: pointer; }
.cta:hover { filter: brightness(1.1); }

/* ---------------------------------------------------------------- the console */
.seat { position: relative; height: 520vh; }
.seat-sticky { position: sticky; top: 2.8rem; height: calc(100vh - 2.8rem); display: flex; align-items: flex-end; padding: 1rem; pointer-events: none; }
@media (min-width: 900px) { .seat-sticky { align-items: center; padding-left: 6vw; } }
.console { pointer-events: auto; width: min(31rem, 100%); background: rgba(6, 8, 10, 0.88); color: var(--ink); border: 1px solid rgba(255, 80, 60, .28);
  border-radius: 12px; padding: .9rem 1rem 1rem; font-family: var(--mono); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 20px 60px rgba(0,0,0,.5); }
.console.asking .checks, .console.decided .beat { display: none; }
.console { max-height: calc(100vh - 4rem); overflow-y: auto; }
.c-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.c-title { font: 600 .85rem var(--mono); text-transform: uppercase; letter-spacing: .08em; margin: 0; color: var(--amber); }
.c-intro { font-size: .72rem; color: var(--ink-2); flex: 1 1 100%; order: 3; }
.siren-btn { margin-left: auto; }
.siren-btn { font: 500 .72rem var(--mono); background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: .35rem .6rem; cursor: pointer; min-height: 2rem; }
.siren-btn[aria-pressed="true"] { border-color: var(--red); color: var(--red); }
.c-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.banner { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .55rem .5rem .45rem; border-radius: 6px;
  background: #2a0605; border: 1px solid #5a120d; color: #ff3b2f; text-shadow: 0 0 14px rgba(255, 50, 30, .85); }
.banner .ru { font: 600 clamp(1.7rem, 7vw, 2.4rem)/1 var(--mono); letter-spacing: .12em; }
.banner.attack .ru { font-size: clamp(1rem, 4.4vw, 1.4rem); letter-spacing: .06em; }
.banner .gloss { font-size: .66rem; letter-spacing: .14em; color: #ff9b8f; margin-top: .3rem; text-shadow: none; }
.console.live .banner { animation: pulse 1.1s steps(2, jump-none) infinite; }
@keyframes pulse { 0% { background: #2a0605; } 100% { background: #5c0d08; } }
.c-grid > div:not(.banner) { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: .45rem .5rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.clock { font-size: 1.15rem; color: var(--amber); font-variant-numeric: tabular-nums; }
.c-count .n { font-size: 1.5rem; line-height: 1; color: #ff5a4a; }
.c-rel .rel { font-size: .62rem; color: #ff9b8f; }
.c-rel .val { font-size: .9rem; color: #ff5a4a; }
.c-src { grid-column: 1 / -1; }
.checks { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .25rem; font-size: .72rem; }
.checks li { display: grid; grid-template-columns: 9.5rem 1fr; gap: .5rem; padding: .3rem 0; border-top: 1px dashed rgba(255,255,255,.1); }
.checks .k { color: var(--ink-2); }
.checks .chk-auto .v { color: #ff9b8f; }
.checks .chk-visual .v { color: var(--green); }
@media (max-width: 420px) { .checks li { grid-template-columns: 1fr; gap: 0; } }
.beat { font: 400 1rem/1.45 var(--serif); margin: .75rem 0 0; min-height: 4.4em; color: var(--ink); }
.ask { display: none; margin-top: .7rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .7rem; }
.ask.shown { display: block; }
.ask .q { font: 600 .95rem/1.35 var(--serif); margin: 0 0 .55rem; }
.choices { display: flex; flex-wrap: wrap; gap: .45rem; }
.choice { font: 600 .8rem var(--mono); background: #151a22; color: var(--ink); border: 1px solid rgba(255,255,255,.22); border-radius: 8px; padding: .6rem .8rem; cursor: pointer; min-height: 2.75rem; }
.choice:hover:not(:disabled) { border-color: var(--amber); }
.choice[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.choice:disabled:not([aria-pressed="true"]) { opacity: .7; cursor: default; }
.reply { font: 400 .98rem/1.45 var(--serif); margin: .7rem 0 0; color: var(--ink); }
.linkish { background: none; border: 0; padding: .4rem 0; color: var(--amber); font: 500 .75rem var(--mono); text-decoration: underline; cursor: pointer; min-height: 2rem; }
.seat-static { display: none; }
html:not(.js) .seat { height: auto; }
html:not(.js) .seat-sticky { display: none; }
html:not(.js) .seat-static { display: flex; padding: 12vh 1rem; }
html:not(.js) .needs-js { display: none !important; }
.seat-static ol { margin: 0; padding-left: 1.2rem; }
.seat-static li { margin-bottom: .5rem; }
.choice-line { color: var(--amber); }
.method-note { font-size: .9rem; color: var(--ink-2); border-top: 1px solid var(--glass-line); padding-top: .8rem; margin-top: 1rem; }

/* ---------------------------------------------------------------- chain */
.chain { list-style: none; margin: 1rem 0 .6rem; padding: 0; counter-reset: c; }
.chain li { position: relative; padding: .5rem 0 .5rem 1.8rem; font: 500 .8rem/1.35 var(--mono); color: var(--ink); }
.chain li::before { content: ""; position: absolute; left: .35rem; top: .75rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.chain li:not(:last-child)::after { content: ""; position: absolute; left: .6rem; top: 1.35rem; bottom: -.6rem; width: 1px; background: rgba(255,90,70,.5); }
.chain li:first-child::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.small { font-size: .82rem; color: var(--ink-2); }

/* ---------------------------------------------------------------- arsenal */
.dots-card .card { width: min(26rem, 100%); }
@media (max-width: 899px) { .dots-card { align-items: flex-end; } }
.legend { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font: 500 .75rem var(--mono); }
.legend i { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: 0; }
.lg-ussr i { background: rgb(226,72,58); } .lg-usa i { background: rgb(128,170,230); } .lg-other i { background: rgb(170,170,170); }

/* ---------------------------------------------------------------- portrait */
.portrait { margin: 0 0 1rem; }
.portrait img { width: 100%; max-width: 16rem; height: auto; display: block; border-radius: 8px; filter: grayscale(.2); }
.portrait figcaption { font: 400 .72rem/1.4 var(--mono); color: var(--ink-2); margin-top: .4rem; }

/* ---------------------------------------------------------------- back matter (follows the theme) */
.back { position: relative; z-index: 1; background: var(--bg); color: var(--fg); padding: 4rem 1rem; }
.wrap { max-width: 44rem; margin: 0 auto; }
.back h2 { font: 500 1.8rem var(--serif); margin: 0 0 .8rem; }
.back h3 { font: 600 .8rem var(--mono); text-transform: uppercase; letter-spacing: .06em; margin: 1.8rem 0 .5rem; color: var(--muted); }
.back a { color: var(--link); }
.back ul { padding-left: 1.1rem; margin: 0; }
.back li { margin-bottom: .45rem; font-size: 1rem; }
footer { position: relative; z-index: 1; background: var(--bg); color: var(--muted); border-top: 1px solid var(--line); padding: 1.5rem 1rem 2.5rem; font: 400 .85rem var(--mono); }
footer a { color: var(--fg); }
body.nf { background: var(--bg); color: var(--fg); display: grid; place-items: center; min-height: 100vh; }
body.nf a { color: var(--link); }

@media (prefers-reduced-motion: reduce) { .console.live .banner { animation: none; background: #4a0b07; } html { scroll-behavior: auto; } }

@media (max-width: 560px) { .hero { padding-bottom: 4vh; padding-top: 30vh; } .deck { font-size: 1.08rem; } }
