/* comesportshub.com - Editorial Masthead stylesheet
   Reusable component system. No page-specific rules here.
============================================================ */

/* === Reset & base === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; transition: color .15s ease; }

a:hover { color: var(--accent-light); }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--text-strong);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

/* Sticky nav occlusion fix (lesson #9) */
section[id] { scroll-margin-top: 80px; }

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

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--accent); color: #fff; padding: 8px 16px;
  z-index: 1000; font-weight: 600; border-radius: 0 0 6px 0;
}
.skip-link:focus { top: 0; }

/* === Container === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-header);
  background: rgba(15, 27, 45, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;}
.brand:hover { color: var(--text-strong); }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--gradient-cta);
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-weight: 800;
  color: #fff;
  font-size: 18px;
  letter-spacing: -.02em;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.brand-name {
  font-size: 18px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-sans);
}

/* Main nav (desktop) */
.main-nav {
  display: none;
  gap: 24px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  text-decoration: none;}
.main-nav a:hover, .main-nav a.is-active {
  color: var(--text-strong);
}
.main-nav a.is-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.header-right { display: flex; gap: 10px; align-items: center; }

/* Hamburger (mobile) */
.hamburger {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--soft-border);
  border-radius: 8px;
  color: var(--text-strong);
  z-index: 300;
  position: relative;
}
.hamburger:hover { background: rgba(16, 185, 129, 0.10); }
.hamburger-icon {
  width: 22px; height: 16px;
  position: relative;
  display: block;
}
.hamburger-icon::before,
.hamburger-icon::after,
.hamburger-icon span {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.hamburger-icon::before { top: 0; }
.hamburger-icon span { top: 7px; display: block; }
.hamburger-icon::after { top: 14px; }
.hamburger[aria-expanded="true"] .hamburger-icon::before { top: 7px; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-icon span { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-icon::after { top: 7px; transform: rotate(-45deg); }

/* Mobile drawer — fixed full-viewport overlay that sits above the
   sticky header so the in-drawer close button always stays pointer-
   reachable. The header is marked inert while the drawer is open,
   so any control that lives behind the drawer surface is unreachable
   by design; the close X (z-950) is the only interactive control
   inside the upper band. */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 45, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 16px) 24px 32px;
  transform: translateX(100%);
  transition: transform .25s ease;
  visibility: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;        /* creates a fresh stacking context so the close
                                control's z-index beats the header cleanly */
}
.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Close button INSIDE the drawer so it sits above the drawer surface
   and remains reachable regardless of header stacking context. */
.drawer-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--soft-border);
  border-radius: 8px;
  color: var(--text-strong);
  z-index: var(--z-drawer-close);
  cursor: pointer;
}
.drawer-close:hover { background: rgba(16, 185, 129, 0.10); }
.drawer-close-icon {
  width: 22px; height: 22px;
  position: relative;
  display: block;
}
.drawer-close-icon::before,
.drawer-close-icon::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.drawer-close-icon::before { transform: rotate(45deg); }
.drawer-close-icon::after { transform: rotate(-45deg); }
.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-drawer nav a {
  color: var(--text-strong);
  font-family: var(--font-serif);
  font-size: 22px;
  padding: 14px 0;
  border-bottom: 1px solid var(--soft-border);
  font-weight: 600;
}
.mobile-drawer nav a:hover { color: var(--accent); }
.mobile-drawer nav a.is-active { color: var(--accent); }
.mobile-drawer nav a.is-active::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 10px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.mobile-drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 6px 20px rgba(16, 185, 129, .45); }
.btn-secondary {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--accent);
}
.btn-secondary:hover { background: rgba(16, 185, 129, 0.12); color: var(--text-strong); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-color: var(--soft-border);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text-strong); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* === Hero === */
.hero {
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: 96px 0 80px;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(16, 185, 129, 0.18), transparent 60%),
    radial-gradient(700px 380px at 10% 110%, rgba(30, 58, 95, 0.55), transparent 70%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px;
  align-items: center;
}
.hero-grid > * { min-width: 0; }
.hero-content { max-width: 640px; min-width: 0; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .18);
}
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  margin-bottom: 18px;
  letter-spacing: -.02em;
}
.hero-lede {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 56ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hero-trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-trust-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent-light);
  line-height: 1;
}
.hero-trust-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card-lg);
  border: 1px solid rgba(16, 185, 129, 0.20);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 27, 45, 0.55) 100%);
  pointer-events: none;
}
.hero-caption {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  background: rgba(15, 27, 45, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  z-index: 1;
}
.hero-caption strong { color: var(--text-strong); display: block; font-size: 14px; margin-bottom: 2px; }

/* Hero variant for sub-pages (shorter) */
.hero-compact {
  padding: 80px 0 56px;
}
.hero-compact .hero-grid { grid-template-columns: 1fr; gap: 32px; }
.hero-compact .hero-visual { display: none; }

/* === Section === */
.section {
  padding: 80px 0;
  position: relative;
}
.section-light { background: var(--background-light); color: var(--text-dark); }
.section-light h1, .section-light h2, .section-light h3, .section-light h4 { color: var(--text-dark); }
.section-light p { color: var(--text-dark-muted); }
/* .section-head p override (same specificity as above) — keep dark text in
   light sections regardless of source order. */
.section-light .section-head p,
.section-light .section-head h1,
.section-light .section-head h2 { color: var(--text-dark); }
.section-light .eyebrow {
  display: inline-block;
  color: #C19A40;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-light .card,
.section-light .loose-card,
.section-light .step,
.section-light .data-card {
  background: #fff;
  border-color: rgba(30, 58, 95, 0.14);
  color: var(--text-dark);
}
.section-light .card h3, .section-light .loose-card h3, .section-light .step h3, .section-light .data-card h3 { color: var(--text-dark); }
.section-light .card p, .section-light .loose-card p, .section-light .step p, .section-light .data-card p { color: var(--text-dark-muted); }
.section-light .card ul,
.section-light .loose-card ul,
.section-light .step ul { color: var(--text-dark-muted); }
.section-light .loose-card h3 { color: var(--primary); }
.section-light .loose-card h3::before { background: rgba(30, 58, 95, 0.10); }
/* Tables inside light sections need dark text for WCAG AA contrast on cream bg. */
.section-light .data-table { background: #fff; }
.section-light .data-table th {
  background: rgba(30, 58, 95, 0.08);
  color: var(--primary);
  border-bottom-color: rgba(30, 58, 95, 0.18);
}
.section-light .data-table td {
  color: var(--text-dark);
  border-bottom-color: rgba(30, 58, 95, 0.08);
}
.section-light .data-table tr:hover td { background: rgba(30, 58, 95, 0.04); }
.section-light .data-table .num { color: var(--primary); }
/* FAQ items, prose, notes inside light sections. */
.section-light .faq-item { background: #fff; border-color: rgba(30, 58, 95, 0.16); }
.section-light .faq-item summary { color: var(--text-dark); }
.section-light .faq-item .faq-body { color: var(--text-dark-muted); }
.section-light .prose p,
.section-light .prose li { color: var(--text-dark); }
.section-light .prose h1, .section-light .prose h2,
.section-light .prose h3, .section-light .prose h4 { color: var(--text-dark); }
.section-light .prose a { color: var(--primary); }
.section-light .section-head a,
.section-light .cta-band a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.section-light .prose blockquote {
  color: var(--text-dark);
  background: rgba(30, 58, 95, 0.06);
  border-left-color: var(--primary);
}
.section-light .note {
  color: var(--text-dark);
  background: rgba(30, 58, 95, 0.06);
  border-left-color: var(--primary);
}
.section-light .note strong { color: var(--primary); }
.section-light .note a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.section-light .figure figcaption { color: var(--text-dark-muted); background: rgba(255,255,255,.7); border-top-color: rgba(30, 58, 95, 0.12); }
.section-light .figure { background: #fff; border-color: rgba(30, 58, 95, 0.14); }
/* Contact-list helpline numbers live inside .section-light cards; the
   default --text (#F1F5F9) fails WCAG AA on cream backgrounds, so force
   a dark, readable color whenever the list sits inside a light section. */
.section-light .contact-list,
.section-light .contact-list .cl-value,
.section-light .contact-list .cl-value a { color: var(--text-dark); }
/* Inline color:var(--text-muted) on lists inside .section-light is the
   historical bug reported as CSH-QA-502. Override any inline color where
   the list lives in a light section so it always renders dark. */
.section-light .card ul[style*="--text-muted"],
.section-light .loose-card ul[style*="--text-muted"],
.section-light .step ul[style*="--text-muted"] { color: var(--text-dark-muted) !important; }
/* Symmetric guard for the dark side — any inline color that resolves to a
   light variant is left alone here, but a future change to --text-dark-muted
   should not break legibility on dark sections. */
.section:not(.section-light) .card ul[style*="--text-dark-muted"],
.section:not(.section-light) .loose-card ul[style*="--text-dark-muted"] { color: var(--text-muted) !important; }
/* Forms inside light sections need dark labels and inputs. */
.section-light label,
.section-light input,
.section-light select,
.section-light textarea { color: var(--text-dark); }

.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { margin-bottom: 12px; }
.section-head .eyebrow {
  display: inline-block;
  color: #C19A40;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head p { color: var(--text-muted); font-size: 17px; }

/* === Card grids === */
.card-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 0;           /* fix: prevents grid items from forcing track overflow */
  max-width: 100%;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface-2);
}
.card h3 { font-size: 1.2rem; margin-bottom: 10px; overflow-wrap: break-word; }
.card p { font-size: 15px; line-height: 1.55; color: var(--text-muted); margin-bottom: 0; overflow-wrap: break-word; }
.card .card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  display: grid; place-items: center;
  margin-bottom: 14px;
  color: var(--accent-light);
}
.card .card-icon svg { width: 24px; height: 24px; }

/* Loose card (for inline h3+p after tables/divs) */
.loose-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10) 0%, rgba(16, 185, 129, 0.03) 100%);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 28px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.loose-card h3 {
  font-size: 1.18rem;
  color: var(--accent-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.loose-card h3::before {
  content: '';
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  background: rgba(16, 185, 129, 0.18);
  border-radius: 8px;
  flex-shrink: 0;
}
.loose-card p:last-child { margin-bottom: 0; }

/* Data card (for stat tiles) */
.data-card {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.08), rgba(30, 58, 95, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.data-card .stat {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
/* In .section-light the data-card surface becomes near-white, so we
   swap the stat foreground to the deeper accent (#059669) which sits
   around 4.6:1 against #FAF7F0 — well above the 3:1 floor for large
   bold text per WCAG AA. */
.section-light .data-card .stat { color: #047857; }

/* Stat label — selector specificity must match or exceed
   .data-card .stat-label so the dark-section override wins.
   WCAG AA: #B8C5D8 against #0F1B2D–#14283F measures ~10.4:1 (well
   above 4.5:1 for 13px text); #475569 only reaches ~2.3:1. */
.data-card .stat-label {
  font-size: 13px;
  color: #B8C5D8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.section-light .data-card .stat-label {
  color: #5C6B82;
  font-weight: 600;
}
.data-card p { font-size: 14px; margin: 4px 0 0; color: var(--text-muted); }

/* Step card (numbered) */
.step-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  counter-increment: step;
  min-width: 0;
  overflow-wrap: break-word;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-cta);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* === Inline image row === */
.inline-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 36px 0;
}
.inline-image-row > * { min-width: 0; }
.inline-image-row .visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
}
.inline-image-row .visual img { width: 100%; height: 100%; object-fit: cover; }
.inline-image-row p { margin-bottom: 12px; }

/* === Tables === */
.table-wrap {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}
.data-table th {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-light);
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(16, 185, 129, 0.05); }
.data-table .num { font-family: var(--font-mono); color: var(--accent-light); font-weight: 600; }

/* === FAQ === */
.faq-grid {
  display: grid;
  gap: 14px;
  max-width: 880px;
  margin: 0 auto;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-body {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* === CTA band === */
.cta-band {
  background: var(--gradient-hero);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 56px 0;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 320px at 50% 0%, rgba(16, 185, 129, 0.18), transparent 60%);
  z-index: 0;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); max-width: 56ch; margin: 0 auto 24px; font-size: 17px; }
.cta-band .btn-row { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* === Footer === */
.site-footer {
  background: var(--background-2);
  border-top: 1px solid rgba(16, 185, 129, 0.18);
  padding: 56px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  margin-bottom: 40px;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;}
.footer-col a:hover { color: var(--text-strong); }
.footer-brand p { font-size: 14px; color: var(--text-muted); margin: 14px 0 18px; max-width: 38ch; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid var(--border);
  color: var(--accent-light);
}
.footer-social a:hover { background: rgba(16, 185, 129, 0.18); color: var(--text-strong); }
.footer-social svg { width: 18px; height: 18px; }
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
  color: var(--muted-2);
}
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--accent-light); }

