/* ============================================================
   Patient Defense Network — site styles (v3)
   Tokens mirror the brand guide. Sharp by default; the shield's
   lower curves are the only curved element in the system.
   Lift via subtle shadows; depth via navy gradients on dark
   backgrounds — never glossy.

   NOTE: Web fonts (Barlow Condensed, Lato, Space Mono) are loaded
   from Google Fonts via <link rel="stylesheet"> in each page's
   <head>, alongside preconnects to fonts.googleapis.com and
   fonts.gstatic.com. Loading them outside of CSS keeps the font
   request from blocking the rest of styles.css from parsing.
   ============================================================ */

:root {
  /* color tokens — v3 spec */
  --navy:           #0E1B2C;
  --navy-grad-top:  #172A40;
  --navy-grad-bot:  #0A1422;
  --red:            #D81E27;
  --red-deep:       #A11118;
  --paper:          #F7F6F3;
  --white:          #FFFFFF;
  --slate:          #3C5063;
  --mist:           #E5E9ED;

  /* component tokens */
  --lift:           0 6px 18px rgba(14, 27, 44, .10);
  --lift-deep:      0 10px 28px rgba(14, 27, 44, .18);
  --rule:           6px;
  --ekg-ambient:    .12;            /* opacity of EKG behind hero copy */
  --shield-opacity: .14;            /* opacity of hero shield watermark */
  --maxw:           1180px;

  --grad-navy:      linear-gradient(180deg, var(--navy-grad-top) 0%, var(--navy-grad-bot) 100%);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: 'Lato', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-deep); }
h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  margin: 0;
  color: var(--navy);
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 14px;
  font-family: 'Lato'; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

/* ---------- focus rings (v3 a11y) ---------- */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.hero :focus-visible,
.map-intro :focus-visible,
.footer :focus-visible,
.page-hero :focus-visible {
  outline-color: var(--white);
}

/* ---------- reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Nav (all pages)
   ============================================================ */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--mist);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 52px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 36px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--navy);
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 22px;
  padding: 6px 2px;
  border-bottom: 3px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--red); color: var(--navy); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--red); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--mist);
  width: 44px; height: 44px; cursor: pointer;
  align-items: center; justify-content: center;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; background: var(--navy);
  width: 22px; height: 2px; position: relative;
}
.nav-toggle span::before { content: ""; position: absolute; top: -7px; left: 0; width: 22px; height: 2px; }
.nav-toggle span::after  { content: ""; position: absolute; top:  7px; left: 0; width: 22px; height: 2px; }

/* Hamburger kicks in at ≤900px so "About Us" and the "SHARE YOUR STORY"
   CTA button don't wrap onto two lines in the 720-900px tablet range. */
@media (max-width: 900px) {
  .nav-inner { padding: 14px 24px; }
  .nav-logo img { height: 44px; }
  /* The toggle uses `margin-left: auto` to push past the (now-empty)
     <nav> element and sit flush against the right edge. Without this,
     `justify-content: space-between` + 3 flex children wedges the
     toggle in the middle of the nav row. The `order` overrides put
     the toggle visually before the (empty) <nav> so focus order on
     mobile reads: logo → toggle → menu links when opened. */
  .nav-toggle { display: inline-flex; margin-left: auto; order: 2; }
  .nav-inner > nav { order: 3; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    background: var(--white); border-bottom: 1px solid var(--mist);
    flex-direction: column; gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav[data-open="true"] .nav-links { display: flex; }
  /* Each dropdown link must be a block element. The desktop rules leave
     <a> as inline, which on mobile means width:100% is ignored and the
     vertical padding doesn't push the <li> height — so all rows collapse
     into a single line-height box, painted padding from each row visually
     overlaps the next, and hover/current-page color leaks across rows.
     display:block makes padding contribute to layout and each row stack
     cleanly with its own click area. */
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 0;
    border-bottom: 0;
    /* Underline sits directly beneath each link's text, like a normal
       text underline, instead of stretching across the whole dropdown row. */
    text-decoration: underline;
    text-decoration-color: var(--mist);
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
  }
  /* Current-page emphasis is carried by red text on mobile; the desktop
     [aria-current="page"] rule's red border-bottom-color is moot now
     that there's no border. */
  .nav-links a[aria-current="page"] {
    color: var(--red);
  }
}

/* ============================================================
   Wrap (max-width container)
   ============================================================ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .wrap { padding: 0 24px; } }

/* ============================================================
   EKG section divider (light & dark variants)
   ============================================================ */
.ekg-divider {
  width: 100%;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto 100%;
  display: block;
}
.ekg-divider.light {
  background-color: var(--paper);
  background-image: url('assets/pdn-ekg.svg');
}
.ekg-divider.dark {
  background-color: var(--navy);
  background-image: url('assets/pdn-ekg-navy.svg');
}

/* ============================================================
   Home hero (navy — match HomeHero-design-intent.png)
   ============================================================ */
