/* AMHelper landing — токены взяты из AMHelperWebAppReact/src/styles/index.css
   Светлая: белый фон, фиолетовый акцент #4A2BC7.
   Тёмная «Полночь + золотая кромка»: #07081d, свечение #1c1552, золото #f2c94f. */

:root {
  --bg:          #FFFFFF;
  --bg-alt:      #F5F5F5;
  --surface:     #FFFFFF;
  --surface-2:   #EBEBEB;
  --text:        #1A1A1A;
  --muted:       rgba(26, 26, 26, 0.62);
  --border:      rgba(0, 0, 0, 0.08);
  --accent:      #4A2BC7;
  --accent-ink:  #FFFFFF;
  --accent-soft: rgba(74, 43, 199, 0.08);
  --focus:       #1A7CFF;
  --glow:        none;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(26, 20, 80, 0.08);
  --board-head:  linear-gradient(135deg, #6a4be8 0%, #4A2BC7 55%, #2d1a86 100%);
  --board-edge:  transparent;

  --rq-def:   #2A5BD0;
  --rq-perm:  #51698C;
  --rq-scout: #0B7482;
  --rq-push:  #7448D0;
  --ok:       #1F7A4A;
  --warn:     #A85A00;
  --on-warn:  #FFFFFF;
  --danger:   #C4161C;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:          #07081d;
    --bg-alt:      #0b0c24;
    --surface:     #121433;
    --surface-2:   #181a3d;
    --text:        #FBFCFE;
    --muted:       #8c8ca8;
    --border:      rgba(242, 201, 79, 0.16);
    --accent:      #f2c94f;
    --accent-ink:  #07081d;
    --accent-soft: rgba(242, 201, 79, 0.12);
    --focus:       #f2c94f;
    --glow:        radial-gradient(120% 60% at 50% -10%, #1c1552 0%, rgba(28, 21, 82, 0) 62%);
    --card-shadow: inset 0 1px 0 rgba(242, 201, 79, 0.10), 0 10px 26px rgba(0, 0, 0, 0.45);
    --board-head:  linear-gradient(135deg, #3b2c8a 0%, #241b62 58%, #161243 100%);
    --board-edge:  rgba(242, 201, 79, 0.32);

    --rq-def:   #4D8DFF;
    --rq-perm:  #7C93B8;
    --rq-scout: #26C6DA;
    --rq-push:  #B388FF;
    --ok:       #30B455;
    --warn:     #FF9500;
    --on-warn:  #07081d;
    --danger:   #FF3B30;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:          #07081d;
  --bg-alt:      #0b0c24;
  --surface:     #121433;
  --surface-2:   #181a3d;
  --text:        #FBFCFE;
  --muted:       #8c8ca8;
  --border:      rgba(242, 201, 79, 0.16);
  --accent:      #f2c94f;
  --accent-ink:  #07081d;
  --accent-soft: rgba(242, 201, 79, 0.12);
  --focus:       #f2c94f;
  --glow:        radial-gradient(120% 60% at 50% -10%, #1c1552 0%, rgba(28, 21, 82, 0) 62%);
  --card-shadow: inset 0 1px 0 rgba(242, 201, 79, 0.10), 0 10px 26px rgba(0, 0, 0, 0.45);
  --board-head:  linear-gradient(135deg, #3b2c8a 0%, #241b62 58%, #161243 100%);
  --board-edge:  rgba(242, 201, 79, 0.32);

  --rq-def:   #4D8DFF;
  --rq-perm:  #7C93B8;
  --rq-scout: #26C6DA;
  --rq-push:  #B388FF;
  --ok:       #30B455;
  --warn:     #FF9500;
  --on-warn:  #07081d;
  --danger:   #FF3B30;
  color-scheme: dark;
}

/* ===== База ===== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--glow), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

h1 {
  font-size: clamp(2.125rem, 4.6vw, 3.75rem);
  line-height: 1.04;
  hyphens: manual;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.025em;
}
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }

/* ===== Кнопки ===== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--accent-soft); filter: none; }
.btn--small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }

/* ===== Шапка ===== */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -0.01em; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand--quiet { font-weight: 650; }
.nav { display: flex; gap: 22px; margin-right: auto; font-size: .9375rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tool {
  display: inline-grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text);
  font: 600 .8125rem/1 var(--font); letter-spacing: .02em; cursor: pointer;
}
.tool:hover { background: var(--accent-soft); }
.tool--select {
  -webkit-appearance: none; appearance: none;
  padding: 0 26px 0 12px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238c8ca8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 9px 6px;
}
.tool--select:hover { background-color: var(--accent-soft); }
.tool--select option { color: #1A1A1A; background: #FFFFFF; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic .fill, .ic-dark { fill: currentColor; }
.ic-dark { stroke: none; }
#theme-toggle .ic { display: none; }
#theme-toggle[data-mode="auto"]  .ic-auto,
#theme-toggle[data-mode="light"] .ic-light,
#theme-toggle[data-mode="dark"]  .ic-dark { display: block; }
#theme-toggle:not([data-mode]) .ic-auto { display: block; }

/* ===== Мобильное меню: гамбургер в центре шапки + шторка снизу (assets/js/menu.js) ===== */

.topbar__inner { position: relative; }
.burger {
  display: none;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 40px; padding: 0;
  place-items: center;
  border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, background-color .16s ease;
}
.burger:hover { background: var(--accent-soft); }
.burger:active { transform: translate(-50%, -50%) scale(.92); }
.burger__lines { display: grid; gap: 4px; width: 18px; }
.burger__lines span { display: block; height: 2px; border-radius: 2px; background: currentColor; }
.burger__lines span:nth-child(2) { width: 70%; justify-self: center; }

.msheet { position: fixed; inset: 0; z-index: 60; }
.msheet[hidden] { display: none; }
.msheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 5, 20, .42);
  opacity: 0;
  transition: opacity .34s ease;
}
.msheet.is-open .msheet__backdrop { opacity: 1; }

/* Шторка прозрачна на 30%: 70% цвета карточки + размытие того, что под ней */
.msheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 88vh; overflow-y: auto;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border: 1px solid var(--border); border-bottom: 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, .28);
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.22, 1, .36, 1);
  outline: none;
}
.msheet.is-open .msheet__panel { transform: translateY(0); }
.msheet__panel.is-dragging { transition: none; }
.msheet__head { padding: 8px 0 12px; touch-action: none; cursor: grab; }
.msheet__grab { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--muted); opacity: .55; }
.msheet__title { font-size: .875rem; font-weight: 600; color: var(--muted); text-align: center; }

