/* Plain Label
   Clinical and quiet: a white page, cool grey panels, hairline rules, one green accent.
   Everything has soft corners except the boxed warning, which keeps the hard black box the FDA
   prints on real labels. That contrast is the one loud thing on the page.

   Themes: light by default, dark when the device asks for it, and either one when the visitor
   picks it with the header switch (html[data-theme]). */

@font-face {
  font-family: "Instrument Sans";
  src: url("instrument-sans.woff2") format("woff2-variations"), url("instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --panel: #f4f6f8;
  --ink: #0f1720;
  --ink-soft: #566170;
  --rule: #e2e6eb;
  --rule-strong: #c9d0d8;
  --accent: #0b6b5a;
  --accent-ink: #ffffff;
  --accent-soft: #e7f3f0;
  --highlight: #fff0a3;
  --marker: #ffd84a;
  --supp: #4a3fb0;
  --supp-soft: #efedfb;
  --warn: #b4530a;
  --warn-ink: #ffffff;
  --warn-soft: #fdf0e3;
  --box: #000000;
  --header-bg: rgb(255 255 255 / 0.86);

  --radius: 12px;
  --radius-sm: 8px;
  --measure: 64ch;
  --text-sm: 0.875rem;
  --text: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-display: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  color-scheme: light;
}

/* Dark values, used in two places below. Keep the two blocks identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1116;
    --panel: #151b22;
    --ink: #e8ecf1;
    --ink-soft: #9aa6b4;
    --rule: #232c36;
    --rule-strong: #34404d;
    --accent: #56d1b6;
    --accent-ink: #05211b;
    --accent-soft: #11302a;
    --highlight: #4d420d;
    --marker: #e9c53c;
    --supp: #b3acff;
    --supp-soft: #211e3d;
    --warn: #f0a04b;
    --warn-ink: #1d1206;
    --warn-soft: #33230f;
    --box: #ffffff;
    --header-bg: rgb(13 17 22 / 0.86);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
}
:root[data-theme="dark"] {
  --bg: #0d1116;
  --panel: #151b22;
  --ink: #e8ecf1;
  --ink-soft: #9aa6b4;
  --rule: #232c36;
  --rule-strong: #34404d;
  --accent: #56d1b6;
  --accent-ink: #05211b;
  --accent-soft: #11302a;
  --highlight: #4d420d;
  --marker: #e9c53c;
  --supp: #b3acff;
  --supp-soft: #211e3d;
  --warn: #f0a04b;
  --warn-ink: #1d1206;
  --warn-soft: #33230f;
  --box: #ffffff;
  --header-bg: rgb(13 17 22 / 0.86);
  color-scheme: dark;
}
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.shell { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  padding: 0.5rem 0.75rem; background: var(--ink); color: var(--bg); border-radius: var(--radius-sm);
}
.skip:focus { top: 0.75rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.lede { font-size: var(--text-lg); line-height: 1.5; color: var(--ink-soft); max-width: 46ch; }

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem;
  min-height: 3.75rem; padding-block: 0.6rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.brand img { display: block; }

.theme-toggle {
  margin-left: auto; display: inline-grid; place-items: center;
  width: 2.25rem; height: 2.25rem; padding: 0; cursor: pointer;
  color: var(--ink-soft); background: transparent;
  border: 1px solid var(--rule); border-radius: 50%;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--rule-strong); }
.theme-toggle[hidden] { display: none; }
.theme-toggle__sun { display: none; }

/* Search ------------------------------------------------------------------ */

.search { display: grid; gap: 0.9rem; }

.search__bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  background: var(--bg);
  border: 1px solid var(--rule-strong); border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search__bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search__icon { flex: none; color: var(--ink-soft); }
.search__bar input {
  flex: 1; min-width: 0;
  font: inherit; color: var(--ink); background: transparent;
  border: 0; padding: 0.55rem 0.25rem;
}
.search__bar input::placeholder { color: var(--ink-soft); opacity: 0.85; }
.search__bar input:focus-visible { outline: none; }
.search__bar input::-webkit-search-cancel-button { display: none; }

.button {
  flex: none;
  font: inherit; font-weight: 600; line-height: 1.2;
  color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: 999px; padding: 0.7rem 1.2rem; cursor: pointer;
}
.button:hover { filter: brightness(1.08); }

/* Suggestions while typing (added by app.js; the form works without it). */
.search__bar { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.4rem); z-index: 30;
  list-style: none; margin: 0; padding: 0.35rem;
  background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(15 23 32 / 0.12);
  max-height: 20rem; overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest li {
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer;
  color: var(--ink-soft); overflow-wrap: anywhere;
}
.suggest li strong { color: var(--ink); font-weight: 650; }
.suggest__tag {
  float: right; margin-left: 0.75rem; padding: 0 0.5rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 650; color: var(--supp); background: var(--supp-soft);
}
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--panel); }

