/* Сайт speech-app.ru: один файл стилей, без JS. Палитра — как у приложения (frontend/src/styles). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary: #2b59c3;
  --primary-hover: #234aa6;
  --primary-soft: #edf2fd;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --surface: #ffffff;
  --surface-muted: #f6f8fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 16px rgb(15 23 42 / 6%);
  --container: 1080px;
  --footer-bg: #0f172a;
  --footer-text: #cbd5e1;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Переход по якорю не прячет заголовок под липкой лентой оффера. */
  scroll-padding-top: var(--offer-ribbon-height, 0px);
}

/* Подвал прижат к низу экрана даже на коротких страницах (404): main забирает остаток высоты. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 3px solid rgb(43 89 195 / 45%);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.container--narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

/* Кнопки */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.button--secondary {
  border-color: var(--primary);
  color: var(--primary);
}

.button--secondary:hover {
  background: var(--primary-soft);
}

.button--ghost {
  color: var(--primary);
}

.button--ghost:hover {
  background: var(--primary-soft);
}

.button--large {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}

/* Шапка и подвал */

.header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

/* Лента оффера акции под шапкой: рисует static/website/retention.js, если у посетителя есть
   оффер. Цвета — как плашка оффера в SPA. */
.offer-ribbon {
  /* Шапка не закреплена: лента стоит под ней, а когда шапка уходит со скроллом — у верха экрана.
     Её высоту скрипт пишет в --offer-ribbon-height: липкое оглавление и якоря её учитывают. */
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #bbf7d0;
  background: var(--success-soft);
  color: #166534;
}

.offer-ribbon__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.offer-ribbon__text {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
  margin: 0;
  font-size: 15px;
}

.offer-ribbon__badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.offer-ribbon__term {
  color: var(--text-muted);
  white-space: nowrap;
}

.offer-ribbon__cta {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 14px;
  font-size: 14px;
}

/* На телефоне текст сверху, кнопка под ним во всю ширину. */
@media (max-width: 560px) {
  .offer-ribbon__inner {
    flex-wrap: wrap;
  }

  .offer-ribbon__cta {
    flex-basis: 100%;
  }
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand__mark {
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
}

.nav a:hover {
  color: var(--text);
}

.header__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* «Войти» / «Личный кабинет»: на десктопе текст, на телефоне — иконка в кружке. */
.header__login-icon {
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

/* Подвал: тёмный, четыре колонки — сервис и документы, ресурсы, поддержка, реквизиты. */

.footer {
  padding: 48px 0 32px;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 14px;
}

.footer a {
  color: var(--footer-text);
}

.footer a:hover {
  color: #fff;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.brand--footer,
.brand--footer:hover {
  color: #fff;
}

.brand--footer .brand__mark {
  color: #8fb0ff;
}

.footer__about {
  margin: 12px 0 16px;
  line-height: 1.6;
}

.footer__doc {
  display: block;
  margin-top: 8px;
  text-underline-offset: 2px;
}

.footer__title {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.footer__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
}

.footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__list li + li {
  margin-top: 6px;
}

.footer__list a {
  text-decoration: none;
}

.footer__list a:hover {
  text-decoration: underline;
}

.footer__list--plain li + li {
  margin-top: 2px;
}

.footer__payments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.footer__pay {
  display: block;
  height: 28px;
  width: auto;
  border-radius: 4px;
}

/* В PNG СБП прозрачные поля: 210/996 по бокам и 90/488 сверху и снизу. При 44px видимый логотип ~28px
   (не меньше соседних и выше минимума 18px из брендбука), а поля ≈19px и ≈8px гасим отрицательными
   отступами, чтобы зазор был как у остальных. Зазор 8px не меньше охранного поля 2X (~7px). */
.footer__pay--sbp {
  height: 44px;
  margin: -8px -19px;
  border-radius: 0;
}

.footer__copyright {
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  text-align: center;
}

/* Секции */

.hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--primary-soft), var(--surface));
}

.hero__inner {
  max-width: 820px;
  text-align: center;
}

.hero__title {
  font-size: 44px;
  font-weight: 800;
}

.hero__lead {
  margin: 20px auto 0;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 19px;
}

.hero .actions {
  justify-content: center;
  margin-top: 32px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 14px;
}

.section {
  padding: 64px 0;
}

.section--first {
  padding-top: 48px;
}

.section--muted {
  background: var(--surface-muted);
}

