@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/source-serif-4-normal-latin.woff2") format("woff2"); 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: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/source-serif-4-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/source-serif-4-italic-latin.woff2") format("woff2"); 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: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/source-serif-4-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/AtkinsonHyperlegibleNext.woff2") format("woff2"); }

/* The night scene is dark in both themes; the page around it follows the theme. */
:root {
  --paper: #f3f1ec;
  --paper-2: #e8e5dd;
  --ink: #16191e;
  --ink-2: #33383f;
  --ink-3: #4d535b;
  --rule: #cfcac0;
  --link: #0f5b8a;
  --accent: #b2401d;
  --bar: #1f6f9f;
  --bar-2: #9aa6b2;
  --up: #1d6b3a;
  --down: #a3321b;
  --topbar: rgba(243, 241, 236, .96);
  --night: #08111d;
  --night-2: #0e1b2c;
  --glass: rgba(8, 15, 26, .86);
  --glass-edge: rgba(160, 190, 220, .22);
  --on-night: #eef3f8;
  --on-night-2: #c3cfdb;
  --people: #ffc766;
  --pax: #8fe3ff;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111418; --paper-2: #1a1e24; --ink: #eef0f2; --ink-2: #d2d6db; --ink-3: #b6bcc4; --rule: #333a43;
    --link: #8cc8f0; --accent: #ff9b76; --bar: #6fb7e6; --bar-2: #6c7680; --up: #7fd39a; --down: #ff9a80;
    --topbar: rgba(17, 20, 24, .96);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111418; --paper-2: #1a1e24; --ink: #eef0f2; --ink-2: #d2d6db; --ink-3: #b6bcc4; --rule: #333a43;
  --link: #8cc8f0; --accent: #ff9b76; --bar: #6fb7e6; --bar-2: #6c7680; --up: #7fd39a; --down: #ff9a80;
  --topbar: rgba(17, 20, 24, .96);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.08rem/1.6 var(--serif); }
a { color: var(--link); text-underline-offset: .15em; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 30; background: var(--paper); padding: .5rem 1rem; }
.skip:focus { left: .5rem; top: .5rem; }
section[id], .step[id] { scroll-margin-top: 52px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .9rem; height: 46px; padding: 0 max(16px, env(safe-area-inset-left)); background: var(--topbar); border-bottom: 1px solid var(--rule); font: 500 .9rem/1 var(--sans); white-space: nowrap; }
.topbar a { color: var(--ink); text-decoration: none; }
.topbar .home { font-weight: 700; }
.topnav { display: flex; gap: .9rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--ink-2); padding: .9rem 0; }
.topnav a:hover, .topbar .chip:hover { text-decoration: underline; }
.spacer { flex: 1; }
.chip { flex: none; }
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }

