/* contact.doctor child theme. Spec sections 4 (design system), 5.1 (home), 10 (navigation), 12 (accessibility).
   Contrast verified with axe-core 4.14 (WCAG 2.2 AA color-contrast) on home, story, about, methodology and 404,
   phone/tablet/desktop, light and dark: 0 violations (Nov 3 2026). Re-run /srv/cd-data/tools/phase0.js after design changes.
   Colorblind simulation of the ramps: still to do (spec 4.1). */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #eef2f3; --surface: #ffffff; --surface-2: #f6f8f9; --ink: #14232e; --muted: #4d5f6b; --rule: #cdd7db;
  --accent: #7a1f5c; --accent-ink: #ffffff; --accent-soft: #f3e8f0; --focus: #7a1f5c;
  --h0: #e3d3df; --h1: #c9a3bf; --h2: #9c5b8e; --h3: #7a1f5c; --h4: #4e0f3a; /* --h2 darkened from spec #a8679a so white labels reach 4.5:1 */ --h-ink: #14232e; --h-ink-dark: #ffffff;
  --hx-1: #efe5ec; --hx-2: #e3d3df; --hx-3: #c9a3bf; --hx-4: #a8679a; --hx-5: #8d3f78; --hx-6: #7a1f5c; --hx-7: #4e0f3a;
  --hx-none-bg: #f6f8f9; --hx-none-line: #b9c4ca;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --w-text: 720px; --w-wide: 1200px; --gutter: 16px;
  --r-ctl: 4px; --r-panel: 8px; --header-h: 56px;
  --shadow: 0 1px 2px rgba(20, 35, 46, .06), 0 6px 20px rgba(20, 35, 46, .06);
  color-scheme: light;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; --header-h: 64px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1b23; --surface: #16242e; --surface-2: #1b2b36; --ink: #e7eef1; --muted: #9fb0ba; --rule: #26363f;
    --accent: #e9a6d2; --accent-ink: #1b0f17; --accent-soft: #2a2230; --focus: #e9a6d2;
    --h0: #2a2230; --h1: #4d2a45; --h2: #7d3a6c; --h3: #be66a3; --h4: #e9a6d2; /* dark --h3 lightened from spec #b45a98 for 4.5:1 with dark labels */ --h-ink: #e7eef1; --h-ink-dark: #1b0f17;
    --hx-1: #2a2230; --hx-2: #3d2a3a; --hx-3: #5a3253; --hx-4: #7d3a6c; --hx-5: #9e4a87; --hx-6: #c46fa9; --hx-7: #e9a6d2;
    --hx-none-bg: #16242e; --hx-none-line: #3a4c57;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1b23; --surface: #16242e; --surface-2: #1b2b36; --ink: #e7eef1; --muted: #9fb0ba; --rule: #26363f;
  --accent: #e9a6d2; --accent-ink: #1b0f17; --accent-soft: #2a2230; --focus: #e9a6d2;
  --h0: #2a2230; --h1: #4d2a45; --h2: #7d3a6c; --h3: #be66a3; --h4: #e9a6d2; /* dark --h3 lightened from spec #b45a98 for 4.5:1 with dark labels */ --h-ink: #e7eef1; --h-ink-dark: #1b0f17;
  --hx-1: #2a2230; --hx-2: #3d2a3a; --hx-3: #5a3253; --hx-4: #7d3a6c; --hx-5: #9e4a87; --hx-6: #c46fa9; --hx-7: #e9a6d2;
  --hx-none-bg: #16242e; --hx-none-line: #3a4c57;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* Map Blocksy's palette onto our tokens so Blocksy-rendered parts (single posts, archives) match. */
html:root {
  --theme-palette-color-1: var(--accent); --theme-palette-color-2: var(--accent); --theme-palette-color-3: var(--ink);
  --theme-palette-color-4: var(--ink); --theme-palette-color-5: var(--rule); --theme-palette-color-6: var(--surface-2);
  --theme-palette-color-7: var(--bg); --theme-palette-color-8: var(--surface);
  --theme-text-color: var(--ink); --theme-link-initial-color: var(--accent); --theme-link-hover-color: var(--accent);
  --theme-headings-color: var(--ink); --theme-border-color: var(--rule); --theme-button-background-initial-color: var(--accent);
  --theme-font-family: var(--font-body); --theme-normal-container-max-width: var(--w-wide);
  --theme-narrow-container-max-width: var(--w-text); --theme-content-vertical-spacing: clamp(2rem, 5vw, 4rem);
}

