/* Raincheck NYC program replay. Same dark surface and tokens as dashboard.css. */
:root {
  color-scheme: dark;
  --page: #0d0d0d; --s1: #1a1a19; --s2: #232322; --s3: #2c2c2a;
  --ink: #ffffff; --ink2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.1); --border2: rgba(255,255,255,.18);
  --blue: #3987e5; --l1: #199e70; --l2: #e3b341; --l3: #e66767;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }

.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--s1); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; }
.brand img { width: 26px; height: 26px; } .brand span { color: var(--blue); }
.topbar h1 { font-size: 15px; font-weight: 600; margin: 0; color: var(--ink2); }
.spacer { flex: 1; } .link { color: var(--ink2); font-size: 13px; }

.controls { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end;
  padding: 10px 18px; background: rgba(26,26,25,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px); }
.ctl { display: flex; flex-direction: column; gap: 4px; } .ctl.grow { flex: 1; min-width: 320px; }
.ctl > .seg, .ctl > .ghost { align-self: flex-start; }
.ctl:has(#c-shuffle) { display: grid; grid-template-columns: auto auto; column-gap: 6px; }
.ctl:has(#c-shuffle) .lab { grid-column: 1 / -1; }
.lab { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
#c-date { font-size: 13px; color: var(--ink); font-weight: 700; letter-spacing: 0; text-transform: none; }
.seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 6px 11px; font-size: 13px; cursor: pointer; color: var(--ink2); border-right: 1px solid var(--border); white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--blue); color: #fff; font-weight: 600; }
.ghost, .primary, select { border: 1px solid var(--border2); background: var(--s2); border-radius: 8px; padding: 6px 11px; font-size: 13px; cursor: pointer; }
.primary { background: var(--blue); border-color: var(--blue); font-weight: 700; min-width: 68px; }
.play { display: flex; gap: 8px; align-items: center; } .play input[type=range] { flex: 1; min-width: 120px; accent-color: var(--blue); }

main { padding: 14px 18px 40px; display: flex; flex-direction: column; gap: 14px; max-width: 1760px; margin: 0 auto; }
.top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr); gap: 14px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1100px) { .top, .two { grid-template-columns: minmax(0, 1fr); } }

.scenewrap { position: relative; min-height: 640px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0a0f14; }
#scene { position: absolute; inset: 0; } #scene canvas { display: block; }
.overlay { position: absolute; background: rgba(26,26,25,.86); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 12px; color: var(--ink2); }
.legend { left: 12px; top: 12px; max-width: 290px; } .legend .row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; }
.dot.l1 { background: var(--l1); } .dot.l2 { background: var(--l2); width: 13px; height: 13px; } .dot.l3 { background: var(--l3); width: 15px; height: 15px; }
.dot.off { background: #8a8f94; opacity: .55; width: 7px; height: 7px; margin: 0 2px; }
.bar { width: 5px; height: 15px; background: var(--blue); border-radius: 2px; margin: 0 3px; flex: none; display: inline-block; }
.view { right: 12px; top: 12px; display: flex; flex-direction: column; gap: 7px; }
.view label { display: flex; align-items: center; gap: 8px; } .view input { flex: 1; accent-color: var(--blue); min-width: 90px; }
.hint { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--muted); pointer-events: none; }
.tip { position: absolute; display: none; pointer-events: none; z-index: 5; background: #111; border: 1px solid var(--border2); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: var(--ink2); max-width: 280px; line-height: 1.45; }
.tip b { color: var(--ink); }

.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card { background: var(--s1); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.card h3 { margin: 0 0 8px; font-size: 13.5px; font-weight: 650; } .card h3 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--s1); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.kpi .v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; } .kpi .k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpi .v i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }

.hbar { display: grid; grid-template-columns: 84px 1fr 92px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink2); margin: 5px 0; }
.hbar .track { height: 16px; background: var(--s3); border-radius: 4px; position: relative; overflow: hidden; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.hbar .n { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart { position: relative; } .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .ctip { position: absolute; display: none; pointer-events: none; background: #111; border: 1px solid var(--border2); border-radius: 7px; padding: 6px 8px; font-size: 12px; color: var(--ink2); white-space: nowrap; z-index: 3; }
.chart .ctip b { color: var(--ink); }
.lgd { display: flex; gap: 14px; font-size: 12px; color: var(--ink2); margin-bottom: 2px; } .lgd i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }

#math { font-size: 13.5px; color: var(--ink2); line-height: 1.55; } #math b { color: var(--ink); }
#math .eq { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--s2); border-radius: 8px; padding: 9px 11px; margin: 8px 0; white-space: pre-wrap; color: var(--ink); }
.muted { color: var(--muted); }

.tablewrap { max-height: 460px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 9px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
thead th { position: sticky; top: 0; background: var(--s2); color: var(--ink2); font-weight: 600; z-index: 1; cursor: default; }
tfoot td { position: sticky; bottom: 0; background: var(--s2); font-weight: 700; color: var(--ink); border-top: 1px solid var(--border2); }
tbody tr { cursor: pointer; color: var(--ink2); } tbody tr:hover { background: var(--s2); } tbody tr.sel { background: #17324f; color: var(--ink); }
tbody tr.dec { color: var(--muted); }
td .dot { margin-right: 6px; vertical-align: middle; width: 9px !important; height: 9px !important; }

.notes { font-size: 13.5px; line-height: 1.6; color: var(--ink2); } .notes h3 { font-size: 15px; } .notes b { color: var(--ink); }
.notes ul { margin: 6px 0 12px; padding-left: 20px; } .notes table { width: auto; margin: 6px 0 12px; } .notes td, .notes th { white-space: normal; }
.zoom { display: flex; gap: 6px; align-items: center; } .zoom .ghost { padding: 2px 10px; font-size: 15px; }
.tabs { display: inline-flex; border: 1px solid var(--border2); border-radius: 8px; overflow: hidden; }
.tabs a { padding: 5px 12px; font-size: 13px; color: var(--ink2); text-decoration: none; border-right: 1px solid var(--border); }
.tabs a:last-child { border-right: 0; } .tabs a[aria-current="page"] { background: var(--s3); color: var(--ink); font-weight: 600; }
.hbar.band { grid-template-columns: 96px 1fr 150px; }
.ramp { height: 10px; border-radius: 3px; margin-top: 6px; background: linear-gradient(90deg, #184f95 0%, #256abf 25%, #3987e5 50%, #86b6ef 75%, #cde2fb 100%); }
.rampt { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ring { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--l1); background: #0d0d0d; flex: none; display: inline-block; }
body[data-view="map"] .scenewrap { background: #0d0d0d; } .maplibregl-ctrl-attrib { font-size: 10px; }
#boro th:nth-child(2), #boro td:nth-child(2) { display: none; }
