/* what-it-funds.css — "What it actually funds" block on /grants/* (component-scoped: .gp-wf).
   The section also carries .gp-rs, so every --rs-* token (ink, forest, sienna, display/body
   fonts, radii) is inherited from recipient-stats.css. Nothing here restyles .gp-rs itself.
   Chart rules (dataviz): ONE hue for magnitude, the top row emphasised, text always in ink
   tokens and never in the series colour, thin marks with rounded data-ends. */

.gp-wf { --wf-bar: #9DBFAF; --wf-bar-top: var(--rs-forest-deep, #1B4332); --wf-tail: #D6D3D1; --wf-ex: #C9A57C; }

.gp-wf__capsule strong { font-weight: 700; color: var(--rs-ink); }

.gp-wf__block { margin-top: 28px; }
.gp-wf__h3 {
  margin: 0 0 12px;
  font-family: var(--rs-body);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--rs-ink-2);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
}
.gp-wf__h3-sub { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--rs-ink-3); font-size: 12.5px; }

/* ── Ranked bars ─────────────────────────────────────────────────────────── */
.gp-wf__rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rs-line); }
.gp-wf__row { border-bottom: 1px solid var(--rs-line); }
.gp-wf__d > summary { list-style: none; cursor: pointer; }
.gp-wf__d > summary::-webkit-details-marker { display: none; }
.gp-wf__sum {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr) 92px 16px;
  align-items: center; column-gap: 16px;
  padding: 13px 4px; min-height: 48px;
  border-radius: 6px;
}
.gp-wf__sum--static { grid-template-columns: minmax(0, 250px) minmax(0, 1fr) 92px 16px; }
.gp-wf__d > summary:hover { background: var(--rs-forest-04); }
.gp-wf__d > summary:focus-visible { outline: 2px solid var(--rs-forest); outline-offset: 2px; }
.gp-wf__label { font-size: 15px; font-weight: 600; color: var(--rs-ink); line-height: 1.3; }
.gp-wf__tail-list { display: block; font-size: 12.5px; font-weight: 400; color: var(--rs-ink-3); margin-top: 2px; }
.gp-wf__track { display: block; height: 12px; }
.gp-wf__bar { display: block; height: 12px; min-width: 4px; background: var(--wf-bar); border-radius: 0 4px 4px 0; }
.gp-wf__bar--top { background: var(--wf-bar-top); }
.gp-wf__bar--tail { background: var(--wf-tail); }
.gp-wf__pct { text-align: right; font-size: 15px; color: var(--rs-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-wf__pct strong { font-weight: 700; }
.gp-wf__count { font-size: 12px; color: var(--rs-ink-3); margin-left: 4px; }
.gp-wf__chev {
  width: 8px; height: 8px; justify-self: center;
  border-right: 2px solid var(--rs-ink-3); border-bottom: 2px solid var(--rs-ink-3);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s ease;
}
.gp-wf__d[open] .gp-wf__chev { transform: rotate(-135deg) translate(-2px, -2px); }

.gp-wf__detail { padding: 2px 4px 18px; max-width: 760px; }
.gp-wf__typical { margin: 0 0 10px; font-size: 14px; color: var(--rs-ink-2); }
.gp-wf__typical strong { color: var(--rs-ink); }
.gp-wf__ex-lead { margin: 0 0 6px; font-size: 12.5px; color: var(--rs-ink-3); }
.gp-wf__ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gp-wf__ex li {   /* plain quotations, not cards: three boxes of equal weight read as three equal claims */
  position: relative; padding: 1px 0 1px 14px;
  font-size: 14.5px; line-height: 1.5; color: var(--rs-ink);
}
.gp-wf__ex li::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--wf-bar); }
.gp-wf__evidence { margin-top: 22px; }
.gp-wf__ev-type { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--rs-ink-2); }
.gp-wf__ev-type:first-of-type { margin-top: 0; }
.gp-wf__lead { margin: 0 0 14px; font-size: 15px; color: var(--rs-ink); }
.gp-wf__tail { display: block; padding: 11px 4px; font-size: 13.5px; color: var(--rs-ink-2); }
.gp-wf__tail strong { color: var(--rs-ink); font-variant-numeric: tabular-nums; }
.gp-wf__tail .gp-wf__tail-list { display: inline; margin: 0; }
.gp-wf__tail .gp-wf__tail-list::before { content: '\00a0\00b7\00a0'; }
.gp-wf__more { margin-top: 24px; border-top: 1px solid var(--rs-line); }
.gp-wf__more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; min-height: 48px; font-size: 14.5px; font-weight: 600; color: var(--rs-forest-deep); border-radius: 6px; }
.gp-wf__more > summary::-webkit-details-marker { display: none; }
.gp-wf__more > summary:hover { background: var(--rs-forest-04); }
.gp-wf__more > summary:focus-visible { outline: 2px solid var(--rs-forest); outline-offset: 2px; }
.gp-wf__more[open] .gp-wf__chev { transform: rotate(-135deg) translate(-2px, -2px); }
.gp-wf__block--more { margin-top: 6px; }

