/* ──────────────────────────────────────────────────────────────
   Penlify — pet-grooming inspired theme.
   Cream + navy + lime, chunky borders, pill buttons, soft shadows.
   ────────────────────────────────────────────────────────────── */

:root {
  --cream: #FFFBEA;
  --cream-2: #F6F0D6;
  --navy: #060B2D;
  --navy-soft: #1A2050;
  --lime: #B6F500;
  --lime-deep: #9FDB00;
  --pink: #FF9ECF;
  --blue: #8EA2FF;
  --white: #FFFFFF;
  --gray: #6B7280;
  --gray-2: #E5E2D2;
  --danger: #FF5C5C;
  --success: #22C55E;

  --bg: var(--cream);
  --surface: var(--white);
  --text: var(--navy);
  --muted: #5A608A;
  --border: var(--navy);

  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --shadow: 6px 8px 0 var(--navy);
  --shadow-soft: 0 10px 30px rgba(6, 11, 45, 0.10);
  --shadow-card: 4px 6px 0 var(--navy);

  --max-w: 1180px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Settings → Preferences → Reduce motion. Kills the site's own transitions;
   browser/OS-level prefers-reduced-motion is handled separately by the OS. */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  transition-duration: 0.001ms !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

/* Settings → Preferences → Theme. Retheme by flipping the raw palette tokens
   (not just the mostly-unused --bg/--text/--border alias layer, which very
   little of this file actually references) — --lime/--pink/--blue/--danger/
   --success stay their original bright values in both themes; only the
   neutral cream/white/navy/gray tokens invert. */
[data-theme="dark"] {
  --cream: #0A0D22;
  --cream-2: #11142C;
  --white: #1B2044;
  --navy: #F2F1F7;
  --navy-soft: #333B72;
  --gray-2: #262B52;
  --muted: #9297C2;
}

[data-theme="dark"] .hero p.lead {
  color: #C8CDEE;
}

/* A handful of components pair navy TEXT directly with a lime/pink/blue
   ACCENT background (buttons, active nav state, badges, the success toast,
   checked checkboxes) rather than with the neutral white/cream that just
   flipped above. Those accent backgrounds never invert, so their paired text
   must stay pinned to the literal navy ink or it goes unreadable (light text
   on a still-bright accent color). Everything else in the file pairs navy
   with a neutral bg and is safe to let flip via the token override above. */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-pink,
[data-theme="dark"] .btn-blue,
[data-theme="dark"] .plan.featured::after,
[data-theme="dark"] .plan.featured h3,
[data-theme="dark"] .plan.featured .price,
[data-theme="dark"] .plan.featured ul li,
[data-theme="dark"] .plan li::before,
[data-theme="dark"] .feature-icon.lime,
[data-theme="dark"] .feature-icon.pink,
[data-theme="dark"] .feature-icon.blue,
[data-theme="dark"] .usecase.lime .uc-icon,
[data-theme="dark"] .usecase.pink .uc-icon,
[data-theme="dark"] .usecase.blue .uc-icon,
[data-theme="dark"] .stat-card.lime .stat-body small,
[data-theme="dark"] .stat-card.lime .stat-body strong,
[data-theme="dark"] .stat-card.lime .stat-body span.sub,
[data-theme="dark"] .stat-card.pink .stat-body small,
[data-theme="dark"] .stat-card.pink .stat-body strong,
[data-theme="dark"] .stat-card.pink .stat-body span.sub,
[data-theme="dark"] .stat-card.blue .stat-body small,
[data-theme="dark"] .stat-card.blue .stat-body strong,
[data-theme="dark"] .stat-card.blue .stat-body span.sub,
[data-theme="dark"] .side-link.active,
[data-theme="dark"] .toast.success,
[data-theme="dark"] .ctl-checkbox-input:checked + .ctl-checkbox-box,
[data-theme="dark"] .user-chip .avatar,
[data-theme="dark"] .usage-pill.lime,
[data-theme="dark"] .usage-pill.pink {
  color: #060B2D;
}

/* .btn-secondary/.stat-icon/.meter-ring::after/.usage-pill all use
   `background: var(--white)` and typically sit INSIDE another var(--white)
   container (a card/panel) — in light mode that's a white-on-white chip with
   a border doing the separating, which reads fine, but in dark mode --white
   is now a dark navy, so the chip becomes invisible against its own
   container. Give them --navy-soft instead so they stay visually distinct. */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .stat-icon,
[data-theme="dark"] .meter-ring::after,
[data-theme="dark"] .usage-pill:not(.lime):not(.pink) {
  background: var(--navy-soft);
}

/* .error-msg and .sentence-line.* use literal hex instead of the variable
   system (the only two spots in this file that do), so they need their own
   explicit dark variants. */
[data-theme="dark"] .error-msg { background: #4A1414; color: #FFB3B3; }
[data-theme="dark"] .sentence-line.high { background: #4A1414; }
[data-theme="dark"] .sentence-line.mid  { background: #4A3D14; }
[data-theme="dark"] .sentence-line.low  { background: #1E3A14; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ── Decorative blobs ─────────────────────── */
.blob {
  position: absolute; border-radius: 50%; filter: blur(0);
  pointer-events: none; z-index: 0;
}
.blob.lime  { background: var(--lime);  }
.blob.pink  { background: var(--pink);  }
.blob.blue  { background: var(--blue);  }
.blob.outline {
  background: transparent;
  border: 2px solid var(--navy);
}

/* ── Nav ──────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--navy);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 20px; color: var(--navy);
  letter-spacing: -.01em;
}
.brand img {
  width: 38px; height: 38px; border-radius: 10px;
  border: 2px solid var(--navy);
}
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--navy); font-size: 15px; font-weight: 600;
  text-decoration: none;
}
.nav-links a:hover { color: var(--lime-deep); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* Hamburger — hidden on desktop, shown under 760px. */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 2px solid var(--navy);
  border-radius: 12px; cursor: pointer;
}
.nav-toggle-bar {
  display: block; width: 20px; height: 2.5px; margin: 0 auto;
  background: var(--navy); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-inner { height: 64px; position: relative; }
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 18px;
    padding: 20px 24px 24px;
    background: var(--cream);
    border-bottom: 2px solid var(--navy);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 18px; }
  .nav-links a { font-size: 17px; }
  .nav-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .nav-cta .btn { width: 100%; }
}

/* ── Buttons (pill, chunky) ──────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: 2px solid var(--navy);
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
  text-decoration: none; white-space: nowrap;
  font-family: inherit;
  box-shadow: 3px 4px 0 var(--navy);
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 5px 0 var(--navy); text-decoration: none; }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--navy); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 3px 4px 0 var(--navy); }
.btn-primary { background: var(--lime); color: var(--navy); }
.btn-secondary { background: var(--white); color: var(--navy); }
.btn-pink { background: var(--pink); color: var(--navy); }
.btn-blue { background: var(--blue); color: var(--navy); }
.btn-ghost {
  background: transparent; color: var(--navy);
  border: 2px solid transparent; box-shadow: none;
}
.btn-ghost:hover { background: rgba(6,11,45,.06); transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ── Pill chips / eyebrow ──────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--white); border: 2px solid var(--navy);
  font-size: 13px; font-weight: 700; color: var(--navy);
}
.chip .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
}

/* ── Hero ──────────────────────────────────── */
.hero { position: relative; padding: 80px 0 100px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center;
  position: relative; z-index: 1;
}
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; } }
.hero h1 {
  font-size: clamp(40px, 6vw, 72px); line-height: 1.02; margin: 18px 0 22px;
  letter-spacing: -0.035em; font-weight: 800; color: var(--navy);
}
.hero h1 .lime-pill {
  display: inline-block; background: var(--lime); padding: 2px 18px 6px;
  border-radius: 14px; border: 2px solid var(--navy);
  transform: rotate(-1deg);
}
.hero p.lead {
  font-size: 18px; color: var(--navy-soft); max-width: 520px; margin: 0 0 30px;
}
@media (max-width: 920px) { .hero p.lead { margin-left: auto; margin-right: auto; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 920px) { .hero-actions { justify-content: center; } }

.hero-visual {
  position: relative; aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.hero-stage {
  position: relative; width: 88%; aspect-ratio: 1 / 1;
  background: var(--lime); border: 2px solid var(--navy);
  border-radius: 48% 52% 60% 40% / 50% 45% 55% 50%;
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.hero-stage img {
  width: 70%; border-radius: 28px; border: 2px solid var(--navy);
  background: var(--white);
}
.hero-badge {
  position: absolute; background: var(--white);
  border: 2px solid var(--navy); border-radius: 18px;
  padding: 12px 16px; box-shadow: var(--shadow-card);
  display: flex; gap: 10px; align-items: center; font-weight: 700;
}
.hero-badge .icon-box {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  border: 2px solid var(--navy);
}
.hero-badge .ib-pink { background: var(--pink); }
.hero-badge .ib-blue { background: var(--blue); }
.hero-badge.tl { top: 4%; left: -4%; transform: rotate(-4deg); }
.hero-badge.br { bottom: 6%; right: -6%; transform: rotate(4deg); }
.hero-badge small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }

/* hero floating decoration */
.hero .blob.b1 { width: 220px; height: 220px; left: -80px; top: 40px; background: var(--pink); opacity: .55; }
.hero .blob.b2 { width: 140px; height: 140px; right: -40px; bottom: -40px; background: var(--blue); opacity: .55; }

/* ── Sections ─────────────────────────────── */
section { padding: 90px 0; position: relative; }
.section-title {
  text-align: center; font-size: clamp(30px, 4vw, 44px); margin: 0 0 14px;
  letter-spacing: -0.025em; font-weight: 800; color: var(--navy);
}
.section-sub {
  text-align: center; color: var(--muted); max-width: 560px;
  margin: 0 auto 56px; font-size: 16px;
}

/* ── Feature grid ─────────────────────────── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform .15s, box-shadow .15s;
}
.feature:hover { transform: translate(-2px,-2px); box-shadow: 6px 8px 0 var(--navy); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 18px;
  border: 2px solid var(--navy);
  display: grid; place-items: center; margin-bottom: 18px;
  font-size: 24px; color: var(--navy);
}
.feature-icon.lime { background: var(--lime); }
.feature-icon.pink { background: var(--pink); }
.feature-icon.blue { background: var(--blue); }
.feature h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── Pricing ─────────────────────────────── */
.section-cream2 { background: var(--cream-2); border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy); }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }
.plan {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.plan.featured { background: var(--lime); }
.plan.featured .price small,
.plan.featured ul li { color: var(--navy); }
.plan.featured::after {
  content: 'POPULAR';
  position: absolute; top: -14px; right: 24px;
  background: var(--pink); color: var(--navy);
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  padding: 6px 12px; border-radius: var(--radius-pill);
  border: 2px solid var(--navy);
}
.plan h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--navy); }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--navy); }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--navy); align-items: center; }
.plan li::before {
  content: '\ea10'; font-family: 'icomoon';
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--navy);
  display: grid; place-items: center;
  font-size: 11px; color: var(--navy); flex: none;
}
.plan.featured li::before { background: var(--white); }

