/* =====================================================================
   ScanBeauty landing — v1.0
   Mobile-first, no build step. Plain CSS.
   Adapted from the PushtiRanna landing template to the ScanBeauty
   brand (deep botanical green + marigold accent) and copy.
   ===================================================================== */

:root {
  /* Brand palette — sampled from random_image/app_icon.png so the
     landing and the in-app icon feel like the same product.
     Purple is the identity; lavender is the surface; gold is the
     warm accent for the price block + highlights. */
  --purple-900: #3A1A87; /* deepest brand purple */
  --purple-700: #5B2BB8; /* primary brand purple (matches the leaf) */
  --purple-600: #6B2BD9; /* mid brand purple */
  --purple-100: #EFE5FB; /* lavender tint (matches the icon background) */
  --lavender:   #F3ECFB; /* app lavender wash */
  --lavender-glow: #E7D8F8; /* shadow halo from the icon */
  --gold-500:  #E8A33D; /* marigold accent — used sparingly for warmth */
  --gold-100:  #FFF1DC;
  --orange-500: #F59E0B; /* yellowish-orange — used for the "Charging" price boxes */
  --orange-100: #FFF4E0;
  --orange-50:  #FFF8EA;
  --ink-900:   #1F1733; /* near-black with a purple tint */
  --ink-700:   #3D3258;
  --ink-500:   #6B6485;
  --line:      #E6DEF0; /* purple-tinted divider */
  --bg:        #FBF8FF; /* page background — near-white with a hint of lavender */
  --bg-alt:    #F4EDFC;
  --white:     #ffffff;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(91, 43, 184, 0.06);
  --shadow:    0 8px 24px rgba(91, 43, 184, 0.10);
  --shadow-lg: 0 18px 48px rgba(91, 43, 184, 0.18);

  --container: 1120px;

  --font-en: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;

  /* Mobile tap-target floor — Apple HIG / Material both call for ≥44px.
     Used by nav toggle, theme toggle, modal close, chips. */
  --tap-min: 44px;

  /* Safe-area insets for notched phones (iOS, Android). Falls back to 0. */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);

  /* CTA section — dedicated tokens so dark theme can keep dark fills
     and high-contrast white text regardless of accent palette flips. */
  --cta-bg-1:      #5B2BB8;
  --cta-bg-2:      #3A1A87;
  --cta-text:      #ffffff;
  --cta-text-muted: rgba(255, 255, 255, 0.85);

  /* Primary button — violet in light, lifted violet in dark */
  --btn-primary-bg:       #6B2BD9;
  --btn-primary-bg-hover: #5B2BB8;
  --btn-primary-text:     #ffffff;

  /* Danger button — crimson in light, slightly desaturated in dark */
  --btn-danger-bg:        #c62828;
  --btn-danger-bg-hover:  #8e1c1c;
  --btn-danger-text:      #ffffff;

  /* Header "Manage" link color matches the danger action it triggers */
  --manage-accent:        #b3261e;
}

/* ---------- Dark theme overrides ----------
   Only the variables that drive surfaces, text, and accents change.
   Layout/typography untouched. */
:root[data-theme="dark"] {
  --purple-900: #EAD9FF;
  --purple-700: #B794F4;
  --purple-600: #C9A9F8;
  --purple-100: #2A1A4D;
  --gold-500:  #F0BD63;
  --gold-100:  #3A2A12;
  --orange-500: #FBBF52;
  --orange-100: #5C3A0F;
  --orange-50:  #7A4A12;
  --ink-900:   #F2EEFB;
  --ink-700:   #C7BFE0;
  --ink-500:   #8E85A8;
  --line:      #2E2245;
  --bg:        #14092A;
  --bg-alt:    #1F1240;
  --white:     #1F1240;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:    0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);

  /* CTA in dark mode: deep purple-to-near-black gradient, white text stays readable */
  --cta-bg-1:      #2A175E;
  --cta-bg-2:      #0D0420;
  --cta-text:      #ffffff;
  --cta-text-muted: rgba(255, 255, 255, 0.85);

  /* Primary button in dark mode: lifted violet so it doesn't blow out next
     to the now-dark CTA panel; white text stays readable */
  --btn-primary-bg:       #7B45D6;
  --btn-primary-bg-hover: #9159E5;
  --btn-primary-text:     #ffffff;

  /* Danger button stays red but a touch warmer to fit the moody palette */
  --btn-danger-bg:        #b22a2a;
  --btn-danger-bg-hover:  #871e1e;
  --btn-danger-text:      #ffffff;

  /* Header "Manage" link in dark mode */
  --manage-accent:        #f06292;
}

