/*! Open Historia — the landing page © 2026 Nicholas Krol, AGPL-3.0-or-later (see LICENSE). */
/* A year in ten chapters, told on the game's own map: missiles over the
   Arctic, a war in Korea, then the politics that end both. Flat colours only:
   ink and paper, ember for war, laurel for peace, the game's own blue for what
   you hold. Detail comes from rules, hatching, stamps and paper, never fades. */

:root {
  --bg: #0d0d0f;
  --bg2: #141417;
  --bg3: #1b1b1f;
  --bg4: #232328;
  --paper: #ece4d2;
  --paper2: #d6cdb8;
  --muted: #9a8f78;
  --muted2: #7c7262;
  --line: rgba(236, 228, 210, 0.12);
  --line2: rgba(236, 228, 210, 0.22);
  --gold: #c9a55a;
  --gold-l: #e2c486;
  --war: #c4432c;
  --war-l: #e0662f;
  --war-deep: #4a1710;
  --peace: #a3b26b;
  --peace-l: #c3cf8f;
  --peace-deep: #2f3620;
  --accent: #2bc1f3;
  --accent-deep: #0f3a49;
  --vellum: #e9dfc6;
  --vellum2: #ded1b2;
  --vellum-ink: #2a2318;
  --sea: #0b1015;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font: 400 clamp(17px, 0.6vw + 14px, 20px) / 1.6 var(--serif);
  overflow-x: hidden;
}
/* Paper grain over everything: noise, not a gradient. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--gold-l); text-underline-offset: 3px; }
a:hover { color: var(--paper); }
img { max-width: 100%; display: block; }
::selection { background: var(--war); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Engraved hatching, as a tile: thin diagonal rules. */
.hatch, .notice-band, .marquee {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M-2 2 L2 -2 M0 10 L10 0 M8 12 L12 8' stroke='%23ece4d2' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
}

/* ---- community bar and header ---------------------------------------------- */
.community { background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--paper2); }
.community-in { max-width: 1240px; margin: 0 auto; padding: 8px var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; }
.community-links { display: flex; gap: 8px; flex-wrap: wrap; }
.community-btn { font: 600 12px/1 var(--display); letter-spacing: 0.08em; color: var(--gold-l); text-decoration: none; border: 1px solid var(--line2); background: var(--bg); border-radius: 999px; padding: 7px 12px; }
.community-btn:hover { border-color: var(--gold); color: var(--paper); }

.site-head { position: sticky; top: 0; z-index: 50; background: rgba(13, 13, 15, 0.92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-head { background: rgba(13, 13, 15, 0.8); backdrop-filter: blur(10px); } }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--line); }
.head-in { max-width: 1240px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--display); letter-spacing: 0.06em; color: var(--paper); text-decoration: none; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand-sub { font: 600 9px/1 var(--display); letter-spacing: 0.24em; color: var(--muted); border-left: 1px solid var(--line2); padding-left: 10px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(10px, 1.6vw, 24px); }
.nav a { font: 600 13px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper2); text-decoration: none; }
.nav a:hover { color: var(--paper); }
.nav .nav-play { color: var(--bg); background: var(--paper); padding: 9px 14px; border-radius: 999px; }
.nav .nav-play:hover { background: var(--gold-l); color: var(--bg); }
@media (max-width: 860px) { .nav a:not(.nav-play):not(.nav-keep) { display: none; } .brand-sub { display: none; } }

/* ---- buttons ------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--display); letter-spacing: 0.06em; text-decoration: none; border-radius: 999px; padding: 15px 24px; border: 1px solid transparent; transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--paper); color: var(--bg); }
.btn-primary:hover { background: var(--gold-l); color: var(--bg); }
.btn-ghost { background: rgba(13, 13, 15, 0.6); color: var(--paper); border-color: var(--line2); }
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn .i { font-size: 13px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---- the hero: four ages, and what crosses between them ------------------------ */
/* Each age is a scene clipped to a slanted frame (.scene) and a layer that is not
   clipped (.spill). Both draw on the same 400-wide grid, so a bomber, a beam, a
   red line, a dragon or a ribbon in one age's .spill lands in its neighbour. The
   hero clips them, never the page. Flat colours only; the text sits on a plate. */
