/* vfc-reviews (VFC-1544) - the signed-in pages. The palette is the one the reports use, so the frame
   and the page around it read as one document. No external font, no external request of any kind. */
:root {
  --ground: #F5F1EF; --surface: #FFFFFF; --surface-2: #EDE7E3; --ink: #272B21; --ink-2: #4A4E40;
  --mute: #7A746E; --rule: #E4DDD7; --accent: #AA6230; --accent-2: #874626;
  --blocker: #9C3A2A; --blocker-bg: #F3E0DA; --high: #AA6230; --high-bg: #F4E6DB;
  --med: #5F6553; --med-bg: #E6EADF; --low: #7A746E; --low-bg: #EDE7E3; --ok: #3F7D4F; --ok-bg: #E4EFE1;
  --shadow: 0 1px 0 rgba(39,43,33,.04), 0 2px 12px rgba(39,43,33,.06);
  --font: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --masthead-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1B1D17; --surface: #24271F; --surface-2: #2D3027; --ink: #ECE7E2; --ink-2: #C9C4BC;
    --mute: #9D978F; --rule: #393D31; --accent: #DDAC8A; --accent-2: #E9C1A6;
    --blocker: #E7937F; --blocker-bg: #3D2520; --high: #DDAC8A; --high-bg: #3A2D22;
    --med: #B8C0A8; --med-bg: #2D3228; --low: #A8A29A; --low-bg: #2E2C29; --ok: #8FC39B; --ok-bg: #223026;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #1B1D17; --surface: #24271F; --surface-2: #2D3027; --ink: #ECE7E2; --ink-2: #C9C4BC;
  --mute: #9D978F; --rule: #393D31; --accent: #DDAC8A; --accent-2: #E9C1A6;
  --blocker: #E7937F; --blocker-bg: #3D2520; --high: #DDAC8A; --high-bg: #3A2D22;
  --med: #B8C0A8; --med-bg: #2D3228; --low: #A8A29A; --low-bg: #2E2C29; --ok: #8FC39B; --ok-bg: #223026;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--mute); }

.masthead { height: var(--masthead-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--rule); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.crest { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--ground); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--mute); }
.tools { display: flex; align-items: center; gap: 10px; }
.whoami { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid transparent; font-weight: 600; }
.btn-primary { background: var(--accent); color: #fff; padding: 10px 16px; font-size: 14px; }
.btn-primary:hover { background: var(--accent-2); }
:root[data-theme="dark"] .btn-primary, :root:not([data-theme="light"]) .btn-primary { color: var(--ground); }
.btn-ghost { background: var(--surface); border-color: var(--rule); color: var(--ink); padding: 7px 12px; font-size: 12.5px; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-link { background: none; border: 0; color: var(--accent); padding: 2px 4px; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
button:disabled { opacity: .5; cursor: progress; }

.view { padding: 24px; max-width: 1240px; margin: 0 auto; }
.view.wide { max-width: none; padding: 0; }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.panel-hd { padding: 18px 22px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-hd h1, .panel-hd h2 { margin: 0; font-size: 16px; }
.panel-bd { padding: 18px 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; color: var(--accent); }

.state { max-width: 560px; margin: 48px auto; text-align: center; }
.state h1 { font-size: 22px; margin: 0 0 8px; }
.state p { margin: 0 0 18px; color: var(--ink-2); }
.state .mono { display: block; margin-top: 8px; }

.filter { display: flex; align-items: center; gap: 10px; }
.filter label { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; color: var(--mute); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface-2); }
td .title { display: block; font-weight: 600; }
td .sub { display: block; color: var(--mute); font-size: 12px; margin-top: 2px; }

.chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.chip.merge { color: var(--ok); background: var(--ok-bg); }
.chip.merge-after-fixes { color: var(--high); background: var(--high-bg); }
.chip.do-not-merge { color: var(--blocker); background: var(--blocker-bg); }
.chip.running, .chip.in-review { color: var(--med); background: var(--med-bg); }
.chip.blocked, .chip.failed { color: var(--blocker); background: var(--blocker-bg); }
.chip.none { color: var(--mute); background: var(--low-bg); }

.tally { display: inline-flex; gap: 4px; }
.tally span { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.tally .blocker { color: var(--blocker); background: var(--blocker-bg); }
.tally .high { color: var(--high); background: var(--high-bg); }
.tally .medium { color: var(--med); background: var(--med-bg); }
.tally .low { color: var(--low); background: var(--low-bg); }
.tally .zero { opacity: .45; }

.viewer { display: grid; grid-template-rows: auto 1fr; height: calc(100vh - var(--masthead-h)); }
.viewer-hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--rule); background: var(--surface); flex-wrap: wrap; }
.viewer-hd .crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewer-hd h1 { margin: 0; font-size: 15px; }
.viewer-hd .meta { color: var(--mute); font-size: 12.5px; }
.viewer-body { display: grid; grid-template-columns: 1fr 300px; min-height: 0; }
.viewer-body.solo { grid-template-columns: 1fr; }
/* The report is a document of its own, in a frame with NO scripts and NO origin. The frame has a fixed
   height (the viewport under the header) and scrolls itself, so the page never needs to measure it. */
.report-frame { width: 100%; height: 100%; border: 0; background: var(--ground); display: block; }
.side { border-left: 1px solid var(--rule); background: var(--surface); overflow: auto; padding: 16px 18px; }
.side h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 0 0 10px; }
.side ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.side li { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; }
.side li .path { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.side li .desc { color: var(--mute); font-size: 12px; margin-top: 2px; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12.5px; }
.side dt { color: var(--mute); }
.side dd { margin: 0; word-break: break-all; }

.notice { padding: 12px 16px; border-radius: 8px; background: var(--high-bg); color: var(--high); }
.notice.error { background: var(--blocker-bg); color: var(--blocker); }

@media (max-width: 820px) {
  .viewer-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side { border-left: 0; border-top: 1px solid var(--rule); max-height: 40vh; }
  .brand-sub { display: none; }
}
