/* MyGrid — цвета взяты с баннера: ночной синий, бирюзовое свечение,
   зелёный с экрана робота (только для прибыли), красный с антенны (только для риска). */
:root {
  --bg: #050c22;
  --bg-alt: #081433;
  --surface: #0c1b42;
  --line: #1b2f63;
  --text: #e8f0ff;
  --muted: #94a7cd;
  --accent: #3dd6f3;
  --accent-ink: #02202a;
  --profit: #46e39c;
  --risk: #ff6b5c;
  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Onest", "Segoe UI", system-ui, sans-serif;
  --radius-s: 6px;
  --radius-l: 14px;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #8ae9fb; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font: 700 clamp(28px, 4vw, 40px)/1.15 var(--display); letter-spacing: -0.01em; }
h3 { font: 600 19px/1.3 var(--body); }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 780px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius-s);
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #7ce6fa; color: var(--accent-ink); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--text); }
.btn--danger { background: transparent; border-color: #5a2a33; color: var(--risk); }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn--wide { width: 100%; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(5, 12, 34, .88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(27, 47, 99, .6); }
.top__row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.logo { font: 800 19px/1 var(--display); text-decoration: none; letter-spacing: .01em; }
.logo__my { color: var(--text); }
.logo__robot { color: var(--accent); text-shadow: 0 0 18px rgba(61, 214, 243, .55); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--text); }
.top__toggle { display: none; }

/* ---------- сообщения ---------- */
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-s); background: var(--surface); border-left: 3px solid var(--accent); margin-bottom: 8px; }
.flash--error { border-left-color: var(--risk); }

/* ---------- первый экран ---------- */
.hero__banner { background: #040a1f; border-bottom: 1px solid var(--line); }
.hero__banner img { width: 100%; max-width: 1400px; margin: 0 auto; }
.hero__body { padding-top: 40px; padding-bottom: 72px; }
.hero__lead { max-width: 640px; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 48px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 18px 20px 0 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 4px 0 0; font-weight: 600; }

/* ---------- секции ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__intro { max-width: 680px; margin-top: 16px; color: var(--muted); font-size: 18px; }

/* ---------- схема сетки: главный визуальный элемент ---------- */
.grid-demo { margin: 48px 0 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.grid-demo svg { width: 100%; font-family: var(--body); font-size: 13px; }
.grid-demo figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; }
.gd-axis line { stroke: var(--line); stroke-width: 1.5; }
.gd-axis text, .gd-step text { fill: var(--muted); }
.gd-levels line { stroke: var(--line); stroke-dasharray: 2 6; }
.gd-step line { stroke: var(--muted); stroke-width: 1; }
.gd-avg line { stroke: var(--muted); stroke-dasharray: 8 6; }
.gd-avg text { fill: var(--muted); }
.gd-tp line { stroke: var(--profit); stroke-width: 1.5; }
.gd-tp text { fill: var(--profit); font-weight: 600; }
.gd-price { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(61, 214, 243, .5)); }
.gd-orders circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; }
.gd-orders text { fill: var(--text); font-weight: 600; }
.gd-close circle { fill: var(--profit); }
.gd-close text { fill: var(--profit); font-weight: 700; }