.hero {
  position: relative;
  background: var(--grad-navy);
  color: var(--white);
  min-height: min(720px, 80vh);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
}
.hero .hero-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: var(--red);
  z-index: 3;
}
.hero .hero-shield {
  position: absolute;
  right: -6vw;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 38vw, 640px);
  height: auto;
  opacity: var(--shield-opacity);
  pointer-events: none;
  z-index: 1;
}
.hero .hero-inner {
  position: relative;
  z-index: 2;
  padding: 80px 80px 80px 80px;
  max-width: 980px;
}
.hero .rule-above {
  width: 80px; height: var(--rule);
  background: var(--red);
  margin: 0 0 28px;
}
.hero .rule-below {
  width: 220px; height: var(--rule);
  background: var(--red);
  margin: 32px 0 0;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--white);
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  margin: 0;
}
.hero-lead {
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 400;
  color: var(--mist);
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.45;
  max-width: 720px;
  margin: 22px 0 0;
}

@media (max-width: 720px) {
  .hero {
    min-height: min(640px, 80vh);
  }
  .hero .hero-inner {
    padding: 64px 24px 64px 38px;
  }
  .hero .rule-above { width: 40px; margin-bottom: 22px; }
  .hero .rule-below { width: 120px; margin-top: 24px; }
}
@media (max-width: 480px) {
  .hero .hero-shield { display: none; }
}

/* ============================================================
   Page hero (Media + About — navy, simpler)
   ============================================================ */
.page-hero {
  position: relative;
  background: var(--grad-navy);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
}
.page-hero.media   { min-height: 260px; }
.page-hero.about   { min-height: 240px; }
.page-hero .hero-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 14px; background: var(--red); z-index: 3;
}
.page-hero .page-hero-inner {
  position: relative; z-index: 2;
  padding: 56px 80px;
  width: 100%;
}
.page-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  color: var(--white);
  margin: 0;
}
.page-hero.media h1 { font-size: 80px; line-height: 1; }
.page-hero.about h1 { font-size: 72px; line-height: 1; }
.page-hero .red-rule {
  margin-top: 22px;
  width: 220px; height: var(--rule);
  background: var(--red);
}

/* EKG-as-red-rule: a flat red line with one brand-kit-matched spike in
   the middle. Used under About / Media / Share Your Story / Privacy
   page H1s (replaces .red-rule).

   Built as a flex row of THREE SVGs: [flat svg][spike svg][flat svg].
   The key to cohesion: every segment (including the long flats) is an
   SVG <line>/<polyline> stroke with IDENTICAL stroke-width, stroke-color,
   linecap, and vector-effect="non-scaling-stroke". That way every part
   of the EKG renders through the same stroke pipeline at the same screen
   thickness — there's no fill-vs-stroke mismatch like there was when the
   flats were CSS-painted 3px rectangles. Spike stays fixed at 56px so the
   shape doesn't change across breakpoints; flats stretch to fill. */
.ekg-rule {
  display: flex;
  align-items: center;
  gap: 0;
  height: 28px;
  width: 100%;
  margin-top: 22px;
  line-height: 0;
}
.ekg-rule .ekg-flat,
.ekg-rule .ekg-spike {
  display: block;
  height: 28px;
  overflow: visible; /* don't clip stroke endpoints at SVG edges */
}
.ekg-rule .ekg-flat {
  flex: 1;
  min-width: 0;       /* allow shrinking inside narrow flex parents */
}
.ekg-rule .ekg-spike {
  flex: 0 0 56px;
}

@media (max-width: 720px) {
  .page-hero .page-hero-inner { padding: 44px 24px 44px 38px; }
  .page-hero.media h1 { font-size: 56px; }
  .page-hero.about h1 { font-size: 48px; }
  .page-hero .red-rule { width: 140px; }
  .ekg-rule { margin-top: 18px; }
  /* Spike + flat keep their desktop dimensions (56×24 + 3px) on mobile
     so the EKG line reads as one consistent shape across breakpoints. */
}

/* ============================================================
   Callouts (paper)
   ============================================================ */
.callouts-section {
  background: var(--paper);
  padding: 80px 0 96px;
}
.callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.callout {
  background: var(--white);
  border: 1px solid var(--mist);
  box-shadow: var(--lift);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 420px;
}
.callout .stat {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 110px;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 0;
}
/* Stat link: no rest-state underline (the .stat-rule below the stat is the
   visual rule). Underline appears on hover/focus for link discoverability. */
.callout .stat a {
  color: inherit;
  text-decoration: none;
}
.callout .stat a:hover,
.callout .stat a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
  text-decoration-color: var(--red);
}
.callout .stat a:focus-visible { outline: none; }
.callout .stat-rule {
  width: 60px;
  height: 5px;
  background: var(--red);
}
.callout .sentence {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 25px;
  line-height: 1.28;
  color: var(--navy);
  margin: 0;
  flex: 1;
}
.callout .source {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--slate);
  letter-spacing: .02em;
  margin: 0;
}
.callout .source a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--slate);
}
.callout .source a:hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

@media (max-width: 900px) {
  .callouts { grid-template-columns: 1fr; gap: 22px; }
  .callout { min-height: auto; padding: 28px; }
  .callout .stat { font-size: 84px; }
  .callout .sentence { font-size: 22px; }
  .callouts-section { padding: 56px 0 72px; }
}

/* ============================================================
   Map intro band (navy, Home)
   ============================================================ */
