/* ==========================================================================
   Health Captain — Design System
   Take Command of Your Health.
   Single stylesheet shared by the static site and the WordPress theme.
   Sections: 1 Tokens · 2 Reset · 3 Typography · 4 Layout · 5 Buttons
             6 Header/Nav · 7 Footer · 8 Cards · 9 Hero · 10 Sections
             11 Article · 12 Tools · 13 Game · 14 Forms · 15 Utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --navy: #102a43;
  --navy-800: #1c3d5a;
  --navy-700: #2b5070;
  --blue: #1677ff;
  --blue-600: #0b5fd8;
  --blue-700: #0a4bab;
  --teal: #00a7a5;
  --teal-600: #008a88;
  --green: #2ead66;
  --green-600: #248a52;
  --light-blue: #eaf5ff;
  --warm-white: #fafcfe;
  --slate: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --gold: #f4b942;
  --gold-600: #d99b1f;
  --red: #c62828;
  --red-50: #fdeced;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--warm-white);
  --bg-alt: var(--light-blue);
  --bg-panel: var(--white);
  --ink: var(--navy);
  --ink-muted: var(--slate);
  --line: var(--slate-200);
  --line-strong: var(--slate-300);
  --brand: var(--blue);
  --brand-ink: #ffffff;
  --focus: #f4b942;

  /* Type scale — body minimum 17px per accessibility target */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs: 0.8125rem;   /* 13px — labels only */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1.0625rem; /* 17px body minimum */
  --fs-md: 1.1875rem;   /* 19px */
  --fs-lg: 1.375rem;    /* 22px */
  --fs-xl: 1.75rem;     /* 28px */
  --fs-2xl: 2.125rem;   /* 34px */
  --fs-3xl: 2.75rem;    /* 44px */
  --fs-4xl: 3.5rem;     /* 56px */

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-body: 1.7;

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.75rem;
  --sp-8: 3.5rem;
  --sp-9: 5rem;
  --sp-10: 7rem;

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.06), 0 1px 3px rgba(16, 42, 67, 0.08);
  --shadow-md: 0 4px 12px rgba(16, 42, 67, 0.08), 0 2px 4px rgba(16, 42, 67, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 42, 67, 0.12), 0 4px 8px rgba(16, 42, 67, 0.05);
  --shadow-xl: 0 24px 60px rgba(16, 42, 67, 0.16);

  --container: 1240px;
  --container-narrow: 780px;
  --header-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
table { border-collapse: collapse; width: 100%; }
:target { scroll-margin-top: calc(var(--header-h) + 24px); }

/* Focus — visible on every interactive element */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 20px;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: 8px; color: #fff; }

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

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-4);
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, var(--fs-3xl)); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, var(--fs-2xl)); }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, var(--fs-xl)); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-lg); font-weight: 700; line-height: var(--lh-snug); }
h5 { font-size: var(--fs-md); font-weight: 700; }
h6 { font-size: var(--fs-base); font-weight: 700; }
p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; color: var(--navy); }
blockquote { margin: var(--sp-6) 0; padding: 0 0 0 var(--sp-5); border-left: 4px solid var(--teal); font-size: var(--fs-md); color: var(--navy-800); }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--slate-100); padding: 0.15em 0.4em; border-radius: 4px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal-600); margin-bottom: var(--sp-3);
}
.eyebrow--gold { color: var(--gold-600); }
.eyebrow--blue { color: var(--blue-600); }
.lede { font-size: var(--fs-md); color: var(--navy-800); line-height: 1.65; }
.muted { color: var(--ink-muted); }
.small { font-size: var(--fs-sm); }
.section-title { margin-bottom: var(--sp-3); }
.section-intro { max-width: 68ch; color: var(--navy-800); font-size: var(--fs-md); margin-bottom: var(--sp-6); }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.section--loose { padding-block: var(--sp-9); }
.section--alt { background: var(--bg-alt); }
.section--panel { background: var(--white); }
.section--navy { background: var(--navy); color: #dbe7f2; }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }
.section--navy .section-intro, .section--navy .lede { color: #b8cde0; }
.section--navy a { color: #9fd0ff; }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.section-head > div { min-width: 0; }
.section-head .section-intro { margin-bottom: 0; }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-7); align-items: start; }

@media (max-width: 1060px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: var(--sp-7); }
}