.search--compact { flex: 1 1 16rem; max-width: 30rem; }
.search--compact .search__bar { padding: 0.2rem 0.2rem 0.2rem 0.8rem; }
.search--compact .search__bar input { font-size: 1rem; padding: 0.4rem 0.2rem; }
.search--compact .button { padding: 0.5rem 0.95rem; font-size: 0.9375rem; }

/* One control, two looks: radio buttons on the home page, links on a result. */
.segmented {
  display: inline-flex; align-items: center; gap: 0.2rem; width: fit-content;
  margin: 0; padding: 0.2rem; min-inline-size: 0;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 999px;
}
.segmented legend { float: left; padding: 0 0.6rem 0 0.75rem; font-size: var(--text-sm); color: var(--ink-soft); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span, .segmented a {
  display: block; padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 550; color: var(--ink-soft); text-decoration: none;
  white-space: nowrap;
}
.segmented input:checked + span,
.segmented a[aria-current="page"] {
  background: var(--bg); color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule-strong);
}
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Home -------------------------------------------------------------------- */

.hero {
  display: grid; gap: 2.5rem; align-items: center;
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2.5rem, 6vw, 4.5rem);
}
.hero h1 {
  font-size: var(--text-display); line-height: 1.02; letter-spacing: -0.035em; font-weight: 650;
  max-width: 13ch; margin-bottom: 1.1rem;
}
.hero .lede { margin-bottom: 1.75rem; }
.hero .search { max-width: 38rem; }
.examples { margin-top: 1rem; color: var(--ink-soft); font-size: var(--text-sm); }

/* Illustrations ------------------------------------------------------------
   Drawn as inline SVG and coloured with the theme variables, so they follow light and dark.
   One visual language: a medicine bottle, its label, and the yellow marker line that shows
   where a point came from. */
.art { display: block; width: 100%; height: auto; }
.art .a-bg { fill: var(--bg); }
.art .a-panel { fill: var(--panel); }
.art .a-label { fill: var(--panel); }
.art .a-ink { fill: var(--ink); }
.art .a-neck { fill: var(--rule-strong); }
.art .a-text { fill: var(--ink); opacity: 0.55; }
.art .a-fine { fill: var(--rule-strong); }
.art .a-accent { fill: var(--accent); }
.art .a-chip { fill: var(--accent-soft); }
.art .a-hl { fill: var(--marker); }
.art .a-on-marker { fill: #0f1720; }
.art [class^="s-"], .art [class*=" s-"] { stroke-linecap: round; stroke-linejoin: round; }
.art .s-line { stroke: var(--rule-strong); stroke-width: 1.5; }
.art .s-ink { stroke: var(--ink); stroke-width: 2.25; }
.art path.s-ink, .art path.s-rule, .art path.s-accent, .art .s-thread, .art .s-trace, .art .s-check { fill: none; }
.art .s-ink--heavy { stroke-width: 4.5; }
.art .s-rule { stroke: var(--rule-strong); stroke-width: 1.75; }
.art .s-accent { stroke: var(--accent); stroke-width: 2.5; }
.art .s-accent--heavy { stroke-width: 4; }
.art .s-box { fill: none; stroke: var(--box); stroke-width: 4; stroke-linejoin: miter; }
.art .s-box--small { stroke-width: 2.5; }
.art .s-thread { stroke: var(--rule-strong); stroke-width: 1.5; stroke-dasharray: 2 6; }
.art .s-trace { stroke: var(--accent); stroke-width: 2.5; }
.art .s-check { stroke: var(--accent-ink); stroke-width: 3.2; }
.art .s-check--small { stroke-width: 2; }
.art .t-chip { font-size: 12px; font-weight: 700; fill: var(--accent); font-variant-numeric: tabular-nums; }
.art .t-chip--on { fill: var(--accent-ink); }

.hero__art { margin: 0; }
.art--step { width: 6rem; margin-bottom: 1rem; }
.art--spot { width: 10rem; margin-bottom: 1.5rem; }

@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3.5rem; }
}

