/* AI Safety Field Map — tokens, layout and components. Light and dark; tablet ≤1199 px, phone ≤767 px. */

/* Metric-matched fallbacks so the swap to webfonts does not shift layout.
   ponytail: overrides are approximations from the fonts' published vertical metrics; tune if a shift is measured. */
@font-face { font-family: "Plex Fallback"; src: local("Arial"); size-adjust: 101%; ascent-override: 101.5%; descent-override: 27.2%; line-gap-override: 0%; }
@font-face { font-family: "Serif4 Fallback"; src: local("Georgia"); size-adjust: 95%; ascent-override: 109%; descent-override: 35.3%; line-gap-override: 0%; }

:root {
  --sans: "IBM Plex Sans", "Plex Fallback", system-ui, sans-serif;
  --serif: "Source Serif 4", "Serif4 Fallback", Georgia, serif;

  --paper: #eef2ea; --paper-2: #e4e9df; --paper-3: #d8dfd2;   /* light sage, not white (user, 24 Nov 2026) */
  --fund-1: #2a78d6; --fund-2: #eb6834; --fund-3: #1baf7a; --fund-4: #eda100; --fund-5: #e87ba4; --fund-6: #008300; --fund-7: #6250d6;
  --rule: rgb(27 26 23 / .12);
  --ink: #1b1a17; --ink-2: #4a4740; --ink-3: #6b675d;
  --focus: #2f6fd0; --signal: #9b2f5f; --link: #2c5fae;
  --type-nonprofit: #c8d5bc; --type-forprofit: #e7d4a6; --type-academic: #c3cfe0; --type-government: #dcc9d7; --type-international: #c4dcd6; --type-none: #e2ded3; --type-none-edge: #8a8577;
  --sf-governance-policy: #dcc6a6; --sf-evals-red-teaming: #b7cadb; --sf-strategy-forecasting: #d9c2d4; --sf-field-building: #c6d6b6; --sf-interpretability: #b9d4cd; --sf-alignment-theory: #cbc4e2; --sf-political-action-committees: #e6c0b2; --sf-general-technical: #d6d2b0; --sf-ai-security: #b5c2d8; --sf-ai-control: #ddd09a; --sf-funding-operations-support: #cdb07a; --sf-ai-safety-comms: #d8a7a0; --sf-biosecurity: #e8a9c6; --sf-other: #e6e2d7;
  --seq-0: var(--paper); --seq-1: #c4d8d3; --seq-2: #94b8b1; --seq-3: #5e8f88; --seq-4: #2f5d55;
  --tooltip-bg: #2e2c27; --tooltip-ink: #f2efe6; --tooltip-ink-2: #bdb8ab;
  --flow: rgb(27 26 23 / .18); --flow-weak: rgb(27 26 23 / .08); --flow-hi: rgb(27 26 23 / .40);
  --shadow: 0 8px 24px rgb(0 0 0 / .16), 0 2px 6px rgb(0 0 0 / .10);
  --select: color-mix(in srgb, var(--seq-2) 55%, transparent);

  --container-max: 1440px; --page-margin: clamp(16px, 4vw, 48px); --measure: 680px;
  --bar-h: 56px;

  --dur-fast: 60ms; --dur-snap: 120ms; --dur-base: 200ms; --dur-sheet: 300ms; --dur-slow: 450ms;
  --ease-out: cubic-bezier(.165,.84,.44,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #171613; --paper-2: #1f1e1a; --paper-3: #2a2924; --rule: rgb(242 239 230 / .14);
  --ink: #f2efe6; --ink-2: #c6c2b6; --ink-3: #9b978b; --focus: #6fa0ee; --signal: #e07aa6; --link: #8fb4ee;
  --type-nonprofit: #3e4a36; --type-forprofit: #55482a; --type-academic: #36435a; --type-government: #4d3a49; --type-international: #2f4a45; --type-none: #3a3832; --type-none-edge: #6f6b61;
  --sf-governance-policy: #6a5331; --sf-evals-red-teaming: #3c556b; --sf-strategy-forecasting: #684560; --sf-field-building: #51653e; --sf-interpretability: #41625a; --sf-alignment-theory: #4c4074; --sf-political-action-committees: #794532; --sf-general-technical: #64603a; --sf-ai-security: #3c4c67; --sf-ai-control: #695d2b; --sf-funding-operations-support: #4f4023; --sf-ai-safety-comms: #653630; --sf-biosecurity: #7a2f55; --sf-other: #383631;
  --seq-1: #2b403c; --seq-2: #3f625c; --seq-3: #6a9a93; --seq-4: #a9cbc4;
  --flow: rgb(242 239 230 / .20); --flow-weak: rgb(242 239 230 / .09); --flow-hi: rgb(242 239 230 / .45);
  --fund-1: #3987e5; --fund-2: #d95926; --fund-3: #199e70; --fund-4: #c98500; --fund-5: #d55181; --fund-6: #0ca30c; --fund-7: #9085e9;
  --shadow: 0 8px 24px rgb(0 0 0 / .32), 0 2px 6px rgb(0 0 0 / .20);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --paper: #171613; --paper-2: #1f1e1a; --paper-3: #2a2924; --rule: rgb(242 239 230 / .14);
  --ink: #f2efe6; --ink-2: #c6c2b6; --ink-3: #9b978b; --focus: #6fa0ee; --signal: #e07aa6; --link: #8fb4ee;
  --type-nonprofit: #3e4a36; --type-forprofit: #55482a; --type-academic: #36435a; --type-government: #4d3a49; --type-international: #2f4a45; --type-none: #3a3832; --type-none-edge: #6f6b61;
  --sf-governance-policy: #6a5331; --sf-evals-red-teaming: #3c556b; --sf-strategy-forecasting: #684560; --sf-field-building: #51653e; --sf-interpretability: #41625a; --sf-alignment-theory: #4c4074; --sf-political-action-committees: #794532; --sf-general-technical: #64603a; --sf-ai-security: #3c4c67; --sf-ai-control: #695d2b; --sf-funding-operations-support: #4f4023; --sf-ai-safety-comms: #653630; --sf-biosecurity: #7a2f55; --sf-other: #383631;
  --seq-1: #2b403c; --seq-2: #3f625c; --seq-3: #6a9a93; --seq-4: #a9cbc4;
  --flow: rgb(242 239 230 / .20); --flow-weak: rgb(242 239 230 / .09); --flow-hi: rgb(242 239 230 / .45);
  --fund-1: #3987e5; --fund-2: #d95926; --fund-3: #199e70; --fund-4: #c98500; --fund-5: #d55181; --fund-6: #0ca30c; --fund-7: #9085e9;
  --shadow: 0 8px 24px rgb(0 0 0 / .32), 0 2px 6px rgb(0 0 0 / .20);
  color-scheme: dark;
}
@media (prefers-contrast: more) { :root { --ink-3: var(--ink-2); } }
@media (prefers-reduced-motion: reduce) { :root { --dur-fast: 0ms; --dur-snap: 0ms; --dur-base: 0ms; --dur-sheet: 0ms; --dur-slow: 0ms; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--paper-3) transparent; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 14px/20px var(--sans); font-variant-numeric: tabular-nums; overflow-x: hidden; }
main { flex: 1; }
::selection { background: var(--select); color: var(--ink); }
h1, h2, h3, p, dl, dd, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: 400 16px/20px var(--sans); color: var(--ink); caret-color: var(--signal); }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--focus); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
table.sr-only { display: block; } /* a table ignores width/height; as a block it stays 1 px */
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 4px; text-decoration: none; }
.skip:focus { top: 8px; }
.wrap { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--page-margin); }