/* --------------------------------------------------------------------------
   5. BUTTONS + PILLS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 0.78em 1.5em; min-height: 48px;
  border-radius: var(--r-pill); border: 2px solid transparent;
  font-size: var(--fs-base); font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background-color 0.16s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(22, 119, 255, 0.28); }
.btn--primary:hover { background: var(--blue-600); color: #fff; box-shadow: 0 10px 24px rgba(22, 119, 255, 0.34); }
.btn--teal { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(0, 167, 165, 0.28); }
.btn--teal:hover { background: var(--teal-600); color: #fff; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-600); color: #fff; }
.btn--gold { background: var(--gold); color: var(--navy); box-shadow: 0 6px 18px rgba(244, 185, 66, 0.36); }
.btn--gold:hover { background: var(--gold-600); color: var(--navy); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--outline:hover { background: var(--white); border-color: var(--blue); color: var(--blue-700); }
.btn--ghost-light { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.42); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.btn--sm { padding: 0.55em 1.1em; min-height: 40px; font-size: var(--fs-sm); }
.btn--lg { padding: 0.95em 1.9em; min-height: 56px; font-size: var(--fs-md); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.03em;
  background: var(--light-blue); color: var(--blue-700); text-decoration: none;
}
.pill--teal { background: rgba(0, 167, 165, 0.12); color: var(--teal-600); }
.pill--green { background: rgba(46, 173, 102, 0.13); color: var(--green-600); }
.pill--gold { background: rgba(244, 185, 66, 0.18); color: #8a6300; }
.pill--red { background: var(--red-50); color: var(--red); }
.pill--slate { background: var(--slate-100); color: var(--slate); }
a.pill:hover { filter: brightness(0.95); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; text-decoration: none; color: var(--blue-600);
}
.link-arrow::after { content: "\2192"; transition: transform 0.16s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. HEADER + MEGA MENU
   -------------------------------------------------------------------------- */
.utility-bar {
  background: var(--navy); color: #b8cde0;
  font-size: var(--fs-xs); line-height: 1.4;
}
.utility-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-block: 8px; }
.utility-bar a { color: #cfe4f7; text-decoration: none; font-weight: 600; }
.utility-bar a:hover { color: #fff; text-decoration: underline; }
.utility-bar__links { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.utility-bar__note { display: inline-flex; align-items: center; gap: 6px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-size: 1.24rem; font-weight: 900; letter-spacing: -0.03em; color: var(--navy); font-family: var(--font-display); }
.brand__tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--teal-600); }

.primary-nav { margin-left: auto; }
.primary-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.primary-nav__item { position: static; }
.primary-nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 13px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 700; color: var(--navy);
  text-decoration: none; background: none; border: 0; cursor: pointer;
  white-space: nowrap;
}
.primary-nav__link:hover, .primary-nav__link[aria-expanded="true"] { background: var(--light-blue); color: var(--blue-700); }
.primary-nav__link[aria-current="page"] { color: var(--blue-700); box-shadow: inset 0 -3px 0 var(--blue); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.primary-nav__chev { width: 10px; height: 10px; transition: transform 0.18s var(--ease); }
.primary-nav__link[aria-expanded="true"] .primary-nav__chev { transform: rotate(180deg); }

.megamenu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6) 0 var(--sp-7);
  display: none;
}
.megamenu[data-open="true"] { display: block; animation: mm-in 0.18s var(--ease); }
@keyframes mm-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.megamenu__inner { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: var(--sp-7); }
.megamenu__intro h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.megamenu__intro p { font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: var(--sp-4); }
.megamenu__cols { columns: 3; column-gap: var(--sp-6); }
.megamenu__link {
  display: block; break-inside: avoid;
  padding: 7px 10px; margin-bottom: 2px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--navy-800); text-decoration: none;
}
.megamenu__link:hover { background: var(--light-blue); color: var(--blue-700); }
.megamenu__link--all { color: var(--teal-600); font-weight: 800; }
.megamenu__promo {
  background: linear-gradient(160deg, var(--light-blue), #d9ecff);
  border-radius: var(--r-md); padding: var(--sp-5);
}
.megamenu__promo h4 { font-size: var(--fs-base); margin-bottom: var(--sp-2); }
.megamenu__promo p { font-size: var(--fs-sm); color: var(--navy-800); margin-bottom: var(--sp-4); }
@media (max-width: 1160px) { .megamenu__inner { grid-template-columns: 220px minmax(0, 1fr); } .megamenu__promo { display: none; } }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); cursor: pointer;
  color: var(--navy);
}
.icon-btn:hover { background: var(--light-blue); border-color: var(--blue); color: var(--blue-700); }
.icon-btn svg { width: 19px; height: 19px; }
.header-cta { display: inline-flex; }
.nav-toggle { display: none; }

