/* Humanitarian funding pages (Aid Flows, Donor Detail, OECD DAC, Country-
   Based Pooled Funds), 18 Oct 2026. Built on migration_funding.css (classes
   mf-) and prism_grapher.css (pg-, prism-); what those do not cover is here,
   prefixed fp-. */

/* year control: one row of buttons, the chosen year filled */
.fp-years { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; }
.fp-years > span { font: 500 11px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: #4A5972; }
.fp-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid rgba(11, 27, 51, 0.14); border-radius: 6px; background: #fff; overflow: hidden; }
.fp-seg button { border: 0; border-right: 1px solid rgba(11, 27, 51, 0.1); background: none; min-height: 40px; padding: 8px 14px; cursor: pointer;
  font: 600 13.5px/1 'Inter', sans-serif; color: #14294A; font-variant-numeric: tabular-nums; }
.fp-seg button:last-child { border-right: 0; }
.fp-seg button:hover { background: #E6ECF7; }
.fp-seg button[aria-pressed="true"] { background: #1e40af; color: #fff; }
.fp-seg button:focus-visible { outline: 2px solid #1e40af; outline-offset: -2px; }

/* a select that picks the page's subject (a donor, a fund) */
.fp-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; margin: 0 0 18px; }
.fp-pick label { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 320px; max-width: 520px; }
.fp-pick label > span { font: 500 11px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: #4A5972; }
.fp-pick input, .fp-pick select { min-height: 44px; padding: 8px 12px; border: 1px solid rgba(11, 27, 51, 0.22); border-radius: 6px; background: #fff;
  font: 500 15px/1.2 'Inter', sans-serif; color: #0B1B33; width: 100%; }
.fp-pick input:focus-visible, .fp-pick select:focus-visible { outline: 2px solid #1e40af; outline-offset: 1px; }

/* ranked bars outside a grapher (donors, sectors, plans): the grapher's
   chart rows on a plain card */
.fp-rank { padding: 0; border: 0; background: none; }
.fp-rank .pg-cbar { cursor: default; text-decoration: none; color: inherit; }
.fp-rank a.pg-cbar { cursor: pointer; }
.fp-rank a.pg-cbar:hover .pg-cbar-n { color: #1e40af; text-decoration: underline; }
.fp-rank .pg-cbar-n { white-space: normal; line-height: 1.25; }
.fp-rank .pg-more { margin-top: 10px; }
.fp-note { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: #4A5972; }
.fp-msg { margin: 8px 0; padding: 12px 14px; border-radius: 6px; background: #F4F6F8; color: #14294A; font-size: 14px; line-height: 1.5; }
.fp-msg.is-wait { border-left: 3px solid #1e40af; }
.fp-msg.is-error { border-left: 3px solid #b91c1c; }
.fp-empty { background: #fff; border: 1px dashed rgba(11, 27, 51, 0.22); border-radius: 10px; padding: 36px 24px; text-align: center; margin: 0 0 22px; }
.fp-empty h2 { font: 600 20px/1.25 'Source Serif 4', Georgia, serif; color: #0B1B33; margin: 0 0 8px; }
.fp-empty p { margin: 0 auto; max-width: 560px; color: #4A5972; font-size: 14.5px; line-height: 1.55; }

@media (max-width: 760px) {
  .mf-grid2 { grid-template-columns: minmax(0, 1fr); }
  .fp-seg button { padding: 8px 11px; font-size: 13px; }
}
/* on a phone the year control is one row that scrolls, the chosen year
   scrolled into view by PRISM_Funding.markYear (18 Oct 2026) */
@media (max-width: 480px) {
  .fp-years .fp-seg { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .fp-years .fp-seg button { flex: 0 0 auto; }
}