.section__title {
  margin-bottom: 24px;
  font-size: 30px;
  font-weight: 700;
}

.page-title {
  margin-bottom: 16px;
  font-size: 38px;
  font-weight: 800;
}

.section__lead {
  margin: -8px 0 28px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 17px;
}

.section__more {
  margin: 24px 0 0;
}

/* Шаги: номера в кругах, соединённые линией; на телефоне — вертикально. */

.steps__title {
  margin-bottom: 48px;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  counter-increment: step;
  padding: 0 16px;
  text-align: center;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--primary-soft);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* Линия от круга до круга следующего шага. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 23px;
  left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 2px;
  border-radius: 1px;
  background: var(--border);
}

.step--done::before {
  content: "";
  background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 0 0 6px rgb(22 163 74 / 8%);
}

.step__title {
  margin-bottom: 8px;
  font-size: 19px;
}

.step--done .step__title {
  color: var(--success);
}

.step p {
  margin: 0 auto;
  max-width: 300px;
  color: var(--text-muted);
}

.checklist {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin: 8px 0;
  padding-left: 28px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

.example {
  display: grid;
  grid-template-columns: 1fr 520px;
  align-items: center;
  gap: 48px;
}

/* Стопка примеров (website/_examples.html, examples.js): листы лежат друг на друге, верхний
   по клику уезжает вправо и ложится вниз стопки. */

.section:has(.stack) {
  overflow-x: clip;
}

.stack {
  --stack-middle: translate(-12px, 6px) rotate(-3deg);
  --stack-back: translate(12px, 10px) rotate(3.5deg);
  --stack-away: translate(62%, -3%) rotate(9deg);
}

.stack__sheets {
  position: relative;
  aspect-ratio: 520 / 600;
  margin: 0 14px;
}

.stack__sheet {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stack__sheet img {
  display: block;
  width: 100%;
  height: auto;
}

.stack__sheet::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(rgb(255 255 255 / 0%), #fff);
}

.stack__sheet[data-pos="0"] {
  z-index: 3;
  transform: none;
}

.stack__sheet[data-pos="1"] {
  z-index: 2;
  transform: var(--stack-middle);
}

.stack__sheet[data-pos="2"] {
  z-index: 1;
  transform: var(--stack-back);
}

.stack--ready .stack__sheet[data-pos="0"] {
  cursor: pointer;
}

/* Верхний лист уходит вправо и ложится вниз; при «назад» нижний так же выходит наверх. */
.stack__sheet.is-to-back {
  animation: stack-to-back 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.stack__sheet.is-to-front {
  animation: stack-to-front 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes stack-to-back {
  0% {
    z-index: 4;
    transform: none;
  }
  45% {
    z-index: 4;
    transform: var(--stack-away);
  }
  55% {
    z-index: 0;
  }
  100% {
    z-index: 0;
    transform: var(--stack-back);
  }
}

@keyframes stack-to-front {
  0% {
    z-index: 0;
    transform: var(--stack-back);
  }
  45% {
    z-index: 0;
    transform: var(--stack-away);
  }
  55% {
    z-index: 4;
  }
  100% {
    z-index: 4;
    transform: none;
  }
}

.stack__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 14px 0;
}

.stack__controls[hidden] {
  display: none;
}

.stack__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.stack__caption {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.stack__dots {
  display: flex;
  gap: 6px;
}

.stack__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.25s, background-color 0.25s;
}

.stack__dot[aria-current="true"] {
  width: 22px;
  background: var(--primary);
}

.stack__arrow {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.stack__arrow:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.stack__dot:focus-visible,
.stack__arrow:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Почему нам можно доверять */

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.benefit:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgb(15 23 42 / 6%), 0 12px 28px rgb(15 23 42 / 10%);
}

.benefit__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.benefit__icon img,
.benefit__icon svg {
  width: 28px;
  height: 28px;
}

.benefit__title {
  margin-bottom: 8px;
  font-size: 19px;
}

.benefit p {
  margin: 0;
  color: var(--text-muted);
}

.benefit p.benefit__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

.benefit__links a {
  text-decoration: none;
}

.benefit__links a:hover {
  text-decoration: underline;
}

/* Цифры сервиса: одна панель 4×2, тонкие разделители — фон панели в зазорах сетки. */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--border);
  box-shadow: var(--shadow);
  list-style: none;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--surface);
}

