/* ==========================================================================
   MathsHaqs — bold, warm, poster-style. Mobile-first.
   Palette: navy / emerald / gold / cream — nothing else.
   ========================================================================== */

:root {
  --navy: #0B2A4A;
  --green: #1E9E5A;
  --green-bright: #3DD17F;   /* lighter emerald, for text on navy */
  --green-deep: #157A45;     /* darker emerald, for text on cream */
  --gold: #F2C230;
  --cream: #FAF6EC;
  --cream-card: #FFFDF7;

  --text-on-light: #0B2A4A;
  --muted-on-light: rgba(11, 42, 74, 0.8);
  --text-on-dark: #FAF6EC;
  --muted-on-dark: rgba(250, 246, 236, 0.85);

  --font-display: 'Baloo 2', 'Fredoka', system-ui, sans-serif;
  --font-logo: 'Bungee', 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --max-width: 1120px;
  --max-width-narrow: 720px;
  --nav-h: 64px;

  /* Rough yellow marker stroke, used behind highlighted phrases */
  --marker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath fill='%23F2C230' d='M3 9 C30 3 90 8 150 5 C175 3 193 6 198 8 L195 14 L199 20 L195 27 L198 34 C150 38 80 33 40 37 C20 38 8 35 2 33 L5 26 L1 19 L4 14 Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-on-light);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 8.6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 6.4vw, 2.9rem); }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.35em; }

p { margin: 0 0 1em; }

a { color: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* ---- Sections: alternate navy / cream ---- */
.section {
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.section-dark {
  background: var(--navy);
  color: var(--text-on-dark);
}
.section-dark p { color: var(--muted-on-dark); }

.section-light {
  background: var(--cream);
  color: var(--text-on-light);
}
.section-light p { color: var(--muted-on-light); }

.section-green {
  background: var(--green);
  color: #fff;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

/* ---- Highlighter swipe ---- */
.gold { color: var(--gold); }

.hl {
  color: var(--navy);
  background: var(--marker) no-repeat center / 100% 100%;
  padding: 0.04em 0.32em 0.1em;
  margin: 0 -0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  white-space: normal;
}

/* ---- Eyebrow / badge ---- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: #fff;
  background: var(--green);
  padding: 4px 16px 3px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow-gold {
  background: var(--gold);
  color: var(--navy);
}
/* beat the .section-light p / .section-dark p colour rules */
.section .eyebrow { color: #fff; }
.section .eyebrow-gold { color: var(--navy); }

.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--green);
  padding: 5px 18px 4px;
  border-radius: 999px;
  margin-bottom: 22px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  padding: 14px 30px 12px;
  font-size: 1.1rem;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.28);
}
.btn-gold:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
}
.btn:focus-visible,
.accordion-trigger:focus-visible,
.nav-toggle:focus-visible,
.nav a:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 3px;
}

.btn-lg {
  padding: 18px 34px 16px;
  font-size: 1.25rem;
  max-width: 100%;
}

/* ---- Sticky nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--text-on-dark);
  border-bottom: 3px solid var(--green);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}
.logo span { color: var(--green-bright); }

.nav-links { display: none; }

.btn-nav {
  padding: 9px 16px 7px;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.btn-nav:hover { box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3); }
.btn-nav:active { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--cream);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-links-mobile {
  display: none;
  flex-direction: column;
  padding: 6px 20px 16px;
  border-top: 1px solid rgba(250, 246, 236, 0.12);
}
.nav.nav-open .nav-links-mobile { display: flex; }
.nav-links-mobile a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(250, 246, 236, 0.1);
}
.nav-links-mobile a:last-child { border-bottom: 0; }

/* ---- Hero ---- */
.hero {
  padding: 56px 0 72px;
  text-align: center;
}

.hero-doodles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Wide doodles on larger screens, portrait set on phones */
.hero-doodles:not(.hero-doodles-m) { display: none; }
@media (min-width: 700px) {
  .hero-doodles:not(.hero-doodles-m) { display: block; }
  .hero-doodles-m { display: none; }
}

