/* =========================================================
   Ôn Thi GPLX — landing styles
   Tokens mirror lib/app/design_system/colors.dart in the app.
   ========================================================= */
:root {
  --primary: #1E40AF;
  --primary-strong: #1E3A8A;
  --primary-soft: #DBE4FF;
  --primary-dim: #B4C5FF;
  --on-primary: #FFFFFF;

  --bg: #F8FAFC;
  --bg-alt: #F1F5F9;
  --surface: #FFFFFF;
  --surface-2: #EBEFF5;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;

  --green: #16A34A;   --green-soft: #DCFCE7;
  --red: #DC2626;     --red-soft: #FEE2E2;
  --amber: #B45309;   --amber-soft: #FEF3C7;
  --orange: #EA580C;  --orange-soft: #FFEDD5;
  --purple: #7C3AED;  --purple-soft: #EDE9FE;
  --teal: #0F766E;    --teal-soft: #CCFBF1;
  --sky: #0284C7;     --sky-soft: #E0F2FE;

  --hero-a: #E8EDFF;
  --hero-b: #F5F0FF;
  --hero-c: #EAF7F2;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 8px 24px -8px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -20px rgba(30, 64, 175, .28);
  --shadow-card: 0 12px 32px -12px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .06);

  --container: 1160px;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #6B8BFF;
    --primary-strong: #93A9FF;
    --primary-soft: #1C2A55;
    --primary-dim: #2C3F80;
    --on-primary: #FFFFFF;
    --bg: #0B1120;
    --bg-alt: #0F172A;
    --surface: #131B2C;
    --surface-2: #1B2438;
    --text: #E8EDF7;
    --text-2: #A9B4C8;
    --text-3: #8391A8;
    --line: #233049;
    --line-strong: #2E3C58;
    --green: #4ADE80;  --green-soft: #12301F;
    --red: #F87171;    --red-soft: #3A1717;
    --amber: #FBBF24;  --amber-soft: #3A2A0A;
    --orange: #FB923C; --orange-soft: #3A220F;
    --purple: #A78BFA; --purple-soft: #261C46;
    --teal: #2DD4BF;   --teal-soft: #0E302C;
    --sky: #38BDF8;    --sky-soft: #0C2A3C;
    --hero-a: #141E3D;
    --hero-b: #1C1636;
    --hero-c: #0F2A24;
    --shadow: 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .6);
    --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #6B8BFF;
  --primary-strong: #93A9FF;
  --primary-soft: #1C2A55;
  --primary-dim: #2C3F80;
  --on-primary: #FFFFFF;
  --bg: #0B1120;
  --bg-alt: #0F172A;
  --surface: #131B2C;
  --surface-2: #1B2438;
  --text: #E8EDF7;
  --text-2: #A9B4C8;
  --text-3: #8391A8;
  --line: #233049;
  --line-strong: #2E3C58;
  --green: #4ADE80;  --green-soft: #12301F;
  --red: #F87171;    --red-soft: #3A1717;
  --amber: #FBBF24;  --amber-soft: #3A2A0A;
  --orange: #FB923C; --orange-soft: #3A220F;
  --purple: #A78BFA; --purple-soft: #261C46;
  --teal: #2DD4BF;   --teal-soft: #0E302C;
  --sky: #38BDF8;    --sky-soft: #0C2A3C;
  --hero-a: #141E3D;
  --hero-b: #1C1636;
  --hero-c: #0F2A24;
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--primary-dim); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ---------- Type ---------- */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); letter-spacing: -.035em; }
h1, h2 { text-wrap: balance; }
.nw { white-space: nowrap; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); letter-spacing: -.03em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { color: var(--text-2); }

.c-primary { color: var(--primary); }
.c-green { color: var(--green); }
.c-red { color: var(--red); }
.c-amber { color: var(--amber); }
.c-orange { color: var(--orange); }
.c-purple { color: var(--purple); }
.c-teal { color: var(--teal); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
}
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-orange { background: var(--orange-soft); color: var(--orange); }
.tag-purple { background: var(--purple-soft); color: var(--purple); }
.tag-teal { background: var(--teal-soft); color: var(--teal); }

