/* ============================================================
   THE FIREFIGHTER MEDIC — Design System v3
   Inspired by: Lion & Lamb, Airtable, iOS
   Palette lifted from the badge: Navy · Crimson · Gold
   ============================================================ */

:root {
  /* ── LIGHT PALETTE (v2 — approved 2026-05-26) ── */

  /* Backgrounds */
  --bg:       #F8FAFC;   /* clinical light, not stark white */
  --bg-2:     #F1F5F9;   /* section alt */
  --bg-3:     #E2E8F0;   /* subtle dividers */
  --panel:    #FFFFFF;
  --card:     #FFFFFF;
  --card-2:   #F8FAFC;

  /* Borders */
  --border:   rgba(15,23,42,.09);
  --border-2: rgba(15,23,42,.16);

  /* Brand — unchanged */
  --red:      #9e1c1c;
  --red-2:    #c42020;
  --red-dim:  rgba(158,28,28,.12);
  --gold:     #C5A059;
  --gold-dim: rgba(197,160,89,.2);
  --gold-text:#B45309;   /* amber — readable on light bg */
  --navy:     #0d1630;
  --navy-2:   #1a2a50;

  /* Primary accent — royal blue */
  --blue:       #1D4ED8;
  --blue-hover: #1E40AF;
  --blue-light: #EFF6FF;

  /* Study yellow highlight */
  --highlight:  #FEF08A;

  /* Text — inverted for light bg */
  --text:     #0F172A;   /* deep slate */
  --text-2:   #475569;   /* mid slate */
  --text-3:   #607080;   /* slate / captions — 4.86:1 on #F8FAFC, WCAG AA */

  /* UI — same radii */
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius:    13px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow:    0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg: 0 4px 16px rgba(15,23,42,.1),  0 2px 6px rgba(15,23,42,.04);
  --nav-h:     58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  opacity: 0;
  transition: opacity .2s;
}
body.ready { opacity: 1; }

img { display: block; max-width: 100%; }
a { color: inherit; }
h1,h2,h3,h4,h5,h6 { line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 22px;
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(248,250,252,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 22px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.nav-brand img {
  height: 34px;
  width: 34px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav-brand-name { font-size: .88rem; font-weight: 700; }
.nav-brand-tag  { font-size: .62rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .09em; margin-top: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-2);
  font-size: .84rem;
  font-weight: 500;
  transition: background .12s, color .12s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: rgba(29,78,216,.07);
  color: var(--blue);
}

.nav-link svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }

.nav-auth-area { display: flex; align-items: center; margin-left: 4px; }
.nav-auth-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.nav-auth-btn:hover {
  background: rgba(29,78,216,.06);
  color: var(--blue-hover);
  border-color: var(--blue-hover);
}

.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.5);
  cursor: pointer;
  color: var(--text-2);
}

/* ── DRAWER ── */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  pointer-events: none;
}

.nav-overlay {
  flex: 1;
  background: rgba(0,0,0,0);
  transition: background .28s;
}

.nav-panel {
  width: 268px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-2);
  border-left: 1px solid var(--border-2);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-drawer.open {
  pointer-events: auto;
  /* FIX 2: explicitly restore display so main.css ".nav-drawer{display:none}" can't
     win the cascade regardless of stylesheet load order. Specificity 0,2,0 beats
     main.css's 0,1,0 rule. */
  display: flex;
}
.nav-drawer.open .nav-overlay { background: rgba(0,0,0,.62); }
.nav-drawer.open .nav-panel { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-nav { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 2px; }

.drawer-label {
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--text-3);
  padding: 10px 8px 3px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 500;
  transition: background .12s, color .12s;
}

.drawer-link:hover,
.drawer-link[aria-current="page"] {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.dl-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-xs);
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dl-icon svg { width: 14px; height: 14px; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-block: 80px 64px;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative gradient for light theme */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 72% 45%, rgba(29,78,216,.04) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 20% 20%, rgba(197,160,89,.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 840px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-block: 52px 44px; }
  .hero-art { order: -1; }
}

.hero-eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red-2);
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(196,32,32,.2);
}

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 900;
  line-height: 1.07;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}

