/* Fleet Attention demo — component + surface styles.
 * Rebuilds the design system surfaces in plain CSS (no framework). Pairs with
 * fa-tokens.css. Keyframes faDrawerIn / faPulse are defined here (they lived in the
 * design's offline HTML bundles). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  transition: background var(--t-hover), color var(--t-hover);
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button { font-family: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 4px; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.ico { display: inline-flex; align-items: center; }
.ico svg { width: 15px; height: 15px; display: block; }
.btn .ico svg { width: 16px; height: 16px; }
.dropzone .glyph svg { width: 100%; height: 100%; }

/* ---------- layout shell ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--line); gap: 16px;
}
.topbar .right { display: flex; align-items: center; gap: 16px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 36px 32px 64px; }
.wrap.narrow { max-width: 860px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.spread { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }

/* FA split-square icon: teal left half "F", navy right half "A" */
.fa-split-square {
  display: flex; flex: none;
  width: 36px; height: 36px; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
}
[data-theme="light"] .fa-split-square { border-color: var(--line); }
.fa-split-square .fa-split-f,
.fa-split-square .fa-split-a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 800; font-size: 17px; color: #ffffff; line-height: 1;
  user-select: none;
}
.fa-split-square .fa-split-f { background: var(--teal); }
.fa-split-square .fa-split-a { background: var(--navy); }

/* Wordmark */
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.2; }
.brand-product {
  display: flex; align-items: baseline; gap: 0;
  font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
}
.brand-fleet { color: var(--teal); }
.brand-attention { color: var(--navy); }
.brand--dark .brand-attention { color: #ffffff; }
[data-theme="dark"] .brand-attention { color: #ffffff; }
.brand-sub {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
  color: var(--ink-3); margin-top: 1px;
}
.brand--dark .brand-sub { color: var(--sidebar-ink-2); }

.powered { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); }
.vessel-switch {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 12px; background: var(--surface); cursor: default;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--raised);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--ink-2);
}

