/* ==========================================================================
   V-VPN — base.css
   Общие шрифты, токены, сброс, типографика, шапка, подвал и компоненты
   подстраниц (документы, устройства, 404). Стили главной — в home.css.

   Контракты (SPEC §5):
   - Тема блока: .theme-light / .theme-dark переключают семантические
     переменные (--fg, --fg-muted, --link, --btn-bg, --line …).
     Шапка следует html[data-sky="light" | "dark"].
   - Кнопки: a.btn.btn--primary | a.btn.btn--ghost (+ .btn--lg).
   - Шапка фиксированная, высота — var(--header-h). Подстраницы сами
     отступают от неё (.page-hero, .doc, .not-found).
   - Прямые потомки article.device-page (.page-hero, .page-section,
     .page-cta, .related-devices) сами выравниваются по сетке 1240px,
     .container внутри них не нужен (и нейтрализуется).
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Шрифты
   Tektur — заголовки, цифры, логотип. Onest — текст и интерфейс.
   latin-ext подключается только ради знака рубля (U+20BD), поэтому файлы
   *-latin-ext.woff2 — сабсеты из одного глифа «₽» (~1 КБ; оси сохранены:
   Onest wght, Tektur wdth+wght). Полные исходники — tools/src-fonts/*.orig.woff2,
   пересборка (fonttools + brotli), всегда из .orig, не на месте:
     pyftsubset tools/src-fonts/onest-latin-ext.orig.woff2 --unicodes=U+20BD \
       --layout-features='*' --flavor=woff2 \
       --output-file=static/assets/fonts/onest-latin-ext.woff2
   (то же для tektur-latin-ext).
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Tektur";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/assets/fonts/tektur-cyrillic.woff2?v=e1ce3c471c") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Tektur";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/assets/fonts/tektur-latin.woff2?v=19d3beb395") 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;
}

@font-face {
  font-family: "Tektur";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/assets/fonts/tektur-latin-ext.woff2?v=a954e59395") format("woff2");
  unicode-range: U+20BD;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic.woff2?v=68e5e01d62") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/onest-latin.woff2?v=052df74533") 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;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-ext.woff2?v=c196b047c3") format("woff2");
  unicode-range: U+20BD;
}

/* Метрически подогнанные запасные шрифты: пока грузятся woff2, текст
   занимает почти то же место (меньше сдвигов макета). Коэффициенты
   посчитаны по ширине русского текста относительно Arial / Arial Bold. */
@font-face {
  font-family: "Onest Fallback";
  font-style: normal;
  font-weight: 100 550;
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Roboto"), local("Roboto-Regular"), local("Liberation Sans"), local("Arimo");
  size-adjust: 102.4%;
  ascent-override: 94.7%;
  descent-override: 29.8%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Onest Fallback";
  font-style: normal;
  font-weight: 551 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Liberation Sans Bold"), local("Arimo Bold");
  size-adjust: 98.3%;
  ascent-override: 98.7%;
  descent-override: 31%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Tektur Fallback";
  font-style: normal;
  font-weight: 100 550;
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Roboto"), local("Roboto-Regular"), local("Liberation Sans"), local("Arimo");
  size-adjust: 108.2%;
  ascent-override: 92.4%;
  descent-override: 27.7%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Tektur Fallback";
  font-style: normal;
  font-weight: 551 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Liberation Sans Bold"), local("Arimo Bold");
  size-adjust: 101.7%;
  ascent-override: 98.3%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}


/* --------------------------------------------------------------------------
   2. Токены
   -------------------------------------------------------------------------- */

