/* Verso admin view (docs/admin-view.md). Self-hosted: the page loads nothing from anywhere else. */
:root {
  --ground: #fcfcfb; --panel: #ffffff; --ink: #1a1a19; --ink-2: #33312d; --muted: #55534e; --faint: #6b6963;
  --line: #e4e3df; --line-2: #ecebe7; --rule: #d9d8d4; --field: #c9c8c3; --hover: #f5f4f1; --head: #1a1a19; --head-2: #2e2d2b;
  --link: #1c5cab; --link-hover: #0d366b; --bar: #2a78d6; --bar-weak: #86b6ef; --info: #f2f6fc; --info-line: #cde2fb;
  --good: #0ca30c; --warn: #d4622f; --differs: #eb6834; --bit-on: #3a3936; --bit-off: #e4e3df;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.45 var(--sans); }
a { color: var(--link); } a:hover { color: var(--link-hover); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
h1 { margin: 0; font-size: 28px; font-weight: 600; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }
p { margin: 0; }

header.top { background: var(--head); color: #fff; }
header.top .in { max-width: 1360px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
header.top .brand { font-weight: 600; font-size: 16px; }
header.top .pills { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
header.top .pill { background: var(--head-2); padding: 3px 8px; border-radius: 4px; font-family: var(--mono); }
header.top nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
header.top nav a { color: var(--rule); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
header.top nav a:hover, header.top nav a.on { color: #fff; background: var(--head-2); }
header.top form { margin: 0; }
header.top button { background: none; border: 1px solid var(--head-2); color: var(--rule); border-radius: 6px; padding: 5px 10px; font: inherit; cursor: pointer; }

main { max-width: 1360px; margin: 0 auto; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.titles { display: flex; flex-direction: column; gap: 14px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); }
.tabs a { text-decoration: none; padding: 10px 2px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.crumbs { font-size: 13px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-2); }
.facts b { font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; color: var(--faint); }
.info { background: var(--info); border: 1px solid var(--info-line); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); }
.info b { font-weight: 600; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.card.pad { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .wide { flex: 999 1 640px; min-width: 0; }
.cols > .narrow { flex: 1 1 340px; min-width: 0; }
.scroll { overflow-x: auto; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.tbl tr:hover td { background: var(--hover); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .stack { display: flex; flex-direction: column; gap: 2px; }
.tbl tr.picked td { background: var(--info); }

.fit { display: flex; align-items: center; gap: 8px; }
.bar { width: 96px; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; display: inline-block; }
.bar > span { display: block; height: 6px; border-radius: 3px; background: var(--bar); }
.bar.weak > span { background: var(--bar-weak); }

form.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
form.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
input, select { height: 40px; padding: 0 10px; border: 1px solid var(--field); border-radius: 6px; font: inherit; background: var(--panel); color: var(--ink); }
button.go { height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--field); border-radius: 18px; text-decoration: none; color: var(--ink-2); font-size: 13px; background: var(--panel); }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.status { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.status.agreed::before { background: var(--good); }
.status.contested::before { background: var(--warn); border-radius: 2px; transform: rotate(45deg); }
.status.shifted::before { background: var(--bar); }
.status.none::before { background: transparent; border: 2px solid var(--faint); width: 8px; height: 8px; }

.strips { display: flex; flex-direction: column; gap: 4px; min-width: 900px; }
.strip-row { display: grid; grid-template-columns: 170px 110px 1fr 130px 90px; gap: 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.strip { display: flex; gap: 2px; align-items: center; height: 24px; }
.strip i { flex: 1 1 0; min-width: 5px; height: 14px; border-radius: 2px; background: var(--bit-off); }
.strip i.on { background: var(--bit-on); }
.strip i.diff { height: 22px; background: var(--differs); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 12px; color: var(--muted); }
.legend .sw { display: inline-block; width: 16px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }
.legend .sw.on { background: var(--bit-on); } .legend .sw.off { background: var(--bit-off); } .legend .sw.diff { background: var(--differs); height: 18px; }

.matrix { display: grid; gap: 2px; min-width: 820px; }
.matrix .colhead { padding: 0 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; overflow-wrap: anywhere; font-size: 12px; }
.matrix .rowhead { display: flex; flex-direction: column; justify-content: center; padding-right: 12px; height: 64px; }
.matrix .cell { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 64px; border-radius: 4px; text-decoration: none; font-variant-numeric: tabular-nums; }
.matrix .cell b { font-size: 15px; } .matrix .cell span { font-size: 11px; }
.matrix a.cell:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.matrix .empty { background: var(--hover); border: 1px dashed var(--rule); }
.s0 { background: #cde2fb; color: #1a1a19; } .s1 { background: #9ec5f4; color: #1a1a19; } .s2 { background: #5598e7; color: #1a1a19; }
.s3 { background: #256abf; color: #fff; } .s4 { background: #104281; color: #fff; }
.matrix .cell.s3, .matrix .cell.s4 { color: #fff; } .matrix .cell.s0, .matrix .cell.s1, .matrix .cell.s2 { color: #1a1a19; }

.login { max-width: 420px; margin: 12vh auto; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 20px 16px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line-2); }

/* Generated steps: the CSP allows no inline styles. */
.bar > span.w0 { width: 0%; } .bar > span.w1 { width: 5%; } .bar > span.w2 { width: 10%; } .bar > span.w3 { width: 15%; } .bar > span.w4 { width: 20%; } .bar > span.w5 { width: 25%; } .bar > span.w6 { width: 30%; } .bar > span.w7 { width: 35%; } .bar > span.w8 { width: 40%; } .bar > span.w9 { width: 45%; } .bar > span.w10 { width: 50%; } .bar > span.w11 { width: 55%; } .bar > span.w12 { width: 60%; } .bar > span.w13 { width: 65%; } .bar > span.w14 { width: 70%; } .bar > span.w15 { width: 75%; } .bar > span.w16 { width: 80%; } .bar > span.w17 { width: 85%; } .bar > span.w18 { width: 90%; } .bar > span.w19 { width: 95%; } .bar > span.w20 { width: 100%; }
.matrix.c1 { grid-template-columns: 170px repeat(1, minmax(104px, 1fr)); } .matrix.c2 { grid-template-columns: 170px repeat(2, minmax(104px, 1fr)); } .matrix.c3 { grid-template-columns: 170px repeat(3, minmax(104px, 1fr)); } .matrix.c4 { grid-template-columns: 170px repeat(4, minmax(104px, 1fr)); } .matrix.c5 { grid-template-columns: 170px repeat(5, minmax(104px, 1fr)); } .matrix.c6 { grid-template-columns: 170px repeat(6, minmax(104px, 1fr)); } .matrix.c7 { grid-template-columns: 170px repeat(7, minmax(104px, 1fr)); } .matrix.c8 { grid-template-columns: 170px repeat(8, minmax(104px, 1fr)); } .matrix.c9 { grid-template-columns: 170px repeat(9, minmax(104px, 1fr)); } .matrix.c10 { grid-template-columns: 170px repeat(10, minmax(104px, 1fr)); } .matrix.c11 { grid-template-columns: 170px repeat(11, minmax(104px, 1fr)); } .matrix.c12 { grid-template-columns: 170px repeat(12, minmax(104px, 1fr)); }
.pad { padding: 16px 20px; }
.card > .head.pad { padding-bottom: 8px; }
.card > .chips.pad { padding-top: 0; }
.legend .sw.empty-sw { background: var(--hover); border: 1px dashed var(--rule); }
.cols ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }

/* Curation (B7/B9): forms, buttons and notices. */
.notice { border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.notice.ok { background: #eaf6ea; border: 1px solid #b9e0b9; color: #1d4d1d; }
.notice.err { background: #fbeee8; border: 1px solid #f1c6b3; color: #6b2a0f; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
form.inline input { height: 32px; }
form.stacked { display: flex; flex-direction: column; gap: 12px; }
form.stacked label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
form.stacked label.check, form.filters label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
label.check input { height: auto; }
textarea { padding: 8px 10px; border: 1px solid var(--field); border-radius: 6px; font: 13px/1.4 var(--mono); background: var(--panel); color: var(--ink); resize: vertical; }
button.act { height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--field); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
button.act:hover { border-color: var(--ink); }
button.act.danger { color: #8a2c0b; border-color: #f1c6b3; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tbl td.wrap { white-space: normal; min-width: 160px; }
.tbl tr.off td { color: var(--faint); }
.warn { color: var(--warn); }
.notice.rename { background: #fff7e8; border: 1px solid #f3d9a6; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.strong { font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border: 1px solid var(--field); border-radius: 16px; background: var(--panel); }
.tag button.act { height: 24px; padding: 0 8px; border: none; }
