/* CHRONO (prototype): when is this map from? The Dean's Daily look in amber-bronze. */
:root {
  --paper: #edeae1; --card: #fbfaf6; --ink: #121212; --ink-2: #57554e; --rule: #121212; --soft: #d6d1c4;
  --accent: #b5651d; --accent-ink: #ffffff; --ocean: #c9dbe6; --land: #e6dfcd; --coast: #8a8270; --good: #1f8a4c;
  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0e10; --card: #16181c; --ink: #f1eee6; --ink-2: #a19f97; --rule: #f1eee6; --soft: #2e3036;
    --accent: #f0a050; --accent-ink: #0d0e10; --ocean: #1b2a36; --land: #3a372f; --coast: #8a8270; --good: #4ade80; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d0e10; --card: #16181c; --ink: #f1eee6; --ink-2: #a19f97; --rule: #f1eee6; --soft: #2e3036;
  --accent: #f0a050; --accent-ink: #0d0e10; --ocean: #1b2a36; --land: #3a372f; --coast: #8a8270; --good: #4ade80; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { touch-action: manipulation; }
body { background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); }
.ch-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 2px solid var(--rule); background: var(--card); position: sticky; top: 0; z-index: 5; }
.dd-mark { font: 900 18px/1 var(--display); background: var(--ink); color: var(--card); padding: 6px 7px; text-decoration: none; }
.ch-top .title { font: 900 26px/1 var(--display); text-transform: uppercase; }
.ch-top .step { color: var(--ink-2); font-weight: 700; font-size: 13px; }
.ch-top .status { margin-left: auto; font: 900 24px/1 var(--display); }
.ch { max-width: 900px; margin: 0 auto; padding: 14px 16px 40px; }
.card { background: var(--card); border: 2px solid var(--rule); box-shadow: 6px 6px 0 var(--accent); padding: 18px; margin-right: 6px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 800; font-size: 13px; }
.big { font: 900 clamp(48px, 12vw, 84px)/.9 var(--display); text-transform: uppercase; margin: 0 0 10px; }
.mid { font: 900 32px/1 var(--display); text-transform: uppercase; margin: 0 0 8px; }
.lede { margin: 0 0 14px; color: var(--ink-2); }
.muted { color: var(--ink-2); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 2px solid var(--rule); background: var(--card); color: var(--ink); font: 800 14px var(--sans); text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.btn.primary { background: var(--ink); color: var(--card); box-shadow: 4px 4px 0 var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.wide { width: 100%; }
.q { font: 900 24px/1.05 var(--display); text-transform: uppercase; margin: 0 0 10px; }
.map { width: 100%; aspect-ratio: 16 / 10; background: var(--ocean); border: 2px solid var(--rule); display: block; }
@media (max-width: 600px) { .map { aspect-ratio: 4 / 3.4; } }
.map .base { fill: var(--land); stroke: none; }
.map .place { stroke: rgba(255, 255, 255, .85); stroke-width: .7; stroke-linejoin: round; }
.map .shore { fill: none; stroke: var(--coast); stroke-width: .8; stroke-linejoin: round; }
.map .coast { fill: var(--land); stroke: var(--coast); stroke-width: .8; }
.map .lbl { font: 700 11px var(--sans); fill: #121212; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.map .lbl.deep { font: 900 15px var(--display); letter-spacing: .06em; text-transform: uppercase; }
.guess { margin-top: 14px; }
.readout { font: 900 clamp(34px, 9vw, 52px)/1 var(--display); text-align: center; margin: 4px 0 8px; }
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row input { flex: 1; accent-color: var(--accent); height: 34px; }
.nudge { width: 44px; min-height: 44px; padding: 0; font-size: 18px; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin: 2px 52px 12px; }
.result { margin-top: 14px; }
.result .pts { font: 900 44px/1 var(--display); color: var(--accent); }
.timeline { position: relative; height: 34px; margin: 12px 0 4px; border-bottom: 2px solid var(--rule); }
.timeline i { position: absolute; bottom: 0; width: 3px; height: 26px; transform: translateX(-1.5px); }
.timeline i.ans { background: var(--good); width: 5px; transform: translateX(-2.5px); }
.timeline i.you { background: var(--ink); }
.legend { display: flex; gap: 14px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.legend .a { color: var(--good); }
.fact { margin: 10px 0 0; font-weight: 600; }
.sum { list-style: none; padding: 0; margin: 12px 0; border-top: 2px solid var(--rule); }
.sum li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--soft); }
.sum b { color: var(--accent); }
.credit { margin-top: 18px; font-size: 12px; color: var(--ink-2); }
.credit a { color: inherit; }

/* the Timeline: every era, filled in as you unlock it */
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tl-rank { font: 800 13px var(--sans); color: var(--accent); }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--soft); }
.tl-era { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) 70px; align-items: center; gap: 10px; padding: 6px 0; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--soft); background: var(--card); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; z-index: 1; }
.tl-era.some .tl-dot { border-color: var(--era); }
.tl-era.on .tl-dot { background: var(--era); border-color: var(--era); }
.tl-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.tl-name small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.tl-era:not(.on):not(.some) .tl-name { color: var(--ink-2); }
.tl-got { font-size: 12px; font-weight: 800; color: var(--era); text-align: right; }
.era-bar { display: block; height: 8px; background: var(--soft); overflow: hidden; }
.era-bar i { display: block; height: 100%; background: var(--era); }
.era-line { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 2px solid var(--era); font-size: 14px; }
.era-line .muted { font-size: 13px; }

