/* ==========================================================================
   tips-health.com — Design System v2
   Two-pillar health site:
     Column A = fact-checked content   |   Column B = NPI clinic directory
   Visual language: medical-publishing. Warm paper ground, clinical green,
   hairline rules instead of drop-shadowed cards, mono for every real datum
   (NPI numbers, coordinates, distances, sync dates).
   Plain PHP + jQuery. All class hooks from main.js are preserved.
   ========================================================================== */

/* ---------- 0. Self-hosted fonts ----------
   No external font CDN: the site renders identically offline and drops a
   third-party request from the critical path. */
/* Self-hosted variable fonts. One file per family+subset serves every weight
   in the range below, so no separate 500/600/700 files are needed. */

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/publicsans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/publicsans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/sourceserif4-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/sourceserif4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/jetbrainsmono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/jetbrainsmono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Design tokens ---------- */
:root {
  /* Grounds — warm neutral, biased very slightly green */
  --c-paper:   #FBFAF7;   /* page ground */
  --c-surface: #FFFFFF;   /* raised surface: cards, boxes */
  --c-sink:    #F2F1EC;   /* recessed band, table headers */

  /* Ink */
  --c-ink:   #14201C;     /* headings */
  --c-body:  #3B4844;     /* body copy */
  --c-muted: #6E7C77;     /* meta, captions */
  --c-line:  #E0DED6;     /* every rule and border */

  /* Primary — clinical green. Carries navigation, links, primary action. */
  --c-primary:      #0F6B52;
  --c-primary-deep: #0A4E3C;
  --c-wash:         #E9F2EE;

  /* Clay — RESERVED for trust apparatus: fact-check seals, citation numbers,
     data-freshness warnings. Never use as a generic accent. */
  --c-clay:      #B85A26;
  --c-clay-wash: #FBF0E7;

  /* Blue — RESERVED for "verified by a practising clinician". */
  --c-verified:      #2A6F97;
  --c-verified-wash: #EAF2F7;

  /* Semantic feedback (forms) */
  --c-err:      #A93F32;
  --c-err-wash: #FBEEEC;

  /* Typography */
  --font-body: "Public Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Source Serif 4", "Source Serif Pro", Charter, "Iowan Old Style",
               "Palatino Linotype", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Layout */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --radius: 6px;
  --radius-sm: 4px;
  --gap: 24px;
  --header-h: 66px;
  --shadow-sm: 0 1px 2px rgba(20,32,28,.05);
  --shadow-md: 0 1px 2px rgba(20,32,28,.05), 0 12px 30px -18px rgba(20,32,28,.28);
}

/* Dark theme — token-level only. Components never restyle inside a media query. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-paper:#101614; --c-surface:#161E1B; --c-sink:#1B2421;
    --c-ink:#EDF2F0; --c-body:#B9C4C0; --c-muted:#8A9793; --c-line:#2A3531;
    --c-primary:#4FBF9B; --c-primary-deep:#6FD3B2; --c-wash:#152A24;
    --c-clay:#E08A55; --c-clay-wash:#2A1D14;
    --c-verified:#6FB2D8; --c-verified-wash:#14232C;
    --c-err:#E88C7D; --c-err-wash:#2C1815;
  }
}
:root[data-theme="dark"] {
  --c-paper:#101614; --c-surface:#161E1B; --c-sink:#1B2421;
  --c-ink:#EDF2F0; --c-body:#B9C4C0; --c-muted:#8A9793; --c-line:#2A3531;
  --c-primary:#4FBF9B; --c-primary-deep:#6FD3B2; --c-wash:#152A24;
  --c-clay:#E08A55; --c-clay-wash:#2A1D14;
  --c-verified:#6FB2D8; --c-verified-wash:#14232C;
  --c-err:#E88C7D; --c-err-wash:#2C1815;
}

/* On dark grounds the green is light, so solid green fills need dark text. */
:root { --c-on-primary: #FFFFFF; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --c-on-primary: #08130F; }
}
:root[data-theme="dark"]  { --c-on-primary: #08130F; }
:root[data-theme="light"] { --c-on-primary: #FFFFFF; }

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--c-body);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 {
  font-family: var(--font-head); color: var(--c-ink);
  line-height: 1.2; font-weight: 600; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(1.95rem, 3.8vw, 2.85rem); letter-spacing: -.022em; margin: 0 0 .45em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); letter-spacing: -.018em; margin: 1.8em 0 .5em; }