.msheet__nav { display: grid; gap: 8px; }
.msheet__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text); text-decoration: none;
  font-size: 1.0625rem; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}
.msheet__item::after { content: "›"; font-size: 1.375rem; line-height: 1; color: var(--muted); transition: transform .16s ease; }
.msheet__item:hover { background: var(--accent-soft); }
.msheet__item:active { transform: scale(.96); background: var(--accent-soft); }
.msheet__item[aria-current="page"] { color: var(--accent); }
/* Выбранный пункт: сжимается и подсвечивается, пока шторка уезжает */
.msheet__item.is-picked {
  color: var(--accent);
  background: var(--accent-soft);
  animation: msheet-pick .22s cubic-bezier(.3, .7, .4, 1) forwards;
}
.msheet__item.is-picked::after { transform: translateX(4px); color: var(--accent); }
@keyframes msheet-pick {
  0% { transform: scale(1); }
  45% { transform: scale(.92); }
  100% { transform: scale(.97); }
}
.msheet__cta { width: 100%; margin-top: 14px; }
.msheet__cta.is-picked { animation: msheet-pick .22s cubic-bezier(.3, .7, .4, 1) forwards; }
body.menu-open { overflow: hidden; }

/* ===== Hero ===== */

.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 104px); }
.hero__inner {
  display: grid; gap: clamp(40px, 6vw, 72px);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
}
.hero__copy { max-width: 40rem; }
.lead { margin-top: 22px; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 20px; font-size: .9375rem; color: var(--muted); }

