/* Стили сайта stitchy.alexforge.org.
   Собраны по макетам страницы Landing файла «Вышивайка». Тема одна — светлая:
   тёмной в макетах нет, и выдумывать её здесь неоткуда.
   Между мобильным (390) и десктопным (1440) макетом всё тянется плавно, а не
   переключается на двух ширинах: промежуточных макетов нет, а окна бывают
   любые. */

/* MARK: Шрифты */

@font-face {
  font-family: Manrope;
  src: url(/font/manrope-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(/font/manrope-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(/font/manrope-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(/font/manrope-700.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url(/font/manrope-800.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: Geologica;
  src: url(/font/geologica-700.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Geologica;
  src: url(/font/geologica-800.woff2) format("woff2");
  font-weight: 800;
  font-display: swap;
}

/* MARK: Токены */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --line: #eae4df;
  --text: #2c2623;
  --muted: #7a736f;
  --faint: #a39994;
  --accent: #d66548;
  --peach: #faf0eb;
  --mint: #e6efea;
  --sand: #f6ecd8;
  --gold: #efc265;
  --island: #171310;

  --r-lg: 32px;
  --r-md: 24px;
  --r-sm: 20px;
  --r-xs: 12px;
  --pill: 100px;

  --sans: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: Geologica, Manrope, -apple-system, BlinkMacSystemFont, sans-serif;

  --pad: 20px;
  --content: 1200px;
  --section: 64px;
  --section-top: 16px;
  /* Тень устройства в макете — цвет из палитры без прозрачности, поэтому она
     заметно глубже обычной «мягкой». В первом экране телефоны крупнее, и тень
     у них своя, пропорционально большая. */
  --shadow-device: 0 10px 24px rgb(44, 38, 35);
  --shadow-device-hero: 0 12px 28px rgb(44, 38, 35);
}

@media (min-width: 720px) {
  :root { --pad: 32px; --section: 80px; --section-top: 24px; }
}
@media (min-width: 1080px) {
  :root {
    --pad: 40px;
    --section: 104px;
    --section-top: 32px;
    --shadow-device: 0 14px 32px rgb(44, 38, 35);
    --shadow-device-hero: 0 18px 39px rgb(44, 38, 35);
  }
}

/* MARK: Основа */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
svg { display: block; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 24px; height: 24px; flex: none; }

/* Элементы сетки по умолчанию не сжимаются ниже своего max-content — из-за
   этого блок с телефонами растягивал первый экран шире окна. */
.hero-grid > *,
.steps > *,
.feature-grid > *,
.cta-cards > *,
.band > *,
.doc-body > *,
.faq-body > *,
.footer-top > *,
.footer-bottom > * { min-width: 0; }

.shell {
  width: 100%;
  max-width: calc(var(--content) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 0 0 var(--r-xs) 0;
}
.skip:focus { left: 0; }

/* MARK: Кнопки и пилюли */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 23px;
  border: 1px solid var(--accent);
  border-radius: var(--r-lg);
  background: var(--accent);
  color: var(--surface);
  font: 700 16px/1.37 var(--sans);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.button:hover { background: #c25539; border-color: #c25539; }

.tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 19px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--muted);
  font: 600 15px/1.37 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.tab[aria-current="true"],
.tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font: 700 13px/1.37 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: block; text-decoration: none; }
.badge-art { height: 48px; width: auto; }
.site-footer .badges { gap: 8px; }
.site-footer .badge-art { height: 40px; }
@media (min-width: 960px) {
  .badges { gap: 12px; }
  .site-footer .badges { gap: 8px; }
}

/* MARK: Шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}
@media (min-width: 1080px) {
  .header-bar { padding-block: 16px; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 700 22px/1.25 var(--display);
  text-decoration: none;
}
.logo-mark { width: 32px; height: 32px; border-radius: 7px; flex: none; }
@media (min-width: 1080px) {
  .logo { gap: 12px; }
}

/* Навигация и кнопка «Скачать» в узком окне не помещаются; их роль там играют
   бейджи в подвале, до которых ведёт та же прокрутка. */
.site-nav,
.header-actions .button { display: none; }

.site-nav {
  align-items: center;
  gap: 32px;
}
.site-nav a {
  color: var(--text);
  font: 600 15px/1.37 var(--sans);
  text-decoration: none;
  padding: 6px 2px 4px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.lang { display: flex; gap: 4px; }

@media (min-width: 1080px) {
  .site-nav { display: flex; }
  .header-actions .button { display: inline-flex; }
}

/* MARK: Секции лендинга */

.hero[id], .section[id], .badges[id] { scroll-margin-top: 88px; }

.section { padding-top: var(--section-top); padding-bottom: var(--section); }
/* Полоса палитр и карточки-призывов идут вплотную к предыдущей секции. */
.section-flush { padding-top: 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1080px) {
  .section-head { gap: 12px; }
}
.section-head h2 {
  font-size: clamp(32px, 0.76vw + 29px, 40px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 800;
  max-width: 800px;
}
.section-head .lead { color: var(--muted); max-width: 720px; }

.lead {
  font: 400 clamp(16px, 0.38vw + 14.5px, 20px)/1.55 var(--sans);
  color: var(--muted);
}
@media (min-width: 960px) {
  .lead { font-weight: 500; line-height: 1.5; }
}

/* MARK: Первый экран */

.hero { position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding-block: 40px 48px;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 600px) minmax(0, 544px);
    justify-content: space-between;
    gap: 48px;
    padding-block: 80px 96px;
  }
}

/* Размытые пятна — фон, а не содержимое: под текстом и вне потока. */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  z-index: -1;
  pointer-events: none;
}
/* В мобильном макете пятно одно и лежит за телефонами. */
.blob-peach {
  background: var(--sand);
  width: 360px;
  height: 360px;
  left: 60px;
  top: 645px;
  filter: blur(45px);
}
.blob-mint { display: none; }
@media (min-width: 960px) {
  .blob-peach {
    width: 640px;
    height: 640px;
    left: auto;
    right: 40px;
    top: 40px;
    filter: blur(60px);
  }
  .blob-mint {
    display: block;
    background: var(--mint);
    width: 440px;
    height: 440px;
    left: -80px;
    top: 360px;
  }
}

.hero-copy { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 960px) {
  .hero-copy { gap: 28px; }
}

.hero h1 {
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 800;
}
/* Ручные переносы заголовка нужны только в широкой раскладке — в узкой строки
   склеиваются и текст переносится сам. */
.hero h1 br { display: none; }
@media (min-width: 960px) {
  .hero h1 { line-height: 1.08; }
  .hero h1 br { display: inline; }
}

.trust { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 960px) {
  .trust { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
}
.trust li { display: flex; align-items: center; gap: 10px; font: 500 15px/1.37 var(--sans); }
.trust .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  color: var(--text);
}
.trust .check .icon { width: 14px; height: 14px; }

/* Три телефона внахлёст: пропорции и позиции — из макета, в долях,
   поэтому блок целиком тянется за шириной колонки. */
.hero-devices {
  position: relative;
  width: 100%;
  max-width: 544px;
  margin-inline: auto;
  aspect-ratio: 544 / 599;
}
/* Боковые телефоны развёрнуты на 8° в разные стороны и меньше центрального;
   позиции заданы по центру рамки — так наклон не смещает их с места. */
.hero-devices .device {
  position: absolute;
  box-shadow: var(--shadow-device-hero);
}
.hero-devices .device-left {
  width: 41.25%;
  padding: 0.734%;
  left: 26.54%;
  top: 57.12%;
  transform: translate(-50%, -50%) rotate(-8deg);
}
.hero-devices .device-right {
  width: 41.25%;
  padding: 0.734%;
  left: 73.03%;
  top: 56.57%;
  transform: translate(-50%, -50%) rotate(8deg);
}
.hero-devices .device-main {
  width: 51.19%;
  padding: 0.911%;
  left: 49.4%;
  top: 49.57%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* MARK: Рамка устройства */

/* Корпус, тень и скругление — здесь; сам экран со скруглёнными углами и
   вырезом камеры уже внутри кадра (tool/build_site_shots.py). */
.device {
  position: relative;
  overflow: hidden;
  background: var(--text);
  border-radius: 8.5%/3.98%;
  box-shadow: var(--shadow-device);
}
.device img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--text);
}
.device-tablet { border-radius: 4.3%/3.05%; }

/* MARK: Три шага */

.steps { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
}
.step { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 860px) {
  .step { gap: 20px; }
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font: 700 20px/1.3 var(--display);
}
.step h3 { font-size: 20px; line-height: 1.3; }
.step p { color: var(--muted); }

/* MARK: Скриншоты */

/* Полоса выходит за правый край страницы — как в макете: видно, что она
   продолжается. Поэтому у секции нет правого отступа, а прокрутка своя. */
.shots .shell { padding-right: 0; }
.shots-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: var(--pad);
}
@media (min-width: 860px) {
  .shots-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.shots-tabs { display: none; gap: 8px; }
.shots.js .shots-tabs { display: flex; }
.shots-tabs .tab { font-size: 15px; }

.strip {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding: 8px var(--pad) 16px 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
@media (min-width: 860px) {
  .strip { gap: 24px; margin-top: 32px; }
}
/* display:flex выше иначе перебивает атрибут hidden. */
.strip[hidden] { display: none; }
/* Ширина кадра тянется между мобильным (220) и десктопным (282) макетом. */
.strip .device {
  flex: none;
  --device-w: clamp(220px, 5.9vw + 197px, 282px);
  width: var(--device-w);
  padding: calc(var(--device-w) * 0.0178);
  scroll-snap-align: center;
}
.strip .device-tablet {
  --device-w: min(380px, 82vw);
  padding: calc(var(--device-w) * 0.0251);
}

.shots-note { margin-top: 8px; padding-right: var(--pad); color: var(--muted); }
@media (min-width: 1080px) {
  .shots-note { margin-top: 24px; }
}

/* MARK: Возможности */

.feature-grid { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 680px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
}
@media (min-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
@media (min-width: 680px) {
  .feature { padding: 28px; gap: 20px; }
}
.feature h3 { font-size: 20px; line-height: 1.3; }
.feature p { color: var(--muted); }

/* Тёмная палитра приложения, переопределённая на блоке: панель настроек в
   карточке «Тёмная тема» остаётся тёмной на светлой странице. Сама карточка
   светлая — целиком тёмная она сливалась с полосой «Палитры» ниже. */
.theme-dark {
  --bg: #171412;
  --surface: #211d1a;
  --line: #332d29;
  --text: #f1ebe5;
  --muted: #b3a9a2;
  --accent: #de7053;
  --peach: #2e211b;
  color: var(--text);
}

.feature-wide { grid-column: 1 / -1; gap: 24px; }
.feature-wide-text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 680px) {
  .feature-wide-text { gap: 20px; }
}
@media (min-width: 1000px) {
  .feature-wide { flex-direction: row; align-items: center; gap: 48px; padding: 40px; }
  .feature-wide-text { flex: 1; }
}

.setting-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--r-sm);
}
@media (min-width: 1000px) {
  .setting-preview { flex: none; width: 400px; padding: 24px; }
}
.setting-group {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.37;
  color: var(--text);
}
.toggle {
  display: flex;
  justify-content: flex-end;
  flex: none;
  width: 48px;
  height: 26px;
  padding: 2px;
  border-radius: var(--pill);
  background: var(--accent);
}
.toggle::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--peach);
  color: var(--accent);
}