h3 { font-size: 1.22rem; letter-spacing: -.012em; margin: 1.6em 0 .45em; }
p  { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1.1em; }
li { margin-bottom: .45em; }
blockquote {
  margin: 1.7em 0; padding: 4px 0 4px 22px;
  border-left: 2px solid var(--c-primary);
  font-family: var(--font-head); font-size: 1.16rem; line-height: 1.5;
  color: var(--c-ink);
}
blockquote p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 2.4em 0; }
figure { margin: 1.7em 0; }
figcaption { font-size: .84rem; color: var(--c-muted); margin-top: .55em; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2.5px solid var(--c-primary); outline-offset: 3px; border-radius: 2px; }

/* Numerals that sit in columns must line up. */
.mono, .num, time,
.npi, .dist, .coords { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 3. Layout helpers ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: 24px; }
.section { padding: 60px 0; border-bottom: 1px solid var(--c-line); }
.section-sink { background: var(--c-sink); }
.section-head { max-width: 62ch; margin: 0 0 30px; }
.section-head h2 { margin: 8px 0 0; }
.section-head p { color: var(--c-muted); font-size: .95rem; margin: 8px 0 0; }
.grid { display: grid; gap: var(--gap); }
.eyebrow {
  display: block; font-family: var(--font-body); font-weight: 700;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-primary);
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--c-primary);
  color: var(--c-on-primary); padding: 10px 16px; z-index: 200; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font-family: var(--font-body); font-weight: 600; font-size: .88rem;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-deep); border-color: var(--c-primary-deep); }
.btn-ghost { background: transparent; border-color: var(--c-line); color: var(--c-ink); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary-deep); text-decoration: none; }
.btn-accent { background: var(--c-clay); color: #fff; border-color: var(--c-clay); }
.btn-accent:hover { filter: brightness(.92); }
.btn-sm { padding: 7px 13px; font-size: .81rem; }
.btn-block { width: 100%; }
.btn:hover { text-decoration: none; }

/* ---------- 5. Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-surface); border-bottom: 1px solid var(--c-line);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand {
  display: flex; align-items: center; gap: 9px; font-family: var(--font-head);
  font-weight: 600; font-size: 1.18rem; color: var(--c-ink);
  letter-spacing: -.015em; text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 5px; flex: none;
  background: var(--c-primary); color: var(--c-on-primary);
  display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 700; font-size: .74rem;
  letter-spacing: .02em; line-height: 1;
}
.brand span { color: var(--c-primary); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 4px 0; color: var(--c-body);
  font-size: .89rem; font-weight: 500; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.is-active {
  color: var(--c-ink); border-bottom-color: var(--c-primary); text-decoration: none;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--c-ink); }
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- 6. Hero ---------- */
.hero {
  padding: 56px 0 44px; border-bottom: 1px solid var(--c-line);
  background: linear-gradient(180deg, var(--c-wash) 0%, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: start; }
.hero h1 { margin: 14px 0 0; }
.hero p.lead { font-size: 1.06rem; color: var(--c-body); max-width: 56ch; margin: 18px 0 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* Trust pillars — a ruled list, not floating badges */
.pillars { margin-top: 34px; border-top: 1px solid var(--c-line); }
.pillar {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--c-line);
}
.pillar .ico {
  width: 30px; height: 30px; border-radius: 5px; flex: none;
  background: var(--c-wash); color: var(--c-primary-deep);
  display: grid; place-items: center;
}
.pillar .ico svg { width: 16px; height: 16px; }
.pillar b { display: block; color: var(--c-ink); font-size: .92rem; font-weight: 600; }
.pillar p { margin: 2px 0 0; font-size: .86rem; color: var(--c-muted); line-height: 1.5; }

/* ---------- 7. Cards / article previews ---------- */
/* 1px gap over a --c-line background gives hairline rules with no double borders. */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1px; background: var(--c-line); border: 1px solid var(--c-line);
}
.card { background: var(--c-surface); display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--c-line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag {
  align-self: flex-start; font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary);
}
.card h3 { font-size: 1.14rem; line-height: 1.28; margin: 0; }
.card h3 a { color: var(--c-ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--c-primary); }
.card p { color: var(--c-muted); font-size: .88rem; line-height: 1.55; margin: 0; }
.card-meta {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--c-line);
  display: flex; align-items: center; gap: 8px;
  font-size: .75rem; color: var(--c-muted);
}
.card-meta .avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.card-meta time { margin-left: auto; }

