/* Colors follow the dataviz reference palette: chart chrome, ink and eight categorical series slots, each stepped
   separately for light and dark. Charts only reference these variables, so the theme switch needs no re-render. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --hover: rgba(11, 11, 11, 0.045);
  --link: #256abf;
  --good: #006300;
  --bad: #d03b3b;
  --shadow: 0 8px 28px rgba(11, 11, 11, 0.12);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --s7: #6250d6;
  --s8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --hover: rgba(255, 255, 255, 0.06);
    --link: #86b6ef;
    --good: #0ca30c;
    --bad: #d03b3b;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --s5: #d55181;
    --s6: #008300;
    --s7: #9085e9;
    --s8: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --hover: rgba(255, 255, 255, 0.06);
  --link: #86b6ef;
  --good: #0ca30c;
  --bad: #d03b3b;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --s6: #008300;
  --s7: #9085e9;
  --s8: #e66767;
}

.c-s1 { --c: var(--s1); }
.c-s2 { --c: var(--s2); }
.c-s3 { --c: var(--s3); }
.c-s4 { --c: var(--s4); }
.c-s5 { --c: var(--s5); }
.c-s6 { --c: var(--s6); }
.c-s7 { --c: var(--s7); }
.c-s8 { --c: var(--s8); }
.c-muted { --c: var(--muted); }

/* ---- Page ---- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 28px; }

.top { padding-top: 24px; padding-bottom: 20px; }
.title-row { display: flex; align-items: center; gap: 16px; }
h1 { flex: 1; }
h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.run-name { margin: 4px 0 8px; color: var(--ink-2); overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 12.5px; }

.filters { position: sticky; top: 0; z-index: 10; background: var(--page); border-block: 1px solid var(--border); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.field { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; color: var(--ink-2); font-size: 13px; }
select, button, input { font: inherit; color: inherit; }
select, input[type="search"] {
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
#f-run { width: min(460px, 38vw); text-overflow: ellipsis; }
.seg { display: inline-flex; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.seg button { padding: 5px 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.hint { color: var(--muted); font-size: 12.5px; }
.tbtn {
  flex: none;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
}
.tbtn:hover, .seg button:hover { background: var(--hover); }
.seg button[aria-pressed="true"]:hover { background: var(--ink); }
:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }

body.loading main { opacity: 0.5; transition: opacity 0.15s; }

.error { margin: 16px 0 0; padding: 10px 12px; border: 1px solid var(--bad); border-radius: 8px; background: var(--surface); }

/* ---- Headline tiles ---- */
.kpi-title { padding: 12px 0; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { min-width: 0; padding: 12px 14px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.tile .label { color: var(--ink-2); font-size: 12.5px; }
.tile .scope { color: var(--muted); }
.tile .value { margin-top: 2px; font-size: 24px; font-weight: 600; line-height: 1.2; }
.tile .delta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 18px; color: var(--ink-2); font-size: 12px; }
.arrow { font-size: 10px; }
.arrow.good { color: var(--good); }
.arrow.bad { color: var(--bad); }
.spark-host { height: 28px; margin-top: 4px; }

.gaps { margin: 28px 0 0; padding: 16px 0; border-top: 1px solid var(--border); color: var(--ink-2); font-size: 12.5px; }
.gaps strong { color: var(--ink); font-weight: 600; }
.gaps summary { cursor: pointer; }
.gaps ul { margin: 8px 0 0; padding: 0; list-style: none; }
.gaps li { margin: 3px 0; }
.gaps p { margin: 8px 0 0; color: var(--muted); }
.linkish { padding: 0; border: 0; background: none; color: var(--ink-2); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--ink); }