.section { padding: 88px 0; }
@media (max-width: 720px) { .section { padding: 64px 0; } }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { margin: 14px 0 14px; }
.section-head p { font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: .98rem; line-height: 1;
  padding: 14px 22px; border-radius: 14px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 24px -10px rgba(30, 64, 175, .7); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 10px 16px; font-size: .9rem; border-radius: 12px; }

.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; border-radius: 14px; min-width: 182px;
  background: #0F172A; color: #fff; border: 1px solid #0F172A;
  transition: transform .15s ease, box-shadow .2s ease;
  position: relative;
}
:root[data-theme="dark"] .store-btn { background: #fff; color: #0F172A; border-color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .store-btn { background: #fff; color: #0F172A; border-color: #fff; } }
.store-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn small { font-size: .7rem; opacity: .75; font-weight: 500; }
.store-btn strong { font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.store-btn.is-soon { cursor: default; }
.store-btn.is-soon:hover { transform: none; box-shadow: none; }
.store-btn .soon {
  position: absolute; top: -9px; right: -8px;
  font-size: .66rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--amber); color: #fff; letter-spacing: .02em;
}
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled, .nav.solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .94rem; color: var(--text-2); transition: color .15s, background .15s; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.nav-links .btn { margin-left: 8px; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: 12px 14px; font-size: 1rem; }
  .nav-links .btn { margin: 8px 0 0; }
  .nav.menu-open { background: var(--bg); border-bottom-color: var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 56px) 0 72px;
  background:
    radial-gradient(60% 60% at 10% 10%, var(--hero-a) 0%, transparent 70%),
    radial-gradient(50% 60% at 90% 20%, var(--hero-b) 0%, transparent 70%),
    radial-gradient(60% 50% at 70% 100%, var(--hero-c) 0%, transparent 70%),
    var(--bg);
}
.hero-inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: .88rem; font-weight: 600; color: var(--text-2);
}
.hero-badge b { background: var(--primary); color: #fff; font-size: .72rem; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em; }
.hero h1 { margin: 22px 0 18px; }
.hero-lead { font-size: 1.15rem; max-width: 560px; }
.hero .store-row { margin: 30px 0 26px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: .94rem; font-weight: 500; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--green); flex: none; }

.hero-visual { position: relative; display: flex; justify-content: center; min-height: 560px; }
.hero-visual .phone { width: min(300px, 74vw); }
.float-sign { position: absolute; width: 76px; filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .22)); animation: bob 6s ease-in-out infinite; }
.float-sign.s1 { top: 4%; left: 2%; width: 70px; }
.float-sign.s2 { bottom: 10%; right: 0; width: 84px; animation-delay: -2s; }
.float-sign.s3 { top: 46%; left: -4%; width: 58px; animation-delay: -4s; }

