:root {
  --paper: #f5f5f2;
  --ink: #222222;
  --muted: #4a4a47;
  --faint: #6b6b67;
  --rule: #c9cac4;
  --recovered: #1f3b73;
  --missed: #c8553d;
  --field: #9a9a9a;
  --theirs: #b4b4ae;
  --near: #d9dad5;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--recovered); }
button, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 28px; padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.top a { font-family: var(--mono); font-size: 14px; padding: 10px 0; display: inline-block; }
.top .brand { font-weight: 500; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; }
.regions { display: flex; border: 1px solid var(--ink); }
.regions button { font: 500 13px var(--mono); padding: 6px 12px; min-height: 34px; border: 0; background: none; cursor: pointer; }
.regions button + button { border-left: 1px solid var(--ink); }
.regions button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--recovered); outline-offset: 2px; }

h1 { margin: 0; font-size: clamp(40px, 6vw, 80px); line-height: 0.95; font-weight: 750; letter-spacing: -0.03em; }
h2 { margin: 0 0 28px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
h3 { margin: 0 0 10px; font-size: 19px; font-weight: 650; }
.intro { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: flex-end; padding: 48px 0 32px; }
.intro h1 { flex: 1 1 340px; }
.lede { flex: 2 1 460px; margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); }
.lede strong { color: var(--ink); font-weight: 600; }

