/* BestKids.TV: small hand-written stylesheet.
   Bricolage Grotesque for display, Figtree for text; a bright "toy box" palette
   with chunky outlined cards and offset shadows. */
:root {
  --bg: #fff8ee;
  --bg-tint: #fff1dc;
  --surface: #ffffff;
  --fg: #1a1433;
  --muted: #5e5873;
  --line: #eadfcd;
  --edge: #1a1433;
  --shadow: #1a1433;

  --grape: #6b3cf5;
  --grape-soft: #ece5ff;
  --sun: #ffc933;
  --sun-soft: #fff1c2;
  --coral: #ff6b5b;
  --coral-soft: #ffe3df;
  --coral-ink: #b3261e;
  --mint: #1fcb93;
  --mint-soft: #d6f7ea;
  --mint-ink: #0a6e4d;
  --sky: #38b6ff;
  --sky-soft: #dbf1ff;
  --pink: #ff7ac6;

  --accent: var(--grape);
  --accent-fg: #ffffff;
  --link: #5a2ee0;
  --footer-bg: #1a1433;
  --footer-fg: #efeaff;

  --radius: 14px;
  --radius-lg: 22px;
  --gap: 1rem;
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130f26; --bg-tint: #1b1535; --surface: #211a40; --fg: #f4f0ff; --muted: #b2aad0;
    --line: #342b5c; --edge: #0a0716; --shadow: #6b3cf5;
    --grape: #8c68ff; --grape-soft: #2d2360; --sun-soft: #3a3014; --coral-soft: #3d1c24; --coral-ink: #ff9d92;
    --mint-soft: #123a31; --mint-ink: #6ee8bd; --sky-soft: #14304a;
    --accent: #8c68ff; --accent-fg: #ffffff; --link: #b9a3ff;
    --footer-bg: #0b0818; --footer-fg: #d9d2f5;
    color-scheme: dark;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; width: 100%; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--sun); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw + 1rem, 3.5rem); margin: 0 0 .75rem; }