.hero-inner {
  max-width: 820px;
  z-index: 1;
}

.hero h1 { line-height: 1.2; margin-bottom: 0.45em; }

.hero-sub {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.micro-reassurance {
  margin: 22px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.9;
}

/* ---- Founder ---- */
.founder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  justify-items: center;
  text-align: center;
  max-width: 780px;
}

.founder-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: 5px solid var(--gold);
  font-family: var(--font-logo);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 6px 0 rgba(11, 42, 74, 0.15);
}
.avatar-num { font-size: 2.1rem; }
.avatar-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; color: var(--gold); }

.founder-copy h2 { font-size: clamp(1.7rem, 5.6vw, 2.4rem); }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.stat-chip {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--navy);
  background: var(--cream-card);
  border: 2px solid var(--navy);
  padding: 6px 16px 5px;
  border-radius: 999px;
}

/* ---- Icon badges: white line icon in solid green circle ---- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}
.icon-badge svg { width: 30px; height: 30px; }

/* ---- How it works ---- */
.icon-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 44px;
  text-align: center;
}
.icon-feature p { margin: 0 auto; max-width: 300px; }

.callout {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  background: var(--gold);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
  transform: rotate(-0.6deg);
}
.section-dark .callout p,
.callout p {
  color: var(--navy);
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.55;
}
.callout strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
}

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.card {
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  text-align: center;
}
.card h3 { margin-top: 0; }
.card p { margin: 0; font-size: 1.02rem; }

.section-light .card {
  background: var(--cream-card);
  border: 2px solid var(--navy);
  box-shadow: 0 6px 0 rgba(11, 42, 74, 0.18);
}
.section-dark .card {
  background: rgba(250, 246, 236, 0.06);
  border: 2px solid rgba(250, 246, 236, 0.22);
}

/* ---- Pricing: one price banner, three level cards, one shared list ---- */
.price-banner {
  text-align: center;
  margin: -12px 0 36px;
}
.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--navy);
  border: 4px solid var(--green);
  border-radius: 28px;
  padding: 10px 28px 12px;
  box-shadow: 0 6px 0 rgba(11, 42, 74, 0.25);
  margin-bottom: 14px;
}
.price-amount {
  font-family: var(--font-logo);
  font-size: 3.6rem;
  line-height: 1;
  color: var(--gold);
}
.price-period {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--cream);
}
.pricing-intro {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.7;
  margin: 0;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 480px;
  margin: 0 auto;
}

.plan-card {
  background: var(--cream-card);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 30px 24px 28px;
  text-align: center;
  box-shadow: 0 6px 0 rgba(11, 42, 74, 0.18);
  display: flex;
  flex-direction: column;
}
.plan-level {
  font-family: var(--font-logo);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--navy) !important;
  margin: 0 0 10px;
}
.plan-years {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy) !important;
  background: var(--gold);
  padding: 3px 14px 2px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.plan-desc { flex: 1; margin-bottom: 22px; }
.plan-card .btn { align-self: stretch; padding-left: 20px; padding-right: 20px; }

.included {
  max-width: 900px;
  margin: 36px auto 0;
  background: var(--navy);
  color: var(--text-on-dark);
  border: 4px solid var(--green);
  border-radius: 28px;
  padding: 28px 24px 12px;
  box-shadow: 0 8px 0 rgba(11, 42, 74, 0.25);
}
.included .included-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--gold);
  text-align: center;
  margin: 0 0 18px;
}
.included .check-list { max-width: none; margin: 0; }

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 32px;
  text-align: left;
  max-width: 460px;
}
.check-list li {
  position: relative;
  padding-left: 42px;
  margin-bottom: 16px;
  line-height: 1.5;
  color: var(--muted-on-dark);
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
}
.check-list li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  border-radius: 1px;
  transform: rotate(-45deg);
}