/* Smooth theme transitions */
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body, .card, .cat-tile, .btn, .modal-card, .modal-overlay, input, .phone-input {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Anchor jumps land cleanly below the sticky header. */
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  font-family: var(--font-en);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Prevents accidental horizontal scroll on tiny phones when phone
     mockups or oversized images overflow their containers. */
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--purple-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
ul { padding: 0; margin: 0; list-style: none; }

/* iOS Safari zooms the viewport when an input's font-size drops below
   16px. Lock it to 16px for every form control. */
input, select, textarea { font-size: 16px; }

/* Honor reduced-data + reduced-motion in one place; small but worth
   hiding non-essential hover transforms on touch devices so taps
   don't trigger visual jank. */
@media (hover: none) {
  .card:hover, .cat-tile:hover, .btn:hover { transform: none; }
}

h1, h2, h3, h4 {
  color: var(--purple-900);
  margin: 0 0 .4em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
  font-weight: 600;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
}
h1 .en em {
  font-style: italic;
  color: var(--purple-600);
  font-weight: 700;
}
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-700); }
.muted { color: var(--ink-500); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--purple-100);
  color: var(--purple-900);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  /* Mobile-first: 16px gutters so 320px viewports get ~288px of
     usable content; safe-area insets stay 0 on non-notched phones. */
  padding: 0 16px;
  padding-left:  max(16px, calc(var(--safe-left)  + 12px));
  padding-right: max(16px, calc(var(--safe-right) + 12px));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--btn-primary-bg-hover); }
.btn-secondary {
  background: var(--white);
  color: var(--purple-900);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--purple-600); color: var(--purple-700); }
.btn-ghost {
  background: transparent;
  color: var(--purple-900);
  border-color: var(--purple-700);
}
.btn-ghost:hover { background: var(--purple-100); }

/* Danger variant — used for destructive actions like unsubscribe.
   Pulled from variables so dark mode retones correctly. */
.btn-danger {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-text);
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover { background: var(--btn-danger-bg-hover); }

.btn-sm  { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg  { padding: 16px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  /* Leave the notch / camera cutout unobscured on iOS, fall back to 0
     on other devices via env(). */
  top: var(--safe-top);
  z-index: 50;
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Slightly shorter on mobile so the phone screen gets more room. */
  height: 60px;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--purple-900);
  /* Make the brand a real tap target on mobile. */
  padding: 8px 6px;
  margin-left: -6px;
  border-radius: 10px;
  min-height: var(--tap-min);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.brand-name { font-size: 1.05rem; }

/* Mobile-first: nav-links is an off-canvas sheet by default; the
   ≥720px breakpoint in the responsive block turns it into a
   horizontal inline nav. */
.nav-links {
  display: none;
  position: fixed;
  top: calc(60px + var(--safe-top));
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  align-items: stretch;
  padding: 14px 16px max(14px, var(--safe-bottom));
  padding-left:  max(16px, calc(var(--safe-left)  + 12px));
  padding-right: max(16px, calc(var(--safe-right) + 12px));
  gap: 6px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: nav-drop .18s ease;
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-links.is-open { display: flex; }
.nav-links a {
  color: var(--ink-900);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 8px;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  border-radius: 10px;
}
.nav-links a:hover { color: var(--purple-700); text-decoration: none; }
.nav-links a:active { background: rgba(0, 0, 0, 0.05); }

/* Subscribe CTA inside the mobile sheet reads as a primary action. */
.nav-links .subscribe-btn {
  margin-top: 6px;
  justify-content: center;
  padding: 14px 22px;
  min-height: var(--tap-min);
}

/* User menu on mobile becomes a static, full-width block. */
.user-menu { width: 100%; }
.user-menu-trigger {
  width: 100%;
  justify-content: flex-start;
  min-height: var(--tap-min);
  padding: 12px 14px;
}
.user-menu-panel {
  position: static;
  width: 100%;
  margin-top: 6px;
  box-shadow: none;
  border: 1px solid var(--line);
  transform: none;
  opacity: 1;
  pointer-events: auto;
  display: none;
}
.user-menu-panel.is-open { display: flex; }
.user-menu-item { padding: 14px 12px; min-height: var(--tap-min); }

.nav-toggle {
  display: flex;
  background: none;
  border: 0;
  /* 44×44 hit area for the hamburger so thumbs don't miss it. */
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  color: var(--purple-900);
}
.nav-toggle:active { background: rgba(0, 0, 0, 0.05); }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple-900);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Hero ----------
   Mobile-first: stacked, compact, generous tap targets. */
.hero {
  /* Layered purple wash — mirrors the lavender halo around the
     app icon. The two radial gradients sit on top of the page
     background so the top-right corner glows softly without
     overwhelming the headline. */
  background:
    radial-gradient(900px 500px at 95% -5%, var(--lavender-glow) 0%, transparent 55%),
    radial-gradient(700px 400px at 0% 10%, var(--purple-100) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
  padding: 36px 0 44px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--purple-100);
  color: var(--purple-700);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 .en {
  display: block;
  color: var(--purple-900);
  font-weight: 700;
}
.lede {
  font-size: 1rem;
  color: var(--ink-700);
  margin-bottom: 14px;
}
.price-line {
  /* Yellowish-orange wash — the "Charging" price block leans into
     the orange accent so it reads as the warm deal against the
     cool purple identity. */
  background:
    linear-gradient(135deg, var(--orange-100) 0%, var(--orange-50) 100%);
  border: 1px dashed var(--orange-500);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--purple-900);
  margin: 16px 0 20px;
}
.price-line strong { color: var(--purple-900); }
.price-line .muted { color: var(--ink-500); font-size: 0.85rem; }

/* CTAs stack as full-width buttons on phones — easier to hit with
   a thumb and keeps the row from squeezing on narrow screens. */
.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 14px 0 0;
}
.hero-ctas .btn {
  width: 100%;
  padding: 14px 22px;
  min-height: var(--tap-min);
}
.hero-meta {
  font-size: 0.9rem;
  color: var(--ink-500);
  margin: 0;
}

