/* World Hunger Fund - Stats page. Rust + gold from the original infographic, charcoal + paper from the site. */
.whf-stats-page {
  --st-rust: #b5532e;
  --st-rust-dark: #8f3f22;
  --st-gold: #d9a441;
  --st-ink: #2e2e2e;
  --st-ink-2: #555;
  --st-muted: #7a746a;
  --st-neutral: #ddd6c8;
  --st-neutral-2: #b9b1a1;
  --st-neutral-3: #8d8576;
  --st-paper: #f7f5f0;
  --st-green: #e5efe3;
  --st-line: #e6e1d4;
}

.st { background: #fff; color: var(--st-ink); font-family: 'Raleway', sans-serif; }
.st strong { font-weight: 700; }
.st-section { padding: 64px 20px; max-width: 1120px; margin: 0 auto; }
.st-section--paper, .st-section--green { max-width: none; }
.st-section--paper { background: var(--st-paper); }
.st-section--green { background: var(--st-green); }
.st-section--paper > *, .st-section--green > * { max-width: 1080px; margin-left: auto; margin-right: auto; }

/* The tiny source line that sits next to each stat */
.st-src { display: block; margin-top: 6px; font-family: Arial, sans-serif; font-size: 10.5px; line-height: 1.35; color: var(--st-muted); font-weight: 400; letter-spacing: 0.1px; }
.st-src::before { content: 'Source: '; }
.st-src--center { text-align: center; }
figcaption.st-src::before, .st-bars--spend > .st-src::before { content: 'Source: '; }

.st-band { background: var(--st-rust); text-align: center; padding: 22px 20px; }
.st-band h2 { margin: 0; color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: 1px; text-transform: uppercase; }
.st-kicker { text-align: center; font-family: 'Montserrat', sans-serif; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--st-ink); margin: 0 0 36px; }
.st-kicker .st-src { font-size: 11px; }

.st-h2 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; text-align: center; color: var(--st-ink); margin: 0 auto 36px; max-width: 900px; }
.st-h2--rust { color: var(--st-rust); text-transform: uppercase; }
.st-h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.2rem; margin: 0 0 14px; }
.st-caps { text-transform: uppercase; letter-spacing: 1px; }
.st-caps--big { display: block; font-size: 1.6em; letter-spacing: 3px; margin-top: 6px; }
.st-lead { text-align: center; font-size: 1.1rem; line-height: 1.7; max-width: 820px; margin: -16px auto 36px; color: var(--st-ink-2); }
.st-lead .st-src { display: inline; margin-left: 4px; }

/* ---------- 1. Donut + tiles ---------- */
.st-101 { display: grid; grid-template-columns: minmax(260px, 1fr) 1.2fr; gap: 48px; align-items: center; }
.st-donut { margin: 0; text-align: center; }
.st-donut svg { width: 100%; max-width: 330px; height: auto; display: block; margin: 0 auto 18px; }
.st-donut circle { fill: none; stroke-width: 30; }
.st-donut__track { stroke: var(--st-neutral); }
.st-donut__value { stroke: var(--st-rust); stroke-linecap: butt; cursor: help; }
.st-donut__big { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 30px; fill: var(--st-ink); text-anchor: middle; }
.st-donut__small { font-family: 'Raleway', sans-serif; font-size: 13px; fill: var(--st-ink-2); text-anchor: middle; }
.st-donut figcaption { font-size: 1rem; line-height: 1.7; color: var(--st-ink-2); text-align: left; max-width: 400px; margin: 0 auto; }
.st-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.st-key--rust { background: var(--st-rust); }
.st-key--neutral { background: var(--st-neutral); }

.st-tiles { display: grid; gap: 16px; }
.st-tile { padding: 20px 22px; border: 1px solid var(--st-line); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04); }
.st-tile--rust { border-left: 5px solid var(--st-rust); }
.st-tile__num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1.1; color: var(--st-rust); }
.st-tile:not(.st-tile--rust) .st-tile__num { color: var(--st-ink); }
.st-tile__text { margin-top: 6px; font-size: 1.02rem; line-height: 1.55; color: var(--st-ink-2); }

