:root {
  color-scheme: light dark;
  --gap: 1rem;
  --bg: #eef1f3;
  --surface: #fff;
  --ink: #14202b;
  --muted: #566572;
  --line: #cdd6dc;
  --accent: #0b6468;
  --gold: #a8741a;
  --gold-ink: #fff;
  --found: #24559f;
  --danger: #b3261e;
  --warn-bg: #fdf0c9;
  --ok: #1d7a46;
  --primary: #0b6468;
  --primary-ink: #fff;
  --status-ready: #0b6468;
  --status-candidate: #a8650a;
  --status-accepted: #24559f;
  --status-prospect: #566572;
  --status-promoted: #8a5f12;
  --status-queued: #6a3fa0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10171d;
    --surface: #17212a;
    --ink: #e6ecf0;
    --muted: #97a6b2;
    --line: #2c3a45;
    --accent: #55c2c6;
    --gold: #e0b25a;
    --gold-ink: #1b1403;
    --found: #86adf0;
    --danger: #ff8a80;
    --warn-bg: #3d3411;
    --ok: #6fd39a;
    --primary: #55c2c6;
    --primary-ink: #06282a;
    --status-ready: #55c2c6;
    --status-candidate: #f0b45a;
    --status-accepted: #86adf0;
    --status-prospect: #97a6b2;
    --status-promoted: #e0b25a;
    --status-queued: #c3a2f0;
  }
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--found); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); padding: .6rem var(--gap); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 1.15rem; }
.top form { margin-left: auto; }
.numbers { display: flex; flex-wrap: wrap; gap: .25rem var(--gap); list-style: none; margin: 0; padding: 0; }
.numbers a, .tabs a, .subtabs a, .types a { color: inherit; text-decoration: none; }
.numbers .alert b { color: var(--danger); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 var(--gap); padding: 0 var(--gap); background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs a { display: inline-block; padding: .65rem 0; }
.tabs a:hover { text-decoration: underline; }
main { padding: var(--gap); max-width: 80rem; }
.banner { margin: 0; padding: .5rem var(--gap); background: var(--warn-bg); }
.banner.wait { border-left: 4px solid var(--status-candidate); margin-bottom: var(--gap); }
.muted { color: var(--muted); }
main.login { max-width: 24rem; margin: 4rem auto; }
.login form { display: grid; gap: .5rem; }
.error { color: var(--danger); }
button, input, select { font: inherit; padding: .45rem .7rem; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
button { cursor: pointer; }

h1 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: .8rem 0 .6rem; }
h1 .sub, .title .sub { font-family: system-ui, sans-serif; font-size: .9rem; font-weight: 400; color: var(--muted); }
.crumb { margin: 0 0 .5rem; }

.types { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.types a { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); min-height: 2.5rem; display: inline-flex; align-items: center; }
.types a[aria-current], .subtabs a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.subtabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin-bottom: .25rem; }
.subtabs a { padding: .45rem .7rem; border-radius: 4px; min-height: 2.5rem; display: inline-flex; align-items: center; gap: .35rem; }
.subtabs a:hover { background: var(--surface); }
.subtabs b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.subtabs a[aria-current] b { color: inherit; }

