/* ============================================================
   planwithhockbeng.com — Design System v2
   Palette: True Black · Premium Gold · Inter body
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Backgrounds */
  --bg-black:     #090909;
  --bg-dark1:     #111111;
  --bg-dark2:     #181818;
  --bg-dark3:     #222222;
  --bg-dark4:     #2c2c2c;

  /* Gold */
  --gold:         #C9A56E;
  --gold-light:   #DFC08A;
  --gold-dark:    #9E7A45;
  --gold-dim:     rgba(201,165,110,0.15);
  --gold-border:  rgba(201,165,110,0.30);

  /* Text */
  --text-primary:   #F0EDE8;
  --text-secondary: #A89880;
  --text-muted:     #6B6055;
  --white:          #FFFFFF;

  /* Aliases (keep backward compat) */
  --bg-primary:    var(--bg-black);
  --bg-secondary:  var(--bg-dark1);
  --bg-card:       var(--bg-dark2);
  --bg-card-hover: var(--bg-dark3);
  --cream:         var(--text-primary);
  --gold-bright:   var(--gold-light);
  --gold-dim-text: var(--gold-dark);
  --teal:          #2a7a6e;
  --teal-light:    #3a9e8f;
  --border:        var(--gold-border);
  --border-strong: rgba(201,165,110,0.50);
  --text-body:     var(--text-secondary);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Design tokens */
  --radius:      4px;
  --radius-lg:   10px;
  --transition:  0.35s ease;
  --section-pad: 90px 0;
  --ls-std:      0.01em;
  --ls-upper:    0.18em;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.78;
  background: var(--bg-black);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: var(--ls-std);
}
h1 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 400; }
h4 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-body); }

p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.82; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.section-subtitle {
  font-size: 0.97rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.82;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
section { padding: var(--section-pad); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header .section-subtitle { margin: 0 auto; }

.divider {
  width: 48px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 20px auto 0;
}
.divider-left { margin: 20px 0 0; }

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 64px;
  padding: 0 28px;
  background: rgba(9,9,9,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
  display: flex; align-items: center;
}
.nav-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 500;
  color: var(--gold); letter-spacing: 0.02em;
}
.nav-brand span { color: var(--text-primary); }
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 14px; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); background: var(--gold-dim); }
.nav-cta {
  color: var(--bg-black) !important;
  background: var(--gold) !important;
  padding: 9px 18px !important;
  border-radius: var(--radius) !important;
  margin-left: 6px; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-light) !important; color: var(--bg-black) !important; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--gold); border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: 64px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 40%, rgba(201,165,110,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 45% 45% at 15% 75%, rgba(42,122,110,0.04) 0%, transparent 55%),
    linear-gradient(180deg, rgba(15,15,15,0.8) 0%, rgba(15,15,15,0.88) 50%, rgba(15,15,15,0.92) 100%),
    url(../../02HBteach.jpeg);
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,165,110,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,165,110,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 780px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  border-radius: 100px; padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 28px;
}
.hero-badge::before {
  content: ''; width: 5px; height: 5px;
  background: var(--gold); border-radius: 50%;
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.5); }
}
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-lead {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 540px; margin-bottom: 44px; line-height: 1.85;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 13px 26px; border-radius: var(--radius);
  border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--gold); color: var(--bg-black); }
.btn-primary:hover {
  background: var(--gold-light); color: var(--bg-black);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201,165,110,0.25);
}
.btn-secondary {
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold-border);
}
.btn-secondary:hover {
  background: var(--gold-dim); border-color: var(--gold);
  transform: translateY(-2px);
}
.btn-whatsapp {
  background: linear-gradient(180deg, #2ecc71 0%, #25D366 50%, #1db954 100%);
  color: #fff;
  box-shadow:
    0 8px 16px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  position: relative;
}
.btn-whatsapp:hover {
  background: linear-gradient(180deg, #35d77f 0%, #2ecc71 50%, #25D366 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow:
    0 12px 24px rgba(37,211,102,0.35),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.2);
}
.btn-lg { padding: 16px 34px; font-size: 0.78rem; }

/* ── Cards ── */
.card {
  background: var(--bg-dark2);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 30px; transition: all var(--transition);
}
.card:hover {
  background: var(--bg-dark3);
  border-color: rgba(201,165,110,0.5);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}
.card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg); font-size: 1.3rem; margin-bottom: 18px;
}
.card-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px; margin-bottom: 10px;
}
.tag-danger  { background: rgba(220,53,69,0.12);  color: #f87171; border: 1px solid rgba(220,53,69,0.22); }
.tag-warning { background: rgba(255,193,7,0.10);  color: #fbbf24; border: 1px solid rgba(255,193,7,0.20); }
.tag-gold    { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-border); }
.tag-teal    { background: rgba(42,122,110,0.12); color: var(--teal-light); border: 1px solid rgba(42,122,110,0.22); }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ── Stats ── */
.stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 400; color: var(--gold);
  line-height: 1; display: block;
}
.stat-label {
  font-size: 0.72rem; color: var(--text-muted);
  letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px;
  line-height: 1.5;
}

