/* Chart tokens and the few classes charts.js emits. Colours are the validated default
   palette: eight categorical slots in a fixed order, one sequential hue, stepped per theme. */
:root {
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --q100: #cde2fb; --q250: #86b6ef; --q350: #5598e7; --q450: #2a78d6; --q550: #1c5cab; --q650: #104281;
  --grid: #e6e5e2; --axis: #c9c8c4; --surface: #fcfcfb; --ink: #0b0b0b; --ink-2: #52514e; --ink-3: #86857f;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --q100: #0d366b; --q250: #184f95; --q350: #256abf; --q450: #3987e5; --q550: #6da7ec; --q650: #b7d3f6;
  --grid: #2a2a27; --axis: #44433f; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7; --ink-3: #8d8c84;
} }
:root[data-theme="dark"] {
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --q100: #0d366b; --q250: #184f95; --q350: #256abf; --q450: #3987e5; --q550: #6da7ec; --q650: #b7d3f6;
  --grid: #2a2a27; --axis: #44433f; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7; --ink-3: #8d8c84;
}
.viz { position: relative; min-height: 60px; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz .hit { fill: transparent; cursor: crosshair; }
.viz .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.viz .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.viz .legend i.line { height: 3px; border-radius: 2px; vertical-align: 3px; }
.viz .tabview { max-height: 280px; overflow: auto; }
.viz table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.viz table.t th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 11.5px; padding: 5px 8px; border-bottom: 1px solid var(--grid); }
.viz table.t td { padding: 5px 8px; border-bottom: 1px solid var(--grid); }
.viz table.t .num { text-align: right; }
#viztip { position: fixed; z-index: 1000; pointer-events: none; background: var(--ink); color: var(--surface); padding: 6px 9px; border-radius: 6px; font-size: 12px; line-height: 1.35; display: none; max-width: 280px; box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
#viztip b { font-weight: 600; }
#viztip .row { display: flex; justify-content: space-between; gap: 12px; }
#viztip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.grid12 { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); margin-top: 14px; }
.grid12 > .c3 { grid-column: span 3; } .grid12 > .c4 { grid-column: span 4; } .grid12 > .c6 { grid-column: span 6; } .grid12 > .c8 { grid-column: span 8; } .grid12 > .c12 { grid-column: span 12; }
@media (max-width: 1100px) { .grid12 > .c3, .grid12 > .c4 { grid-column: span 6; } .grid12 > .c8 { grid-column: span 12; } }
@media (max-width: 760px) { .grid12 > .c3, .grid12 > .c4, .grid12 > .c6 { grid-column: span 12; } }
.grid12 > .card { margin: 0; min-width: 0; }
.plaque { border: 1px solid var(--grid); border-left-width: 4px; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.plaque.good { border-left-color: #0ca30c; } .plaque.warn { border-left-color: #fab219; } .plaque.serious { border-left-color: #ec835a; } .plaque.critical { border-left-color: #d03b3b; }
.plaque b { display: block; font-weight: 600; } .plaque small { color: var(--ink-3); }
.plaques { display: flex; flex-direction: column; gap: 8px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.barlist { display: grid; gap: 6px; }
.barlist .row { display: grid; grid-template-columns: 150px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.barlist .track { height: 10px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.barlist .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.barlist .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.filterbar { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.filterbar label { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.filterbar select { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--grid); background: var(--surface); color: var(--ink); }
.filterbar .seg { display: inline-flex; border: 1px solid var(--grid); border-radius: 7px; overflow: hidden; }
.filterbar .seg a { padding: 5px 10px; font-size: 13px; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.filterbar .seg a.on { background: var(--ink); color: var(--surface); }
.feed { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.feed li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--grid); }
.feed li .when { color: var(--ink-3); font-variant-numeric: tabular-nums; }
