/* The Episode Explorer admin: the brand's tokens (site/site.css) in a quieter dashboard layout. Status colors are
   the chart palette's good / warning / critical steps, always beside a word and a symbol. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations"), url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"), url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f6f9fc; --surface: #ffffff; --line: #e3e8ee; --line-2: #d5dbe3;
  --ink: #0a2540; --ink-2: #425466; --ink-3: #5b6b7d;
  --accent: #635bff; --accent-ink: #ffffff; --link: #4f46e5; --focus: #635bff;
  --g1: #a960ee; --g2: #ff6b6b; --g4: #ffcb57; --g5: #635bff;
  /* status: fills from the chart palette; text steps darkened for 4.5:1 on their tints */
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b;
  --good-ink: #0b6b2e; --good-bg: #e7f6ec; --warn-ink: #7a4f00; --warn-bg: #fff4d6; --crit-ink: #a3202d; --crit-bg: #fde8ea;
  --muted-bg: #eef1f5;
  --del-bg: #fde8ea; --ins-bg: #e7f6ec;
  --shadow: 0 2px 5px -1px rgba(50, 50, 93, .12), 0 1px 3px -1px rgba(0, 0, 0, .1);
  --r: 10px; --r-sm: 6px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a2540; --surface: #112f52; --line: rgba(255, 255, 255, .12); --line-2: rgba(255, 255, 255, .2);
    --ink: #ffffff; --ink-2: #c3cfdb; --ink-3: #a9b8c8;
    --link: #b4b0ff; --focus: #b4b0ff;
    --good-ink: #7ee2a0; --good-bg: rgba(12, 163, 12, .16); --warn-ink: #ffd27a; --warn-bg: rgba(250, 178, 25, .14); --crit-ink: #ffa3ad; --crit-bg: rgba(208, 59, 59, .2);
    --muted-bg: rgba(255, 255, 255, .08);
    --del-bg: rgba(208, 59, 59, .22); --ins-bg: rgba(12, 163, 12, .2);
    --shadow: 0 2px 6px -1px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-2); font: 400 15px/1.55 var(--sans); font-feature-settings: "cv11", "ss01", "tnum"; -webkit-font-smoothing: antialiased; }
a { color: var(--link); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 28px; font-weight: 650; line-height: 1.2; }
h2 { font-size: 18px; font-weight: 620; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 620; margin: 16px 0 8px; }
p { margin: 0 0 10px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -10000px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 20; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }

/* top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--g1), var(--g2) 45%, var(--g4) 75%, var(--g5)); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--muted-bg); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.top nav { flex: 1 1 auto; }
.top nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.top nav a { display: block; color: var(--ink-2); padding: 6px 10px; border-radius: var(--r-sm); font-weight: 520; }
.top nav a:hover { background: var(--muted-bg); text-decoration: none; }
.top nav a[aria-current="page"] { color: var(--ink); background: var(--muted-bg); font-weight: 620; }
.who { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; }
button, .button { font: inherit; font-weight: 600; cursor: pointer; border-radius: var(--r-sm); padding: 7px 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
button:hover { background: var(--muted-bg); }
.button { display: inline-block; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button:hover { text-decoration: none; filter: brightness(1.08); }

main.wrap { padding-top: 28px; padding-bottom: 64px; } /* main.wrap: .wrap alone would reset the padding */
main > section, main > article, main > .scroll, main > form, main > nav { margin-bottom: 28px; }
.head { margin-bottom: 24px; }
.head .sub { color: var(--ink-3); margin-top: 6px; max-width: 70ch; }
.crumb { margin-bottom: 6px; font-size: 14px; }

/* headline tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi h2 { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; letter-spacing: 0; }
.kpi p { margin: 0 0 4px; font-size: 14px; }
.big { font-size: 24px !important; font-weight: 650; color: var(--ink); letter-spacing: -0.02em; line-height: 1.25; }
.card + .card { margin-top: 16px; }
.card h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* tables */
/* position: relative keeps absolutely positioned bits (the .vh labels) inside the scroll box, not stretching the page */
.scroll { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card .scroll { box-shadow: none; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
caption { text-align: left; color: var(--ink-3); font-size: 13px; padding: 12px 14px 4px; caption-side: bottom; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; background: var(--surface); }
tbody th { color: var(--ink); font-weight: 600; }
th.slug { white-space: nowrap; }
.below { color: var(--ink-3); font-size: 13px; margin: 8px 2px 0; }
tbody tr:last-child > * { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
.err { color: var(--crit-ink); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }

/* status badges: a symbol and a word */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.badge.ok { color: var(--good-ink); background: var(--good-bg); }
.badge.warn { color: var(--warn-ink); background: var(--warn-bg); }
.badge.bad { color: var(--crit-ink); background: var(--crit-bg); }
.badge.muted { color: var(--ink-2); background: var(--muted-bg); }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 20px; margin: 12px 0 0; }
.facts dt { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); }
.url { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

/* diffs */
.diff { margin: 0; display: grid; gap: 8px; }
.diff dt { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.diff dd { margin: 0; display: grid; gap: 3px; }
.diff del, .diff ins { display: block; text-decoration: none; padding: 3px 8px; border-radius: 4px; color: var(--ink); overflow-wrap: anywhere; }
.diff del { background: var(--del-bg); }
.diff ins { background: var(--ins-bg); }
.diff del::before { content: "− "; color: var(--crit-ink); font-weight: 700; }
.diff ins::before { content: "+ "; color: var(--good-ink); font-weight: 700; }

/* filters and paging */
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
nav.filters a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }
nav.filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.filters label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 10px; min-width: 180px; }
.pager { display: flex; justify-content: space-between; margin-top: 12px; }

/* notes */
.note { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--muted-bg); color: var(--ink); }
.note.warn { background: var(--warn-bg); }
.note.bad { background: var(--crit-bg); }
.empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 22px; color: var(--ink-2); }
.empty p { margin: 0; max-width: 70ch; }
details.raw { margin-top: 24px; }
details.raw summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details.raw pre { font-family: var(--mono); font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow: auto; max-height: 480px; }
.signin { max-width: 460px; margin: 48px auto; }
.signin h1 { margin-bottom: 10px; }

/* charts */
.strip { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.strip > svg { display: block; width: 100%; max-width: 596px; height: auto; }
.strip figcaption { display: flex; justify-content: space-between; max-width: 596px; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 12px; height: 12px; }
.h-ok { fill: var(--good); }
.h-alarm { fill: var(--crit); }
.h-none { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.h-mark { fill: #ffffff; font: 700 11px var(--sans); }
.meter { display: block; width: 100%; height: 10px; margin: 8px 0 6px; }
.m-track { fill: var(--muted-bg); }
.m-fill { fill: var(--accent); }
.m-warn { fill: var(--warn); }
.m-crit { fill: var(--crit); }
table.steps { width: 100%; max-width: 520px; }
table.steps th, table.steps td { padding: 4px 12px 4px 0; border: 0; }
table.steps td:last-child { width: 100%; }
table.steps svg { display: block; width: 100%; max-width: 240px; height: 14px; }
.bar { fill: var(--accent); }
.spark { display: inline-flex; align-items: center; gap: 8px; }
.spark svg { width: 120px; height: 28px; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
@media (forced-colors: active) {
  .h-ok, .h-alarm, .bar, .m-fill, .m-warn, .m-crit { fill: CanvasText; }
  .h-mark { fill: Canvas; }
  .spark .line { stroke: CanvasText; }
}