.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.stat__value {
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.stat__label {
  color: var(--text-muted);
  font-size: 14px;
}

/* Детали внизу плитки: шкала, сравнение, аватары, языки. */
.stat__meter,
.stat__compare,
.stat__avatars,
.stat__tags {
  margin-top: auto;
  padding-top: 14px;
}

.stat__meter {
  display: block;
  height: 6px;
  box-sizing: content-box;
  border-radius: 3px;
  background-clip: content-box;
  background-color: var(--primary-soft);
}

.stat__meter-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
}

.stat__meter-fill--97 {
  width: 97%;
}

.stat__compare {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.stat__compare-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat__compare-bar {
  width: 100%;
  max-width: 120px;
  height: 6px;
  border-radius: 3px;
  background: #cbd5e1;
}

/* Обработка в 20 раз короче записи. */
.stat__compare-bar--short {
  max-width: 6px;
  background: var(--primary);
}

.stat__avatars {
  display: flex;
}

.stat__avatars span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: -6px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.stat__avatars span:nth-child(2) {
  background: #16a34a;
}

.stat__avatars span:nth-child(3) {
  background: #d97706;
}

.stat__avatars span:last-child {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.stat__tags span {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

/* «Что можно сделать»: две карточки-группы, в каждой — ссылки на страницы строками. */

.tasks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tasks__group {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tasks__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.tasks__title {
  margin: 0;
  font-size: 21px;
}

.tasks__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

/* Без transition: при переходе между строками одна гасла, другая загоралась, и это мигало. */
.task:hover {
  background: var(--primary-soft);
  color: var(--text);
}

/* Разделитель внутри ссылки, а не границей li: иначе строки разделяет полоска вне ссылок,
   и при переходе через неё подсветка гаснет и загорается заново — мигает. Рядом
   с подсвеченной строкой разделитель прячется. */
.tasks__list li + li .task::before {
  content: "";
  position: absolute;
  top: 0;
  right: 12px;
  left: 12px;
  height: 1px;
  background: var(--border);
}

.tasks__list li:hover + li .task::before,
.tasks__list li + li .task:hover::before {
  visibility: hidden;
}

.task__text {
  display: grid;
  flex: 1;
  gap: 2px;
}

.task__label {
  font-weight: 600;
}

.task:hover .task__label {
  color: var(--primary);
}

.task__summary {
  color: var(--text-muted);
  font-size: 14px;
}

.task__arrow {
  flex: none;
  color: var(--text-muted);
}

.task:hover .task__arrow {
  color: var(--primary);
}

/* Настройки документа: карточки 2×2, внизу каждой — схема того, как настройка выглядит. */

.settings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setting {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.setting__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.setting__icon,
.tasks__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.setting__title {
  margin: 0;
  font-size: 19px;
}

.setting p {
  margin: 0;
  color: var(--text-muted);
}

.setting__demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin-top: auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 14px;
}

.setting__file {
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.setting__file--docx {
  background: var(--primary);
}

.setting__file--pdf {
  background: #dc2626;
}

/* Включённый переключатель — как в окне скачивания. */
.setting__toggle {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary);
}

.setting__toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.setting__time {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.setting__arrow {
  color: var(--primary);
  font-weight: 700;
}

.setting__stack {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.setting__chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
}

.setting__chip--named {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* Тарифы */

.tariffs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tariff {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tariff--popular {
  border: 2px solid var(--primary);
}

.tariff__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.tariff__name {
  font-size: 20px;
}

.tariff__description {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.tariff__price {
  margin: 16px 0 0;
}

.tariff__amount {
  font-size: 32px;
  font-weight: 800;
}

.tariff__unit {
  color: var(--text-muted);
}

.tariff__benefits {
  flex: 1;
  margin-bottom: 20px;
  font-size: 15px;
}

.tariff__cta {
  width: 100%;
}

/* Группы тарифов: «Без подписки» и «Подписка». */
.tariff-group + .tariff-group {
  margin-top: 40px;
}

.tariff-group__title {
  font-size: 22px;
}

.tariff-group__lead {
  margin: 6px 0 20px;
  color: var(--text-muted);
}

/* Промокоды под тарифами: код копируется по клику. */
.promos {
  margin-top: 40px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.promos__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
}

.promos__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  /* Купоны одной высоты: по самому высокому. */
  grid-auto-rows: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Купон: слева корешок со скидкой и сроком (вырезы — «линия отрыва»), справа условия и код. */
.promo {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  grid-template-areas: "stub text code";
  align-items: center;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* Скругление — у самого корешка, а не overflow: hidden у купона: обрезка по радиусу
   вместе с transition кнопки внутри даёт в Chrome мерцание фона в начале и конце перехода. */
.promo__stub {
  position: relative;
  grid-area: stub;
  align-self: stretch;
  border-radius: var(--radius) 0 0 var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Симметрично сверху и снизу: скидка по центру, снизу хватает места сроку. */
  padding: 24px 6px;
  background: var(--primary);
  color: #fff;
  text-align: center;
}

.promo__discount {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Срок прижат к низу корешка и не сдвигает скидку с центра. */
.promo__until {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}

.promo__stub::before,
.promo__stub::after {
  content: "";
  position: absolute;
  right: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-soft);
}

.promo__stub::before {
  top: -8px;
}

.promo__stub::after {
  bottom: -8px;
}

.promo__text {
  grid-area: text;
  padding: 14px 16px 14px 20px;
}

.promo__code {
  grid-area: code;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  padding: 8px 12px;
  /* Целая ширина: дробная пунктирная рамка рисуется по-разному от кадра к кадру. */
  border: 1px dashed var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.promo__code:hover {
  background: var(--primary);
  color: #fff;
}

.promo__code.is-copied {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.promos__note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Узкий экран: код переносится под условия, корешок остаётся слева на всю высоту. */
@media (max-width: 520px) {
  .promo {
    grid-template-columns: 80px minmax(0, 1fr);
    grid-template-areas:
      "stub text"
      "stub code";
  }

  .promo__discount {
    font-size: 20px;
  }

  .promo__until {
    font-size: 11px;
  }

  .promo__text {
    padding-bottom: 10px;
  }

  .promo__code {
    justify-content: center;
    margin: 0 16px 14px 20px;
  }
}

.rules {
  margin: 0;
}

.rules dt {
  margin-top: 20px;
  font-weight: 700;
}

.rules dt:first-child {
  margin-top: 0;
}

.rules dd {
  margin: 4px 0 0;
  color: var(--text-muted);
}

/* FAQ */

.faq {
  border-top: 1px solid var(--border);
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  position: relative;
  padding: 16px 40px 16px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.faq__item[open] .faq__question::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.faq__answer {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.cta__inner {
  text-align: center;
}

.cta__title {
  margin-bottom: 12px;
  font-size: 30px;
}

.cta p {
  color: var(--text-muted);
}

.cta .button {
  margin-top: 12px;
}

#main {
  flex: 1 0 auto;
}

/* 404: на всю высоту между шапкой и подвалом; слева текст и ссылки, справа «расшифровка» разговора. */

#main:has(.not-found) {
  display: flex;
  flex-direction: column;
}

.not-found {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  padding: 64px 0;
  background:
    radial-gradient(circle at 85% 20%, rgb(43 89 195 / 10%), transparent 45%),
    radial-gradient(circle at 10% 90%, rgb(43 89 195 / 7%), transparent 40%),
    linear-gradient(180deg, var(--primary-soft), var(--surface));
}

.not-found__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 56px;
}

.not-found__code {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 20px;
  color: var(--primary);
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.not-found__zero {
  width: 0.78em;
  height: 0.78em;
  margin: 0 0.04em;
  animation: not-found-pulse 2.4s ease-in-out infinite;
}

@keyframes not-found-pulse {
  50% {
    transform: scale(0.92);
    opacity: 0.85;
  }
}

.not-found__title {
  font-size: 44px;
}

.not-found__lead {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 18px;
}

.not-found__links {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.not-found__links-title {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Ссылки-«таблетки»: подсказки на 404, оглавление на «Возможностях». */
.chips,
.not-found__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips a,
.not-found__chips a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.chips a:hover,
.not-found__chips a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.not-found__card {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 4px rgb(15 23 42 / 4%), 0 24px 48px rgb(15 23 42 / 10%);
  transform: rotate(1.5deg);
}

.not-found__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

.not-found__file {
  overflow: hidden;
  color: var(--text-muted);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.not-found__badge {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 600;
}

.not-found__wave {
  display: block;
  width: 100%;
  height: 40px;
  margin-bottom: 20px;
}

.not-found__wave-played {
  fill: var(--primary);
}

.not-found__wave-rest {
  fill: var(--border);
}

.not-found__lines {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.5;
}

.not-found__line {
  display: grid;
  gap: 2px;
}

.not-found__speaker {
  font-size: 12px;
  font-weight: 700;
}

.not-found__speaker--a {
  color: var(--primary);
}

.not-found__speaker--b {
  color: #7c3aed;
}

.not-found__caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  background: var(--text);
  vertical-align: text-bottom;
  animation: not-found-caret 1s steps(1) infinite;
}

@keyframes not-found-caret {
  50% {
    opacity: 0;
  }
}

/* Телефоны и планшеты */

@media (max-width: 960px) {
  .example {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .not-found__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .not-found__card {
    max-width: 520px;
    transform: none;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* На узком экране листы почти не поворачиваем: иначе углы упираются в край экрана. */
  .stack {
    --stack-middle: translate(-6px, 5px) rotate(-1.5deg);
    --stack-back: translate(6px, 9px) rotate(2deg);
  }
}

@media (max-width: 760px) {
  .settings,
  .tasks {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    padding: 18px;
  }

  .stat__value {
    font-size: 24px;
  }

  .nav {
    display: none;
  }

  .header__actions {
    align-items: center;
  }

  .header__actions .button.header__login {
    width: 40px;
    height: 40px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
  }

  .header__actions .button.header__login:hover {
    background: var(--primary-hover);
    color: #fff;
  }

  .header__login-icon {
    display: block;
  }

  .header__login-text {
    display: none;
  }

  .hero {
    padding: 40px 0 40px;
  }

  .hero__title {
    font-size: 30px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .section {
    padding: 48px 0;
  }

  .section__title,
  .cta__title {
    font-size: 25px;
  }

  .page-title {
    font-size: 30px;
  }

  .not-found {
    padding: 40px 0 48px;
  }

  .not-found__code {
    font-size: 88px;
  }

  .not-found__lead {
    font-size: 17px;
  }

  .not-found__card {
    padding: 18px;
  }

  .benefits {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .steps__title {
    margin-bottom: 32px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: 48px;
    padding: 0 0 28px 72px;
    text-align: left;
  }

  .step:last-child {
    padding-bottom: 0;
  }

  .step::before {
    position: absolute;
    top: 0;
    left: 6px;
    margin: 0;
  }

  .step:not(:last-child)::after {
    top: 62px;
    bottom: 14px;
    left: 29px;
    width: 2px;
    height: auto;
  }

  .step__title {
    padding-top: 12px;
  }

  .step p {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .header__inner {
    gap: 8px;
  }

  .brand {
    font-size: 16px;
  }

  .header__actions {
    gap: 4px;
  }

  .header__actions .button {
    padding: 8px 10px;
    font-size: 14px;
  }

  .hero .actions .button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .not-found__zero,
  .not-found__caret {
    animation: none;
  }

  .benefit {
    transition: none;
  }

  .stack__sheet {
    transition: none;
  }

  .benefit:hover {
    transform: none;
  }
}

/* Плашка cookies (static/website/cookies.js) */

.cookies {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  width: min(440px, calc(100vw - 16px));
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 32px rgb(15 23 42 / 18%);
  font-size: 14px;
  animation: cookies-in 0.3s ease;
}

.cookies[hidden],
.cookies [hidden] {
  display: none;
}

@keyframes cookies-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.cookies__body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookies__icon {
  flex: none;
}

.cookies__text {
  margin: 0;
}

.cookies__error {
  margin: 12px 0 0;
  color: #b42318;
}

.cookies__actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.cookies__actions .button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 14px;
}

.cookies__actions .button:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 560px) {
  .cookies {
    right: 8px;
    bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookies {
    animation: none;
  }
}

/* Инструкция (/instrukciya): оглавление слева, разделы с шагами и скриншотами справа.
   Номера шагов совпадают с метками на скриншотах (frontend/manual/screenshots.spec.ts). */

.manual-intro {
  padding-bottom: 32px;
}

.manual-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manual-quick__card {
  display: flex;
  gap: 12px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.manual-quick__card:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
}

.manual-quick__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.manual-quick__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manual-quick__title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.manual-quick__text {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.manual {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-bottom: 64px;
}

.manual__toc {
  position: sticky;
  top: calc(24px + var(--offer-ribbon-height, 0px));
  max-height: calc(100vh - 48px - var(--offer-ribbon-height, 0px));
  overflow-y: auto;
  font-size: 14px;
}

.manual__toc-summary {
  display: none;
}

.manual__toc-group {
  margin: 20px 0 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual__toc-group:first-of-type {
  margin-top: 0;
}

/* Номера стоят снаружи пункта, в отступе: места хватает и двузначным («10.»). */
.manual__toc-list {
  margin: 0;
  padding: 0 0 0 32px;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
}

.manual__toc-list--plain {
  list-style: none;
}

.manual__toc-list li {
  margin: 0;
}

.manual__toc-list a {
  display: block;
  padding: 4px 0;
  color: var(--text-muted);
  text-decoration: none;
}

.manual__toc-list a:hover {
  color: var(--primary);
}

/* Текущий раздел: подсвечивает manual.js. */
.manual__toc-list a[aria-current="true"] {
  color: var(--primary);
  font-weight: 600;
}

.manual__part {
  margin: 48px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual__part:first-child {
  margin-top: 0;
}

.manual-section {
  padding: 40px 0 8px;
  scroll-margin-top: 16px;
}

.manual-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.manual-section__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 17px;
}

.manual-section__subtitle {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

.manual-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 32px;
  align-items: start;
  margin: 8px 0 24px;
}

.manual-split--reverse {
  margin-top: 32px;
}

/* Шаги с номерами в кругах — как метки на скриншотах. */
.manual-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: manual-step;
}

.manual-steps > li {
  position: relative;
  margin: 0 0 14px;
  padding-left: 40px;
  counter-increment: manual-step;
}

.manual-steps > li::before {
  content: counter(manual-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

.manual-steps--inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.manual-steps--inline > li {
  margin: 0;
  padding: 40px 0 0;
}

.manual-shot {
  margin: 0;
}

.manual-shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Высокие кадры (окно имён, кабинет) не растягивают раздел на несколько экранов. */
.manual-shot--tall img {
  max-height: 640px;
  object-fit: cover;
  object-position: top;
}

.manual-shot figcaption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.manual-shot figcaption b {
  color: var(--text);
}

/* Обработка — ряд кадров по этапам. */
.manual-film {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.manual-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 8px 0 24px;
}

.manual-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  list-style: none;
}

.manual-facts__label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.manual-note {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.manual-note--tip {
  border-color: #fde68a;
  background: #fffbeb;
}

.manual-note--warning {
  border-color: #fecaca;
  background: #fef2f2;
}

.manual-sources,
.manual-options,
.manual-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
}

.manual-source,
.manual-option,
.manual-compare__item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
}

.manual-source p,
.manual-option p {
  margin: 0;
  color: var(--text-muted);
}

.manual-source .manual-source__title,
.manual-option .manual-option__title,
.manual-compare__name {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 700;
}

.manual-compare__price {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.manual-compare__price span {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.manual-compare .checklist {
  margin-top: 8px;
  font-size: 14px;
}

/* Порядок списания: плашки со стрелками между ними. */
.manual-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 40px;
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
}

.manual-flow__step {
  position: relative;
  padding: 12px 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.manual-flow__step + .manual-flow__step::before {
  content: "→";
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.manual-flow__name {
  display: block;
  font-weight: 700;
}

.manual-flow__term {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
}

.manual-problems {
  margin: 0;
}

.manual-problems dt {
  margin-top: 16px;
  font-weight: 700;
}

.manual-problems dt:first-child {
  margin-top: 0;
}

.manual-problems dd {
  margin: 4px 0 0;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .manual-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Оглавление — сворачиваемым списком над текстом, закреплённым при прокрутке. */
  .manual {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .manual__toc {
    top: 0;
    z-index: 5;
    margin: 0 -16px;
    padding: 8px 16px;
    max-height: none;
    overflow: visible;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .manual__toc-box[open] {
    max-height: 70vh;
    overflow-y: auto;
  }

  .manual__toc-summary {
    display: block;
    padding: 6px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
  }

  .manual__toc-box[open] .manual__toc-summary {
    margin-bottom: 8px;
  }

  .manual__body {
    padding-top: 24px;
  }
}

@media (max-width: 760px) {
  .manual-split,
  .manual-sources,
  .manual-options,
  .manual-compare,
  .manual-film,
  .manual-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .manual-steps--inline {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .manual-steps--inline > li {
    margin: 0 0 14px;
    padding: 0 0 0 40px;
  }

  .manual-section__title {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .manual-quick {
    grid-template-columns: minmax(0, 1fr);
  }
}