/* ── Auth ─────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: grid; place-items: center; padding: 60px 20px;
  position: relative; overflow: hidden;
}
.auth-wrap .blob.b1 { width: 260px; height: 260px; top: -60px; left: -80px; background: var(--lime); opacity: .55; }
.auth-wrap .blob.b2 { width: 200px; height: 200px; bottom: -60px; right: -40px; background: var(--pink); opacity: .5; }
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); margin: 0 0 28px; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--navy); font-weight: 700; }
.input, textarea.input, select.input {
  width: 100%;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--cream); border: 2px solid var(--navy);
  color: var(--navy); font: inherit; font-size: 15px;
  font-family: inherit;
  transition: box-shadow .15s, transform .1s;
}
.input:focus, textarea.input:focus, select.input:focus {
  outline: none;
  box-shadow: 3px 3px 0 var(--navy);
  transform: translate(-1px,-1px);
}
textarea.input { resize: vertical; min-height: 160px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.divider {
  text-align: center; color: var(--muted); font-size: 12px;
  margin: 22px 0; position: relative; font-weight: 600; letter-spacing: .1em;
}
.divider::before, .divider::after {
  content: ''; position: absolute; top: 50%; width: 38%; height: 2px; background: var(--navy);
  opacity: .15;
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.auth-footer { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth-footer a { font-weight: 700; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px 18px; border-radius: var(--radius-pill);
  background: var(--white); color: var(--navy); border: 2px solid var(--navy);
  font-weight: 700; font-size: 15px; cursor: pointer; font-family: inherit;
  box-shadow: 3px 4px 0 var(--navy);
  transition: transform .12s, box-shadow .12s;
}
.btn-google:hover { transform: translate(-1px,-1px); box-shadow: 4px 5px 0 var(--navy); }
.btn-google:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--navy); }
.btn-google svg { width: 18px; height: 18px; flex: none; }

.error-msg {
  background: #FFE6E6;
  border: 2px solid var(--danger);
  color: #B11414; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px; font-weight: 600;
}

/* ── Steps (How it works) ────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 36px 28px 28px;
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; top: -22px; left: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--navy);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800; color: var(--navy);
  box-shadow: 3px 4px 0 var(--navy);
}
.step h3 { margin: 8px 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--cream-2); border: 2px solid var(--navy);
  font-size: 18px; margin-bottom: 8px;
}

/* ── Use cases ──────────────────────────── */
.usecases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .usecases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .usecases { grid-template-columns: 1fr; } }
.usecase {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, box-shadow .15s;
}
.usecase:hover { transform: translate(-2px,-2px); box-shadow: 6px 8px 0 var(--navy); }
.usecase .uc-icon {
  width: 44px; height: 44px; border-radius: 14px;
  border: 2px solid var(--navy); display: grid; place-items: center;
  font-size: 20px; color: var(--navy);
}
.usecase.lime .uc-icon { background: var(--lime); }
.usecase.pink .uc-icon { background: var(--pink); }
.usecase.blue .uc-icon { background: var(--blue); }
.usecase.cream .uc-icon { background: var(--cream-2); }
.usecase h4 { margin: 0; font-size: 17px; font-weight: 800; }
.usecase p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ── Testimonials ───────────────────────── */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.testimonial .quote-mark {
  position: absolute; top: -16px; left: 22px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--navy);
  display: grid; place-items: center; font-size: 16px;
  box-shadow: 3px 3px 0 var(--navy);
}
.testimonial blockquote {
  margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--navy);
  font-weight: 500;
}
.testimonial .who {
  display: flex; align-items: center; gap: 12px;
  padding-top: 14px; border-top: 2px dashed var(--gray-2);
}
.testimonial .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--navy); display: grid; place-items: center;
  font-weight: 800; color: var(--navy); font-size: 15px;
}
.testimonial .who-info strong { display: block; font-size: 14.5px; font-weight: 800; color: var(--navy); }
.testimonial .who-info span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ── FAQ ────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 20px 24px; font-size: 16px; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--navy);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800; flex: none;
  transition: transform .2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-body {
  padding: 0 24px 22px; color: var(--muted); font-size: 15px; line-height: 1.6;
}