.map-intro {
  position: relative;
  background: var(--grad-navy);
  color: var(--white);
  padding: 56px 0;
  min-height: 220px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.map-intro .hero-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 14px; background: var(--red); z-index: 2;
}
.map-intro .map-intro-inner {
  position: relative; z-index: 1;
  padding: 0 80px;
  width: 100%;
}
.map-intro h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 44px;
  line-height: 1.1;
  color: var(--white);
  margin: 0;
  max-width: 900px;
}
.map-intro .map-click-hint {
  margin-top: 14px;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--white);
  opacity: .82;
}
.map-intro .red-rule {
  margin-top: 22px;
  width: 220px;
  height: var(--rule);
  background: var(--red);
}
@media (max-width: 720px) {
  .map-intro { padding: 40px 0; }
  .map-intro .map-intro-inner { padding: 0 24px 0 38px; }
  .map-intro h2 { font-size: 28px; }
  .map-intro .red-rule { width: 140px; }
}

/* ============================================================
   Map (paper, Home)
   ============================================================ */
.map-section {
  background: var(--paper);
  padding: 72px 0;
}
.map-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}
#us-map-container {
  width: 100%;
}
#us-map-container svg {
  width: 100%;
  height: auto;
  display: block;
}
.us-map path,
#us-map-container svg path {
  fill: var(--navy-grad-top);
  stroke: var(--white);
  stroke-width: 1.5;
  stroke-linejoin: miter;
  stroke-linecap: butt;
  cursor: pointer;
  transition: fill .12s ease, stroke-width .12s ease;
  outline: none;
}
#us-map-container svg path:hover,
#us-map-container svg path:focus-visible,
#us-map-container svg path[data-active="true"] {
  fill: var(--red);
  stroke: var(--white);
  stroke-width: 2;
}
/* No-story states are no longer greyed out — every state is clickable
   and looks the same. The Media page handles the empty case with a
   "no stories from [state] yet — want to share yours?" popup. */
#us-map-container svg path:focus-visible {
  stroke: var(--white);
  stroke-width: 2.5;
}

/* ---------- Map state initials (rendered at runtime by site.js) ---------- */
.us-map .state-label,
#us-map-container svg .state-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  fill: var(--white);
  letter-spacing: 0.04em;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 720px) {
  .map-section { padding: 40px 0 56px; }
  .map-wrap { padding: 0 16px; }
}

/* Tablet (≤900px): show only the largest states' labels.
   Hide both small and medium labels — keep only data-size="large". */
@media (max-width: 900px) {
  .us-map .state-label[data-size="medium"],
  .us-map .state-label[data-size="small"],
  #us-map-container svg .state-label[data-size="medium"],
  #us-map-container svg .state-label[data-size="small"] {
    display: none;
  }
}

/* Mobile (<600px): keep only the largest-state initials so the tiny
   map doesn't get overrun by overlapping labels. The 16 "large" states
   (TX, CA, FL, MT, NV, MI, ID, OR, AZ, NM, MN, NY, CO, WY, UT, AK)
   stay visible at a reduced font; everything smaller is hidden. */
@media (max-width: 599px) {
  .us-map .state-label[data-size="medium"],
  .us-map .state-label[data-size="small"],
  #us-map-container svg .state-label[data-size="medium"],
  #us-map-container svg .state-label[data-size="small"] {
    display: none;
  }
  .us-map .state-label[data-size="large"],
  #us-map-container svg .state-label[data-size="large"] {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
}

/* ---------- Map tooltip ---------- */
.map-tooltip {
  position: fixed;
  z-index: 80;
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .04em;
  white-space: normal;
  max-width: 280px;
  box-shadow: var(--lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity .1s ease;
}
.map-tooltip[data-visible="true"] {
  opacity: 1;
}
.map-tooltip[data-mode="touch"] {
  pointer-events: auto;
}
.map-tooltip .close {
  display: none;
  position: absolute;
  top: 4px; right: 6px;
  background: transparent;
  border: 0;
  color: var(--white);
  width: 22px; height: 22px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.map-tooltip[data-mode="touch"] .close {
  display: block;
}
.map-tooltip[data-mode="touch"] {
  padding-right: 30px;
}

/* ============================================================
   Media — filter bar (sticky, paper)
   ============================================================ */
.media-filter {
  background: var(--paper);
  border-bottom: 1px solid var(--mist);
  position: sticky;
  top: 88px; /* below the sticky nav */
  z-index: 30;
  padding: 18px 0;
}
.media-filter-inner {
  /* Match the .wrap container so the filter aligns with the Receipts
     intro above and the story grid below — one shared left edge. */
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.media-filter select,
.media-filter #state-filter {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: 0;
  color: var(--navy);
  padding: 12px 44px 12px 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 220px;
  cursor: pointer;
  /* Navy chevron caret (down) — data URI SVG */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%230E1B2C' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'><polyline points='1,2 6,7 11,2'/></svg>");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
  transition: border-color 120ms ease;
}
.media-filter select:hover,
.media-filter #state-filter:hover {
  border-color: var(--red);
}
.media-filter select:focus-visible,
.media-filter #state-filter:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.media-filter select:focus,
.media-filter #state-filter:focus {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
/* Remove dotted inner focus ring on Firefox */
.media-filter select::-moz-focus-inner,
.media-filter #state-filter::-moz-focus-inner {
  border: 0;
}
.media-filter .count {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--slate);
  letter-spacing: .02em;
  margin: 0;
}
.media-filter .reset {
  font-family: 'Lato'; font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--red);
  text-decoration: none;
  margin-left: auto;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}