/* ---------------------------------------------------------------- the scene */
.story { position: relative; background: var(--night); color: var(--on-night); }
.stage { position: sticky; top: 46px; height: calc(100vh - 46px); height: calc(100svh - 46px); overflow: hidden; background: radial-gradient(120% 90% at 60% 40%, var(--night-2), var(--night) 70%); }
#scene { display: block; width: 100%; height: 100%; }
.stage .fallback { display: none; }
.steps { position: relative; margin-top: calc(-100vh + 46px); margin-top: calc(-100svh + 46px); }
.step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 12vh max(16px, 4vw); pointer-events: none; }
.step:first-child { min-height: calc(100svh - 46px); align-items: flex-start; padding-top: 5vh; }
.card { pointer-events: auto; width: min(430px, 100%); padding: 1.3rem 1.4rem 1.2rem; background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 10px; color: var(--on-night); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card p { margin: 0 0 .75rem; }
.card p:last-child { margin-bottom: 0; }
.card a { color: #9fd6ff; }
.card h2 { margin: 0 0 .6rem; font: 700 1.45rem/1.2 var(--serif); letter-spacing: -.005em; }
.card h2 .anchor { color: inherit; text-decoration: none; }
.card .kicker { font: 600 .78rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--on-night-2); margin-bottom: .6rem; }
.hero .card { width: min(560px, 100%); background: rgba(8, 15, 26, .72); }
.hero h1 { margin: 0 0 .8rem; font: 700 clamp(1.8rem, 4.6vw, 2.9rem)/1.08 var(--serif); letter-spacing: -.012em; }
.hero h1 .big { color: var(--people); }
.hero .deck { font-size: 1.12rem; color: var(--on-night); }
.lede-you { font: 500 1rem/1.45 var(--sans); color: var(--on-night); border-left: 3px solid var(--people); padding-left: .7rem; }
.lede-you[hidden] { display: none; }
.cue { font: 500 .88rem/1.3 var(--sans); color: var(--on-night-2); }
.key { display: inline-block; width: .7em; height: .7em; border-radius: 50%; vertical-align: .02em; margin-right: .2em; }
.key.people { background: var(--people); }
.key.pax { background: var(--pax); }
.credit { font: .8rem/1.4 var(--sans); color: var(--on-night-2); margin-top: .5rem !important; }
.fig { font: 700 1.05em/1 var(--sans); color: #fff; }
.note { font: .92rem/1.45 var(--sans); color: var(--on-night-2); }

/* the reader's town, inside the scene */
.picker { margin: .9rem 0 .4rem; font-family: var(--sans); position: relative; }
.picker label { display: block; font: 600 .9rem/1.3 var(--sans); margin-bottom: .35rem; }
.picker .row { position: relative; }
.picker input { width: 100%; min-height: 46px; padding: .6rem .8rem; font: 500 1rem/1.2 var(--sans); color: #0b1220; background: #f5f8fb; border: 2px solid #9fb6cc; border-radius: 8px; }
.picker ul { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; list-style: none; margin: 0; padding: .25rem 0; max-height: 15rem; overflow-y: auto; background: #f5f8fb; color: #0b1220; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.picker ul[hidden] { display: none; }
.picker li { padding: .55rem .8rem; min-height: 44px; display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.picker li[aria-selected="true"], .picker li:hover { background: #d8e8f6; }
.picker li small { color: #3d4955; }
.status { font: .9rem/1.4 var(--sans); color: var(--on-night-2); margin: .45rem 0 0; min-height: 1.3em; }
.you-card { margin: .9rem 0 .8rem; font-family: var(--sans); font-size: .98rem; line-height: 1.5; }
.you-card[hidden] { display: none; }
.you-card .big { display: block; font: 700 1.25rem/1.25 var(--serif); margin-bottom: .45rem; }
.you-card dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: .7rem 0; }
.you-card dt { color: var(--on-night-2); }
.you-card dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn { font: 600 .95rem/1 var(--sans); min-height: 44px; padding: .7rem 1rem; border-radius: 8px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.card .btn { color: var(--on-night); }

/* ---------------------------------------------------------------- after the scene */
.after { max-width: 1100px; margin: 0 auto; padding: 1rem max(16px, 4vw) 3rem; }
.block { max-width: 680px; margin: 3.5rem auto 0; }
.block.wide { max-width: 1000px; }
.block h2 { font: 700 1.6rem/1.2 var(--serif); margin: 0 0 .8rem; letter-spacing: -.005em; }
.block h2 .anchor, .block h3 .anchor { color: inherit; text-decoration: none; }
.block h3 { font: 700 1.15rem/1.3 var(--serif); margin: 1.8rem 0 .5rem; }
.block p { margin: 0 0 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1.2rem 0 1.4rem; padding: 0; list-style: none; }
.stats li { border-top: 3px solid var(--ink); padding-top: .55rem; font: 1rem/1.4 var(--sans); color: var(--ink-2); }
.stats b { display: block; font: 700 1.9rem/1.1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: .2rem; }

.filter { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 .8rem; font-family: var(--sans); }
.filter label { font-weight: 600; font-size: .95rem; }
.filter input { min-height: 44px; flex: 1 1 220px; max-width: 340px; padding: .5rem .75rem; font: 500 1rem/1.2 var(--sans); color: var(--ink); background: var(--paper); border: 2px solid var(--rule); border-radius: 8px; }
.filter .count { font-size: .9rem; color: var(--ink-3); }
.tablewrap { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; font: .96rem/1.35 var(--sans); font-variant-numeric: tabular-nums; }
.rank caption { text-align: left; font-size: .9rem; color: var(--ink-3); padding-bottom: .5rem; caption-side: top; }
.rank th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .84rem; border-bottom: 2px solid var(--ink); padding: .4rem .45rem; vertical-align: bottom; }
.rank td { border-bottom: 1px solid var(--rule); padding: .5rem .45rem; vertical-align: middle; }
.rank .r { text-align: right; white-space: nowrap; }
.rank td.name b { font-weight: 700; }
.rank td.name small { display: block; color: var(--ink-3); font-size: .84rem; }
.rank .code { font-weight: 700; letter-spacing: .04em; }
.rank tr.me td { background: var(--paper-2); }
.rank tr[hidden] { display: none; }
.barcell { width: 26%; min-width: 110px; }
.bar { display: block; height: 10px; border-radius: 2px; background: var(--bar); min-width: 2px; }
.bar.w0 { width: 0.4%; }
.up { color: var(--up); }
.down { color: var(--down); }

.method { font-size: 1rem; }
.srcs { padding-left: 1.2rem; font-size: .96rem; }
.srcs li { margin-bottom: .55rem; }
.ending { font-size: 1.12rem; }
.related { font: .96rem/1.5 var(--sans); color: var(--ink-2); }
footer { max-width: 680px; margin: 3rem auto 0; padding: 1.4rem max(16px, 4vw) 3rem; border-top: 1px solid var(--rule); font: .9rem/1.5 var(--sans); color: var(--ink-3); }
footer a { color: var(--ink-2); }

/* ---------------------------------------------------------------- no scene (no script, or drawing failed) */
.static-map { display: block; width: 100%; height: auto; max-width: 760px; margin: 0 auto; }
.no-scene .stage { position: relative; top: 0; height: auto; padding: 1rem 0; }
.no-scene .stage #scene { display: none; }
.no-scene .stage .fallback { display: block; padding: 0 16px; }
.no-scene .steps { margin-top: 0; }
.no-scene .step { min-height: 0; padding-top: 1.2rem; padding-bottom: 1.2rem; }
.no-js .stage { position: relative; top: 0; height: auto; padding: 1rem 0; }
.no-js .stage #scene { display: none; }
.no-js .stage .fallback { display: block; padding: 0 16px; }
.no-js .steps { margin-top: 0; }
.no-js .step { min-height: 0; padding-top: 1.2rem; padding-bottom: 1.2rem; }
.no-js .js-only { display: none; }

/* desktop: text column on the left, the map to the right of it */
@media (min-width: 900px), (min-width: 640px) and (orientation: landscape) {
  .step { padding-left: max(24px, 4vw); }
  .card { width: min(430px, 42vw); }
  .hero .card { width: min(560px, 44vw); }
}
/* phones: the card sits at the bottom of each screen, the map above it */
@media (max-width: 899px) and (orientation: portrait), (max-width: 639px) {
  .step { align-items: flex-end; padding: 0 12px 7vh; }
  .step:first-child { align-items: flex-end; padding-top: 0; padding-bottom: 3vh; }
  .card { width: 100%; padding: 1rem 1.05rem .95rem; font-size: 1rem; }
  .hero h1 { font-size: 1.6rem; margin-bottom: .55rem; }
  .card .note { font-size: .86rem; }
  .has-town .you-lead { display: none; }
  .has-town .you-card { margin-bottom: 0; font-size: .9rem; }
  .has-town .you-card .big { font-size: 1.05rem; }
  .has-town .you-note { display: none; }
  .has-town .picker { margin-top: .4rem; }
  .has-town .picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .card h2 { font-size: 1.25rem; }
  .hero .deck { font-size: 1.02rem; }
  .barcell { display: none; }
}
@media (max-width: 639px) and (max-height: 740px) {
  .card { font-size: .95rem; }
  .step:first-child .card { padding-top: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 639px) and (max-height: 700px) {
  .hero .cue { display: none; }
  .hero h1 { font-size: 1.45rem; }
}

.board-link { font-weight: 600; }
.rank td.name b a { color: inherit; }

/* bar widths (generated by build.py; the CSP forbids style attributes) */
.b-OTP{width:100.00%}.b-CLJ{width:21.07%}.b-IAS{width:13.20%}.b-TSR{width:8.58%}.b-SCV{width:4.53%}.b-SBZ{width:4.09%}.b-BBU{width:4.09%}.b-CRA{width:3.40%}.b-BCM{width:2.65%}.b-GHV{width:1.98%}.b-OMR{width:1.51%}.b-TGM{width:0.90%}.b-CND{width:0.70%}.b-BAY{width:0.55%}.b-SUJ{width:0.55%}.b-ARW{width:0.40%}.b-TCE{width:0.40%}