:root {
  /* Палитра «Подъём» (SPEC §2.1) */
  --c-haze: #EAF6FB;         /* Дымка — у земли, фон подстраниц */
  --c-sky: #8ACBE8;          /* Небо */
  --c-brand: #1B9AC7;        /* Лазурь — логотип, акценты (не для мелкого текста) */
  --c-deep: #0B4F7D;         /* Глубина — заголовки на светлом */
  --c-strato: #0A2143;       /* Высота */
  --c-space: #030916;        /* Орбита — космос, подвал */
  --c-glow: #8BE6FF;         /* Сияние — подсветка на тёмном */
  --c-ink: #062238;          /* Чернила — текст на светлом */
  --c-ink-muted: #3E6178;
  --c-paper: #E8F4FA;        /* текст на тёмном */
  --c-paper-muted: #9DB9CC;
  --c-btn: #0F77A0;
  --c-btn-hover: #0B6A90;
  --c-btn-dark: #2EC5FC;
  --c-btn-dark-hover: #6AD6FD;
  --c-btn-dark-fg: #031020;
  --c-link-light: #0F77A0;
  --c-link-dark: #7FD8F7;

  /* Промежуточные цвета неба (стыки секций главной, SPEC §3) */
  --c-ground: #BFE5F5;       /* 0 км, верх героя */
  --c-strato-low: #0A3563;   /* низ стратосферы */
  --c-karman: #06142F;       /* линия Кармана */
  --c-exo: #040C20;          /* экзосфера */

  /* Шрифты */
  --font-display: "Tektur", "Tektur Fallback", "Arial Narrow", Arial, sans-serif;
  --font-body: "Onest", "Onest Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Шкала (база 17px) */
  --fs-h1-home: clamp(2.75rem, 1.1rem + 6vw, 6.25rem);
  --fs-h1: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem);
  --fs-h1-doc: clamp(1.75rem, 0.9rem + 3.4vw, 3.5rem);   /* длинные названия документов */
  --fs-h2: clamp(2rem, 1.1rem + 3vw, 3.75rem);
  --fs-h2-sub: clamp(1.75rem, 1.15rem + 2vw, 2.75rem);   /* H2 на подстраницах, ниже H1 */
  --fs-h2-doc: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  --fs-h3: clamp(1.375rem, 1.3rem + 0.25vw, 1.5rem);
  --fs-lead: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-price: clamp(2.25rem, 1.5rem + 2vw, 3.25rem);

  --lh-h1-home: 0.95;
  --lh-h1: 1;
  --lh-h2: 1.02;
  --lh-h3: 1.15;
  --lh-lead: 1.5;
  --lh-body: 1.6;
  --lh-small: 1.45;

  /* ≤ 70 знаков: у Onest 1ch = ширина «0» (0.665em), средняя русская буква ≈ 0.56em,
     поэтому 68ch дали бы ≈ 80 знаков; 60ch ≈ 70 знаков в строке */
  --measure: 60ch;

  /* Отступы — кратны 4px */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-48: 48px;
  --sp-64: 64px;
  --sp-96: 96px;
  --sp-128: 128px;
  --sp-192: 192px;
  --section-y: clamp(64px, 9vw, 128px);

  /* Радиусы по иерархии */
  --r-tag: 6px;
  --r-btn: 10px;
  --r-panel: 22px;

  /* Сетка */
  --container: 1240px;
  /* поля не заходят под вырез/скругления экрана в ландшафте (viewport-fit=cover) */
  --gutter: max(clamp(20px, 5vw, 64px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --bleed: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  --header-h: 64px;
  --altimeter-w: 112px;

  /* Движение */
  --ease-out: cubic-bezier(0.22, 0.8, 0.26, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.18s;
  --dur: 0.32s;
  --dur-slow: 0.5s;

  /* Свечения — только на тёмном и дозированно */
  --glow-soft: 0 0 0 1px rgba(139, 230, 255, 0.14), 0 16px 48px -20px rgba(139, 230, 255, 0.35);
  --glow-line: rgba(139, 230, 255, 0.28);

  /* Облака для подстраниц: слои эллипсов, низом уходят в дымку */
  --cloud-h: clamp(96px, 15vw, 196px);
  --clouds-back:
    radial-gradient(calc(var(--cloud-h) * 0.7) calc(var(--cloud-h) * 0.5) at 9% 86%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.5) calc(var(--cloud-h) * 0.4) at 19% 80%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.75) calc(var(--cloud-h) * 0.55) at 35% 88%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.45) calc(var(--cloud-h) * 0.36) at 47% 79%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.7) calc(var(--cloud-h) * 0.5) at 58% 86%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.5) calc(var(--cloud-h) * 0.4) at 70% 80%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.55) calc(var(--cloud-h) * 0.42) at 79% 84%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.7) calc(var(--cloud-h) * 0.52) at 91% 88%, rgba(255, 255, 255, 0.95) 0 62%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(to top, rgba(246, 251, 253, 0.85) 0 18%, rgba(246, 251, 253, 0) 52%);
  --clouds-front:
    radial-gradient(calc(var(--cloud-h) * 0.95) calc(var(--cloud-h) * 0.62) at 4% 100%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.55) calc(var(--cloud-h) * 0.42) at 13% 78%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.8) calc(var(--cloud-h) * 0.55) at 22% 96%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.5) calc(var(--cloud-h) * 0.4) at 31% 80%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 1.0) calc(var(--cloud-h) * 0.66) at 42% 100%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.45) calc(var(--cloud-h) * 0.36) at 52% 82%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.85) calc(var(--cloud-h) * 0.58) at 61% 98%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.55) calc(var(--cloud-h) * 0.44) at 71% 78%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.9) calc(var(--cloud-h) * 0.6) at 81% 100%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.5) calc(var(--cloud-h) * 0.38) at 90% 82%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    radial-gradient(calc(var(--cloud-h) * 0.9) calc(var(--cloud-h) * 0.6) at 99% 98%, #EAF6FB 0 62%, rgba(234, 246, 251, 0) 72%),
    linear-gradient(to top, #EAF6FB 0 26%, rgba(234, 246, 251, 0) 44%);
}

@media (min-width: 60em) {
  :root {
    --header-h: 72px;
  }
}


/* --------------------------------------------------------------------------
   3. Темы (семантические переменные)
   -------------------------------------------------------------------------- */

:root,
.theme-light,
.site-header {
  --fg: var(--c-ink);
  --fg-muted: var(--c-ink-muted);
  --fg-strong: var(--c-ink);
  --fg-heading: var(--c-deep);
  --accent: #0F77A0;                       /* акцент для текста/цифр, ≥ 4.5:1 на дымке */
  --mark: var(--c-brand);
  --link: var(--c-link-light);
  --link-hover: var(--c-deep);
  --btn-bg: var(--c-btn);
  --btn-fg: #FFFFFF;
  --btn-hover: var(--c-btn-hover);
  --btn-glow: 0 0 0 0 rgba(0, 0, 0, 0);
  --ghost-fg: var(--c-ink);
  --ghost-line: rgba(6, 34, 56, 0.3);
  --ghost-hover-bg: rgba(15, 119, 160, 0.08);
  --ghost-hover-line: rgba(6, 34, 56, 0.55);
  --line: rgba(6, 34, 56, 0.14);
  --line-strong: rgba(6, 34, 56, 0.3);
  --surface: rgba(255, 255, 255, 0.62);
  --focus: var(--c-deep);
}

.theme-dark,
.site-footer,
.page-cta,
html[data-sky="dark"] .site-header {
  --fg: var(--c-paper);
  --fg-muted: var(--c-paper-muted);
  --fg-strong: #F5FBFE;
  --fg-heading: var(--c-paper);
  --accent: var(--c-glow);
  --mark: var(--c-brand);
  --link: var(--c-link-dark);
  --link-hover: #BDEEFF;
  --btn-bg: var(--c-btn-dark);
  --btn-fg: var(--c-btn-dark-fg);
  --btn-hover: var(--c-btn-dark-hover);
  --btn-glow: 0 10px 32px -12px rgba(46, 197, 252, 0.65);
  --ghost-fg: var(--c-paper);
  --ghost-line: rgba(232, 244, 250, 0.34);
  --ghost-hover-bg: rgba(139, 230, 255, 0.1);
  --ghost-hover-line: rgba(139, 230, 255, 0.62);
  --line: rgba(157, 185, 204, 0.2);
  --line-strong: rgba(157, 185, 204, 0.42);
  --surface: rgba(139, 230, 255, 0.06);
  --focus: var(--c-glow);
}

.theme-light {
  color: var(--fg);
  color-scheme: light;
}

.theme-dark {
  color: var(--fg);
  color-scheme: dark;
}


/* --------------------------------------------------------------------------
   4. Сброс и база
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
  background-color: var(--c-haze);
  /* фокус и якоря не уходят под фиксированную шапку (WCAG 2.4.11) */
  scroll-padding-top: calc(var(--header-h) + 16px);
  scroll-padding-bottom: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--fg);
  background-color: var(--c-haze);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(27, 154, 199, 0.18);
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