.filterbox { margin: .6rem 0; }
.filterbox summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: .3rem 0 1rem; }
.field { display: grid; gap: .15rem; }
.field label { font-size: .8rem; color: var(--muted); }
.field input[type="search"] { min-width: 12rem; }
.field.check label { display: flex; align-items: center; gap: .4rem; }
.count { color: var(--muted); margin: .25rem 0; font-size: .9rem; }
.empty { padding: 1.2rem; background: var(--surface); border: 1px dashed var(--line); border-radius: 6px; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.row { display: grid; grid-template-columns: 2.75rem 60px minmax(0, 1fr) 14rem 13rem; gap: .5rem var(--gap); align-items: start; padding: .7rem .8rem .7rem 0; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--status-prospect); border-radius: 6px; }
.row[data-status="ready"] { border-left-color: var(--status-ready); }
.row[data-status="candidate"] { border-left-color: var(--status-candidate); }
.row[data-status="accepted"] { border-left-color: var(--status-accepted); }
.row[data-status="promoted"] { border-left-color: var(--status-promoted); }
.row[data-status="queued"] { border-left-color: var(--status-queued); }
.pick { display: grid; place-items: center; min-height: 2.75rem; }
.pick input { width: 1.25rem; height: 1.25rem; padding: 0; }
.poster { width: 60px; height: 90px; object-fit: cover; border-radius: 3px; background: var(--line); }
.poster.none { display: grid; place-items: center; font-family: var(--serif); font-size: 1.8rem; color: var(--muted); border: 1px solid var(--line); background: transparent; }
.poster.big { width: 100px; height: 150px; font-size: 2.6rem; flex: none; }
.title { margin: 0; font-family: var(--serif); font-size: 1.1rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.title a { color: inherit; }
.facts { display: flex; flex-wrap: wrap; gap: .1rem .8rem; margin: .25rem 0 0; color: var(--muted); font-size: .88rem; }
.note { margin: .35rem 0 0; font-size: .88rem; overflow-wrap: anywhere; }

.level { display: grid; gap: .35rem; }
.ladder { display: flex; flex-wrap: wrap; gap: .25rem; }
.notch { font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; border: 2px dashed var(--line); color: var(--muted); white-space: nowrap; }
.notch.gold { background: var(--gold); border: 2px solid var(--gold); color: var(--gold-ink); }
.notch.found { border: 2px solid var(--found); color: var(--found); }
.levelnote { display: grid; font-size: .82rem; color: var(--muted); }
.when { display: grid; gap: .1rem; font-size: .85rem; color: var(--muted); justify-items: start; }
.pill { font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; border: 1.5px solid currentColor; }
.pill.ready { color: var(--status-ready); }
.pill.candidate { color: var(--status-candidate); }
.pill.accepted { color: var(--status-accepted); }
.pill.prospect { color: var(--status-prospect); }
.pill.promoted { color: var(--status-promoted); }
.pill.queued { color: var(--status-queued); }
.pill.deferred, .pill.inflight { color: var(--status-queued); }

.pager { display: flex; gap: var(--gap); align-items: center; margin: var(--gap) 0; }
.pager a { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); text-decoration: none; }