/* ── Calculator / Forms ── */
.calculator {
  background: var(--bg-dark2);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg); padding: 44px;
}
.calculator-desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 7px;
}
.form-input, .form-select {
  width: 100%; background: var(--bg-dark1);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius); padding: 12px 14px;
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--text-primary); transition: all var(--transition);
  outline: none; appearance: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,165,110,0.10);
  background: var(--bg-dark2);
}
.form-input::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.result-panel {
  background: linear-gradient(135deg, var(--bg-dark3), var(--bg-dark2));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg); padding: 30px; margin-top: 26px;
}
.result-panel h3 {
  font-family: var(--font-display); font-size: 1.3rem;
  color: var(--gold-light); margin-bottom: 20px; font-weight: 400;
}
.result-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--gold-border); font-size: 0.88rem;
}
.result-line:last-child { border-bottom: none; }
.result-line .label { color: var(--text-muted); }
.result-line .value { color: var(--text-primary); font-weight: 600; }
.result-line .value.highlight { color: var(--gold); font-size: 1.1rem; }
.result-line .value.danger    { color: #f87171; }

/* ── Tabs ── */
.tab-nav {
  display: flex; gap: 3px;
  background: var(--bg-dark1);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg); padding: 4px; margin-bottom: 28px; flex-wrap: wrap;
}
.tab-btn {
  flex: 1; min-width: 110px;
  font-family: var(--font-body); font-size: 0.73rem; font-weight: 600;
  letter-spacing: 0.06em; padding: 10px 16px; border-radius: var(--radius);
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
}
.tab-btn.active, .tab-btn:hover { background: var(--bg-dark2); color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Progress bars ── */
.progress-item { margin-bottom: 16px; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; margin-bottom: 7px; color: var(--text-secondary);
}
.progress-bar-bg { height: 5px; background: var(--bg-dark3); border-radius: 3px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 1.3s cubic-bezier(0.4,0,0.2,1);
}
.progress-bar-fill.danger { background: linear-gradient(90deg, #ef4444, #f97316); }
.progress-bar-fill.teal   { background: linear-gradient(90deg, var(--teal), var(--teal-light)); }

/* ── News cards ── */
.news-card {
  background: var(--bg-dark2); border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg); padding: 22px 26px;
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 8px;
}
.news-card:hover { border-color: rgba(201,165,110,0.5); transform: translateY(-2px); }
.news-source { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.news-card h4 { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--text-primary); line-height: 1.55; }
.news-card p  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.75; }
.news-date    { font-size: 0.7rem; color: var(--text-muted); }

/* ── CTA Section ── */
.cta-section {
  background: var(--bg-dark1);
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
  text-align: center; padding: 80px 0;
}
.cta-section h2 { margin-bottom: 16px; }
.cta-section p  { color: var(--text-muted); font-size: 0.97rem; max-width: 500px; margin: 0 auto 36px; }
.cta-buttons    { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ── */
.footer { background: var(--bg-black); border-top: 1px solid var(--gold-border); padding: 44px 0 28px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; color: var(--gold); font-weight: 400; }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); max-width: 660px; line-height: 1.8; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.06em; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.7rem; color: var(--bg-dark4); padding-top: 12px; border-top: 1px solid var(--gold-border); width: 100%; }

