/* Design tokens (redesign spec §5, 2026-11-27): white pages, one calm teal accent, status colors that always come with a word,
   system fonts (no web fonts). Light only (owner, 2026-10-11): no dark mode, and form controls and scrollbars stay light too. */
:root {
    color-scheme: light;
    --green: #0A4F53;
    --green-2: #0E6E73;
    --on-green: #FFFFFF;
    --fg: #15232A;
    --muted: #56666D;
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --panel: #F6F8F9;
    --accent: #0E6E73;
    --accent-hover: #0A4F53;
    --accent-fg: #FFFFFF;
    --border: #D5DDE0;
    --input: #98A6AC;
    --line: #E6ECEE;
    --ok: #1F7A45;
    --warn: #9A5B00;
    --error: #B3261E;
    --unchecked: #6B7680;
    --radius: 8px;
    --serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
    --width: 70rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--fg);
    background: var(--bg);
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 { font-family: var(--sans); line-height: 1.25; font-weight: 650; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0.25rem 0 0.75rem; }
h2 { font-size: 1.3rem; margin: 1.75rem 0 0.6rem; }
h3 { font-size: 1.05rem; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* Top bar (redesign spec §2): the name, a search box and four links. On a phone: the name, a search button and a menu button. */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-bar { display: flex; align-items: center; gap: 0.75rem 1.25rem; max-width: var(--width); margin: 0 auto; padding: 0.6rem 1.25rem; flex-wrap: wrap; }
.brand { font-weight: 750; font-size: 1.25rem; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--accent); }
.top-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.top-nav a { padding: 0.55rem 0.7rem; border-radius: var(--radius); color: var(--fg); text-decoration: none; font-weight: 500; min-height: 2.75rem; display: inline-flex; align-items: center; }
.top-nav a:hover { background: var(--panel); color: var(--accent); }
.top-nav a.current { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.bar-button { display: none; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--fg); padding: 0.5rem; min-width: 2.75rem; min-height: 2.75rem; cursor: pointer; border-radius: var(--radius); }
.bar-button:hover { background: var(--panel); color: var(--accent); }
.quick-search { flex: 1 1 22rem; display: flex; align-items: center; gap: 0.6rem; max-width: 34rem; padding: 0.2rem 0.2rem 0.2rem 0.8rem; border: 1px solid var(--input); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.quick-search:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.quick-search input { flex: 1; min-width: 0; border: 0; padding: 0.45rem 0; font-size: 1rem; background: transparent; outline: none; }

/* Explore menu (roadmap C1): a disclosure button that opens every master page (ExploreList). Without JavaScript it is a link to /explore.
   On a wide screen the list drops down under the button; on a phone it opens in place inside the folded menu. */
.top-nav { position: relative; } /* the Explore panel lines up with the nav's right edge, so it stays on screen at any width */
.explore { display: flex; }
.explore-toggle { display: none; align-items: center; gap: 0.3rem; padding: 0.55rem 0.7rem; min-height: 2.75rem; border: 0; border-radius: var(--radius);
    background: transparent; color: var(--fg); font: inherit; font-weight: 500; cursor: pointer; }
.explore-toggle:hover { background: var(--panel); color: var(--accent); }
.explore-toggle svg { transition: transform 0.15s; }
.explore-toggle[aria-expanded="true"] { color: var(--accent); }
.explore-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.explore-toggle.current { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.js .explore-toggle { display: inline-flex; }
.js .explore-link { display: none; }
.explore-menu { display: none; }
.js .explore-menu.open { display: grid; }
.explore-menu { position: absolute; top: calc(100% + 0.35rem); right: 0; z-index: 30; width: min(46rem, calc(100vw - 2rem));
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.5rem; padding: 1rem 1.2rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(21, 35, 42, 0.12); }
.explore-heading { margin: 0 0 0.2rem; font-size: 0.8rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.explore-menu ul { list-style: none; margin: 0; padding: 0; }
.explore-menu ul a { display: flex; align-items: center; min-height: 2.25rem; padding: 0.2rem 0.5rem; margin-left: -0.5rem; border-radius: var(--radius);
    color: var(--fg); text-decoration: none; }
.explore-menu ul a:hover { background: var(--panel); color: var(--accent); }
.explore-menu ul a[aria-current] { color: var(--accent); font-weight: 600; }
.explore-all { grid-column: 1 / -1; margin: 0.25rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.explore-all a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.2rem 0; color: var(--accent); font-weight: 600; }

main { padding: 1.5rem 1.25rem 2.5rem; max-width: var(--width); width: 100%; margin: 0 auto; flex: 1 0 auto; }
.site-footer { padding: 1.5rem 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; background: var(--panel); }
.site-footer > * { max-width: var(--width); margin-left: auto; margin-right: auto; }
.site-footer p { margin-top: 0.3rem; margin-bottom: 0.3rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; padding: 0; list-style: none; margin-bottom: 0.75rem; }

@media (max-width: 48rem) {
    .site-bar { padding: 0.4rem 0.75rem; gap: 0.25rem; }
    .js .bar-button { display: inline-flex; }
    .js .site-bar .menu-toggle { margin-left: auto; }
    .js .site-bar .search-toggle + .menu-toggle { margin-left: 0; }
    .js .site-bar .search-toggle { margin-left: auto; }
    .top-nav { flex-basis: 100%; flex-direction: column; margin: 0; order: 3; }
    .explore { flex-direction: column; }
    .explore-toggle { justify-content: flex-start; width: 100%; }
    .explore-toggle.current { box-shadow: inset 2px 0 0 var(--accent); }
    .explore-menu { position: static; width: auto; grid-template-columns: 1fr; gap: 0.5rem; margin: 0 0 0.5rem 0.7rem; padding: 0.25rem 0 0.25rem 0.75rem;
        border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none; }
    .explore-menu ul a { margin-left: 0; min-height: 2.75rem; }
    .js .top-nav:not(.open) { display: none; }
    .quick-search { flex-basis: 100%; max-width: none; order: 2; }
    .js .quick-search:not(.open):not(:focus-within) { display: none; }
    main { padding: 1rem 0.9rem 2rem; }
    .site-footer { padding: 1rem 0.9rem; }
}

.muted { color: var(--muted); }
.badge { display: inline-block; margin: 0.1rem 0 0.1rem 0.25rem; padding: 0 0.5rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; background: var(--surface); }
.badge.alert { color: var(--error); border-color: var(--error); }
.badge.good { color: var(--ok); border-color: var(--ok); }
.notice { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 1rem 0; background: var(--surface); }
.notice.alert { border-color: var(--error); }
.notice.alert > strong { color: var(--error); }
.notice ul { margin: 0.4rem 0; }
.lede { color: var(--muted); margin-top: -0.25rem; font-size: 1.1rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem; z-index: 2000; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

form.search {
    display: grid;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    border: 0;
    margin: 0;
    padding: 0;
}

legend { font-weight: 600; margin-bottom: 0.25rem; font-family: var(--serif); font-size: 1.05rem; }

/* Exact NUCC taxonomy, folded under the plain specialty categories. */
details.nucc { flex: 1 1 100%; min-width: 0; }
details.nucc > summary { font-size: 0.9rem; color: var(--muted); cursor: pointer; }
details.nucc[open] { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
details.nucc[open] > summary, details.nucc > p { flex-basis: 100%; margin: 0; }

/* min-width: 0 lets a field shrink below its <select>'s longest option, which would otherwise
   push the form past a phone's width. */
.field { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12rem; }
.field.narrow { flex: 1 1 8rem; }
.field input, .field select { width: 100%; max-width: 100%; }

@media (max-width: 40rem) {
    .field, .field.narrow { flex-basis: 100%; }
}
label { font-size: 0.875rem; color: var(--muted); }

input, select, button, .button {
    font: inherit;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--input);
    border-radius: 8px;
    background: var(--surface);
    color: var(--fg);
}

select:disabled { opacity: 0.6; }

button, .button {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}
button:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }

.actions { display: flex; gap: 1rem; align-items: center; }
.error, .field-error { color: var(--error); }
.field-error { font-size: 0.8rem; min-height: 0; }

.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
td.break { overflow-wrap: anywhere; max-width: 32rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); color: var(--muted); font-weight: 600; white-space: nowrap; }
td { border-bottom-color: var(--line); }
th a { color: var(--fg); }
th[aria-sort="ascending"] a::after { content: " ▲"; }
th[aria-sort="descending"] a::after { content: " ▼"; }
tbody tr:hover { background: var(--panel); }

.pager { display: flex; gap: 1rem; justify-content: center; padding: 1rem 0; }

dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

.field.wide { flex: 1 1 100%; }
textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--input); border-radius: 8px; background: var(--surface); color: var(--fg); }