.hero { position: relative; min-height: max(calc(100svh - 52px), calc(29.4vw + 380px)); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 var(--gutter) 64px; overflow: hidden; isolation: isolate; background: var(--bg); }
.realms { position: absolute; left: 0; right: 0; top: 0; height: min(100%, 62vw); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.realm { position: relative; margin: 0; min-width: 0; }
.realm > svg { position: absolute; top: 0; height: 100%; display: block; }
.realm .scene { left: -10%; width: 120%; z-index: 1; clip-path: polygon(16.667% 0, 100% 0, 83.333% 100%, 0 100%); transform-origin: 50% 35%; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease; }
.realm:nth-child(1) .scene { clip-path: polygon(0 0, 100% 0, 83.333% 100%, 0 100%); }
.realm:nth-child(4) .scene { clip-path: polygon(16.667% 0, 100% 0, 100% 100%, 0 100%); }
.realm .spill { left: 0; width: 100%; z-index: 3; overflow: visible; pointer-events: none; }
.seams { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.seams path { fill: none; vector-effect: non-scaling-stroke; }
.seams .under { stroke: var(--bg); stroke-width: 7px; }
.seams .line { stroke: var(--gold); stroke-width: 1.5px; }
.seams .phone { display: none; }
.realm figcaption { position: absolute; z-index: 4; top: 14px; left: 14%; display: flex; gap: 8px; align-items: baseline; padding: 7px 11px 6px; background: rgba(13, 13, 15, 0.86); border: 1px solid var(--line2); border-left: 3px solid var(--gold); font: 600 11px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper); white-space: nowrap; }
.realm figcaption b { color: var(--gold-l); font-weight: 700; }
.realm:nth-child(1) figcaption { left: 16px; border-left-color: var(--war); }
.r-now figcaption { border-left-color: var(--accent); }
.r-myth figcaption { border-left-color: var(--peace); }
@media (hover: hover) and (pointer: fine) {
  .realm:hover .scene { transform: scale(1.04); z-index: 2; }
  .realms:hover .realm:not(:hover) .scene { opacity: 0.74; }
}

/* Words drawn into the scenes. */
.realms text { font-family: var(--display); }
.rh-poster { font-size: 10px; font-weight: 700; fill: #efe2b4; text-anchor: middle; letter-spacing: 0.08em; }
.rh-poster.small { font-size: 8px; }
.rh-poster.tiny { font-size: 5.6px; fill: #1b2440; }
.rh-ins { font-size: 6.4px; font-weight: 700; fill: #6b655a; text-anchor: middle; letter-spacing: 0.1em; }
.rh-mono { font-family: var(--mono) !important; font-size: 8px; font-weight: 700; }
.rh-mono.small { font-size: 7px; }
.rh-chart { font-size: 7px; font-weight: 700; fill: #5b4228; text-anchor: middle; letter-spacing: 0.12em; }
.rh-plaque { font-size: 5.6px; font-weight: 700; fill: #3a2a10; text-anchor: middle; letter-spacing: 0.2em; }
.rh-ribbon { font-size: 12px; font-weight: 700; fill: #f3e6c4; letter-spacing: 0.14em; }

/* Gentle motion: transforms and opacity only, paused off screen (story.js), none at all for Reduce motion. */
.realms .sweep { animation: rh-sweep 9s ease-in-out infinite alternate; }
.realms .sweep.s2 { animation-duration: 12s; animation-delay: -4s; }
.realms .sweep.s3 { animation-duration: 10s; animation-delay: -3s; }
@keyframes rh-sweep { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.realms .bob { animation: rh-bob 6s ease-in-out infinite alternate; }
.realms .bob.b2 { animation-duration: 7.5s; animation-delay: -3s; }
.realms .bob.b3 { animation-duration: 2.6s; }
@keyframes rh-bob { to { transform: translateY(-5px); } }
.realms .fly { animation: rh-fly 5s ease-in-out infinite alternate; }
.realms .fly.f2 { animation-delay: -1.7s; }
.realms .fly.f3 { animation-delay: -3.1s; }
@keyframes rh-fly { to { transform: translate(7px, -3px); } }
.realms .smoke { animation: rh-smoke 9s ease-in-out infinite alternate; }
.realms .smoke.sm2 { animation-delay: -4s; }
.realms .smoke.sm3 { animation-duration: 3s; }
@keyframes rh-smoke { to { transform: translate(8px, -6px); opacity: 0.55; } }
.realms .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: rh-flame 1.4s ease-in-out infinite alternate; }
.realms .flame.f2 { animation-delay: -0.6s; }
@keyframes rh-flame { to { transform: scale(1.06, 0.86); } }
.realms .flicker { animation: rh-flicker 2.2s ease-in-out infinite alternate; }
.realms .flicker.f2 { animation-delay: -1s; }
@keyframes rh-flicker { to { opacity: 0.7; } }
.realms .blink { animation: rh-blink 2.4s steps(1) infinite; }
.realms .blink.b2 { animation-delay: -1.2s; }
@keyframes rh-blink { 50% { opacity: 0.15; } }
.realms .flash { opacity: 0; transform-box: fill-box; transform-origin: center; animation: rh-flash 5s ease-out infinite; }
.realms .flash.fl2 { animation-delay: -2s; }
.realms .flash.fl3 { animation-delay: -3.6s; }
@keyframes rh-flash { 0%, 86%, 100% { opacity: 0; transform: scale(0.4); } 89% { opacity: 1; transform: scale(1); } 94% { opacity: 0; transform: scale(1.25); } }
.realms .pulse { transform-box: fill-box; transform-origin: center; animation: rh-pulse 2.4s ease-out infinite; }
@keyframes rh-pulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.realms .ticker { animation: rh-ticker 30s linear infinite; }
@keyframes rh-ticker { to { transform: translateX(-560px); } }
.realms .redline { stroke-dasharray: 10 7; animation: rh-dash 1.8s linear infinite; }
.realms .fall { stroke-dasharray: 6 8; animation: rh-dash 1.2s linear infinite; }
@keyframes rh-dash { to { stroke-dashoffset: -34; } }
.realms .wave { transform-box: fill-box; transform-origin: 0 50%; animation: rh-wave 2.8s ease-in-out infinite alternate; }
.realms .wave.w2 { animation-delay: -1s; }
.realms .wave.w3 { animation-delay: -2s; }
@keyframes rh-wave { from { transform: skewY(-5deg); } to { transform: skewY(5deg) scaleX(0.94); } }
.realms .dragon { animation: rh-bob 4.4s ease-in-out infinite alternate; }
.realms .wing-near { transform-origin: 206px 150px; animation: rh-flap 2.2s ease-in-out infinite alternate; }
.realms .wing-far { transform-origin: 222px 142px; animation: rh-flap-far 2.2s ease-in-out infinite alternate; }
@keyframes rh-flap { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes rh-flap-far { from { transform: rotate(6deg); } to { transform: rotate(-8deg); } }
.realms .fire { transform-origin: 362px 112px; animation: rh-fire 0.9s ease-in-out infinite alternate; }
@keyframes rh-fire { from { transform: scale(0.9, 0.92); } to { transform: scale(1.03, 1.06); } }
.realms .glint { opacity: 0; transform-box: fill-box; transform-origin: center; animation: rh-glint 3.6s ease-in-out infinite; }
@keyframes rh-glint { 0%, 70%, 100% { opacity: 0; transform: scale(0.3); } 82% { opacity: 1; transform: scale(1) rotate(45deg); } }
.realms .puff { transform-box: fill-box; transform-origin: center; animation: rh-puff 4.8s ease-out infinite; }
.realms .puff.p2 { animation-delay: -1.2s; }
.realms .puff.p3 { animation-delay: -2.4s; }
.realms .puff.p4 { animation-delay: -3.6s; }
@keyframes rh-puff { from { transform: translate(0, 0) scale(0.6); opacity: 0.9; } to { transform: translate(-18px, -30px) scale(1.7); opacity: 0; } }
.realms .ribbon { animation: rh-ribbon 5s ease-in-out infinite alternate; }
@keyframes rh-ribbon { to { transform: translate(-3px, 3px); } }
.hero.asleep .realms * { animation-play-state: paused !important; }

/* The plate the words stand on: one even tint, never a fade. */
.hero-plate { position: relative; z-index: 6; width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 18px clamp(24px, 3.4vw, 48px); align-items: center; padding: clamp(20px, 2.2vw, 30px) clamp(20px, 2.8vw, 40px); background: rgba(13, 13, 15, 0.92); border: 1px solid var(--line2); border-top: 3px solid var(--gold); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55); }
.hero-plate::before, .hero-plate::after { content: ""; position: absolute; top: -8px; width: 11px; height: 11px; background: var(--gold); transform: rotate(45deg); }
.hero-plate::before { left: 22px; }
.hero-plate::after { right: 22px; }
.plate-side { display: grid; gap: 14px; justify-items: start; }
.kicker { font: 600 11px/1.5 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.kicker .orn { color: var(--war-l); }
.title { margin: 0; font-weight: 400; }
.title .t-small { display: flex; align-items: center; gap: 14px; font: 700 clamp(14px, 0.6vw + 9px, 18px) / 1 var(--display); letter-spacing: 0.4em; text-transform: uppercase; color: var(--paper2); margin-bottom: 10px; }
.title .rule-l, .title .rule-r { width: clamp(24px, 4vw, 70px); height: 7px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.title .rule-l { display: none; }
.title .t-big { display: flex; align-items: baseline; gap: clamp(10px, 1.4vw, 22px); font: 700 clamp(48px, 5vw, 90px) / 0.95 var(--display); letter-spacing: 0.02em; }
.title .w-war { color: var(--war); text-shadow: 0 5px 0 var(--war-deep); }
.title .w-peace { color: var(--peace); text-shadow: 0 5px 0 var(--peace-deep); }
.title .w-or { font: italic 400 clamp(24px, 2.2vw, 40px) / 1 var(--serif); color: var(--paper2); transform: translateY(-0.2em); }
.lede { max-width: 600px; margin: 16px 0 0; font-size: clamp(17px, 0.5vw + 13px, 21px); line-height: 1.5; color: var(--paper2); }
.lede em { color: var(--paper); font-style: italic; }
.plate-side .cta-row { justify-content: flex-start; }
.hero-note { margin: 0; max-width: 520px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.hero-note a { color: var(--paper2); }
.seals { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 0; padding: 0; }
.seals li { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--gold); outline: 1px dashed rgba(201, 165, 90, 0.5); outline-offset: 3px; background: var(--bg); text-align: center; }
.seals b { font: 700 13px/1 var(--display); letter-spacing: 0.02em; color: var(--gold-l); }
.seals span { font: italic 11px/1.1 var(--serif); color: var(--paper2); margin-top: -18px; padding: 0 6px; }
.scroll-cue { position: absolute; z-index: 6; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 11px/1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.scroll-cue::after { content: ""; width: 1px; height: 18px; background: var(--muted); transform-origin: top; animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Narrower screens: the four ages fill the hero, in a row and then two by two on a phone, and the plate sits over
   them, see-through and unblurred, so the ages show behind it ("make the part in the image be more transparent and sit directly
   infront/ontop of the 4 themes on tablet and mobile view": the owner, 2026-11-09). An even tint, never a fade. */
@media (max-width: 1099px) {
  .hero { min-height: 0; justify-content: center; padding: 64px var(--gutter) 72px; }
  .realms { position: absolute; inset: 0; width: 100%; height: 100%; }
  .hero-plate { width: min(760px, 100%); margin: 0; grid-template-columns: 1fr; text-align: center; background: rgba(13, 13, 15, 0.6); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); }
  .hero-note { color: var(--paper2); }
  .plate-side { justify-items: center; }
  .plate-side .cta-row, .title .t-small, .title .t-big { justify-content: center; }
  .title .rule-l { display: block; }
  .lede, .hero-note { margin-left: auto; margin-right: auto; }
  .seals { justify-content: center; }
  .realm figcaption { top: 10px; max-width: calc(86% - 10px); flex-wrap: wrap; row-gap: 3px; padding: 6px 8px 5px; font-size: 10px; line-height: 1.15; letter-spacing: 0.1em; gap: 6px; white-space: normal; }
}
@media (max-width: 699px) {
  .hero { padding: 52px 12px 108px; }
  .realms { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .realm:nth-child(3) .scene { clip-path: polygon(0 0, 100% 0, 83.333% 100%, 0 100%); }
  .realm:nth-child(2) .scene { clip-path: polygon(16.667% 0, 100% 0, 100% 100%, 0 100%); }
  .realm:nth-child(3) figcaption { left: 10px; }
  .realm:nth-child(1) figcaption { left: 10px; }
  .realm figcaption { top: 8px; font-size: 9px; letter-spacing: 0.1em; padding: 5px 7px 4px; }
  /* The lower two ages name themselves at their foot, below the plate. */
  .realm:nth-child(3) figcaption, .realm:nth-child(4) figcaption { top: auto; bottom: 56px; }
  .seams .desk { display: none; }
  .seams .phone { display: inline; }
  .kicker { font-size: 11px; letter-spacing: 0.14em; }
  .title .t-big { font-size: clamp(40px, 13vw, 56px); }
  .seals li { width: 66px; height: 66px; }
  .seals b { font-size: 11.5px; letter-spacing: 0; }
}

/* Two rivers of headlines. */
.marquee { border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); background-color: var(--bg2); overflow: hidden; }
.mq { overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--line); }
.mq:last-child { border-bottom: 0; }
.mq-track { display: inline-flex; gap: 0; animation: mq 70s linear infinite; }
.mq.peace .mq-track { animation-direction: reverse; animation-duration: 80s; }
.mq span { padding: 10px 26px; font: 600 14px/1 var(--display); letter-spacing: 0.06em; border-right: 1px solid var(--line); }
.mq.war span { color: #e7a08a; }
.mq.peace span { color: var(--peace-l); }
@keyframes mq { to { transform: translateX(-50%); } }

.notice-band { border-bottom: 1px solid var(--line); background-color: var(--bg2); }
.notice { max-width: 920px; margin: 0 auto; padding: 16px var(--gutter); font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.notice b { color: var(--paper2); font-weight: 600; }

/* The numbers. */

/* ---- the chronicle ---------------------------------------------------------- */
.chronicle { position: relative; background: var(--sea); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0; background: var(--sea); }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Doves. */
.doves { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
.doves.on { opacity: 1; }
.dove { position: absolute; width: 92px; overflow: visible; }
.doves.on .dove { animation: fly 16s linear infinite; }
.dove.d1 { top: 30%; left: -130px; animation-delay: 0s !important; }
.dove.d2 { top: 21%; left: -130px; width: 70px; animation-delay: -3.4s !important; }
.dove.d3 { top: 43%; left: -130px; width: 80px; animation-delay: -6.8s !important; }
.dove.d4 { top: 14%; left: -130px; width: 54px; animation-delay: -10s !important; }
.dove.d5 { top: 37%; left: -130px; width: 62px; animation-delay: -12.6s !important; }
.dove .body { fill: #f2eee4; }
.dove .near .vane { fill: #faf7f0; }
.dove .far .vane { fill: #bbb3a1; }
.dove .quill { fill: none; stroke: #b5ac98; stroke-width: 0.8; stroke-linecap: round; }
.dove .beak { fill: #8a7d69; }
.dove .eye { fill: #17181c; }
.dove .stem { fill: none; stroke: #6c7a43; stroke-width: 1.2; stroke-linecap: round; }
.dove .leaf { fill: var(--peace); }
/* Wings beat from the shoulder: up over the back, down below the breast. */
.dove .wing { transform-box: view-box; transform-origin: 70px 31px; }
.dove .far { transform-origin: 75px 30px; }
.doves.on .dove .wing { animation: flap 0.8s ease-in-out infinite alternate; }
.doves.on .dove .far { animation-delay: -0.08s; }
.doves.on .dove.d2 .wing { animation-duration: 0.7s; }
.doves.on .dove.d3 .wing { animation-duration: 0.86s; }
.doves.on .dove.d4 .wing { animation-duration: 0.64s; }
.doves.on .dove.d5 .wing { animation-duration: 0.76s; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-0.45) skewX(10deg); } }
@keyframes fly { 0% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(30vw, -3vh) rotate(4deg); } 50% { transform: translate(60vw, 2vh) rotate(-5deg); } 75% { transform: translate(90vw, -2vh) rotate(3deg); } 100% { transform: translate(115vw, -6vh) rotate(-4deg); } }

/* ---- the chapters ------------------------------------------------------------ */
.steps { position: relative; z-index: 4; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.step { min-height: 110vh; display: flex; align-items: center; padding: 0 var(--gutter); }
.step.tall { min-height: 240vh; align-items: flex-start; }
.step.tall .chapter { position: sticky; top: 200px; margin: 30vh 0 40vh; }
/* The flight takes its time: the missiles get the longest stretch of scroll. */
.step[data-step="launch"] { min-height: 600vh; }
.step[data-step="korea"] { min-height: 260vh; }
.step:first-child { padding-top: 12vh; }
.step:last-child { min-height: 130vh; }
.chapter { position: relative; pointer-events: auto; max-width: 460px; background: rgba(20, 20, 23, 0.95); border: 1px solid var(--line); border-radius: 4px; padding: clamp(20px, 3vw, 30px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); outline: 1px solid rgba(236, 228, 210, 0.06); outline-offset: 5px; }
.chapter::before { content: ""; position: absolute; top: -9px; left: 26px; width: 40px; height: 16px; background: rgba(233, 223, 198, 0.75); transform: rotate(-3deg); }
.dossier { display: flex; justify-content: space-between; gap: 10px; margin: -6px 0 14px; padding-bottom: 8px; border-bottom: 1px dashed var(--line2); font: 600 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.chapter .num { display: flex; align-items: center; gap: 12px; font: 700 12px/1 var(--display); letter-spacing: 0.3em; color: var(--gold); margin-bottom: 12px; }
.chapter .num::after { content: ""; flex: 1; height: 5px; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.chapter h2 { margin: 0 0 12px; font: 700 clamp(26px, 2vw + 16px, 38px) / 1.1 var(--display); letter-spacing: 0.02em; color: var(--paper); }
.chapter p { margin: 0 0 12px; color: var(--paper2); }
.chapter strong { color: var(--paper); font-weight: 600; }
.chapter .drop::first-letter { float: left; font: 700 3.1em/0.85 var(--display); color: var(--gold-l); margin: 0.06em 0.12em 0 0; padding: 0.08em 0.12em; border: 1px solid var(--gold); }
.step[data-tone="war"] .chapter .drop::first-letter { color: var(--war-l); border-color: var(--war); }
.step[data-tone="peace"] .chapter .drop::first-letter { color: var(--peace-l); border-color: var(--peace); }
.chapter .beta { display: inline-block; vertical-align: middle; margin-left: 8px; font: 700 10px/1 var(--display); letter-spacing: 0.16em; padding: 5px 8px; border-radius: 999px; color: var(--bg); background: var(--gold); }
.stamp { position: absolute; right: 18px; top: 44px; padding: 5px 10px; border: 2.5px solid var(--gold); color: var(--gold); font: 700 12px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; transform: rotate(8deg); opacity: 0.8; pointer-events: none; }
.stamp::before { content: ""; position: absolute; inset: 2px; border: 1px solid currentColor; }
.stamp.red { color: var(--war-l); border-color: var(--war-l); }
.stamp.blue { color: var(--accent); border-color: var(--accent); }
.stamp.green { color: var(--peace-l); border-color: var(--peace-l); }
.fn { margin: 16px 0 0 !important; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--muted) !important; }
.fn sup { color: var(--gold); font-weight: 700; margin-right: 2px; }
.step[data-tone="war"] .chapter { border-color: rgba(196, 67, 44, 0.5); }
.step[data-tone="war"] .chapter .num { color: var(--war-l); }
.step[data-tone="peace"] .chapter { border-color: rgba(163, 178, 107, 0.5); }
.step[data-tone="peace"] .chapter .num { color: var(--peace); }
.chapter .cta-row { justify-content: flex-start; margin-top: 18px; }

.no-js .stage { display: none; }
.no-js .steps { margin-top: 0; }
.no-js .step { min-height: 0; padding: 18px var(--gutter); }
.no-js .step.tall .chapter { position: static; margin: 0; }

@media (max-width: 860px) {
  .step { align-items: flex-end; padding-bottom: 6vh; }
  /* A long chapter's card passes by, and then the map has the screen. */
  .step.tall .chapter { position: relative; top: auto; bottom: auto; margin: 30vh 0 0; }
  .chapter { max-width: none; width: 100%; background: rgba(20, 20, 23, 0.97); }
  .chapter .fn, .stamp, .dossier { display: none; }
}

/* ---- sections after the story ------------------------------------------------ */
.section { padding: clamp(72px, 12vh, 140px) var(--gutter); position: relative; border-top: 1px solid var(--line); }
.section-in { max-width: 1180px; margin: 0 auto; position: relative; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 700 12px/1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.eyebrow::before { content: "✦"; color: var(--war-l); }
.eyebrow.center { justify-content: center; }
.section h2 { margin: 0 0 16px; font: 700 clamp(32px, 3vw + 18px, 58px) / 1.05 var(--display); letter-spacing: 0.02em; }
.section .lead { max-width: 700px; color: var(--paper2); font-size: clamp(18px, 0.6vw + 15px, 22px); margin: 0 0 clamp(28px, 5vh, 48px); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Eras. */
.timeline { position: relative; height: 22px; margin: 0 0 18px; border-bottom: 1px solid var(--gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='22'%3E%3Cpath d='M0 12 V22' stroke='%23c9a55a' stroke-opacity='0.6'/%3E%3Cpath d='M7 17 V22' stroke='%23c9a55a' stroke-opacity='0.35'/%3E%3C/svg%3E"); }
.era-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .era-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .era-row { grid-template-columns: 1fr; } }
.era { position: relative; padding: 18px 18px 16px; background: var(--bg2); border: 1px solid var(--line2); overflow: hidden; }
.era::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; }
.era .yr { font: 600 11px/1 var(--mono); letter-spacing: 0.1em; color: var(--gold); }
.era h3 { margin: 8px 0 6px; font: 700 19px/1.15 var(--display); letter-spacing: 0.04em; }
.era p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--paper2); }
.era .em { position: absolute; right: 10px; bottom: 4px; font-size: 44px; opacity: 0.16; }
.era:nth-child(odd) { border-top: 3px solid var(--war); }
.era:nth-child(even) { border-top: 3px solid var(--peace); }

/* The game itself, as pinned photographs. */
.reel { display: grid; grid-template-columns: repeat(12, 1fr); gap: 26px 20px; }
.shot { position: relative; margin: 0; padding: 10px 10px 44px; background: #e9e3d3; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); cursor: zoom-in; }
.shot:nth-child(1) { grid-column: span 7; transform: rotate(-1.2deg); }
.shot:nth-child(2) { grid-column: span 5; transform: rotate(1.4deg); align-self: end; }
.shot:nth-child(3) { grid-column: span 5; transform: rotate(-0.8deg); }
.shot:nth-child(4) { grid-column: span 7; transform: rotate(1deg); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid #b9a77f; transition: transform 0.8s ease; }
.shot:hover img { transform: scale(1.02); }
.shot figcaption { position: absolute; left: 12px; right: 12px; bottom: 10px; font: italic 15px/1.3 var(--serif); color: #3a2f1e; }
.shot .no { margin-right: 8px; font: 700 10px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: #8a2c1c; font-style: normal; }
.tape { position: absolute; top: -12px; left: 50%; width: 96px; height: 24px; transform: translateX(-50%) rotate(-2deg); background: rgba(233, 223, 198, 0.75); z-index: 1; }
@media (max-width: 760px) { .shot:nth-child(n) { grid-column: span 12; } }

/* The two ledgers. */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 28px); }
.ledger-col { position: relative; overflow: hidden; border-radius: 4px; padding: clamp(20px, 3vw, 34px); border: 1px solid var(--line); background: var(--bg2); }
.ledger-col::after { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.ledger-col.war { border-top: 4px solid var(--war); }
.ledger-col.peace { border-top: 4px solid var(--peace); }
.watermark { position: absolute; right: -40px; bottom: -40px; width: 340px; height: 340px; opacity: 0.05; pointer-events: none; }
.ledger-col.war .watermark { fill: var(--war); }
.ledger-col.peace .watermark { fill: var(--peace); stroke: var(--peace); }
.ledger-col h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font: 700 clamp(24px, 1.6vw + 14px, 34px) / 1.1 var(--display); letter-spacing: 0.06em; }
.ledger-col.war h3 { color: var(--war-l); }
.ledger-col.peace h3 { color: var(--peace); }
.ledger-col h3 svg { width: 34px; height: 34px; flex: none; }
.ledger-col > p { margin: 0 0 18px; color: var(--muted); font-style: italic; }
.item { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.item .ic { font-size: 20px; line-height: 1.3; }
.item h4 { margin: 0; font: 700 16px/1.3 var(--display); letter-spacing: 0.04em; color: var(--paper); }
.item h4 .no { margin-right: 8px; font: 600 11px/1 var(--mono); color: var(--gold); }
.item h4 .beta { margin-left: 6px; font: 700 9px/1 var(--display); letter-spacing: 0.14em; padding: 4px 7px; border-radius: 999px; background: var(--bg4); color: var(--gold-l); vertical-align: 2px; }
.item p { grid-column: 2; margin: 0; color: var(--paper2); font-size: 16px; line-height: 1.5; }
.archive { position: relative; margin-top: clamp(14px, 2vw, 28px); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 clamp(14px, 2vw, 28px); border-radius: 4px; padding: 26px clamp(20px, 3vw, 34px) clamp(10px, 2vw, 20px); border: 1px solid var(--line); background: var(--bg2); }
.archive-head { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 0 14px; background: var(--bg); font: 700 12px/22px var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.archive .item:nth-child(-n + 5) { border-top: 0; }
@media (max-width: 900px) { .ledger { grid-template-columns: 1fr; } }

/* Getting started. */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
.s3 { position: relative; border: 1px solid var(--line); border-radius: 4px; padding: 24px; background: var(--bg2); }
.s3::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; }
.s3 .n { font: 700 40px/1 var(--display); color: var(--gold); }
.s3 h3 { margin: 10px 0 8px; font: 700 20px/1.2 var(--display); letter-spacing: 0.04em; }
.s3 p { margin: 0; color: var(--paper2); font-size: 16px; }
@media (max-width: 820px) { .steps3 { grid-template-columns: 1fr; } }
.runbox { margin-top: 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg2); overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { flex: 1; min-width: 110px; background: transparent; color: var(--paper2); border: 0; border-right: 1px solid var(--line); padding: 12px; font: 600 14px/1 var(--display); letter-spacing: 0.06em; cursor: pointer; }
.tab:last-child { border-right: 0; }
.tab[aria-selected="true"] { background: var(--bg4); color: var(--paper); }
.tab-body { display: none; padding: 18px 20px; color: var(--paper2); font-size: 16px; }
.tab-body.on { display: block; }
.kbd { font-family: var(--mono); font-size: 0.86em; background: var(--bg4); border: 1px solid var(--line2); border-radius: 5px; padding: 2px 6px; color: var(--paper); white-space: nowrap; }

/* Downloads. */
.dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .dl { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .dl { grid-template-columns: 1fr; } }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 22px; background: var(--bg2); }
.card::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; }
.card.feature { border-color: var(--gold); }
.card .tag { position: absolute; top: -11px; left: 18px; z-index: 1; font: 700 10px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--gold); color: var(--bg); }
.card .ic { font-size: 28px; }
.card h3 { margin: 0; font: 700 22px/1.1 var(--display); letter-spacing: 0.04em; }
.card .meta { font-size: 14px; color: var(--muted); }
.card p { margin: 0 0 6px; color: var(--paper2); font-size: 15px; line-height: 1.5; flex: 1; }
.card .btn { position: relative; z-index: 1; justify-content: center; padding: 12px 16px; font-size: 13px; }
.card .beta-line { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line2); font-size: 13px; color: var(--muted); }
.card .beta-line b { color: var(--gold-l); font-weight: 600; }
.dl-note { text-align: center; margin: 22px auto 0; max-width: 760px; color: var(--muted); font-size: 15px; }

/* Questions. */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 600 18px/1.35 var(--display); letter-spacing: 0.02em; color: var(--paper); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 26px/1 var(--serif); color: var(--gold); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--paper2); }

/* The last word. */
.finale { text-align: center; background: var(--bg2); overflow: hidden; }
.finale-rose { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; transform: translate(-50%, -50%); opacity: 0.08; pointer-events: none; }
.finale-rose circle, .finale-rose path { fill: none; stroke: var(--gold); stroke-width: 0.6; }
.finale h2 { font-size: clamp(36px, 4vw + 18px, 72px); }
.finale .split { display: flex; justify-content: center; gap: clamp(12px, 3vw, 40px); margin: 0 0 20px; }
.finale .split span { font: 700 clamp(14px, 1vw + 8px, 18px) / 1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; }
.finale .split .w { color: var(--war); }
.finale .split .p { color: var(--peace); }

.foot { border-top: 1px solid var(--line); padding: 32px var(--gutter) 40px; font-size: 15px; color: var(--muted); }
.foot-in { max-width: 1180px; margin: 0 auto; display: grid; gap: 16px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--paper2); }
.foot-brand img { width: 22px; height: 22px; border-radius: 5px; }
.fnav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fnav a { color: var(--paper2); text-decoration: none; }
.fnav a:hover { color: var(--paper); }
.colophon { margin: 0; font: italic 14px/1.5 var(--serif); color: var(--muted); border-top: 1px dashed var(--line2); padding-top: 14px; }
.foot-legal { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted2); }

/* Screenshot viewer. */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(8, 8, 10, 0.94); display: grid; place-items: center; padding: 4vh 4vw; opacity: 0; transition: opacity 0.2s ease; }
.lb.on { opacity: 1; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 10px; justify-items: center; }
.lb img { max-width: 92vw; max-height: 82vh; border-radius: 8px; border: 1px solid var(--line2); }
.lb figcaption { color: var(--paper2); font-size: 15px; }
.lb button { position: absolute; background: var(--bg3); color: var(--paper); border: 1px solid var(--line2); border-radius: 999px; width: 46px; height: 46px; font-size: 22px; cursor: pointer; }
.lb .lb-close { top: 18px; right: 18px; }
.lb .lb-prev { left: 18px; top: 50%; }
.lb .lb-next { right: 18px; top: 50%; }

/* Reveal as it scrolls in. */
.rise { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.rise.in { opacity: 1; transform: none; }
.shot.rise.in:nth-child(1) { transform: rotate(-1.2deg); }
.shot.rise.in:nth-child(2) { transform: rotate(1.4deg); }
.shot.rise.in:nth-child(3) { transform: rotate(-0.8deg); }
.shot.rise.in:nth-child(4) { transform: rotate(1deg); }
.no-js .rise { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .doves { display: none; }
  .realms *, .scroll-cue::after { animation: none !important; }
}

/* A lighter device (story.js quality tier 1+): the header does not blur the moving map. */
.oh-lite .site-head { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(13, 13, 15, 0.94); }
/* Below the story, a section is laid out and painted only when it comes near the screen. */
.section { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* ---- the Download the App popup: Stable, Native (recommended) and Beta (site.js) ---- */
.dlp { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(9, 9, 11, 0.82); }
.dlp[hidden] { display: none; }
html.dlp-open { overflow: hidden; }
.dlp-box { position: relative; width: min(980px, 100%); max-height: calc(100vh - 40px); max-height: calc(100svh - 40px); overflow-y: auto; background: var(--bg2); border: 1px solid var(--line2); border-top: 3px solid var(--gold); border-radius: 6px; padding: clamp(22px, 4vw, 38px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.dlp-box h2 { margin: 0 0 6px; font: 700 clamp(26px, 2vw + 16px, 38px) / 1.1 var(--display); color: var(--paper); }
.dlp-box .eyebrow { margin-bottom: 10px; }
.dlp-for { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.dlp-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2); background: transparent; color: var(--paper2); font-size: 16px; cursor: pointer; }
.dlp-x:hover { color: var(--paper); border-color: var(--paper); }
.dlp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
.dlp-rec { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 2px solid var(--gold); border-radius: 8px; background: rgba(201, 165, 90, 0.08); box-shadow: 0 0 0 4px rgba(201, 165, 90, 0.12); }
.dlp-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 20px; border: 1px solid var(--line2); border-radius: 6px; background: rgba(13, 13, 15, 0.55); }
.dlp-card h3 { margin: 0; font: 700 22px/1.1 var(--display); letter-spacing: 0.04em; color: var(--paper); }
.dlp-card p { margin: 0; flex: 1; color: var(--paper2); font-size: 16px; line-height: 1.5; }
.dlp-card.featured { border-color: rgba(201, 165, 90, 0.4); background: rgba(13, 13, 15, 0.45); }
.dlp-rec .tag { position: absolute; top: -12px; left: 18px; padding: 4px 10px; border-radius: 999px; background: var(--gold); color: var(--bg); font: 700 11px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.dlp-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dlp-btns .btn { padding: 12px 18px; font-size: 13px; }
.dlp-btns .btn { white-space: nowrap; }
.dlp-rec .dlp-btns .btn { padding: 12px 14px; font-size: 12px; gap: 8px; }
.dlp-none { color: var(--muted); font-size: 14px; font-style: italic; }
.dlp-foot { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .dlp { align-items: flex-end; padding: 0; }
  .dlp-box { border-radius: 10px 10px 0 0; max-height: 92vh; max-height: 92svh; }
  .dlp-grid { grid-template-columns: 1fr; gap: 18px; }
  .dlp-rec { grid-template-columns: 1fr; order: -1; padding: 18px 12px 12px; }
}