/* ---------- type primitives ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--teal); border-radius: 2px; }
.two-weight { font-size: 40px; line-height: 1.08; letter-spacing: -0.02em; font-weight: 300; color: var(--ink-2); margin: 0; }
.two-weight .payoff { font-weight: 600; color: var(--ink); }
.section-kicker {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  font-weight: 700; margin: 14px 0 6px;
}
h2.title { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-button); font-size: 13px; font-weight: 600; padding: 10px 16px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--t-hover), border-color var(--t-hover), opacity var(--t-hover);
}
.btn.full { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 12px; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--raised); }
.btn-destructive { background: transparent; color: var(--red); border-color: transparent; }
.btn-destructive:hover { background: var(--red-soft); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- status pill / chip ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pill[data-status="red"] { background: var(--red-soft); color: var(--red); }
.pill[data-status="orange"] { background: var(--orange-soft); color: var(--orange); }
.pill[data-status="green"] { background: var(--green-soft); color: var(--green); }
.pill[data-status="unknown"] { background: var(--unknown-soft); color: var(--unknown); }
.pill[data-status="red"] .dot { background: var(--red); }
.pill[data-status="orange"] .dot { background: var(--orange); }
.pill[data-status="green"] .dot { background: var(--green); }
.pill[data-status="unknown"] .dot { background: var(--unknown); }
.pill.solid { color: #fff; }
.pill.solid[data-status="red"] { background: var(--red); }
.pill.solid[data-status="orange"] { background: var(--orange); }
.pill.solid[data-status="green"] { background: var(--green); }
.pill.solid[data-status="unknown"] { background: var(--unknown); }

/* review-status chip (cockpit) */
.rs-chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--line-2); color: var(--ink-2);
}
.rs-chip[data-rs="approved"] { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.rs-chip[data-rs="rejected"] { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.rs-chip[data-rs="changes_requested"] { color: var(--orange); border-color: var(--orange); background: var(--orange-soft); }
.rs-chip[data-rs="draft"] { color: var(--ink-3); }

/* ---------- status block (result tiles) ---------- */
.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.blocks.with-green { grid-template-columns: repeat(4, 1fr); }
.block {
  border-radius: var(--r-card); padding: 16px 18px; min-height: 96px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
}
.block.outline { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); }
.block.outline[data-status="red"] { border-left-color: var(--red); }
.block.outline[data-status="orange"] { border-left-color: var(--orange); }
.block.outline[data-status="green"] { border-left-color: var(--green); }
.block.outline[data-status="unknown"] { border-left-color: var(--unknown); }
.block.solid { color: var(--on-status); border: none; }
.block.solid[data-status="red"] { background: var(--red); }
.block.solid[data-status="orange"] { background: var(--orange); }
.block.solid[data-status="green"] { background: var(--green); }
.block.solid[data-status="unknown"] { background: var(--unknown); }
.block.solid .kicker { opacity: 0.85; }
.block.solid .lbl { opacity: 0.85; }
.block .kicker { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; opacity: 0.92; }
.block .count { font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.block .lbl { font-size: 12.5px; font-weight: 600; }
.block.clickable { cursor: pointer; transition: transform var(--t-hover); }
.block.clickable:hover { transform: translateY(-2px); }
.block.solid.clickable:hover { transform: none; filter: brightness(0.95); }

.green-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px dashed var(--line-2); border-radius: var(--r-row); padding: 10px 16px;
  font-size: 12.5px; color: var(--ink-2); margin-top: 12px;
}
.green-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 5px 10px 5px 12px; font-size: 12px; font-weight: 600;
  color: var(--ink-2); background: var(--surface); cursor: pointer;
}
.green-toggle .track { width: 30px; height: 16px; border-radius: var(--r-pill); background: var(--line-2); position: relative; transition: background var(--t-hover); }
.green-toggle .thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left var(--t-hover); }
.green-toggle.on { color: var(--green); border-color: var(--green); }
.green-toggle.on .track { background: var(--green); }
.green-toggle.on .thumb { left: 16px; }

/* ---------- drop zone ---------- */
.dropzone {
  border: 1.5px dashed var(--teal); border-radius: var(--r-card); background: var(--teal-soft);
  padding: 56px 32px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 14px; transition: background var(--t-hover), border-color var(--t-hover);
}
.dropzone.dragover { background: rgba(13, 158, 117, 0.14); border-color: var(--teal-hover); }
.dropzone .glyph { width: 56px; height: 56px; color: var(--teal); opacity: 0.85; }
.dropzone .hint { font-size: 13px; color: var(--ink-3); max-width: 420px; }