.media-filter .reset:hover { color: var(--red-deep); border-bottom-color: var(--red-deep); }
.media-filter .reset[hidden] { display: none; }

/* Sticky-filter offset must match the nav height. The nav drops to
   ~73px tall at ≤900px (when the hamburger appears), so the filter
   offset has to follow at the SAME breakpoint — not 720px — or there
   was a 16px dead band between the two from 721-900px. */
@media (max-width: 900px) {
  .media-filter { top: 73px; }
}
@media (max-width: 720px) {
  .media-filter {
    padding: 14px 0;
  }
  .media-filter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 24px;
  }
  .media-filter select,
  .media-filter #state-filter { width: 100%; min-width: 0; }
  .media-filter .reset { margin-left: 0; }
}

/* ============================================================
   Media — story grid
   ============================================================ */
.media-section {
  background: var(--paper);
  padding: 48px 0 96px;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .story-grid { grid-template-columns: 1fr; gap: 16px; }
  .media-section { padding: 32px 0 64px; }
}

.story-card {
  background: var(--white);
  border: 1px solid var(--mist);
  box-shadow: var(--lift);
  padding: 28px;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: box-shadow .14s ease, border-color .14s ease;
  opacity: 0;
  animation: card-in .3s ease forwards;
}
.story-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
}
.story-card:hover {
  box-shadow: var(--lift-deep);
}
.story-card:hover::after { transform: scaleX(1); }
.story-card:hover .headline { color: var(--red); }
.story-card:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .story-card { opacity: 1; animation: none; transform: none; }
}

.story-card .state-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--navy);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 5px 10px;
  margin-bottom: 16px;
}
.story-card .outlet {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--slate);
  margin: 0 0 8px;
}
.story-card .headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  color: var(--navy);
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 12px;
  transition: color .14s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card .lede {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: var(--slate);
  line-height: 1.55;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card .lede[hidden] { display: none; }
.story-card .meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--mist);
}
.story-card .meta .author {
  font-family: 'Lato'; font-size: 13px;
  color: var(--slate);
}
.story-card .meta .date {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--slate);
}
.story-card .meta .sep { color: var(--mist); }
.story-card .meta .read {
  margin-left: auto;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--red);
}

/* ---------- Empty-state modal (Media page) ----------
   Centered dialog shown when a filter returns 0 stories. The backdrop
   intercepts clicks for dismiss; the card sits centered above. */
.modal { position: fixed; inset: 0; z-index: 200; display: block; }
.modal[hidden] { display: none; }
.modal[data-open="false"] .modal-backdrop,
.modal[data-open="false"] .modal-card { opacity: 0; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 27, 44, 0.72);
  cursor: pointer;
  transition: opacity 140ms ease;
}
.modal-card {
  position: relative;
  max-width: 520px;
  width: calc(100% - 48px);
  margin: 12vh auto 0;
  background: var(--white);
  border-top: 6px solid var(--red);
  padding: 40px 36px 36px;
  box-shadow: var(--lift-deep);
  transition: opacity 140ms ease, transform 140ms ease;
  text-align: left;
}
.modal-close {
  position: absolute;
  top: 6px; right: 6px;
  background: transparent;
  border: 0;
  font-size: 32px;
  line-height: 1;
  color: var(--slate);
  cursor: pointer;
  /* WCAG 2.5.5 minimum 44×44 touch target — padding takes the
     character button to ~52×52. */
  padding: 8px 14px;
  min-width: 44px;
  min-height: 44px;
  font-family: 'Barlow Condensed', sans-serif;
}
.modal-close:hover { color: var(--red); }
.modal-card h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--navy);
  font-size: clamp(26px, 3.5vw, 34px);
  line-height: 1.05;
  margin: 0 0 14px;
}
.modal-card p {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--slate);
  margin: 0 0 24px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.modal-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 16px;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 14px 22px;
  border: 2px solid var(--red);
}
.modal-cta:hover, .modal-cta:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: var(--white);
}
.modal-reset {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--slate);
  text-decoration: none;
  border-bottom: 2px solid var(--mist);
  padding-bottom: 2px;
}
.modal-reset:hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
/* Body lock while modal is open (prevents background scroll). */
body[data-modal-open="true"] {
  overflow: hidden;
}