@media (max-width: 1100px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn { padding-inline: 1.1em; font-size: var(--fs-sm); }
}
@media (max-width: 620px) {
  .header-cta { display: none; }
  .brand__tag { display: none; }
}

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(16, 42, 67, 0.5);
  display: none;
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--white); overflow-y: auto; padding: var(--sp-5) var(--sp-5) var(--sp-8);
  box-shadow: var(--shadow-xl);
  animation: drawer-in 0.22s var(--ease);
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.mobile-nav__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.mobile-nav details { border-bottom: 1px solid var(--line); }
.mobile-nav summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 4px; font-weight: 800; font-size: var(--fs-md); cursor: pointer;
  list-style: none; color: var(--navy);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary::after { content: "+"; font-size: 1.4rem; color: var(--teal-600); font-weight: 600; }
.mobile-nav details[open] summary::after { content: "\2013"; }
.mobile-nav__sub { padding: 0 0 var(--sp-4) 4px; display: grid; gap: 2px; }
.mobile-nav__sub a { padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--navy-800); font-weight: 600; font-size: var(--fs-sm); }
.mobile-nav__sub a:hover { background: var(--light-blue); }
.mobile-nav__cta { margin-top: var(--sp-6); display: grid; gap: var(--sp-3); }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 160; display: none;
  background: rgba(16, 42, 67, 0.55); backdrop-filter: blur(4px);
  padding-top: 12vh;
}
.search-overlay[data-open="true"] { display: block; }
.search-overlay__panel {
  width: min(760px, 92vw); margin-inline: auto;
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.search-overlay__field { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); }
.search-overlay__field input { flex: 1; border: 0; outline: 0; font-size: var(--fs-lg); background: none; }
.search-overlay__results { max-height: 58vh; overflow-y: auto; }

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #b8cde0; padding-block: var(--sp-8) var(--sp-6); margin-top: var(--sp-8); }
.site-footer a { color: #cfe4f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-6); }
.footer-col h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.1em; color: #fff; margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col li { font-size: var(--fs-sm); }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { font-size: var(--fs-sm); color: #9db4c9; margin-top: var(--sp-4); max-width: 34ch; }
.footer-social { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); }
.footer-social a {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.12); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between;
  font-size: var(--fs-xs); color: #8fa8bf;
}
.footer-disclaimer {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin-top: var(--sp-7);
  font-size: var(--fs-sm); color: #b8cde0;
}
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__media { position: relative; aspect-ratio: 16 / 9; background: var(--light-blue); overflow: hidden; }
.card__media img, .card__media svg { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.card__title { font-size: var(--fs-lg); margin: 0; letter-spacing: -0.015em; }
.card__title a { color: var(--navy); text-decoration: none; }
.card__title a:hover { color: var(--blue-700); }
.card__excerpt { font-size: var(--fs-sm); color: var(--ink-muted); margin: 0; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-xs); color: var(--ink-muted); margin-top: auto; padding-top: var(--sp-2); }
.card__meta .dot::before { content: "\00b7"; margin-right: 10px; }
.card__foot { padding: 0 var(--sp-5) var(--sp-5); }

/* Topic / nav card with icon */
.topic-card {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5); border-radius: var(--r-md);
  background: var(--white); border: 1px solid var(--line);
  text-decoration: none; color: inherit; height: 100%;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue); color: inherit; }
.topic-card__icon {
  width: 54px; height: 54px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--light-blue); color: var(--blue-700); flex-shrink: 0;
}
.topic-card__icon svg { width: 28px; height: 28px; }
.topic-card__icon--teal { background: rgba(0, 167, 165, 0.12); color: var(--teal-600); }
.topic-card__icon--green { background: rgba(46, 173, 102, 0.13); color: var(--green-600); }
.topic-card__icon--gold { background: rgba(244, 185, 66, 0.18); color: #8a6300; }
.topic-card__icon--navy { background: rgba(16, 42, 67, 0.08); color: var(--navy); }
.topic-card__icon--red { background: var(--red-50); color: var(--red); }
.topic-card h3 { font-size: var(--fs-md); margin: 0; }
.topic-card p { font-size: var(--fs-sm); color: var(--ink-muted); margin: 0; flex: 1; }
.topic-card__more { font-size: var(--fs-sm); font-weight: 700; color: var(--blue-600); display: inline-flex; align-items: center; gap: 6px; }
.topic-card:hover .topic-card__more::after { transform: translateX(3px); }
.topic-card__more::after { content: "\2192"; transition: transform 0.16s var(--ease); }

/* Compact list link card */
.list-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
  background: var(--white); border: 1px solid var(--line);
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: var(--fs-sm);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.list-card:hover { border-color: var(--blue); background: var(--light-blue); color: var(--blue-700); }
.list-card__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

/* Featured horizontal card */
.feature-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.feature-card__media { aspect-ratio: 16 / 10; background: var(--light-blue); }
.feature-card__media img, .feature-card__media svg { width: 100%; height: 100%; object-fit: cover; }
.feature-card__body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); justify-content: center; }
.feature-card__body h3 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); margin: 0; }
.feature-card__body h3 a { color: var(--navy); text-decoration: none; }
.feature-card__body h3 a:hover { color: var(--blue-700); }
@media (max-width: 860px) { .feature-card { grid-template-columns: 1fr; } }

