/* ==========================================================================
   Public Health Facts — shared stylesheet
   Single stylesheet for the whole site. No build step, no framework.
   Design tokens live in :root; every page composes the same primitives.
   ========================================================================== */

:root {
  --bg:            #ffffff;
  --bg-sunken:     #f4f6f8;
  --bg-raised:     #ffffff;
  --surface-tint:  #eef4f5;
  --text:          #16202a;
  --text-muted:    #55636f;
  --text-faint:    #7b8894;
  --border:        #d8dee5;
  --border-strong: #b6c0cb;

  --brand:         #0f5b63;
  --brand-deep:    #093f45;
  --brand-light:   #e3f0f1;
  --accent:        #a2531c;
  --accent-light:  #fbf0e4;

  --good:          #1b6b3a;
  --good-light:    #e6f3ea;
  --warn:          #8a6100;
  --warn-light:    #fbf3df;
  --alert:         #9b2226;
  --alert-light:   #fbeaea;

  --radius:        6px;
  --radius-lg:     10px;
  --measure:       68ch;
  --shadow-sm:     0 1px 2px rgba(16, 32, 42, .06), 0 1px 3px rgba(16, 32, 42, .04);
  --shadow-md:     0 2px 4px rgba(16, 32, 42, .05), 0 8px 20px rgba(16, 32, 42, .07);
  /* Edge shadow marking a horizontally scrollable region; see .table-scroll. */
  --edge-shade:    rgba(16, 32, 42, .20);

  /* Height of the sticky header, so anchor targets can clear it. The header
     becomes two rows below 54rem, where this is redeclared. */
  --header-h:      4rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Public Sans",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #10161c;
    --bg-sunken:     #0b1015;
    --bg-raised:     #161e26;
    --surface-tint:  #16262a;
    --text:          #e6ecf1;
    --text-muted:    #a3b0bc;
    --text-faint:    #7d8b98;
    --border:        #2a353f;
    --border-strong: #3d4a56;

    --brand:         #6fc3cb;
    --brand-deep:    #a8dde3;
    --brand-light:   #163034;
    --accent:        #e0a165;
    --accent-light:  #2d2216;

    --good:          #6cc48c;
    --good-light:    #14291c;
    --warn:          #ddb554;
    --warn-light:    #2a2415;
    --alert:         #f08a8d;
    --alert-light:   #2c1719;

    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md:     0 2px 4px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
    --edge-shade:    rgba(0, 0, 0, .55);
  }
}

/* Explicit theme overrides must beat the media query in both directions. */
:root[data-theme="light"] {
  --bg: #ffffff;          --bg-sunken: #f4f6f8;    --bg-raised: #ffffff;
  --surface-tint: #eef4f5;
  --text: #16202a;        --text-muted: #55636f;   --text-faint: #7b8894;
  --border: #d8dee5;      --border-strong: #b6c0cb;
  --brand: #0f5b63;       --brand-deep: #093f45;   --brand-light: #e3f0f1;
  --accent: #a2531c;      --accent-light: #fbf0e4;
  --good: #1b6b3a;        --good-light: #e6f3ea;
  --warn: #8a6100;        --warn-light: #fbf3df;
  --alert: #9b2226;       --alert-light: #fbeaea;
  --shadow-sm: 0 1px 2px rgba(16, 32, 42, .06), 0 1px 3px rgba(16, 32, 42, .04);
  --shadow-md: 0 2px 4px rgba(16, 32, 42, .05), 0 8px 20px rgba(16, 32, 42, .07);
  --edge-shade: rgba(16, 32, 42, .20);
}

:root[data-theme="dark"] {
  --bg: #10161c;          --bg-sunken: #0b1015;    --bg-raised: #161e26;
  --surface-tint: #16262a;
  --text: #e6ecf1;        --text-muted: #a3b0bc;   --text-faint: #7d8b98;
  --border: #2a353f;      --border-strong: #3d4a56;
  --brand: #6fc3cb;       --brand-deep: #a8dde3;   --brand-light: #163034;
  --accent: #e0a165;      --accent-light: #2d2216;
  --good: #6cc48c;        --good-light: #14291c;
  --warn: #ddb554;        --warn-light: #2a2415;
  --alert: #f08a8d;       --alert-light: #2c1719;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
  --edge-shade: rgba(0, 0, 0, .55);
}

