/* ============================================================
   Bend-La Pine 2026 — piece-specific style overrides
   ------------------------------------------------------------
   Only override what's unique to this piece. Everything else
   inherits from findings-base.css.
   ============================================================ */

/* Hero number flourish — make the headline residual feel like the moment */
#hero-stat-number {
  font-feature-settings: "tnum", "kern";
  font-variation-settings: "opsz" 144;
}

/* Transparency rubric table */
.rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: var(--step-0);
}
.rubric-table thead th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-strong);
  padding: var(--space-2) var(--space-2);
}
.rubric-table tbody td {
  padding: var(--space-2) var(--space-2);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-soft);
}
.rubric-table tbody tr:last-child td { border-bottom: none; }
.rubric-table td:first-child {
  font-weight: 500;
  color: var(--ink);
  max-width: 28ch;
}
.rubric-dot {
  display: inline-block;
  width: 0.7em; height: 0.7em;
  border-radius: 50%;
  margin-right: 0.4em;
  vertical-align: -0.05em;
}
/* Pill-style status: tinted background + matching text color.
   Greens/yellows pulled from --good/--warn (and *-soft fills added 2026-05-17). */
.rubric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.rubric-pill::before {
  content: "";
  display: inline-block;
  width: 0.55em; height: 0.55em;
  border-radius: 50%;
  background: currentColor;
}
.rubric-pill--green  { background: var(--good-soft); color: var(--good); }
.rubric-pill--yellow { background: var(--warn-soft); color: var(--warn); }
.rubric-pill--neutral{ background: var(--rule); color: var(--ink-muted); }

/* Summary line above rubric */
.rubric-summary {
  font-family: var(--font-body);
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.02em;
}
.rubric-summary strong { color: var(--ink); font-weight: 600; }
.rubric-summary .rubric-summary__sep { color: var(--ink-faint); margin: 0 0.5em; }

.rubric-status {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: lowercase;
  color: var(--ink-muted);
  letter-spacing: -0.01em;
}

/* Section index — small ordinal label at top of major sections.
   Editorial orientation: "01 / 08" feels like a chapter mark. */
.f-section-index {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 var(--space-2);
  display: block;
}

/* Personnel mini-stats — small 3-stat row above the prose */
.f-personnel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.f-personnel-stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  display: block;
  font-feature-settings: "tnum";
}
.f-personnel-stat__label {
  font-family: var(--font-body);
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-top: 0.35rem;
  line-height: var(--leading-snug);
  display: block;
}
@media (max-width: 600px) {
  .f-personnel-stats { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* Methodology section: subtle tinted background so it reads as supporting material. */
#methodology {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 100%;
  padding: var(--space-5) var(--gutter);
}
#methodology > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.rubric-note {
  color: var(--ink-muted);
  font-size: var(--step--1);
  line-height: var(--leading-snug);
  max-width: 42ch;
}

/* ============================================================
   Bond stack — per-step inline mini-visuals
   ------------------------------------------------------------
   Each lives inside a .f-scrolly__step (right column, ~480px
   wide desktop). Additive to the sticky main chart.
   ============================================================ */
.f-bond-step {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--rule);
  font-family: var(--font-body);
}

/* --- Step 1: refunding vs new money, side-by-side -------- */
.f-bond-step__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  align-items: end;
}
.f-bond-step__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.f-bond-step__label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.f-bond-step__amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  font-size: var(--step-2);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.f-bond-step__col--refund .f-bond-step__amount { color: var(--ink-faint); }
.f-bond-step__col--new    .f-bond-step__amount { color: var(--accent); }
.f-bond-step__bar {
  height: 6px;
  width: 100%;
  background: var(--rule);
  position: relative;
  margin-top: var(--space-1);
}
.f-bond-step__bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--h, 60%);
  background: var(--ink-faint);
}
.f-bond-step__col--new .f-bond-step__bar::after { background: var(--accent); }
.f-bond-step__note {
  font-size: var(--step--1);
  line-height: var(--leading-snug);
  color: var(--ink-muted);
  margin-top: var(--space-1);
}
.f-bond-step__note--centered { text-align: center; margin-top: var(--space-2); }

/* --- Step 2: horizontal scale comparison ----------------- */
.f-bond-step__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.f-bond-step__row {
  display: grid;
  grid-template-columns: 48px 1fr 64px;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step--1);
  color: var(--ink-muted);
}
.f-bond-step__row-label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  letter-spacing: -0.01em;
}
.f-bond-step__row-bar {
  display: block;
  height: 14px;
  background: var(--rule);
  position: relative;
}
.f-bond-step__row-bar > span {
  display: block;
  height: 100%;
  background: var(--ink-faint);
}
.f-bond-step__row-val {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.f-bond-step__row--hi .f-bond-step__row-label,
.f-bond-step__row--hi .f-bond-step__row-val {
  color: var(--accent-dark);
  font-weight: 600;
}
.f-bond-step__row--hi .f-bond-step__row-bar > span { background: var(--accent); }

/* --- Step 3: waterfall SVG ------------------------------- */
.f-bond-step__waterfall {
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
  display: block;
  font-family: var(--font-body);
}
.f-bond-step__sw-auth   { fill: var(--accent); }
.f-bond-step__sw-tranche{ fill: var(--ink); }
.f-bond-step__sw-sum    { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.f-bond-step__sw-line   { fill: none; stroke: var(--ink-faint); stroke-width: 1; }
.f-bond-step__sw-label-lg {
  fill: #fff;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
}
.f-bond-step__sw-label-lg--sum { fill: var(--accent-dark); }
.f-bond-step__sw-label {
  fill: #fff;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.f-bond-step__sw-sub {
  fill: rgba(255,255,255,0.78);
  font-size: 8.5px;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
}

/* --- Mobile tightening ----------------------------------- */
@media (max-width: 768px) {
  .f-bond-step__pair { gap: var(--space-2); }
  .f-bond-step__amount { font-size: var(--step-1); }
  .f-bond-step__row { grid-template-columns: 40px 1fr 56px; }
}

/* Plot SVG: tame the default font-family inheritance bug in some browsers */
.f-chart__viz svg, .f-chart__viz figure {
  margin: 0;
  font-family: var(--font-body) !important;
}
.f-chart__viz figure { font-size: 13px; }