/* ---------- 7b. Trust seals ----------
   Three states, three fixed meanings. Colour is the signal — do not remix. */
.seal {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .71rem; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 3px; white-space: nowrap;
  background: var(--c-clay-wash); color: var(--c-clay);
  border: 1px solid var(--c-clay);
}
.seal--verified { background: var(--c-verified-wash); color: var(--c-verified); border-color: var(--c-verified); }
.seal--spec     { background: var(--c-wash); color: var(--c-primary-deep); border-color: var(--c-primary); }
.seal svg { width: 12px; height: 12px; flex: none; }

/* ---------- 7c. Topic rail ---------- */
.topics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line);
}
.topic {
  display: block; padding: 20px; text-decoration: none;
  border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  transition: background .15s;
}
.topic:hover { background: var(--c-wash); text-decoration: none; }
.topic b { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--c-ink); }
.topic p { margin: 4px 0 0; font-size: .82rem; color: var(--c-muted); line-height: 1.5; }
.topic .count {
  display: block; margin-top: 10px; font-family: var(--font-mono);
  font-size: .7rem; font-weight: 700; color: var(--c-primary);
}

/* Chips (legacy hook, restyled square) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--c-line);
  background: var(--c-surface); color: var(--c-ink); font-size: .87rem;
  font-weight: 500; text-decoration: none;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary-deep); background: var(--c-wash); text-decoration: none; }

/* ---------- 8. Breadcrumb ---------- */
.breadcrumb { font-family: var(--font-mono); font-size: .74rem; color: var(--c-muted); padding: 16px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li::after { content: "/"; margin-left: 7px; color: var(--c-line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-primary-deep); text-decoration: underline; }

/* ---------- 9. Article (single post) ---------- */
.article { padding: 20px 0 60px; }
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 56px;
  max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; align-items: start;
}
.article-main { min-width: 0; }
.article-main .breadcrumb { padding-top: 0; margin-bottom: 12px; }
.article-header { margin: 0 0 26px; }
.article-header h1 { margin: 12px 0 0; }
.article-lead { font-size: 1.1rem; color: var(--c-body); margin: 16px 0 0; max-width: 62ch; }

/* Byline — author, reviewer role, and both dates are all E-E-A-T signals. */
.byline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; margin-top: 20px;
  border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  font-size: .88rem; color: var(--c-muted);
}
.byline .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.byline strong { color: var(--c-ink); font-weight: 600; }
.byline .dates {
  margin-left: auto; text-align: right;
  font-family: var(--font-mono); font-size: .72rem; color: var(--c-muted);
}
/* Reviewed-by line. Green = fact-checked by a student/trained reviewer;
   add .is-clinician for blue = confirmed by a practising doctor. */
.reviewed {
  display: inline-flex; align-items: center; gap: 6px; flex-basis: 100%;
  color: var(--c-primary-deep); font-weight: 600; font-size: .84rem;
}
.reviewed.is-clinician { color: var(--c-verified); }
.reviewed svg { width: 15px; height: 15px; flex: none; }

.article-hero { margin-bottom: 34px; }
.article-hero img { width: 100%; height: 420px; object-fit: cover; border: 1px solid var(--c-line); }
.article-body { max-width: 78ch; }
.article-body p { font-size: 1.03rem; line-height: 1.75; }
.article-body h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.article-body h3 { scroll-margin-top: calc(var(--header-h) + 16px); }
/* Short rule above each H2 — a section marker, not decoration */
.article-body h2::before {
  content: ""; display: block; width: 34px; height: 2px;
  background: var(--c-primary); margin-bottom: 14px;
}