/* ---------- file rows ---------- */
.filelist { display: flex; flex-direction: column; gap: 8px; }
.filerow {
  display: grid; grid-template-columns: 4px 34px 1fr 120px 92px; align-items: center; gap: 14px;
  padding: 12px 16px 12px 0; border: 1px solid var(--line); border-radius: var(--r-row);
  background: var(--surface); overflow: hidden;
}
.filerow .spine { width: 4px; align-self: stretch; background: var(--line-2); }
.filerow[data-status="red"] .spine { background: var(--red); }
.filerow[data-status="orange"] .spine { background: var(--orange); }
.filerow[data-status="green"] .spine { background: var(--green); }
.filerow[data-status="unknown"] .spine { background: var(--unknown); }
.filerow[data-status="error"] .spine { background: var(--ink-3); }
.filerow .ficon { width: 34px; height: 34px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--ink-3); }
.filerow .fname { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.filerow .fcls { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.filerow .fmeta { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.state-chip { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.state-chip.reading { color: var(--teal); display: inline-flex; align-items: center; gap: 6px; }
.progress { width: 100%; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal); transition: width 180ms linear; }

/* resolved per-file state chip (traffic-light meaning) */
.fstate { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.fstate .fdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fstate[data-status="red"] { color: var(--red); } .fstate[data-status="red"] .fdot { background: var(--red); }
.fstate[data-status="orange"] { color: var(--orange); } .fstate[data-status="orange"] .fdot { background: var(--orange); }
.fstate[data-status="unknown"] { color: var(--unknown); } .fstate[data-status="unknown"] .fdot { background: var(--unknown); }
.fstate[data-status="green"] { color: var(--green); } .fstate[data-status="green"] .fdot { background: var(--green); }

/* reading progress steps */
.reading-help { font-size: 13px; line-height: 1.5; color: var(--ink-3); max-width: 580px; margin-top: 10px; }
.read-steps { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.read-step { display: inline-flex; align-items: center; gap: 8px; }
.read-step-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 1.5px solid var(--line-2); color: var(--ink-3); background: var(--surface); transition: border-color var(--t-hover), color var(--t-hover), background var(--t-hover); }
.read-step-dot .ico svg { width: 13px; height: 13px; }
.read-step-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.read-step[data-state="active"] .read-step-dot { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.read-step[data-state="active"] .read-step-label { color: var(--ink); }
.read-step[data-state="done"] .read-step-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.read-step[data-state="done"] .read-step-label { color: var(--ink-2); }

/* ---------- drawer ---------- */
.backdrop {
  position: fixed; inset: 0; background: rgba(8, 8, 12, 0.42); opacity: 0;
  pointer-events: none; transition: opacity var(--t-drawer); z-index: 40;
}
.backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 560px; max-width: 94vw;
  background: var(--surface); box-shadow: -24px 0 64px rgba(0, 0, 0, 0.18);
  transform: translateX(100%); transition: transform var(--t-drawer) var(--ease-drawer);
  display: flex; flex-direction: column; z-index: 50;
}
.drawer.open { transform: translateX(0); }
.drawer .accent { height: 4px; width: 100%; flex: none; background: var(--line-2); }
.drawer .accent[data-status="red"] { background: var(--red); }
.drawer .accent[data-status="orange"] { background: var(--orange); }
.drawer .accent[data-status="green"] { background: var(--green); }
.drawer .accent[data-status="unknown"] { background: var(--unknown); }
.drawer .head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.drawer .body { padding: 18px 24px; overflow-y: auto; flex: 1; }
.drawer .foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.drawer-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--ink-3); font-size: 20px; line-height: 1; }

/* ---------- centred modal (per-colour) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 8, 12, 0.42); opacity: 0; pointer-events: none;
  transition: opacity var(--t-drawer); z-index: 60; display: flex; align-items: center;
  justify-content: center; padding: 24px;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 600px; max-width: 94vw; max-height: 86vh; background: var(--surface); border-radius: var(--r-card);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.30); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(10px) scale(0.985); opacity: 0;
  transition: transform var(--t-drawer) var(--ease-drawer), opacity var(--t-drawer);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal > .accent { height: 4px; width: 100%; flex: none; background: var(--line-2); }
.modal > .accent[data-status="red"] { background: var(--red); }
.modal > .accent[data-status="orange"] { background: var(--orange); }
.modal > .accent[data-status="green"] { background: var(--green); }
.modal > .accent[data-status="unknown"] { background: var(--unknown); }
.modal .head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.modal .head .title { font-size: 18px; }
.modal .body { padding: 16px 22px; overflow-y: auto; flex: 1; }
.modal .foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--ink-3); font-size: 22px; line-height: 1; padding: 0 4px; }

/* ---------- finding / flag card ---------- */
.flagcard {
  border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--r-row);
  padding: 16px 18px; background: var(--surface); margin-bottom: 14px;
}
.flagcard[data-status="red"] { border-left-color: var(--red); }
.flagcard[data-status="orange"] { border-left-color: var(--orange); }
.flagcard[data-status="green"] { border-left-color: var(--green); }
.flagcard[data-status="unknown"] { border-left-color: var(--unknown); }
.flagcard .fc-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; margin: 8px 0 0; }
.fc-pill { margin-bottom: 4px; }
.fc-issue { font-size: 14.5px; line-height: 1.5; color: var(--ink); margin: 8px 0 2px; }
.fc-status-row { margin-top: 14px; display: flex; align-items: center; }
.flagcard .quote {
  border-left: 3px solid var(--line-2); padding: 4px 0 4px 14px; color: var(--ink-2);
  font-size: 14px; line-height: 1.55; margin: 10px 0; font-style: normal;
}
.flagcard[data-status="red"] .quote { border-left-color: var(--red); }
.flagcard[data-status="orange"] .quote { border-left-color: var(--orange); }
.flagcard[data-status="green"] .quote { border-left-color: var(--green); }
.flagcard[data-status="unknown"] .quote { border-left-color: var(--unknown); }
.flagcard .body-text { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.source-pill {
  display: inline-block; font-family: var(--mono); font-size: 11px; background: var(--raised);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 10px; color: var(--ink-2);
}

/* ---------- mode selector ---------- */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.mode-card {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px; background: var(--surface);
  cursor: pointer; transition: border-color var(--t-hover), transform var(--t-hover), box-shadow var(--t-hover);
  text-align: left;
}
.mode-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06); }
.mode-card .mc-eyebrow { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--teal); }
.mode-card .mc-title { font-size: 20px; font-weight: 600; margin: 10px 0 6px; letter-spacing: -0.01em; }
.mode-card .mc-desc { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.mode-card .mc-cta { margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--teal); }