.how { padding-block: 2.5rem 4.5rem; border-top: 1px solid var(--rule); }
.how h2 { font-size: var(--text-xl); letter-spacing: -0.02em; font-weight: 650; margin-bottom: 1.75rem; }
.how__steps { list-style: none; padding: 0; display: grid; gap: 1.75rem; counter-reset: step; }
.how__steps li { counter-increment: step; max-width: 34ch; }
.how__steps h3::before {
  content: counter(step) ". ";
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.how__steps h3 { font-size: var(--text); font-weight: 650; margin-bottom: 0.25rem; }
.how__steps p { color: var(--ink-soft); font-size: 1rem; }
@media (min-width: 48rem) {
  .how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}

/* Result ------------------------------------------------------------------ */

.result { padding-block: clamp(1.75rem, 4vw, 3rem) 3.5rem; }
.did-you-mean {
  width: fit-content; max-width: 100%;
  margin-bottom: 1.25rem; padding: 0.7rem 1rem;
  background: var(--accent-soft); border-radius: var(--radius-sm);
}
.did-you-mean p + p { margin-top: 0.2rem; }
.notice-page p.did-you-mean { margin-bottom: 1.25rem; }
.did-you-mean a { font-weight: 600; }
.result__head h1 {
  font-size: var(--text-display); line-height: 1.04; letter-spacing: -0.035em; font-weight: 650;
  overflow-wrap: anywhere; margin-bottom: 1.1rem;
}
/* Every result says what kind of thing it is, so a supplement is never mistaken for a medicine. */
.kind {
  display: inline-block; margin-bottom: 0.75rem; padding: 0.15rem 0.7rem; border-radius: 999px;
  font-size: var(--text-sm); font-weight: 650;
}
.kind--drug { color: var(--accent); background: var(--accent-soft); }
.kind--supplement { color: var(--supp); background: var(--supp-soft); }
.supplement-notice {
  max-width: var(--measure); margin-bottom: 1.25rem; padding: 0.9rem 1.1rem;
  border: 1px solid var(--supp); border-left-width: 5px; border-radius: var(--radius);
}
.result--supplement .cite { color: var(--supp); background: var(--supp-soft); }
.result--supplement .cite:hover, .result--supplement .cite:focus-visible { background: var(--supp); color: var(--bg); }
.result--supplement .advice { background: var(--supp-soft); }
.advice__quote { margin-top: 0.6rem; font-size: var(--text-sm); color: var(--ink-soft); }
.cross-link { margin: 1.25rem 0; font-size: var(--text-sm); color: var(--ink-soft); max-width: var(--measure); }
.result__head .cross-link { margin: 0 0 1.1rem; }

.result__searched { color: var(--ink-soft); margin: -0.5rem 0 0.9rem; }
.result__brands { margin-bottom: 1.25rem; max-width: var(--measure); }
.result__brands span { display: block; font-size: var(--text-sm); color: var(--ink-soft); }
.result__alternatives { color: var(--ink-soft); font-size: var(--text-sm); margin-bottom: 1.1rem; }

.facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; margin-bottom: 1.25rem; }
.facts dt { font-size: var(--text-sm); color: var(--ink-soft); }
.facts dd { font-weight: 550; }

