:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.directory-site {
  --map-0: light-dark(#f2f0ea, #1f2127);
  --map-1: light-dark(#dfe2f2, #2a2f4a);
  --map-2: light-dark(#bfc6e8, #3a4275);
  --map-3: light-dark(#8f9bd8, #5662a8);
  --map-4: light-dark(#4f5fbf, #8792dc);
  --map-line: light-dark(#5b5852, #9a978f);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 1rem/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

main { flex: 1; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); line-height: 1.12; letter-spacing: -.015em; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.25; }
h3 { font-size: 1.1rem; line-height: 1.3; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
input, select { accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.frame { width: min(calc(100% - var(--frame-gutter) * 2), var(--frame-width)); margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.sr-only:focus { position: static; clip-path: none; width: auto; height: auto; white-space: normal; }
.skip-link { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .6rem .9rem; background: var(--card); }
.skip-link:not(:focus) { transform: translateY(-200%); }
.directory-pending:not(:empty) {
  position: fixed;
  z-index: 5;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  max-width: calc(100% - 2rem);
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 3px 14px rgb(0 0 0 / .14);
  font-size: .875rem;
  font-weight: 600;
  pointer-events: none;
}
.directory-pending:not(:empty)::before {
  content: "";
  flex: 0 0 .55rem;
  block-size: .55rem;
  border-radius: 50%;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .directory-pending:not(:empty)::before { animation: directory-pending-pulse 1.4s ease-in-out 3; }
}
@keyframes directory-pending-pulse {
  50% { opacity: .4; }
}
.page { padding-block: clamp(1.25rem, 3vw, 2.25rem) 1rem; }
.message-page { min-height: 22rem; }
.message-page p { margin-block: .9rem 1.4rem; }
.lede { max-width: 64ch; margin-top: .75rem; font-size: clamp(1.02rem, 1.6vw, 1.12rem); line-height: 1.6; }
.eyebrow, .rail-heading, .tally h2, .record-section > h2, .section-heading h2.small {
  font: 600 .75rem/1.3 var(--sans);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { margin-bottom: .4rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--button); color: var(--button-text); }
.button.primary:hover { text-decoration: underline; }
.button.secondary { background: var(--card); border-color: var(--field); color: var(--accent); }
.button.secondary:hover { background: var(--surface); }

/* Search */
.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  padding: .25rem;
  padding-inline-start: .75rem;
  border: 1px solid var(--field);
  border-radius: 2px;
  background: var(--card);
}
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-box .search-icon { color: var(--muted); }
.search-box input { width: 100%; min-width: 0; min-height: 44px; padding: .1rem .2rem; border: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box input:focus-visible { outline: 0; }

/* Breadcrumbs */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; margin-bottom: .5rem; color: var(--muted); font-size: .9rem; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; }

/* Catalogue records: one family for publications and software. */
.records { padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.record { display: grid; gap: .3rem; padding: .95rem 0 1.05rem; border-bottom: 1px solid var(--line); }
.record-kind, .record-head .record-kind {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .75rem;
  color: var(--muted);
  font: 400 .84rem/1.4 var(--sans);
}
.record-kind .kind { font-weight: 600; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; }
.record-publication .kind, .publication-page .record-kind .kind { color: var(--publication); }
.record-software .kind, .project-page .record-kind .kind { color: var(--software); }
.record-kind a { color: inherit; }
.record-title { font: 500 1.14rem/1.32 var(--serif); }
.record-software .record-title { font: 600 1.06rem/1.32 var(--sans); }
.record-title a { text-decoration: none; }
.record-title a:hover { text-decoration: underline; }
.record-byline, .record-summary { font-size: .94rem; }
.record-place, .record-evidence, .record-topic { color: var(--muted); font-size: .86rem; }
.record-topic { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.record-place a, .record-topic a, .record-evidence a:not(.evidence) { color: var(--accent); }
.retracted { color: var(--publication); font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; }
.records[data-view="compact"] .record { grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; padding-block: .6rem; }
.records[data-view="compact"] .record-title { grid-row: 1; grid-column: 1; }
.records[data-view="compact"] .record-kind { grid-row: 1; grid-column: 2; justify-content: end; }
.records[data-view="compact"] :is(.record-summary, .record-evidence, .record-place) { display: none; }
.records[data-view="compact"] .record-topic { grid-column: 1 / -1; }

/* Evidence labels: the only tags on the site. */
.evidence, .archive-mark {
  display: inline-block;
  padding: 0 .35rem;
  border: 1px solid var(--field);
  border-radius: 2px;
  color: var(--text);
  font: 600 .74rem/1.55 var(--sans);
  letter-spacing: .02em;
  text-decoration: none;
  vertical-align: .05em;
}
.evidence:hover { text-decoration: underline; }
.evidence-verified { background: var(--verified); color: var(--verified-text); border-color: currentColor; }
.archive-mark { color: var(--muted); }

/* Icons: one 20-unit line family (src/ingest/public-directory-icons.ts). */
.glyph {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.2em;
}
.record-kind .kind { display: inline-flex; align-items: center; gap: .4rem; align-self: center; }
.record-kind .kind .glyph { width: 1.3rem; height: 1.3rem; stroke-width: 1.4; }
.record-study .kind, .study-page .record-kind .kind { color: var(--study); }
.record-dataset .kind, .dataset-page .record-kind .kind, .publication-page .dataset-list .record-kind .kind { color: var(--dataset); }
.evidence { display: inline-flex; align-items: center; gap: .25rem; }
.evidence .glyph { width: 1.05em; height: 1.05em; }
.evidence-verified .glyph-fill { fill: currentColor; fill-opacity: .14; }
.record-place, .record-topic { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1rem; }
/* The evidence line stays one row: long institution lists wrap inside their own item. */
.record .record-evidence { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 0 1rem; }
.record .record-evidence > * { flex: 0 1 auto; }
.record .record-evidence > :is(.evidence-mark, .source-mark) { height: 1.5em; }
.meta-item { display: inline-flex; align-items: flex-start; gap: .35rem; min-width: 0; }
.meta-item > .glyph { margin-top: .12em; }
.record-topic .meta-item, .record-place .meta-item { align-items: center; }
.record-topic .meta-item > .glyph, .record-place .meta-item > .glyph { margin-top: 0; }
.meta-item > .glyph { color: var(--muted); }
.record-topic .meta-item > .glyph { color: var(--accent); }
.evidence-mark, .source-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 2px;
  color: var(--muted);
}
.evidence-mark { margin-inline: -.3rem -.6rem; }
.evidence-mark .glyph, .source-mark .glyph { width: 1.2rem; height: 1.2rem; }
.evidence-mark.is-verified { color: var(--verified-text); }
.evidence-mark.is-verified .glyph-fill { fill: var(--verified); }
.source-mark { margin-inline: -.6rem -.3rem; color: var(--accent); }
.evidence-mark:hover, .source-mark:hover { background: var(--surface); }
.evidence-key { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .75rem; padding: 0; list-style: none; }
.evidence-key li { display: inline-flex; align-items: center; gap: .4rem; }

/* Home */
.home { padding-block: clamp(1.5rem, 4vw, 3rem) 0; }
.home-intro { max-width: 52rem; padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.home-intro .lede { margin-block: .85rem 1.25rem; }
.home-search { max-width: 44rem; }
.home-examples { margin-top: .6rem; color: var(--muted); font-size: .92rem; }
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.home-grid > section > h2, .home-latest .section-heading h2 { font-size: 1.35rem; }
.home-latest .records { margin-top: .6rem; }
.home-place h2 { margin-bottom: .4rem; }
.home-index {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
}
.home-software { margin-top: 2.5rem; }
.home-software .records { margin-top: .6rem; }
.home-labs { margin-top: .9rem; color: var(--muted); font-size: .9rem; max-width: 80ch; }
.as-of { max-width: 72ch; margin-top: 1.5rem; color: var(--muted); font-size: .86rem; }
.home > .as-of { padding-top: 1rem; border-top: 1px solid var(--line); }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
.section-heading > a { display: inline-block; padding-block: .6rem; font-size: .9rem; }

.county-figure { margin-block: .25rem .5rem; }
.county-map { display: block; width: 100%; max-width: 26rem; height: auto; overflow: visible; }
.county-map path { fill: var(--map-fill); stroke: var(--map-line); stroke-width: .8; }
.county-map a:hover path { stroke: var(--accent); stroke-width: 2; }
.county-map text { fill: var(--text); paint-order: stroke; stroke: var(--paper); stroke-width: 2.5px; text-anchor: middle; font: 600 10px var(--sans); pointer-events: none; }
[data-tone="0"] { --map-fill: var(--map-0); }
[data-tone="1"] { --map-fill: var(--map-1); }
[data-tone="2"] { --map-fill: var(--map-2); }
[data-tone="3"] { --map-fill: var(--map-3); }
[data-tone="4"] { --map-fill: var(--map-4); }
.county-figure figcaption { color: var(--muted); font-size: .84rem; }

/* Tallies: name and count rows used for indexes on home and entity pages. */
.tally h2 { padding-bottom: .35rem; border-bottom: 1px solid var(--rule); }
.tally ul { padding: 0; list-style: none; }
.tally li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  break-inside: avoid;
}
.tally li > span { flex: none; color: var(--muted); font-size: .86rem; }
.tally.sites li { display: block; }
.tally.sites li > span { display: block; }
.tally-columns ul { columns: 15rem 3; column-gap: 2rem; }
.tally-more summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); cursor: pointer; font-size: .92rem; text-decoration: underline; text-underline-offset: .18em; }
.tally-more[open] summary { margin-bottom: .25rem; }
.tally h2 .muted { font-weight: 400; }

/* Entity, browse and what's new pages */
.entity-head { max-width: 52rem; padding-bottom: 1.25rem; }
.entity-head .lede a { color: var(--accent); }
.entity-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: .5rem; font-size: .92rem; }
.entity-links a { display: inline-block; padding-block: .6rem; }
.research-search { max-width: 52rem; }
.research-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "filters results" "index results";
  column-gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
  margin-top: 1.5rem;
}
.research-filters { grid-area: filters; display: grid; gap: .65rem; }
.research-results { grid-area: results; min-width: 0; max-width: 52rem; }
.research-index { grid-area: index; display: grid; gap: 1.5rem; margin-top: 2rem; }
.rail-heading { padding-bottom: .35rem; border-bottom: 1px solid var(--rule); }
.research-filters label { display: grid; gap: .2rem; font-size: .88rem; font-weight: 600; }
.research-filters select, .sort-value, .date-control input, .page-jump input {
  width: 100%;
  min-height: 44px;
  padding: .35rem .5rem;
  border: 1px solid var(--field);
  border-radius: 2px;
  background: var(--card);
  color: var(--text);
  font-weight: 400;
}
.rail-note { font-size: .86rem; }
.results-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; padding-bottom: .5rem; }
.results-count { font-size: .95rem; }
.results-links { font-size: .9rem; }
.results-links a { display: inline-flex; align-items: center; min-height: 32px; }
.day-group + .day-group { margin-top: 1.75rem; }
.day-group > h2 { margin-bottom: .4rem; font-size: 1.15rem; }
.empty-result { padding-block: 1.5rem; }
.empty-result h2, .empty-result h3 { margin-bottom: .35rem; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-top: 1.25rem; }
.page-links, .page-jump { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.page-links a, .page-links .current-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: .5rem;
  border-radius: 2px;
}
.page-links a { border: 1px solid var(--line); text-decoration: none; }
.page-links a:hover { background: var(--surface); }
.current-page { background: var(--button); color: var(--button-text); font-weight: 600; }
.page-jump { font-size: .88rem; }
.page-jump input { width: 5rem; }
.pagination > p { font-size: .88rem; }

/* Publication and project pages */
.record-page { max-width: min(100% - var(--frame-gutter) * 2, 64rem); }
.record-head { padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.record-head h1 { margin-top: .35rem; max-width: 46ch; }
.record-head .lede { margin-top: .6rem; }
.byline { max-width: 80ch; margin-top: .75rem; font-size: 1rem; }
.record-head .muted { margin-top: .35rem; font-size: .9rem; }
.record-place { margin-top: .5rem; }
.record-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.retracted-notice { margin-top: .75rem; padding: .5rem .75rem; border-left: 3px solid var(--publication); background: var(--surface); }
.detail-archive { margin-top: .6rem; }
.record-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); margin-top: 1.5rem; }
.record-body > div > .record-section + .record-section, .record-page > .record-section { margin-top: 1.75rem; }
.record-section > h2 { margin-bottom: .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--rule); }
.record-section p + p { margin-top: .55rem; }
.record-section .record-evidence { color: var(--text); font-size: .95rem; }
.detail-links { display: flex; flex-wrap: wrap; column-gap: 1.1rem; }
.detail-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; }
.facts > div { display: grid; grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr); gap: .75rem; padding-block: .45rem; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { font-size: .94rem; }
.plain-list { padding: 0; list-style: none; }
.plain-list li { padding-block: .4rem; border-bottom: 1px solid var(--line); }
.papers { padding: 0; list-style: none; }
.papers li + li { margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.papers cite { font: 500 1.02rem/1.4 var(--serif); }
.papers p { color: var(--muted); font-size: .9rem; }
.related { margin-top: 2.25rem; }
.related .section-heading h2 { font-size: 1.25rem; }
.related .records { margin-top: .5rem; }
.record-report { margin-top: 1.75rem; }
.record-report a { display: inline-flex; align-items: center; min-height: 44px; }
.separator { padding-inline: .2rem; color: var(--muted); }

/* Methodology */
.prose-page { max-width: min(100% - var(--frame-gutter) * 2, 46rem); }
.prose-page section { margin-top: 1.75rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.prose-page section p, .definition-list { margin-top: .6rem; }
.definition-list div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .65rem; padding-block: .4rem; }
.definition-list dt { font-weight: 600; }
.definition-list-stacked div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.prose-page pre { max-width: 100%; overflow-x: auto; }
.definition-list :target { background: var(--surface); }

/* Project tools: the faceted software search and GitHub account pages. */
.results-intro p { margin-block: .55rem 1.15rem; color: var(--muted); }
.results-search { max-width: 52rem; margin-top: 1rem; }
.results-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 3vw, 3rem);
  margin-top: 1.5rem;
}
.results-content, .filters-aside { min-width: 0; }
.results-content { max-width: 52rem; }
.filter-panel > summary, .facet > summary, .check-control { min-height: 44px; }
.filter-panel > summary, .facet > summary {
  align-content: center;
  padding: .4rem .2rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  cursor: pointer;
}
.filter-panel > summary, .filter-sheet-toolbar { display: none; }
.desktop-filter-heading { padding-bottom: .35rem; border-bottom: 1px solid var(--rule); color: var(--muted); font: 600 .75rem/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.filter-body > p, .facet p, .date-control .muted { margin-block: .4rem; font-size: .82rem; }
.facet span.selected-count { margin-left: .35rem; color: var(--muted); font-size: .8rem; }
.facet fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.facet ul { max-height: 13rem; margin: 0; padding: .1rem; list-style: none; overflow: auto; scrollbar-gutter: stable; }
#directory-institution ul { max-height: none; overflow: visible; scrollbar-gutter: auto; }
.facet-more > summary { min-height: 44px; align-content: center; padding-inline: .4rem; color: var(--accent); font-size: .86rem; cursor: pointer; }
.facet-more[open] .facet-more-expand, .facet-more:not([open]) .facet-more-collapse { display: none; }
.facet-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .2rem .3rem;
  font-size: .88rem;
  cursor: pointer;
}
.facet-option:hover, .facet-option:has(input:checked) { background: var(--surface); }
.facet-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.facet-option input:focus-visible { outline: none; }
.option-count { color: var(--muted); font-size: .82rem; }
.facet-option input, .check-control input { width: 1rem; height: 1rem; margin: 0; }
.label-help { display: inline-flex; align-items: center; min-height: 44px; font-size: .84rem; }
.check-control { display: flex; align-items: center; gap: .45rem; font-weight: 600; cursor: pointer; }
.date-control { display: grid; gap: .25rem; font-weight: 600; }
.date-control .muted { font-weight: 400; }
.filter-apply { width: 100%; margin-top: .35rem; }
.directory-enhanced .filter-apply { display: none; }
.results-toolbar, .result-controls, .sort-control, .view-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.results-toolbar { justify-content: space-between; padding-bottom: .5rem; }
.results-toolbar .results-count { white-space: nowrap; }
.sort-control { color: var(--muted); font-size: .88rem; }
.sort-value { width: auto; }
.view-switch { gap: 0; }
.view-switch a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .6rem; border: 1px solid var(--field); font-size: .86rem; font-weight: 600; text-decoration: none; }
.view-switch a:first-child { border-radius: 2px 0 0 2px; }
.view-switch a:last-child { margin-inline-start: -1px; border-radius: 0 2px 2px 0; }
.view-switch a[aria-current] { background: var(--button); border-color: var(--button); color: var(--button-text); }
.active-filters { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; padding-block: .4rem; }
.active-filters ul { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; list-style: none; }
.filter-chip, .reset-link { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .86rem; }
.filter-chip { padding: .25rem .55rem; border: 1px solid var(--line); border-radius: 2px; text-decoration: none; }
.filter-chip:hover, .view-switch a:hover { text-decoration: underline; }
.reset-link { font-weight: 600; }
.entity-intro { max-width: 52rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.entity-kind { margin-bottom: .35rem; color: var(--muted); font: 600 .75rem/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.entity-account { margin-block: .5rem; }
.entity-stats { display: flex; flex-wrap: wrap; column-gap: 2rem; margin-block: .75rem; }
.entity-stats > div { display: flex; flex-direction: column-reverse; }
.entity-stats dt { color: var(--muted); font-size: .88rem; }
.entity-stats dd { font: 600 1.4rem/1.2 var(--serif); }
.entity-mix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.4rem; font-size: .9rem; }
.entity-mix dt { font-weight: 600; }
.entity-mix dd span { color: var(--muted); }
.county-empty .button { margin-top: 1rem; }

@media (max-width: 53rem) {
  .research-layout { display: block; }
  .research-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .5rem .75rem; align-items: end; margin-bottom: 1.25rem; }
  .research-filters .rail-heading, .research-filters .rail-note { grid-column: 1 / -1; }
  .research-index { margin-top: 2.5rem; }
  .home-grid, .home-index, .record-body { grid-template-columns: 1fr; }
  .results-layout { display: block; }
  .filters-aside { position: relative; margin-bottom: .65rem; }
  .filter-panel > summary { display: list-item; padding-inline: .65rem; }
  .filter-panel { border: 1px solid var(--line); border-radius: 2px; background: var(--card); }
  .filter-panel:not([open]) > summary { border-bottom: 0; }
  .desktop-filter-heading { display: none; }
  .filter-body { padding: .7rem; }
  .directory-enhanced .filter-sheet-toolbar {
    position: sticky;
    top: -.7rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .45rem;
    padding-block: .2rem;
    border-bottom: 1px solid var(--line);
    background: var(--card);
    font-weight: 600;
  }
  .directory-enhanced .filter-body {
    position: absolute;
    z-index: 2;
    inset-inline-start: 0;
    width: min(100%, 25rem);
    max-height: min(46vh, 28rem);
    overflow: auto;
    scroll-padding-top: 3.2rem;
    background: var(--card);
    border: 1px solid var(--field);
    border-radius: 2px;
    box-shadow: 0 .6rem 1.2rem rgb(0 0 0 / .18);
  }
}
@media (max-width: 33rem) {
  .records[data-view="compact"] .record { grid-template-columns: 1fr; }
  .records[data-view="compact"] .record-kind { grid-row: auto; grid-column: 1; justify-content: start; }
  .records[data-view="compact"] .record-title { grid-row: auto; }
  .entity-mix { grid-template-columns: 1fr; }
  .search-box { gap: .3rem; padding-inline-start: .5rem; }
  .search-box .search-icon { width: 16px; }
  .search-box .button { padding-inline: .7rem; }
  .facts > div { grid-template-columns: 1fr; gap: 0; }
}

