:root {
  --bg: #eef1f2; --panel: #fff; --panel2: #f6f8f9; --ink: #13232b; --muted: #55666e; --line: #d3dbde;
  --sea: #0e6a74; --sea-ink: #fff; --sea-soft: #dcecee; --ok: #2f7a4d; --ok-soft: #dff0e5;
  --warn: #a86a0a; --warn-soft: #f6ead2; --bad: #a0383f; --bad-soft: #f4e1e1; --shadow: 0 1px 2px rgba(19,35,43,.06), 0 6px 20px rgba(19,35,43,.06);
  --c1: #0e6a74; --c2: #c8662f; --c3: #5a6f9a; --c4: #d9a43a; --c5: #3f8f7a; --c6: #9a6fa8; --c7: #8a3b4f; --c8: #6f8f5a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1a20; --panel: #16262e; --panel2: #1b2f38; --ink: #e6eef0; --muted: #9db0b7; --line: #29404a;
    --sea: #4fb8c4; --sea-ink: #0b1a1f; --sea-soft: #123840; --ok: #6cc590; --ok-soft: #173325; --warn: #e0a93f; --warn-soft: #3a2d12; --bad: #e08a8a; --bad-soft: #3a1f1f; --shadow: none; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spacer { flex: 1; }
h1, h2, .serif, .big { font-family: Charter, "Iowan Old Style", Georgia, serif; }
h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.12; margin: 0 0 8px; letter-spacing: -.3px; text-wrap: balance; }
h2 { font-size: 22px; margin: 0 0 6px; } h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 12px; max-width: 72ch; }
a, .link { color: var(--sea); } .muted { color: var(--muted); } .small { font-size: 14px; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 3px; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: Charter, Georgia, serif; font-size: 22px; font-weight: 700; text-decoration: none; color: var(--ink); }
main { padding: 22px 16px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; } .g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.eyebrow { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sea); font-weight: 700; margin-bottom: 4px; }
.tile .big { font-size: 30px; line-height: 1.1; margin: 2px 0; } .tile .sub { font-size: 13px; color: var(--muted); }
.up { color: var(--ok); } .down { color: var(--bad); }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--sea); background: var(--sea); color: var(--sea-ink); padding: 9px 18px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--sea); } .btn.small { padding: 5px 12px; font-size: 14px; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); } .field input { width: 130px; }
.field.wide input { width: 180px; }
.tbl { overflow-x: auto; } table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td input { width: 88px; padding: 4px 6px; text-align: right; } td input[type="date"] { width: 138px; text-align: left; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.wbar { display: inline-block; height: 8px; background: var(--sea); border-radius: 4px; vertical-align: middle; min-width: 3px; }
.attn { display: grid; gap: 10px; } .item { border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; padding: 10px 14px; background: var(--panel2); }
.item.ok { border-left-color: var(--ok); } .item.warn { border-left-color: var(--warn); } .item.bad { border-left-color: var(--bad); }
.item b { display: block; } .item details { margin-top: 4px; font-size: 14px; color: var(--muted); } .item summary { cursor: pointer; color: var(--sea); }
.hero { display: grid; gap: 4px; margin-bottom: 14px; }
.banner { background: var(--warn-soft); border-left: 4px solid var(--warn); border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 16px 0; }
.steps > div { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--panel); } .steps b { color: var(--sea); display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; }
.donut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .donut svg { width: 150px; height: 150px; flex: none; }
.donut ul { list-style: none; margin: 0; padding: 0; font-size: 13px; flex: 1; min-width: 150px; } .donut li { display: flex; gap: 8px; align-items: center; padding: 2px 0; } .donut li i { width: 10px; height: 10px; border-radius: 2px; }
.chart { width: 100%; height: auto; } .chart .grid { stroke: var(--line); } .chart .ax { font-size: 11px; fill: var(--muted); }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; } .chart .l1 { stroke: var(--sea); } .chart .l2 { stroke: #8a979d; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); } .legend i { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.legal { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 50px; font-size: 12.5px; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,18,24,.55); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 14vh 12px; }
.modal-backdrop.show { display: flex; } .modal { background: var(--panel); border-radius: 10px; max-width: 440px; width: 100%; padding: 22px 26px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 12px 0; } .bar i { display: block; height: 100%; width: 40%; background: var(--sea); border-radius: 4px; animation: slide 1.2s ease-in-out infinite; }
.bar.err i { animation: none; width: 100%; background: var(--bad); }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bar i { animation: none; width: 100%; opacity: .6; } }
.err-text { color: var(--bad); font-size: 14px; min-height: 1.2em; }
@media (max-width: 640px) { table:not(.perf):not(.keep) th:nth-child(4), table:not(.perf):not(.keep) td:nth-child(4) { display: none; } .tile .big { font-size: 26px; } }

/* ---- the station: performance, charts, rules, income, look-through, forecast ---- */
.moved { font-size: 17px; margin: 2px 0 6px; max-width: 80ch; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; vertical-align: middle; }
.seg button { font: inherit; font-size: 13px; padding: 4px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); } .seg button[aria-pressed="true"] { background: var(--sea); color: var(--sea-ink); } .seg button:disabled { opacity: .4; cursor: not-allowed; }
.card .row > .seg + .seg { margin-left: 6px; }
table.perf td, table.perf th { padding: 7px 8px; } table.perf td:first-child { white-space: nowrap; }
.chartbox { position: relative; } .chart .cursor { stroke: var(--muted); stroke-dasharray: 3 3; } .tip { font-size: 13px; color: var(--muted); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.chart .put { fill: none; stroke: #c8662f; stroke-width: 1.6; stroke-dasharray: 5 4; } .chart .fan1 { fill: var(--sea); opacity: .13; } .chart .fan2 { fill: var(--sea); opacity: .22; }
.legend .sw { width: 18px; height: 10px; display: inline-block; margin-right: 6px; background: var(--sea); border-radius: 2px; vertical-align: middle; } .legend .sw.fan1 { opacity: .25; } .legend .sw.fan2 { opacity: .45; }
.hb { display: grid; grid-template-columns: 74px 1fr 52px; gap: 8px; align-items: center; font-size: 13.5px; padding: 2px 0; } .hb .hl.wide { grid-column: auto; } .hb .small { grid-column: 1 / -1; margin: -4px 0 2px 82px; }
.hb .hbar { display: block; height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; } .hb .hbar i { display: block; height: 100%; background: var(--sea); border-radius: 4px; } .hb .hv { text-align: right; font-variant-numeric: tabular-nums; }
.hb .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 84px; margin: 4px 0 12px; } .bars12 div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; color: var(--muted); }
.bars12 i { display: block; width: 100%; max-width: 26px; background: var(--sea); border-radius: 3px 3px 0 0; opacity: .85; }
.rules { display: grid; gap: 6px; } .rule { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: var(--panel2); font-size: 14px; } .rule span { flex: 1; } .rule.off span { color: var(--muted); text-decoration: line-through; }
.field select { min-width: 150px; }
@media (max-width: 640px) { .hb { grid-template-columns: 62px 1fr 46px; } .seg button { padding: 4px 7px; } table.perf { min-width: 560px; } }