/* MARK: Палитры */

.cta-cards, .band { margin-top: 0; }
.band {
  display: grid;
  gap: 24px;
  padding: 28px;
  background: var(--text);
  color: var(--surface);
  border-radius: var(--r-md);
}
@media (min-width: 960px) {
  .band {
    grid-template-columns: minmax(0, 1fr) 424px;
    align-items: center;
    gap: 48px;
    padding: 64px;
    border-radius: var(--r-lg);
  }
}
.band .eyebrow { color: var(--gold); }
.band h2 {
  font-size: clamp(32px, 0.76vw + 29px, 40px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 800;
}
.band-copy { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 960px) {
  .band-copy { gap: 20px; }
}
.band-copy p { color: color-mix(in srgb, var(--surface) 72%, transparent); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
@media (min-width: 960px) {
  .stats { display: flex; flex-wrap: wrap; gap: 20px 32px; padding-top: 20px; }
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b {
  font: 800 40px/1.15 var(--display);
  letter-spacing: -0.005em;
}
.stat span { color: color-mix(in srgb, var(--surface) 64%, transparent); }

.thread-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-sm);
}
@media (min-width: 960px) {
  .thread-card { gap: 10px; padding: 20px; }
}
.thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}
@media (min-width: 960px) {
  .thread-head { padding-bottom: 6px; }
}
.thread-head h3 { font-size: 15px; line-height: 1.25; }
.thread-head span { color: var(--muted); font: 500 11px/1.37 var(--sans); }
.thread-row { display: flex; align-items: center; gap: 10px; padding-block: 5px; }
@media (min-width: 960px) {
  .thread-row { gap: 12px; padding-block: 6px; }
}
.thread-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 2px;
  background: #f3efe9;
  font: 800 10px/1.37 var(--sans);
}
.thread-swatch { width: 32px; height: 32px; flex: none; border-radius: 6px; }
.thread-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.thread-text b { font: 700 14px/1.37 var(--sans); }
.thread-text span,
.thread-count { color: var(--muted); font: 400 14px/1.37 var(--sans); }
.thread-count { flex: none; }