/* ---- FAQ accordion ---- */
.accordion { display: grid; gap: 12px; }

.accordion-item {
  background: rgba(250, 246, 236, 0.06);
  border: 2px solid rgba(250, 246, 236, 0.22);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.accordion-item h3 { margin: 0; }

.accordion-trigger {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 18px 18px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.accordion-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 3px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  background: var(--gold);
  color: var(--navy);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.accordion-panel p {
  padding: 0 18px 20px;
  margin: 0;
  font-size: 1.05rem;
}

/* ---- Final CTA ---- */
.final-cta {
  text-align: center;
  padding: 72px 0 80px;
}
.final-cta h2 {
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1em;
}

/* ---- Footer ---- */
.footer {
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 44px 0 48px;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-logo);
  font-size: 1.7rem;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.1;
}
.footer-logo span { color: var(--green-bright); }
.footer-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  margin: 0 0 12px;
}
.footer-mission {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted-on-dark);
  font-size: 1rem;
}

/* ==========================================================================
   ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
  .container, .container-narrow { padding: 0 28px; }
  .section { padding: 84px 0; }
  .hero { padding: 84px 0 100px; }

  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-5 .card:last-child { grid-column: 1 / -1; max-width: calc(50% - 11px); justify-self: center; }

  .icon-row { grid-template-columns: repeat(3, 1fr); gap: 28px; }

  .founder-grid {
    grid-template-columns: auto 1fr;
    gap: 40px;
    justify-items: start;
    text-align: left;
    align-items: center;
  }
  .founder-avatar { width: 136px; height: 136px; }
  .avatar-num { font-size: 2.8rem; }
  .avatar-label { font-size: 0.85rem; }
  .stat-row { justify-content: flex-start; }

  .plan-card { padding: 34px 26px 30px; }
  .included { padding: 30px 40px 14px; }
  .accordion-trigger { padding: 22px 24px; font-size: 1.3rem; }
  .accordion-panel p { padding: 0 24px 24px; }
  .callout { padding: 28px 40px; }
}

/* ==========================================================================
   ≥ 960px — desktop nav, 3+2 card layout
   ========================================================================== */
@media (min-width: 960px) {
  .nav-inner { padding: 0 24px; gap: 28px; }
  .nav-toggle, .nav-links-mobile { display: none !important; }

  .nav-links {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 26px;
  }
  .nav-links a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 3px solid transparent;
  }
  .nav-links a:hover { border-bottom-color: var(--gold); }

  .btn-nav { font-size: 1.05rem; padding: 10px 22px 8px; }

  .card-grid-5 { grid-template-columns: repeat(6, 1fr); }
  .card-grid-5 .card { grid-column: span 2; }
  .card-grid-5 .card:nth-child(4) { grid-column: 2 / span 2; }
  .card-grid-5 .card:nth-child(5) { grid-column: 4 / span 2; max-width: none; justify-self: stretch; }

  .plan-grid { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 22px; }
  .included .check-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
}

/* ==========================================================================
   Very narrow phones (≤ 380px)
   ========================================================================== */
@media (max-width: 380px) {
  .logo { font-size: 1.35rem; }
  .btn-nav { font-size: 0.85rem; padding: 8px 12px 6px; }
  .nav-inner { padding: 0 12px; gap: 6px; }
  .btn-lg { font-size: 1.1rem; padding: 16px 22px 14px; }
}

/* ==========================================================================
   Additions: WhatsApp / footer links, legal pages, recordings library
   ========================================================================== */
[hidden] { display: none !important; }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 3px solid var(--cream);
  padding: 11px 26px 9px;
  font-size: 1.05rem;
}
.btn-outline:hover { background: var(--cream); color: var(--navy); }

.faq-contact {
  text-align: center;
  margin-top: 36px;
}
.faq-contact p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 22px 0 0;
}
.footer-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cream);
  text-underline-offset: 4px;
}
.footer-links a:hover { color: var(--gold); }

