/* ============================================================
   CASE STUDY — long-form paper surface + data visualization.
   Loaded AFTER colors_and_type.css and pages.css.
   Light (parchment) palette only; the dark site chrome stays.

   Structure:
     .cs-shell            dark page gutter
     .cs-paper            the sheet
       .cs-col            760px prose measure (all text)
       .fig               breaks the measure, full sheet width
   Semantic data palette is defined once in :root below — never
   encode meaning by color alone, every state also has a label.
   ============================================================ */

.cs-shell {
  --cs-reduction: #255739;
  --cs-reduction-fill: rgba(47, 107, 71, 0.14);
  --cs-regression: #8E2E1B;
  --cs-regression-fill: rgba(158, 53, 32, 0.13);
  --cs-provisional: #6E4B08;
  --cs-provisional-fill: rgba(154, 107, 16, 0.13);
  --cs-neutral: #2F4C64;
  --cs-neutral-fill: rgba(60, 95, 124, 0.12);
  --cs-off: #5B5750;
  --cs-off-fill: rgba(111, 106, 94, 0.12);
  --cs-rule: rgba(38, 77, 54, 0.16);
  --cs-rule-soft: rgba(38, 77, 54, 0.09);
  position: relative; z-index: 2;
  padding: clamp(104px, 15vh, 160px) clamp(14px, 4vw, 40px) clamp(60px, 9vh, 110px);
}

.cs-paper {
  max-width: 1080px; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: 22px;
  padding: clamp(30px, 4.4vw, 66px) clamp(20px, 4.4vw, 72px) clamp(44px, 6vw, 78px);
  box-shadow: 0 26px 70px rgba(4, 9, 6, 0.5);
}
.cs-col { max-width: 74ch; margin-left: auto; margin-right: auto; }

/* ---------- masthead ---------- */
.cs-mast { border-bottom: 2px solid var(--shell-deep); padding-bottom: 26px; }
.cs-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-muted); margin: 0 0 22px;
}
.cs-kicker .sep { width: 20px; height: 1px; background: currentColor; opacity: 0.5; }
.cs-mast h1 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(2.1rem, 3.8vw + 0.9rem, 3.4rem); line-height: 1.02;
  letter-spacing: -0.028em; color: var(--shell-deep); margin: 0; text-wrap: balance;
}
.cs-mast .sub {
  font-family: var(--font-body); font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.3rem);
  line-height: 1.55; color: var(--text-body); margin: 20px 0 0; max-width: 52ch;
}
.cs-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--cs-rule);
  background: var(--panel-strong); font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--shell-deep);
}
.cs-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }

/* ---------- hero proof row ---------- */
.cs-proof {
  display: grid; gap: 1px; background: var(--cs-rule-soft);
  grid-template-columns: repeat(2, 1fr); margin: 30px 0 0;
  border: 1px solid var(--cs-rule-soft); border-radius: 12px; overflow: hidden;
}
@media (min-width: 780px) { .cs-proof { grid-template-columns: repeat(4, 1fr); } }
.cs-proof .kpi { background: var(--panel); padding: 20px 18px 18px; }
.cs-proof .num {
  font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  line-height: 1; letter-spacing: -0.03em; color: var(--shell-deep); display: block;
}
.cs-proof .lbl {
  font-family: var(--font-body); font-size: 0.86rem; line-height: 1.4;
  color: var(--text-body); margin: 10px 0 0; display: block;
}
.cs-proof .cav {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  color: rgba(28, 28, 28, 0.68); margin: 8px 0 0; display: block;
}