svg {
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

p,
li,
dd,
dt,
figcaption,
blockquote,
td,
th {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--fg-heading);
  overflow-wrap: break-word;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 650;
  letter-spacing: -0.005em;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

h4,
h5,
h6 {
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

table {
  border-collapse: collapse;
}

::selection {
  background-color: var(--c-glow);
  color: var(--c-ink);
}

/* Фокус: 2px кольцо — глубина на светлом, сияние на тёмном */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Якоря не прячутся под фиксированной шапкой: основной отступ задаёт
   scroll-padding-top у html (шапка + 16px), здесь — только поправки,
   чтобы итоговые позиции остались прежними (секции — вровень с шапкой,
   заголовки и пункты — шапка + 32px). */
section[id] {
  scroll-margin-top: -16px;
}

h2[id],
h3[id],
.faq__item[id],
.doc__section[id] {
  scroll-margin-top: 16px;
}


/* --------------------------------------------------------------------------
   5. Служебное: пропуск навигации, скрытый текст, контейнер
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-btn);
  background-color: var(--c-btn);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transform: translateY(calc(-100% - 16px));
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: #FFFFFF;
  outline: 2px solid var(--c-deep);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nowrap {
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


/* --------------------------------------------------------------------------
   6. Кнопки
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    box-shadow var(--dur) ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background-color: var(--btn-bg);
  color: var(--btn-fg);
}

.btn--primary:hover {
  background-color: var(--btn-hover);
  color: var(--btn-fg);
  box-shadow: var(--btn-glow);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--ghost-line);
  color: var(--ghost-fg);
}

.btn--ghost:hover {
  background-color: var(--ghost-hover-bg);
  border-color: var(--ghost-hover-line);
  color: var(--ghost-fg);
}

.btn:active {
  transform: translateY(1px);
}

.btn--lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 1.0625rem;
}


/* --------------------------------------------------------------------------
   7. Шапка
   -------------------------------------------------------------------------- */

.site-header {
  --hdr-bg: rgba(234, 246, 251, 0.86);
  --hdr-solid: #EAF6FB;
  --hdr-line: rgba(6, 34, 56, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: var(--fg);
  background-color: rgba(234, 246, 251, 0);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur-slow) var(--ease-out),
    border-color var(--dur-slow) var(--ease-out),
    color var(--dur-slow) var(--ease-out);
}

html[data-sky="dark"] .site-header {
  --hdr-bg: rgba(3, 9, 22, 0.78);
  --hdr-solid: #040C20;
  --hdr-line: rgba(139, 230, 255, 0.12);
}

.site-header.is-scrolled {
  background-color: var(--hdr-bg);
  border-bottom-color: var(--hdr-line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-scrolled {
    background-color: var(--hdr-solid);
  }
}

.site-header.is-open {
  background-color: var(--hdr-solid);
  border-bottom-color: var(--hdr-line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: max(var(--container), 77.5rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--fg-strong);
  text-decoration: none;
  border-radius: var(--r-tag);
  flex: none;
}

.site-header__logo:hover {
  color: var(--fg-strong);
}

.site-header__mark {
  display: block;
  width: 31px;
  height: auto;
  fill: var(--mark);
  transition: fill var(--dur-slow) var(--ease-out);
}

.site-header__wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

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

.site-header__link,
.site-header__cabinet {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--dur-slow) var(--ease-out);
}

/* Бургер (мобильные) */
.site-header__burger {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: var(--r-btn);
  background: none;
  color: var(--fg-strong);
  transition: color var(--dur-slow) var(--ease-out);
}

.site-header__burger-lines {
  position: relative;
  display: block;
  width: 22px;
  height: 12px;
}

.site-header__burger-lines::before,
.site-header__burger-lines::after {
  content: "";
  position: absolute;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition:
    transform var(--dur) var(--ease-out),
    width var(--dur) var(--ease-out),
    top var(--dur) var(--ease-out);
}

.site-header__burger-lines::before {
  top: 1px;
  width: 22px;
}

.site-header__burger-lines::after {
  top: 9px;
  width: 14px;
}

.site-header__burger[aria-expanded="true"] .site-header__burger-lines::before {
  top: 5px;
  transform: rotate(45deg);
}

.site-header__burger[aria-expanded="true"] .site-header__burger-lines::after {
  top: 5px;
  width: 22px;
  transform: rotate(-45deg);
}

@media (max-width: 59.999em) {
  .site-header__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    padding: 4px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--hdr-solid);
    border-bottom: 1px solid var(--hdr-line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 0.22s ease,
      transform 0.22s var(--ease-out),
      visibility 0s linear 0.22s;
  }

  .site-header.is-open .site-header__panel {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .site-header__link {
    display: flex;
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--fg-strong);
  }

  .site-header__link:hover {
    color: var(--accent);
  }

  .site-header__actions {
    display: grid;
    gap: 12px;
  }

  .site-header__cabinet {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 20px;
    border: 1px solid var(--ghost-line);
    border-radius: var(--r-btn);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ghost-fg);
  }

  .site-header__cabinet:hover {
    background-color: var(--ghost-hover-bg);
    border-color: var(--ghost-hover-line);
    color: var(--ghost-fg);
  }

  .site-header__cta {
    min-height: 52px;
    padding: 14px 20px;
    font-size: 1.0625rem;
  }

  .site-header__backdrop {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background-color: rgba(3, 9, 22, 0.42);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.22s ease, visibility 0s linear 0.22s;
  }

  .site-header.is-open .site-header__backdrop {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
  }

  html.is-menu-open,
  html.is-menu-open body {
    overflow: hidden;
  }
}

@media (min-width: 60em) {
  .site-header__burger,
  .site-header__backdrop {
    display: none;
  }

  .site-header__logo {
    margin-right: 0;
  }

  .site-header__panel {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 6px;
  }

  .site-header__list {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .site-header__link,
  .site-header__cabinet {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding-inline: 2px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration-thickness: 1px;
    text-underline-offset: 7px;
  }

  .site-header__cabinet {
    color: var(--fg-strong);
  }

  .site-header__link:hover,
  .site-header__cabinet:hover {
    color: var(--fg-strong);
    text-decoration-line: underline;
    text-decoration-color: var(--line-strong);
  }

  .site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-left: 12px;
  }

  .site-header__cta {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.875rem;
    white-space: nowrap;
  }
}

/* самый узкий «десктоп»: чуть мельче навигация, чтобы остался запас */
@media (min-width: 60em) and (max-width: 66.249em) {
  .site-header__link {
    font-size: 0.8125rem;
  }
}

@media (min-width: 75em) {
  .site-header__panel {
    margin-left: 32px;
  }

  .site-header__list {
    gap: 24px;
  }

  .site-header__link,
  .site-header__cabinet {
    font-size: 0.9375rem;
  }

  .site-header__actions {
    gap: 20px;
    padding-left: 16px;
  }

  .site-header__cta {
    padding: 8px 18px;
    font-size: 0.9375rem;
  }
}


/* --------------------------------------------------------------------------
   8. Подвал
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  background-color: var(--c-space);
  color: var(--fg);
  color-scheme: dark;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* граница — тонкая светящаяся линия, как горизонт на орбите */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 230, 255, 0), var(--glow-line) 50%, rgba(139, 230, 255, 0));
}