/* ---- Sub-page header (legal + library) ---- */
.nav-simple .nav-inner { justify-content: space-between; }

/* ---- Legal pages ---- */
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: clamp(2rem, 7vw, 3rem); margin-bottom: 0.4em; }
.legal h2 { font-size: 1.5rem; margin: 1.8em 0 0.4em; }
.legal p, .legal li { color: var(--muted-on-light); }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal a { color: var(--green-deep); font-weight: 700; }
.draft-banner {
  background: var(--gold);
  color: var(--navy);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 700;
  margin-bottom: 28px;
  box-shadow: 0 4px 0 rgba(11, 42, 74, 0.2);
}
.draft-banner p { color: var(--navy); margin: 0; }
.legal .todo {
  background: var(--gold);
  color: var(--navy);
  padding: 0 6px;
  border-radius: 6px;
  font-weight: 700;
}
.legal-updated { font-size: 0.95rem; }

/* ---- Recordings library ---- */
.library { padding: 48px 0 72px; min-height: 60vh; }
.library h1 { font-size: clamp(2rem, 7vw, 3rem); text-align: center; margin-bottom: 0.3em; }
.library-intro { text-align: center; max-width: 560px; margin: 0 auto 28px; }

.gate-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--navy);
  color: var(--text-on-dark);
  border: 4px solid var(--green);
  border-radius: 28px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 0 rgba(11, 42, 74, 0.25);
}
.gate-card h1 { color: var(--text-on-dark); font-size: 1.8rem; }
.gate-card p { color: var(--muted-on-dark); }
.gate-card label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--cream);
}
.gate-card input {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  padding: 12px 16px;
  border-radius: 999px;
  border: 3px solid var(--cream);
  background: var(--cream);
  color: var(--navy);
  margin-bottom: 16px;
  text-align: center;
}
.gate-card input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gate-error { color: var(--gold) !important; font-weight: 700; min-height: 1.6em; margin: 0 0 12px; }

.level-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.level-tab {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 10px 20px 8px;
  border-radius: 999px;
  border: 3px solid var(--navy);
  background: var(--cream-card);
  color: var(--navy);
  cursor: pointer;
}
.level-tab[aria-pressed="true"] { background: var(--navy); color: var(--gold); }
.level-tab:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.recording-list { list-style: none; padding: 0; margin: 0 auto; max-width: 720px; display: grid; gap: 14px; }
.recording {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  background: var(--cream-card);
  border: 2px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: 0 5px 0 rgba(11, 42, 74, 0.15);
}
.recording-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--gold);
  color: var(--navy);
  border-radius: 999px;
  padding: 2px 12px 1px;
}
.recording-title { flex: 1 1 200px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.25; color: var(--navy); }
.recording .btn { padding: 9px 20px 7px; font-size: 1rem; }
.library-empty {
  text-align: center;
  background: var(--cream-card);
  border: 2px dashed var(--navy);
  border-radius: var(--radius);
  padding: 32px 20px;
  max-width: 720px;
  margin: 0 auto;
}
.library-empty p { margin: 0; }
.library-lock { text-align: center; margin-top: 32px; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Floating WhatsApp button (appended to every page by script.js) ---- */
.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  max-width: calc(100vw - 32px);
}

.whatsapp-float-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28), 0 6px 16px rgba(11, 42, 74, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.whatsapp-float-icon svg { width: 30px; height: 30px; }

.whatsapp-float-caption {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--navy);
  background: var(--gold);
  padding: 9px 16px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), 0 6px 14px rgba(11, 42, 74, 0.22);
  min-width: 0;
}

.whatsapp-float:hover .whatsapp-float-icon,
.whatsapp-float:focus-visible .whatsapp-float-icon {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.28), 0 8px 18px rgba(11, 42, 74, 0.32);
}
.whatsapp-float:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
  border-radius: 999px;
}

