/* Tekstora — сайт. Цвета и шрифт — как у программы (Themes\LightTheme.xaml).
   Анимации: только transform и opacity; при «уменьшить движение» — выключены. */

/* ---------- Шрифты: свои файлы, без Google Fonts (данные посетителей не уходят за границу) ---------- */
@font-face { font-family: "Onest"; src: url("../fonts/onest-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Запасной шрифт с метриками Onest: пока Onest грузится, строки не прыгают */
@font-face { font-family: "Onest Fallback"; src: local("Arial"); font-weight: 400; size-adjust: 102.78%; ascent-override: 94.37%; descent-override: 29.67%; line-gap-override: 0%; }
@font-face { font-family: "Onest Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 700; size-adjust: 99.87%; ascent-override: 97.12%; descent-override: 30.54%; line-gap-override: 0%; }

/* ---------- Цвета и размеры ---------- */
:root {
  --bg: #FAF9F7;
  --bg-alt: #F5F4F0;
  --card: #FFFFFF;
  --border: #D6D2C8;
  --text: #1F1915;
  --muted: #5D5550;
  --accent: #B45A3B;          /* кнопки: белый текст — контраст 4,70 */
  --accent-hover: #9E4C31;
  --accent-text: #A85233;     /* терракотовый текст: 4,87–5,36 на всех фонах */
  --accent-text-hover: #8E4429;
  --icon: #DA7756;            /* только значки и линии: как текст не годится (3,11) */
  --tint: #FDF4F0;
  --shadow-sm: 0 1px 2px rgba(31, 25, 21, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 25, 21, 0.06);
  --shadow-lg: 0 14px 32px rgba(31, 25, 21, 0.09);
  --radius: 16px;
  --container: 1200px;
  --gutter: 40px;
  --header-h: 72px;
  --font: "Onest", "Onest Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, "Cascadia Mono", monospace;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-text-hover); }
button { font: inherit; color: inherit; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }
.icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--icon); }
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: 12px;
  font-size: 18px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 8px 20px rgba(180, 90, 59, 0.28); }
.btn-secondary { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { color: var(--text); border-color: #BDB7AA; box-shadow: var(--shadow-md); }
.btn-sm { height: 44px; padding: 0 20px; font-size: 16px; }
.btn-block { display: flex; width: 100%; height: 52px; font-size: 17px; }
.btn .icon { width: 22px; height: 22px; color: currentColor; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-primary:hover { --dl-shift: 2px; }   /* стрелка «Скачать» чуть опускается (значок — в наборе i-btn-download) */
}
.btn:active { transform: translateY(0) scale(0.98); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: saturate(1.4) blur(10px); } }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(31, 25, 21, 0.07); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; }
.brand span { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a { font-size: 16px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .2s; }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 24px; }
.lang { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lang a { color: var(--muted); text-decoration: none; }
.lang a[aria-current="page"] { color: var(--accent-text); }
.lang a:hover { color: var(--text); }

/* ---------- Первый экран ---------- */
.hero { padding: 80px 0 88px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.eyebrow {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  background: var(--tint); color: var(--accent-text); font-size: 14px; font-weight: 600; line-height: 1.3;
}
.hero h1 { font-size: 60px; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.lead { max-width: 440px; font-size: 19px; line-height: 1.6; color: var(--muted); }
.hero-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.hero-buttons .btn { padding: 0 22px; }
.hero-meta { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.hero-meta span { color: var(--muted); }
.hero-visual { margin-right: calc(-1 * clamp(0px, (100vw - var(--container)) / 2 - 8px, 60px)); }
.shots { position: relative; }
.shot {
  width: 100%; height: auto;
  border-radius: 1.302% / 2.637%;   /* как у окна программы: радиус 25 px на снимке 1920×948 */
}
.shot-main { box-shadow: 0 24px 60px rgba(31, 25, 21, 0.10), 0 2px 6px rgba(31, 25, 21, 0.05); }
.shot-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.shot-alt.is-active { opacity: 1; }
/* Выбор темы — «Сегменты» (выбор Максима 28.09.2026): одна дорожка, выбранная тема — белая «таблетка».
   Таблетку двигает site.js (класс has-thumb); без него белый фон стоит у самой выбранной кнопки.
   Только светлая и тёмная: контрастную на сайте не показываем (решение Максима 28.09.2026) */
.theme-switch {
  position: relative; display: flex; width: max-content; margin: 20px auto 0; padding: 4px; gap: 2px;
  border-radius: 999px; background: #ECE9E3; box-shadow: inset 0 0 0 1px rgba(31, 25, 21, 0.05);
}
.theme-switch[hidden] { display: none; }
.theme-switch button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
  font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer;
  transition: color .2s, background-color .2s;
}
.theme-switch button:hover { color: var(--text); }
.theme-switch button:focus-visible { border-radius: 999px; }   /* общее правило фокуса ставит радиус 6 px */
.theme-switch button[aria-pressed="true"],
.theme-thumb { background: #fff; box-shadow: 0 1px 2px rgba(31, 25, 21, 0.08), 0 3px 10px rgba(31, 25, 21, 0.07); }
.theme-switch button[aria-pressed="true"] { color: var(--text); }
.theme-switch.has-thumb button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.theme-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  transition: transform .35s var(--ease-out), width .35s var(--ease-out);
}
.theme-thumb.is-still { transition: none; }
.theme-switch:not(.has-thumb) .theme-thumb { display: none; }
/* значок — маленькое окно в цветах темы: строка-заголовок акцентом, вторая строка — второстепенным цветом */
.tw { position: relative; flex-shrink: 0; width: 18px; height: 13px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(31, 25, 21, 0.22); }
.tw::before, .tw::after { content: ""; position: absolute; left: 3px; height: 2px; border-radius: 1px; }
.tw::before { top: 3px; right: 6px; }
.tw::after { top: 7px; right: 3px; }
.tw-light { background: #FAF9F7; }
.tw-light::before { background: #B45A3B; }
.tw-light::after { background: #C9C4B9; }
.tw-dark { background: #1A2022; }
.tw-dark::before { background: #6BC9A0; }
.tw-dark::after { background: #46574E; }

/* ---------- Строка доверия ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust ul { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; }
.trust li { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; color: var(--muted); }
.trust .icon { width: 22px; height: 22px; }

/* ---------- Было → Стало (шторка) ---------- */
.ba-section { background: var(--bg-alt); padding: 96px 0; }
.ba-head { text-align: center; margin-bottom: 40px; }
.ba-head h2 { font-size: 36px; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
.ba-head p { margin-top: 12px; font-size: 17px; color: var(--muted); }
.ba { --pos: 50%; position: relative; max-width: 1040px; margin: 0 auto; }
.ba-stage {
  position: relative; display: grid;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow-md);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.ba.is-ready .ba-stage { cursor: ew-resize; }
.ba-pane { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; }
.ba-after { clip-path: inset(0 0 0 var(--pos)); }
/* Свой слой у Блокнота: у Tekstora он уже есть (его даёт clip-path), и подпись «Стало» прячется под Блокнотом.
   Без этого подпись «Было» (z-index: 2) вылезала поверх окна Tekstora — найдено по снимкам Максима 27.09.2026 */
.ba-before { isolation: isolate; }
.win-bar { height: 40px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between; }
.win-ctrls { height: 40px; display: flex; align-items: center; align-self: flex-start; }
.win-ctrls span { width: 44px; height: 32px; display: flex; align-items: center; justify-content: center; }
.win-ctrls svg { width: 10px; height: 10px; }
/* Блокнот */
.np { background: #fff; flex: 1; display: flex; flex-direction: column; }
.np .win-bar { background: #EEEEEE; padding-left: 10px; }
.np-tabs { display: flex; align-items: center; gap: 6px; }
.np-tab {
  height: 32px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border-radius: 8px 8px 0 0; background: #fff; font-size: 12px; color: var(--text);
}
.np-tab svg, .np-plus { width: 10px; height: 10px; }
.np-plus { width: 12px; height: 12px; margin: 0 0 10px 6px; }
.np-text {
  margin: 0; flex: 1; padding: 22px 26px; overflow: hidden;
  font-family: var(--mono); font-size: 16px; line-height: 1.6; color: var(--muted);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Tekstora: настоящий снимок окна (светлая тема) */
.tk { position: relative; flex: 1; background: var(--bg-alt); overflow: hidden; }
.tk img { width: 100%; -webkit-user-drag: none; }
.tk::after {   /* справа строки обрезаны краем — мягко гасим */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 56px;
  background: linear-gradient(90deg, rgba(250, 249, 247, 0), rgba(250, 249, 247, 0.95));
  pointer-events: none;
}
.ba-label {
  position: absolute; bottom: 16px; z-index: 2;
  padding: 7px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.ba-before .ba-label { left: 16px; background: var(--text); color: #fff; }
.ba-after .ba-label { right: 16px; background: var(--accent); color: #fff; }   /* обе подписи внизу — выбор Максима 28.09.2026: вверху «Стало» стояла вплотную к заголовку окна */
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3; width: 0; pointer-events: none; }
.ba-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px;
  background: #fff; box-shadow: 0 0 0 1px rgba(31, 25, 21, 0.12), 0 0 12px rgba(31, 25, 21, 0.12);
}
.ba-knob {
  position: absolute; top: 50%; left: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; color: var(--accent-text);
  border: 1px solid var(--border); box-shadow: 0 4px 14px rgba(31, 25, 21, 0.16);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.ba-knob svg { width: 22px; height: 22px; }
.ba.is-dragging .ba-knob { transform: scale(1.08); box-shadow: 0 6px 18px rgba(31, 25, 21, 0.22); }
.ba-range { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ba-range:focus-visible ~ .ba-stage .ba-knob { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.ba-hint { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.ba-hint[hidden] { display: none; }

/* ---------- Возможности ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; gap: 16px; padding: 32px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s ease, border-color .25s;
}
@media (hover: hover) {
  .card:hover, .tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}
.card-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--tint); }
.card h3 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.card p { font-size: 16px; line-height: 1.55; color: var(--muted); }

/* ---------- Как начать ---------- */
.steps { position: relative; }
.steps-line {
  position: absolute; top: 24px; left: calc(16.66% + 24px); right: calc(16.66% + 24px); height: 2px;
  background: var(--border); transform-origin: left center;
}
.steps ol { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.step-num {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--tint); border: 1px solid var(--border);
  color: var(--accent-text); font-size: 20px; font-weight: 600;
}
.step-text { max-width: 300px; font-size: 20px; font-weight: 600; line-height: 1.35; }

/* ---------- Ещё возможности ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 20px; }   /* все плитки одной высоты, даже если где-то текст в две строки */
.tile {
  display: flex; align-items: center; gap: 16px; padding: 24px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm);
  font-size: 17px; font-weight: 500; line-height: 1.4;
  transition: transform .25s var(--ease-out), box-shadow .25s ease;
}
.tile .icon { width: 32px; height: 32px; }   /* крупнее, чем в строке доверия и карточках (решение Максима 27.09.2026) */

/* ---------- Цены ---------- */
.section-title { text-align: center; font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -0.015em; }
.prices { padding: 104px 0; }
.prices .section-title { margin-bottom: 56px; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 24px; padding: 36px 32px 32px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s ease;
}
@media (hover: hover) { .price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.price-card.is-best { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.badge {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.price-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-card h3 { font-size: 20px; font-weight: 600; }
.chip { padding: 5px 10px; border-radius: 999px; background: var(--tint); color: var(--accent-text); font-size: 13px; font-weight: 600; line-height: 1.2; }
.price { font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.price-row { display: flex; align-items: baseline; gap: 12px; }
.old-price { position: relative; font-size: 22px; font-weight: 500; color: var(--muted); text-decoration: none; }
.old-price::after {
  content: ""; position: absolute; left: -3px; right: -3px; top: calc(50% - 1.5px); height: 2px;   /* по середине цифр */
  background: currentColor; transform-origin: left center;
}
.checks { flex-grow: 1; display: flex; flex-direction: column; gap: 14px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; line-height: 1.45; }
.checks .icon { width: 20px; height: 20px; margin-top: 1px; }
.price-note { margin-top: 56px; text-align: center; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---------- Вопросы ---------- */
.faq { padding: 104px 0 96px; }
.faq-wrap { max-width: 800px; margin: 0 auto; }
.faq .section-title { margin-bottom: 40px; }
.faq-list { border-bottom: 1px solid var(--border); }
.faq-item { border-top: 1px solid var(--border); }
.faq-item h3 { font-size: inherit; font-weight: inherit; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--text);
}
.faq-q:hover { color: var(--accent-text); }
.faq-q .icon { width: 20px; height: 20px; transition: transform .3s var(--ease-out); }
.faq-item.is-open .faq-q .icon { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a p { padding: 0 48px 24px 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.faq-a p + p { margin-top: -12px; }
.faq.is-ready .faq-a { transition: grid-template-rows .35s var(--ease-out), visibility 0s linear .35s; }
.faq.is-ready .faq-item:not(.is-open) .faq-a { grid-template-rows: 0fr; visibility: hidden; }
.faq.is-ready .faq-item.is-open .faq-a { transition: grid-template-rows .35s var(--ease-out), visibility 0s; }

/* ---------- Призыв ---------- */
.cta { padding: 16px 0 104px; }
.cta-box {
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  padding: 72px 64px; border-radius: var(--radius); text-align: center;
  /* фон — картинка в стиле 3D-мультфильма (ChatGPT Изображения 2.5, 27.09.2026): центр светлый, предметы по краям;
     на узких экранах видна только середина. Цвет — пока картинка грузится */
  background-color: var(--tint);
  background-image: url("../img/cta-fon-2400.webp");
  background-image: image-set(url("../img/cta-fon-1200.webp") 1x, url("../img/cta-fon-2400.webp") 2x);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.cta h2 { font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -0.015em; }
.md-bold { white-space: nowrap; }
/* обычное состояние (и без анимации): звёздочек нет, слово жирное.
   Разметку «**красиво**» показывает класс md-raw — его ставит и снимает site.js:
   при первом показе плашки и потом каждые 10 с, пока плашка на экране */
.md-mark {
  display: inline-block; font-family: var(--mono); font-weight: 400; color: var(--accent-text);
  max-width: 0; opacity: 0; overflow: hidden; vertical-align: bottom;
  transition: opacity .3s ease, max-width .5s var(--ease-out) .15s;   /* к жирному: звёздочки гаснут, потом сходятся */
}
.md-word { display: inline-grid; }
.md-word > span { grid-area: 1 / 1; transition: opacity .45s ease .1s; }
.md-word .w-plain { font-weight: 400; opacity: 0; }
.cta-box.md-raw .md-mark { max-width: 1.4em; opacity: 1; transition: max-width .45s var(--ease-out), opacity .35s ease .1s; }
.cta-box.md-raw .md-word .w-plain { opacity: 1; }
.cta-box.md-raw .md-word .w-bold { opacity: 0; }
.cta-box.md-raw .md-word > span { transition: opacity .35s ease; }
/* md-break ставит site.js, если со звёздочками заголовок не влезает в прежние строки:
   слово заранее на своей строке — высота плашки при смене не меняется. md-measure — на время замера */
.cta-box.md-break .md-bold { display: block; }
/* лишняя строка съедает поля, а не растит плашку: иначе фон-картинка увеличивается и предметы
   по краям уходят за край (замер 27.09.2026 на 1024: плашка 280 → 329 px, предметов не видно) */
.cta-box.md-break { padding-top: 48px; padding-bottom: 48px; }
.cta-box.md-measure .md-mark, .cta-box.md-measure .md-word > span { transition: none !important; }

/* ---------- Подвал ---------- */
/* тёмный, в цветах тёмной темы программы (Themes\DarkTheme.xaml) — выбор Максима 27.09.2026 из 4 вариантов.
   На телефоне это единственное меню: меню шапки спрятано до 820 px */
.site-footer { background: #1A2022; color: #9FBAA8; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.3fr); gap: 40px; padding: 56px 0 44px; }
.site-footer .brand, .site-footer .brand:hover { color: #E4EDE8; }
.site-footer .brand span { font-size: 18px; }
.footer-tag { margin-top: 14px; font-size: 15px; line-height: 1.55; }
/* заголовок колонки: середина — на одной линии с «Tekstora» (отступ 6 px) */
.footer-col h2 { margin: 6px 0 12px; font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #E4EDE8; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-block; padding: 5px 0; font-size: 15px; line-height: 22px; color: #A8C0B4; text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: #E4EDE8; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 32px; border-top: 1px solid #2E3B36; font-size: 14px; line-height: 22px; }
.footer-bottom-r { display: flex; flex-shrink: 0; align-items: center; gap: 24px; white-space: nowrap; }   /* длинные реквизиты слева не сжимают «Версия 1.10.0» в две строки */
/* реквизиты продавца — обязательны: Правила продажи № 657, п. 22, и Robokassa («в подвале сайта: ИП ФИО полностью, ИНН или ОГРНИП»).
   Части не разрываются внутри — переносятся целиком */
.footer-copy { display: flex; flex-wrap: wrap; column-gap: 20px; }
.footer-copy span { white-space: nowrap; }
.site-footer .lang, .site-footer .lang a { color: #9FBAA8; }
.site-footer .lang a { display: inline-block; min-width: 24px; padding: 4px 2px; text-align: center; }   /* цель для пальца — не меньше 24 px */
.site-footer .lang a:hover { color: #E4EDE8; }
.site-footer .lang a[aria-current="page"] { color: #EE9A78; }
.site-footer :focus-visible { outline-color: #EE9A78; }   /* терракотовая рамка на тёмном — всего 3,1 : 1 */

/* ---------- Сообщение «скоро» (заглушки ссылок) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: min(92vw, 520px);
  padding: 14px 18px; border-radius: 12px; background: var(--text); color: #fff;
  font-size: 15px; line-height: 1.45; box-shadow: 0 10px 30px rgba(31, 25, 21, 0.25);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Появление при прокрутке (только если движение разрешено) ---------- */
.motion [data-reveal] { transition: opacity .7s ease, transform .7s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
.motion [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(20px); }
/* линия между шагами рисуется слева направо */
.motion .steps-line { transition: transform 1s var(--ease-out) .25s; }
.motion .steps:not(.is-in) .steps-line { transform: scaleX(0); }
.motion .steps li { transition: opacity .6s ease, transform .6s var(--ease-out); transition-delay: calc(var(--d, 0) * 280ms + .1s); }
.motion .steps:not(.is-in) li { opacity: 0; transform: translateY(14px); }
/* старая цена зачёркивается на глазах */
.motion .old-price::after { transition: transform .6s var(--ease-out) .5s; }
.motion .price-card:not(.is-in) .old-price::after { transform: scaleX(0); }

/* ---------- Планшет ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 32px; }
  .hero-grid { grid-template-columns: 400px minmax(0, 1fr); gap: 40px; }
  .hero h1 { font-size: 52px; }
  .lead { font-size: 18px; }
}
@media (max-width: 1023px) {
  .lang-header { display: none; }
  .main-nav { gap: 24px; }
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-text { align-items: center; text-align: center; }
  .lead { max-width: 560px; }
  .hero-buttons { justify-content: center; }
  .hero-meta { align-items: center; }
  .hero-visual { margin-right: 0; }
  .trust ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .section, .ba-section { padding: 72px 0; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; }
  .card { flex-direction: row; align-items: flex-start; gap: 20px; padding: 28px; }
  .card-body { display: flex; flex-direction: column; gap: 8px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prices { padding: 80px 0; }
  .price-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; gap: 32px; }
  .faq { padding: 80px 0 72px; }
  .cta { padding: 8px 0 80px; }
  .cta-box { padding: 56px 40px; }
  .cta-box.md-break { padding-top: 32px; padding-bottom: 32px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 28px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .np-text { font-size: 14px; padding: 18px 20px; }
}
@media (max-width: 820px) {
  .main-nav { display: none; }
}

/* ---------- Телефон ---------- */
@media (max-width: 640px) {
  :root { --gutter: 20px; --header-h: 64px; }
  .brand span { font-size: 18px; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 38px; }
  .lead { font-size: 17px; }
  .hero-buttons { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-buttons .btn { width: 100%; }
  .trust ul { grid-template-columns: minmax(0, 1fr); padding: 20px 0; gap: 14px; }
  .section, .ba-section { padding: 56px 0; }
  .ba-head h2 { font-size: 28px; }
  .ba-head p { font-size: 16px; }
  .ba-head { margin-bottom: 28px; }
  /* сравнение на телефоне: две карточки одна под другой, без шторки */
  .ba-stage { display: flex; flex-direction: column; gap: 14px; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; touch-action: auto; }
  .ba.is-ready .ba-stage { cursor: auto; }
  .ba-pane { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
  .ba-after { clip-path: none; }
  .ba-handle, .ba-range, .ba-hint { display: none !important; }
  .win-bar, .win-ctrls { height: 32px; }
  .win-ctrls span { width: 30px; }
  .np-tab { height: 26px; font-size: 11px; }
  .np-text { font-size: 12px; padding: 14px 14px 52px; }
  .tk { height: 300px; flex: none; }
  .tk picture { position: absolute; inset: 0; }
  .tk img { position: absolute; top: 0; left: 0; width: auto; height: 100%; max-width: none; transform: translateX(-35.5%); }
  .ba-label { bottom: 10px; font-size: 12px; padding: 6px 10px; }
  .ba-before .ba-label { left: 10px; }
  .ba-after .ba-label { right: 10px; }
  .theme-switch button { padding: 0 14px; gap: 6px; font-size: 13px; }
  .card { flex-direction: column; gap: 14px; padding: 24px; }
  .card h3 { font-size: 20px; }
  .steps-line { top: 24px; bottom: 24px; left: 23px; right: auto; width: 2px; height: auto; transform-origin: center top; }
  .motion .steps:not(.is-in) .steps-line { transform: scaleY(0); }
  .steps ol { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps li { flex-direction: row; text-align: left; gap: 18px; }
  .step-text { font-size: 18px; max-width: none; }
  .step-num { flex-shrink: 0; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tile { padding: 18px 20px; font-size: 16px; }
  .tile .icon { width: 28px; height: 28px; }
  .section-title { font-size: 32px; }
  .prices { padding: 64px 0; }
  .prices .section-title { margin-bottom: 40px; }
  .price-card { padding: 32px 24px 24px; }
  .price { font-size: 46px; }
  .price-note { margin-top: 40px; }
  .faq { padding: 64px 0 56px; }
  .faq .section-title { margin-bottom: 28px; }
  .faq-q { font-size: 17px; padding: 18px 0; gap: 16px; }
  .faq-a p { padding-right: 0; }
  .cta { padding: 0 0 64px; }
  .cta-box { padding: 44px 20px; gap: 24px; }
  .cta-box.md-break { padding-top: 44px; padding-bottom: 44px; }   /* на телефоне предметов фона и так не видно — поля как были */
  .cta h2 { font-size: 30px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding: 40px 0 28px; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-copy { flex-direction: column; }
}
@media (max-width: 400px) {
  .btn-sm .long { display: none; }
  .hero h1 { font-size: 34px; }
}

/* ---------- Без движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}
@media print {
  .site-header { position: static; }
  .motion [data-reveal], .motion .steps li { opacity: 1 !important; transform: none !important; }
  .theme-switch, .ba-hint, .toast { display: none !important; }
  /* тёмный фон подвала не печатается — текст тёмный, иначе светлые буквы на белой бумаге */
  .site-footer { background: none; }
  .site-footer, .site-footer .brand, .site-footer h2, .site-footer a { color: var(--text) !important; }
  .footer-bottom { border-top-color: var(--border); }
}