/* Inline citation marker. Clay = "this is a sourced claim, go check it." */
.cite {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  vertical-align: super; color: var(--c-clay); text-decoration: none; padding: 0 1px;
}
.cite:hover { text-decoration: underline; }

/* Key-takeaways box */
.callout {
  background: var(--c-wash); border: 1px solid var(--c-primary);
  border-radius: var(--radius); padding: 18px 22px; margin: 1.8em 0;
}
.callout h4 {
  margin: 0 0 .5em; font-family: var(--font-body); font-weight: 700;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-primary-deep);
}
.callout ul { margin-bottom: 0; font-size: .95rem; }

/* Medical disclaimer — clay, appears top and bottom of every health article */
.med-disclaimer {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--c-clay-wash); border-left: 3px solid var(--c-clay);
  padding: 14px 18px; margin: 24px 0; font-size: .87rem; line-height: 1.55; color: var(--c-body);
}
.med-disclaimer svg { flex: none; width: 18px; height: 18px; color: var(--c-clay); margin-top: 2px; }
.med-disclaimer strong { display: block; color: var(--c-clay); margin-bottom: 3px; }

/* Sources list */
.sources { border-top: 1px solid var(--c-line); margin-top: 2.4em; padding-top: 1.3em; }
.sources h3 {
  font-family: var(--font-body); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--c-muted); margin: 0 0 12px;
}
.sources ol { list-style: none; margin: 0; padding: 0; }
.sources li {
  padding: 10px 0; border-bottom: 1px solid var(--c-line);
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline;
  font-size: .86rem;
}
.sources li:last-child { border-bottom: 0; }
.sources .num { font-family: var(--font-mono); font-size: .72rem; font-weight: 700; color: var(--c-clay); }
.sources a { color: var(--c-body); text-decoration: none; word-break: break-word; }
.sources a:hover { color: var(--c-primary-deep); text-decoration: underline; }
/* Publisher + date under each source title */
.sources em {
  display: block; font-style: normal; font-family: var(--font-mono);
  font-size: .71rem; color: var(--c-muted); margin-top: 2px;
}

/* ---------- 10. Sidebar / rail ---------- */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; display: grid; gap: 22px; }
.railbox { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
.railbox-head {
  padding: 11px 16px; border-bottom: 1px solid var(--c-line); background: var(--c-sink);
  font-size: .71rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: var(--c-muted);
}
.railbox-body { padding: 16px; }
.railbox-body p { margin: 0 0 .8em; font-size: .85rem; line-height: 1.55; }
.railbox-body p:last-child { margin: 0; }

/* TOC (populated by main.js) */
.toc { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
.toc h4 {
  margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--c-line); background: var(--c-sink);
  font-family: var(--font-body); font-size: .71rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 700; color: var(--c-muted);
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; border-bottom: 1px solid var(--c-line); }
.toc li:last-child { border-bottom: 0; }
.toc a {
  display: block; padding: 9px 16px; font-size: .84rem; color: var(--c-body);
  text-decoration: none; border-left: 2px solid transparent;
}
.toc a:hover, .toc a.is-active {
  background: var(--c-wash); border-left-color: var(--c-primary);
  color: var(--c-ink); text-decoration: none;
}

/* Reviewer credit — states the reviewer's real role, never inflates it */
.reviewer { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.reviewer img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.reviewer b { display: block; color: var(--c-ink); font-size: .88rem; }
.reviewer span { display: block; font-size: .78rem; color: var(--c-muted); line-height: 1.5; }

.author-widget { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px; background: var(--c-surface); }
.author-widget img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.author-widget h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 1rem; }
.author-widget p { font-size: .85rem; color: var(--c-muted); margin-bottom: 14px; }

/* ---------- 11. Column A → Column B bridge ----------
   The funnel hinge: sits inside an article, hands the reader to the directory. */
.bridge { border: 1px solid var(--c-primary); border-radius: var(--radius); background: var(--c-surface); margin: 34px 0; overflow: hidden; }
.bridge-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 20px; background: var(--c-primary); color: var(--c-on-primary);
}
.bridge-head svg { width: 17px; height: 17px; flex: none; }
.bridge-head b { font-family: var(--font-head); font-size: 1.02rem; }
.bridge-head .loc { margin-left: auto; font-family: var(--font-mono); font-size: .74rem; opacity: .9; }
.bridge-foot {
  padding: 11px 20px; background: var(--c-sink); border-top: 1px solid var(--c-line);
  font-size: .76rem; color: var(--c-muted);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* Provider row — shared by the bridge and the search-results list */
.doc-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--c-line);
}
.doc-row:last-of-type { border-bottom: 0; }
.doc-row .avatar,
.doc-row .initials {
  width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--c-wash); color: var(--c-primary-deep);
  display: grid; place-items: center; font-weight: 700; font-size: .82rem;
}
.doc-row .who b { display: block; color: var(--c-ink); font-size: .95rem; font-weight: 600; }
.doc-row .who b a { color: inherit; text-decoration: none; }
.doc-row .who b a:hover { text-decoration: underline; text-decoration-color: var(--c-primary); }
.doc-row .who span { display: block; font-size: .79rem; color: var(--c-muted); }
.doc-row .who .npi { font-size: .7rem; color: var(--c-muted); }