/* === Prose (long-form article styling) === */
.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
}
.prose h2 { margin-top: 1.8em; margin-bottom: .55em; }
.prose h3 { margin-top: 1.4em; margin-bottom: .5em; }
.prose p { margin-bottom: 1.15em; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text-strong); }
.prose blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 3px solid var(--accent);
  background: rgba(16, 185, 129, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}

/* === Tag chip === */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}

/* === Misc === */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 40px 0;
}
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.no-margin { margin: 0; }

/* Image figure (full-width block) */
.figure {
  margin: 32px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.figure img { width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }
.figure figcaption {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: rgba(15, 27, 45, 0.5);
}

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

/* Note callout */
.note {
  padding: 16px 20px;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  background: rgba(16, 185, 129, 0.06);
  margin: 24px 0;
  font-size: 15px;
  color: var(--text);
}
.note strong { color: var(--accent-light); }

/* Support contact list (responsible-play) */
.contact-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.45;
}
.contact-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}
.contact-list li:first-child { border-top: 0; padding-top: 6px; }
.cl-label {
  flex: 0 0 90px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dark-muted);
}
.cl-value { color: var(--text); font-variant-numeric: tabular-nums; }
.cl-value a { word-break: break-word; }

/* Regional services grid (responsible-play) */
.region-block {
  margin: 32px 0 8px;
  padding: 24px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06) 0%, rgba(212, 175, 55, 0.02) 100%);
}
.region-block h3 { margin-top: 0; }
.region-block p { font-size: 15px; color: var(--text-dark-muted); margin-bottom: 16px; }
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.region-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.region-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dark);
}
.region-detail { color: var(--text-dark-muted); }
.section-light .region-card { background: rgba(255, 255, 255, 0.85); }