/* ---------- prose ---------- */
.cs-body { font-family: var(--font-body); font-size: 1.09rem; line-height: 1.8; color: var(--ink); }
.cs-body > * + * { margin-top: 1.3em; }
.cs-body p { color: rgba(28, 28, 28, 0.88); }
.cs-body h2 {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; line-height: 1.2;
  letter-spacing: -0.015em; color: var(--shell-deep); margin: 2.4em 0 0; text-wrap: balance;
}
.cs-body h2 .no {
  display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.2em; color: var(--ink-muted); margin-bottom: 10px;
}
.cs-body h3 { font-family: var(--font-heading); font-weight: 600; font-size: 1.12rem; color: var(--shell-deep); margin: 1.8em 0 0; }
.cs-body strong { font-weight: 600; color: #14231a; }
.cs-body a { color: var(--shell-deep); text-decoration: underline; text-decoration-color: rgba(38, 77, 54, 0.4); text-underline-offset: 3px; }
.cs-body a:hover { text-decoration-color: var(--shell-deep); }
.cs-body code { font-family: var(--font-mono); font-size: 0.88em; background: var(--panel-accent); padding: 2px 6px; border-radius: 5px; color: #1c3a28; }
.cs-body ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.7em; }
.cs-body ul li { position: relative; padding-left: 24px; }
.cs-body ul li::before { content: ""; position: absolute; left: 2px; top: 0.68em; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.cs-body blockquote {
  margin: 1.7em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--signal);
  font-family: var(--font-heading); font-weight: 500; font-size: 1.24rem; line-height: 1.42;
  letter-spacing: -0.01em; color: var(--shell-deep);
}
.cs-lede { font-size: 1.2rem; line-height: 1.68; color: var(--text-body); }
.cs-rule { height: 1px; background: var(--cs-rule); border: 0; margin: 40px 0; }

/* ---------- figures ---------- */
.fig { margin: 46px 0; }
.fig-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 4px; }
.fig-no { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); }
.fig-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.06rem; letter-spacing: -0.01em; color: var(--shell-deep); margin: 0; }
.fig-note { font-family: var(--font-body); font-size: 0.92rem; line-height: 1.6; color: var(--text-body); margin: 0 0 18px; max-width: 76ch; }
.fig-sub { font-family: var(--font-heading); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin: 26px 0 12px; padding-top: 20px; border-top: 1px solid var(--cs-rule-soft); }
.fig-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fig-frame { border: 1px solid var(--cs-rule); border-radius: 14px; background: var(--panel-strong); padding: clamp(16px, 2.4vw, 26px); }
.fig-cap {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.65; letter-spacing: 0.02em;
  color: rgba(28, 28, 28, 0.72); margin: 14px 0 0; padding-left: 14px; border-left: 2px solid var(--cs-rule-soft);
}
.fig-cap b { color: #1c3a28; font-weight: 600; }

details.fig-data { margin-top: 12px; }
details.fig-data > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); padding: 6px 0;
}
details.fig-data > summary::-webkit-details-marker { display: none; }
details.fig-data > summary::before { content: "+"; font-weight: 700; }
details.fig-data[open] > summary::before { content: "\2212"; }
details.fig-data > summary:hover { color: var(--shell-deep); }
.fig-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-family: var(--font-mono); font-size: 12px; }
.fig-table th, .fig-table td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--cs-rule-soft); vertical-align: top; color: var(--ink); }
.fig-table th { color: var(--ink-muted); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; font-size: 10.5px; }
.fig-wrap { overflow-x: auto; }

/* ---------- state chips + legend ---------- */
.dchip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid currentColor; background: var(--panel); white-space: nowrap;
}
.dchip .sw { width: 8px; height: 8px; border-radius: 2px; background: currentColor; flex: none; }
.fid { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: rgba(28, 28, 28, 0.68); }
.c-red { color: var(--cs-reduction); }
.c-reg { color: var(--cs-regression); }
.c-prov { color: var(--cs-provisional); }
.c-neu { color: var(--cs-neutral); }
.c-off { color: var(--cs-off); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 18px; }

/* ---------- architecture stack (Fig 1) ---------- */
.arch { display: flex; flex-direction: column; gap: 10px; }
.arch-floor {
  border: 2px solid var(--shell-deep); border-radius: 12px; padding: 14px 18px; background: rgba(38, 77, 54, 0.07);
}
.arch-floor .t { font-family: var(--font-heading); font-weight: 700; font-size: 0.94rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--shell-deep); margin: 0 0 8px; }
.arch-floor .items, .arch-band .items { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-band .items .it, .arch-floor .items .it {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--cs-rule-soft); border-radius: 5px; padding: 4px 9px;
}
.arch-band { border: 1px solid var(--cs-rule); border-radius: 12px; padding: 14px 18px; background: var(--panel); }
.arch-band .t { font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 9px; }
.arch-band.decision { border-color: var(--shell-deep); background: rgba(38, 77, 54, 0.045); }
.arch-band.decision .t { color: var(--shell-deep); }
.arch-arrow { text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); line-height: 1; }