/* Плашка «Тестирование» — заметно, но компактно */
.beta {
  display: inline-flex; align-items: flex-start; gap: 10px;
  margin-bottom: 24px; padding: 8px 14px 8px 8px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  font-size: .9375rem; line-height: 1.4;
}
.beta__tag {
  flex: none;
  padding: 2px 10px; border-radius: 999px;
  background: var(--warn); color: var(--on-warn);
  font-size: .8125rem; font-weight: 700; line-height: 1.5;
}

/* Макет экрана «Анализ выходов» — единственное «живое» место страницы */
.board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.board__head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 20px 22px;
  background: var(--board-head);
  color: #fff;
  border-bottom: 1px solid var(--board-edge);
}
.board__title { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.board__sub { margin-top: 4px; font-size: .875rem; color: rgba(255, 255, 255, .78); }
.board__eta { text-align: right; font-size: .8125rem; color: rgba(255, 255, 255, .78); }
.board__eta strong {
  display: block; margin-top: 2px;
  font-size: clamp(1.75rem, 3.4vw, 2.25rem); line-height: 1; font-weight: 750;
  letter-spacing: -0.02em; color: #fff;
}
.board__table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.board__table th {
  text-align: left; font-weight: 500; font-size: .8125rem; color: var(--muted);
  padding: 14px 22px 8px;
}
.board__table td { padding: 12px 22px; border-top: 1px solid var(--border); white-space: nowrap; }
.board__table th:nth-child(2), .board__table th:nth-child(3),
.board__table td:nth-child(2), .board__table td:nth-child(3) { padding-left: 8px; padding-right: 8px; }
.board__table td:first-child { color: var(--muted); }

.verdict {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
}
.verdict--real   { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.verdict--fake   { color: var(--muted);  background: color-mix(in srgb, var(--muted) 14%, transparent); }
.verdict--unsure { color: var(--warn);   background: color-mix(in srgb, var(--warn) 13%, transparent); }

.board__def {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 6px 14px 14px; padding: 14px 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--rq-def) 9%, transparent);
  font-size: .9375rem;
}
.board__def strong { font-weight: 650; }
.board__def span { color: var(--muted); }
.dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; }
.dot--def { background: var(--rq-def); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rq-def) 22%, transparent); }

.eta-hit #eta { animation: hit .9s ease-out; }
@keyframes hit { 0% { color: var(--accent); transform: scale(1.06); } 100% { transform: none; } }

/* ===== Секции ===== */

.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt); }
.section__lead { margin-top: 12px; max-width: 34em; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 80px); }
.split__aside p { margin-top: 14px; max-width: 24em; }
.split__aside { align-self: start; position: sticky; top: 96px; }
.split__main { display: grid; gap: 56px; }
.split__main--tight { gap: 32px; }
.group h3 { font-size: 1.25rem; margin-bottom: 18px; }

.rq-list { display: grid; gap: 10px; }
.rq {
  --c: var(--accent);
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--c);
  border-radius: var(--radius-md);
}
.rq--def   { --c: var(--rq-def); }
.rq--perm  { --c: var(--rq-perm); }
.rq--scout { --c: var(--rq-scout); }
.rq--push  { --c: var(--rq-push); }
.rq__tag { font-weight: 700; color: var(--c); }
.rq p { color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.facts dt { font-weight: 650; }
.facts dd { margin-top: 4px; color: var(--muted); }

/* Безопасность: четыре факта с галочкой + строка про правила */
.safety__lead { margin-top: 16px; font-size: 1.0625rem; color: var(--muted); max-width: 26em; }
.safety { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.safety li { position: relative; padding-left: 40px; }
.safety li::before {
  content: "";
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 16%, transparent);
}
.safety li::after {
  content: "";
  position: absolute; left: 9px; top: 7px;
  width: 6px; height: 11px;
  border: solid var(--ok); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.safety p { margin-top: 6px; color: var(--muted); }
.safety__rules {
  padding: 16px 20px;
  border-left: 4px solid var(--ok);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
  font-weight: 550;
}

/* Платформы */
.platforms { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; margin-top: 40px; }
.platform {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.platform p { color: var(--muted); }
.platform .btn { margin-top: auto; align-self: flex-start; }
.platform--live { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--card-shadow); }
.platform__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform__head h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.status {
  padding: 4px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600;
  color: var(--muted); border: 1px dashed var(--border);
}
.status--live { color: var(--ok); border: 0; background: color-mix(in srgb, var(--ok) 13%, transparent); }

/* Шаги — это настоящая последовательность, поэтому нумерация */
.steps {
  counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  margin-top: 40px;
}
.steps li { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--border); }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 10px;
  font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.steps p { margin-top: 6px; color: var(--muted); }
.start__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 44px; }