.result__body { display: grid; gap: 2.5rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.result__main { min-width: 0; max-width: var(--measure); }

.boxed-warning {
  border: 5px solid var(--box); border-radius: 0;
  padding: 1.1rem 1.25rem 1.3rem; margin-bottom: 1.75rem;
}
.boxed-warning h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.boxed-warning__why { color: var(--ink-soft); font-size: var(--text-sm); margin: 0.25rem 0 0.85rem; }
.boxed-warning__text { font-weight: 600; }

.summary-note {
  display: inline-block; padding: 0.4rem 0.8rem;
  font-size: var(--text-sm); color: var(--ink-soft);
  background: var(--panel); border-radius: var(--radius-sm);
}

.summary-section { margin-top: 2rem; }
.summary-section h2 { font-size: var(--text-lg); font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.6rem; }
.summary-section ul { list-style: none; padding: 0; display: grid; gap: 0.65rem; }
.summary-section li { position: relative; padding-left: 1.15rem; }
.summary-section li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.68em;
  width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--rule-strong);
}

.cite {
  display: inline-block; min-width: 1.5em; padding: 0 0.4em; margin-left: 0.1em;
  font-size: 0.72em; font-weight: 700; line-height: 1.55; text-align: center;
  font-variant-numeric: tabular-nums; vertical-align: 0.2em; text-decoration: none;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px;
}
.cite:hover, .cite:focus-visible { background: var(--accent); color: var(--accent-ink); }

.advice {
  margin-top: 2.5rem; padding: 1rem 1.15rem;
  background: var(--accent-soft); border-radius: var(--radius);
}

.sources { min-width: 0; }
.sources h2 { font-size: var(--text); font-weight: 650; margin-bottom: 0.9rem; }
.sources ol { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.sources li {
  position: relative; padding: 0.8rem 0.95rem 0.85rem 2.6rem;
  background: var(--panel); border: 1px solid transparent; border-radius: var(--radius-sm);
  scroll-margin-top: 5.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.sources li::before {
  content: attr(value); position: absolute; left: 0.95rem; top: 0.8rem;
  font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent);
}
.sources__section { font-size: var(--text-sm); font-weight: 650; margin-bottom: 0.2rem; }
.sources blockquote { font-size: var(--text-sm); line-height: 1.6; color: var(--ink-soft); }
.sources li:target, .sources li.is-lit { background: var(--highlight); border-color: var(--rule-strong); }
.sources li:target blockquote, .sources li:target::before,
.sources li.is-lit blockquote, .sources li.is-lit::before { color: var(--ink); }

/* Recall notices ----------------------------------------------------------- */

.recalls { margin-bottom: 2rem; padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: var(--radius); }
.recalls--found { border-color: var(--warn); border-left-width: 5px; }
.recalls h2 { font-size: var(--text-lg); font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.4rem; }
.recalls__lead { margin-bottom: 0.9rem; }
.recalls:not(.recalls--found) .recalls__lead { color: var(--ink-soft); }
.recalls__lot-result { margin-bottom: 0.9rem; padding: 0.7rem 0.9rem; background: var(--panel); border-radius: var(--radius-sm); }
.recalls__lot-result--found { background: var(--warn-soft); }
.recalls__caveat { margin-top: 0.9rem; font-size: var(--text-sm); color: var(--ink-soft); }

.lot-check { margin-bottom: 1.1rem; }
.lot-check label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: 0.3rem; }
.lot-check__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lot-check input[type="text"] {
  flex: 1 1 12rem; min-width: 0; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 0.5rem 0.7rem;
}
.lot-check input[type="text"]:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.button--quiet { color: var(--ink); background: var(--panel); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 0.5rem 0.9rem; }