/* ── CTA band ───────────────────────────── */
.cta-band {
  background: var(--lime); border: 2px solid var(--navy);
  border-radius: var(--radius-lg); padding: 56px 40px;
  box-shadow: var(--shadow); text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before, .cta-band::after {
  content: ''; position: absolute; border-radius: 50%;
  border: 2px solid var(--navy); pointer-events: none;
}
.cta-band::before { width: 120px; height: 120px; top: -40px; left: -40px; background: var(--pink); }
.cta-band::after  { width: 160px; height: 160px; bottom: -60px; right: -50px; background: var(--blue); }
.cta-band h2 {
  position: relative; z-index: 1;
  font-size: clamp(28px, 4vw, 42px); margin: 0 0 12px;
  font-weight: 800; letter-spacing: -.025em; color: var(--navy);
}
.cta-band p { position: relative; z-index: 1; max-width: 520px; margin: 0 auto 24px; color: var(--navy); font-size: 16px; }
.cta-band .hero-actions { position: relative; z-index: 1; }

/* ── Logo strip (lightweight social proof) ─ */
.logo-strip {
  display: flex; gap: 36px; flex-wrap: wrap; align-items: center; justify-content: center;
  padding: 28px 0; opacity: .75;
}
.logo-strip span {
  font-weight: 800; font-size: 16px; letter-spacing: .04em;
  color: var(--navy); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.logo-strip span [class^="icon-"] { font-size: 20px; }

/* ── App workspace (focused, single column) ──── */
.app-shell { padding: 40px 0 100px; }
.app-shell .container { max-width: 880px; }

/* ── Material Symbols icon font (same as the mobile app) ── */
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/MaterialSymbolsRounded-Filled.ttf') format('truetype');
  font-display: block;
}
.msym {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  word-wrap: normal; direction: ltr; display: inline-block;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased; user-select: none;
}

/* ── Left sidebar nav for the signed-in app (web equivalent of BottomTabs) ── */
.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 244px; z-index: 60;
  background: var(--white); border-right: 2.5px solid var(--navy);
  display: flex; flex-direction: column; padding: 22px 16px;
}
.app-sidebar .brand { margin: 0 8px 22px; }
.side-links { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.side-link {
  display: flex; align-items: center; gap: 13px; padding: 11px 14px;
  border-radius: 14px; color: var(--navy); font-weight: 700; font-size: 15px;
  border: 2px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.side-link:hover { background: var(--cream); text-decoration: none; }
.side-link .msym { font-size: 23px; color: var(--muted); flex-shrink: 0; }
.side-link.active { background: var(--lime); border-color: var(--navy); }
.side-link.active .msym { color: var(--navy); }
.side-foot { margin-top: auto; padding-top: 12px; }
.side-foot .btn { width: 100%; }

body.has-sidebar .app-shell { padding-left: 244px; }
body.has-sidebar .footer { padding-left: 244px; }

@media (max-width: 860px) {
  /* Sidebar collapses to a bottom tab bar (icon-only, fits 7 items). */
  .app-sidebar {
    top: auto; right: 0; bottom: 0; width: auto; height: 64px;
    flex-direction: row; padding: 0;
    border-right: none; border-top: 2.5px solid var(--navy);
  }
  .app-sidebar .brand, .side-foot { display: none; }
  .side-links { flex-direction: row; gap: 0; }
  .side-link {
    flex: 1; flex-direction: column; gap: 0; justify-content: center;
    padding: 0; border-radius: 0; border: none; font-size: 0;
  }
  .side-link .msym { font-size: 24px; }
  .side-link.active { background: transparent; }
  .side-link.active .msym { color: var(--lime-deep); }
  body.has-sidebar .app-shell { padding-left: 0; padding-bottom: 84px; }
  body.has-sidebar .footer { padding-left: 0; padding-bottom: 76px; }
}

.kb-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 10px 0 0; font-size: 12px; color: var(--muted); font-weight: 600;
}
.kbd {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  border: 1.5px solid var(--navy); background: var(--cream);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px; font-weight: 700; color: var(--navy);
  box-shadow: 0 1px 0 var(--navy);
}
.input-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--navy); font-family: inherit; font-size: 13px;
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--lime); text-decoration-thickness: 2px;
}
.input-link:hover { color: var(--lime-deep); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 28px;
}
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 14px;
}
.stat-card.lime { background: var(--lime); }
.stat-card.pink { background: var(--pink); }
.stat-card.blue { background: var(--blue); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--white); border: 2px solid var(--navy);
  display: grid; place-items: center; font-size: 22px; flex: none;
}
.stat-body small { display: block; font-size: 12px; color: var(--navy);
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.stat-body strong { font-size: 22px; font-weight: 800; color: var(--navy); display: block; line-height: 1.1; margin-top: 2px; }
.stat-body span.sub { font-size: 12px; color: var(--navy); opacity: .65; font-weight: 600; }

.workspace-grid {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
}
@media (max-width: 960px) { .workspace-grid { grid-template-columns: 1fr; } }

.sidebar {
  display: flex; flex-direction: column; gap: 16px;
}
.side-card {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-card);
}
.side-card h4 {
  margin: 0 0 12px; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--navy); opacity: .65; font-weight: 800;
}
.tool-list { display: flex; flex-direction: column; gap: 8px; }
.tool-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  background: transparent; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 700; color: var(--navy); text-align: left;
  transition: background .12s;
}
.tool-item:hover { background: var(--cream); }
.tool-item.active { background: var(--lime); border-color: var(--navy); }
.tool-item [class^="icon-"] { font-size: 18px; }
.tool-item .badge {
  margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--pink); border: 2px solid var(--navy); font-weight: 800;
}

