/* Складу A2 — sdílený styl (landing, systémové stránky, kurz) */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #526077;
  --line: #e3e8f0;
  --bg: #ffffff;
  --soft: #f4f7fb;
  --brand: #1f4fd6;
  --brand-ink: #173ea8;
  --brand-soft: #e8efff;
  --sun: #ffd23f;
  --sun-soft: #fff6d6;
  --ok: #138a43;
  --ok-soft: #e4f6ea;
  --bad: #c62828;
  --bad-soft: #fdeaea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
  --maxw: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; }
h2 { font-size: clamp(27px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; color: var(--brand);
  background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 640px; }
.small { font-size: 14px; color: var(--muted); }
.center { text-align: center; }
.hl { background: linear-gradient(transparent 62%, var(--sun) 62%); padding: 0 .08em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 17px; line-height: 1; font-family: inherit; text-decoration: none; color: #fff; background: var(--brand);
  padding: 16px 24px; border-radius: 14px; box-shadow: 0 6px 16px rgba(31, 79, 214, .28); transition: transform .12s, background .12s; }
.btn:hover { background: var(--brand-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-big { font-size: 19px; padding: 20px 30px; }
.btn-ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand-soft); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 16px rgba(255, 210, 63, .45); }
.btn-sun:hover { background: #ffc800; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Top nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; }
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav-links a:hover { background: var(--soft); }
.nav-links .btn { padding: 10px 16px; font-size: 15px; color: #fff; }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* Hero */
.hero { padding: 56px 0 72px; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-soft), transparent 60%),
  radial-gradient(700px 400px at -10% 110%, var(--sun-soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 15px; font-weight: 600; }
.trust span::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 800; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding-top: 32px; } }

/* Result card (hero visual) */
.result { background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 26px; border: 1px solid var(--line); position: relative; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.result-head b { font-size: 15px; color: var(--muted); font-weight: 700; }
.stamp { background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; letter-spacing: .04em; }
.meter { margin: 14px 0 18px; }
.meter-top { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.meter-top span:last-child { color: var(--ok); }
.bar { height: 12px; border-radius: 99px; background: var(--soft); position: relative; overflow: visible; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #4f7bff); }
.bar em { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); opacity: .5; }
.bar-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.result-foot { border-top: 1px dashed var(--line); padding-top: 14px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.float-tag { position: absolute; right: -14px; top: -16px; background: var(--sun); font-weight: 800; font-size: 14px; padding: 8px 14px;
  border-radius: 12px; transform: rotate(4deg); box-shadow: var(--shadow); }
@media (max-width: 520px) { .float-tag { right: 8px; } }

/* Sections */
section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 6px; }
.stat span { color: var(--muted); }
.stat.bad b { color: var(--bad); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }

/* Exam format table */
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.part { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; }
.part .ico { font-size: 28px; margin-bottom: 10px; }
.part h3 { margin-bottom: 4px; }
.part .cz { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.part ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.part .pts { display: inline-block; margin-top: 12px; font-weight: 800; background: var(--brand-soft); color: var(--brand); padding: 4px 10px; border-radius: 8px; font-size: 14px; }
.rule { margin-top: 18px; background: var(--sun-soft); border: 1px solid #f5dc86; border-radius: var(--radius); padding: 18px 20px; font-weight: 600; }
@media (max-width: 960px) { .parts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .parts { grid-template-columns: 1fr; } }

/* Inside grid */
.inside { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card .num { font-size: 40px; font-weight: 800; color: var(--brand); letter-spacing: -.03em; line-height: 1; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .inside { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .inside { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sun); font-weight: 800; margin-bottom: 12px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Pricing */
.prices { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: stretch; max-width: 900px; margin: 0 auto; }
.price { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.price.best { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); position: relative; }
.price.best::before { content: "Рекомендуємо"; position: absolute; top: -14px; left: 24px; background: var(--brand); color: #fff; font-weight: 800;
  font-size: 13px; padding: 5px 12px; border-radius: 999px; }
.price h3 { margin-bottom: 6px; }
.price .amount { font-size: 46px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 2px; }
.price .amount small { font-size: 18px; color: var(--muted); font-weight: 700; }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.price li { padding: 7px 0 7px 30px; position: relative; border-bottom: 1px solid var(--soft); }
.price li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 800; }
.price li.no { color: #98a2b3; }
.price li.no::before { content: "–"; color: #98a2b3; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); max-width: 900px; margin: 20px auto 0; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.compare-note { text-align: center; margin-top: 18px; font-weight: 700; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } .price.best { order: -1; } }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* Final CTA + footer */
.final { background: var(--ink); color: #fff; border-radius: 28px; padding: 48px 32px; text-align: center; }
.final .lead { color: #cbd5e1; margin: 0 auto 24px; }
footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
footer a { color: var(--muted); }
.disclaimer { margin-top: 18px; font-size: 13px; }

/* System pages (success, restore, errors) */
body.sys { background: var(--soft); min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.sys-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 36px; max-width: 560px; width: 100%; }
.sys-card h1 { font-size: 32px; }
.note { background: var(--soft); border-radius: var(--radius-sm); padding: 16px; margin: 20px 0; font-size: 15px; }
.copy { width: 100%; font: 14px/1.4 ui-monospace, Menlo, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: #fff; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field input { width: 100%; font: inherit; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* Legal pages */
.legal { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 22px; margin-top: 32px; }