/* MARK: Призывы и финал */

.cta-cards { display: grid; gap: 16px; }
@media (min-width: 860px) {
  .cta-cards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  border-radius: var(--r-lg);
}
@media (min-width: 860px) {
  .cta-card { gap: 24px; padding: 40px; }
}
.cta-card.is-faq { background: var(--peach); }
.cta-card.is-telegram { background: var(--mint); }
.cta-card .icon-chip { background: var(--surface); width: 56px; height: 56px; }
.cta-card h2 {
  font-size: clamp(32px, 0.76vw + 29px, 40px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 800;
}
.cta-card p { color: var(--muted); }
.cta-text { display: flex; flex-direction: column; gap: 12px; }

.outro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  padding-block: 8px 72px;
}
.outro-mark { width: 64px; height: 64px; border-radius: 14px; }
@media (min-width: 860px) {
  .outro { gap: 28px; }
  .outro-mark { width: 72px; height: 72px; border-radius: 16px; }
}
@media (min-width: 1080px) {
  .outro { padding-block: 16px 120px; }
}
.outro h2 {
  font-size: clamp(32px, 0.76vw + 29px, 40px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 800;
  max-width: 880px;
}
.outro .badges { justify-content: center; }
.outro-note { color: var(--muted); max-width: 800px; }

/* MARK: Подвал */

.site-footer { background: var(--text); color: var(--surface); }
.footer-shell { padding-block: 32px 28px; }
@media (min-width: 960px) {
  .footer-shell { padding-block: 56px 40px; }
}
.site-footer .logo { color: var(--surface); }

.footer-top { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .footer-top { grid-template-columns: minmax(0, 1fr) 432px; gap: 44px; }
}
/* Логотип отделён от строки с бейджами сильнее, чем бейджи от подписи, —
   поэтому шаг общий, а подпись добавляет себе верхний отступ. */
.footer-download { display: flex; flex-direction: column; gap: 16px; }
.footer-note {
  margin-top: 4px;
  color: color-mix(in srgb, var(--surface) 82%, transparent);
  font: 500 15px/1.4 var(--sans);
}
@media (min-width: 960px) {
  .footer-note { margin-top: 20px; max-width: 320px; }
}

/* Линия над блоком помощи: в узкой раскладке она отделяет его от загрузки,
   в широкой — уходит под заголовок (макет). */
.footer-support {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--surface) 12%, transparent);
}
.footer-rule { display: none; }
@media (min-width: 960px) {
  .footer-support { gap: 24px; padding-top: 0; border-top: 0; }
  .footer-rule {
    display: block;
    height: 1px;
    background: color-mix(in srgb, var(--surface) 12%, transparent);
  }
}
.footer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  line-height: 1.25;
}
.footer-heading .icon { width: 18px; height: 18px; }