/* ---------- Bar charts ---------- */
.st-bars { margin: 0 auto; max-width: 900px; }
.st-bar { margin-bottom: 26px; }
.st-bar__label { font-weight: 600; font-size: 1rem; margin-bottom: 8px; color: var(--st-ink); }
.st-bar__track { display: flex; align-items: center; gap: 2px; min-height: 24px; }
.st-bar__fill { display: block; height: 24px; min-width: 3px; cursor: help; }
.st-bar__track .st-bar__fill:last-of-type { border-radius: 0 4px 4px 0; }   /* rounded data-end, square at the baseline */
.st-bar__fill:focus { outline: 2px solid var(--st-ink); outline-offset: 2px; }
.st-bar__value { margin-left: 10px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.1rem; white-space: nowrap; color: var(--st-ink); }
.st-fill--rust { background: var(--st-rust); }
.st-fill--crime { background: var(--st-neutral-3); }
.st-fill--war { background: var(--st-neutral-2); }
.st-fill--disaster { background: var(--st-neutral); }
.st-fill--neutral { background: var(--st-neutral); }
.st-fill--neutral-dark { background: var(--st-neutral-3); }
.st-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; color: var(--st-ink-2); }
.st-legend li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.st-legend .st-key { margin-right: 6px; }
.st-legend .st-src { display: inline; margin: 0 0 0 6px; }
.st-note { text-align: center; font-size: 1.1rem; color: var(--st-ink-2); margin-top: 10px; }
.st-bar--compact { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; margin-bottom: 10px; }
.st-bar--compact .st-bar__label { margin: 0; text-align: right; font-size: 0.95rem; }
.st-bars--spend .st-bar__value { font-size: 1rem; }
.st-bars--spend > .st-src { margin-top: 14px; text-align: center; }

.st-table { margin-top: 18px; font-size: 0.9rem; }
.st-table summary { cursor: pointer; color: var(--st-muted); text-align: center; }
.st-table table { margin: 12px auto 0; border-collapse: collapse; background: #fff; }
.st-table th, .st-table td { padding: 6px 14px; border-bottom: 1px solid var(--st-line); text-align: left; }

.st-callout { display: flex; align-items: center; gap: 26px; max-width: 820px; margin: 48px auto 0; padding: 26px 30px; background: #fff; border-radius: 14px; border: 1px solid var(--st-line); }
.st-callout__num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(3rem, 8vw, 4.6rem); line-height: 1; color: var(--st-rust); }
.st-callout__text { font-size: 1.15rem; line-height: 1.6; }

/* ---------- 3. Every single day ---------- */
.st-week { display: grid; grid-template-columns: repeat(7, 1fr); border: 2px solid var(--st-ink); border-radius: 8px; overflow: hidden; max-width: 960px; margin: 0 auto; }
.st-day { text-align: center; border-right: 1px solid var(--st-line); padding-bottom: 16px; }
.st-day:last-child { border-right: 0; }
.st-day__short { display: none; }
.st-day__name { background: var(--st-paper); border-bottom: 1px solid var(--st-line); padding: 8px 4px; font-size: 0.85rem; font-weight: 600; }
.st-day__icon { margin: 14px auto 4px; display: block; }
.st-day__num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--st-ink); }
.st-every { text-align: center; font-family: 'Montserrat', sans-serif; color: var(--st-rust); font-size: clamp(1.8rem, 5vw, 3.2rem); line-height: 1.1; margin: 28px 0 6px; text-transform: uppercase; }

