:root {
  --primary:     #1D4ED8;
  --primary-dark:#1E40AF;
  --accent:      #0EA5E9;
  --cta:         #F97316;
  --success:     #10B981;
  --danger:      #EF4444;
  --warning:     #F59E0B;
  --bg:          #F0F7FF;
  --card-bg:     #FFFFFF;
  --text:        #0F172A;
  --muted:       #64748B;
  --border:      #DBEAFE;
}

/* ── Global ── */
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ── Navbar ── */
.navbar {
  background: #080E1C !important;
  box-shadow: 0 1px 0 rgba(56,189,248,0.08),
              0 6px 32px rgba(0,0,0,0.55);
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ── DriveReady AI brand lockup ── */
.dw-brand {
  display: flex !important;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  padding: 0 !important;
  transition: opacity .2s;
}
.dw-brand:hover { opacity: .85; }

.dw-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  /* Badge background uses app primary blue gradient */
  background: linear-gradient(150deg, #1D4ED8 0%, #0C1A3A 65%, #080E1C 100%);
  border: 1.5px solid rgba(56,189,248,0.35);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 18px rgba(29,78,216,0.45),
    0 4px 20px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.dw-icon-badge svg { display: block; }

.dw-wordmark {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dw-name {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  display: flex;
  align-items: baseline;
  gap: 0;
}
/* "Wise" uses app accent sky blue */
.dw-name span { color: #38BDF8; }
/* "AI" pill uses app orange CTA — creates contrast + energy */
.dw-name em {
  font-style: normal;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #fff;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 7px;
  line-height: 1.5;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(249,115,22,0.4);
}

.dw-tagline {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  line-height: 1;
}

.nav-link {
  font-weight: 600;
  color: rgba(255,255,255,0.8) !important;
  transition: color 0.15s;
  font-size: .92rem;
}
.nav-link:hover { color: #38BDF8 !important; }
.navbar-toggler { border-color: rgba(255,255,255,0.2); }
.navbar-toggler-icon { filter: invert(1); }

/* ── Mobile-only right stack: AI Tutor + hamburger (hidden on desktop) ── */
.nav-mobile-right {
  display: none;
}
.nav-mobile-ai-tutor {
  display: none;
}
/* Kill-switch: nav-ai-chip (old deployed chip between logo and hamburger) */
.nav-ai-chip {
  display: none !important;
}

/* ── 24/7 AI Tutor inline nav pill — sky-blue accent ── */
.nav-ai-tutor-link {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: rgba(14,165,233,0.1) !important;
  border: 1px solid rgba(56,189,248,0.32) !important;
  border-radius: 18px;
  padding: 4px 12px !important;
  font-size: .78rem !important;
  font-weight: 700;
  letter-spacing: .3px;
  color: #7DD3FC !important;
  white-space: nowrap;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.nav-ai-tutor-link:hover {
  background: rgba(14,165,233,0.18) !important;
  border-color: rgba(56,189,248,0.55) !important;
  color: #38BDF8 !important;
}
.nav-ai-tutor-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ── Danger Zone premium amber pill ── */
.nav-danger-link {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: rgba(251,146,60,0.08) !important;
  border: 1px solid rgba(251,146,60,0.28) !important;
  border-radius: 18px;
  padding: 4px 12px !important;
  font-size: .78rem !important;
  font-weight: 700;
  letter-spacing: .3px;
  color: #FB923C !important;
  white-space: nowrap;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.nav-danger-icon {
  color: #FB923C;
  transition: color .15s ease;
}
.nav-danger-link:hover {
  background: rgba(251,146,60,0.15) !important;
  border-color: rgba(251,146,60,0.48) !important;
  color: #FDBA74 !important;
}
.nav-danger-link:hover .nav-danger-icon {
  color: #FDBA74;
}

.readiness-badge {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(251,191,36,0.2);
  color: #FCD34D;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(251,191,36,0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Cards ── */
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(29,78,216,0.06);
}
.card-hover {
  transition: all 0.2s;
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(29,78,216,0.14);
  border-color: rgba(29,78,216,0.3);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 24px;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-cta {
  background: var(--cta);
  border-color: var(--cta);
  color: white;
  font-weight: 800;
  border-radius: 14px;
  padding: 14px 32px;
  font-size: 1.05rem;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(249,115,22,0.35);
}
.btn-cta:hover {
  background: #EA6C00;
  border-color: #EA6C00;
  color: white;
  box-shadow: 0 6px 24px rgba(249,115,22,0.45);
  transform: translateY(-1px);
}

.btn-success { background: var(--success); border-color: var(--success); font-weight: 700; border-radius: 12px; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); font-weight: 700; border-radius: 12px; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-xl { padding: 16px 40px; font-size: 1.15rem; border-radius: 16px; }

/* ── Hero Split ── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88vh;
  background: #0F172A;
  position: relative;
  overflow: hidden;
}
.hero-split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 64px;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 80%, #0C4A6E 100%);
  position: relative;
  z-index: 2;
}
.hero-split-left::after {
  content: '';
  position: absolute;
  top: 0; right: -40px;
  width: 80px; height: 100%;
  background: linear-gradient(to right, #1E3A8A, transparent);
  z-index: 3;
}
.hero-split-right {
  position: relative;
  overflow: hidden;
}
.hero-split-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-split-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #1E3A8A 0%, transparent 30%),
              linear-gradient(to top, rgba(15,23,42,0.6) 0%, transparent 40%);
  z-index: 1;
}
/* Floating stat badges over image */
.hero-badge {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-badge-icon { font-size: 1.6rem; line-height: 1; }
.hero-badge-num { font-size: 1.4rem; font-weight: 900; color: var(--primary); line-height: 1; }
.hero-badge-label { font-size: .72rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .5px; }
.hero-badge-b1 { bottom: 24%; left: 8%; }

.hero-split h1 { font-size: 3rem; font-weight: 900; line-height: 1.18; color: white; }
.hero-headline { line-height: 1.18; }
.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.8); line-height: 1.75; max-width: 440px; }
.hero-split p { font-size: 1.1rem; color: rgba(255,255,255,0.85); line-height: 1.7; }

/* ── Desktop hero polish (≥992px only — mobile untouched) ── */
@media (min-width: 992px) {
  /* 1. Hide the "SMART DRIVING STARTS HERE" pill — one compact pill is enough */
  .hero-eyebrow-desktop { display: none !important; }

  /* Show the mobile-style pill as a compact inline-block (not stretched full-width) */
  .hero-eyebrow-mobile {
    display: inline-block !important;
    width: fit-content !important;
    max-width: 100%;
  }

  /* On desktop: show short pill text, hide long pill text */
  .hero-pill-long  { display: none !important; }
  .hero-pill-short { display: inline !important; }

  /* 2. Desktop image framing: contain so full image is visible — no cropping */
  .hero-split-right { background: #0F172A; }
  .hero-slide {
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* 3. Desktop badge: ~20% smaller, anchored lower-left of image */
  .hero-badge-b1 {
    bottom: 10%;
    left: 6%;
    padding: 9px 14px !important;
    gap: 8px !important;
    border-radius: 13px !important;
  }
  .hero-badge-b1 .hero-badge-icon  { font-size: 1.3rem !important; }
  .hero-badge-b1 .hero-badge-num   { font-size: 1.1rem !important; }
  .hero-badge-b1 .hero-badge-label { font-size: .58rem !important; }
}

/* ── Wide-screen hero balance (≥1400px) ── */
@media (min-width: 1400px) {
  .hero-split {
    min-height: 84vh;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-split-left {
    padding: 80px 72px 80px 6%;
  }
}

/* Legacy hero alias */
.hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 55%, #0369A1 100%);
  color: white;
  padding: 80px 0 70px;
  border-radius: 0 0 48px 48px;
}
.hero h1 { font-size: 2.8rem; font-weight: 900; line-height: 1.1; }
.hero p { font-size: 1.15rem; opacity: 0.9; }

/* ── Mobile only (≤991px): show hamburger + AI pill; stack hero ── */
@media (max-width: 991px) {
  /* Hide tagline on mobile — only visible on wider desktop viewports */
  .dw-tagline { display: none; }

  /* Navbar: logo left | right stack (AI Tutor pill above hamburger) */
  .navbar > .container {
    flex-wrap: nowrap;
    align-items: center;
  }
  .dw-brand {
    flex-shrink: 0;
    margin-right: auto;
  }
  .nav-mobile-right {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }
  .nav-mobile-ai-tutor {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    background: rgba(15,23,42,0.55);
    border: 1px solid rgba(56,189,248,0.28);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none !important;
    white-space: nowrap;
  }
  .nav-mobile-ai-tutor:hover {
    background: rgba(15,23,42,0.8);
    border-color: rgba(56,189,248,0.45);
    color: #fff !important;
  }
  .nav-mobile-right .dw-hamburger {
    margin-left: 0;
  }

  /* Hero eyebrow pill: swap text */
  .hero-eyebrow-desktop { display: none !important; }
  .hero-eyebrow-mobile  { display: inline !important; }

  /* Hero layout: single column */
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-split-right {
    height: 46vw;
    min-height: 200px;
    max-height: 300px;
  }
  .hero-split-left {
    padding: 40px 24px 36px;
    order: 1;
  }
  .hero-split-right { order: 2; }
  .hero-split-left::after { display: none; }
  .hero-split h1 { font-size: 2.1rem; }
  .hero-sub { max-width: 100%; }

  /* Hero badge: compact */
  .hero-badge-b1 {
    bottom: 10%;
    left: 4%;
    max-width: 148px;
    padding: 8px 10px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }
  .hero-badge-icon  { font-size: .9rem !important; }
  .hero-badge-num   { font-size: 1.25rem !important; }
  .hero-badge-label { font-size: .62rem !important; }
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR DESKTOP OVERFLOW FIX
   Desktop nav active at ≥992px (navbar-expand-lg).
   Three progressive steps — each inherits from the step above.
   ≤991px → mobile hamburger drawer.
   ══════════════════════════════════════════════════════════════ */

/* Step 1 — 992–1440px: gentle compaction
   Reduce badge + wordmark slightly; tighten pill and gaps.       */
@media (min-width: 992px) and (max-width: 1440px) {
  /* Belt-and-suspenders: keep mobile-only elements hidden */
  .nav-mobile-right, .nav-mobile-ai-tutor { display: none !important; }
  .dw-icon-badge {
    width: 46px;
    height: 46px;
  }
  .dw-name { font-size: 1.4rem; }
  .dw-brand { gap: 10px; }
  #nav.navbar-collapse .navbar-nav { gap: 2px !important; }
  .nav-ai-tutor-link {
    padding: 3px 10px !important;
    font-size: .75rem !important;
  }
  .nav-danger-link {
    padding: 3px 10px !important;
    font-size: .75rem !important;
  }
  .streak-badge {
    padding: 4px 9px;
    font-size: .74rem;
  }
}

/* Step 2 — 992–1280px: medium compaction
   Shrink badge further, hide tagline to reclaim brand width,
   compress nav-link padding, show streak as emoji-only.          */
@media (min-width: 992px) and (max-width: 1280px) {
  .dw-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .dw-name { font-size: 1.2rem; }
  .dw-tagline { display: none; }
  .dw-brand { gap: 8px; }
  .nav-link {
    font-size: .82rem;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  #nav.navbar-collapse .navbar-nav { gap: 0 !important; }
  .nav-ai-tutor-link {
    padding: 2px 8px !important;
    font-size: .72rem !important;
  }
  .nav-danger-link {
    padding: 2px 8px !important;
    font-size: .72rem !important;
  }
  .nav-ai-tutor-icon { font-size: .88rem; }
  .nav-danger-icon  { font-size: .8rem; }
  /* Streak: emoji only — text collapses */
  .streak-label { display: none; }
  .streak-badge { padding: 4px 7px; }
}

/* Step 3 — 992–1199px: maximum compaction for 1024px/1100px.
   Wordmark stays visible (enough horizontal room); tagline already
   hidden by Step 2. All nav items stay visible.                    */
@media (min-width: 992px) and (max-width: 1199px) {
  .dw-brand { gap: 8px; }
  .dw-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .nav-link {
    font-size: .74rem;
    padding-left: 3px !important;
    padding-right: 3px !important;
  }
  #nav.navbar-collapse .navbar-nav { gap: 0 !important; }
  .nav-ai-tutor-link {
    padding: 2px 6px !important;
    font-size: .67rem !important;
    gap: 3px;
  }
  .nav-danger-link {
    padding: 2px 6px !important;
    font-size: .67rem !important;
    gap: 3px;
  }
  .nav-ai-tutor-icon { font-size: .72rem; }
  .nav-danger-icon   { font-size: .68rem; }
  .streak-label { display: none; }
  .streak-badge { padding: 3px 5px; font-size: .7rem; }
  /* Language + profile dropdown buttons */
  #nav .btn-sm { padding: 2px 6px !important; font-size: .72rem !important; }
}

/* ── Hero badge + caption: phone tweaks (≤767px) ── */
@media (max-width: 767px) {
  /* Badge: bottom-left corner of hero image, ~20% smaller */
  .hero-badge-b1 {
    top: auto !important;
    bottom: 10px !important;
    left: 10px !important;
    right: auto !important;
    transform: none !important;
    max-width: 84px !important;
    padding: 4px 6px !important;
    gap: 3px !important;
    border-radius: 10px !important;
    z-index: 5 !important;
  }
  .hero-badge-icon  { font-size: .65rem !important; }
  .hero-badge-num   { font-size: .76rem !important; line-height: 1 !important; }
  .hero-badge-label { font-size: .42rem !important; line-height: 1.05 !important; }

  /* Caption: compact pill — top-center, clear of the badge */
  .hero-slide-caption {
    position: absolute !important;
    top: 10px !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: calc(100% - 150px) !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    font-size: .55rem !important;
    line-height: 1.1 !important;
    letter-spacing: .4px !important;
    white-space: nowrap !important;
    text-align: center !important;
    color: #ffffff !important;
    background: rgba(15,23,42,0.68) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
  }
  .hero-slide-caption::before,
  .hero-slide-caption::after {
    display: none !important;
    content: none !important;
  }
}

/* ── Hero badge: even smaller on phones (≤480px) ── */
@media (max-width: 480px) {
  .hero-badge-b1 {
    top: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    max-width: 76px !important;
    padding: 3px 5px !important;
    gap: 2px !important;
  }
  .hero-badge-icon  { font-size: .58rem !important; }
  .hero-badge-num   { font-size: .68rem !important; }
  .hero-badge-label { font-size: .38rem !important; }
}

/* ── Sticky guest CTA: phone-only (≤767px), hidden on tablet + desktop ── */
.mobile-guest-cta {
  display: none; /* hidden by default on all widths */
}
@media (max-width: 767px) {
  .mobile-guest-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(8,14,28,0.97) 65%, rgba(8,14,28,0));
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .mobile-guest-cta.sticky-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .mobile-guest-cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 20px;
    font-size: .97rem;
    border-radius: 14px;
  }
  /* Push body up so content is never hidden behind the sticky bar */
  body:not(.has-mobile-nav) {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Hero: tighter on phones (≤767px) so headline + CTAs appear sooner ── */
@media (max-width: 767px) {
  .hero-split-right {
    height: 40vw;
    min-height: 160px;
    max-height: 210px;
  }
  .hero-split-left {
    padding-top: 20px;
    padding-bottom: 28px;
  }
  /* Tighten spacing between hero pill → h1 → subheadline → CTAs */
  .hero-split-left .mb-4 { margin-bottom: .75rem !important; }
  .hero-split-left .mb-5 { margin-bottom: 1.1rem !important; }
  .hero-split h1        { font-size: 1.9rem; }
}

/* ── Progress bar ── */
.progress-bar-wrap { background: var(--border); border-radius: 20px; height: 12px; overflow: hidden; }
.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 20px;
  height: 100%;
  transition: width 1s;
}

/* Legacy alias used in templates */
.xp-bar-wrap { background: var(--border); border-radius: 20px; height: 12px; overflow: hidden; }
.xp-bar-fill { background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 20px; height: 100%; transition: width 1s; }

/* ── Answer options ── */
.answer-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
}
.answer-btn:hover { border-color: var(--primary); background: #EFF6FF; }
.answer-btn.selected { border-color: var(--primary); background: #EFF6FF; }
.answer-btn.correct  { border-color: var(--success); background: #D1FAE5; color: #065F46; }
.answer-btn.wrong    { border-color: var(--danger);  background: #FEE2E2; color: #991B1B; }
.answer-letter {
  display: inline-block;
  width: 30px; height: 30px;
  background: var(--border);
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  font-weight: 800;
  margin-right: 10px;
  font-size: 0.85rem;
}

/* ── Feedback box ── */
.feedback-correct { background: #D1FAE5; border-left: 4px solid var(--success); border-radius: 12px; padding: 16px; }
.feedback-wrong   { background: #FEE2E2; border-left: 4px solid var(--danger);  border-radius: 12px; padding: 16px; }

/* ── Progress pop animation ── */
@keyframes xpPop {
  0%  { transform: scale(0) translateY(0); opacity: 1; }
  80% { transform: scale(1.2) translateY(-30px); opacity: 1; }
  100%{ transform: scale(1) translateY(-40px); opacity: 0; }
}
.xp-pop {
  position: fixed;
  top: 70px;
  right: 20px;
  background: var(--success);
  color: white;
  font-weight: 800;
  font-size: 1rem;
  padding: 8px 20px;
  border-radius: 20px;
  z-index: 9999;
  animation: xpPop 1.5s ease-out forwards;
  pointer-events: none;
}

/* ── Flashcard ── */
.flashcard-wrap { perspective: 1000px; }
.flashcard {
  width: 100%;
  min-height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.fc-front, .fc-back {
  position: absolute;
  width: 100%;
  min-height: 260px;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}
.fc-front { background: linear-gradient(135deg, #1E3A8A, #0EA5E9); color: white; }
.fc-back  { background: white; transform: rotateY(180deg); border: 2px solid var(--border); }
.fc-emoji { font-size: 5rem; margin-bottom: 10px; }
.fc-name  { font-size: 1.5rem; font-weight: 900; }
.fc-hint  { font-size: 0.85rem; opacity: 0.8; margin-top: 6px; }

/* ── Progress ring ── */
.progress-ring { transform: rotate(-90deg); }
.progress-ring-circle { transition: stroke-dashoffset 1s ease; }

/* ── Milestone (badge) cards ── */
.badge-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}
.badge-icon { font-size: 2.5rem; }
.badge-card.locked { opacity: 0.35; filter: grayscale(1); }

/* ── Chat ── */
.chat-messages { max-height: 420px; overflow-y: auto; padding: 12px; }
.msg-user     { background: var(--primary); color: white; border-radius: 18px 18px 4px 18px; padding: 10px 16px; max-width: 80%; margin-left: auto; margin-bottom: 8px; font-size: 0.95rem; }
.msg-ai       { background: white; border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; padding: 10px 16px; max-width: 85%; margin-bottom: 8px; font-size: 0.95rem; }
.chat-input-row { border-top: 1px solid var(--border); padding: 12px; background: white; border-radius: 0 0 16px 16px; }

/* ── Readiness gauge ── */
.gauge-wrap { position: relative; width: 180px; margin: 0 auto; }
.gauge-score {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -20%);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
}
.gauge-label {
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Mobile bottom nav ── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0F172A;
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
}
.mobile-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  gap: 2px;
  transition: color 0.15s;
}
.mobile-nav a.active, .mobile-nav a:hover { color: #38BDF8; }
.mobile-nav .nav-icon { font-size: 1.3rem; }
@media (max-width: 991px) {
  .mobile-nav { display: flex; }
  body { padding-bottom: 80px; }
}

/* ── Lessons ── */
.lesson-card { border-left: 4px solid var(--primary); }
.lesson-card.done { border-left-color: var(--success); }
.lesson-content { line-height: 1.9; font-size: 1.02rem; white-space: pre-line; }

/* ── Stat cards ── */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}
.stat-num { font-size: 2rem; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Pricing cards ── */
.price-card { border-radius: 20px; overflow: hidden; }
.price-card.featured { border: 3px solid var(--primary); transform: scale(1.03); }
.price-header { padding: 30px 24px; color: white; }
.price-free    { background: linear-gradient(135deg, #374151, #6B7280); }
.price-premium { background: linear-gradient(135deg, #1D4ED8, #0EA5E9); }
.price-family  { background: linear-gradient(135deg, #F97316, #FBBF24); }
.price-body    { padding: 24px; }
.price-amount  { font-size: 2.8rem; font-weight: 900; }

/* ── Hero slideshow ── */
.hero-split-right { position: relative; overflow: hidden; }
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-caption {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.45);
  color: rgba(255,255,255,0.75);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 3;
  backdrop-filter: blur(4px);
}
.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.hero-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* ── Avatar picker ── */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.avatar-opt {
  font-size: 1.5rem;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.avatar-opt:hover { border-color: var(--primary); background: #EFF6FF; transform: scale(1.08); }
.avatar-opt.selected { border-color: var(--primary); background: #DBEAFE; box-shadow: 0 0 0 3px rgba(29,78,216,0.2); transform: scale(1.1); }
@media (max-width: 576px) {
  .avatar-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .avatar-opt { font-size: 1.6rem; border-radius: 12px; min-height: 52px; }
}

/* ── Trust badge strip ── */
.trust-strip {
  background: white;
  border-bottom: 1px solid var(--border);
}

/* ── Section divider label ── */
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.section-label-blue  { background:#DBEAFE; color:#1D4ED8; }
.section-label-green { background:#D1FAE5; color:#065F46; }
.section-label-orange{ background:#FFEDD5; color:#C2410C; }

/* ── Pillar cards ── */
.pillar-icon-wrap {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .stat-num { font-size: 1.5rem; }
  .answer-btn { padding: 14px 16px; font-size: 0.95rem; }
  h1 { font-size: 1.8rem; }
}

/* ── Animations ── */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Flash alerts ── */
.flash-container { position: fixed; top: 70px; right: 16px; z-index: 9998; width: min(360px, 90vw); }

/* ── Road sign quiz ── */
.sign-quiz-card { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 20px; border: none; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.sign-emoji-big { font-size: 6rem; line-height: 1; }

/* ── XP badge (kept for internal screens, less prominent) ── */
.xp-badge {
  background: rgba(14,165,233,0.15);
  color: #0EA5E9;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(14,165,233,0.25);
}

/* ────────────────────────────────────────────────────────────
   Mobile UX polish (additive — desktop unchanged)
   ──────────────────────────────────────────────────────────── */

/* Sticky bottom CTA bar — sits above the .mobile-nav (~62px tall).
   Default (desktop): natural inline flow.
   Mobile (≤991px):   fixed full-width bar at the bottom. */
@media (max-width: 991px) {
  .sticky-cta-mobile {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;          /* default: anchored to viewport bottom (logged-out / no mobile-nav) */
    z-index: 999;
    background: white;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(15,23,42,0.10);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    margin: 0 !important;
    text-align: center;
  }
  .sticky-cta-mobile .btn,
  .sticky-cta-mobile button[type="submit"],
  .sticky-cta-mobile a.btn {
    width: 100%;
    margin: 0 !important;
    min-height: 52px;
    border-radius: 12px;
    font-size: 1rem;
  }
  /* When the mobile bottom nav is present (logged-in users), float the
     sticky CTA above it instead of overlapping it. */
  body.has-mobile-nav .sticky-cta-mobile { bottom: 62px; }

  /* Pages that opt in to a sticky CTA bar reserve room so the last
     bit of content isn't hidden behind it. */
  body.has-sticky-cta                  { padding-bottom: 100px; }
  body.has-sticky-cta.has-mobile-nav   { padding-bottom: 160px; }

  /* Bigger touch targets on quiz answers */
  .answer-btn { min-height: 60px; padding: 16px 16px; font-size: 0.97rem; }
  .answer-letter { width: 30px; height: 30px; line-height: 30px; }

  /* Pricing cards: prevent featured-card overflow + tighter spacing */
  .price-card.featured { transform: none; border-width: 2px; }
  .price-amount { font-size: 2.4rem; }
  .price-header { padding: 22px 20px; }
  .price-body  { padding: 20px; }

  /* State-guide jump-nav: meatier tap targets */
  .jump-link {
    padding: 10px 12px !important;
    min-height: 44px;
    border-bottom: 1px solid var(--border);
  }
  .jump-link:last-child { border-bottom: none; }
  .jump-link:active { background: #EFF6FF; }

  /* Dashboard quick-action buttons — friendlier on small screens */
  .card .btn-outline-primary,
  .card .btn-outline-warning,
  .card .btn-outline-secondary {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  /* Streak/XP badges wrap cleanly on the dashboard header */
  .container > .d-flex.justify-content-between { gap: 10px; }
}

/* Hide the mobile-only sticky CTA on desktop (≥992px). */
@media (min-width: 992px) {
  .sticky-cta-mobile-only { display: none !important; }
}

/* ── Dashboard info-row cards: allow text + CTA to stack on narrow phones ── */
@media (max-width: 575px) {
  .dash-row-card {
    flex-wrap: wrap !important;
  }
  .dash-row-btn {
    flex-basis: 100% !important;
    margin-left: 0 !important;
    margin-top: 4px;
    text-align: center;
  }
}

/* ── Focus chip grid: equal-width 3-col on tablet/desktop, 1-col on phone ── */
.focus-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 575px) {
  .focus-chips-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile Drawer Navigation ──────────────────────────────────────────────
   Full-screen slide-in panel replacing Bootstrap collapse on mobile (<992px).
   Desktop (≥992px): drawer is hidden entirely; Bootstrap navbar handles nav.
   ───────────────────────────────────────────────────────────────────────── */

/* Backdrop */
.mobile-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1040;
  opacity: 0; pointer-events: none;
  transition: opacity .28s;
}
.mobile-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

/* Drawer panel — slides in from the right */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 100vw);
  background: #060C18;
  z-index: 1041;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.07);
  overscroll-behavior: contain;
}
.mobile-drawer.open { transform: translateX(0); }

/* Drawer top bar */
.mdr-topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  gap: 10px;
}
.mdr-topbar-brand-block {
  display: flex; flex-direction: column; gap: 0; flex: 1; min-width: 0;
}
.mdr-topbar-brand {
  font-size: .95rem; font-weight: 900; color: #fff; letter-spacing: -.2px; line-height: 1.2;
  margin-bottom: 4px;
}
.mdr-topbar-brand span { color: #38BDF8; }
.mdr-topbar-subtitle {
  font-size: .67rem; font-weight: 500; color: rgba(125,211,252,.6);
  letter-spacing: .1px; line-height: 1.3;
  margin-bottom: 8px;
}
.mdr-topbar-ai-chip {
  display: inline-flex; align-items: center; gap: 4px;
  align-self: flex-start;
  width: fit-content;
  background: rgba(56,189,248,.07);
  border: 1px solid rgba(56,189,248,.2);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .63rem; font-weight: 700; color: #7DD3FC;
  letter-spacing: .3px; white-space: nowrap;
  pointer-events: none; user-select: none;
}
.mdr-close {
  width: 34px; height: 34px; flex-shrink: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  color: #64748B; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, color .15s;
  line-height: 1; margin-top: 1px;
}
.mdr-close:hover { background: rgba(255,255,255,.1); color: #E2E8F0; }

/* Scrollable body */
.mdr-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
}

/* Profile block */
.mdr-profile {
  display: flex; align-items: center; gap: 13px;
  padding: 18px 18px 15px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.mdr-avatar {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(29,78,216,.3), rgba(14,165,233,.15));
  border: 1.5px solid rgba(29,78,216,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
}
.mdr-user-name {
  font-size: .97rem; font-weight: 800; color: #F1F5F9; line-height: 1.2;
}
.mdr-user-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 5px;
}
.mdr-tag {
  font-size: .68rem; font-weight: 700; border-radius: 999px;
  padding: 2px 8px; line-height: 1.5; white-space: nowrap;
}
.mdr-tag--streak { background: rgba(251,191,36,.12); color: #FCD34D; border: 1px solid rgba(251,191,36,.18); }
.mdr-tag--state  { background: rgba(56,189,248,.1);  color: #38BDF8;  border: 1px solid rgba(56,189,248,.18); letter-spacing: .5px; }
.mdr-tag--pro    { background: rgba(249,115,22,.12); color: #FB923C;  border: 1px solid rgba(249,115,22,.18); }

/* Section groups */
.mdr-section {
  padding: 10px 0 2px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mdr-section:last-child { border-bottom: none; }

.mdr-label {
  font-size: .64rem; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: #2D5080;
  padding: 4px 18px 7px;
}

/* Individual nav links */
.mdr-link {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 18px;
  color: #94A3B8; text-decoration: none;
  font-size: .9rem; font-weight: 600;
  min-height: 48px;
  transition: background .13s, color .13s;
}
.mdr-link:hover, .mdr-link:focus-visible {
  background: rgba(255,255,255,.05); color: #E2E8F0; text-decoration: none;
}
.mdr-link i {
  width: 20px; text-align: center; font-size: .9rem;
  flex-shrink: 0; color: #3B6EAA;
  transition: color .13s;
}
.mdr-link:hover i { color: #60A5FA; }

/* Accent variants */
.mdr-link--exam   { color: #94A3B8; }
.mdr-link--exam i { color: #F97316; }
.mdr-link--danger         { color: #F87171; }
.mdr-link--danger i       { color: #F87171; }
.mdr-link--danger:hover   { color: #FCA5A5; background: rgba(239,68,68,.05); }
.mdr-link--danger:hover i { color: #FCA5A5; }
.mdr-link--out         { color: #64748B; }
.mdr-link--out:hover   { color: #F87171; background: rgba(239,68,68,.04); }
.mdr-link--out:hover i { color: #F87171; }
.mdr-link--out i       { color: #334155; }

/* Admin links — secondary emphasis, WCAG-AA readable
   Steel-blue hue distinguishes them from primary nav (warm slate #64748B)
   without relying on low contrast to signal "secondary". */
.mdr-section--admin .mdr-label { color: #4B6280; }        /* ~3.4:1  label */
.mdr-link--admin               { color: #5B7A9E; font-size: .85rem; min-height: 44px; font-weight: 500; } /* ~4.7:1 */
.mdr-link--admin i             { color: #4B6280; }        /* ~3.4:1  icons */
.mdr-link--admin:hover         { color: #93B8D8; }        /* brightens on tap */
.mdr-link--admin:hover i       { color: #60A5FA; }

/* Guest CTA block */
.mdr-guest-cta {
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mdr-cta-btn {
  display: block; width: 100%;
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #fff; font-weight: 800; font-size: .95rem;
  border: none; border-radius: 12px; padding: 14px 20px;
  text-align: center; text-decoration: none;
  margin-bottom: 12px; transition: opacity .17s;
  box-shadow: 0 4px 18px rgba(249,115,22,.35), 0 1px 4px rgba(0,0,0,.25);
}
.mdr-cta-btn:hover { opacity: .9; color: #fff; }
.mdr-login-link {
  display: block; text-align: center;
  color: #7DD3FC; font-size: .84rem; font-weight: 600;
  text-decoration: none; padding: 5px;
  transition: color .13s;
}
.mdr-login-link:hover { color: #FFFFFF; }

/* Language mini-picker — compact wrapping chips */
.mdr-lang-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 18px 6px;
}
/* form wrappers must not act as flex items themselves */
.mdr-lang-row form { display: contents; }
.mdr-lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px; padding: 6px 10px;
  font-size: .78rem; font-weight: 600; color: #64748B;
  cursor: pointer; transition: background .13s, color .13s, border-color .13s;
  white-space: nowrap;
}
.mdr-lang-btn.active {
  background: rgba(29,78,216,.18);
  border-color: rgba(29,78,216,.3); color: #60A5FA;
}
.mdr-lang-btn:hover { background: rgba(255,255,255,.08); color: #94A3B8; }

/* Never show drawer on desktop (navbar-expand-lg breakpoint) */
@media (min-width: 992px) {
  .mobile-drawer-backdrop,
  .mobile-drawer { display: none !important; }
}

/* ── Ghost CTA (hero secondary) ── */
.btn-ghost-hero {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.88);
  font-weight: 700;
  border-radius: 14px;
  padding: 13px 28px;
  font-size: 1rem;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
  display: inline-flex;
  align-items: center;
}
.btn-ghost-hero:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Hero trust-signal items ── */
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.72);
  font-size: .85rem;
  font-weight: 600;
}

/* ── Hero CTA row — full-width on small phones ── */
@media (max-width: 575px) {
  .hero-cta-row {
    flex-direction: column !important;
  }
  .hero-cta-row .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ── Desktop language flag icons (SVG img, desktop popup only) ── */
.desktop-lang-icon {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ── Desktop language chip popup ── */
.lang-chip-menu {
  background: #0D1424;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 12px 10px 8px;
  min-width: 230px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}
.lang-chip-menu .mdr-lang-row { padding: 0 0 2px; }
.lang-chip-menu form { display: contents; }
.lang-chip-menu .mdr-lang-footnote { padding: 6px 4px 2px; }

/* ── Language selector: coming-soon states ── */

/* Desktop navbar dropdown — disabled "Soon" item */
.lang-soon-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  opacity: 0.65;
  cursor: not-allowed !important;
  pointer-events: none;
  color: #6B7280 !important;
}
/* ensure flag/emoji spans inside dropdown items are always fully visible */
.dropdown-item span:first-child,
.lang-soon-item span:first-child {
  opacity: 1;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.lang-soon-badge {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #0EA5E9;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.18);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Mobile drawer — disabled "Soon" item (matches desktop lang-soon-item pattern) */
.mdr-lang-btn--soon {
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
  color: #475569 !important;
}
.mdr-lang-soon-tag {
  margin-left: auto;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: #0EA5E9;
  background: rgba(14,165,233,.1);
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Footnote line under the language picker row */
.mdr-lang-footnote {
  font-size: .66rem;
  color: #2D5080;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 4px 18px 6px;
  margin: 0;
  opacity: 0.9;
}

/* ── Micro-feedback widget ───────────────────────────────────────────────── */
.dw-micro-fb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: .82rem;
}
.dw-micro-fb--dark {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.09);
}
/* Header row: question label + dismiss button */
.dw-micro-fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.dw-micro-fb-q {
  color: #64748B;
  margin: 0;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .15px;
}
.dw-micro-fb--dark .dw-micro-fb-q { color: #94A3B8; }
/* Dismiss ✕ button */
.dw-micro-fb-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  /* Minimum tap target */
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s, color .1s;
}
.dw-micro-fb-dismiss:hover { background: #F1F5F9; color: #475569; }
.dw-micro-fb--dark .dw-micro-fb-dismiss { color: #64748B; }
.dw-micro-fb--dark .dw-micro-fb-dismiss:hover { background: rgba(255,255,255,.1); color: #94A3B8; }
/* Rating buttons */
.dw-micro-fb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dw-micro-fb-btn {
  background: white;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  color: #374151;
  /* Mobile tap target: ≥44px height */
  padding: 8px 16px;
  min-height: 40px;
  font-size: .82rem;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.dw-micro-fb--dark .dw-micro-fb-btn {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.13);
  color: #CBD5E1;
}
.dw-micro-fb-btn:hover { background: #F0F4FF; border-color: #6366F1; color: #4338CA; }
.dw-micro-fb--dark .dw-micro-fb-btn:hover { background: rgba(255,255,255,.14); border-color: #818CF8; color: #C7D2FE; }
.dw-micro-fb-btn.dw-fb-ok  { background: #DCFCE7; border-color: #22C55E; color: #15803D !important; }
.dw-micro-fb-btn.dw-fb-bad { background: #FEE2E2; border-color: #EF4444; color: #B91C1C !important; }
.dw-micro-fb--dark .dw-micro-fb-btn.dw-fb-ok  { background: rgba(34,197,94,.18); border-color: #22C55E; color: #86EFAC !important; }
.dw-micro-fb--dark .dw-micro-fb-btn.dw-fb-bad { background: rgba(239,68,68,.18); border-color: #EF4444; color: #FCA5A5 !important; }
/* Mobile-first spacing */
@media (max-width: 575px) {
  .dw-micro-fb { padding: 12px 14px 14px; }
  .dw-micro-fb-btn { padding: 10px 16px; min-height: 44px; width: 100%; }
  .dw-micro-fb-btns { flex-direction: column; width: 100%; }
}

/* ── Morphing hamburger button ── */
.dw-hamburger {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 11px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.dw-hamburger:hover,
.dw-hamburger:focus-visible {
  background: rgba(56,189,248,0.1);
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.12), 0 0 14px rgba(56,189,248,0.18);
  outline: none;
}
.dw-ham-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  position: absolute;
  transform-origin: center;
  transition: transform .28s cubic-bezier(.4,0,.2,1),
              opacity   .2s  cubic-bezier(.4,0,.2,1),
              width     .2s  cubic-bezier(.4,0,.2,1);
}
.dw-ham-bar--top { transform: translateY(-6px); }
.dw-ham-bar--mid { transform: translateY(0); }
.dw-ham-bar--bot { transform: translateY(6px); }

/* Morphed → X when open */
.dw-hamburger.is-open .dw-ham-bar--top {
  transform: translateY(0) rotate(45deg);
  width: 20px;
}
.dw-hamburger.is-open .dw-ham-bar--mid {
  opacity: 0;
  width: 0;
}
.dw-hamburger.is-open .dw-ham-bar--bot {
  transform: translateY(0) rotate(-45deg);
  width: 20px;
}
