/* Деклариум — стиль.
   Идея: спокойный светлый интерфейс с одним ярким мотивом — пульсом.
   Пульс живёт в логотипе, в шапке главной и в состояниях загрузки.
   Всё остальное намеренно тихое: цифры налога должны быть самым громким
   элементом на странице. */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #0b1020;
  --ink-2: #141a33;
  --brand: #4f5bff;
  --brand-2: #7c5cff;
  --glow: #22d3ee;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #131722;
  --muted: #5b6172;
  --line: #e4e7f0;
  --ok: #158a5e;
  --ok-bg: #e6f6ee;
  --warn: #b26a00;
  --warn-bg: #fff4e0;
  --bad: #c2362b;
  --bad-bg: #fdecea;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(19, 23, 34, .04), 0 8px 24px -12px rgba(19, 23, 34, .18);
  --shadow-lift: 0 2px 4px rgba(19, 23, 34, .05), 0 18px 40px -16px rgba(79, 91, 255, .35);
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.12; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: clamp(19px, 2.4vw, 24px); margin: 40px 0 12px; font-weight: 700; }
p.lead { font-size: 18px; color: var(--muted); margin: 0 0 26px; max-width: 62ch; }
a { color: var(--brand); }
.wrap { max-width: 980px; margin: 0 auto; padding: 16px 22px; }
main.wrap { padding-top: 30px; padding-bottom: 72px; }

/* --- шапка ------------------------------------------------------------------ */

header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 247, 251, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
header.site.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(19,23,34,.3); }
/* Шапка шире текста намеренно: колонка в 980px удобна для чтения,
   но шести пунктам меню, логотипу и кнопке входа её не хватает —
   они начинают жаться друг к другу. */
header.site .wrap {
  max-width: 1180px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 12px; padding-bottom: 12px;
}
a.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  color: var(--text); text-decoration: none; letter-spacing: -0.01em;
}
/* знак несёт подложку сам (см. tools/build_logo.py), тени и градиента здесь нет:
   логотип в шапке обязан совпадать с фавиконом и с файлами в static/brand */
a.brand .mark { width: 34px; height: 34px; border-radius: 10px; display: block;
  box-shadow: 0 6px 16px -8px var(--brand); }
a.brand .mark svg { width: 34px; height: 34px; display: block; border-radius: 10px; }
header nav { display: flex; align-items: center; gap: 10px; }
header nav .links { display: flex; align-items: center; gap: 2px; }
header nav a, header nav button.linklike, header nav .menu-btn {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  min-height: 38px; display: inline-flex; align-items: center;
  padding: 7px 12px; border-radius: 9px; background: none; border: 0; font-family: inherit; cursor: pointer;
  box-shadow: none; transition: color .18s var(--ease), background .18s var(--ease);
  /* пункт меню — одна строка: «Брокерский счёт» иначе ломается пополам
     и строка шапки прыгает по высоте */
  white-space: nowrap;
}
header nav a:hover, header nav button.linklike:hover, header nav .menu-btn:hover {
  color: var(--text); background: rgba(19, 23, 34, .05); transform: none;
}

/* «Вы здесь» — цвет и тонкая черта под словом, а не плашка: белый прямоугольник
   с обводкой читался как поле ввода и спорил с чёрной кнопкой рядом. */
header nav .links a.active { color: var(--text); background: none; position: relative; }
header nav .links a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--brand);
}
header nav .links a.active:hover { background: rgba(19, 23, 34, .05); }

/* «Выйти» — служебное действие, а не пункт навигации: отделяем волоском
   и приглушаем, чтобы не соперничало со ссылками на разделы. */
header nav .links form.inline { display: inline-flex; align-items: center; }
header nav .links form.inline::before {
  content: ""; width: 1px; height: 18px; margin: 0 6px 0 4px; background: var(--line);
}
header nav button.linklike { font-weight: 500; }

header nav a.cta {
  color: #fff; background: var(--ink); padding: 8px 16px; font-weight: 650;
  box-shadow: 0 8px 18px -12px rgba(19, 23, 34, .8);
}
header nav a.cta:hover, header nav a.cta.active {
  background: var(--brand); color: #fff; box-shadow: 0 10px 22px -12px var(--brand);
}
form.inline { display: inline; margin: 0; }