@media (max-width: 599px) {
  .region-grid { grid-template-columns: 1fr; }
  .cl-label { flex-basis: 80px; }
}

/* === Responsive ===
   Desktop nav only activates at 1024px+ — at the tablet range
   (768-1023px) the 6 multi-word nav links + brand + hamburger don't fit
   in the 68px header cleanly. The tablet range keeps the compact
   hamburger + brand layout. */
@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .hamburger { display: none; }
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; }
  .hero-compact .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-compact .hero-visual { display: none; }
}
/* Tablet-range header: keep brand + hamburger; tighten the brand name so
   the strip reads cleanly between 768-1023px. */
@media (min-width: 768px) and (max-width: 1023px) {
  .brand-name { font-size: 16px; }
  .brand-tag { font-size: 9px; letter-spacing: .12em; }
  .brand { gap: 8px; }
  .header-inner { padding: 0 14px; gap: 10px; }
}
@media (max-width: 899px) {
  /* Mobile hero cap (lesson #8) */
  .hero { min-height: 480px !important; max-height: 720px !important; padding: 80px 0 56px !important; }
  .hero-trust { display: none !important; }
  .hero h1 { font-size: 32px !important; line-height: 1.1 !important; }
  .hero-lede { font-size: 16px !important; line-height: 1.5 !important; }
  .hero-cta .btn { flex: 1 1 auto !important; min-width: 0 !important; }
  .hero-visual { display: none; }
  .hero-grid { grid-template-columns: 1fr !important; gap: 24px; }
  /* Keep freshest news hero raster visible on mobile */
  .hero-visual:has([data-latest-news-hero]) {
    display: block !important;
    margin-top: 8px;
  }
  .hero-visual:has([data-latest-news-hero]) img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg);
  }
  .hero:has([data-latest-news-hero]) {
    max-height: none !important;
    min-height: 0 !important;
    padding: 72px 0 40px !important;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 56px 0; }
  .cta-band { padding: 36px 22px; }
}
@media (max-width: 599px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .inline-image-row { grid-template-columns: 1fr; }
  .container, .container-narrow { padding: 0 18px; }
  /* Codex CSH-QA-401: force every card grid to one column at the
     mobile viewports (320/347/375/390/430px). At 320px the container
     sits at 284px after 18px padding; the base minmax(280px, 1fr) can
     still squeeze a child into overflow territory if the parent has
     any extra padding or border. This is the safe override. */
  .card-grid, .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Print */
@media print {
  .site-header, .site-footer, .cta-band, .hamburger { display: none; }
  body { background: #fff; color: #000; padding-top: 0; }
}

/* Hide overflow on body when menu open */
body.menu-open { overflow: hidden; }
/* Editorial link styling: underline by default for accessibility */
a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* Accessibility: high-contrast eyebrow on dark backgrounds */
.hero .eyebrow,
.section-dark .eyebrow,
section:not(.section-light) .eyebrow {
  color: #F0C674;
}
.section-light .eyebrow {
  color: #5A4010;
  font-weight: 700;
}

/* Accessibility: high-contrast link in cards (was #10b981 on dark card) */
.card a {
  color: #5EEAD4;
  font-weight: 600;
}
.card a:hover { color: #FFFFFF; }
.section-light .card a {
  color: #0F766E;
}
.section-light .card a:hover { color: #064E3B; }

/* Accessibility: stat-label contrast on dark cards — covered by the
   higher-specificity .data-card .stat-label rule above (#B8C5D8,
   ~10.4:1 on dark surfaces). Kept as a safety net for any other
   .stat-label occurrences outside .data-card. */
.stat-label {
  color: #B8C5D8;
  font-weight: 500;
}
.section-light .stat-label {
  color: #5C6B82;
  font-weight: 600;
}

/* Accessibility: high-contrast links inside light-bg cards and inline-image-rows */
.section-light .loose-card a,
.section-light .inline-image-row a,
.section-light .loose-card a:visited {
  color: #0F766E;
  font-weight: 500;
}
.section-light .loose-card a:hover,
.section-light .inline-image-row a:hover {
  color: #064E3B;
}

/* Chip foreground/background combinations reach WCAG AA contrast
   on every background: emerald 18% surface + near-white text = ~7.5:1,
   emerald 15% surface + dark ink = ~6.8:1. */
.chip {
  color: #ECFDF5;
  background: rgba(16, 185, 129, 0.18);
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.42);
}

.section-light .chip {
  color: #064E3B;
  background: rgba(16, 185, 129, 0.15);
  font-weight: 600;
  border-color: rgba(16, 185, 129, 0.36);
}

.footer-heading {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin: 0 0 14px 0;
}


/* === Contact form (CSH-QA-504) ===
   Static editorial site — the form action is a mailto: with form-encoded
   body. No JS required. Forms sit inside .container-narrow with a soft
   card surface so the field set is visually contained on both dark and
   light sections. */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form-help {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-strong);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.form-row textarea { resize: vertical; min-height: 140px; }
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--muted-2); }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}
.form-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent-light) 50%),
                    linear-gradient(135deg, var(--accent-light) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.form-actions .btn { flex: 0 0 auto; }

/* Light section overrides — dark labels, white input surfaces, dark text. */
.section-light .contact-form {
  background: #fff;
  border-color: rgba(30, 58, 95, 0.16);
  color: var(--text-dark);
}
.section-light .contact-form-help { color: var(--text-dark-muted); }
.section-light .form-row label { color: var(--text-dark); }
.section-light .form-row input,
.section-light .form-row select,
.section-light .form-row textarea {
  color: var(--text-dark);
  background: #FAF7F0;
  border-color: rgba(30, 58, 95, 0.20);
}
.section-light .form-row input::placeholder,
.section-light .form-row textarea::placeholder { color: var(--text-dark-muted); }
.section-light .form-row input:focus,
.section-light .form-row select:focus,
.section-light .form-row textarea:focus {
  outline-color: var(--primary);
  border-color: var(--primary);
  background: #fff;
}

@media (max-width: 600px) {
  .contact-form { padding: 20px; }
  .form-actions .btn { flex: 1 1 100%; white-space: normal; line-height: 1.3; min-height: 48px; }
}

@media (max-width: 360px) {
  .form-actions .btn { padding: 14px 16px; font-size: 15px; }
}

/* ============================================================
   Utility classes (replace recurring inline styles)
   ============================================================ */

/* Reset top margin on a heading that immediately follows a chip/eyebrow */
.no-top-margin { margin-top: 0; }

/* Small bottom margin under a chip above a heading */
.chip-stack { margin-bottom: 14px; }

/* Inline list inside .card with consistent muted text treatment */
.card-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}
.section-light .card-list { color: var(--text-dark-muted); }