/* Phone mockup frame */
.phone-frame {
  position: relative;
  border-radius: 32px;
  /* Match the deep brand purple of the app icon's frame. */
  background: #3A1A87;
  padding: 10px;
  box-shadow:
    var(--shadow-lg),
    /* Lavender outer halo — pulls the eye toward the phone and
       echoes the icon's background glow. */
    0 0 0 8px rgba(231, 216, 248, 0.5);
  aspect-ratio: 9 / 18;
  max-width: 220px;
  margin: 0 auto;
  width: 100%;
}
.phone-frame.placeholder {
  background: repeating-linear-gradient(45deg, var(--purple-100) 0 12px, var(--lavender-glow) 12px 24px);
  border: 2px dashed var(--purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--purple-700);
}
.phone-frame.placeholder .ph-label {
  font-size: 0.9rem;
  font-weight: 600;
}
.phone-frame.placeholder .ph-label code {
  background: transparent;
  color: var(--purple-700);
  padding: 0;
  font-size: 0.85em;
}
.phone-sm { max-width: 200px; }

/* Hero phone lives at the bottom of the hero copy on mobile so the
   CTA + headlines land first. Sizing is intentionally compact on small
   screens so the mockup doesn't push the CTA below the fold. */
.hero-art { order: 1; max-width: 180px; margin: 0 auto; }
.hero-art .phone-frame { max-width: 180px; aspect-ratio: 9 / 17; }

/* Hero phone: show <img> when present, hide the hatched fallback */
.hero-phone {
  background: #3A1A87;
  padding: 14px;
}
.hero-phone > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  display: block;
}
.hero-phone .phone-fallback {
  display: none;       /* hidden by default; JS-onerror flips it on */
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  background: repeating-linear-gradient(45deg, var(--purple-100) 0 12px, var(--lavender-glow) 12px 24px);
  border: 2px dashed var(--purple-600);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--purple-700);
  font-weight: 600;
}
.hero-phone .phone-fallback .ph-label code {
  background: transparent;
  color: var(--purple-700);
  padding: 0;
  font-size: 0.85em;
}

/* Recipe preview phones: full-bleed screenshot inside the frame */
.phone-dark .phone-screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  display: block;
}
.phone-dark .phone-screen .phone-fallback {
  display: none;
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  background: repeating-linear-gradient(45deg, var(--purple-100) 0 12px, var(--lavender-glow) 12px 24px);
  border: 2px dashed var(--purple-600);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--purple-700);
  font-weight: 600;
  font-size: 0.85rem;
}
.phone-dark .phone-screen .phone-fallback .ph-label code {
  background: transparent;
  color: var(--purple-700);
  padding: 0;
  font-size: 0.85em;
}