.recalls__list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.recalls__more { margin-top: 0.6rem; }
.recalls__more summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 0.3rem 0; }
.recalls__more[open] summary { margin-bottom: 0.6rem; }
.recall { padding: 0.9rem 1rem; background: var(--panel); border-radius: var(--radius-sm); border: 1px solid transparent; }
.recall--match { border-color: var(--warn); }
.recall__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.tag {
  padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 650;
  color: var(--ink-soft); background: var(--bg); border: 1px solid var(--rule-strong);
}
.tag--class-i { color: var(--warn-ink); background: var(--warn); border-color: var(--warn); }
.tag--class-ii { color: var(--ink); border-color: var(--warn); }
.tag--match { color: var(--ink); background: var(--warn-soft); border-color: var(--warn); }
.recall__product { font-weight: 600; margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.recall__facts { display: grid; gap: 0.45rem; font-size: var(--text-sm); }
.recall__facts dt { color: var(--ink-soft); }
.recall__facts dd { overflow-wrap: anywhere; }
.recall__codes { max-height: 7.5rem; overflow-y: auto; }
@media (min-width: 34rem) {
  .recall__facts > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0.75rem; }
}

/* Wide screens: the label sits beside the summary, so a citation and its source are both in view. */
@media (min-width: 64rem) {
  .result__body { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 4rem; align-items: start; }
  .sources {
    position: sticky; top: 5.25rem;
    max-height: calc(100vh - 6.5rem); overflow-y: auto; overscroll-behavior: contain;
    padding-right: 0.35rem;
  }
  .sources li { scroll-margin-top: 0.5rem; }
}

.empty { margin-top: 2rem; }

/* Messages and text pages ------------------------------------------------- */

.notice-page { padding-block: clamp(2.5rem, 7vw, 5rem); max-width: 40rem; }
.notice-page h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); letter-spacing: -0.03em; font-weight: 650; margin-bottom: 0.6rem; }
.notice-page p { margin-bottom: 1.25rem; }
.notice-page .search { margin-top: 2rem; }

.prose { padding-block: clamp(2.5rem, 6vw, 4.5rem); max-width: var(--measure); }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 650; margin-bottom: 1rem; }
.prose h2 { font-size: var(--text-lg); font-weight: 650; letter-spacing: -0.015em; margin: 2.25rem 0 0.6rem; }
.prose p { margin-bottom: 0.9rem; }
.prose .lede { max-width: none; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.5rem; margin-bottom: 0.9rem; }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--rule); margin-top: 2rem; padding-block: 1.75rem 2.75rem;
  color: var(--ink-soft); font-size: var(--text-sm);
}
.site-footer p { max-width: 72ch; margin-bottom: 0.75rem; }
.site-footer strong { color: var(--ink); }
.site-footer__grid { display: grid; gap: 1rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
@media (min-width: 60rem) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
  .site-footer__links { flex-direction: column; text-align: right; }
}

/* Small screens ----------------------------------------------------------- */

@media (max-width: 34rem) {
  .site-header__row .search--compact { order: 3; flex-basis: 100%; max-width: none; }

  /* The big search stacks: field on top, full-width button below. */
  .search:not(.search--compact) .search__bar {
    flex-wrap: wrap; border-radius: var(--radius); padding: 0.5rem;
  }
  .search:not(.search--compact) .search__icon { display: none; }
  .search:not(.search--compact) .search__bar input { flex-basis: 100%; padding-inline: 0.5rem; }
  .search:not(.search--compact) .button { flex: 1 1 100%; border-radius: var(--radius-sm); }

  .segmented legend {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header, .segmented, .site-footer__links, .theme-toggle { display: none; }
  .result__body { display: block; }
  .sources { margin-top: 2rem; }
}