/* Stat tiles */
.stat-tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); }
.stat-tile__value { font-size: var(--fs-2xl); font-weight: 900; color: var(--navy); line-height: 1; letter-spacing: -0.03em; }
.stat-tile__label { font-size: var(--fs-sm); color: var(--ink-muted); margin-top: var(--sp-2); }

/* --------------------------------------------------------------------------
   9. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #0d2540 0%, #143a63 46%, #0f4f6e 100%);
  color: #fff;
  padding-block: var(--sp-9) var(--sp-8);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(760px 420px at 78% 18%, rgba(0, 167, 165, 0.34), transparent 62%),
    radial-gradient(620px 380px at 12% 88%, rgba(22, 119, 255, 0.32), transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); gap: var(--sp-7); align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.5rem + 3.4vw, var(--fs-4xl)); letter-spacing: -0.035em; margin-bottom: var(--sp-4); }
.hero__lede { font-size: var(--fs-md); color: #c9dcee; max-width: 56ch; margin-bottom: var(--sp-6); }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.24);
  color: #d8ecff; border-radius: var(--r-pill); padding: 6px 14px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: var(--sp-5);
}
.hero__art { position: relative; }
.hero__trust { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid rgba(255, 255, 255, 0.16); }
.hero__trust-item { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: #c9dcee; }
.hero__trust-item svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
@media (max-width: 940px) { .hero__inner { grid-template-columns: 1fr; } .hero__art { order: -1; max-width: 520px; } }

/* Universal search */
.usearch { position: relative; max-width: 620px; }
.usearch__field {
  display: flex; align-items: center; gap: var(--sp-3);
  background: #fff; border-radius: var(--r-pill); padding: 7px 7px 7px var(--sp-5);
  box-shadow: 0 14px 40px rgba(6, 24, 44, 0.32);
}
.usearch__field svg { width: 20px; height: 20px; color: var(--slate); flex-shrink: 0; }
.usearch__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: var(--fs-base); color: var(--navy); padding-block: 12px; }
.usearch__field input::placeholder { color: var(--slate); }
.usearch__hint { margin-top: var(--sp-3); font-size: var(--fs-sm); color: #a9c4dc; }
.usearch__hint a { color: #d8ecff; }
.usearch--light .usearch__field { border: 1px solid var(--line); box-shadow: var(--shadow-md); }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 60;
  background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-xl);
  border: 1px solid var(--line); overflow: hidden; display: none;
  max-height: 60vh; overflow-y: auto;
}
.suggest[data-open="true"] { display: block; }
.suggest__group-label { padding: 10px var(--sp-4) 4px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--slate); }
.suggest__item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 11px var(--sp-4); text-decoration: none; color: var(--navy);
  border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
}
.suggest__item:hover, .suggest__item[aria-selected="true"] { background: var(--light-blue); }
.suggest__item strong { font-weight: 700; font-size: var(--fs-sm); display: block; }
.suggest__item span { font-size: var(--fs-xs); color: var(--slate); }
.suggest__kind {
  flex-shrink: 0; font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--slate-100); color: var(--slate);
}
.suggest__empty { padding: var(--sp-5); color: var(--slate); font-size: var(--fs-sm); text-align: center; }

/* --------------------------------------------------------------------------
   10. SECTION PATTERNS
   -------------------------------------------------------------------------- */