/* ---------- 12. Directory: search results (Column B index) ---------- */
.dir-layout {
  display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px;
  padding: 28px 0 60px; align-items: start;
}
.dir-head { padding: 26px 0 0; }
.dir-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 10px 0 0; }
.dir-head p { color: var(--c-muted); font-size: .95rem; margin: 10px 0 0; max-width: 68ch; }

/* Filter rail */
.filters { position: sticky; top: calc(var(--header-h) + 20px); border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
.filters-head {
  padding: 12px 16px; border-bottom: 1px solid var(--c-line); background: var(--c-sink);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.filters-head b { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); font-weight: 700; }
.filters-head a { font-size: .76rem; color: var(--c-primary-deep); text-decoration: none; }
.filters-head a:hover { text-decoration: underline; }
.filter-group { padding: 15px 16px; border-bottom: 1px solid var(--c-line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group > label,
.filter-group > .legend {
  display: block; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 700; color: var(--c-muted); margin-bottom: 8px;
}
.filter-group select,
.filter-group input[type="text"] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--c-line);
  border-radius: var(--radius-sm); background: var(--c-paper); color: var(--c-ink);
  font: inherit; font-size: .88rem;
}
/* align-items:flex-start so a wrapping label keeps the box on the first line */
.check { display: flex; align-items: flex-start; gap: 9px; font-size: .86rem; color: var(--c-body); margin-bottom: 7px; cursor: pointer; line-height: 1.4; }
.check:last-child { margin-bottom: 0; }
.check input { accent-color: var(--c-primary); width: 15px; height: 15px; flex: none; margin-top: 2px; }
.check .n { margin-left: auto; padding-left: 8px; font-family: var(--font-mono); font-size: .72rem; color: var(--c-muted); flex: none; }

/* Results toolbar */
.results-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--c-line); margin-bottom: 0;
}
.results-bar .count { font-size: .9rem; color: var(--c-body); }
.results-bar .count b { color: var(--c-ink); font-family: var(--font-mono); }
.results-bar .sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--c-muted); }
.results-bar .sort select {
  padding: 6px 10px; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-ink); font: inherit; font-size: .82rem;
}
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--c-line);
  background: var(--c-surface); font-size: .77rem; color: var(--c-body); text-decoration: none;
}
.pill .x { color: var(--c-muted); font-weight: 700; }
.pill:hover { border-color: var(--c-primary); text-decoration: none; }