/* ---------- site header and nav ---------- */
.site { border-bottom: 1px solid var(--rule); }
.site-inner { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 8px 32px; flex-wrap: wrap; }
.brand { font: 600 19px/24px var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.005em; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-right: -11px; } /* last link's padding hangs outside, so its text meets the content edge */
.nav a { position: relative; display: inline-flex; align-items: center; height: 60px; padding: 0 11px; font: 500 14px/20px var(--sans); color: var(--ink-2); text-decoration: none; transition: color var(--dur-snap) var(--ease-out); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 2px; background: var(--signal); border-radius: 2px 2px 0 0; }

/* ---------- pages ---------- */
.page { padding-top: 32px; padding-bottom: 72px; }
.page h1 { font: 500 clamp(28px, 2.6vw, 38px)/1.15 var(--serif); letter-spacing: -.01em; text-wrap: balance; max-width: 24em; outline: none; }
.lede { font: 400 18px/27px var(--serif); color: var(--ink-2); max-width: var(--measure); margin: 10px 0 24px; }
.caption { font: 400 13px/20px var(--sans); color: var(--ink-3); max-width: var(--measure); margin-top: 14px; }
.h2 { font: 600 20px/26px var(--sans); margin: 40px 0 12px; }
.h3 { font: 600 15px/20px var(--sans); margin-bottom: 10px; }
.page h1 .hn { font-weight: 400; color: var(--ink-3); }
/* Map hero: "AI safety" branches to three facts (lines drawn by drawBranches in app.js). */
.hero { position: relative; padding: 4px 0 28px; }
.hero h1 { font-size: clamp(22px, 2vw, 28px); color: var(--ink-2); }
.hero .hub { color: var(--ink); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--signal) 45%, transparent); }
.branches { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.branches .s0 { stop-color: var(--signal); }
.branches .s1 { stop-color: var(--ink-3); }
.branches .trunk { fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s ease-in; }
.branches .br { fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .65s cubic-bezier(.25,.7,.2,1) .15s, opacity .2s, stroke-width .2s; }
.branches .br.b1 { transition-delay: .22s, 0s, 0s; }
.branches .br.b2 { transition-delay: .29s, 0s, 0s; }
.branches .sp { fill: none; stroke: var(--signal); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: .07 1.2; stroke-dashoffset: .07; opacity: 0; }
.branches .bd { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.75; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); transition: opacity .2s, transform .45s cubic-bezier(.3,1.6,.5,1), stroke .2s, fill .2s; }
.branches .bd.b0 { transition-delay: .6s; } .branches .bd.b1 { transition-delay: .68s; } .branches .bd.b2 { transition-delay: .76s; }
.branches .bh { fill: var(--signal); }
.branches .bhalo { fill: none; stroke: var(--signal); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.hero.drawn .trunk, .hero.drawn .br { stroke-dashoffset: 0; }
.hero.drawn .bd { opacity: 1; transform: none; }
.hero.drawn .bhalo { animation: halo 1.4s ease-out .1s 1; }
@keyframes halo { from { opacity: .7; transform: scale(.5); } to { opacity: 0; transform: scale(2.2); } }
@keyframes spark { from { stroke-dashoffset: .07; opacity: 1; } 90% { opacity: 1; } to { stroke-dashoffset: -1.05; opacity: 0; } }
/* Each fact appears as its branch reaches it (first load only; "grown" is never removed). */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .hero:not(.grown) .total .node { opacity: 0; transform: translateY(8px); }
  .hero.grown .total .node { transition: opacity .5s, transform .5s cubic-bezier(.2,.8,.2,1); }
  .hero.grown:not(.settled) .total .n-num { transition-delay: .3s; } .hero.grown:not(.settled) .total .n-orgs { transition-delay: .42s; } .hero.grown:not(.settled) .total .n-fte { transition-delay: .54s; }
}
.total { display: grid; grid-template-columns: auto minmax(160px, 220px) minmax(220px, 300px); justify-content: start; align-items: start; column-gap: clamp(32px, 4vw, 72px); margin-top: 92px; }
.total .node { display: grid; gap: 6px; align-content: start; transition: opacity .2s; }
.total .tn { white-space: nowrap; font: 600 clamp(48px, 6.6vw, 112px)/.9 var(--sans); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.total .td { font-weight: 300; color: var(--ink-3); margin: 0 .04em; }
.total .tl { font: 400 clamp(20px, 1.7vw, 24px)/1.25 var(--serif); color: var(--ink); }
.total .tl b { font-weight: 600; }
.total .tm { font: 400 13px/19px var(--sans); color: var(--ink-3); }
.total .tm a { color: var(--ink-2); }
/* Point at one fact: its branch lights up, a spark runs down it, the others step back. */
.hero:has(.node:hover) .node:not(:hover) { opacity: .45; }
.hero:has(.n-num:hover) .br:not(.b0), .hero:has(.n-orgs:hover) .br:not(.b1), .hero:has(.n-fte:hover) .br:not(.b2) { opacity: .2; }
.hero:has(.n-num:hover) .br.b0, .hero:has(.n-orgs:hover) .br.b1, .hero:has(.n-fte:hover) .br.b2 { stroke-width: 2.25; }
.hero:has(.n-num:hover) .bd.b0, .hero:has(.n-orgs:hover) .bd.b1, .hero:has(.n-fte:hover) .bd.b2 { stroke: var(--signal); fill: var(--signal); }
.hero:has(.n-num:hover) .sp.b0, .hero:has(.n-orgs:hover) .sp.b1, .hero:has(.n-fte:hover) .sp.b2 { animation: spark 1.1s cubic-bezier(.5,0,.3,1) infinite; }
/* Range bar: solid = counted, pink = up to. */
.rbar { margin: 10px 0 2px; max-width: 100%; }
.rtrack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--signal) 34%, transparent); }
.rtrack .rlo { background: var(--ink); border-radius: 4px 0 0 4px; box-shadow: 2px 0 0 var(--paper); }
.rlab { display: flex; justify-content: space-between; font: 400 12px/18px var(--sans); color: var(--ink-3); margin-top: 4px; }
/* Organisations by research area: one segment per area, map colours, 2px paper gap; click zooms the map. */
.sfbar { display: flex; gap: 2px; height: 14px; max-width: 240px; margin: 8px 0 2px; }
.sfseg { min-width: 4px; padding: 0; border: 0; border-radius: 2px; cursor: pointer; transition: transform .15s, filter .15s; }
.sfseg:first-child { border-radius: 4px 2px 2px 4px; } .sfseg:last-child { border-radius: 2px 4px 4px 2px; }
.sfseg:hover, .sfseg:focus-visible { transform: scaleY(1.45); filter: saturate(1.4) brightness(.92); }
.sfseg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sfcap { min-height: 19px; }
/* "Full-time staff": a disclosure; the definition shows when opened. */
.total details.fte > .tm { display: block; margin-top: 6px; }
.total details.fte > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; width: max-content; }
.total details.fte > summary::-webkit-details-marker { display: none; }
.total details.fte > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.total details.fte[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.total details.fte > summary:hover { color: var(--ink-2); }
.total details.fte > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.total details.fte[open] > .tm { animation: fteIn .25s ease-out; }
@keyframes fteIn { from { opacity: 0; transform: translateY(-4px); } }
/* First load (user, 30 Nov): a soft placeholder while the counts load, then the bar fills left to right in step with the number rolling up. */
.total:empty::before { content: ""; display: block; width: min(440px, 70%); height: clamp(48px, 6.6vw, 112px); border-radius: 8px; background: var(--paper-3); }
@media (prefers-reduced-motion: no-preference) {
  .total:empty::before { animation: wait 1.1s ease-in-out infinite alternate; }
  .hero:not(.grown) .rtrack { clip-path: inset(0 100% 0 0); }
  .hero:not(.grown) :is(.rlab, .sfbar, .sfcap) { opacity: 0; }
  .hero.grown:not(.settled) .rtrack { animation: reveal 1.2s cubic-bezier(.3,.7,.2,1) .3s both; }
  .hero.grown:not(.settled) :is(.rlab, .sfbar, .sfcap) { animation: fadeUp .4s ease-out 1.1s both; }
}
@keyframes wait { from { opacity: .35; } to { opacity: .8; } }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .total details.fte[open] > .tm { animation: none; } }
@media (forced-colors: active) { .rtrack .rlo { background: CanvasText; } .rtrack { background: GrayText; } .sfseg { border: 1px solid CanvasText; } }
@media (prefers-reduced-motion: reduce) { .branches .br, .branches .bd, .branches .trunk { transition: none; } .branches .sp, .branches .bhalo { animation: none !important; } }
@media (max-width: 1023px) {
  .branches { display: none; }
  .total { grid-template-columns: 1fr; row-gap: 18px; margin: 14px 0 0 6px; padding-left: 18px; border-left: 1.5px solid var(--rule); }
  .total .node { position: relative; }
  .total .node::before { content: ""; position: absolute; left: -19px; top: .7em; width: 12px; border-top: 1.5px solid var(--rule); }
  .total .n-num::before { top: .45em; }
}
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* ---------- filter bar ---------- */
.filterbar { position: sticky; top: 0; z-index: 20; margin: 24px 0 14px; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transition: border-color var(--dur-base) var(--ease-out); }
.filterbar.stuck { box-shadow: 0 6px 12px -10px color-mix(in srgb, var(--ink) 40%, transparent); }
.filterbar-inner { min-height: 52px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 0; }
.count { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font: 500 13px/18px var(--sans); color: var(--ink-2); white-space: nowrap; }
.group { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.group + .group { border-left: 1px solid var(--rule); padding-left: 14px; }
.fb-line { display: contents; }
.chip { height: 32px; border-radius: 6px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--ink-2); box-shadow: none; font: 500 13px/18px var(--sans); white-space: nowrap; transition: background var(--dur-snap) var(--ease-out), color var(--dur-snap) var(--ease-out); }
.chip:hover { background: var(--paper-2); color: var(--ink); }
.chip[aria-pressed="true"], .chip.on { background: var(--paper-3); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); }
/* once one option in a group is picked, the rest step back */
.group:has(.chip[aria-pressed="true"]) .chip[aria-pressed="false"] { opacity: .5; }
.group:has(.chip[aria-pressed="true"]) .chip[aria-pressed="false"]:hover { opacity: 1; }
.chip[aria-pressed="true"]::after, .chip.on::after { content: "×"; margin-left: -1px; font-size: 15px; line-height: 1; color: var(--ink-3); }
.chip.radio[aria-pressed="true"]::after { content: none; }
.chip[aria-disabled="true"] { opacity: .4; cursor: default; }
.chip.sub { height: 26px; font-size: 12px; padding: 0 8px; margin-left: -2px; }
.chip.sub::before { content: "↳"; color: var(--ink-3); margin-right: -2px; }
.group:has(.chip[aria-pressed="true"]) .chip.sub[aria-pressed="false"] { opacity: 1; }
.chip .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.chip .cn { color: var(--ink-3); font: 400 11.5px/1 var(--sans); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .cn { color: var(--ink-2); }
.chip.menu::after { content: ""; width: 7px; height: 7px; margin: -3px 1px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.chip.menu[aria-expanded="true"] { background: var(--paper-2); color: var(--ink); }
.chip.menu .mt { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.chip.menu.has, .chip.menu.has[aria-expanded="true"] { background: var(--paper-3); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 6px 0 0 6px; padding-right: 8px; }
.chip.rm { background: var(--paper-3); color: var(--ink-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 0 6px 6px 0; padding: 0 9px 0 7px; margin-left: -1px; font-size: 15px; }
.chip.menu.has:hover, .chip.rm:hover { background: color-mix(in srgb, var(--ink) 12%, var(--paper)); color: var(--ink); }
.menuwrap { position: relative; display: inline-flex; }
.menuwrap + .menuwrap { margin-left: 4px; }
.searchwrap { position: relative; flex: 0 1 220px; min-width: 140px; display: flex; color: var(--ink-3); }
.search { flex: 1 1 auto; width: 100%; min-width: 0; height: 32px; border-radius: 6px; border: 1px solid transparent; font: 400 13px/18px var(--sans); background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238a8378' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.8'/%3E%3Cpath d='M10.6 10.6 14 14'/%3E%3C/svg%3E") no-repeat 11px 50% / 15px 15px; padding: 0 12px 0 34px; color: var(--ink); transition: border-color var(--dur-snap) var(--ease-out); }
.search:hover { border-color: var(--rule); }
.search:focus { background-color: var(--paper); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.search::placeholder { color: var(--ink-3); }
.textbtn { font: 500 14px/20px var(--sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; padding: 6px 2px; }
.textbtn:hover { text-decoration-color: currentColor; }
a.textbtn { display: inline-block; }
.popover.right { left: auto; right: 0; }
.popover { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: max-content; min-width: 220px; max-width: 320px; max-height: 420px; overflow: auto; background: var(--paper); border-radius: 8px; box-shadow: var(--shadow), inset 0 0 0 1px var(--rule); padding: 8px; }
.popover input { width: 100%; height: 36px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper-2); padding: 0 10px; margin-bottom: 6px; }
.opt { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font: 400 14px/20px var(--sans); }
.opt:hover { background: var(--paper-2); }
.opt .box { width: 16px; height: 16px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--ink-2); flex: none; position: relative; }
.opt[aria-selected="true"] .box { background: var(--ink); box-shadow: none; }
.opt[aria-selected="true"] .box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border-right: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: rotate(45deg); }
.opt .n { margin-left: auto; color: var(--ink-3); }
.opt[aria-disabled="true"] { opacity: .4; cursor: default; }
.mobile-only { display: none !important; }

/* ---------- map (home) ---------- */
.key { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 20px; font: 400 12.5px/18px var(--sans); color: var(--ink-2); }
.types-key { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.types-key li { display: inline-flex; align-items: center; gap: 6px; }
.types-key li span { color: var(--ink-3); }
.types-key i { width: 10px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule); }
.key p { color: var(--ink-3); }
.crumb { font: 400 13px/18px var(--sans); margin-bottom: 8px; color: var(--ink-3); }
.crumb b { color: var(--ink); font-weight: 600; }
.crumb .textbtn { font-size: 13px; }

/* ---------- treemap ---------- */
.treemap { position: relative; height: 760px; outline: none; overflow: hidden; }
.treemap[data-empty] { height: auto; aspect-ratio: auto; }
.treemap[data-few] { height: 440px; aspect-ratio: auto; }
.frame { position: absolute; border-radius: 4px; transition: left var(--dur-slow) var(--ease-out), top var(--dur-slow) var(--ease-out), width var(--dur-slow) var(--ease-out), height var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease-out); }
.frame-head { position: absolute; left: 0; right: 0; top: 0; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 1px; font: 600 14px/18px var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; border-radius: 4px; }
.frame-head .t { overflow: hidden; text-overflow: ellipsis; }
.frame-head .n { font: 400 12.5px/18px var(--sans); color: var(--ink-3); }
.frame-head .chev { margin-left: auto; color: var(--ink-3); font-size: 15px; padding-right: 2px; }
.frame-head:hover { background: var(--paper-2); }
.frame-head:hover .chev { color: var(--ink); }
.tile { position: absolute; border-radius: 4px; overflow: hidden; padding: 5px 7px; cursor: pointer; color: var(--ink); transition: left var(--dur-slow) var(--ease-out), top var(--dur-slow) var(--ease-out), width var(--dur-slow) var(--ease-out), height var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease-out); }
.tile .nm { font: 600 12.5px/15px var(--sans); display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; hyphens: manual; }
.tile .nm.one { display: block; white-space: nowrap; text-overflow: ellipsis; }
.tile .val { font: 500 12px/15px var(--sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .val span { font-weight: 400; color: var(--ink-3); }
.tile.hover, .tile:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.tile:focus-visible, .frame-head:focus-visible { box-shadow: inset 0 0 0 2px var(--focus), inset 0 0 0 4px var(--paper); border-radius: 2px; }
.s-governance-policy { background: var(--sf-governance-policy); }
.s-evals-red-teaming { background: var(--sf-evals-red-teaming); }
.s-strategy-forecasting { background: var(--sf-strategy-forecasting); }
.s-field-building { background: var(--sf-field-building); }
.s-interpretability { background: var(--sf-interpretability); }
.s-alignment-theory { background: var(--sf-alignment-theory); }
.s-political-action-committees { background: var(--sf-political-action-committees); }
.s-general-technical { background: var(--sf-general-technical); }
.s-ai-security { background: var(--sf-ai-security); }
.s-ai-control { background: var(--sf-ai-control); }
.s-funding-operations-support { background: var(--sf-funding-operations-support); }
.s-ai-safety-comms { background: var(--sf-ai-safety-comms); }
.s-biosecurity { background: var(--sf-biosecurity); }
.s-other { background: var(--sf-other); }
.t-nonprofit { background: var(--type-nonprofit); }
.t-forprofit { background: var(--type-forprofit); }
.t-academic { background: var(--type-academic); }
.t-government { background: var(--type-government); }
.t-international { background: var(--type-international); }
.t-none { background: var(--type-none); box-shadow: inset 0 0 0 1px var(--type-none-edge); }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 200px; padding: 24px; background: var(--paper-2); border-radius: 6px; }
.empty p { font: 400 18px/27px var(--serif); }
.empty .caption { font: 400 13px/20px var(--sans); margin: 0; }

/* hover card */
.tip { position: fixed; z-index: 60; width: 270px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; pointer-events: none; box-shadow: var(--shadow); font: 400 13px/19px var(--sans); opacity: 0; transform: translateY(4px); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.tip.show { opacity: 1; transform: none; transition-duration: var(--dur-snap); }
.tip .tn { font: 600 15px/1.3 var(--sans); }
.tip .tv { margin-top: 6px; color: var(--ink-3); }
.tip .tv b { font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.tip .tr { color: var(--ink-2); margin-top: 2px; }
.tip .tm { color: var(--ink-3); }
.tip .th { color: var(--ink-3); font-size: 12px; margin-top: 8px; }

/* ---------- tables (organisations, programmes) ---------- */
.ptable { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--sans); }
.ptable th { text-align: left; font: 500 13px/18px var(--sans); color: var(--ink-3); padding: 0 16px 10px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ptable th button { font: inherit; color: inherit; }
.ptable th button:hover { color: var(--ink); }
.ptable th[aria-sort] button { color: var(--ink); }
.ptable th button[data-dir]::after { content: attr(data-dir); margin-left: 4px; }
.ptable td { height: 44px; padding: 6px 16px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.ptable tbody tr { transition: background var(--dur-snap) var(--ease-out); }
.ptable tbody tr:hover { background: var(--paper-2); }
.ptable .r { text-align: right; }
.ptable td a { color: var(--ink); text-decoration: none; font-weight: 500; }
.ptable td a:hover { text-decoration: underline; text-decoration-color: var(--ink-3); }
.ptable .by { display: block; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.ptable .by a { color: var(--ink-3); font-weight: 400; }
.tdot { display: inline-flex; align-items: center; gap: 7px; }
.tdot i { width: 9px; height: 9px; border-radius: 2px; flex: none; box-shadow: inset 0 0 0 1px var(--rule); }
.otable td { color: var(--ink-2); }
.otable td.oname { color: var(--ink); }
.otable td.ppl { width: 240px; padding-right: 0; }
.ppl { white-space: nowrap; }
.pbar { display: inline-flex; width: 120px; height: 8px; margin-right: 12px; vertical-align: middle; border-radius: 2px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--seq-3); }
.pbar i.up { background: color-mix(in srgb, var(--seq-3) 30%, transparent); }
.pv { display: inline-block; min-width: 52px; text-align: right; font-weight: 600; color: var(--ink); }
.pv small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.ptable th.k-cohort { min-width: 230px; }
.ptable .cv { display: flex; align-items: center; gap: 10px; }
.ptable .cbar { width: 140px; height: 8px; flex: none; border-radius: 2px; overflow: hidden; background: var(--paper-2); }
.ptable .cbar i { display: block; height: 100%; background: var(--seq-3); }
.ptable .ct { white-space: nowrap; }
.ptable .ct b { font-weight: 600; color: var(--ink); }
.pempty { padding: 24px; background: var(--paper-2); border-radius: 8px; }
.pempty p { font: 400 18px/27px var(--serif); margin-bottom: 8px; }
.more { margin-top: 12px; }
.pfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 20px 0 20px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pfilters .search { width: 240px; flex: none; }
.pfilters .group + .group { border-left: 1px solid var(--rule); padding-left: 14px; }
.btn { white-space: nowrap; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 500 14px/20px var(--sans); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: opacity var(--dur-snap) var(--ease-out); }
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }
.btn.ghost:hover { background: var(--paper-2); opacity: 1; }

/* ---------- countries ---------- */
[data-route="countries"] .filterbar { margin-bottom: 24px; }
.geo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 40px; align-items: start; }
.geo-map { position: relative; }
.geo-map svg { width: 100%; height: auto; display: block; }
.geo-map path.c { stroke: var(--rule); stroke-width: .6; cursor: default; }
.geo-map path.c.has { cursor: pointer; }
.geo-map path.c.has:hover { stroke: var(--ink); stroke-width: 1.2; }
.geo-map path.c.on { stroke: var(--ink); stroke-width: 1.5; }
.geo-map path.halo { fill: none; stroke: var(--paper); stroke-width: 5; pointer-events: none; }
.geo-map path.act { fill: none; stroke: var(--ink); stroke-width: 2; pointer-events: none; }
.geo-map path.sel { fill: none; stroke: var(--signal); stroke-width: 2; pointer-events: none; }
.s0 { fill: var(--paper); } .s1 { fill: var(--seq-1); } .s2 { fill: var(--seq-2); } .s3 { fill: var(--seq-3); } .s4 { fill: var(--seq-4); }
.maplegend { position: absolute; left: 8px; bottom: 8px; background: color-mix(in srgb, var(--paper) 88%, transparent); border-radius: 6px; padding: 8px 10px; font: 400 12px/18px var(--sans); color: var(--ink-2); }
.maplegend .h { font-weight: 600; color: var(--ink); }
.maplegend li { display: flex; align-items: center; gap: 8px; }
.maplegend i { width: 14px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule); }
.crow { width: 100%; height: 32px; display: grid; grid-template-columns: 22px minmax(0, 1fr) 60px 28px; align-items: center; gap: 10px; border-bottom: 1px solid var(--rule); font: 400 14px/20px var(--sans); padding: 0 4px; position: relative; transition: background var(--dur-snap) var(--ease-out); }
.crow:hover { background: var(--paper-2); }
.crow .i { color: var(--ink-3); font-size: 12px; text-align: right; }
.crow .bar { height: 6px; background: var(--seq-3); border-radius: 1px; }
.crow .v { text-align: right; }
.crow[aria-pressed="true"] { font-weight: 600; background: var(--paper-2); }
.olist { columns: 2; column-gap: 40px; max-width: 1000px; }
.olist li { break-inside: avoid; display: grid; grid-template-columns: minmax(0, 1fr) auto 56px; gap: 12px; align-items: center; min-height: 36px; border-bottom: 1px solid var(--rule); }
.olist a { color: var(--ink); font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olist a:hover { text-decoration: underline; }
.olist .tdot { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.olist .v { text-align: right; font-weight: 600; }

/* ---------- profile (org, programme) ---------- */
.profile { padding-top: 24px; }
.phead { display: flex; align-items: center; gap: 14px; font: 400 13px/18px var(--sans); color: var(--ink-3); }
.phead .back { font-size: 13px; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.phead .back:hover { color: var(--ink); text-decoration: underline; }
.profile .pname { font: 500 clamp(32px, 3.4vw, 46px)/1.1 var(--serif); letter-spacing: -.015em; margin: 12px 0 28px; max-width: 20em; }
.pcols { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(260px, 340px); gap: 32px 72px; align-items: start; }
.pside { position: sticky; top: 24px; display: grid; gap: 28px; }
.pmain > .pblock:first-child { margin-top: 0; }
.pblock { margin-top: 40px; }
.pblock h2 { font: 600 15px/20px var(--sans); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.pside .pblock { margin-top: 0; }
.kv { display: grid; grid-template-columns: 112px minmax(0, 1fr); font: 400 14px/20px var(--sans); }
.kv dt, .kv dd { padding: 8px 0; border-top: 1px solid var(--rule); }
.kv dt { color: var(--ink-3); }
.kv dd a { overflow-wrap: anywhere; }
.big { font: 600 52px/56px var(--sans); letter-spacing: -.02em; }
.big span { font: 400 16px/20px var(--sans); letter-spacing: 0; color: var(--ink-2); margin-left: 8px; }
.ticks { margin: 14px 0 4px; display: block; max-width: 420px; }
.ticks line { stroke: var(--ink-3); stroke-width: 2; }
.ticks line.me { stroke: var(--signal); stroke-width: 3; }
.ticks .base { stroke: var(--rule); stroke-width: 1; }
.tickcap { font: 400 12px/18px var(--sans); color: var(--ink-3); }
.runin { font: 400 16px/25px var(--serif); margin-top: 18px; }
.runin p + p { margin-top: 8px; }
.runin b { font: 600 14px/25px var(--sans); }
.runin q { quotes: "\201C" "\201D"; }
.prose { font: 400 17px/27px var(--serif); }
.src { font: 400 13px/18px var(--sans); color: var(--ink-3); margin-top: 8px; }
.src a { color: var(--ink-3); }
.dispute { margin-top: 16px; }
.dispute a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border: 1px solid var(--ink-3); border-radius: 999px; text-decoration: none; }
.dispute a:hover { border-color: var(--ink); background: var(--paper-2); }
blockquote.theirs { border-left: 2px solid var(--ink); padding-left: 16px; font: 400 17px/27px var(--serif); }
.people { columns: 2; column-gap: 16px; font: 400 14px/28px var(--sans); }
.people li { break-inside: avoid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist li a { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.plist li:first-child a { border-top: 0; padding-top: 0; }
.plist .pn { font-weight: 500; }
.plist li a:hover .pn { text-decoration: underline; }
.plist .pm { color: var(--ink-3); font-size: 13px; }

/* funding flow */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) auto 132px; column-gap: 8px; font: 400 13px/16px var(--sans); position: relative; margin-top: 4px; }
.flow .fh { grid-column: 3; text-align: right; font: 600 13px/18px var(--sans); padding-bottom: 6px; }
.flow .fn, .flow .fa { height: 28px; display: flex; align-items: center; min-width: 0; }
.flow .fn { overflow: hidden; }
.flow .fn > * { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow .fn .lnk { color: var(--link); text-decoration: underline; }
.flow .fa { justify-content: flex-end; color: var(--ink); }
.flow .fn small { display: block; color: var(--ink-3); font-size: 11px; line-height: 13px; }
.flow .fn.two { flex-direction: column; align-items: flex-start; justify-content: center; }
.flow svg { grid-column: 3; overflow: visible; }
.flow .rib { fill: var(--c, var(--flow)); fill-opacity: .72; transition: fill-opacity var(--dur-snap) var(--ease-out); }
.flow .rib.weak { fill-opacity: .28; stroke: var(--c, var(--ink-2)); stroke-width: 1; stroke-dasharray: 3 2; }
.flow .rib.hi { fill-opacity: 1; }
.flow .fn .sw { flex: none; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.flow .fn > .ctag { flex: none; margin-left: 6px; padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; font-size: 11px; line-height: 16px; color: var(--ink-2); overflow: visible; }
.flow .orgbar { fill: var(--ink); }
.flow .others { grid-column: 1 / 3; text-align: left; height: 28px; color: var(--link); text-decoration: underline; font-size: 13px; }
.years { margin-top: 18px; display: block; overflow: visible; }
.years rect { fill-opacity: .85; }
.years rect.hi { fill-opacity: 1; }
.years text { fill: var(--ink-2); font: 400 12px var(--sans); }
.years text.y { fill: var(--ink-3); }
.years.dense text { font-size: 10.5px; letter-spacing: -.02em; }
.cohorts { display: block; margin-top: 6px; overflow: visible; }
.cohorts rect { fill: var(--seq-2); }
.cohorts text { fill: var(--ink-2); font: 400 12px var(--sans); }
.cohorts text.y { fill: var(--ink-3); }
.cohort-src { font: 400 13px/19px var(--sans); color: var(--ink-2); margin-top: 8px; }
.cohort-src li { padding: 4px 0; border-top: 1px solid var(--rule); }

/* ---------- groups and researchers ---------- */
.note-src { font: 400 14px/21px var(--sans); color: var(--ink-3); max-width: var(--measure); margin: -8px 0 16px; }
.rsec { margin-top: 32px; }
.rsec + .rsec { margin-top: 56px; }
.rsec > h2 { font: 600 22px/28px var(--sans); padding-top: 20px; border-top: 1px solid var(--rule); margin-bottom: 4px; outline: none; }
.gcols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.gcountries { position: sticky; top: 16px; }
.gcountries .crow { grid-template-columns: minmax(0, 1fr) 90px 28px; }
.glist > ul > li + li { border-top: 1px solid var(--rule); }
.gitem { padding: 16px 0; }
.gitem:first-child { padding-top: 0; }
.gh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gh h3 { font: 500 19px/25px var(--serif); }
.gh h3 a { color: var(--ink); text-decoration-color: var(--rule); }
.gh h3 a:hover { text-decoration-color: currentColor; }
.badge { flex: none; font: 500 12px/18px var(--sans); padding: 1px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); white-space: nowrap; }
.badge.s-active { background: var(--seq-1); color: var(--ink); box-shadow: none; }
.gm { font: 400 13px/18px var(--sans); color: var(--ink-3); margin-top: 2px; }
.gd { font: 400 15px/23px var(--serif); margin-top: 6px; max-width: var(--measure); }
.gnums { margin-top: 8px; font: 400 14px/21px var(--sans); color: var(--ink-2); }
.gnums b { color: var(--ink); font-weight: 600; }
.gp { font: 400 13px/19px var(--sans); color: var(--ink-3); margin-top: 6px; }
.labgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px 40px; margin-top: 16px; }
.lab-block h3 { font: 500 18px/24px var(--serif); margin-bottom: 6px; }
.lab-block h3 .lnk { color: var(--ink); text-decoration-color: var(--ink-3); }
.lab-block h3 .n { font: 400 13px var(--sans); color: var(--ink-3); }
.rpeople li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--rule); font: 400 14px/20px var(--sans); }
.rpeople .role { color: var(--ink-3); text-align: right; }
.rlist { max-width: 880px; }
.rlist > li + li { border-top: 1px solid var(--rule); }
.ritem { padding: 14px 0; }
.ritem h3 { font: 600 15px/20px var(--sans); }
.purpose { font: 400 15px/22px var(--serif); margin-top: 4px; max-width: var(--measure); }
.purpose.sm { font-size: 14px; }
.gl { font: 400 13px/19px var(--sans); color: var(--ink-2); margin-top: 4px; }
.flag { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--ink-3); padding: 0 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--rule); }
.ritem .others { margin: 6px 0 0 14px; padding-left: 12px; border-left: 1px solid var(--rule); }
.ritem .others li + li { margin-top: 8px; }
.pager { display: flex; align-items: center; gap: 14px; margin-top: 20px; font: 400 14px/20px var(--sans); color: var(--ink-2); flex-wrap: wrap; }

/* ---------- about ---------- */
.about .lede { margin-bottom: 40px; }
.acols { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(240px, 320px); gap: 40px 96px; align-items: start; }
.asec + .asec { margin-top: 40px; }
.asec h2 { font: 600 18px/24px var(--sans); margin-bottom: 10px; }
.asec p { font: 400 17px/27px var(--serif); }
.aside .asec p, .aside .alist li { font: 400 14px/21px var(--sans); color: var(--ink-2); }
.aside .btn { margin-top: 14px; }
.adl { display: grid; grid-template-columns: 112px minmax(0, 1fr); margin-top: 18px; font: 400 15px/23px var(--serif); }
.adl dt { font: 600 13px/23px var(--sans); color: var(--ink-2); padding: 10px 0; border-top: 1px solid var(--rule); }
.adl dd { padding: 10px 0; border-top: 1px solid var(--rule); }
.alist li { font: 400 17px/27px var(--serif); padding-left: 16px; position: relative; }
.alist li + li { margin-top: 6px; }
.alist li::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 1px; background: var(--ink-3); }
.aside .alist li::before { top: 10px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); }
.foot-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; font: 400 13px/18px var(--sans); color: var(--ink-3); }
.seg { display: inline-flex; gap: 4px; }
.seg .chip { height: 28px; font-size: 13px; }