/* ---------- cockpit (dark) ---------- */
.cockpit { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy-dark); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { margin: 0 8px 18px; }
.sidebar .navitem {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-button);
  color: var(--sidebar-ink-2); font-size: 13px; font-weight: 500; cursor: pointer; border: none; background: none; text-align: left; width: 100%;
}
.sidebar .navitem:hover { background: rgba(255, 255, 255, 0.04); color: var(--sidebar-ink); }
.sidebar .navitem.active { background: rgba(255, 255, 255, 0.07); color: var(--sidebar-ink); }
.sidebar .navitem .nd { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); margin-left: auto; }
.sidebar .who { margin-top: auto; padding: 10px 12px; font-size: 11px; color: var(--sidebar-ink-2); border-top: 1px solid var(--line); }
.cockpit-main { padding: 26px 40px 64px; max-width: 1160px; }
.cockpit-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.cockpit-chip { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 14px; }

.runtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.runtable th { text-align: left; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.runtable td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.runtable tr.clickable { cursor: pointer; }
.runtable tr.clickable:hover td { background: var(--raised); }
.statedot { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; }
.statedot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.statedot[data-state="needs_review"]::before { background: var(--orange); }
.statedot[data-state="reviewed"]::before, .statedot[data-state="passed"]::before { background: var(--green); }
.statedot[data-state="running"]::before { background: var(--teal); }

.billboards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 28px; }
.billboard { border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; background: var(--surface); }
.billboard .num { font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.billboard .num.red { color: var(--red); } .billboard .num.orange { color: var(--orange); }
.billboard .lbl { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 10px; }

/* per-finding review card */
.reviewcard { border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--r-card); padding: 18px; background: var(--surface); margin-bottom: 14px; }
.reviewcard[data-status="red"] { border-left-color: var(--red); }
.reviewcard[data-status="orange"] { border-left-color: var(--orange); }
.reviewcard[data-status="green"] { border-left-color: var(--green); }
.reviewcard[data-status="unknown"] { border-left-color: var(--unknown); }
.reviewcard .rc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reviewcard .rc-title { font-size: 15px; font-weight: 600; margin: 10px 0 0; }
.reviewcard .controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.reviewcard .note-input { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-button); padding: 8px 10px; font-family: var(--sans); font-size: 12.5px; background: var(--bg); color: var(--ink); resize: vertical; min-height: 0; }
.colour-select { font-family: var(--sans); font-size: 12px; border: 1px solid var(--line-2); border-radius: var(--r-button); padding: 7px 10px; background: var(--surface); color: var(--ink); }
.reviewer-note-line { font-size: 12px; color: var(--ink-2); margin-top: 8px; font-style: italic; }