/* Result list — richer than .doc-row: carries amenities + distance */
.results { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); margin-top: 18px; overflow: hidden; }
.result {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--c-line);
}
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--c-paper); }
.result .initials {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex: none;
  background: var(--c-wash); color: var(--c-primary-deep);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.result h3 { font-size: 1.08rem; margin: 0; line-height: 1.3; }
.result h3 a { color: var(--c-ink); text-decoration: none; }
.result h3 a:hover { text-decoration: underline; text-decoration-color: var(--c-primary); }
.result .specialty { font-size: .82rem; color: var(--c-primary-deep); font-weight: 600; margin: 3px 0 0; }
.result .addr { font-size: .84rem; color: var(--c-muted); margin: 5px 0 0; }
.result .meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px;
  font-family: var(--font-mono); font-size: .72rem; color: var(--c-muted);
}
.result .side { display: grid; gap: 8px; justify-items: end; align-content: start; }
/* Distance is the primary sort key, so it reads as one unit: number + unit */
.result .distance {
  display: flex; align-items: baseline; gap: 3px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 1.02rem; font-weight: 600; color: var(--c-ink);
}
.result .distance small {
  font-size: .66rem; font-weight: 400; color: var(--c-muted);
  letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-body);
}
/* Amenity shorthand inside a result row */
.amen-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.amen-inline span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .73rem; color: var(--c-body);
  padding: 3px 8px; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: var(--c-paper);
}
.amen-inline svg { width: 12px; height: 12px; color: var(--c-primary-deep); flex: none; }

/* Empty state */
.empty { padding: 46px 24px; text-align: center; }
.empty h3 { margin: 0 0 8px; }
.empty p { color: var(--c-muted); font-size: .9rem; max-width: 46ch; margin: 0 auto 18px; }

/* Pagination */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: .82rem; color: var(--c-body);
  text-decoration: none; background: var(--c-surface);
}
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary-deep); }
.pagination .is-current { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); font-weight: 700; }
.pagination .gap { border: 0; background: none; color: var(--c-muted); }

/* ---------- 13. Directory: single clinic ---------- */
.clinic-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 44px;
  padding: 26px 0 56px; align-items: start;
}
.clinic-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); margin: 10px 0 0; }
.badges { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* NPI fact grid — the raw record, presented as a record */
.factgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); margin: 24px 0 0;
}
.factgrid > div { background: var(--c-surface); padding: 14px 16px; }
.factgrid dt { margin: 0; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); font-weight: 700; }
.factgrid dd { margin: 5px 0 0; color: var(--c-ink); font-size: .93rem; font-weight: 500; }

/* Map. Grid backdrop stands in for the tile layer until Leaflet is wired up;
   .map-canvas is the mount point — swap the background for the real map. */