/* ---------- phone peek bar, filter sheet ---------- */
.peek { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; background: var(--tooltip-bg); color: var(--tooltip-ink); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.peek .pk { min-width: 0; flex: 1; }
.peek .pk b { display: block; font: 500 16px/20px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek .pk span { font: 400 13px/18px var(--sans); color: var(--tooltip-ink-2); }
.peek a { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--tooltip-ink); color: var(--tooltip-bg); font-weight: 500; display: inline-flex; align-items: center; text-decoration: none; }
.scrim { position: fixed; inset: 0; z-index: 44; background: rgb(0 0 0 / .32); }
.sheet { position: fixed; z-index: 45; background: var(--paper); box-shadow: var(--shadow); overflow: auto; overscroll-behavior: contain; }
.filters-sheet { inset: 0; padding: 16px; }
.filters-sheet h2 { font: 600 20px/26px var(--sans); }
.filters-sheet .fs-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters-sheet h3 { font: 600 15px/20px var(--sans); margin: 20px 0 8px; }
.filters-sheet .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filters-sheet .fs-foot { position: sticky; bottom: 0; background: var(--paper); padding: 12px 0 4px; margin-top: 16px; }
.filters-sheet .fs-foot .btn { width: 100%; justify-content: center; height: 48px; }

/* focus rings: chips set their own box-shadow, so the ring is restated here and wins (both themes) */
.chip:focus-visible, .chip.on:focus-visible, .chip[aria-pressed="true"]:focus-visible, .chip.menu.has:focus-visible, .chip.rm:focus-visible, .btn:focus-visible {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--focus);
}