h2 { font-size: clamp(1.4rem, 2vw + 1rem, 1.9rem); margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 1rem; }
mark { background: none; color: inherit; position: relative; white-space: nowrap; z-index: 0; }
mark::after { content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .06em; height: .38em; background: var(--sun); border-radius: 6px; transform: rotate(-1.5deg); z-index: -1; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 40rem) { .wrap { padding: 0 24px; } }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; background: var(--surface); color: var(--fg); padding: .5rem .75rem; border-radius: var(--radius); z-index: 30; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.stack > * + * { margin-top: .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 2px solid var(--edge); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; text-decoration: none; color: var(--fg); }
.brand svg { width: 38px; height: 38px; flex: none; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover svg { transform: rotate(-8deg) scale(1.06); }
.brand .tld { display: inline-block; background: var(--grape); color: #fff; padding: .02em .35em .08em; border-radius: 8px; margin-left: .08em; transform: rotate(-4deg); font-size: .85em; }
.header-nav { display: flex; align-items: center; gap: .25rem 1rem; flex-wrap: wrap; flex: 1 1 auto; justify-content: flex-end; }
.nav-links { display: flex; gap: .25rem; }
.nav-links a, .staff-nav > a { color: var(--fg); font-weight: 600; text-decoration: none; padding: .35rem .7rem; border-radius: 999px; }
.nav-links a:hover, .staff-nav > a:hover { background: var(--sun-soft); }
.nav-links a[aria-current=page] { background: var(--grape-soft); color: var(--link); }

/* Forms */
input, select, button, textarea { font: inherit; }
input[type=search], input[type=text], input[type=url], input[type=password], input[type=number], input[type=email], select, textarea {
  padding: .55rem .8rem; border: 2px solid var(--edge); border-radius: 12px; background: var(--surface); color: var(--fg); max-width: 100%;
}
@media (prefers-color-scheme: dark) {
  input[type=search], input[type=text], input[type=url], input[type=password], input[type=number], input[type=email], select, textarea { border-color: var(--line); }
}
input::placeholder { color: var(--muted); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b3cf5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 12px 8px;
}
input[type=checkbox] { accent-color: var(--grape); width: 1.1rem; height: 1.1rem; vertical-align: -.15em; margin: 0 .35rem 0 0; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1.1rem;
  border: 2px solid var(--edge); border-radius: 999px; background: var(--accent); color: var(--accent-fg);
  font-weight: 700; cursor: pointer; text-decoration: none; box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
button:hover, .button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
button:active, .button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
button.secondary, .button.secondary { background: var(--surface); color: var(--fg); }
button.small { padding: .15rem .6rem; font-size: .8125rem; box-shadow: 2px 2px 0 var(--shadow); }
.search { display: flex; flex: 1 1 16rem; max-width: 26rem; position: relative; }
.search input { flex: 1; min-width: 0; border-radius: 999px; padding-left: 1rem; padding-right: 6.2rem; }
.search button { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 1rem; box-shadow: none; border-width: 0; }
.search button:hover, .search button:active { transform: none; box-shadow: none; filter: brightness(1.1); }
.inline-form { display: inline; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .75rem 0; }

/* Page heroes */
.hero { position: relative; padding: 2.5rem 0 1.75rem; }
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.hero .lede a { font-weight: 600; }
.hero-compact { padding: 1.5rem 0 1.1rem; }
.hero-compact h1 { font-size: clamp(1.9rem, 2.5vw + 1rem, 2.75rem); max-width: none; margin-bottom: .4rem; }
.hero-compact .lede { font-size: 1.05rem; margin: 0; }
.page-title { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.page-title .provider-logo { width: 56px; height: 56px; border-radius: 14px; border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--shadow); }

/* Browse */
main { padding-top: .5rem; padding-bottom: 4rem; }
.browse { display: grid; gap: 1.25rem; align-items: start; }
.filter-panel { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); box-shadow: 5px 5px 0 var(--sun); }
.filter-panel > summary { cursor: pointer; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; padding: .7rem 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--grape); }
.filter-panel[open] > summary::after { content: "–"; }
@media (min-width: 48rem) { .filter-panel > summary { display: none; } }
/* One horizontal bar: dropdowns on the first row, "leave out" toggles on the second. */
.filters { padding: .3rem 1rem .9rem; display: grid; gap: .75rem; }
@media (min-width: 48rem) { .filters { padding: .9rem 1.1rem; } }
.filter-row { display: grid; gap: .6rem .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .filter-row { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); } }
.filters .field { display: grid; gap: .2rem; margin: 0; }
.filters .field > span { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filters select { width: 100%; padding: .4rem 2rem .4rem .7rem; font-size: .9375rem; border-radius: 10px; background-position: right .65rem center; }
.filter-foot { padding-top: .7rem; border-top: 2px dashed var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.dot-filter { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; padding: .25rem 0; }
.dot-filter { align-items: center; }
.dot-suffix { order: -1; margin-left: .4rem; font-size: .8125rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.dot-filter input { position: absolute; opacity: 0; width: 0; height: 0; }
.dot-filter label { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.dot-filter label:hover, .dot-filter label:hover ~ label { border-color: var(--coral); }
.dot-filter input:checked ~ label { background: var(--coral); border-color: var(--coral); }
.dot-filter input:focus-visible + label { outline: 3px solid var(--sky); outline-offset: 2px; }
.multi-select { position: relative; }
.multi-select > summary { list-style: none; cursor: pointer; padding: .4rem 2rem .4rem .7rem; font-size: .9375rem; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.multi-select > summary::-webkit-details-marker { display: none; }
.multi-select > summary::after { content: ""; position: absolute; right: .75rem; top: 50%; width: .4rem; height: .4rem; border-right: 2px solid var(--grape); border-bottom: 2px solid var(--grape); transform: translateY(-70%) rotate(45deg); }
.multi-select[open] > summary { border-color: var(--coral); }
.multi-select > summary:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.multi-options { position: absolute; z-index: 10; left: 0; min-width: 100%; margin-top: .25rem; padding: .3rem; max-height: 16rem; overflow-y: auto; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); box-shadow: 0 6px 18px rgb(0 0 0 / .12); }
.multi-option { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; border-radius: 6px; font-size: .9375rem; white-space: nowrap; cursor: pointer; }
.multi-option:hover { background: var(--coral-soft); }
.multi-option input { accent-color: var(--coral); }
.filters .toggles { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.filters .toggles legend { float: left; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0; margin-right: .25rem; }
.toggle { display: inline-flex; align-items: center; gap: .1rem; font-size: .875rem; font-weight: 700; padding: .2rem .7rem .2rem .45rem; border: 2px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; user-select: none; }
.toggle:hover { border-color: var(--coral); }
.toggle:has(input:checked) { background: var(--coral-soft); border-color: var(--coral); color: var(--coral-ink); }
.toggle:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.toggle input { accent-color: var(--coral); }
.filters .sort { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; }
.filters .sort > span { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.filters .sort select { width: auto; }
.result-count { font-weight: 700; color: var(--muted); margin-bottom: .9rem; }
.show-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
@media (min-width: 44rem) { .show-list { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); } }
.show-list > li:not(.show-card) { padding: 2rem; text-align: center; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius-lg); }
.show-card {
  position: relative; display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1rem;
  box-shadow: 5px 5px 0 var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.show-card:hover, .show-card:focus-within { transform: translate(-2px, -3px); box-shadow: 8px 8px 0 var(--shadow); }
.show-card h2, .show-card h3 { margin: 0 0 .15rem; font-size: 1.3rem; }
.show-card h2 a { color: var(--fg); text-decoration: none; }
.show-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.show-card h2 a:focus-visible { outline: none; }
.show-card:has(h2 a:focus-visible) { outline: 3px solid var(--sky); outline-offset: 3px; }
.show-card p { margin: 0 0 .5rem; }
.show-card .meta { font-size: .9rem; }
.show-card img, .show-card .poster-fallback { width: 5.5rem; aspect-ratio: 2 / 3; height: auto; object-fit: cover; border-radius: 12px; border: 2px solid var(--edge); }
.poster-fallback { display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: #fff; text-shadow: 2px 2px 0 rgba(26, 20, 51, .35); background: var(--tone, var(--grape)); background-image: radial-gradient(circle at 25% 20%, rgba(255,255,255,.35) 0 18%, transparent 19%), radial-gradient(circle at 85% 90%, rgba(255,255,255,.22) 0 26%, transparent 27%); }
.tone-0, .tone-5 { --tone: var(--grape); } .tone-1, .tone-6 { --tone: var(--coral); } .tone-2, .tone-7 { --tone: var(--mint); }
.tone-3, .tone-8 { --tone: var(--sky); } .tone-4, .tone-9 { --tone: var(--pink); }
.show-card .flags:empty { display: none; }
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 2rem; font-weight: 600; }
.pagination a { padding: .45rem 1rem; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--fg); text-decoration: none; box-shadow: 3px 3px 0 var(--shadow); }
.htmx-request #results, #results.htmx-request { opacity: .55; transition: opacity .2s; }

/* Scores and flags */
.scores { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .5rem 0; list-style: none; }
.badge { --c: var(--line); --c-soft: var(--bg-tint); display: inline-flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 600; background: var(--c-soft); border: 2px solid var(--c); border-radius: 999px; padding: .15rem .6rem .15rem .7rem; }
.badge .value { font-weight: 800; font-variant-numeric: tabular-nums; }
.badge .pips { display: inline-flex; gap: 2px; }
.badge .pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: .25; }
.badge .pips i.on { opacity: 1; }
.badge.none { border-style: dashed; }
.badge.none .value { font-weight: 500; color: var(--muted); }
.score-5, .score-4 { --c: var(--mint); --c-soft: var(--mint-soft); }
.score-3 { --c: var(--sun); --c-soft: var(--sun-soft); }
.score-2, .score-1 { --c: var(--coral); --c-soft: var(--coral-soft); }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8125rem; font-weight: 700; border-radius: 999px; padding: .15rem .65rem; margin: 0 .2rem .3rem 0; }
.chip::before { font-weight: 900; }
.chip.raised { background: var(--coral-soft); color: var(--coral-ink); }
.chip.raised::before { content: "!"; }
.chip.clear { background: var(--mint-soft); color: var(--mint-ink); }
.chip.clear::before { content: "✓"; }
.chip.unknown { background: var(--bg-tint); color: var(--muted); }
.chip.unknown::before { content: "?"; }
.provider-logo { width: 32px; height: 32px; border-radius: 8px; vertical-align: middle; }
/* Show detail: a full-width hero band, then the summary beside a jump list, then the detail */
.show-hero { margin-top: -.5rem; background: #6b3cf5; color: #fff; border-bottom: 3px solid var(--edge); padding: 2.2rem 0 2.4rem; overflow: hidden;
  background-image: radial-gradient(circle at 8% 20%, rgba(255,255,255,.14) 0 5rem, transparent 5.05rem), radial-gradient(circle at 92% 110%, rgba(255,201,51,.35) 0 9rem, transparent 9.05rem), radial-gradient(circle at 70% -10%, rgba(255,122,198,.35) 0 6rem, transparent 6.05rem); }
.show-hero .wrap { display: grid; gap: 1.25rem; align-items: center; grid-template-columns: 6.5rem 1fr; }
.show-hero-body { grid-column: 1 / -1; }
@media (min-width: 48rem) {
  .show-hero .wrap { grid-template-columns: 11rem 1fr; gap: .75rem 2.25rem; align-items: start; }
  .show-hero .wrap > :first-child { grid-row: span 2; align-self: center; }
  .show-hero-title { align-self: end; }
  .show-hero-body { grid-column: 2; }
}
.show-hero img, .show-hero .poster-fallback { width: 100%; aspect-ratio: 2 / 3; height: auto; object-fit: cover; border-radius: var(--radius-lg); border: 3px solid var(--edge); box-shadow: 8px 8px 0 var(--sun); transform: rotate(-3deg); }
.show-hero .poster-fallback { font-size: clamp(3rem, 8vw, 5rem); }
.show-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.show-hero h1 { color: #fff; margin: 0; text-shadow: 3px 3px 0 rgba(26, 20, 51, .35); }
.show-headline { margin: 0; padding: .25rem .8rem; background: var(--sun); color: #1a1433; border: 2px solid #1a1433; border-radius: 999px; font-weight: 800; white-space: nowrap; transform: rotate(-2deg); }
.show-facts { margin: .4rem 0 0; color: #e9e2ff; font-weight: 600; }
.show-facts span + span::before { content: " · "; }
.show-hero .overview { max-width: 46rem; margin: 0 0 1rem; color: #f4f0ff; }
.show-hero .scores { gap: .6rem; margin: 0 0 .6rem; }
.show-hero .badge { font-size: 1rem; padding: .35rem .95rem .35rem 1rem; gap: .6rem; background: var(--c); border-color: #1a1433; color: #1a1433; }
.show-hero .badge .pips i { width: 8px; height: 8px; background: #1a1433; }
.show-hero .badge .value { font-size: 1.05em; }
.show-hero .badge.none { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.show-hero .badge.none .value { color: #e9e2ff; }
.show-hero .flags { margin: 0; }
.show-hero .chip { font-size: .875rem; border: 2px solid #1a1433; }
.show-hero .chip.unknown { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.5); }
.show-intro { display: grid; gap: 1rem 3rem; margin-top: 2rem; align-items: start; }
@media (min-width: 52rem) { .show-intro { grid-template-columns: 1fr auto; } }
.show-intro .summary { position: relative; max-width: 50rem; margin: 0; padding-left: 3rem; font-size: 1.3rem; line-height: 1.5; }
.show-intro .summary::before { content: "“"; position: absolute; left: 0; top: -.9rem; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--pink); }
.show-jump { margin: 0; }
.show-jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 52rem) { .show-jump ul { flex-direction: column; } }
.show-jump a { display: flex; justify-content: space-between; align-items: center; gap: .75rem; white-space: nowrap; padding: .35rem .9rem; border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--fg); font-weight: 700; font-size: .9375rem; text-decoration: none; box-shadow: 3px 3px 0 var(--shadow); }
.show-jump a::after { content: "↓"; font-weight: 800; color: var(--grape); }
.show-jump a:hover { background: var(--sun-soft); }
.show-page section[id] { scroll-margin-top: 5rem; }
.watch-columns { display: grid; gap: 1.25rem; }
@media (min-width: 36rem) { .watch-columns { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .watch-columns { grid-template-columns: repeat(4, 1fr); } }
.watch-column h3 { margin-top: 0; }
.watch-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.watch-tiles a, .watch-tiles .tile { display: flex; align-items: center; gap: .75rem; min-height: 4.25rem; padding: .6rem 1rem .6rem .6rem; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--c); text-decoration: none; color: var(--fg); font-weight: 800; line-height: 1.25; transition: transform .12s, box-shadow .12s; }
.watch-tiles a:not(:has(img)), .watch-tiles .tile:not(:has(img)) { padding-left: 1rem; }
.watch-tiles a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--c); }
.watch-tiles .provider-logo { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.watch-tiles small { display: block; font-weight: 600; color: var(--muted); font-size: .8125rem; }
.watch-tiles .none { padding: .6rem 0; font-size: .9375rem; }
.watch-free { --c: var(--mint); } .watch-subscription { --c: var(--grape); } .watch-digital { --c: var(--sky); } .watch-disc { --c: var(--sun); }
.dimensions { display: grid; gap: 1rem; }
@media (min-width: 52rem) { .dimensions { grid-template-columns: repeat(3, 1fr); } }
.dimension { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; box-shadow: 5px 5px 0 var(--c, var(--line)); }
.dimension.flag { --c: var(--coral); }
.dimension h3 { margin-top: 0; }
.dimension p:last-child, .dimension ul:last-child { margin-bottom: 0; }
.dimension .big { display: flex; align-items: baseline; gap: .3rem; font-family: var(--font-display); margin-bottom: .35rem; }
.dimension .big strong { font-size: 3rem; line-height: 1; font-weight: 800; }
.dimension .big span { font-weight: 700; color: var(--muted); }
.meter { display: flex; gap: 4px; margin: .25rem 0 .9rem; }
.meter i { flex: 1; height: 8px; border-radius: 999px; background: var(--c, var(--line)); opacity: .2; }
.meter i.on { opacity: 1; }
.flag-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 52rem) { .flag-grid { grid-template-columns: repeat(3, 1fr); } }
.updated { margin: 2.5rem 0; }
.dimension .question { margin: -.35rem 0 .6rem; font-size: .9375rem; }
.score-key { display: grid; gap: .6rem; margin: 1rem 0; }
.score-key div { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: .6rem .9rem; }
.score-key dt { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.score-key dd { margin: 0; }

/* Prose pages */
.prose { max-width: 44rem; padding-top: 2rem; }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin: 2rem 0; }
.prose .lede { font-size: 1.2rem; }
.prose h2 { display: inline-block; position: relative; }
.prose h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.3rem; height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--grape), var(--pink), var(--sun)); }
.prose h2 + * { margin-top: 1rem; }
.prose table { font-size: .9375rem; margin: 1rem 0 1.5rem; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; display: block; overflow-x: auto; }
.prose th { background: var(--grape-soft); }
.prose li { margin: .3rem 0; }

/* Empty / error states */
.empty-state { text-align: center; max-width: 36rem; margin: 3rem auto; }
.empty-state .big-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 18vw, 9rem); line-height: 1; margin: 0; background: linear-gradient(135deg, var(--grape), var(--pink) 50%, var(--sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty-state .search { margin: 1.5rem auto; max-width: 26rem; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); font-size: .9rem; padding: 2.5rem 0 2rem; position: relative; margin-top: 2rem; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; background: radial-gradient(circle at 10px 14px, var(--footer-bg) 10px, transparent 10.5px) 0 0 / 20px 14px repeat-x; }
.site-footer a { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-weight: 700; }
.site-footer .footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #fff; margin: 0; }
.site-footer .footer-brand span { color: var(--sun); }
.attribution { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; opacity: .8; }
.attribution img { height: 12px; width: auto; }

/* Staff */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); margin: 1rem 0; }
.table-wrap tr:last-child td { border-bottom: 0; }
.compare { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .dimension { margin-bottom: 1rem; }
.messages { list-style: none; padding: 0; margin: 1rem 0; }
.messages li { padding: .65rem 1rem; border-radius: var(--radius); background: var(--mint-soft); color: var(--mint-ink); font-weight: 600; border: 2px solid var(--mint); }
.messages li.error { background: var(--coral-soft); color: var(--coral-ink); border-color: var(--coral); }
.staff-nav { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; justify-content: flex-end; flex: 1 1 auto; }
.staff-nav > a { white-space: nowrap; }
.nav-count { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; margin-left: .15rem; border-radius: 999px; background: var(--coral); color: #1a1433; font-size: .75rem; font-weight: 800; line-height: 1.4rem; text-align: center; vertical-align: text-bottom; }
.tiles .tile-count { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1.1; }
.tiles li.is-clear { --c: var(--line); }
.staff-main { padding-top: 1.5rem; }
.card { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1.2rem; margin-bottom: 1.25rem; box-shadow: 5px 5px 0 var(--shadow); }
.card h2 { margin-top: 0; }
.tiles { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.tiles li { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; box-shadow: 5px 5px 0 var(--c, var(--grape)); }
.tiles li:nth-child(2) { --c: var(--coral); } .tiles li:nth-child(3) { --c: var(--mint); } .tiles li:nth-child(4) { --c: var(--sun); }
.tiles a { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--fg); text-decoration: none; display: block; }
.login-box { max-width: 24rem; margin: 3rem auto; }
.login-box input { width: 100%; }
.login-box label { display: block; font-weight: 700; margin-bottom: .3rem; }

/* Staff pipeline */
.health { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.breadcrumbs { margin: 2rem 0 .5rem; font-weight: 600; font-size: .9375rem; }
.flow { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow-step { position: relative; display: flex; }
.flow-step:nth-child(6n+1) { --c: var(--grape); } .flow-step:nth-child(6n+2) { --c: var(--coral); }
.flow-step:nth-child(6n+3) { --c: var(--mint); } .flow-step:nth-child(6n+4) { --c: var(--sun); }
.flow-step:nth-child(6n+5) { --c: var(--sky); } .flow-step:nth-child(6n) { --c: var(--pink); }
/* Arrows between steps: down on one column, across within a row otherwise. */
.flow-step + .flow-step::before { content: "↓" / ""; position: absolute; left: 50%; top: -1.45rem; transform: translateX(-50%); font-weight: 800; color: var(--muted); }
@media (min-width: 40rem) {
  .flow-step + .flow-step::before { content: "→" / ""; left: -1.2rem; top: 50%; transform: translateY(-50%); }
  .flow-step:nth-child(2n+1)::before { display: none; }
}
@media (min-width: 64rem) {
  .flow-step:nth-child(2n+1)::before { display: block; }
  .flow-step:nth-child(4n+1)::before { display: none; }
}
.flow-card { flex: 1; display: flex; flex-direction: column; gap: .35rem; background: var(--surface); color: var(--fg); text-decoration: none; border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1rem 1.1rem; box-shadow: 5px 5px 0 var(--c); transition: transform .12s, box-shadow .12s; }
.flow-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--c); }
.flow-card.is-paused { border: 2px dashed var(--coral); }
.flow-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.flow-num { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--c); color: var(--fg); border: 2px solid var(--edge); font-weight: 800; font-size: .9375rem; }
.flow-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.flow-when { font-size: .8125rem; color: var(--muted); }
.flow-metrics { margin: .25rem 0; display: grid; gap: .2rem; }
.flow-metrics div { display: flex; justify-content: space-between; gap: .75rem; font-size: .875rem; }
.flow-metrics dt { color: var(--muted); }
.flow-metrics dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.flow-last { margin-top: auto; font-size: .8125rem; color: var(--muted); }
.run-state { display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .1rem .55rem; border-radius: 999px; border: 2px solid var(--s); background: var(--s-soft); color: var(--s-ink, var(--fg)); }
.run-state::before { margin-right: .3rem; }
.run-state.done { --s: var(--mint); --s-soft: var(--mint-soft); --s-ink: var(--mint-ink); }
.run-state.done::before { content: "✓" / ""; }
.run-state.failed, .run-state.stalled { --s: var(--coral); --s-soft: var(--coral-soft); --s-ink: var(--coral-ink); }
.run-state.failed::before { content: "✕" / ""; }
.run-state.stalled { border-style: dashed; }
.run-state.stalled::before { content: "!" / ""; }
.run-state.running { --s: var(--sky); --s-soft: var(--sky-soft); }
.run-state.running::before { content: "●" / ""; }
.run-state.queued { --s: var(--sun); --s-soft: var(--sun-soft); }
.run-state.queued::before { content: "…" / ""; }
.run-state.retry { --s: var(--sun); --s-soft: var(--sun-soft); border-style: dashed; }
.run-state.retry::before { content: "↻" / ""; }
.task-table code { font-size: .8125rem; word-break: break-all; }
.chain-run { display: inline-block; }
.state-counts { display: flex; flex-wrap: wrap; gap: .3rem; }
.state-counts .run-state { font-size: .6875rem; }
.breakdown td.zero { color: var(--muted); }
.funnel { margin: 1rem 0; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1rem 1.1rem; }
.funnel ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.funnel li { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr 4.5rem; gap: .2rem .75rem; align-items: center; }
.funnel-label { font-weight: 700; font-size: .9375rem; }
.funnel-track { height: 14px; background: var(--bg-tint); border-radius: 4px; overflow: hidden; }
.funnel-bar { display: block; height: 100%; min-width: 2px; background: var(--grape); border-radius: 0 4px 4px 0; }
.funnel-value { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.funnel-note { grid-column: 2 / -1; font-size: .8125rem; color: var(--muted); margin-top: -.2rem; }
@media (max-width: 39.99rem) {
  .funnel li { grid-template-columns: 1fr 3.5rem; }
  .funnel-label { grid-column: 1 / -1; }
  .funnel-note { grid-column: 1 / -1; }
}
.stats { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.stats li { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-weight: 700; font-size: .9375rem; }
.stat-note { font-size: .8125rem; color: var(--muted); }
.run-now p:last-of-type { margin-bottom: .75rem; }
.run-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1rem 0; }
.run-form label { display: flex; flex-direction: column; font-weight: 700; font-size: .875rem; gap: .2rem; }
.run-form input, .run-form select { padding: .45rem .6rem; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); }
.run-form input { width: 8rem; }
.settings { display: grid; gap: .3rem; margin: 0; }
.settings div { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.settings dt { color: var(--muted); }
.settings dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.error-text { color: var(--coral-ink); font-weight: 700; }
.warning-text { background: var(--sun-soft); border: 2px solid var(--sun); border-radius: var(--radius); padding: .5rem .8rem; }
.run-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
progress { width: 100%; max-width: 32rem; height: 14px; accent-color: var(--grape); display: block; margin-top: .3rem; }
.pager { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }

/* Staff show page */
.jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 .5rem; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: .5rem 0; }
.jump a { font-weight: 700; font-size: .875rem; text-decoration: none; color: var(--fg); background: var(--surface); border: 2px solid var(--edge); border-radius: 999px; padding: .2rem .7rem; }
.jump a:hover { background: var(--sun-soft); }
.stage-section { scroll-margin-top: 4rem; border-top: 2px dashed var(--line); margin-top: 2rem; padding-top: .5rem; }
.stage-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.stage-head h2 { margin: 1rem 0 .25rem; display: flex; align-items: center; gap: .6rem; }
/* Same colours as the pipeline overview's cards. */
#discover { --c: var(--grape); } #triage { --c: var(--coral); } #refresh { --c: var(--mint); }
#gather { --c: var(--sun); } #fetch { --c: var(--sky); } #extract { --c: var(--pink); } #score { --c: var(--grape); }
.stage-last { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.stage-last > a:last-child { margin-left: auto; }
.inline-edit { margin: .75rem 0; }
.inline-edit > summary { cursor: pointer; font-weight: 700; color: var(--link); width: fit-content; }
.edit-form { display: grid; gap: .6rem; max-width: 44rem; margin-top: .6rem; }
.edit-form label { display: grid; gap: .2rem; font-weight: 700; font-size: .875rem; }
.edit-form input, .edit-form textarea, .edit-form select { padding: .45rem .6rem; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); width: 100%; font-weight: 400; }
.edit-form button { justify-self: start; }
.row-actions { white-space: nowrap; }
.row-actions > * + * { margin-left: .3rem; }
.is-off, tr.is-off td { opacity: .6; }
.thumb { border-radius: 6px; border: 2px solid var(--edge); vertical-align: middle; }
.lock { display: inline-flex; gap: .3rem; align-items: center; margin-left: .3rem; }
.lock-chip { background: var(--sun-soft); border: 2px solid var(--sun); margin: 0; }
.extract-row { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: .8rem 1rem; margin: .8rem 0; }
.extract-head { display: flex; gap: .75rem; justify-content: space-between; align-items: start; }
.evidence-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .5rem; }
.evidence { display: flex; flex-wrap: wrap; gap: .3rem .75rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: .5rem; }
.evidence-main { flex: 1 1 24rem; }
.evidence-key { background: var(--grape-soft); margin: 0 .25rem 0 0; }
.evidence-stance { font-weight: 800; font-variant-numeric: tabular-nums; margin-right: .25rem; }
.evidence-actions { display: flex; flex-wrap: wrap; gap: .3rem; align-items: start; }
.evidence-actions .inline-edit { margin: 0; flex-basis: 100%; }
.status-active { background: var(--mint-soft); color: var(--mint-ink); }
.status-candidate { background: var(--sun-soft); }
.status-rejected, .status-hidden { background: var(--coral-soft); color: var(--coral-ink); }
.fetch-ok, .fetch-unchanged { background: var(--mint-soft); color: var(--mint-ink); }
.fetch-pending { background: var(--sun-soft); }
.chip[class*="fetch-"]:not(.fetch-ok):not(.fetch-unchanged):not(.fetch-pending) { background: var(--coral-soft); color: var(--coral-ink); }
.messages li.warning, .messages li.info { background: var(--sun-soft); color: var(--fg); border-color: var(--sun); }