/* ---------- heatmap (Fig 2) ---------- */
.hm { display: grid; grid-template-columns: minmax(84px, 0.7fr) repeat(3, minmax(150px, 1fr)); gap: 8px; min-width: 620px; }
.hm .hd { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); padding: 0 0 4px 2px; align-self: end; }
.hm .rh { font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; color: var(--shell-deep); align-self: center; }
.hm .rh span { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.08em; color: rgba(28, 28, 28, 0.66); text-transform: uppercase; margin-top: 3px; }
.cell { border-radius: 10px; padding: 13px 14px; border: 1px solid var(--cs-rule-soft); background: var(--panel); min-height: 108px; display: flex; flex-direction: column; gap: 7px; }
.cell .v { font-family: var(--font-heading); font-weight: 800; font-size: 1.34rem; letter-spacing: -0.02em; line-height: 1; }
.cell .meta { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.6; color: var(--text-body); }
.cell .st { margin-top: auto; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.cell.reduction { background: var(--cs-reduction-fill); border-color: rgba(47, 107, 71, 0.4); }
.cell.reduction .v, .cell.reduction .st { color: var(--cs-reduction); }
.cell.regression { background: var(--cs-regression-fill); border-color: rgba(158, 53, 32, 0.42); }
.cell.regression .v, .cell.regression .st { color: var(--cs-regression); }
.cell.neutral { background: var(--cs-neutral-fill); border-color: rgba(60, 95, 124, 0.34); }
.cell.neutral .v, .cell.neutral .st { color: var(--cs-neutral); }
.cell.provisional {
  border-color: rgba(110, 75, 8, 0.55); border-style: dashed;
  background: repeating-linear-gradient(135deg, rgba(154, 107, 16, 0.11) 0 8px, rgba(154, 107, 16, 0.04) 8px 16px);
}
.cell.provisional .v, .cell.provisional .st { color: var(--cs-provisional); }
.cell.unknown { background: var(--cs-off-fill); border-color: rgba(111, 106, 94, 0.3); border-style: dashed; }
.cell.unknown .v, .cell.unknown .st { color: var(--cs-off); }

/* ---------- two-group result cards (Fig 3) ---------- */
.groups { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .groups { grid-template-columns: 1fr 1fr; } }
.gcard { border-radius: 12px; padding: 18px 20px 20px; background: var(--panel); border: 1px solid var(--cs-rule-soft); }
.gcard.protected { border-style: dashed; border-color: rgba(110, 75, 8, 0.5); }
.gcard h4 { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: var(--shell-deep); margin: 0 0 3px; }
.gcard .scope { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(28, 28, 28, 0.68); margin: 0 0 16px; }
.gmetric { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--cs-rule-soft); }
.gmetric .k { font-family: var(--font-body); font-size: 0.88rem; color: var(--text-body); }
.gmetric .n { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (max-width: 860px) { .gmetric { grid-template-columns: 1fr; } .gmetric .n { justify-self: start; } }
.gmetric .n.down { color: var(--cs-reduction); }
.gmetric .n.up { color: var(--cs-regression); }
.gcard .verdict { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; font-family: var(--font-mono); font-size: 11px; line-height: 1.55; letter-spacing: 0.04em; font-weight: 500; }
.gcard .verdict.miss { background: rgba(158, 53, 32, 0.1); color: var(--cs-regression); }
.gcard .verdict.hold { background: rgba(154, 107, 16, 0.1); color: var(--cs-provisional); }

/* floor bar */
.floorbar { margin-top: 18px; }
.floorbar .track { position: relative; height: 34px; border-radius: 8px; background: var(--panel); border: 1px solid var(--cs-rule-soft); overflow: hidden; }
.floorbar .fill { position: absolute; inset: 0 auto 0 0; background: var(--cs-reduction-fill); border-right: 2px solid var(--cs-reduction); }
.floorbar .gate { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--shell-deep); }
.floorbar .gate::after {
  content: attr(data-label); position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--shell-deep); white-space: nowrap;
}
.floorbar .val { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--cs-reduction); }
.floorbar .axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: rgba(28, 28, 28, 0.68); margin-top: 6px; }

