:root {
  --bg: #0b1014;
  --panel: #111a20;
  --panel-2: #152129;
  --line: #22323b;
  --ink: #dfe6e8;
  --muted: #93a6b1;
  --faint: #5d717c;
  --mint: #61e5cf;
  --mint-2: #8dc7b8;
  --amber: #f2b35b;
  --violet: #a996f5;
  --slate: #8aa0ad;
  --coral: #ff7a66;
  --blue: #6c9cff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  color-scheme: dark;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--mint); text-decoration: none; }
a:hover { color: #9fe4d8; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; }
h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; }
h3 { font-size: 16px; margin-bottom: 6px; color: var(--ink); }
p { margin: 0 0 12px; color: #c4d0d5; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
header.hero { position: relative; min-height: 640px; height: 86vh; max-height: 900px; overflow: hidden;
  border-bottom: 1px solid var(--line); background: #070b0e; display: flex; align-items: center; }
#heroMap { position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 11, 14, 0.94) 0%, rgba(7, 11, 14, 0.78) 38%, rgba(7, 11, 14, 0.15) 70%, rgba(7, 11, 14, 0) 100%),
              linear-gradient(0deg, rgba(11, 16, 20, 1) 0%, rgba(11, 16, 20, 0) 22%); }
.hero-inner { position: relative; z-index: 2; width: 100%; pointer-events: none; }
.hero-inner .lede { max-width: 56ch; }
.hero-clock { margin-top: 22px; font-family: "Space Grotesk", Inter, sans-serif; font-size: 44px; color: #fff; display: flex; align-items: baseline; gap: 14px; }
.hero-clock .muted { font-size: 15px; font-family: Inter, sans-serif; }
.hero-caption { position: absolute; right: 16px; top: 12px; z-index: 2; font-size: 11px; color: var(--faint); }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint-2); margin-bottom: 14px; }
.lede { font-size: 18px; color: #c9d5da; margin-top: 16px; max-width: 70ch; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: -54px 0 26px; position: relative; z-index: 3; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpi .v { font-family: "Space Grotesk", Inter, sans-serif; font-size: 30px; font-weight: 600; color: #fff; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .c { font-size: 12px; color: var(--faint); margin-top: 4px; }
nav.toc { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 20, 0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); }
nav.toc .wrap { display: flex; gap: 18px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; }
nav.toc a { color: var(--muted); font-size: 13px; white-space: nowrap; }
nav.toc a:hover { color: var(--ink); }
section { padding: 44px 0 20px; border-bottom: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card p:last-child { margin-bottom: 0; }
.note { font-size: 13px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; margin-top: 10px; }

/* replay */
.replay { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin-top: 16px; }
.mapbox { height: 600px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; background: #0d1418; }
.mapwrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.mapwrap.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.maptag { position: absolute; top: 10px; left: 10px; z-index: 5; background: rgba(11, 16, 20, 0.85); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 9px; font-size: 12px; color: var(--ink); font-weight: 600; }
.maptag:empty { display: none; }
.side { display: flex; flex-direction: column; gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: inherit; font-size: 13px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 10px; cursor: pointer; }
.seg button.on { color: #06221d; background: var(--mint); border-color: var(--mint); font-weight: 600; }
.controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.controls button.play { font: inherit; width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--ink); cursor: pointer; }
.controls input[type=range] { flex: 1; accent-color: var(--mint); }
.clock { font-family: "Space Grotesk", Inter, sans-serif; font-size: 22px; color: #fff; min-width: 70px; }
.stat { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed #1c2a32; }
.stat b { color: #fff; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.speed { font-size: 12px; color: var(--muted); }
.speed select { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px; }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: Inter, sans-serif; }
.chart .axis line, .chart .axis path { stroke: #2a3b45; }
.chart .grid line { stroke: #1a272e; }
.chart .lab { fill: #dfe6e8; font-size: 12px; }
.tip { position: fixed; pointer-events: none; z-index: 50; background: #0e171c; border: 1px solid #2f4450; border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); display: none; max-width: 280px; }
.tip b { color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
th { color: var(--muted); font-weight: 500; }
tr.hl td { color: #fff; }
tr.hl td:first-child { color: var(--mint); }
.tablewrap { overflow-x: auto; }
.pill { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.mini { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.mini span { width: 16px; background: var(--mint); border-radius: 3px 3px 0 0; opacity: 0.85; }
footer { padding: 30px 0 60px; color: var(--faint); font-size: 13px; }
.maplegend { position: absolute; left: 10px; bottom: 10px; background: rgba(11, 16, 20, 0.85); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--muted); z-index: 5; }
.ramp { width: 160px; height: 8px; border-radius: 4px; margin: 4px 0 2px;
  background: linear-gradient(90deg, #ff7a66, #f2b35b 25%, #5a7480 50%, #6c9cff 80%, #b28dff); }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .replay { grid-template-columns: minmax(0, 1fr); }
  .mapbox { height: 440px; }
  .mapwrap.split { grid-template-columns: minmax(0, 1fr); }
  .mapwrap.split .mapbox { height: 300px; }
  .facts, .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tidebox { grid-template-columns: minmax(0, 1fr); }
  header.hero { height: auto; min-height: 0; padding: 60px 0 90px; }
  .hero-shade { background: rgba(7, 11, 14, 0.75); }
}

.coral { color: var(--coral); font-weight: 600; }
.blue { color: var(--blue); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.fact { border-left: 2px solid var(--mint); padding: 4px 0 4px 12px; }
.fact b { display: block; font-family: "Space Grotesk", Inter, sans-serif; font-size: 28px; color: #fff; font-weight: 600; }
.fact span { font-size: 13px; color: var(--muted); }
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.why .num { font-family: "Space Grotesk", Inter, sans-serif; color: var(--mint); font-size: 13px; margin-bottom: 8px; letter-spacing: 0.1em; }
.tidebox { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin-top: 14px; }
.tidebox .mapbox { height: 560px; }
.clock.big { font-size: 40px; margin-bottom: 6px; }
.trunc { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.daytabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.daytab { font: inherit; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px;
  color: var(--muted); cursor: pointer; min-width: 170px; }
.daytab b { display: block; color: var(--ink); font-size: 13px; }
.daytab span { font-size: 12px; }
.daytab.on { border-color: var(--mint); background: #10231f; }
.daytab.on b { color: var(--mint); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.toggles input { accent-color: var(--mint); vertical-align: -2px; }
.maplegend i.ring { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #fff4c2; margin-right: 5px; vertical-align: -1px; }
.maplegend i.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff; margin: 0 5px 0 10px; }
.maplegend i.streak { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin: 0 5px 0 10px; vertical-align: 2px;
  background: linear-gradient(90deg, rgba(97, 229, 207, 0), rgba(97, 229, 207, 0.9)); }
.race .row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 48px; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; cursor: pointer; }
.race .bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--slate); transition: width 0.12s linear; }
.race .row.on span:first-child { color: #fff; font-weight: 600; }
.race .row b { text-align: right; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.race .track { background: #0d161b; border-radius: 0 4px 4px 0; }
.stat b { font-variant-numeric: tabular-nums; }
.load { height: 8px; border-radius: 4px; background: #0d161b; overflow: hidden; margin: 6px 0 2px; }
.load > div { height: 100%; background: var(--mint); transition: width 0.2s; }
.steps { display: flex; gap: 4px; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: #1c2a32; cursor: pointer; }
.steps span.on { background: var(--mint); }
.steps span.done { background: #2f6f65; }
.maplegend-inline { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.maplegend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.tourlist { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.tourlist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #1c2a32; align-items: baseline; }
.tourlist li .n { color: #06221d; background: var(--mint); border-radius: 50%; width: 18px; height: 18px; font-size: 11px; text-align: center; line-height: 18px; font-weight: 600; }
.tourlist li.lift .n { background: var(--blue); color: #061022; }
.tourlist li.drop .n { background: var(--coral); color: #220a06; }
.tourlist li.now { background: rgba(97, 229, 207, 0.06); }
.knobs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; }
.knobs div { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; font-size: 11px; color: var(--muted); }
.knobs b { display: block; font-size: 17px; color: #fff; font-family: "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.seg-btn { font: inherit; font-size: 12px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 10px; cursor: pointer; margin-top: 10px; }
.seg-btn:hover { color: var(--ink); }
[hidden] { display: none !important; }