.site-footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-footer__top {
  display: grid;
  gap: 48px;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--fg-strong);
  text-decoration: none;
  border-radius: var(--r-tag);
}

.site-footer__logo:hover {
  color: var(--fg-strong);
}

.site-footer__mark {
  display: block;
  width: 38px;
  height: auto;
  fill: var(--mark);
}

.site-footer__wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1;
  letter-spacing: 0.01em;
}

.site-footer__tagline {
  margin-top: 16px;
  max-width: 40ch;
  color: var(--fg-muted);
}

.site-footer__pay {
  margin-top: 12px;
  max-width: 40ch;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 24px;
}

.site-footer__title {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg-strong);
}

.site-footer__list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__list a {
  display: inline-block;
  padding-block: 5px;
  color: var(--fg-muted);
  text-decoration: none;
}

.site-footer__list a:hover {
  color: var(--fg-strong);
  text-decoration-line: underline;
  text-decoration-color: var(--line-strong);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

@media (max-width: 559.98px) {
  .site-footer__col--wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 800px) {
  .site-footer__nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .site-footer__top {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
    gap: 64px;
  }
}


/* --------------------------------------------------------------------------
   9. Общие компоненты
   -------------------------------------------------------------------------- */

/* Хлебные крошки */
.breadcrumbs {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.95em;
  margin-inline: 10px;
  background-color: currentColor;
  opacity: 0.5;
  transform: rotate(22deg);
}

.breadcrumbs a {
  display: inline-block;
  padding-block: 4px;
  color: inherit;
  text-decoration-color: var(--line-strong);
}

.breadcrumbs a:hover {
  color: var(--fg-strong);
  text-decoration-color: currentColor;
}

.breadcrumbs [aria-current="page"] {
  color: var(--fg);
}

/* FAQ: div.faq > details.faq__item > summary.faq__q + div.faq__a */
.faq {
  border-top: 1px solid var(--line);
}

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

/* block, а не flex: site.js оборачивает «V-VPN» в span.nowrap, и во flex-контейнере
   куски текста стали бы отдельными колонками. Иконка — абсолютная, место под неё
   резервирует padding-right. */
.faq__q {
  position: relative;
  display: block;
  padding: 20px 56px 20px 0;
  list-style: none;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg-strong);
  cursor: pointer;
  border-radius: var(--r-tag);
  -webkit-tap-highlight-color: transparent;
}

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

.faq__q::marker {
  content: "";
}

/* плюс/минус: две линии в кольце; при открытии вертикальная схлопывается */
.faq__q::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background:
    linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
  transition:
    background-size var(--dur) var(--ease-out),
    border-color var(--dur-fast) ease,
    transform var(--dur) var(--ease-out);
}

.faq__q:hover::after {
  border-color: currentColor;
}

.faq__item[open] > .faq__q::after {
  background-size: 12px 2px, 2px 0;
  transform: rotate(180deg);
}

.faq__a {
  padding: 0 56px 24px 0;
  color: var(--fg);
}

.faq__a > * + * {
  margin-top: 12px;
}

.faq__a p,
.faq__a li {
  max-width: var(--measure);
}

