:root {
  --bg: #0d0b17;
  --bg-2: #15122a;
  --card: #1a1631;
  --card-2: #211c3d;
  --line: #2b2550;
  --text: #f1eefc;
  --muted: #a69fc7;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --ok: #22c55e;
  --err: #f43f5e;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, .25), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(34, 211, 238, .12), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; margin-bottom: 12px; letter-spacing: -.01em; }
h2.left, .section-sub.left { text-align: left; margin-left: 0; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); font-size: 14px; }
.muted a { color: var(--accent-2); }

.test-banner {
  background: #fbbf24; color: #3b2a00;
  text-align: center; font-size: 13px; font-weight: 600; padding: 6px 16px;
}
.env-PRODUCTION .test-banner { display: none; }

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13, 11, 23, .78); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(43, 37, 80, .6);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.logo { font-weight: 800; font-size: 19px; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo-mark { color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after {
  position: absolute; left: 11px; width: 18px; height: 2px; background: var(--text); content: ''; transition: .2s;
}
.burger span { top: 19px; }
.burger span::before { top: -6px; left: 0; }
.burger span::after { top: 6px; left: 0; }

/* Language switcher */
.lang-switch { position: relative; margin-left: auto; }
.nav-links + .lang-switch { margin-left: 0; }
.lang-switch summary {
  list-style: none; cursor: pointer; font-weight: 700; font-size: 14px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 6px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::before { content: '🌐'; font-size: 14px; }
.lang-switch ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 170px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4); max-height: 70vh; overflow-y: auto;
}
.lang-switch a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.lang-switch a:hover { background: var(--card-2); }
.lang-switch a[aria-current] { color: var(--accent-2); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 12px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6a48f5; }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-light { background: #fff; color: #2a1a7a; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 64px 0 56px; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 99px;
  background: rgba(124, 92, 255, .15); color: #c8b9ff; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.02em; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; margin: 22px 0 30px; max-width: 580px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 10px 24px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

.hero-card {
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: 24px; padding: 20px 22px 22px;
  box-shadow: 0 30px 80px rgba(124, 92, 255, .25);
}
.hero-card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.hero-card-title { margin-left: 8px; font-size: 13px; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 12px 16px; border-radius: 14px; font-size: 14px; max-width: 88%; }
.msg.user { align-self: flex-end; background: var(--accent); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: #241f45; border-bottom-left-radius: 4px; color: #ddd6ff; }
.progress { height: 6px; background: var(--line); border-radius: 99px; margin-top: 22px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---------- Tools strip ---------- */
.tools { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; justify-content: center; padding: 24px 0; border-block: 1px solid var(--line); }
.tools-label { color: var(--muted); font-size: 14px; }
.tools ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; justify-content: center; }
.tools li { padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; font-weight: 600; font-size: 14px; color: #d9d3f5; }

/* ---------- Sections ---------- */
.section { padding: 80px 0 0; }
.section:last-of-type { padding-bottom: 88px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 620px; font-size: 17px; }
.grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card .icon { font-size: 28px; display: block; margin-bottom: 14px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }

/* Results */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.result { background: var(--bg-2); padding: 28px; }
.result b { font-size: 14px; color: var(--accent-2); letter-spacing: .08em; }
.result p { margin: 10px 0 0; font-size: 16px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 16px;
  background: rgba(124, 92, 255, .18); color: #c8b9ff; font-weight: 800;
}
.steps h3 { font-size: 18px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* Program */
.program-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.program-tabs button {
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.program-tabs button small { font-weight: 500; font-size: 12px; }
.program-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--accent); background: rgba(124, 92, 255, .14); }
.program-panel { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.module { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0; }
.module summary { display: grid; grid-template-columns: 110px 1fr auto 20px; gap: 16px; align-items: center; padding: 20px 24px; cursor: pointer; list-style: none; }
.module summary::-webkit-details-marker { display: none; }
.module summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; text-align: center; }
.module[open] summary::after { transform: rotate(45deg); }
.m-num { color: var(--accent-2); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.m-title { font-weight: 700; font-size: 17px; }
.m-meta { color: var(--muted); font-size: 14px; white-space: nowrap; }
.module ol { margin: 0; padding: 0 24px 22px 150px; color: #cfc8ee; display: grid; gap: 6px; font-size: 15px; }

/* Teachers */
.teacher { text-align: center; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  font-weight: 800; font-size: 26px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 80% 62%), hsl(calc(var(--h) + 40) 80% 45%));
}
.teacher .role { display: block; color: var(--accent-2); font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* Format */
.format { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; padding: 44px; }
.format-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.format-list b { display: block; margin-bottom: 4px; }
.format-list span { color: var(--muted); font-size: 15px; }

/* Pricing */
.plans { align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px;
}
.plan h3 { font-size: 20px; }
.plan-desc { color: var(--muted); font-size: 14px; margin: 8px 0 0; min-height: 3.2em; }
.plan.featured {
  background: linear-gradient(165deg, #6d4aff, #4b2fd1);
  border-color: transparent; transform: scale(1.03);
  box-shadow: 0 30px 70px rgba(124, 92, 255, .35);
}
.plan.featured .plan-desc { color: #ddd3ff; }
.badge {
  position: absolute; top: -12px; left: 30px;
  background: var(--accent-2); color: #04232a; font-size: 12px; font-weight: 800;
  padding: 5px 12px; border-radius: 99px;
}
.price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 20px; }
.price span { font-size: 46px; font-weight: 800; letter-spacing: -.02em; }
.price small { color: var(--muted); }
.plan.featured .price small { color: #ddd3ff; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.plan li { padding: 7px 0 7px 28px; position: relative; font-size: 15px; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-2); font-weight: 800; }
.plan.featured li::before { color: #fff; }

.gpay-slot { min-height: 48px; height: 48px; }
.gpay-slot:empty {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05));
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.gpay-note { text-align: center; color: #fbbf24; margin-top: 28px; }
.consent { text-align: center; color: var(--muted); font-size: 13px; max-width: 720px; margin: 28px auto 0; }
.consent a, .guarantee a, .faq a, .legal a { color: var(--accent-2); }

.compare-wrap { overflow-x: auto; margin-top: 56px; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.compare caption { font-size: 22px; font-weight: 800; text-align: left; margin-bottom: 16px; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th { color: var(--muted); font-weight: 600; font-size: 14px; }
.compare td:first-child, .compare th:first-child { text-align: left; }
.compare td:last-child, .compare th:last-child { background: rgba(124, 92, 255, .1); }
.compare .y { color: var(--accent-2); font-weight: 800; }
.compare .n { color: #5a5380; }
.compare .total td { font-weight: 800; font-size: 17px; border-bottom: 0; }

/* Guarantee */
.guarantee { display: flex; gap: 36px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; padding: 40px; }
.guarantee p { color: #cfc8ee; margin: 14px 0; max-width: 720px; }
.guarantee-icon {
  flex: none; width: 120px; height: 120px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  font-size: 44px; font-weight: 800; line-height: 1; color: #fff;
  background: radial-gradient(circle at 30% 30%, var(--accent), #3b22b8); box-shadow: 0 0 0 8px rgba(124, 92, 255, .15);
}
.guarantee-icon small { font-size: 14px; font-weight: 600; margin-top: 4px; }
.link-arrow { font-weight: 700; text-decoration: none; }

/* Reviews */
.reviews { margin-top: 40px; }
.review { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.review blockquote { margin: 0; font-size: 16px; color: #e3ddfa; }
.review figcaption b { display: block; }
.review figcaption span { color: var(--muted); font-size: 14px; }

/* FAQ */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Final CTA */
.final-cta { text-align: center; background: linear-gradient(135deg, #6d4aff, #2b8fd6); border-radius: 28px; padding: 56px 24px; }
.final-cta p { max-width: 560px; margin: 8px auto 28px; color: #eae4ff; font-size: 17px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #0a0913; padding: 56px 0 32px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-grid h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.footer-grid a:not(.logo), .footer-grid > div > span { display: block; text-decoration: none; color: #d4cef0; margin-bottom: 9px; }
.footer-grid a:not(.logo):hover { color: #fff; }
.footer-about { color: var(--muted); margin: 14px 0 18px; max-width: 320px; }
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; }
.pm { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-weight: 800; font-size: 12px; color: #d4cef0; letter-spacing: .02em; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; padding: 40px 0 80px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin: 12px 0 8px; }
.legal h2 { text-align: left; font-size: 22px; margin: 36px 0 12px; }
.legal p, .legal li { color: #d4cef0; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal-meta { color: var(--muted) !important; font-size: 14px; margin-bottom: 28px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.callout { background: rgba(124, 92, 255, .12); border: 1px solid rgba(124, 92, 255, .4); border-radius: 14px; padding: 18px 20px; }
.requisites { display: grid; grid-template-columns: 160px 1fr; gap: 10px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.requisites dt { color: var(--muted); }
.requisites dd { margin: 0; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 16px; }
.contact { text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.contact:hover { border-color: var(--accent); }
.contact span:not(.icon) { color: var(--accent-2); word-break: break-word; }
.contact small { color: var(--muted); }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(5, 4, 12, .7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px; z-index: 50;
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: min(440px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 32px; text-align: center; animation: pop .2s ease-out;
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.modal-icon {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 30px; font-weight: 800;
  background: rgba(34, 197, 94, .15); color: var(--ok);
}
.modal-icon.error { background: rgba(244, 63, 94, .15); color: var(--err); }
.modal-box h3 { font-size: 22px; margin-bottom: 12px; }
.modal-box .btn { margin-top: 18px; width: 100%; }
.receipt { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; text-align: left; background: var(--bg-2); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; text-align: right; word-break: break-all; }

body.busy { cursor: progress; }
body.busy .plans { pointer-events: none; opacity: .6; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .menu-open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .menu-open .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .grid-3, .results, .contact-cards { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .format { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
  .guarantee { flex-direction: column; align-items: flex-start; padding: 28px; }
  .module summary { grid-template-columns: 1fr 20px; gap: 4px 12px; }
  .module summary .m-num { grid-column: 1; }
  .module summary .m-title { grid-column: 1; }
  .module summary .m-meta { grid-column: 1; }
  .module summary::after { grid-column: 2; grid-row: 1 / span 3; }
  .module ol { padding-left: 44px; }
}
@media (max-width: 560px) {
  .grid-4, .steps, .format-list, .footer-grid { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  .requisites { grid-template-columns: 1fr; gap: 2px; }
  .requisites dd { margin-bottom: 10px; }
}
.translation-note { margin-bottom: 24px; font-size: 14px; }