/* Анимация один раз при появлении схемы: цена рисуется, сделки появляются по очереди */
.js .grid-demo .gd-price { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .grid-demo .gd-orders g, .js .grid-demo .gd-close, .js .grid-demo .gd-avg, .js .grid-demo .gd-tp { opacity: 0; }
.js .grid-demo.is-on .gd-price { transition: stroke-dashoffset 3.2s cubic-bezier(.45, 0, .3, 1); stroke-dashoffset: 0; }
.js .grid-demo.is-on .gd-orders g { transition: opacity .3s; transition-delay: calc(.45s + var(--i) * .62s); opacity: 1; }
.js .grid-demo.is-on .gd-avg { transition: opacity .5s 2.4s; opacity: 1; }
.js .grid-demo.is-on .gd-tp { transition: opacity .5s 2.6s; opacity: 1; }
.js .grid-demo.is-on .gd-close { transition: opacity .4s 3.2s; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .grid-demo .gd-price { stroke-dashoffset: 0; }
  .js .grid-demo .gd-orders g, .js .grid-demo .gd-close, .js .grid-demo .gd-avg, .js .grid-demo .gd-tp { opacity: 1; }
  .js .grid-demo.is-on * { transition: none !important; }
  html { scroll-behavior: auto; }
}

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.how p { margin-top: 10px; color: var(--muted); }

.protect { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.protect ul { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; margin: 20px 0 0; padding: 0; list-style: none; }
.protect li { color: var(--muted); }
.protect li strong { color: var(--text); font-weight: 600; }
.protect__warn { max-width: 780px; margin-top: 32px; padding: 16px 20px; border-left: 3px solid var(--risk); background: rgba(255, 107, 92, .07); }

/* ---------- результаты ---------- */
.results { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; margin-top: 48px; align-items: stretch; }
.result-card { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.result-card__value { font: 800 clamp(56px, 8vw, 88px)/1 var(--display); color: var(--profit); letter-spacing: -0.03em; }
.result-card__label { margin-top: 12px; font-size: 19px; font-weight: 600; }
.result-card__detail { margin-top: 20px; color: var(--muted); }
.shot { margin: 0; }
.shot a { display: block; border-radius: var(--radius-l); }
.shot img { width: 100%; border-radius: var(--radius-l); border: 1px solid var(--line); }
.shot a:hover img { border-color: var(--accent); }
.shot__placeholder { display: grid; place-items: center; min-height: 280px; height: calc(100% - 32px); border: 1px dashed var(--line); border-radius: var(--radius-l); color: var(--muted); }
.shot figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.results__more { margin-top: 28px; color: var(--muted); }

/* ---------- тарифы ---------- */
.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; align-items: start; }
.tariff { display: flex; flex-direction: column; padding: 28px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-l); }
.tariff--main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 48px -12px rgba(61, 214, 243, .45); }
.tariff__name { font: 700 22px/1.1 var(--display); }
.tariff__price { margin-top: 16px; font: 700 34px/1 var(--display); }
.tariff__old { display: block; margin-bottom: 6px; font: 600 17px/1 var(--body); color: var(--muted); text-decoration-color: var(--risk); }
.tag--promo { margin-left: 8px; vertical-align: middle; color: var(--profit); border-color: rgba(70, 227, 156, .45); font: 600 12px/1.4 var(--body); text-decoration: none; }
.tariff__limit { margin-top: 24px; }