.map { margin-top: 22px; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.map-canvas {
  height: 260px; position: relative;
  background:
    linear-gradient(var(--c-line) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(90deg, var(--c-line) 1px, transparent 1px) 0 0 / 38px 38px,
    var(--c-sink);
}
.pin { position: absolute; transform: translate(-50%, -100%); z-index: 2; text-align: center; }
.pin .dot {
  width: 16px; height: 16px; border-radius: 50%; margin: 0 auto;
  background: var(--c-primary); border: 3px solid var(--c-surface);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.pin.is-amenity .dot { width: 10px; height: 10px; background: var(--c-muted); border-width: 2px; }
.pin em {
  display: inline-block; margin-top: 3px; padding: 1px 5px; white-space: nowrap;
  font-style: normal; font-family: var(--font-mono); font-size: .66rem; color: var(--c-body);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 3px;
}
.map-foot {
  padding: 9px 14px; border-top: 1px solid var(--c-line); background: var(--c-sink);
  font-size: .74rem; color: var(--c-muted);
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}

/* Nearby amenities (Overpass) — the value-add that lifts a page off thin content */
.amenities {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); margin-top: 16px;
}
.amenity {
  background: var(--c-surface); padding: 13px 15px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center;
}
.amenity .ico {
  width: 30px; height: 30px; border-radius: 5px; flex: none;
  background: var(--c-sink); color: var(--c-primary-deep); display: grid; place-items: center;
}
.amenity .ico svg { width: 15px; height: 15px; }
.amenity b { display: block; font-size: .86rem; color: var(--c-ink); font-weight: 600; }
.amenity span { font-size: .74rem; color: var(--c-muted); }
.amenity .dist { font-size: .76rem; color: var(--c-body); font-weight: 600; }

/* Call / directions box */
.action-box { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
.action-box .inner { padding: 18px; display: grid; gap: 10px; }
.action-box .tel { font-family: var(--font-mono); font-size: 1.18rem; font-weight: 600; color: var(--c-ink); }
/* Data-freshness caveat — clay, because it qualifies the data's reliability */
.data-note {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 16px; background: var(--c-clay-wash); border-top: 1px solid var(--c-line);
  font-size: .74rem; color: var(--c-clay); line-height: 1.5;
}
.data-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* Related articles (Column B → back to Column A) */
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { margin: 0; border-bottom: 1px solid var(--c-line); }
.related-list li:last-child { border-bottom: 0; }
.related-list a { display: block; padding: 12px 16px; text-decoration: none; }
.related-list a:hover { background: var(--c-wash); text-decoration: none; }
.related-list b { display: block; font-family: var(--font-head); font-size: .93rem; font-weight: 600; color: var(--c-ink); line-height: 1.3; }
.related-list span { font-family: var(--font-mono); font-size: .72rem; color: var(--c-muted); }

/* ---------- 14. Editorial process strip ---------- */
.policy-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; background: var(--c-line); border: 1px solid var(--c-line);
}
.policy-step { background: var(--c-surface); padding: 22px; }
/* Numbered because this genuinely is a sequence: source → cite → review → recheck */
.policy-step .step { font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: var(--c-clay); }
.policy-step b { display: block; font-family: var(--font-head); font-size: 1.06rem; color: var(--c-ink); margin: 8px 0 6px; }
.policy-step p { margin: 0; font-size: .85rem; color: var(--c-muted); line-height: 1.55; }

/* ---------- 15. Author page ---------- */
.author-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  padding: 30px 0; margin-bottom: 40px;
}
.author-hero img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; }
.author-hero h1 { margin: 0 0 6px; }
.author-hero .credentials { color: var(--c-primary-deep); font-weight: 600; font-size: .9rem; }
.author-socials { display: flex; gap: 12px; margin-top: 12px; }