/* Кнопка меню и переключатель существуют всегда, но на широком экране
   спрятаны: ссылки и так помещаются в строку. На узком экране ссылки
   уходят в выпадающую панель, а кнопка «Войти»/«Кабинет» остаётся на виду —
   это единственное действие, ради которого человек идёт в шапку. */
header nav .menu-btn { display: none; gap: 8px; }
header nav .menu-btn svg { width: 20px; height: 20px; }
.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }

/* Порог выпадающего меню — 1040px, а не 760: пунктов пять, и до этой ширины
   они прижимались к логотипу, а кнопка входа уезжала за край. Лучше раньше
   свернуть, чем показывать обрезанную строку. */
@media (max-width: 1040px) {
  header.site .wrap { padding-left: 14px; padding-right: 14px; flex-wrap: nowrap; }
  /* бренд ужимается, меню и кнопка входа — нет: они должны остаться целыми */
  a.brand { font-size: 17px; gap: 8px; min-width: 0; }
  header nav { gap: 6px; flex-shrink: 0; }
  header nav .menu-btn { display: inline-flex; padding: 7px 9px; }
  header nav a.cta { padding: 7px 12px; }
  header nav .links {
    display: none; position: absolute; left: 10px; right: 10px; top: calc(100% + 6px);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 8px; box-shadow: var(--shadow-lift);
  }
  header nav .links a, header nav .links button.linklike { min-height: 46px; font-size: 16px; padding: 10px 14px; }
  /* в столбце подчёркивание не читается как «вы здесь» — возвращаем заливку */
  header nav .links a.active { background: rgba(79, 91, 255, .1); color: var(--brand); }
  header nav .links a.active::after { display: none; }
  header nav .links form.inline { display: block; }
  header nav .links form.inline::before { display: none; }
  header nav .links form.inline button { width: 100%; justify-content: flex-start; }
  .menu-toggle:checked ~ .links { display: flex; }
  .menu-toggle:checked ~ .menu-btn { color: var(--text); background: #fff; }
  .wrap { padding-left: 14px; padding-right: 14px; }
}
header.site .wrap { position: relative; }
@media (max-width: 420px) {
  /* на самых узких экранах у кнопки меню остаётся только значок */
  header nav .menu-btn .label { display: none; }
  a.brand { font-size: 16px; }
  a.brand .mark, a.brand .mark svg { width: 30px; height: 30px; }
}

/* Ссылка «к содержимому» для клавиатуры и читалок: видна только в фокусе */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

/* Фокус с клавиатуры обязан быть виден везде, а не только у полей ввода */
a:focus-visible, button:focus-visible, summary:focus-visible, .menu-btn:focus-visible,
label.drop:focus-within { outline: 3px solid rgba(79, 91, 255, .55); outline-offset: 2px; border-radius: 8px; }

/* --- герой на главной ------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(124, 92, 255, .55), transparent 60%),
              radial-gradient(900px 400px at 90% 10%, rgba(34, 211, 238, .35), transparent 60%),
              var(--ink);
  border-radius: 24px; padding: 54px 44px 96px; margin: 6px 0 26px;
  box-shadow: 0 30px 60px -40px rgba(11, 16, 32, .8);
}
/* На телефоне карточка расчёта не наезжает на герой, значит и запас снизу не нужен */
@media (max-width: 720px) { .hero { padding: 32px 22px 26px; } }
.hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 48px); max-width: 16ch; position: relative; }
.hero p.lead { color: rgba(255,255,255,.78); max-width: 52ch; position: relative; }
.hero .pulse { position: absolute; right: -40px; bottom: 34px; width: min(58%, 520px); height: auto; opacity: .55; pointer-events: none;
  /* слева линия растворяется, чтобы не резать текст фактов */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 45%); mask-image: linear-gradient(90deg, transparent 0, #000 45%); }
@media (max-width: 720px) { .hero .pulse { display: none; } }
.hero .pulse path.line { fill: none; stroke: url(#pulseGrad); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s var(--ease) .2s forwards; }
.hero .pulse circle.dot { fill: var(--glow); filter: drop-shadow(0 0 10px var(--glow)); opacity: 0;
  animation: beat 1.6s ease-in-out 2.4s infinite; }
.hero .facts { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 30px; position: relative; z-index: 1; }
.hero .fact { min-width: 140px; }
.hero .fact b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; }
.hero .fact span { color: rgba(255,255,255,.72); font-size: 14px; }
@media (max-width: 720px) {
  /* три факта в ряд вместо столбика: экономит целый экран прокрутки */
  .hero .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
  .hero .fact { min-width: 0; }
  .hero .fact b { font-size: 16px; white-space: nowrap; }
  .hero .fact span { font-size: 12px; line-height: 1.35; display: block; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes beat { 0%, 100% { opacity: .5; r: 5; } 50% { opacity: 1; r: 8; } }

/* --- карточки ------------------------------------------------------------- */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin: 18px 0; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card.calc { border: 0; box-shadow: 0 24px 60px -30px rgba(79, 91, 255, .45); margin-top: -70px; position: relative; z-index: 2; }
@media (max-width: 720px) { .card.calc { margin-top: 0; } }
.card > h2:first-child { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* --- формы ---------------------------------------------------------------- */

label { display: block; font-weight: 700; margin: 16px 0 6px; font-size: 15px; }
label small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; margin-top: 2px; }
.hint { display: block; color: var(--muted); font-size: 13px; margin: 6px 0 0; }
input[type=text], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  font: inherit; background: #fff; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 91, 255, .15); }

/* Поле-ловушка формы обратной связи. Прячем стилем, а не display:none
   и не type=hidden: заполнялки форм и простые боты пропускают скрытое,
   но послушно вписывают текст в поле, которое считают видимым. */
.trap {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* зона загрузки поверх обычного input[type=file] */
.drop {
  position: relative; display: block; border: 2px dashed #c9cee0; border-radius: var(--radius);
  padding: 26px 20px; text-align: center; background: #fafbff; cursor: pointer; margin-top: 8px;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--brand); background: #f1f2ff; }
.drop.over { transform: scale(1.01); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .icon { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.drop .icon svg { width: 22px; height: 22px; }
.drop strong { display: block; font-size: 16px; }
.drop > span { color: var(--muted); font-size: 14px; }
.drop .files { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.drop .files .chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.drop.has-files { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
input[type=file]:not(.drop input) { width: 100%; padding: 10px; border: 1.5px dashed #c9cee0; border-radius: var(--radius-s); background: #fafbff; }

/* --- кнопки ---------------------------------------------------------------- */

button, .btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; box-shadow: 0 10px 22px -12px var(--brand);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--brand); filter: saturate(1.1); }
button:active, .btn:active { transform: translateY(0); }
button:disabled { opacity: .7; cursor: progress; transform: none; }
.btn.secondary, button.secondary { background: #fff; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.btn.secondary:hover, button.secondary:hover { border-color: #c9cee0; box-shadow: var(--shadow); }
.btn.danger, button.danger { background: #fff; color: var(--bad); border: 1.5px solid var(--line); box-shadow: none; }
.btn.big { padding: 15px 26px; font-size: 17px; }
.actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  /* Кнопки во всю ширину: попадать пальцем проще, а ряд из трёх узких
     кнопок на телефоне всё равно разваливается на строки. */
  .actions > button, .actions > .btn, .actions > form { flex: 1 1 100%; }
  .actions > button, .actions > .btn { justify-content: center; width: 100%; }
  .actions > form button { width: 100%; justify-content: center; }
  .actions > .muted { flex-basis: 100%; }
}
.btn.small, button.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }

/* --- таблицы и цифры -------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; margin: 8px 0; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.only-m { display: none; }
@media (max-width: 640px) {
  th, td { padding: 10px 8px; }
  /* второстепенные столбцы на телефоне убираем, чтобы уцелели главные,
     а то, что из них важно, показываем под главной ячейкой */
  th.hide-m, td.hide-m { display: none; }
  .only-m { display: block; margin-top: 6px; }
}
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Реквизиты: слева подпись, справа значение. Значения тут длинные и разные —
   название ИП, адрес, номер счёта, — поэтому перенос разрешён везде, а счета
   и ОГРН ломаются посимвольно: иначе одно длинное число распирает страницу. */
table.requisites th[scope="row"] {
  width: 38%; text-transform: none; letter-spacing: 0; font-size: 14px;
  font-weight: 600; color: var(--muted); white-space: nowrap;
}
table.requisites td { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  /* на телефоне двух колонок мало: подпись встаёт над значением */
  table.requisites, table.requisites tbody, table.requisites tr,
  table.requisites th[scope="row"], table.requisites td { display: block; width: auto; }
  table.requisites tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.requisites tr:last-child { border-bottom: 0; }
  table.requisites th[scope="row"] {
    padding: 0 0 2px; border: 0; font-size: 13px; white-space: normal;
  }
  table.requisites td { padding: 0; border: 0; font-weight: 600; }
}
td.total { font-weight: 800; font-family: var(--display); font-size: 18px; }
td.num.total { color: var(--brand); font-size: 22px; }

.muted { color: var(--muted); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.notice { border-left: 4px solid var(--warn); background: var(--warn-bg); padding: 14px 18px; border-radius: 12px; margin: 14px 0; }
.notice.bad { border-color: var(--bad); background: var(--bad-bg); }
.notice.ok { border-color: var(--ok); background: var(--ok-bg); }
.notice.info { border-color: var(--brand); background: #eef0ff; }
ul.plain { padding-left: 20px; } ul.plain li { margin: 7px 0; }
code, pre { font-family: var(--mono); font-size: 13.5px; }
pre { background: var(--ink); color: #dfe4ff; padding: 14px 16px; border-radius: 12px; overflow-x: auto; }
details { margin: 14px 0; }
details summary { cursor: pointer; font-weight: 700; padding: 8px 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #eef0f6; color: var(--muted); vertical-align: middle; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.brand { background: #eef0ff; color: var(--brand); }

/* --- шаги ----------------------------------------------------------------- */

.steps { counter-reset: s; padding: 0; list-style: none; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 16px 18px 16px 62px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px;
}
.sample { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* --- появление при прокрутке ------------------------------------------------ */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* --- подвал --------------------------------------------------------------- */

footer { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); background: #fff; }
footer .wrap { padding-top: 26px; padding-bottom: 30px; }
footer .small { font-size: 13px; } footer .small a { color: var(--muted); display: inline-block; padding: 8px 2px; }

/* --- кошельки ------------------------------------------------------------- */

.wallet { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; }
@media (max-width: 640px) { .wallet { grid-template-columns: 1fr; } .wallet > div:last-child { text-align: left !important; } }
.wallet .addr { font-family: var(--mono); font-size: 13px; color: var(--muted); word-break: break-all; }
.deadline { font-weight: 700; margin-top: 4px; }

/* --- справочник ------------------------------------------------------------- */

.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }

article h2 { margin-top: 34px; }
article .card { margin: 16px 0; }
article .card p:last-child { margin-bottom: 0; }

/* карточка целиком ссылка: попадать проще, чем в строчку текста */
a.linkcard { display: block; text-decoration: none; color: inherit; }
a.linkcard h2, a.linkcard h3 { margin: 0 0 8px; color: var(--text); font-size: 18px; }
a.linkcard:hover h2, a.linkcard:hover h3 { color: var(--brand); }
a.linkcard .more { color: var(--brand); font-weight: 700; font-size: 14px; }

.cta-card { border: 0; background: linear-gradient(135deg, #f2f3ff, #eef0ff);
  box-shadow: 0 18px 40px -26px rgba(79, 91, 255, .5); }

/* --- вопросы и ответы ------------------------------------------------------- */

.faq { display: grid; gap: 10px; margin: 18px 0; }
.faq details { margin: 0; padding: 16px 20px; }
.faq summary { font-family: var(--display); font-size: 16px; font-weight: 700; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 22px; font-weight: 400; color: var(--brand); }
.faq details[open] summary::after { content: "2"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* --- тарифы ---------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.plans .card { margin: 0; display: flex; flex-direction: column; }
.plans .card .price { font-family: var(--display); font-size: 30px; font-weight: 800; margin: 2px 0 10px; letter-spacing: -0.01em; }
.plans .card .price small { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.plans .card ul { margin-top: auto; }
.plans .card.pick { border-color: var(--brand); box-shadow: 0 18px 40px -20px rgba(79, 91, 255, .5); position: relative; }
.plans .card.pick::before { content: "чаще всего"; position: absolute; top: -11px; left: 20px; font-size: 12px; font-weight: 700;
  background: var(--brand); color: #fff; padding: 3px 10px; border-radius: 999px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

/* --- брокерские счета ------------------------------------------------------ */

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* Широкая таблица не должна распирать страницу — пусть едет внутри себя.
   Обёртка растянута на поля карточки, чтобы прокручиваемая область начиналась
   у самого края и было видно, что справа ещё есть столбцы. */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px -12px; padding: 0 12px; }
.scroll table { margin: 0; }
.scroll.wide table { min-width: 720px; }
@media (max-width: 640px) { .scroll table { min-width: 520px; } .scroll.narrow table { min-width: 0; } }

label.check {
  display: flex; align-items: center; gap: 10px; font-weight: 700;
  margin: 18px 0 4px; cursor: pointer;
}
label.check input { width: 18px; height: 18px; accent-color: var(--brand); }

pre.code { font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero .pulse path.line { stroke-dashoffset: 0; }
  .hero .pulse circle.dot { opacity: 1; }
}

/* Обложка статьи справочника. Высоту задаём пропорцией, чтобы место
   под картинку было занято до её загрузки и текст под ней не прыгал. */
img.cover {
  display: block; width: 100%; aspect-ratio: 1200 / 630; height: auto;
  object-fit: cover; border-radius: var(--radius); margin: 4px 0 18px;
  background: #eef0f7;
}

/* --- интерактивная демонстрация ---------------------------------------------
   Страница читается и без скрипта: шаги идут подряд, подсказки раскрыты.
   Скрипт лишь сворачивает лишнее и превращает список в переключаемые
   вкладки. Поэтому все состояния «свёрнуто» задаются классом, который
   ставит скрипт, а не значением по умолчанию. */

.demo-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.demo-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--muted);
  background: #fff; border: 1.5px solid var(--line);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.demo-tab .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 12px;
  background: #eef0f7; color: var(--muted);
}
.demo-tab:hover { color: var(--text); border-color: #c9cee0; }
.demo-tab.current { color: var(--brand); border-color: var(--brand); }
.demo-tab.current .n { background: var(--brand); color: #fff; }

.demo-step { margin: 0 0 56px; scroll-margin-top: 80px; }
.demo-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }

.demo-screen {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); overflow: hidden;
}
.demo-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: #f2f3f8; border-bottom: 1px solid var(--line);
}
.demo-chrome span { width: 9px; height: 9px; border-radius: 50%; background: #d7dae6; }
.demo-chrome b {
  margin-left: 10px; font-weight: 500; font-size: 12.5px; color: var(--muted);
}
.demo-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.demo-h { font-family: var(--display); font-weight: 700; font-size: 17px; }
.demo-total { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--brand); }
.demo-drop {
  border: 1.5px dashed #c9cee0; border-radius: var(--radius-s);
  padding: 20px; text-align: center; color: var(--muted); font-size: 14px;
  background: #fafbff;
}
.demo-file {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; border-radius: var(--radius-s); background: #f7f8fc;
  font-size: 14px;
}
.demo-file i { font-style: normal; color: var(--muted); font-size: 13px; }

/* Горячее место макета: выглядит как элемент интерфейса, ведёт себя как кнопка. */
.demo-hot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; padding: 11px 13px; border-radius: var(--radius-s);
  background: #f7f8fc; border: 1.5px solid transparent; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: none; transition: border-color .18s var(--ease), background .18s var(--ease);
}
.demo-hot:hover { background: #eef0ff; border-color: #c9cee0; transform: none; box-shadow: none; }
.demo-hot.current { background: #eef0ff; border-color: var(--brand); }
.demo-hot-mark {
  flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.demo-tips { display: flex; flex-direction: column; gap: 12px; }
.demo-tip {
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius-s); background: #fff; padding: 15px 17px;
}
.demo-tip h3 { margin: 0 0 8px; font-size: 16px; }
.demo-tip p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; }
.demo-tip p:last-child { margin-bottom: 0; }
.demo-warn { color: var(--bad); }

/* Свёрнутые состояния появляются только когда скрипт заявил, что работает. */
.js .demo-step[hidden] { display: none; }
.js .demo-tip { display: none; }
.js .demo-tip.open { display: block; }

.demo-step details { border-top: 1px solid var(--line); padding: 10px 0 2px; }
.demo-step details:first-of-type { border-top: 0; }
.demo-step summary { cursor: pointer; font-weight: 600; }
.demo-step details p { margin: 8px 0 6px; color: var(--muted); }

/* --- витрина партнёрской программы -------------------------------------------
   Анимации переиспользуют .reveal: он уже уважает prefers-reduced-motion
   и не ломается без IntersectionObserver. */

.pt-hero h1 { max-width: 18ch; }

/* Калькулятор дохода */
.pt-calc label {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: 0;
}
.pt-calc output {
  font-family: var(--display); font-weight: 800; font-size: 22px;
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.pt-calc input[type=range] {
  width: 100%; margin: 10px 0 22px; accent-color: var(--brand);
  height: 26px; background: none; border: 0; padding: 0;
}
.pt-calc input[type=range]:focus-visible { outline: 3px solid rgba(79,91,255,.55); outline-offset: 4px; }

.pt-scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .pt-scenarios { grid-template-columns: 1fr; } }
.pt-scenario {
  display: block; text-align: left; padding: 12px 14px; border-radius: var(--radius-s);
  background: #fff; border: 1.5px solid var(--line); color: var(--text);
  font: inherit; cursor: pointer; box-shadow: none;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.pt-scenario:hover { border-color: #c9cee0; transform: none; box-shadow: none; }
.pt-scenario.current { border-color: var(--brand); background: #eef0ff; }
.pt-scenario b { display: block; font-size: 15px; }
.pt-scenario span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.pt-out {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
}
.pt-num { flex: 1 1 140px; }
.pt-num b {
  display: block; font-family: var(--display); font-weight: 800; font-size: 30px;
  line-height: 1.1; font-variant-numeric: tabular-nums;
  /* цифра меняется на глазах, поэтому переход мягкий, а не рывком */
  transition: color .25s var(--ease);
}
.pt-num span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.pt-num.money b { color: var(--brand); font-size: 34px; }
.pt-arrow { color: #c9cee0; font-size: 22px; flex: 0 0 auto; }
@media (max-width: 640px) { .pt-arrow { display: none; } }

/* Воронка: полосы въезжают слева по очереди */
.pt-funnel { width: 100%; height: auto; display: block; }
.pt-bar { transform-origin: left center; }
.reveal.in .pt-bar, .pt-funnel .pt-bar {
  animation: pt-grow .7s var(--ease) both;
  animation-delay: calc(var(--i) * .12s);
}
@keyframes pt-grow { from { transform: scaleX(.02); opacity: 0; } to { transform: none; opacity: 1; } }

.pt-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .pt-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pt-steps { grid-template-columns: 1fr; } }
.pt-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
}
.pt-steps h3 { margin: 0 0 6px; font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  .pt-bar { animation: none; }
  .pt-num b { transition: none; }
}

/* Сводка партнёров: плитки показателей */
.adm-tiles {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 20px 0 26px;
}
@media (max-width: 1000px) { .adm-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .adm-tiles { grid-template-columns: repeat(2, 1fr); } }
.adm-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.adm-tile b {
  display: block; font-family: var(--display); font-weight: 800; font-size: 26px;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.adm-tile span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.adm-tile.money b { color: var(--text); }
.adm-tile.due { border-color: var(--brand); }
.adm-tile.due b { color: var(--brand); }

/* Сводка по партнёрам: одиннадцать колонок в строку не влезают ни на каком
   экране, поэтому таблица прокручивается вбок, а не ломается по буквам. */
table.adm-table { min-width: 1180px; }
table.adm-table th { white-space: nowrap; }
table.adm-table td:first-child { white-space: nowrap; }
table.adm-table td:first-child .muted { white-space: normal; max-width: 22ch; }