/* ---------- Generic Section ---------- */
.section {
  padding: 44px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}
.section-head .kicker {
  display: inline-block;
  background: var(--purple-100);
  color: var(--purple-700);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: var(--ink-500); font-size: 1rem; margin: 0; }

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* Hover effects only fire on devices that actually hover. */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--purple-600);
  }
}
.card-ico {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--purple-100);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.card h3 { margin-bottom: 6px; }
.card p { font-size: 0.95rem; margin: 0; }

/* ---------- Phone preview trio ----------
   On mobile the trio is a swipeable horizontal gallery; on wider
   screens it lays out as a 3-column row. */
.phones-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 16px;
  /* Bleed past the container so the cards can swipe edge-to-edge. */
  margin: 0 -16px;
  padding: 4px 16px 16px;
  scrollbar-width: none;
}
.phones-grid::-webkit-scrollbar { display: none; }
.phones-grid > * {
  flex: 0 0 70%;
  max-width: 240px;
  scroll-snap-align: center;
}
.phones-grid .phone-frame.phone-sm {
  max-width: 220px;
}

/* In-app preview dark phone frame */
.phone-dark {
  background: #3A1A87;
  padding: 8px;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1F1240;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 9px;
  line-height: 1.25;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.step-num {
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-700);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0;
  font-size: 1.05rem;
}
.step-body { flex: 1; }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--ink-500); font-size: 0.92rem; }

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: var(--purple-100);
  border-radius: 50%;
  z-index: 0;
}
.pricing-card > * { position: relative; z-index: 1; }
.pricing-card h3 { font-size: 1.2rem; }
.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 6px;
}
.price .amount {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--purple-900);
}
.price .currency {
  color: var(--ink-500);
  font-weight: 600;
  font-size: 0.95rem;
}
.bullets {
  text-align: left;
  margin: 16px auto 18px;
  max-width: 360px;
  display: grid;
  gap: 10px;
}
.bullets li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-700);
  font-size: 0.92rem;
}
.bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--purple-700);
  font-weight: 700;
}

/* ============== HERO HIGHLIGHTS ============== */
/* Three short trust-signal items wrapped in a green-bordered card,
   sitting right under the hero CTAs. First row holds the first two
   items side-by-side, the third item wraps onto its own line — that
   matches the reference design and keeps "Cancel anytime" as a
   standalone promise. */