/* ---------- акции ---------- */
.promos { display: grid; gap: 20px; margin-top: 36px; }
.promo { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; padding: 32px; background: var(--bg-alt); border: 1px solid var(--profit); border-radius: var(--radius-l); }
.promo h2 { font-size: clamp(24px, 3vw, 32px); }
.promo__body .muted { margin-top: 14px; font-size: 18px; }
.promo__term { margin-top: 20px; font-size: 15px; color: var(--muted); }
.promo__old { color: var(--muted); font-size: 18px; text-decoration: line-through; text-decoration-color: var(--risk); }
.promo__new { margin: 4px 0 8px; font: 800 clamp(36px, 5vw, 48px)/1 var(--display); color: var(--profit); }
.promo__offer .btn { margin-top: 20px; }
@media (max-width: 760px) { .promo { grid-template-columns: 1fr; padding: 24px 18px; } }
.tariff__limit p { font-weight: 600; }
.meter { height: 6px; margin-top: 10px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter span { display: block; width: var(--fill); height: 100%; background: var(--accent); }
.tariff__list { margin: 24px 0 28px; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.tariff__list li { padding: 7px 0; border-top: 1px solid var(--line); }
.tariff form { margin-top: auto; }
.tariffs__note { max-width: 780px; margin-top: 28px; color: var(--muted); font-size: 15px; }

/* ---------- шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 48px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 20px; border-top: 2px solid var(--line); }
.steps li::before { content: counter(step); display: block; margin-bottom: 14px; font: 700 15px/1 var(--display); color: var(--accent); }
.steps p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.reqs { margin-top: 56px; }
.reqs ul { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.reqs li { margin: 6px 0; }

/* ---------- вопросы ---------- */
.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 20px 36px 20px 0; font-weight: 600; font-size: 18px; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 500 24px/1 var(--display); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 680px; }

.cta { padding: 56px 0; border-top: 1px solid var(--line); }
.cta__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta__text { font: 600 clamp(19px, 2.4vw, 24px)/1.35 var(--body); }

/* ---------- подвал ---------- */
.foot { padding: 56px 0 104px;   /* снизу место под кнопку чата */ background: #030819; border-top: 1px solid var(--line); }
.foot__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.foot__note { margin-top: 14px; max-width: 420px; color: var(--muted); font-size: 15px; }
.foot__links { display: grid; gap: 10px; align-content: start; }
.foot__links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot__links a:hover { color: var(--text); }
.foot__legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: #6f82a8; font-size: 13px; }
.foot__legal p + p { margin-top: 8px; }

/* ---------- формы и кабинет ---------- */
.page { padding: 64px 0 96px; }
.page h1 { font: 700 clamp(28px, 4vw, 38px)/1.15 var(--display); }
.page__sub { margin-top: 12px; color: var(--muted); }
.form-card { max-width: 440px; margin: 0 auto; padding: 36px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-l); }
.form-card h1 { font-size: 28px; }
.field { display: grid; gap: 6px; margin-top: 20px; }
.field label { font-size: 15px; font-weight: 500; }
.field small { color: var(--muted); font-size: 13px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; min-height: 46px; padding: 0 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  font: 400 16px var(--body);
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 214, 243, .2); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.form-card .btn { margin-top: 24px; }
.form-card__alt { margin-top: 20px; color: var(--muted); font-size: 15px; text-align: center; }

.panel { margin-top: 32px; padding: 28px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-l); }
.panel h2 { font: 600 21px/1.3 var(--body); }
.panel + .panel { margin-top: 20px; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tag--ok { color: var(--profit); border-color: rgba(70, 227, 156, .35); }
.tag--wait { color: #ffd166; border-color: rgba(255, 209, 102, .35); }
.key { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.key code { padding: 10px 16px; background: var(--bg); border: 1px solid var(--accent); border-radius: var(--radius-s); font: 600 20px/1 Consolas, "Cascadia Mono", monospace; letter-spacing: .04em; color: var(--text); user-select: all; }
.request { margin-top: 18px; padding: 14px 16px; border-left: 3px solid #ffd166; background: rgba(255, 209, 102, .07); }
.request form { margin-top: 10px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.inline-form input { max-width: 260px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.files a { display: block; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--text); }
.files a:hover { border-color: var(--accent); }
.files span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.guide { margin: 16px 0 0; padding-left: 22px; color: var(--muted); }
.guide li { margin: 8px 0; }
.guide strong { color: var(--text); font-weight: 600; }

.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td form { display: inline-flex; gap: 6px; }
td input[type=text] { min-height: 34px; width: 130px; font-size: 14px; }
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 24px; }
.stats div { display: grid; }
.stats strong { font: 700 28px/1.1 var(--display); }
.stats span { color: var(--muted); font-size: 14px; }

.legal { max-width: 760px; }
.legal h2 { font: 600 21px/1.3 var(--body); margin-top: 36px; }
.legal p, .legal li { color: var(--muted); margin-top: 12px; }
.legal .draft { padding: 14px 18px; border-left: 3px solid #ffd166; background: rgba(255, 209, 102, .07); color: var(--text); }

/* ---------- чат и обратная связь ---------- */
textarea {
  width: 100%; padding: 10px 14px; resize: vertical;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  font: 400 16px/1.45 var(--body);
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 214, 243, .2); }
.form-card--wide { max-width: 600px; }
.form-card .page__sub { font-size: 15px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

.chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat__fab {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; cursor: pointer;
  font: 600 15px var(--body); box-shadow: 0 0 0 1px rgba(61, 214, 243, .4), 0 8px 30px rgba(61, 214, 243, .35);
  position: relative;
}
.chat__fab:hover { background: #7ce6fa; }
.chat__fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.chat__badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--risk); color: #fff; font-size: 12px; font-weight: 700; }
.chat__panel {
  width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.chat__panel[hidden], .chat__badge[hidden], .chat__guest[hidden] { display: none; }
.chat__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat__head strong { display: block; font-size: 16px; }
.chat__head span { color: var(--muted); font-size: 13px; }
.chat__close { width: 36px; height: 36px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 22px; line-height: 1; cursor: pointer; }
.chat__close:hover { color: var(--text); border-color: var(--accent); }
.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat__hello { color: var(--muted); font-size: 14px; }
.chat__form { padding: 12px; border-top: 1px solid var(--line); background: var(--bg-alt); }
.chat__guest input[type=text] { min-height: 40px; font-size: 14px; }
.chat__guest .check { margin: 8px 0 10px; font-size: 13px; }
.chat__row { display: flex; gap: 8px; align-items: flex-end; }
.chat__row textarea { min-height: 44px; max-height: 140px; font-size: 15px; }
.chat__row .btn { min-height: 44px; padding: 0 14px; }
.chat__error { margin-top: 8px; color: var(--risk); font-size: 13px; }
.chat__error[hidden] { display: none; }

.msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.msg--user { align-self: flex-end; background: rgba(61, 214, 243, .12); border-color: rgba(61, 214, 243, .35); }
.chat .msg--admin { border-left: 3px solid var(--accent); }
/* В админке наоборот: свои ответы справа */
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread .msg--admin { align-self: flex-end; background: rgba(61, 214, 243, .12); border-color: rgba(61, 214, 243, .35); }
.thread .msg--user { align-self: flex-start; background: var(--surface); border-color: var(--line); }
.chat-snippet { white-space: normal; min-width: 220px; color: var(--muted); }

/* ---------- уведомление о cookie ---------- */
.cookie {
  position: fixed; left: 20px; bottom: 20px; z-index: 60; max-width: 460px;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .55); font-size: 14px; color: var(--muted);
}
.cookie[hidden] { display: none; }
.cookie__actions { display: flex; gap: 10px; margin-top: 12px; }
.foot__link { padding: 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.foot__link:hover { color: var(--text); }

/* ---------- дашборд ---------- */
.dash { padding: 28px 0 110px; }
.dash__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash__head h1 { font: 700 clamp(24px, 4vw, 32px)/1.1 var(--display); }
.dash__status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.dash__status .is-error { color: var(--risk); }
.dash__tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; margin: 16px -4px 0; padding: 10px 4px; background: var(--bg); scrollbar-width: none; }
.dash__tabs a { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
.dash__tabs a:hover { color: var(--text); border-color: var(--accent); }
.dash__block { margin-top: 26px; scroll-margin-top: 64px; }
.dash__block h2 { display: flex; align-items: center; gap: 10px; font: 600 20px/1.3 var(--body); }
.admin__block { margin-top: 32px; }
.admin__block > h2, .admin__block > .panel__head h2 { font: 600 21px/1.3 var(--body); }
.admin .dash__tabs { margin-top: 16px; }
.tile--link { text-decoration: none; color: inherit; transition: border-color .15s; }
.tile--link:hover, .tile--link:focus-visible { border-color: var(--accent, #3dd6f3); }
.qlist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.qlist a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 16px; background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.qlist a:hover, .qlist a:focus-visible { border-color: var(--accent, #3dd6f3); }
.qlist .is-new a { border-color: rgba(255, 209, 102, .5); }
.qlist__who { font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; overflow-wrap: anywhere; }
.qlist__time { color: var(--muted); font-size: 13px; }
.qlist__text { grid-column: 1 / -1; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.dash__sub { font: 500 13px/1.3 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 -4px; }
.app-mode .dash { padding-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.tile { display: grid; align-content: start; gap: 2px; padding: 14px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-s); }
.tile strong { font: 700 22px/1.15 var(--display); overflow-wrap: anywhere; }
.tile span { color: var(--muted); font-size: 13px; }
.tile small { color: #6f82a8; font-size: 12px; }
.tile--ok strong { color: var(--profit); }
.tile--warn strong { color: #ffd166; }
.tile--bad { border-color: rgba(255, 107, 92, .5); }
.tile--bad strong { color: var(--risk); }
.chart-card { margin-top: 12px; padding: 14px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-s); }
.chart-card h3 { font: 500 14px/1.3 var(--body); color: var(--muted); margin-bottom: 8px; }
.chart { display: block; width: 100%; height: auto; }
.chart__label { fill: #6f82a8; font: 11px var(--body); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rank li span { overflow-wrap: anywhere; color: var(--text); }
.rank li b { color: var(--muted); font-weight: 600; }
.funnel { display: grid; gap: 8px; }
.funnel__row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.funnel__bar { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #2a7fd4); }
.services { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.services li { display: flex; justify-content: space-between; font-size: 14px; }
.services li.ok b { color: var(--profit); }
.services li.bad b { color: var(--risk); }
.renewals { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.renewals li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.renewals li.ok b { color: var(--profit); }
.renewals li.warn b { color: #ffd166; }
.renewals li.bad b { color: var(--risk); }
.linkbtn { padding: 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.renew-form { display: grid; gap: 8px; margin: 10px 0; max-width: 420px; }
.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; overflow-wrap: anywhere; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot--ok { background: var(--profit); box-shadow: 0 0 8px var(--profit); }
.dot--bad { background: var(--risk); box-shadow: 0 0 8px var(--risk); }
.alert { margin-top: 8px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg-alt); border-left: 3px solid var(--profit); font-size: 15px; }
.alert--bad { border-left-color: var(--risk); }
.recent { margin-top: 10px; color: var(--muted); font-size: 13px; }
.recent summary { cursor: pointer; }
.recent p { margin-top: 6px; white-space: pre-line; }
.small { font-size: 13px; margin-top: 8px; }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .how, .tariffs { grid-template-columns: 1fr; }
  .tariffs { max-width: 460px; }
  .results { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .protect ul { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .top__toggle { display: inline-flex; min-height: 40px; padding: 0 14px; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-s); font: 500 15px var(--body); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .btn { margin-top: 16px; }
  .foot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero__body { padding-top: 28px; padding-bottom: 56px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .steps { grid-template-columns: 1fr; }
  .grid-demo { padding: 14px; overflow-x: auto; }
  .grid-demo svg { min-width: 600px; font-size: 15px; }
  .form-card { padding: 24px 18px; }
  .panel { padding: 20px 16px; }
  .key code { font-size: 17px; }
  .chat { right: 16px; bottom: 16px; }
  .cookie { left: 12px; right: 12px; bottom: 84px; max-width: none; }
  .chat__label { display: none; }
  .chat__fab { width: 56px; padding: 0; justify-content: center; }
  .chat__panel { height: calc(100vh - 100px); }
  .lists { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile strong { font-size: 19px; }
  .funnel__row { grid-template-columns: 90px 1fr auto; }
  .facts-list { grid-template-columns: 1fr; }
  .facts-list dd { margin-bottom: 6px; }
}

/* ---------- Переключатель видов дашборда ---------- */
.viewswitch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.viewswitch a { padding: 5px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
.viewswitch a[aria-current="page"] { background: var(--surface); color: var(--text); }
.viewswitch a:hover { color: var(--text); }

/* ---------- Виды «Стол» и «Счёт»: один экран без прокрутки ---------- */
.desk-page { overflow: hidden; }
.desk { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; gap: 1.6vh; padding: 2vh 2vw;
  transition: transform 2s ease; font-size: clamp(13px, 1.25vw + .4vh, 22px); line-height: 1.35; }
.desk__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.desk__clock { display: flex; align-items: baseline; gap: 14px; }
.desk__clock b { font: 700 clamp(26px, 3.6vw, 56px)/1 var(--display); }
.desk__clock span { color: var(--muted); }
.desk__state { padding: .35em 1em; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; }
.desk__state.is-ok { color: var(--profit); border-color: rgba(70, 227, 156, .4); }
.desk__state.is-bad { color: var(--risk); border-color: rgba(255, 107, 92, .6); background: rgba(255, 107, 92, .08); }
.viewswitch--desk { opacity: .55; }
.viewswitch--desk:hover, .viewswitch--desk:focus-within { opacity: 1; }
.desk.is-offline .desk__grid, .desk.is-offline .desk__acc { opacity: .45; }

.desk__grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1.6vw; min-height: 0; }
.card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 2vh 1.6vw;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-l); }
.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 1vh; font: 600 1em/1.2 var(--body); color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-size: .8em; }
.card__sub { margin-top: 2vh !important; }
.big { font: 700 clamp(26px, 3.6vw, 64px)/1.05 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.big.is-small { font-size: 1.2em; color: var(--risk); white-space: normal; }
.big--huge { font-size: clamp(34px, 5.2vw, 110px); }
.big__label { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45em 1em; margin: 1.6vh 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.is-up { color: var(--profit); }
.is-down, .is-bad { color: var(--risk); }
.is-warn { color: #ffd166; }
.spark { flex: 1; min-height: 70px; margin-top: 1.6vh; display: flex; flex-direction: column; }
.spark svg { flex: 1; width: 100%; min-height: 0; }
.spark__legend { display: flex; gap: 16px; color: var(--muted); font-size: .75em; }
.spark__legend .l-bal::before, .spark__legend .l-eq::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; }
.spark__legend .l-bal::before { background: var(--accent); }
.spark__legend .l-eq::before { background: #ffd166; }
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8vw; }
.todo__item { display: grid; justify-items: center; padding: 1.2vh .5vw; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--profit); }
.todo__item b { font: 700 2em/1.1 var(--display); }
.todo__item span { color: var(--muted); font-size: .85em; }
.todo__item.is-warn { color: #ffd166; border-color: rgba(255, 209, 102, .55); background: rgba(255, 209, 102, .07); }
.hosts { display: grid; gap: 2.2vh; }
.host__head { display: flex; align-items: center; gap: 10px; margin-bottom: .8vh; }
.host__head small { margin-left: auto; color: var(--muted); }
.host p { margin: .6vh 0 0; font-size: .85em; }
.gauge { display: grid; grid-template-columns: 3.2em 1fr 3em; align-items: center; gap: .6em; margin-top: .5vh; }
.gauge span { color: var(--muted); font-size: .85em; }
.gauge i { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.gauge b { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.gauge em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.gauge.is-warn b { background: #ffd166; }
.gauge.is-bad b { background: var(--risk); }
.desk__alerts { display: grid; gap: .4vh; }
.desk__alerts p { margin: 0; padding: .5em 1em; border-radius: var(--radius-s); background: rgba(255, 107, 92, .1); color: var(--risk);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.desk__acc { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto 1fr; gap: 2vh 3vw; min-height: 0; }
.acc__main { align-self: center; }
.acc__row { display: flex; gap: 3vw; margin-top: 2vh; }
.hero { display: grid; }
.hero b { font: 700 clamp(20px, 2.8vw, 46px)/1.1 var(--display); }
.hero span { color: var(--muted); }
.kv--wide { align-self: center; font-size: 1.1em; }
.spark--tall { grid-column: 1 / -1; min-height: 0; }

/* Планшет вертикально или телефон: блоки друг под другом, прокрутка разрешена */
@media (max-aspect-ratio: 1/1) {
  .desk-page { overflow: auto; }
  .desk { height: auto; min-height: 100vh; font-size: clamp(14px, 2.4vw, 22px); }
  .desk__grid, .desk__acc { grid-template-columns: 1fr; }
  .card--account .spark, .spark--tall { min-height: 160px; }
  .desk__clock span { display: none; }
}
/* ---------- Настройки дашборда ---------- */
.settings { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 18, .72); }
.settings[hidden] { display: none; }
.settings__box { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: var(--radius-l); font-size: 16px; line-height: 1.4; }
.settings__box h2 { margin: 0 0 12px; font: 600 20px/1.3 var(--body); }
.settings fieldset { margin: 0 0 14px; padding: 0; border: 0; display: grid; gap: 8px; }
.settings legend { margin-bottom: 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.settings .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.settings input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.settings__rate { margin: 4px 0; }
.settings__box .btn { margin-top: 12px; width: 100%; }
.desk__tools { display: flex; align-items: center; gap: 10px; }
.desk__settings .settings__btn { opacity: .55; }
.desk__settings .settings__btn:hover, .desk__settings .settings__btn:focus-visible { opacity: 1; }
.big__rub { color: var(--muted); font-size: .9em; }
.desk__acc .big__rub { font-size: 1.3em; margin-top: .3em; }
.kv dd small { display: block; color: var(--muted); font-weight: 400; font-size: .78em; }[data-account-tiles] { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
[data-account-tiles] .tile strong { overflow-wrap: normal; white-space: nowrap; font-size: clamp(17px, 2.1vw, 22px); }.settings__sub { display: grid; gap: 6px; margin-left: 30px; }
.settings__sub b { color: var(--muted); font-weight: 500; }
.settings input:disabled + span { opacity: .45; }.verify-bar { background: rgba(255, 209, 102, .08); border-bottom: 1px solid rgba(255, 209, 102, .35); }
.verify-bar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.verify-bar p { margin: 0; font-size: 15px; color: #ffe3a3; overflow-wrap: anywhere; }