.tiles { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 960px) {
  .tiles { gap: 10px; }
}
.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--surface) 8%, transparent);
  text-decoration: none;
}
.tile:hover { background: color-mix(in srgb, var(--surface) 14%, transparent); }
.tile-icon { width: 18px; height: 18px; }
.tile-text { display: flex; flex-direction: column; gap: 2px; }
.tile-title { font: 500 15px/1.37 var(--sans); }
.tile-note {
  font: 400 12px/1.37 var(--sans);
  color: color-mix(in srgb, var(--surface) 60%, transparent);
}

.site-footer hr,
.footer-bottom::before {
  content: "";
  display: block;
  height: 1px;
  background: color-mix(in srgb, var(--surface) 12%, transparent);
}
.footer-bottom { display: grid; gap: 24px; margin-top: 24px; }
.footer-bottom::before { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) 432px;
    gap: 40px 44px;
    margin-top: 40px;
  }
}
.footer-operator {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.37;
}
.footer-operator .dim { color: color-mix(in srgb, var(--surface) 60%, transparent); }
.footer-documents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.37;
}
.footer-documents a { text-decoration: none; }
.footer-documents a:hover { text-decoration: underline; }

.footer-legal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.37;
  color: color-mix(in srgb, var(--surface) 60%, transparent);
}
@media (min-width: 960px) {
  .footer-legal { margin-top: 48px; }
}
.age {
  flex: none;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--surface) 60%, transparent);
  border-radius: 6px;
  font: 700 11px/1.37 var(--sans);
  color: var(--surface);
}

/* MARK: Страница документа */

