/* Palette (docs/design-system.md). Material's surface model, not a paper one: a tinted
   blue-grey ground, white surfaces lifted off it by shadow. The colours are the logo's (#474):
   its navy is the ink and the header band, a deep cut of its cyan is the link colour (the cyan
   itself at night), and its leaf green is the one highlight.
   --bg is never white, --panel always is: that gap is what makes a card read as a card. */
:root {
  --bg: #eceff3; --panel: #fff; --ink: #122a35; --muted: #52636f; --line: #d7dde3;
  --accent: #0b6477; --accent-soft: #d9edf2;
  --pos: #1f7a3a; --null: #5b6670; --mixed: #8f5800; --harm: #b3261e; --unk: #58626c;
  /* The main button on a page (Ask, Search): navy by day, the logo's cyan by night. */
  --primary: #122a35; --on-primary: #fff;
}
/* The logo's own colours and the header band. These do not change with day and night: the band is
   navy in both, and everything on it reads from the --top-* set. */
:root {
  --navy: #122a35; --cyan: #35c8e0; --leaf: #8dc63f;
  --top-bg: var(--navy); --top-ink: #fff; --top-muted: #a9bdc7; --top-line: rgba(255,255,255,.18); --top-hover: rgba(255,255,255,.1);
}
/* Type (#474). Public Sans, the logo's face, for the interface; a serif for page titles and long reading. */
:root {
  --font-ui: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
/* Shape (#474): three radii and no more. A tag, a control, a surface. Round is kept for things that
   are round (avatars, counters, switches): they say --r-round. */
:root { --r-tag: 3px; --r-ctl: 6px; --radius: 8px; --r-round: 999px; }
/* Dark palette: follows the system unless the reader picks day or night (theme toggle, top right). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1b23; --panel: #122a35; --ink: #e8eff2; --muted: #9bb0bb; --line: #254351;
    --accent: #35c8e0; --accent-soft: #12404d;
    --pos: #6fcf8a; --null: #a3adb6; --mixed: #e0a542; --harm: #f2817a; --unk: #a1abb4;
    --primary: #35c8e0; --on-primary: #0b1b23;
  }
}
:root[data-theme="dark"] {
    --bg: #0b1b23; --panel: #122a35; --ink: #e8eff2; --muted: #9bb0bb; --line: #254351;
    --accent: #35c8e0; --accent-soft: #12404d;
    --pos: #6fcf8a; --null: #a3adb6; --mixed: #e0a542; --harm: #f2817a; --unk: #a1abb4;
    --primary: #35c8e0; --on-primary: #0b1b23;
}
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
/* The header is a navy band (#474): the logo's own navy, by day and by night. What sits on it reads from --top-*. */
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font-ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: from-font; }
/* Titles are set in the serif (#474): the name of a page, a record or a section. Headings that are
   really labels (a card's title in a grid, a filter drawer, a small-caps section marker) stay in the
   interface face, so a grid of forty cards does not turn into forty headlines. */
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.008em; line-height: 1.2; }
.brand, .card__title, .dc__title, .behind h2, .drawer__top h2, .mega__col h3, h2.coll__h, .srcs summary h2 { font-family: var(--font-ui); letter-spacing: 0; }
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--cyan); color: var(--navy); }
:focus-visible { outline-color: var(--accent); }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--top-bg); color: var(--top-ink); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; } /* above the cards' own layers (covers, the card bar), so an open menu covers them */
.brand { margin: 0; font-size: 1.062rem; font-weight: 700; }
.brand a { text-decoration: none; color: var(--top-ink); }
/* Edition logo (build.mjs, edition.brand): woven rings, the name, and a line under it saying what the site is (#439). */
.brand a:has(.brand__mark) { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 52px; height: 52px; flex: none; --accent: var(--cyan); } /* 25% larger than 42px (Kalman, 2026-11-21) */
.brand__txt { display: flex; flex-direction: column; font-family: "Public Sans", system-ui, sans-serif; line-height: 1; }
.brand__name { font-size: 23px; font-weight: 700; letter-spacing: -.022em; }
.brand__sub { margin-top: 4px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--top-muted); white-space: nowrap; }
/* Mega menus in place of ten links (#413). A menu's name is a button; its panel holds the menu's own
   pages on the left and shortcut columns beside them (menu.js). The panel hangs from the header,
   not from the button, so it can be as wide as it needs. */
.top nav { display: flex; gap: 2px; }
.top nav [hidden] { display: none; }
.menu:not(:has(.mega__main a:not([hidden]))) { display: none; } /* a menu with no page to offer */
.menu__btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 16px; font-weight: 500; color: var(--top-muted); background: none; border: 0; border-radius: var(--r-ctl); padding: 7px 11px; cursor: pointer; white-space: nowrap; }
.menu__btn::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; opacity: .7; }
.menu.open .menu__btn::after { transform: translateY(1px) rotate(225deg); }
.menu__btn:hover, .menu.open .menu__btn { color: var(--top-ink); background: var(--top-hover); }
.menu__btn.on { color: var(--top-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--leaf); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
.menu__panel { display: none; position: absolute; top: 100%; left: 24px; z-index: 5; width: max-content; max-width: calc(100% - 48px); padding: 10px; gap: 4px 0; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-top: 0; border-radius: var(--radius); box-shadow: var(--shadow-2, 0 12px 28px rgba(0,0,0,.18)); }
.menu__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; } /* the mouse crosses from the name to the panel without it shutting */
.menu.open .menu__panel { display: flex; animation: mega-in .14s ease-out; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-4px); } }
.mega__main { flex: none; width: 290px; display: grid; align-content: start; gap: 2px; }
.mega__main a { display: grid; gap: 1px; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.mega__main a b { font-weight: 600; }
.mega__main a b em { font-style: normal; font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 2px; }
.mega__main a span { font-size: 14px; line-height: 1.35; color: var(--muted); }
.mega__main a:hover, .mega__main a:focus-visible { background: var(--bg); }
.mega__main a.on { background: var(--accent-soft); }
.mega__main a.on b { color: var(--accent); }
.mega__col { min-width: 190px; max-width: 280px; padding: 8px 6px 6px 18px; margin-left: 12px; border-left: 1px solid var(--line); }
.mega__col h3, .mega__areas h3 { margin: 2px 0 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mega__col ul { list-style: none; margin: 0; padding: 0; }
.mega__col li a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 -8px; padding: 5px 8px; border-radius: var(--r-ctl); font-size: 15.5px; text-decoration: none; color: var(--ink); }
.mega__col li a em { font-style: normal; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mega__col li a:hover, .mega__col li a:focus-visible, .mega__tile:hover, .mega__tile:focus-visible, .mega__post:hover, .mega__post:focus-visible { background: var(--bg); color: var(--accent); }
.mega__more { display: inline-block; margin-top: 8px; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.mega__more::after { content: " →"; }
.mega__more:hover { text-decoration: underline; }
.mega__col--wide { max-width: none; }
.mega__icon { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; color: var(--accent); }
.mega__icon svg { width: 22px; height: 22px; }
.mega__tiles { display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 2px 8px; }
.mega__tile { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-ctl); text-decoration: none; color: var(--ink); font-size: 15.5px; }
.mega__areas { display: grid; grid-template-columns: repeat(5, minmax(140px, 168px)); gap: 12px 18px; }
[data-menu="topics"] .mega__main { width: 190px; }
.menu__panel { max-height: calc(100vh - 100% - 60px); overflow-y: auto; }
.mega__areas h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 2px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.mega__area { display: flex; align-items: center; gap: 7px; margin: 0 -8px 0 -4px; padding: 2px 8px 2px 4px; border-radius: var(--r-ctl); text-decoration: none; color: inherit; }
.mega__area:hover, .mega__area:focus-visible { background: var(--bg); color: var(--accent); }
.mega__areas li a { font-size: 14.5px; padding: 3px 8px 3px 33px; margin: 0; color: var(--muted); }
.mega__col--posts { max-width: 320px; }
.mega__post { display: grid; gap: 3px; margin: 0 -8px 4px; padding: 6px 8px; border-radius: var(--r-ctl); text-decoration: none; color: var(--ink); }
.mega__post b { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.mega__post span { font-size: 13.5px; color: var(--muted); }
.menu-btn { display: none; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--top-ink); background: none; border: 1px solid var(--top-line); border-radius: var(--r-ctl); cursor: pointer; }
.menu-btn svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .menu__btn::after { transition: none; } .menu.open .menu__panel { animation: none; } }
/* Mid widths: the topic areas go three across. */
@media (max-width: 1240px) { .mega__areas { grid-template-columns: repeat(4, minmax(140px, 168px)); } }
@media (max-width: 1040px) { .mega__areas { grid-template-columns: repeat(3, minmax(140px, 168px)); } [data-menu="topics"] .mega__main { width: 150px; } }
/* Between a phone and a wide screen: logo and tools share the first row, the menus take the second.
   One row needs about 1260px with a usable search box; at 1001px (the old line) the search shrank to nothing (#439). */
@media (min-width: 801px) and (max-width: 1259px) { .top nav { order: 10; flex: 1 1 100%; margin: 0 -11px; } }
/* Wide screens (1260px and up): one row. The search box gives up width before anything wraps. */
@media (min-width: 1260px) { .top { flex-wrap: nowrap; } .top .brand, .top nav { flex: none; } }
/* Narrow phones: the Menu button stays on the logo's row, as an icon. */
@media (max-width: 480px) {
  .menu-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .brand__mark { width: 45px; height: 45px; }
  .brand__name { font-size: 20px; }
  .brand__sub { font-size: 12px; }
}
/* Beta notice (#474): a thin strip in the band's own navy, one shade down, instead of a yellow bar that
   was the loudest thing on every page. The tag is the logo's leaf green. Previews keep their yellow bar. */
.beta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 5px 24px; background: #0b1e27; color: var(--top-muted); font-size: 13.5px; line-height: 1.4; }
.beta-link { margin-left: auto; padding: 0; border: 0; background: none; color: var(--top-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.beta-link:hover, .beta-link:focus-visible { color: var(--cyan); }
.beta-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--leaf); color: var(--navy); padding: 1px 6px; border-radius: var(--r-tag); }
@media (max-width: 660px) { .beta { padding: 5px 16px; } }
.draft { margin-left: auto; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mixed); border: 1px solid currentColor; border-radius: var(--r-tag); padding: 1px 6px; }
main { max-width: 1240px; margin: 0 auto; padding: 16px 24px 48px; }
/* The footer closes the page in the same navy as the header (#474): the name, when the data was built, four links. */
footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-top: 32px; padding: 22px max(24px, calc((100vw - 1240px) / 2 + 24px)) 30px; background: var(--top-bg); color: var(--top-muted); font-size: 14.5px; }
footer:empty { display: none; }
.foot__name { font-weight: 700; font-size: 16px; color: var(--top-ink); }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; }
footer a { color: var(--top-ink); text-decoration: none; }
footer a:hover, footer a:focus-visible { color: var(--cyan); text-decoration: underline; }
.intro p { color: var(--muted); margin: 4px 0 16px; max-width: 78ch; }
/* Edition home pitch (addiction-action.org): one headline, one paragraph, three ways in. */
.pitch h2 { margin: 6px 0 6px; font-size: 1.541rem; line-height: 1.25; }
.pitch p { max-width: 70ch; margin-bottom: 12px; }
.pitch__ways { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pitch__ways a { display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); text-decoration: none; }
.pitch__ways a:hover, .pitch__ways a:focus-visible { border-color: var(--accent); }
.pitch__ways b { display: block; color: var(--accent); margin-bottom: 2px; }
.pitch__ways span { color: var(--muted); font-size: .978rem; }
@media (max-width: 760px) { .pitch__ways { grid-template-columns: 1fr; } .pitch h2 { font-size: 1.275rem; } }
/* Search sits above the filters, not inside them, so on a phone it stays on the page while the filters go in the drawer. */
.layout { display: grid; grid-template-columns: 270px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "search results" "facets results"; gap: 10px 28px; align-items: start; }
.lsearch { grid-area: search; }
.facets { grid-area: facets; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; padding-right: 6px; }
.results { grid-area: results; min-width: 0; }
input[type=search], select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); }
.layout input.lsearch { width: 100%; }
input.wide { width: 100%; max-width: 520px; margin-bottom: 14px; }
.facet { border-top: 1px solid var(--line); padding: 8px 0; }
.facet summary { cursor: pointer; font-weight: 600; font-size: 15px; }
/* Group header (Viv-Resource-Library#48): name (count) left; clear × and chevron right. */
.facet > summary { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 26px; }
.facet > summary::-webkit-details-marker { display: none; }
.facet__name { flex: 1; min-width: 0; }
.facet > summary > .chev { width: 24px; display: inline-grid; place-items: center; }
.chev::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translate(-1px, -1px); color: var(--muted); }
.chev { display: inline-grid; place-items: center; transition: transform .15s; }
.facet[open] > summary > .chev { transform: rotate(180deg); }
button.tx .chev::before { color: inherit; }
.facet__clear { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent); font: 600 15px/1 system-ui, sans-serif; padding: 0; cursor: pointer; display: grid; place-items: center; }
.facet__clear:hover, .facet__clear:focus-visible { background: var(--accent); color: var(--panel); }
.facet ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow: auto; }
/* "Show all 60" (#280): an expanded group grows and the rail scrolls, instead of hiding the rest of the
   list behind a second scrollbar inside the rail's own, which made the click look like it did nothing. */
