/* Токены проекта (apps/web/src/index.css). Тёмная тема основная, светлая по настройке системы. */
:root {
  --brand: #ec6727;
  --bg: #1c1c1c;
  --surface: #333333;
  --surface-2: #2a2a2a;
  --text: #fcf5e9;
  --text-muted: #b8ad9c;
  --border: #474747;
  --accent: #ec6727;
  --accent-hover: #f2874f;
  --accent-text: #f2874f;
  --on-accent: #1f1f1f;
  --good: #5cbf7f;
  --bad: #ef6b60;
  --flat: #e3b341;
  --radius-card: 1.5rem;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fcf5e9;
    --surface: #ffffff;
    --surface-2: #f5ecdd;
    --text: #1f1f1f;
    --text-muted: #6b6259;
    --border: #e8dfd0;
    --accent-text: #c94f14;
    --good: #2f8a52;
    --bad: #c43d33;
    --flat: #b7860b;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
svg { flex: none; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 8px; }
main:focus { outline: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
main > section { padding: 72px 0; }
@media (max-width: 767px) { main > section { padding: 48px 0; } }
.lead { color: var(--text-muted); max-width: 640px; margin: 12px 0 0; }
.muted { color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.link { text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--accent-text); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; transition: background .15s, border-color .15s; text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn svg { width: 18px; height: 18px; }
@media (max-width: 767px) { .btn-sm { min-height: 44px; } }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 1.15rem; }
.logo img { width: 32px; height: 32px; border-radius: 10px; }
.logo small { font-weight: 500; color: var(--text-muted); font-size: .8rem; margin-left: 2px; }
.menu { display: flex; gap: 4px; }
.menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--text-muted); font-size: .95rem; }
.menu a:hover { background: var(--surface); color: var(--text); }
.menu a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); align-items: center; justify-content: center; cursor: pointer; }
.burger svg { width: 20px; height: 20px; }
.burger .i-close { display: none; }
.burger[aria-expanded="true"] .i-open { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }
@media (max-width: 1023px) {
  .js .burger { display: inline-flex; }
  .js .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; }
  .js .menu.open { display: flex; }
  .js .menu a { padding: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; padding: 8px 0; }
  html:not(.js) .menu { order: 3; width: 100%; flex-wrap: wrap; }
}
@media (max-width: 479px) { .logo small { display: none; } }

/* Первый экран */
.hero { padding-top: 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--accent-text); }
.hero .lead { font-size: 1.1rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--text-muted); font-size: .92rem; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 16px; height: 16px; color: var(--good); }
@media (max-width: 1023px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding-top: 48px; } }