.small { font-size: 0.875rem; }
button.secondary, .button.secondary { background: var(--surface); color: var(--accent); border-color: var(--input); }
button.secondary:hover, .button.secondary:hover { background: var(--panel); color: var(--accent-hover); border-color: var(--input); }
[hidden] { display: none !important; }
.results-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Map search page (Stage 5.5 item 10): the search page's filter column, then the map with its table below it, or beside it on very wide
   screens. */
.map-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
#map-status { margin: 0 0 0.5rem; min-height: 1.5em; }
#map-status.warn { color: var(--warn); border: 1px solid var(--warn); border-radius: var(--radius); padding: 0.4rem 0.75rem; background: var(--surface); }
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.area-map { height: 60vh; min-height: 18rem; border: 1px solid var(--border); border-radius: var(--radius); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin: 0.4rem 0 0; }
.dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; vertical-align: middle; margin-right: 0.25rem; }
.dot.exact { background: #0E6A73; opacity: 0.8; }
.dot.street { background: #ffffff; border: 2px solid #0E6A73; }
.dot.approximate { background: #afb8c1; border: 2px dashed #6e7781; }
.area-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.area-head h2 { margin: 0; }
.area-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.area-sort label { margin: 0; }
#area-table td.num { text-align: right; white-space: nowrap; }
#area-table tr.highlight td { background: var(--panel); }
@media (min-width: 70rem) {
    .area-map { height: calc(100vh - 14rem); }
    .area-results { display: flex; flex-direction: column; max-height: calc(100vh - 10rem); }
    .area-table-wrap { overflow-y: auto; }
}
@media (min-width: 110rem) { .map-col { grid-template-columns: minmax(0, 3fr) minmax(24rem, 2fr); align-items: start; } }
/* Leaflet tooltips and popups: dark text on their white boxes. */
.leaflet-container .pin-content { color: #17231F; font-size: 0.8rem; }
.leaflet-container .pin-content ul { margin: 0.25rem 0 0; padding-left: 1.1rem; max-height: 14rem; overflow-y: auto; }
.leaflet-container .pin-content a { color: #0E6A73; }
.leaflet-container .pin-content .muted { color: #4E5F58; }
.leaflet-tooltip.pin-tooltip { width: 20rem; max-width: 80vw; white-space: normal; }

/* Credential box: type to narrow the list (combo.js). */
.combo { position: relative; }
.combo-list {
    position: absolute; top: 100%; left: 0; z-index: 1000; min-width: 100%; width: max-content; max-width: min(22rem, 90vw);
    max-height: 18rem; overflow-y: auto; margin: 2px 0 0; padding: 0.25rem 0; list-style: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.combo-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0.6rem; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--panel); }
.combo-list li .muted { font-size: 0.8rem; }
.combo-list li.empty { cursor: default; color: var(--muted); }
.combo-list.align-right { left: auto; right: 0; }

/* One-line forms (company search). */
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0; }
.inline-form input { flex: 1 1 14rem; min-width: 0; max-width: 28rem; }

/* Long free text in a table cell (FDA recall products and reasons). */
td.long { min-width: 14rem; max-width: 32rem; overflow-wrap: anywhere; }

/* Long FDA texts (label sections) keep their line breaks. */
.prewrap { white-space: pre-line; overflow-wrap: anywhere; }
details > summary { cursor: pointer; }

/* Numbers and identifiers. */
.mono { font-family: var(--mono); font-size: 0.92em; }

/* Search (docs/PRODUCT_PLAN.md step 1.3): home hero, task cards, list builder, compact rows, export panel, type-ahead. */
.hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem 2rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.5rem; max-width: 48rem; }
.hero .lede { max-width: 44rem; margin: 0 0 1.25rem; }
.hero-search { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 52rem; }
.hero-search input { flex: 1 1 22rem; min-width: 0; font-size: 1.15rem; padding: 0.85rem 1rem; border-width: 1.5px; border-radius: 10px; }
.hero-search button { font-size: 1.1rem; padding: 0.85rem 1.6rem; border-radius: 10px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--fg); text-decoration: none; font-size: 0.95rem; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip a { text-decoration: none; font-weight: 700; padding: 0 0.15rem; }
.tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.9rem; }
.task { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--fg); text-decoration: none; }
.task:hover { border-color: var(--accent); color: var(--fg); }
.task strong { font-size: 1.1rem; }
.task span { color: var(--muted); line-height: 1.45; }
.card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 1.25rem 1.25rem; margin-top: 1.5rem; max-width: 40rem; }