/* Подвал */
.footer { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); font-size: .875rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer__inner .brand { margin-right: auto; }

.footer__link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer__link:hover { color: var(--text); }

/* ===== Документ (политика конфиденциальности) ===== */

.doc { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc__wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.doc__lang {
  margin-bottom: 24px; padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .9375rem; color: var(--muted);
}
.doc__head h1 { font-size: clamp(1.5rem, 5.6vw, 3rem); overflow-wrap: break-word; hyphens: auto; }
.doc__head p { margin-top: 10px; }

.tldr {
  margin-top: 36px; padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--board-head);
  color: #fff;
  border: 1px solid var(--board-edge);
  box-shadow: var(--card-shadow);
}
.tldr__title {
  font-size: clamp(1.375rem, 3vw, 1.875rem); line-height: 1.2;
  font-weight: 750; letter-spacing: -0.02em; text-wrap: balance;
}
.tldr__list { display: grid; gap: 12px; margin-top: 22px; }
.tldr__list li { position: relative; padding-left: 22px; color: rgba(255, 255, 255, .82); }
.tldr__list li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: #f2c94f;
}
.tldr__list strong { color: #fff; font-weight: 650; }

.toc { margin-top: 40px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.toc__title { font-size: 1rem; letter-spacing: 0; }
.toc ol { list-style: decimal; padding-left: 1.4em; margin-top: 10px; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; padding: 2px 0; color: var(--muted); }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.doc__section { margin-top: 48px; }
.doc__section h2 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); }
.doc__section p, .doc__section ul, .doc__section dl { margin-top: 14px; }
.doc__section p, .doc__section li, .doc__section dd { line-height: 1.65; }
.doc__section ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 8px; }
.doc__section ul li::marker { color: var(--accent); }
.doc__section a { color: var(--accent); text-underline-offset: 3px; }
.doc__dl { display: grid; gap: 0; border-top: 1px solid var(--border); }
.doc__dl > div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.doc__dl dt { font-weight: 650; }
.doc__dl dd { color: var(--muted); }

/* ===== Страница /demo/: описание, приложение в рамке телефона, описание экрана ===== */

.dintro { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.dintro h1 { max-width: 16em; }
.dintro__lead { max-width: 38em; }
.dintro__roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.drole {
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  background: var(--surface);
}
.drole + .drole { border-top-color: var(--rq-def); }
.drole h2 { font-size: 1.25rem; letter-spacing: -0.01em; }
.drole p { margin-top: 10px; color: var(--muted); }

.dstage { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--border); background: var(--bg-alt); text-align: center; }
.dstage__note { margin: 12px auto 0; max-width: 40em; }
.dchips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 28px auto 0;
}
.dchip {
  min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font: 600 .9375rem/1 var(--font);
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}
.dchip:hover { background: var(--accent-soft); }
.dchip:active { transform: scale(.95); }
.dchip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.phone {
  width: min(400px, 100%);
  height: clamp(560px, 80vh, 820px);
  margin: 28px auto 0;
  padding: 10px;
  border-radius: 50px;
  background: #0b0c24;
  box-shadow: 0 0 0 1px rgba(242, 201, 79, .18), 0 30px 70px rgba(10, 8, 40, .35);
}
.phone__screen { display: block; width: 100%; height: 100%; border: 0; border-radius: 40px; background: var(--bg); }
.dstage__open { margin-top: 16px; font-size: .9375rem; }
.dstage__open a { color: var(--accent); text-underline-offset: 3px; }