/* ---------- 2. Base ---------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body.cd-site {
  background: var(--bg); color: var(--ink); font-family: var(--font-body);
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem); line-height: 1.6; text-rendering: optimizeLegibility;
}
body.cd-site h1, body.cd-site h2, body.cd-site h3, body.cd-site h4, .cd-display {
  font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -.01em; font-weight: 700;
}
body.cd-site h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem); }
body.cd-site h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem); }
body.cd-site h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.375rem); }
body.cd-site a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: from-font; }
body.cd-site a:hover { text-decoration-thickness: 2px; }
body.cd-site :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
table, .cd-stat dd, .cd-tile__n, .cd-statelist__n, .cd-st__n { font-variant-numeric: tabular-nums; }
::selection { background: var(--h1); color: var(--ink); }
img, svg, video { max-width: 100%; height: auto; }
.cd-i { width: 1.25em; height: 1.25em; flex: none; }
.cd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cd-wrap { width: 100%; max-width: calc(var(--w-wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.cd-wrap--text { max-width: calc(var(--w-text) + 2 * var(--gutter)); }
.cd-skip { position: absolute; left: 8px; top: -100px; z-index: 1000; padding: 10px 16px; background: var(--accent); color: var(--accent-ink) !important; border-radius: var(--r-ctl); font-weight: 700; }
.cd-skip:focus { top: 8px; }
#main:focus { outline: none; }

/* ---------- 3. Controls ---------- */
.cd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .6em 1.15em;
  border-radius: var(--r-ctl); border: 1px solid transparent; font: 600 1rem/1.2 var(--font-body); cursor: pointer;
  text-decoration: none !important; transition: background-color .15s, border-color .15s, color .15s;
}
.cd-btn--primary { background: var(--accent); color: var(--accent-ink) !important; }
.cd-btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.cd-btn--secondary { background: var(--surface); color: var(--accent) !important; border-color: var(--rule); }
.cd-btn--secondary:hover { border-color: var(--accent); }
.cd-btn--lg { min-height: 48px; font-size: 1.0625rem; }
.cd-btn-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-ctl); border: 0;
  background: transparent; color: var(--ink); cursor: pointer; padding: 0;
}
.cd-btn-icon:hover { background: var(--surface-2); }
.cd-field { display: grid; gap: 4px; }
.cd-field label, .cd-inline-search label { font-weight: 600; font-size: .9375rem; }
.cd-site input[type="search"], .cd-site input[type="text"], .cd-site input[type="email"] {
  width: 100%; min-height: 48px; padding: .6em .9em; font: 400 1rem/1.3 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--rule)); border-radius: var(--r-ctl);
}
.cd-site input::placeholder { color: var(--muted); opacity: 1; }
.cd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink) !important; text-decoration: none !important;
}
.cd-chip:hover { border-color: var(--accent); }
.cd-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 700; margin: 0; }
.cd-kicker { margin: 0 0 .35em; color: var(--accent); font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cd-more { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; white-space: nowrap; }
.cd-source { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.5; }

/* ---------- 4. Header ---------- */
.cd-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); transition: transform .2s ease; }
.admin-bar .cd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cd-header { top: 0; } }
.cd-header.is-hidden { transform: translateY(-100%); }
.cd-header__in { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.cd-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink) !important; text-decoration: none !important; min-height: 44px; }
.cd-logo__text { font: 700 1.25rem/1 var(--font-display); letter-spacing: -.01em; }
.cd-logo__dot { color: var(--accent); }
.cd-nav { margin-left: auto; }
.cd-nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.cd-nav__list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-ctl); color: var(--ink) !important; font-weight: 600; font-size: .975rem; text-decoration: none !important; }
.cd-nav__list a:hover, .cd-nav__list .current-menu-item > a { background: var(--surface-2); color: var(--accent) !important; }
.cd-header__tools { display: flex; align-items: center; gap: 2px; }
.cd-menu-btn { display: none; }
.cd-header-search { border-top: 1px solid var(--rule); background: var(--surface); padding: 12px 0; }
.cd-header-search__in { display: flex; gap: 8px; }
@media (max-width: 899px) {
  .cd-menu-btn { display: inline-grid; }
  .cd-nav { position: fixed; inset: var(--header-h) 0 0 0; margin: 0; background: var(--bg); padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; display: none; }
  .admin-bar .cd-nav { inset-block-start: calc(var(--header-h) + 46px); }
  .cd-nav.is-open { display: block; }
  .cd-nav__list { flex-direction: column; gap: 0; }
  .cd-nav__list a { min-height: 56px; font-size: 1.125rem; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 0 4px; }
  .cd-header__tools { margin-left: auto; }
}

/* ---------- 5. Home ---------- */
.cd-home { padding-bottom: 0; }
.cd-hero { padding-block: clamp(1.5rem, 4vw, 3.5rem); }
.cd-hero__grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
@media (min-width: 900px) and (orientation: landscape), (min-width: 1200px) { .cd-hero__grid { grid-template-columns: 5fr 7fr; min-height: min(560px, 80vh); } }
.cd-hero__h { font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem) !important; margin: 0 0 .4em; max-width: 14ch; }
.cd-hero__lede { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--muted); margin: 0 0 1.25rem; max-width: 40ch; }
.cd-find { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--shadow); max-width: 34rem; }
.cd-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 1rem 0 0; font-size: .9375rem; }
.cd-popular__label { color: var(--muted); font-weight: 600; }
.cd-hero__map { margin: 0; display: grid; gap: 10px; }
.cd-hexmap-link { display: block; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--rule); padding: clamp(8px, 2vw, 20px); box-shadow: var(--shadow); }
.cd-hexmap { display: block; width: 100%; height: auto; aspect-ratio: 960 / 600; }
.cd-legend { display: grid; gap: 6px; font-size: .8125rem; color: var(--muted); }
.cd-legend .cd-btn { justify-self: start; margin-top: 4px; }
.cd-legend__title { font-weight: 700; color: var(--ink); font-size: .875rem; }
.cd-legend__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cd-sw { display: inline-block; width: 22px; height: 12px; border-radius: 2px; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.cd-sw--none { background: repeating-linear-gradient(45deg, var(--hx-none-bg) 0 2px, var(--hx-none-line) 2px 3.4px); }
.cd-legend__row > span:not(.cd-sw) { margin-right: 6px; }
.cd-legend--inline { margin-top: 16px; }

.cd-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.cd-section--alt { background: var(--surface-2); border-block: 1px solid var(--rule); }
.cd-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 1.25rem; }
.cd-section__head h2 { margin: 0; }
.cd-section__sub { margin: 0; color: var(--muted); }
.cd-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .cd-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cd-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cd-tiles--rx { grid-template-columns: repeat(7, minmax(0, 1fr)); } } /* 14 drug groups: two even rows */
.cd-tile__ex { display: block; margin-top: 3px; font-size: .8125rem; font-weight: 400; color: var(--muted); }
.cd-tile { display: grid; gap: 6px; height: 100%; grid-template-rows: 1fr auto; align-content: space-between; padding: 14px 16px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--rule); color: var(--ink) !important; text-decoration: none !important; position: relative; }
.cd-tile:hover { border-color: var(--accent); }
.cd-tile__name { font-weight: 700; line-height: 1.25; }
.cd-tile__n { font: 700 1.125rem/1.1 var(--font-display); }
.cd-tile__unit { font: 400 .8125rem var(--font-body); color: var(--muted); }