.chip {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  text-align: left;
  animation: bob 7s ease-in-out infinite;
}
.chip strong { display: block; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; color: var(--text); }
.chip small { display: block; font-size: .78rem; color: var(--text-3); line-height: 1.3; }
.chip-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.chip-ico svg { width: 22px; height: 22px; }
.chip-ico.blue { background: var(--primary); }
.chip-ico.green { background: #16A34A; }
.chip-ico.red { background: #DC2626; }
.chip-ico.amber { background: #F59E0B; }
.chip-ico.purple { background: #7C3AED; }
.chip-ico.teal { background: #0F766E; }
.chip-big strong { font-size: 2rem; color: var(--primary); letter-spacing: -.03em; }
.chip-big strong em { font-style: normal; font-size: 1rem; color: var(--text-3); font-weight: 700; }
.hero-visual .chip.c1 { top: 12%; right: -2%; }
.hero-visual .chip.c2 { bottom: 14%; left: -6%; animation-delay: -3s; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin: 0 auto; }
  .hero .store-row, .hero-points { justify-content: center; }
  .hero-visual { min-height: 0; margin-top: 8px; }
  .hero-visual .chip.c1 { right: 2%; }
  .hero-visual .chip.c2 { left: 2%; }
}
@media (max-width: 520px) {
  .hero { padding-top: calc(var(--nav-h) + 32px); }
  .hero-visual .chip { padding: 9px 12px 9px 9px; gap: 9px; }
  .hero-visual .chip-ico { width: 32px; height: 32px; }
  .hero-visual .chip strong { font-size: .88rem; }
  .hero-visual .chip-big strong { font-size: 1.5rem; }
  .hero-visual .chip.c1 { right: 0; top: 6%; }
  .hero-visual .chip.c2 { left: 0; bottom: 8%; }
  .float-sign { width: 54px !important; }
  .float-sign.s3 { display: none; }
  .store-btn { min-width: 0; flex: 1 1 150px; justify-content: center; padding: 10px 12px; gap: 10px; }
  .store-btn strong { font-size: 1rem; }
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative; z-index: 2;
  padding: 10px; border-radius: 46px;
  background: linear-gradient(160deg, #1F2937, #0B1120);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone img { border-radius: 37px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; object-position: top; background: var(--surface-2); }
.phone.cropped { overflow: hidden; }
.phone.cropped img { aspect-ratio: 1206 / 1900; }

/* ---------- Stats band ---------- */
.stats { margin-top: -28px; position: relative; z-index: 4; }
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stat { padding: 24px 16px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--line); }
.stat strong { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat span { font-size: .9rem; color: var(--text-2); font-weight: 500; }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(5) { grid-column: span 2; }
  .stat + .stat::before { display: none; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
  .stat:nth-child(odd):not(:nth-child(5)) { border-right: 1px solid var(--line); }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; position: relative; }
.step {
  position: relative; padding: 28px 26px 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  position: absolute; top: 22px; right: 24px;
  font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  color: var(--line-strong); opacity: .7;
}
.step-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; }
.step-ico svg { width: 26px; height: 26px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: .96rem; }
.step ul { margin-top: 16px; display: grid; gap: 8px; }
.step li { display: flex; gap: 10px; font-size: .92rem; color: var(--text-2); }
.step li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--green); }
.ico-blue { background: var(--primary-soft); color: var(--primary); }
.ico-green { background: var(--green-soft); color: var(--green); }
.ico-red { background: var(--red-soft); color: var(--red); }
.ico-amber { background: var(--amber-soft); color: var(--amber); }
.ico-purple { background: var(--purple-soft); color: var(--purple); }
.ico-orange { background: var(--orange-soft); color: var(--orange); }
.ico-teal { background: var(--teal-soft); color: var(--teal); }
.ico-sky { background: var(--sky-soft); color: var(--sky); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }

/* ---------- Feature showcase ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  padding: 40px 0;
}
.feature + .feature { border-top: 1px dashed var(--line); }
.feature.reverse .feature-visual { order: 2; }
.feature-copy h2 { margin: 14px 0 16px; }
.feature-copy > p { font-size: 1.08rem; max-width: 520px; }
.checks { margin-top: 22px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-weight: 500; }
.checks li span { color: var(--text-2); font-weight: 400; }
.checks .ck { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; margin-top: 1px; background: var(--green-soft); color: var(--green); }
.checks .ck svg { width: 15px; height: 15px; }

.feature-visual { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.feature-visual::before {
  content: ""; position: absolute; inset: 6% 8%; border-radius: 40px; z-index: 0;
  background: var(--glow, var(--primary-soft)); opacity: .8; transform: rotate(-3deg);
}
.feature-visual .phone { width: min(280px, 70vw); }
.feature-visual .chip.tr { top: 14%; right: 2%; }
.feature-visual .chip.bl { bottom: 16%; left: 0; animation-delay: -3s; }
.feature-visual .float-sign { z-index: 3; }
.feature-visual .float-sign.tl { top: 2%; left: 10%; }
.feature-visual .float-sign.br { bottom: 4%; right: 8%; animation-delay: -2.5s; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 24px; text-align: center; padding: 32px 0; }
  .feature.reverse .feature-visual { order: 0; }
  .feature-copy > p { margin: 0 auto; }
  .checks { max-width: 460px; margin-left: auto; margin-right: auto; text-align: left; }
}
@media (max-width: 520px) {
  .feature-visual .chip { padding: 9px 12px 9px 9px; gap: 9px; }
  .feature-visual .chip-ico { width: 32px; height: 32px; }
  .feature-visual .chip strong { font-size: .88rem; }
  .feature-visual .chip.tr { right: 0; }
  .feature-visual .chip.bl { left: 0; }
}

/* ---------- More features grid ---------- */
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.mini {
  padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.mini .step-ico { width: 44px; height: 44px; border-radius: 13px; margin-bottom: 14px; }
.mini .step-ico svg { width: 22px; height: 22px; }
.mini h3 { font-size: 1.02rem; margin-bottom: 6px; }
.mini p { font-size: .9rem; line-height: 1.55; }
@media (max-width: 960px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .mini-grid { grid-template-columns: 1fr; } }

/* ---------- License picker ---------- */
.license {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 28px; box-shadow: var(--shadow);
}
.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 14px; gap: 4px; margin-bottom: 18px; }
.seg button { padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; }
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.lic-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lic-list button {
  min-width: 64px; padding: 10px 14px; border-radius: 12px; font-weight: 700;
  border: 1.5px solid var(--line-strong); color: var(--text); background: var(--surface);
  transition: border-color .15s, background .15s, color .15s;
}
.lic-list button:hover { border-color: var(--primary); }
.lic-list button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.lic-note { margin-top: 18px; font-size: .86rem; color: var(--text-3); }
.lic-card {
  border-radius: var(--radius-lg); padding: 26px;
  background: linear-gradient(145deg, #1E40AF, #2C56D6 60%, #3B6BF0);
  color: #fff; position: relative; overflow: hidden;
}
.lic-card::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -90px;
  border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.lic-card .eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.lic-card h3 { color: #fff; font-size: 1.7rem; margin: 6px 0 8px; }
.lic-card p { color: rgba(255, 255, 255, .85); font-size: .94rem; min-height: 3.1em; }
.lic-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.lic-stats div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 12px 10px; text-align: center; }
.lic-stats strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.lic-stats span { font-size: .76rem; opacity: .85; }
.lic-foot { margin-top: 16px; display: flex; align-items: center; gap: 8px; font-size: .86rem; color: rgba(255, 255, 255, .9); position: relative; z-index: 1; }
.lic-foot svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) { .license { grid-template-columns: 1fr; padding: 20px; } }
@media (max-width: 520px) { .lic-stats { grid-template-columns: repeat(2, 1fr); } .lic-card { padding: 20px; } }

/* ---------- Plan (study roadmap) mock ---------- */
.plan-mock { display: grid; gap: 14px; width: min(360px, 100%); position: relative; z-index: 1; }
.pm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-card); text-align: left; }
.pm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pm-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pm-big { font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--primary); }
.pm-big small { font-size: .95rem; color: var(--text-3); font-weight: 600; letter-spacing: 0; }
.pm-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 12px; }
.pm-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16A34A, #22C55E); width: var(--w, 60%); }
.pm-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.pm-days span { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--text-3); }
.pm-days span.on { background: var(--green-soft); color: var(--green); }
.pm-days span.today { background: var(--primary); color: #fff; }
.pm-bell { display: flex; gap: 12px; align-items: center; }
.pm-bell .chip-ico { width: 38px; height: 38px; }
.pm-bell strong { display: block; font-size: .95rem; }
.pm-bell small { color: var(--text-3); font-size: .82rem; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; margin: 0 auto; }
.price {
  position: relative; padding: 32px; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.price.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.price .ribbon { position: absolute; top: -13px; left: 32px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.price h3 { font-size: 1.15rem; }
.price .amount { margin: 14px 0 4px; font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.price .amount small { font-size: 1rem; color: var(--text-3); font-weight: 600; letter-spacing: 0; }
.price > p { font-size: .94rem; }
.price ul { margin: 22px 0 26px; display: grid; gap: 12px; flex: 1; }
.price li { display: flex; gap: 10px; font-size: .95rem; color: var(--text); }
.price li svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--green); }
.price li.off { color: var(--text-3); }
.price li.off svg { color: var(--text-3); }
.price-note { text-align: center; margin-top: 22px; font-size: .9rem; color: var(--text-3); }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } .price { padding: 26px 22px; } }