@media (max-width: 559.98px) {
  .faq__a {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .faq__item[open] > .faq__a {
    animation: faq-reveal var(--dur) var(--ease-out) both;
  }

  @supports selector(::details-content) {
    .faq__item {
      interpolate-size: allow-keywords;
    }

    .faq__item::details-content {
      height: 0;
      overflow: clip;
      transition:
        height var(--dur) var(--ease-out),
        content-visibility var(--dur) allow-discrete;
    }

    .faq__item[open]::details-content {
      height: auto;
    }
  }
}

@keyframes faq-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Таблицы */
.table-wrap {
  max-width: 100%;
  margin-block: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.table-wrap > .table:not(.requisites) {
  min-width: 36rem;
}

.table caption {
  padding-bottom: 12px;
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--fg-strong);
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.table th:first-child,
.table td:first-child {
  padding-left: 0;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table thead th {
  padding-top: 0;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: var(--lh-small);
  color: var(--fg-muted);
  border-bottom-color: var(--line-strong);
  vertical-align: bottom;
}

.table tbody th {
  font-weight: 600;
  color: var(--fg-strong);
}

/* Выноска / примечание */
.callout,
.doc__note {
  margin-block: 32px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background-color: var(--surface);
  color: var(--fg);
}

.callout > * + *,
.doc__note > * + * {
  margin-top: 12px;
}

.callout h2,
.callout h3,
.doc__note h2,
.doc__note h3 {
  font-size: 1.125rem;
  line-height: 1.3;
}

@media (min-width: 720px) {
  .callout,
  .doc__note {
    padding: 24px 32px;
  }
}

/* Иллюстрации-схемы на страницах устройств */
.device-figure {
  margin-block: 40px;
}

.device-figure__img {
  display: block;
  max-width: 100%;
  height: auto;
}


/* --------------------------------------------------------------------------
   10. Документы: .page-doc
   -------------------------------------------------------------------------- */

.page-doc {
  background-color: var(--c-haze);
  background-image:
    radial-gradient(64rem 34rem at 92% -12rem, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #C6E8F6 0, #DCF0F9 20rem, var(--c-haze) 42rem);
  background-repeat: no-repeat;
}

.doc {
  max-width: var(--container);
  margin-inline: auto;
  padding: calc(var(--header-h) + clamp(28px, 5vw, 64px)) var(--gutter) var(--section-y);
}

.container .doc,
.container > .doc {
  padding-inline: 0;
}

.doc__head {
  --link: #0B5F86;
  max-width: 60rem;
  padding-bottom: clamp(32px, 5vw, 56px);
  margin-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.doc__head .breadcrumbs {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.doc__title {
  font-size: var(--fs-h1-doc);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-heading);
}

.doc__meta {
  margin-top: 16px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

.doc__lead {
  margin-top: 16px;
  max-width: 60ch;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--fg);
}

.doc__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

/* Оглавление */
.doc__toc {
  align-self: start;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background-color: var(--surface);
}

.doc__toc-title {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg-strong);
}

.doc__toc ol,
.doc__toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.doc__toc a {
  position: relative;
  display: block;
  padding: 6px 0 6px 16px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

/* метка текущего раздела на шкале оглавления */
.doc__toc a::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -1px;
  width: 2px;
  border-radius: 2px;
  background-color: transparent;
  transition: background-color var(--dur-fast) ease;
}

.doc__toc a:hover {
  color: var(--fg-strong);
}

.doc__toc a[aria-current="true"] {
  color: var(--c-deep);
}

.doc__toc a[aria-current="true"]::before {
  background-color: var(--accent);
}

/* Кнопка сворачивания (добавляет site.js, только на узких экранах) */
.doc__toc-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  color: var(--fg-strong);
  border-radius: var(--r-tag);
}

.doc__toc-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background:
    linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat;
  transition: background-size var(--dur) var(--ease-out);
}

.doc__toc.is-open .doc__toc-icon {
  background-size: 10px 2px, 2px 0;
}

@media (max-width: 1023.98px) {
  .doc__toc.is-enhanced {
    padding-block: 6px;
  }

  .doc__toc.is-enhanced .doc__toc-title {
    display: none;
  }

  .doc__toc.is-enhanced .doc__toc-toggle {
    display: flex;
  }

  .doc__toc.is-enhanced:not(.is-open) > ol,
  .doc__toc.is-enhanced:not(.is-open) > ul {
    display: none;
  }

  .doc__toc.is-enhanced.is-open > ol,
  .doc__toc.is-enhanced.is-open > ul {
    margin: 4px 0 12px;
  }
}

@media (min-width: 1024px) {
  .doc__body {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    column-gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }

  .doc__toc {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    max-height: calc(100vh - var(--header-h) - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 8px 0 0;
    border: 0;
    border-radius: 0;
    background: none;
    scrollbar-width: thin;
  }

  .doc__toc a {
    font-size: 0.875rem;
  }

  .doc__toc a:focus-visible {
    outline-offset: -2px;
  }
}

/* Длинный текст */
.prose {
  max-width: var(--measure);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  overflow-wrap: break-word;
}

.prose > * + *,
.prose .doc__section > * + * {
  margin-top: 16px;
}

.prose h2 {
  font-size: var(--fs-h2-doc);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--fg-heading);
}

.prose h3 {
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--fg-strong);
}

.prose * + h2 {
  margin-top: 56px;
}

.prose * + h3 {
  margin-top: 32px;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 16px;
}

.prose h2 + * {
  margin-top: 20px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 8px;
}

.prose li > ul,
.prose li > ol {
  margin-top: 8px;
}

.prose ul > li::marker {
  color: var(--accent);
}

.prose ol > li::marker {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.prose a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.prose a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

.prose strong {
  color: var(--fg-strong);
}

.doc__content {
  min-width: 0;
}

.doc__section + .doc__section {
  margin-top: clamp(48px, 6vw, 72px);
}

.doc__section > h2:first-child {
  margin-top: 0;
}

.doc__content > .doc__note {
  margin-top: clamp(48px, 6vw, 72px);
}

/* Пункты договора: номер вынесен на поле */
.clause {
  position: relative;
}

.clause__num {
  font-family: var(--font-display);
  font-size: 0.875em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
  white-space: nowrap;
}

@media (max-width: 559.98px) {
  .clause__num {
    margin-right: 0.2em;
  }
}

@media (min-width: 560px) {
  .clause {
    padding-left: 3.5rem;
  }

  .clause__num {
    position: absolute;
    top: 0;
    left: 0;
    line-height: calc(var(--lh-body) * 1em / 0.875);
  }

  /* списки внутри пункта выравниваются по тексту пункта */
  .prose .clause ~ ul,
  .prose .clause ~ ol {
    padding-left: calc(3.5rem + 1.4em);
  }
}

/* Реквизиты */
.requisites {
  max-width: 44rem;
}

.requisites th,
.requisites td {
  padding-block: 12px;
}

.requisites tbody th,
.requisites tr > :first-child {
  width: 36%;
  padding-right: 24px;
  font-weight: 500;
  color: var(--fg-muted);
}

.requisites td {
  color: var(--fg-strong);
  font-variant-numeric: normal;
  overflow-wrap: anywhere;
}

.requisites tr:first-child > * {
  border-top: 1px solid var(--line);
}

@media (max-width: 559.98px) {
  .requisites,
  .requisites tbody,
  .requisites tr,
  .requisites th,
  .requisites td {
    display: block;
    width: auto;
  }

  .requisites tr {
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
  }

  .requisites tr:first-child {
    border-top: 1px solid var(--line);
  }

  .requisites th,
  .requisites td,
  .requisites tr:first-child > * {
    padding: 0;
    border: 0;
  }

  .requisites tbody th,
  .requisites tr > :first-child {
    width: auto;
    padding: 0 0 2px;
    font-size: var(--fs-small);
  }
}


/* --------------------------------------------------------------------------
   11. Страницы устройств: .page-device
   -------------------------------------------------------------------------- */

/* Герой: светлое небо, солнечный свет справа, облака снизу */
.page-hero {
  --link: #0B5F86;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(28px, 6vw, 80px));
  padding-bottom: calc(var(--cloud-h) + clamp(16px, 3vw, 40px));
  padding-inline: var(--bleed);
  background-color: var(--c-ground);
  background-image:
    radial-gradient(60rem 32rem at 90% -10rem, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--c-ground) 0%, #C8E8F6 100%);
}

.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -1px;
  z-index: -1;
  pointer-events: none;
}

.page-hero::before {
  height: calc(var(--cloud-h) * 1.35);
  background: var(--clouds-back);
  opacity: 0.9;
}

.page-hero::after {
  height: var(--cloud-h);
  background: var(--clouds-front);
}

.page-hero > .container {
  max-width: none;
  padding-inline: 0;
}

/* Широкий экран: знак V справа «утопает» в облаках (слой фона под облаками) */
@media (min-width: 1200px) {
  .page-hero {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='72 127 523 444'%3E%3Cg fill='%231B9AC7' transform='rotate(-6 333 349)'%3E%3Cpath d='M175 163 L285 163 L234 262 A67 67 0 1 1 175 163 Z'/%3E%3Cpath d='M446 163 L559 163 L366 500 A63 63 0 0 1 256 504 Q212 439 186 374 C197 384 218 393 246 399.5 C262 396 278 389 290 373 L394.5 193 A60 60 0 0 1 446 163 Z'/%3E%3C/g%3E%3C/svg%3E"),
      radial-gradient(60rem 32rem at 90% -10rem, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 70%),
      linear-gradient(180deg, var(--c-ground) 0%, #C8E8F6 100%);
    background-repeat: no-repeat;
    background-size: clamp(240px, 22vw, 340px) auto, auto, auto;
    background-position:
      right max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))) bottom calc(var(--cloud-h) * 0.12),
      0 0,
      0 0;
  }
}