/* ---------- Media pagination ----------
   Classic numbered pager beneath the story grid. Sharp corners (per
   brand). Current page is red, others navy on paper. Prev/Next labels
   stay visible on all breakpoints; the numeric range collapses to
   "first / current ±2 / last" with "…" gaps so the pager never wraps
   past 7-8 items even at 39+ pages. */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 48px 0 8px;
  padding: 20px 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.pagination a {
  color: var(--navy);
  text-decoration: none;
  padding: 6px 12px;
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
  min-width: 36px;
  text-align: center;
}
.pagination a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}
.pagination a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.pagination a[aria-current="page"] {
  color: var(--white);
  background: var(--red);
  border-bottom-color: var(--red);
}
.pagination a[aria-current="page"]:hover {
  color: var(--white);
  background: var(--red-deep);
  border-bottom-color: var(--red-deep);
}
.pagination a[aria-disabled="true"] {
  color: var(--mist);
  pointer-events: none;
  cursor: default;
}
.pagination .pg-prev,
.pagination .pg-next {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pagination .pg-gap {
  color: var(--slate);
  padding: 6px 4px;
  user-select: none;
}

@media (max-width: 720px) {
  .pagination {
    gap: 8px;
    font-size: 15px;
    margin-top: 36px;
    padding: 16px 8px;
  }
  .pagination a { padding: 6px 8px; min-width: 30px; }
  .pagination .pg-prev,
  .pagination .pg-next { font-size: 14px; }
}

/* ============================================================
   Media — "The Receipts:" intro block
   Sits between the navy page hero and the story grid. Lato body
   copy with a Barlow Condensed section H2. Lives on paper bg.
   ============================================================ */
.media-receipts {
  background: var(--paper);
  padding: 48px 0 24px;
}
/* Match the .wrap container so the Receipts heading + body align with
   the "Media" page-hero H1 above and with the story grid below — one
   shared left edge running down the page. */
.media-receipts-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.media-receipts h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  color: var(--navy);
  margin: 0 0 14px;
}
.media-receipts p {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--navy);
  max-width: 720px;
  margin: 0;
}
@media (max-width: 720px) {
  .media-receipts { padding: 32px 0 16px; }
  .media-receipts-inner { padding: 0 24px; }
  .media-receipts p { font-size: 16px; }
}

/* ============================================================
   Hero CTAs — shared button system used in the home hero (navy bg)
   and in the about body (paper bg). Matches .modal-cta typography
   so the button vocabulary stays consistent across the site.
   Variants:
     .primary    — filled red, white text (one per page max).
     .secondary  — outlined; inherits text/border color from context
                   (white on navy, navy on paper). Hover inverts.
   Container .hero-ctas wraps + stacks responsively.
   ============================================================ */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 16px;
  line-height: 1.1;
  padding: 14px 22px;
  border: 2px solid;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
  /* Long labels like "Hear Firsthand Stories From Patients" wrap inside
     the button instead of forcing the whole row wider than the page. */
  white-space: normal;
  min-height: 48px;
}
.hero-cta:focus-visible {
  outline-offset: 2px;
}
/* Primary — same on any background */
.hero-cta.primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.hero-cta.primary:hover,
.hero-cta.primary:focus-visible {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: var(--white);
}
/* Secondary on DARK bg (default — used in home hero) */
.hero-cta.secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.hero-cta.secondary:hover,
.hero-cta.secondary:focus-visible {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
/* Secondary on LIGHT bg (paper — about body) */
.hero-ctas[data-bg="light"] .hero-cta.secondary {
  color: var(--navy);
  border-color: var(--navy);
}
.hero-ctas[data-bg="light"] .hero-cta.secondary:hover,
.hero-ctas[data-bg="light"] .hero-cta.secondary:focus-visible {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Home hero: tighten top spacing so buttons sit right under the lead,
   inside the framing rules. The container already provides bottom padding
   via .hero-inner. */
.hero .hero-ctas {
  margin-top: 30px;
}

/* Tablet (720–1023px): 4-button home hero wraps to a 2×2 grid.
   .hero-ctas children are buttons; let them grow to ~50% so two fit per
   row. About's 3-button row stays a single wrapping flex row at this
   breakpoint since 3 won't naturally split evenly. */
@media (min-width: 721px) and (max-width: 1023px) {
  .hero .hero-ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .hero .hero-ctas .hero-cta {
    width: 100%;
  }
}

/* Mobile (≤720px): every button group stacks single column, full width. */
@media (max-width: 720px) {
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hero-cta {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
  }
}

/* ============================================================
   About page
   ============================================================ */
.about-body {
  background: var(--paper);
  padding: 80px 0;
}
.about-body .wrap p {
  max-width: 720px;
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--navy);
}
.about-body .wrap p + p {
  margin-top: 22px;
}
@media (max-width: 720px) {
  .about-body { padding: 48px 0; }
  .about-body .wrap p { font-size: 17px; }
  .about-body .wrap p + p { margin-top: 18px; }
}

/* ============================================================
   Footer (navy — all pages)
   ============================================================ */
.footer {
  position: relative;
  background: var(--grad-navy);
  color: var(--white);
  padding: 48px 0 44px;
  isolation: isolate;
}
.footer .hero-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: var(--red);
  z-index: 2;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 80px;
}
.footer-logo img {
  height: 56px;
  width: auto;
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.footer-handle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .02em;
}
.footer-handle:hover { color: var(--white); opacity: .85; }
.footer-handle .x-icon {
  width: 22px; height: 22px;
  display: inline-block;
}
.footer-tagline {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: var(--mist);
  margin: 0;
}
.footer-press {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: var(--mist);
  margin: 0;
}
.footer-press a {
  color: var(--mist);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.footer-press a:hover { color: var(--white); }

@media (max-width: 720px) {
  .footer {
    padding: 40px 0 36px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 0 24px 0 38px;
  }
  .footer-right {
    align-items: flex-start;
    text-align: left;
  }
  .footer-logo img { height: 48px; }
  .footer-handle { font-size: 18px; }
}

/* ============================================================
   Nav CTA button ("Share Your Story") — overrides default .nav-links a
   underline-on-hover with a filled red affordance.
   ============================================================ */
.nav-links a.nav-cta {
  background: var(--red);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-bottom: 0;
  transition: background .12s ease;
}
.nav-links a.nav-cta:hover,
.nav-links a.nav-cta:focus {
  background: var(--red-deep);
  color: var(--white);
  border-bottom-color: transparent;
}
.nav-links a.nav-cta:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--red);
}
.nav-links a.nav-cta[aria-current="page"] {
  background: var(--red-deep);
  border-bottom: 0;
}