/* ---------- 4. Cost ---------- */
.st-cost { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.st-cost__lead { font-size: 1.3rem; line-height: 1.5; margin: 12px 0 0; color: var(--st-ink); }
.st-cost__ironic { background: #fff; border-radius: 14px; padding: 26px 28px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06); }
.st-ironic { font-family: 'Lora', serif; font-style: italic; font-weight: 700; color: var(--st-rust); font-size: 1.8rem; margin: 0 0 6px; }
.st-cost__compare { font-size: 1.2rem; line-height: 1.5; margin: 0 0 18px; }
.st-cost__compare mark { background: #f6e3c3; padding: 0 4px; border-radius: 3px; font-weight: 700; color: var(--st-ink); }
.st-compare__row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; margin-bottom: 10px; }
.st-compare__label { font-size: 0.85rem; color: var(--st-ink-2); text-align: right; }
.st-compare__track { display: flex; align-items: center; }
.st-compare__fill { display: block; height: 22px; border-radius: 0 4px 4px 0; cursor: help; }
.st-compare__value { margin-left: 8px; font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* ---------- 5. Rings ---------- */
.st-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.st-ring { margin: 0; text-align: center; }
.st-ring svg { width: 150px; height: 150px; display: block; margin: 0 auto 12px; }
.st-ring circle { fill: none; stroke-width: 13; }
.st-ring__track { stroke: var(--st-neutral); }
.st-ring__value { stroke: var(--st-rust); stroke-linecap: round; }
.st-ring__pct { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 22px; fill: var(--st-ink); text-anchor: middle; }
.st-ring__big { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--st-rust); }
.st-ring p { font-size: 1rem; line-height: 1.55; color: var(--st-ink-2); margin: 6px 0 0; }
.st-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.st-fact { padding: 18px 20px; background: var(--st-paper); border-radius: 10px; font-size: 0.98rem; line-height: 1.55; color: var(--st-ink-2); }

/* ---------- CTA, sources ---------- */
.st-cta { text-align: center; }
.st-cta__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.st-print { color: var(--st-ink) !important; border-color: var(--st-ink) !important; }
.st-sources { border-top: 1px solid var(--st-line); font-size: 0.85rem; color: var(--st-ink-2); }
.st-sources ol { padding-left: 20px; line-height: 1.6; }
.st-sources a { color: var(--st-rust-dark); }
.st-updated { margin-top: 14px; font-style: italic; color: var(--st-muted); }

.st-tooltip { position: absolute; z-index: 3000; display: none; max-width: 280px; padding: 8px 11px; border-radius: 6px; background: var(--st-ink, #2e2e2e); color: #fff; font: 13px/1.4 Arial, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); pointer-events: none; }

/* ---------- Photo backgrounds with a 50% white wash (placeholders; set at the top of index.php) ---------- */
.st-photo { position: relative; background-size: cover; background-position: center; border-radius: 14px; overflow: hidden; isolation: isolate; }
.st-photo::before { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.5); z-index: -1; }
.st-donut.st-photo { padding: 26px 22px 22px; background-position: center 30%; }
.st-callout.st-photo { background-position: center 62%; min-height: 300px; justify-content: space-between; max-width: 980px; }
.st-callout.st-photo .st-callout__text { max-width: 44%; }
@media (max-width: 860px) { .st-callout.st-photo { min-height: 0; } .st-callout.st-photo .st-callout__text { max-width: none; } .st-callout.st-photo .st-callout__num { margin-bottom: 150px; } }
.st-donut.st-photo figcaption { background: rgba(255, 255, 255, 0.82); border-radius: 10px; padding: 12px 14px; }
.st-donut.st-photo .st-donut__track { stroke: rgba(255, 255, 255, 0.9); }
.st-donut.st-photo svg { filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.18)); }
.st-donut.st-photo .st-donut__big, .st-donut.st-photo .st-donut__small { paint-order: stroke; stroke: rgba(255, 255, 255, 0.9); stroke-width: 6px; stroke-linejoin: round; }
.st-callout.st-photo { background-color: #fff; border: 0; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.10); }
/* text sits on a lighter panel so it stays readable over any photo */
.st-panel, .st-callout.st-photo .st-callout__text { background: rgba(255, 255, 255, 0.84); border-radius: 10px; padding: 16px 18px; }
.st-callout.st-photo .st-callout__num { text-shadow: 0 0 4px #fff, 0 0 16px #fff, 0 0 26px #fff; }
.st-cost__ironic.st-photo { padding: 18px; }

.st-photo .st-src { color: #4f4a42; }

/* ---------- Tile icons ---------- */
.st-tile__num { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.st-icon { flex: 0 0 auto; height: 0.95em; width: auto; }
.st-icon--alert { height: 1em; }
.st-icon--people { height: 0.95em; }
.st-meanwhile {
  display: inline-block; transform: rotate(-4deg); padding: 4px 12px 5px; border-radius: 6px;
  background: var(--st-gold); color: var(--st-ink); font-family: 'Lora', serif; font-style: italic; font-weight: 700;
  font-size: 0.5em; letter-spacing: 0.5px; text-transform: uppercase; box-shadow: 2px 2px 0 var(--st-ink);
}

/* ---------- Crime / Disasters / Wars ---------- */
.st-h2--tight { margin-bottom: 18px; }
.st-h2--sub { margin-top: 18px; margin-bottom: 0; font-weight: 400; }
.st-threats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 820px; margin: 0 auto; text-align: center; }
.st-threat__word { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 4vw, 2.4rem); letter-spacing: 2px; text-transform: uppercase; color: var(--st-ink); }
.st-threat__icon { width: 100%; max-width: 165px; height: auto; display: block; margin: 8px auto 0; }
.st-combined { width: 75%; margin: 6px auto 30px; }
.st-combined svg { display: block; width: 100%; height: auto; }
.st-combined text { font-family: 'Montserrat', Arial, sans-serif; font-weight: 700; font-size: 140px; fill: var(--st-ink); }

/* ---------- RIP gravestones ---------- */
.st-day__icon { width: 42px; height: 50px; fill: none; opacity: 1; }

/* ---------- World map + $33 billion ---------- */
.st-mapblock { text-align: center; margin-bottom: 34px; }
.st-map { position: relative; max-width: 900px; margin: 0 auto; }
.st-map img { display: block; width: 100%; height: auto; }
.st-map__text {
  position: absolute; left: 0; right: 0; top: 40%; transform: translateY(-50%); margin: 0;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 5vw, 3.4rem); color: var(--st-ink);
  text-shadow: 0 0 2px #fff, 0 0 10px #fff, 0 0 22px #fff, 0 0 30px rgba(255, 255, 255, 0.9);
}
.st-cost__num { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--st-rust); line-height: 1; }
.st-mapblock .st-cost__num {
  position: relative; z-index: 2; margin-top: clamp(-90px, -9vw, -36px);
  font-size: clamp(3.4rem, 11vw, 7.5rem); text-shadow: 0 0 3px var(--st-green), 0 0 18px var(--st-green), 0 0 30px var(--st-green);
}
.st-mapblock .st-cost__num span { display: block; font-size: 0.32em; color: var(--st-ink); margin-top: 6px; letter-spacing: 1px; }
.st-cost__lead { font-size: 1.25rem; }

/* ---------- Family ---------- */
.st-family-wrap { text-align: center; margin-bottom: 18px; }
.st-family { width: 300px; max-width: 80%; height: auto; }

/* ---------- Less than $2 of food a day ---------- */
.st-food { border-top: 1px solid var(--st-line); }
.st-food__row { display: grid; grid-template-columns: 150px 1fr 150px; align-items: center; gap: 36px; max-width: 1040px; margin: 0 auto; }
.st-food__icon { width: 150px; height: 150px; display: block; }
.st-food__text { text-align: center; }
.st-food__text .st-h2 { margin-bottom: 18px; }
.st-food__amount { color: var(--st-rust); font-size: 1.3em; }
.st-food__text p { font-size: 1.08rem; line-height: 1.65; color: var(--st-ink-2); margin: 0 0 12px; }

/* Logo header/footer that only appears in the printed / PDF version */
.st-print-only { display: none; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 860px) {
  .st-101, .st-cost { grid-template-columns: 1fr; gap: 30px; }
  .st-rings, .st-facts { grid-template-columns: 1fr; }
  .st-section { padding: 48px 16px; }
  .st-callout { flex-direction: column; text-align: center; gap: 10px; }
  .st-food__row { grid-template-columns: 1fr 1fr; gap: 20px; justify-items: center; }
  .st-food__text { grid-column: 1 / -1; grid-row: 1; }
  .st-food__icon { width: 110px; height: 110px; }
}
@media (max-width: 640px) {
  .st-day__long { display: none; }
  .st-day__short { display: inline; }
  .st-day__name { font-size: 0.75rem; padding: 6px 2px; }
  .st-day__icon { width: 30px; height: 35px; margin-top: 10px; }
  .st-threat__word { letter-spacing: 0.5px; }
  .st-meanwhile { font-size: 0.42em; }
  .st-day__num { font-size: 0.72rem; letter-spacing: -0.2px; }
  .st-day { padding-bottom: 10px; }
  .st-bar--compact, .st-compare__row { grid-template-columns: 96px 1fr; gap: 8px; }
  .st-bar--compact .st-bar__label { font-size: 0.85rem; }
}

/* ---------- Printing / saving as PDF: just the stats ---------- */
@media print {
  body * { visibility: hidden; }
  #stats-main, #stats-main * { visibility: visible; }
  #stats-main { position: absolute; top: 0; left: 0; width: 100%; }
  .st-cta, .st-table, .st-tooltip { display: none !important; }
  .st-print-only { display: block !important; }
  .st-print-head { text-align: center; padding: 10px 0 18px; }
  .st-print-head img { height: 64px; width: auto; }
  .st-print-foot { display: flex !important; align-items: center; justify-content: center; gap: 10px; font-size: 11px; color: #555; padding: 14px 0 0; }
  .st-print-foot img { height: 22px; width: auto; }
  .st-photo, .st-photo::before, .st-section--paper, .st-section--green { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .st-section { padding: 24px 0; }
  .st-tile, .st-bar, .st-ring, .st-fact, .st-callout, .st-cost__ironic, .st-week, .st-donut { break-inside: avoid; }
  .st-band, .st-bar__fill, .st-compare__fill, .st-key { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