.page-hero .breadcrumbs {
  margin-bottom: clamp(24px, 4vw, 44px);
}

.page-hero__title {
  max-width: 16ch;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-heading);
}

.page-hero__lead {
  max-width: 58ch;
  margin-top: clamp(16px, 2.4vw, 28px);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--fg);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 36px);
}

.page-hero__note {
  max-width: 62ch;
  margin-top: 16px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

@media (max-width: 479.98px) {
  .page-hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* Секции страницы: ровный ритм, волосяная линия между ними */
.device-page > .page-section,
.device-page > .related-devices {
  width: min(100% - 2 * var(--gutter), var(--container) - 2 * var(--gutter));
  margin-inline: auto;
}

.page-section {
  padding-block: clamp(48px, 7vw, 96px);
}

.page-section + .page-section {
  border-top: 1px solid var(--line);
}

.page-section > .container {
  max-width: none;
  padding-inline: 0;
}

.page-section > h2 {
  font-size: var(--fs-h2-sub);
  line-height: 1.06;
  font-weight: 650;
}

.page-section > * + * {
  margin-top: 20px;
}

.page-section > h2 + * {
  margin-top: 24px;
}

.page-section > * + h3 {
  margin-top: 40px;
}

.page-section > h3 + * {
  margin-top: 12px;
}

.page-section > p,
.page-section > ul:not([class]),
.page-section > ol:not([class]) {
  max-width: var(--measure);
}

.page-section > * + .steps-list,
.page-section > * + .facts-list,
.page-section > * + .faq {
  margin-top: 40px;
}

.page-section > h2 + .steps-list,
.page-section > h2 + .facts-list,
.page-section > h2 + .faq {
  margin-top: 32px;
}

/* Выноски и иллюстрации в секции: отступ только сверху (нижний margin
   не схлопывается с padding секции и в гриде — давал лишние 32–40px) */
.page-section > :is(.callout, .device-figure) {
  margin-bottom: 0;
}

.page-section > * + .callout {
  margin-top: 32px;
}

.page-section > * + .device-figure {
  margin-top: 40px;
}

.page-section > :last-child {
  margin-bottom: 0;
}

.page-section > ul:not([class]),
.page-section > ol:not([class]) {
  padding-left: 1.4em;
}

.page-section > ul:not([class]) > li + li,
.page-section > ol:not([class]) > li + li {
  margin-top: 8px;
}

.page-section > ul:not([class]) > li::marker {
  color: var(--accent);
}

/* На широком экране заголовок секции — на левом поле, контент справа */
@media (min-width: 1024px) {
  .page-section:has(> h2) {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(40px, 5vw, 80px);
    align-items: start;
  }

  .page-section:has(> h2) > * {
    grid-column: 2;
  }

  .page-section:has(> h2) > h2 {
    grid-column: 1;
    grid-row: 1 / span 40;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    margin-top: 0;
    padding-top: 2px;
  }

  /* Первый элемент правой колонки — вровень с заголовком. :is() поднимает
     специфичность до (0,2,2), чтобы перебить отступы списков/FAQ (0,2,1)
     и выносок/иллюстраций (0,2,0) из общего ритма секции. */
  .page-section:has(> h2) > h2 + :is(*, .steps-list, .facts-list, .faq, .callout, .device-figure) {
    margin-top: 0;
  }
}

/* 1024–1279px: правая колонка 508–634px — факты в одну колонку,
   иначе строка сжимается до ~26 знаков; две колонки возвращаются с 1280px */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .page-section:has(> h2) > .facts-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1280px) {
  .page-section:has(> h2) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

/* Шаги подключения: крупные номера и тонкая траектория между ними */
.steps-list {
  --step-num: clamp(2.5rem, 1.9rem + 2vw, 3.5rem);
  --step-col: clamp(40px, 6vw, 60px);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps-list__item {
  position: relative;
  min-height: calc(var(--step-num) + 8px);
  padding-left: calc(var(--step-col) + clamp(16px, 3vw, 32px));
  padding-bottom: clamp(32px, 4vw, 48px);
  counter-increment: step;
}

.steps-list__item:last-child {
  padding-bottom: 0;
}

.steps-list__item::before {
  content: counter(step);
  content: counter(step) / "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--step-col);
  font-family: var(--font-display);
  font-size: var(--step-num);
  font-weight: 700;
  font-stretch: 80%;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--accent);
}

.steps-list__item::after {
  content: "";
  position: absolute;
  top: calc(var(--step-num) * 0.9 + 12px);
  bottom: 12px;
  left: calc(var(--step-col) / 2);
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--line));
  opacity: 0.7;
}