/* Discovery: similar research, who works on a subject, partner institutions */
.tally-note, .section-note { color: var(--muted); font-size: .84rem; margin: .45rem 0 .35rem; max-width: 46rem; }
.tally h3 { margin-top: 1rem; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.research-index .groups, .research-index .partners { margin-bottom: 1.5rem; }
.study-page .sites-heading { margin-top: 1rem; font-size: .95rem; }
.study-sites li { padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }

/* Datasets: an access tag on the kind line and a "How to get it" panel. */
.access-tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  align-self: center;
  padding: 0 .35rem;
  border: 1px solid var(--field);
  border-radius: 2px;
  color: var(--text);
  font: 600 .74rem/1.55 var(--sans);
  letter-spacing: .02em;
  white-space: nowrap;
}
.access-tag .glyph { width: 1.05em; height: 1.05em; }
.access-open { border-color: var(--verified-text); background: var(--verified); color: var(--verified-text); }
.record-repository { overflow-wrap: anywhere; }
.get-data { padding: 1rem 1.1rem 1.1rem; background: var(--surface); border-top: 3px solid var(--dataset); }
.get-data > h2 { border-bottom-color: var(--line); }
.get-data .facts > div:last-child { border-bottom: 0; }
.get-data dd { overflow-wrap: anywhere; }
.access-explain { display: block; margin-top: .3rem; color: var(--muted); font-size: .88rem; }
.cite-list { padding-left: 1.1rem; }
.cite-list li + li { margin-top: .25rem; }
.dataset-list .record-kind { margin-bottom: .15rem; }
.dataset-list a { overflow-wrap: anywhere; }
.home-researchers { max-width: 46rem; margin-top: .9rem; color: var(--muted); font-size: .95rem; }
.home-latest .section-heading a + a { margin-left: 1rem; }

