/* Solutions Mapping | Durable Solutions Hub | Sudan */
:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --panel: #ffffff;
  --panel-2: #f6f5f1;
  --track: #eeede8;
  --ink: #1c2230;
  --ink-2: #3d4554;
  --muted: #646c7a;
  --faint: #9aa0a9;
  --line: #e2e0d9;
  --line-2: #d3d1c9;
  --brand: #1d5fae;
  --brand-dark: #164b8b;
  --brand-tint: #e8f0fa;
  --brand-tint-2: #f1f6fc;
  --brand-line: #d5e3f4;
  --on-brand: #ffffff;
  --warn-bg: #fdeee6;
  --warn-ink: #a3401a;
  --pipe-bg: #f1ecfb;
  --pipe-ink: #5541b5;
  --err: #b3261e;
  --err-bg: #fdf1f0;
  --err-line: #f0c1bd;
  --gap: #d6d5cf;
  --hatch-a: #e3e2dc;
  --hatch-b: #f3f2ee;
  --input-bg: #ffffff;
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.04);
  --shadow-lg: 0 20px 60px rgba(10, 20, 40, 0.28);
  /* map */
  --map-water: #e3edf5;
  --map-land: #f9f8f5;
  --map-land-stroke: #dddad2;
  --map-country-label: #9a9fa8;
  --map-none: #d8d4ca;
  --map-stroke: #ffffff;
  --map-outline: #5b6474;
  --map-label: #1c2230;
  --map-halo: rgba(255, 255, 255, 0.88);
  --map-select: #000000;
  --ring-bg: #ffffff;
  --chip-bg: #ffffff;
  --radius: 10px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12161d;
  --panel: #1b2029;
  --panel-2: #232934;
  --track: #2c3340;
  --ink: #e8ebf0;
  --ink-2: #c3c9d3;
  --muted: #98a0ad;
  --faint: #6c7480;
  --line: #2d3440;
  --line-2: #3a4250;
  --brand: #6ea6ec;
  --brand-dark: #8db9f1;
  --brand-tint: #1f3150;
  --brand-tint-2: #1a2638;
  --brand-line: #2a4166;
  --on-brand: #0d1522;
  --warn-bg: #3a2418;
  --warn-ink: #f2a77f;
  --pipe-bg: #2a2546;
  --pipe-ink: #b7a9f5;
  --err: #ff8a80;
  --err-bg: #3a1f1f;
  --err-line: #6b2f2b;
  --gap: #4a505b;
  --hatch-a: #39404c;
  --hatch-b: #262c36;
  --input-bg: #161b23;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --map-water: #121c28;
  --map-land: #161a21;
  --map-land-stroke: #262c35;
  --map-country-label: #6c7480;
  --map-none: #3d434e;
  --map-stroke: #12161d;
  --map-outline: #9aa0a9;
  --map-label: #e8ebf0;
  --map-halo: rgba(18, 22, 29, 0.9);
  --map-select: #ffffff;
  --ring-bg: #1b2029;
  --chip-bg: #ffffff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
svg.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }

/* ---------- Header ---------- */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1480px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.brand-logo { height: 42px; width: auto; display: block; border-radius: 4px; }
:root[data-theme="dark"] .brand-logo { background: #fff; padding: 3px 6px; }
.brand-divider { width: 1px; height: 36px; background: var(--line-2); }
.brand-kicker { font-size: 12px; letter-spacing: 0.08em; font-weight: 600; color: var(--brand); text-transform: uppercase; }
.brand-title { font-size: 21px; font-weight: 600; line-height: 1.15; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.main-nav a:hover { background: var(--bg); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.icon-toggle { width: 40px; height: 40px; padding: 0; justify-content: center; }
.icon-toggle svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font-size: 14px; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 30, 50, 0.18);
  padding: 6px; width: 300px;
}
.menu-item {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; width: 100%; text-align: left;
  padding: 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-decoration: none; color: var(--ink);
}
.menu-item:hover, .menu-item:focus-visible { background: var(--bg); color: var(--ink); }
.menu-item .mi-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; }
.menu-item .mi-ico svg { width: 18px; height: 18px; }
.menu-item b { display: block; font-weight: 600; font-size: 14.5px; }
.menu-item small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }

/* ---------- Layout ---------- */
.page { max-width: 1480px; margin: 0 auto; padding: 20px 24px 32px; display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
.content { display: grid; gap: 16px; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Filters ---------- */
.filters { padding: 18px 18px 8px; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.filters-head h2 { font-size: 17px; margin: 0; }
.field-label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.input { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--input-bg); }
.input::placeholder { color: var(--faint); }
.filter-block { border-bottom: 1px solid var(--line); padding: 4px 0 14px; margin-bottom: 12px; }
.filter-group { border-top: 1px solid var(--line); padding: 12px 0; }
.filter-group:first-of-type { border-top: 0; }
.filter-group > summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::before {
  content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid var(--ink); transform: rotate(-90deg); transition: transform 0.15s;
}
.filter-group[open] > summary::before { transform: rotate(0deg); }
.filter-group .options { margin-top: 8px; display: grid; gap: 2px; }
.opt { display: grid; grid-template-columns: 18px auto 1fr auto; align-items: center; gap: 8px; padding: 4px 2px; font-size: 14px; cursor: pointer; border-radius: 6px; }
.opt:hover { background: var(--bg); }
.opt input { margin: 0; width: 16px; height: 16px; accent-color: var(--brand); }
.opt .sw { width: 18px; height: 18px; display: grid; place-items: center; }
.opt .sw svg { width: 16px; height: 16px; }
.opt .cn { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-right: 5px; }
.opt .num { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt.no-sw { grid-template-columns: 18px 1fr auto; }
.opt.is-empty { color: var(--faint); }
.group-note { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.share-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 600; font-size: 14.5px; }
.share-row label { white-space: nowrap; }
.share-row output { color: var(--brand); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--brand); margin: 10px 0 4px; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; margin-top: 4px; }
.check-line input { margin: 2px 0 0; accent-color: var(--brand); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; min-width: 0; overflow: hidden; }
.kpi-label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); flex: none; }
.kpi-ico svg { width: 17px; height: 17px; }
.kpi-ico.warn { background: var(--warn-bg); color: var(--warn-ink); }
.kpi-value { font-size: 30px; font-weight: 600; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.note-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: -4px 2px 0; }
.note-line svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.showing-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.showing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-size: 13.5px; }
.tag button { border: 0; background: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); font-size: 16px; line-height: 1; }
.tag button:hover { background: var(--bg); color: var(--ink); }

/* ---------- Map + state panel ---------- */
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.map-card { padding: 16px 20px 14px; min-width: 0; }
.map-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.map-toolbar h2 { font-size: 18px; margin: 0 auto 0 0; white-space: nowrap; }
.tool { display: inline-flex; align-items: center; gap: 8px; }
.toolbar-label { font-size: 13.5px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; background: var(--input-bg); }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.seg button:disabled { color: var(--faint); cursor: not-allowed; }

.nationwide-band { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 8px; background: var(--brand-tint-2); border: 1px solid var(--brand-line); font-size: 14px; margin-bottom: 8px; }
.nationwide-band > svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.nationwide-band .grow { flex: 1; }

