/* Shared by the downloaded report and the dashboard. IBM Plex Sans, SIL Open Font Licence. */
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url("plex-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url("plex-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url("plex-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url("plex-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url("plex-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url("plex-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --page: #f2f4f7; --surface: #ffffff; --surface-2: #f7f9fb;
  --ink: #162130; --ink-2: #425166; --muted: #5b6a7e;
  --grid: #e5eaf0; --axis: #c5ced9; --ring: #dce2ea;
  --series: #2a78d6; --series-soft: #a6c8ef; --full: #134b8a; --track: #e3ecf7;
  --critical: #c22f2f; --critical-wash: #fdf0f0; --warning: #d98e04; --warning-wash: #fdf6e7;
  --good: #168a4b; --neutral: #8391a3;
  --h0: #eef1f5; --h1: #cde2fb; --h2: #9ec5f4; --h3: #5598e7; --h4: #256abf; --h5: #104281;
  --nav: #14233a; --nav-ink: #dbe5f1; --nav-muted: #8fa3bd; --nav-active: #243a5a;
  --shadow: 0 1px 2px rgba(16, 34, 60, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d131b; --surface: #151d28; --surface-2: #1a2431;
    --ink: #e6edf5; --ink-2: #b6c2d1; --muted: #8e9db1;
    --grid: #222e3d; --axis: #35445a; --ring: #273446;
    --series: #3987e5; --series-soft: #1f5498; --full: #9ec5f4; --track: #1f2d42;
    --critical: #ef6a6a; --critical-wash: #2c1a1f; --warning: #f0b23c; --warning-wash: #2b2418;
    --good: #3cc27a; --neutral: #7c8ba0;
    --h0: #1e2835; --h1: #0d366b; --h2: #184f95; --h3: #256abf; --h4: #5598e7; --h5: #b7d3f6;
    --nav: #0a1018; --nav-ink: #dbe5f1; --nav-muted: #8397b1; --nav-active: #1b2a40;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); color: var(--ink);
  font: 14px/1.5 "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
h2 { font-size: 17px; margin: 32px 0 12px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
h4 { font-size: 13px; margin: 20px 0 8px; color: var(--ink-2); }
a { color: var(--series); }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--series); outline-offset: 2px; }
.muted { color: var(--muted); font-weight: 400; }
.wrap { overflow-wrap: anywhere; }

/* ----- the standalone report ------------------------------------------- */
.report-head { background: var(--nav); color: var(--nav-ink); }
.report-head > div { max-width: 1180px; margin: 0 auto; padding: 28px 20px 22px; }
.report-head h1 { font-size: 24px; margin: 0 0 6px; color: #fff; }
.about { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; color: var(--nav-muted); }
body > nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 2px; overflow-x: auto;
  padding: 0 max(20px, calc((100% - 1180px) / 2 + 20px)); background: var(--surface);
  border-bottom: 1px solid var(--ring); }
body > nav a { padding: 11px 12px; white-space: nowrap; color: var(--ink-2); text-decoration: none;
  font-weight: 500; font-size: 13px; }
body > nav a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--series); }
body > main, body > footer { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
body > footer { padding-top: 28px; padding-bottom: 44px; }
section[id], .feature { scroll-margin-top: 56px; }

/* ----- summary ---------------------------------------------------------- */
.headline { font-size: 16px; line-height: 1.6; max-width: 78ch; margin: 0 0 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--ring); border: 1px solid var(--ring); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); }
.stat { background: var(--surface); padding: 14px 18px; display: flex; flex-direction: column; }
.stat .label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 30px; font-weight: 600; line-height: 1.25; margin: 4px 0 0;
  letter-spacing: -.01em; }
.stat .note { color: var(--muted); font-size: 12px; }
.stat.alarm { background: var(--critical-wash); box-shadow: inset 0 3px 0 var(--critical); }
.stat.alarm .value { color: var(--critical); }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ----- findings --------------------------------------------------------- */
.findings { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 14px; }
.finding { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--ring); border-top: 3px solid var(--neutral); border-radius: 10px;
  padding: 14px 18px; box-shadow: var(--shadow); }
.finding.high { border-top-color: var(--critical); }
.finding.medium { border-top-color: var(--warning); }
.finding-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finding h3 { font-size: 16px; margin: 10px 0 0; overflow-wrap: anywhere; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  padding: 1px 10px; font-size: 12px; font-weight: 600; background: var(--surface-2); }
.chip.high { background: var(--critical-wash); }
.chip.medium { background: var(--warning-wash); }
.chip span { font-size: 9px; color: var(--neutral); }
.chip.high span { color: var(--critical); }
.chip.medium span { color: var(--warning); }
.area { color: var(--muted); font-size: 12px; }
.metrics { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 14px 0 0; }
.metrics div { display: flex; flex-direction: column-reverse; }
.metrics dd { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.2; }
.metrics dt { color: var(--muted); font-size: 12px; }
.action { max-width: 80ch; margin: 14px 0; }
.action strong { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; }
details > summary { cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: 13px; }
.evidence { margin-top: auto; border-top: 1px solid var(--grid); padding-top: 10px; }
.evidence ul, details.note ul { margin: 10px 0 4px; padding-left: 18px; color: var(--ink-2);
  font-size: 13px; }