/* In the mobile hamburger dropdown, drop the desktop "filled red button"
   treatment and render the CTA as a regular stacked nav row but in red,
   so all 4 dropdown items share the same height, padding, alignment, and
   underline treatment and nothing visually overlaps or escapes its row. */
@media (max-width: 900px) {
  .nav-links a.nav-cta {
    display: block;
    background: transparent;
    color: var(--red);
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 22px;
    text-transform: none;
    letter-spacing: normal;
    width: 100%;
    text-align: left;
    padding: 14px 0;
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-color: var(--mist);
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
    box-shadow: none;
  }
  .nav-links a.nav-cta:hover,
  .nav-links a.nav-cta:focus,
  .nav-links a.nav-cta:focus-visible {
    background: transparent;
    color: var(--red-deep);
    box-shadow: none;
    outline: none;
  }
  .nav-links a.nav-cta[aria-current="page"] {
    background: transparent;
    color: var(--red-deep);
  }
}

/* ============================================================
   Eyebrow label (small uppercase red lead-in)
   Used on share-your-story page hero above H1.
   ============================================================ */
.eyebrow {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: var(--red);
  margin: 0 0 12px;
}
.page-hero .eyebrow { color: var(--red); }

/* ============================================================
   Page hero — share, privacy, patient-voices
   ============================================================ */
.page-hero.share          { min-height: 240px; }
.page-hero.privacy        { min-height: 220px; }
.page-hero.patient-voices { min-height: 240px; }
.page-hero.share          h1,
.page-hero.privacy        h1,
.page-hero.patient-voices h1 {
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
}

@media (max-width: 720px) {
  .page-hero.share          h1,
  .page-hero.privacy        h1,
  .page-hero.patient-voices h1 { font-size: 44px; }
}

/* ============================================================
   Patient Voices — intro + video grid
   ============================================================
   The intro paragraph mirrors About's typographic treatment but
   centers itself for the wide-open paper section.
   The grid is responsive: 1 / 2 / 3 columns. Each card is a
   9:16 portrait frame (TikTok and Reels are both vertical), with
   a sharp navy border + lift shadow matching .story-card.
   Iframes lazy-load via IntersectionObserver in site.js — the
   .voice-card[data-loaded="true"] swap is what triggers `src`. */
.voices-intro {
  background: var(--paper);
  padding: 64px 0 32px;
}
.voices-intro p {
  max-width: 720px;
  margin: 0;
  text-align: left;
  font-family: 'Lato', sans-serif;
  font-size: 19px;
  line-height: 1.55;
  color: var(--navy);
}
.voices-section {
  background: var(--paper);
  padding: 16px 0 96px;
}
.voice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (min-width: 721px) {
  .voice-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}
@media (min-width: 1024px) {
  .voice-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 22px;
  }
}
.voice-card {
  background: var(--white);
  border: 1px solid var(--mist);
  box-shadow: var(--lift);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.voice-frame {
  position: relative;
  width: 100%;
  /* 9:16 portrait aspect (TikTok/Reels native) */
  aspect-ratio: 9 / 16;
  background: var(--mist);
}
.voice-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.voice-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--mist);
}
.voice-caption {
  padding: 16px 18px 18px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: var(--slate);
  margin: 0;
  border-top: 1px solid var(--mist);
}
.voice-caption[hidden] { display: none; }
.voice-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 0;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--slate);
  text-transform: uppercase;
}
.voice-meta .voice-platform {
  background: var(--navy);
  color: var(--white);
  padding: 3px 8px;
  letter-spacing: .12em;
  font-weight: 700;
}
.voice-meta a {
  color: var(--slate);
  text-decoration: none;
}
.voice-meta a:hover { color: var(--red); }

/* ============================================================
   Form-embed surface — used by Share Your Story (Tally).
   White card with mist border, subtle lift, sharp corners,
   generous padding.
   ============================================================ */
.form-embed {
  background: var(--white);
  border: 1px solid var(--mist);
  box-shadow: var(--lift);
  padding: 40px 36px;
  margin-top: 40px;
}
.form-embed .embed-placeholder {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 14px;
  font-style: italic;
  color: var(--slate);
  text-align: center;
  margin: 0;
  padding: 48px 12px;
}