.t-red  { color: var(--red-2); }
.t-gold { color: var(--gold-text); } /* use amber readable on light bg */

.hero-sub {
  font-size: .975rem;
  color: var(--text-2);
  max-width: 50ch;
  line-height: 1.78;
  margin-bottom: 28px;
}
/* C-2 fix: 50ch overflows mobile content area — remove fixed char-width on small screens */
@media (max-width: 840px) {
  .hero-sub { max-width: 100%; }
  .hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center; }

.hero-stats {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.hero-stat {
  padding: 10px 18px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.hero-stat:last-child { border-right: none; }

.hs-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -.02em;
  text-align: center;
}
.hs-label {
  font-size: .62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
  margin-top: 3px;
  text-align: center;
}

/* Art side */
/* ── HERO LAYOUT — 4-item grid: text | badge | ctas | stats ── */
/* Desktop: 2 columns. text = col1 all rows, badge/ctas/stats = col2 rows 1-3 */
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: auto auto auto;
  column-gap: 48px;
  row-gap: 20px;
  align-items: start;
}
.hero-text-col   { grid-column: 1; grid-row: 1 / 4; min-width: 0; }
.hero-art        { grid-column: 2; grid-row: 1;     min-width: 0; }
.hero-ctas.hero-right-item { grid-column: 2; grid-row: 2; }
.hero-stats.hero-right-item { grid-column: 2; grid-row: 3; }

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.hero-badge-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-badge-wrap::before {
  content: '';
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(29,78,216,.08), transparent 70%);
  pointer-events: none;
}

.hero-badge-img {
  width: 85%;
  max-width: 300px;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 8px 40px rgba(15,23,42,.18));
  mix-blend-mode: normal;
  display: block;
}

/* Mobile: flex column, explicit order for correct stacking */
@media (max-width: 840px) {
  .hero-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  /* Stacking order: badge → text → CTAs → stats */
  .hero-art        { order: 1; width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero-badge-wrap { width: 100%; display: flex; justify-content: center; align-items: center; margin: 0; }
  .hero-badge-img  { display: block; margin: 0 auto; width: 30%; max-width: 110px; }
  .hero-text-col               { order: 2; }
  .hero-ctas.hero-right-item   { order: 3; justify-content: center; }
  .hero-stats.hero-right-item  { order: 4; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 100%; }
  .hero-badge-img { width: 60%; max-width: 220px; }
}

/* ============================================================
   VERSE — visible, top of content, not dominating
   ============================================================ */
.verse-stripe {
  background: #0F172A;  /* intentional dark strip — verse gets visual gravity */
  border-top: none;
  border-bottom: none;
  padding-block: 20px;
}

.verse-stripe-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 22px;
  text-align: center;
}

.verse-stripe-bar { display: none; }

.verse-stripe-text {
  font-family: "Georgia", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  color: #D97706;  /* amber gold on dark stripe */
  line-height: 1.5;
}

.verse-stripe-ref {
  font-size: .72rem;
  color: #D97706;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  opacity: 1;
}

@media (max-width: 600px) {
  .verse-stripe-inner { flex-wrap: wrap; gap: 8px; }
  .verse-stripe-ref { margin-left: 0; }
}

/* ============================================================
   SECTION HELPERS
   ============================================================ */
.section     { padding-block: 64px; }
.section-alt { padding-block: 64px; background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.sh { margin-bottom: 32px; }
.sh.center { text-align: center; }
.sh-eye   { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; color: var(--red-2); margin-bottom: 8px; }
.sh-title { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.sh-sub   { font-size: .92rem; color: var(--text-2); line-height: 1.65; max-width: 52ch; }
.sh.center .sh-sub { margin-inline: auto; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2) 30%, var(--border-2) 70%, transparent);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: filter .12s, transform .12s;
}
.btn:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-red {
  background: var(--red-2);
  color: #fff;
  box-shadow: 0 3px 14px rgba(196,32,32,.3);
}

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline:hover { border-color: var(--blue-hover); color: var(--blue-hover); background: rgba(29,78,216,.05); filter: none; }

/* ============================================================
   TRAINING CARDS
   ============================================================ */