@media (forced-colors: active) {
  .tile, .frame { border: 1px solid CanvasText; }
  .nav a[aria-current="page"]::after { background: Highlight; }
}

/* ---------- tablet ≤1199 ---------- */
@media (max-width: 1199px) {
  .treemap { height: 640px; }
  .geo { grid-template-columns: minmax(0, 1fr); }
  .pcols, .acols { grid-template-columns: minmax(0, 1fr); }
  .pside { position: static; order: -1; }
  .profile .pname { margin-bottom: 20px; }
  .count { margin-left: 0; }
}
@media (max-width: 1023px) {
  .gcols { grid-template-columns: minmax(0, 1fr); }
  .gcountries { position: static; order: -1; }
  .otable th:nth-child(2), .otable td:nth-child(2) { display: none; }
}

/* ---------- phone ≤767 ---------- */
@media (max-width: 767px) {
  .site-inner { padding-top: 12px; gap: 4px; }
  .nav { width: calc(100% + 2 * var(--page-margin)); margin: 0 calc(-1 * var(--page-margin)); padding: 0 calc(var(--page-margin) - 11px); overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .nav a { height: 44px; flex: none; }
  .nav a[aria-current="page"]::after { bottom: 0; }
  .page { padding-top: 22px; padding-bottom: 48px; }
  .page h1 { font-size: 26px; line-height: 31px; }
  .lede { font-size: 16px; line-height: 24px; }
  .filterbar-inner { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .searchwrap { flex: none; width: 100%; }
  .search { height: 40px; }
  .fb-line { display: flex; gap: 8px; align-items: center; }
  .group + .group { border-left: 0; padding-left: 0; }
  .group.types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding-right: 24px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .desk-only { display: none !important; }
  .mobile-only { display: inline-flex !important; }
  .count { font-size: 13px; }
  .key { margin: 10px 0; }
  .treemap { height: auto; aspect-ratio: 3 / 4; }
  .pagehead { align-items: center; }
  .ptable thead { display: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable td { display: block; }
  .ptable tr { border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .ptable td { height: auto; border: 0; padding: 0; }
  .ptable td[data-k] { display: grid; grid-template-columns: 40% 60%; font-size: 13px; color: var(--ink-2); text-align: left; }
  .ptable td[data-k]::before { content: attr(data-k); color: var(--ink-3); }
  .ptable td:first-child { font-size: 16px; margin-bottom: 4px; }
  .ptable .cbar { width: 72px; }
  .otable td.ppl { width: auto; }
  .otable td:nth-child(2) { display: none; }
  .pbar { width: 72px; }
  .pv { min-width: 0; text-align: left; }
  .ptable td[data-k] > .pcell { display: inline-flex; align-items: center; }
  .pfilters .search { width: 100%; flex: 1; }
  .pfilters .psearch { width: 100%; }
  .pfilters .group + .group { border-left: 0; padding-left: 0; }
  .olist { columns: 1; }
  .kv { grid-template-columns: 40% 60%; }
  .big { font-size: 44px; line-height: 48px; }
  .labgrid { grid-template-columns: minmax(0, 1fr); }
  .gh { flex-direction: column; gap: 4px; }
  .adl { grid-template-columns: minmax(0, 1fr); }
  .adl dd { border-top: 0; padding-top: 0; }
}

/* Whole table rows open their page: the name link stretches over the row; other links in the row sit above it. */
.rowlinks tbody tr { position: relative; }
.rowlinks tbody tr:hover { background: var(--paper-2); }
.rowlinks td:first-child a:first-child::after { content: ""; position: absolute; inset: 0; }
.rowlinks td a:not(:first-child), .rowlinks .by a { position: relative; z-index: 1; }

.big.none { font-size: 28px; line-height: 34px; }

/* Headcount over time, under the org's number (rail.js history()) */
.hist { margin: 28px 0 0; }
.hist .hhead { font: 600 13px/18px var(--sans); color: var(--ink-2); }
.hist .hplot { position: relative; margin-top: 8px; min-height: 184px; }
.hist .hplot > svg { display: block; overflow: visible; font-variant-numeric: tabular-nums; }
.hist .hgrid { stroke: var(--rule); stroke-width: 1; }
.hist .hbase { stroke: var(--ink-3); stroke-width: 1; }
.hist .hband { fill: var(--paper-2); }
.hist .hdiv { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.hist .hline { stroke: var(--ink-2); stroke-width: 1.5; stroke-opacity: .85; stroke-linecap: round; fill: none; }
.hist .hline.switch, .hkey .hline.switch { stroke-dasharray: 2 5; stroke-width: 2; stroke-linecap: round; }
.hkey .hline.switch { stroke: var(--ink-2); }
.hist .hrange, .hkey .hrange { fill: color-mix(in srgb, var(--ink) 16%, transparent); }
.hist .hrange.now, .hkey .hrange.now { fill: color-mix(in srgb, var(--signal) 34%, transparent); }
.hist .hcur { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 1 3; }
.hist .hhit { fill: transparent; }
.hist .hpt { cursor: default; outline: none; }
.hist .hpt:focus-visible .hhit { stroke: var(--focus); stroke-width: 2; }
.hist .hpt.on .hhit { fill: color-mix(in srgb, var(--ink) 10%, transparent); }
.hist .pt, .hkey .pt { fill: var(--ink-2); stroke: var(--paper); stroke-width: 1.5; }
.hist .pt.ring, .hkey .pt.ring { fill: var(--paper); stroke-width: 2; }
.hist .hband ~ .hpt .pt.ring { fill: var(--paper-2); }
.hist .pt.now, .hkey .pt.now { fill: var(--signal); stroke: var(--paper); stroke-width: 2; }
.hkey .pt { stroke-width: 1.25; }
.hist text { font: 400 12px var(--sans); fill: var(--ink-3); }
.hist text.hb { font-size: 11px; font-weight: 500; letter-spacing: .02em; fill: var(--ink-2); }
.hist text.hnow { font-size: 17px; font-weight: 600; fill: var(--ink); }
.hist text.hup { font-size: 11px; fill: var(--ink-2); }
.hist text.hfirst { fill: var(--ink-2); }
.hist .htip { position: absolute; z-index: 2; pointer-events: none; background: var(--tooltip-bg); color: var(--tooltip-ink-2); border-radius: 6px; padding: 6px 9px; font: 400 12px/16px var(--sans); width: max-content; max-width: min(260px, 70%); box-shadow: var(--shadow); display: grid; }
.hist .htip[hidden] { display: none; }
.hist .htip .hnote { margin-top: 4px; padding-top: 4px; border-top: 1px solid color-mix(in srgb, var(--tooltip-ink-2) 30%, transparent); }
.hist .htip b { font-weight: 600; font-size: 13px; color: var(--tooltip-ink); }
.hkey { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font: 400 12px/18px var(--sans); color: var(--ink-3); }
.hkey span { display: inline-flex; align-items: center; }
.hkey svg { width: 11px; height: 11px; margin-right: 6px; overflow: visible; }
.hkey svg.wide { width: 16px; }
.hist figcaption { margin-top: 4px; }
@media (forced-colors: active) { .hist .pt, .hist .hline, .hkey .pt, .hkey .hline { stroke: CanvasText; } .hist .pt.dot, .hist .pt.square, .hist .pt.now { fill: CanvasText; } .hist text { fill: CanvasText; } .hist .hrange, .hkey .hrange { fill: GrayText; } }

/* Ask Atlas (atlas.js): chat bottom right on every page. Dry run; site tokens only. */
.at-fab { position: fixed; z-index: 60; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 10px 16px 10px 13px; font: 600 14px/1 var(--sans); cursor: pointer; box-shadow: var(--shadow); transition: background .15s, transform .15s; }
.at-fab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.at-fab:hover { transform: translateY(-1px); }
.at-fab[aria-expanded="true"] { background: var(--signal); }
.at-win { position: fixed; z-index: 60; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: min(392px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 110px)); background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; font: 400 14px/1.5 var(--sans); color: var(--ink); }
.at-win[hidden] { display: none; }
.at-head { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 6px; padding: 10px 10px; border-bottom: 1px solid var(--rule); }
.at-title { text-align: center; min-width: 0; }
.at-title b { display: block; font: 400 17px/1.2 var(--serif); }
.at-title small { display: block; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; padding: 0; }
.at-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.at-icon:hover { background: var(--paper-2); color: var(--ink); }
.at-back:disabled { visibility: hidden; }
.at-log { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.at-m { max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-bot { align-self: flex-start; color: var(--ink); }
.at-me { align-self: flex-end; max-width: 80%; background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule); padding: 6px 12px; border-radius: 14px 14px 4px 14px; font-size: 13.5px; }
.at-warn { align-self: flex-start; color: var(--ink); padding-left: 10px; border-left: 2px solid var(--signal); }
.at-opts { display: grid; gap: 6px; }
.at-opts.many { grid-template-columns: 1fr 1fr; }
.at-opt { display: block; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); border-radius: 10px; padding: 9px 12px; font: 500 13.5px/1.3 var(--sans); cursor: pointer; transition: border-color .12s, background .12s; }
.at-opt:hover { border-color: var(--ink-3); background: var(--paper-2); }
.at-check { position: relative; padding-left: 36px; }
.at-check::before { content: ""; position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 1.5px solid var(--ink-3); border-radius: 4px; }
.at-check[aria-pressed="true"] { border-color: var(--ink); }
.at-check[aria-pressed="true"]::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--paper); }
.at-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); text-align: center; }
.at-primary:hover { background: var(--ink); opacity: .9; }
.at-primary:disabled { opacity: .35; cursor: default; }
.at-card { margin-top: 8px; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; background: var(--paper-2); white-space: normal; }
.at-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.at-card dt { color: var(--ink-3); }
.at-card dd { margin: 0; overflow-wrap: anywhere; }
.at-card details { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.at-card summary { cursor: pointer; }
.at-card pre { font: 11.5px/1.4 ui-monospace, Consolas, monospace; margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.at-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--rule); }
.at-bar[hidden] { display: none; }
.at-bar input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--rule); border-radius: 999px; padding: 0 14px; background: var(--paper-2); color: var(--ink); font: inherit; outline: none; transition: border-color .12s; }
.at-bar input:focus { border-color: var(--ink-3); }
.at-send { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border: 0; border-radius: 50%; cursor: pointer; }
.at-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.at-fab:focus-visible, .at-opt:focus-visible, .at-send:focus-visible, .at-icon:focus-visible, .at-card summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.at-bar input:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
@media (prefers-reduced-motion: no-preference) { .at-m, .at-opts { animation: atIn .18s ease-out; } @keyframes atIn { from { transform: translateY(4px); opacity: 0; } } }
/* Phone: the chat takes the screen; the bubble steps aside while it is open. */
@media (max-width: 560px) {
  .at-win { inset: 0; width: auto; max-height: none; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.at-open .at-fab { display: none; }
}
@media print { .at-fab, .at-win { display: none; } }