.history-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.history-item {
  text-align: left; background: var(--cream); border: 2px solid var(--navy);
  border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--navy);
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .1s, box-shadow .1s;
}
.history-item:hover { transform: translate(-1px,-1px); box-shadow: 2px 2px 0 var(--navy); }
.history-item .h-kind { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.history-item .h-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 12px 0; }

.upsell {
  background: var(--lime); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card);
}
.upsell h4 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.upsell p { margin: 0 0 14px; font-size: 13.5px; color: var(--navy); line-height: 1.5; }

.tool-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 10px;
}
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius-pill);
  background: var(--white); border: 2px solid var(--navy);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--navy); cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.icon-btn:hover { transform: translate(-1px,-1px); box-shadow: 2px 2px 0 var(--navy); }
.icon-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn [class^="icon-"] { font-size: 13px; }
.counter {
  margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 700;
}
.counter.warn { color: var(--danger); }

.tone-hint {
  font-size: 12.5px; color: var(--muted); margin: 4px 0 0;
  min-height: 1.4em; font-style: italic;
}

.detect-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.detect-stat {
  flex: 1; min-width: 110px;
  background: var(--cream); border: 2px solid var(--navy);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.detect-stat small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.detect-stat strong { display: block; font-size: 20px; font-weight: 800; margin-top: 2px; }

.sentence-line {
  display: flex; gap: 12px; padding: 10px 12px;
  border: 2px solid var(--navy); border-radius: var(--radius-sm);
  margin-bottom: 8px; background: var(--white);
  align-items: flex-start;
}
.sentence-line.high { background: #FFE6E6; }
.sentence-line.mid  { background: #FFF6D6; }
.sentence-line.low  { background: #E8FBD8; }
.sentence-score {
  flex: none; min-width: 48px; text-align: center;
  font-weight: 800; padding: 4px 8px; border-radius: 999px;
  border: 2px solid var(--navy); background: var(--white); font-size: 13px;
}
.sentence-text { font-size: 14px; line-height: 1.5; color: var(--navy); }

.tips-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px;
}
@media (max-width: 760px) { .tips-row { grid-template-columns: 1fr; } }
.tip {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-card);
  display: flex; gap: 12px; align-items: flex-start;
}
.tip-icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  border: 2px solid var(--navy); display: grid; place-items: center;
  font-size: 16px;
}
.tip h5 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.tip p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

.app-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.app-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.app-sub { color: var(--muted); margin: 6px 0 0; font-size: 14px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; background: var(--white);
  border: 2px solid var(--navy); border-radius: var(--radius-pill); font-size: 14px;
  font-weight: 600;
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lime); color: var(--navy); display: grid; place-items: center;
  font-weight: 800; font-size: 13px; border: 2px solid var(--navy);
}