.doc-head { display: flex; flex-direction: column; gap: 16px; padding-block: 32px 28px; }
@media (min-width: 960px) {
  .doc-head { gap: 20px; padding-block: 56px 40px; }
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.crumb-dot {
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.doc-head h1 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  font-weight: 800;
  max-width: 900px;
}
.doc-head .lead,
.faq-head .lead { max-width: 820px; }
/* Полное название документа длинное; в узком окне макет показывает короткое. */
.title-full { display: none; }
.title-short { display: inline; }
@media (min-width: 720px) {
  .title-full { display: inline; }
  .title-short { display: none; }
}

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px 6px 11px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.37;
}
.chip-icon { width: 16px; height: 16px; }

.doc-body { display: grid; gap: 28px; padding-bottom: var(--section); align-items: start; }
@media (min-width: 1000px) {
  .doc-body { grid-template-columns: 320px minmax(0, 1fr); gap: 64px; }
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
@media (min-width: 1000px) {
  .toc { position: sticky; top: 88px; padding: 24px; max-height: calc(100vh - 120px); overflow-y: auto; }
}
.toc .eyebrow { color: var(--muted); margin-bottom: 10px; }
.toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 7px;
  color: var(--muted);
  font: 600 15px/1.37 var(--sans);
  text-decoration: none;
}
.toc a::before {
  content: "";
  width: 2px;
  height: 16px;
  flex: none;
  border-radius: 6px;
  background: var(--line);
}
.toc a:hover { color: var(--text); }
.toc a.is-current { color: var(--accent); }
.toc a.is-current::before { background: var(--accent); }

.doc-content { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.callout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--peach);
  border-radius: var(--r-md);
}
@media (min-width: 720px) {
  .callout { padding: 28px; }
}
.callout p { color: var(--muted); }
.callout::before {
  content: attr(data-title);
  font: 700 20px/1.3 var(--display);
  color: var(--text);
}

.doc-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 88px; }
.doc-section h2 { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.3; }
.doc-section ul, .doc-section ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.doc-content a { color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface); }

/* MARK: Вопросы и ответы */

.faq-head { display: flex; flex-direction: column; gap: 16px; padding-block: 32px 28px; }
@media (min-width: 960px) {
  .faq-head { gap: 20px; padding-block: 56px 40px; }
}
.faq-head h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 800;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  padding: 14px 14px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.search .icon { width: 20px; height: 20px; color: var(--muted); }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: none;
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
.search-clear {
  display: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.search.has-query .search-clear { display: block; }

.faq-body { display: grid; gap: 28px; padding-bottom: var(--section); align-items: start; }
@media (min-width: 1000px) {
  .faq-body { grid-template-columns: 320px minmax(0, 1fr); gap: 64px; }
}
.faq-content { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.faq-sections { display: flex; flex-direction: column; gap: 32px; }
/* display:flex иначе перебивает атрибут hidden — как и у полосы скриншотов. */
.faq-sections[hidden] { display: none; }
@media (min-width: 960px) {
  .faq-content { gap: 44px; }
  .faq-sections { gap: 44px; }
}

.faq-section { display: flex; flex-direction: column; gap: 4px; scroll-margin-top: 88px; }
.faq-section > h2 { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.3; margin-bottom: 8px; }

.faq-item { border-bottom: 1px solid var(--line); scroll-margin-top: 88px; }
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
  font: 700 17px/1.37 var(--sans);
  cursor: pointer;
  list-style: none;
}
@media (min-width: 720px) {
  .faq-item > summary { font-size: 18px; }
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--accent); }
.faq-item .chevron { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 0.15s ease; }
.faq-item[open] .chevron { transform: rotate(180deg); }
.faq-item .answer { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; color: var(--muted); }
.faq-item .answer a { color: var(--accent); }
.faq-item .answer ul, .faq-item .answer ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.faq-item .answer figure { margin: 4px 0 0; }
.faq-item .answer figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.faq-item .answer figcaption { margin-top: 8px; font: 500 11px/1.37 var(--sans); }
blockquote {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--line);
}
pre {
  margin: 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow-x: auto;
  font-size: 14px;
}

/* Подсветка вопроса, к которому привёл поиск, — чтобы глаз нашёл строку,
   когда список вернулся на место. */
.faq-item.is-target > summary { animation: flash 1.6s ease-out; }
@keyframes flash {
  0%, 40% { background: var(--peach); }
  100% { background: transparent; }
}

.search-summary { color: var(--muted); font-size: 14px; }
.results {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--peach); }
.result-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.result-title { font: 500 15px/1.37 var(--sans); }
.result-section { color: var(--muted); font: 400 14px/1.37 var(--sans); }
.result .icon { width: 20px; height: 20px; color: var(--muted); }
.search-empty { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

html { scroll-behavior: smooth; }