/* ---------- Promise cards ---------- */
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.promise { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.promise .step-ico { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 14px; }
.promise h3 { font-size: 1.04rem; margin-bottom: 6px; }
.promise p { font-size: .92rem; line-height: 1.55; }
@media (max-width: 960px) { .promise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .promise-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: var(--primary-dim); box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative;
  font-weight: 700; font-size: 1.02rem; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2.5px solid var(--text-3); border-bottom: 2.5px solid var(--text-3);
  transform: rotate(45deg); transition: transform .2s ease, margin .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; border-color: var(--primary); }
.faq .answer { padding: 0 22px 20px; color: var(--text-2); }
.faq .answer p + p, .faq .answer p + ol, .faq .answer p + ul, .faq .answer ol + p, .faq .answer ul + p { margin-top: 10px; }
.faq .answer ol, .faq .answer ul { padding-left: 20px; display: grid; gap: 6px; }
.faq .answer ol { list-style: decimal; }
.faq .answer ul { list-style: disc; }
.faq .answer li { color: var(--text-2); }
.faq .answer a, .prose a, .link { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.faq-more { text-align: center; margin-top: 28px; }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl); padding: 56px;
  background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 45%, #4F46E5 100%);
  color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
}
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.cta::before { width: 420px; height: 420px; right: -120px; top: -180px; }
.cta::after { width: 260px; height: 260px; left: -100px; bottom: -140px; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); font-size: 1.08rem; margin: 14px 0 28px; max-width: 560px; }
.cta .store-btn { background: #fff; color: #0F172A; border-color: #fff; }
.qr {
  background: #fff; border-radius: 22px; padding: 16px; text-align: center; color: #0F172A;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .4);
}
.qr canvas, .qr img { width: 148px !important; height: 148px !important; margin: 0 auto; }
.qr small { display: block; margin-top: 8px; font-size: .8rem; font-weight: 600; color: #475569; }
.cta-icon { width: 150px; height: 150px; border-radius: 34px; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .45); }
@media (max-width: 860px) {
  .cta { grid-template-columns: 1fr; text-align: center; padding: 40px 22px; }
  .cta p { margin-left: auto; margin-right: auto; }
  .cta .store-row { justify-content: center; }
  .cta .cta-side { display: none; }
}

/* ---------- Footer ---------- */
.footer { padding: 56px 0 32px; border-top: 1px solid var(--line); margin-top: 88px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer p { font-size: .92rem; margin-top: 14px; max-width: 360px; }
.footer h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; font-weight: 700; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { font-size: .94rem; color: var(--text-2); }
.footer ul a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: .86rem; color: var(--text-3);
}
.footer-bottom p { margin: 0; max-width: none; font-size: .86rem; color: var(--text-3); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: span 2; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } .footer-grid > :first-child { grid-column: auto; } }