.page-head { background: linear-gradient(165deg, var(--light-blue), var(--warm-white)); padding-block: var(--sp-7) var(--sp-7); border-bottom: 1px solid var(--line); }
.page-head--navy { background: linear-gradient(155deg, #0d2540, #14476b); color: #cfe1f2; border-bottom: 0; }
.page-head--navy h1 { color: #fff; }
.page-head--navy .lede { color: #b8cde0; }
.page-head__inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-7); align-items: center; }
.page-head__inner--simple { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 880px) { .page-head__inner { grid-template-columns: 1fr; } .page-head__art { display: none; } }

.breadcrumbs { font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: var(--sp-4); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li::after { content: "/"; margin-left: 6px; color: var(--line-strong); }
.breadcrumbs li:last-child::after { display: none; }
.breadcrumbs a { color: inherit; text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--blue-600); text-decoration: underline; }
.page-head--navy .breadcrumbs, .page-head--navy .breadcrumbs a { color: #a9c4dc; }

/* Disclaimers + callouts */
.callout {
  border-radius: var(--r-md); padding: var(--sp-5);
  border: 1px solid var(--line); background: var(--white);
  display: flex; gap: var(--sp-4); align-items: flex-start;
}
.callout svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.callout h4, .callout__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-base);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  color: var(--navy);
}
.callout p { margin: 0; font-size: var(--fs-sm); }
.callout p + p { margin-top: var(--sp-2); }
.callout--info { background: var(--light-blue); border-color: #c5e0fb; color: var(--navy-800); }
.callout--info svg { color: var(--blue-600); }
.callout--teal { background: rgba(0, 167, 165, 0.08); border-color: rgba(0, 167, 165, 0.28); }
.callout--teal svg { color: var(--teal-600); }
.callout--green { background: rgba(46, 173, 102, 0.08); border-color: rgba(46, 173, 102, 0.28); }
.callout--green svg { color: var(--green-600); }
.callout--gold { background: rgba(244, 185, 66, 0.12); border-color: rgba(244, 185, 66, 0.45); }
.callout--gold svg { color: var(--gold-600); }
.callout--emergency { background: var(--red-50); border: 2px solid var(--red); }
.callout--emergency h4 { color: var(--red); }
.callout--emergency svg { color: var(--red); }
.callout--emergency p { color: #7d1d1d; }

.disclaimer {
  border-left: 4px solid var(--teal); background: var(--slate-100);
  padding: var(--sp-4) var(--sp-5); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm); color: var(--navy-800);
}
.disclaimer strong { display: block; margin-bottom: 4px; }

/* Direct answer / GEO blocks */
.direct-answer {
  background: linear-gradient(160deg, var(--light-blue), #dcecff);
  border: 1px solid #bcdcfb; border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6); margin-bottom: var(--sp-6);
}
.direct-answer h2, .direct-answer h3 { font-size: var(--fs-base); text-transform: uppercase; letter-spacing: 0.09em; color: var(--blue-700); margin-bottom: var(--sp-3); }
.direct-answer p { font-size: var(--fs-md); color: var(--navy); line-height: 1.6; margin: 0; }

.takeaways { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--r-sm); padding: var(--sp-5) var(--sp-6); margin-bottom: var(--sp-6); }
.takeaways h2, .takeaways h3 { font-size: var(--fs-md); margin-bottom: var(--sp-3); }
.takeaways ul { margin: 0; padding-left: 1.15em; display: grid; gap: 8px; }
.takeaways li { font-size: var(--fs-sm); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) 0; cursor: pointer; font-weight: 700; font-size: var(--fs-md);
  color: var(--navy); list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; color: var(--teal-600); font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item__body { padding: 0 0 var(--sp-5); color: var(--navy-800); font-size: var(--fs-base); max-width: 72ch; }

.sources-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.sources-list li { font-size: var(--fs-sm); color: var(--ink-muted); padding-left: 1.4em; position: relative; }
.sources-list li::before { content: "\2197"; position: absolute; left: 0; color: var(--teal-600); }

/* Newsletter */
.newsletter {
  background: linear-gradient(150deg, var(--navy) 0%, #144a6d 62%, #0b6b6a 100%);
  border-radius: var(--r-xl); padding: var(--sp-8); color: #fff; position: relative; overflow: hidden;
}
.newsletter::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(0, 167, 165, 0.35), transparent 68%);
  pointer-events: none;
}
.newsletter__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-7); align-items: center; }
.newsletter h2 { color: #fff; }
.newsletter p { color: #c5dcef; }
.newsletter__form { display: grid; gap: var(--sp-3); }
.newsletter__row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.newsletter__row input {
  flex: 1; min-width: 220px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12); color: #fff; padding: 14px var(--sp-5); font-size: var(--fs-base);
}
.newsletter__row input::placeholder { color: #a9c4dc; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { position: relative; }
.topic-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.topic-chip span {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.3); font-size: var(--fs-sm); font-weight: 600;
  color: #cfe4f7; cursor: pointer; transition: background-color 0.16s var(--ease);
}
.topic-chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; }
.topic-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 880px) { .newsletter { padding: var(--sp-6); } .newsletter__inner { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   11. ARTICLE / LONG-FORM
   -------------------------------------------------------------------------- */
.article-body { max-width: 72ch; font-size: var(--fs-md); line-height: 1.75; }
.article-body > * + * { margin-top: var(--sp-5); }
.article-body h2 { margin-top: var(--sp-7); font-size: var(--fs-xl); scroll-margin-top: calc(var(--header-h) + 20px); }
.article-body h3 { margin-top: var(--sp-6); font-size: var(--fs-lg); }
.article-body ul, .article-body ol { padding-left: 1.3em; display: grid; gap: 10px; }
.article-body li { line-height: 1.65; }
.article-body img { border-radius: var(--r-md); }
.article-body figure { margin: var(--sp-6) 0; }
.article-body figcaption { font-size: var(--fs-sm); color: var(--ink-muted); margin-top: var(--sp-2); }
.article-body table { font-size: var(--fs-sm); margin: var(--sp-5) 0; }
.article-body th, .article-body td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: var(--slate-100); font-weight: 800; color: var(--navy); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); font-size: var(--fs-sm); color: var(--ink-muted); }
.author-chip { display: flex; align-items: center; gap: var(--sp-3); }
.author-chip__avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--light-blue); flex-shrink: 0; }
.author-chip__name { font-weight: 700; color: var(--navy); font-size: var(--fs-sm); }
.author-chip__role { font-size: var(--fs-xs); color: var(--ink-muted); }
.review-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 800;
  background: rgba(46, 173, 102, 0.13); color: var(--green-600);
}
.review-badge svg { width: 14px; height: 14px; }
.review-badge--edit { background: var(--light-blue); color: var(--blue-700); }
.review-badge--fact { background: rgba(0, 167, 165, 0.12); color: var(--teal-600); }