.hero-highlights {
  list-style: none;
  margin: 22px 0 0;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  max-width: 520px;
  /* Theme-aware surface so the card stays visible in both light and dark. */
  border: 1.5px solid var(--purple-100);
  border-radius: 14px;
  background: var(--bg-alt);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.hero-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink-700);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  /* Keep each label on a single line so "Secure BDApps OTP login"
     doesn't break awkwardly; on phones too narrow to fit, the grid
     collapses to one column below. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-highlights-ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-700);
}
.hero-highlights-ico svg { display: block; }
@media (max-width: 600px) {
  /* On phone-width hero columns the right column can't reliably
     fit "Secure BDApps OTP login" alongside its icon, so fall back
     to a single column. Above that we keep the 2+1 layout so
     "Cancel anytime" sits alone on its own line. */
  .hero-highlights {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 100%;
    padding: 14px 16px;
  }
  .hero-highlights li { font-size: 0.95rem; white-space: normal; }

  /* ── Mobile polish (tap targets, safe areas, momentum scroll) ──
     The default styles above are already mobile-first; this block
     tightens the experience specifically on phones so users can
     actually thumb around without mis-taps or overflow. */

  /* Reserve the iOS notch / Android camera-cutout area so the
     header doesn't sit under the status bar. */
  body { padding-top: var(--safe-top); }

  /* Momentum scrolling on the modal sheet and any overflowed
     panels — `-webkit-` prefix is still required for iOS Safari
     even though `scroll-behavior: smooth` covers the rest. */
  .modal-card,
  .nav-links,
  .user-menu-panel,
  [data-overflow-y] {
    -webkit-overflow-scrolling: touch;
  }

  /* All buttons get a guaranteed 48×48 thumb target on phones.
     `.btn-block` (modal CTAs) gets extra height so the primary
     "Send OTP" / "Verify" feel weighty. */
  .btn { min-height: var(--tap-min); }
  .btn-sm { min-height: 38px; padding: 0 14px; } /* small header buttons stay small but tappable */
  .btn-lg { min-height: 52px; padding: 14px 22px; font-size: 1rem; }
  .btn-block { min-height: 52px; padding: 14px 18px; }

  /* Nav toggle + theme toggle — explicit tap floor. Without this
     the icon-only buttons end up ~28px tall on mobile and people
     miss-tap constantly. */
  .nav-toggle,
  .theme-toggle,
  .user-menu-trigger,
  .modal-close {
    min-width: var(--tap-min);
    min-height: var(--tap-min);
  }

  /* Modal sheet — push the close button clear of the swipe-down
     gesture zone (the bottom 20px on iOS). The card already has
     `padding-bottom: var(--safe-bottom)` from the base styles. */
  .modal { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-card { padding-top: 22px; }

  /* OTP cells — slightly bigger fingers, tighter gap so the 6
     cells fit cleanly on a 320px-wide Galaxy Fold cover or an
     older Samsung J-series. */
  .otp-cell { width: 44px; height: 52px; font-size: 1.35rem; }
  .otp-grid { gap: 6px; justify-content: space-between; }

  /* Hero — hide the phone mockup on short-narrow phones (the
     "smallest" tier: <360px wide, e.g. Galaxy Fold cover) so
     the headline + CTAs get all the room. */
  .hero-art { max-width: 220px; margin: 0 auto; }
  .hero-art .phone-frame { max-width: 220px; }

  /* Footer — single-column on phones, logo on top, columns stacked. */
  .foot-bottom-row { flex-direction: column; gap: 6px; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Hide decorative SVGs in disabled nav links (they eat width
     on tiny viewports where the inline icon chip already gives
     enough affordance). */
  .user-menu-ico { display: none; }

  /* Long email / phone strings inside the user-menu trigger
     shouldn't blow out the header — truncate with ellipsis. */
  .user-menu-number {
    max-width: 9ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Hero CTAs — full-width on phones so the Subscribe / Download
     APK stack vertically instead of squeezing onto one row. */
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }

  /* Final CTA — same stack treatment. */
  .cta-row { flex-direction: column; gap: 12px; align-items: stretch; }
  .cta-row .btn { width: 100%; }

  /* Pricing card — soften the inner padding on phones so the
     amount / bullets don't hug the screen edge. */
  .pricing-card { padding: 26px 18px; }

  /* Phone-input +880 prefix chip — keep all on one line on
     phones. The chip text + the 11-digit input fit at ~320px
     once the prefix shrinks. */
  .phone-prefix { font-size: 0.95rem; }
  .phone-input { gap: 8px; }

  /* User menu panel — width-aware on phones so it doesn't bleed
     off the right edge of small screens. */
  .user-menu-panel {
    right: -8px;
    width: max-content;
    max-width: calc(100vw - 32px);
  }
}
.disclaimer {
  font-size: 0.85rem;
  color: var(--ink-500);
  margin-top: 8px;
}

/* ---------- Final CTA ---------- */
.cta {
  background:
    radial-gradient(800px 400px at 20% 100%, var(--cta-bg-1) 0%, var(--cta-bg-2) 70%);
  color: var(--cta-text);
  padding: 48px 0;
}
.cta h2 { color: var(--cta-text); font-size: clamp(1.5rem, 5.5vw, 2.4rem); }
.cta p  { color: var(--cta-text-muted); margin: 0 auto 18px; font-size: 0.98rem; }
.cta .btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}
.cta .btn-primary:hover { background: var(--btn-primary-bg-hover); }
.cta-inner {
  text-align: center;
  position: relative;
}
.cta-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin: 28px auto 0;
  box-shadow: var(--shadow-lg);
}
/* Stack CTAs full-width on phones so thumbs can land cleanly. */
.cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0 auto 16px;
  max-width: 360px;
}
.cta-row .btn { width: 100%; min-height: var(--tap-min); padding: 14px 22px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 28px;
}
.foot-brand { display: flex; flex-direction: column; }
.foot-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.foot-brand h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.foot-brand p { color: var(--ink-500); font-size: 0.92rem; }

.foot-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-700);
  margin-bottom: 10px;
}
.foot-col ul { display: grid; gap: 8px; }
.foot-col a { color: var(--ink-700); font-size: 0.92rem; }
.foot-col a:hover { color: var(--purple-700); }

.foot-bottom {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.foot-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--ink-500);
  gap: 4px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive (mobile-first progressive enhancement) ----------
   Base styles above are the mobile layout. Each min-width block below
   widens the layout for tablets and desktops. */