/* ---------- Sub pages (support / legal) ---------- */
.page-hero {
  padding: calc(var(--nav-h) + 56px) 0 48px; text-align: center;
  background:
    radial-gradient(50% 80% at 15% 0%, var(--hero-a) 0%, transparent 70%),
    radial-gradient(50% 80% at 85% 0%, var(--hero-b) 0%, transparent 70%),
    var(--bg);
}
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: 14px 0 12px; }
.page-hero p { font-size: 1.08rem; max-width: 640px; margin: 0 auto; }
.page-hero .meta { margin-top: 14px; font-size: .9rem; color: var(--text-3); }

.search {
  position: relative; max-width: 620px; margin: 28px auto 0;
}
.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: 1.02rem; color: var(--text);
  padding: 17px 20px 17px 52px; border-radius: 16px;
  background: var(--surface); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow);
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.topic {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s, box-shadow .2s;
}
.topic:hover { border-color: var(--primary-dim); transform: translateY(-2px); box-shadow: var(--shadow); }
.topic .step-ico { width: 44px; height: 44px; border-radius: 13px; margin: 0; flex: none; }
.topic .step-ico svg { width: 22px; height: 22px; }
.topic strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.topic span { font-size: .88rem; color: var(--text-2); line-height: 1.45; display: block; }
@media (max-width: 860px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .topic-grid { grid-template-columns: 1fr; } }