.dscreens { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--border); }
.dscreen { max-width: 46rem; margin: 0 auto; }
.dscreen:not([hidden]) { animation: dscreen-in .28s ease; }
@keyframes dscreen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dscreen h3 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); line-height: 1.1; font-weight: 750; letter-spacing: -0.025em; }
.dscreen__lead { margin-top: 12px; font-size: 1.125rem; color: var(--muted); }
.dscreen__list { display: grid; gap: 14px; margin-top: 24px; }
.dscreen__list li { position: relative; padding-left: 34px; }
.dscreen__list li::before {
  content: ""; position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft);
}
.dscreen__list li::after {
  content: ""; position: absolute; left: 8px; top: 6px;
  width: 5px; height: 9px;
  border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dscreen__who { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; color: var(--muted); }
.dscreen__who-label {
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .8125rem; font-weight: 700;
}
.dscreens__cta { max-width: 46rem; margin: 36px auto 0; }

/* ===== Адаптив ===== */

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .board { max-width: 560px; }
}
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split__aside { position: static; }
  .platforms { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
}
@media (max-width: 359px) {
  .topbar .brand > span { display: none; } /* на узком экране — только значок, чтобы не наезжать на гамбургер */
}
@media (max-width: 600px) {
  .topbar .btn--small { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .dintro__roles { grid-template-columns: 1fr; }
  .dchips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
  .dchips::-webkit-scrollbar { display: none; }
  .phone { height: 78vh; min-height: 520px; padding: 6px; border-radius: 38px; }
  .phone__screen { border-radius: 32px; }
  .toc ol { columns: 1; }
  .doc__dl > div { grid-template-columns: 1fr; gap: 4px; }
  .safety { grid-template-columns: 1fr; gap: 22px; }
  .steps { grid-template-columns: 1fr; }
  .rq { grid-template-columns: 1fr; gap: 4px; }
  .board__head { padding: 16px; }
  .board__table th, .board__table td { padding-left: 12px; padding-right: 12px; }
  .board__table th:first-child, .board__table td:first-child { display: none; }
  .beta { flex-direction: column; gap: 6px; padding: 10px 12px; font-size: .875rem; }
  .actions .btn { flex: 1 1 auto; }
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }
  .platform .btn { align-self: stretch; }
  .platform { padding: 20px; }
}

@media (max-width: 420px) {
  .board__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .board__eta { text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .board__eta strong { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.doc__section--first { margin-top: 32px; }

/* ---------- Страница 404 (404.html) ---------- */
/* Клетка карты Travian с координатами (404|404): карта кончается на ±200 — клетка «за краем»,
   пунктирная рамка вокруг — граница карты. */
.nf {
  display: flex; align-items: center;
  min-height: calc(100vh - 220px); min-height: calc(100svh - 220px);
  padding: clamp(48px, 10vw, 112px) 0;
  text-align: center;
}
.nf__wrap { max-width: calc(36rem + 2 * var(--gutter)); }
.nf__tile {
  position: relative; display: grid; place-items: center;
  width: clamp(168px, 46vw, 220px); aspect-ratio: 1;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--board-head);
  box-shadow: var(--card-shadow);
  outline: 2px dashed var(--accent); outline-offset: 12px;
  overflow: hidden;
  animation: nf-drift 6s ease-in-out infinite;
}
.nf__grid {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .10) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0 1px, transparent 1px 22px);
}
.nf__coords {
  position: relative;
  font-size: clamp(1.75rem, 8vw, 2.5rem); font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.nf__caption {
  margin-top: 36px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.nf__title { margin-top: 10px; font-size: clamp(1.75rem, 6vw, 2.75rem); }
.nf__text { margin-top: 14px; font-size: 1.0625rem; color: var(--muted); }
.nf__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@keyframes nf-drift {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) { .nf__tile { animation: none; } }
@media (max-width: 560px) {
  .nf__actions .btn { flex: 1 1 100%; }
}