.auditlog { font-family: var(--mono); font-size: 12px; margin-top: 8px; }
.auditrow { display: grid; grid-template-columns: 96px 56px 1fr auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.auditrow .verb { color: var(--ink); }
.auditrow .actor { color: var(--teal); }

.gate {
  border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--r-card);
  padding: 18px; background: var(--surface); margin: 20px 0;
}
.gate blockquote { margin: 10px 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.gate .controls { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- final pack (light, print-ready A4) ---------- */
.pack-stage { background: var(--bg-2); padding: 8px 0 56px; }
.pack-page {
  width: 794px; max-width: 96vw; margin: 0 auto; background: var(--paper); color: var(--paper-ink);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.14); padding: 0; overflow: hidden;
}
.pack-page .pk-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 28px 48px 16px; border-bottom: 1px solid var(--paper-line); }
.pack-page .pk-id { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--paper-ink-3); }
.pack-page .pk-summary { padding: 16px 48px; font-size: 13.5px; line-height: 1.5; color: var(--paper-ink-2); border-bottom: 1px solid var(--paper-line); }
.pack-page .pk-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 48px; }
.pk-card { border-radius: 12px; padding: 14px; min-height: 80px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.pk-card[data-status="red"] { background: var(--red); } .pk-card[data-status="orange"] { background: var(--orange); }
.pk-card[data-status="green"] { background: var(--green); } .pk-card[data-status="unknown"] { background: var(--unknown); }
.pk-card .c-count { font-size: 36px; font-weight: 700; line-height: 1; }
.pk-card .c-lbl { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; opacity: 0.95; }
.pack-page .pk-body { display: block; padding: 6px 48px 18px; }
.pack-page .pk-body .pk-section-kicker { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--paper-ink-3); margin-bottom: 12px; }
.pk-finding { border-left: 3px solid var(--line-2); padding: 2px 0 12px 16px; margin-bottom: 12px; }
.pk-finding[data-status="red"] { border-left-color: var(--red); } .pk-finding[data-status="orange"] { border-left-color: var(--orange); }
.pk-finding[data-status="unknown"] { border-left-color: var(--unknown); }
.pk-finding .a-vessel { font-size: 13.5px; font-weight: 700; }
.pk-finding .a-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.pk-finding .a-status[data-status="red"] { color: var(--red); } .pk-finding .a-status[data-status="orange"] { color: var(--orange); } .pk-finding .a-status[data-status="unknown"] { color: var(--unknown); }
.pk-finding .a-body { font-size: 11.5px; line-height: 1.5; color: var(--paper-ink-2); margin-top: 4px; }
.pk-ev { margin-top: 10px; border-top: 1px dashed var(--paper-line); padding-top: 8px; }
.pk-ev-kicker { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--paper-ink-3); margin-bottom: 5px; }
.pk-ev .quote { border-left: 3px solid var(--paper-line); padding-left: 12px; font-size: 11px; line-height: 1.5; color: var(--paper-ink); margin: 0; }
.pk-finding[data-status="red"] .pk-ev .quote { border-left-color: var(--red); } .pk-finding[data-status="orange"] .pk-ev .quote { border-left-color: var(--orange); } .pk-finding[data-status="unknown"] .pk-ev .quote { border-left-color: var(--unknown); }
.pk-ev .src { font-family: var(--mono); font-size: 10px; color: var(--paper-ink-3); margin-top: 6px; display: inline-block; }
.pk-filed { display: flex; align-items: center; gap: 8px; border-top: 1px dashed var(--paper-line); padding-top: 12px; margin-top: 6px; font-size: 11.5px; color: var(--paper-ink-2); }
.pk-filed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pack-page .pk-footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 48px; border-top: 1px solid var(--paper-line); font-size: 10px; color: var(--paper-ink-3); }
.pk-legend { display: flex; gap: 16px; }
.pk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pk-legend .ld { width: 8px; height: 8px; border-radius: 2px; }