@media (max-width: 480px) {
  .whatsapp-float { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .whatsapp-float-icon { width: 48px; height: 48px; }
  .whatsapp-float-icon svg { width: 25px; height: 25px; }
  .whatsapp-float-caption {
    font-size: 0.82rem;
    padding: 7px 12px 6px;
    max-width: 150px;
    white-space: normal;
  }
}

/* ---- First-lesson countdowns ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.countdown { padding: 56px 0 64px; }
.countdown .section-title { color: #fff; margin-bottom: 32px; }

.countdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 480px;
  margin: 0 auto;
}

.countdown-card {
  background: var(--navy);
  color: var(--text-on-dark);
  border: 4px solid var(--cream);
  border-radius: 28px;
  padding: 26px 18px 24px;
  text-align: center;
  box-shadow: 0 8px 0 rgba(11, 42, 74, 0.35);
}
.countdown-card .countdown-level {
  font-family: var(--font-logo);
  font-size: 1.5rem;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 12px;
}
.countdown-card .countdown-when {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--navy);
  background: var(--gold);
  padding: 4px 14px 3px;
  border-radius: 999px;
  margin: 0 0 18px;
}

.countdown-clock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cream-card);
  border-radius: 14px;
  padding: 10px 2px 8px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}
.countdown-num {
  font-family: var(--font-logo);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-top: 2px;
}
.countdown-card .countdown-live {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--gold);
  margin: 6px 0 0;
}

.countdown-cta { text-align: center; margin: 36px 0 0; }

@media (min-width: 960px) {
  .countdown-grid { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 22px; }
  .countdown-num { font-size: 1.9rem; }
}
@media (max-width: 380px) {
  .countdown-card { padding: 22px 12px 20px; }
  .countdown-num { font-size: 1.35rem; }
  .countdown-label { font-size: 0.7rem; }
}

/* ---- First-visit countdown pop-up (auto-closes after 10s) ---- */
.countdown-popup {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  left: 50%;
  z-index: 150;
  width: min(640px, calc(100vw - 24px));
  background: var(--navy);
  color: var(--text-on-dark);
  border: 4px solid var(--green);
  border-radius: 24px;
  padding: 14px 14px 14px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.28), 0 14px 30px rgba(11, 42, 74, 0.35);
  opacity: 0;
  transform: translate(-50%, -24px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.countdown-popup.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 0 3px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}
.popup-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.popup-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--gold);
  margin: 2px 44px 10px 4px;
}

.popup-cards { display: grid; gap: 8px; }

.popup-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(250, 246, 236, 0.08);
  border-radius: 16px;
  padding: 8px 10px 10px;
}
.popup-card .countdown-level {
  font-family: var(--font-logo);
  font-size: 0.9rem;
  line-height: 1.1;
  color: #fff;
  margin: 2px 0 0 2px;
}
.popup-card .countdown-clock { gap: 5px; }
.popup-card .countdown-unit { padding: 5px 0 4px; border-radius: 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.popup-card .countdown-num { font-size: 1.15rem; }
.popup-card .countdown-label { font-size: 0.6rem; margin-top: 1px; }
.popup-card .countdown-live {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--gold);
  margin: 0;
}

.popup-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(250, 246, 236, 0.15);
  overflow: hidden;
  margin-top: 12px;
}
.popup-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transform-origin: left center;
  animation: popup-shrink var(--popup-seconds, 10s) linear forwards;
}
@keyframes popup-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (min-width: 600px) {
  .countdown-popup { padding: 16px 18px 16px; }
  .popup-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 12px;
  }
  .popup-card .countdown-level { font-size: 1rem; margin: 0; }
  .popup-card .countdown-clock { grid-template-columns: repeat(4, 54px); }
  .popup-card .countdown-live { margin-left: auto; }
}

/* ---- Lesson time line on each plan card ---- */
.plan-card .plan-time {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--green-deep) !important;
  margin: -4px 0 14px;
}