/* Best-of lists: read like a magazine article, in one centred column */
.guide { max-width: 46rem; margin: 0 auto; padding-top: 1rem; }
.guide.guide-hub { max-width: none; }
.guide .breadcrumbs { margin: .5rem 0 0; }
.guide-head { max-width: 46rem; padding: 1rem 0 .5rem; }
.guide-head h1 { font-size: clamp(1.9rem, 3vw + 1rem, 3rem); margin-bottom: 1rem; }
.guide-head .lede { font-size: 1.25rem; line-height: 1.55; margin: 0 0 1rem; }
.byline { margin: 0; padding-bottom: 1rem; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .9375rem; font-weight: 600; }
.age-links { margin: 1rem 0; font-size: .9375rem; line-height: 1.9; }
.age-links > span { font-weight: 800; color: var(--muted); margin-right: .15rem; }
.age-links a, .age-links strong { white-space: nowrap; }
.age-links a:not(:last-child)::after, .age-links strong:not(:last-child)::after { content: "·"; display: inline-block; margin: 0 .45rem; color: var(--muted); font-weight: 400; }
.age-links strong { color: var(--fg); }
.guide .how { margin: 2rem 0 0; padding-top: .5rem; border-top: 2px solid var(--line); color: var(--muted); }
.guide .how h2 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; color: var(--fg); }
.guide .how p { margin: 0; }
.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-item { padding: 1.75rem 0; border-top: 2px solid var(--line); }
.guide-item:first-child { border-top: 0; padding-top: .5rem; }
.guide-item h2 { margin: 0 0 1rem; font-size: clamp(1.5rem, 1.5vw + 1rem, 1.9rem); }
.guide-item h2 a { color: var(--fg); text-decoration-color: var(--sun); }
.guide-item .rank { color: var(--grape); margin-right: .15rem; }
.guide-item-body { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; align-items: start; }
.guide-poster img, .guide-poster .poster-fallback { display: block; width: 100%; aspect-ratio: 2 / 3; height: auto; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--edge); box-shadow: 5px 5px 0 var(--sun); transform: rotate(-2deg); }
.guide-poster .poster-fallback { font-size: 3.5rem; }
.guide-item p { margin: 0 0 .75rem; }
.guide-item .meta { color: var(--muted); font-weight: 600; font-size: .9375rem; margin-bottom: .5rem; }
.guide-item .scores { margin: 0 0 .75rem; }
.guide-item .read-more { margin: 0; font-weight: 700; }
.guide-item .read-more a::after { content: " →"; }
.guide-empty { max-width: 46rem; margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius-lg); }
.guide-more { margin-top: 1rem; padding-top: .5rem; border-top: 2px solid var(--line); }
.guide-more h2 { font-size: 1.3rem; margin-top: 1.5rem; }
.guide-links { padding-left: 1.2rem; margin: 0; columns: 2 14rem; column-gap: 2rem; }
.guide-links li { margin: 0 0 .35rem; break-inside: avoid; }
.guide-links a { font-weight: 600; }
.guide-section > h2 { margin-top: 2rem; }
.guide-index { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 52rem) { .guide-index { grid-template-columns: 1fr 1fr; } }
.guide-index > li { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1rem 1.2rem; box-shadow: 5px 5px 0 var(--c, var(--grape)); }
.guide-index > li:nth-child(4n+2) { --c: var(--coral); } .guide-index > li:nth-child(4n+3) { --c: var(--mint); } .guide-index > li:nth-child(4n) { --c: var(--sun); }
.guide-index h3 { margin: 0 0 .35rem; font-size: 1.25rem; }
.guide-index h3 a { color: var(--fg); }
.guide-index p { margin: 0; }
.guide-index .age-links { margin: .5rem 0 0; font-size: .875rem; line-height: 1.7; }
@media (max-width: 39.99rem) {
  .guide-item-body { grid-template-columns: 5.5rem 1fr; gap: 1rem; }
  .guide-poster .poster-fallback { font-size: 2rem; }
}
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
main > h1:first-child, main > .messages:first-child { margin-top: 2rem; }