@media (max-width: 720px) {
  .form-embed { padding: 28px 22px; margin-top: 28px; }
  .form-embed .embed-placeholder { padding: 32px 8px; }
}

/* ============================================================
   Share your story body (paper)
   ============================================================ */
.share-body {
  background: var(--paper);
  padding: 72px 0 88px;
}
.share-body .lead {
  font-family: 'Lato', sans-serif;
  font-size: 21px;
  line-height: 1.5;
  color: var(--slate);
  max-width: 720px;
  margin: 0;
}
@media (max-width: 720px) {
  .share-body { padding: 48px 0 64px; }
  .share-body .lead { font-size: 18px; }
}

/* ============================================================
   Privacy body (paper) — long-form policy text
   ============================================================ */
.privacy-body {
  background: var(--paper);
  padding: 64px 0 88px;
}
.privacy-body .wrap {
  max-width: 840px;
}
.privacy-body p {
  font-family: 'Lato', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
  margin: 0 0 16px;
}
.privacy-body .privacy-meta {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-style: italic;
  color: var(--slate);
  margin: 0 0 32px;
}
.privacy-body h2 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 700;
  color: var(--navy);
  font-size: 32px;
  line-height: 1.1;
  margin: 48px 0 16px;
}
.privacy-body h2:first-child { margin-top: 0; }
.privacy-body h3 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 14px;
  color: var(--slate);
  margin: 32px 0 12px;
}
.privacy-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
  font-family: 'Lato', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
}
.privacy-body li {
  margin-bottom: 8px;
}
.privacy-body li > strong { color: var(--navy); }
.privacy-body a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: rgba(60, 80, 99, 0.4);
  text-underline-offset: 3px;
}
.privacy-body a:hover {
  color: var(--red-deep);
  text-decoration-color: var(--red);
}
.privacy-body strong { color: var(--navy); }
.privacy-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  border: 1px solid var(--mist);
  background: var(--white);
}
.privacy-body th {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  padding: 12px 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--navy);
}
.privacy-body td {
  padding: 12px 14px;
  vertical-align: top;
  color: var(--slate);
  border: 1px solid var(--mist);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .privacy-body { padding: 48px 0 64px; }
  .privacy-body h2 { font-size: 26px; margin-top: 40px; }
  .privacy-body p,
  .privacy-body ul { font-size: 16px; }
  .privacy-body table { font-size: 14px; }
  .privacy-body th,
  .privacy-body td { padding: 10px 12px; }
}

/* ============================================================
   Footer nav (expanded link row beneath footer-inner)
   ============================================================ */
.footer-nav {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 24px 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-nav a {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .12s ease;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--red);
}
.footer-nav a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .footer-nav {
    padding: 20px 24px 0 38px;
    margin-top: 20px;
  }
  .footer-nav ul {
    flex-direction: column;
    gap: 14px;
  }
}

/* ============================================================
   Breaking strip (Home — newest 5 stories, horizontal scroll-snap)
   Position: between hero and callouts on the home page.
   ============================================================ */
/* Breaking section is styled as a navy "live ticker" — visually
   distinct from the paper-background Media cards. Cards auto-scroll
   horizontally via a CSS marquee animation; site.js duplicates the
   inner track once so the loop is seamless. Animation pauses on
   hover / focus-within / prefers-reduced-motion. */
.breaking {
  background: var(--slate);
  color: var(--white);
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;        /* clip the off-screen end of the marquee */
  isolation: isolate;
}
.breaking .hero-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: var(--red);
  z-index: 3;
}
.breaking-head {
  margin-bottom: 32px;
  position: relative; z-index: 2;
  text-align: left;
  /* Match .hero .hero-inner left padding (80px desktop, 38px mobile)
     so this header lines up vertically with the hero text above. */
  padding: 0 80px;
}
.breaking-head .eyebrow {
  /* Use paper (warm white) for readability on the slate background.
     The pulsing red dot below carries the "live ticker" red signal. */
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.2em;
}
/* Eyebrows on the navy page-heroes (Share Your Story, etc.) — same
   readability fix; red on navy fails WCAG AA at 13px. */
.page-hero .eyebrow {
  color: var(--paper);
}
/* Pulsing red dot before "Breaking" — telegraphs "live ticker." */
.breaking-live {
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--red);
  flex: 0 0 auto;
  animation: pdn-pulse 1.6s ease-in-out infinite;
}
@keyframes pdn-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.6); }
}
.breaking-head h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  /* Bigger across all viewports — scales 36px (mobile) → 60px (wide desktop). */
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1;
  margin: 0;
  text-align: left;
  max-width: 22ch;
}

/* Strip = fixed-viewport window; track = the moving belt of cards */
.breaking-strip {
  position: relative; z-index: 2;
  overflow: hidden;
  /* Soft fade-out on both edges so cards visually "enter" and "exit"
     the ticker instead of getting clipped abruptly. */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
          mask-image: linear-gradient(to right,
    transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}
.breaking-track {
  display: flex;
  gap: 22px;
  width: max-content;       /* allow horizontal overflow inside .strip */
  animation: pdn-marquee 70s linear infinite;
}
.breaking-track:hover,
.breaking-track[data-paused="true"] {
  animation-play-state: paused;
}
@keyframes pdn-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 11px)); }   /* -50% minus half a gap = aligned seam */
}