/* ---------- funnel (Fig 4) ---------- */
.funnel { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.fstage {
  width: 100%; border-radius: 9px; border: 1px solid var(--cs-rule-soft); background: var(--panel);
  padding: 11px 16px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px;
}
.fstage .s { font-family: var(--font-body); font-size: 0.92rem; color: var(--ink); }
.fstage .m { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-muted); }
.fstage.pass { border-color: rgba(47, 107, 71, 0.4); background: var(--cs-reduction-fill); }
.fstage.pass .m { color: var(--cs-reduction); }
.fstage.fail { border-color: rgba(158, 53, 32, 0.42); background: var(--cs-regression-fill); }
.fstage.fail .m { color: var(--cs-regression); }
.fstage.terminal { border-color: var(--shell-deep); background: rgba(38, 77, 54, 0.08); }
.fstage.terminal .s { font-weight: 600; color: var(--shell-deep); }
.fbranch {
  width: 100%; margin: 2px 0 2px auto; max-width: 74%; border-radius: 9px; padding: 11px 16px;
  border: 1px dashed rgba(110, 75, 8, 0.5);
  background: repeating-linear-gradient(135deg, rgba(154, 107, 16, 0.1) 0 8px, rgba(154, 107, 16, 0.035) 8px 16px);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.6; color: var(--cs-provisional);
}
.fnarrow { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 8px solid var(--cs-rule); }

/* ---------- stacked bar + counters (Fig 5) ---------- */
.stack { display: flex; height: 46px; border-radius: 9px; overflow: hidden; border: 1px solid var(--cs-rule-soft); }
.stack .seg { display: flex; align-items: center; padding: 0; min-width: 0; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; }
.stack .seg { border-right: 1px solid rgba(247, 243, 234, 0.7); overflow: hidden; white-space: nowrap; }
.stack .seg:last-child { border-right: 0; }
.stack .seg.primary { color: #1E3648; padding: 0 14px; }
.stack .seg.rest, .stack-key .k > span:not(.sw):not(.kn) { color: rgba(28, 28, 28, 0.78); }
.stack-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px 22px; margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--text-body); }
.stack-key .k { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 9px; }
.stack-key .sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.stack-key .kn { color: var(--ink); }
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--cs-rule-soft); border: 1px solid var(--cs-rule-soft); border-radius: 10px; overflow: hidden; margin-top: 18px; }
.counters .c { background: var(--panel); padding: 16px 16px 14px; }
.counters .n { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; color: var(--shell-deep); line-height: 1; display: block; }
.counters .n.good { color: var(--cs-reduction); }
.counters .l { font-family: var(--font-body); font-size: 0.85rem; line-height: 1.45; color: var(--text-body); margin: 9px 0 0; display: block; }

/* ---------- payback gauge (Fig 6) ---------- */
.gauge { position: relative; height: 56px; border-radius: 10px; background: var(--panel); border: 1px solid var(--cs-rule-soft); overflow: hidden; }
.gauge .fill { position: absolute; inset: 0 auto 0 0; background: rgba(154, 107, 16, 0.1); border-right: 2px solid var(--cs-provisional); }
.gauge .mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--shell-deep); opacity: 0.55; }
.gauge .mark.gate { width: 2px; opacity: 1; }
.gauge .tag {
  position: absolute; top: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--shell-deep); white-space: nowrap; padding-left: 7px;
}
.gauge .now { position: absolute; bottom: 9px; left: 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--cs-provisional); }
.gauge-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: rgba(28, 28, 28, 0.68); margin-top: 6px; }
.econ { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.econ .e { border: 1px solid var(--cs-rule-soft); border-radius: 9px; padding: 12px 14px; background: var(--panel); }
.econ .e .n { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--ink); display: block; }
.econ .e .l { font-family: var(--font-body); font-size: 0.82rem; line-height: 1.4; color: var(--text-body); margin: 6px 0 0; display: block; }