/* Reader inbox: suggest page and listing feedback. Plain fields, one blue action, no boxes. */
.inbox-page { max-width: min(100% - var(--frame-gutter) * 2, 44rem); }
.inbox-page .lede { margin-bottom: 1.5rem; }
.inbox-form { display: grid; gap: 1rem; max-width: 40rem; }
.inbox-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .94rem; }
.inbox-form label .muted { font-weight: 400; }
.inbox-form input[type="url"], .inbox-form input[type="text"], .inbox-form input[type="email"], .inbox-form textarea {
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid var(--field);
  border-radius: 2px;
  background: var(--card);
  color: var(--text);
  font: 400 1rem/1.45 var(--sans);
}
.inbox-form textarea { resize: vertical; }
.inbox-form :is(input, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.inbox-form fieldset { margin: 0; padding: 0; border: 0; }
.inbox-form legend { margin-bottom: .45rem; font-weight: 600; font-size: .94rem; }
.inbox-form .choices { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.inbox-form .choice { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; font-weight: 400; }
.inbox-form .button { justify-self: start; }
.inbox-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inbox-feedback { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.inbox-feedback h2 { margin-bottom: 1rem; }
.inbox-privacy { margin-top: 2rem; font-size: .86rem; }
.inbox-sent { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.5rem; padding: .7rem .9rem; border-left: 3px solid var(--verified-text); background: var(--verified); color: var(--verified-text); }
.inbox-sent .glyph { width: 1.2rem; height: 1.2rem; }
.inbox-sent .glyph-fill { fill: var(--verified); }
.inbox-error { border-left-color: var(--publication); background: var(--surface); color: var(--text); }

.page-feedback { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.feedback-rate { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.feedback-rate button {
  min-width: 3.5rem;
  min-height: 36px;
  padding: .2rem .8rem;
  border: 1px solid var(--field);
  border-radius: 2px;
  background: var(--card);
  color: var(--accent);
  font: 600 .88rem/1 var(--sans);
  cursor: pointer;
}
.feedback-rate button:hover { background: var(--surface); }
.feedback-rate span { margin-right: .35rem; }
.feedback-more { margin-top: .6rem; }
.feedback-more summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.feedback-more .inbox-form { margin-top: .5rem; color: var(--text); }
.feedback-status { margin-top: .6rem; color: var(--verified-text); font-weight: 600; }
.feedback-removal { margin-top: .4rem; font-size: .86rem; }

/* Support: a quiet letter and two buttons. Supporters are thanked in the home footer. */
.support-head h1 { max-width: 20ch; font-size: clamp(1.9rem, 4.4vw, 2.6rem); line-height: 1.12; letter-spacing: -.01em; }
.support-letter { font: 400 1.08rem/1.7 var(--serif); }
.prose-page .support-letter { margin-top: 2rem; padding: 1.4rem 0 0; border-top: 4px solid var(--rule); }
.support-letter p + p { margin-top: .9rem; }
.support-signature { margin-top: 1.1rem; font-style: italic; }
.support-signature::before { content: "— "; }
.support-page h2 { font-size: 1.3rem; }
.support-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.support-fine { margin-top: .75rem; font-size: .9rem; line-height: 1.55; max-width: 60ch; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem 2rem; margin-top: 1.1rem; }
.prose-page .offer { margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--rule); }
.prose-page .offer-founder { border-top-width: 4px; padding-top: calc(1rem - 3px); }
.offer-eyebrow { margin: 0; color: var(--muted); font: 600 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.offer h3 { margin: .35rem 0 0; font-size: 1.35rem; }
.prose-page .offer-text { margin-top: .4rem; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.offer-rows { margin: .9rem 0 0; padding: 0; list-style: none; }
.offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 1rem;
  padding: .55rem 0;
  border-top: 1px solid var(--line);
}
.offer-who { font-weight: 600; }
.offer-price { font: 500 1.15rem/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.offer-row .button { min-width: 5.5rem; }
.support-in-kind .button { margin-top: .3rem; }
.support-closing { margin-top: 2rem; padding-top: .9rem; border-top: 1px solid var(--line); }

/* Counts by kind: one sentence, each figure led by its kind's mark. The same marks label the cards. */
.record-regional .kind, .regional-page .record-kind .kind { color: var(--regional); }
.regional-page .get-data { border-top-color: var(--regional); }
.nowrap { white-space: nowrap; }
.ledger { max-width: 68ch; line-height: 1.75; }
.directory-site .ledger .tally-item a { color: inherit; text-decoration: none; }
.directory-site .ledger .tally-item a:hover { color: var(--accent); text-decoration: underline; }
.ledger [aria-current] b { text-decoration: underline 2px; text-underline-offset: .2em; }
.ledger b { font-weight: 600; }
.ledger .glyph { width: 1.05em; height: 1.05em; margin-right: .3em; vertical-align: -.17em; }
.tally-publication .glyph { color: var(--publication); }
.tally-project .glyph { color: var(--software); }
.tally-study .glyph { color: var(--study); }
.tally-dataset .glyph { color: var(--dataset); }
.tally-regional-data .glyph { color: var(--regional); }

/* Home: title, count line and search, with the county map beside them on wide screens. */
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: none;
}
.home-intro .ledger { margin-block: .8rem 1.25rem; font-size: clamp(1.02rem, 1.6vw, 1.12rem); }
.ledger-new { white-space: nowrap; }
.home-map .county-figure { margin: 0; }
.home-map .county-map { max-width: 20rem; margin-inline: auto; }
.home-map figcaption { margin-top: .25rem; text-align: center; }

/* Search: one rounded field with a round submit at its end. */
.search-box {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .6rem;
  min-height: 52px;
  padding: .3rem .35rem .3rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box:hover { border-color: var(--field); }
.search-box:focus-within { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-box .search-icon { width: 1.15rem; height: 1.15rem; color: var(--muted); }
.search-box input { min-height: 40px; font-size: 1.02rem; }
.search-go {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
}
.search-go .glyph { width: 1.15rem; height: 1.15rem; stroke-width: 1.8; transition: transform .15s ease; }
.search-go:hover .glyph { transform: translateX(2px); }
.search-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Results: the count line, then the range and feed at the right, on one baseline. */
.results-bar { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem 1.25rem; flex-wrap: wrap; padding-bottom: .7rem; }
.results-bar .ledger { flex: 1 1 26rem; font-size: .95rem; line-height: 1.6; }
.ledger .glyph { width: 1em; height: 1em; margin-right: .28em; vertical-align: -.13em; }
.results-meta { display: flex; align-items: center; gap: .9rem; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.feed-link { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-block: -6px; border-radius: 8px; color: var(--muted); }
.feed-link:hover { background: var(--surface); color: var(--accent); }
.feed-link .glyph { width: 1rem; height: 1rem; }

/* Filters: quiet labels over rounded selects. A filter in use takes the accent. */
.research-filters { gap: .85rem; }
.research-filters .rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: 600 .95rem/1.3 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.rail-clear { font-size: .85rem; font-weight: 600; }
.research-filters label { gap: .3rem; color: var(--muted); font-size: .8rem; font-weight: 500; }
.research-filters select {
  appearance: none;
  min-height: 40px;
  padding: .4rem 2rem .4rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238a857c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E") right .6rem center / 1rem no-repeat;
  color: var(--text);
  font-size: .92rem;
  text-overflow: ellipsis;
  cursor: pointer;
}
.research-filters select:hover { border-color: var(--field); }
.research-filters select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.research-filters .is-set { color: var(--accent); }
.research-filters .is-set select { border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 8%, var(--card)); font-weight: 600; }
.directory-js .filter-submit { display: none; }
.research-filters .filter-submit { border-radius: 8px; }
.rail-note { color: var(--muted); font-size: .82rem; }

@media (max-width: 53rem) {
  .home-intro { grid-template-columns: 1fr; }
  .home-map { display: none; }
}

/* ---- Results pages: heading, filter row, who-works strip, pagination ---- */

/* A search result opens with its search box; its heading is for screen readers only. */
.results-head .breadcrumb { margin-bottom: .35rem; }
.research-page .research-search { max-width: 58rem; }
.research-page .research-results { max-width: 58rem; margin-top: 1rem; }

/* Filters: one row of selects under the search box. On phones they fold behind one line. */
.filter-row { margin-top: .6rem; }
.filter-row > summary { display: none; }
@media (width > 33rem) {
  /* Shown even while closed, so the row needs no script on wide screens. */
  .filter-row::details-content { content-visibility: visible; }
}
.filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 58rem; }
.filter-controls label { display: block; min-width: 0; }
.filter-controls select, .order-control select {
  appearance: none;
  field-sizing: content;
  width: auto;
  max-width: 13rem;
  min-height: 36px;
  padding: .3rem 1.9rem .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238a857c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E") right .55rem center / .95rem no-repeat;
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  text-overflow: ellipsis;
  cursor: pointer;
}
.filter-controls select:hover, .order-control select:hover { border-color: var(--field); }
.filter-controls select:focus-visible, .order-control select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-controls .is-set select { border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 8%, var(--card)); color: var(--accent); font-weight: 600; }
.filter-clear { color: var(--accent); font-size: .88rem; font-weight: 600; }
.filter-more { margin-left: auto; color: var(--muted); font-size: .86rem; }
.filter-more:hover { color: var(--accent); }
.filter-controls .feed-link { margin: 0 0 0 auto; }
.filter-row .filter-submit { min-height: 36px; padding-block: .3rem; border-radius: 8px; }
.directory-js .filter-row .filter-submit { display: none; }
.filter-count { color: var(--muted); font-weight: 400; }

/* Who works on the subject: one line of names, the rest under "more". */
.groups-strip { max-width: 58rem; margin-top: .9rem; font-size: .9rem; line-height: 1.7; }
.groups-strip h2 { display: inline; margin-right: .4rem; white-space: nowrap; color: var(--muted); font: 400 .9rem/1.7 var(--sans); }
.groups-strip ul { display: inline; margin: 0; padding: 0; list-style: none; }
.groups-strip li { display: inline; white-space: nowrap; }
.groups-strip li + li::before, .groups-more ul li:first-child::before { content: "·" / ""; margin-inline: .45rem; color: var(--muted); }
.groups-strip li a { color: var(--text); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.groups-strip li a:hover { text-decoration-color: currentColor; }
.groups-strip .n { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.groups-more { display: inline; }
.groups-more > summary { display: inline; margin-left: .6rem; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.groups-more > summary::-webkit-details-marker { display: none; }
.groups-more[open] > summary { display: none; }
.groups-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The count line: kinds at the left; order and feed at the right. */
.results-meta .order-control select { max-width: 16rem; min-height: 32px; border-color: transparent; background-color: transparent; color: var(--text); font-size: .86rem; }
.results-meta .order-control select:hover { border-color: var(--line); }

/* An entity page's tallies, folded under one line above the search. */
.entity-about { max-width: 58rem; margin-bottom: .75rem; border-block: 1px solid var(--line); }
.entity-head + .entity-about { margin-top: -.5rem; }
.entity-about > summary { display: list-item; padding-block: .55rem; color: var(--text); cursor: pointer; font-size: .95rem; font-weight: 600; }
.entity-about > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.about-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem 2rem; align-items: start; padding-block: .25rem 1rem; }
.entity-about .tally h2 { padding-bottom: .3rem; color: var(--text); font: 600 .9rem/1.3 var(--sans); letter-spacing: 0; text-transform: none; }
.entity-about .tally-note { margin-top: .3rem; }

/* What's new: one heading per activity day. */
.day-group > h2 { margin-bottom: .3rem; font-size: 1.05rem; }
.day-group:first-child > h2 { margin-top: .25rem; }

@media (max-width: 33rem) {
  .filter-row { border-bottom: 1px solid var(--line); }
  .filter-row > summary { display: list-item; padding-block: .6rem; cursor: pointer; font-size: .95rem; font-weight: 600; }
  .filter-row > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .filter-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: .8rem; }
  .filter-controls select { width: 100%; max-width: none; min-height: 44px; }
  .filter-more { margin-left: 0; }
  .results-bar .ledger { flex-basis: 100%; }
}

/* ---- end results ---- */

/* ---- Listing cards, link colours and record pages ---- */
/* Cards: the title, one meta line led by the kind label, and at most a clamped summary. */
.record { gap: .15rem; padding: .8rem 0 .9rem; }
.directory-site .record-title a { color: var(--text); text-decoration: none; }
.directory-site .record-title a:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-thickness: 1px; }
.record-meta { display: flex; align-items: flex-start; min-width: 0; color: var(--muted); font: 400 .84rem/1.45 var(--sans); }
.meta-main { flex: 0 1 auto; min-width: 0; }
.record-meta .kind { margin-right: .55rem; font-weight: 600; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.record-meta .kind .glyph { width: 1.15rem; height: 1.15rem; margin-right: .3rem; stroke-width: 1.4; vertical-align: -.3em; }
.dataset-list .kind { color: var(--dataset); }
/* The topic shows only when it fits on the meta line's last row. The empty ::before item holds the
   first flex row, so a topic that does not fit wraps to a second row, which is clipped. */
.meta-topic { display: flex; flex: 1 1 0; flex-wrap: wrap; min-width: 0; height: 1.45em; overflow: hidden; }
.meta-topic::before { content: ""; width: 0; height: 1.45em; }
.meta-topic > span { padding-left: .28em; white-space: nowrap; }
.meta-topic:focus-within { height: auto; overflow: visible; }
.record-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
  font-size: .92rem;
}
.record-dataset .record-summary, .record-regional .record-summary { -webkit-line-clamp: 2; line-clamp: 2; }
.records[data-view="compact"] .record { grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: first baseline; padding-block: .55rem; }
.records[data-view="compact"] .record-meta { grid-row: 1; grid-column: 2; max-width: 40rem; }
.dataset-list li + li { margin-top: .45rem; }
.dataset-list .record-meta { margin-top: .1rem; }

/* Link colours. Blue marks actions and links in prose. Titles are ink; links on meta lines, tallies,
   breadcrumbs and record headers take the surrounding colour with a light underline that darkens
   on hover and focus. Focus outlines are unchanged. */
.directory-site :is(.record-meta, .record-place, .record-head .record-kind, .breadcrumb, .record-details) a,
.directory-site .tally li a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-decoration-thickness: 1px;
}
.directory-site .tally li a { color: var(--text); }
.directory-site :is(.record-meta, .record-place, .record-head .record-kind, .breadcrumb, .record-details) a:is(:hover, :focus-visible),
.directory-site .tally li a:is(:hover, :focus-visible) { color: var(--text); text-decoration-color: currentColor; }
.directory-site .record-meta .verified-word { color: var(--verified-text); }

/* Record pages: bookkeeping as one quiet line, with the rest folded into "Record details". */
.record-details { margin-top: .7rem; color: var(--muted); font-size: .86rem; }
.record-details summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; min-height: 32px; cursor: pointer; list-style: none; }
.record-details summary::-webkit-details-marker { display: none; }
.record-details-label { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .18em; }
.record-details summary:hover .record-details-label { text-decoration-color: currentColor; }
.record-details-label::after { content: "+" / ""; display: inline-block; width: 1em; margin-left: .25rem; text-align: center; }
.record-details[open] .record-details-label::after { content: "−" / ""; }
.record-details .facts { margin-top: .25rem; border-top: 1px solid var(--line); }
.record-details .facts > div { padding-block: .3rem; }
.record-details .facts :is(dt, dd) { font-size: .86rem; }

@media (max-width: 33rem) {
  .records[data-view="compact"] .record-meta { grid-row: auto; grid-column: 1; }
}



/* ---- end cards and records ---- */

/* ---- Home page ---- */
/* Search first, then the ways in: the county map and tables of types, topics and institutions. */
.home { padding-block: clamp(1.25rem, 3vw, 2.25rem) 0; }
.home-head { max-width: 52rem; }
.home-head h1 { margin-top: .4rem; }
.home-head .home-search { max-width: none; margin-top: 1.1rem; }
.home-head .lede { margin-top: .6rem; }
.home-examples { margin-top: .65rem; }
.home h2,
.home .tally h2 {
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  font: 600 1.12rem/1.3 var(--serif);
  letter-spacing: 0;
  text-transform: none;
}
.home h2 .muted { margin-left: .3rem; font: 400 .9rem/1 var(--sans); }
.home-ways {
  display: grid;
  grid-template-columns: minmax(16rem, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 2rem clamp(1.75rem, 4vw, 3.5rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.home-institutions { grid-column: 1 / -1; }
.home-institutions ul { columns: 3 15rem; column-gap: clamp(1.75rem, 4vw, 3.5rem); }
.home .tally li a { color: var(--text); text-decoration: none; }
.home .tally li a:hover { color: var(--text); text-decoration: underline; }
.home .tally-more summary { color: var(--accent); }
/* Each row's rule is also its bar: its length is the row's share of the largest figure in the table. */
.home .tally li { position: relative; }
.home .tally li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: max(2px, var(--share, 0%));
  height: 2px;
  background: var(--bar, color-mix(in srgb, var(--accent) 55%, var(--line)));
}
.home .tally-publication { --bar: var(--publication); }
.home .tally-project { --bar: var(--software); }
.home .tally-study { --bar: var(--study); }
.home .tally-dataset { --bar: var(--dataset); }
.home .tally-regional-data { --bar: var(--regional); }
.tally-foot { margin-top: .7rem; font-size: .9rem; }

/* The map is the county index: each county is a link, shaded by how many listings it has. */
.home-counties .county-map { width: 100%; max-width: 26rem; margin: .6rem auto 0; overflow: visible; }
.home-counties .county-map a { outline: none; }
.home-counties .county-rings use { fill: none; stroke: none; stroke-width: 2; pointer-events: none; }
/* A county is outlined when its shape or its name is under the pointer, or its shape has focus. */
.county-map:has(.c-42017:is(:hover, :focus-visible)) .county-rings .c-42017,
.county-map:has(.c-42029:is(:hover, :focus-visible)) .county-rings .c-42029,
.county-map:has(.c-42045:is(:hover, :focus-visible)) .county-rings .c-42045,
.county-map:has(.c-42091:is(:hover, :focus-visible)) .county-rings .c-42091,
.county-map:has(.c-42101:is(:hover, :focus-visible)) .county-rings .c-42101,
.county-map:has(.c-34005:is(:hover, :focus-visible)) .county-rings .c-34005,
.county-map:has(.c-34007:is(:hover, :focus-visible)) .county-rings .c-34007,
.county-map:has(.c-34015:is(:hover, :focus-visible)) .county-rings .c-34015,
.county-map:has(.c-34021:is(:hover, :focus-visible)) .county-rings .c-34021 { stroke: var(--accent); }
.home-counties .county-map text { pointer-events: auto; cursor: pointer; }

@media (max-width: 53rem) {
  .home-ways { grid-template-columns: 1fr; }
  .home-counties { max-width: 30rem; }
}

/* ---- end home ---- */
