/* Srpski 16 — лендинг и вход. Те же токены, что в тренажёре. */
:root {
  --bg: #eef1f5; --surface: #ffffff; --ink: #131a25; --muted: #5a6577; --line: #d4dae3;
  --accent: #1e4ea1; --accent-ink: #ffffff; --accent-soft: #dfe7f6;
  --brand: #c8102e; --brand-ink: #ffffff; --good: #1f7a4b; --good-soft: #dbf0e3; --bad: #b8332f; --bad-soft: #f8e0df;
  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141c; --surface: #171e29; --ink: #e8edf4; --muted: #9aa6b8; --line: #2a3443;
    --accent: #7fa6ec; --accent-ink: #0f141c; --accent-soft: #1d2a40; --good: #5cc28c; --good-soft: #17301f; --bad: #ec7b74; --bad-soft: #3a1c1b;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141c; --surface: #171e29; --ink: #e8edf4; --muted: #9aa6b8; --line: #2a3443;
  --accent: #7fa6ec; --accent-ink: #0f141c; --accent-soft: #1d2a40; --good: #5cc28c; --good-soft: #17301f; --bad: #ec7b74; --bad-soft: #3a1c1b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: default; }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo b { background: var(--brand); color: var(--brand-ink); border-radius: 6px; padding: 1px 6px; font-size: 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a.link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.top nav a.link:hover { color: var(--ink); }
.top .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
@media (max-width: 640px) { .top nav a.link { display: none; } }

/* hero */
.hero { padding: 64px 0 56px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5.4vw, 56px); }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 20px 0 28px; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 36px; } }

/* signature: Petrov 3×3 matrix */
.matrix { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 12px 40px -24px rgba(19,26,37,.35); }
.matrix .cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.matrix table { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.matrix th { font: 600 12px/1.2 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px; text-align: left; }
.matrix td { background: var(--bg); border-radius: 10px; padding: 10px; font-size: 14px; line-height: 1.3; vertical-align: top; }
.matrix td b { display: block; font-weight: 600; }
.matrix td span { color: var(--muted); font-size: 12.5px; }
.matrix td.hl { background: var(--accent-soft); }
.matrix td.hl b { color: var(--accent); }
@media (max-width: 480px) { .matrix { padding: 12px; } .matrix table { border-spacing: 4px; } .matrix td { padding: 7px; font-size: 13px; } .matrix td span { font-size: 11.5px; } }

/* sections */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 10px; }
section.block p.sub { color: var(--muted); margin: 0 0 32px; max-width: 40em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .num { font-family: var(--display); font-size: 13px; color: var(--brand); margin-bottom: 10px; display: block; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 18px 0; border-top: 3px solid var(--ink); }
.stat b { display: block; font: 700 clamp(28px, 4vw, 40px)/1 var(--display); }
.stat span { color: var(--muted); font-size: 14px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps .card::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 15px var(--display); margin-bottom: 12px; }
details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { color: var(--muted); margin: 10px 0 0; max-width: 46em; }
.final { text-align: center; padding: 64px 0 72px; border-top: 1px solid var(--line); }
.final h2 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 14px; }
.final p { color: var(--muted); margin: 0 0 26px; }
footer { border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* auth */
.auth { min-height: calc(100vh - 61px); display: grid; place-items: center; padding: 32px 16px 48px; }
.panel { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.panel h1 { font-size: 24px; margin-bottom: 6px; }
.panel p.sub { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.social { display: grid; gap: 10px; }
.social .btn { width: 100%; }
.social svg { width: 20px; height: 20px; flex: none; }
#tgWidget { display: flex; justify-content: center; min-height: 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0 16px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: transparent; border-radius: 8px; padding: 8px; font: 600 14px var(--body); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
form.f { display: grid; gap: 12px; }
form.f label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
form.f input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 16px var(--body); }
form.f .btn { width: 100%; margin-top: 4px; }
.msg { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--good-soft); color: var(--good); }
.msg[hidden], [hidden] { display: none !important; }
.small { font-size: 13px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