.tabs {
  display: inline-flex; background: var(--white);
  border: 2px solid var(--navy); border-radius: var(--radius-pill); padding: 5px;
  margin-bottom: 24px; box-shadow: var(--shadow-card);
}
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700; cursor: pointer;
  color: var(--navy); border: none; background: transparent; font-family: inherit;
}
.tab.active { background: var(--lime); }
.tab [class^="icon-"] { font-size: 16px; }

.panel {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-card);
}
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .panel-grid { grid-template-columns: 1fr; } }

.controls { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 20px; }
.controls .field { flex: 1; min-width: 160px; margin: 0; }

.result-box {
  min-height: 240px;
  background: var(--cream); border: 2px solid var(--navy);
  border-radius: var(--radius-sm); padding: 18px;
  white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.65;
  color: var(--navy);
}
.result-empty { color: var(--muted); }

.meter {
  display: flex; align-items: center; gap: 16px;
  padding: 18px; background: var(--cream);
  border: 2px solid var(--navy); border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.meter-ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(var(--lime) var(--p,0%), var(--cream-2) 0);
  display: grid; place-items: center; position: relative;
  border: 2px solid var(--navy); flex: none;
}
.meter-ring::after {
  content: ''; position: absolute; width: 54px; height: 54px;
  border-radius: 50%; background: var(--white); border: 2px solid var(--navy);
}
.meter-ring span { position: relative; z-index: 1; font-weight: 800; font-size: 17px; }
.meter-info h4 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.meter-info p { margin: 0; font-size: 13px; color: var(--muted); }