.map-wrap { position: relative; border-radius: 8px; overflow: hidden; }
.map-svg { width: 100%; height: auto; display: block; }
.map-svg .water { fill: var(--map-water); }
.map-svg .land { fill: var(--map-land); stroke: var(--map-land-stroke); stroke-width: 0.8; }
.map-svg .country-lbl { font-size: 11px; letter-spacing: 0.14em; fill: var(--map-country-label); font-weight: 500; pointer-events: none; }
.map-svg .border-undetermined { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 4; pointer-events: none; }
.map-svg .state { stroke: var(--map-stroke); stroke-width: 1.2; cursor: pointer; transition: fill 0.2s, opacity 0.3s; vector-effect: non-scaling-stroke; }
.map-svg .state:focus-visible { outline: none; }
.map-svg .state.is-dim { opacity: 0.35; }
.map-svg .sudan-outline { fill: none; stroke: var(--map-outline); stroke-width: 1.3; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .sel-outline { fill: none; stroke: var(--map-select); stroke-width: 2.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .hover-outline { fill: none; stroke: var(--map-select); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .flash-outline { fill: none; stroke: #f59e0b; stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .abyei { fill: url(#hatch); stroke: var(--faint); stroke-dasharray: 3 2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-svg .lbl { fill: var(--map-label); paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; pointer-events: none; font-weight: 500; }
.map-svg .lbl.is-dim { opacity: 0.45; }
.map-svg .lbl-abyei { font-style: italic; fill: var(--muted); font-weight: 400; }
.map-svg .ring { cursor: pointer; }
.map-svg .ring-num, .ring-svg .ring-num { font-size: 12.5px; font-weight: 700; fill: var(--map-label); pointer-events: none; }
.map-svg .agency-chip { cursor: pointer; }
.map-svg .agency-chip:hover .chip-bg, .map-svg .agency-chip:focus-visible .chip-bg { stroke: var(--brand); stroke-width: 2; }
.map-svg .agency-chip:focus-visible { outline: none; }
.map-svg .chip-bg { fill: var(--chip-bg); stroke: var(--line-2); stroke-width: 1; }
.map-svg .chip-badge { fill: var(--brand); }
.map-svg .chip-badge-t { fill: var(--on-brand); font-size: 10px; font-weight: 700; pointer-events: none; }
.map-svg .chip-text { font-size: 10px; font-weight: 700; fill: #1c2230; pointer-events: none; }
.map-svg .zoom-title { font-weight: 700; fill: var(--map-label); paint-order: stroke; stroke: var(--map-halo); stroke-width: 4px; text-anchor: middle; pointer-events: none; }
.map-svg .zoom-hint { fill: var(--muted); paint-order: stroke; stroke: var(--map-halo); stroke-width: 3px; text-anchor: middle; pointer-events: none; }
.map-back { position: absolute; top: 10px; left: 10px; z-index: 4; box-shadow: var(--shadow); }
.map-tip { position: absolute; pointer-events: none; background: #1c2230; color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 13px; line-height: 1.4; z-index: 5; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.map-tip strong { display: block; font-size: 14px; }
.map-disclaimer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: color-mix(in srgb, var(--panel) 85%, transparent); border-top: 1px solid var(--line);
  padding: 5px 12px; font-size: 10px; line-height: 1.4; color: var(--muted);
}
.map-disclaimer p { margin: 0 0 4px; }
.map-source { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.map-disclaimer p:last-child { margin: 0; }

.map-legend {
  position: absolute; left: 10px; right: 10px; bottom: 42px; z-index: 3;
  background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px 9px; font-size: 12px; box-shadow: var(--shadow);
}
.legend-top { display: flex; justify-content: space-between; align-items: center; }
.legend-head { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.legend-top .link-btn { font-size: 12px; }
#legend-body { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(250px, 1.35fr); gap: 6px 16px; margin-top: 4px; align-items: start; }
#legend-body .legend-row { display: grid; gap: 4px; align-content: start; min-width: 0; }
#legend-body .legend-ring svg { flex: none; width: 34px; height: 34px; }
#legend-body .legend-ring { align-items: flex-start; font-size: 11.5px; line-height: 1.35; }
#legend-body .legend-title { min-width: 0; }
#legend-body .crit-keys { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 2px 8px; font-size: 11.5px; }
#legend-body .crit-keys span { white-space: nowrap; }

.legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.legend-title { font-weight: 600; font-size: 12px; min-width: 118px; }
.legend-bins { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend-bins span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.legend-bins i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-ring { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); flex: 1; min-width: 0; }
.crit-keys { display: flex; flex-wrap: wrap; gap: 3px 10px; color: var(--ink-2); flex: 1; min-width: 0; }
.crit-keys span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.crit-keys svg { width: 14px; height: 14px; }
.crit-keys b { font-weight: 700; font-size: 12px; }

/* state panel */
.state-panel { padding: 16px 18px; }
.sp-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; }
.sp-kicker { font-size: 12px; letter-spacing: 0.08em; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.sp-name { font-size: 22px; font-weight: 600; margin: 2px 0 0; line-height: 1.2; }
.sp-select label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 4px; }
.sp-select select { padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--input-bg); max-width: 150px; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; }
.mini { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.mini .l { font-size: 12px; color: var(--muted); }
.mini .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini .v.small { font-size: 13px; font-weight: 500; color: var(--muted); padding-top: 6px; }
.alert-soon { display: flex; gap: 8px; align-items: center; background: var(--warn-bg); color: var(--warn-ink); padding: 8px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.alert-soon svg { width: 16px; height: 16px; flex: none; }
.sp-section { margin: 14px 0 6px; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; gap: 10px; }
.sp-section small { font-weight: 400; color: var(--muted); font-size: 12px; text-align: right; }
.agency-row { display: flex; flex-wrap: wrap; gap: 8px; }
.agency-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel); cursor: pointer; font-size: 13px; color: var(--ink);
}
.agency-btn:hover { border-color: var(--brand); }
.agency-btn .lg { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid #e5e3dc; }
.agency-btn .lg img { max-width: 22px; max-height: 22px; }
.agency-btn .lg span { font-size: 9px; font-weight: 700; color: #1c2230; }
.agency-btn b { font-weight: 600; }
.agency-btn em { font-style: normal; color: var(--muted); font-size: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr 90px 28px; align-items: center; gap: 8px; font-size: 13.5px; padding: 2px 0; }
.bar-row.crit { grid-template-columns: 18px 1fr 70px 30px; }
.bar-row.crit svg { width: 15px; height: 15px; }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; }
.bar.is-gap { background: repeating-linear-gradient(45deg, var(--hatch-a) 0 3px, var(--hatch-b) 3px 6px); }
.gap-word { color: var(--muted); font-size: 12px; }

.proj-card { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; cursor: pointer; color: var(--ink); }
.proj-card:hover { border-color: var(--brand); }
.proj-card .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.proj-card .o { font-size: 13px; color: var(--ink-2); margin: 3px 0; }
.proj-card .d { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proj-card .f { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--track); color: var(--ink-2); }
.chip.ongoing { background: var(--brand-tint); color: var(--brand); }
.chip.soon { background: var(--warn-bg); color: var(--warn-ink); }
.chip.pipeline { background: var(--pipe-bg); color: var(--pipe-ink); }
.chip.ended { background: var(--track); color: var(--muted); }
.progress { height: 4px; background: var(--track); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: #6f9ad6; }
.crit-dots { display: inline-flex; gap: 2px; vertical-align: middle; }
.crit-dots i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.panel-more { margin-top: 10px; }
.empty-note { color: var(--muted); font-size: 14px; padding: 6px 0; }

/* ---------- Time window ---------- */
.time-card { padding: 16px 20px; }
.time-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.time-head h2 { font-size: 18px; margin: 0; }
.time-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.time-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.pill { border: 1px solid var(--line-2); background: var(--input-bg); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.time-controls select { padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--input-bg); }
.time-chart { width: 100%; height: auto; display: block; margin-top: 12px; }
.time-chart .axis { font-size: 11px; fill: var(--muted); }
.time-chart .bar-in { fill: #2a6fc9; }
.time-chart .bar-out { fill: #c8d8ee; }
:root[data-theme="dark"] .time-chart .bar-in { fill: #5a95e0; }
:root[data-theme="dark"] .time-chart .bar-out { fill: #2b3a52; }
.time-chart .today { stroke: var(--ink); }
.time-chart .today-t { fill: var(--ink); font-weight: 600; }
.time-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Contributing agencies ---------- */
.agencies-card { padding: 18px 20px; }
.agencies-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.agencies-head h2 { font-size: 18px; margin: 0; }
.agencies-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.logo-strip { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; align-items: stretch; }
.logo-tile {
  display: grid; place-items: center; height: 84px; min-width: 150px; padding: 12px 20px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.logo-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20, 30, 50, 0.1); border-color: var(--brand); }
.logo-tile img { max-height: 56px; max-width: 190px; display: block; }
.logo-tile span { font-weight: 700; color: #1c2230; }
/* more organisations, smaller tiles (set in app.js: 7 to 10 = md, 11 or more = sm) */
.logo-strip[data-size="md"] { gap: 10px; }
.logo-strip[data-size="md"] .logo-tile { height: 68px; min-width: 118px; padding: 10px 14px; }
.logo-strip[data-size="md"] .logo-tile img { max-height: 42px; max-width: 150px; }
.logo-strip[data-size="sm"] { gap: 8px; }
.logo-strip[data-size="sm"] .logo-tile { height: 56px; min-width: 92px; padding: 8px 12px; }
.logo-strip[data-size="sm"] .logo-tile img { max-height: 32px; max-width: 118px; }
.logo-strip[data-size="sm"] .logo-tile span { font-size: 13px; }
.logo-tile.is-add { background: var(--brand-tint-2); border: 1px dashed var(--brand-line); color: var(--brand); text-decoration: none; font-weight: 600; gap: 4px; text-align: center; font-size: 13.5px; }
.logo-tile.is-add svg { width: 22px; height: 22px; }

/* ---------- Dialogs ---------- */
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--ink); background: var(--panel); overflow: hidden; }
dialog.modal::backdrop { background: rgba(14, 20, 32, 0.55); }
.modal-scroll { max-height: calc(100vh - 32px); overflow: auto; }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: #1c2230; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.modal-close:hover { background: #fff; }
.hero { position: relative; height: 230px; background: var(--brand-tint-2); overflow: hidden; }
.hero img.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .logo-hero { position: absolute; inset: 0; display: grid; place-items: center; background:
  radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 55%),
  radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 50%), var(--brand-tint-2); }
.hero .logo-card { background: #fff; border-radius: 14px; padding: 18px 28px; box-shadow: 0 8px 24px rgba(20, 30, 50, 0.12); }
.hero .logo-card img { max-height: 90px; max-width: 280px; display: block; }
.hero .logo-card span { font-size: 34px; font-weight: 700; color: #1c2230; }
.hero .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.9); color: #1c2230; cursor: pointer; font-size: 20px; }
.hero .nav.prev { left: 10px; }
.hero .nav.next { right: 10px; }
.hero .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.hero .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); }
.hero .dots i.on { background: #fff; }
.pop-body { padding: 18px 24px 8px; }
.pop-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.pop-title { font-size: 21px; line-height: 1.3; margin: 0 0 6px; }
.pop-org { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.pop-org .lg { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid #e5e3dc; display: grid; place-items: center; overflow: hidden; flex: none; }
.pop-org .lg img { max-width: 26px; max-height: 26px; }
.pop-org .lg span { font-size: 10px; font-weight: 700; color: #1c2230; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.fig { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.fig .l { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.fig .l svg { width: 14px; height: 14px; color: var(--brand); }
.fig .v { font-size: 19px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.fig .s { font-size: 12px; color: var(--muted); }
.pop-section { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.crit-list { display: flex; flex-wrap: wrap; gap: 8px; }
.crit-pill { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 6px; font-size: 13.5px; }
.crit-pill .ci { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.crit-pill .ci svg { width: 15px; height: 15px; }
.where { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; }
.mini-map { width: 170px; height: auto; display: block; }
.mini-map path { stroke: var(--map-stroke); stroke-width: 1.5; fill: var(--map-none); }
.mini-map path.on { fill: var(--brand); }
.mini-map .bg { fill: var(--map-water); }
.where dl, .pop-dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.where dt, .pop-dl dt { color: var(--muted); }
.where dd, .pop-dl dd { margin: 0; }
.people-bars { display: grid; gap: 6px; }
.people-bars .pb { display: grid; grid-template-columns: 120px 1fr 80px; gap: 10px; align-items: center; font-size: 13.5px; }
.people-bars .pb .n { text-align: right; font-variant-numeric: tabular-nums; }
.pop-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); margin-top: 16px; }
.pop-actions .spacer { flex: 1; }
.pop-nudge { padding: 12px 24px 18px; font-size: 13.5px; color: var(--muted); background: var(--brand-tint-2); border-top: 1px solid var(--brand-line); }
.agency-modal-head { display: flex; gap: 16px; align-items: center; padding: 20px 60px 14px 24px; border-bottom: 1px solid var(--line); }
.agency-modal-head .logo-box { background: #fff; border: 1px solid #e5e3dc; border-radius: 10px; padding: 8px 12px; display: grid; place-items: center; min-width: 90px; height: 64px; }
.agency-modal-head .logo-box img { max-height: 46px; max-width: 160px; }
.agency-modal-head .logo-box span { font-weight: 700; color: #1c2230; }
.agency-modal-head h2 { margin: 0; font-size: 19px; }
.agency-modal-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.agency-modal-body { padding: 8px 24px 20px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1c2230; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 100; box-shadow: var(--shadow-lg); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner { max-width: 1480px; margin: 0 auto; padding: 16px 24px; display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer-inner .grow { flex: 1; min-width: 260px; }
.footer-credits { width: 100%; font-size: 12px; color: var(--faint); }
.footer-credits a { color: inherit; }

/* ---------- Form page ---------- */
.form-page { max-width: 1240px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.form-page h1 { font-size: 28px; margin: 0 0 6px; }
.lede { color: var(--ink-2); margin: 0 0 18px; }
.multi-box { display: flex; gap: 14px; align-items: center; padding: 14px 18px; margin-bottom: 16px; background: var(--brand-tint-2); border: 1px solid var(--brand-line); border-radius: 10px; }
.multi-box > span:first-child { display: grid; place-items: center; flex: none; }
.multi-box > span:first-child svg { width: 30px; height: 30px; color: var(--brand); }
.multi-box .grow { flex: 1; font-size: 14px; color: var(--ink-2); }
.multi-box b { color: var(--ink); display: block; font-size: 15px; }
.correcting { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.form-section { padding: 20px 22px; margin-bottom: 16px; }
.form-section h2 { font-size: 18px; margin: 0 0 14px; }
.form-section h2 .n { color: var(--brand); }
.fgrid { display: grid; gap: 14px 16px; }
.fgrid.c2 { grid-template-columns: 1fr 1fr; }
.fgrid.c3 { grid-template-columns: repeat(3, 1fr); }
.fgrid.c6 { grid-template-columns: repeat(6, 1fr); }
.fld > label, .fld > .lbl { display: flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14.5px; margin-bottom: 6px; white-space: nowrap; }
.fld .help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.req { color: var(--warn-ink); }
textarea.input { min-height: 84px; resize: vertical; }
.readonly { background: var(--panel-2); border-color: var(--line); color: var(--ink-2); }
.affix { position: relative; }
.affix .input { padding-left: 28px; }
.affix.suffix .input { padding-left: 12px; padding-right: 30px; }
.affix > span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
.affix > span.pre { left: 12px; }
.affix > span.suf { right: 12px; }
.tip { position: relative; display: inline-flex; }
.tip-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--brand); font-size: 11px; font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: help; display: grid; place-items: center; padding: 0; }
.tip-pop {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 320px; z-index: 20;
  background: #1c2230; color: #fff; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.5;
  font-weight: 400; white-space: normal; box-shadow: var(--shadow-lg); display: none;
}
.tip-pop b { display: block; margin-bottom: 4px; }
.tip:hover .tip-pop, .tip:focus-within .tip-pop { display: block; }
.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pills label { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer; font-weight: 400; margin: 0; }
.choice-pills input { accent-color: var(--brand); margin: 0; }
.choice-pills label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.state-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; }
.state-grid label, .radio-row label, .loc-grid label, .check-col label { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 14.5px; margin: 0; cursor: pointer; }
.state-grid input, .radio-row input, .loc-grid input, .check-col input { accent-color: var(--brand); margin: 0; }
.radio-row { display: flex; gap: 24px; flex-wrap: wrap; }
.check-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.loc-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.loc-group legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.loc-group .loc-tools { font-size: 12.5px; margin: 0 0 6px; }
.loc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 14px; }
.loc-grid label { font-size: 13.5px; }
.is-disabled { opacity: 0.5; }
.crit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crit-grid .crit-opt { display: grid; grid-template-columns: 18px 30px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-weight: 400; margin: 0; }
.crit-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint-2); }
.crit-opt input { margin: 6px 0 0; accent-color: var(--brand); }
.crit-opt .ci { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.crit-opt .ci svg { width: 17px; height: 17px; }
.crit-opt b { font-weight: 500; display: block; }
.crit-opt small { color: var(--muted); font-size: 13px; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; background: var(--input-bg); }
.chips-input input { border: 0; outline: 0; flex: 1; min-width: 200px; padding: 4px; background: transparent; }
.chips-input .ch { display: inline-flex; gap: 6px; align-items: center; background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 500; }
.chips-input .ch button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.photo-drop { border: 1px dashed var(--line-2); border-radius: 10px; padding: 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.photo-drop > svg { width: 30px; height: 30px; color: var(--brand); }
.photo-list { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.photo-item { width: 150px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px; background: var(--panel); }
.photo-item img { width: 150px; height: 100px; object-fit: cover; display: block; }
.photo-item div { padding: 6px 8px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.photo-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14.5px; cursor: pointer; font-weight: 400; }
.consent input { margin-top: 3px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 16px; align-items: center; margin: 8px 0 24px; flex-wrap: wrap; }
.form-actions .btn { padding: 11px 22px; font-size: 15.5px; }
.err { color: var(--err); font-size: 13px; margin-top: 5px; }
.has-err .input, .has-err .choice-pills label, .has-err .crit-opt, .has-err .chips-input { border-color: #d0443a; }
.error-summary { border: 1px solid var(--err-line); background: var(--err-bg); color: var(--err); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.side-card { padding: 18px 20px; margin-bottom: 14px; }
.side-card h2 { font-size: 17px; margin: 0 0 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 14px; color: var(--ink-2); }
.steps b { color: var(--ink); display: block; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.sticky-side { position: sticky; top: 16px; }
.done-panel { padding: 22px; }
.done-panel h2 { margin: 0 0 8px; }
.done-panel textarea { width: 100%; min-height: 220px; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.attach-note { display: flex; gap: 10px; align-items: flex-start; background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); border-radius: 8px; padding: 10px 14px; font-size: 14.5px; margin: 10px 0; }
.attach-note svg { width: 22px; height: 22px; flex: none; }
.photo-note { display: flex; gap: 12px; align-items: flex-start; background: var(--brand-tint-2); border: 1px solid var(--brand-line); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.photo-note svg { width: 26px; height: 26px; color: var(--brand); flex: none; }

/* ---------- About page ---------- */
.about { max-width: 920px; margin: 0 auto; padding: 24px; }
.about h1 { font-size: 28px; margin: 0 0 10px; }
.about .card { padding: 20px 24px; margin-bottom: 16px; }
.about h2 { font-size: 19px; margin: 0 0 10px; }
.about table { border-collapse: collapse; width: 100%; font-size: 14px; }
.about th, .about td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.about th { font-weight: 600; color: var(--ink-2); }
.about .ci { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; vertical-align: middle; margin-right: 6px; }
.about .ci svg { width: 15px; height: 15px; }
.about ul { padding-left: 20px; margin: 6px 0; }
.about li { margin-bottom: 4px; }

/* ---------- Responsive (desktop first; phones must not break) ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-row { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; }
  .form-page { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
}
@media (max-width: 760px) {
  .map-disclaimer { position: static; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; }
  .map-legend { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .where { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner, .page, .footer-inner, .form-page, .about { padding-left: 16px; padding-right: 16px; }
  .header-actions { margin-left: 0; width: 100%; }
  .brand-logo { height: 34px; }
  .brand-divider { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid.c2, .fgrid.c3, .crit-grid, .check-col { grid-template-columns: 1fr; }
  .fgrid.c6 { grid-template-columns: repeat(2, 1fr); }
  .state-grid, .loc-grid { grid-template-columns: 1fr 1fr; }
  .where dl, .pop-dl { grid-template-columns: 1fr; gap: 2px; }
  .where dd, .pop-dl dd { margin-bottom: 8px; }
  .hero { height: 170px; }
  .dropdown-menu { right: auto; left: 0; }
  .tip-pop { width: 260px; left: 0; transform: none; }
  .fld > label, .fld > .lbl { white-space: normal; flex-wrap: wrap; }
  .multi-box { flex-wrap: wrap; }
  .chips-input input { min-width: 0; }
}

/* ---------- Round 3: project list under the map, criteria icons, back button ---------- */
.map-col { display: grid; gap: 16px; min-width: 0; }
.list-card { padding: 16px 20px; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.list-head h2 { font-size: 18px; margin: 0; }
.list-head small { color: var(--muted); font-size: 13px; }
.proj-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 6px 18px; align-items: center;
  width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-top: 8px; cursor: pointer; color: var(--ink);
}
.proj-row:hover, .proj-row:focus-visible { border-color: var(--brand); }
.proj-row .t { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.proj-row .o { font-size: 13px; color: var(--ink-2); margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.proj-row .o .lg { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid #e5e3dc; display: grid; place-items: center; overflow: hidden; flex: none; }
.proj-row .o .lg img { max-width: 17px; max-height: 17px; }
.proj-row .o .lg span { font-size: 7px; font-weight: 700; color: #1c2230; }
.proj-row .when { font-size: 13px; color: var(--muted); }
.proj-row .when .line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.proj-row .right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.proj-row .money { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.proj-row .money b { font-size: 15px; color: var(--ink); }
.crit-icons { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.crit-icons .ci { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.crit-icons .ci svg { width: 15px; height: 15px; }
.list-more { margin-top: 12px; text-align: center; }
.panel-note { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: var(--brand-tint-2); border: 1px solid var(--brand-line); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin-bottom: 12px; }
.panel-note span { display: inline-flex; gap: 8px; align-items: center; }
.panel-note svg { width: 16px; height: 16px; color: var(--brand); }
.modal-back { position: absolute; top: 10px; left: 10px; z-index: 3; height: 36px; padding: 0 14px 0 8px; border-radius: 18px; border: 0; background: rgba(255, 255, 255, 0.94); color: #1c2230; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.modal-back svg { width: 18px; height: 18px; }
.modal-back:hover { background: #fff; }
.agency-modal-head.has-back { padding-top: 54px; }
@media (max-width: 900px) {
  .proj-row { grid-template-columns: 1fr; }
  .proj-row .right { justify-items: start; text-align: left; }
}

/* full-width rows below the filters and content */
.page > .full-row { grid-column: 1 / -1; }

/* summary card mini charts */
.kbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 8px 0 6px; background: var(--track); }
.kbar i { display: block; height: 100%; }
.kleg { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; color: var(--muted); }
.kleg b { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.kdots { display: grid; grid-template-columns: repeat(9, 12px); gap: 3px; margin: 8px 0 6px; }
.kdots button { width: 12px; height: 12px; border-radius: 3px; background: var(--brand); border: 0; padding: 0; cursor: pointer; }
.kdots button.off { background: var(--map-none); }
.kdots button:hover, .kdots button:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.kdots button.on { outline: 2px solid #f2b705; outline-offset: 1px; }
.kmonths { display: flex; gap: 4px; align-items: flex-end; height: 40px; margin: 8px 0 0; }
.kmonths div { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.kmonths i { display: block; background: #e2895f; border-radius: 2px; margin: 0 auto 2px; width: 100%; }
.ktop { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.ktop div { display: flex; justify-content: space-between; gap: 8px; }
.ktop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ktop b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.clear-link { font-size: 12.5px; margin-left: 6px; }
/* no browser focus frame on map shapes; keyboard focus shows the outline instead */
.map-svg .state:focus, .map-svg .ring:focus, .map-svg .agency-chip:focus, .map-svg:focus { outline: none; }

#legend-body .legend-bins { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 10px; }
#legend-body .legend-bins .none { grid-column: 1 / -1; }
#legend-body .legend-bins span { white-space: nowrap; }

/* when the map is narrow, the legend and disclaimer sit below the map instead of over it */
.map-wrap { container-type: inline-size; }
@container (max-width: 640px) {
  .map-legend { position: static; margin: 8px 0 0; box-shadow: none; }
  .map-disclaimer { position: static; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; }
  #legend-body { grid-template-columns: auto minmax(0, 1fr); }
  #legend-body .legend-row:last-child { grid-column: 1 / -1; }
}

/* ---------- preview, live card, my submissions ---------- */
.photo-ph { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.92); border-radius: 999px; padding: 4px 12px; font-size: 12px; color: #5b6474; white-space: nowrap; }
.logo-note { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin: -4px 0 14px; }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.flow > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.flow > div.on { border-color: var(--brand); background: var(--brand-tint-2); }
.flow b { display: block; color: var(--ink); font-size: 14px; }
.flow .n { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.flow > div.on .n { background: var(--brand); color: var(--on-brand); }
.pv-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; align-items: start; }
.pv-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pv-box > h2 { font-size: 15px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pv-box > h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.pv-box .hero { height: 190px; }
.tag-new { background: #e6f4ee; color: #17694a; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pmap { width: 100%; height: auto; display: block; }
.pmap .land { fill: var(--map-land); stroke: var(--map-land-stroke); }
.pmap .st { fill: var(--map-none); stroke: var(--map-stroke); }
.pmap .st.has { fill: #a3c4ec; }
.pmap .st.mine { fill: var(--brand); }
.pmap .sel { fill: none; stroke: var(--map-select); stroke-linejoin: round; }
.pmap text { font-weight: 700; fill: #1c2230; paint-order: stroke; stroke: #fff; }
.changes { padding: 12px 16px; display: grid; gap: 10px; }
.chg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.chg .h { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; }
.chg .cnt { font-size: 13.5px; color: var(--ink-2); font-weight: 400; }
.chg .cnt b { color: var(--brand); font-size: 16px; }
.chg .fill { margin-top: 6px; font-size: 13px; color: #17694a; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chg .fill .ci { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.chg .fill .ci svg { width: 13px; height: 13px; }
.private { margin-top: 16px; display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); }
.private svg { width: 22px; height: 22px; color: var(--brand); flex: none; }
.pv-actions { display: flex; gap: 12px; margin: 16px 0 24px; justify-content: flex-end; flex-wrap: wrap; }
.pv-actions .btn { padding: 11px 20px; font-size: 15px; }
.mini-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel); }
.mini-card .mc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.mini-card .mc-head b { color: var(--ink); }
.mini-card .lg { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e5e3dc; display: grid; place-items: center; background: #fff; overflow: hidden; flex: none; }
.mini-card .lg img { max-width: 28px; max-height: 28px; }
.mini-card .lg span { font-size: 9px; font-weight: 700; color: #1c2230; text-align: center; padding: 2px; }
.mini-card .mc-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.mini-card .mc-line { font-size: 12.5px; color: var(--muted); margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-card .mc-line b { color: var(--ink); }
.mini-card .crit-icons .ci { width: 28px; height: 28px; }
.mini-card .crit-icons .ci svg { width: 16px; height: 16px; }
.live-tag { font-size: 12px; font-weight: 600; background: #e6f4ee; color: #17694a; border-radius: 999px; padding: 2px 10px; }
.mine-page { max-width: 1000px; margin: 0 auto; padding: 24px; }
.mine-page h1 { font-size: 28px; margin: 0 0 6px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 12px 16px; font-size: 14px; margin: 0 0 18px; }
.notice svg { width: 22px; height: 22px; flex: none; }
.mine-item { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; margin-bottom: 14px; padding: 14px; }
.mine-item .meta { display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.mine-item .meta .btn { justify-content: center; }
.st-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.st-badge.sent { background: var(--brand-tint); color: var(--brand); }
.st-badge.live { background: #e6f4ee; color: #17694a; }
@media (max-width: 900px) { .pv-grid, .flow, .mine-item { grid-template-columns: 1fr; } }

.form-page.previewing { grid-template-columns: 1fr; max-width: 1180px; }
.form-page.previewing > aside, .form-page.previewing #form-title, .form-page.previewing #form-lede, .form-page.previewing #correcting { display: none !important; }
.hero .logo-card span { font-size: 26px; display: block; max-width: 320px; text-align: center; line-height: 1.2; }
.pv-box .where dl, .pv-box .pop-dl { grid-template-columns: 130px minmax(0, 1fr); }

.ym { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.error-summary a { color: inherit; }
.krisk { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.krisk b { font-size: 18px; color: var(--warn-ink); margin-right: 2px; }
.pv-ref { display: inline-flex; gap: 8px; align-items: center; background: var(--brand-tint); color: var(--brand); border-radius: 8px; padding: 5px 12px; font-size: 14px; font-weight: 600; margin: 4px 0 10px; }
.pv-ref:empty { display: none; }
.mine-ref { font-size: 13px; color: var(--muted); }
.mine-ref b { color: var(--ink); }
.pub-note { background: #e6f4ee; color: #17694a; border-radius: 8px; padding: 8px 10px; font-size: 13px; }

/* ---------- direct sending: photos, logo, confirmation ---------- */
.help-line { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 10px; line-height: 1.5; }
#photo-box { margin-bottom: 16px; }
#photo-box .photo-drop { cursor: pointer; background: var(--brand-tint-2); border-color: var(--brand-line); }
#photo-box .photo-drop:hover { border-color: var(--brand); }
#photo-ico2 svg { width: 30px; height: 30px; color: var(--brand); display: block; }
.photo-item .shrunk { color: #1a7a4c; font-weight: 500; white-space: normal; }
:root[data-theme="dark"] .photo-item .shrunk { color: #7fd6a6; }
.photo-item button { background: none; border: 0; padding: 0; color: var(--err); cursor: pointer; font: inherit; font-size: 12px; }
.photo-item div { flex-direction: column; align-items: flex-start; }
.logo-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-prev { width: 64px; height: 64px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); font-weight: 700; display: grid; place-items: center; overflow: hidden; font-size: 13px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-err { background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.send-err .link-btn { color: inherit; text-decoration: underline; font-weight: 500; }
#ts-box:not(:empty) { margin: 14px 0 0; }
.sent-ok { width: 44px; height: 44px; border-radius: 50%; background: #e6f4ec; color: #1a7a4c; display: grid; place-items: center; margin-bottom: 10px; }
.sent-ok svg { width: 22px; height: 22px; }
.sent-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.sent-facts > div { background: var(--panel-2); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sent-facts > div > span:first-child { color: var(--muted); }
.sent-facts b { font-size: 16px; }
.sent-facts .chip { align-self: flex-start; }

/* ---------- Add multiple projects ---------- */
.multi-page { max-width: 1180px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.multi-page h1 { font-size: 28px; margin: 0 0 6px; }
.multi-kicker { margin: 0; font-size: 13px; color: var(--muted); }
.multi-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.multi-step { padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.multi-step p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.step-n { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.xl-drop { cursor: pointer; width: 100%; box-sizing: border-box; background: var(--brand-tint-2); border-color: var(--brand-line); padding: 12px 14px; font-size: 14px; }
.xl-drop:hover { border-color: var(--brand); }
#xl-ico svg { width: 26px; height: 26px; color: var(--brand); display: block; }
.tbl-card { overflow: hidden; }
.rows-head { padding: 14px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.rows-head h2 { margin: 0; font-size: 18px; }
.tbl-wrap { overflow-x: auto; }
.rows-tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 820px; }
.rows-tbl th { text-align: left; background: var(--panel-2); color: var(--muted); font-size: 13px; font-weight: 500; padding: 10px 12px; }
.rows-tbl td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.rows-tbl th:first-child, .rows-tbl td:first-child { padding-left: 18px; }
.rows-tbl tr.bad td { background: var(--err-bg); }
.pill-ok, .pill-bad { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 500; }
.pill-ok { background: #e6f4ec; color: #1a7a4c; }
.pill-bad { background: var(--err-bg); color: var(--err); }
:root[data-theme="dark"] .pill-ok { background: #183b2a; color: #7fd6a6; }
.row-bad { color: var(--err); font-size: 13px; }
.row-note { color: var(--warn-ink); }
.multi-note { padding: 18px 20px; font-size: 14px; color: var(--ink-2); }
.multi-note p { margin: 6px 0 0; line-height: 1.5; }
.multi-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.sent-list { margin: 10px 0 14px; padding-left: 20px; line-height: 1.7; }
#logo-box { margin-bottom: 16px; }
/* donors with amounts */
.donor-rows { display: flex; flex-direction: column; gap: 8px; }
.donor-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px 36px; gap: 8px; align-items: center; }
.donor-row .rm { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.donor-row .rm:hover { color: var(--err); border-color: var(--err-line); }
.donor-row .rm[hidden] { display: block; visibility: hidden; }
#add-donor { margin-top: 8px; font-size: 14px; }
.donor-sum { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.donor-sum.over { color: var(--err); }
@media (max-width: 560px) { .donor-row { grid-template-columns: minmax(0, 1fr) 36px; } .donor-row .affix { grid-column: 1; } .donor-row .rm { grid-row: 1 / span 2; grid-column: 2; } }

/* test mode bar (test.html) */
.test-bar { background: #5541b5; color: #fff; font-size: 14px; padding: 8px 24px; text-align: center; }
.test-bar a, .test-bar button { color: #fff; font: inherit; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.test-page { max-width: 820px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.test-page h1 { font-size: 28px; margin: 0; }
.test-page .card { padding: 20px; }
.test-page ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; }
.test-state { font-weight: 500; }

/* Summary cards as filters */
.kpi { position: relative; }
.kf { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); pointer-events: none; }
.kf svg { width: 13px; height: 13px; }
.kclear { position: absolute; top: 12px; right: 12px; font: inherit; font-size: 11.5px; font-weight: 500; background: var(--brand); color: var(--on-brand); border: 0; border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.kclear:hover { background: var(--brand-dark); }
.kleg .kitem { font: inherit; color: inherit; background: none; border: 0; padding: 1px 4px; margin: 0 -4px; border-radius: 5px; display: inline-flex; align-items: center; text-align: left; }
.kleg button.kitem { cursor: pointer; }
.kleg button.kitem:hover, .kleg button.kitem:focus-visible { background: var(--brand-tint); color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.kleg .kitem.on { background: var(--brand-tint); color: var(--brand); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--brand); }
.kleg.has-on .kitem:not(.on) { opacity: 0.45; }
.kbar i[data-k], .kbar i[data-donors] { cursor: pointer; }
.kbar.has-on i:not(.on) { opacity: 0.3; }
.kmore { display: inline-grid; place-items: center; min-width: 20px; height: 15px; margin-left: 4px; border: 1px solid var(--line-2); border-radius: 5px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
.klink { font: inherit; font-size: 12px; color: var(--brand); background: none; border: 0; padding: 0; margin-top: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.klink[aria-pressed="true"] { font-weight: 600; text-decoration: none; }

/* All donors window */
dialog.modal-donors { width: min(720px, calc(100vw - 24px)); }
.dl { padding: 22px 24px 4px; max-height: calc(100vh - 140px); overflow: auto; }
.dl h2 { margin: 0 0 4px; font-size: 20px; }
.dl-sub { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; padding-right: 30px; }
.dl-search { width: 100%; margin-bottom: 10px; }
.dl-head, .dl-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 90px 82px 40px 58px; gap: 10px; align-items: center; }
.dl-head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 8px 6px; border-bottom: 1px solid var(--line); }
.dl-head span:nth-child(n+4) { text-align: right; }
.dl-row { width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px; text-align: left; cursor: pointer; }
.dl-row:hover { background: var(--brand-tint-2); }
.dl-row.on { background: var(--brand-tint); }
.dl-row.nr { cursor: default; color: var(--muted); font-style: italic; }
.dl-row.nr:hover { background: none; }
.dl-check { width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 4px; display: grid; place-items: center; font-size: 11px; color: var(--on-brand); }
.dl-row.on .dl-check { background: var(--brand); border-color: var(--brand); }
.dl-row.nr .dl-check { visibility: hidden; }
.dl-name { overflow-wrap: anywhere; }
.dl-bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.dl-bar i { display: block; height: 100%; background: var(--brand); }
.dl-amt, .dl-pct, .dl-n { text-align: right; font-variant-numeric: tabular-nums; }
.dl-pct, .dl-n { color: var(--muted); }
.dl-empty { color: var(--muted); padding: 12px 8px; }
.dl-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 12px; }
.dl-actions { display: flex; gap: 10px; padding: 12px 24px; border-top: 1px solid var(--line); }
.dl-actions .spacer { flex: 1; }
@media (max-width: 620px) {
  .dl-head, .dl-row { grid-template-columns: 18px minmax(0, 1fr) 76px 52px; }
  .dl-head span:nth-child(3), .dl-row .dl-bar, .dl-head span:nth-child(5), .dl-row .dl-pct { display: none; }
}
.kselect-wrap { position: absolute; top: 12px; right: 12px; max-width: 58%; z-index: 4; }
.kselect { font: inherit; max-width: 100%; height: 26px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; color: var(--ink-2); background: var(--panel); cursor: pointer; float: right; }
.kselect span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kselect svg { width: 11px; height: 11px; flex: none; transition: transform 0.15s; }
.kselect[aria-expanded="true"] svg { transform: rotate(180deg); }
.kselect:hover, .kselect:focus-visible, .kselect[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.kselect.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 500; }
.kmenu { position: absolute; top: 32px; right: 0; width: 210px; max-height: 340px; overflow: auto; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(10, 20, 40, 0.18); }
.kmenu button { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.kmenu button em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.kmenu button:hover, .kmenu button:focus-visible { background: var(--brand-tint-2); }
.kmenu button.on { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.kmenu button.zero { color: var(--muted); }
.kpi:has(.kselect-wrap) { overflow: visible; z-index: 3; }
.kpi:has(.kselect-wrap) .kpi-label { padding-right: 96px; }
.list-action { padding: 14px 24px 2px; }
.klink[data-soon-list] { text-decoration: none; }
.klink .u { text-decoration: underline; text-underline-offset: 2px; }
.klink .kmore { display: inline-grid; }

/* IASC criteria: short explanation in a pop-up, and the source */
.crit-tip { vertical-align: 1px; margin-left: 2px; }
.crit-tip .tip-pop { font-weight: 400; }
.crit-tip .tip-pop b { font-weight: 500; }
.iasc-source { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.gender-row { margin-top: 14px; }
.sex-toggle { margin-top: 10px; font-size: 14px; }
.sex-box { margin-top: 10px; }
.sex-tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.sex-tbl th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 6px 8px 6px 0; font-size: 13px; }
.sex-tbl thead th { color: var(--muted); }
.sex-tbl td { padding: 4px 8px 4px 0; }
.sex-tbl .input { padding: 7px 10px; }
.sex-tbl .sx-sum { font-weight: 500; min-width: 70px; }
.female-note { font-size: 12px; color: var(--muted); }

/* ---------- sign in ---------- */
.signin-btn { gap: 7px; }
.signin-btn svg { width: 18px; height: 18px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); font: 600 14px var(--font); cursor: pointer; display: grid; place-items: center; }
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { background: var(--brand-dark); }
/* Account button: initials and the signed-in person's name */
.acct-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; max-width: 260px; padding: 0 12px 0 1px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink); font: 500 14.5px var(--font); cursor: pointer; }
.acct-chip:hover, .acct-chip[aria-expanded="true"] { border-color: var(--brand); }
.acct-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.acct-chip .avatar-btn { width: 38px; height: 38px; flex: none; cursor: inherit; }
.acct-chip:hover .avatar-btn, .acct-chip[aria-expanded="true"] .avatar-btn { background: var(--brand-dark); }
.acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chip svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
/* On the map pages the menu leaves less room: the name shows on wide screens, and stays in the tooltip and menu otherwise */
@media (max-width: 1440px) { .main-nav ~ .header-actions .acct-chip { padding: 0; border: 0; height: 40px; } .main-nav ~ .header-actions .acct-chip .acct-name, .main-nav ~ .header-actions .acct-chip svg { display: none; } }
@media (max-width: 760px) { .acct-chip { padding: 0; border: 0; height: 40px; } .acct-chip .acct-name, .acct-chip svg { display: none; } }
.acct-menu { width: 270px; }
.acct-menu .menu-item { display: block; width: 100%; text-align: left; font: 14.5px var(--font); padding: 9px 10px; }
.acct-who { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.acct-who b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.acct-role { display: inline-block; margin-top: 5px; padding: 1px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); font-size: 12px; font-weight: 600; }
:root[data-theme="dark"] .acct-role { color: var(--ink); }
dialog.signin-modal { width: min(420px, calc(100vw - 24px)); overflow: visible; }
.signin-box { padding: 26px 28px 24px; display: flex; flex-direction: column; }
.signin-box h2 { margin: 0 0 6px; font-size: 20px; padding-right: 36px; }
.signin-box p { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.signin-box .field-label { margin-bottom: 6px; }
.signin-code { letter-spacing: 8px; font-size: 22px; text-align: center; }
.signin-err { color: var(--err); font-size: 14px; min-height: 20px; margin-top: 6px; }
.signin-go { margin-top: 6px; width: 100%; justify-content: center; padding: 11px; }
.signin-box .signin-small { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.signin-box .signin-small .link-btn { font-size: 12.5px; }
.signin-join { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.signin-join input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.signin-join small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.signin-stop { background: var(--err-bg); border: 1px solid var(--err-line); border-radius: 8px; padding: 12px 14px; color: var(--err); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
dialog.signin-modal .modal-close { background: transparent; box-shadow: none; color: var(--muted); }
@media (max-width: 640px) { .signin-btn span { display: none; } .signin-btn { width: 40px; height: 40px; padding: 0; justify-content: center; } }

/* ---------- theme pages (women and girls): message first, detail on demand ---------- */
.w2 { max-width: 1100px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 40px; }
.w2 h2 { margin: 0 0 14px; font-size: 22px; }
.w2 h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.w2-ico { width: 44px; height: 44px; flex: none; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.w2-ico svg { width: 100%; height: 100%; }
.w2-ico.sm { width: 26px; height: 26px; }
.w2-cite { display: inline-block; min-width: 16px; margin-left: 3px; padding: 0 4px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 16px; text-align: center; vertical-align: super; text-decoration: none; color: var(--muted); background: var(--track); }
.w2-cite:hover { background: var(--brand); color: var(--on-brand); }
.w2-small { font-size: 13px; color: var(--muted); }
.w2-lead { margin: -6px 0 16px; color: var(--ink-2); font-size: 15.5px; max-width: 820px; }
/* the first screen */
.w2-top { background: #163f6e; color: #fff; border-radius: 16px; padding: 32px 36px 28px; }
:root[data-theme="dark"] .w2-top { background: #15263c; border: 1px solid #263a56; }
.w2-kicker { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #a9c8ee; }
.w2-top h1 { margin: 8px 0 10px; font-size: 34px; line-height: 1.2; max-width: 900px; }
.w2-sub { margin: 0; font-size: 16.5px; color: #d3e1f3; max-width: 780px; line-height: 1.5; }
.w2-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.w2-big-c { display: flex; gap: 14px; align-items: flex-start; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; padding: 18px; }
.w2-big-c .w2-ico { color: #9cc4f5; width: 46px; height: 46px; }
.w2-big-v { font-size: 38px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.w2-big-l { font-size: 15px; margin-top: 6px; line-height: 1.35; }
.w2-big-n { font-size: 13px; color: #a9c8ee; margin-top: 6px; }
.w2-top .w2-cite { background: rgba(255, 255, 255, 0.16); color: #d3e1f3; }
/* the return on investing in women, in the top section */
.w2-pays { margin-top: 18px; }
.w2-pays-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8fe3b0; }
.w2-pays-h a { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #d3e1f3; white-space: nowrap; }
.w2-pays-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.w2-pay { padding: 14px 16px; border-radius: 12px; background: rgba(120, 220, 160, 0.10); border: 1px solid rgba(143, 227, 176, 0.35); }
.w2-pay-v { font-size: 26px; font-weight: 700; line-height: 1.1; color: #8fe3b0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.w2-pay-l { margin-top: 4px; font-size: 13px; line-height: 1.4; color: #e3edf9; }
.w2-ask { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; align-items: center; margin-top: 16px; background: #fff; color: #1c2230; border-radius: 12px; padding: 16px 20px; }
:root[data-theme="dark"] .w2-ask { background: var(--panel); color: var(--ink); }
.w2-ask-h { font-weight: 700; font-size: 15px; color: #163f6e; max-width: 110px; line-height: 1.3; }
:root[data-theme="dark"] .w2-ask-h { color: #9cc4f5; }
.w2-ask ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; line-height: 1.45; }
.w2-ask-btn { background: #163f6e; border-color: #163f6e; color: #fff; white-space: nowrap; }
.w2-ask-btn:hover { background: #0f2f54; color: #fff; }
/* three things to know */
.w2-msgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.w2-msg { padding: 20px; }
.w2-msg-h { display: flex; align-items: center; gap: 10px; }
.w2-n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 14px; display: grid; place-items: center; flex: none; }
.w2-msg-s { margin-left: auto; font-size: 26px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.w2-msg h3 { margin: 12px 0 6px; font-size: 17px; }
.w2-msg p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
/* icon tiles */
.w2-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.w2-tile { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.w2-tile .w2-ico { width: 40px; height: 40px; }
.w2-tile-v { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.w2-tile-l { font-size: 14px; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.w2-inv h3 { margin: 4px 0 4px; font-size: 15px; }
.w2-inv p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.w2-warn { background: var(--warn-bg); border-color: transparent; }
.w2-warn .w2-ico { color: var(--warn-ink); }
.w2-warn a { color: inherit; }
.w2-more { margin-top: 12px; }
.w2-more > summary { cursor: pointer; color: var(--brand); font-weight: 500; font-size: 14.5px; padding: 6px 0; }
.w2-more[open] > summary { margin-bottom: 8px; }
.w2-needs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.w2-needs h3 { font-size: 15px; padding-bottom: 6px; border-bottom: 2px solid var(--brand-line); }
.w2-needs ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
/* what is missing */
.w2-fund { display: flex; flex-direction: column; gap: 14px; }
.w2-fund-c { padding: 20px 22px; }
.w2-fund-c h3 { margin-bottom: 14px; font-size: 17px; }
.w2-figs { display: flex; flex-wrap: wrap; gap: 6px; }
.w2-figs span { width: 28px; height: 38px; color: #c7ccd4; display: inline-flex; }
:root[data-theme="dark"] .w2-figs span { color: #3c4554; }
.w2-figs span.on { color: var(--brand); }
.w2-figs svg { width: 100%; height: 100%; }
.w2-fig-cap { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-2); }
.w2-fund-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.w2-bar { height: 14px; border-radius: 4px; background: var(--track); overflow: hidden; }
.w2-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.w2-bar-l { margin: 8px 0 0; font-size: 14.5px; color: var(--ink-2); }
.w2-gap { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.w2-gap li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.w2-gap b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* voices */
.w2-voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.w2-voice { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.w2-voice-b { padding: 20px 24px 22px; display: flex; flex-direction: column; flex: 1; }
.w2-ph { position: relative; margin: 0; aspect-ratio: 16 / 6; background: var(--brand-tint); overflow: hidden; }
.w2-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w2-ph figcaption { position: absolute; right: 8px; bottom: 8px; max-width: 80%; font-size: 11.5px; line-height: 1.3; color: #fff; background: rgba(10, 20, 35, 0.62); padding: 3px 8px; border-radius: 6px; }
.w2-ph-none { display: flex; align-items: center; justify-content: center; color: var(--brand); }
.w2-ph-none svg { width: 64px; height: 64px; opacity: 0.85; }
.w2-ph-none span { position: absolute; left: 16px; bottom: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.w2-voice blockquote { margin: 0; padding-left: 14px; border-left: 4px solid var(--brand); font-size: 19px; line-height: 1.4; font-weight: 500; color: var(--ink); }
.w2-by { margin: 8px 0 14px; font-size: 13px; color: var(--muted); padding-left: 18px; }
.w2-voice h3 { margin-bottom: 6px; font-size: 15px; }
.w2-voice h3 a { color: var(--ink); }
.w2-voice h3 a:hover { color: var(--brand); }
.w2-voice-b > p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.w2-voice-b > p.w2-small { margin: auto 0 0; padding-top: 6px; }
/* who is doing what */
.w2-table-wrap { overflow-x: auto; }
.w2-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.w2-table thead th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.w2-table tbody th { text-align: left; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; width: 22%; }
.w2-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; line-height: 1.45; }
.w2-table tr:last-child th, .w2-table tr:last-child td { border-bottom: 0; }
/* map, news, sources */
.w2-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.w2-proj { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.w2-news { padding: 16px 20px; }
.w2-news-l { list-style: none; margin: 0; padding: 0; }
.w2-news-l li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.w2-end { gap: 0; }
.w2-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.w2-src-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.w2-src-list li { border-radius: 6px; transition: background 0.3s; }
.w2-src-list li.hl { background: var(--brand-tint); }
/* Early access: while the page is locked, only the note is shown */
.w2[data-locked] > :not(.w2-gate) { display: none !important; }
.w2:not([data-locked]) > .w2-gate { display: none; }
.w2-gate { min-height: 50vh; }
.w2-gate-card { max-width: 620px; margin: 32px auto 0; padding: 36px 32px; text-align: center; }
.w2-gate-card p { line-height: 1.55; }
.w2-gate-ico { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }
.w2-gate-ico svg { width: 26px; height: 26px; }
.w2-gate-card .w2-kicker { color: var(--brand); margin: 16px 0 6px; }
.w2-gate-card h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.25; }
.w2-gate-act { display: flex; justify-content: center; margin: 20px 0 12px; }
/* solutions: the return on investing in women */
.w2 .w2-sub-h { margin: 30px 0 12px; font-size: 17px; }
.w2-roi { background: var(--brand-tint); border: 1px solid var(--brand-line); border-radius: 14px; padding: 20px 22px; }
.w2-roi-h { margin: 0 0 14px; font-size: 19px; line-height: 1.3; color: var(--ink); }
.w2-roi-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.w2-roi-c { background: var(--panel); border-radius: 10px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.w2-roi-c .w2-ico { width: 34px; height: 34px; }
.w2-roi-v { white-space: nowrap; font-size: 27px; font-weight: 700; color: var(--brand); line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.w2-roi-l { margin: 0; font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.w2-roi-s { margin: auto 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.w2-roi-n { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
/* what has not worked: latest first, the year large on the left */
.w2-fails { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.w2-more .w2-fails { margin-top: 10px; }
.w2-fail { display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 16px 20px; border-left: 4px solid var(--warn-ink); }
.w2-fail-y { font-size: 28px; font-weight: 700; color: var(--warn-ink); line-height: 1; font-variant-numeric: tabular-nums; padding-top: 2px; }
.w2-fail-b h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.w2-fail-m { margin: 3px 0 6px; font-size: 13px; color: var(--muted); }
.w2-fail-b p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.w2-fail-b p.w2-fail-m { color: var(--muted); font-size: 13px; }
.w2-fail-a { display: inline-block; margin-top: 6px; font-size: 13.5px; font-weight: 500; }
.w2-learn { margin-top: 16px; background: var(--brand-tint); border: 1px solid var(--brand-line); border-radius: 14px; padding: 18px 22px; }
.w2-learn h3 { margin: 0 0 12px; font-size: 17px; }
.w2-learn ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.w2-learn li { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border-radius: 10px; padding: 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.w2-learn li b { color: var(--ink); }
/* projects on the map: cards with a small map of Sudan */
.w2-proj-sum { margin: -4px 0 14px; font-size: 15.5px; color: var(--ink-2); line-height: 1.5; }
.w2-gapnote { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 8px; padding: 7px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13.5px; }
.w2-gapnote svg { width: 18px; height: 18px; flex: none; }
.w2-gapnote a { color: inherit; }
.w2-pcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.w2-pc { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.w2-pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.w2-pc-head { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.w2-pc-org { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.w2-pc-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; background: #fff; }
.w2-pc-org > span[title] { width: 30px; height: 30px; border-radius: 6px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.w2-mini { width: 84px; height: auto; flex: none; }
.w2-mini path { fill: var(--track); stroke: var(--panel); stroke-width: 2.5; stroke-linejoin: round; }
.w2-mini path.on { fill: var(--brand); }
.w2-pc h3 { margin: 2px 0 0; font-size: 15.5px; line-height: 1.35; }
.w2-pc-meta { margin: 0; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.w2-pc-where { margin: 0; font-size: 13px; color: var(--muted); }
.w2-pc-link { margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 500; }
/* contributing agencies */
.w2-agencies .w2-lead { margin-top: -6px; }
.w2-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.w2-logos li { height: 88px; display: flex; align-items: center; justify-content: center; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.w2-logos img { max-width: 100%; max-height: 54px; object-fit: contain; }
.w2-logo-t { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 19px; font-weight: 700; color: #1c2230; line-height: 1.15; }
.w2-logo-t small { margin-top: 4px; font-size: 11.5px; font-weight: 400; color: #646c7a; }
/* stories: photo on the Stories manage page */
.st-row { display: flex; gap: 10px; align-items: center; }
.st-thumb { width: 56px; height: 38px; object-fit: cover; border-radius: 6px; flex: none; }
.st-photo { display: flex; gap: 16px; align-items: flex-start; }
.st-prev { width: 180px; aspect-ratio: 16 / 9; flex: none; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--panel-2); display: grid; place-items: center; overflow: hidden; font-size: 13px; }
.st-prev img { width: 100%; height: 100%; object-fit: cover; }
.st-photo-f { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1; }
.st-photo-f .f { width: 100%; }
@media (max-width: 900px) {
  .w2-big, .w2-msgs { grid-template-columns: 1fr; }
  .w2-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w2-ask { grid-template-columns: 1fr; }
  .w2-ask-h { max-width: none; }
  .w2-ask-btn { justify-self: start; }
  .w2-roi-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w2-learn ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w2-pays-g { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .w2-pcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .w2 { padding: 16px; gap: 30px; }
  .w2-top { padding: 22px 18px; border-radius: 12px; }
  .w2-top h1 { font-size: 25px; }
  .w2-big-v { font-size: 32px; }
  .w2-tiles, .w2-fund-2, .w2-voices, .w2-map, .w2-needs, .w2-pcs, .w2-roi-g { grid-template-columns: 1fr; }
  .w2-roi { padding: 16px; }
  .w2-learn ul { grid-template-columns: 1fr; }
  .w2-pays-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w2-pays-h { flex-direction: column; gap: 4px; }
  .w2-pay { padding: 12px; }
  .w2-pay-v { font-size: 21px; }
  .w2-fail { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .w2-fail-y { font-size: 22px; }
  .st-photo { flex-direction: column; }
  .w2-figs span { width: 22px; height: 30px; }
  .w2-table thead { display: none; }
  .w2-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .w2-table tbody th, .w2-table td { display: block; border: 0; padding: 2px 14px; width: auto; }
}
/* Printing is turned off on every page: a printout or "Save as PDF" shows only this note. */
@media print {
  body > * { display: none !important; }
  body { background: #fff !important; }
  body::before { content: "Printing is not available for this page."; display: block; padding: 40px; font: 16px/1.5 Roboto, Arial, sans-serif; color: #000; }
}

/* Partner chips box: focus ring like the other fields */
.chips-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* Live preview: small map of the chosen states */
.live-map { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 8px; background: var(--panel); }
.live-map svg { width: 100%; height: auto; display: block; }
.live-map .bg { fill: var(--map-water); }
.live-map path { fill: var(--map-none); stroke: var(--map-stroke); stroke-width: 1.5; cursor: pointer; transition: fill 0.25s ease; }
.live-map path:hover { fill: var(--brand-line); }
.live-map path.on, .live-map path.on:hover { fill: var(--brand); }
.live-map-cap { font-size: 13px; color: var(--ink-2); margin-top: 6px; text-align: center; line-height: 1.4; }
.live-map-cap.muted { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .live-map path { transition: none; } }

/* Suggested IASC criteria (keywords from the title and description) */
.crit-suggest { border: 1px dashed var(--brand-line); background: var(--brand-tint-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-weight: 400; }
.crit-suggest .cs-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink); }
.crit-suggest .cs-all { border: 0; background: none; color: var(--brand); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; padding: 2px 0; text-decoration: underline; text-underline-offset: 2px; }
.crit-suggest .cs-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.crit-suggest .cs-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--brand-line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px 12px 4px 4px; font: inherit; font-size: 13.5px; cursor: pointer; }
.crit-suggest .cs-chip:hover { border-color: var(--brand); }
.crit-suggest .cs-chip.is-on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.crit-suggest .cs-chip .ci { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.crit-suggest .cs-chip .ci svg { width: 13px; height: 13px; }
.crit-suggest .cs-note { margin: 9px 0 0; font-size: 12.5px; color: var(--muted); }
.crit-opt.is-suggested:not(:has(input:checked)), .crit-opt2.is-suggested:not(:has(input:checked)) { border-style: dashed; border-color: var(--brand); }

/* People: planned or reached, and boxes for figures that are not available */
.pr-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--brand-tint-2); border: 1px solid var(--brand-line); border-radius: 12px; padding: 9px 12px; font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }
.pr-step { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px 3px 4px; font-weight: 600; font-size: 12.5px; background: var(--track); color: var(--muted); }
.pr-step i { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-style: normal; font-size: 12px; background: var(--faint); }
.pr-step.pl.on { background: var(--pipe-bg); color: var(--pipe-ink); } .pr-step.pl.on i { background: #6250d6; }
.pr-step.re.on { background: #e6f5ee; color: #0f7a4f; } .pr-step.re.on i { background: #1baf7a; }
:root[data-theme="dark"] .pr-step.re.on { background: #16352a; color: #7fd8b0; }
.pr-arrow { color: var(--faint); }
.pr-text { flex: 1 1 260px; }
#people > .fld { display: flex; flex-direction: column; justify-content: flex-end; }
.chk-line { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 400; margin: 12px 0 0; cursor: pointer; width: fit-content; }
.chk-line input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.chk-line.sm { font-size: 13px; margin-top: 6px; }
.unknown-line { margin: 4px 0 14px; }
.unspec-fld { max-width: 260px; margin-top: 10px; }
#people-sec .input:disabled { background: var(--panel-2); border-style: dashed; color: var(--faint); }
#people-sec.is-unknown #people, #people-sec.is-unknown .gender-row { opacity: 0.55; }

/* People: three steps and a live picture (women and girls teal, men and boys indigo, persons with disabilities amber) */
#people-sec, .vz-wrap { --pw: #0e7c72; --pw-t: #e3f3f1; --pw-l: #b9ddd8; --pm: #3f51a8; --pm-t: #e9ecf8; --pm-l: #c8cfee; --pd: #b7791f; --pd-t: #fdf3e1; --pd-l: #f0d9a8; }
:root[data-theme="dark"] #people-sec, :root[data-theme="dark"] .vz-wrap { --pw: #3fbfb2; --pw-t: #15302e; --pw-l: #24534f; --pm: #8b9cf0; --pm-t: #1d2340; --pm-l: #33407a; --pd: #e8b04f; --pd-t: #33280f; --pd-l: #5a4719; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #people-sec, :root:not([data-theme="light"]) .vz-wrap { --pw: #3fbfb2; --pw-t: #15302e; --pw-l: #24534f; --pm: #8b9cf0; --pm-t: #1d2340; --pm-l: #33407a; --pd: #e8b04f; --pd-t: #33280f; --pd-l: #5a4719; } }
.pr-step .ico { width: 18px; height: 18px; display: inline-grid; place-items: center; }
.pr-step .ico svg { width: 16px; height: 16px; }
.pp-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pp-step { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.pp-hd { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-bottom: 12px; flex-wrap: wrap; }
.pp-n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 12.5px; display: grid; place-items: center; flex: none; }
.pp-mode { margin-left: auto; display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.pp-mode button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 3px 12px; border-radius: 999px; cursor: pointer; }
.pp-mode button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.pp-step[data-mode="n"] .in-p, .pp-step[data-mode="p"] .in-n { display: none; }
.pp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-box { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.pp-box label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin: 0; }
.pp-box .ico, #people label .ico { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: none; }
.pp-box .ico svg, #people label .ico svg { width: 17px; height: 17px; }
#people label { display: flex; align-items: center; gap: 5px; }
#people label .ico { color: var(--brand); }
.pp-box.w { background: var(--pw-t); border-color: var(--pw-l); } .pp-box.w label { color: var(--pw); }
.pp-box.m { background: var(--pm-t); border-color: var(--pm-l); } .pp-box.m label { color: var(--pm); }
.pp-box.d { background: var(--pd-t); border-color: var(--pd-l); } .pp-box.d label { color: var(--pd); }
.pp-box .input { background: var(--input-bg); }
.pp-calc { font-size: 17px; font-weight: 600; color: var(--ink-2); padding: 6px 0 2px; }
.pp-sub { font-size: 12.5px; color: var(--muted); min-height: 1em; }
.pp-viz { position: sticky; top: 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.vz-k { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.vz-big { font-size: 30px; font-weight: 700; margin: 2px 0 6px; }
.vz-big.muted { color: var(--muted); font-size: 22px; }
.vz-cap { font-size: 12.5px; color: var(--muted); margin: 12px 0 6px; }
.vz-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.vz-empty { font-size: 13px; color: var(--faint); border: 1px dashed var(--line-2); border-radius: 10px; padding: 7px 10px; }
.vz-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; background: var(--track); }
.vz-bar > div { display: flex; align-items: center; padding: 0 9px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; transition: width 0.3s ease; }
.vz-bar.sm { height: 22px; border-radius: 8px; }
.vz-bar .w { background: var(--pw); } .vz-bar .m { background: var(--pm); } .vz-bar .d { background: var(--pd); }
.vz-bar .rest { flex: 1; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.vz-bar.grp { height: 24px; }
.g0 { background: #2f5d9c; } .g1 { background: #4f7fbf; } .g2 { background: #7aa1d6; } .g3 { background: #a4c0e6; } .g4 { background: #c9daf1; }
.vz-bar.grp .g3, .vz-bar.grp .g4 { color: #1c2230; }
.vz-keys { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.vz-keys span { display: inline-flex; align-items: center; gap: 4px; }
.vz-keys i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.vz-keys svg { width: 14px; height: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .vz-bar > div { transition: none; } }
@media (max-width: 900px) { .pp-wrap { grid-template-columns: 1fr; } .pp-viz { position: static; } }
@media (max-width: 560px) { .pp-pair { grid-template-columns: 1fr; } }

#people-sec #people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-box { min-width: 0; } .pp-box .input { width: 100%; min-width: 0; }
.pp-box label .muted { font-weight: 400; margin-left: 2px; }
.vz-cap .t-w { color: var(--pw); } .vz-cap .t-m { color: var(--pm); } .vz-cap b { font-weight: 600; }
.vz-wrap .vz-cap { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 8px 0 6px; }
.vz-wrap .ico svg { width: 14px; height: 14px; color: var(--muted); }
.vz-wrap .ico { display: inline-grid; place-items: center; }

/* People section as a grid: groups and picture side by side, then women and girls next to persons with disabilities */
.pp-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "groups viz" "sex pwd" "sexbox sexbox"; gap: 12px 14px; align-items: stretch; }
#step-groups { grid-area: groups; } #pp-viz { grid-area: viz; position: static; } #step-sex { grid-area: sex; } #step-pwd { grid-area: pwd; } .pp-sexbox { grid-area: sexbox; }
.pp-wrap .pp-step { margin-bottom: 0; }
.pp-sexbox { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; }
@media (max-width: 900px) { .pp-wrap { grid-template-columns: 1fr; grid-template-areas: "groups" "viz" "sex" "pwd" "sexbox"; } }
#people-sec #people label { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; align-items: flex-end; min-height: 2.4em; }
#people-sec .chk-line { width: auto; align-items: flex-start; line-height: 1.35; }
#people-sec .chk-line input { margin-top: 2px; flex: none; }
.pp-box label { flex-wrap: nowrap; line-height: 1.25; align-items: flex-start; }
.pp-box label .ico { margin-top: 1px; }
.pp-q { flex: 1 1 160px; }

#people-sec .chk-line, #people-sec .pp-box label { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }

.vz-keys i.g0 { background: #2f5d9c; } .vz-keys i.g1 { background: #4f7fbf; } .vz-keys i.g2 { background: #7aa1d6; } .vz-keys i.g3 { background: #a4c0e6; } .vz-keys i.g4 { background: #c9daf1; }
.pp-calc.input { font-size: inherit; font-weight: 400; padding: 9px 12px; color: var(--ink); line-height: normal; min-height: 0; }
.pp-pair .pp-box > label { min-height: 2.5em; }
.pp-calc.input { box-sizing: border-box; height: 41.75px; display: flex; align-items: center; }
.pp-trio { grid-template-columns: 1fr 1fr; }
.pp-trio .pp-wide { grid-column: 1 / -1; }
.pp-trio .pp-wide .input, .pp-trio .pp-wide .affix { max-width: calc(50% - 5px); }
.pp-wrap.sex-open { grid-template-areas: "groups viz" "sex sex" "sexbox sexbox" "pwd pwd"; }
.pp-wrap.sex-open #step-pwd .pp-trio { max-width: 640px; }
@media (max-width: 900px) { .pp-wrap.sex-open { grid-template-areas: "groups" "viz" "sex" "sexbox" "pwd"; } }
.tpl-version { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