.cd-tilegrid { list-style: none; margin: 0 auto; padding: 0; display: none; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: 4px; max-width: 900px; }
@media (min-width: 600px) { .cd-tilegrid { display: grid; } .cd-statelist { display: none; } }
.cd-st { display: grid; place-items: center; aspect-ratio: 1; border-radius: 4px; text-decoration: none !important; line-height: 1.05; padding: 2px; }
.cd-st abbr { text-decoration: none; font-weight: 700; font-size: clamp(.7rem, .5rem + .5vw, .95rem); }
.cd-st__n { font-size: clamp(.6rem, .45rem + .35vw, .78rem); }
.cd-st--0 { background: var(--h0); color: var(--h-ink) !important; }
.cd-st--1 { background: var(--h1); color: var(--h-ink) !important; }
.cd-st--2 { background: var(--h2); color: #fff !important; }
.cd-st--3 { background: var(--h3); color: #fff !important; }
.cd-st--4 { background: var(--h4); color: #fff !important; }
:root[data-theme="dark"] .cd-st--3, :root[data-theme="dark"] .cd-st--4 { color: var(--h-ink-dark) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-st--3, :root:not([data-theme="light"]) .cd-st--4 { color: var(--h-ink-dark) !important; } }
.cd-st:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.cd-statelist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 16px; }
.cd-statelist a { display: flex; justify-content: space-between; gap: 8px; min-height: 44px; align-items: center; border-bottom: 1px solid var(--rule); color: var(--ink) !important; text-decoration: none !important; break-inside: avoid; }
.cd-statelist__n { color: var(--muted); font-weight: 600; }

.cd-stories { display: grid; gap: 16px; }
@media (min-width: 600px) { .cd-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cd-stories { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cd-card--lead { grid-column: span 2; grid-row: span 2; } }
.cd-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; }
.cd-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.cd-card__body { padding: 16px 18px 18px; }
.cd-card__h { margin: 0 0 .4em; font-size: 1.2rem !important; }
.cd-card--lead .cd-card__h { font-size: clamp(1.35rem, 1.2rem + .8vw, 1.875rem) !important; }
.cd-card__h a { color: var(--ink) !important; text-decoration: none; }
.cd-card__h a:hover { text-decoration: underline; }
.cd-card__dek { color: var(--muted); margin: 0 0 .5em; }
.cd-card__meta { margin: 0; color: var(--muted); font-size: .875rem; }

.cd-band { background: var(--surface); border-block: 1px solid var(--rule); padding-block: clamp(2.5rem, 6vw, 4rem); }
.cd-band h2 { margin-top: 0; }
.cd-stats { display: grid; gap: 16px; margin: 0 0 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .cd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-section__dek { margin: -0.25rem 0 1.25rem; max-width: 62ch; color: var(--muted); }
.cd-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 16px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--r-panel) var(--r-panel) 0; }
.cd-stat dt { color: var(--muted); font-size: .9375rem; line-height: 1.35; }
.cd-stat dd { margin: 0; font: 700 clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem)/1 var(--font-display); color: var(--ink); }

.cd-cols3 { display: grid; gap: 16px; }
@media (min-width: 900px) { .cd-cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 18px 20px; }
.cd-panel h3 { margin: 0 0 .4em; }
.cd-panel p { color: var(--muted); margin: 0 0 .75em; }
.cd-newsletter { text-align: center; padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule); }
.cd-newsletter p { color: var(--muted); }

/* ---------- 6. Content (posts and pages rendered by Blocksy) ---------- */
.cd-site .entry-content { --theme-content-spacing: 1.25em; }
/* One column width for everything in posts and pages: title, text, tables and maps share the same edges (owner request,
   Nov 8; replaces the 720px text / 1200px wide split of spec 4.3). Change --w-col to change all of them together. */
.cd-site { --w-col: min(var(--w-wide), calc(100vw - 2 * var(--gutter))); }
.cd-site .entry-content > *, .cd-site .entry-content > .alignwide, .cd-site .entry-content > .wp-block-table { width: var(--w-col); max-width: none; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }
.cd-site .hero-section.is-width-constrained { max-width: var(--w-col) !important; width: var(--w-col); margin-left: auto; margin-right: auto; }
/* text tables: left-align every column (numeric tables keep right-aligned numbers) */
.cd-site .entry-content .cd-table--text td, .cd-site .entry-content .cd-table--text th { text-align: left; }
.cd-site .entry-content > .alignfull { max-width: none; }
.cd-site .entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cd-site .entry-content th, .cd-site .entry-content td { padding: .55em .75em; border-bottom: 1px solid var(--rule); text-align: left; }
.cd-site .entry-content td:not(:first-child), .cd-site .entry-content th:not(:first-child) { text-align: right; }
.cd-site .entry-content thead th { border-bottom: 2px solid var(--ink); }
.cd-site .entry-content .wp-block-table { overflow-x: auto; }
.cd-site .entry-content figcaption { color: var(--muted); font-size: .875rem; }
.cd-site .cd-lede { font-size: 1.2em; line-height: 1.5; }
.cd-site .ct-container-full, .cd-site .ct-container { background: transparent; }
.cd-site [data-prefix] .entry-card, .cd-site .entry-card { background: var(--surface); }
/* Comments are off sitewide (spec 26): hide any leftover comment UI */
.cd-site .ct-comments, .cd-site #comments, .cd-site .comments-area, .cd-site .meta-comments { display: none !important; }

.cd-404 { padding-block: clamp(3rem, 8vw, 6rem); }
.cd-inline-search { display: grid; gap: 6px; margin: 1.5rem 0; }
.cd-inline-search__row { display: flex; gap: 8px; }
.cd-linklist { padding-left: 1.2em; }
.cd-linklist li { margin: .4em 0; }

/* ---------- 7. Footer ---------- */
.cd-footer { background: var(--surface); border-top: 1px solid var(--rule); padding-block: 2rem calc(1rem + env(safe-area-inset-bottom)); margin-top: 0; font-size: .9375rem; }
.cd-footer__grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cd-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cd-footer__grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 24px 32px; } }
.cd-footer__brand p { color: var(--muted); margin: .5em 0; }
.cd-footer__meta { font-size: .875rem; }
.cd-footer__h { font: 700 .8125rem/1.3 var(--font-body) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; margin: 0 0 .5em; }
.cd-footer ul { list-style: none; margin: 0; padding: 0; }
.cd-footer li a { display: inline-flex; min-height: 32px; align-items: center; color: var(--ink) !important; text-decoration: none; }
.cd-footer li a:hover { color: var(--accent) !important; text-decoration: underline; }
.cd-footer__fine { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .8125rem; }
.cd-footer__fine p { margin: .35em 0; }

/* ---------- 8. Preferences and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .cd-header.is-hidden { transform: none; }
}
@media (forced-colors: active) {
  .cd-st, .cd-sw, .cd-tile::before { forced-color-adjust: none; border: 1px solid CanvasText; }
  .cd-btn--primary { border: 2px solid ButtonText; }
}
@media print {
  .cd-header, .cd-footer__grid, .cd-skip, .cd-find, .cd-chips, .cd-btn, .cd-newsletter, .cdm-controls, .cdm-chips { display: none !important; }
  body.cd-site { background: #fff; color: #000; font-size: 11pt; }
  body.cd-site a { color: #000; }
  .cd-site .entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
}

/* Core table stripes use a fixed light grey; follow the theme instead (dark-mode contrast) */
.cd-site .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background-color: var(--surface-2); }
.cd-site .wp-block-table.is-style-stripes { border-bottom-color: var(--rule); }

