:root {
  --bg: #0F1012; --surface: rgba(26, 28, 32, .86); --line: #2B2E34; --steel: #5A6273;
  --fg: #F4F4F6; --muted: #8C8F96; --accent: #FFC72C; --cream: #FFF3C4;
  --serif: Fraunces, Georgia, serif; --sans: Inter, system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: 16px; --panel: 380px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
#globe { position: fixed; inset: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { position: fixed; top: var(--gutter); left: var(--gutter); pointer-events: none; }
.top h1 { margin: 0; font: 500 32px/1 var(--serif); letter-spacing: -.01em; }
.tagline { margin: 4px 0 0; font-size: 13px; color: var(--muted); max-width: 300px; }
.live { margin: 6px 0 0; font: 12px var(--mono); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.controls { display: flex; gap: 8px; margin-top: 12px; pointer-events: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { padding: 6px 12px; border-radius: 999px; font: 500 12px var(--mono); color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #111; }
.panel .seg { display: flex; margin-top: 10px; }
.panel .seg button { flex: 1; }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: 500 12px var(--mono); background: var(--surface); }
.lang:hover, .seg button:hover:not([aria-pressed="true"]) { color: var(--fg); }

.panel {
  position: fixed; top: var(--gutter); right: var(--gutter); bottom: var(--gutter); width: var(--panel);
  overflow-y: auto; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); scrollbar-width: thin;
}
.panel h2 { margin: 0 0 4px; font: 500 24px/1.15 var(--serif); }
.panel h3 { margin: 24px 0 10px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.kicker { font: 12px var(--mono); color: var(--accent); margin: 0 0 6px; }
.big { margin: 0; font: 500 56px/1 var(--serif); color: var(--accent); }
.big + .muted { margin: 4px 0 0; }
.back { font: 12px var(--mono); color: var(--muted); padding: 4px 0; margin-bottom: 12px; }
.back:hover { color: var(--fg); }

.stations { display: grid; gap: 8px; margin-top: 16px; }
.station-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.station-btn:hover { border-color: var(--accent); }
.station-btn b { font-weight: 500; }
.station-btn span { font: 13px var(--mono); color: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.facts div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.facts dt { font: 11px var(--mono); color: var(--muted); }
.facts dd { margin: 2px 0 0; font: 500 16px var(--mono); }

.crew { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.crew li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.crew img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--line); }
.crew .name { font-weight: 600; }
.crew .meta { font-size: 13px; color: var(--muted); }
.crew details { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.crew summary { cursor: pointer; color: var(--fg); font-size: 12px; }
.crew a { color: var(--accent); }
.tag { display: inline-block; font: 11px var(--mono); padding: 1px 6px; border-radius: 4px; background: rgba(255, 199, 44, .12); color: var(--accent); margin-top: 4px; }

.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 110px 1fr 34px; gap: 8px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 6px; border-radius: 3px; background: var(--steel); }
.bar i.hl { background: var(--accent); }
.bar span:last-child { font: 12px var(--mono); color: var(--muted); text-align: right; }
.split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 6px 0 4px; }
.split i:first-child { background: var(--steel); }
.split i:last-child { background: var(--accent); }
.legend { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); }
.chart { display: block; width: 100%; height: 90px; }
.axis { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--muted); margin-top: 2px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 11px var(--mono); color: var(--muted); margin-top: 6px; }
.keys i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.facts.two { grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }
.small { font-size: 13px; }
.intro { font-size: 14px; }
.note { font-size: 14px; border-left: 2px solid var(--accent); padding-left: 10px; margin: 16px 0 8px; }
.year { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.year input { flex: 1; accent-color: var(--accent); }
.play { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font: 12px var(--mono); }
.falls { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.falls button { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; text-align: left; font-size: 13px; }
.falls button:hover { border-color: var(--accent); }
.falls b { font-weight: 500; }
.falls span { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; color: #111; font: 500 12px var(--mono); margin-right: 6px; }
.tip { font: 12px var(--sans); background: rgba(15, 16, 18, .92); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; color: var(--fg); }
.authors { color: var(--fg); }
.source { font-size: 12px; color: var(--muted); margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.source a { color: var(--muted); }

.label { font: 500 12px var(--mono); padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #111; white-space: nowrap; cursor: pointer; pointer-events: auto; transform: translate(-50%, -150%); }
.hint { position: fixed; left: var(--gutter); bottom: var(--gutter); margin: 0; font: 12px var(--mono); color: var(--muted); pointer-events: none; }

@media (max-width: 760px) {
  .controls { display: flex; gap: 8px; margin-top: 12px; pointer-events: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { padding: 6px 12px; border-radius: 999px; font: 500 12px var(--mono); color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #111; }
.panel .seg { display: flex; margin-top: 10px; }
.panel .seg button { flex: 1; }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: 500 12px var(--mono); background: var(--surface); }
.lang:hover, .seg button:hover:not([aria-pressed="true"]) { color: var(--fg); }

.panel { top: auto; left: var(--gutter); width: auto; max-height: 46vh; border-radius: 14px 14px 10px 10px; }
  .hint { display: none; }
  .top h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