.facet ul.facet__list--all { max-height: none; overflow: visible; }
/* The parent a topic sits under (its MeSH category): a heading in the list, not a filter of its own. */
.facet .facet__head { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.facet .facet__head:first-child { margin-top: 2px; }
.facet label { display: flex; gap: 8px; align-items: baseline; font-size: 15px; padding: 2px 0; cursor: pointer; }
/* Count in brackets right after the label (Viv-Resource-Library#48), not in its own column. */
.facet label .flab { flex: 1; min-width: 0; }
.facet em { font-style: normal; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar select { margin-left: auto; }
.chip { font: inherit; font-size: 14px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); border-radius: var(--r-ctl); padding: 2px 10px; cursor: pointer; }
.clear { font-size: 14px; }
.yrs { color: var(--muted); font-size: 15px; white-space: nowrap; }
.tag { font-style: italic; margin: 4px 0; }
.tag.big { font-size: 21px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev, .out { font-size: 13px; border-radius: var(--r-tag); padding: 1px 7px; border: 1px solid var(--line); }
.ev { background: var(--accent-soft); color: var(--ink); }
.out-positive { color: var(--pos); border-color: var(--pos); }
.out-null { color: var(--null); border-color: var(--null); }
.out-mixed { color: var(--mixed); border-color: var(--mixed); }
.out-harmful { color: var(--harm); border-color: var(--harm); }
.out-unknown { color: var(--unk); }
.empty { color: var(--muted); padding: 20px; }
.detail { max-width: 860px; }
.detail h1 { margin: 4px 0; font-size: 32px; line-height: 1.2; }
.detail h2 { font-size: 18px; margin: 26px 0 8px; }
.back { margin: 0 0 8px; }
.alt { color: var(--muted); margin: 0; }
.lede { font-size: 19px; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 20px 0; }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; }
.pill { display: inline-block; font-size: 14px; padding: 1px 9px; margin: 0 4px 4px 0; border-radius: var(--r-ctl); background: var(--accent-soft); text-decoration: none; color: var(--ink); }
.pill:hover { outline: 1px solid var(--accent); }
.pill--out { background: var(--panel); border: 1px solid var(--line); }
.pill--out span { color: var(--muted); font-size: 12px; margin-left: 3px; }
.sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 4px 18px 12px; margin: 20px 0; }
.notes { border-style: dashed; }
.notes p { color: var(--muted); font-size: 16px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
/* Boot, and the wait while a tab's own slice of the library arrives (#280). */
.loading { color: var(--muted); padding: 48px 0; text-align: center; }
/* The loading state (#457; build.mjs writes it, app.js's Loader fills it): the brand's mark animating
   beside a checklist of what the page is fetching. Each step comes in after the one before; its box
   ticks, in the logo's green, when its file has arrived. The whole thing fades in, so a wait that
   ends at once shows next to nothing; the HCF disc gets the header mark's ring at night. */
.loader { display: flex; align-items: flex-start; justify-content: center; gap: 22px; padding: 56px 16px; text-align: left; color: var(--ink); animation: loading-in .35s ease-out both; }
.loader__mark { width: 84px; height: 84px; flex: none; }
.loader__mark.hcf-loader { border-radius: 50%; }
:root[data-theme="dark"] .loader__mark.hcf-loader { box-shadow: 0 0 0 1.5px #3d5a66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .loader__mark.hcf-loader { box-shadow: 0 0 0 1.5px #3d5a66; } }
.loader__body { min-width: 0; max-width: 360px; padding-top: 2px; }
.loader__title { margin: 0 0 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.loader__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.loader__step { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.35; animation: loader-step .4s ease-out both; animation-delay: calc(var(--i, 0) * 110ms); }
.loader__what { display: flex; flex-direction: column; min-width: 0; }
.loader__what b { font-weight: 600; }
.loader__what span { color: var(--muted); font-size: 13px; }
.loader__box { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.loader__box rect { fill: transparent; stroke: var(--line); stroke-width: 1.5; transition: fill .25s, stroke .25s; animation: loader-wait 1.4s ease-in-out infinite; }
.loader__box path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s .08s ease-out; }
.loader__step.is-done .loader__box rect { fill: #6faa2c; stroke: #6faa2c; animation: loader-pop .35s ease-out; transform-box: fill-box; transform-origin: center; }
.loader__step.is-done .loader__box path { stroke-dashoffset: 0; }
@keyframes loading-in { from { opacity: 0; } }
@keyframes loader-step { from { opacity: 0; transform: translateY(4px); } }
@keyframes loader-wait { 50% { stroke: var(--muted); } }
@keyframes loader-pop { 50% { transform: scale(1.18); } }
@media (max-width: 480px) { .loader { gap: 14px; padding: 40px 16px; } .loader__mark { width: 60px; height: 60px; } }
@media (prefers-reduced-motion: reduce) { .loader, .loader__step, .loader__box rect { animation: none; } .loader__box path { transition: none; } }
.small { font-size: 14px; }
/* Sources: closed until clicked. */
.srcs { margin: 26px 0 0; border-top: 1px solid var(--line); }
.srcs summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.srcs summary::-webkit-details-marker { display: none; }
.srcs summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.srcs[open] summary::after { transform: rotate(-135deg); }
.srcs summary h2, .detail .srcs summary h2 { margin: 0; }
.srcs summary:hover h2 { color: var(--accent); }
.srcs__n { color: var(--muted); font-weight: 400; }
/* Research notes as a timeline: date · kind · what was done. */
.rnotes { list-style: none; margin: 0 0 8px; padding: 0; border-left: 2px solid var(--line); }
.rn { position: relative; display: grid; grid-template-columns: 92px 84px 1fr; gap: 4px 10px; padding: 8px 0 8px 14px; font-size: 15.5px; line-height: 1.5; }
.rn::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.rn + .rn { border-top: 1px dashed var(--line); }
.rn__when { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.rn__kind { justify-self: start; align-self: start; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--r-tag); background: var(--accent-soft); color: var(--accent); }
.rn__text { overflow-wrap: anywhere; }
.rn--open::before { border-color: #b26a00; background: #b26a00; }
.rn--open .rn__kind { background: #fff1db; color: #8a4f00; }
.rn--fix::before { border-color: var(--accent); }
.rn--note .rn__kind, .rn--status .rn__kind { background: transparent; color: var(--muted); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rn--open .rn__kind { background: #3a2a10; color: #f0b860; } }
:root[data-theme="dark"] .rn--open .rn__kind { background: #3a2a10; color: #f0b860; }
@media (max-width: 600px) { .rn { grid-template-columns: auto 1fr; } .rn__text { grid-column: 1 / -1; } }
.sources li { margin: 4px 0; font-size: 16px; overflow-wrap: anywhere; }
.tbl { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 16px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 14px; color: var(--muted); font-weight: 600; }
.tbl .num { text-align: right; }
/* Directory (#114): kind, sub-kind and role chips over one table of every organisation */
.lead { font-size: 12px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-tag); padding: 0 4px; }
@media (max-width: 800px) {
  .layout, .cols { grid-template-columns: 1fr; }
  .layout { grid-template-rows: none; grid-template-areas: "search" "bar" "results"; }
  main, .top, footer { padding-left: 16px; padding-right: 16px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .tbl { display: block; overflow-x: auto; }
}

/* ---------- Cards (matching the scouts library) ---------- */
/* Elevation, Material-style: two layers (a tight contact shadow, a wide ambient one), tinted
   with the ground's blue rather than black, so a lifted surface looks lit, not dirty.
   --shadow is resting, --shadow-2 is the hover lift. Cards keep a hairline too: shadow alone
   disappears against a dark ground and for readers who turn transparency down. */
:root { --cover-l: 90%; --cover-s: 45%; --cover-ink: 30%;
  --shadow: 0 1px 2px rgba(17,34,51,.08), 0 2px 10px rgba(17,34,51,.05);
  --shadow-2: 0 2px 4px rgba(17,34,51,.10), 0 10px 24px rgba(17,34,51,.11); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cover-l: 24%; --cover-s: 28%; --cover-ink: 85%; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 2px 6px rgba(0,0,0,.5), 0 12px 28px rgba(0,0,0,.45); } }
:root[data-theme="dark"] { --cover-l: 24%; --cover-s: 28%; --cover-ink: 85%; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 2px 6px rgba(0,0,0,.5), 0 12px 28px rgba(0,0,0,.45); }
/* The receipt for a fact taken off the cards because every result here shares it (#301). */
.shared-note { margin: 0 0 .7rem; color: var(--muted); font-size: .903rem; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.grid > li { display: flex; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; box-shadow: var(--shadow); width: 100%; transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); transform: translateY(-1px); }
/* The card used to clip its children, which rounded the picture's top corners for free. It can't any
   more: the card bar's emoji and Save pop-overs open upwards out of the card and were cut off at its
   edge (#236). So the picture rounds its own corners — inside the 1px border, hence the -1px. */
.card > .cover { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.card--row > .cover { border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px); }
.card:focus-within { border-color: var(--accent); box-shadow: var(--shadow-2); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
.card > a { display: block; text-decoration: none; }
.cover { position: relative; aspect-ratio: 16 / 9; background: hsl(var(--h) var(--cover-s) var(--cover-l)); color: hsl(var(--h) 40% var(--cover-ink)); display: grid; place-items: center; overflow: hidden; }
.cover svg { width: 44px; height: 44px; margin: 0; opacity: .8; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover img ~ svg { display: none; }
.cover__blur { display: none !important; }
.cover--fit .cover__blur { display: block !important; filter: blur(16px) saturate(1.2); transform: scale(1.15); opacity: .55; }
.cover--fit .cover__img { object-fit: contain; padding: 6%; }
.cover--logo { background: #fff; }
.cover--on-dark { background: #1f2a30; } /* light logos (logo-tone.py) */
.cover--logo .cover__img { padding: 14% 20%; }
.cover--big.cover--fit .cover__img { padding: 8% 14%; }
.cover--big { aspect-ratio: 16 / 7; border-radius: var(--radius); margin-bottom: 14px; }
.cover--big svg { width: 60px; height: 60px; }
/* The pop-up picture's caption sits behind a "?" (pictureTipHtml): what the picture is and where it's from. */
.cover__about { position: absolute; right: .6rem; bottom: .6rem; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.62); color: #fff; font: 800 .95rem/1 inherit; cursor: help; display: grid; place-items: center; }
.cover__about:hover, .cover__about:focus-visible { background: rgba(0,0,0,.82); outline: 2px solid #fff; outline-offset: 1px; }
#tip p { margin: 0 0 .4rem; }
#tip p:last-child { margin-bottom: 0; }
#tip a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
#tip a span { display: inline; }
.tip__video b { display: block; }
.tip__video small { display: block; opacity: .8; }
.tip__aside { padding: .35rem .5rem; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--bg) 12%, transparent); }
/* Chips on the picture, bottom left (#301): what this card is, read before the title.
   They sit over an arbitrary photo, so each chip carries its own dark plate (>=6:1 for white
   text over any image, even a white one) and the cover gets a bottom scrim under them.
   Which axis they carry is the list's decision, not the card's — see cardContext in app.js. */
/* The scrim is for photographs. A placeholder cover is already flat and light, and darkening its
   foot just smudges it — the chip's own plate carries the contrast there. */
.cover--tagged:has(.cover__img)::after { content: ""; position: absolute; inset: auto 0 0 0; height: 58%; background: linear-gradient(to top, rgba(8,14,20,.58), rgba(8,14,20,0)); pointer-events: none; }
.cover__tags { position: absolute; left: .5rem; right: .5rem; bottom: .45rem; z-index: 2; display: flex; flex-wrap: wrap; gap: .25rem; }
.cover__tags .ttag { display: inline-flex; align-items: center; gap: .22rem; max-width: 100%; padding: .12rem .42rem .12rem .3rem; border-radius: var(--r-tag); background: rgba(10,16,22,.66); color: #fff; }
/* The blur is for looks; the plate stays at .66 because it is what guarantees the contrast.
   Thinning it to .52 for the frosted effect drops white text to 3.81:1 over a white photo. */
@supports (backdrop-filter: blur(6px)) { .cover__tags .ttag { backdrop-filter: blur(6px) saturate(1.1); } }
.cover__tags .ttag__icon { display: inline-grid; place-items: center; }
.cover__tags .ttag__icon svg { width: 13px; height: 13px; margin: 0; opacity: 1; color: #fff; }
.cover__tags .pick { color: #fff; font-size: .701rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover__tags .pick:hover { text-decoration: underline; }
/* The row card's picture is 200px wide: one chip fits, a second would wrap onto the photo. */
.card--row .cover__tags .ttag + .ttag { display: none; }
.card__body { padding: .8rem .9rem .9rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__kind { font-size: .765rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.card__stats { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .903rem; }
.card__stats small { color: var(--muted); font-size: .765rem; }
.card__title { font-size: 1.084rem; font-weight: 700; margin: 0; line-height: 1.3; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__by { font-size: .871rem; color: var(--muted); margin: 0; }
.card__tagline { font-style: italic; font-size: .956rem; margin: 0; }
.card__why { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.meaning-note { color: var(--muted); }
.card__years { margin-left: auto; color: var(--ink); }
.card__notes { font-size: .903rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: auto; padding-top: .3rem; font-size: .85rem; color: var(--muted); }
/* Card footer: labelled Evidence and Outcome on the left, location and years on the right. */
.card__foot { justify-content: space-between; align-items: flex-end; gap: .4rem .8rem; }
.card__grades { display: grid; grid-template-columns: auto auto; gap: .25rem .45rem; align-items: center; margin: 0; }
.card__grades div { display: contents; }
.card__grades dt { font-size: .797rem; color: var(--muted); }
.card__grades dd { margin: 0; }
.card__where { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; margin-left: auto; text-align: right; }
.card__where .card__years { margin-left: 0; }
.card__cty { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem; }

/* ---------- Campaign dialog ---------- */
dialog#modal { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: 24px 28px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: auto; }
dialog#modal::backdrop { background: rgba(15,20,22,.55); }
.modal__close { flex: none; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 17px; cursor: pointer; }
.modal__close:hover { border-color: var(--accent); }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 800px) { dialog#modal { padding: 18px 16px 24px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); } }
/* Phones: 100vh is the viewport with Safari's toolbars hidden, so a pop-up that tall runs under the
   toolbars and its ✕ sits off-screen. dvh is the visible height. Above that, the ✕ stays a 44px target. */
@media (max-width: 800px) { .modal__close { width: 44px; height: 44px; font-size: 19px; } }

/* Top bar: where you are in the list, and Close. Sticks to the top of the pop-up. */
.mnav { position: sticky; top: -24px; z-index: 2; display: flex; align-items: center; gap: 10px; margin: -24px -28px 14px; padding: 10px 14px 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.mnav__seq { flex: 1; min-width: 0; }
.mnav__where { display: block; font-size: 14px; color: var(--muted); line-height: 1.3; }
.mnav__where b { color: var(--ink); white-space: nowrap; }
.mnav__list { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnav__list:hover { color: var(--accent); }

/* Previous / next: big round arrows outside the pop-up, one each side (Viv pattern: pop-up pager).
   The dialog narrows so there's always room for them beside it. */
@media (min-width: 801px) {
  dialog#modal:has(.mpager:not(:empty)) { width: min(900px, calc(100vw - 168px)); }
  .mpager__mid { display: none; }
  .mpager .mnav__step { position: fixed; top: 50%; z-index: 3; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 64px; text-decoration: none; color: #fff; }
  .mpager .mnav__step--prev { left: max(12px, calc(50vw - var(--mw, 900px) / 2 - 76px)); }
  .mpager .mnav__step--next { right: max(12px, calc(50vw - var(--mw, 900px) / 2 - 76px)); }
  .mpager .mnav__arrow { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--panel); color: var(--accent); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .12s, background .12s, color .12s; }
  .mpager .mnav__arrow svg { width: 28px; height: 28px; }
  .mpager a.mnav__step:hover .mnav__arrow, .mpager a.mnav__step:focus-visible .mnav__arrow { background: var(--accent); color: var(--panel); transform: scale(1.06); }
  .mpager a.mnav__step:focus-visible { outline: none; }
  .mpager a.mnav__step:focus-visible .mnav__arrow { outline: 3px solid #fff; outline-offset: 2px; }
  .mpager .mnav__step.is-off { opacity: .35; }
  .mpager .mnav__step.is-off .mnav__arrow { box-shadow: none; }
  /* The next title shows under the arrow on hover or focus only, so the sides stay quiet. */
  .mpager .mnav__name { width: 120px; font-size: 13px; line-height: 1.3; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; opacity: 0; transition: opacity .12s; }
  .mpager a.mnav__step:hover .mnav__name, .mpager a.mnav__step:focus-visible .mnav__name { opacity: 1; }
  .mpager .is-off .mnav__name { display: none; }
}
/* Phone: a bar along the bottom of the pop-up: ‹  22 of 228 · See all  › */
@media (max-width: 800px) {
  .mnav { top: -18px; margin: -18px -16px 12px; padding: 8px 10px; }
  .mnav__where { display: none; }
  .mpager:empty { display: none; }
  .mpager { position: sticky; bottom: -24px; z-index: 2; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; margin: 18px -16px -24px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
  .mpager .mnav__step { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--accent); text-decoration: none; }
  .mpager .mnav__step--next { grid-column: 3; }
  .mpager a.mnav__step:active { background: var(--accent); color: var(--panel); }
  .mpager .mnav__step.is-off { opacity: .35; }
  .mpager .mnav__name { display: none; }
  .mpager__mid { grid-column: 2; display: flex; flex-direction: column; align-items: center; font-size: 14px; color: var(--muted); line-height: 1.35; }
  .mpager__mid b { color: var(--ink); }
  .mpager__all { font-weight: 600; padding: 2px 8px; }
}

/* Related campaigns: one tab per way of being alike. */
.rtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.rtabs [role=tab] { font: inherit; font-size: 15px; padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; }
.rtabs [role=tab] em { font-style: normal; color: var(--muted); font-size: 13px; }
.rtabs [role=tab]:hover { border-color: var(--accent); }
.rtabs [role=tab][aria-selected=true] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.rtabs [role=tab][aria-selected=true] em { color: inherit; opacity: .8; }
.card__why { font-size: .871rem; margin: 0; }
.more-btn { margin-top: 10px; font: inherit; font-size: 15px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; }
.more-btn:hover { border-color: var(--accent); }
.facet label.is-empty { opacity: .45; cursor: default; }

/* ---------- Tooltips and filter chips on cards ---------- */
#tip { position: fixed; z-index: 1000; max-width: 300px; padding: .4rem .6rem; border-radius: var(--r-ctl); background: var(--ink); color: var(--bg); font-size: .829rem; line-height: 1.4; box-shadow: 0 4px 14px rgba(0,0,0,.25); visibility: hidden; opacity: 0; transition: opacity .12s; }
#tip.on { visibility: visible; opacity: 1; }
#tip span { display: block; }
.tip__title { font-weight: 800; font-size: .85rem; margin-bottom: .2rem; padding-bottom: .2rem; border-bottom: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
.tip__see { display: inline-flex; align-items: center; gap: .35em; min-height: 32px; padding: 0 .6rem; border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); font-weight: 700; text-decoration: none; }
.tip__see:hover { text-decoration: underline; }
.tip__see[hidden] { display: none; }
/* `#tip a` (inherit the tooltip's colour, underline) outranks the class: without this the button's
   text is the colour of its own background (#400). */
#tip .tip__see { color: var(--ink); text-decoration: none; }
#tip .tip__see:hover { text-decoration: underline; }
/* Chips and explained items sit above the card's whole-card link (.card__title a::after). */
.card [data-tip], .card .pick { position: relative; z-index: 1; }
.pick { font: inherit; cursor: pointer; border: 1px solid transparent; background: none; color: inherit; padding: 0; text-align: left; }
.card__kind .pick { color: var(--accent); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .765rem; margin-right: .6rem; }
.card__kind .pick:hover, .stat.pick:hover { text-decoration: underline; }
.stat.pick { font-weight: 700; }
.pick.ev, .pick.out { font-size: 13px; border-radius: var(--r-tag); padding: 1px 7px; border: 1px solid var(--line); }
.pick.ev { background: var(--accent-soft); color: var(--ink); }
.pick.ev:hover, .pick.out:hover, .pick.cty:hover { outline: 1px solid var(--accent); }
.pick.cty { font-size: .85rem; color: var(--muted); padding: 1px 4px; border-radius: var(--r-tag); }
.card__by span, .stat__reach[data-tip] { cursor: help; }
.card__by span:hover, .stat__reach[data-tip]:hover { text-decoration: underline dotted; }
.pick:focus-visible, [data-tip]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.facet label[data-tip] span { text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
.pick.out-positive { color: var(--pos); border-color: var(--pos); }
.pick.out-null { color: var(--null); border-color: var(--null); }
.pick.out-mixed { color: var(--mixed); border-color: var(--mixed); }
.pick.out-harmful { color: var(--harm); border-color: var(--harm); }
.pick.out-unknown { color: var(--unk); }
.pick.ev, .pick.out { margin-right: 4px; }

/* Touch targets: at least 24px (WCAG 2.5.8) where the pointer is coarse. */
@media (pointer: coarse) {
  .card .pick, .card [data-tip], .pill { min-height: 28px; display: inline-flex; align-items: center; }
  .card__kind .pick { padding: 0 2px; }
}
@media (pointer: coarse) { .card .stat[data-tip] { gap: .3em; } }

/* Tooltip actions and the filter confirmation */
.tip__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.tip__actions[hidden] { display: none; }
.tip__only { font: inherit; font-weight: 700; min-height: 32px; padding: 0 .6rem; border-radius: var(--r-ctl); border: 0; background: var(--accent-soft); color: var(--ink); cursor: pointer; }
.tip__only:hover { outline: 2px solid var(--accent); }
.tip__only[hidden] { display: none; }
.tip__see { margin-top: 0; }
#tip.note { max-width: 260px; }
/* Every tooltip points at its item: a triangle on the item's centre, below the box or above it when flipped. */
#tip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
#tip.below::after { bottom: auto; top: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.chip.flash { animation: chip-flash 1.6s ease-out 2; }
@keyframes chip-flash { 0% { box-shadow: 0 0 0 0 var(--accent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .chip.flash { animation: none; outline: 2px solid var(--accent); } #tip { transition: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Invisible bridge over the gap between the item and its tooltip, so the pointer can cross it (WCAG 1.4.13). */
#tip::before { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; }
#tip.below::before { bottom: auto; top: -12px; }

/* Organisations behind a campaign: "+N" on the card, grouped list in the tooltip */
.card__by span.by, .card__by .by__logo, .card__by .more[data-tip] { cursor: help; }
.card__by .more { display: inline-block; margin-left: .25rem; padding: 0 .35rem; border-radius: var(--r-round); background: var(--accent-soft); color: var(--ink); font-size: .797rem; font-weight: 700; }
.card__by .more[data-tip]:hover, .card__by .by:focus-visible .more { outline: 1px solid var(--accent); }
#tip.wide { max-width: 340px; }
.orgs { display: block; }
.orgs__h { display: block; margin: .15rem 0 .2rem; font-size: .723rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.orgs__h:not(:first-child) { margin-top: .55rem; }
.orgs ul { list-style: none; margin: 0; padding: 0; }
.orgs li { display: block; padding: .15rem 0; }
.orgs li b { display: block; font-weight: 600; }
.orgs li span { display: block; font-size: .765rem; opacity: .8; }

/* ---------- Organisation links and pop-up ---------- */
.card .org-link { position: relative; z-index: 1; color: inherit; text-decoration: none; }
.card .org-link:hover, .card .org-link:focus-visible { color: var(--accent); text-decoration: underline; }
.org__head { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: center; margin-bottom: 8px; }
.org__head h1 { margin: 2px 0 4px; }
.org__sum { margin: 0 0 8px; color: var(--muted); }
.org__about { margin: 0 0 8px; max-width: 62ch; }
.org__logo { width: 112px; height: 112px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.org__logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.org__logo svg { display: none; width: 44px; height: 44px; }
.org__logo--none { background: hsl(var(--h) var(--cover-s) var(--cover-l)); color: hsl(var(--h) 40% var(--cover-ink)); }
.org__logo--none svg { display: block; }
.org .tags { margin-top: 0; padding-top: 0; }
.org .out { cursor: help; }
.names summary { cursor: pointer; color: var(--accent); }
.role-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.role-filter .chip { text-decoration: none; }
.role-filter .chip em { font-style: normal; color: var(--muted); font-size: 13px; margin-left: 2px; }
.chip--off { background: var(--panel); border-color: var(--line); }
.chip--off:hover { border-color: var(--accent); }
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 0 0 10px; }
.acc > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; list-style: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; display: inline-block; }
.acc[open] > summary::before { transform: rotate(90deg); }
.acc > summary em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 15px; }
.acc > :not(summary) { margin-left: 14px; margin-right: 14px; }
.acc > .grid, .acc > ul { margin-bottom: 14px; }
.grid--rows { grid-template-columns: 1fr; gap: .7rem; }
.card--row { flex-direction: row; box-shadow: none; }
.card--row .cover { flex: 0 0 200px; aspect-ratio: auto; min-height: 120px; }
.card--row .card__body { padding: .65rem .85rem .75rem; gap: .3rem; min-width: 0; }
.grid--rows > li { min-width: 0; }
.card--row .tags { margin-top: .2rem; }
.card__roles { list-style: none; margin: .1rem 0 0; padding: .4rem .6rem; font-size: .903rem; background: var(--accent-soft); border-radius: var(--r-ctl); position: relative; z-index: 1; }
.card__roles li + li { margin-top: .25rem; padding-top: .25rem; border-top: 1px solid var(--line); }
.role-what { font-weight: 600; }
.card__roles .sub { margin: 0; }
.leads li { font-size: 16px; }
@media (max-width: 600px) {
  .org__head { grid-template-columns: 72px 1fr; gap: 14px; }
  .org__logo { width: 72px; height: 72px; }
  .card--row { flex-direction: column; }
  .card--row .cover { flex-basis: auto; aspect-ratio: 21 / 9; min-height: 0; }
}
/* A sponsor's logo standing in for a campaign picture: shown at its own size, never blown up.
   Placed absolutely and centred with auto margins, so the caps are shares of the cover's own
   height. In the grid flow they resolved against a row the logo itself stretched, which on the
   pop-up's 190px strip put the logo below the box (#398). `.cover.` outweighs the pop-up's
   percentage padding (`.cover--big.cover--fit`). */
.cover.cover--orglogo .cover__img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 60%; max-height: 62%; padding: 0; }
#tip .orgs a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#tip .orgs a:hover { text-decoration-thickness: 2px; }

/* ---------- Org logos in a circle, org tooltip ---------- */
.ologo { display: inline-block; width: 1.55em; height: 1.55em; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 1px; margin-right: .4em; vertical-align: -.45em; flex: none; }
#tip .ologo { border-color: transparent; }
.ologo--lg { width: 34px; height: 34px; margin: 0; padding: 2px; }
.otip { display: grid; gap: .2rem; }
.otip__head { display: flex; gap: .55rem; align-items: center; margin-bottom: .2rem; }
.otip__head b { font-size: 1.116rem; line-height: 1.25; }
.otip__kind { font-size: .744rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.tbl .org-link, .plain .org-link { white-space: normal; }
.ologo--dark { background: #1f2a30; }
.ologo--wide { width: 64px; height: 34px; border-radius: var(--r-ctl); }

/* Topic filter: areas over topics, and the ⓘ that explains them (#37) */
.info { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--muted); background: none; color: var(--muted); font: italic 600 12px/1 Georgia, serif; padding: 0; cursor: pointer; display: inline-grid; place-items: center; flex: none; }
.info:hover, .info:focus-visible { color: var(--accent); border-color: var(--accent); }
.facet .ttree { max-height: 420px; }
.ttree .tarea { padding: 1px 0; }
.ttree .trow .flab > span { font-weight: 500; }
/* Topic rows (Viv-Resource-Library#48): one line each, the chevron in a fixed right-hand column. */
.trow { display: flex; align-items: flex-start; gap: 4px; }
.trow > label { flex: 1; min-width: 0; }
.tx { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; padding: 0; color: var(--muted); border-radius: var(--r-tag); }
button.tx { cursor: pointer; }
button.tx:hover, button.tx:focus-visible { background: var(--accent-soft); color: var(--ink); }
button.tx[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Child topics are indented so they read as children: their checkbox lines up under the parent's label,
   with a faint guide line down the left. `.facet .tkids` so the generic `.facet ul` margin doesn't flatten it. */
.facet .tkids { list-style: none; margin: 2px 28px 6px 6px; padding: 0 0 0 14px; border-left: 1px solid var(--line); max-height: none; }
.tkids label { font-size: 14px; }
#tip-text p { margin: 6px 0; }
.topics-page { max-width: 1000px; }
.topics-page h3 { margin-top: 28px; }
.topics-page .lede { font-size: 18px; }
.tt-wrap { overflow-x: auto; }
.topic-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.topic-table th, .topic-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-top: 1px solid var(--line); }
.topic-table thead th { border-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.topic-table .tt-area th { padding-top: 16px; font-size: 16px; }
.topic-table em { font-style: normal; color: var(--muted); font-size: 13px; }
.topic-table code { font-size: 12px; color: var(--muted); }
.topic-table .muted, .topics-page .muted { color: var(--muted); font-size: 13px; font-weight: 400; }
#tip-text a { color: var(--bg); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
/* Tooltip filter actions: a first choice, a second in outline, and a link to the whole group. */
.tip__only--alt { background: transparent; color: var(--bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg) 45%, transparent); }
.tip__filters { flex-basis: 100%; font: inherit; font-size: .786rem; text-align: left; padding: .1rem 0; border: 0; background: none; color: var(--bg); opacity: .85; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tip__filters:hover { opacity: 1; text-decoration-thickness: 2px; }
.tip__filters[hidden] { display: none; }
.facet > summary.flash { animation: chip-flash 1.6s ease-out 2; border-radius: var(--r-ctl); }
@media (prefers-reduced-motion: reduce) { .facet > summary.flash { animation: none; outline: 2px solid var(--accent); } }
#tip .tip__filters span { display: inline; }
.tip__only { text-align: left; }
#tip:has(.tip__only--alt) { max-width: 330px; }

/* Channel sub-filter (e.g. Social paid > Meta Ad Library) */
.facet li.facet-sub label { padding-left: 22px; font-size: 14px; }
/* Audience holds two trees (#137): Who it's for, Who it's about, each under a small heading. */
.facet__sub { margin: 12px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facet--audience .facet__sub:first-of-type { margin-top: 6px; }

/* Contracts and RFPs (documents/) */
.docs .doc { margin: 6px 0; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); }
.docs .doc summary { cursor: pointer; padding: 8px 12px; list-style-position: outside; }
.docs .doc summary .muted { display: block; font-size: 15px; }
.doc__body { padding: 0 14px 10px; }
.doc__body ul { margin: 0; padding-left: 18px; }
.contracts .tbl { margin-bottom: 4px; }

/* Reuse (#47): the card mark, the campaign-page box and the Reuse page */
.reuse { font-size: 13px; border-radius: var(--r-tag); padding: 1px 7px; border: 1px solid var(--accent); color: var(--accent); }
.reuse-public-domain-or-cc.reuse { background: var(--accent); color: var(--panel); }
.reuse-box .reuse-pill { font-weight: 600; margin-right: .5rem; }
.reuse-box dl.facts { margin: .5rem 0; }
.reuse-table { border-collapse: collapse; margin: 8px 0 16px; }
.reuse-table th, .reuse-table td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.reuse-table td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.reuse-page code { white-space: normal; }
.reuse-caveat { border-left: 3px solid var(--mixed); padding: 6px 12px; margin: 8px 0; background: var(--bg); }
.reuse-caveat p { margin: 4px 0 0; }
.reuse.reuse-public-domain-or-cc[data-tip*="site-wide"] { background: none; color: var(--accent); border-style: dashed; }
.see-all { margin: 10px 0 0; }

/* Topic icons (#60, site/topic-icons.js). On cards the icon carries the tooltip; the word just filters. */
.ticon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; margin-right: .35em; }
.ttag { display: inline-flex; align-items: center; margin-right: .7rem; white-space: nowrap; }
.card__kind .ttag .pick { margin-right: 0; }
.ttag__icon { display: inline-flex; padding: 2px; margin: -2px 0 -2px -2px; border-radius: var(--r-tag); cursor: help; }
.ttag__icon .ticon { width: 15px; height: 15px; margin-right: 0; }
.ttag__icon:hover { background: var(--accent-soft); }
.card__kind .ttag__icon + .pick { margin-left: .3rem; }
.facet--topic label .ticon { color: var(--accent); width: 15px; height: 15px; }
.facet--outcome label .ticon { width: 15px; height: 15px; }
.facet--type label .ticon { color: var(--accent); width: 15px; height: 15px; }
.pick.out .ticon { width: 13px; height: 13px; margin-right: .3em; vertical-align: -2px; }
.tip__title .ticon { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.pill .ticon { width: 13px; height: 13px; margin-right: .3em; vertical-align: -2px; }
.topic-table a .ticon { width: 16px; height: 16px; }
.icons-page h3 { display: flex; align-items: center; margin: 28px 0 8px; color: var(--accent); }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.icell { margin: 0; padding: 12px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); text-align: center; color: var(--accent); }
.icell--alt { opacity: .55; border-style: dashed; }
.icell .ticon--big { width: 48px; height: 48px; margin: 0 0 8px; }
.icell figcaption .ttag { margin: 0; white-space: normal; justify-content: center; text-align: left; font-size: .765rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.icell figcaption .ttag .ticon { width: 15px; height: 15px; }
.icell small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }

/* Kind-of-organisation drawings (org-icons.js): stand in for a logo that's missing or too wide for a circle.
   The tint is the sector, so it never passes for the org's own brand. */
:root { --o-public-bg: #e3ecf6; --o-public: #2d5a8a; --o-nonprofit-bg: #e2f1e6; --o-nonprofit: #2c6a3d; --o-commercial-bg: #f6ead9; --o-commercial: #8a5418; --o-unknown-bg: #ecebe7; --o-unknown: #6a6f73; }
@media (prefers-color-scheme: dark) { :root { --o-public-bg: #22334a; --o-public: #9cc0e6; --o-nonprofit-bg: #213a2a; --o-nonprofit: #93d0a4; --o-commercial-bg: #3d2e1c; --o-commercial: #e3b47a; --o-unknown-bg: #2c3135; --o-unknown: #a9b0b5; } }
.oicon { display: inline-grid; place-items: center; box-sizing: border-box; }
.oicon svg { width: 62%; height: 62%; }
.oicon--public { background: var(--o-public-bg); color: var(--o-public); }
.oicon--nonprofit { background: var(--o-nonprofit-bg); color: var(--o-nonprofit); }
.oicon--commercial { background: var(--o-commercial-bg); color: var(--o-commercial); }
.oicon--unknown { background: var(--o-unknown-bg); color: var(--o-unknown); }
.ologo.oicon { border-color: transparent; padding: 0; }
.oicon--big { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px; }
/* The pop-up's big box keeps a white plate behind a real logo; the sector tint only shows when there's none. */
.org__logo:not(.org__logo--none) { background: #fff; color: inherit; }
/* Agencies table: one circle per row (square logo or drawing), so rows line up. */
.tbl td.tlogo { width: 84px; padding-right: 0; vertical-align: middle; }
.results .tbl th, .results .tbl td { padding: 8px 6px; }
.lplate { width: 84px; height: 39px; box-sizing: border-box; padding: 3px 4px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.lbox { display: grid; place-items: center; }
.lbox .ologo { width: 39px; height: 39px; margin: 0; vertical-align: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Preview bar: only in preview builds (build.mjs, HCF_PREVIEW_BRANCH). Says what the preview is and links to the main site. */
.preview-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 16px; background: #fff3c4; color: #3b2f00; border-bottom: 1px solid #e0c96a; font-size: 15px; line-height: 1.4; }
.preview-bar a { color: #3b2f00; font-weight: 600; }
.preview-bar__main { margin-left: auto; }

/* Day / night toggle, top right of the header. Shows the moon in day mode and the sun in night mode. */
.theme-toggle { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: none; color: var(--top-muted); cursor: pointer; padding: 0; }
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--top-ink); background: var(--top-hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
/* Sign in (account.js, #179): a pill beside the day/night toggle; signed in, it shows the first name. */
.account { flex: none; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--top-muted); font: inherit; font-size: 15.5px; font-weight: 500; cursor: pointer; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account:hover, .account:focus-visible { color: var(--top-ink); background: var(--top-hover); }
.account--in { color: var(--top-ink); }
/* Signed in, the button is the reader: picture or initials, first name, caret (#499). */
.account--in { display: inline-flex; align-items: center; gap: 7px; max-width: 18ch; padding: 0 8px 0 4px; }
.account__name { overflow: hidden; text-overflow: ellipsis; }
.account__caret { width: 15px; height: 15px; flex: none; opacity: .75; transition: transform .15s; }
.account[aria-expanded="true"] { color: var(--top-ink); background: var(--top-hover); }
.account[aria-expanded="true"] .account__caret { transform: rotate(180deg); }
.acct-av { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--cyan, #35c8e0); color: #06232c; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.acct-av--big { width: 40px; height: 40px; font-size: 16px; }

/* The account menu: who you are, your own things in a tinted block, settings, Sign out (#499). */
.acctm { position: fixed; z-index: 60; width: 300px; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 6px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2, 0 12px 28px rgba(0,0,0,.18)); font-size: 15.5px; }
.acctm[hidden] { display: none; }
@media (max-width: 519px) { .acctm { width: auto; } }
.acctm__who { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.acctm__id { display: grid; min-width: 0; line-height: 1.3; }
.acctm__id b, .acctm__id small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctm__id small { font-size: 13.5px; color: var(--muted); }
.acctm__hub { margin: 4px 0; padding: 3px; border-radius: var(--radius); background: var(--bg); }
.acctm__row { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.acctm__row svg { width: 19px; height: 19px; flex: none; margin-top: 1px; color: var(--muted); }
.acctm__row:hover, .acctm__row:focus-visible { background: var(--accent-soft); outline: none; }
.acctm__row:hover svg, .acctm__row:focus-visible svg { color: var(--accent); }
.acctm__hub .acctm__row:hover, .acctm__hub .acctm__row:focus-visible { background: var(--panel); }
.acctm__txt { display: grid; min-width: 0; line-height: 1.3; }
.acctm__txt em { font-style: normal; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 3px; }
.acctm__txt small { font-size: 13.5px; color: var(--muted); }
.acctm__row--warn svg { color: var(--harm); }
.acctm__row--quiet { color: var(--muted); font-size: 14.5px; }
.acctm__row--quiet:hover, .acctm__row--quiet:focus-visible { color: var(--harm); background: var(--bg); }
.acctm__row--quiet:hover svg, .acctm__row--quiet:focus-visible svg { color: var(--harm); }
.acctm__hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--line); }
/* Saved (#236): the reader's own shelf, beside the account button and styled like it. saved.css
   draws the count badge inside it; the link itself belongs to the site. */
.vsav-link { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border-radius: var(--r-ctl); color: var(--top-muted); font-size: 15.5px; font-weight: 500; text-decoration: none; white-space: nowrap; --brand: var(--leaf); --brand-ink: var(--navy); }
.vsav-link:hover, .vsav-link:focus-visible { color: var(--top-ink); background: var(--top-hover); }
.vsav-link--some { color: var(--top-ink); }
/* The sign-in / register dialog account.js builds. */
dialog.acct { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.acct::backdrop { background: rgba(15,20,22,.55); }
.acct__x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer; }
.acct__x:hover { background: var(--accent-soft); color: var(--ink); }
.acct__form { display: flex; flex-direction: column; gap: 12px; padding: 26px 26px 24px; }
.acct__title { margin: 0; font-size: 1.328rem; }
.acct__lead { margin: -4px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.acct__why, .acct__hint, .acct__note, .acct__swap, .acct__who { margin: 0; font-size: 14px; color: var(--muted); }
.acct__who { font-size: 16px; color: var(--ink); line-height: 1.5; }
.acct__note { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); line-height: 1.45; }
.acct__f { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }
.acct__f input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; }
.acct__f input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.acct__check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.4; }
.acct__check input { margin: 2px 0 0; flex: none; }
.acct__go { height: 42px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.acct__go:hover:not(:disabled) { filter: brightness(1.08); }
.acct__go:disabled { opacity: .6; cursor: default; }
/* Google is the first and biggest way in (#361): Google's own light button, on light and dark alike. */
.acct__google { display: flex; align-items: center; justify-content: center; gap: 12px; height: 50px; margin-top: 4px; border: 1px solid #dadce0; border-radius: var(--radius); background: #fff; color: #1f1f1f; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.acct__google svg { width: 20px; height: 20px; }
.acct__google:hover { background: #f8faff; border-color: #c6c9cf; }
.acct__google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct__google[hidden], .acct__or[hidden] { display: none; }
.acct__or { display: flex; align-items: center; gap: 10px; margin: 2px 0; font-size: 13px; color: var(--muted); }
.acct__or::before, .acct__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acct__err { margin: 0; padding: 9px 12px; border-radius: var(--radius); background: var(--accent-soft); color: var(--harm); font-size: 14px; line-height: 1.4; }
.acct__swap button { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.acct__wholine { display: flex; align-items: center; gap: 12px; }
.acct__h { margin: 6px 0 -4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.acct__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.acct__f input[readonly] { background: var(--bg); color: var(--muted); }
.acct__ok { margin: 0; font-size: 14px; color: var(--accent); }
.acct__ok[hidden], .acct__err[hidden] { display: none; }
.acct__danger { margin-top: 4px; }
.acct__danger button { color: var(--harm); }
.acct__pair { display: flex; flex-wrap: wrap; gap: 10px; }
.acct__pair > * { flex: 1 1 auto; padding: 0 16px; white-space: nowrap; }
.acct__alt { height: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.acct__alt:hover { background: var(--bg); }
.acct__go--danger { border-color: var(--harm); background: var(--harm); color: var(--panel); }
.acct__forgot { margin-top: -6px; text-align: right; } /* Forgot password? under the password field (#382) */
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* Campaign links (#82): official site is the main button, producer page second, funders plain. */
.golinks { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 4px 0 18px; }
.go { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; border-radius: var(--r-ctl); padding: 8px 14px; font-size: 16px; line-height: 1.2; border: 1px solid var(--accent); max-width: 100%; overflow-wrap: anywhere; }
.go__arrow { font-size: 14px; opacity: .8; }
.go--main { background: var(--accent); color: var(--panel); font-weight: 600; }
.go--main:hover, .go--main:focus-visible { filter: brightness(1.1); }
.go--edition, .go--producer { background: var(--accent-soft); color: var(--ink); }
.go--edition { padding: 6px 12px; font-size: 15px; }
.go--producer:hover, .go--edition:hover, .go--producer:focus-visible, .go--edition:focus-visible { border-color: var(--ink); }
.go--sponsor { border: 0; padding: 4px 2px; color: var(--accent); text-decoration: underline; }
.go--social { background: transparent; }

/* How far we looked (#393): one line under the links, the full box above Sources. */
.looked-line { margin: -8px 0 16px; font-size: 15px; color: var(--ink); }
.looked-line__jump { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.looked-line__jump:hover, .looked-line__jump:focus-visible { color: var(--ink); }
.looked__steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; padding: 0; counter-reset: step; }
.looked__step { counter-increment: step; font-size: 14px; padding: 5px 10px; border-radius: var(--r-tag); border: 1px dashed var(--line); color: var(--muted); }
.looked__step::before { content: counter(step) ". "; }
.looked__step.is-done { border-style: solid; border-color: var(--accent); color: var(--ink); }
.looked__step.is-here { border-style: solid; border-color: var(--accent); background: var(--accent); color: var(--panel); font-weight: 600; }
.looked h3 { font-size: 16px; margin: 14px 0 6px; }
.looked__list { margin: 0 0 8px; padding-left: 20px; }
.looked__list li { margin: 4px 0; }

/* Resources from the campaign: its child items. */
.res-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.res { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--panel); display: flex; flex-direction: column; gap: 4px; }
.res__type { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.res__title { font-weight: 600; text-decoration: none; }
.res__title:hover { text-decoration: underline; }
.res__desc { margin: 0; font-size: 15px; color: var(--muted); }
.res__parts summary { cursor: pointer; font-size: 14px; color: var(--accent); }
.res__sub { margin: 6px 0 0; padding-left: 14px; font-size: 15px; list-style: none; border-left: 1px solid var(--line); }
.res__sub li + li { margin-top: 2px; }
/* A row inside a collection, at any depth. The left rule makes the nesting readable
   without indenting the text off the card (#277). */
.res__row { padding-left: 8px; }
.res__row > .res__type { font-size: 12px; text-transform: none; letter-spacing: 0; }
.res__row > .res__desc { font-size: 14px; margin-top: 1px; }
.res__row > .res__parts { margin-top: 2px; }
/* A collection card can get long: keep it scrollable rather than pushing the page down. */
.res--deep .res__sub { max-height: 420px; overflow-y: auto; }

/* Organisation filter (#87): kind chips, name search, every name A–Z in one scroll box */
.facet--org .okinds { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 6px; }
.facet--org .okind { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: var(--r-ctl); padding: 2px 9px; font-size: 13px; cursor: pointer; }
.facet--org .okind em { font-size: 12px; }
.facet--org .okind[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.facet--org .okind[aria-pressed="true"] em { color: inherit; }
.facets .facet--org input.oq { width: 100%; box-sizing: border-box; margin: 0 0 6px; }
.facet--org .opinned { max-height: none; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.facet--org .ojump { display: flex; flex-wrap: wrap; gap: 1px; margin-bottom: 4px; }
.facet--org .ojump button { border: 0; background: none; color: var(--accent); font: 600 11px/1 system-ui, sans-serif; padding: 3px 3px; cursor: pointer; border-radius: var(--r-tag); }
.facet--org .ojump button:hover, .facet--org .ojump button:focus-visible { background: var(--accent-soft); }
.facet--org .ojump button:disabled { color: var(--muted); opacity: .4; cursor: default; background: none; }
.facet--org .olist { max-height: 340px; overflow: auto; position: relative; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 0 6px 4px; }
.facet--org .olist ul { max-height: none; overflow: visible; margin: 0; }
.facet--org .oletter h4 { position: sticky; top: 0; margin: 0; padding: 4px 0 2px; background: var(--panel); color: var(--muted); font-size: 12px; letter-spacing: .06em; border-bottom: 1px solid var(--line); z-index: 1; }
.facet--org .onone { font-size: 14px; margin: 8px 0; }
.facet--org .ocount { font-size: 13px; margin: 6px 0 0; }
.facet--org .ologo { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; }
@media (max-width: 760px) { .facet--org .ojump button { font-size: 15px; padding: 6px 5px; } }
/* "Audiences in these results · 5" rows above the list (#80, Viv-Resource-Library result-breakdown pattern).
   Quiet by default: they repeat the sidebar, so they read as a hint, not a second filter panel. */
.bds { margin: -4px 0 12px; }
.bd > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; cursor: pointer; padding: 4px 0; font-size: 13.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.bd > summary::-webkit-details-marker { display: none; }
.bd > summary:hover { color: var(--ink); }
.bd > summary .chev { width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent-soft); transform: rotate(-90deg); }
.bd[open] > summary .chev { transform: none; }
.bd__n { font-weight: 500; }
.bd__hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; color: var(--accent); }
.bd__hint::before { content: "·"; margin-right: 6px; color: var(--muted); }
.bd__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px 26px; }
.bd__chip { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: var(--r-ctl); padding: 2px 10px; cursor: pointer; }
.bd__chip b { font-weight: 600; color: var(--muted); margin-left: 2px; }
.bd__chip:hover, .bd__chip:focus-visible { border-color: var(--accent); }
.bd__chip--out { border-color: var(--accent); background: var(--accent-soft); }
.bd__note { font-size: 13px; color: var(--accent); }
/* Audiences in these results (#137): one block per tree, groups first, a group's values on a line below. */
.bd__body { padding: 2px 0 8px 26px; display: grid; gap: 10px; }
.bd__ax { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bd__body .bd__chips { padding: 0; }
.bd__grp { display: inline-flex; align-items: stretch; }
.bd__grp .bd__chip { border-radius: var(--r-ctl) 0 0 var(--r-ctl); border-right: 0; }
.bd__open { font: inherit; border: 1px solid var(--line); background: var(--panel); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; padding: 0 7px 0 5px; cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); }
.bd__open .chev { width: 14px; height: 14px; }
.bd__open[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.bd__open[aria-expanded="true"] .chev { transform: rotate(180deg); }
.bd__grp:has(.bd__open[aria-expanded="true"]) .bd__chip { border-color: var(--accent); }
.bd__open:hover, .bd__open:focus-visible { border-color: var(--accent); }
.bd__kids { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 0 2px 12px; border-left: 2px solid var(--accent-soft); }
.bd__kids[hidden] { display: none; }
.bd__in { font-size: 13.5px; color: var(--muted); margin-right: 2px; }
.bd__chip--sub { font-size: 13.5px; border-style: dashed; }
@media (max-width: 800px) { .bd__chips, .bd__body { padding-left: 0; } .bd__hint { flex-basis: 100%; padding-left: 26px; } .bd__hint::before { display: none; } }

/* Resources tab (#92): the two doors (Help yourself / Help others), then the usual filters and cards. */
.rx-intro h2 { margin: 0 0 4px; font-size: 1.594rem; }
.rx-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 22px; }
.rx-door { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 14px; align-items: center; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.rx-door:hover, .rx-door:focus-visible { border-color: var(--accent); }
.rx-door--on { border: 2px solid var(--accent); background: var(--accent-soft); }
.rx-door__icon { grid-row: 1 / 3; width: 52px; height: 52px; }
.rx-door__icon svg { width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rx-door__name { font-size: 1.275rem; font-weight: 700; }
.rx-door__name em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 1.009rem; }
.rx-door__blurb { color: var(--muted); font-size: .956rem; }
.rx-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--accent-soft); }
.rx-card__foot { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; margin-top: auto; font-size: .829rem; }
.rx-helps { padding: 1px 8px; border-radius: var(--r-tag); background: var(--accent-soft); }
.rx-case { position: relative; z-index: 1; }
.rx-lang, .rx-pick { color: var(--muted); }
.rx-pick { font-weight: 400; letter-spacing: 0; text-transform: none; margin-left: .4rem; }
/* Digital Public Good badge (#505): a quiet outlined tag, the same size as the kind line. */
.rx-dpg { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border: 1px solid currentColor; border-radius: 999px; color: var(--accent); font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: none; line-height: 1.5; }
.rx-dpg { cursor: help; }
/* Still current? (#521): only what is not current gets a tag, in the kind line's size. */
.rx-cur { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 999px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.5; cursor: help; background: var(--accent-soft); color: var(--muted); }
.rx-cur--superseded { background: #fdecc8; color: #6b4a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rx-cur--superseded { background: #4a3a10; color: #f5dfa6; } }
:root[data-theme="dark"] .rx-cur--superseded { background: #4a3a10; color: #f5dfa6; }
.rx-dpg:hover, .rx-dpg:focus-visible { background: var(--accent-soft); }
@media (max-width: 600px) { .rx-door { padding: 12px 14px; } .rx-door__icon { width: 40px; height: 40px; } }
.rx-links { position: relative; z-index: 1; margin: 0; font-size: .829rem; color: var(--muted); }
.rx-buy__note { display: block; font-size: .75rem; }
.facet--org .okind:disabled { opacity: .45; cursor: default; }

.rx-credit { position: relative; z-index: 1; font-size: .829rem; color: var(--muted); }
.rx-credit summary { cursor: pointer; width: fit-content; }
.rx-credit p { margin: 4px 0 0; overflow-wrap: anywhere; }
/* Journals (#191): how open each one is, and one card per owner listing its journals. */
.rx-access { padding: 1px 8px; border-radius: var(--r-tag); border: 1px solid var(--line, #d0d4da); color: var(--muted); font-size: .797rem; white-space: nowrap; }
.rx-access--open { border-color: #1a7f4b; background: #e6f4ec; color: #145c37; font-weight: 600; }
.rx-jlist { position: relative; z-index: 1; margin: .2rem 0 0; font-size: .903rem; }
.rx-jlist ul, ul.rx-jlist { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .35rem; }
.rx-jlist summary { cursor: pointer; color: var(--muted); }
.rx-jlist li .rx-access { margin-left: .3rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rx-access--open { background: #143d29; color: #a8e3c1; border-color: #3fae74; } }
:root[data-theme="dark"] .rx-access--open { background: #143d29; color: #a8e3c1; border-color: #3fae74; }

/* ---------- Journals tab (#191): a list grouped by owner, three badges per journal ---------- */
.jx-owner { margin: 0 0 1.4rem; }
.jx-owner h3 { font-size: 1.116rem; margin: 0 0 .4rem; display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.jx-owner h3 .muted { font-size: .871rem; font-weight: 400; }
.jx-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line, #d0d4da); }
.jx-row { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line, #d0d4da); }
.jx-row__main { flex: 1 1 320px; min-width: 0; }
.jx-row__title { font-weight: 600; }
.jx-row__meta { font-size: .871rem; color: var(--muted); margin-top: .1rem; }
.jx-row__badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.jx-pubmed, .jx-fee { padding: 1px 8px; border-radius: var(--r-tag); border: 1px solid var(--line, #d0d4da); color: var(--muted); font-size: .797rem; white-space: nowrap; }
.jx-pubmed--medline, .jx-pubmed--pubmed { border-color: #2f5fa7; color: #24497f; }
.jx-pubmed--none, .jx-pubmed--partial { border-style: dashed; }
.jx-toggle { margin-left: auto; font-size: .903rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jx-pubmed--medline, :root:not([data-theme="light"]) .jx-pubmed--pubmed { border-color: #7fa6e0; color: #b9cff0; } }
:root[data-theme="dark"] .jx-pubmed--medline, :root[data-theme="dark"] .jx-pubmed--pubmed { border-color: #7fa6e0; color: #b9cff0; }

/* ---------- "Who do you want to help?" chooser (#123) ---------- */
.ch-open { font: inherit; font-size: 14px; border: 1px solid var(--accent); background: var(--panel); color: var(--accent); border-radius: var(--r-ctl); padding: 2px 12px; cursor: pointer; }
.ch-open:hover, .ch-open:focus-visible { background: var(--accent); color: var(--panel); }
dialog#rx-chooser { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
dialog#rx-chooser[open] { display: flex; flex-direction: column; }
/* The pane is the only part that scrolls. .ch-tabs scrolls sideways, which let flex squash it to
   nothing under a tall pane: the tab labels showed cut in half with the underline through them. */
.ch-head, .ch-tabs, .ch-foot { flex: none; }
.ch-thinking { opacity: .75; }
dialog#rx-chooser::backdrop { background: rgba(15,20,22,.55); }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 8px; }
.ch-head h2 { margin: 0; font-size: 1.434rem; }
.ch-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ch-tabs button { flex: none; font: inherit; font-size: 15px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 8px 10px; cursor: pointer; }
.ch-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.ch-tabs button[data-tab="self"] { margin-left: auto; }
.ch-pane { padding: 16px 24px 20px; overflow: auto; flex: 1; }
.ch-foot { display: flex; align-items: center; gap: 16px; padding: 10px 24px 14px; border-top: 1px solid var(--line); }
.ch-peek { flex: 1; margin: 0; min-height: 2.6em; font-size: 14px; line-height: 1.3; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-peek b { color: var(--ink); font-weight: 600; }
.ch-peek i { font-style: normal; color: var(--ink); }
.ch-all { flex: none; }
.ch-all { font: inherit; font-size: 15px; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
.ch-lede { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; font-weight: 600; }
.ch-note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.ch-or { color: var(--muted); font-size: 14px; margin: 18px 0 8px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ch-pick { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; text-align: left; font: inherit; font-size: 16px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 9px 12px; cursor: pointer; }
.ch-pick:hover, .ch-pick:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.ch-pick em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: 14px; color: var(--muted); }
.ch-pick__sub { grid-column: 1; font-size: 13px; color: var(--muted); }
.ch-ask { display: block; }
.ch-ask span { display: block; font-weight: 600; margin-bottom: 6px; }
.ch-ask input { width: 100%; font-size: 17px; padding: 11px 12px; }
#ch-hits:not(:empty) { margin-top: 12px; }
.ch-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ch-door { text-align: left; font: inherit; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.ch-door span { font-size: 14px; color: var(--muted); }
.ch-door:hover, .ch-door:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.ch-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-round); overflow: hidden; font-weight: 400; }
.ch-toggle button { font: inherit; font-size: 14px; border: 0; background: var(--panel); color: var(--muted); padding: 3px 12px; cursor: pointer; }
.ch-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--panel); }
/* Circles of influence: each ring nests the next, "You" in the middle. Every ring carries its
   own hue (#303), cool on the outside where the rules are made, warm on the inside where the
   people are, so four nested boxes read as four places rather than one wash of mint. The hue
   sits in the edge, the heading rule and the pill; the fill stays a shallow tint so --ink keeps
   its contrast. Rings are addressed by their own class, not by nesting depth, so inserting or
   dropping a level can't reshuffle the colours. */
.ch-ring { --ring: var(--accent); }
.ch-ring--public-policy { --ring: #4a5a9e; }
.ch-ring--community { --ring: #0f6e6a; }
.ch-ring--institutional { --ring: #8a5a12; }
.ch-ring--interpersonal { --ring: #a2435c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ch-ring--public-policy { --ring: #97a7ea; }
  :root:not([data-theme="light"]) .ch-ring--community { --ring: #5cc4bc; }
  :root:not([data-theme="light"]) .ch-ring--institutional { --ring: #d9a441; }
  :root:not([data-theme="light"]) .ch-ring--interpersonal { --ring: #e88da2; }
}
:root[data-theme="dark"] .ch-ring--public-policy { --ring: #97a7ea; }
:root[data-theme="dark"] .ch-ring--community { --ring: #5cc4bc; }
:root[data-theme="dark"] .ch-ring--institutional { --ring: #d9a441; }
:root[data-theme="dark"] .ch-ring--interpersonal { --ring: #e88da2; }
.ch-ring { border: 1px solid color-mix(in srgb, var(--ring) 40%, var(--line)); border-radius: 22px; padding: 10px 12px 12px; background: color-mix(in srgb, var(--ring) 7%, var(--panel)); }
.ch-ring .ch-ring { margin-top: 10px; }
.ch-ring__head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid color-mix(in srgb, var(--ring) 55%, transparent); }
.ch-ring__head b { color: var(--ring); }
.ch-ring__head span { font-size: 14px; color: var(--muted); }
.ch-ring__head[title] b { cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.ch-ring__all { margin-left: auto; font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--ring); background: var(--panel); color: var(--ring); border-radius: var(--r-round); padding: 2px 10px; cursor: pointer; }
.ch-ring__all:hover, .ch-ring__all:focus-visible { background: var(--ring); color: var(--panel); }
.ch-ring__eg { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.ch-ring__eg li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 0; }
.ch-ring__eg li::before { content: "↗ "; color: color-mix(in srgb, var(--ring) 70%, var(--muted)); }
.ch-ring__eg a { color: var(--ink); text-decoration: none; }
.ch-ring__eg a:hover { color: var(--ring); text-decoration: underline; }
.ch-ring__by { font-size: 13px; color: var(--muted); align-self: center; margin-right: 2px; }
.ch-ring__picks { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-ring__picks .ch-pick { font-size: 15px; padding: 5px 10px; grid-template-columns: auto auto; }
.ch-ring__picks .ch-pick em { grid-row: 1; }
.ch-ring__picks .ch-pick:hover, .ch-ring__picks .ch-pick:focus-visible { border-color: var(--ring); background: color-mix(in srgb, var(--ring) 14%, var(--panel)); }
.ch-ring--you { display: flex; flex-direction: column; align-items: center; width: 150px; margin: 12px auto 2px; font: inherit; color: var(--panel); background: var(--accent) !important; border: 0; border-radius: var(--r-round); padding: 12px; cursor: pointer; }
.ch-ring--you span { font-size: 13px; opacity: .9; }
.ch-crisis { border: 1px solid var(--harm); border-left-width: 5px; border-radius: var(--r-ctl); padding: 10px 14px; margin: 0 0 16px; font-size: 15px; background: color-mix(in srgb, var(--harm) 7%, var(--panel)); }
.ch-crisis strong { display: block; margin-bottom: 2px; }
.ch-crisis a { color: inherit; font-weight: 700; }
/* The off-ramp (#303): three levels of signal in the pop-up, and they don't compete. Red is the
   crisis box, ochre is "this question isn't ours, here's who answers it", teal is the library. */
.ch-off { --off: var(--mixed); border: 1px solid color-mix(in srgb, var(--off) 45%, var(--line)); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0 0 18px; background: color-mix(in srgb, var(--off) 6%, var(--panel)); }
.ch-off--foot { margin: 20px 0 4px; }
.ch-off--ask { margin: 14px 0 0; }
.ch-off__title { margin: 0 0 4px; font-size: 16px; color: var(--off); }
.ch-off__body { margin: 0 0 12px; font-size: 15px; }
.ch-off__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ch-off__card { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 9px 11px; background: var(--panel); }
.ch-off__card b { font-size: 15px; }
.ch-off__card b a { color: inherit; text-decoration: none; }
.ch-off__card b a:hover { text-decoration: underline; }
.ch-off__num { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.ch-off__num a { color: var(--off); text-decoration: none; }
.ch-off__num a:hover { text-decoration: underline; }
.ch-off__alt { font-size: 14px; }
.ch-off__what, .ch-off__meta { color: var(--muted); font-size: 13px; }
.ch-off__what { margin-top: 2px; }
.ch-off__state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.ch-off__state select { font: inherit; font-weight: 400; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 5px 8px; }
.ch-off__local:not(:empty) { margin-top: 8px; }
.ch-off__links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0 0; font-size: 14px; }
.ch-off__links span { color: var(--muted); }
.ch-off__links a { color: var(--off); }
@media (max-width: 600px) {
  dialog#rx-chooser { inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .ch-head, .ch-pane, .ch-foot { padding-left: 16px; padding-right: 16px; }
  .ch-tabs { padding: 0 12px; }
  .ch-tabs button[data-tab="self"] { margin-left: 0; }
  .ch-ring { padding: 8px 8px 10px; border-radius: 16px; }
  .ch-peek { display: none; }
  .ch-all { margin-left: auto; }
}

/* Where (#90): an outline on the card's place chip, a locator map in the pop-up and the chip's tooltip.
   The grey world is one shared <use> shape, so its colours come in as custom properties. */
.pick.cty { display: inline-flex; align-items: center; gap: .3em; }
.geo-outline { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; opacity: .7; }
.geo-map { --geo-sea: color-mix(in srgb, var(--accent-soft) 60%, var(--panel)); --geo-land: color-mix(in srgb, var(--muted) 30%, var(--panel)); --geo-edge: var(--panel); --geo-hl: var(--accent);
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: var(--r-ctl); background: var(--geo-sea); }
#tip .geo-map { --geo-sea: color-mix(in srgb, var(--bg) 10%, var(--ink)); --geo-land: color-mix(in srgb, var(--bg) 30%, var(--ink)); --geo-edge: var(--ink); --geo-hl: var(--bg);
  width: 200px; margin: .2rem 0 .35rem; }
.geo-map__bg, .geo-map__hl { stroke: var(--geo-edge); stroke-width: .6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.geo-map__bg { fill: var(--geo-land); }
.geo-map__hl { fill: var(--geo-hl); }
.geo-map__ring { fill: none; stroke: var(--geo-hl); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.geo-places { display: flex; flex-wrap: wrap; gap: 10px; }
.geo-place { width: 260px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* ---------- More filters: Topic, Audience and Type show; the rest open from here ---------- */
.ficon { width: 18px; height: 18px; flex: none; vertical-align: -4px; margin-right: 6px; }
.facet--more > summary { color: var(--accent); }
.facet--more[open] > summary { margin-bottom: 2px; }
.facet--more > .facet:first-of-type { margin-top: 4px; }

/* ---------- Phone filter drawer (Viv-Resource-Library docs/patterns/mobile-filter-drawer.md) ---------- */
.fbar, .drawer__top, .drawer__foot { display: none; }
@media (max-width: 800px) {
  /* Phones: the nav sits behind the Menu button and opens as one sheet. Each group is an accordion
     row that opens on a tap (one at a time, the current page's group open first), and lists only the
     pages themselves: the shortcut columns stay on wider screens. */
  .menu-btn { display: inline-flex; order: 1; margin-left: auto; }
  .top nav { display: none; order: 20; flex: 1 1 100%; flex-direction: column; gap: 0; max-height: calc(100vh - 140px); overflow-y: auto; border-top: 1px solid var(--top-line); padding-top: 6px; }
  .top nav.open { display: flex; }
  /* The sheet opens inside the navy band, so its words read from the band's colours. */
  .top nav { --ink: var(--top-ink); --muted: var(--top-muted); --bg: var(--top-hover); --accent: var(--cyan); --accent-soft: var(--top-hover); }
  .top nav > .top-link, .menu { border-bottom: 1px solid var(--top-line); }
  .top nav > .top-link { min-height: 48px; padding: 0 4px; font-size: 17px; color: var(--ink); box-shadow: none; border-radius: 0; }
  .menu__btn { width: 100%; min-height: 48px; justify-content: space-between; padding: 0 8px 0 4px; font-size: 17px; font-weight: 600; color: var(--ink); border-radius: 0; box-shadow: none !important; background: none !important; }
  .menu__btn.on { color: var(--accent); }
  .menu__btn::after { width: 8px; height: 8px; opacity: .8; }
  .menu--link .menu__btn::after { transform: rotate(-45deg); } /* one page only: the row goes straight there */
  .menu__panel { display: none; position: static; width: auto; max-width: none; max-height: none; padding: 0 0 8px 12px; border: 0; box-shadow: none; background: none; animation: none; }
  .menu.open .menu__panel { display: block; animation: none; }
  .menu__panel::before, .mega__extra { display: none; }
  .mega__main { width: auto; }
  .mega__main a { padding: 8px 6px; }
  /* Filter · Sort · Reset all, three equal buttons (EAD's bar). Sort is a native picker laid over its button. */
  .fbar { grid-area: bar; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fbar__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-height: 44px; padding: 0 8px; font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); text-decoration: none; cursor: pointer; }
  .fbar__btn b { margin-left: 4px; color: var(--accent); }
  .fbar__sort select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .fbar__sort:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
  .fbar__reset[aria-disabled="true"] { color: var(--muted); cursor: default; }
  /* Sort and Clear all live in the drawer and the bar; the toolbar keeps the count and the chips. */
  .toolbar #sort, .toolbar #rsort, .toolbar .clear { display: none; }
  .facets { display: none; }
  .facets.is-open { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 1100; max-height: none; padding: 0; background: var(--bg); }
  .facets.is-open .drawer__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 4px 0 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
  .drawer__top h2 { margin: 0; font-size: 18px; }
  .drawer__clear { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
  .drawer__close { justify-self: end; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font-size: 21px; cursor: pointer; }
  .drawer__body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 12px 16px 24px; }
  .facets.is-open .facet ul { max-height: none; }
  .facets.is-open .facet > summary { min-height: 44px; }
  .facets.is-open .facet label { min-height: 40px; align-items: center; }
  .facets.is-open .tx { width: 40px; height: 40px; }
  .facets.is-open .drawer__foot { display: block; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
  .drawer__show { width: 100%; min-height: 48px; font: inherit; font-weight: 700; border: 0; border-radius: var(--r-ctl); background: var(--accent); color: var(--panel); cursor: pointer; }
  html.drawer-open { overflow: hidden; }
}

/* Research tab (#130): role doors, takeaway, who should read it. */
.sr-doors { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.sr-door { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .978rem; }
.sr-door { display: inline-flex; align-items: center; gap: .4em; }
.sr-door .ticon { width: 18px; height: 18px; margin: 0; color: var(--accent); }
.sr-door em { font-style: normal; font-weight: 400; color: var(--muted); }
.sr-door:hover, .sr-door:focus-visible { border-color: var(--accent); }
.sr-door--on { border: 2px solid var(--accent); background: var(--accent-soft); }
.sr-note { color: var(--muted); font-size: .903rem; margin: 6px 0 18px; }
.sr-takeaway { font-size: 1.009rem; margin: 6px 0; }
.sr-about, .sr-readers { font-size: .871rem; margin: 4px 0; color: var(--muted); }
.sr-about b, .sr-readers b { color: var(--ink); font-weight: 600; }
.sr-for { margin: 4px 0 8px; }
.sr-role { display: inline-block; font-size: .85rem; padding: 2px 8px; border-radius: var(--r-ctl); background: var(--accent-soft); margin: 2px 4px 2px 0; }
.sr-dots { letter-spacing: 1px; color: var(--accent); }
.sr-result { margin-left: 6px; padding: 0 6px; border-radius: var(--r-tag); font-size: .797rem; border: 1px solid var(--line); }
.sr-result--positive { border-color: var(--accent); }
.sr-result--negative { border-color: #b3261e; }
.sr-more { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .956rem; }
.sr-more button { min-height: 44px; padding: 0 18px; font: inherit; font-weight: 600; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; }
.sr-more button:hover { border-color: var(--accent); }
@media (max-width: 800px) { .sr-doors { gap: 6px; } .sr-door { padding: 6px 11px; font-size: .892rem; } }

/* Research tab: "More filters" holds the less-used groups; bands head each rating when sorted by role (#130). */
.sr-morefilters > summary .facet__name { color: var(--muted); }
.sr-morefilters > .facet { margin-left: 4px; }
.sr-morefilters > .facet:first-of-type { margin-top: 6px; }
.grid > .sr-band { grid-column: 1 / -1; display: block; margin: .5rem 0 -.25rem; }
.grid > .sr-band:first-child { margin-top: 0; }
.sr-band h3 { margin: 0; font-size: 1.116rem; }
.sr-band h3 em { font-style: normal; color: var(--muted); font-weight: 400; }
.sr-band p { margin: .15rem 0 0; color: var(--muted); font-size: .956rem; }
/* Links that leave the site carry an arrow; leave.js asks before they open. */
.ext { font-weight: 400; color: var(--muted); white-space: nowrap; }
dialog#leave { width: min(440px, calc(100vw - 32px)); padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog#leave::backdrop { background: rgba(15,20,22,.55); }
dialog#leave h2 { margin: 0 0 .5rem; font-size: 1.275rem; }
dialog#leave p { margin: 0 0 .75rem; }
dialog#leave .leave__host { font-weight: 600; overflow-wrap: anywhere; }
dialog#leave label { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .956rem; margin-bottom: 1rem; }
dialog#leave .leave__btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog#leave .leave__btns > * { padding: 9px 16px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; }
dialog#leave .leave__go { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
/* About section (#147): sub-pages, the filter tabs, and the feed examples. */
.about-nav, .about-tabs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 12px; max-width: 1000px; }
.about-nav { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.about-nav a, .about-tabs a { text-decoration: none; color: var(--ink); padding: 4px 10px; border-radius: var(--r-ctl); border: 1px solid transparent; font-size: 15px; }
.about-nav a { font-weight: 600; }
.about-tabs a { border-color: var(--line); background: var(--panel); font-size: 14px; }
.about-nav a:hover, .about-tabs a:hover { border-color: var(--accent); }
.about-nav a[aria-current], .about-tabs a[aria-current] { background: var(--accent-soft); border-color: var(--accent); }
.about-table code { font-size: 12px; color: var(--muted); }
.about-table td.muted { font-size: 14px; }
.about-how { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; margin: 10px 0; }
.about-draft { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-ctl); padding: 8px 12px; }
.about-counts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-counts a { display: block; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-ctl); padding: 8px 12px; text-decoration: none; color: var(--ink); }
.about-counts b { font-size: 21px; display: block; }
.about-code { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; overflow-x: auto; font-size: 13px; line-height: 1.45; max-width: 100%; }
.about-page h4 { margin: 18px 0 4px; }
@media (max-width: 600px) { .about-table { display: block; overflow-x: auto; } }

/* "Who you are" / "Who you're helping" trees in the chooser (#123): closed accordions, one per row */
.ch-tree { display: grid; gap: 8px; margin: 0 0 14px; }
.ch-acc { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); }
.ch-acc[open] { border-color: var(--accent); }
.ch-acc > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.ch-acc > summary::-webkit-details-marker { display: none; }
.ch-acc > summary::after { content: ""; grid-row: 1 / span 2; grid-column: 3; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 4px 4px; transition: transform .15s; }
.ch-acc[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.ch-acc > summary:hover .ch-acc__name, .ch-acc > summary:focus-visible .ch-acc__name { color: var(--accent); }
.ch-acc__name { font-size: 16px; font-weight: 600; }
.ch-acc__sub { grid-column: 1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-acc > summary em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: 14px; color: var(--muted); }
.ch-acc__body { padding: 2px 12px 12px; }
.ch-acc__body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ch-acc__body li > ul { margin: 6px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.ch-acc__body .ch-pick { width: 100%; }
.ch-tree__helps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 5px 0 0 12px; }
.ch-tree__helps > span { font-size: 13px; color: var(--muted); margin-right: 2px; }
.ch-chip { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); padding: 2px 10px; cursor: pointer; }
.ch-chip em { font-style: normal; color: var(--muted); }
.ch-chip:hover, .ch-chip:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.ch-ring__more { font: inherit; font-size: 14px; border: 0; background: none; color: var(--ring); padding: 5px 4px; cursor: pointer; }
.ch-ring__more:hover, .ch-ring__more:focus-visible { text-decoration: underline; }

/* Site search (#152): one box in the header, results across every kind of record. */
/* Search, Sign in and the day/night toggle are one group: when the header runs out of room they wrap together. */
.top__tools { display: flex; align-items: center; gap: 4px; margin-left: auto; min-width: 0; }
.site-search { display: flex; align-items: center; border: 1px solid var(--top-line); border-radius: var(--r-ctl); background: var(--top-hover); padding: 0 4px 0 12px; margin-right: 8px; min-width: 0; flex: 1 1 180px; max-width: 280px; }
.site-search:focus-within { border-color: var(--cyan); background: rgba(255,255,255,.16); }
.site-search input { border: 0; background: none; color: var(--top-ink); font: inherit; font-size: 15.5px; padding: 6px 0; min-width: 0; flex: 1; outline: none; }
.site-search input::placeholder { color: var(--top-muted); opacity: 1; }
.site-search button { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--top-muted); cursor: pointer; border-radius: var(--r-ctl); padding: 0; }
.site-search button:hover, .site-search button:focus-visible { color: var(--top-ink); }
.site-search button svg { width: 18px; height: 18px; }
.sx { max-width: 860px; }
.sx h2 { margin: 0 0 12px; }
.sx__kinds { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.sx__list { list-style: none; padding: 0; margin: 0; }
.sx__hit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sx__kind { display: inline-block; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 8px; }
.sx__title { font-weight: 600; font-size: 1.116rem; }
.sx__blurb { margin: 4px 0; }
.sx__meta { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sx__engine { margin-top: 20px; }
/* Send the search to the question box (#218): a band above the results. */
.sx__ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); }
.sx__ask-why { flex: 1 1 220px; }
.sx__ask--list { margin: 4px 0 14px; padding: 8px 12px; font-size: 15px; }
.sx__ask--list .sx__ask-go { padding: 5px 12px; }
.sx__ask-go { display: inline-block; max-width: 100%; padding: 7px 14px; border-radius: var(--r-ctl); background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx__ask-go:hover, .sx__ask-go:focus-visible { filter: brightness(1.1); text-decoration: none; }
/* Header at mid and phone widths (#152): the links take their own row, scrolling sideways if they
   must, instead of the header wrapping item by item into 3-4 rows. Phones: name / search / links. */
@media (max-width: 1200px) {
  .top { gap: 10px 16px; }
}
@media (max-width: 800px) {
  .top__tools { margin-left: 0; }
}
@media (max-width: 660px) {
  .top__tools { order: 5; flex: 1 1 100%; }
  .site-search { max-width: none; }
  /* The home page hides the header search (it has its own), so Sign in and the toggle sit beside the logo. */
  body.is-home:has(.home__search) .top__tools { order: 0; flex: 0 1 auto; }
}
@media (max-width: 380px) {
  .top { gap: 10px; }
  .draft { font-size: 12px; letter-spacing: .02em; padding: 1px 4px; }
}
.sx__kinds .chip { white-space: nowrap; }
/* The two ways to browse a chooser tab, as a choice at the top (#123) */
.ch-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 14px; }
.ch-switch button { display: grid; gap: 2px; text-align: left; font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); cursor: pointer; }
.ch-switch button b { font-size: 16px; }
.ch-switch button span { font-size: 13px; color: var(--muted); }
.ch-switch button:hover, .ch-switch button:focus-visible { border-color: var(--accent); }
.ch-switch button[aria-pressed="true"] { border: 2px solid var(--accent); padding: 9px 13px; background: var(--accent-soft); }
.ch-switch button[aria-pressed="true"] b { color: var(--accent); }
.ch-switch { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.ch-research { display: block; margin: 8px 0 0 12px; font: inherit; font-size: 14px; border: 0; background: none; color: var(--accent); padding: 2px 0; cursor: pointer; }
.ch-research:hover, .ch-research:focus-visible { text-decoration: underline; }
@media (max-width: 600px) { .ch-switch button { padding: 8px 10px; } .ch-switch button[aria-pressed="true"] { padding: 7px 9px; } .ch-switch button span { display: none; } }

.doc-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.doc-filter .chip { text-decoration: none; }

/* Contracts page (#165): one card per document. Campaign first, then buyer → vendor, the amount on the right,
   and which contract terms the document spells out. */
.dcs { display: flex; flex-direction: column; gap: 12px; }
.dc { display: grid; grid-template-columns: 1fr 190px; grid-template-areas: "main side" "more more"; gap: 4px 20px; padding: 14px 16px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dc:hover { border-color: var(--accent); }
.dc__main { grid-area: main; min-width: 0; }
.dc__side { grid-area: side; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.dc__kind { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.dc__type { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-tag); border: 1px solid var(--line); color: var(--ink); }
.dc__type--signed { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.dc__type--choosing { background: var(--accent-soft); border-color: var(--accent-soft); }
.dc__topic { font-size: 13px; padding: 0 7px; border-radius: var(--r-tag); background: var(--bg); border: 1px solid var(--line); }
.dc__title { margin: 0; font-size: 1.19rem; line-height: 1.3; }
.dc__title a { color: inherit; text-decoration: none; }
.dc__title a:hover, .dc__title a:focus-visible { color: var(--accent); text-decoration: underline; }
.dc__lead { vertical-align: middle; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: var(--r-tag); border: 1px dashed var(--muted); color: var(--muted); cursor: help; }
.dc__who { margin: 4px 0 6px; font-size: 16px; }
.dc__buyer { font-weight: 600; }
.dc__arrow { color: var(--muted); padding: 0 2px; }
.dc__vendor a { color: inherit; }
.dc__sum { margin: 0 0 8px; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc__terms { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.dc__terms li { font-size: 13px; padding: 1px 8px; border-radius: var(--r-tag); color: var(--muted); border: 1px solid transparent; }
.dc__terms li.on { color: var(--ink); background: var(--accent-soft); border-color: var(--accent-soft); font-weight: 600; }
.dc__amt { margin: 0; font-size: 1.381rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dc__amt--n { font-size: 1.116rem; }
.dc__amtk { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.dc__open { font-size: 15px; font-weight: 600; }
.dc__amt + .dc__open { margin-top: 6px; }
.dc__unchecked { margin: 6px 0 0; font-size: 13px; color: var(--mixed); }
.dc__more { grid-area: more; border-top: 1px solid var(--line); margin-top: 4px; }
.dc__more > summary { cursor: pointer; padding: 6px 0; font-size: 14px; color: var(--accent); }
.dc__more .doc__body { padding: 0 0 8px; }
.dc > .cact { grid-column: 1 / -1; margin-bottom: 8px; }
.doc__body > .cact { margin-top: 10px; }
/* The card bar at the head of a page (a nonprofit, a blog post: #400), as it sits in a pop-up's top strip. */
.page-acts { max-width: 340px; margin: 12px 0 16px; }
.dc-facet-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.docs .doc .doc__type { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
@media (max-width: 640px) {
  .dc { grid-template-columns: 1fr; grid-template-areas: "main" "side" "more"; padding: 12px 12px 4px; }
  .dc__side { text-align: left; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .dc__amtk { margin: 0; }
  .dc__amt + .dc__open { margin-top: 0; }
}
.dcs { list-style: none; margin: 0; padding: 0; }
.dc__terms li.dc__tn { padding-left: 2px; }
@media (max-width: 800px) { #dsort, #asort { display: none; } }

/* Search home (edition `home: "search"`): one big box over the whole site. The header box hides here. */
body.is-home:has(.home__search) .site-search { visibility: hidden; } /* only where the big box is itself the site search; the question box is not (#474) */
.home { max-width: 1000px; margin: 7vh auto 6vh; }
.home__title { font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 22px; }
.home__search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); padding: 6px 6px 6px 18px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.home__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.home__search svg { flex: none; width: 22px; height: 22px; color: var(--muted); }
.home__search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.222rem; padding: 10px 0; outline: none; }
.home__search button { flex: none; border: 0; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; padding: 10px 22px; cursor: pointer; }
.home__search button:hover, .home__search button:focus-visible { filter: brightness(1.1); }
.home__try { margin: 14px 0 0; color: var(--muted); font-size: 1.009rem; }
.home__try a { display: inline-block; margin: 4px 0 0 8px; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; font-size: .956rem; }
.home__try a:hover, .home__try a:focus-visible { border-color: var(--accent); color: var(--accent); }
/* The library's contents: a ruled ledger, each collection under a navy rule with its count as a figure. */
.home__ways { list-style: none; padding: 0; margin: 8vh 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px 26px; text-align: left; }
.home__ways a { display: block; height: 100%; padding: 12px 0 0; border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none; }
.home__ways b { display: flex; flex-direction: column-reverse; font-size: 1.062rem; font-weight: 700; }
.home__ways em { margin-bottom: 2px; font: 600 2.15rem/1.1 var(--font-display); font-variant-numeric: lining-nums; letter-spacing: -.02em; }
.home__ways span { display: block; margin-top: 4px; color: var(--muted); font-size: .935rem; line-height: 1.4; }
.home__ways a:hover, .home__ways a:focus-visible { border-top-color: var(--accent); color: var(--accent); }
.home__ways a:hover b, .home__ways a:focus-visible b { text-decoration: underline; text-decoration-thickness: 1.5px; }
@media (max-width: 560px) { .home__ways { grid-template-columns: 1fr 1fr; gap: 18px; } .home__ways em { font-size: 1.806rem; } }
@media (max-width: 760px) { .home { margin-top: 4vh; } .home__search { padding-left: 12px; } .home__search button { padding: 10px 14px; } body.is-home:has(.home__search) .site-search { display: none; } }

/* Audience across tabs (#137): the same audience on the other tabs, the explainer link, and a card's audience tags. */
.aud-else { margin: 6px 0 2px; padding: 6px 8px; border-radius: var(--r-ctl); background: var(--accent-soft); font-size: .85rem; line-height: 1.5; }
.aud-else a { font-weight: 600; color: var(--ink); }
.aud-else em { font-style: normal; font-weight: 400; color: var(--muted); }
.aud-more { margin: 10px 0 2px; font-size: .829rem; }
.aud-more a { color: var(--muted); }
.aud-tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0; font-size: .85rem; color: var(--muted); }
.aud-tags b { color: var(--ink); font-weight: 600; }
.aud-tags a { color: inherit; }
a.tip__link { display: inline-flex; align-items: center; text-decoration: none; }
.aud-def { margin: 0 0 1.4rem; }
.aud-def dt { font-weight: 700; margin-top: .9rem; }
.aud-def dd { margin: .2rem 0 0; }
/* Type icons on cards (#185): icon only, the name is in a title hint and the accessible name. */
.pick.ctype { display: inline-grid; place-items: center; padding: 1px 2px; color: var(--accent); border-radius: var(--r-tag); }
.pick.ctype .ticon { width: 15px; height: 15px; margin: 0; vertical-align: 0; }
.pick.ctype:hover, .pick.ctype:focus-visible { outline: 1px solid var(--accent); }
.card__cty .ctype + .pick:not(.ctype) { margin-left: .3rem; }

/* Ads (#212, #213): small cards in a grid, under the same filter rail as Campaigns. The picture box is one
   fixed shape so the rows line up; tall Meta screenshots show their top, where the advertiser and headline are. */
/* Ads page: the state misinformation-watch demand test above the grid (ads.js makePitch). Same family as
   the topic page's deep band; the form reuses About's .fb fields. */
.ads-ask { margin: 0 0 16px; padding: 14px 18px 10px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--panel); }
.ads-ask__kicker { margin: 0 0 2px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.ads-ask h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.381rem; line-height: 1.25; }
.ads-ask__lede { margin: 0 0 10px; max-width: 72ch; }
.ads-ask__go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 6px; }
.ads-ask__no { font: inherit; color: var(--muted); background: none; border: 0; padding: 8px 4px; text-decoration: underline; cursor: pointer; min-height: 44px; }
.ads-ask__form { margin: 4px 0 8px; max-width: 520px; }
.ads-ask__form[hidden] { display: none; }
.adcs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 14px; }
.adc { height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.adc:hover, .adc:focus-within { border-color: var(--accent); }
.adc__pic { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.adc__pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.adc__pic--meta img { object-position: center; }
.adc__by a { color: inherit; text-decoration: none; }
.adc__by a:hover, .adc__by a:focus-visible { color: var(--accent); text-decoration: underline; }
/* An ad's pop-up (#/ad/<id>): the whole picture, not the card's square crop. */
.ad-detail__pic { margin: 14px 0 6px; }
.ad-detail__pic img { display: block; max-width: 100%; max-height: 70vh; width: auto; margin: 0 auto; border-radius: var(--r-ctl); border: 1px solid var(--line); background: #fff; }
.ad-detail__none { margin: 0; padding: 28px 16px; border-radius: var(--r-ctl); background: var(--bg); color: var(--muted); text-align: center; }
.ad-detail__text { margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--line); color: var(--ink); white-space: pre-line; }
.ad-detail .facts .pill { margin: 0 4px 4px 0; }
.ad-detail__grid { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ad-detail__grid a { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; }
.ad-detail__grid a:hover, .ad-detail__grid a:focus-visible { border-color: var(--accent); }
.ad-detail__grid img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.adc__play { position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: rgb(0 0 0 / .6); }
.adc__pic--none { display: flex; align-items: center; justify-content: center; padding: 14px; background: var(--bg); color: var(--muted); font-size: 14px; text-align: center; text-decoration: none; }
.adc__quote { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-size: 14.5px; line-height: 1.45; text-align: left; }
.adc__body { padding: 9px 11px 4px; flex: 1; font-size: 14px; line-height: 1.4; }
.adc__body p { margin: 0 0 3px; }
.adc__lib { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; color: var(--muted); font-size: 13px; }
.adc__badge { font-weight: 600; color: var(--ink); }
.adc__by { margin: 2px 0 2px; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adc__paid, .adc__facts { color: var(--muted); }
.adc__camp a { font-weight: 600; }
.adc > .cact { margin: 0 11px 9px; flex-wrap: nowrap; }
.adc .cact button { height: 32px; min-width: 30px; padding: 0 .3rem; }
@media (max-width: 520px) { .adcs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .adc__body { padding: 8px 9px 4px; } .adc > .cact { margin: 0 9px 8px; } }
/* One ad listed many times (#212): a card with two sheets behind it, and a count on its picture. Every card leaves
   room for the sheets, so a row of cards still lines up. */
.adcs > li { position: relative; isolation: isolate; padding: 6px 6px 0 0; }
.adcs > li.is-stack::before, .adcs > li.is-stack::after { content: ""; position: absolute; border: 1px solid color-mix(in srgb, var(--line), var(--muted) 45%); border-radius: var(--radius); background: var(--panel); }
.adcs > li.is-stack::before { inset: 3px 3px 3px 3px; z-index: -1; }
.adcs > li.is-stack::after { inset: 0 0 6px 6px; z-index: -2; }
.adcs > li.is-stack:hover::before, .adcs > li.is-stack:focus-within::before { border-color: var(--accent); }
.adc__runs { position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: rgb(18 42 53 / .82); font-variant-numeric: tabular-nums; }
.adc__in { color: var(--muted); white-space: nowrap; }
.ads-per { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 15px; color: var(--muted); }
.ads-per select { margin-left: 0; }
.toolbar .ads-per ~ #asort { margin-left: 8px; }
.facet__rest > summary { cursor: pointer; padding: 4px 0 4px 26px; color: var(--accent); font-size: 15px; list-style: none; }
.facet__rest > summary::-webkit-details-marker { display: none; }
.ad-runs__list { display: grid; gap: 8px; margin: 10px 0 0; }
.ad-runs__list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.ad-runs__list li.is-here { border-color: var(--accent); }
.ad-runs__pic { display: block; width: 56px; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r-ctl); background: #fff; }
.ad-runs__pic img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.ad-runs__facts { font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }

/* Blog (#205): the list at #/blog and one post at #/blog/<id>. */
.blog, .post { max-width: 760px; }
.blog__lede { margin-top: -4px; }
.blog__list { list-style: none; padding: 0; margin: 20px 0 0; }
.blog__item { padding: 16px 0; border-top: 1px solid var(--line); }
.blog__item h3 { margin: 0 0 4px; font-size: 1.275rem; line-height: 1.3; }
.blog__item h3 a { text-decoration: none; }
.blog__item h3 a:hover, .blog__item h3 a:focus-visible { text-decoration: underline; }
.blog__item p { margin: 6px 0 0; }
.blog .meta span::before, .post .meta span::before, .post .meta time::before { content: "·"; margin-right: 8px; }
.blog__flag { color: var(--mixed); }
.post__back { margin: 0 0 12px; font-size: 15px; }
.post__title { font-size: 2.125rem; line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
.post__dek { font-size: 1.222rem; color: var(--muted); margin: 0 0 10px; }
.post__draft { border-left: 3px solid var(--mixed); background: var(--panel); padding: 10px 14px; margin: 16px 0; font-size: 16px; }
.post__body { font-size: 18px; line-height: 1.65; }
.post__body h2 { font-size: 1.434rem; margin: 32px 0 8px; line-height: 1.3; }
.post__body h3 { font-size: 1.169rem; margin: 24px 0 6px; }
.post__body li { margin: 4px 0; }
.post__body blockquote { margin: 16px 0; padding: 2px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.post__table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); }
.post__table table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.45; }
.post__table th, .post__table td { text-align: left; vertical-align: top; padding: 8px 12px; border-top: 1px solid var(--line); }
.post__table thead th { border-top: 0; background: var(--accent-soft); font-weight: 600; }
.post__table tbody th { font-weight: 600; min-width: 11em; }
@media (max-width: 640px) {
  .post__title { font-size: 1.7rem; }
  .post__body { font-size: 17px; }
}

/* Hidden organisations (#221): the bar above the list, the control on an organisation's pop-up, and
   the tooltip's own button. The bar is a status, not an error, so it borrows the accent, not a warning
   colour; it stays until the reader brings the organisation back. */
.hbar { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--accent); border-left-width: 4px; border-radius: var(--r-ctl); background: var(--accent-soft); }
.hbar__h { margin: 0; font-size: .935rem; font-weight: 700; }
.hbar__list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .903rem; }
.hbar__list li { display: flex; align-items: center; gap: 8px; }
.hbar__list a { font-weight: 600; }
.hbar__show { font: inherit; font-weight: 600; min-height: 30px; padding: 0 .6rem; border: 1px solid var(--accent); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; }
.hbar__show:hover { background: var(--accent); color: var(--bg); }
.ohide { margin: 10px 0 0; }
.ohide__btn { font: inherit; font-weight: 700; min-height: 36px; padding: 0 .85rem; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; }
.ohide__btn:hover { border-color: var(--accent); color: var(--accent); }
.ohide__what { margin: 6px 0 0; max-width: 56ch; font-size: .85rem; color: var(--muted); }
.ohide--on { padding: 10px 14px; border: 1px solid var(--accent); border-left-width: 4px; border-radius: var(--r-ctl); background: var(--accent-soft); }
.ohide--on .ohide__what { margin: 0 0 8px; color: var(--ink); }
.ohide--on .ohide__btn { border-color: var(--accent); }
.ohide--quiet { font-size: .829rem; color: var(--muted); }
.ohide__link { font: inherit; padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; cursor: pointer; }
.ohide__link:hover, .ohide__link:focus-visible { color: var(--ink); text-decoration-color: currentColor; }
.ohide--quiet .ohide__what { display: block; margin-top: 2px; opacity: .85; }
/* The org tooltip (#400): See profile and Follow side by side, then taking it out of your lists as a
   quiet line of small text under them, not a third button as loud as the other two. */
#tip .cact-follow { min-height: 32px; padding: 0 .9rem; font-size: inherit; }
#tip .cact-follow--on { color: inherit; border-color: color-mix(in srgb, currentColor 45%, transparent); }
.tip__hide { flex-basis: 100%; margin-top: .15rem; padding: .4rem 0 0; border: 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); background: none; color: inherit; font: inherit; font-size: .765rem; text-align: left; opacity: .7; cursor: pointer; }
.tip__hide:hover, .tip__hide:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }

/* Directory: the two lists under the tab, and the US health nonprofits view (#256). */
.tablewrap { overflow-x: auto; }
.nf-row { align-items: flex-start; }
.nf-row__summary { margin: .3rem 0 .4rem; font-size: 15px; }
.nf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nf-tag { font: inherit; font-size: 13.5px; padding: 1px 8px; background: none; border: 1px solid var(--line); border-radius: var(--r-tag); color: var(--muted); text-decoration: none; cursor: pointer; }
.nf-tag--who { border-style: dashed; }
.nf-tag:hover, .nf-tag:focus-visible { border-color: var(--accent); color: var(--ink); }
.nf-tag.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
span.nf-tag { cursor: default; }
.nf-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.nf-sources { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.nf-page { max-width: 760px; }
.nf-links { margin: 6px 0 14px; }
.nf-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 16px 0 8px; padding: 12px 0; border-block: 1px solid var(--line); }
.nf-facts dt { font-size: 13.5px; color: var(--muted); }
.nf-facts dd { margin: 0; font-weight: 600; }
.nf-group { margin: 14px 0; }
.nf-group h3 { margin: 0 0 6px; font-size: 15px; }
.nf-programs { padding-left: 18px; }
.nf-pcs { margin: 14px 0; }
.nf-pcs > summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.facet__find { width: 100%; margin: 6px 0 2px; font-size: 15px; }
.facet__all { margin: 4px 0 0; padding: 2px 0; font: inherit; font-size: 14px; border: 0; background: none; color: var(--accent); cursor: pointer; }
.facet__all:hover, .facet__all:focus-visible { text-decoration: underline; }
.facet li[hidden] { display: none; }
.nf-list.is-loading { opacity: .55; }
/* Organisations (#433): the library's block and the nonprofits' list, each under its own heading. */
.org-h { margin: 4px 0 2px; font-size: 18px; }
.org-h em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; font-size: 16px; }
.org-h__sub { margin: 0 0 10px; }
#org-lib .tablewrap { margin-bottom: 4px; }
.org-more { margin: 6px 0 28px; font-weight: 600; }
#nf-list .org-h { margin-top: 8px; }
.nf-row:hover { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.nf-facts-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 2px; font-size: 14px; color: var(--muted); }
.nf-sep { opacity: .6; }
/* A nonprofit's pop-up and page share the campaign pop-up's layout (.detail); these are its own bits. */
.nf-detail .nf-links { margin: 10px 0 4px; }
.nf-detail .nf-links .nf-sep { margin: 0 8px; }
.nf-detail .nf-full { font-weight: 600; }
.nf-detail .nf-facts { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.nf-fact { font: inherit; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
.nf-fact:hover, .nf-fact:focus-visible { color: var(--ink); text-decoration-color: var(--accent); }
.nf-fact.is-on { color: var(--accent); font-weight: 600; }
/* "health is part of its work" (#280): the IRS files it under something other than health, so it sits beside
   the clinics without reading as one. A plain note, not a warning — these organizations belong on the list. */
.nf-part { display: inline-block; padding: 0 6px; font-size: 12.5px; line-height: 1.6; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r-tag); cursor: help; }
.nf-part:hover, .nf-part:focus-visible { color: var(--ink); border-color: var(--accent); border-style: solid; }
/* Crosswalk from a ticked MeSH topic to the campaigns we've written up on it (#280). */
.nf-xwalk { font-size: 14px; color: var(--muted); }
.nf-xwalk:empty { display: none; }
.nf-xwalk a { color: var(--accent); }
.nf-more { font-size: 13.5px; align-self: center; }
.nf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 8px; font-size: 14px; }
.nf-actions button { font: inherit; padding: 0; background: none; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.nf-actions button:hover { color: var(--ink); }
.facet__sec { margin: 14px 0 2px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }


/* ---------- Embed: one record in someone else's frame (#263) ----------
   ?embed=1 is how SmartSearch shows a campaign or an organisation beside its results.
   Its pop-up already carries the title, the link out and the close button, so everything
   of ours that repeats those goes: the beta bar, the header, the footer, the page behind
   the dialog, and the dialog's own frame, counter and pager. */
:root[data-embed] .beta,
:root[data-embed] .preview-bar,
:root[data-embed] .top,
:root[data-embed] #foot,
:root[data-embed] .mnav,
:root[data-embed] .mpager { display: none; }
:root[data-embed] dialog#modal { inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; padding: 20px 26px 28px; border: 0; border-radius: 0; box-shadow: none; }
:root[data-embed] dialog#modal::backdrop { background: var(--bg); }
/* Hiding an organisation changes the reader's own copy of the library, and only for lists
   this frame never shows. Not something to offer from inside someone else's page. */
:root[data-embed] .ohide,
:root[data-embed] .tip__hide { display: none; }
/* The record's cover is a 16/7 band, which in a frame a few hundred pixels tall is most of
   what you see before scrolling. In an embed it shrinks with the frame and stays a strip, so
   the title and the summary are there without scrolling (#269). */
/* Whoever embeds a record usually names it themselves — SmartSearch puts the campaign's name
   in its own title bar — so ours would be the same words twice, and in a frame this short that
   is a line nobody can spare (vivwebsolutions/HealthRAG#124). It stays in the page for screen
   readers, since the dialog is named by it. ?title=1 keeps it visible for an embedder that has
   no title of its own. */
:root[data-embed]:not([data-embed-title]) #modal-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root[data-embed] .cover--big { aspect-ratio: auto; height: clamp(84px, 20vh, 150px); }
:root[data-embed] .cover--big svg { width: 36px; height: 36px; }
/* The fit and logo paddings are percentages of the width, which on a strip this short
   would be taller than the strip and push the logo out of it. */
:root[data-embed] .cover--big.cover--fit .cover__img,
:root[data-embed] .cover--big.cover--logo .cover__img { padding: 10px; }
/* An organisation logo stays a small mark on the strip: pixels, smaller than the shortest strip. */
:root[data-embed] .cover--big.cover--orglogo .cover__img { max-height: 60px; max-width: 32%; padding: 0; }
:root[data-embed] #app { padding: 20px 26px; } /* only ever the loading line or an error here */
:root[data-embed] body:has(dialog#modal[open]) #app { display: none; }
@media (max-width: 800px) { :root[data-embed] dialog#modal { padding: 16px 14px 24px; } }

/* ---------- Collections and issue pages (#277) ----------
   A collection has no picture of its own. Its card either stacks its members' pictures
   (never one of them full-bleed: that breaks one-picture-one-card in featured-images.md)
   or shows a fact cover, which is usually the better default for an advocacy shelf. */
.grid--res { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card--res .card__notes { font-size: 15px; }
.card--res .cover { aspect-ratio: 16 / 10; }
.card--nopic .card__body { padding-top: 12px; }
.card--coll { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.cover--stack { display: block; background: hsl(var(--h) var(--cover-s) var(--cover-l)); }
.cover__sheet { position: absolute; border-radius: var(--r-ctl); object-fit: cover; border: 2px solid var(--panel); box-shadow: 0 2px 7px rgba(0,0,0,.3); }
.cover__sheet--0 { inset: 20% 34% 12% 6%; z-index: 3; }
.cover__sheet--1 { inset: 13% 20% 19% 20%; z-index: 2; transform: rotate(4deg); }
.cover__sheet--2 { inset: 7% 6% 26% 34%; z-index: 1; transform: rotate(8deg); opacity: .9; }
.cover__count { position: absolute; right: .5rem; bottom: .4rem; z-index: 4; background: rgba(0,0,0,.62); color: #fff; font-size: .744rem; font-weight: 700; border-radius: var(--r-ctl); padding: .1rem .4rem; }
.cover--facts { padding: 10px 12px; text-align: center; }
.cover--facts > div { display: flex; flex-direction: column; gap: 2px; }
.cover__fact { font-size: .829rem; font-weight: 600; opacity: .78; line-height: 1.25; }
.cover__fact--lead { font-size: 1.296rem; font-weight: 800; opacity: 1; letter-spacing: -.01em; }
.cover--plain .cover__fact--lead { font-size: 1.009rem; font-weight: 700; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.res-mark { font-size: 12px; font-weight: 700; letter-spacing: .03em; border-radius: var(--r-ctl); padding: .05rem .3rem; background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.res-mark--gone { background: color-mix(in srgb, #c0392b 16%, transparent); color: #c0392b; }
.res-mark--paid { background: color-mix(in srgb, #b7791f 18%, transparent); color: #8a5a07; }

/* A collection's own page: breadcrumb up, collections inside first, then items. */
.coll { max-width: 1100px; margin: 0 auto; padding: 8px 0 40px; }
.coll__crumbs { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.coll__crumbs a { color: var(--accent); }
.coll__title { margin: 0 0 6px; font-size: 1.806rem; line-height: 1.15; }
.coll__lede { margin: 0 0 6px; max-width: 70ch; color: var(--ink); }
.coll__meta { margin: 0 0 20px; font-size: 15px; color: var(--muted); }
.coll__h { font-size: 1.062rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 10px; }

/* The issue page: one decision, and everything the library holds on it. */
.isx { max-width: 1100px; margin: 0 auto; padding: 8px 0 48px; }
.isx-hero { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 8px; }
.isx-hero__kind { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.isx-hero__q { margin: 0 0 12px; font-size: 2.231rem; line-height: 1.1; letter-spacing: -.02em; max-width: 22ch; }
.isx-hero__ask { margin: 0 0 12px; font-size: 1.116rem; }
.isx-hero__asklabel { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; }
.isx-hero__lede, .isx-hero__who { margin: 0 0 10px; max-width: 68ch; color: var(--muted); }
.isx-hero__who b { color: var(--ink); }
.isx-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.isx-num { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--panel); }
.isx-num__v { display: block; font-size: 1.594rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.isx-num__v[tabindex] { cursor: help; border-bottom: 1px dotted var(--line); }
.isx-num__l { font-size: 14px; color: var(--muted); }
.isx-sec { margin: 34px 0 0; }
.isx-sec > h2 { font-size: 1.328rem; margin: 0 0 4px; }
.isx-sec__lede { margin: 0 0 14px; max-width: 72ch; color: var(--muted); font-size: 15px; }
.isx-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.isx-table th { text-align: left; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0 10px 6px 0; }
.isx-table td { border-bottom: 1px solid var(--line); padding: 10px 10px 10px 0; vertical-align: top; }
.isx-yrs { display: block; font-size: 13px; color: var(--muted); }
.isx-ask { color: var(--muted); max-width: 46ch; }
.isx-out { font-weight: 700; font-size: 14px; border-radius: var(--r-ctl); padding: .1rem .4rem; white-space: nowrap; }
.isx-out--ok { background: color-mix(in srgb, #2e7d32 16%, transparent); color: #1e5c22; }
.isx-out--warn { background: color-mix(in srgb, #b7791f 20%, transparent); color: #8a5a07; }
.isx-out--bad { background: color-mix(in srgb, #c0392b 16%, transparent); color: #a5281b; }
.isx-out--muted { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
/* At night the light-mode greens, ambers and reds sank into the dark panel (#373): lighter tones. */
:root[data-theme="dark"] .isx-out--ok { color: #7fd18b; } :root[data-theme="dark"] .isx-out--warn { color: #e6b35a; } :root[data-theme="dark"] .isx-out--bad { color: #f2817a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .isx-out--ok { color: #7fd18b; } :root:not([data-theme="light"]) .isx-out--warn { color: #e6b35a; } :root:not([data-theme="light"]) .isx-out--bad { color: #f2817a; } }
.isx-mechs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.isx-mech { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--panel); }
.isx-mech__id { font-size: 15px; }
.isx-mech__n { float: right; font-size: 13px; color: var(--muted); }
.isx-mech__m { margin: 4px 0 6px; font-size: 14px; color: var(--muted); }
.isx-mech__who { margin: 0; font-size: 13px; }
.isx-sec--gap { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--panel); }
.isx-sec--gap p { max-width: 72ch; }
.isx-open { margin: 10px 0 0; padding-left: 18px; font-size: 15px; color: var(--muted); }
.isx-srcs { font-size: 14px; color: var(--muted); margin-top: 12px; }
.isx-note { margin-top: 28px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .isx-hero__q { font-size: 1.594rem; }
  .isx-table, .isx-table tbody, .isx-table tr, .isx-table td { display: block; width: 100%; }
  .isx-table thead { display: none; }
  .isx-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .isx-table td { border: 0; padding: 2px 0; }
}
/* Who decides, on the issue table and the campaign record. A flat pill: the advocacy and
   decidedBy facets are not filters, so it must not look like one. */
.pill--flat { background: var(--panel); border: 1px solid var(--line); cursor: default; }
.pill--flat:hover { outline: 0; }
.isx-who { white-space: normal; }
.isx-dec { display: inline-block; font-size: 14px; background: var(--accent-soft); border-radius: var(--r-ctl); padding: .1rem .4rem; margin: 0 4px 4px 0; }
.policy .facts { margin: 0; }
.policy .facts dd { margin-bottom: 8px; }

/* The Issues index behind the nav entry: a list, not a card grid, because an issue is a
   question and reads as one. The result chips are the same .isx-out as the issue page. */
.ixs { max-width: 820px; }
.ixs__lede { margin-top: -4px; max-width: 72ch; }
.ixs__list { list-style: none; padding: 0; margin: 24px 0 0; }
.ixs__item { padding: 18px 0; border-top: 1px solid var(--line); }
.ixs__item h3 { margin: 0 0 6px; font-size: 1.381rem; line-height: 1.25; }
.ixs__item h3 a { text-decoration: none; }
.ixs__item h3 a:hover, .ixs__item h3 a:focus-visible { text-decoration: underline; }
.ixs__item p { margin: 6px 0 0; }
.ixs__ask { font-size: 15px; }
.ixs__out { display: flex; flex-wrap: wrap; gap: 6px; }
.ixs__item .meta span::before { content: "\00b7"; margin-right: 8px; }
.issue-of { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-size: 15px; }

/* ---------- Campaign map (#165): List / Map switch, pins by state or country ---------- */
.vswitch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--panel); }
.vswitch a { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; color: var(--muted); text-decoration: none; font-size: .935rem; }
.vswitch a + a { border-left: 1px solid var(--line); }
.vswitch a svg { width: 15px; height: 15px; }
.vswitch a[aria-current] { background: var(--accent); color: var(--panel); }
.vswitch a:not([aria-current]):hover { color: var(--ink); background: var(--accent-soft); }
.cmap { --sea: color-mix(in srgb, var(--accent-soft) 55%, var(--panel)); --land: color-mix(in srgb, var(--muted) 18%, var(--panel)); --has: color-mix(in srgb, var(--accent) 22%, var(--panel)); margin-bottom: 16px; }
.cmap__frame { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--sea); }
.cmap__svg { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; }
.cmap__svg.is-zoomed { cursor: grab; touch-action: none; }
.cmap__svg.is-zoomed:active { cursor: grabbing; }
.cmap__svg use, .cmap__st, .cmap__has { stroke: var(--panel); stroke-width: .7px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cmap__svg use { fill: var(--land); opacity: .55; }
.cmap__st { fill: var(--land); }
.cmap__has { fill: var(--has); }
.cmap__has.is-on { fill: color-mix(in srgb, var(--accent) 45%, var(--panel)); }
.cmap__inset { fill: var(--sea); stroke: var(--line); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.pin circle { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5px; vector-effect: non-scaling-stroke; transition: fill .15s; }
.pin text { fill: var(--panel); font-weight: 700; text-anchor: middle; pointer-events: none; font-family: inherit; }
.pin--nation circle { fill: var(--ink); }
.pin:hover circle, .pin:focus-visible circle { fill: var(--ink); }
.pin--nation:hover circle, .pin--nation:focus-visible circle { fill: var(--accent); }
.pin.is-on circle { fill: #b26a00; }
.pin:focus { outline: none; }
.pin:focus-visible circle { stroke: var(--ink); stroke-width: 3px; }
.pin__line { stroke: var(--muted); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.pin__dot { fill: var(--muted); }
.pin__tag { fill: var(--muted); text-anchor: middle; font-weight: 600; pointer-events: none; }
.pin__tag--side { text-anchor: end; }
.cmap__tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }
.cmap__scope, .cmap__zoom button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font: inherit; font-size: .935rem; }
.cmap__scope { padding: 5px 12px; border-radius: var(--r-ctl); text-decoration: none; font-weight: 600; }
.cmap__scope:hover { border-color: var(--accent); color: var(--accent); }
.cmap__zoom { display: inline-flex; }
.cmap__zoom button { width: 32px; height: 32px; cursor: pointer; font-size: 1.169rem; line-height: 1; }
.cmap__zoom button:first-child { border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
.cmap__zoom button:not(:first-child) { border-left: 0; }
.cmap__zoom button:last-child, .cmap__zoom button:nth-child(2):has(+ [hidden]) { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
.cmap__zoom button:hover { color: var(--accent); }
.cmap__note { margin: 8px 2px 0; font-size: .935rem; color: var(--muted); }
.cmap__pick { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 12px; }
.cmap__pick h2 { margin: 0; font-size: 1.328rem; }
.cmap__pick small { font-weight: 400; color: var(--muted); font-size: 1.009rem; }
/* Campaigns shared across states (#165): a violet ring on their pins, faint arcs between the places on
   hover, for the open pin or with &links=1, and the partner states outlined. Violet stays clear of the
   teal accent and the amber open pin. */
:root { --link: #7a4cc2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --link: #b99cff; } }
:root[data-theme="dark"] { --link: #b99cff; }
.cmap .pin .pin__ring { fill: none; stroke: var(--link); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.pin__arc { fill: none; stroke: var(--link); stroke-width: 1.6px; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .2s; pointer-events: none; }
.cmap__svg.show-links .pin__arc { opacity: .55; }
.pin__arc.is-hot, .pin__arc.is-near { opacity: .9; }
.cmap__svg path.is-partner, .cmap__svg path.is-near { stroke: var(--link); stroke-width: 1.8px; }
.pin.is-partner circle:not(.pin__ring), .pin.is-near circle:not(.pin__ring) { fill: var(--link); }
.pin__arc--model { stroke-dasharray: 5 4; }
.pin__arc--name { stroke-dasharray: 1 4; }
.cmap__key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 8px 2px 0; font-size: .871rem; color: var(--muted); }
.cmap__key span { display: inline-flex; align-items: center; gap: 6px; }
.cmap__key .k-pin { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--panel); font: 700 .6rem/1 inherit; font-style: normal; }
.cmap__key .k-ring { display: inline-block; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--panel), 0 0 0 3px var(--link); margin: 0 1px; }
.cmap__key .k-line { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--link); }
.cmap__key .k-model { border-top-style: dashed; }
.cmap__key .k-name { border-top-style: dotted; }
.cmap__pick .clear + .clear { margin-left: 0; }
.ptip__lede { margin: .3rem 0 .2rem; }
.ptip { margin: 0; padding: 0; list-style: none; }
.ptip li { margin: .35rem 0 0; }
.ptip li span { display: block; font-size: .85em; opacity: .85; }
.ptip a { color: inherit; text-decoration: underline; }
.ptip__more { margin: .3rem 0 0; opacity: .75; }
.card--shared { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.card__also { margin: 4px 0 0; font-size: .903rem; color: var(--muted); }
.card__also a { color: var(--link); font-weight: 600; }
@media (max-width: 600px) { .cmap__tools { position: static; justify-content: flex-end; padding: 6px 6px 0; } .cmap__zoom button { width: 30px; height: 30px; } .cmap__scope { padding: 4px 10px; } }
.lineage__h { margin: .8rem 0 .2rem; font-weight: 600; }
.lineage .plain li { margin: .2rem 0; }
.lineage__cmp { margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Compare side by side (#308) */
.cmp h1 { margin: .2rem 0 .6rem; }
.cmp__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp__wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.cmp__table { border-collapse: collapse; font-size: .956rem; min-width: 100%; }
.cmp__table th, .cmp__table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; min-width: 180px; }
.cmp__table tbody th { position: sticky; left: 0; background: var(--panel); min-width: 120px; font-weight: 600; color: var(--muted); }
.cmp__table thead th { background: var(--panel); }
.cmp__table thead th.is-this { box-shadow: inset 0 -3px 0 var(--link); }
.cmp__tag { display: inline-block; margin: 0 2px 4px 0; padding: 1px 8px; border-radius: var(--r-tag); background: var(--accent-soft); font-size: .871rem; }
.cmp__tag.is-same { background: none; box-shadow: inset 0 0 0 1.5px var(--link); }
.cmp__how, .cmp__talk { margin: 14px 0; }
.cmp__how h2, .cmp__talk h2 { margin-top: 0; font-size: 1.169rem; }
.cmp__links { margin: 8px 0 0; padding-left: 1.3rem; }
.cmp__links li { margin: 0 0 10px; }
.cmp__links li p { margin: 2px 0 0; font-size: .978rem; }
.cmp__sure { display: inline-block; padding: 0 8px; border-radius: var(--r-tag); font-size: .829rem; font-weight: 600; background: var(--accent-soft); vertical-align: 1px; }
.cmp__sure.is-likely { background: none; box-shadow: inset 0 0 0 1.5px var(--muted); color: var(--muted); }
.cmp__sure.is-first { background: none; box-shadow: inset 0 0 0 1.5px var(--link); }
.cmp__talk .cact { margin-top: 6px; }
.cmp__links details { font-size: .935rem; color: var(--muted); margin-top: 2px; }
.cmp__links summary { cursor: pointer; color: var(--link); }
.ptip__cmp { display: block; margin-top: 2px; font-weight: 600; }

/* Topics (#373). The index is a tile per topic, grouped by area; a topic page reuses the issue
   page's hero, number tiles and sections (.isx-*) so the two read as one family, and adds tallies
   that open the campaigns list and short lists that open each tab already filtered. */
.tpi { max-width: 1100px; }
/* Three steps, each plainly bigger than the next: the page title, an area, a topic (Kalman, #373:
   "the headlines need to be larger than the topics themselves"). */
.tpi > h2 { font-size: 2.019rem; letter-spacing: -.02em; margin-bottom: 8px; }
.tpi__lede { margin-top: -4px; max-width: 72ch; }
.tpi__deepband { margin: 22px 0 8px; padding: 14px 18px 4px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--panel); }
.tpi__deepband > h3, .tpi__area > h3 { margin: 0 0 4px; font-size: 1.594rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.tpi__deepband .ixs__list { margin-top: 6px; }
.tpi__deepband .ixs__item:first-child { border-top: 0; }
.tpi__def { margin: 0 0 10px; max-width: 72ch; color: var(--muted); font-size: 15px; }
.tpi__area { margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
/* The area a menu link opened: a brief tint so the eye lands on it. */
.tpi__area--on > h3 { animation: tpi-on 2.4s ease-out; border-radius: var(--r-ctl); }
@keyframes tpi-on { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }
@media (prefers-reduced-motion: reduce) { .tpi__area--on > h3 { animation: none; } }
.tpi__aicon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.tpi__aicon .ticon { margin: 0; width: 22px; height: 22px; }
.tpi__grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tpi__tile { display: flex; gap: 10px; align-items: flex-start; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); text-decoration: none; }
.tpi__tile:hover, .tpi__tile:focus-visible { border-color: var(--accent); box-shadow: 0 1px 6px rgb(0 0 0 / .08); }
.tpi__icon { flex: none; color: var(--accent); }
.tpi__icon .ticon { margin: 0; width: 18px; height: 18px; vertical-align: 0; }
.tpi__txt { display: flex; flex-direction: column; min-width: 0; }
.tpi__name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.tpi__deep { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: var(--r-tag); padding: 1px 5px; vertical-align: 2px; }
.tpi__n { font-size: 14px; color: var(--muted); }
.tpi__more { margin-top: 28px; }
.tpi__more > summary { cursor: pointer; font-weight: 700; }
.tpi__foot { margin-top: 32px; font-size: 14px; }

.tpx-h1 { margin: 0 0 10px; font-size: 2.231rem; line-height: 1.1; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.tpx-h1__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); flex: none; }
.tpx-h1__icon .ticon { margin: 0; width: 30px; height: 30px; vertical-align: 0; }
a.tpx-num { color: var(--ink); text-decoration: none; }
a.tpx-num:hover, a.tpx-num:focus-visible { border-color: var(--accent); }
a.tpx-num:hover .isx-num__l, a.tpx-num:focus-visible .isx-num__l { color: var(--accent); text-decoration: underline; }
.tpx-sibs { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 15px; }
.tpx-sibs .isx-hero__asklabel { display: inline; margin-right: 2px; }
.tpx-mesh { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
/* Follow a topic (#373): the card bar's Follow button, and what following it sends. */
.tpx-follow { margin: 4px 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tpx-follow__note { font-size: 14px; color: var(--muted); }
.tpx-deep .ixs__item:first-child { border-top: 0; padding-top: 4px; }
.tpx .loading { padding: 16px 0; text-align: left; }
@media (max-width: 640px) {
  .tpi > h2 { font-size: 1.7rem; }
  .tpi__deepband > h3, .tpi__area > h3 { font-size: 1.381rem; }
  .tpx-h1 { font-size: 1.594rem; }
  .tpx-h1__icon { width: 38px; height: 38px; }
}

/* ---------- Open formats, Feedback and submissions ---------- */
.formats-list { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: fmt; }
.formats-list li { counter-increment: fmt; }
.formats-list a { display: block; height: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--panel); }
.formats-list a:hover, .formats-list a:focus-visible { border-color: var(--accent); }
.formats-list b::before { content: counter(fmt) ". "; color: var(--accent); }
.formats-list span { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }
.formats-page h3 { scroll-margin-top: 16px; margin-top: 32px; }
.formats-scroll { overflow-x: auto; max-width: 100%; }
.formats-scores { min-width: 720px; }
.formats-scores td { text-align: center; }
.formats-scores .sc--0 { color: var(--muted); }
.formats-scores .sc--2 { font-weight: 700; color: var(--accent); }
.fb { display: grid; gap: 6px; max-width: 640px; margin: 8px 0 24px; }
.fb label { font-weight: 600; margin-top: 10px; }
.fb .fb-hint { margin: 0; font-size: 15px; }
.fb input, .fb select, .fb textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 10px; width: 100%; box-sizing: border-box; }
.fb input:focus, .fb select:focus, .fb textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fb-send { justify-self: start; font: inherit; font-weight: 600; color: var(--bg); background: var(--accent); border: 0; border-radius: var(--r-ctl); padding: 10px 18px; cursor: pointer; min-height: 44px; }
.fb-send:hover { filter: brightness(1.08); }
.fb .fb-trap { position: absolute; left: -9999px; }
.fb .fb-status { margin: 0; min-height: 1.2em; color: var(--harm); }
.fb-send[disabled] { opacity: .6; cursor: default; }

/* ---------- A campaign's material: ads and resources in one section (#359, campaign-material.js) ---------- */
.mat-kinds { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .8rem; }
.mat-kind { font: inherit; font-size: .871rem; min-height: 32px; padding: 0 .7rem; border-radius: var(--r-tag); border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.mat-kind em { font-style: normal; color: var(--muted); margin-left: .2rem; }
.mat-kind[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.mat-feature { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: center; padding: .75rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); margin-bottom: .9rem; }
.mat-feature__pic { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-ctl); overflow: hidden; background: var(--bg); }
.mat-feature__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-feature__text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.mat-feature__label { font-size: .765rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.mat-feature__text b { font-size: 1.084rem; line-height: 1.3; }
.mat-feature__text small { color: var(--muted); }
.mat-feature__text a { font-weight: 700; }
.mat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.mat-grid--more .mat:nth-child(n + 9) { display: none; }
.mat[hidden], .mat-feature[hidden], .mat-sets[hidden] { display: none !important; }
.mat > a, .mat > span { display: flex; flex-direction: column; gap: .35rem; color: inherit; text-decoration: none; height: 100%; }
.mat > a:hover b { text-decoration: underline; }
.mat__pic { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-ctl); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.mat__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* No picture: name the kind on a plain tile rather than leave a grey box. */
.mat__pic--none::before { content: attr(data-kind); position: absolute; inset: 0; display: grid; place-items: center; padding: .5rem; text-align: center; font-size: .797rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mat__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; display: grid; place-items: center; font-size: .85rem; pointer-events: none; }
.mat-feature__pic .mat__play { width: 52px; height: 52px; font-size: 1.062rem; }
.mat__text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.mat__text b { font-size: .914rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mat__text small { font-size: .786rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mat-all { font: inherit; font-weight: 700; margin-top: .8rem; min-height: 36px; padding: 0 .9rem; border-radius: var(--r-ctl); border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.mat-sets { margin-top: .9rem; }
@media (max-width: 560px) {
  .mat-feature { grid-template-columns: 1fr; }
  .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mat__text small:empty, .mat-feature__text small:empty { display: none; }
/* Campaign pop-up, daily.dev layout (#365): title and description first, the picture under them,
   and a side column with the card bar and who's behind it. On phones the column sits under the header. */
/* Wider when there's a right column (Kalman, 2026-11-14). --mw also places the outside arrows. */
dialog#modal:has(.detail--split) { --mw: 1240px; width: min(var(--mw), calc(100vw - 32px)); }
@media (min-width: 801px) { dialog#modal:has(.detail--split):has(.mpager:not(:empty)) { width: min(var(--mw), calc(100vw - 168px)); } }
/* The card bar sits in the top strip, next to ✕. Its menus open downward (bar(..., { top: true })). */
.mnav__acts:empty { display: none; }
.mnav__acts { flex: none; width: min(300px, 46vw); }
.mnav__acts .cact { width: 100%; }
@media (max-width: 800px) { .mnav__acts { flex: 1; width: auto; } .mnav:has(.mnav__acts:not(:empty)) .mnav__seq { display: none; } }
.detail--split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "head side" "main side"; column-gap: 32px; align-items: start; }
.detail--split > .detail__head { grid-area: head; min-width: 0; }
.detail--split > .detail__main { grid-area: main; min-width: 0; }
.detail--split > .detail__side { grid-area: side; position: sticky; top: 72px; z-index: 1; display: grid; gap: 12px; margin-top: 6px; }
.detail--split .detail__head h1 { margin-top: 4px; }
.detail--split .cover--big { aspect-ratio: 2 / 1; max-height: 340px; margin: 6px 0 18px; }
.detail--split .cover--big.cover--logo { aspect-ratio: auto; height: 190px; }
.side__box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 10px 12px; }
.behind h2 { margin: 2px 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.behind__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.behind__row { display: flex; align-items: center; gap: 10px; }
.behind__org { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.behind__org .ologo { width: 36px; height: 36px; margin: 0; vertical-align: 0; }
.behind__org span { min-width: 0; display: grid; gap: 1px; }
.behind__org b { font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.behind__org small { font-size: 13px; color: var(--muted); }
.behind__org:hover b, .behind__org:focus-visible b { color: var(--accent); text-decoration: underline; }
.behind__more { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.org__follow { margin: 6px 0 8px; }
@media (max-width: 900px) {
  .detail--split { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "main"; }
  .detail--split > .detail__side { position: static; margin: 2px 0 16px; }
}

/* The pop-up's breadcrumb (#365): Campaigns › area › topic, then the place in the list underneath. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; font-size: 15px; line-height: 1.35; }
.crumbs a { color: var(--ink); font-weight: 650; text-decoration: none; }
.crumbs a:first-child { color: var(--muted); font-weight: 500; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--accent); text-decoration: underline; }
.crumbs__sep { color: var(--muted); }
.crumbs__more { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 0 7px; cursor: help; }
.crumbs + .mnav__where { margin-top: 2px; font-size: 13px; }
.mnav__where .mnav__list { display: inline; }
/* On phones the strip belongs to the card bar, so the breadcrumb goes above the title instead (Kalman, 2026-11-14). */
.crumbs--head { display: none; }
@media (max-width: 800px) { .mnav .crumbs { display: none; } .crumbs--head { display: flex; margin: 0 0 8px; font-size: 14px; } }

/* ---------- Links that open a new tab (#400) ----------
   Every link that opens a new tab, or goes to another website, ends in a small new-tab icon, drawn
   here so no file types a ↗ of its own. Not on links that are only a picture, nor on a card's
   whole-card title link, whose ::after is the click area: those place a <span class="newtab">. */
:root { --newtab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.5 3.5h5v5M16.5 3.5 9.25 10.75M14.5 11.5v3.75a1.25 1.25 0 0 1-1.25 1.25h-8.5a1.25 1.25 0 0 1-1.25-1.25v-8.5A1.25 1.25 0 0 1 4.75 5.5H8.5'/%3E%3C/svg%3E"); }
:is(a[target="_blank"], a[href^="http://"], a[href^="https://"]):not(.card__title a, .noext):not(:has(img, svg, video))::after {
  content: "";
  content: "" / " (opens in a new tab)";
}
:is(a[target="_blank"], a[href^="http://"], a[href^="https://"]):not(.card__title a, .noext):not(:has(img, svg, video))::after,
.newtab {
  display: inline-block; width: .78em; height: .78em; margin-left: .3em; vertical-align: -.05em;
  background-color: currentColor; opacity: .7;
  -webkit-mask: var(--newtab-icon) center / contain no-repeat; mask: var(--newtab-icon) center / contain no-repeat;
}

/* ---------- A resource's pop-up (#/resource/<id>, #400) ---------- */
.rx-detail .card__kind { margin: 0 0 4px; }
.rx-detail .card__by { margin: 0 0 10px; color: var(--muted); }
.rx-go { margin: 14px 0 18px; }
.rx-go__btn { display: inline-flex; align-items: center; gap: 2px; padding: 9px 16px; border-radius: var(--r-ctl); background: var(--accent); color: var(--panel); font-weight: 600; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.rx-go__btn:hover, .rx-go__btn:focus-visible { filter: brightness(1.1); }
.rx-detail__img { display: block; max-width: 100%; max-height: 320px; margin: 0 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line); object-fit: contain; background: #fff; }
.rx-detail .facts .pill { margin: 0 4px 4px 0; }
/* The card's link out to the site the thing lives on; the title opens the pop-up. */
.rx-out { position: relative; z-index: 1; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.rx-out:hover, .rx-out:focus-visible { color: var(--accent); text-decoration: underline; }

/* ---------- A campaign that is really a shelf (#299) ----------
   Sheets peeking out under the card, so a campaign holding a library of resources reads as
   a pile before you open it. Bottom edge only: the grid's 1rem gap has room under a card,
   none beside the last column. The card keeps its own picture — stacking its members'
   pictures is for a collection, which has none of its own (featured-images.md). */
.grid > li.pile { position: relative; }
.grid > li.pile::before,
.grid > li.pile::after { content: ""; position: absolute; z-index: 0; height: 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 2px 5px rgba(30,30,20,.07); }
/* The sheets sit on the page's own background, which is nearly the card's, so they are tinted
   with the text colour: that tells them apart in both the light and the dark theme. */
.grid > li.pile::before { left: 5px; right: 5px; bottom: -6px; background: color-mix(in srgb, var(--ink) 7%, var(--panel)); }
.grid > li.pile::after { left: 11px; right: 11px; bottom: -12px; background: color-mix(in srgb, var(--ink) 14%, var(--panel)); }
.grid > li.pile .card { z-index: 1; }
/* The count rides on the picture with the topic chips (#301), so it wears their plate: the
   same .66 alpha that carries the contrast over a light photo. */
.cover__tags .card__pile { display: inline-flex; align-items: center; padding: .12rem .42rem; border-radius: var(--r-tag); background: rgba(10,16,22,.66); color: #fff; font-size: .701rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: help; }
@supports (backdrop-filter: blur(6px)) { .cover__tags .card__pile { backdrop-filter: blur(6px) saturate(1.1); } }
/* ---- Ask (addiction-action.org home + #/ask): question box, suggestion pop-up, answer ---- */
/* The front page (#474). Set like the first page of a reference book, not like a search product:
   a headline in the serif under a short leaf-green rule, the question box, then the library's
   contents as a ruled ledger with the counts as figures, then the topics as a plain list. */
.ask-home { max-width: 1000px; margin: 7vh auto 6vh; }
.ask-home__title { font-size: clamp(2rem, 5.2vw, 3.5rem); line-height: 1.04; letter-spacing: -.022em; margin: 0 0 14px; max-width: 17ch; text-wrap: balance; }
.ask-home__title::before { content: ""; display: block; width: 56px; height: 5px; margin-bottom: 22px; background: var(--leaf); }
.ask-home__sub { max-width: 58ch; margin: 0 0 26px; color: var(--muted); font-size: 1.147rem; }
.ask-home__groups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.ask-cat { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); font: inherit; font-size: 1.009rem; font-weight: 500; padding: 7px 14px 7px 11px; cursor: pointer; }
.ask-cat:hover, .ask-cat:focus-visible { border-color: var(--accent); color: var(--accent); }
.ask-cat svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.ask-home__more { margin: 0 0 0 6px; font-size: 1.009rem; }
.ask-home__try { margin: 14px 0 0; color: var(--muted); font-size: 1.009rem; }
.ask-home__try a { display: inline-block; margin-left: 14px; color: var(--accent); white-space: nowrap; }
.ask-home__try a:first-child { margin-left: 8px; }
.ask-home__note { margin: 22px 0 0; max-width: 78ch; color: var(--muted); font-size: .871rem; }
.home__topics { margin: 40px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 8px 24px; }
.home__topics h3 { margin: 4px 0 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.home__topics ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.home__topics a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: 1.009rem; font-weight: 500; }
.home__topics a span { display: inline-grid; color: var(--accent); }
.home__topics a svg { width: 18px; height: 18px; }
.home__topics a:hover, .home__topics a:focus-visible { color: var(--accent); text-decoration: underline; }
.home__topics .home__topics-all { color: var(--accent); font-weight: 700; }
.home__topics .home__topics-all::after { content: "→"; }
@media (max-width: 700px) { .home__topics { grid-template-columns: 1fr; } }
/* A rounded rectangle, not a pill: the box holds a few lines of a long question and grows into them. */
.ask-box { display: flex; align-items: flex-end; gap: 8px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--panel); padding: 8px 8px 8px 16px; box-shadow: var(--shadow); text-align: left; }
.ask-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ask-box > svg { flex: none; width: 22px; height: 22px; color: var(--muted); margin-bottom: 12px; }
.ask-box textarea { flex: 1; min-width: 0; display: block; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.169rem; line-height: 1.45; padding: 11px 0; outline: none; resize: none; overflow-y: hidden; min-height: 3em; }
.ask-box button { flex: none; border: 0; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; padding: 11px 26px; cursor: pointer; }
.ask-box button:hover, .ask-box button:focus-visible { filter: brightness(1.1); }
/* The gear in the question box: effort and sources, as on SmartSearch. A dot says a setting is off its default. */
.ask-box .ask-set { position: relative; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: var(--radius); background: none; color: var(--muted); }
.ask-box .ask-set:hover, .ask-box .ask-set:focus-visible { background: var(--bg); color: var(--accent); filter: none; }
.ask-set svg { width: 21px; height: 21px; display: block; }
.ask-set__dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
.ask-set-sum { margin: 10px 0 0; font-size: .903rem; color: var(--muted); }
.ask-set-sum__btn { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); font: inherit; padding: 3px 12px; cursor: pointer; }
.ask-set-sum__btn:hover, .ask-set-sum__btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.ask-box--top + .ask-set-sum { margin: -16px 0 22px; text-align: left; }
.ask__used { margin: -10px 0 16px; font-size: .935rem; }
.ask__also { margin: -8px 0 16px; font-size: .935rem; }
.ask__used + .ask__also { margin-top: -12px; }
.askset { width: min(640px, 94vw); }
.askset__h { margin: 22px 0 6px; font-size: .829rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.askset .askdlg__sub { margin-bottom: 12px; }
.askset__effort { margin: 0 22px; }
.askset__effort input[type="range"] { display: block; width: 100%; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.askset__stops { display: flex; justify-content: space-between; margin: 4px -30px 0; }
.askset__stops button { width: 76px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--muted); font: inherit; font-size: .935rem; padding: 4px 0; cursor: pointer; }
.askset__stops button:hover { background: var(--bg); color: var(--ink); }
.askset__stops button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.askset__hint { margin: 10px 0 0; color: var(--muted); font-size: .978rem; }
.askset__srchead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.askset__srchead .linkish { font-size: .903rem; }
.askset__list { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.askset__src + .askset__src { border-top: 1px solid var(--line); }
.askset__row { display: flex; align-items: center; gap: 4px; padding-left: 12px; }
.askset__row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.askset__more { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; padding: 10px 38px 10px 8px; cursor: pointer; border-radius: 0 var(--radius) var(--radius) 0; position: relative; }
.askset__more:hover, .askset__more:focus-visible { background: var(--bg); }
.askset__name { font-weight: 600; font-size: 1.009rem; }
.askset__count { border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent); font-size: .786rem; font-weight: 700; padding: 1px 6px; white-space: nowrap; }
.askset__when { color: var(--muted); font-size: .829rem; }
.askset__when.is-on { display: none; }
.askset__more svg { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--muted); transition: transform .15s; }
.askset__more[aria-expanded="true"] svg { transform: rotate(180deg); }
.askset__tip { margin: 0; padding: 0 14px 12px 42px; color: var(--muted); font-size: .935rem; line-height: 1.5; }
.askset__actions { margin: 20px 0 0; text-align: right; }
.askset__done { border: 0; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; padding: 10px 26px; cursor: pointer; }
.askset__done:hover, .askset__done:focus-visible { filter: brightness(1.1); }
@media (prefers-reduced-motion: reduce) { .askset__more svg { transition: none; } }
@media (max-width: 560px) {
  .ask-box .ask-set { width: 40px; }
  .askset__effort { margin: 0 14px; }
  .askset__stops { margin: 4px -22px 0; }
  .askset__stops button { width: 58px; font-size: .85rem; }
  .askset__tip { padding-left: 14px; }
}
.linkish { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Suggestion pop-up */
.askdlg { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); padding: 0; width: min(620px, 92vw); max-height: 86vh; }
.askdlg::backdrop { background: rgba(0,0,0,.45); }
.askdlg__body { padding: 26px 28px 28px; overflow: auto; max-height: 86vh; }
.askdlg__x { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: var(--muted); font-size: 1.169rem; cursor: pointer; line-height: 1; padding: 6px; }
.askdlg__x:hover { color: var(--ink); }
.askdlg__h { margin: 0 0 6px; font-size: 1.434rem; }
.askdlg__sub { margin: 0 0 18px; color: var(--muted); font-size: .978rem; }
.askdlg__sub b { color: var(--accent); font-weight: 600; }
.askdlg__gh { margin: 22px 0 8px; font-size: 1.009rem; color: var(--muted); font-weight: 600; }
.askdlg__list { list-style: none; margin: 0; padding: 0; }
.askdlg__list button { display: flex; gap: 12px; width: 100%; text-align: left; border: 1px solid transparent; border-radius: var(--radius); background: none; color: var(--ink); font: inherit; padding: 11px 12px; cursor: pointer; }
.askdlg__list button:hover, .askdlg__list button:focus-visible { border-color: var(--line); background: var(--bg); }
.askdlg__list button span { line-height: 1.45; } /* long questions wrap over two or three lines */
.askdlg__list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.askdlg__slot { font-style: normal; color: var(--accent); }

/* Answer page */
.ask { max-width: 820px; margin: 28px auto 64px; padding: 0 20px; }
.ask-box--top { margin-bottom: 26px; }
.ask__q { font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.25; margin: 0 0 14px; }
.ask__status { color: var(--muted); font-size: 1.009rem; margin: 0 0 16px; }
.ask__status::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--accent); animation: ask-pulse 1.1s ease-in-out infinite; vertical-align: middle; }
.ask__status--bad { color: var(--harm); }
.ask__status--bad::after { display: none; }
/* The reader has used the questions SmartSearch answers without an account (#413). */
.ask__status--gate { color: var(--ink); background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; line-height: 1.5; }
.ask__status--gate::after { display: none; }
@keyframes ask-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ask__status::after { animation: none; opacity: .7; } }
.ask__answer { font-size: 1.105rem; line-height: 1.65; }
.ask__answer p { margin: 0 0 14px; }
.ask__answer ul { margin: 0 0 14px; padding-left: 20px; }
.ask__answer li { margin-bottom: 7px; }
.ask__lead { margin: 22px 0 8px !important; font-weight: 600; }
.ask__lead strong { font-weight: 600; }
.cite { display: inline-block; margin: 0 0 0 2px; padding: 0 5px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent); font-size: .72em; font-weight: 600; text-decoration: none; vertical-align: 2px; white-space: nowrap; }
.cite:hover, .cite:focus-visible { background: var(--accent); color: var(--panel); }
.ask__after { margin-top: 28px; }
.ask__also { margin: 0 0 10px; }
.ask__left { color: var(--muted); font-size: .956rem; margin: 0 0 10px; }
.ask__left--last { color: var(--ink); background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; line-height: 1.5; }
.ask__caveat { color: var(--muted); font-size: .903rem; margin: 0; }
.ask__sources { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 22px; }
.ask__sources h3 { margin: 0 0 14px; font-size: 1.116rem; }
.asrc__list { list-style: none; margin: 0; padding: 0; }
.asrc { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.asrc:last-child { border-bottom: 0; }
.asrc__tag { flex: none; align-self: flex-start; padding: 2px 7px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent); font-size: .786rem; font-weight: 600; text-decoration: none; }
.asrc__title { font-weight: 600; color: var(--ink); text-decoration: none; }
.asrc__title:hover, .asrc__title:focus-visible { color: var(--accent); text-decoration: underline; }
.asrc__meta { margin: 3px 0 0; font-size: .903rem; }
.asrc__snip { margin: 5px 0 0; color: var(--muted); font-size: .956rem; line-height: 1.5; }
@media (max-width: 760px) {
  .ask-home { margin-top: 4vh; }
  .ask-box { padding-left: 14px; }
  .ask-box button { padding: 11px 16px; }
  .ask-box textarea { font-size: 1.084rem; min-height: 3.4em; }

  .ask-cat { justify-content: center; }
  .askdlg__body { padding: 22px 18px 24px; }
}

/* Answer page: a tab per kind of thing the search found (#218) */
.ask-tabs { display: flex; align-items: flex-end; gap: 8px; position: relative; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.ask-tabs__row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.ask-tabs__row::-webkit-scrollbar { display: none; }
.ask-tabs__row button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; border-radius: var(--r-ctl) var(--r-ctl) 0 0; background: none; color: var(--muted); font: inherit; padding: 9px 13px; cursor: pointer; }
.ask-tabs__row button:hover { color: var(--ink); }
.ask-tabs__row button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.ask-tabs__n { display: inline-block; min-width: 20px; text-align: center; border-radius: var(--r-round); background: var(--bg); color: var(--muted); font-size: .807rem; font-weight: 600; padding: 1px 6px; }
.ask-tabs__row button[aria-selected="true"] .ask-tabs__n { background: var(--accent-soft); color: var(--accent); }
.ask-pane__head { margin: 0 0 14px; font-size: .956rem; }

/* Why a source is here: the words of the question it actually mentions */
.asrc__covers { margin: 7px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.asrc__k { font-size: .765rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.asrc__cov { border: 1px solid var(--line); border-radius: var(--r-tag); background: var(--bg); color: var(--muted); font-size: .807rem; padding: 1px 8px; }

/* Citation tooltip */
.asktip { position: absolute; z-index: 60; width: min(380px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 13px 15px; font-size: .935rem; line-height: 1.5; }
.asktip[hidden] { display: none; }
.asktip__top { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; }
.asktip__kind { font-weight: 600; }
.asktip__from { color: var(--muted); font-size: .85rem; }
.asktip__title { margin: 0 0 5px; font-weight: 600; line-height: 1.35; }
.asktip__meta { margin: 0 0 6px; color: var(--muted); font-size: .85rem; }
.asktip__snip { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.asktip__covers { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.asktip__go { margin: 9px 0 0; }
.asktip__go a { color: var(--accent); font-weight: 600; text-decoration: none; }
.asktip__go a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .ask-tabs__row button { padding: 9px 10px; font-size: 1.009rem; }
}

/* Text message sequences in a resource's pop-up (#429): the texts as a phone thread, replies that open to the answer. */
.sms { margin: 8px 0 20px; }
.sms h2 { font-size: 1.116rem; margin: 0 0 4px; }
.sms-sum { margin: 0 0 8px; }
.sms-review { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--accent-soft); font-weight: 600; font-size: .956rem; }
.sms-review span { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.sms-review--draft { border-color: color-mix(in srgb, var(--harm) 45%, var(--line)); background: color-mix(in srgb, var(--harm) 8%, var(--panel)); }
.sms-phone { max-width: 400px; border: 1px solid var(--line); border-radius: 28px; padding: 14px 10px; background: var(--bg); box-shadow: var(--shadow); }
.sms-thread { max-height: 520px; overflow-y: auto; padding: 0 6px; display: flex; flex-direction: column; gap: 6px; }
.sms-day { align-self: center; margin: 10px 0 2px; font-size: .765rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.sms-in, .sms-out { max-width: 82%; padding: 8px 12px; border-radius: 18px; font-size: .956rem; line-height: 1.35; overflow-wrap: anywhere; }
.sms-in { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink); }
.sms-out { align-self: flex-end; margin-left: auto; background: var(--accent); color: var(--panel); border-bottom-right-radius: 6px; }
.sms-in p, .sms-out p { margin: 0; }
.sms-meta { display: block; margin-top: 4px; font-size: .744rem; color: var(--muted); }
.sms-replies { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; margin: 0 0 4px; }
.sms-replies__lead { width: 100%; text-align: right; font-size: .765rem; color: var(--muted); }
.sms-reply { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sms-reply[open] { flex-basis: 100%; }
.sms-reply summary { cursor: pointer; list-style: none; padding: 3px 10px; border-radius: var(--r-round); border: 1px solid var(--accent); color: var(--accent); font-size: .85rem; background: var(--panel); }
.sms-reply summary::-webkit-details-marker { display: none; }
.sms-reply summary .muted { font-size: .765rem; }
.sms-reply[open] summary { background: var(--accent); color: var(--panel); }
.sms-reply[open] summary .muted { color: inherit; opacity: .8; }
.sms-reply .sms-in { align-self: flex-start; }
.sms-files { margin-top: 12px; font-size: .903rem; }
.sms-out { width: fit-content; }
.sms-based { margin: 6px 0; }
@media (max-width: 600px) { .sms-thread { max-height: none; overflow: visible; } .sms-phone { border-radius: 20px; } }

/* Follow an organisation: what to see, our-index note, claim email (follow-choice.js, #459). */
.org__unclaimed { margin: -2px 0 8px; font-size: .871rem; color: var(--muted); max-width: 52ch; }
.hfol__types { border: 0; padding: 0; margin: .8rem 0 0; display: grid; gap: .35rem; }
.hfol__type { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--cact-line); border-radius: var(--radius); cursor: pointer; }
.hfol__type:has(input:checked) { border-color: var(--cact-edge); background: var(--cact-soft); }
.hfol__type input { width: 18px; height: 18px; margin: 0; accent-color: var(--cact-accent); }
.hfol__lbl { font-weight: 600; }
.hfol__n { font-size: .871rem; color: var(--cact-muted); font-variant-numeric: tabular-nums; }
.hfol__n--none { font-style: italic; }
.hfol__note { margin: .8rem 0 0; padding: .6rem .8rem; border-radius: var(--radius); border-left: 3px solid var(--cact-accent); background: var(--cact-hover); font-size: .914rem; line-height: 1.45; }
.hfol__note p { margin: 0; }
.hfol__note p + p { margin-top: .4rem; color: var(--cact-muted); }
.hfol__err { margin: .5rem 0 0; color: var(--cact-bad); font-size: .914rem; }
.hfol__row .cact-btn:last-child { margin-left: 0; }
.hfol__claim { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--cact-line); font-size: .935rem; }
.cact-dlg .hfol__claim h3 { margin: 0 0 .3rem; font-size: 1.062rem; text-transform: none; letter-spacing: 0; color: var(--cact-ink); }
.hfol__claim p { margin: 0 0 .5rem; line-height: 1.45; }
.hfol__field { display: grid; gap: .2rem; margin-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--cact-muted); }
.hfol__field input, .hfol__field textarea { font: inherit; font-size: 17px; font-weight: 400; color: var(--cact-ink); background: var(--cact-bg); border: 1px solid var(--cact-line); border-radius: var(--radius); padding: .45rem .65rem; box-sizing: border-box; width: 100%; }
.hfol__field textarea { resize: vertical; line-height: 1.4; }
.hfol__send { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.hfol__send .cact-btn { display: inline-flex; align-items: center; text-decoration: none; font-size: .903rem; }
.hfol__send .cact-btn:last-child { margin-left: 0; }
.hfol__copied { min-height: 1.2em; margin: .4rem 0 0; font-size: .871rem; color: var(--cact-muted); }
/* Organisations (#433): a library organisation's card in the one list, its logo beside it. */
.org-row .jx-row__title .org-link { font-weight: 600; }
.org-row .nf-facts-row b { font-weight: 600; color: var(--ink); }

/* Organisations as cards (#493): a grid of raised panels, two or three across, one logo tile size for all. */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; border-top: 0; }
.ocard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
.ocard:hover { box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--panel); }
.ocard__head { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.ocard__name { min-width: 0; display: grid; gap: 2px; }
.ocard .jx-row__title { font-size: 18px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.ocard .jx-row__title, .ocard .jx-row__title a { text-decoration: none; }
.ocard .jx-row__title a:hover, a.jx-row__title:hover { text-decoration: underline; }
.ocard .nf-facts-row { margin-top: 0; }
.ocard .nf-row__summary { margin: 0; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.ocard .nf-actions { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.ocard .nf-tags + .nf-actions, .ocard .nf-row__summary + .nf-actions { margin-top: auto; }
/* The tile: 100 by 64, white, so a square mark and a 10:3 wordmark come out about the same weight. */
.otile { flex: none; display: grid; place-items: center; width: 100px; height: 64px; box-sizing: border-box; padding: 5px 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.otile img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.otile:not(.otile--wide) img { width: 54px; height: 54px; }
.otile--wide img { width: 100%; height: 100%; }
.otile--dark { background: #1f2a30; border-color: #1f2a30; }
.otile img ~ .oicon { display: none; }
.otile--icon, .otile:has(> .oicon:only-child) { background: color-mix(in srgb, var(--bg) 60%, var(--panel)); }
.otile .ologo { width: 40px; height: 40px; margin: 0; vertical-align: 0; }
@media (max-width: 560px) {
  .ocard { padding: 14px; }
  .otile { width: 76px; height: 52px; padding: 4px 6px; }
  .otile:not(.otile--wide) img { width: 44px; height: 44px; }
  .otile .ologo { width: 32px; height: 32px; }
}

/* The Today link in the top bar (#483): a page, not a menu, so no chevron. */
.top-link { display: inline-flex; align-items: center; font-size: 16px; font-weight: 500; color: var(--top-muted); text-decoration: none; border-radius: var(--r-ctl); padding: 7px 11px; white-space: nowrap; }
.top-link:hover { color: var(--top-ink); background: var(--top-hover); }
.top-link.on { color: var(--top-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--leaf); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
@media (max-width: 800px) { .top-link { padding: 10px 4px; font-weight: 600; } }

/* Topic page as one list (#489): the library's layout under the hero, so the page is as wide as the library. */
.isx.tpx { max-width: none; }
.tpx .isx-hero, .tpx .tpx-deep { max-width: 1100px; }
.tpx-list { margin-top: 22px; }
.tpx-list__h { margin: 0 0 12px; font-size: 1.381rem; }
.tpx-num--on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tpx-lib { font-size: 14px; font-weight: 600; }
.tpx-more { margin: 18px 0 0; display: flex; gap: 12px; align-items: baseline; }
.tpx-more__btn { font: inherit; font-weight: 600; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); cursor: pointer; }
.tpx-more__btn:hover, .tpx-more__btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.tpx-card .card__foot { margin-top: auto; }

/* Wiki (wiki.js): declarations, pledges and protocols, every version kept */
.wiki { max-width: 760px; }
.wiki__lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.wiki__kind { margin: 28px 0 8px; font-size: 1.1rem; }
.wiki__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wiki__item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.wiki__item p { margin: 6px 0 0; }
.wiki__item--wanted { border-style: dashed; background: transparent; }
.wiki__item--wanted a { color: var(--harm); }
.wiki__chip { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.wiki__chip--wanted { background: transparent; border: 1px dashed var(--harm); color: var(--harm); }
.wiki__chip--adopted { background: color-mix(in srgb, var(--pos) 15%, transparent); color: var(--pos); }
.wiki .meta span::before, .wiki-page .meta span::before { content: "·"; margin: 0 6px; }
.wiki__foot { margin-top: 24px; color: var(--muted); }
.wiki-page { max-width: 1080px; }
.wiki__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.wiki__tabs a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; }
.wiki__tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.wiki__banner { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 10px 14px; margin: 10px 0; border-radius: 4px; }
.wiki__banner--old { background: color-mix(in srgb, var(--mixed) 14%, transparent); border-color: var(--mixed); }
.wiki__banner--ai { background: color-mix(in srgb, #6a4fb3 12%, transparent); border-color: #6a4fb3; }
.wiki__banner--stale { background: color-mix(in srgb, var(--mixed) 14%, transparent); border-color: var(--mixed); }
.wiki__banner--wanted { background: transparent; border: 1px dashed var(--harm); border-left-width: 4px; }
.wiki__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; margin-top: 16px; }
@media (max-width: 860px) { .wiki__grid { grid-template-columns: 1fr; } }
.wiki__side { position: sticky; top: 16px; font-size: 14px; display: grid; gap: 18px; }
.wiki__side h3 { font-size: 14px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wiki__side p, .wiki__side ul { margin: 4px 0; }
.wiki__side ul { padding-left: 18px; }
.wiki__cite { font-family: var(--font-display); background: var(--panel); border: 1px solid var(--line); padding: 8px; border-radius: 4px; }
.wiki__btn { font: inherit; font-weight: 600; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl, 6px); background: var(--panel); color: var(--ink); cursor: pointer; }
.wiki__btn:hover, .wiki__btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.wiki__small { color: var(--muted); font-size: 13px; }
.wiki__para { opacity: 0; text-decoration: none; color: var(--muted); font-size: .8em; padding: 0 4px; }
.wiki__body :is(p, li, h2, h3, h4):hover > .wiki__para, .wiki__para:focus-visible { opacity: 1; }
.wiki__hit { background: color-mix(in srgb, #f5c400 25%, transparent); box-shadow: -8px 0 0 color-mix(in srgb, #f5c400 25%, transparent); transition: background .6s; }
.wiki__notes { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 12px; }
.wiki__notes summary { cursor: pointer; font-weight: 600; }
.wiki__history td, .wiki__history th { vertical-align: top; }
.wiki__compare { margin: 12px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wiki__pick { font: inherit; padding: 4px 8px; }
.wiki__diff .wiki__same { color: var(--muted); }
.wiki__diff ins { background: color-mix(in srgb, var(--pos) 20%, transparent); color: inherit; text-decoration: none; }
.wiki__diff del { background: color-mix(in srgb, var(--harm) 18%, transparent); color: inherit; }
.wiki__diff .wiki__add, .wiki__diff .wiki__del { border-left: 3px solid; padding-left: 8px; }
.wiki__diff .wiki__add { border-color: var(--pos); }
.wiki__diff .wiki__del { border-color: var(--harm); }
.wiki__diff .wiki__changed { border-left: 3px solid var(--mixed); padding-left: 8px; }
/* Wiki editing (#501): the ¶ menu, a paragraph suggestion, the page editor and the review queue */
.wiki__pmenu { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: 1px; }
.wiki__pmenu button { font: inherit; font-size: 13px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); cursor: pointer; }
.wiki__pmenu button:hover, .wiki__pmenu button:focus-visible { border-color: var(--accent); color: var(--accent); }
.wiki__body .wiki__pmenu ~ .wiki__para, .wiki__body :has(> .wiki__pmenu) > .wiki__para { opacity: 1; }
.wiki__suggest, .wiki__editor { display: grid; gap: 10px; margin: 10px 0 18px; font-size: 15px; }
.wiki__suggest { background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; padding: 12px 14px; }
.wiki__suggest label, .wiki__editor label { display: grid; gap: 4px; font-weight: 600; }
.wiki__suggest textarea, .wiki__editor textarea, .wiki__suggest input[name=reason], .wiki__editor input[name=reason], .wiki__decide input { font: inherit; font-weight: 400; width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl, 6px); background: var(--bg, var(--panel)); color: var(--ink); }
.wiki__editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.5; min-height: 50vh; }
.wiki__editor .wiki__tabs button { font: inherit; font-size: 14px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.wiki__editor .wiki__tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.wiki__preview { border: 1px solid var(--line); border-radius: 8px; padding: 4px 18px; min-height: 50vh; }
.wiki__check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.wiki__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.wiki__btn--go { background: var(--accent); border-color: var(--accent); color: #fff; }
.wiki__btn--go:hover, .wiki__btn--go:focus-visible { color: #fff; filter: brightness(1.1); }
.wiki__btn[disabled] { opacity: .6; cursor: wait; }
a.wiki__btn { display: inline-block; text-decoration: none; }
.wiki__wdiff:empty { display: none; }
.wiki-page :is(.wiki__wdiff, .wiki__sugg) ins { background: color-mix(in srgb, var(--pos) 20%, transparent); color: inherit; text-decoration: none; }
.wiki-page :is(.wiki__wdiff, .wiki__sugg) del { background: color-mix(in srgb, var(--harm) 18%, transparent); color: inherit; }
.wiki__sugg { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 12px 0; max-width: 820px; }
.wiki__sugg > p { margin: 6px 0; }
.wiki__sugg .wiki__changed { border-left: 3px solid var(--mixed); padding-left: 8px; white-space: pre-wrap; }
.wiki__diff--short { max-height: 420px; overflow: auto; }
.wiki__decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.wiki__decide input { flex: 1 1 260px; width: auto; }
.wiki__chip--merged, .wiki__chip--approved { background: color-mix(in srgb, var(--pos) 15%, transparent); color: var(--pos); }
.wiki__chip--declined, .wiki__chip--failed, .wiki__chip--withdrawn { background: color-mix(in srgb, var(--harm) 12%, transparent); color: var(--harm); }
.wiki__improve ul { padding-left: 18px; }

/* The finder (#509): the Find resources tab of the Resources pop-up. */
.fd-about { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; font-size: .95rem; }
.fd-about p { margin: 0; }
.fd-about__not { color: var(--muted); margin-top: 6px !important; }
.fd-side, .fd-link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
.fd-thread { display: flex; flex-direction: column; gap: 8px; }
.fd-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; line-height: 1.4; }
.fd-msg--bot { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; font-weight: 600; }
.fd-msg--me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.fd-chip { font: inherit; font-size: .95rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); cursor: pointer; }
.fd-chip em { font-style: normal; color: var(--muted); font-size: .85em; margin-left: 2px; }
.fd-chip:hover, .fd-chip:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.fd-chip--skip { color: var(--muted); border-style: dashed; }
.fd-say { display: flex; gap: 8px; margin: 10px 0 4px; }
.fd-say input { flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.fd-say button, .fd-go { font: inherit; padding: 8px 14px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; cursor: pointer; }
.fd-sofar { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.fd-results { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.fd-results__head { margin: 0 0 8px; }
.fd-wait { color: var(--muted); font-weight: 400; }
.fd-hits { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.fd-hit { display: grid; gap: 2px; }
.fd-hit__title { font-weight: 600; }
.fd-hit__meta { color: var(--muted); font-size: .85rem; }
.fd-hit__why { font-size: .92rem; }
.fd-note { background: var(--accent-soft); border-radius: var(--radius); padding: 8px 12px; margin: 12px 0 0; font-size: .92rem; }
.fd-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.fd-again { font: inherit; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; color: var(--ink); cursor: pointer; }
.rx-intro .rx-not { color: var(--muted); font-size: .95rem; margin-top: -4px; }
@media (max-width: 600px) { .fd-msg { max-width: 95%; } .fd-say button { padding: 8px 10px; } }

/* Grants from Form 990 Schedule I on a nonprofit's record (#282). */
.nf-grants { margin-top: 22px; }
.nf-grants__sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; }
.nf-grants__side h3 { margin: 12px 0 2px; font-size: 16px; }
.nf-grants__side > p { margin: 0 0 8px; }
.nf-grants__list { list-style: none; margin: 0; padding: 0; }
.nf-grants__list li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.nf-grants__amt { flex: 0 0 4.2em; font-weight: 600; font-variant-numeric: tabular-nums; }
.nf-grants__who { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Claim your organisation (#542): the claimed line and the organisation's own lists on its page. */
.org__claimed { margin: .35rem 0 0; font-size: .9rem; color: var(--ink); font-weight: 600; }
.org-list { margin: 1rem 0 0; }
.org-list h2 { font-size: 1rem; margin: 0 0 .3rem; }
.org-list__items { margin: 0; padding-left: 1.1rem; font-size: .92rem; line-height: 1.55; }
.org-claim__check { display: flex; gap: .4rem; align-items: center; margin-top: .6rem; font-size: .9rem; }
.cact-dlg__err { color: #b42318; margin: .5rem 0 0; }
.org-claim__q { font-size: .85rem; margin-top: .6rem; }
.org-claim__ways { border: 0; padding: 0; margin: .8rem 0 0; }
.org-claim__ways legend { font-size: .9rem; font-weight: 600; padding: 0; }
.org-claim__ways label { display: flex; gap: .45rem; align-items: baseline; margin-top: .45rem; }
.org-claim__ways .org-claim__sub { padding-left: 1.5rem; }
.org-claim__token { overflow-wrap: anywhere; background: var(--cact-bg, transparent); border: 1px solid var(--cact-line, #ccc); border-radius: 8px; padding: .45rem .6rem; font-size: .85rem; }
.org-list__items .muted { margin-left: .25rem; }
.cact-dlg__warn { color: #b54708; margin: .5rem 0 0; }
.cact-form label { display: block; margin-top: .6rem; font-size: .9rem; }
.cact-form [hidden] { display: none !important; }
.cact-form input:not([type=checkbox]):not([type=radio]), .cact-form select { width: 100%; font: inherit; font-size: 16px; padding: .5rem .7rem; border: 1px solid var(--cact-line, #ccc); border-radius: 10px; box-sizing: border-box; margin-top: .25rem; }

/* Knowledge graph page for editions that build graph.json (#549, graph-page.js) */
.graph { max-width: 820px; }
.graph__lead { font-size: 17px; color: var(--muted); max-width: 64ch; }
.graph__q { width: 100%; max-width: 520px; padding: 10px 12px; font: inherit; border: 1px solid var(--line, #ccd); border-radius: 8px; background: var(--card, transparent); color: inherit; }
.graph__kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.graph__kinds .chip em { font-style: normal; opacity: .7; margin-left: 4px; }
.graph__kinds .chip--on { outline: 2px solid var(--accent); }
.graph__list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.graph__rel { font-size: 1rem; margin: 18px 0 6px; } .graph__rel em { font-style: normal; color: var(--muted); font-weight: 400; }
.graph__side-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 24px; }
.home__note { color: var(--muted); max-width: 70ch; margin-top: 18px; }

/* Links and reviews, at the foot of a pop-up (#553, graph.js). Every line ends with who said it. */
.kg { margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.kg h2 { font-size: 1.1rem; margin: 0 0 8px; }
.kg h3 { font-size: .98rem; margin: 16px 0 6px; }
.kg ul { list-style: none; margin: 0; padding: 0; }
.kg__rels li, .kg__marks li, .kg__pending li { padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.kg__p { font-weight: 600; }
.kg__who, .kg__dom { display: block; color: var(--muted); font-size: 13px; }
.kg__who a { color: inherit; }
.kg__q .kg__who { display: inline; }
.kg__mark--again { border-left: 3px solid var(--mixed); padding-left: 8px !important; }
.kg__none, .kg__hint { color: var(--muted); font-size: 13.5px; margin: 4px 0; }
.kg__use li { padding: 3px 0; } .kg__use li > span:first-child { font-weight: 600; margin-right: .35rem; }
.kg__n { color: var(--muted); font-size: 13px; }
.kg__ask, .kg__acts, .kg__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.kg__btn { font: inherit; font-size: 14px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: var(--r-ctl); padding: .35rem .8rem; cursor: pointer; min-height: 36px; }
.kg__btn--ghost, .kg__ask .kg__btn { background: transparent; color: var(--accent); }
.kg__ask .kg__btn.is-on { background: var(--accent); color: var(--panel); }
.kg__btn:disabled { opacity: .5; cursor: default; }
.kg__form { margin: 8px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.kg__form label { display: block; margin: 8px 0 0; font-size: 14px; }
.kg__form input, .kg__form select, .kg__form textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: .45rem .6rem; margin-top: 4px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); }
.kg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } @media (max-width: 560px) { .kg__grid { grid-template-columns: 1fr; } }
.kg__hits li { margin: 2px 0; }
.kg__hit { font: inherit; font-size: 14px; text-align: left; width: 100%; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: var(--r-ctl); padding: .35rem .6rem; cursor: pointer; }
.kg__hit:hover, .kg__hit:focus-visible { border-color: var(--accent); }
.kg__ok { color: var(--pos); margin: 0; } .kg__err { color: var(--harm); margin: 6px 0 0; }