.usage-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: 13px;
  background: var(--white); color: var(--navy);
  border: 2px solid var(--navy); font-weight: 700;
}
.usage-pill.lime { background: var(--lime); }
.usage-pill.pink { background: var(--pink); }
a.usage-pill:hover { text-decoration: none; transform: translate(-1px,-1px); }

/* ── Footer ─────────────────────────────── */
.footer {
  border-top: 2px solid var(--navy);
  padding: 36px 0; color: var(--navy); font-size: 14px;
  background: var(--cream-2);
}
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--navy); margin-left: 22px; font-weight: 600; }
.footer a:hover { color: var(--lime-deep); text-decoration: none; }
.footer-choice {
  margin-left: 22px;
  padding: 0;
  color: var(--navy);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.footer-choice:hover { color: var(--lime-deep); }

/* ── Legal pages ───────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 70px 24px 100px; }
.legal h1 { font-size: 44px; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 800; }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 36px; font-weight: 600; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; font-weight: 800; }
.legal p, .legal li { color: var(--navy); font-size: 15.5px; }
.legal ul { padding-left: 22px; }

/* ── Toast ─────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); border: 2px solid var(--navy); color: var(--white);
  padding: 14px 20px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100;
  box-shadow: var(--shadow-card);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--lime); color: var(--navy); }

.analytics-consent {
  position: fixed;
  z-index: 10000;
  right: 20px;
  bottom: 20px;
  width: min(560px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.analytics-consent strong { display: block; margin-bottom: 4px; }
.analytics-consent p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.analytics-consent a { text-decoration: underline; }
.analytics-consent-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}
.analytics-consent .btn { white-space: nowrap; }
@media (max-width: 700px) {
  .analytics-consent {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    align-items: stretch;
    flex-direction: column;
  }
  .analytics-consent-actions { justify-content: flex-end; }
}

/* ── Custom select (combobox) ─────────────────────────────
   Replaces native <select> where we need the chunky navy-border look for
   both the closed control and the open popover (native listbox popovers
   can't be restyled cross-browser). */
.ctl-select { position: relative; display: block; width: 100%; }
.ctl-select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--cream); border: 2px solid var(--navy);
  color: var(--navy); font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; text-align: left;
  transition: box-shadow .15s, transform .1s;
}
.ctl-select-trigger:hover { transform: translate(-1px,-1px); }
.ctl-select-trigger:focus-visible { outline: none; box-shadow: 3px 3px 0 var(--navy); }
.ctl-select-open .ctl-select-trigger { box-shadow: 3px 3px 0 var(--navy); }
.ctl-select-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-select-chevron { flex-shrink: 0; opacity: .7; font-size: 11px; transition: transform .15s; }
.ctl-select-open .ctl-select-chevron { transform: rotate(180deg); }

.ctl-select-menu {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  max-height: 280px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--white); border: 2.5px solid var(--navy); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.ctl-select-menu:focus { outline: none; }
.ctl-option {
  padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px;
  cursor: pointer; color: var(--navy); white-space: nowrap;
}
.ctl-option-active { background: var(--cream-2); }
.ctl-option-selected { background: var(--lime); font-weight: 800; }
.ctl-option-selected.ctl-option-active { background: var(--lime-deep); }

/* Flag-forward trigger (countries): the closed control shows only the flag
   glyph so it reads visually instead of as a wall of country names. */
.ctl-select.ctl-select-flags { display: inline-block; width: auto; min-width: 0; }
.ctl-select.ctl-select-flags .ctl-select-trigger { padding: 10px 12px; font-size: 20px; gap: 4px; }
/* The trigger is a small flag button, often sitting near the left edge of a
   narrow container (the profile edit modal, the leaderboard filter). Anchor
   the wider popover to the trigger's LEFT edge and let it grow rightward —
   anchoring to the right edge (the old `right:0` inherited from the base
   rule) made a 220px-wide menu grow leftward off-screen in exactly that
   layout. `right:auto` cancels the inherited `right:0` so width is free to
   follow `min-width` instead of being pinned between two edges. */
.ctl-select.ctl-select-flags .ctl-select-menu { min-width: 220px; max-width: calc(100vw - 32px); left: 0; right: auto; }

/* Real flag images (countryFlag() in gamification.js): Windows browsers render
   the two-letter Unicode regional-indicator emoji as plain text ("US", "GB")
   instead of composing them into a flag glyph, so a CDN image is used instead.
   The 'ww'/Global fallback stays a single-codepoint globe emoji, which every
   platform renders fine. */
