:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #141824;
  --muted: #5d6478;
  --line: #e3e6ef;
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --accent-soft: #eef0ff;
  --green: #0f9d58;
  --green-soft: #e7f6ee;
  --red: #d93025;
  --red-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 24, 36, 0.06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ── кнопки и формы ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px;
  border-radius: 10px; border: 1px solid transparent; font: 600 15px var(--font); cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-light { background: #fff; color: var(--accent); }
.btn-light:hover { background: var(--accent-soft); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c1bc; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: 15px var(--font);
  background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; font-weight: 500; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 14px; font-size: 14px; }
.alert-error { background: var(--red-soft); color: #8c1d18; }
.alert-ok { background: var(--green-soft); color: #0b5e36; }
.alert-info { background: var(--accent-soft); color: var(--accent-dark); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

/* ── шапка ── */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246, 247, 251, .9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #fff; display: grid; place-items: center; font-size: 15px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.top-actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) { .nav { display: none; } }

/* ── лендинг ── */
section { padding: 72px 0; }
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 40px; align-items: start; }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600;
  font-size: 13px; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.lead { font-size: 19px; color: var(--muted); max-width: 620px; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; }
.hero-points li { padding-left: 28px; position: relative; }
.hero-points li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.login-card h3 { margin-bottom: 4px; }
.login-card .row { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 16px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } }

.section-head { max-width: 720px; margin-bottom: 32px; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-btn { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font: 600 15px var(--font); color: var(--text); text-align: left; }
.tab-btn small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.tab-btn[aria-selected=true] { border-color: var(--accent); background: var(--accent-soft); }
.role-panel { display: none; }
.role-panel.active { display: block; }
.role-q { font-size: 18px; font-weight: 600; margin-bottom: 18px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; padding: 30px 0;
  border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature .problem { color: var(--red); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.feature ul { padding-left: 20px; margin: 0 0 14px; }
.feature li { margin-bottom: 6px; }
.feature .example { background: var(--green-soft); color: #0b5e36; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* мини-макеты экранов вместо скриншотов */
.mock { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; font-size: 13px; }
.mock-title { font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; }
.mock table { width: 100%; border-collapse: collapse; }
.mock th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.mock td { padding: 7px 4px; border-bottom: 1px solid #f0f2f7; }
.mock .num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: #eef0f6; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--bg); border-radius: 10px; padding: 10px; }
.kpi b { display: block; font-size: 17px; }
.kpi span { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-ok { background: var(--green-soft); color: #0b5e36; }
.pill-warn { background: #fff4e5; color: #8a5300; }
.pill-bad { background: var(--red-soft); color: #8c1d18; }
.pill-muted { background: #eef0f6; color: var(--muted); }

.compare { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
.compare th { background: #fafbfe; }
.compare td:last-child, .compare th:last-child { background: var(--accent-soft); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 12px; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.more .card { padding: 18px; box-shadow: none; }
@media (max-width: 960px) { .more { grid-template-columns: 1fr 1fr; } }

.lead-box { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .lead-box { grid-template-columns: 1fr; } }
.dark { background: #141824; color: #fff; }
.dark .muted { color: #a5abbd; }
.dark .card { color: var(--text); }

details.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
details.faq summary::after { content: "+"; float: right; color: var(--muted); }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

footer { padding: 36px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── страницы входа ── */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo { margin-bottom: 22px; }
.auth-foot { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* ── аккаунт ── */
.account { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 32px 0 60px; }
.side a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); margin-bottom: 4px; }
.side a:hover { background: #fff; text-decoration: none; }
.side a.on { background: #fff; box-shadow: var(--shadow); font-weight: 600; }
.side .sep { height: 1px; background: var(--line); margin: 12px 0; }
.account .card + .card { margin-top: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.list td { padding: 10px 6px; border-bottom: 1px solid #f0f2f7; vertical-align: middle; }
.list form { display: inline; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-form > div { flex: 1 1 180px; }
.inline-form label { margin-top: 0; }
@media (max-width: 760px) { .account { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