/* ---------- decision flow (Fig 6b) ---------- */
.flow { display: flex; flex-direction: column; gap: 8px; }
.frow { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .frow { grid-template-columns: 1fr 1fr; } }
.fbox { border: 1px solid var(--cs-rule-soft); border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.fbox .q { font-family: var(--font-heading); font-weight: 600; font-size: 0.94rem; color: var(--shell-deep); margin: 0 0 8px; }
.fbox .a { font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: var(--text-body); margin: 0; }
.fbox.pick { border-color: rgba(47, 107, 71, 0.45); background: var(--cs-reduction-fill); }
.fbox.pick .a { color: var(--cs-reduction); }

/* ---------- layer board (Fig 7) ---------- */
.lanes { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .lanes { grid-template-columns: 1fr 1fr; } }
.lane { border-radius: 11px; padding: 15px 17px; background: var(--panel); border: 1px solid var(--cs-rule-soft); }
.lane .lh { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; }
.lane .lh .sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.lane .lh .t { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--shell-deep); }
.lane ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lane li { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; color: rgba(28, 28, 28, 0.8); padding-left: 14px; position: relative; }
.lane li::before { content: "\2013"; position: absolute; left: 0; color: rgba(28, 28, 28, 0.5); }
.lane.live { border-color: rgba(37, 87, 57, 0.42); }
.lane.shadow { border-color: rgba(47, 76, 100, 0.38); }
.lane.blocked { border-color: rgba(91, 87, 80, 0.4); border-style: dashed; }
.lane.deferred { border-color: rgba(110, 75, 8, 0.45); border-style: dashed; }

/* ---------- profile cards (Fig 8) ---------- */
.profiles { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .profiles { grid-template-columns: repeat(3, 1fr); } }
.pcard { border: 1px solid var(--cs-rule-soft); border-radius: 11px; padding: 16px 18px; background: var(--panel); }
.pcard .m { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--shell-deep); margin: 0; }
.pcard .cls { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; color: var(--cs-neutral); margin: 10px 0 0; }
.pcard .ev { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.6; color: rgba(28, 28, 28, 0.7); margin: 10px 0 0; }
.warnbar {
  margin-top: 14px; padding: 11px 14px; border-radius: 8px; background: rgba(154, 107, 16, 0.1);
  border: 1px solid rgba(110, 75, 8, 0.4); font-family: var(--font-mono); font-size: 11px;
  line-height: 1.65; letter-spacing: 0.03em; color: var(--cs-provisional);
}
.warnbar code { background: var(--panel); padding: 1px 5px; border-radius: 4px; }

/* ---------- spend bullets ---------- */
.bullets { display: flex; flex-direction: column; gap: 10px; }
.brow { display: grid; grid-template-columns: 58px 1fr; gap: 6px 14px; align-items: center; }
@media (min-width: 760px) { .brow { grid-template-columns: 58px 1fr auto; } }
.brow .bnum { grid-column: 2; justify-self: start; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--shell-deep); white-space: nowrap; }
@media (min-width: 760px) { .brow .bnum { grid-column: 3; justify-self: end; } }
.brow .bm { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: var(--shell-deep); }
.btrack { position: relative; height: 36px; border-radius: 8px; background: var(--panel); border: 1px solid var(--cs-rule-soft); overflow: hidden; }
.btrack .bceil { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(38, 77, 54, 0.08); border-right: 2px dashed rgba(38, 77, 54, 0.5); }
.btrack .bact { position: absolute; top: 8px; bottom: 8px; left: 0; border-radius: 4px; background: rgba(38, 77, 54, 0.52); }
.bkey { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-body); }
.bkey .k { display: flex; align-items: center; gap: 8px; }
.bkey .sw { width: 14px; height: 10px; border-radius: 2px; flex: none; }
.bkey .sw.ceil { background: rgba(38, 77, 54, 0.1); border-right: 2px dashed rgba(38, 77, 54, 0.6); }
.bkey .sw.act { background: rgba(38, 77, 54, 0.52); }

/* ---------- prospect table ---------- */
.ptable { width: 100%; border-collapse: collapse; min-width: 620px; }
.ptable th, .ptable td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--cs-rule-soft); vertical-align: top; }
.ptable th { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); font-weight: 400; }
.ptable td { font-family: var(--font-body); font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.ptable td.mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-body); }
.ptable td .dchip { font-size: 9.5px; }