.steps-list__item:last-child::after {
  display: none;
}

.steps-list__item > h3 {
  padding-top: 0.2em;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

.steps-list__item > * + * {
  margin-top: 10px;
}

.steps-list__item > p {
  max-width: var(--measure);
}

/* Факты: две колонки, волосяные разделители, без карточек */
.facts-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 56px);
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.facts-list > li {
  padding-block: 20px 24px;
  border-top: 1px solid var(--line);
}

.facts-list h3 {
  font-size: clamp(1.1875rem, 1.1rem + 0.3vw, 1.375rem);
  line-height: 1.2;
  font-weight: 600;
}

.facts-list h3 + p {
  margin-top: 8px;
}

.facts-list p {
  max-width: var(--measure);
  color: var(--fg-muted);
}

@media (min-width: 720px) {
  .facts-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Призыв: тёмная полоса «ближе к орбите» */
.page-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 112px);
  padding-inline: var(--bleed);
  background-color: var(--c-strato-low);
  background-image: linear-gradient(180deg, var(--c-strato-low) 0%, var(--c-strato) 100%);
  color: var(--fg);
  color-scheme: dark;
}

/* редкие неподвижные звёзды и слабое свечение атмосферы снизу */
.page-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 7% 22%, rgba(232, 244, 250, 0.9) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 18% 64%, rgba(232, 244, 250, 0.55) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 29% 14%, rgba(139, 230, 255, 0.7) 0 1px, rgba(139, 230, 255, 0) 1.6px),
    radial-gradient(circle at 41% 82%, rgba(232, 244, 250, 0.5) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 52% 30%, rgba(232, 244, 250, 0.75) 0 1.2px, rgba(232, 244, 250, 0) 1.8px),
    radial-gradient(circle at 63% 58%, rgba(232, 244, 250, 0.45) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 71% 12%, rgba(232, 244, 250, 0.85) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 79% 46%, rgba(139, 230, 255, 0.65) 0 1.2px, rgba(139, 230, 255, 0) 1.8px),
    radial-gradient(circle at 87% 24%, rgba(232, 244, 250, 0.6) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 93% 70%, rgba(232, 244, 250, 0.8) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 12% 90%, rgba(232, 244, 250, 0.4) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(circle at 58% 92%, rgba(232, 244, 250, 0.45) 0 1px, rgba(232, 244, 250, 0) 1.6px),
    radial-gradient(90% 70% at 85% 120%, rgba(139, 230, 255, 0.14), rgba(139, 230, 255, 0) 70%);
}

.page-cta > .container {
  max-width: none;
  padding-inline: 0;
}

.page-cta > h2 {
  max-width: 20ch;
  font-size: var(--fs-h2-sub);
  line-height: 1.06;
  font-weight: 650;
  color: var(--fg-heading);
}

.page-cta > p {
  max-width: 56ch;
  margin-top: 16px;
  color: var(--fg);
}

.page-cta > p + p {
  margin-top: 12px;
}

.page-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

@media (max-width: 479.98px) {
  .page-cta__actions .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 1024px) {
  .page-cta:has(> h2) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(48px, 6vw, 96px);
    align-items: end;
  }

  .page-cta:has(> h2) > * {
    grid-column: 1;
  }

  .page-cta:has(> h2) > .page-cta__actions {
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: end;
    justify-content: flex-end;
    margin-top: 0;
  }
}

/* Другие устройства: «станции» на линии */
.related-devices {
  padding-block: clamp(48px, 7vw, 88px);
}

.page-section .related-devices,
.container .related-devices {
  width: auto;
  padding-block: 0;
}

.related-devices h2 {
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  line-height: 1.15;
  font-weight: 650;
}

.related-devices ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 0 24px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.related-devices li {
  position: relative;
  border-top: 1px solid var(--line-strong);
}

.related-devices li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent);
}

.related-devices a {
  display: block;
  padding: 16px 0 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg-strong);
  text-decoration: none;
}

.related-devices a:hover {
  color: var(--link);
  text-decoration-line: underline;
}

@media (max-width: 479.98px) {
  .related-devices ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
  }
}

/* Узкие экраны: заголовки Tektur чуть уже, чтобы длинные слова помещались */
@media (max-width: 479.98px) {
  .page-hero__title,
  .page-section > h2,
  .page-cta > h2 {
    font-stretch: 88%;
  }

  .doc__title,
  .not-found__title {
    font-stretch: 80%;
  }
}


/* --------------------------------------------------------------------------
   12. 404
   -------------------------------------------------------------------------- */