.term-fig { margin: 0; min-width: 0; }
.term-fig figcaption { color: var(--text-muted); font-size: .9rem; margin-bottom: 10px; }
.term { background: #141414; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); min-width: 0; }
.term-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #2b2b2b; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #474747; }
.term-body { padding: 18px; font-family: var(--mono); font-size: .82rem; line-height: 1.7; color: #e8dfd0; }
.term .cmd { word-break: break-all; margin-bottom: 8px; }
.term .ln { display: flex; justify-content: space-between; gap: 12px; }
.term .p { color: #f2874f; }
.term .ok { color: #5cbf7f; }
.term .dim { color: #b8ad9c; }
.term-body > .ok, .term-body > .dim { word-break: break-all; }
@media (max-width: 479px) { .term-body { font-size: .78rem; padding: 14px; } }

/* Карточки */
.grid { display: grid; gap: 16px; margin-top: 36px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; min-width: 0; }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card h3 svg { width: 22px; height: 22px; color: var(--accent-text); }
.card p { margin: 8px 0 0; color: var(--text-muted); font-size: .95rem; }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 16px; font-weight: 600; }
.more svg { width: 16px; height: 16px; color: var(--accent-text); }
.more:hover { color: var(--accent-text); }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 36px 0 0; counter-reset: s; list-style: none; padding: 0; }
.steps.steps-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1023px) { .steps, .steps.steps-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .steps, .steps.steps-3 { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; min-width: 0; }
.step h3 { display: flex; align-items: baseline; gap: 10px; }
.step h3::before { counter-increment: s; content: counter(s) "."; color: var(--accent-text); font-weight: 700; }
.step p { margin: 6px 0 0; color: var(--text-muted); font-size: .93rem; }

/* Вид админки (условный) */
.shot { margin-top: 36px; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--bg); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.shot-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.shot-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.shot-url { margin-left: 8px; flex: 1; min-width: 0; max-width: 360px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--text-muted); font-size: .78rem; display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.shot-body { display: grid; grid-template-columns: 200px 1fr; min-height: 380px; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.side span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .86rem; color: var(--text-muted); }
.side span b { width: 14px; height: 14px; border-radius: 4px; background: var(--border); flex: none; }
.side span.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.side span.on b { background: var(--accent); }
.shot-main { padding: 18px; min-width: 0; }
/* Вкладки как в проекте: полоса с фоном без обводки, выбранная: яркий текст и оранжевая полоса снизу */
.tabs { display: flex; gap: 2px; background: var(--surface); border-radius: 10px; padding: 4px 4px 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 10px; font-size: .85rem; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 8px 8px 0 0; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab svg { width: 14px; height: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.tile { background: var(--surface); border-radius: 14px; padding: 12px; min-width: 0; }
.tile .l { height: 8px; width: 60%; border-radius: 4px; background: var(--border); }
.tile .v { height: 16px; width: 80%; border-radius: 5px; background: var(--text-muted); opacity: .5; margin-top: 10px; }
.tile .d { height: 6px; width: 30%; border-radius: 3px; margin-top: 8px; }
.d-good { background: var(--good); } .d-flat { background: var(--flat); } .d-bad { background: var(--bad); }
.rows { margin-top: 14px; background: var(--surface); border-radius: 14px; padding: 6px 12px; }
.row { display: grid; grid-template-columns: 70px 1fr 90px 80px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row i { display: block; height: 8px; border-radius: 4px; background: var(--border); }
.pill { height: 20px; border-radius: 999px; }
.pill-accent { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.pill-good { background: color-mix(in srgb, var(--good) 35%, transparent); }
.pill-flat { background: color-mix(in srgb, var(--flat) 35%, transparent); }
.shot-note { margin: 12px 0 0; color: var(--text-muted); font-size: .85rem; }
@media (max-width: 767px) {
  .shot-body { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
  .tabs { flex-wrap: wrap; overflow: visible; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 50px 1fr 60px; }
  .row > :nth-child(3) { display: none; }
}

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; max-width: 920px; }
@media (max-width: 767px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; min-width: 0; }
.plan.hl { border-color: var(--accent); }
.plan-tag { align-self: flex-start; font-size: .78rem; font-weight: 600; background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 4px 10px; border-radius: 999px; }
.plan h3 { margin-top: 14px; }
.price { font-size: 2.6rem; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; }
.price small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; color: var(--text-muted); font-size: .95rem; }
.plan li svg { width: 18px; height: 18px; color: var(--good); margin-top: 3px; }
.plan .btn { margin-top: auto; }
.soft { margin-top: 20px; max-width: 920px; display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: 16px; background: var(--surface-2); color: var(--text-muted); font-size: .95rem; }
.soft svg { width: 20px; height: 20px; color: var(--accent-text); margin-top: 2px; }
.soft p { margin: 0; }

/* Таблицы */
.table-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); max-width: 920px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { color: var(--text-muted); font-weight: 600; font-size: .85rem; background: var(--surface-2); }
tbody th { font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
td { color: var(--text-muted); }
@media (max-width: 599px) { table { min-width: 520px; } }
.note { margin: 16px 0 0; color: var(--text-muted); max-width: 920px; }
.checklist { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; max-width: 820px; }
.checklist li { display: flex; gap: 10px; color: var(--text-muted); }
.checklist svg { width: 18px; height: 18px; color: var(--good); margin-top: 4px; }
.sub-h { font-size: 1.25rem; margin: 36px 0 0; }

/* Возможности (страница) */
.feat-section + .feat-section { padding-top: 0; }
.feat-section h2 { display: flex; align-items: center; gap: 12px; }
.feat-section h2 svg { width: 28px; height: 28px; color: var(--accent-text); }
.feat-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--border); }
.feat-list li { display: grid; grid-template-columns: 1fr 2fr; gap: 8px 32px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.feat-list h3 { font-size: 1.05rem; }
.feat-list p { margin: 0; color: var(--text-muted); }
@media (max-width: 767px) { .feat-list li { grid-template-columns: 1fr; } }

/* Вопросы */
.faq { margin-top: 32px; max-width: 820px; display: grid; gap: 10px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 20px; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; min-height: 44px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary svg { width: 18px; height: 18px; color: var(--text-muted); transition: transform .2s; }
details[open] summary svg { transform: rotate(45deg); color: var(--accent-text); }
details p { margin: 0 0 18px; color: var(--text-muted); }

/* Призыв */
.cta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 40px 28px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta p { margin: 8px 0 0; color: var(--text-muted); }
.cta .hero-actions { margin: 0; }
.cta a.link { display: inline-block; padding: 8px 0; }

/* Страницы без главной */
.page-hero { padding-bottom: 24px; padding-top: 64px; }
@media (max-width: 767px) { .page-hero { padding-top: 40px; } }
.page-hero + section { padding-top: 24px; }
.contact-box h2 { font-size: 1.25rem; }
.contact-box ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; color: var(--text-muted); }
.contact-box li { overflow-wrap: anywhere; }
.contact-box a.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.notfound { text-align: left; }
.notfound .menu-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.notfound .menu-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Подвал */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 32px; color: var(--text-muted); font-size: .92rem; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
@media (max-width: 767px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }
.foot h2 { margin: 0 0 10px; color: var(--text); font-size: 1.25rem; }
.foot .col a { display: block; padding: 3px 0; }
.foot .col a:hover { color: var(--text); }
.foot .logo { color: var(--text); }
.foot p { margin: 12px 0 0; max-width: 300px; }
.copy { margin-top: 28px; font-size: .85rem; }
@media (max-width: 767px) { .foot .col a { padding: 10px 0; min-height: 44px; } }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