/* ---- Grouped section navigation ---- */
.workspace { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 36px; padding-top: 28px; padding-bottom: 40px; }
.workspace main { min-width: 0; }
.section-nav { position: sticky; top: calc(var(--filter-height, 64px) + 24px); align-self: start; max-height: calc(100dvh - var(--filter-height, 64px) - 48px); overflow-y: auto; }
.tabs { display: flex; flex-direction: column; gap: 24px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label { margin: 0 0 6px; padding: 0 12px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.mobile-section { display: none; }
.tab {
  flex: none;
  min-height: 36px;
  padding: 8px 12px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { background: var(--hover); color: var(--ink); }
.tab.nodata { color: var(--ink-2); }
.tab[aria-selected="true"] { background: color-mix(in srgb, var(--link) 9%, transparent); color: var(--link); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pager .step { padding: 6px 12px; font-size: 13px; }

/* ---- Sections and cards ---- */
.sec { margin-top: 24px; }
.sec > h2 { margin: 0 0 8px; font-size: 24px; font-weight: 650; letter-spacing: -0.025em; }
.blurb { max-width: 80ch; margin: 0 0 24px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 470px), 1fr)); gap: 20px; }
.card { min-width: 0; margin: 0; padding: 20px 20px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.card.quiet { background: transparent; border-style: dashed; }
/* Compare mode: one small chart per run (pies side by side; stacked columns and top lists one under the other) */
.grid > .card.wide { grid-column: 1 / -1; }
.grid.grid-fill { grid-template-columns: repeat(auto-fill, minmax(min(100%, 470px), 1fr)); }
.multi-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px 20px; }
.multi-stack { display: grid; gap: 14px; }
.multi-head { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.multi-head .swatch, .tile-cmp .swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.tile-cmp { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--border); display: grid; gap: 2px; font-size: 12px; color: var(--ink-2); }
.tile-cmp li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tile-cmp-run { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cmp li span:last-child { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.compare-note { margin: 0 0 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card .sub { margin: 2px 0 0; color: var(--ink-2); font-size: 12.5px; }
.badge { display: inline-block; margin-left: 8px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-2); font-size: 11.5px; font-weight: 500; vertical-align: 1px; }
.empty { margin: 10px 0 0; color: var(--ink-2); }
.foot { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

/* ---- Plotly charts ---- */
.chart { margin-top: 8px; }
.chart-box { width: 100%; }

/* ---- Horizontal bar lists ---- */
.hbars { margin-top: 8px; }
.hb-head, .hb-row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 10px; }
.hb-head { padding: 0 6px 4px; color: var(--muted); font-size: 11.5px; }
.hb-row { width: 100%; min-height: 26px; padding: 2px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; }
button.hb-row { cursor: pointer; }
button.hb-row:hover { background: var(--hover); }
button.hb-row:focus-visible { outline-offset: -2px; }
.hb-label { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.hb-fill { flex: none; height: 12px; border-radius: 0 4px 4px 0; background: var(--c); }
.hb-val, .hb-extra { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-extra { text-align: right; }
.hb-ref { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px solid var(--ink-2); pointer-events: none; }
.hb-refkey { display: inline-block; width: 0; height: 12px; margin-right: 8px; border-left: 1.5px solid var(--ink-2); vertical-align: -2px; }

/* ---- Tables ---- */
.tbl-wrap { overflow-x: auto; margin-top: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 4px 10px; border-bottom: 1px solid var(--grid); text-align: right; white-space: nowrap; }
table.data th:first-child { text-align: left; }
table.data thead th { color: var(--ink-2); font-weight: 600; }
table.data tbody th { font-weight: 500; }
table.all tbody th { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.search { width: min(360px, 100%); }
.count { color: var(--muted); font-size: 12.5px; }

/* ---- Domain details panel ---- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(480px, 100%);
  overflow-y: auto;
  padding: 18px 18px 28px;
  border-left: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.drawer p { color: var(--ink-2); }

@media (max-width: 640px) {
  .hint { display: none; }
  .tile .value { font-size: 21px; }
  .filter-row { gap: 8px 12px; }
}

/* Investigation controls share the dashboard's neutral surfaces and blue link accent. */
.figure-finder { position: relative; display: flex; align-items: center; width: min(360px, 40vw); gap: 8px; }
#figure-search { width: 100%; min-height: 36px; padding: 8px 12px; }
#figure-results { position: absolute; top: calc(100% + 8px); right: 0; z-index: 25; width: min(560px, calc(100vw - 32px)); max-height: min(420px, 65vh); overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); padding: 6px; }
#figure-results .empty { padding: 12px; margin: 0; }
.figure-result { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; width: 100%; padding: 12px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.figure-result:hover { background: var(--hover); }
.figure-result strong { font-size: 13px; font-weight: 600; }
.figure-result span { color: var(--ink-2); font-size: 12px; }
figure.card, #sections { scroll-margin-top: calc(var(--filter-height, 64px) + 24px); }
.explorer-modes { display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 18px; border-bottom: 1px solid var(--border); }
.explorer-modes .tab { min-height: 40px; padding: 8px 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
.explorer-modes .tab:hover { background: transparent; color: var(--ink); }
.explorer-modes .tab[aria-pressed="true"] { color: var(--link); border-bottom-color: var(--link); background: transparent; font-weight: 600; }
.domain-explorer .search-row { gap: 10px 16px; margin-bottom: 18px; }
.domain-explorer .search-row select, .domain-explorer .search-row input, .domain-explorer .search-row button { min-height: 36px; }
.domain-explorer > .blurb { margin-bottom: 16px; font-size: 12px; }
.domain-explorer .search { width: min(280px, 100%); }
.explorer-note { max-width: 85ch; margin: 12px 0; color: var(--ink-2); font-size: 12.5px; }
.explorer-table { background: var(--surface); }
.explorer-table th, .explorer-table td { height: 42px; }
.explorer-table thead { background: var(--hover); }
.domain-link { color: var(--link); background: transparent; border: 0; padding: 6px 0; text-align: left; cursor: pointer; font-weight: 500; }
.domain-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.explorer-table tbody tr:hover { background: var(--hover); }
.ranked-value { font-weight: 600; color: var(--ink); }
.explorer-empty { padding: 24px 0; border-top: 1px solid var(--border); }
.explorer-empty h3 { margin: 0 0 6px; font-size: 14px; }
.explorer-empty p { color: var(--ink-2); max-width: 80ch; }
.drawer { width: min(680px, 100%); }
.drawer h3 { margin: 24px 0 10px; font-size: 14px; }
.domain-facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; color: var(--ink-2); font-size: 13px; }
.domain-facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.page-examples { padding: 0; list-style: none; }
.page-examples li { padding: 12px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.example-url { color: var(--ink-2); font-size: 12px; margin-top: 4px; }
.table-scroll-hint { display: none; color: var(--ink-2); font-size: 12px; }
@media (max-width: 640px) {
  .table-scroll-hint { display: block; margin: 12px 0 4px; }
  .explorer-table th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
}
.figure-finder .count, .domain-explorer .count, .drawer .foot { color: var(--ink-2); }

/* Secondary information stays available without competing with charts and rankings. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 50; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.run-details { position: relative; margin-left: auto; color: var(--ink-2); font-size: 12.5px; }
.run-details summary { cursor: pointer; padding: 8px 0; white-space: nowrap; }
.run-details-content { position: absolute; z-index: 25; right: 0; top: calc(100% + 12px); width: min(640px, calc(100vw - 32px)); max-height: min(75vh, 720px); overflow-y: auto; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.run-details-content .run-name { color: var(--ink); font-weight: 600; margin: 0 0 14px; }
.run-info { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 16px; line-height: 1.45; }
.run-info dt { color: var(--ink-2); font-weight: 600; }
.run-info dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .run-info { grid-template-columns: 1fr; gap: 2px; } .run-info dd { margin-bottom: 8px; } }
.compare { position: relative; }
.compare summary { cursor: pointer; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); white-space: nowrap; list-style: none; }
.compare summary::-webkit-details-marker { display: none; }
.compare summary b { color: var(--ink); font-weight: 600; }
.compare-pop { position: absolute; z-index: 25; left: 0; top: calc(100% + 8px); width: min(520px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.compare-pop .foot { margin: 0 0 8px; }
.compare-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; color: var(--ink); cursor: pointer; line-height: 1.35; }
.compare-item input { margin-top: 2px; flex: none; }
.compare-item .swatch { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 3px; }
.meta { gap: 8px 16px; }
.cycle-summary { border-bottom: 1px solid var(--border); }
.cycle-summary[open] { padding-bottom: 18px; }
.cycle-summary .kpis { margin-top: 6px; }
.metric-help, .unavailable, .domain-history { margin-top: 24px; color: var(--ink-2); font-size: 12.5px; }
.metric-help summary, .unavailable summary, .domain-history summary { cursor: pointer; padding: 8px 0; }
.unavailable .grid { margin-top: 12px; }
.domain-history { margin: 16px 0; border-block: 1px solid var(--border); }
.domain-history summary { padding: 12px 0; }
.drawer-head { position: sticky; top: -18px; z-index: 2; padding: 16px 0; background: var(--surface); }
.drawer .metric-help { margin-top: 12px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 168px minmax(0, 1fr); gap: 24px; }
  .filter-row { gap: 12px 18px; }
  #f-run { width: min(380px, 35vw); }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 20px; }
  .top { padding-top: 18px; padding-bottom: 18px; }
  .title-row { flex-wrap: wrap; gap: 14px; }
  h1 { font-size: 20px; }
  .figure-finder { order: 3; width: 100%; }
  #figure-results { width: 100%; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
  .section-nav { position: static; max-height: none; overflow: visible; margin-bottom: 16px; }
  #tabs { display: none; }
  .mobile-section { display: flex; align-items: center; gap: 12px; width: 100%; }
  #f-section { flex: 1; min-height: 40px; font-weight: 600; }
  .run-field { flex: 1 1 100%; }
  #f-run { width: 100%; flex: 1; }
  .filter-row { gap: 10px 14px; }
  .run-details { font-size: 12px; }
  .seg button { min-height: 34px; padding-inline: 10px; }
  #f-cycle { min-height: 34px; }
  .sec { margin-top: 20px; }
  .sec > h2 { font-size: 22px; }
  .card { padding: 16px; }
  .grid { gap: 16px; }
  .explorer-modes { gap: 4px 16px; }
  .explorer-modes .tab { min-height: 38px; font-size: 12px; }
  .domain-explorer .search { width: 100%; }
  .domain-explorer .search-row { gap: 10px 12px; }
  .cycle-summary .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .wrap { padding-inline: 14px; }
  .filter-row { column-gap: 10px; }
  .run-details { margin-left: 0; }
  #f-cycle { width: 78px; }
  .seg button { padding-inline: 8px; font-size: 12px; }
}

/* Raw data check */
.raw-tiles { margin-bottom: 24px; }
.raw-h { margin: 36px 0 12px; font-size: 16px; }
.raw-cause { color: var(--ink-2); white-space: nowrap; }
.raw-warn { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--s4); background: color-mix(in srgb, var(--s4) 10%, transparent); color: var(--ink); }
.raw-group { border-top: 1px solid var(--border); }
.raw-group > summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 13.5px; }
.page-examples details > summary { cursor: pointer; color: var(--link); font-size: 12.5px; margin-top: 6px; }
.page-text { max-height: 360px; overflow: auto; margin: 8px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); color: var(--ink); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.example-title { font-weight: 600; margin-bottom: 2px; }

/* Junk check */
.junk-rules { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 6px; font-size: 13px; color: var(--ink-2); }
.junk-ex th, .junk-ex td { vertical-align: top; }
.junk-ex td:first-child, .junk-ex th:first-child { text-align: left; white-space: normal; min-width: 130px; }
.junk-ex .junk-url, .junk-ex th.junk-url { text-align: left; white-space: normal; min-width: 240px; max-width: 420px; overflow-wrap: anywhere; }
.junk-ex .junk-url .sub { margin-top: 2px; }
.junk-pick { display: grid; gap: 8px; margin: 4px 0 14px; }
.junk-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.junk-set { margin: 0; padding: 8px 12px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.junk-set legend { padding: 0 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.junk-check { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; color: var(--ink); font-size: 13px; line-height: 1.35; cursor: pointer; }
.junk-check input { margin-top: 2px; flex: none; }
.junk-t { align-items: center; margin-top: 4px; color: var(--ink-2); cursor: default; }
.junk-t select { margin-left: auto; padding: 3px 6px; font-size: 12.5px; }
.kpi-note { margin: 10px 0 0; max-width: 110ch; }
.hb-strong { border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 4px; }
.hb-strong .hb-label { font-weight: 600; color: var(--ink); }

/* Junk check: the every-page pipeline counts, then the sampled pages */
.subhead { margin: 28px 0 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sec h3.subhead:first-child { margin-top: 4px; }
.sec .junk-exact { margin-top: 28px; }
