/* ===========================================================================
   Alerra.ai - The Numbers.

   Every chart on this page is a single series showing magnitude, so none of
   them needs a legend or a categorical palette: one hue, the value written on
   the bar, and a recessive axis. Red carries loss throughout, which is the one
   semantic the palette already agrees on.
   ========================================================================= */

.num-hero{padding-block:clamp(40px,6vh,76px) clamp(18px,3vh,28px)}
.num-hero .h1{max-width:13ch}
.num-hero .lede{max-width:66ch}

.num-band{padding-block:clamp(38px,6vh,74px);border-top:1px solid var(--line)}
.num-band > * + *{margin-top:clamp(18px,2.6vh,28px)}

/* ---------- headline figures ---------- */

.hero-figs{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  margin-bottom:clamp(10px,2vh,18px)}
.hero-fig{border:1px solid var(--line);border-top:2px solid var(--mark-red);
  border-radius:0 0 6px 6px;background:var(--surface);padding:clamp(16px,2.2vw,22px)}
.hero-v{font-family:var(--mono);font-size:clamp(26px,3.4vw,40px);font-weight:700;
  letter-spacing:-.02em;color:var(--ink);line-height:1.1}
.hero-l{font-size:13.5px;font-weight:700;color:var(--ink);margin-top:9px;line-height:1.4}

/* ---------- cited figures ---------- */

.figs{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(215px,1fr))}
.fig{border:1px solid var(--line);border-radius:6px;background:var(--surface);
  padding:clamp(14px,2vw,18px);display:flex;flex-direction:column;gap:8px}
.fig-v{font-family:var(--mono);font-size:clamp(22px,2.6vw,30px);font-weight:700;
  color:var(--ink);line-height:1.1;letter-spacing:-.02em}
.fig-u{font-size:.5em;font-weight:600;color:var(--dim);margin-left:.25em;
  letter-spacing:.06em}
.fig-n{font-size:12.5px;line-height:1.55;color:var(--dim)}
/* The source is part of the figure, so it is styled as content, not as a note. */
.fig-s{display:block;margin-top:auto;padding-top:9px;border-top:1px solid var(--line);
  font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.07em;
  color:var(--dim-2);line-height:1.45}
.fig-trend{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;
  text-transform:uppercase;align-self:flex-start;border-radius:3px;padding:3px 7px}
.fig-trend.is-up{color:var(--mark-red);background:rgba(255,79,94,.08);
  border:1px solid rgba(255,79,94,.24)}
.fig-trend.is-down{color:var(--mark-green);background:rgba(46,230,168,.08);
  border:1px solid rgba(46,230,168,.24)}

/* ---------- charts ---------- */

.chart{border:1px solid var(--line);border-radius:6px;background:var(--surface);
  padding:clamp(16px,2.2vw,22px)}
.chart + .chart{margin-top:12px}
.chart-head{margin-bottom:18px}
.chart-note{font-size:13px;color:var(--dim);line-height:1.55;margin:7px 0 9px;max-width:72ch}
.chart-pair{display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)}
@media (max-width:900px){.chart-pair{grid-template-columns:1fr}}

/* Horizontal bars: label, bar, value. The dl is the chart and the table view
   at once, so a screen reader reads figures rather than decoration. */
.bars{display:grid;grid-template-columns:minmax(96px,auto) minmax(0,1fr);
  gap:0 14px;align-items:center;margin:0}
.bars dt{font-size:13px;color:var(--dim);padding:8px 0;line-height:1.35}
.bars dd{display:grid;grid-template-columns:minmax(0,1fr) 88px;align-items:center;
  gap:11px;padding:8px 0;margin:0;min-width:0}
.bar-track{display:block;width:100%;min-width:0}
.bar{display:block;height:9px;min-width:2px;border-radius:0 3px 3px 0;
  background:var(--mark-red);width:var(--pct);transform-origin:left center}
.bar-v{font-size:12px;color:var(--ink);white-space:nowrap;text-align:right}

/* Grow from the baseline on reveal. */
.chart[data-reveal="pending"] .bar{transform:scaleX(0)}
.chart[data-reveal="in"] .bar{transform:scaleX(1);
  transition:transform .85s var(--ease)}
.chart[data-reveal="in"] .bars dd:nth-child(4) .bar{transition-delay:.06s}
.chart[data-reveal="in"] .bars dd:nth-child(6) .bar{transition-delay:.12s}
.chart[data-reveal="in"] .bars dd:nth-child(8) .bar{transition-delay:.18s}
.chart[data-reveal="in"] .bars dd:nth-child(10) .bar{transition-delay:.24s}

/* Columns: the year series reads better vertically, since it is time. */
.chart-col .bars{display:flex;align-items:flex-end;gap:clamp(10px,2.4vw,26px);
  height:210px;padding-top:12px}
.chart-col .bars dt{order:2;font-family:var(--mono);font-size:11px;padding:0;
  text-align:center;letter-spacing:.06em}
.chart-col .bars dd{order:1;display:flex;flex-direction:column-reverse;
  justify-content:flex-start;height:100%;padding:0;gap:7px}
.chart-col .bars > *{flex:1 1 0;min-width:0}
/* flex:1 1 auto on the base .bar makes a column bar grow to fill its track,
   which silently rendered every year at the same height regardless of its
   value. The height has to be the flex basis, not a property flex can override. */
.chart-col .bar-track{flex:0 0 var(--pct);height:var(--pct);display:flex;align-items:flex-end}
.chart-col .bar{width:100%;height:100%;border-radius:3px 3px 0 0;min-height:2px;
  transform-origin:bottom center}
.chart-col[data-reveal="pending"] .bar{transform:scaleY(0)}
.chart-col[data-reveal="in"] .bar{transform:scaleY(1)}
.chart-col .bar-v{font-size:11.5px;text-align:center;width:100%;flex:0 0 auto}
/* Pairs each year label under its own column. */
.chart-col .bars{display:grid;grid-template-columns:repeat(4,1fr);
  grid-template-rows:1fr auto;align-items:end;height:230px}
.chart-col .bars dt{grid-row:2}
.chart-col .bars dd{grid-row:1}

/* ---------- caveats ---------- */

.caveats{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(255px,1fr))}
.caveat{border:1px solid var(--line);border-left:2px solid var(--gold);
  border-radius:0 6px 6px 0;background:var(--surface);padding:clamp(15px,2vw,20px)}
.caveat-t{font-size:15.5px;font-weight:700;color:var(--ink);margin-bottom:9px;
  letter-spacing:-.01em}
.caveat p{font-size:13px;line-height:1.6}

/* ---------- sources ---------- */

.sources{list-style:none;border:1px solid var(--line);border-radius:6px;
  background:var(--surface);overflow:hidden}
.sources li{display:grid;grid-template-columns:62px minmax(0,1fr);gap:14px;
  padding:12px clamp(14px,2vw,18px);border-bottom:1px solid var(--line);
  font-size:13px;color:var(--dim);line-height:1.5}
.sources li:last-child{border-bottom:0}
.src-y{font-size:11px;color:var(--dim-2);letter-spacing:.08em}

.num-close{padding-block:clamp(46px,7vh,88px);border-top:1px solid var(--line)}
.num-close p{margin-top:clamp(20px,3vh,30px)}

@media (prefers-reduced-motion:reduce){
  .chart[data-reveal="pending"] .bar{transform:none}
}