/* Large phones / portrait tablets ≥560px: tighter mobile feel grows
   into more comfortable spacing but stays single-column. */
@media (min-width: 560px) {
  .container { padding-left: max(20px, calc(var(--safe-left) + 12px));
               padding-right: max(20px, calc(var(--safe-right) + 12px)); }
  h1 { font-size: clamp(2rem, 6vw, 2.6rem); }
  h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
  .hero { padding: 48px 0 56px; }
  .lede { font-size: 1.05rem; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 1.05rem; }
  .price-line { padding: 14px 16px; }
  .pricing-card { padding: 32px 24px; }
  .price .amount { font-size: 3rem; }
  .cta { padding: 64px 0; }
  .site-footer { padding-top: 48px; }
  .foot-bottom-row { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Tablet ≥720px: 2-column grid, inline CTAs, full nav visible,
   modal centers as a floating card instead of bottom sheet. */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-direction: row;
    position: static;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    padding: 0;
    max-height: none;
    overflow: visible;
    animation: none;
  }
  .nav-links a {
    padding: 0;
    min-height: 0;
    display: inline;
    border-radius: 0;
  }
  .nav-links a:active { background: transparent; }
  .nav-links .subscribe-btn {
    margin-top: 0;
    justify-content: center;
    padding: 8px 16px;
    min-height: 0;
  }
  .user-menu { width: auto; }
  .user-menu-trigger {
    width: auto;
    justify-content: center;
    padding: 6px 12px 6px 10px;
    min-height: 0;
  }
  .user-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: auto;
    min-width: 240px;
    margin-top: 0;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--line);
    transform: translateY(-4px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    display: flex;
  }
  .user-menu-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .user-menu-item { padding: 10px 12px; min-height: 0; }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { gap: 22px; }
  .card { padding: 22px; }
  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 22px;
  }
  .step-num { flex: 0 0 44px; width: 44px; height: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: none;
  }
  .cta-row .btn { width: auto; min-height: 0; padding: 16px 30px; }

  /* Modal: center as a floating card with rounded corners. */
  .modal {
    align-items: center;
    padding: 20px;
  }
  .modal-card {
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    padding: 32px 28px 24px;
    border-radius: 18px;
    animation: modal-rise .25s cubic-bezier(.2,.7,.3,1.2);
  }
  @keyframes modal-rise {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
  }
  .modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
  .modal-head { margin-bottom: 20px; }
  .modal-head h2 { font-size: 1.4rem; }
}

/* Desktop ≥960px: 2-col hero, 3 & 4 col grids, 3 phone row, full footer. */
@media (min-width: 960px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }
  .hero-art { order: 0; max-width: none; }
  .hero-art .phone-frame { max-width: 300px; }
  .hero-ctas { flex-direction: row; align-items: center; }
  .hero-ctas .btn { width: auto; padding: 12px 22px; min-height: 0; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }

  .phones-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    flex-wrap: nowrap;
    overflow: visible;
    margin: 0 auto;
    padding: 0;
    gap: 36px;
    max-width: 880px;
    align-items: end;
  }
  .phones-grid > * {
    flex: 0 0 auto;
    max-width: 220px;
  }
  .phones-grid .phone-frame.phone-sm { max-width: 220px; }
}

/* Reduce overscroll bounce on iOS so the page doesn't show a
   blank bar above the sticky header when scrolling into the top. */