.train-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
@media (max-width: 880px) { .train-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px)  { .train-grid { grid-template-columns: 1fr; } }

.train-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
  min-height: 175px;
  box-shadow: var(--shadow);
}

.train-card:hover { transform: translateY(-2px); }

.train-card.c-red  { border-color: rgba(158,28,28,.25); }
.train-card.c-red:hover  { border-color: rgba(196,32,32,.5);  box-shadow: 0 8px 28px rgba(158,28,28,.12); }
.train-card.c-blue { border-color: rgba(26,42,80,.5); }
.train-card.c-blue:hover { border-color: rgba(50,90,180,.4); box-shadow: 0 8px 28px rgba(26,58,110,.12); }
.train-card.c-gold { border-color: rgba(197,160,89,.2); }
.train-card.c-gold:hover { border-color: rgba(197,160,89,.45); box-shadow: 0 8px 28px rgba(197,160,89,.08); }
.train-card.c-slate:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.train-card.c-navy:hover  { border-color: rgba(26,42,80,.5); box-shadow: var(--shadow); }
.train-card.c-green:hover { border-color: rgba(34,197,94,.2); box-shadow: 0 8px 28px rgba(34,197,94,.06); }

.tc-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
}
.tc-icon svg { width: 18px; height: 18px; }
.train-card.c-red  .tc-icon { background: rgba(158,28,28,.12);  border-color: rgba(158,28,28,.28); }
.train-card.c-blue .tc-icon { background: rgba(26,42,80,.25);   border-color: rgba(50,90,180,.3); }
.train-card.c-gold .tc-icon { background: rgba(197,160,89,.1);  border-color: rgba(197,160,89,.3); }

.tc-title { font-size: .97rem; font-weight: 700; margin-bottom: 5px; }
.tc-desc  { font-size: .83rem; color: var(--text-2); line-height: 1.55; flex: 1; }
.tc-foot  { margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .72rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.train-card.c-red  .tc-foot { color: rgba(220,100,100,.75); }
.train-card.c-blue .tc-foot { color: rgba(100,148,240,.75); }
.train-card.c-gold .tc-foot { color: var(--gold-text); }

/* ============================================================
   STORY / WHY
   ============================================================ */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) { .story-grid { grid-template-columns: 1fr; gap: 32px; } }

.story-copy p {
  font-size: .92rem;
  color: var(--text-2);
  line-height: 1.82;
  margin-bottom: 13px;
}
.story-copy p strong { color: var(--text); font-weight: 600; }
.story-copy p em { color: var(--gold-text); font-style: normal; font-weight: 600; }

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pillar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
}

.pillar-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 9px;
}
.pillar-icon svg { width: 14px; height: 14px; }
.pillar-title { font-size: .84rem; font-weight: 700; margin-bottom: 3px; }
.pillar-desc  { font-size: .78rem; color: var(--text-2); line-height: 1.5; }

/* ============================================================
   BOOK LIST
   ============================================================ */
.book-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color .12s, color .12s;
}
.book-tag:hover { border-color: var(--gold-dim); color: var(--text); }