/* ---------- boundaries / prohibited-claim callout ---------- */
.bounds { border: 1px solid var(--cs-rule); border-radius: 14px; padding: 22px 24px; background: var(--panel-strong); }
.bounds .t { font-family: var(--font-heading); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shell-deep); margin: 0 0 14px; }
.bounds ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bounds li { font-family: var(--font-body); font-size: 0.94rem; line-height: 1.65; color: var(--text-body); padding-left: 26px; position: relative; }
.bounds li b { font-weight: 600; color: var(--shell-deep); }
.bounds li code { font-family: var(--font-mono); font-size: 0.86em; background: var(--panel); padding: 1px 5px; border-radius: 4px; color: #1c3a28; }
.bounds li::before { content: ""; position: absolute; left: 5px; top: 0.62em; width: 7px; height: 7px; border-radius: 1px; background: var(--shell-deep); opacity: 0.5; }

/* ---------- methodology note ---------- */
.prov { margin-top: 16px; border: 1px solid var(--cs-rule-soft); border-radius: 12px; padding: 16px 20px; background: var(--panel); }
.prov .pt { font-family: var(--font-heading); font-weight: 700; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shell-deep); margin: 0 0 9px; }
.prov p { font-family: var(--font-body); font-size: 0.88rem; line-height: 1.6; color: rgba(28, 28, 28, 0.78); margin: 0; }

/* ---------- comparison matrix ---------- */
.vs { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--cs-rule-soft); border: 1px solid var(--cs-rule-soft); border-radius: 12px; overflow: hidden; }
@media (min-width: 760px) { .vs { grid-template-columns: 1fr 1fr; } }
.vs .vc { background: var(--panel); padding: 15px 17px; font-family: var(--font-body); font-size: 0.92rem; line-height: 1.6; }
.vs .vhd { background: var(--panel-accent); font-family: var(--font-heading); font-weight: 700; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shell-deep); padding: 11px 17px; }
.vs .vc.a { color: rgba(28, 28, 28, 0.66); }
.vs .vc.b { color: rgba(28, 28, 28, 0.9); }
.vs .vc.b strong { font-weight: 600; color: var(--shell-deep); }
.vs .vl { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 7px; }
@media (min-width: 760px) { .vs .vhd.m { display: none; } .vs .vl { display: none; } }
@media (max-width: 759px) { .vs .vhd { display: none; } .vs .vc.b { border-left: 2px solid var(--signal); } }

/* ---------- conclusion cards ---------- */
.cards4 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards4 { grid-template-columns: 1fr 1fr; } }
.ccard { border: 1px solid var(--cs-rule-soft); border-radius: 12px; padding: 18px 20px; background: var(--panel); }
.ccard .cn { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-muted); margin: 0 0 10px; }
.ccard .ct { font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; line-height: 1.28; letter-spacing: -0.01em; color: var(--shell-deep); margin: 0 0 9px; text-wrap: pretty; }
.ccard .cb { font-family: var(--font-body); font-size: 0.9rem; line-height: 1.6; color: rgba(28, 28, 28, 0.82); margin: 0; }

/* ---------- simple staged track ---------- */
.track5 { display: flex; flex-direction: column; gap: 8px; }
.tstage { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; border: 1px solid var(--cs-rule-soft); border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.tstage .tn { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-muted); padding-top: 2px; }
.tstage .tt { font-family: var(--font-heading); font-weight: 700; font-size: 0.96rem; color: var(--shell-deep); margin: 0 0 5px; }
.tstage .td { font-family: var(--font-body); font-size: 0.88rem; line-height: 1.55; color: rgba(28, 28, 28, 0.8); margin: 0; }
.tstage.gate { border-color: var(--shell-deep); background: rgba(38, 77, 54, 0.06); }
.tstage.term { border-color: rgba(37, 87, 57, 0.45); background: var(--cs-reduction-fill); }

/* ---------- readout + back ---------- */
.cs-readout { margin: 46px 0 0; padding: 18px 20px; border-radius: 12px; background: var(--console); border: 1px solid rgba(182, 230, 42, 0.18); position: relative; overflow: hidden; }
.cs-readout::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(182, 230, 42, 0.35) 1px, transparent 1px); background-size: 100% 20px; opacity: 0.07; }
.cs-readout .rl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(182, 230, 42, 0.6); margin: 0 0 8px; }
.cs-readout .rline { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--signal); white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
.cs-back { max-width: 1080px; margin: 26px auto 0; padding: 0 clamp(20px, 4.4vw, 72px); font-family: var(--font-mono); font-size: 13px; color: var(--pg-soft); display: flex; align-items: center; gap: 9px; }
.cs-back a { color: var(--pg-signal-soft); text-decoration: none; }
.cs-back a:hover { color: var(--pg-signal); }

@media (prefers-reduced-motion: reduce) { .cs-shell * { transition: none !important; animation: none !important; } }