body { overscroll-behavior-y: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* =========================================================
   SUBSCRIBE MODAL
   ========================================================= */
.modal[hidden] { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: modal-fade .2s ease;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 25, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 28px 18px max(18px, var(--safe-bottom));
  padding-left:  max(18px, calc(var(--safe-left)  + 14px));
  padding-right: max(18px, calc(var(--safe-right) + 14px));
  animation: sheet-up .28s cubic-bezier(.2,.7,.3,1.1);
}
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: var(--tap-min);
  height: var(--tap-min);
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  color: var(--ink-700, #2c3a32);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.modal-close:hover { background: rgba(0,0,0,0.08); }
.modal-close:focus-visible { outline: 2px solid var(--purple-600, #6B2BD9); outline-offset: 2px; }

/* Step panes */
.step-pane { display: none; }
.step-pane.is-active { display: block; animation: step-fade .25s ease; }
.step-pane[hidden] { display: none; }

@keyframes step-fade {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.modal-head { margin-bottom: 20px; }
.modal-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple-600, #6B2BD9);
  background: rgba(42,90,61,0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.modal-head h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-900, #1F1733);
  margin: 0 0 6px;
  font-family: var(--font-display);
}
.modal-head p {
  margin: 0;
  color: var(--ink-500, #6B6485);
  font-size: 0.92rem;
}

.modal-form { display: flex; flex-direction: column; gap: 16px; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700, #3D3258);
}
.field-hint { font-size: 0.78rem; color: var(--ink-500, #6B6485); }

.phone-input {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line, #E6DEF0);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.phone-input:focus-within {
  border-color: var(--purple-600, #6B2BD9);
  box-shadow: 0 0 0 3px rgba(42,90,61,0.12);
}
.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(42,90,61,0.06);
  color: var(--ink-700, #3D3258);
  font-weight: 600;
  font-size: 0.95rem;
  border-right: 1px solid var(--line, #E6DEF0);
}
.phone-input input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  color: var(--ink-900, #1F1733);
  letter-spacing: 0.5px;
}

/* Price tag */
.price-tag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--orange-100) 0%, var(--orange-50) 100%);
  border: 1px dashed var(--orange-500);
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--ink-700, #3D3258);
  text-align: center;
}
.price-tag strong { font-size: 1.05rem; color: var(--purple-700, #5B2BB8); }
.price-tag small { font-size: 0.78rem; color: var(--ink-500, #6B6485); }

/* Error */
.modal-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.08);
  color: #b02a37;
  font-size: 0.88rem;
  border: 1px solid rgba(220, 53, 69, 0.18);
}
.modal-error[hidden] { display: none; }

/* Soft informational hint — used by the cold-start gate
   when it re-opens the modal for a phone that's no longer
   subscribed upstream. Reads like a banner, not an error. */
.modal-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(91, 43, 184, 0.08);
  color: var(--purple-700);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Buttons inside modal */
.btn-block { width: 100%; justify-content: center; padding: 14px 20px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--purple-600, #6B2BD9);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--purple-700, #5B2BB8); }

/* =========================================================
   UNSUBSCRIBE MODAL + USER ACCOUNT MENU
   ========================================================= */

/* Red-tinted eyebrow for destructive flows */
.modal-eyebrow-danger {
  color: var(--btn-danger-bg);
  background: rgba(198, 40, 40, 0.1);
}

/* Subtle shake to draw attention when an error appears inside
   the unsubscribe confirmation */
.modal-danger .modal-card { border-top: 4px solid var(--btn-danger-bg); }

/* ---------------------------------------------------------
   Header user-menu trigger + dropdown
   Only visible after a successful subscription. Trigger
   shows the last 4 digits of the phone; the panel hosts
   Download APK, Unsubscribe, and Log out actions.
   --------------------------------------------------------- */
.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* Browsers default [hidden] to `display: none`, but our `display:
   inline-flex` above is more specific, so we re-assert the hidden
   state explicitly. Without this, the menu stays visible after
   unsubscribe even though `els.userMenu.hidden = true`. */
.user-menu[hidden] { display: none; }

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  background: var(--bg-alt, rgba(0, 0, 0, 0.03));
  color: var(--ink-900);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.user-menu-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.16);
}
.user-menu-trigger:focus-visible {
  outline: 2px solid var(--purple-600, #6B2BD9);
  outline-offset: 2px;
}
.user-menu-trigger[aria-expanded="true"] {
  background: var(--purple-100, #EFE5FB);
  border-color: var(--purple-600, #6B2BD9);
  color: var(--purple-900, #3A1A87);
}
.user-menu-avatar {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  background: var(--purple-100, #EFE5FB);
  color: var(--purple-700, #5B2BB8);
  border-radius: 50%;
  font-size: 0.95rem;
  line-height: 1;
}
.user-menu-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.user-menu-caret {
  transition: transform .15s ease;
  opacity: 0.75;
}
.user-menu-trigger[aria-expanded="true"] .user-menu-caret {
  transform: rotate(180deg);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--bg, #fff);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.user-menu-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
[data-theme="dark"] .user-menu-panel {
  background: #1A1F25;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .user-menu-trigger {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink-900);
}
[data-theme="dark"] .user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .user-menu-avatar {
  background: rgba(127, 184, 154, 0.25);
  color: #C5E8D5;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-900);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  transition: background .12s ease;
}
.user-menu-item:hover,
.user-menu-item:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  text-decoration: none;
  outline: none;
}
[data-theme="dark"] .user-menu-item:hover,
[data-theme="dark"] .user-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}
.user-menu-item-danger { color: var(--btn-danger-bg, #b3261e); }
.user-menu-item-danger:hover,
.user-menu-item-danger:focus-visible {
  background: rgba(179, 38, 30, 0.08);
}

.user-menu-ico {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  flex-shrink: 0;
}
.user-menu-item-danger .user-menu-ico {
  background: rgba(179, 38, 30, 0.12);
  color: var(--btn-danger-bg, #b3261e);
}
[data-theme="dark"] .user-menu-ico {
  background: rgba(255, 255, 255, 0.08);
}
.user-menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.user-menu-text strong {
  font-weight: 600;
  font-size: 0.92rem;
}
.user-menu-text small {
  font-size: 0.78rem;
  color: var(--ink-600, rgba(0, 0, 0, 0.6));
}
[data-theme="dark"] .user-menu-text small {
  color: rgba(255, 255, 255, 0.6);
}

/* Phone + price summary inside the unsubscribe modal */
.unsubscribe-summary {
  background: var(--bg-alt, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 4px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.unsubscribe-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.9rem;
}
.unsubscribe-label {
  color: var(--ink-500, #6B6485);
  font-weight: 500;
}
.unsubscribe-value {
  color: var(--ink-900, #1F1733);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .unsubscribe-summary {
  background: rgba(255, 255, 255, 0.04);
}
:root[data-theme="dark"] .unsubscribe-value { color: var(--purple-100, #EFE5FB); }

.modal-foot {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--ink-500, #6B6485);
  text-align: center;
}
.modal-foot.muted { color: var(--ink-500, #6B6485); }
.muted { color: var(--ink-500, #6B6485); }
.small { font-size: 0.82rem; }

/* OTP grid */
.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.otp-cell {
  aspect-ratio: 1;
  width: 100%;
  border: 1.5px solid var(--line, #E6DEF0);
  border-radius: 12px;
  background: var(--bg-alt);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  color: var(--ink-900, #1F1733);
  transition: border-color .15s ease, box-shadow .15s ease;
  caret-color: var(--purple-600, #6B2BD9);
}
.otp-cell:focus {
  outline: 0;
  border-color: var(--purple-600, #6B2BD9);
  box-shadow: 0 0 0 3px rgba(42,90,61,0.12);
}
.otp-cell.is-filled {
  background: rgba(42,90,61,0.06);
  border-color: var(--purple-600, #6B2BD9);
}

/* Success */
.success-state {
  text-align: center;
  padding: 8px 0;
}
.success-check {
  display: inline-flex;
  margin-bottom: 12px;
  animation: pop-in .4s cubic-bezier(.2,.7,.3,1.4);
}
@keyframes pop-in {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
.success-state h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: var(--ink-900, #1F1733);
}
.success-state p { margin: 0 0 18px; color: var(--ink-700, #3D3258); font-size: 0.95rem; }
.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

/* Header status pill (subscribed indicator) */
.subscribe-btn.is-subscribed {
  background: rgba(42,90,61,0.12);
  color: var(--purple-700, #5B2BB8);
  border-color: rgba(42,90,61,0.3);
}
.subscribe-btn.is-subscribed::before {
  content: "✓ ";
  font-weight: 700;
}

/* Lock body scroll when modal open */
body.modal-open { overflow: hidden; }

/* Same lock for the mobile nav sheet — only meaningful on small
   viewports because the desktop nav doesn't use `.is-open`. */
body.nav-open { overflow: hidden; }

/* On narrow phones the OTP grid stays legible without wrapping. */
@media (max-width: 480px) {
  .otp-cell { font-size: 1.35rem; }
  .otp-grid { gap: 6px; }
  .modal-card .btn-block { min-height: var(--tap-min); padding: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .modal, .modal-card, .step-pane.is-active, .success-check { animation: none; }
  .btn-spinner { animation: none; }
  body, .card, .cat-tile, .btn, .modal-card, .modal-overlay, input, .phone-input {
    transition: none !important;
  }
}

/* =========================================================
   THEME TOGGLE
   ========================================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Mobile-friendly hit area; the visual circle stays at 36px. */
  width: var(--tap-min);
  height: var(--tap-min);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-700);
  cursor: pointer;
  padding: 0;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.theme-toggle:hover {
  background: var(--bg-alt);
  color: var(--purple-700);
  border-color: var(--purple-600);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--purple-600);
  outline-offset: 2px;
}
.theme-toggle:active { transform: scale(0.94); }

/* Show sun in light mode, moon in dark */
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: inline-block; }