/* ---------- 16. Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; color: var(--c-muted); margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--c-line);
  border-radius: var(--radius-sm); font: inherit; font-size: .93rem;
  color: var(--c-ink); background: var(--c-surface);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px var(--c-wash);
}
.form-note { font-size: .82rem; color: var(--c-muted); }
.form-msg { display: none; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem; }
.form-msg.is-success { display: block; background: var(--c-wash); color: var(--c-primary-deep); border: 1px solid var(--c-primary); }
.form-msg.is-error { display: block; background: var(--c-err-wash); color: var(--c-err); border: 1px solid var(--c-err); }
.is-loading { opacity: .6; pointer-events: none; }

/* Hero-side specialty finder */
.finder { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--shadow-md); overflow: hidden; }
.finder-head { padding: 16px 20px; border-bottom: 1px solid var(--c-line); background: var(--c-sink); }
.finder-head b { display: block; font-family: var(--font-head); font-size: 1.02rem; color: var(--c-ink); }
.finder-head span { font-size: .78rem; color: var(--c-muted); }
.finder-body { padding: 18px 20px; display: grid; gap: 12px; }
.finder-body .form-field { margin: 0; }
.finder-foot {
  padding: 11px 20px; border-top: 1px solid var(--c-line); font-size: .75rem; color: var(--c-muted);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- 17. Legal / prose pages ---------- */
.prose-page { padding: 20px 0 64px; }
.prose { max-width: var(--wrap-narrow); margin: 0 auto; }
.prose h2 { border-bottom: 1px solid var(--c-line); padding-bottom: .3em; }
.updated-badge {
  display: inline-block; font-family: var(--font-mono); font-size: .76rem; color: var(--c-muted);
  background: var(--c-sink); border: 1px solid var(--c-line);
  padding: 5px 11px; border-radius: var(--radius-sm);
}

/* ---------- 18. Newsletter band ---------- */
.newsletter { background: var(--c-primary); color: var(--c-on-primary); border-bottom: 1px solid var(--c-line); }
.newsletter .wrap-narrow { padding-block: 52px; }
.newsletter h2 { color: var(--c-on-primary); margin-top: 0; }
.newsletter p { color: var(--c-on-primary); opacity: .88; }
.newsletter-form { display: flex; gap: 10px; max-width: 470px; margin: 20px 0 10px; }
.newsletter-form input {
  flex: 1; padding: 11px 14px; border: 1px solid transparent;
  border-radius: var(--radius-sm); font: inherit; font-size: .92rem;
  background: var(--c-surface); color: var(--c-ink);
}
.newsletter small { color: var(--c-on-primary); opacity: .78; font-size: .8rem; }
.newsletter small a { color: inherit; }
.newsletter .btn-accent { background: var(--c-clay); border-color: var(--c-clay); color: #fff; }

/* ---------- 19. Footer ---------- */
.site-footer { background: var(--c-sink); border-top: 1px solid var(--c-line); padding: 48px 0 26px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.footer-brand p { color: var(--c-muted); font-size: .87rem; max-width: 38ch; margin-top: 12px; }
.site-footer h4 {
  font-family: var(--font-body); font-size: .71rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--c-muted); font-weight: 700; margin: 0 0 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer li { margin: 0; }
.site-footer a { color: var(--c-body); font-size: .87rem; text-decoration: none; }
.site-footer a:hover { color: var(--c-primary-deep); text-decoration: underline; }
.footer-disclaimer {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--c-line);
  font-size: .79rem; color: var(--c-muted); line-height: 1.6; max-width: 88ch;
}
.footer-disclaimer strong { color: var(--c-ink); }
.footer-bottom {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-line);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .76rem; color: var(--c-muted);
}

/* ---------- 20. Cookie consent ---------- */
.cookie-bar {
  position: fixed; left: 22px; bottom: 22px; z-index: 150;
  width: calc(100% - 44px); max-width: 372px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-primary); box-shadow: var(--shadow-md);
  border-radius: var(--radius); padding: 20px;
  display: none; flex-direction: column; gap: 12px;
}
.cookie-bar.show { display: flex; animation: cookieIn .35s cubic-bezier(.2,.7,.3,1); }
@keyframes cookieIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cookie-bar h5 { margin: 0; font-family: var(--font-body); font-size: .97rem; font-weight: 700; color: var(--c-ink); }
.cookie-bar p { margin: 0; font-size: .87rem; color: var(--c-muted); line-height: 1.55; }
.cookie-bar p a { color: var(--c-primary-deep); font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { flex: 1; }

/* ---------- 21. Back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 42px; height: 42px;
  border-radius: var(--radius-sm); background: var(--c-primary); color: var(--c-on-primary);
  border: 0; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--c-primary-deep); }

/* ---------- 22. 404 ---------- */
.page-404 { text-align: center; padding: 90px 0; }
.page-404 .code {
  font-family: var(--font-mono); font-size: clamp(4rem, 12vw, 7rem);
  color: var(--c-line); line-height: 1; font-weight: 700;
}

/* ---------- 23. Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.load-more-wrap { text-align: center; margin-top: 32px; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); border:0; }
.scroll-x { overflow-x: auto; }

/* ---------- 24. Responsive ---------- */
@media (max-width: 1040px) {
  .dir-layout { grid-template-columns: 1fr; gap: 28px; }
  .filters { position: static; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .article-layout, .clinic-layout { grid-template-columns: 1fr; gap: 36px; }
  .sidebar { position: static; }
  .toc { display: none; }
  .article-hero img { height: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--c-surface);
    border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .25s ease; margin: 0;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; padding: 8px 16px 14px; gap: 0; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--c-line); }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-actions .btn { display: none; }
  .newsletter-form { flex-direction: column; }
  .byline .dates { margin-left: 0; text-align: left; width: 100%; }
  .result { grid-template-columns: auto minmax(0, 1fr); }
  .result .side { grid-column: 1 / -1; justify-items: start; }
  .doc-row { grid-template-columns: auto 1fr; }
  .doc-row .btn { grid-column: 2; justify-self: start; }
  .author-hero { grid-template-columns: 1fr; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