/* ── Utilities ── */
.text-gold   { color: var(--gold); }
.text-cream  { color: var(--text-primary); }
.text-muted  { color: var(--text-muted); }
.text-danger { color: #f87171; }
.text-teal   { color: var(--teal-light); }
.text-center { text-align: center; }
.hidden      { display: none; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ── Scroll animations ── */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE DESIGN
   Breakpoints:
     • ≤375px   — small phones (iPhone SE, mini)
     • 376–430  — standard phones
     • 431–767  — large phones, phablets
     • 768–1023 — tablets, iPad portrait
     • 1024–1199 — iPad Pro landscape, small laptops
     • ≥1200    — desktop
   ============================================================ */

/* === iOS / touch device: disable fixed background (causes jank) === */
@media (hover: none) and (pointer: coarse) {
  .hero-bg,
  .hero,
  [class*="hero-bg"],
  [style*="background-attachment: fixed"] {
    background-attachment: scroll !important;
  }
}

/* === Touch-friendly tap targets (any touch device) === */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .nav-cta,
  .tab-btn,
  details summary { min-height: 44px; }
  .form-input,
  .form-select {
    min-height: 44px;
    font-size: 16px;       /* prevents iOS Safari zoom-on-focus */
  }
}

/* === Wide screens: 1200px+ (desktop) === */
/* Default styles handle this */

/* === Mid screens: 1024–1199 (iPad landscape, small laptops) === */
@media (max-width: 1199px) {
  .nav-links a { padding: 8px 10px; font-size: 0.68rem; letter-spacing: 0.10em; }
  .nav-cta { padding: 9px 14px !important; }
}

/* === Tablet: 768–1023 (iPad portrait, large tablets) ===
   Switch to hamburger at this size — 9 nav items + brand + CTA
   would otherwise overflow */
@media (max-width: 1023px) {
  :root { --section-pad: 75px 0; }
  .container { padding: 0 24px; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(9,9,9,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gold-border);
    padding: 12px 24px 20px; gap: 2px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a {
    display: block;
    padding: 14px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
  }
  .nav-links.open .nav-cta {
    margin: 8px 0 4px;
    text-align: center;
    background: var(--gold) !important;
    color: var(--bg-black) !important;
  }

  /* Grids collapse to 2 cols on tablet */
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Hero adjustments */
  .hero { min-height: 80vh; }
  .hero-lead { font-size: 1.05rem; }

  /* Stat row spacing */
  .stat-row { gap: 28px; }
  .stat-number { font-size: 2.6rem; }
}

/* === Mobile: ≤767 (phones, phablets) === */
@media (max-width: 767px) {
  :root { --section-pad: 56px 0; }
  html  { font-size: 16px; }

  .container { padding: 0 20px; }

  /* All grids collapse to single column */
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr !important; gap: 18px; }

  /* Inline grid:1fr 1fr also collapses */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Cards spanning full width still work */
  [style*="grid-column:1/-1"],
  [style*="grid-column: 1/-1"],
  [style*="grid-column:1 / -1"],
  [style*="grid-column: 1 / -1"] {
    grid-column: auto !important;
  }

  .form-row { grid-template-columns: 1fr; gap: 14px; }

  /* Typography scaling */
  h1 { font-size: clamp(2rem, 9vw, 2.8rem); line-height: 1.18; }
  h2 { font-size: clamp(1.55rem, 6vw, 2.1rem); }
  h3 { font-size: clamp(1.25rem, 4.5vw, 1.6rem); }
  h4 { font-size: 1.1rem; }
  p  { font-size: 1rem; line-height: 1.7; }
  .hero-lead { font-size: 1rem; line-height: 1.7; }
  .section-title { font-size: clamp(1.55rem, 6vw, 2.1rem); }
  .section-subtitle { font-size: 0.95rem; }

  /* Hero adjustments */
  .hero { min-height: auto; padding: 96px 0 64px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Buttons full width on mobile */
  .btn { font-size: 0.78rem; padding: 14px 22px; }
  .btn-lg { padding: 16px 24px; font-size: 0.82rem; }

  /* Calculator */
  .calculator { padding: 24px 18px; border-radius: 10px; }
  .calculator-desc { font-size: 0.88rem; }
  .result-panel { padding: 22px 18px; }
  .result-line { font-size: 0.86rem; flex-wrap: wrap; gap: 4px; }

  /* Stats */
  .stat-row { gap: 28px; justify-content: center !important; }
  .stat-number { font-size: 2.2rem; }
  .stat-item { flex: 1 1 140px; min-width: 140px; }

  /* Cards */
  .card { padding: 22px 18px; border-radius: 10px; }

  /* CTA section */
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .cta-buttons .btn { width: 100%; justify-content: center; }

  /* Tab navigation */
  .tab-nav { flex-direction: column; padding: 6px; gap: 4px; }
  .tab-btn { flex: 1 1 auto; min-width: 0; width: 100%; }

  /* Section header spacing */
  .section-header { margin-bottom: 36px; }

  /* Tables — horizontal scroll with subtle scroll hint */
  table {
    font-size: 0.82rem !important;
    min-width: 540px;
  }
  .card[style*="overflow-x:auto"],
  div[style*="overflow-x:auto"] {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  /* FAQ accordion items */
  details summary { font-size: 0.98rem !important; }
  details p { font-size: 0.92rem !important; }

  /* Footer */
  .footer-links { gap: 14px; font-size: 0.78rem; }
  .footer-disclaimer { font-size: 0.78rem; padding: 0 4px; }
}

/* === Small phones: ≤480px === */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 20px 16px; }
  .calculator { padding: 22px 16px; }
  .nav { padding: 0 16px; }
  .nav-brand { font-size: 1.1rem; }
  .hero { padding: 88px 0 56px; }
  .hero-badge { font-size: 0.62rem; padding: 5px 12px; }
  h1 { font-size: clamp(1.85rem, 9vw, 2.4rem); }
  .stat-row { gap: 20px; }
  .stat-item { flex: 1 1 130px; min-width: 130px; }
  .stat-number { font-size: 2rem; }
}

/* === Very small phones: ≤375px (iPhone SE, mini) === */
@media (max-width: 375px) {
  .container { padding: 0 14px; }
  .nav { padding: 0 14px; }
  .nav-brand { font-size: 1rem; }
  .card { padding: 18px 14px; }
  .calculator { padding: 20px 14px; }
  h1 { font-size: 1.75rem; }
  .hero-badge { font-size: 0.6rem; }
  .stat-number { font-size: 1.85rem; }
  .stat-item { min-width: 120px; }
}

/* === Landscape phones (short height) — give hero breathing room === */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 88px 0 48px; }
  .hero-content { max-width: 100%; }
}