.figure { margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 16px 0 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 26px; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.age-key { gap: 6px 14px !important; flex-wrap: wrap; }
.age-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.stage { border: 1px solid var(--ink); }
.view { position: relative; height: clamp(380px, 54vh, 600px); min-width: 0; overflow: hidden; cursor: grab; touch-action: none; }
.view:active { cursor: grabbing; }
.view.pointing { cursor: pointer; }
.view canvas { display: block; width: 100%; height: 100%; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.labels span { position: absolute; left: 0; top: 0; font: 12px/1 var(--mono); color: var(--ink); white-space: nowrap; will-change: transform;
  text-shadow: 0 0 2px var(--paper), 0 0 2px var(--paper), 0 0 4px var(--paper); }
.labels .scale { color: var(--faint); font-size: 11px; }
.labels .named { font-weight: 500; }
.zoom { position: absolute; right: 10px; top: 8px; display: flex; border: 1px solid var(--ink); background: var(--paper); }
.zoom button { font: 500 12px var(--mono); padding: 4px 10px; min-height: 30px; border: 0; background: none; cursor: pointer; }
.zoom button + button { border-left: 1px solid var(--ink); }
.zoom button:hover { background: var(--ink); color: var(--paper); }
.tour { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 18px; border-top: 1px solid var(--ink); background: #ecece7; }
.tour p { flex: 1 1 420px; margin: 0; font-size: 16px; line-height: 1.5; }
.tour-step { font-size: 12px; color: var(--faint); flex: none; }
.tour-buttons { display: flex; gap: 8px; flex: none; }
.galaxy { flex: none; width: 168px; height: 178px; align-self: flex-end; margin-bottom: -6px; }
.galaxy .disc { fill: var(--rule); opacity: 0.45; }
.galaxy .centre { stroke: var(--ink); stroke-width: 0.25; }
.galaxy .here { fill: var(--recovered); }
.galaxy .other { fill: var(--faint); opacity: 0.45; }
.galaxy .sun { fill: var(--ink); }
.galaxy text { font: 2.1px var(--mono); fill: var(--ink); }
.galaxy .title { fill: var(--faint); }
.hint { position: absolute; left: 12px; top: 10px; margin: 0; font-size: 11px; color: var(--faint); pointer-events: none; }

.card { border-top: 1px solid var(--ink); padding: 18px 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 48px; min-height: 345px; }
.card .info { flex: 1 1 340px; max-width: 600px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card .plot { flex: 0 1 620px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card h3 { margin: 0; font-size: 26px; line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; }
.card .alias { display: block; margin-top: 4px; font: 12px var(--mono); color: var(--faint); }
.card .kicker { margin: 0; font: 500 12px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.card .kicker.rec { color: var(--recovered); }
.card .kicker.miss { color: var(--missed); }
.card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card .close { border: 1px solid var(--ink); background: none; width: 30px; height: 30px; line-height: 1; cursor: pointer; flex: none; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font: 13px var(--mono); }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; }
.card .meta { font: 13px var(--mono); color: var(--ink); }
.scores { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.scores div { padding: 8px 0 10px; display: flex; flex-direction: column; gap: 2px; }
.scores div + div { border-left: 1px solid var(--ink); padding-left: 14px; }
.scores span { font: 12px var(--mono); color: var(--faint); }
.scores b { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.cmd { display: block; width: 100%; height: auto; overflow: visible; }
.cmd .axis { stroke: var(--ink); stroke-width: 1; }
.cmd text { font: 10px var(--mono); fill: var(--muted); }
.cmd .both { fill: var(--recovered); }
.cmd .ours { fill: var(--missed); }
.cmd .theirs { fill: var(--theirs); }
.cmd .near { fill: var(--near); }
.cmd .iso-ours, .cmd .iso-theirs { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.cmd .iso-theirs { stroke: var(--faint); stroke-dasharray: 4 3; }
.cmd-key .iso-key { display: inline-block; width: 14px; border-top: 1.5px solid var(--ink); }
.cmd-key .iso-key.theirs { border-top: 1.5px dashed var(--faint); }
.plots { display: flex; flex-wrap: wrap; gap: 16px; }
.plots figure { margin: 0; flex: 1 1 220px; max-width: 300px; }
.plots figcaption { font: 12px var(--mono); color: var(--faint); margin-top: 2px; }
.cmd-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 12px var(--mono); color: var(--muted); }
.cmd-key span { display: inline-flex; align-items: center; gap: 6px; }
.cmd-key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.go { align-self: flex-start; border: 1px solid var(--ink); background: none; padding: 8px 14px; min-height: 38px; font: 500 13px var(--mono); cursor: pointer; }
.go:hover { background: var(--ink); color: var(--paper); }

.time { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 18px; border-top: 1px solid var(--ink); font-family: var(--mono); font-size: 13px; }
.clock { display: inline-flex; align-items: center; gap: 10px; flex: 1 1 260px; }
.clock input { flex: 1; accent-color: var(--ink); min-height: 36px; margin: 0; }
#myr-out { min-width: 8.5em; }
#run-out b { font-weight: 500; }
#run-out { min-width: 64ch; }  /* the slider keeps its length as the text changes */
.clock input:disabled { opacity: 0.4; }
.more:disabled { opacity: 0.4; cursor: default; }
.more:disabled:hover { background: none; color: inherit; }
.time-note { flex: 1 1 100%; margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 900px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 14px; font-size: 14px; }
.find { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; }
.find select { font: 13px var(--mono); min-height: 36px; padding: 4px 8px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); max-width: 260px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; cursor: pointer; min-height: 36px; }
.toggle input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.field-status { margin-left: auto; font-size: 13px; color: var(--muted); }
.more { border: 1px solid var(--ink); background: none; padding: 6px 12px; min-height: 36px; font: 500 13px var(--mono); cursor: pointer; }
.more:hover { background: var(--ink); color: var(--paper); }

section { padding: 56px 0; }
.rates-lede { margin: 0 0 18px; max-width: 760px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.rates-key { display: flex; gap: 8px 22px; font: 13px var(--mono); color: var(--muted); margin-bottom: 10px; }
.rates-key span { display: inline-flex; align-items: center; gap: 8px; }
.rates-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.rates-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 48px; }
.rates-charts figure { margin: 0; border-top: 1px solid var(--ink); padding-top: 12px; }
.rates-charts figcaption { font-size: 17px; font-weight: 650; margin-bottom: 8px; }
.rates-chart { display: block; width: 100%; height: auto; }
.rates-chart text { font: 11px var(--mono); fill: var(--muted); }
.rates-chart .value { fill: var(--ink); }
.rates-chart .grid { stroke: var(--rule); stroke-width: 1; }
.sweep { margin-top: 44px; }
.sweep h3 { font-size: 22px; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 40px; }
.notes > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.notes p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }

footer { border-top: 1px solid var(--ink); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 36px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .view { height: clamp(360px, 62vh, 620px); }
  .zoom { top: auto; right: auto; bottom: 10px; left: 10px; }  /* the hint wraps over the top; the Sun sits bottom right */
  .card { min-height: 0; }
  .field-status { margin-left: 0; }
  #run-out { min-width: 0; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .intro { padding: 32px 0 24px; }
  .lede { font-size: 16px; }
  .find { flex-wrap: wrap; }
  .find select { max-width: 100%; }
}