/* Reduced-motion: kill the animation, restore manual scroll-snap. */
@media (prefers-reduced-motion: reduce) {
  .breaking-track { animation: none; }
  .breaking-strip {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-mask-image: none; mask-image: none;
  }
  .breaking-card { scroll-snap-align: start; }
}

.breaking-loading,
.breaking-fallback {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--mist);
  margin: 0;
  padding: 24px 0;
}
.breaking-fallback a {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
}
.breaking-fallback a:hover { color: var(--white); border-bottom-color: var(--white); }

/* Cards float on slate — white background gives them lift. Tighter
   padding than Media cards (this is a ticker, not a grid). Width
   scales by breakpoint so the ticker reads well from phones to
   ultra-wide displays. */
.breaking-card {
  flex: 0 0 360px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 4px solid var(--red);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.breaking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}
.breaking-card:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
.breaking-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.breaking-meta {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--slate);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.breaking-state {
  background: var(--navy);
  color: var(--white);
  padding: 3px 7px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.breaking-state[data-national="true"] { background: var(--red); }
.breaking-outlet {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.breaking-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.breaking-card:hover .breaking-headline { color: var(--red); }
.breaking-lede {
  font-family: 'Lato', sans-serif;
  font-size: 13.5px;
  color: var(--slate);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.breaking-read {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: auto;
}

/* Responsive: card width + marquee duration scale by viewport so the
   ticker reads at a comfortable pace across screen sizes. The longer
   the duplicated track is, the slower the loop should be to keep
   perceived motion constant — but on narrow viewports we shorten the
   loop a little since cards visibly cycle faster relative to the
   smaller window. */
@media (max-width: 1024px) {
  .breaking-card { flex: 0 0 320px; }
  .breaking-track { animation-duration: 60s; }
}
@media (max-width: 720px) {
  .breaking { padding: 48px 0 40px; }
  .breaking-card { flex: 0 0 290px; }
  .breaking-head { margin-bottom: 22px; padding: 0 24px 0 38px; }
  .breaking-track { gap: 18px; animation-duration: 48s; }
}
@media (max-width: 480px) {
  .breaking { padding: 40px 0 32px; }
  .breaking-card { flex: 0 0 264px; }
  .breaking-track { gap: 16px; animation-duration: 40s; }
  /* Tighter mask fade on narrow screens so cards stay readable */
  .breaking-strip {
    -webkit-mask-image: linear-gradient(to right,
      transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(to right,
      transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }
}

/* ============================================================
   X (Twitter) timeline (Home — below the map)
   Lazy-loaded via IntersectionObserver in site.js.
   ============================================================ */
.x-feed {
  background: var(--paper);
  padding: 64px 0;
}
.x-feed-head {
  margin-bottom: 24px;
}
.x-feed-head .eyebrow {
  color: var(--red);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}
.x-feed-head h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}
.x-feed-frame {
  background: var(--white);
  border: 1px solid var(--mist);
  padding: 16px;
  box-shadow: var(--lift);
  max-width: 720px;
  margin: 0 auto;
  min-height: 320px;
}
.x-feed-frame .twitter-timeline {
  font-family: 'Lato', sans-serif;
}
/* Scrollable tweet column. Fixed height so the full set of posts scrolls
   inside the card instead of running down the page — mirrors how the old
   Twitter timeline widget behaved. Individual tweets are injected by
   site.js via twttr.widgets.createTweet(). */
.x-feed-rail {
  height: 640px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* subtle inner scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--mist) transparent;
}
.x-feed-rail::-webkit-scrollbar { width: 8px; }
.x-feed-rail::-webkit-scrollbar-thumb {
  background: var(--mist);
  border-radius: 0;
}
.x-feed-rail::-webkit-scrollbar-track { background: transparent; }
/* twttr.widgets.createTweet injects a .twitter-tweet-rendered wrapper per
   tweet; center them and give a little vertical rhythm. */
.x-feed-rail .twitter-tweet,
.x-feed-rail .twitter-tweet-rendered {
  margin: 0 auto 12px !important;
}
.x-feed-loading {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--slate);
  text-align: center;
  padding: 40px 0;
}
.x-feed-loading[hidden] { display: none; }
/* Lightweight fallback shown if widgets.js doesn't render (mobile
   Safari tracking prevention, ad-blockers, etc.). The X widget
   replaces the .twitter-timeline anchor with an iframe; the
   fallback paragraph stays in normal flow underneath and reads as
   a plain "Follow @patient_defense" prompt. */
.x-feed-frame .x-feed-fallback {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: var(--slate);
  margin: 16px 0 4px;
  text-align: center;
}
.x-feed-frame .x-feed-fallback a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.x-feed-frame .x-feed-fallback a:hover { color: var(--red); }

@media (max-width: 720px) {
  .x-feed { padding: 48px 0; }
  .x-feed-frame {
    padding: 12px;
    min-height: 320px;
  }
  .x-feed-rail { height: 560px; }
}

/* ============================================================
   Utilities
   ============================================================ */
.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;
}
