/* DecCheck theme: the Ledger Theme (theme restart, Dec 2, 2026).
   Design package: ~/workspace/empire-hub/deccheck/theme-overhaul-2026-12-02/
   (diagnosis.md, spec.md, purpose.md). The rules below exist because
   purpose.md says so: warm paper, black ink, hairline rules, one serif
   spent only on the wordmark, person names, and the one hero number per
   screen; every figure in tabular sans; color spent only on state,
   action, and the delta. Radius caps at 6px. No pills, no glow, no
   gradients, no card per fact: lists are ruled rows in one surface. */

:root {
  --paper: #FAF8F3;
  --surface: #FFFFFF;
  --surface-2: #F3F0E7;
  --ink: #1B1813;
  --ink-soft: #55503F;
  --ink-muted: #8B8574;
  --line: #E3DED0;
  --line-strong: #CFC8B2;
  --accent: #0B7A43;
  --accent-ink: #FFFFFF;
  --good: #0B7A43;
  --bad: #B3372F;
  --warn: #96690A;
  --good-tint: #E7F2EA;
  --bad-tint: #F7E9E6;
  --warn-tint: #F6EEDC;
  --masthead: #14120E;
  --masthead-text: #F5F1E6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0.4rem 0 0.5rem;
  color: var(--ink);
}
.case-phase-line { margin: 0 0 0.2rem; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
h2 {
  font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0; font-weight: 700;
}
h3 { margin: 0.2rem 0 0.4rem; font-size: 1rem; color: var(--ink); font-weight: 600; }
p { margin: 0.4rem 0; }
strong { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- shell: the masthead ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem;
  padding: 0 1rem; min-height: 52px;
  background: var(--masthead);
}
.brand { display: flex; align-items: center; color: var(--masthead-text); }
.brand:hover { text-decoration: none; }
.brand-tick { color: var(--accent); margin-left: 0.2rem; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--masthead-text); }
.topnav { display: flex; flex-wrap: wrap; gap: 0.1rem; margin-left: auto; }
.topnav a {
  color: rgba(245, 241, 230, 0.75); font-size: 0.9rem; font-weight: 600;
  padding: 0.85rem 0.6rem 0.7rem; border-bottom: 2px solid transparent;
}
.topnav a.active { color: #FFFFFF; border-bottom-color: var(--accent); }
.topnav a:hover { color: #FFFFFF; text-decoration: none; }

.app { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; }
.footer {
  max-width: 920px; margin: 0 auto; padding: 1rem 1.5rem;
  border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 0.83rem;
}
.footer strong { color: var(--ink-soft); }
.back { display: inline-block; margin: 0.2rem 0 0.4rem; font-weight: 600; }
.tagline { color: var(--ink-soft); font-size: 1rem; margin-top: 0; }
.case-summary { color: var(--ink-soft); font-size: 1rem; }

/* ---------- tabs, tags, toggles ---------- */

.tabs { display: flex; gap: 0.2rem; margin: 0.9rem 0 1.1rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab {
  flex: 0 1 auto; text-align: center;
  padding: 0.55rem 0.8rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--ink-muted); font-weight: 600; background: transparent; font-size: 0.98rem;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.45rem 0; }
.chip {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 0.16rem 0.5rem;
  color: var(--ink-soft); background: var(--surface-2);
}
.chip.warn { border-color: #E0D3A8; color: var(--warn); background: var(--warn-tint); }
.chip.bad { border-color: #E3B8B2; color: var(--bad); background: var(--bad-tint); }
.chip.good { border-color: #BFDCC9; color: var(--accent); background: var(--good-tint); }

.paytoggle { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; margin: 0.8rem 0; max-width: 26rem; }
.paytoggle button {
  flex: 1; appearance: none; border: 0; cursor: pointer;
  background: var(--surface); color: var(--ink-soft);
  font: inherit; font-weight: 600; padding: 0.55rem 0.5rem; font-size: 0.95rem;
}
.paytoggle button.active { background: var(--ink); color: #FFFFFF; }
.pay-note { color: var(--ink-muted); font-size: 0.85rem; margin: 0.2rem 0 0.6rem; }

/* ---------- phase rail ---------- */

.phasebar {
  display: flex; gap: 0.3rem; margin: 0.9rem 0 0.4rem; flex-wrap: wrap;
  border-top: 1px solid var(--line-strong);
}
.phase-step {
  flex: 1 1 30%; font-size: 0.8rem; font-weight: 600; text-align: left;
  padding: 0.45rem 0.2rem 0; margin-top: -1px;
  border-top: 2px solid transparent; color: var(--ink-muted); background: transparent;
}
.phase-step.done { color: var(--ink-soft); }
.phase-step.current { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
.phase-step.todo { opacity: 0.55; }

/* ---------- sections and cards ---------- */

.section { margin-top: 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.45rem; margin-bottom: 0.8rem; }
.count { color: var(--ink-muted); font-size: 0.85rem; font-weight: 600; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 1rem 1.1rem; margin-bottom: 0.8rem; color: var(--ink);
}
a.card:hover { border-color: var(--line-strong); text-decoration: none; }
.who { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.sub { color: var(--ink-soft); margin: 0.25rem 0; }
.open-line { color: var(--accent); font-weight: 600; margin-top: 0.5rem; }
.empty {
  border: 1px dashed var(--line-strong); border-radius: 6px; padding: 1.1rem;
  color: var(--ink-soft); background: var(--surface);
}
.empty .big { font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }

/* ---------- dashboard ---------- */

.dash-date {
  color: var(--ink-muted); font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; font-size: 0.72rem; display: block;
}
.queue-row, .lead-row, .follow-row {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  padding: 0.7rem 0.9rem; margin-bottom: -1px; color: var(--ink);
}
a.queue-row:hover, a.lead-row:hover, a.follow-row:hover { text-decoration: none; background: var(--surface-2); }
.queue-num {
  font-family: var(--serif); font-size: 1.25rem; color: var(--ink-soft);
  min-width: 1.6rem; text-align: center; flex: 0 0 auto;
}
.queue-main { flex: 1 1 auto; }
.queue-name { font-weight: 600; font-size: 1rem; }
.queue-why { color: var(--ink-soft); font-size: 0.92rem; }
.queue-fig { font-size: 1.05rem; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.queue-fig .per { display: block; font-size: 0.7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-grid {
  display: flex; gap: 0; flex-wrap: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.stat { flex: 1 1 0; min-width: 0; padding: 0.9rem 1rem; text-align: left; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .stat-num { font-size: 1.5rem; font-weight: 600; color: var(--ink); display: block; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .stat-label { color: var(--ink-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- hero and board ---------- */

.hero { padding: 0.3rem 0 0.2rem; margin: 0.9rem 0; text-align: left; }
.hero-label { display: block; color: var(--ink-muted); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; font-size: 0.72rem; }
.hero-num { display: block; font-family: var(--serif); font-size: 2.9rem; line-height: 1.05; font-weight: 600; color: var(--ink); margin-top: 0.2rem; }
.hero-sub { display: block; color: var(--ink-soft); margin-top: 0.3rem; font-size: 0.98rem; }
.hero-delta { display: block; font-weight: 600; margin-top: 0.35rem; font-variant-numeric: tabular-nums; }
.hero-delta.save { color: var(--good); }
.hero-delta.cost { color: var(--bad); }
.hero-caveat {
  display: block; color: var(--warn); font-weight: 600; margin-top: 0.6rem;
  background: var(--warn-tint); border-left: 2px solid var(--warn);
  padding: 0.5rem 0.7rem; border-radius: 0 4px 4px 0; font-size: 0.95rem;
}

.current-line {
  padding: 0.6rem 0; margin: 0.7rem 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: baseline;
  border-bottom: 1px solid var(--line);
}
.current-line .k { color: var(--ink-soft); font-weight: 600; }
.current-line .v { font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }
.current-line .parts { color: var(--ink-muted); font-size: 0.9rem; width: 100%; }

.board { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rank-row {
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: start;
  grid-template-areas: "head total" "parts total" "diff total";
}
.rank-row:last-child { border-bottom: 0; }
.rank-head { grid-area: head; }
.rank-total { grid-area: total; text-align: right; align-self: center; }
.rank-parts { grid-area: parts; }
.rank-diff { grid-area: diff; }
.rank-err { grid-area: parts; }
.board .rank-row:first-child { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.rank-row.errored { background: var(--surface); }
.rank-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rank-num { font-family: var(--serif); color: var(--ink-soft); font-size: 1.05rem; min-width: 1.4rem; }
.rank-name { font-weight: 600; font-size: 1.05rem; }
.badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--good-tint); color: var(--accent); border: 1px solid #BFDCC9;
  border-radius: 4px; padding: 0.12rem 0.45rem;
}
.rank-total { font-size: 1.1rem; font-weight: 600; margin: 0.3rem 0 0.1rem; font-variant-numeric: tabular-nums; }
.rank-total .per, .per { font-size: 0.83rem; color: var(--ink-muted); font-weight: 400; }
.rank-parts { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.part-sep { margin: 0 0.45rem; color: var(--ink-muted); }
.rank-basis { color: var(--ink-muted); font-size: 0.8rem; }
.rank-diff { font-weight: 600; margin: 0.35rem 0 0; font-variant-numeric: tabular-nums; }
.rank-diff.save { color: var(--good); }
.rank-diff.cost { color: var(--bad); }
.rank-err { color: var(--bad); font-weight: 600; }
.board-warn { color: var(--warn); font-weight: 600; font-size: 0.92rem; }

/* ---------- rows and detail blocks ---------- */

.rows { margin: 0.4rem 0; }
.row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.45rem 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .k { color: var(--ink-soft); }
.row .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.src { display: block; color: var(--ink-muted); font-size: 0.8rem; margin-top: 0.15rem; font-weight: 400; }
.row .v .src { text-align: right; }

.policy-block, .status-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 1rem 1.1rem; margin-bottom: 0.8rem;
}
.policy-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.policy-title .prem { color: var(--ink); font-size: 1rem; margin-left: 0.4rem; font-family: var(--sans); font-weight: 600; font-variant-numeric: tabular-nums; }
.one-line { color: var(--ink-soft); }
.warn { color: var(--warn); font-weight: 600; }
.not-submitted { display: block; color: var(--warn); font-weight: 700; margin-top: 0.5rem; }
.math-note { color: var(--ink-soft); }

details.details {
  border: 1px solid var(--line); border-radius: 6px; margin-top: 1.4rem;
  background: var(--surface); padding: 0.4rem 1rem 1rem;
}
details.details > summary {
  cursor: pointer; font-weight: 600; font-size: 1rem; padding: 0.7rem 0; color: var(--ink);
}
details.details.sub { margin-top: 0.8rem; }
.details-inner { padding-top: 0.4rem; }

/* ---------- flags and prep ---------- */

.flag {
  background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 6px; padding: 0.9rem 1rem; margin-bottom: 0.8rem;
}
.flag.gap { border-left-color: var(--bad); }
.flag.question { border-left-color: var(--warn); }
.flag-tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft);
}
.flag .why, .flag .need { color: var(--ink-soft); }
ul.why { margin: 0.4rem 0; padding-left: 1.2rem; color: var(--ink-soft); }
.doit { font-weight: 700; }
.where { color: var(--ink-muted); font-size: 0.9rem; }
.unverified { display: inline-block; color: var(--warn); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.3rem; }
.prep-clear { color: var(--good); font-weight: 600; }
details.flag-detail > summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 0.5rem; }

.dispute { border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem; margin: 0.6rem 0; background: var(--surface-2); }
.verify-badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.dispute-grid { display: flex; gap: 0.6rem; align-items: stretch; margin-top: 0.5rem; flex-wrap: wrap; }
.dispute-side { flex: 1 1 40%; }
.dispute-side .k { display: block; color: var(--ink-muted); font-size: 0.8rem; }
.dispute-side .v { display: block; font-weight: 600; font-size: 1.05rem; }
.dispute-vs { align-self: center; color: var(--ink-muted); font-weight: 700; }
.dispute-note { color: var(--ink-soft); font-size: 0.92rem; }
.trail-row { display: flex; gap: 0.7rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.trail-row .k { color: var(--ink-muted); min-width: 8.5rem; }
.trail-row .v { font-weight: 600; }
.trail-row .note { color: var(--ink-soft); flex: 1 1 100%; font-size: 0.9rem; }

.taps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.tap {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 0.5rem 0.9rem;
}
.tap:hover { border-color: var(--ink-muted); }
.tap.picked { background: var(--good-tint); border-color: var(--accent); color: var(--accent); }
.tap.money { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.call-line { margin-top: 0.5rem; font-weight: 700; color: var(--good); }
.call-line .change { color: var(--ink-muted); font-weight: 400; font-size: 0.85rem; }

/* ---------- strip ---------- */

.strip { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.1rem; }

/* ---------- official ---------- */

.off-card { cursor: default; }
.off-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.off-full { font-family: var(--serif); font-size: 2.9rem; line-height: 1.05; font-weight: 600; margin: 0.4rem 0; }
.off-counts { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0.2rem 0 0.6rem; color: var(--ink); }
.off-pending { color: var(--warn); font-weight: 700; margin: 0.4rem 0; }
.off-actions { margin-top: 0.7rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.off-form { margin-top: 0.8rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }
.off-field { display: block; margin-bottom: 0.7rem; }
.off-field > span { display: block; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.25rem; font-size: 0.92rem; }
.off-field input, .off-field select {
  width: 100%; font: inherit; padding: 0.55rem 0.7rem; border-radius: 4px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.off-hint { color: var(--ink-muted); font-size: 0.8rem; margin-top: 0.2rem; }
.pick-hint { color: var(--ink-muted); font-size: 0.88rem; }
.bridge-picks { margin: 0.6rem 0 1rem; }

/* ---------- compare ---------- */

.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 0.93rem; }
table.cmp th, table.cmp td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); text-align: right; }
table.cmp thead th { background: var(--surface-2); font-size: 0.95rem; font-weight: 600; color: var(--ink); }
table.cmp thead th:first-child { text-align: left; }
table.cmp tbody th { color: var(--ink-soft); font-weight: 600; text-align: left; }
table.cmp td.num { font-weight: 600; font-variant-numeric: tabular-nums; }
table.cmp td.plain { text-align: left; }
.tier-badge {
  display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--ink-muted); text-transform: uppercase; font-family: var(--sans);
}
.winner-line { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-top: 0.9rem; }
.compare-box { background: var(--surface-2); border-radius: 6px; padding: 0.6rem 1.1rem; }

/* ---------- pitch ---------- */

.rated-label {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--warn); border: 1px solid #E0D3A8; background: var(--warn-tint);
  border-radius: 4px; padding: 0.2rem 0.55rem; margin-bottom: 0.5rem;
}
.pitch-lead { font-family: var(--serif); font-size: 1.9rem; line-height: 1.3; color: var(--ink); }
ol.outline { list-style: none; padding: 0; margin: 0.8rem 0; counter-reset: step; }
ol.outline li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); display: block; }
ol.outline li:last-child { border-bottom: 0; }
.pitch-src { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.25rem; }
.pitch-text { font-size: 1.02rem; }

/* ---------- leads pages ---------- */

.step-list { counter-reset: step; padding: 0; list-style: none; margin: 0.6rem 0; }
.step-list li {
  padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--ink-soft);
}
.step-list li:last-child { border-bottom: 0; }
.step-list li strong { color: var(--ink); }
.gate-note { color: var(--ink-soft); margin: 0.6rem 0; }
.gate-note strong { color: var(--ink); }

@media (max-width: 560px) {
  .hero-num { font-size: 2.4rem; }
  h1 { font-size: 1.55rem; }
  .app { padding: 1rem 1rem 2.5rem; }
  .topnav { margin-left: 0; }
  .topnav a { padding: 0.6rem 0.5rem 0.5rem; }
  .queue-row, .lead-row, .follow-row { flex-wrap: wrap; }
  .queue-fig { text-align: left; }
  .stat { padding: 0.7rem 0.6rem; }
  .stat .stat-num { font-size: 1.15rem; }
  .phase-step { flex-basis: 45%; }
  /* Phone: the rail deliberately drops the top rule metaphor at
     this width (Human Check fix 16). Steps wrap as labeled items;
     the current step keeps its accent segment, as an underline. */
  .phasebar { border-top: 0; }
  .phase-step { border-top: 0; margin-top: 0; }
  .phase-step.current { box-shadow: inset 0 -2px 0 var(--accent); }
}

/* ---------- Expansion components ---------- */
.off-field textarea {
  width: 100%; box-sizing: border-box; background: var(--surface);
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 0.6rem 0.7rem; font: inherit; resize: vertical;
}
.off-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.off-field input:focus, .off-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.next-action {
  margin: 0.8rem 0 0.2rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 6px; background: var(--surface);
  color: var(--ink); font-size: 1rem; line-height: 1.45;
}
.next-action strong { color: var(--ink); letter-spacing: 0.02em; }
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.6rem 0 0.2rem; }
.quick-actions .quick-label { font-weight: 600; color: var(--ink-soft); margin-right: 0.2rem; }
.quick-actions a.tap { text-decoration: none; }
.flag.note { margin-bottom: 0.6rem; }

/* ---------- Sign in ---------- */
.login-card { max-width: 430px; margin: 2.2rem auto 0; }
.login-error { color: var(--bad); font-weight: 600; min-height: 1.2em; margin: 0.5rem 0 0; }

/* ---------- Slice 2: facts, freshness, payments, organization ---------- */
.fact-row { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.fact-row:last-child { border-bottom: none; }
.fact-value { display: block; font-weight: 600; margin-top: 0.3rem; }
.fact-action-row { margin-top: 0.45rem; }
.fact-actions { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.fact-claims { margin: 0.5rem 0 0.2rem; padding: 0.6rem 0.7rem; border: 1px solid var(--bad); border-radius: 6px; background: var(--bad-tint); }
.fact-claim { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.25rem 0; }
.fact-claim .k { font-weight: 700; min-width: 6.5rem; }
.fact-form { margin-top: 0.6rem; padding: 0.7rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.fact-error { color: var(--bad); font-weight: 600; min-height: 1.1em; margin: 0.4rem 0 0; }
.alert-row { box-shadow: inset 2px 0 0 var(--bad); }
.file-group { margin-bottom: 1.4rem; }
.group-head { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink); margin: 1.1rem 0 0.2rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.group-count { color: var(--ink-muted); letter-spacing: 0.05em; }
.steps-strip { margin-top: 0.5rem; }
.steps-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.3rem; }
.steps-now { display: block; font-size: 0.88rem; margin-top: 0.35rem; color: var(--ink-soft); }

/* ---------- Slice 2B: policy health check and carrier movement ---------- */
.health-verdict { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 0.3rem 0; color: var(--ink); }
.health-verdict.good { color: var(--good); }
.health-verdict.bad { color: var(--bad); }
.health-sub { margin: 1.1rem 0 0.5rem; font-size: 1rem; color: var(--ink); }
.health-price p { margin: 0.3rem 0; color: var(--ink-soft); font-size: 1rem; }
.health-price p:first-child { color: var(--ink); font-weight: 600; }
.health-list { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; color: var(--ink-soft); }
.health-list li { margin-bottom: 0.4rem; }
.health-list li strong { color: var(--ink); }
.health-panel .section-head .tap { flex: 0 0 auto; }
.move-line { color: var(--ink-soft); margin: 0.45rem 0; }
.move-line strong { color: var(--ink); }
.roleplay-line { margin-top: 0.9rem; }

/* ---------- Slice 3: lead engine controls ---------- */

.engine-lead { align-items: flex-start; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; align-items: center; }
.lead-actions .tap { font-size: 0.88rem; padding: 0.35rem 0.7rem; }
.lead-actions .off-field { display: inline-flex; }
.lead-actions .off-field input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); padding: 0.35rem 0.6rem; font-size: 0.9rem; }
.lead-row.flag-row { box-shadow: inset 2px 0 0 var(--warn); }
.pick-check { width: 1.3rem; height: 1.3rem; margin-top: 0.25rem; accent-color: var(--accent); flex: none; cursor: pointer; }
#engine-pickbar {
  position: sticky; bottom: 0.5rem; z-index: 5;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 2px 8px rgba(27, 24, 19, 0.08);
  padding: 0.5rem 0.7rem; margin-top: 0.8rem;
}
#engine-pickbar .off-actions { margin-top: 0; }