.book-tag svg { width: 12px; height: 12px; color: var(--text-3); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0F172A;  /* intentional dark — grounding element */
  border-top: 1px solid rgba(255,255,255,.06);
  padding-block: 44px 28px;
  color: #94A3B8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }

.footer-logo { height: 38px; width: 38px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 10px; }
.footer-name { font-size: .9rem; font-weight: 800; margin-bottom: 2px; color: #F8FAFC; }
.footer-tag  { font-size: .7rem; color: #64748B; margin-bottom: 10px; }
.footer-desc { font-size: .8rem; color: #64748B; line-height: 1.65; max-width: 34ch; }

.footer-col-title {
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .11em;
  color: #64748B; margin-bottom: 11px;
}

.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .83rem; color: #94A3B8; text-decoration: none; }
.footer-links a:hover { color: #F8FAFC; }

.footer-bar {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .75rem;
  color: #475569;
  align-items: center;
}

.footer-verse {
  font-style: italic;
  color: #D97706;
  font-size: .74rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-legal-links a {
  font-size: .75rem;
  color: #64748B;
  text-decoration: none;
  transition: color .12s;
}
.footer-legal-links a:hover { color: #94A3B8; }

/* ── Cookie Notice ── */
#cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8888;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -2px 16px rgba(15,23,42,.1);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#cookie-notice p {
  flex: 1;
  margin: 0;
  font-size: .82rem;
  color: #475569;
  line-height: 1.5;
}
#cookie-notice a { color: #1D4ED8; text-decoration: underline; }
#cookie-btn {
  padding: 8px 18px;
  border-radius: 8px;
  background: #0F172A;
  color: #FFFFFF;
  font-size: .82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
#cookie-btn:hover { background: #1E293B; }

/* ============================================================
   SKIP LINK (global — moved from main.css)
   ============================================================ */
.skip-link {
  position: fixed;
  left: -999px;
  top: 0;
  background: #0b1220;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
  opacity: 0;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  opacity: 1;
}

/* ============================================================
   DISABLED BUTTON (WCAG 1.4.3 — explicit colors, no opacity)
   ============================================================ */
button:disabled,
[type="button"]:disabled,
[type="submit"]:disabled {
  background: #CBD5E1 !important;
  color: #64748B !important;
  border-color: transparent !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  filter: none !important;
}

/* ============================================================
   SCREEN-READER ONLY UTILITY
   ============================================================ */
.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;
}

/* ============================================================
   FOCUS / A11Y
   ============================================================ */
:where(a,button,[role="button"],input,select,textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.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;
}

@media (max-width: 600px) {
  .section, .section-alt { padding-block: 44px; }
  .container { padding-inline: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   DARK THEME OVERRIDE
   Applied via html[data-dark] — scenario player, worksheet test page.
   Restores original dark palette for pages that must stay dark.
   ═══════════════════════════════════════════════════════════════════ */
html[data-dark] {
  --bg:       #06070d;
  --bg-2:     #090b14;
  --bg-3:     #0c0f1c;
  --panel:    #101420;
  --card:     #121626;
  --card-2:   #161b2c;
  --border:   rgba(255,255,255,.07);
  --border-2: rgba(255,255,255,.12);
  --text:     #edf1fa;
  --text-2:   #8e99b8;
  --text-3:   #8090B0;  /* lightened for dark mode: 6.26:1 on #06070d */
  --shadow:   0 4px 24px rgba(0,0,0,.5);
  --shadow-lg:0 16px 48px rgba(0,0,0,.65);
}
html[data-dark] body {
  background: #06070d;
  color: #edf1fa;
}
html[data-dark] .site-nav {
  background: rgba(6,7,13,.92) !important;
  border-bottom-color: rgba(255,255,255,.07) !important;
  box-shadow: none !important;
}
html[data-dark] .nav-link { color: #8e99b8 !important; }
html[data-dark] .nav-link:hover,
html[data-dark] .nav-link[aria-current="page"] {
  background: rgba(255,255,255,.07) !important;
  color: #edf1fa !important;
}
html[data-dark] .nav-auth-btn {
  border-color: rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.04) !important;
  color: #8e99b8 !important;
}
html[data-dark] .nav-auth-btn:hover {
  background: rgba(255,255,255,.08) !important;
  color: #edf1fa !important;
  border-color: rgba(255,255,255,.22) !important;
}
html[data-dark] .nav-burger {
  border-color: rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.04) !important;
  color: #edf1fa !important;
}
html[data-dark] .nav-panel {
  background: #090b14 !important;
}

/* ── YELLOW STUDY HIGHLIGHT ─────────────────────────────────────────
   Applied to correct-answer reveals in NREMT, Textbook, Math pages.
   NOT applied to scenario player (stays green/red per Phase D).
   ─────────────────────────────────────────────────────────────────── */
.answer-correct-highlight,
.choice-btn.correct,
.option-btn.correct,
.mcq-correct,
[data-answer-state="correct"] {
  background: var(--highlight, #FEF08A) !important;
  color: #0F172A !important;
  border-color: #EAB308 !important;
  box-shadow: 0 0 0 2px rgba(234,179,8,.3) !important;
}