/* === iPad Pro 12.9" portrait (1024×1366) — sits exactly at boundary === */
@media (min-width: 1024px) and (max-width: 1024px) {
  /* Use mid-screen rules; nav stays hamburger */
}

/* === Larger desktop: ≥1440 — give it room to breathe === */
@media (min-width: 1440px) {
  .container,
  .nav-inner,
  .footer-inner { max-width: 1280px; }
}

/* === Print styles === */
@media print {
  .nav, .hero-bg, .hero-grid, .nav-hamburger,
  .cta-section, .footer { display: none !important; }
  body { color: #000; background: #fff; }
  .card, .calculator { break-inside: avoid; }
}

/* ── ECharts Responsive Containers ── */
#ci-coverage-gap-chart,
#ci-claims-distribution-chart,
#treatment-cost-benchmark-chart,
#retirement-projection-chart,
#zakat-assets-chart,
#takaful-market-chart,
#faraid-distribution-chart,
#household-expenditure-chart,
#net-worth-chart,
#life-expectancy-chart,
#cpf-attainment-chart,
#payout-comparison-chart,
#ageing-population-chart,
.financial-gauge-chart {
  width: 100%;
  display: block;
}

@media (max-width: 767px) {
  #ci-coverage-gap-chart,
  #ci-claims-distribution-chart,
  #treatment-cost-benchmark-chart,
  #zakat-assets-chart,
  #takaful-market-chart,
  #faraid-distribution-chart,
  #household-expenditure-chart,
  #net-worth-chart,
  #life-expectancy-chart,
  #cpf-attainment-chart,
  #payout-comparison-chart,
  #ageing-population-chart { height: 280px !important; }
  #retirement-projection-chart    { height: 320px !important; }
  .financial-gauge-chart          { height: 200px !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #ci-coverage-gap-chart,
  #ci-claims-distribution-chart,
  #treatment-cost-benchmark-chart,
  #zakat-assets-chart,
  #takaful-market-chart,
  #faraid-distribution-chart,
  #household-expenditure-chart,
  #net-worth-chart,
  #life-expectancy-chart,
  #cpf-attainment-chart,
  #payout-comparison-chart,
  #ageing-population-chart { height: 340px; }
  #retirement-projection-chart    { height: 400px; }
  .financial-gauge-chart          { height: 220px !important; }
}

@media (min-width: 1024px) {
  #ci-coverage-gap-chart          { height: 400px; }
  #ci-claims-distribution-chart   { height: 380px; }
  #treatment-cost-benchmark-chart { height: 440px; }
  #retirement-projection-chart    { height: 460px; }
  .financial-gauge-chart          { height: 220px !important; }
}

/* === Reduced motion support === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up { opacity: 1; transform: none; }
}