.faq-group { margin-top: 48px; }
.faq-group > h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 12px; max-width: 820px; margin: 0 auto 16px; }
.faq-group > h2 .step-ico { width: 38px; height: 38px; border-radius: 11px; margin: 0; }
.faq-group > h2 .step-ico svg { width: 20px; height: 20px; }
.empty-search { display: none; text-align: center; padding: 32px; color: var(--text-2); }
.empty-search.show { display: block; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact {
  padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.contact .step-ico { margin-bottom: 4px; }
.contact p { font-size: .94rem; flex: 1; }
.contact .btn { align-self: flex-start; margin-top: 6px; }
.contact code { font-size: .86rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.callout {
  display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--amber-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  font-size: .94rem;
}
.callout svg { width: 22px; height: 22px; color: var(--amber); flex: none; margin-top: 2px; }
.callout p { color: var(--text); }
.callout.info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.callout.info svg { color: var(--primary); }

.steps-inline { counter-reset: s; display: grid; gap: 10px; margin-top: 10px; }
.steps-inline li { counter-increment: s; display: flex; gap: 12px; list-style: none; color: var(--text-2); }
.steps-inline li::before {
  content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: .78rem; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); margin-top: 1px;
}
.faq .answer ol.steps-inline { padding-left: 0; list-style: none; }

/* Legal prose */
.legal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.toc h4 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: .9rem; color: var(--text-2); }
.toc a:hover, .toc a.active { color: var(--primary); border-left-color: var(--primary); }
.prose { max-width: 760px; }
.prose section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: 1.45rem; margin-bottom: 14px; }
.prose h3 { font-size: 1.08rem; margin: 20px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin: 10px 0; display: grid; gap: 8px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose strong { color: var(--text); }
.prose .callout { margin: 16px 0; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.prose th { background: var(--bg-alt); color: var(--text); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) { .legal-wrap { grid-template-columns: 1fr; } .toc { display: none; } }


/* ---------- Support request form ---------- */
.support-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.support-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--shadow); display: grid; gap: 18px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.sf-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 4px; }
.sf-head .step-ico { margin: 0; flex: none; }
.sf-head h3 { font-size: 1.3rem; margin-bottom: 4px; scroll-margin-top: calc(var(--nav-h) + 40px); }
.sf-head p { font-size: .94rem; }
.sf-title { font-size: 1.3rem; margin-bottom: 4px; }
.sf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--text); }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field.invalid input:focus, .field.invalid select:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 4px var(--red-soft); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); pointer-events: none;
}
.select-wrap select { padding-right: 40px; cursor: pointer; }
.select-wrap select:invalid { color: var(--text-3); }
.select-wrap option { color: var(--text); }
.field-error { font-size: .84rem; color: var(--red); min-height: 0; }
.field-error:empty { display: none; }
.field-hint { font-size: .86rem; color: var(--text-2); background: var(--primary-soft); padding: 10px 12px; border-radius: 10px; }
.field-hint a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.counter { font-size: .8rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.sf-actions .btn[disabled] { opacity: .65; cursor: progress; }
.sf-note { font-size: .84rem; color: var(--text-3); flex: 1 1 240px; }
.sf-status { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: .94rem; }
.sf-status svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.sf-status.ok { background: var(--green-soft); color: var(--text); }
.sf-status.ok svg { color: var(--green); }
.sf-status.err { background: var(--red-soft); color: var(--text); }
.sf-status.err svg { color: var(--red); }
.sf-status p { color: var(--text); }
.sf-status strong { display: block; margin-bottom: 2px; }

.support-side { display: grid; gap: 14px; }
.side-item { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.side-item .step-ico { width: 42px; height: 42px; border-radius: 12px; margin: 0; flex: none; }
.side-item .step-ico svg { width: 21px; height: 21px; }
.side-item h3 { font-size: 1rem; margin-bottom: 4px; }
.side-item p { font-size: .9rem; line-height: 1.5; margin-bottom: 6px; }
.side-item .link { font-size: .9rem; word-break: break-all; }
@media (max-width: 900px) { .support-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .support-form { padding: 22px 18px; }
  .sf-head .step-ico { display: none; }
  .sf-title { font-size: 1.15rem; }
  .sf-row { grid-template-columns: 1fr; }
  .sf-actions .btn { width: 100%; }
}

/* ---------- Sent dialog ---------- */
.sent-dialog {
  margin: auto; border: 0; padding: 32px 28px 26px; width: min(420px, calc(100% - 32px));
  border-radius: var(--radius-xl); background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .45); text-align: center;
}
.sent-dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sent-dialog[open] { animation: pop .25s cubic-bezier(.2, .8, .3, 1.2); }
.sent-ico {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green-soft); color: var(--green);
}
.sent-ico svg { width: 34px; height: 34px; }
.sent-dialog h2 { font-size: 1.4rem; margin-bottom: 10px; }
.sent-dialog p { font-size: .98rem; }
.sent-dialog p b { color: var(--text); word-break: break-all; }
.sent-actions { display: grid; gap: 10px; margin-top: 24px; }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