/* --------------------------------------------------------------- reset -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets have to clear the sticky header, whose height changes at
     the 54rem breakpoint — hence the token rather than a literal. */
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -.012em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -.022em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem); margin-top: 2.5rem; }
h3 { font-size: 1.1875rem; margin-top: 2rem; }
h4 { font-size: 1.0625rem; margin-top: 1.5rem; color: var(--text-muted); }

p, ul, ol { margin: 0 0 1.1em; }
p { max-width: var(--measure); }
li { margin-bottom: .4em; }
ul, ol { padding-left: 1.35em; max-width: var(--measure); }
li > ul, li > ol { margin-top: .4em; margin-bottom: .4em; }

strong { font-weight: 640; }
small { font-size: .875rem; }

a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-deep); }

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

code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .08em .34em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.wrap--narrow { max-width: 780px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ banners -- */

.gov-notice {
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--text-muted);
  padding: .5rem 0;
}
.gov-notice p { margin: 0; max-width: none; }
.gov-notice strong { color: var(--text); }

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid, not a translucent backdrop-filter: these pages are long and
     table-heavy, and compositing a blurred backdrop on every scroll frame is
     an expensive repaint for a barely visible effect. */
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--text); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  flex: 0 0 auto;
}
@media (prefers-color-scheme: dark) { .brand-mark { color: #0b1015; } }
:root[data-theme="dark"] .brand-mark { color: #0b1015; }
:root[data-theme="light"] .brand-mark { color: #fff; }

.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name span:last-child {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.site-nav {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  display: block;
  padding: .4rem .7rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 550;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-sunken); color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-light);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: .95rem;
  flex: 0 0 auto;
}
.theme-toggle:hover { background: var(--bg-sunken); color: var(--text); }

/* Inline SVG rather than moon/sun glyphs, whose font coverage is unreliable.
   Both icons ship in the markup; CSS picks the one matching the active theme,
   so the correct icon shows even before site.js runs. */
.theme-toggle svg { display: none; width: 1rem; height: 1rem; }
.theme-toggle .icon-moon { fill: currentColor; }
.theme-toggle .icon-sun {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  .theme-toggle .icon-moon { display: none; }
  .theme-toggle .icon-sun  { display: block; }
}
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }

/* ---------------------------------------------------------------- hero -- */

.hero {
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.hero p.lede { font-size: 1.1875rem; color: var(--text-muted); max-width: 62ch; }

.page-head {
  padding: clamp(2rem, 5vw, 3.25rem) 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-head .eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.page-head p.lede { font-size: 1.125rem; color: var(--text-muted); max-width: 66ch; }

main { padding-bottom: 4rem; }

/* --------------------------------------------------------------- cards -- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin: 1.75rem 0 2rem;
}

/* Exactly two columns, for grids of four cards — auto-fit would give 3+1. */
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 46rem) { .grid--2 { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; font-size: 1.0625rem; }
.card p { margin-bottom: .75rem; color: var(--text-muted); font-size: .9375rem; }
.card > :last-child { margin-bottom: 0; }
/* Pin only a trailing call-to-action to the bottom. Applying this to any last
   child pushes body copy down whenever a sibling heading wraps to two lines. */
.card .more { margin-top: auto; padding-top: .35rem; }

a.card { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
a.card .more { color: var(--brand); font-weight: 600; font-size: .875rem; }

.card-icon { font-size: 1.5rem; line-height: 1; margin-bottom: .75rem; }

/* --------------------------------------------------------------- boxes -- */

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  background: var(--surface-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0;
  max-width: var(--measure);
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout h3, .callout h4 { margin-top: 0; font-size: 1rem; color: var(--text); }

.callout--good  { border-left-color: var(--good);  background: var(--good-light); }
.callout--warn  { border-left-color: var(--warn);  background: var(--warn-light); }
.callout--alert { border-left-color: var(--alert); background: var(--alert-light); }

.bottom-line {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 1.25rem 1.4rem;
  margin: 2rem 0;
  max-width: var(--measure);
  box-shadow: var(--shadow-sm);
}
.bottom-line h3 {
  margin: 0 0 .5rem;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.bottom-line > :last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- tables -- */

.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .9375rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: .9rem 1rem .25rem;
  font-size: .875rem;
  color: var(--text-muted);
}

th, td {
  text-align: left;
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--bg-sunken);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-sunken); }
td strong { white-space: nowrap; }

/* --------------------------------------------------------------- stats -- */

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin: 1.75rem 0 2.25rem;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 1.1rem 1.2rem;
}
.stat .num {
  display: block;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.stat .label { display: block; font-size: .875rem; color: var(--text-muted); margin-top: .35rem; }

/* --------------------------------------------------------------- pills -- */

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .03em;
  padding: .15rem .55rem;
  border-radius: 100px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.tag--good  { background: var(--good-light);  border-color: transparent; color: var(--good); }
.tag--warn  { background: var(--warn-light);  border-color: transparent; color: var(--warn); }
.tag--alert { background: var(--alert-light); border-color: transparent; color: var(--alert); }

/* ------------------------------------------------------------ accordion -- */

details.qa {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  margin-bottom: .75rem;
  max-width: var(--measure);
}
details.qa > summary {
  cursor: pointer;
  padding: .85rem 1.1rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::before {
  content: "+";
  color: var(--brand);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  flex: 0 0 auto;
}
details.qa[open] > summary::before { content: "\2212"; }
details.qa[open] > summary { border-bottom: 1px solid var(--border); }
details.qa .qa-body { padding: 1rem 1.1rem .4rem 2.5rem; }
details.qa .qa-body > :last-child { margin-bottom: 1rem; }

/* ---------------------------------------------------------- references -- */

.refs { font-size: .875rem; color: var(--text-muted); }
.refs ol { padding-left: 1.4em; }
.refs li { margin-bottom: .55em; }

.reviewed {
  font-size: .8125rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2.5rem;
}

/* -------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  padding: 2.5rem 0 3rem;
  font-size: .9375rem;
}
.footer-grid {
  display: grid;
  gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin-bottom: 2rem;
}
.site-footer h4 {
  margin: 0 0 .6rem;
  font-size: .75rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35em; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--text-faint);
  font-size: .8125rem;
}
.footer-legal p { max-width: 78ch; }
.footer-legal > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- utility -- */

.center { text-align: center; }
.muted { color: var(--text-muted); }
.stack-lg > * + * { margin-top: 2rem; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: .65rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: .9375rem;
  border: 1px solid var(--brand);
}
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-light); color: var(--brand-deep); }
@media (prefers-color-scheme: dark) { .btn { color: #0b1015; } .btn:hover { color: #0b1015; } }
:root[data-theme="dark"] .btn { color: #0b1015; }
:root[data-theme="dark"] .btn:hover { color: #0b1015; }
:root[data-theme="light"] .btn { color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-sunken);
  padding: 1.1rem 1.35rem;
  margin: 0 0 2.5rem;
  max-width: var(--measure);
}
.toc h2 {
  margin: 0 0 .6rem;
  font-size: .75rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc ul { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .3em; break-inside: avoid; }
@media (max-width: 34rem) { .toc ul { columns: 1; } }

/* ------------------------------------------------------- small screens -- */
/*
   Two breakpoints, both in rem so they track the user's font size:

     54rem  the header can no longer fit brand + five nav items + toggle on
            one row. The real threshold is ~838px; 54rem (864px) leaves room
            for font-metric variation, and being early costs nothing.
     46rem  roughly a large phone in portrait — the point where desktop-scale
            padding starts costing real reading width.

   Media queries can't read custom properties, so these are literals below.
   If you move 54rem, move --header-h with it: scroll-padding-top is derived
   from that token, and anchor targets land behind the header if it lies.
*/

/* --- header ------------------------------------------------------------ */
/*
   Left to wrap on its own, the header put the nav on two extra rows and the
   theme toggle on a fourth, giving a *sticky* header 194px tall — a quarter
   of a phone screen, on every page. Below this breakpoint the nav gets its
   own full-width row that scrolls sideways instead of wrapping, so the header
   stays two compact rows at any width down to 320px.
*/
@media (max-width: 54rem) {
  /* Measures 103px; rounded up so a font-metric shift can't make the token
     under-report and push anchor targets back behind the header. */
  :root { --header-h: 7rem; }

  .header-inner {
    gap: .75rem;
    row-gap: 0;
    min-height: 3.5rem;
  }

  /* The wordmark alone carries the identity; the tagline is decorative and
     costs a whole line in a header that is pinned to the top of the screen. */
  .brand-name span:last-child { display: none; }
  .brand { font-size: 1rem; gap: .5rem; }
  .brand-mark { width: 1.75rem; height: 1.75rem; font-size: .875rem; }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--border);
    /* Bleed the strip to the viewport edges, so a part-scrolled item is
       clipped by the screen rather than floating short of it — that clipping
       is what tells you the row scrolls. */
    margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem));
    /* overflow-x: auto clips the cross axis too, so the block padding has to
       clear the 3px focus ring at its 2px offset or keyboard focus is cut off. */
    padding: .4rem clamp(1rem, 4vw, 2rem) .5rem;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  /* No scroll-snap here: snapping re-aligns the strip to the first item on
     load, which undoes site.js centring the current page. */
  /* .6rem block padding is what takes these from 41px to a 44px touch target. */
  .site-nav a { padding: .6rem .7rem; }

  .theme-toggle { width: 2.75rem; height: 2.75rem; }
}

/* --- narrow ------------------------------------------------------------ */

@media (max-width: 46rem) {
  /* Six lines of 13px legalese before any content on index.html. The wording
     is load-bearing and stays; only its typographic weight comes down. */
  .gov-notice { font-size: .75rem; line-height: 1.5; }

  /* 2.5rem of hanging indent is affordable at desktop widths and is not
     affordable out of 358px of content. */
  details.qa > summary { padding: .8rem .9rem; gap: .6rem; }
  details.qa .qa-body { padding: .9rem .9rem .4rem; }

  .card { padding: 1.15rem; }
  .callout { padding: 1rem 1.1rem; }
  .bottom-line { padding: 1.1rem 1.15rem; }
  .toc { padding: 1rem 1.15rem; }

  /* Tighter cells fit meaningfully more of a table on screen. */
  th, td { padding: .6rem .75rem; }
  caption { padding: .8rem .85rem .25rem; }

  /* These three exist to stop desktop columns breaking at awkward points.
     On a phone they instead force the table wider than it needs to be — the
     "Crisis — seek care now" pill alone was pushing a table that otherwise
     fits into horizontal scrolling. */
  thead th { white-space: normal; }
  td strong { white-space: normal; }
  td .tag { white-space: normal; }
}

/* --- horizontally scrolling tables ------------------------------------- */
/*
   Every table is wider than a phone, so on small screens the row's first cell
   is pinned: you can swipe to the Doses/Interval/Coverage column without
   losing track of which vaccine or test the row is about.

   The edge shadow is the local/scroll background trick rather than a static
   gradient — the cover layer is attached `local` so it travels with the
   content and hides the shadow exactly when the table is scrolled fully
   right, which is when there is nothing more to reveal.
*/
@media (max-width: 54rem) {
  .table-scroll {
    background-image:
      linear-gradient(to left, var(--bg-raised) 55%, rgba(0, 0, 0, 0)),
      linear-gradient(to left, var(--edge-shade), rgba(0, 0, 0, 0));
    background-position: right center;
    background-repeat: no-repeat;
    background-size: 2.5rem 100%, 1.1rem 100%;
    background-attachment: local, scroll;
  }

  /* A caption is as wide as its table, so it wrapped at 544px and sat there
     half off-screen — you had to scroll sideways to read the description of
     the table. Pin it, and size it to the visible box rather than the table:
     100cqi is the one length that names the scroll container's own width. */
  .table-scroll { container-type: inline-size; }
  caption {
    position: sticky;
    left: 0;
    width: 100cqi;
  }

  th:first-child, td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg-raised);
    /* box-shadow, not border-right: borders on a sticky cell are unreliable
       under border-collapse: collapse. */
    box-shadow: 1px 0 0 0 var(--border);
  }
  thead th:first-child { background: var(--bg-sunken); z-index: 2; }
  tbody tr:hover td:first-child { background: var(--bg-sunken); }

  /* Tables whose cells are short values rather than prose: let them shrink to
     the screen so there is nothing to scroll at all. */
  table.table--fit { min-width: 0; }
  table.table--fit th:first-child,
  table.table--fit td:first-child { position: static; box-shadow: none; }
}

@media print {
  .site-header, .site-footer, .theme-toggle, .skip-link { display: none; }
  body { font-size: 11pt; }
  details.qa { break-inside: avoid; }
  details.qa .qa-body { display: block !important; }
}