.reviewed-stamp {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--green); color: var(--green);
  background: var(--green-soft); border-radius: var(--r-pill); padding: 6px 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.draft-banner {
  display: flex; align-items: center; gap: 10px; background: var(--orange-soft); border: 1px solid var(--orange);
  color: var(--orange); border-radius: var(--r-row); padding: 10px 14px; font-size: 12.5px; font-weight: 600;
}
.empty-honest {
  border: 1px dashed var(--line-2); border-radius: var(--r-card); padding: 28px; text-align: center;
  color: var(--ink-2); font-size: 13.5px; line-height: 1.55;
}

/* print toolbar (screen only) */
.print-bar { display: flex; gap: 10px; justify-content: center; padding: 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.cockpit-note { margin: 0 8px 14px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--sidebar-ink-2); }

/* ---------- processing theatre (Slice A) ---------- */

/* Step row: steps left, Skip button pushed right */
.read-step-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.read-step-row .read-steps { flex: 1; }
.skip-btn { flex: none; }

/* Counter strip */
.theatre-counters {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.theatre-counter {
  border: 1px solid var(--line); border-radius: var(--r-row); background: var(--surface);
  padding: 10px 14px; display: flex; flex-direction: column; gap: 2px;
}
.theatre-counter .tc-val {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1;
}
.theatre-counter .tc-lbl {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}

/* Two-column theatre layout */
.theatre-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
}
.theatre-docs { /* inherits .filelist styles */ }

/* Narration feed */
.theatre-feed {
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); padding: 16px; min-height: 240px; max-height: 340px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 0;
}

/* Individual feed line */
.feed-line {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  opacity: 1; transform: translateY(0);
  transition: opacity 300ms ease, transform 300ms ease;
}
.feed-line:last-child { border-bottom: none; }
/* Entry animation: start hidden/shifted, CSS transition brings it in */
.feed-line.feed-line-enter { opacity: 0; transform: translateY(6px); }

.feed-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700; color: var(--ink-3);
}
.feed-text {
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
}

/* ---------- phase gate row (inside feed panel) ---------- */
.feed-gate {
  display: flex; justify-content: flex-end; align-items: center;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  /* Entry animation reuses feed-line-enter / feed-line pattern */
  opacity: 1; transform: translateY(0);
  transition: opacity 300ms ease, transform 300ms ease;
}

/* ---------- result screen header row (eyebrow + restart button) ---------- */
.result-header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}

/* ---------- result page restraint headline (Slice C) ---------- */
.result-restraint {
  font-size: 14px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.4;
}

/* ---------- evidence trail (Slice B) ---------- */
.trail-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.trail-step {
  display: flex; gap: 10px; align-items: flex-start;
}
.trail-num {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--ink-3);
}
.trail-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.trail-doc { /* inherits .source-pill */ }
.trail-note { font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ---------- animations ---------- */
@keyframes faDrawerIn { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes faPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.fa-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: faPulse 1.2s ease-in-out infinite; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .blocks, .blocks.with-green { grid-template-columns: 1fr 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .cockpit { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; min-height: auto; }
  .sidebar .who { margin: 0 0 0 auto; border: none; }
  .cockpit-main { padding: 20px; }
  .billboards { grid-template-columns: 1fr; }
  .pack-page .pk-body { grid-template-columns: 1fr; }
  .pack-page .pk-cards { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 24px 18px 48px; }
  .two-weight { font-size: 30px; }
  /* Theatre: stack doc list above feed on narrow viewports */
  .theatre-layout { grid-template-columns: 1fr; }
  .theatre-counters { grid-template-columns: 1fr 1fr; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .feed-line { transition: none; }
  .feed-line.feed-line-enter { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .pack-stage { background: #fff; padding: 0; }
  .pack-page { box-shadow: none; width: auto; max-width: none; margin: 0; }
  @page { size: A4 portrait; margin: 0; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