.evidence li, details.note li { margin-bottom: 4px; }
.notes { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px;
  overflow: hidden; }
details.note { border-top: 1px solid var(--grid); }
details.note:first-child { border-top: 0; }
details.note > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  padding: 10px 16px; }
details.note > summary::before { content: "+"; width: 10px; color: var(--muted); font-weight: 600; }
details.note[open] > summary::before { content: "−"; }
details.note > summary:hover { background: var(--surface-2); }
.note-title { color: var(--ink); flex: 1 1 300px; }
details.note > ul, details.note > p { margin-left: 22px; margin-right: 16px; }
details.note > .action { font-size: 13px; }

/* ----- tables ----------------------------------------------------------- */
.tablebox { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow); }
.scroll { overflow: auto; max-height: max(520px, 72vh); }
.filter { display: block; width: min(340px, calc(100% - 24px)); margin: 12px; padding: 6px 10px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--ring);
  border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--grid);
  vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
th { position: sticky; top: 0; z-index: 1; background: var(--surface-2);
  border-bottom: 1px solid var(--axis); }
th.num { text-align: right; }
th button { all: unset; cursor: pointer; font-weight: 600; font-size: 12px; color: var(--ink-2);
  white-space: nowrap; }
th button:hover { color: var(--ink); }
th button:focus-visible { outline: 2px solid var(--series); outline-offset: 2px; }
th[aria-sort="ascending"] button::after { content: " ↑"; }
th[aria-sort="descending"] button::after { content: " ↓"; }
td.num { text-align: right; white-space: nowrap; }
td.name { font-weight: 600; white-space: nowrap; }
td.when { white-space: nowrap; }
td.outcome { min-width: 250px; }
td.holders { min-width: 220px; color: var(--ink-2); font-size: 12px; }
.meter { display: inline-block; width: 56px; height: 6px; border-radius: 3px; margin-right: 8px;
  background: var(--track); vertical-align: middle; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--series); }

/* ----- usage over time --------------------------------------------------- */
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump a { text-decoration: none; color: var(--ink-2); border: 1px solid var(--ring);
  background: var(--surface); border-radius: 6px; padding: 4px 10px; font-size: 12.5px;
  font-weight: 500; }
.jump a:hover { border-color: var(--series); color: var(--ink); }
.feature { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px;
  padding: 4px 20px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.feature > h3 { font-size: 17px; margin-top: 16px; }
.feature > h3 .muted { font-size: 13px; margin-left: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; padding-bottom: 14px;
  border-bottom: 1px solid var(--grid); }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; font-size: 16px; font-weight: 600; }
.chart { overflow-x: auto; }
.chart svg { width: 100%; max-width: 1100px; min-width: 760px; height: auto; display: block; }
svg text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
svg text.strong { fill: var(--ink); font-weight: 600; }
.grid { stroke: var(--grid); stroke-width: 1; }
.axis { stroke: var(--axis); stroke-width: 1; }
.limit { stroke: var(--ink); stroke-width: 1.5; }
.slot-bg, rect.slot { fill: transparent; }
.bar { fill: var(--series); }
.bar.weekend { fill: var(--series-soft); }
.hit:hover rect.slot, .hit:focus rect.slot { fill: var(--grid); }
.hit:focus { outline: none; }
.refused { fill: var(--critical); }
.h0 { fill: var(--h0); background: var(--h0); } .h1 { fill: var(--h1); background: var(--h1); }
.h2 { fill: var(--h2); background: var(--h2); } .h3 { fill: var(--h3); background: var(--h3); }
.h4 { fill: var(--h4); background: var(--h4); } .h5 { fill: var(--h5); background: var(--h5); }
.heat:hover, .heat:focus { stroke: var(--ink); stroke-width: 1.5; outline: none; }
.scale, .legend { color: var(--muted); font-size: 12px; display: flex; align-items: center;
  gap: 4px; margin: 6px 0; flex-wrap: wrap; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.bar-key { background: var(--series); margin-right: 2px; }
.weekend-key { background: var(--series-soft); margin: 0 2px 0 12px; }
.dot-key { width: 8px; height: 8px; border-radius: 50%; background: var(--critical);
  display: inline-block; margin: 0 2px 0 12px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.level { display: grid; grid-template-columns: 64px 1fr 62px; align-items: center; gap: 10px;
  padding: 3px 0; }
.users .level { grid-template-columns: 130px 1fr 70px; }
.level-name { color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.level-track { height: 10px; }
.level-bar { display: block; height: 100%; background: var(--series);
  border-radius: 0 4px 4px 0; min-width: 1px; }
.level-bar.full { background: var(--full); }
.level-value { text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }
#tip { position: fixed; z-index: 10; pointer-events: none; background: var(--ink);
  color: var(--surface); padding: 6px 10px; border-radius: 6px; font-size: 12.5px;
  max-width: 280px; }

@media print {
  body > nav, .jump, .filter, #tip { display: none; }
  .scroll { max-height: none; overflow: visible; }
  .finding, .stat { break-inside: avoid; }
  .findings { grid-template-columns: 1fr; }
  body { background: #fff; font-size: 11px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table { font-size: 9.5px; } th { position: static; } th, td { padding: 4px 6px; }
  .chart svg { min-width: 0; }
}