.itemhead { display: flex; gap: var(--gap); align-items: flex-start; }
.itemhead h1 { margin-top: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .8rem var(--gap); margin: 0 0 var(--gap); }
.panel h2 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 .6rem; }
.panel .count { font-family: system-ui, sans-serif; font-size: .85rem; }
.panel.attention { border-left: 5px solid var(--danger); }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem var(--gap); margin: 0; }
.facts-grid.tight { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); margin-top: .5rem; }
.facts-grid dt { font-size: .78rem; color: var(--muted); }
.facts-grid dd { margin: 0; overflow-wrap: anywhere; }
.releases, .plainlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.release { padding: .7rem; border: 1px solid var(--line); border-radius: 6px; }
.release[data-inflight] { border-color: var(--status-queued); border-width: 2px; }
.relhead { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.relstate { font-weight: 600; }
.relstate.checks_failed, .relstate.blacklisted { color: var(--danger); }
.relstate.checks_passed, .relstate.promoted { color: var(--status-ready); }
.chip { font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; border: 1.5px solid var(--found); color: var(--found); }
.reltitle { margin: .4rem 0 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.chips li { font-size: .78rem; padding: .05rem .5rem; background: var(--bg); border-radius: 4px; }
.failures { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--danger); font-size: .88rem; }
.check { margin: .5rem 0 0; font-size: .88rem; overflow-wrap: anywhere; }
.plainlist li { display: flex; flex-wrap: wrap; gap: .1rem .7rem; align-items: baseline; padding-bottom: .5rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.plainlist li:last-child { border-bottom: 0; }
.plainlist span { color: var(--muted); font-size: .88rem; }
.jobstatus.failed { color: var(--danger); }
.blocked { color: var(--status-candidate); }

@media (max-width: 760px) {
  main { padding: .6rem; }
  .top { gap: .2rem .8rem; }
  .top .brand { order: 1; }
  .top form { order: 2; }
  .top .numbers { order: 3; width: 100%; }
  .tabs, .subtabs, .types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .tabs a, .subtabs a, .types a { white-space: nowrap; flex: none; }
  .banner { font-size: .85rem; }
  .row { grid-template-columns: 60px minmax(0, 1fr) 2.75rem; grid-template-areas: "poster main pick" "level level level" "when when when"; padding: .7rem; }
  .row .pick { grid-area: pick; }
  .row .poster { grid-area: poster; }
  .row .main { grid-area: main; }
  .row .level { grid-area: level; }
  .row .when { grid-area: when; grid-auto-flow: row; }
  .field input[type="search"], .field select { width: 100%; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .itemhead .poster.big { width: 70px; height: 105px; font-size: 1.8rem; }
}

.requests { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .25rem; }
.reqlabel { font-weight: 600; margin-right: .4rem; }
.joblog { margin: 0; padding: .6rem .75rem; max-height: 24rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: .4rem; }
.logend { color: var(--muted); font-size: .8rem; }

button:disabled { cursor: not-allowed; color: var(--muted); border-style: dashed; }
button.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
button.primary:disabled { background: transparent; color: var(--muted); border-color: var(--line); }
button, .toolbar select { min-height: 2.75rem; }
.hint { margin: .25rem 0 0; font-size: .85rem; color: var(--muted); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em; background: var(--bg); padding: .05rem .3rem; border-radius: 3px; }
.pill.source { color: var(--ok); }

.refreshbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem var(--gap); margin: 0 0 .5rem; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
.actionresult:empty { display: none; }
.actionresult { margin: .5rem 0; }
.bulk { display: block; }
.toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .6rem; margin: 0 0 .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.selcount { margin-right: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.options { margin: 0 0 .6rem; padding: .2rem .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.options summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.options fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 .6rem; display: grid; gap: .6rem; }
.options legend { padding: 0 .3rem; color: var(--muted); font-size: .85rem; }
.options .field input[type="text"], .options .field select { width: 100%; max-width: 24rem; }
.itemactions .buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }

.requests { margin: 0; }
.request.pending { color: var(--muted); }
.request.accepted { color: var(--ok); }
.request.refused { color: var(--danger); }
.autosend { display: inline; }
.inlineform { display: inline-block; margin: .3rem .5rem .3rem 0; }

.jobcard { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--status-queued); border-radius: 6px; padding: .7rem .8rem; margin: .5rem 0; overflow-wrap: anywhere; }
.jobcard .jobcard { margin: .6rem 0 0; box-shadow: none; }
.jobhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.jobhead h3 { margin: 0; font-family: var(--serif); font-size: 1.05rem; }
.jobid { font-family: system-ui, sans-serif; font-size: .82rem; font-weight: 400; }
.jobitem { font-size: .88rem; }
.stagepill { margin-left: auto; font-size: .78rem; font-weight: 600; padding: .1rem .6rem; border-radius: 999px; border: 1.5px solid currentColor; color: var(--status-prospect); white-space: nowrap; }
.stage-queued .stagepill { color: var(--status-queued); }
.stage-running .stagepill, .stage-committing .stagepill, .stage-applying_next .stagepill { color: var(--found); }
.stage-plan_ready .stagepill, .stage-done .stagepill, .stage-applied .stagepill { color: var(--ok); }
.stage-needs_confirm .stagepill, .stage-blocked .stagepill, .stage-apply_stopped .stagepill { color: var(--status-candidate); }
.stage-failed .stagepill { color: var(--danger); }
.outcome { margin: .5rem 0 .2rem; font-weight: 600; }
.gatemsg { margin: .2rem 0; padding: .4rem .6rem; background: var(--bg); border-radius: 4px; white-space: pre-wrap; font-size: .85rem; }
.callout { margin: .5rem 0; padding: .5rem .7rem; background: var(--warn-bg); border-left: 4px solid var(--status-candidate); border-radius: 4px; }
.counts { display: flex; flex-wrap: wrap; gap: .3rem .5rem; list-style: none; padding: 0; margin: .5rem 0; }
.counts li { padding: .2rem .6rem; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; }
.counts li.warn { border-color: var(--status-candidate); color: var(--status-candidate); }
.confirmbox { margin: .6rem 0 .2rem; }
.logbox { margin-top: .6rem; }
.logbox summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.cancelreason { color: var(--muted); font-size: .85rem; }

@media (max-width: 760px) {
  .toolbar { position: sticky; top: auto; bottom: 0; box-shadow: 0 -2px 0 var(--bg); }
  .toolbar button { flex: 1 1 8rem; }
  .selcount { flex: 1 0 100%; }
  .refreshbar button { flex: 1 1 auto; }
  .jobhead .stagepill { margin-left: 0; }
}
.refreshpair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.banners { display: grid; gap: .5rem; }
.banners:has(.alertbar) { margin: 0 0 var(--gap); }
.alertbar { padding: .6rem .9rem; border-radius: 6px; border: 1px solid var(--line); border-left: 6px solid var(--status-candidate); background: var(--warn-bg); }
.alertbar.danger { border-left-color: var(--danger); }
.alertbar p { margin: 0 0 .3rem; }
.alertbar p:last-child { margin-bottom: 0; }
.alertbar .plainlist { margin-top: .4rem; }
.alertbar .plainlist li { border-bottom-color: color-mix(in srgb, var(--ink) 15%, transparent); }

.auditrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.auditrow { padding: .65rem .9rem; border-bottom: 1px solid var(--line); border-left: 5px solid var(--line); overflow-wrap: anywhere; }
.auditrow:last-child { border-bottom: 0; }
.auditrow.ev-login_failed, .auditrow.ev-download_failed { border-left-color: var(--danger); }
.auditrow.ev-search, .auditrow.ev-release_found, .auditrow.ev-detector_run { border-left-color: var(--found); }
.auditrow.ev-promote_apply { border-left-color: var(--gold); }
.auditrow.ev-release_accept, .auditrow.ev-reactivate { border-left-color: var(--ok); }
.auditrow.ev-release_reject, .auditrow.ev-defer { border-left-color: var(--status-queued); }
.auditrow.ev-settings_change, .auditrow.ev-override_change { border-left-color: var(--status-candidate); }
.auditline { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .75rem; }
.auditlabel { font-weight: 600; }
.auditline time, .auditline .actor { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.outcomechip { font-size: .78rem; padding: .05rem .5rem; border-radius: 999px; border: 1.5px solid var(--muted); color: var(--muted); }
.outcomechip.ok, .outcomechip.found, .outcomechip.passed { border-color: var(--ok); color: var(--ok); }
.outcomechip.error, .outcomechip.failed, .outcomechip.gate_abort { border-color: var(--danger); color: var(--danger); }
.change s { color: var(--muted); }
.auditsum { margin: .2rem 0 0; }
.auditlinks { display: flex; flex-wrap: wrap; gap: .1rem .75rem; margin: .2rem 0 0; font-size: .88rem; }
.auditlinks span { color: var(--muted); }
.auditdetail { margin-top: .3rem; }
.auditdetail summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.kv { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); gap: .15rem .9rem; margin: .3rem 0 0; font-size: .88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.filters .clear { align-self: center; }
.filters input[type="date"] { min-height: 2.5rem; }

@media (max-width: 760px) {
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .field input, .filters .field select { width: 100%; min-width: 0; }
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin-bottom: .3rem; }
  .auditrow { padding: .6rem .6rem; }
}

button.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.pill.held { color: var(--status-queued); }
.pill.ok { color: var(--ok); }
.pill.off { color: var(--muted); }
.refreshhook { display: none; }

.release { border-left: 5px solid var(--line); }
.release[data-state="found"] { border-left-color: var(--found); }
.release[data-state="accepted"], .release[data-state="downloading"], .release[data-state="awaiting_validation"], .release[data-state="validating"] { border-left-color: var(--status-accepted); }
.release[data-state="checks_passed"], .release[data-state="promoted"] { border-left-color: var(--ok); }
.release[data-state="checks_blocked"] { border-left-color: var(--status-candidate); }
.release[data-state="checks_failed"], .release[data-state="blacklisted"] { border-left-color: var(--danger); }
.release[data-state="blacklisted"] .reltitle { text-decoration: line-through; color: var(--muted); }
.relstate.checks_blocked { color: var(--status-candidate); }

.strip { display: flex; list-style: none; margin: .55rem 0 .2rem; padding: 0; counter-reset: none; }
.strip li { flex: 1 1 0; position: relative; display: grid; justify-items: start; gap: .2rem; font-size: .76rem; color: var(--muted); min-width: 0; }
.strip .dot { width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); position: relative; z-index: 1; }
.strip li::before { content: ""; position: absolute; top: .3rem; left: .7rem; right: 0; height: 2px; background: var(--line); }
.strip li:last-child::before { display: none; }
.strip li.done .dot { background: var(--accent); border-color: var(--accent); }
.strip li.done::before { background: var(--accent); }
.strip li.here { color: var(--ink); font-weight: 600; }
.strip li.here .dot { width: .85rem; height: .85rem; margin: -.075rem 0 -.075rem -.075rem; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.strip li.here.warn .dot { border-color: var(--status-candidate); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-candidate) 25%, transparent); }
.strip li.here.bad .dot { border-color: var(--danger); background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.stepname { white-space: nowrap; }

.checknote { margin: .6rem 0 0; padding: .5rem .7rem; background: var(--bg); border-radius: 4px; font-size: .9rem; overflow-wrap: anywhere; }
.checknote p { margin: 0 0 .25rem; }
.checknote p:last-child { margin-bottom: 0; }
.checknote.held { border-left: 4px solid var(--status-queued); }
.dlnote { margin: .5rem 0 0; font-size: .9rem; }
.cardrelease { margin: .5rem 0; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 4px; }
.cardrelease .reltitle { margin-top: 0; }

.reldock { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .7rem 0 0; padding-top: .7rem; border-top: 1px dashed var(--line); }
.reldock .hint { flex: 1 0 100%; margin: 0; }
.warnbox { flex: 1 0 100%; padding: .5rem .7rem; background: var(--warn-bg); border-left: 4px solid var(--status-candidate); border-radius: 4px; min-height: 0; align-items: flex-start; }
.overrides { flex: 1 0 100%; padding: .2rem .7rem .6rem; background: var(--bg); border-radius: 6px; display: block; }
.overrides[open] { display: grid; gap: .6rem; }
.overrides summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.overrides .field input[type="text"], .overrides .field select { width: 100%; max-width: 24rem; }
.overrides > button { justify-self: start; }

.rowactions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.rowactions button { min-height: 2.5rem; }

.addrelease { margin: .6rem 0 0; padding: .2rem .7rem .7rem; background: var(--bg); border-radius: 6px; }
.addrelease summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.pasteform, .uploadform { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: .5rem 0 0; }
.field.grow { flex: 1 1 18rem; }
.field.grow input { width: 100%; }

.facts-grid .wide { grid-column: span 2; }
.facts-grid .why { display: block; font-size: .85rem; color: var(--muted); }
.levelflag { color: var(--status-candidate); }
.levelhelp { margin: -.4rem 0 1rem; }
.levelhelp summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.levelhelp ul { margin: 0; padding-left: 1.2rem; font-size: .88rem; color: var(--muted); }
.searchbudget { flex: 1 0 100%; margin: 0; }

.numbers .backlog .delta { font-size: .82rem; }
.delta.down, .big.down { color: var(--ok); }
.delta.up, .big.up { color: var(--status-candidate); }
.delta.flat { color: var(--muted); }
.facts-grid.backlog { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.facts-grid dd.big { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

.pollers { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.poller h3 { margin: 0 0 .4rem; font-family: var(--serif); font-size: 1.05rem; display: flex; gap: .6rem; align-items: baseline; }
.poller.off { opacity: .8; }
.facts-grid dd.bad { color: var(--danger); font-weight: 600; }
.imports { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.import { padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 6px; }
.import[data-state="checks_passed"] { border-left-color: var(--ok); }
.import[data-state="checks_failed"] { border-left-color: var(--danger); }
.import[data-state="checks_blocked"] { border-left-color: var(--status-candidate); }
.import time { color: var(--muted); font-size: .85rem; }
.followups { margin-top: .5rem; }
.alertbar.warn[role="status"] { margin: 0 0 var(--gap); }

@media (max-width: 760px) {
  .stepname { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .strip li.here .stepname { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .strip li.here { flex: 3 1 0; }
  .facts-grid .wide { grid-column: 1 / -1; }
  .facts-grid.tight { grid-template-columns: 1fr 1fr; }
  .reldock button, .reldock .inline { min-height: 2.75rem; }
  .reldock > button { flex: 1 1 8rem; }
  .pasteform > button, .uploadform > button { flex: 1 1 100%; }
  .rowactions button { flex: 1 1 8rem; }
  .numbers .backlog .delta { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .strip li.here .dot { transition: box-shadow .2s ease; }
}

.settinglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.setting { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting.changed { box-shadow: inset 4px 0 0 var(--status-candidate); padding-left: .7rem; }
.setting form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem); gap: .2rem var(--gap); align-items: start; }
.settinglabel { display: grid; gap: .1rem; }
.settinglabel > label, .settinglabel > b { font-weight: 600; }
.settinglabel .pill { justify-self: start; }
.settingvalue { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.settingvalue input[type="number"] { width: 7.5rem; }
.settingvalue select { max-width: 100%; }
.settingvalue .unit { color: var(--muted); font-size: .88rem; }
.settingrange { grid-column: 2; margin: 0; }
.setting .actionresult { grid-column: 1 / -1; }
.groupintro { margin: -.3rem 0 .4rem; }
.switch .consequence { grid-column: 1; }
.switch .consequence label { align-items: flex-start; font-size: .92rem; color: var(--ink); }
.switch .consequence input { margin-top: .25rem; flex: none; }
.danger-zone { border-left: 5px solid var(--danger); }
button.danger:disabled { opacity: .55; cursor: not-allowed; }
.unit { color: var(--muted); font-size: .9rem; font-family: system-ui, sans-serif; }
.countsets { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.countsets h3, #summary-region h3 { margin: 0 0 .4rem; font-size: .95rem; font-weight: 600; }
#summary-region > h3 { margin-top: var(--gap); }
.countlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.countlist li { display: inline-flex; gap: .35rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.weekchart { display: block; width: 100%; height: 5.5rem; }
.weekchart rect { fill: var(--found); }
.weekchart.after rect { fill: var(--accent); }
.weekchart line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.weekaxis { display: flex; justify-content: space-between; gap: var(--gap); flex-wrap: wrap; }
.scrambleform { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
.scrambleform .field input { width: 8rem; }
.scramblecharts { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--gap); margin: .5rem 0; }
.scramblecharts figure { margin: 0; }
.scramblecharts figcaption { font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
.numbers-table summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; color: var(--accent); }
.numbers-table table { border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .88rem; }
.numbers-table th, .numbers-table td { padding: .15rem .8rem .15rem 0; text-align: left; }
.numbers-table tbody { display: block; max-height: 14rem; overflow: auto; }
.numbers-table thead, .numbers-table tbody tr { display: table; width: 100%; table-layout: fixed; }

.bans, .serieslist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ban, .seriesrow { padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--danger); border-radius: 6px; }
.seriesrow { border-left-color: var(--line); }
.ban time { color: var(--muted); font-size: .85rem; }
.ban .reldock { border-top-style: dashed; }

.ovform { display: flex; flex-wrap: wrap; gap: .7rem var(--gap); align-items: start; }
.ovform .field.grow { flex: 1 1 16rem; }
.ovform .field input[type="text"] { width: 100%; }
.ovform .reldock { flex: 1 0 100%; }
.ovstate { margin: .2rem 0 .6rem; }
.previewbox { padding: .6rem .8rem; background: var(--bg); border-radius: 6px; }
.previewbox .plainlist .reltitle { margin: 0; }

@media (max-width: 760px) {
  .facts-grid.summary { grid-template-columns: 1fr 1fr; }
  .setting form { grid-template-columns: 1fr; }
  .settingrange { grid-column: 1; }
  .settingvalue input[type="number"] { flex: 1 1 6rem; }
  .settingvalue button, .scrambleform button { min-height: 2.75rem; flex: 1 1 7rem; }
  .scrambleform .field { flex: 1 1 100%; }
  .scrambleform .field input { width: 100%; }
  .ban .reldock > button { flex: 1 1 8rem; min-height: 2.75rem; }
}

.pill.anime { color: var(--status-queued); }
.hint.notice, .hint.reportonly { color: var(--status-candidate); }
.numbers .bytype a { margin-left: .5rem; }

.pill.format { color: var(--accent); }
.pill.verdict-ok { color: var(--ok); }
.pill.verdict-bad { color: var(--danger); }
.pill.verdict-warn { color: var(--status-candidate); }
.pill.verdict-none { color: var(--muted); }
.verdict { margin: .35rem 0 0; }
.checks { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; padding: 0; margin: .4rem 0 0; font-size: .85rem; }
.checks li { display: flex; flex-wrap: wrap; gap: 0 .35rem; align-items: baseline; padding: .15rem .55rem; border: 1px solid var(--line); border-left-width: 4px; border-radius: 4px; background: var(--surface); }
.checks:not(.mini) li { flex: 1 1 14rem; min-width: 0; flex-direction: column; overflow-wrap: anywhere; }
.checks li.pass { border-left-color: var(--ok); }
.checks li.fail { border-left-color: var(--danger); }
.checks li.unknown { border-left-color: var(--status-candidate); }
.checks li.na { border-left-color: var(--line); color: var(--muted); }
.checkname { font-weight: 600; }
.checks li.fail .checkword { color: var(--danger); font-weight: 600; }
.checks li.unknown .checkword { color: var(--status-candidate); font-weight: 600; }
.checkdetail { flex-basis: 100%; color: var(--muted); overflow-wrap: anywhere; }
.verdict .hint { margin: .25rem 0 0; }
.applynotice { margin: .5rem 0; padding: .5rem .7rem; border-left: 4px solid var(--ok); background: var(--surface); border-radius: 4px; }
.applynotice.off { border-left-color: var(--status-candidate); background: var(--warn-bg); }
.bookplan h4 { margin: .7rem 0 .2rem; font-size: .9rem; }
.planlist { margin: 0; padding-left: 1.1rem; }
.planlist li { overflow-wrap: anywhere; }
.planlist code { font-size: .85rem; }
.row.unrequested .when { align-items: flex-start; }