.flag-icon { width: 20px; height: 15px; border-radius: 2px; vertical-align: middle; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.flag-globe { vertical-align: middle; }

/* ── Custom checkbox / toggle switch ─────────────────────── */
.ctl-checkbox, .ctl-toggle {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
}
.ctl-checkbox-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ctl-checkbox-box {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px;
  background: var(--cream); border: 2px solid var(--navy);
  display: flex; align-items: center; justify-content: center;
  color: transparent; transition: background .15s, color .15s, transform .1s;
}
.ctl-checkbox-tick { width: 14px; height: 14px; }
.ctl-checkbox-input:checked + .ctl-checkbox-box { background: var(--lime); color: var(--navy); }
.ctl-checkbox-input:focus-visible + .ctl-checkbox-box { box-shadow: 2px 2px 0 var(--navy); }
.ctl-checkbox:hover .ctl-checkbox-box { transform: translate(-1px,-1px); }
.ctl-checkbox-label { font-weight: 600; font-size: 15px; color: var(--navy); }

.ctl-toggle-track {
  width: 42px; height: 24px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--gray-2); border: 2px solid var(--navy);
  position: relative; transition: background .15s;
}
.ctl-toggle-thumb {
  position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--navy);
  transition: transform .15s;
}
.ctl-checkbox-input:checked + .ctl-toggle-track { background: var(--lime); }
.ctl-checkbox-input:checked + .ctl-toggle-track .ctl-toggle-thumb { transform: translateX(18px); }
.ctl-checkbox-input:focus-visible + .ctl-toggle-track { box-shadow: 2px 2px 0 var(--navy); }

/* ── Spinner ─────────────────────────────────
   Kept only for in-place button busy-states ("Signing in…", "Humanizing…")
   where there's no content shape to preview — a skeleton doesn't make sense
   for a single button label. Page/section content loading uses skeletons
   below instead, since those DO have a known shape worth previewing. */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor; animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton loaders ──────────────────────────
   Content-shaped placeholders for page/section loading states. Each page
   builds its skeleton from these primitives to roughly match its real
   layout, so nothing jumps around once data arrives. */
.skel {
  position: relative; overflow: hidden;
  background: var(--gray-2); border-radius: 8px;
  flex-shrink: 0;
}
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  transform: translateX(-100%);
  animation: skel-sweep 1.4s ease-in-out infinite;
}
@keyframes skel-sweep { to { transform: translateX(100%); } }
.skel-text { height: 14px; border-radius: 6px; }
.skel-title { height: 20px; border-radius: 7px; }
.skel-circle { border-radius: 50%; }
.skel-pill { height: 20px; border-radius: var(--radius-pill); }

/* ── IcoMoon Free (subset) ─────────────────────
   We only embed the codepoints actually used on the site. The font itself
   is the official IcoMoon-Free TTF served from jsdelivr; classes are
   declared here so we don't pull a giant icon catalog. */
@font-face {
  font-family: 'icomoon';
  src: url('/assets/fonts/IcoMoon-Free.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
[class^="icon-"], [class*=" icon-"] {
  font-family: 'icomoon' !important;
  speak: never; font-style: normal; font-weight: normal; font-variant: normal;
  text-transform: none; line-height: 1;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.icon-pencil::before          { content: '\e905'; }
.icon-quill::before           { content: '\e907'; }
.icon-copy::before            { content: '\e92c'; }
.icon-mobile::before          { content: '\e958'; }
.icon-user-plus::before       { content: '\e973'; }
.icon-search::before          { content: '\e986'; }
.icon-magic-wand::before      { content: '\e997'; }
.icon-stats-dots::before      { content: '\e99b'; }
.icon-rocket::before          { content: '\e9a5'; }
.icon-shield::before          { content: '\e9b4'; }
.icon-eye::before             { content: '\e9ce'; }
.icon-sun::before             { content: '\e9d4'; }
.icon-star-full::before       { content: '\e9d9'; }
.icon-checkmark::before       { content: '\ea10'; }
.icon-enter::before           { content: '\ea13'; }
.icon-play3::before           { content: '\ea1c'; }
.icon-arrow-up-right2::before { content: '\ea3b'; }
.icon-google::before          { content: '\ea88'; }
.icon-history::before         { content: '\e94d'; }
.icon-clock::before           { content: '\e94e'; }
.icon-cog::before             { content: '\e994'; }
.icon-clipboard::before       { content: '\e9b8'; }
.icon-file-text::before       { content: '\e922'; }

/* ── Growth pages: free tools, comparisons, and guides ────────────── */
.growth-hero {
  padding: 78px 0 58px;
  background: var(--cream);
  border-bottom: 2px solid var(--navy);
}
.growth-hero .container { max-width: 980px; }
.growth-hero h1 {
  max-width: 820px;
  margin: 18px auto;
  color: var(--navy);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-align: center;
}
.growth-hero .lead {
  max-width: 700px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}
.growth-hero .hero-actions { justify-content: center; }
.growth-kicker { text-align: center; }
.growth-shell { max-width: 980px; margin: 0 auto; }
.growth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.growth-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.growth-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.growth-card h2,
.growth-card h3 { margin: 0; color: var(--navy); }
.growth-card p { margin: 0; color: var(--muted); }
.growth-card .btn { margin-top: auto; align-self: flex-start; }
.growth-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--navy);
  background: var(--lime);
  border: 2px solid var(--navy);
  border-radius: 16px;
  font-size: 22px;
}
.trust-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.trust-line span {
  padding: 8px 12px;
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}
.analyzer-panel {
  padding: 30px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.analyzer-panel textarea {
  min-height: 250px;
  line-height: 1.65;
}
.analyzer-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
.analyzer-privacy {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.score-card {
  padding: 18px;
  text-align: center;
  background: var(--cream);
  border: 2px solid var(--navy);
  border-radius: 18px;
}
.score-card strong {
  display: block;
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
}
.score-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.issue-list { display: grid; gap: 12px; margin-top: 18px; }
.issue {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 16px;
  background: var(--cream);
  border: 2px solid var(--navy);
  border-radius: 16px;
}
.issue-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: var(--lime);
  border: 2px solid var(--navy);
  border-radius: 50%;
  font-size: 13px;
}
.issue h3 { margin: 0 0 4px; font-size: 16px; }
.issue p { margin: 0; color: var(--muted); font-size: 14px; }
.result-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 22px;
  background: var(--lime);
  border: 2px solid var(--navy);
  border-radius: 18px;
}
.result-cta h3,
.result-cta p { margin: 0; }
.result-cta p { margin-top: 4px; }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(20, 33, 61, .18);
}
.comparison-table th { background: var(--lime); color: var(--navy); }
.comparison-table tr:last-child td { border-bottom: 0; }
.comparison-table td:first-child { font-weight: 800; color: var(--navy); }
.comparison-note {
  margin-top: 16px;
  padding: 16px 18px;
  color: var(--navy);
  background: var(--cream-2);
  border-left: 5px solid var(--lime-deep);
  border-radius: 0 14px 14px 0;
}