/* ---------- 9. Display settings: color vision and contrast (header "Display" menu) ----------
   Color-blind friendly mode uses Cividis (Nuñez, Anderton & Renslow 2018), a sequential scale designed to read the
   same with and without color-vision deficiency, and an Okabe–Ito blue/orange diverging scale. WCAG 1.4.1: color is
   never the only cue (labels, hatching for "none"). Tile label contrast checked to 4.5:1. */
:root { --div-1: #0f6e6e; --div-2: #4fa3a0; --div-3: #a9d3cf; --div-4: #e4e7e8; --div-5: #d8b4cf; --div-6: #a8679a; --div-7: #5c1446; --map-stroke: var(--surface); --map-stroke-w: .3; }
:root[data-cvd="on"] {
  --hx-1: #fdea45; --hx-2: #d5c164; --hx-3: #a49d78; --hx-4: #7f7c75; --hx-5: #575c6e; --hx-6: #1f3e6e; --hx-7: #002051;
  --h0: #fdea45; --h1: #bbaf71; --h2: #67645e; --h3: #3c4d6e; --h4: #002051;
  --div-1: #0072b2; --div-2: #56b4e9; --div-3: #b9dcf2; --div-4: #e4e7e8; --div-5: #f6d28f; --div-6: #e69f00; --div-7: #a35d00;
}
:root[data-cvd="on"][data-theme="dark"] {
  --hx-1: #193b6d; --hx-2: #4a556d; --hx-3: #716f71; --hx-4: #8f8a78; --hx-5: #b1a774; --hx-6: #ddc75f; --hx-7: #fdea45;
  --h0: #193b6d; --h1: #3c4d6e; --h2: #67645e; --h3: #b1a774; --h4: #fdea45;
}
@media (prefers-color-scheme: dark) {
  :root[data-cvd="on"]:not([data-theme="light"]) {
    --hx-1: #193b6d; --hx-2: #4a556d; --hx-3: #716f71; --hx-4: #8f8a78; --hx-5: #b1a774; --hx-6: #ddc75f; --hx-7: #fdea45;
    --h0: #193b6d; --h1: #3c4d6e; --h2: #67645e; --h3: #b1a774; --h4: #fdea45;
  }
}
/* Light tiles get dark labels, dark tiles light labels (works for both palettes) */
:root[data-cvd="on"] .cd-st--2 { color: #fff !important; }
:root[data-cvd="on"][data-theme="dark"] .cd-st--0, :root[data-cvd="on"][data-theme="dark"] .cd-st--1, :root[data-cvd="on"][data-theme="dark"] .cd-st--2 { color: var(--h-ink) !important; }
@media (prefers-color-scheme: dark) {
  :root[data-cvd="on"]:not([data-theme="light"]) .cd-st--0, :root[data-cvd="on"]:not([data-theme="light"]) .cd-st--1, :root[data-cvd="on"]:not([data-theme="light"]) .cd-st--2 { color: var(--h-ink) !important; }
}

/* More contrast: darker secondary text and borders, always-underlined links, stronger map borders and focus */
:root[data-contrast="more"] { --muted: var(--ink); --rule: #5f6f79; --map-stroke: var(--ink); --map-stroke-w: .55; --focus: var(--ink); }
:root[data-contrast="more"][data-theme="dark"] { --rule: #9fb0ba; }
@media (prefers-color-scheme: dark) { :root[data-contrast="more"]:not([data-theme="light"]) { --rule: #9fb0ba; } }
:root[data-contrast="more"] body.cd-site a { text-decoration: underline; text-decoration-thickness: 2px; }
:root[data-contrast="more"] body.cd-site :focus-visible { outline-width: 4px; }
@media (prefers-contrast: more) { :root:not([data-contrast="standard"]) { --muted: var(--ink); --rule: #5f6f79; --map-stroke: var(--ink); --map-stroke-w: .55; } }

/* Display menu in the header */
.cd-display { position: relative; }
.cd-display__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; width: min(300px, calc(100vw - 24px)); padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--shadow); }
.cd-display__panel fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.cd-display__panel legend { font-weight: 700; font-size: .875rem; margin-bottom: 6px; padding: 0; }
.cd-display__opts { display: grid; gap: 2px; }
.cd-display__opts label { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: .9375rem; cursor: pointer; }
.cd-display__opts input { width: 18px; height: 18px; accent-color: var(--accent); }
.cd-display__hint { margin: 0; font-size: .8125rem; color: var(--muted); }
.cd-display__swatch { display: inline-flex; margin-left: auto; }
.cd-display__swatch i { width: 12px; height: 12px; display: inline-block; }

/* All native selects and their option lists follow the theme (dark mode legibility) */
.cd-site select { color-scheme: inherit; background-color: var(--surface); color: var(--ink); }
.cd-site select option, .cd-site select optgroup { background-color: var(--surface); color: var(--ink); }

/* ---------- Search results (search.php) ---------- */
.cd-search { padding-block: 2rem 3rem; }
.cd-search__head h1 { margin: .25rem 0 1rem; overflow-wrap: anywhere; }
.cd-find--inline { margin-bottom: 1.5rem; }
.cd-search__sec { margin-top: 2rem; }
.cd-search__sec .cd-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 1rem; }
.cd-search__sec h2 { margin: 0; }
.cd-search__where { font-weight: 400; color: var(--muted); }
.cd-search__who { display: inline-flex; margin: 0; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.cd-search__who a { padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9375rem; }
.cd-search__who a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.cd-search__note { padding: 14px 16px; border-radius: var(--r-panel); background: var(--surface-2); }
.cd-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .cd-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cd-results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-result { padding: 14px 16px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--rule); display: grid; gap: 4px; align-content: start; }
.cd-result__name { margin: 0; font-size: 1.0625rem; line-height: 1.3; }
.cd-result__cred { font-weight: 400; color: var(--muted); }
.cd-result__spec { margin: 0; color: var(--accent); font-weight: 600; font-size: .9375rem; }
.cd-result__addr { margin: 0; color: var(--muted); font-size: .9375rem; }
.cd-result__links { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9375rem; }
.cd-result__links a { min-height: 32px; display: inline-flex; align-items: center; }
.cd-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 1.25rem 0 .5rem; }
.cd-pager__n { color: var(--muted); }
@media (min-width: 640px) { .cd-find--inline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; max-width: none; } .cd-find--inline .cd-btn { justify-self: start; min-width: 10rem; } }
@media (min-width: 1000px) { .cd-find--inline { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; } .cd-find--inline .cd-btn { justify-self: stretch; min-width: 0; } }
.cd-field__opt { font-weight: 400; color: var(--muted); }

/* ---------- Maps hub (page-maps.php) ---------- */
.cd-maps { padding-block: 2rem 3rem; }
.cd-maps__head h1 { margin: .25rem 0 .75rem; }
.cd-maps__intro { max-width: 62ch; color: var(--muted); font-size: 1.0625rem; margin-bottom: 1.5rem; }
.cd-maplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cd-maplist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cd-maplist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-mapcard { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.cd-mapcard__img img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.cd-mapcard__body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.cd-mapcard__h { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.cd-mapcard__h a { color: var(--ink); text-decoration: none; }
.cd-mapcard__h a:hover { text-decoration: underline; }
.cd-mapcard__dek { margin: 0; color: var(--muted); }
.cd-mapcard__views { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-mapcard__label { font-weight: 600; font-size: .9375rem; }
.cd-maplist .cd-mapcard__h { font-size: 1.25rem; line-height: 1.3; letter-spacing: 0; }
.cd-maplist .cd-mapcard__h a { color: var(--ink); }

/* ---------- Doctor page (page-doctor.php) ---------- */
.cd-doc { padding-block: 1.25rem 3rem; }
.cd-crumbs { font-size: .9375rem; color: var(--muted); margin-bottom: 1rem; overflow-wrap: anywhere; }
.cd-doc__head h1 { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.cd-doc__cred { font-weight: 400; color: var(--muted); }
.cd-doc__spec { margin: 0 0 1rem; font-size: 1.125rem; color: var(--accent); font-weight: 600; }
.cd-doc__muted { color: var(--muted); font-weight: 400; }
.cd-doc__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.cd-doc__contact p { margin: 0; }
.cd-doc__badges { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cd-doc__badges li { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--rule); font-size: .875rem; font-weight: 600; }
.cd-doc__glance { margin-top: 1.5rem; }
.cd-stat__text { font-size: 1.125rem !important; line-height: 1.35; }
.cd-doc__grid { display: grid; gap: 24px; margin-top: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cd-doc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cd-doc__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-doc__grid > section, .cd-doc__sec { padding: 18px 20px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--rule); }
.cd-doc__sec { margin-top: 24px; }
.cd-doc h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.cd-doc__list { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.cd-doc__tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; vertical-align: middle; }
.cd-doc__note { font-size: .875rem; color: var(--muted); margin: .75rem 0 0; }
.cd-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border-left: 2px solid var(--rule); }
.cd-timeline li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 10px; padding-left: 12px; position: relative; }
.cd-timeline li::before { content: ""; position: absolute; left: -6px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.cd-timeline__when { font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-doc__cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .cd-doc__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cd-table-wrap { overflow-x: auto; }
.cd-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.cd-table caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.cd-table th, .cd-table td { padding: 7px 8px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.cd-table th[scope="row"] { font-weight: 400; }
.cd-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-doc__near { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.cd-doc__near a { min-height: 32px; display: inline-flex; align-items: center; }
.cd-doc__sources { margin-top: 2rem; font-size: .9375rem; color: var(--muted); }
.cd-doc__sources h2 { font-size: 1rem; }
@media print { .cd-doc__contact .cd-btn { display: none !important; } }

/* Search: match count and page-size switch (Nov 8) */
.cd-search__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 1rem; }
.cd-search__count { margin: 0; color: var(--muted); font-size: .9375rem; }
.cd-search__per { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .9375rem; color: var(--muted); }
.cd-search__per .cd-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.cd-search__per .cd-seg a { padding: 8px 12px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); font-weight: 600; }
.cd-search__per .cd-seg a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.cd-result__also { font-weight: 400; color: var(--muted); }

/* Home: "Start here" cards and example searches (Nov 8) */
.cd-start__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cd-start__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cd-start__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cd-start__card { position: relative; }
.cd-start__card .cd-card__h a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cd-start__card:hover { border-color: var(--accent); }
.cd-start__card:focus-within { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.cd-start__card .cd-card__dek { margin: 0; }
.cd-popular--try { margin-top: .75rem; }
/* Home story cards: the whole card (image included) opens the story; one link per card, so screen readers hear it once */
.cd-stories .cd-card { position: relative; }
.cd-stories .cd-card__h a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cd-stories .cd-card:hover { border-color: var(--accent); }
.cd-stories .cd-card:hover .cd-card__h a { text-decoration: underline; }
.cd-stories .cd-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.cd-stories .cd-card__h a:focus-visible { outline: none; }
.cd-start__card .cd-card__h a:focus-visible { outline: none; }

/* FAQ page: questions as Details blocks (work without JavaScript) */
.cd-site .entry-content .cd-faq { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); padding: 0; margin-top: 10px !important; margin-bottom: 0 !important; }
.cd-site .entry-content .cd-faq > summary { cursor: pointer; padding: 14px 18px; min-height: 44px; font-weight: 600; font-size: 1.0625rem; list-style-position: inside; margin: 0; }
.cd-site .entry-content .cd-faq[open] > summary { border-bottom: 1px solid var(--rule); }
.cd-site .entry-content .cd-faq > p { margin: 0; padding: 14px 18px 16px; }
.cd-faq-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-left: 0 !important; list-style: none; }
/* Callout (e.g. an "Illustrative sample" example in a guide) */
.cd-site .entry-content .cd-callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 14px 18px; }

/* ---- Industry payments by clinician (page-industry-payments-by-doctor.php) ---- */
.cd-find--pay { max-width: none; margin-bottom: 1.5rem; }
.cd-find--pay select { width: 100%; min-height: 48px; padding: .6em .9em; font: 400 1rem/1.3 var(--font-body); border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--rule)); border-radius: var(--r-ctl); }
@media (min-width: 640px) { .cd-find--pay { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; } .cd-find--pay .cd-field--wide { grid-column: 1 / -1; } .cd-find--pay .cd-btn { justify-self: start; min-width: 10rem; } }
@media (min-width: 1000px) { .cd-find--pay { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; } .cd-find--pay .cd-field--wide { grid-column: auto; } .cd-find--pay .cd-btn { justify-self: stretch; min-width: 0; } }
.cd-payrec__list, .cd-payrec__list.cd-results { grid-template-columns: minmax(0, 1fr); }
.cd-payrec__row { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 14px; align-items: start; }
.cd-payrec__list.is-unranked .cd-payrec__row { grid-template-columns: minmax(0, 1fr) auto; }
.cd-payrec__rank { font-family: var(--font-display, inherit); font-weight: 700; color: var(--muted); min-width: 2.2em; font-variant-numeric: tabular-nums; padding-top: 2px; }
.cd-payrec__amt { margin: 0; text-align: right; display: grid; font-variant-numeric: tabular-nums; }
.cd-payrec__amt strong { font-size: 1.1875rem; }
.cd-payrec__amt span { color: var(--muted); font-size: .875rem; }
.cd-payrec__for { grid-column: 1 / -1; margin: 6px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: .9375rem; }
.cd-payrec__list:not(.is-unranked) .cd-payrec__for { padding-left: calc(2.2em + 14px); }
.cd-payrec__for dt { color: var(--muted); }
.cd-payrec__for dd { margin: 0; }
@media (max-width: 520px) {
  .cd-payrec__row { grid-template-columns: auto minmax(0, 1fr); }
  .cd-payrec__amt { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .cd-payrec__list.is-unranked .cd-payrec__amt { grid-column: 1; }
  .cd-payrec__list:not(.is-unranked) .cd-payrec__for { padding-left: 0; }
  .cd-payrec__for { grid-template-columns: minmax(0, 1fr); }
  .cd-payrec__for dd + dt { margin-top: 4px; }
}
.cd-doc__h3 { font-size: 1rem; margin: .75rem 0 .4rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---- Workplaces: hospitals and medical groups (page-hospitals.php, page-practices.php) ---- */
.cd-find--work { max-width: none; margin-bottom: 1rem; }
.cd-find--work select { width: 100%; min-height: 48px; padding: .6em .9em; font: 400 1rem/1.3 var(--font-body); border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--rule)); border-radius: var(--r-ctl); }
@media (min-width: 640px) { .cd-find--work { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: end; } }
.cd-work__table { margin: 1rem 0; overflow-x: auto; }
.cd-work__table table { width: 100%; border-collapse: collapse; }
.cd-work__table th, .cd-work__table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.cd-work__table thead th { font-size: .875rem; color: var(--muted); }
.cd-work__table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-work__table tbody th { font-weight: 600; }
.cd-countlist { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 24px; }
.cd-countlist a { display: flex; justify-content: space-between; gap: 8px; min-height: 44px; align-items: center; border-bottom: 1px solid var(--rule); color: var(--ink) !important; text-decoration: none !important; break-inside: avoid; }
.cd-countlist a:hover span:first-child, .cd-countlist a:focus-visible span:first-child { text-decoration: underline; }
.cd-countlist__n { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .cd-work .cd-doc__sec .cd-countlist { columns: 2; } }
@media (min-width: 1000px) { .cd-work .cd-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cd-doc__tag--warn { background: var(--surface-2); color: var(--ink); border: 1px solid var(--rule); font-weight: 600; white-space: normal; }
@media (min-width: 1000px) {
  .cd-work .cd-doc__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .cd-work .cd-doc__grid > section:only-child { grid-column: 1 / -1; }
  .cd-work .cd-doc__grid > section:first-child .cd-countlist { columns: 2; }
}
@media (min-width: 640px) and (max-width: 999px) { .cd-work .cd-doc__grid .cd-countlist { columns: 2; } }
.cd-trial__h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem); overflow-wrap: anywhere; }
.cd-trial__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0 0 .75rem; }
.cd-trial__facts dt { color: var(--muted); font-weight: 600; }
.cd-trial__facts dd { margin: 0; }
.cd-trial__summary { color: var(--ink); }
.cd-countlist__row { display: flex; justify-content: space-between; gap: 8px; min-height: 44px; align-items: center; border-bottom: 1px solid var(--rule); break-inside: avoid; }
@media (max-width: 599px) { .cd-hide-sm { display: none; } }

/* Drug pages (/drugs/) */
.cd-find--drug { grid-template-columns: minmax(0, 1fr) auto; }
@media (min-width: 640px) { .cd-find--drug { grid-template-columns: minmax(0, 1fr) auto; } }
.cd-doc__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: .5rem 0; }
.cd-drug__label { max-width: 70ch; }
.cd-drug__box { border: 2px solid var(--ink); border-radius: 10px; padding: 12px 16px; margin: 1rem 0; background: var(--surface-2); }
.cd-drug__box p { margin: .4rem 0 0; }
.cd-drug__events { list-style: none; padding: 0; margin: .5rem 0; }
.cd-drug__events li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
/* Specialty pages: training path */
.cd-path { list-style: none; padding: 0; margin: .5rem 0 1rem; counter-reset: step; }
.cd-path li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 8px 34px; border-left: 3px solid var(--accent); margin-left: 10px; }
.cd-path li::before { counter-increment: step; content: counter(step); position: absolute; left: -13px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--bg, #fff); font: 600 .75rem/22px var(--font-body); text-align: center; }
.cd-path__yrs { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.cd-work .cd-countlist--one { columns: 1 !important; }
/* Search results map (server-drawn SVG; works without JavaScript) */
.cd-search__split.has-map { display: grid; gap: 24px; }
.cd-search__map { order: 0; }
@media (min-width: 1000px) {
  .cd-search__split.has-map { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: start; }
  .cd-search__map { order: 0; position: sticky; top: 88px; }
}
.cd-smap { margin: 0; border: 1px solid var(--rule); border-radius: 12px; padding: 12px; background: var(--surface, transparent); }
.cd-smap__svg { display: block; width: 100%; height: auto; max-height: 340px; }
.cd-smap__svg circle { fill: var(--accent); fill-opacity: .55; stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cd-smap figcaption { font-size: .875rem; color: var(--muted); margin: .5rem 0 .25rem; }
.cd-smap__top { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cd-smap__top li { display: flex; justify-content: space-between; gap: 8px; min-height: 36px; align-items: center; border-bottom: 1px solid var(--rule); font-size: .9375rem; }
:root[data-theme="dark"] .cd-smap__svg image { filter: invert(.86) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-smap__svg image { filter: invert(.86) hue-rotate(180deg); } }
.cd-papers { margin: .5rem 0; padding-left: 1.4em; }
.cd-papers li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.cd-papers .cd-doc__muted { display: block; font-size: .875rem; }
@media (min-width: 1000px) { .cd-work .cd-doc__grid.cd-doc__grid--even { grid-template-columns: 1fr 1fr; } }
.cd-search__work .cd-countlist__row { flex-wrap: wrap; justify-content: flex-start; column-gap: 8px; padding: 6px 0; }
.cd-search__go { margin-left: auto; white-space: nowrap; font-weight: 600; }
.cd-seeall { margin: .5rem 0 0; font-weight: 600; }
a.cd-countlist__n { text-decoration: underline; }
/* Location maps on hospital and group pages */
.cd-placemap .cd-smap__svg { max-height: 300px; }
.cd-smap__svg circle.is-main { fill: var(--ink); fill-opacity: 1; stroke: var(--bg, #fff); stroke-width: 2; }
.cd-smap__svg a circle:hover, .cd-smap__svg a:focus circle { fill-opacity: .9; }
.cd-smap__svg a:focus { outline: none; }
.cd-smap__svg a:focus circle { stroke-width: 3; stroke: var(--ink); }
.cd-doc__head.has-map > .cd-placemap { margin: 0 0 1rem; }
@media (min-width: 900px) {
  .cd-doc__head.has-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); column-gap: 32px; align-items: start; }
  .cd-doc__head.has-map > * { grid-column: 1; }
  .cd-doc__head.has-map > .cd-placemap { grid-column: 2; grid-row: 1 / span 8; }
  .cd-locsplit.has-map { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cd-locsplit.has-map > .cd-placemap { position: sticky; top: 88px; }
}
/* Address pages */
.cd-doc__locnote { margin: .25rem 0 0; font-weight: 600; }
.cd-locsplit2 { display: grid; gap: 24px; margin-top: 2rem; }
@media (min-width: 900px) { .cd-locsplit2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; } }
.cd-locsplit2 .cd-countlist a[aria-current="true"] { font-weight: 700; color: var(--accent) !important; }
/* Server-drawn state maps in stories ([cd_state_map]) */
.cd-schoro { margin: 1.5rem 0; }
.cd-schoro__svg { display: block; width: 100%; height: auto; }
.cd-schoro__svg path { stroke: var(--bg, #fff); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cd-schoro__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: .5rem 0; font-size: .8125rem; color: var(--muted); }
.cd-schoro__legend span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.cd-schoro figcaption { font-size: .9375rem; color: var(--muted); }
.cd-schoro__data summary { cursor: pointer; font-weight: 600; margin: .5rem 0; min-height: 44px; display: flex; align-items: center; }
.cd-schoro { max-width: 820px; }

/* Home facelift (Nov 9): section inventory under the hero, specialty bars, states beside a ranking */
.cd-hero { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.cd-explore { background: var(--surface); border-block: 1px solid var(--rule); padding-block: clamp(1.25rem, 3vw, 2rem); }
.cd-explore__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
@media (min-width: 900px) { .cd-explore__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 24px; } }
.cd-explore__item a { display: grid; gap: 2px; height: 100%; align-content: start; padding: 12px 12px 14px; margin-inline: -12px; border-radius: var(--r-panel); color: var(--ink) !important; text-decoration: none !important; }
.cd-explore__item a:hover { background: var(--surface-2); }
.cd-explore__item a:hover .cd-explore__t { color: var(--accent); }
.cd-explore__n { font: 700 clamp(1.4rem, 1.1rem + 1.2vw, 2rem)/1.1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cd-explore__t { display: inline-flex; align-items: center; gap: .3em; font-weight: 700; }
.cd-explore__t svg { width: 1em; height: 1em; }
.cd-explore__d { color: var(--muted); font-size: .875rem; line-height: 1.4; }
@media (max-width: 599px) { .cd-explore__d { display: none; } .cd-explore__item a { padding-block: 10px; } }
.cd-tile__bar { display: block; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.cd-tile__bar > span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.cd-tiles--spec .cd-tile { grid-template-rows: 1fr auto auto; }
.cd-states { display: grid; gap: 24px 48px; }
@media (min-width: 1000px) { .cd-states { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
@media (max-width: 599px) { .cd-states__rank { display: none; } .cd-states .cd-legend--inline { margin: 0 0 12px; } }
.cd-states .cd-tilegrid { max-width: 680px; margin-inline: 0; }
.cd-rank__h { font-size: 1rem !important; margin: 0 0 .5rem; }
.cd-rank__h:not(:first-child) { margin-top: 1.5rem; }
.cd-rank { list-style: none; margin: 0; padding: 0; }
.cd-rank a { display: grid; grid-template-columns: minmax(8rem, 11.5rem) 1fr 3rem; align-items: center; gap: 12px; min-height: 36px; color: var(--ink) !important; text-decoration: none !important; border-bottom: 1px solid var(--rule); }
.cd-rank a:hover .cd-rank__name { color: var(--accent); text-decoration: underline; }
.cd-rank__bar { height: 10px; background: color-mix(in srgb, var(--muted) 18%, transparent); border-radius: 2px; overflow: hidden; }
.cd-rank__bar > span { display: block; height: 100%; border-radius: 2px; background: var(--accent) !important; }
.cd-rank__n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-states__all { margin: 1rem 0 0; }
.cd-statelist__name { display: inline-flex; align-items: center; gap: 8px; }
.cd-statelist .cd-sw { width: 12px; height: 12px; flex: none; }
.cd-card__img { background: var(--surface-2); }
.cd-stories .cd-card__img img { aspect-ratio: 1200 / 630; }
.cd-home .cd-section { padding-block: clamp(2rem, 4.5vw, 3.25rem); }
.cd-home .cd-section:not(.cd-section--alt) + .cd-section:not(.cd-section--alt):not(.cd-newsletter) { padding-top: 0; }
@media (min-width: 1200px) { .cd-card--lead .cd-card__body { flex: 1; display: flex; flex-direction: column; padding: 24px 28px 26px; } .cd-card--lead .cd-card__dek { font-size: 1.125rem; } .cd-card--lead .cd-card__meta { margin-top: auto; } }
/* Disability pages (Nov 10) */
.cd-distypes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.cd-distypes a { display: grid; gap: 2px; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); color: var(--ink) !important; text-decoration: none !important; }
.cd-distypes a:hover { border-color: var(--accent); }
.cd-distypes__n { font: 700 1.75rem/1.1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cd-distypes__t { display: inline-flex; align-items: center; gap: .3em; font-weight: 700; }
.cd-distypes__t svg { width: 1em; height: 1em; }
.cd-distypes__d { color: var(--muted); font-size: .875rem; }
.cd-bars { margin: 0; }
.cd-bars__cap { color: var(--muted); font-size: .875rem; margin-bottom: 8px; }
.cd-bars ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cd-bars li { display: grid; grid-template-columns: 6.5rem 1fr 8.5rem; gap: 10px; align-items: center; min-height: 32px; }
.cd-bars__track { height: 14px; background: color-mix(in srgb, var(--muted) 15%, transparent); border-radius: 3px; overflow: hidden; }
.cd-bars__track > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cd-bars__v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cd-bars__n { display: block; font-weight: 400; font-size: .8125rem; color: var(--muted); }
@media (max-width: 420px) { .cd-bars li { grid-template-columns: 5rem 1fr 6.5rem; gap: 8px; } }
ul.cd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cd-dis .cd-lede { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); max-width: 62ch; }
.cd-distable td { font-variant-numeric: tabular-nums; }
.cd-more-table { margin-top: 12px; } .cd-more-table > summary { cursor: pointer; font-weight: 600; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.cd-paytable td, .cd-paytable th { vertical-align: top; } .cd-paynote { margin-top: 4px; font-size: .875rem; } .cd-paynote > summary { cursor: pointer; color: var(--accent); }
.cd-paydate { display: none; font-weight: 400; color: var(--muted); font-size: .875rem; } @media (max-width: 599px) { .cd-paydate { display: inline; } .cd-paytable { font-size: .9375rem; } }
.cd-doc__small { font-size: .875rem; font-weight: 400; }
.cd-q-worse { color: #b42318; font-weight: 700; } :root[data-theme="dark"] .cd-q-worse { color: #ff9a8f; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-q-worse { color: #ff9a8f; } }
@media (max-width: 599px) { [aria-labelledby="cd-h-q"] .cd-table th, [aria-labelledby="cd-h-q"] .cd-table td { padding-inline: 6px; } }
.cd-doc__status { border-left: 4px solid var(--accent); padding-left: 16px; }
.cd-filterchips { margin: 0 0 8px; } .cd-filterchips .cd-chip span[aria-hidden] { margin-left: 4px; }
.cd-imprint { font: 600 .9375rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
@media (max-width: 899px) { .cd-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; } .cd-footer__brand { grid-column: 1 / -1; } }
/* Forms: contact and mailing list (cd-core/forms.php) */
.cd-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cd-form { display: grid; gap: 14px; max-width: 640px; }
.cd-form textarea, .cd-form select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--rule)); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
.cd-field__hint { margin: 4px 0 0; color: var(--muted); font-size: .875rem; }
.cd-form-msg { padding: 10px 14px; border-radius: var(--r-ctl); background: var(--surface-2); border-left: 4px solid var(--accent); }
.cd-form-msg--err { border-left-color: #b42318; }
.cd-sub__label { display: block; font-weight: 700; margin-bottom: 6px; }
.cd-sub__row { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-sub__row input { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--rule)); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
.cd-sub__note { margin: 6px 0 0; color: var(--muted); font-size: .8125rem; }
.cd-sub--footer { margin-top: 12px; max-width: 360px; }
.cd-sub--page { padding: 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); max-width: 640px; }
.cd-blk { margin: 1.5rem 0; } .cd-blk caption { text-align: left; font-weight: 700; padding-bottom: 6px; } .cd-blk .cd-source { margin-top: 6px; }
.cd-countlist__head { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 2px solid var(--rule); color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.cd-hubmap__grid { display: grid; gap: 24px; align-items: start; } @media (min-width: 1000px) { .cd-hubmap__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cd-hubmap__dots { margin: 0; } .cd-hubmap__dots img { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); } .cd-hubmap__dots figcaption { color: var(--muted); font-size: .875rem; margin-top: 6px; }
.cd-schoro a path:hover, .cd-schoro a:focus path { stroke: var(--ink); stroke-width: 60; }
.cd-footer__fine { text-align: center; } .cd-footer__fine p { margin-inline: auto; max-width: 80ch; }
.cd-learn__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); } .cd-learn__card { position: relative; } .cd-learn__card .cd-card__h a::after { content: ""; position: absolute; inset: 0; } .cd-learn__card:hover { border-color: var(--accent); } .cd-learn__toc { margin: 1rem 0 0; }
.cd-about-page { padding-block: 1rem 2.5rem; } .cd-about-page .cd-prose { max-width: 72ch; color: var(--ink); } .cd-about-page h2 { font-size: 1.25rem !important; }
.cd-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.cd-topics a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); color: var(--ink) !important; text-decoration: none !important; }
.cd-topics a:hover { border-color: var(--accent); } .cd-topics__t { display: inline-flex; gap: .3em; align-items: center; font: 700 1.0625rem/1.3 var(--font-display); } .cd-topics__t svg { width: 1em; height: 1em; } .cd-topics__d { color: var(--muted); font-size: .875rem; } .cd-topics__n { color: var(--accent); font-size: .8125rem; font-weight: 700; }
.cd-newsletter .cd-sub { max-width: 520px; margin: 1rem auto 0; text-align: left; } .cd-newsletter .cd-sub__label { text-align: center; }
.cd-archive__desc { max-width: 72ch; margin-bottom: 1.5rem; } .cd-archive__desc p { margin: 0 0 .75em; } .cd-archive__grid { margin-top: 1rem; } .cd-learn .cd-card__h { font-size: 1.125rem !important; }
.cd-footer__legal a { color: var(--muted) !important; text-decoration: underline; }
.cd-drug-notice { margin: 0 0 1.25rem; padding: 12px 16px; background: color-mix(in srgb, #b54708 8%, var(--surface)); border: 1px solid color-mix(in srgb, #b54708 35%, var(--rule)); border-left: 4px solid #b54708; border-radius: 0 var(--r-panel) var(--r-panel) 0; font-size: .9375rem; line-height: 1.5; } .cd-drug-notice p { margin: 0; } :root[data-theme="dark"] .cd-drug-notice { border-left-color: #f7b267; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-drug-notice { border-left-color: #f7b267; } }

/* Sortable, filterable tables */
.cd-sortlink { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.cd-sortlink:hover, .cd-sortlink:focus-visible { text-decoration: underline; }
.cd-sortico::after { content: "↕"; opacity: .45; font-size: .85em; }
th[aria-sort="ascending"] .cd-sortico::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .cd-sortico::after { content: "↓"; opacity: 1; }
th.is-num .cd-sortlink { justify-content: flex-end; }
.cd-tfilter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 12px; }
.cd-tfilter .cd-field { margin: 0; min-width: 0; flex: 1 1 220px; max-width: 360px; }
.cd-tfilter .cd-field--sm { flex: 0 1 250px; }
.cd-tfilter__n { margin: 0 0 0 auto; font-size: 14px; opacity: .85; align-self: center; }
@media (max-width: 600px) { .cd-tfilter__n { margin-left: 0; flex-basis: 100%; } }
.cd-sortable tr[hidden] { display: none; }