.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); }
.toc h2 { font-size: var(--fs-base); text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); margin-bottom: var(--sp-3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; font-size: var(--fs-sm); text-decoration: none; color: var(--navy-800); padding: 5px 0; font-weight: 600; }
.toc a::before { content: counter(toc); color: var(--teal-600); font-weight: 800; min-width: 1.3em; }
.toc a:hover { color: var(--blue-700); }

.sidebar { display: grid; gap: var(--sp-5); position: sticky; top: calc(var(--header-h) + 20px); }
.widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); }
.widget h3 { font-size: var(--fs-base); margin-bottom: var(--sp-4); }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.widget li { font-size: var(--fs-sm); line-height: 1.45; }
.widget a { text-decoration: none; color: var(--navy-800); font-weight: 600; }
.widget a:hover { color: var(--blue-700); }
.widget--game { background: linear-gradient(160deg, #123553, #0d5f6b); color: #fff; border: 0; }
.widget--game h3 { color: #fff; }
.widget--game p { color: #bcd7ea; font-size: var(--fs-sm); }

.share-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.share-row .icon-btn { width: 40px; height: 40px; }

.pull-quote {
  border: 0; border-left: 5px solid var(--gold);
  background: linear-gradient(100deg, rgba(244, 185, 66, 0.1), transparent);
  padding: var(--sp-5) var(--sp-6); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-lg); font-weight: 600; color: var(--navy); line-height: 1.45;
}

/* --------------------------------------------------------------------------
   12. TOOLS
   -------------------------------------------------------------------------- */
.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-6); align-items: start; }
@media (max-width: 1000px) { .tool-shell { grid-template-columns: 1fr; } }

.tool-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-sm); }
.tool-panel + .tool-panel { margin-top: var(--sp-5); }
.tool-panel h2 { font-size: var(--fs-lg); }
.tool-panel h3 { font-size: var(--fs-md); }

.field { display: grid; gap: 6px; margin-bottom: var(--sp-4); }
.field label { font-weight: 700; font-size: var(--fs-sm); color: var(--navy); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-muted); }
.field input[type="text"], .field input[type="number"], .field input[type="date"],
.field input[type="time"], .field input[type="email"], .field select, .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--white); font-size: var(--fs-base); color: var(--navy);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(22, 119, 255, 0.22); outline-offset: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.field--inline { display: flex; align-items: center; gap: var(--sp-3); }

.seg { display: inline-flex; background: var(--slate-100); border-radius: var(--r-pill); padding: 4px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 9px 18px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700; color: var(--slate); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }

.result-card {
  background: linear-gradient(155deg, var(--light-blue), #dceeff);
  border: 1px solid #bcdcfb; border-radius: var(--r-md); padding: var(--sp-6); text-align: center;
}
.result-card__value { font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.4rem); font-weight: 900; color: var(--navy); line-height: 1; letter-spacing: -0.04em; }
.result-card__unit { font-size: var(--fs-md); font-weight: 700; color: var(--slate); }
.result-card__label { font-size: var(--fs-sm); color: var(--navy-800); margin-top: var(--sp-3); }
.result-card__band { display: inline-flex; margin-top: var(--sp-4); }

.meter { height: 12px; border-radius: var(--r-pill); background: var(--slate-200); overflow: hidden; position: relative; }
.meter__fill { height: 100%; border-radius: var(--r-pill); background: var(--teal); transition: width 0.4s var(--ease); }
.meter--scale { background: linear-gradient(90deg, #3f8ee0 0%, #2ead66 26%, #f4b942 62%, #e07b39 82%, #c62828 100%); }
.meter__pin { position: absolute; top: -5px; width: 4px; height: 22px; background: var(--navy); border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 0 2px #fff; transition: left 0.4s var(--ease); }
.meter-labels { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-muted); margin-top: 6px; }

.data-table { width: 100%; font-size: var(--fs-sm); }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { background: var(--slate-100); font-weight: 800; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); }
.data-table tbody tr:hover { background: var(--warm-white); }
.data-table td .icon-btn { width: 34px; height: 34px; }

.chart-wrap { position: relative; width: 100%; overflow-x: auto; }
.chart-wrap svg { width: 100%; height: auto; min-width: 320px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-muted); margin-top: var(--sp-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.empty-state { text-align: center; padding: var(--sp-7) var(--sp-5); color: var(--ink-muted); }
.empty-state svg { width: 64px; height: 64px; margin: 0 auto var(--sp-4); color: var(--slate-300); }

.tool-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); }

.tool-card {
  display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: inherit; height: 100%;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal); color: inherit; }
.tool-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }

/* --------------------------------------------------------------------------
   13. GAME + ARCADE
   -------------------------------------------------------------------------- */