/* ── Journey ─────────────────────────────────────────────────────────────── */
.gp-wf__journey {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  position: relative;
}
.gp-wf__journey::before {   /* the path the dots sit on */
  content: ''; position: absolute; left: 10%; right: 10%; top: 30px; height: 2px; background: var(--rs-line);
}
.gp-wf__step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; }
.gp-wf__dotwrap { height: 60px; display: flex; align-items: center; justify-content: center; }
.gp-wf__dot { display: block; border-radius: 50%; background: var(--wf-bar); box-shadow: 0 0 0 2px var(--rs-paper); }
.gp-wf__step--top .gp-wf__dot { background: var(--wf-bar-top); }
.gp-wf__step-pct { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--rs-ink); font-variant-numeric: tabular-nums; }
.gp-wf__step-label { margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--rs-ink-2); }
.gp-wf__step--top .gp-wf__step-label { color: var(--rs-ink); font-weight: 600; }
.gp-wf__fine { margin: 12px 0 0; font-size: 12.5px; color: var(--rs-ink-3); }

/* ── New vs existing ─────────────────────────────────────────────────────── */
.gp-wf__split { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.gp-wf__seg { display: block; height: 100%; }
.gp-wf__seg--new { background: var(--wf-bar-top); }
.gp-wf__seg--mid { background: var(--rs-line); }
.gp-wf__seg--ex { background: var(--wf-ex); }
.gp-wf__split-key { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 13.5px; color: var(--rs-ink-2); }
.gp-wf__key { position: relative; padding-left: 16px; }
.gp-wf__key::before { content: ''; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 2px; }
.gp-wf__key--new::before { background: var(--wf-bar-top); }
.gp-wf__key--ex { text-align: right; padding-left: 0; padding-right: 16px; }
.gp-wf__key--ex::before { left: auto; right: 0; background: var(--wf-ex); }
.gp-wf__key strong { color: var(--rs-ink); }

.gp-wf__tiles { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gp-wf__tile { padding: 12px 14px; background: var(--rs-paper-warm); border: 1px solid var(--rs-line); border-radius: var(--rs-r-sm); display: flex; flex-direction: column; gap: 6px; }
.gp-wf__tile-num { font-family: var(--rs-display); font-size: 24px; font-weight: 600; color: var(--rs-forest-deep); line-height: 1; font-variant-numeric: tabular-nums; }
.gp-wf__meter { display: block; height: 4px; border-radius: 2px; background: var(--rs-line); overflow: hidden; }
.gp-wf__meter span { display: block; height: 100%; background: var(--wf-bar-top); border-radius: 2px; }
.gp-wf__tile-label { font-size: 13px; line-height: 1.3; color: var(--rs-ink-2); }

.gp-wf__cue {
  margin: 18px 0 0; padding: 14px 16px;
  background: var(--rs-forest-04); border-left: 3px solid var(--rs-forest); border-radius: 0 var(--rs-r-sm) var(--rs-r-sm) 0;
  font-size: 15px; line-height: 1.5; color: var(--rs-ink);
}
.gp-wf__source { margin-top: 18px; }

/* ── Phone ───────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .gp-wf__sum, .gp-wf__sum--static {
    grid-template-columns: minmax(0, 1fr) auto 16px;
    grid-template-areas: "label pct chev" "track track track";
    row-gap: 8px; column-gap: 10px; padding: 12px 2px;
  }
  .gp-wf__label { grid-area: label; }
  .gp-wf__pct { grid-area: pct; }
  .gp-wf__chev { grid-area: chev; }
  .gp-wf__track { grid-area: track; }
  .gp-wf__step-label { font-size: 11.5px; }
  .gp-wf__step-pct { font-size: 14px; }
  .gp-wf__dotwrap { height: 52px; }
  .gp-wf__journey::before { top: 26px; }
  .gp-wf__split-key { flex-direction: column; gap: 4px; }
  .gp-wf__key--ex { text-align: left; padding-right: 0; padding-left: 16px; }
  .gp-wf__key--ex::before { left: 0; right: auto; }
  .gp-wf__tiles { grid-template-columns: 1fr; gap: 8px; }
  .gp-wf__tile { flex-direction: row; align-items: center; gap: 12px; }
  .gp-wf__tile-num { min-width: 52px; font-size: 20px; }
  .gp-wf__meter { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gp-wf__chev { transition: none; } }