/* Phones: a static, tighter header and smaller posters. */
@media (max-width: 39.99rem) {
  .site-header { position: static; }
  .brand { font-size: 1.25rem; }
  .brand svg { width: 32px; height: 32px; }
  .header-nav { justify-content: space-between; }
  .search { max-width: none; }
  .show-card { grid-template-columns: 4rem 1fr; gap: .8rem; padding: .85rem; }
  .show-card img, .show-card .poster-fallback { width: 4rem; font-size: 1.8rem; }
  .badge { white-space: nowrap; }
}

/* Staff pages: wide, dense tables */
.wrap-wide { max-width: 112rem; }
/* External links open in a new tab and say so. */
.staff a[target="_blank"]::after, .providers a[target="_blank"]::after { content: "↗" / " (opens in a new tab)"; display: inline-block; margin-left: .2em; font-size: .8em; font-weight: 700; text-decoration: none; }
.compact { font-size: .875rem; }
.compact th, .compact td { padding: .28rem .55rem; line-height: 1.35; white-space: nowrap; vertical-align: middle; }
.compact th { font-size: .72rem; }
/* One line per row: long values are clipped (full text in the tooltip); click a row to see it all. */
.clip { display: inline-block; max-width: var(--clip, 22rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.clip-s { --clip: min(10rem, 12vw); } .clip-m { --clip: min(16rem, 14vw); } .clip-l { --clip: min(34rem, 20vw); } .clip-xl { --clip: min(48rem, 36vw); }
.compact tbody tr[data-expandable] { cursor: zoom-in; }
.compact tbody tr.expanded { cursor: zoom-out; background: var(--bg-tint); }
.compact tr.expanded td { white-space: normal; }
.compact tr.expanded .clip { white-space: normal; overflow: visible; max-width: none; display: inline; }
.compact .chip { margin: 0; padding: .05rem .5rem; font-size: .75rem; }
.compact button.small, .compact .button.small { padding: .05rem .5rem; font-size: .75rem; box-shadow: 1px 1px 0 var(--shadow); }
.compact .inline-form { margin: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-tools { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: end; margin: .75rem 0 -.25rem; font-size: .875rem; }
.table-tools label { display: flex; flex-direction: column; gap: .15rem; font-weight: 700; font-size: .8125rem; }
.table-tools label.check { flex-direction: row; align-items: center; font-weight: 600; }
.table-tools input[type=search], .table-tools select { padding: .3rem .5rem; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); font-size: .875rem; }
.table-tools .filter-count { color: var(--muted); margin-left: auto; }
.table-pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; font-size: .8125rem; margin: -.6rem 0 1rem; }
.table-pager button { padding: .1rem .6rem; font-size: .8125rem; box-shadow: 1px 1px 0 var(--shadow); }
[popover].pop-form { border: 2px solid var(--edge); border-radius: var(--radius-lg); background: var(--surface); color: var(--fg); padding: 1rem 1.2rem; box-shadow: 6px 6px 0 var(--shadow); width: min(36rem, 92vw); }
[popover].pop-form::backdrop { background: rgba(26, 20, 51, .35); }
.pop-form h3 { margin-top: 0; }
.reasons { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .2rem .8rem; font-weight: 400; }
.reasons legend { font-weight: 700; font-size: .875rem; margin-bottom: .3rem; padding: 0; }
.verdict-correct { background: var(--mint-soft); color: var(--mint-ink); }
.verdict-corrected { background: var(--sun-soft); }
.verdict-wrong { background: var(--coral-soft); color: var(--coral-ink); }
.verdict-none { background: var(--bg-tint); color: var(--muted); }
.was { color: var(--muted); text-decoration: line-through; }
.review-layout { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 72rem) { .review-layout { grid-template-columns: minmax(16rem, 5fr) minmax(0, 12fr); } }
.page-text { font-family: inherit; position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow: auto; white-space: pre-wrap; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: .8rem 1rem; font-size: .9rem; line-height: 1.5; margin: 0; }
.pre-block { white-space: pre-wrap; overflow: auto; max-height: 32rem; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: .8rem 1rem; font-size: .8125rem; margin: .5rem 0 1rem; }
.bar-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
[popover]:not(:popover-open) { display: none; }
.edit-form label.check, .reasons label.check { display: flex; flex-direction: row; align-items: center; gap: .1rem; font-weight: 400; }
.edit-form input[type=checkbox] { width: auto; }
.staff h1.long { font-size: clamp(1.5rem, 1.5vw + 1rem, 2.2rem); }
[popover].pop-form { margin: auto; inset: 0; height: fit-content; max-height: 90vh; overflow: auto; }
.review-layout > :first-child { align-self: stretch; }
.compact tr:not(.expanded) .more { display: none; }
.clip-claim { --clip: min(32rem, 19vw); }
/* Show page: each stage is a collapsible section */
details.stage-section { border-top: 0; margin-top: .75rem; padding: 0; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); box-shadow: 4px 4px 0 var(--c, var(--line)); }
details.stage-section > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; padding: .6rem 1rem; }
details.stage-section > summary::-webkit-details-marker { display: none; }
details.stage-section > summary::before { content: "▸" / ""; font-weight: 800; color: var(--muted); transition: transform .15s; }
details.stage-section[open] > summary::before { transform: rotate(90deg); }
details.stage-section > summary h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: .5rem; }
details.stage-section > summary .glance { color: var(--muted); font-size: .875rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
details.stage-section > summary .stage-link { font-size: .875rem; font-weight: 700; }
.stage-body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.stage-body > p:first-child { margin-top: .75rem; }
details.runs { margin: .5rem 0; }
details.runs > summary { cursor: pointer; font-size: .875rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
details.runs > summary .show-all { color: var(--link); font-weight: 700; }
details.runs[open] > summary .show-all { display: none; }
.kv th { width: 14rem; text-transform: none; letter-spacing: 0; font-size: .8125rem; font-weight: 700; }
.section-tools { display: flex; gap: .5rem; margin: .5rem 0; }
.cascade-choice { display: inline-flex; margin-left: auto; }
.pause-card.is-paused { box-shadow: 5px 5px 0 var(--coral); border-color: var(--coral); }
.paused-chip { background: var(--coral-soft); color: var(--coral-ink); margin: 0; }
.cascade-choice label { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; font-weight: 700; }
.cascade-choice select { padding: .15rem 1.8rem .15rem .5rem; font-size: .8125rem; border-radius: 8px; background-position: right .5rem center; }
.stage-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .75rem 0; }
.stage-actions .muted { flex: 1 1 20rem; }
.staff [id] { scroll-margin-top: 5.5rem; }
/* Staff messages float in view, wherever the page has scrolled to. */
.staff .toasts { position: fixed; top: 5.5rem; right: 1rem; z-index: 40; width: min(30rem, calc(100vw - 2rem)); display: grid; gap: .5rem; margin: 0; pointer-events: none; }
.staff .toasts li { pointer-events: auto; display: flex; gap: .75rem; align-items: start; justify-content: space-between; box-shadow: 4px 4px 0 var(--shadow); animation: toast-in .2s ease-out; }
.staff .toasts li.leaving { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
.toasts .toast-close { flex: none; background: none; border: 0; box-shadow: none; padding: 0 .2rem; font-size: 1.1rem; line-height: 1; color: inherit; cursor: pointer; }
.toasts .toast-close:hover, .toasts .toast-close:active { transform: none; box-shadow: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
button[aria-busy="true"] { cursor: progress; opacity: .8; }
button[aria-busy="true"]::before { content: "" / ""; display: inline-block; width: .8em; height: .8em; margin-right: .4em; vertical-align: -.1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.run-live { display: inline-flex; flex-wrap: wrap; gap: .35rem; align-items: center; }

/* Staff: integrations */
.integrations { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); margin-bottom: 1.5rem; }
.integration { --c: var(--mint); background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-lg); padding: 1rem 1.1rem; box-shadow: 4px 4px 0 var(--c); display: flex; flex-direction: column; gap: .1rem; }
.integration.level-warn { --c: var(--sun); }
.integration.level-over { --c: var(--coral); }
.integration.is-idle { --c: var(--line); }
.integration p { margin: .25rem 0; }
.integration-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.integration-head h3 { margin: 0; font-size: 1.15rem; }
.integration-links { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-weight: 700; }
.integration-facts { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .75rem; margin: .4rem 0; }
.integration-facts > div { display: contents; }
.integration-facts dt { font-weight: 700; color: var(--muted); }
.integration-facts dd { margin: 0; }
.chip.state-on { background: var(--mint-soft); color: var(--mint-ink); }
.chip.state-idle { background: var(--sun-soft); }
.chip.state-off { background: var(--bg-tint); color: var(--muted); }
.chip.src-live { background: var(--sky-soft); }
.chip.src-counted { background: var(--grape-soft); }
.usage-bar { position: relative; height: 12px; border-radius: 999px; background: var(--bg-tint); border: 2px solid var(--edge); overflow: hidden; margin-top: .4rem; }
.usage-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.usage-bar .projected { background: repeating-linear-gradient(135deg, var(--c) 0 4px, transparent 4px 8px); opacity: .6; }
.usage-bar .used { background: var(--c); z-index: 1; }
.spark { display: flex; align-items: end; gap: 2px; height: 28px; margin-top: .5rem; }
.spark i { flex: 1; min-height: 1px; background: var(--grape); border-radius: 2px 2px 0 0; opacity: .75; }
.plan-edit { margin-top: auto; padding-top: .5rem; }
.plan-edit summary { cursor: pointer; font-weight: 700; color: var(--link); }
.plan-form div { display: flex; flex-direction: column; gap: .15rem; margin: .5rem 0; font-size: .875rem; }
.plan-form label { font-weight: 700; }
.plan-form input, .plan-form select { padding: .3rem .5rem; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--fg); }
.card.attention { box-shadow: 5px 5px 0 var(--coral); }