.results-title h1 { margin-bottom: 0.4rem; }
.reading { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 1rem; }
.builder { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.filters { flex: 1 1 16rem; max-width: 22rem; }
.filters .field, .filters .field.narrow { flex-basis: 100%; }
.filters .more > summary { font-weight: 600; padding: 0.3rem 0; }
.filters .more[open] > summary { margin-bottom: 0.75rem; }
.filters .more fieldset { margin-bottom: 1rem; }
.results-col { flex: 999 1 34rem; min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.results-col .notice { margin: 0; }
.results-head h2 { margin: 0.25rem 0; }
.export-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.75rem 1rem; border: 1px solid #C6DBD1; border-radius: var(--radius); background: #E8F1ED; }
.export-panel label { margin: 0; color: var(--fg); }
.empty-state { background: var(--surface); border: 1px dashed var(--input); border-radius: var(--radius); padding: 1.5rem; }
.empty-state h2 { margin-top: 0; }
.name-block { margin-bottom: 1.5rem; }
@media (max-width: 52rem) { .filters { max-width: none; } }
.sort-links { margin: -0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; font-size: 0.95rem; }
/* When the filters and the results don't fit side by side (phones, narrow windows): results first; the filters open from a
   button (search.js), and the export panel moves below the list. 57rem = the filters' 22rem + the results' 34rem + the gap. */
.builder { container: builder / inline-size; }
.filters-toggle { display: none; }
@container builder (max-width: 57rem) {
    .js .builder.has-results .filters-toggle { display: inline-flex; }
    .js .builder.has-results .filters:not(.open) { display: none; }
    .results-col .export-panel { order: 5; }
}

.results-table td { vertical-align: middle; }
.results-table .who { display: flex; align-items: center; gap: 0.7rem; min-width: 14rem; }
.results-table .name { font-weight: 600; }
.results-table .sub { display: block; font-size: 0.82rem; }
.nowrap { white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 2.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-size: 0.8rem; font-weight: 700; background: #E6E9E8; color: #55625D; }
.avatar.male { background: #DCE8F5; color: #2F5F95; }
.avatar.female { background: #EEE2F2; color: #6A3E85; }
.avatar.org { border-radius: 8px; background: #E8F1ED; color: #12362F; }
.badge.warn { color: var(--warn); border-color: var(--warn); }
/* Phones: each result row is a card. */
@media (max-width: 40rem) {
    .results-table thead { display: none; }
    .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
    .results-table tr { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
    .results-table td { border: 0; padding: 0.15rem 0; }
    .results-table td[data-label]:not(:empty)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.85rem; }
    .results-table td.empty { display: none; }
    .results-table .who { min-width: 0; padding-bottom: 0.35rem; }
}

.suggest-list { min-width: 0; width: min(100%, 34rem); max-width: none; }
.suggest-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-list li .muted { white-space: nowrap; }

/* Provider profile (docs/PRODUCT_PLAN.md step 1.4). */
.profile { display: flex; flex-direction: column; gap: 1.1rem; max-width: 74rem; }
.profile .card, .profile-status { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; min-width: 0; }
.profile .card > h2 { margin-top: 0; }
.profile .card > :last-child { margin-bottom: 0; }
.profile .lede { margin-top: -0.25rem; }
.profile .src { font-size: 0.85rem; color: var(--muted); }
.profile .label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.crumbs { font-size: 0.95rem; }
.head-row { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: flex-start; }
.avatar-lg { flex: 0 0 6.5rem; width: 6.5rem; height: 6.5rem; }
.avatar-lg .bg { fill: #E6E9E8; } .avatar-lg .fg { fill: #5C6B65; } .avatar-lg .stroke { stroke: #12362F; }
.avatar-lg.male .bg { fill: #DCE8F5; } .avatar-lg.male .fg { fill: #2F5F95; }
.avatar-lg.female .bg { fill: #EEE2F2; } .avatar-lg.female .fg { fill: #7A4A93; }
.avatar-lg.org .bg { fill: #E8F1ED; }
.head-main { flex: 1 1 24rem; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.head-main h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; overflow-wrap: anywhere; }
.head-main .credential { color: var(--muted); font-weight: 600; }
.head-main .summary { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0; padding: 0; list-style: none; }
.pill { display: inline-flex; align-items: center; padding: 0.2rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.88rem; font-weight: 600; background: var(--surface); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.alert { color: var(--error); border-color: var(--error); }
.head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; flex: 0 1 auto; }
.head-facts { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; margin: 1rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
.head-facts .mono { color: var(--fg); }
.head-contact { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 0; }
.profile-row { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.map-card { flex: 999 1 28rem; padding: 0 !important; overflow: hidden; }
.what-card { flex: 1 1 18rem; display: flex; flex-direction: column; gap: 0.4rem; }
.what-card h2 { margin: 0; }
.what-card p { margin: 0; line-height: 1.55; }
.static-map { position: relative; display: block; aspect-ratio: 768 / 300; overflow: hidden; background: #EEF1EC; }
.static-map img { position: absolute; max-width: none; }
.static-map .pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem; border-radius: 999px; background: #0E6A73; color: #FFFFFF; font-size: 0.8rem; font-weight: 700; border: 2px solid #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.static-map .pin.approx { background: #6B7C76; }
.map-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin: 0; padding: 0.5rem 1rem; font-size: 0.8rem; color: var(--muted); }
.on-page { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.locations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.75rem; }
.loc { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem; border: 1px solid var(--border); border-radius: 10px; overflow-wrap: anywhere; }
.affiliations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 0.6rem; }
.aff { display: flex; gap: 0.75rem; align-items: center; padding: 0.7rem; border: 1px solid var(--border); border-radius: 10px; }
.aff > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.aff-icon { flex: 0 0 2.4rem; height: 2.4rem; border-radius: 10px; background: #E8F1ED; }
.aff-icon.group { background: #E8F1ED radial-gradient(circle at 35% 40%, #12362F 0 0.3rem, transparent 0.32rem), radial-gradient(circle at 65% 40%, #12362F 0 0.3rem, transparent 0.32rem); }
.aff-icon.facility { background: #E8F1ED linear-gradient(#12362F, #12362F) center / 0.3rem 1.2rem no-repeat, linear-gradient(#12362F, #12362F) center / 1.2rem 0.3rem no-repeat; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.checks li:last-child { border-bottom: 0; }
.checks li > span { flex: 0 0 1rem; font-weight: 700; text-align: center; }
.checks .good > span { color: var(--ok); } .checks .warn > span { color: var(--warn); } .checks .bad > span { color: var(--error); } .checks .info > span { color: var(--muted); }
.big-numbers { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0.4rem 0 0.8rem; }
.big-numbers div { display: flex; flex-direction: column; }
.big-numbers strong { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; }
.big-numbers span { color: var(--muted); font-size: 0.9rem; }
.profile-status { max-width: 40rem; }
.profile-status .pill { font-size: 1.05rem; }
@media (max-width: 40rem) {
    .head-row { flex-direction: column; align-items: center; text-align: center; }
    .head-main { flex-basis: auto; align-items: center; }
    .pills { justify-content: center; }
    .head-actions { justify-content: center; width: 100%; }
    .head-contact .button { flex: 1 1 auto; text-align: center; white-space: nowrap; }
    .avatar-lg { flex-basis: 5.25rem; width: 5.25rem; height: 5.25rem; }
}

/* Organization, group and facility profiles (docs/PRODUCT_PLAN.md step 1.5). */
.avatar-lg .org-fg { fill: #12362F; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.card-head h2 { margin: 0; }
.bars { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.8rem 0 1rem; }
.bar-row { display: grid; grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr) 4rem; gap: 0.75rem; align-items: center; font-size: 0.95rem; }
.bar-row > span:first-child { overflow-wrap: anywhere; }
.bar-row .mono { text-align: right; }
.bar-track { display: block; height: 0.6rem; border-radius: 999px; background: var(--panel); }
.bar { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.75rem; }
.tile { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.8rem; border-radius: 10px; background: var(--panel); }
.tile strong { font-size: 1.05rem; }
.tile strong.bad { color: var(--error); }
.stars { font-family: var(--serif); font-size: 1.6rem; line-height: 1; color: var(--accent); }
.stars .off { color: var(--border); }
.link-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.link-list.columns { display: block; columns: 2 18rem; column-gap: 2rem; }
.link-list.columns li { break-inside: avoid; margin-bottom: 0.35rem; }
.profile-row > .grow { flex: 999 1 30rem; min-width: 0; display: flex; flex-direction: column; }
.profile-row > .grow > .card { flex: 1; }
.side-card { flex: 1 1 16rem; }
.static-map.small-map { aspect-ratio: 768 / 300; border-radius: 10px; }
.static-map.small-map .pin { min-width: 1.2rem; height: 1.2rem; font-size: 0.6rem; }
@media (max-width: 40rem) {
    .bar-row { grid-template-columns: minmax(0, 1fr) 3.5rem; }
    .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* Area pages (docs/PRODUCT_PLAN.md step 1.6). */
.area-head { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: space-between; align-items: flex-end; }
.area-head h1 { margin: 0 0 0.4rem; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; }
.area-head .summary { margin: 0; font-size: 1.1rem; line-height: 1.45; max-width: 44rem; }
.area-specialty { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; min-width: 0; }
.area-specialty select { max-width: 100%; min-width: 0; flex: 1 1 12rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.75rem; }
.stat { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--fg); text-decoration: none; min-width: 0; }
a.stat:hover { border-color: var(--accent); }
.stat strong { font-family: var(--serif); font-size: 2rem; line-height: 1.05; }
.stat .label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.area-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.grow-card { flex: 999 1 26rem; min-width: 0; }
.pill.warn { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }

/* Areas over time (docs/PRODUCT_PLAN.md step 3.3): the map (js/area-map.js) and the monthly chart (js/area-history.js). */
.choropleth { position: relative; display: flex; flex-direction: column; gap: 0.6rem; }
.choropleth-controls { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: flex-end; }
.choropleth-controls label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9rem; font-weight: 600; min-width: 0; }
.choropleth-controls select { max-width: 100%; min-width: 0; }
.choropleth-controls[hidden], .choropleth-controls [hidden], .history-chart .tabs[hidden] { display: none; }
.segmented { display: flex; gap: 0.75rem; align-items: center; margin: 0; padding: 0; border: 0; }
.segmented legend { float: left; margin-right: 0.25rem; font-size: 0.9rem; font-weight: 600; }
.segmented label { flex-direction: row; align-items: center; gap: 0.3rem; font-weight: 500; }
.choropleth-canvas svg { display: block; width: 100%; height: auto; }
.choropleth-canvas .area { stroke: #FFFFFF; stroke-width: 0.5; cursor: pointer; }
.choropleth-canvas .area:hover, .choropleth-canvas .area:focus { stroke: var(--fg); stroke-width: 1.5; outline: none; }
.choropleth-canvas .area:focus-visible { stroke: var(--accent-hover); stroke-width: 3; }
.choropleth-canvas .shortage path { pointer-events: none; }
.choropleth-canvas .state-lines path { fill: none; stroke: #FFFFFF; stroke-width: 1.4; pointer-events: none; }
.choropleth-canvas .current-line path { fill: none; stroke: var(--fg); stroke-width: 2.5; pointer-events: none; }
.choropleth-tip { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 0.1rem; max-width: min(18rem, 90%); padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 4px 14px rgb(23 35 31 / 0.15); font-size: 0.88rem; pointer-events: none; }
.choropleth-tip[hidden] { display: none; }
.choropleth-legend ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0; padding: 0; list-style: none; font-size: 0.85rem; }
.choropleth-legend li { display: flex; align-items: center; gap: 0.35rem; }
.choropleth-legend .swatch { display: inline-block; width: 1.1rem; height: 0.8rem; border: 1px solid var(--border); border-radius: 3px; }
.choropleth-legend .swatch.hatched { background: repeating-linear-gradient(45deg, rgb(23 35 31 / 0.55) 0 2px, transparent 2px 6px); }
.choropleth-summary { margin: 0; font-size: 0.92rem; color: var(--muted); }
.area-history .summary { margin: 0 0 0.75rem; }
.history-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.history-tiles .stat strong { font-size: 1.6rem; }
.history-chart { margin-top: 1rem; }
.history-chart .tabs { margin-bottom: 0.5rem; }
.history-canvas svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.history-canvas .tick text { font-size: 11px; fill: var(--muted); }
.history-note { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--muted); }
.history-table { margin-top: 0.75rem; }
.history-table summary { cursor: pointer; font-weight: 600; padding: 0.3rem 0; }
.history-table th[scope="row"] { font-weight: 600; text-align: left; }
.history-notes { padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.history-list { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.history-list ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.history-list .muted { font-size: 0.85rem; }
.area-changes .summary { max-width: 46rem; }

/* Verify NPIs (docs/PRODUCT_PLAN.md step 1.7). */
.verify-input { display: flex; flex-direction: column; gap: 0.75rem; }
.verify-fields { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: stretch; }
.verify-fields .drop { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; justify-content: center; padding: 1.3rem; border: 2px dashed var(--input); border-radius: var(--radius); background: var(--panel); text-align: center; color: var(--fg); }
.verify-fields .drop label { font-weight: 600; }
.verify-fields .drop input { max-width: 100%; }
.verify-fields .paste { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.verify-fields .paste label { font-weight: 600; }
.verify-fields .paste button { align-self: flex-start; }
.verify-results { display: flex; flex-direction: column; gap: 1.1rem; }
.verify-summary { display: flex; flex-direction: column; gap: 0.75rem; }
.verify-summary h2 { margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.verify-summary p { margin: 0; }
.stat.good { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.stat.good strong { color: var(--ok); }
.stat.bad { border-color: var(--error); }
.stat.bad strong { color: var(--error); }
.stat.warned { border-color: var(--warn); }
.stat.warned strong { color: var(--warn); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
button.tab { background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: 999px; font-weight: 600; padding: 0.35rem 0.9rem; min-height: 2.5rem; }
button.tab:hover { background: var(--panel); color: var(--fg); border-color: var(--input); }
button.tab[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.verify .pills { margin: 0; }
.verify .pill { font-size: 0.82rem; }
.verify td.nowrap { white-space: nowrap; }
.verify .pager { align-items: center; flex-wrap: wrap; }
.verify .stat-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.verify .stat { padding: 0.8rem 0.9rem; }

/* Find care, the patient path (docs/PRODUCT_PLAN.md step 1.8): larger text and targets, no sidebar. */
body.care { font-size: 1.1rem; }
.care-header { background: var(--green); color: #FFFFFF; }
.care-bar, .care-hero, .care-main { max-width: 62rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.care-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center; padding-top: 1rem; }
.care-bar .brand { padding: 0; }
.care-bar .brand span { color: #A9C4B9; font-weight: 600; }
.care-pro { color: var(--on-green); font-size: 1rem; }
.care-pro:hover { color: #FFFFFF; }
.care-hero { padding-top: 1.1rem; padding-bottom: 2.4rem; }
.care-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.1; color: #FFFFFF; }
.care-hero p { margin: 0.6rem 0 0; font-size: 1.25rem; color: #CFE0D9; }
.care-main { padding-top: 1.75rem; padding-bottom: 3.5rem; display: flex; flex-direction: column; gap: 1.75rem; }
.care-footer p { max-width: 62rem; margin: 0 auto; }
.care-form { display: flex; flex-direction: column; gap: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem; }
.care-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.care-form legend, .care-form .q { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; padding: 0 0 0.5rem; }
.care-form legend .muted { font-family: var(--sans); font-size: 1.05rem; font-weight: 400; }
.needs { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.needs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.need { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.1rem; border-radius: 999px; border: 1.5px solid var(--input); background: var(--surface); color: var(--fg); font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.need:hover { border-color: var(--accent); }
.needs input:checked + .need { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.needs input:focus-visible + .need { outline: 3px solid var(--accent); outline-offset: 2px; }
.other-pick { display: flex; flex-direction: column; gap: 0.4rem; max-width: 34rem; }
.other-pick select { font-size: 1.05rem; min-height: 3rem; max-width: 100%; }
.care-form:has(#need-other:not(:checked)) .other-pick { display: none; }
.where { display: flex; flex-direction: column; gap: 0.6rem; }
.where p { margin: 0; }
.where-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.where-row input { flex: 0 1 14rem; min-width: 0; height: 3.25rem; padding: 0 1rem; font-size: 1.25rem; border: 1.5px solid var(--input); border-radius: 10px; background: var(--surface); color: var(--fg); }
.where-row button { min-height: 3.25rem; font-size: 1.05rem; }
.prefs { display: flex; flex-wrap: wrap; gap: 0.75rem 1.6rem; }
.prefs label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; cursor: pointer; }
.prefs input { width: 1.25rem; height: 1.25rem; margin: 0; }
.care-submit { align-self: flex-start; min-height: 3.4rem; padding: 0 1.9rem; font-size: 1.2rem; }
.care-results { display: flex; flex-direction: column; gap: 0.9rem; }
.care-results h2 { margin: 0; font-size: 1.75rem; }
.care-results > p { margin: 0; }
.care-note { padding: 0.9rem 1.1rem; border-radius: 12px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border)); line-height: 1.5; }
.care-map { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.care-map .static-map { aspect-ratio: 768 / 260; }
.care-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.care-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem; display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: flex-start; }
.care-card .avatar-lg { flex: 0 0 4.5rem; width: 4.5rem; height: 4.5rem; }
.care-who { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; overflow-wrap: anywhere; }
.care-who h3 { margin: 0; font-size: 1.45rem; }
.care-who h3 a { color: var(--fg); }
.care-who .num { color: var(--muted); font-family: var(--sans); font-size: 1.05rem; }
.care-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0.3rem 0 0; padding: 0; }
.care-tags li { padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-size: 0.95rem; font-weight: 600; }
.care-actions { flex: 0 1 13rem; display: flex; flex-direction: column; gap: 0.5rem; }
.care-actions .button { min-height: 3rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; text-decoration: none; }
.care-more { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; font-weight: 600; }
.care-about { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.4rem 1.4rem 1rem; }
@media (max-width: 40rem) {
    .care-actions { flex: 1 1 100%; }
    .care-form { padding: 1.1rem; }
    .care-bar, .care-hero, .care-main { padding-left: 1rem; padding-right: 1rem; }
}

/* API guide (docs/PRODUCT_PLAN.md step 1.9). */
.dev-head h1 { margin-bottom: 0.4rem; }
.dev-head .lede { max-width: 48rem; }
.developers pre { margin: 0 0 1rem; padding: 0.9rem 1.1rem; border-radius: 10px; background: #0F1F1B; color: #DCEBE5; font-family: var(--mono); font-size: 0.85rem; line-height: 1.6; overflow-x: auto; white-space: pre; }
.developers pre code { font-family: inherit; color: inherit; background: none; }
.developers .card p { margin: 0 0 0.6rem; }
.dev-side { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.ep-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0.25rem 2rem; }
.ep-groups h3 { margin: 0.6rem 0 0.25rem; }
.ep-list { list-style: none; margin: 0; padding: 0; }
.ep-list li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 0.2rem 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
/* A list without the method badge (the MCP tools): one column, or the text squeezes into the badge's 3.2rem. */
.ep-list-plain li { grid-template-columns: minmax(0, 1fr); }
.ep-method { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; color: var(--green); background: #E8F1ED; border-radius: 5px; padding: 0.1rem 0; text-align: center; align-self: start; }
.prose { max-width: 48rem; }
.prose .card ul { padding-left: 1.2rem; line-height: 1.55; }
.prose .card li { margin-bottom: 0.4rem; }

/* Companies & products (docs/PRODUCT_PLAN.md Phase 9, owner 2026-10-12): main page and the P09/P10 profiles. */
.industry-search { display: flex; gap: 0.5rem; max-width: 44rem; }
.industry-search input { flex: 1; min-width: 0; height: 2.9rem; padding: 0 0.9rem; font: inherit; font-size: 1.05rem; border: 1px solid var(--input); border-radius: 10px; background: var(--surface); color: var(--fg); }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.area-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; }
.amount-list { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.amount-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.amount-list li > :first-child { min-width: 0; }
.amount-list .amount-head { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.profile-row.top-align { align-items: flex-start; }
.industry .stat-row, .company .stat-row, .product .stat-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
@media (max-width: 30rem) { .industry .stat strong, .company .stat strong, .product .stat strong { font-size: 1.6rem; } }
.amount-list li:last-child { border-bottom: 0; }
.amount-list .mono { white-space: nowrap; }
.year-bars { list-style: none; margin: 0.5rem 0 0.75rem; padding: 0; display: flex; align-items: flex-end; gap: 0.6rem; height: 13rem; }
.year-bars li { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; font-size: 0.8rem; }
.year-bars .bar-col { flex: 1 1 auto; width: 100%; max-width: 3rem; display: flex; align-items: flex-end; }
.year-bars .bar-col span { display: block; width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; }
.year-bars .bar-value { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.year-bars .bar-year { font-weight: 600; }
/* Medicare by year on the provider page (older Medicare years): one cell per data year, wrapping on phones. */
.medicare-years { list-style: none; margin: 0.5rem 0 0.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); gap: 0.35rem; }
.medicare-years li { display: flex; flex-direction: column; align-items: center; padding: 0.3rem 0.2rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.8rem; }
.medicare-years li.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.medicare-years li.off { color: var(--muted); background: var(--panel); }
.medicare-years .yr { font-weight: 600; }
.medicare-years .parts { font-family: var(--mono); font-size: 0.72rem; }
.oversight { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.oversight p { margin: 0.35rem 0 0; }
.product h1 .generic { font-family: var(--sans); font-weight: 600; font-size: 0.65em; color: var(--muted); }
.lead-text { font-size: 1.08rem; line-height: 1.5; margin: 0 0 0.6rem; }
@media (max-width: 30rem) { .year-bars .bar-value { font-size: 0.62rem; } .year-bars { gap: 0.3rem; } }

/* Facilities & hospitals, Groups & organizations (docs/PRODUCT_PLAN.md step 3.6): filters above a list, the chosen type or view marked. */
.directory-filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; margin: 0.75rem 0 0; }
.directory-filters .directory-submit { flex: 0 0 auto; }
.directory-filters .check-field label { display: flex; align-items: center; gap: 0.4rem; }
.directory-filters .check-field .small { display: block; max-width: 14rem; }
.stat.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip[aria-current="true"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.view-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* One page per organization (docs/PRODUCT_PLAN.md step 3.9): the section menu stays at the top on wide screens; a detail page's banner
   points to it; the page prints as one document (folded lists opened by profile.js, navigation left out). */
.on-page.sticky { margin: 0.25rem 0 1rem; }
@media (min-width: 60rem) { .on-page.sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 0.6rem 0; box-shadow: 0 1px 0 var(--border); } }
.organization-page [id] { scroll-margin-top: 1rem; }
@media (min-width: 60rem) { .organization-page [id] { scroll-margin-top: 7.5rem; } }
.org-banner { border-color: var(--accent); background: #EEF6F6; }
.facility-card h3 { margin-top: 1.25rem; }
.facility-card h3:first-of-type { margin-top: 0.75rem; }
/* ---- Redesign step 3 (redesign spec §3–§5): home, result cards, view switch, status lines. ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; min-width: 0; }
.card > h2:first-child { margin-top: 0; }

/* Home: a label heading, two boxes, two task links, one data line. */
.home { padding: 2.5rem 0 1.5rem; max-width: 52rem; }
.home h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 1.25rem; }
.home-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.home-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.home-field.what { flex: 3 1 18rem; }
.home-field.where { flex: 2 1 12rem; }
.home-field label { font-weight: 600; font-size: 0.95rem; margin: 0; }
.home-field input { font-size: 1.1rem; padding: 0.75rem 0.9rem; width: 100%; }
.home-search button { font-size: 1.05rem; padding: 0.8rem 1.5rem; min-height: 3rem; }
.home-tasks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.25rem 0 0; font-size: 1.05rem; font-weight: 600; }
.home-more { margin: 1.5rem 0 0.5rem; padding: 0.8rem 1rem; background: var(--panel); border-radius: var(--radius); }
.home-data { font-size: 0.95rem; }
.suggest-kind { flex: 0 0 auto; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 0.3rem; align-self: center; }
.suggest-list li { justify-content: flex-start; }
.suggest-list li > span:nth-child(2) { flex: 1 1 auto; }

/* Summary · Data switch (redesign spec §4), kept in the URL as ?view=data. */
.view-switch { display: inline-flex; border: 1px solid var(--input); border-radius: var(--radius); overflow: hidden; margin-left: auto; }
.view-switch a { padding: 0.4rem 0.9rem; text-decoration: none; color: var(--accent); font-weight: 600; min-height: 2.5rem; display: inline-flex; align-items: center; }
.view-switch a + a { border-left: 1px solid var(--input); }
.view-switch a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
.results-head { gap: 0.6rem; flex-wrap: wrap; }

/* Result cards: no avatar, the status as words with a mark and a color. */
.result-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.result-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1.1rem; background: var(--surface); }
.result-card h3 { margin: 0; font-size: 1.1rem; }
.result-card h3 a { text-decoration: none; }
.result-card h3 a:hover { text-decoration: underline; }
.result-card .credential { font-weight: 400; color: var(--muted); }
.result-card p { margin: 0.2rem 0 0; }
.rc-what { font-weight: 500; }
.rc-distance { color: var(--muted); font-weight: 400; }
.rc-where { color: var(--fg); }
.rc-plans { color: var(--muted); font-size: 0.92rem; }
.rc-status, .status-strip { list-style: none; margin: 0.45rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.92rem; }
.st { display: inline-flex; gap: 0.3rem; align-items: baseline; color: var(--fg); }
.st > span[aria-hidden] { font-weight: 700; width: 1em; text-align: center; }
.st.ok > span[aria-hidden] { color: var(--ok); }
.st.warn { color: var(--warn); }
.st.bad { color: var(--error); font-weight: 600; }
.st.unchecked { color: var(--unchecked); }
.rc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem !important; }
.rc-actions .button { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0.45rem 1.2rem; }

/* Explore page (roadmap C1): the same list as the menu, one line per page. */
.explore-page { max-width: 52rem; }
.explore-lines { margin: 0; padding-left: 1.2rem; }
.explore-lines li { margin: 0.35rem 0; }
.explore-lines a { font-weight: 600; }

/* Provider profile, patient view: the answers first (redesign spec §3). */
.status-strip { flex-direction: column; gap: 0.35rem; font-size: 1rem; margin: 0.9rem 0 0; }
.status-strip .st { gap: 0.5rem; }
.status-strip .st small { color: var(--muted); font-size: 0.85rem; }
.profile-answer .head-contact { margin-top: 1rem; }
.profile-answer .primary-place { margin: 0.75rem 0 0; }
.profile-answer .head-row { flex-direction: row; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; text-align: left; }
.profile-answer .head-main { align-items: flex-start; }
.profile-answer .view-switch { flex: 0 0 auto; }
.static-map.wide { margin: 0.25rem 0 0.25rem; border-radius: var(--radius); }
@media (max-width: 40rem) { .profile-answer .head-row { flex-wrap: wrap; } .profile-answer .view-switch { margin-left: 0; } }

@media print {
  .side, .topbar, .site-footer, .skip, .on-page, .map-card, .pager, button, a.button { display: none !important; }
  .shell, .content { display: block; }
  body { background: #FFFFFF; }
  .card { break-inside: avoid-page; box-shadow: none; }
  .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
}

/* The Data view grid (redesign spec §4): AG Grid in the infinite row model, a column picker, a status line. */
.data-grid { margin: 8px 0 16px; }
.data-grid[hidden] { display: none; }
.grid-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.grid-tools .grid-status { margin: 0; }
.grid-columns { position: relative; }
.grid-columns > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px;
    border: 1px solid var(--border); border-radius: 8px; font-weight: 600; color: var(--accent); background: var(--surface); }
.grid-columns > summary::-webkit-details-marker { display: none; }
.grid-columns > summary::after { content: "▾"; margin-left: 6px; font-size: 0.8em; }
.grid-columns fieldset { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; margin: 0; padding: 8px 12px; min-width: 220px;
    display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.grid-columns label { display: flex; align-items: center; gap: 8px; min-height: 32px; white-space: nowrap; cursor: pointer; }
.grid-box { height: min(70vh, 720px); min-height: 420px; }
.grid-box .mono { font-variant-numeric: tabular-nums; }

/* Peer bars (redesign spec §4): the rank as a marker on a bar, the middle half shaded, the median marked; the numbers in a table. */
.peers { display: grid; gap: 16px; margin: 8px 0 20px; }
@media (min-width: 900px) { .peers:has(> .peer + .peer) { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.peer { margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.peer figcaption { margin-bottom: 10px; line-height: 1.4; }
.peer figcaption .muted { display: block; font-size: 0.9em; }
.peer-bar { position: relative; height: 10px; border-radius: 5px; background: var(--line); margin: 0 6px; }
.peer-mid { position: absolute; left: 25%; width: 50%; top: 0; bottom: 0; background: #C7DDDE; }
.peer-median { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--muted); }
.peer-mark { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--accent); border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px var(--accent); }
.peer-scale { display: flex; justify-content: space-between; font-size: 0.8em; color: var(--muted); margin: 4px 0 8px; }
.peer-table { width: 100%; font-size: 0.9em; font-variant-numeric: tabular-nums; }
.peer-table th { font-weight: 400; color: var(--muted); text-align: left; padding: 2px 8px 2px 0; width: 45%; }
.peer-table td { padding: 2px 0; }

/* Compare (redesign spec §3): names stick to the top and labels to the left inside the scroll box; rows that differ are marked. */
.compare-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 12px; }
.compare-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--border); border-radius: 8px; }
.compare-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compare-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table thead th, .compare-table thead td { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--border); }
.compare-table thead th { min-width: 180px; }
.compare-table thead th a:first-child { display: block; font-weight: 600; }
.compare-table thead th .remove { display: inline-block; margin-top: 4px; }
.compare-table tbody th[scope=row] { position: sticky; left: 0; z-index: 1; background: var(--surface); font-weight: 400; color: var(--muted); width: 190px; min-width: 150px; white-space: normal; box-shadow: 1px 0 0 var(--line); }
.compare-table thead td { left: 0; z-index: 3; }
.compare-table tr.compare-group th { background: var(--panel); font-weight: 600; color: var(--fg); position: static; }
.compare-table tr.differs td { background: #FFF8EB; }
.compare-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.compare-add input { width: 12ch; }
.compare-bar { position: fixed; z-index: 40; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
    padding: 8px 10px 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(21, 35, 42, 0.15); max-width: calc(100% - 24px); }
.compare-bar[hidden] { display: none; }
.compare-button[aria-pressed=true] { border-color: var(--accent); background: #E6F1F1; }

/* Find care (redesign spec §3): the questions fold away above the results; cards without avatars. */
.care-title { margin-bottom: 0.25rem; }
.care-change { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.9rem; background: var(--surface); }
.care-change > summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 32px; display: flex; align-items: center; gap: 0.4rem; }
.care-change[open] > summary { margin-bottom: 0.75rem; }
.care-insurance { display: grid; gap: 0.3rem; margin-top: 0.9rem; max-width: 26rem; }
.care-insurance p { margin: 0; }
main > .care-main { padding: 0; max-width: none; }
.page-view-switch { display: inline-flex; width: auto; align-self: flex-start; margin: 0.4rem 0 0.6rem; }
/* No decorative icons in page heads (redesign spec §5). */
.profile-head .avatar-lg { display: none; }

/* Master lists (roadmap C3): the shared head, the Summary view's cards and the Related box on entity pages. */
.master-head { display: flex; flex-direction: column; gap: 4px; }
.master-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.master-title h1 { margin: 0; }
.master-title .page-view-switch { margin: 0; align-self: center; }
.master-head .lede { margin: 4px 0 0; max-width: 48rem; }
.master-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.master-meta .src { font-size: 0.85rem; color: var(--muted); }
.entity-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 0; padding: 0; color: var(--muted); font-size: 0.95rem; }
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 12px 24px; margin: 0; }
.related-list dt { font-weight: 650; }
.related-list dd { margin: 4px 0 0; }
.related-list ul { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 2px 0; overflow-wrap: anywhere; }
.entity-cards h3 { overflow-wrap: anywhere; }