.article-prose {
  max-width: 820px;
  margin: 0 auto;
}

.article-prose h2 {
  margin: 44px 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.article-prose h3 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.article-prose p,
.article-prose li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.article-prose ul,
.article-prose ol {
  padding-left: 24px;
}

.article-prose a {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.topic-links a {
  padding: 10px 14px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}
.source-list {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.source-list a { text-decoration: underline; }
.mini-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  color: var(--navy);
  background: var(--cream-2);
  border: 2px solid var(--navy);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 820px) {
  .growth-grid,
  .growth-grid.two { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analyzer-panel { padding: 20px; }
}
@media (max-width: 480px) {
  .score-grid { grid-template-columns: 1fr; }
  .analyzer-toolbar .btn { width: 100%; }
}
.icon-fire::before            { content: '\e9a9'; }
.icon-bin::before             { content: '\e9ac'; }
.icon-target::before          { content: '\e9b3'; }
.icon-trophy::before          { content: '\e99e'; }
.icon-lab::before             { content: '\e9aa'; }
.icon-spell-check::before     { content: '\ea12'; }
.icon-quotes-left::before     { content: '\e977'; }
.icon-leaf::before            { content: '\e9a4'; }
.icon-briefcase::before       { content: '\e9ae'; }

/* ── Before/After Section ─────────────────── */
.before-after-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px;
  align-items: center; max-width: 900px; margin: 0 auto;
}
@media (max-width: 760px) {
  .before-after-grid { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); margin: 0 auto; }
}
.ba-card {
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-card);
}
.ba-card.after { background: var(--lime); }
.ba-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 14px; opacity: .7;
}
.ba-text {
  margin: 0; font-size: 15px; line-height: 1.65; color: var(--navy); font-weight: 500;
}
.ba-arrow {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--navy);
  display: grid; place-items: center; font-size: 22px; flex: none;
  box-shadow: var(--shadow-card); color: var(--navy);
}

/* ── Referral Section ─────────────────────── */
.referral-card {
  background: var(--lime); border: 2px solid var(--navy);
  border-radius: var(--radius-lg); padding: 56px 40px;
  box-shadow: var(--shadow); text-align: center;
  position: relative; overflow: hidden; max-width: 600px; margin: 0 auto;
}
.referral-card::before {
  content: ''; position: absolute; width: 140px; height: 140px;
  border-radius: 50%; background: var(--pink); border: 2px solid var(--navy);
  top: -50px; right: -40px; pointer-events: none;
}
.referral-card h2 {
  position: relative; z-index: 1;
  font-size: clamp(24px, 4vw, 36px); margin: 0 0 12px;
  font-weight: 800; letter-spacing: -.025em; color: var(--navy);
}
.referral-card p { position: relative; z-index: 1; color: var(--navy); font-size: 16px; margin: 0 auto 24px; max-width: 440px; }
.referral-link-box {
  position: relative; z-index: 1;
  background: var(--white); border: 2px solid var(--navy);
  border-radius: var(--radius-pill); padding: 14px 20px;
  font-size: 14px; font-weight: 700; color: var(--muted);
  margin-bottom: 18px; word-break: break-all;
}
