:root {
  --bg: #f3f2ee; --surface: #fcfcfb; --surface-2: #f2f1ec; --surface-3: #e9e8e2; --line: #e1e0d9; --line-2: #c3c2b7;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #6f6d67; --accent: #8a5a00; --accent-2: #b98217; --focus: #2a78d6;
  --nav-bg: #191917; --nav-ink: #e9e7e1; --nav-dim: #a09d94; --nav-hover: #26251f; --nav-active: #302e27;
  --btn: #1b1a18; --btn-ink: #fcfcfb; --danger: #c22f2f; --danger-ink: #fff;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
  --good-bg: #e5f3e3; --warn-bg: #fcf1d6; --serious-bg: #fbe8de; --crit-bg: #f8e1e1; --info-bg: #e3edf9;
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --q0: #cde2fb; --q1: #9ec5f4; --q2: #6da7ec; --q3: #3987e5; --q4: #2a78d6; --q5: #256abf; --q6: #1c5cab; --q7: #184f95; --q8: #0d366b;
  --dn2: #2a78d6; --dn1: #9ec5f4; --dmid: #f0efec; --dp1: #f2a39a; --dp2: #d03b3b;
  --grid: #e1e0d9; --axis: #c3c2b7; --bandc: rgba(12, 163, 12, .09);
  --shadow: 0 1px 2px rgba(20, 18, 10, .06), 0 6px 24px rgba(20, 18, 10, .07);
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111110; --surface: #1a1a19; --surface-2: #21211f; --surface-3: #2a2a27; --line: #2c2c2a; --line-2: #3f3f3b;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #9c9a91; --accent: #e0a526; --accent-2: #f0bd4f; --focus: #6da7ec;
  --nav-bg: #0b0b0a; --nav-ink: #e9e7e1; --nav-dim: #8f8c84; --nav-hover: #1a1916; --nav-active: #24221d;
  --btn: #f0efec; --btn-ink: #121211; --danger: #e05555; --danger-ink: #120808;
  --good-bg: #14301a; --warn-bg: #3a2e10; --serious-bg: #3b2418; --crit-bg: #3d1b1b; --info-bg: #142640;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --q0: #0d366b; --q1: #104281; --q2: #184f95; --q3: #1c5cab; --q4: #256abf; --q5: #2a78d6; --q6: #3987e5; --q7: #6da7ec; --q8: #9ec5f4;
  --dn2: #3987e5; --dn1: #1c5cab; --dmid: #383835; --dp1: #8a3535; --dp2: #e66767;
  --grid: #2c2c2a; --axis: #383835; --bandc: rgba(12, 163, 12, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #111110; --surface: #1a1a19; --surface-2: #21211f; --surface-3: #2a2a27; --line: #2c2c2a; --line-2: #3f3f3b;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #9c9a91; --accent: #e0a526; --accent-2: #f0bd4f; --focus: #6da7ec;
  --nav-bg: #0b0b0a; --nav-ink: #e9e7e1; --nav-dim: #8f8c84; --nav-hover: #1a1916; --nav-active: #24221d;
  --btn: #f0efec; --btn-ink: #121211; --danger: #e05555; --danger-ink: #120808;
  --good-bg: #14301a; --warn-bg: #3a2e10; --serious-bg: #3b2418; --crit-bg: #3d1b1b; --info-bg: #142640;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --q0: #0d366b; --q1: #104281; --q2: #184f95; --q3: #1c5cab; --q4: #256abf; --q5: #2a78d6; --q6: #3987e5; --q7: #6da7ec; --q8: #9ec5f4;
  --dn2: #3987e5; --dn1: #1c5cab; --dmid: #383835; --dp1: #8a3535; --dp2: #e66767;
  --grid: #2c2c2a; --axis: #383835; --bandc: rgba(12, 163, 12, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}
* { box-sizing: border-box; }
/* A hidden element stays hidden whatever its own display: the closed modal and drawer (display grid and flex) otherwise
   covered the page and caught every click. The mock-up had this in its page's frame; the console's own page needs it here. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--focus); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
small, .small { font-size: 12px; color: var(--ink-2); }
.muted { color: var(--muted); }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); font-weight: 600; }

/* shell */
#app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
#nav { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--nav-bg); color: var(--nav-ink); padding: 14px 10px 24px max(10px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 6px; }
.brand svg { flex: none; }
.brand b { display: block; font-size: 14px; letter-spacing: .01em; }
.brand span { display: block; font-size: 11px; color: var(--nav-dim); letter-spacing: .06em; text-transform: uppercase; }
.navg { display: flex; flex-direction: column; gap: 1px; }
.navg > .lbl { color: var(--nav-dim); padding: 6px 10px 4px; font-size: 10.5px; }
.navg a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--nav-ink); text-decoration: none; position: relative; min-height: 34px; }
.navg a:hover { background: var(--nav-hover); }
.navg a.on { background: var(--nav-active); }
.navg a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.navg a svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.navg a .cnt { margin-left: auto; font-size: 11px; background: #d03b3b; color: #fff; border-radius: 9px; padding: 0 6px; line-height: 17px; font-weight: 600; }
.navfoot { margin-top: auto; padding: 10px; font-size: 11.5px; color: var(--nav-dim); border-top: 1px solid #ffffff14; }
#main { min-width: 0; display: flex; flex-direction: column; }
#top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); flex-wrap: wrap; }
#menu { display: none; }
#ttl { min-width: 0; flex: 1 1 200px; }
#ttl h1 { font-size: 17px; font-weight: 650; }
#ttl p { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-2); }
.clock { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 4px 6px 4px 10px; }
.clock .t { font-size: 12.5px; line-height: 1.2; }
.clock .t b { font-weight: 600; }
.clock .t span { display: block; color: var(--ink-2); font-size: 11.5px; }
.who { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--surface-3); color: var(--ink); flex: none; }
.bell { position: relative; }
.bell .cnt { position: absolute; top: -4px; right: -4px; background: var(--crit); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 0 5px; line-height: 16px; }
#filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
#filters label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--ink-2); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
#filters select { min-width: 0; max-width: 190px; }
#filters .seg { align-self: flex-end; }
#banners { display: flex; flex-direction: column; gap: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
#banners:not(:empty) { padding-block: 10px 0; }
#view { padding-block: 16px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 1480px; width: 100%; }
.mockline { font-size: 11.5px; color: var(--ink-2); padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--warn-bg); border-bottom: 1px solid var(--line); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 550; font-size: 13px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn.pri:hover { opacity: .9; }
.btn.danger { background: var(--danger); color: var(--danger-ink); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 28px; padding: 3px 9px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; padding: 0; }
select, input[type=text], input[type=number], input[type=search], input[type=datetime-local], input[type=date], textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; min-height: 34px; }
textarea { width: 100%; min-height: 72px; resize: vertical; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 10px; min-height: 32px; cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--btn); color: var(--btn-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; background: var(--surface); cursor: pointer; min-height: 28px; }
.chip.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.chip.static { cursor: default; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 7px; line-height: 19px; white-space: nowrap; background: var(--surface-3); color: var(--ink); }
.tag.good { background: var(--good-bg); }
.tag.warn { background: var(--warn-bg); }
.tag.serious { background: var(--serious-bg); }
.tag.crit { background: var(--crit-bg); }
.tag.info { background: var(--info-bg); }
.tag .ic { font-size: 11px; }
.ic-good { color: var(--good); } .ic-warn { color: #b57f00; } .ic-serious { color: #c35a2f; } .ic-crit { color: var(--crit); }
:root[data-theme="dark"] .ic-warn { color: var(--warn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic-warn { color: var(--warn); } }
.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 12px; background: var(--line-2); transition: background .15s; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px #0003; }
.toggle input:checked + span { background: var(--good); }
.toggle input:checked + span::after { transform: translateX(16px); }

/* cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card > header .sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.card.flush { padding: 0; }
.card.flush > header { padding: 14px 16px 0; }
.grid { display: grid; gap: 16px; min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
.tile .lbl { display: flex; justify-content: space-between; gap: 6px; }
.tile .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.tile .d { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tile .spark { position: absolute; right: 12px; bottom: 12px; }
.tile.link { cursor: pointer; }
.tile.link:hover { border-color: var(--line-2); }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); } .delta.down { color: var(--crit); } .delta.flat { color: var(--ink-2); }
.defn { border-bottom: 1px dotted var(--muted); cursor: help; }
.chart { min-height: 120px; position: relative; min-width: 0; }
.chart svg { display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dashsw { width: 14px; height: 0; border-top: 2px dashed; border-radius: 0; background: none !important; }
svg .grid { stroke: var(--grid); stroke-width: 1; }
svg .base { stroke: var(--axis); stroke-width: 1; }
svg .ax { fill: var(--muted); font-size: 11px; }
svg .dl { fill: var(--ink-2); font-size: 11.5px; font-weight: 500; }
svg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg .ln.dash { stroke-dasharray: 5 4; }
svg .ref { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
svg .bandr { fill: var(--bandc); }
svg .hit, svg .rowhit { fill: transparent; cursor: crosshair; }
svg .rowhit { cursor: default; }
svg .xhl { stroke: var(--ink-2); stroke-width: 1; }
svg .xhd { stroke: var(--surface); stroke-width: 2; }
svg .hi { fill: var(--ink); opacity: .06; }
svg .rl { fill: var(--ink); font-size: 12.5px; }
svg .rv { fill: var(--ink); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
svg .ci { stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
svg .dot { fill: var(--c1); stroke: var(--surface); stroke-width: 2; }
svg .dot.out { fill: var(--crit); }
#tip { position: fixed; z-index: 100; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); max-width: 300px; }
#tip .th { font-weight: 600; margin-bottom: 4px; }
#tip .tr { display: flex; align-items: center; gap: 6px; }
#tip .tr b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
#tip .tt { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hb { display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 24px; font-size: 13px; }
.hbars.wide .hb { grid-template-columns: minmax(120px, 58%) minmax(0, 1fr) auto; }
.hb-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-l small { margin-left: 6px; }
.hb-t { height: 12px; background: var(--surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hb-b { height: 100%; border-radius: 0 4px 4px 0; }
.hb-v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 56px; }
.tablebtn { font-size: 12px; }

/* tables */
.tw { overflow-x: auto; min-width: 0; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--ink); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
a.li { color: inherit; text-decoration: none; cursor: pointer; }
a.li:hover, a.li:focus-visible { background: var(--surface-2); }
tr.click:hover td { background: var(--surface-2); }
tr.ex td { color: var(--muted); text-decoration: line-through; }
tr.ex td.keep { text-decoration: none; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 0 0; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.heat td { text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; border: 2px solid var(--surface); border-radius: 4px; padding: 6px 4px; min-width: 52px; }
.heat th { text-align: center; }
.heat td.rowh { text-align: left; background: transparent; white-space: nowrap; }
.heat td.na { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--surface) 4px 8px); color: var(--muted); }

/* banners, lists */
.banner { display: flex; align-items: center; gap: 10px; border-radius: var(--r); padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.banner.warn { background: var(--warn-bg); border-color: transparent; }
.banner.crit { background: var(--crit-bg); border-color: transparent; }
.banner.info { background: var(--info-bg); border-color: transparent; }
.banner .grow { flex: 1 1 240px; min-width: 0; }
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .grow > div:first-child { font-weight: 550; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hr { height: 1px; background: var(--line); margin: 4px 0; }
.empty { color: var(--ink-2); padding: 18px 0; text-align: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 12px; cursor: pointer; font-weight: 550; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.prog { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--c1); border-radius: 0 4px 4px 0; }

/* seasons */
.season-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.sname { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sname h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.countdown { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timeline { position: relative; height: 74px; margin-top: 6px; }
.timeline .tl-bar { position: absolute; height: 30px; top: 18px; border-radius: 6px; padding: 5px 8px; font-size: 11.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); border: 1px solid var(--line-2); background: var(--surface-2); }
.timeline .tl-bar.live { background: var(--info-bg); border-color: var(--c1); }
.timeline .tl-bar.scheduled { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); border-style: dashed; }
.timeline .tl-bar.ended { background: var(--warn-bg); }
.timeline .tl-now { position: absolute; top: 8px; bottom: 14px; width: 2px; background: var(--crit); }
.timeline .tl-now::after { content: "now"; position: absolute; top: -6px; left: 4px; font-size: 10.5px; color: var(--crit); font-weight: 700; }
.timeline .tl-ax { position: absolute; bottom: 0; font-size: 10.5px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.pod { border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; min-width: 0; }
.pod .place { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.pod .pn { font-weight: 650; font-size: 14.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod.p1 { padding-block: 22px; border-color: var(--accent-2); }
.pod.p2 { padding-block: 16px; }
.medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #1b1405; }
.m1 { background: #e8b73a; } .m2 { background: #c9ccd1; } .m3 { background: #d39a6a; }

/* drawer and modal */
.scrim { position: fixed; inset: 0; background: rgba(10, 10, 8, .42); z-index: 60; }
#drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--surface); z-index: 61; box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); padding-right: env(safe-area-inset-right, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
#drawer .dh { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
#drawer .db { padding: 14px 18px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
#modal { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
/* Inside the modal the scrim lies under the box (the modal is its own stacking context): at the scrim's 60 it covered the
   box, and a click on any button or field in it landed on the scrim and closed the modal. */
#modal > .scrim { z-index: 0; }
/* Its one column never grows past the screen: a wide table scrolls inside the box (a phone's width). */
.mbox { position: relative; z-index: 1; background: var(--surface); border-radius: 14px; width: min(680px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); border: 1px solid var(--line); }
.mbox.wide { width: min(920px, 100%); }
.mbox > header { padding: 16px 18px 10px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.mbox > header h2 { font-size: 17px; }
.mbox > .mb { padding: 14px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.mbox > footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.mbox > footer .grow { flex: 1 1 200px; font-size: 12.5px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field > em { font-style: normal; font-size: 12px; color: var(--ink-2); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.err { color: var(--crit); font-size: 12.5px; font-weight: 550; }
.okmsg { color: var(--good); font-size: 12.5px; font-weight: 550; }
.callout { border-radius: 10px; background: var(--surface-2); padding: 10px 12px; font-size: 13px; border: 1px solid var(--line); }
.callout.warn { background: var(--warn-bg); border-color: transparent; }
.callout.crit { background: var(--crit-bg); border-color: transparent; }
/* A toast only says something: clicks go through it to what lies under (on a phone, a dialog's buttons). */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 90; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100% - 32px)); }
.toast { background: var(--btn); color: var(--btn-ink); border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow); width: 100%; }
.popover { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; min-width: 240px; max-height: 60vh; overflow-y: auto; }
.popover .lbl { padding: 8px 8px 4px; }
.popover button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.popover button:hover { background: var(--surface-2); }
.rule { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rule .rn { font-weight: 600; font-size: 13px; }
.rule .rn small { display: block; font-weight: 400; }
.diff { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
.diff .del { color: var(--crit); } .diff .add { color: var(--good); }

@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  #nav { position: fixed; top: 0; bottom: 0; left: 0; width: 264px; transform: translateX(-105%); transition: transform .2s ease; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
  #nav.open { transform: none; box-shadow: var(--shadow); }
  #menu { display: inline-flex; }
  #top { position: relative; top: 0; }
  .g2, .g3, .g21, .g12, .season-hero { grid-template-columns: minmax(0, 1fr); }
  .clock { order: 5; width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile .v { font-size: 20px; }
  .tile .spark { display: none; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .rule { grid-template-columns: minmax(0, 1fr) 36px; }
  .rule > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  #filters select { max-width: 150px; }
  .countdown { font-size: 24px; }
  #filters .ftoggle { display: inline-flex; }
  #filters:not(.open) > label, #filters:not(.open) > [data-clearf] { display: none; }
}
.ftoggle { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* The live console (step A3): what the mock-up did not have */
.navg a .soon { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--nav-dim); border: 1px solid #ffffff22; border-radius: 6px; padding: 0 5px; line-height: 16px; }
.navg a .cnt { margin-left: auto; }
body.signin #nav, body.signin #top { display: none; }
body.signin #app { grid-template-columns: minmax(0, 1fr); }
.signin-card { width: min(380px, 100%); margin: 12vh auto 0; display: flex; flex-direction: column; gap: 14px; }
form.mbox { margin: 0; }
/* The filter bar of the console's number screens (step A4) */
/* Live ops: the calendar's rows, on one track so the line for today and the months line up with them */
.cal { padding-left: 96px; margin-top: 6px; }
.cal-track { position: relative; }
.cal-row { position: relative; height: 30px; margin-bottom: 6px; background: var(--surface-2); border-radius: 6px; }
.cal-lbl { position: absolute; right: calc(100% + 8px); top: 7px; width: 88px; text-align: right; font-size: 12px; color: var(--ink-2); }
.cal-bar { position: absolute; top: 3px; height: 24px; border-radius: 5px; padding: 3px 6px; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
.cal-bar.live { background: var(--info-bg); border-color: var(--c1); }
.cal-bar.planned { border-style: dashed; }
.cal-bar.maint { background: var(--crit-bg); border-color: transparent; }
.cal-bar.cast { background: var(--warn-bg); border-color: transparent; }
.cal-bar.event { background: var(--good-bg); border-color: transparent; }
.cal-bar.clash { outline: 2px solid var(--c8); outline-offset: 1px; }
.cal-axis { position: relative; height: 16px; }
.cal-ax { position: absolute; top: 0; font-size: 11px; color: var(--ink-2); transform: translateX(-50%); }
.cal-now { position: absolute; top: -4px; bottom: 14px; width: 2px; background: var(--accent); }
/* Balance: a hero's win rate on each map, coloured against 50% */
table.heat td.hc { text-align: center; font-variant-numeric: tabular-nums; }
table.heat td.hc small { display: block; opacity: .75; }
.filterbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.filterbar label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--ink-2); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.filterbar select { min-width: 0; max-width: 190px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; }
.filterbar .small { align-self: center; }