.not-found {
  --link: #0B5F86;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: min(100svh, 980px);
  overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px));
  padding-bottom: calc(var(--cloud-h) + clamp(24px, 4vw, 56px));
  padding-inline: var(--bleed);
  background-color: var(--c-ground);
  background-image:
    radial-gradient(60rem 32rem at 90% -10rem, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--c-ground) 0%, #C8E8F6 100%);
}

.not-found::before,
.not-found::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -1px;
  pointer-events: none;
}

.not-found::before {
  z-index: -1;
  height: calc(var(--cloud-h) * 1.35);
  background: var(--clouds-back);
  opacity: 0.9;
}

/* передний слой облаков лежит поверх знака — знак «утопает» в них */
.not-found::after {
  z-index: 1;
  height: var(--cloud-h);
  background: var(--clouds-front);
}

.not-found__inner {
  display: grid;
  gap: 32px;
}

.not-found__text {
  position: relative;
  z-index: 2;
  max-width: 38rem;
}

.not-found__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-heading);
}

.not-found__lead {
  max-width: 48ch;
  margin-top: clamp(16px, 2.4vw, 24px);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--fg);
}

.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 36px);
}

.not-found__note {
  max-width: 48ch;
  margin-top: 20px;
  color: var(--fg);
}

.not-found__code {
  margin-top: 24px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

.not-found__mark {
  position: relative;
  z-index: 0;
  order: -1;
  display: block;
  width: 72px;
  height: auto;
  fill: var(--c-brand);
}

@media (max-width: 479.98px) {
  .not-found__actions .btn {
    flex: 1 1 100%;
  }
}

/* Широкий экран: знак справа внизу, передний слой облаков закрывает его низ */
@media (min-width: 1100px) {
  .not-found__mark {
    position: absolute;
    right: calc(var(--bleed) + 2vw);
    bottom: calc(var(--cloud-h) * 0.1);
    width: clamp(260px, 25vw, 400px);
    transform: rotate(-6deg);
    transform-origin: 50% 100%;
  }
}


/* --------------------------------------------------------------------------
   13. Уменьшение движения
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .btn:active {
    transform: none;
  }
}


/* --------------------------------------------------------------------------
   14. Печать документов
   -------------------------------------------------------------------------- */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  :root,
  .theme-light,
  .theme-dark,
  .page-cta,
  .site-footer {
    --fg: #000000;
    --fg-muted: #333333;
    --fg-strong: #000000;
    --fg-heading: #000000;
    --accent: #000000;
    --link: #000000;
    --link-hover: #000000;
    --line: #BBBBBB;
    --line-strong: #888888;
    --surface: transparent;
  }

  html,
  body,
  .page-doc,
  .page-hero,
  .page-cta,
  .not-found {
    background: #FFFFFF none !important;
    color: #000000 !important;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Через токены — иначе .prose (оферта, политика) печаталась бы экранным
     17px/1.6; заодно исправляется calc межстрочного у .clause__num */
  :root {
    --fs-body: 11pt;
    --lh-body: 1.45;
  }

  body {
    font-size: 11pt;
    line-height: 1.45;
  }

  /* Шапка и облака скрыты — экранные отступы под них не нужны */
  .page-hero,
  .not-found {
    padding-top: 0;
    padding-bottom: 12pt;
    min-height: 0;
  }

  .skip-link,
  .site-header,
  .site-footer,
  .doc__toc,
  .breadcrumbs,
  .page-hero__actions,
  .page-cta__actions,
  .not-found__actions,
  .page-hero::before,
  .page-hero::after,
  .page-cta::before,
  .not-found::before,
  .not-found::after {
    display: none !important;
  }

  .doc {
    max-width: none;
    padding: 0;
  }

  .doc__head {
    max-width: none;
    padding-bottom: 12pt;
    margin-bottom: 16pt;
    border-bottom-color: #000000;
  }

  .doc__title {
    font-size: 22pt;
  }

  .doc__lead {
    font-size: 12pt;
  }

  .doc__body {
    display: block;
  }

  .prose,
  .prose p,
  .prose li,
  .doc__lead {
    max-width: none;
  }

  .prose h2 {
    font-size: 15pt;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  tr,
  .callout,
  .doc__note {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-wrap > .table:not(.requisites) {
    min-width: 0;
  }

  a {
    color: #000000 !important;
    text-decoration: underline;
  }

  .prose a[href^="http"]::after,
  .doc a[href^="http"]::after,
  .device-page a[href^="http"]:not(.btn)::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    overflow-wrap: anywhere;
  }

  .faq__item::details-content {
    content-visibility: visible;
    height: auto;
  }

  .callout,
  .doc__note {
    border: 1px solid #999999;
    background: none;
  }

  .page-section + .page-section {
    border-top-color: #BBBBBB;
  }
}


/* --------------------------------------------------------------------------
   Режим высокой контрастности (forced-colors)
   Иконки нарисованы фоном/градиентами и в этом режиме пропадают:
   бургер стал бы невидимой областью без подписи, плюс/минус FAQ и оглавления
   исчезли бы. Возвращаем их системными цветами.
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .site-header__burger {
    border: 1px solid ButtonText;
  }

  .site-header__burger-lines::before,
  .site-header__burger-lines::after {
    forced-color-adjust: none;
    background-color: ButtonText;
  }

  .faq__q::after,
  .doc__toc-icon {
    forced-color-adjust: none;
    color: CanvasText;
    border-color: CanvasText;
  }
}


/* --------------------------------------------------------------------------
   Без JavaScript
   site.js не добавит шапке фон при прокрутке и не откроет мобильное меню:
   шапка сразу непрозрачная (дымка и чернила на любом фоне), бесполезный
   бургер скрыт — на мобильных навигация остаётся в подвале. Браузеры без
   поддержки media-функции scripting сохраняют обычное поведение.
   -------------------------------------------------------------------------- */
@media (scripting: none) {
  .site-header {
    background-color: var(--hdr-solid);
    border-bottom-color: var(--hdr-line);
  }
}

@media (scripting: none) and (max-width: 59.999em) {
  .site-header__burger {
    display: none;
  }
}