/* the names on the map, as a list you can read on a phone */
/* the end-of-set timeline */
.sum-wrap { margin: 12px 0 4px; }
.sum-line { width: 100%; height: auto; display: block; overflow: visible; }
.sl-axis { stroke: var(--rule); stroke-width: 2; }
.sl-link { stroke-width: 1.5; stroke-dasharray: 3 2; }
.sl-ans { stroke: var(--card); stroke-width: 2; }
.sl-tick { font: 600 9px var(--sans); fill: var(--ink-2); }
.sl-num { font: 800 10px var(--sans); fill: var(--ink); }
/* the archive list */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px; }
.sum.arch li { align-items: center; padding: 10px 0; }
/* phones: the round fits on the screen without scrolling (less room under the card), and the page doesn't bounce */
@media (max-width: 600px) { .ch { padding-bottom: 12px; } }
html { overscroll-behavior-y: none; }

/* ---- Chrono's personality: a dig through time ---- */
.ch-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ch-hero .lede { color: var(--ink); font-size: 17px; max-width: 26ch; }
/* the hourglass turns over every 6 seconds */
.hg { width: 64px; flex: none; color: var(--accent); }
.hg svg { width: 100%; display: block; animation: hg-turn 6s ease-in-out infinite; transform-origin: 50% 50%; }
.hg-frame { stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.hg-glass { fill: color-mix(in srgb, var(--accent) 10%, transparent); stroke: color-mix(in srgb, var(--ink) 60%, transparent); stroke-width: 2; }
.hg-top, .hg-bot { fill: var(--accent); }
.hg-stream { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 2 2; animation: hg-sand .5s linear infinite; }
@keyframes hg-turn { 0%, 80% { transform: rotate(0); } 95%, 100% { transform: rotate(180deg); } }
@keyframes hg-sand { to { stroke-dashoffset: -4; } }
/* today's five maps */
.caps { display: flex; gap: 8px; margin: 4px 0 16px; }
.cap { flex: 1; min-width: 0; height: 40px; display: grid; place-items: center; border-radius: 999px; font: 800 15px var(--sans); background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); }
.cap.great { background: var(--accent); color: var(--bg, #1f1e1b); }
.cap.good { background: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); }
.cap.miss { background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink); }
/* the dig: stacked rock layers with wavy edges, bare rock until you start digging */
.dig { list-style: none; margin: 0; padding: 0; border-radius: 14px; overflow: hidden; }
.layer { --rock: color-mix(in srgb, var(--ink) 9%, var(--card)); position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; margin-top: -6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--era) 55%, var(--card)) var(--fill), var(--rock) var(--fill));
  clip-path: polygon(0 6px, 25% calc(3px + var(--tilt) * 2px), 50% 7px, 75% calc(2px - var(--tilt) * 2px), 100% 5px, 100% 100%, 0 100%); }
.layer:first-child { margin-top: 0; clip-path: none; }
.layer:nth-child(odd):not(.on):not(.some) { --rock: color-mix(in srgb, var(--ink) 12%, var(--card)); }
.layer.on { background: var(--era); color: #fff; }
.layer-name { font-weight: 800; font-size: 14px; line-height: 1.2; }
.layer-name small { display: block; font-weight: 500; font-size: 12px; opacity: .75; }
.layer:not(.on):not(.some) .layer-name { color: var(--ink-2); }
.layer-got { font: 800 12px var(--sans); background: rgba(255, 255, 255, .22); padding: 3px 9px; border-radius: 999px; }
.layer-pts { font: 700 12px var(--sans); color: var(--ink-2); }
.glyph { width: 30px; height: 30px; display: grid; place-items: center; --bg: var(--era); }
.glyph svg { width: 24px; height: 24px; fill: currentColor; }
.layer.on .glyph { color: #fff; }
.glyph.locked { color: color-mix(in srgb, var(--ink) 30%, transparent); --bg: var(--rock); }
.layer.some .glyph.locked { color: color-mix(in srgb, var(--era) 80%, var(--ink)); }
@media (prefers-reduced-motion: reduce) { .hg svg, .hg-stream { animation: none; } }
/* the end of a set: today's finds as layers of rock */
.finds-h { font: 900 22px/1 var(--display); text-transform: uppercase; margin: 18px 0 8px; }
.finds { list-style: none; margin: 0 0 16px; padding: 0; border-radius: 14px; overflow: hidden; }
.find { --bg: var(--era); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; margin-top: -6px; background: var(--era); color: #fff;
  clip-path: polygon(0 6px, 30% 2px, 60% 7px, 100% 3px, 100% 100%, 0 100%); }
.find:first-child { margin-top: 0; clip-path: none; }
.find .glyph { color: #fff; }
.find-txt { min-width: 0; }
.find-txt b { display: block; font-size: 16px; }
.find-txt span { font-size: 13px; opacity: .85; }
.find-pts { font: 900 22px/1 var(--display); background: rgba(0, 0, 0, .18); padding: 6px 10px; border-radius: 999px; }
.find.miss { background: color-mix(in srgb, var(--era) 45%, var(--card)); color: var(--ink); }
.find.miss .glyph { color: var(--ink); }
/* Endless lives (three X's) sit at the end of the line */
.ch-lives-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