.game-hero {
  background: linear-gradient(150deg, #0b2b4a 0%, #123f6b 40%, #0a5f68 100%);
  color: #fff; border-radius: var(--r-xl); padding: var(--sp-8); position: relative; overflow: hidden;
}
.game-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 80% 10%, rgba(244, 185, 66, 0.28), transparent 60%);
}
.game-hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--sp-6); align-items: center; }
.game-hero h1, .game-hero h2 { color: #fff; }
.game-hero p { color: #c5dcef; }
@media (max-width: 860px) { .game-hero { padding: var(--sp-6); } .game-hero__inner { grid-template-columns: 1fr; } }

.hud { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-3); }
.hud__tile { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--r-md); padding: var(--sp-4); text-align: center; }
.hud__value { font-size: var(--fs-xl); font-weight: 900; color: #fff; line-height: 1; }
.hud__label { font-size: var(--fs-xs); color: #b8cde0; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }
.xp-bar { height: 10px; background: rgba(255, 255, 255, 0.18); border-radius: var(--r-pill); overflow: hidden; margin-top: var(--sp-4); }
.xp-bar__fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width 0.5s var(--ease); }

.zone-card {
  border-radius: var(--r-lg); padding: var(--sp-5); color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--sp-3); min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.zone-card h3 { color: #fff; margin: 0; font-size: var(--fs-lg); }
.zone-card p { color: rgba(255, 255, 255, 0.86); font-size: var(--fs-sm); margin: 0; }
.zone-card--nutrition { background: linear-gradient(155deg, #1f7a4d, #2ead66); }
.zone-card--fitness { background: linear-gradient(155deg, #0c4f8a, #1677ff); }
.zone-card--mind { background: linear-gradient(155deg, #6b4a9e, #9166c9); }
.zone-card--sleep { background: linear-gradient(155deg, #16324f, #2b5f8f); }
.zone-card--prevention { background: linear-gradient(155deg, #0b6b6a, #00a7a5); }
.zone-card__stat { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255, 255, 255, 0.85); }

.mission {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--white);
}
.mission[data-done="true"] { background: rgba(46, 173, 102, 0.07); border-color: rgba(46, 173, 102, 0.35); }
.mission__check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong);
  background: none; cursor: pointer; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; color: transparent; margin-top: 2px;
}
.mission[data-done="true"] .mission__check { background: var(--green); border-color: var(--green); color: #fff; }
.mission__check svg { width: 16px; height: 16px; }
.mission__body { flex: 1; min-width: 0; }
.mission__title { font-weight: 700; font-size: var(--fs-base); color: var(--navy); margin: 0 0 3px; }
.mission[data-done="true"] .mission__title { text-decoration: line-through; color: var(--slate); }
.mission__why { font-size: var(--fs-sm); color: var(--ink-muted); margin: 0; }
.mission__pts { font-size: var(--fs-xs); font-weight: 800; color: var(--gold-600); white-space: nowrap; }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-4); }
.badge-item { text-align: center; padding: var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--white); }
.badge-item[data-earned="false"] { opacity: 0.45; filter: grayscale(1); }
.badge-item svg { width: 62px; height: 62px; margin: 0 auto var(--sp-3); }
.badge-item strong { display: block; font-size: var(--fs-sm); color: var(--navy); }
.badge-item span { font-size: var(--fs-xs); color: var(--ink-muted); }

.quiz-shell { max-width: 720px; margin-inline: auto; }
.quiz-question { font-size: var(--fs-lg); font-weight: 800; color: var(--navy); margin-bottom: var(--sp-5); line-height: 1.35; }
.quiz-option {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left;
  padding: var(--sp-4) var(--sp-5); border: 2px solid var(--line); border-radius: var(--r-md);
  background: var(--white); font-size: var(--fs-base); font-weight: 600; color: var(--navy);
  cursor: pointer; margin-bottom: var(--sp-3);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.quiz-option:hover:not([disabled]) { border-color: var(--blue); background: var(--light-blue); }
.quiz-option[data-state="correct"] { border-color: var(--green); background: rgba(46, 173, 102, 0.1); }
.quiz-option[data-state="wrong"] { border-color: var(--red); background: var(--red-50); }
.quiz-option__key {
  width: 30px; height: 30px; border-radius: 50%; background: var(--slate-100);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: var(--fs-sm); color: var(--slate); flex-shrink: 0;
}
.quiz-explain { background: var(--light-blue); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); color: var(--navy-800); margin-bottom: var(--sp-4); }
.quiz-progress { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: var(--sp-4); }

.streak-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.streak-dot { width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--slate-200); display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; color: var(--slate); }
.streak-dot[data-on="true"] { background: var(--green); color: #fff; }

.floating-play {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 861px) { .floating-play { display: none; } }

/* --------------------------------------------------------------------------
   14. FORMS + MISC
   -------------------------------------------------------------------------- */
.checkbox-row { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-sm); }
.checkbox-row input[type="checkbox"], .checkbox-row input[type="radio"] { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--blue); flex-shrink: 0; }

.notice { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; }
.notice--ok { background: rgba(46, 173, 102, 0.12); color: var(--green-600); }
.notice--warn { background: rgba(244, 185, 66, 0.18); color: #8a6300; }
.notice--err { background: var(--red-50); color: var(--red); }

.chip-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle label { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-toggle span {
  display: inline-flex; padding: 9px 15px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; color: var(--navy-800); background: var(--white);
}
.chip-toggle input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.accordion { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--white); }
.accordion details + details { border-top: 1px solid var(--line); }
.accordion summary { padding: var(--sp-4) var(--sp-5); font-weight: 700; cursor: pointer; }
.accordion .acc-body { padding: 0 var(--sp-5) var(--sp-5); font-size: var(--fs-sm); color: var(--navy-800); }

.pagination { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; margin-top: var(--sp-7); }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding-inline: 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--white); text-decoration: none; font-weight: 700; color: var(--navy); font-size: var(--fs-sm);
}
.pagination a:hover { border-color: var(--blue); background: var(--light-blue); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.alpha-nav button, .alpha-nav a {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white);
  font-weight: 800; font-size: var(--fs-sm); color: var(--navy); cursor: pointer; text-decoration: none;
}
.alpha-nav button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.alpha-nav button:hover { border-color: var(--blue); }

.skeleton { background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 37%, var(--slate-100) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-card { height: 320px; }

/* --------------------------------------------------------------------------
   15. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.stack { display: grid; gap: var(--sp-4); }
.stack-lg { display: grid; gap: var(--sp-6); }
.flow > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.center-x { margin-inline: auto; }
.mt-0 { margin-top: 0; } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); } .mt-7 { margin-top: var(--sp-7); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--sp-4); } .mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.maxw-prose { max-width: 72ch; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
@media (max-width: 700px) { .hide-sm { display: none !important; } }
@media print {
  .site-header, .site-footer, .utility-bar, .floating-play, .tool-actions, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .tool-panel, .card { box-shadow: none; border-color: #999; break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