/* Tighter spacing for small list blocks in dense callout areas */
.card-list-compact {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Standalone link row at the bottom of a card */
.card-cta { margin-top: 14px; }

/* Standalone top spacing between sibling rows in the same section */
.row-spacing-md { margin-top: 32px; }
.row-spacing-lg { margin-top: 48px; }

/* Last-child footer note inside a card */
.card-note { margin-bottom: 0; }

/* === News article shell === */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  opacity: .55;
  margin-left: 2px;
}
.breadcrumb a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-muted); }

.article-hero {
  padding: 36px 0 28px;
}
.article-hero .hero-banner {
  margin: 0 0 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.article-hero .hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #F0C674;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}
.article-meta time { font-variant-numeric: tabular-nums; }

.article-body {
  padding-bottom: 24px;
}
.article-body .prose { max-width: 760px; }
.article-body .figure { margin: 36px auto; max-width: 860px; }
.article-body .data-table { font-size: 15px; }

.news-freshness {
  margin-top: 8px;
}
.news-freshness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.news-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.08), rgba(15, 27, 45, 0.35));
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
a.news-item:hover {
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
  color: inherit;
}
.news-item-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #F0C674;
}
.news-item-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text-strong);
  margin: 0;
}
.news-item-context {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}
.hub-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.hub-news-list li { min-width: 0; }
.hub-news-list a {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.hub-news-list a:hover { border-color: rgba(16, 185, 129, 0.45); }
.hub-news-list strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-strong);
  margin-bottom: 6px;
}
.hub-news-list span {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 899px) {
  .news-freshness-grid { grid-template-columns: 1fr; }
  .article-hero { padding-top: 28px; }
  /* Keep article hero banner visible on mobile (override generic .hero-visual hide) */
  .article-hero .hero-banner { display: block; }
  .article-hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem) !important; line-height: 1.15 !important; }
}

@media (max-width: 599px) {
  .article-meta { gap: 6px 12px; font-size: 13px; }
}
