/* ============================================================
     ТОКЕНЫ — dark-first: :root = тёмная палитра (основной вид),
     светлая переопределяется ниже.

     Светлая тема включается только вручную (кнопка в шапке пишет
     data-theme в localStorage) — системный prefers-color-scheme не
     опрашивается: тёмная у нас основной вид, а не «одна из двух».

     Первый экран тёмный в обеих темах: видео показывается в своих
     цветах, текст белый. Поэтому тёмная палитра объявлена не только
     на :root, но и на .hero / .phero / нестукнутой шапке — и светлая
     тема их не перебивает, потому что её правила целятся только в
     :root, а переменные на самих элементах сильнее наследования.
     Светлая тема начинается с секции под героем.

     Раньше кадр в светлой теме растворяли в фон — сначала белым
     градиентом, потом маской. Оба раза тёмное видео проходило через
     полупрозрачность на светлом и давало серую муть; на телефоне
     слои маски вообще нигде не пересекались в непрозрачную зону,
     и кадр максимум доходил до альфы 0,6. Растворение убрано.
     ============================================================ */
  :root,
  .hero,
  .phero,
  .head:not([data-stuck="true"]) {
    --ground: #05101C;
    --surface: #0A1B2C;
    --surface-2: #0E2334;
    --line: rgba(255, 255, 255, .10);
    --line-strong: rgba(255, 255, 255, .20);
    --text: #EAF2F8;
    --dim: #8CA4B7;
    --azure: #29B4F0;
    --azure-dim: rgba(41, 180, 240, .16);
    --brass: #C9A461;
    --on-azure: #04121D;
    --focus: #C9A461;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

    --wrap: 1400px;
    --pad: clamp(20px, 4vw, 56px);
    --gap-sec: clamp(58px, 7.4vw, 116px);
  }

  :root[data-theme="light"] {
    --ground: #FFFFFF;
    --surface: #F3F7FA;
    --surface-2: #E8EFF5;
    --line: rgba(5, 16, 28, .12);
    --line-strong: rgba(5, 16, 28, .24);
    --text: #08151F;
    --dim: #556B7D;
    --azure: #0A6E9E;
    --azure-dim: rgba(10, 110, 158, .10);
    --brass: #86671F;
    --on-azure: #FFFFFF;
    --focus: #86671F;
    --deep: #E9F1F7;
    --deep-2: #DCE8F1;
    --deep-text: #08151F;
    --deep-dim: #4E6376;
    --deep-line: rgba(5, 16, 28, .14);
    --deep-soft: #1D2F3E;
    --deep-rgb: 233, 241, 247;
    --deep-shadow: 0 1px 2px rgba(255, 255, 255, .95), 0 2px 16px rgba(255, 255, 255, .8);
    --deep-drop: 0 24px 60px rgba(8, 30, 50, .18);
    --deep-video: brightness(1.02) saturate(.92);
  }

  /* «Глубокая» палитра — шапка, герои, карта сети, подвал. В тёмной теме это
     почти чёрный, в светлой (ниже) — светлый холст: раньше эти блоки оставались
     тёмными при любой теме, и светлая тема выглядела наполовину тёмной.
     --deep-rgb используется в градиентах-подложках поверх видео, --deep-shadow —
     тень под текстом героя: в тёмной теме затемняет, в светлой подсвечивает. */
  :root,
  .hero,
  .phero,
  .head:not([data-stuck="true"]) {
    --deep: #04101B;
    --deep-2: #071726;
    --deep-text: #F2F8FC;
    --deep-dim: #90A8BA;
    --deep-line: rgba(255, 255, 255, .12);
    --deep-soft: #D7E6F1;
    --deep-rgb: 4, 16, 27;
    --deep-shadow: 0 2px 26px rgba(3, 12, 20, .7), 0 1px 3px rgba(3, 12, 20, .5);
    --deep-drop: 0 24px 60px rgba(2, 10, 18, .5);
    --deep-video: brightness(.84);
  }

  /* Скроллбар, автозаполнение и прочие нативные контролы — по теме сайта.
     Без этого на тёмной странице браузер рисует светлый скроллбар. */
  :root { color-scheme: dark; }
  :root[data-theme="light"] { color-scheme: light; }

  /* ============================================================ БАЗА */
  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font-family: var(--font);
    font-size: 17.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.042em; line-height: .96; text-wrap: balance; }
  h1 { font-size: clamp(42px, 8.4vw, 118px); }
  h2 { font-size: clamp(34px, 5.4vw, 68px); }
  h3 { font-size: clamp(19px, 1.9vw, 24px); letter-spacing: -0.024em; line-height: 1.2; }
  p { margin: 0; }
  /* ссылки: без постоянного подчёркивания — только цвет, подчёркивание на наведении */
  a { color: inherit; text-decoration: none; }

  .ext { color: var(--azure); font-weight: 600; }
  p a, li a, .lead a { color: var(--azure); }

  /* подчёркивание — только на наведении и только у ссылок внутри текста */
  p a:hover, li a:hover, .lead a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

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

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

  .eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--azure);
  }

  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

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

  section { scroll-margin-top: 80px; }
  .list > a[id] { scroll-margin-top: 96px; }

  /* ============================================================ ХЕДЕР
     Два уровня: тонкая утилитарная строка + основной бар с мега-меню.
     Над героем прозрачный, при скролле утилитарная строка сворачивается,
     основной бар садится на полупрозрачный фон с блюром. */
  .head {
    position: fixed;
    inset: 0 0 auto;
    z-index: 80;
    transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
    border-bottom: 1px solid transparent;
  }

  /* мягкая подложка под шапкой: мелкие надписи читаются поверх видео,
     при этом бар остаётся прозрачным — это градиент, а не фон */
  .head::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 210px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(var(--deep-rgb), .88) 0%, rgba(var(--deep-rgb), .70) 32%, rgba(var(--deep-rgb), .34) 66%, rgba(var(--deep-rgb), 0) 100%);
    transition: opacity .3s ease;
  }

  .head[data-stuck="true"] {
    background: color-mix(in srgb, var(--ground) 90%, transparent);
    backdrop-filter: blur(18px);
    border-bottom-color: var(--line);
  }

  .head[data-stuck="true"]::before { opacity: 0; }

  /* ---- уровень 1: утилитарная строка ---- */
  .util {
    height: 40px;
    overflow: hidden;
    border-bottom: 1px solid var(--deep-line);
    transition: height .3s ease, opacity .3s ease, border-color .3s ease;
  }

  .head[data-stuck="true"] .util__status,
  .head[data-stuck="true"] .util__links a { color: var(--dim); }

  .head[data-stuck="true"] .util {
    height: 0;
    opacity: 0;
    border-bottom-color: transparent;
  }

  .util__in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 40px;
    font-size: 12.5px;
  }

  .util__status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--deep-soft);
    white-space: nowrap;
  }

  .util__status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4CD07D;
    box-shadow: 0 0 0 3px rgba(76, 208, 125, .18);
  }

  @media (prefers-reduced-motion: no-preference) {
    .util__status i { animation: pulse 2.6s ease-in-out infinite; }
    @keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(76, 208, 125, .05); } }
  }

  .util__links { display: flex; align-items: center; gap: 22px; }

  .util__links a {
    text-decoration: none;
    color: var(--deep-soft);
    white-space: nowrap;
    transition: color .2s ease;
  }

  .util__links a:hover { color: var(--azure); }
  .util__links a.util__mail { font-family: var(--mono); }

  /* акцентная пилюля справа */
  .btn--pill { border-radius: 999px; }
  .btn--pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: .9;
  }

  /* ---- уровень 2: основной бар ---- */
  .head__in {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    transition: min-height .3s ease;
  }

  .head[data-stuck="true"] .head__in { min-height: 62px; }

  .logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    margin-right: auto;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--deep-text);
    min-height: 44px;
    transition: color .3s ease;
  }

  .head[data-stuck="true"] .logo { color: var(--text); }
  .logo span { font-weight: 300; opacity: .82; }

  .nav { display: flex; align-items: center; gap: 2px; }

  .nav a,
  .nav__top {
    text-decoration: none;
    font: inherit;
    font-size: 14.5px;
    white-space: nowrap;
    color: var(--deep-soft);
    padding: 12px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .2s ease;
  }

  .head[data-stuck="true"] .nav a,
  .head[data-stuck="true"] .nav__top { color: var(--dim); }

  .nav a:hover,
  .nav__top:hover { color: var(--azure); }

  .nav__top svg { transition: transform .22s ease; }

  /* ---- мега-меню ---- */
  .drop { position: relative; }

  .mega {
    position: absolute;
    top: calc(100% + 10px);
    left: -14px;
    width: min(780px, calc(100vw - 40px));
    padding: 10px 14px 12px;
    background: var(--deep);
    backdrop-filter: blur(22px);
    border: 1px solid var(--deep-line);
    box-shadow: var(--deep-drop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  .drop:hover .mega,
  .drop:focus-within .mega,
  .drop[data-open="true"] .mega {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .drop:hover .nav__top svg,
  .drop[data-open="true"] .nav__top svg { transform: rotate(180deg); }

  .mega__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mega__grid a {
    display: block;
    padding: 13px 15px;
    text-decoration: none;
    color: var(--deep-text);
    border: 1px solid transparent;
    transition: background .18s ease, border-color .18s ease;
  }

  .mega__grid a:hover { background: rgba(41, 180, 240, .08); border-color: var(--deep-line); }
  .mega__grid b { display: block; font-size: 15px; font-weight: 700; }
  .mega__grid small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--deep-dim); line-height: 1.45; }

  .mega__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding: 12px 15px;
    border-top: 1px solid var(--deep-line);
    font-size: 13px;
    color: var(--deep-dim);
  }

  .mega__foot a { color: var(--azure); text-decoration: none; font-weight: 600; white-space: nowrap; }

  .tel {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--deep-text);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: color .3s ease;
  }

  .head[data-stuck="true"] .tel { color: var(--text); }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 26px;
    border: 1px solid transparent;
    background: var(--azure);
    color: var(--on-azure);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .14s ease, filter .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  }

  .btn:hover { filter: brightness(1.08); }
  .btn:active { transform: translateY(1px); }

  .btn--line {
    background: transparent;
    color: var(--deep-text);
    border-color: var(--deep-line);
  }

  .btn--line:hover { border-color: var(--azure); color: var(--azure); filter: none; }

  .head[data-stuck="true"] .btn--line { color: var(--text); border-color: var(--line-strong); }
  .head__in .btn { min-height: 46px; padding: 12px 22px; font-size: 15px; }

  .burger {
    display: none;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--deep-line);
    border-radius: 12px;
    background: transparent;
    color: var(--deep-text);
    cursor: pointer;
  }

  /* три полосы вместо иконки: при открытом меню верхняя и нижняя сходятся в крестик */
  .burger__box { position: relative; width: 22px; height: 14px; display: block; }

  .burger__box i {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.8px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .28s cubic-bezier(.16, .84, .3, 1), opacity .18s ease;
  }

  .burger__box i:nth-child(1) { top: 0; }
  .burger__box i:nth-child(2) { top: 6.1px; }
  .burger__box i:nth-child(3) { top: 12.2px; }

  .burger[aria-expanded="true"] .burger__box i:nth-child(1) { transform: translateY(6.1px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger__box i:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] .burger__box i:nth-child(3) { transform: translateY(-6.1px) rotate(-45deg); }

  .head[data-stuck="true"] .burger { color: var(--text); border-color: var(--line-strong); }

  /* ---- мобильное меню: полноэкранная шторка ----
     Раньше это был длинный плоский список, выталкивавший страницу вниз, потом —
     панель у правого края. Теперь меню занимает весь экран и раскрывается кругом
     из точки, где стоит бургер: клип-путь идёт от нуля до радиуса, накрывающего
     угол, поэтому эффект читается как «меню вышло из кнопки». */
  .mnav {
    position: fixed;
    inset: 0;
    z-index: 120;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .46s;
  }

  .mnav[data-open="true"] {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .mnav__scrim {
    position: absolute;
    inset: 0;
    background: rgba(3, 12, 20, .5);
    opacity: 0;
    transition: opacity .3s ease;
  }

  .mnav[data-open="true"] .mnav__scrim { opacity: 1; }

  .mnav__panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px clamp(18px, 6vw, 34px) calc(18px + env(safe-area-inset-bottom));
    background:
      radial-gradient(120% 80% at 88% 0%, color-mix(in srgb, var(--azure) 16%, transparent) 0%, transparent 58%),
      radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--brass) 10%, transparent) 0%, transparent 60%),
      var(--ground);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* центр круга ставит скрипт по положению бургера */
    clip-path: circle(0% at var(--ox, 88%) var(--oy, 42px));
    transition: clip-path .46s cubic-bezier(.4, 0, .2, 1);
  }

  .mnav[data-open="true"] .mnav__panel { clip-path: circle(150% at var(--ox, 88%) var(--oy, 42px)); }

  @media (prefers-reduced-motion: reduce) {
    .mnav__panel { clip-path: none; opacity: 0; transition: opacity .2s ease; }
    .mnav[data-open="true"] .mnav__panel { clip-path: none; opacity: 1; }
  }

  .mnav__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .mnav__head .logo { color: var(--text); }
  .mnav__head .logo span { color: var(--dim); }

  .mnav__close {
    width: 46px;
    height: 46px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: transform .25s ease, border-color .2s ease;
  }

  .mnav__close:active { transform: rotate(90deg); }

  .mnav__body { display: flex; flex-direction: column; }

  .mnav__link,
  .mnav__grp > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding: 6px 0;
    font-size: clamp(20px, 5.6vw, 26px);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    list-style: none;
  }

  .mnav__grp > summary::-webkit-details-marker { display: none; }
  .mnav__grp > summary svg { flex: none; color: var(--dim); transition: transform .25s ease; }
  .mnav__grp[open] > summary svg { transform: rotate(180deg); }
  .mnav__grp[open] > summary { color: var(--azure); }

  /* Раскрытый раздел — отдельная подложка, а не список с вертикальной чертой:
     линия сбоку читалась как случайный штрих. Услуги и площадки пронумерованы
     тем же способом, что и на страницах разделов (и на карте сети). */
  .mnav__sublist {
    display: grid;
    gap: 1px;
    margin: 2px 0 14px;
    padding: 6px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--azure) 7%, transparent);
    counter-reset: msub;
  }

  .mnav__sublist a {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 16px;
    color: var(--text);
    text-decoration: none;
  }

  .mnav__sublist--num a:not(.mnav__all) { counter-increment: msub; }

  .mnav__sublist--num a:not(.mnav__all)::before {
    content: counter(msub, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--brass);
  }

  /* ссылка на сам раздел — со стрелкой вместо номера и чуть заметнее остальных */
  .mnav__all { font-weight: 600; color: var(--azure); }
  .mnav__all::before { content: "→"; font-size: 15px; color: var(--azure); }

  /* в ненумерованных списках («О компании») номера не нужны — точка-маркер */
  .mnav__sublist:not(.mnav__sublist--num) a:not(.mnav__all)::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-left: 9px;
    border-radius: 50%;
    background: var(--line-strong);
  }

  .mnav__sublist a:active { background: color-mix(in srgb, var(--azure) 14%, transparent); }

  /* пункты раскрытого раздела выезжают по очереди */
  @media (prefers-reduced-motion: no-preference) {
    .mnav__grp[open] .mnav__sublist a {
      animation: mnavSub .34s cubic-bezier(.16, .84, .3, 1) backwards;
    }
    .mnav__grp[open] .mnav__sublist a:nth-child(1) { animation-delay: .02s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(2) { animation-delay: .05s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(3) { animation-delay: .08s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(4) { animation-delay: .11s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(5) { animation-delay: .14s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(6) { animation-delay: .17s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(7) { animation-delay: .20s; }
    .mnav__grp[open] .mnav__sublist a:nth-child(8) { animation-delay: .23s; }
    @keyframes mnavSub { from { opacity: 0; transform: translateX(-10px); } }
  }

  .mnav__foot { display: grid; gap: 10px; margin-top: auto; padding-top: 10px; }
  .btn--wide { justify-content: center; width: 100%; }
  .mnav__lk { justify-self: center; padding: 6px; font-size: 14.5px; color: var(--dim); text-decoration: none; }

  /* появление содержимого шторки: сверху вниз, с задержкой по --i */
  @media (prefers-reduced-motion: no-preference) {
    .mnav[data-open="true"] .usearch--m,
    .mnav[data-open="true"] .mnav__body > *,
    .mnav[data-open="true"] .mnav__foot {
      animation: mnavIn .42s cubic-bezier(.16, .84, .3, 1) backwards;
      animation-delay: calc(var(--i, 0) * 45ms + 220ms);
    }
    @keyframes mnavIn { from { opacity: 0; transform: translateY(14px); } }
  }

  @media (max-width: 1180px) {
    .util__links a.util__mail { display: none; }
  }

  @media (max-width: 1040px) {
    .nav, .tel, .head__in > .btn { display: none; }
    .burger { display: inline-flex; }
    .util__links a { display: none; }
    .util__links a:nth-last-child(2) { display: inline-flex; }
  }

  @media (max-width: 700px) {
    /* На телефоне верхней строки нет совсем: поиск переехал в шторку меню,
       а отдельная полоса над логотипом занимала экран и выглядела приклеенной. */
    .util { display: none; }
  }

  /* поиск внутри мобильного меню */
  .usearch--m {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
  }

  .usearch--m input { width: 100%; font-size: 16px; }
  .usearch--m input:focus { width: 100%; }
  .usearch--m .usearch__out { top: 52px; left: 0; right: 0; width: auto; max-height: 46vh; overflow-y: auto; }

  /* ---- нижняя панель действий на телефоне ----
     Появляется, когда шапка ушла вверх: позвонить и оставить заявку — два
     действия, ради которых на сайт заходят с телефона. */
  .mbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: none;
    gap: 10px;
    padding: 10px clamp(12px, 4vw, 20px) calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--ground) 92%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
    transform: translateY(120%);
    transition: transform .34s cubic-bezier(.16, .84, .3, 1);
  }

  .mbar[data-show="true"] { transform: none; }
  .mbar .btn { flex: 1; justify-content: center; min-height: 48px; padding: 12px 10px; font-size: 15px; }

  @media (max-width: 700px) {
    .mbar { display: flex; }
    /* запас снизу, чтобы панель не накрывала последнюю строку подвала */
    .foot { padding-bottom: calc(var(--gap-sec) + 72px); }
  }

  /* отклик на касание: на телефоне нет наведения, поэтому нажатие должно быть видно */
  @media (hover: none) {
    .btn:active { transform: translateY(1px) scale(.985); }
    .tiles a:active,
    .nlist a:active,
    .list a:active { background: color-mix(in srgb, var(--azure) 7%, transparent); }
    .mnav__link:active,
    .mnav__grp > summary:active { color: var(--azure); }
  }

  /* ---- появление содержимого героя ----
     Заголовок, лид и кнопки всплывают друг за другом при загрузке страницы.
     Только анимация прозрачности и сдвига — верстка не двигается, поэтому
     на прокрутку и разметку это не влияет. */
  @media (prefers-reduced-motion: no-preference) {
    .phero__in > * { animation: heroIn .6s cubic-bezier(.16, .84, .3, 1) backwards; }
    .phero__in > .crumbs { animation-delay: .04s; }
    .phero__in > .eyebrow { animation-delay: .10s; }
    .phero__in > h1 { animation-delay: .16s; }
    .phero__in > .lead { animation-delay: .24s; }
    .phero__in > .phero__row,
    .phero__in > .phero__rev { animation-delay: .32s; }

    @keyframes heroIn { from { opacity: 0; transform: translateY(16px); } }
  }

  /* ---- полоса прогресса чтения ----
     Тонкая линия по верхней кромке: на длинной странице видно, сколько осталось. */
  .sprog {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(var(--p, 0));
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--azure), var(--brass));
    z-index: 130;
    pointer-events: none;
    transition: opacity .3s ease;
  }

  @media (prefers-reduced-motion: reduce) { .sprog { display: none; } }

  /* ============================================================ ГЕРОЙ */
  .hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-content: end;
    background: var(--deep);
    color: var(--deep-text);
    overflow: hidden;
    padding: clamp(104px, 14vh, 150px) 0 0;
  }

  /* Ролик 1920x1080. Раньше кадр подгонялся по высоте экрана (object-fit: cover)
     и на невысоком окне срезал до 30% ширины — оставался только центр.
     Теперь кадр всегда сажается по ширине: композиция видна целиком,
     снизу он растворяется в тёмном фоне героя. Затемнение не накладываем. */
  .hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center top;
    background: var(--deep);
    -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 18%);
    mask-image: linear-gradient(0deg, transparent 0, #000 18%);
  }

  /* на очень широком окне кадр по ширине выше экрана — тогда обрезаем низ,
     а не бока: масштабируем по высоте и снимаем растворение */
  @media (min-aspect-ratio: 16/9) {
    .hero__video {
      height: 100%;
      aspect-ratio: auto;
      -webkit-mask-image: none;
      mask-image: none;
    }
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(92deg, rgba(var(--deep-rgb), .46) 0%, rgba(var(--deep-rgb), .20) 44%, rgba(var(--deep-rgb), 0) 70%, rgba(var(--deep-rgb), 0) 100%),
      linear-gradient(178deg, rgba(var(--deep-rgb), .14) 0%, rgba(var(--deep-rgb), 0) 42%, rgba(var(--deep-rgb), .52) 100%);
    pointer-events: none;
  }

  .hero__in { position: relative; z-index: 2; padding-bottom: clamp(22px, 4vh, 60px); }

  /* видео не затемняем — читаемость держим тенью под текстом */
  .hero h1 { text-shadow: var(--deep-shadow); }
  .hero .eyebrow { color: var(--deep-text); text-shadow: var(--deep-shadow); }
  .hero__lead { text-shadow: var(--deep-shadow); }

  .hero .eyebrow { display: block; margin-bottom: clamp(14px, 2.6vh, 34px); }

  .hero h1 { max-width: 17ch; font-size: clamp(38px, min(8.4vw, 10.4vh), 118px); }
  .hero h1 b { font-weight: 800; color: var(--hero-accent, #fff); }

  /* появление по словам */
  .word { display: inline-block; }

  @media (prefers-reduced-motion: no-preference) {
    .word { opacity: 0; transform: translateY(.34em); animation: rise .72s cubic-bezier(.16, .84, .3, 1) forwards; }
    @keyframes rise { to { opacity: 1; transform: none; } }
    .fade-up { opacity: 0; transform: translateY(16px); animation: rise .8s .5s cubic-bezier(.16, .84, .3, 1) forwards; }
  }

  .hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: clamp(24px, 4vw, 60px);
    margin-top: clamp(18px, 3.4vh, 42px);
  }

  .hero__lead { color: var(--deep-soft); font-size: clamp(17px, 1.5vw, 20px); max-width: 44ch; }

  /* полоса метрик */
  .metrics {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--deep-line);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 720px) { .metrics { grid-template-columns: repeat(4, 1fr); } }

  .metrics div { padding: clamp(15px, 2.4vh, 30px) 0; }
  .metrics div + div { border-left: 1px solid var(--deep-line); padding-left: clamp(16px, 2vw, 28px); }

  @media (max-width: 719px) {
    .metrics div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--deep-line); }
    .metrics div:nth-child(4) { border-top: 1px solid var(--deep-line); }
  }

  .metrics b {
    display: block;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--deep-text);
    white-space: nowrap;
  }

  .metrics b i { font-style: normal; font-size: .5em; color: var(--brass); margin-left: 4px; }
  .metrics small { display: block; color: var(--deep-dim); font-size: 13.5px; margin-top: 6px; }

  /* ============================================================ СЕКЦИИ: единая сетка */
  .sec { padding: var(--gap-sec) 0; }
  .sec--tint { background: var(--surface); }

  .grid2 { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 4.2vw, 66px); align-items: start; }
  @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

  .sticky { position: sticky; top: 110px; display: grid; gap: 16px; }
  @media (max-width: 900px) { .sticky { position: static; } }

  /* заголовок боковой колонки: колонка 300px, крупный h2 из общей типографики
     не помещается и наезжает на контент справа — уменьшаем и разрешаем перенос */
  .sticky > * { min-width: 0; }
  /* узкая колонка: длинные слова переносим по слогам, а не рубим посередине
     («телекоммуникаций» разрывалось на «телекоммуник / аций») */
  .sticky h2 { font-size: clamp(28px, 2.9vw, 42px); overflow-wrap: break-word; hyphens: auto; }
  .sticky p.note { color: var(--dim); font-size: 16px; }
  .contact-lines { display: grid; gap: 4px; justify-items: start; }

  /* услуги */
  .list { display: grid; }

  .list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 32px;
    align-items: baseline;
    padding: clamp(22px, 2.6vw, 30px) 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
    transition: padding-left .22s cubic-bezier(.16, .84, .3, 1);
  }

  .list a:last-child { border-bottom: 1px solid var(--line); }
  .list a:hover { padding-left: 12px; }
  .list a:hover h3 { color: var(--azure); }
  .list h3 { transition: color .2s ease; }
  .list p { grid-column: 1 / 2; color: var(--dim); font-size: 15.5px; margin-top: 8px; max-width: 62ch; }
  .list .amount { grid-column: 2 / 3; grid-row: 1; }

  .amount {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(17px, 1.7vw, 21px);
    font-weight: 700;
    color: var(--brass);
    white-space: nowrap;
    text-align: right;
  }

  .amount small { display: block; font-family: var(--font); font-size: 12.5px; font-weight: 400; color: var(--dim); margin-top: 4px; }

  /* colocation */
  .rack { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: clamp(20px, 3vw, 46px); }
  .rack div { display: grid; gap: 8px; align-content: start; }
  .rack .u { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--azure); }
  .rack b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.04em; }
  .rack span { color: var(--dim); font-size: 15px; }

  /* ============================================================ СХЕМА СЕТИ */
  .net { background: var(--deep); color: var(--deep-text); padding: var(--gap-sec) 0; }
  .net .eyebrow { color: var(--azure); }
  .net h2 { color: var(--deep-text); }
  .net .note { color: var(--deep-dim); }

  .net__head { display: grid; gap: 16px; max-width: 58ch; }
  .net__head h2 { max-width: 20ch; }

  .net__body {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    margin-top: clamp(36px, 4.5vw, 64px);
  }

  @media (max-width: 900px) { .net__body { grid-template-columns: 1fr; } }

  /* ---------- Яндекс.Карта ---------- */
  .ymap {
    position: relative;
    /* высотой, а не aspect-ratio: соотношение сторон вместе с min-height распирало
       контейнер шире вьюпорта на узких экранах */
    height: clamp(380px, 52vh, 640px);
    border: 1px solid var(--line);
    background: var(--surface-2);
    overflow: hidden;
  }

  .ymap--sm { height: clamp(300px, 38vh, 440px); }

  /* в тёмной секции «сеть» рамка и текст запасного блока — по её палитре */
  .net .ymap { border-color: var(--deep-line); }
  .net .ymap__fb { color: var(--deep-dim); }
  .net .ymap__fb b { color: var(--deep-text); }

  /* кнопка «показать все площадки» — возврат к общему виду */
  .ymap__all {
    position: absolute;
    z-index: 3;
    left: 14px;
    top: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(10, 27, 44, .88);
    color: var(--text);
    font: 600 13px/1 var(--font);
    padding: 9px 13px;
    cursor: pointer;
  }

  .ymap__all:hover { border-color: var(--azure); color: var(--azure); }
  .ymap__all[hidden] { display: none; }

  .ymap__canvas { position: absolute; inset: 0; }

  /* карта Яндекса светлая, страница — тёмная: гасим яркость, цвета не подменяем */
  .ymap[data-ready="true"] .ymap__canvas { filter: brightness(.94) saturate(.96); }
  :root[data-theme="light"] .ymap[data-ready="true"] .ymap__canvas { filter: none; }

  /* запасной блок: виден, пока карта не поднялась, и остаётся, если API недоступен */
  .ymap__fb {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 12px;
    align-content: center;
    padding: clamp(20px, 3vw, 38px);
    color: var(--dim);
    font-size: 15px;
  }

  .ymap__fb ul { display: grid; gap: 8px; list-style: none; }
  .ymap__fb b { color: var(--text); }
  .ymap__fb a { color: var(--azure); justify-self: start; }
  .ymap[data-ready="true"] .ymap__fb { display: none; }
  .ymap[data-failed="true"] .ymap__fb p:first-child { display: none; }

  /* метка */
  .ypin { position: absolute; left: -17px; top: -44px; width: 34px; height: 44px; cursor: pointer; }

  .ypin b {
    position: absolute;
    inset: 0 0 9px 0;
    display: grid;
    place-items: center;
    background: #0E2B3E;
    border: 1.5px solid var(--azure);
    color: #EAF2F8;
    font: 700 14px/1 var(--font);
    box-shadow: 0 6px 18px rgba(3, 12, 20, .45);
  }

  .ypin i { position: absolute; left: 50%; bottom: 0; width: 2px; height: 10px; background: var(--azure); transform: translateX(-50%); }
  .ypin--main b { border-color: var(--brass); }
  .ypin--on b { background: var(--azure); border-color: var(--azure); color: #04121D; }
  .ypin--on i { background: var(--azure); }

  /* номер площадки в списке-легенде */
  .tilenum {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border: 1px solid var(--azure);
    color: var(--azure);
    font: 700 13px/1 var(--font);
    vertical-align: 2px;
  }

  .site-card { border-left: 2px solid var(--azure); padding-left: clamp(18px, 2.4vw, 28px); display: grid; gap: 14px; align-content: start; }
  .site-card .tag { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
  .site-card h3 { color: var(--deep-text); }
  .site-card .addr { font-family: var(--mono); font-size: 14px; color: var(--azure); }
  .site-card p { color: var(--deep-dim); font-size: 15.5px; }
  .site-card .metro { display: flex; flex-wrap: wrap; gap: 8px; }
  .site-card .metro span { font-size: 13px; color: var(--deep-dim); border: 1px solid var(--deep-line); border-radius: 100px; padding: 4px 11px; }
  .site-card a.ext { font-size: 14px; color: var(--azure); justify-self: start; }

  /* ============================================================ ПАКЕТЫ */
  .packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(20px, 3vw, 40px); }
  .pack { display: grid; gap: 14px; align-content: start; padding-top: 20px; border-top: 2px solid var(--line); }
  .pack--lead { border-top-color: var(--azure); }
  .pack ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
  .pack li { color: var(--dim); font-size: 15.5px; padding-left: 18px; position: relative; }
  .pack li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1px; background: var(--azure); }
  .pack .gift { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
  .pack a { justify-self: start; font-size: 15.5px; font-weight: 700; color: var(--azure); }

  /* ============================================================ О КОМПАНИИ */
  .prose { display: grid; gap: 20px; max-width: 66ch; font-size: clamp(17.5px, 1.6vw, 20px); }
  .prose .dim { color: var(--dim); }
  .lic { margin-top: clamp(30px, 4vw, 46px); display: grid; gap: 0; }
  .lic div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--dim); }
  .lic b { font-family: var(--mono); color: var(--text); }

  /* ============================================================ ФОРМА */
  .form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px 32px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: clamp(24px, 3vw, 40px);
  }

  @media (min-width: 720px) { .form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .sec--tint .form { background: var(--ground); }
  .f { display: grid; gap: 8px; }
  .f--wide, .f--full { grid-column: 1 / -1; }
  .f label { font-size: 14.5px; font-weight: 600; }
  .f label i { font-style: normal; color: var(--azure); }

  .f select {
    width: 100%;
    min-height: 54px;
    padding: 14px 28px 14px 0;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    font: inherit;
    font-size: 17px;
    color: var(--text);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 10px center, right 4px center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
  }

  .f select:focus { outline: none; border-bottom-color: var(--azure); }
  .f select:invalid, .f select option[value=""] { color: var(--dim); }
  .f select option { color: var(--text); background: var(--ground); }

  .f input, .f textarea {
    width: 100%;
    min-height: 54px;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    background: transparent;
    font: inherit;
    font-size: 17px;
    color: var(--text);
  }

  .f textarea { min-height: 96px; resize: vertical; }
  .f input:focus, .f textarea:focus { outline: none; border-bottom-color: var(--azure); }
  .f [aria-invalid="true"] { border-bottom-color: #E4695C; }
  .f .err { color: #E4695C; font-size: 13.5px; }

  .consent { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; font-size: 15px; color: var(--dim); }
  .consent input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--azure); }
  .consent a { color: var(--azure); }

  .consent .err { grid-column: 1 / -1; }
  .form__go { grid-column: 1 / -1; }

  .sent { display: none; grid-column: 1 / -1; border-left: 2px solid var(--azure); padding-left: 18px; font-size: 15.5px; }
  .sent[data-shown="true"] { display: block; }

  .contacts { display: grid; gap: 26px; align-content: start; }
  .contacts div small { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
  .contacts a, .contacts p { text-decoration: none; font-size: 17px; }
  .contacts a.big { font-family: var(--mono); font-size: clamp(21px, 2.2vw, 27px); font-weight: 700; letter-spacing: -0.02em; }

  /* ============================================================ ФУТЕР */
  /* ============================================================ ПОДВАЛ
     Структура как у референса: бренд с адресом, три колонки ссылок,
     колонка контактов, нижняя строка с копирайтом и политикой,
     под ней — юридическая сноска про лицензии. */
  .foot {
    background: var(--deep);
    color: var(--deep-dim);
    padding: clamp(56px, 7vw, 96px) 0 clamp(28px, 3vw, 40px);
    font-size: 14.5px;
  }

  .foot__in {
    display: grid;
    gap: 40px 32px;
    grid-template-columns: 1fr;
  }

  @media (min-width: 700px) { .foot__in { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 1080px) { .foot__in { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; } }

  .foot__brand { display: grid; gap: 14px; align-content: start; }

  .foot__logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--deep-text);
  }

  .foot__logo span { font-weight: 300; opacity: .82; }
  .foot__tagline { color: var(--deep-dim); max-width: 30ch; line-height: 1.55; }
  .foot__addr { color: var(--deep-text); line-height: 1.6; }

  .foot h2 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--deep-dim);
    margin: 0 0 20px;
    line-height: 1.4;
  }

  .foot__links { display: grid; gap: 13px; align-content: start; }

  .foot__links a,
  .foot__links span {
    color: var(--deep-text);
    text-decoration: none;
    transition: color .18s ease;
  }

  .foot__links a:hover { color: var(--azure); }
  .foot__links span { color: var(--deep-dim); }
  .foot__links .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

  .foot__note {
    margin-top: clamp(40px, 5vw, 64px);
    padding-top: 24px;
    border-top: 1px solid var(--deep-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    justify-content: space-between;
    font-size: 13.5px;
  }

  .foot__note a { color: var(--deep-dim); text-decoration: none; }
  .foot__note a:hover { color: var(--azure); }

  .foot__legal {
    margin: 24px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--deep-line);
    max-width: 92ch;
    font-size: 13px;
    line-height: 1.65;
    color: var(--deep-dim);
  }

  .foot__legal a { color: var(--deep-dim); }
  .foot__legal a:hover { color: var(--azure); }

  .skip { position: absolute; left: -9999px; }
  .skip:focus { left: 14px; top: 14px; z-index: 200; background: var(--azure); color: var(--on-azure); padding: 14px 20px; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  }

  /* ============================================================ МНОГОСТРАНИЧНОСТЬ
     Компоненты, которых не было в одностраничном прототипе:
     хлебные крошки, компактный герой раздела, спецификации, FAQ,
     калькулятор colocation, таблица тарифов, карточки-плитки, новости. */

  /* ---- компактный герой раздела ----
     Высота фиксированная и одинаковая на всех внутренних страницах: раньше она
     зависела от длины заголовка и лида, и при переходе между страницами шапка
     прыгала. Отступы тоже в пикселях, а не в vh — иначе на высоком окне падинги
     разрастались бы и высота снова стала бы зависеть от содержимого.
     Крошки прижаты к верху, остальное — к низу, поэтому у всех страниц лид
     и кнопки заканчиваются на одной линии. */
  .phero {
    --phero-h: 620px;
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: var(--phero-h);
    background: var(--deep);
    color: var(--deep-text);
    overflow: hidden;
    padding: 132px 0 48px;
  }

  @media (max-width: 1099px) { .phero { --phero-h: 560px; padding: 126px 0 44px; } }
  @media (max-width: 700px) { .phero { --phero-h: 640px; padding: 120px 0 40px; } }

  .phero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(120% 90% at 88% 8%, rgba(41, 180, 240, .16) 0%, transparent 60%),
      linear-gradient(180deg, rgba(var(--deep-rgb), .5) 0%, rgba(var(--deep-rgb), 0) 46%);
  }

  /* видеофон в шапке раздела: подложка — постер, поверх него приглушённое видео,
     сверху фирменные градиенты, чтобы кадр читался как часть тёмной темы */
  .phero__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--deep);
  }

  /* цветокоррекция вшита в сам файл (тот же грейд, что у видео на главной),
     здесь только приглушаем яркость — прозрачность не используем, иначе
     сквозь движущийся кадр просвечивает подложка и картинка двоится */
  .phero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: var(--deep-video);
  }

  .phero--media::after {
    background:
      radial-gradient(120% 90% at 86% 6%, rgba(41, 180, 240, .22) 0%, transparent 62%),
      linear-gradient(94deg, rgba(var(--deep-rgb), .88) 0%, rgba(var(--deep-rgb), .62) 46%, rgba(var(--deep-rgb), .3) 76%, rgba(var(--deep-rgb), .52) 100%),
      linear-gradient(180deg, rgba(var(--deep-rgb), .74) 0%, rgba(var(--deep-rgb), 0) 34%, rgba(var(--deep-rgb), .66) 100%);
  }

  .phero--media h1 { text-shadow: var(--deep-shadow); }
  .phero--media .lead { color: var(--deep-text); text-shadow: var(--deep-shadow); }

  /* без анимации показываем постер того же ролика: адрес приходит инлайном
     в --phero-poster, чтобы одна страница не подставляла кадр другой */
  @media (prefers-reduced-motion: reduce) {
    .phero__video { display: none; }
    .phero__media {
      background: var(--deep) var(--phero-poster, url("/media/connect-poster.jpg")) center/cover no-repeat;
    }
  }

  /* Содержимое шапки — одной группой у нижнего края. Крошки раньше были прижаты
     к верху, и на страницах с коротким текстом («Документы», «Лицензии») между
     ними и заголовком зависала пустая полоса в четверть экрана. */
  .phero__in { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; }
  .phero h1 { max-width: 20ch; font-size: clamp(36px, 5.6vw, 76px); }
  .phero .lead { margin: 20px 0 0; max-width: 54ch; color: var(--deep-soft); font-size: clamp(17px, 1.5vw, 20px); }

  .phero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 28px;
  }

  .phero__price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--mono);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    color: var(--deep-text);
  }

  .phero__price small { font-family: var(--font); font-size: 13.5px; font-weight: 500; color: var(--deep-dim); }

  /* на узких экранах текст шапки набирается мельче: иначе заголовок и лид
     разъезжаются на лишние строки и перестают помещаться в фиксированную высоту */
  @media (max-width: 430px) {
    .phero h1 { font-size: 33px; }
    .phero .lead { margin-top: 16px; font-size: 16px; }
    .phero__row { margin-top: 24px; }
  }

  @media (max-width: 370px) {
    .phero h1 { font-size: 30px; }
    .phero .lead { font-size: 15.5px; }
    .phero__row { margin-top: 20px; gap: 12px 14px; }
  }

  /* ---- хлебные крошки ---- */
  .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--deep-dim); margin-bottom: 22px; }
  .crumbs a { color: var(--deep-dim); text-decoration: none; }
  .crumbs a:hover { color: var(--azure); }
  .crumbs span[aria-current] { color: var(--deep-text); }
  .crumbs i { opacity: .5; font-style: normal; }

  /* ---- сетка «что входит» ---- */
  .specs { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
  @media (min-width: 720px) { .specs { grid-template-columns: 1fr 1fr; } }

  .specs div { background: var(--ground); padding: clamp(20px, 2.4vw, 30px); }
  .specs b { display: block; font-size: 17px; font-weight: 700; margin-bottom: 7px; }
  .specs p { margin: 0; color: var(--dim); font-size: 15.5px; }

  /* ---- шаги подключения ---- */
  .steps { counter-reset: s; display: grid; gap: 0; }
  .steps > div { counter-increment: s; display: grid; grid-template-columns: 54px 1fr; gap: 0 20px; padding: clamp(22px, 2.6vw, 30px) 0; border-top: 1px solid var(--line); }
  .steps > div:last-child { border-bottom: 1px solid var(--line); }
  .steps > div::before { content: counter(s); font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--azure); line-height: 1; }
  .steps b { grid-column: 2; font-size: 19px; margin-bottom: 6px; }
  .steps p { grid-column: 2; margin: 0; color: var(--dim); max-width: 68ch; }

  /* ---- FAQ на <details>, без скриптов ---- */
  .faq { border-top: 1px solid var(--line); }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; font-family: var(--mono); font-size: 22px; color: var(--azure); transition: transform .2s ease; }
  .faq details[open] summary::after { transform: rotate(45deg); }
  .faq p { margin: 0 0 22px; color: var(--dim); max-width: 78ch; }

  /* ---- таблица тарифов ---- */
  .ptable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
  .ptable caption { text-align: left; padding-bottom: 14px; color: var(--dim); font-size: 14px; }
  .ptable th, .ptable td { text-align: left; padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
  .ptable th { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
  .ptable td b { font-family: var(--mono); font-size: 17px; white-space: nowrap; }
  .ptable td small { display: block; color: var(--dim); margin-top: 4px; }
  .ptable--scroll { overflow-x: auto; }

  /* ---- компактная полоса площадок (повторяется на многих страницах,
         поэтому вместо крупных плиток — плотная строка ссылок) ---- */
  .sec--slim { padding: clamp(34px, 4vw, 58px) 0; }

  .vstrip__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 20px;
    margin-bottom: 18px;
  }

  .vstrip__note { margin: 0; color: var(--dim); font-size: 15px; }

  .vstrip {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0 clamp(20px, 2.6vw, 40px);
    border-top: 1px solid var(--line);
  }

  @media (min-width: 620px) { .vstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1000px) { .vstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

  /* строка растягивается на всю высоту ряда сетки — иначе нижние границы
     в соседних колонках не совпадают */
  .vstrip li { display: grid; }

  /* название и адрес — всегда двумя строками. Раньше здесь был flex-wrap:
     короткие пары вставали в одну строку, длинные переносились, и полоса
     читалась как набор строк разной высоты */
  .vstrip a {
    color: var(--text);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name go"
      "addr go";
    gap: 3px 14px;
    align-content: start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    transition: color .18s ease;
  }

  .vstrip b { grid-area: name; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
  /* text-wrap: pretty — чтобы в узкой колонке на вторую строку не уезжало
     одно слово («…стр. 1, / Москва»); где не поддерживается, ничего не меняется */
  .vstrip span {
    grid-area: addr;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--dim);
    text-wrap: pretty;
  }

  .vstrip a::after {
    content: "→";
    grid-area: go;
    align-self: center;
    color: var(--azure);
    font-size: 15px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .18s ease, transform .18s ease;
  }

  .vstrip a:hover { text-decoration: none; color: var(--azure); }
  .vstrip a:hover span { color: var(--azure); }
  .vstrip a:hover::after,
  .vstrip a:focus-visible::after { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    .vstrip a::after { transition: none; }
  }

  /* ---- плитки-ссылки (хабы) ---- */
  .tiles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
  @media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* Плитки образуют сплошную «таблицу», поэтому незаполненная ячейка в последнем ряду
     видна как пустая плашка. Раскладываем ряды так, чтобы дырок не оставалось. */
  @media (min-width: 700px) {
    .tiles:not(.tiles--3) > a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  }

  @media (min-width: 700px) and (max-width: 1099px) {
    .tiles--3 > a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  }

  @media (min-width: 1100px) {
    .tiles--3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .tiles--3 > a { grid-column: span 2; }

    /* четыре плитки — два ряда по две */
    .tiles--3:has(> a:nth-child(4):last-child) > a { grid-column: span 3; }

    /* пять и семь плиток — первый ряд по три, дальше по две */
    .tiles--3:has(> a:nth-child(5):last-child) > a:nth-child(n+4),
    .tiles--3:has(> a:nth-child(7):last-child) > a:nth-child(n+4) { grid-column: span 3; }

    /* одинокая плитка в последнем ряду — на всю ширину */
    .tiles--3 > a:last-child:nth-child(3n+1) { grid-column: span 6; }
  }

  .tiles a {
    background: var(--ground);
    padding: clamp(22px, 2.6vw, 32px);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background .18s ease;
  }

  .tiles a:hover { background: color-mix(in srgb, var(--azure) 7%, var(--ground)); }
  .tiles h3 { font-size: clamp(20px, 1.9vw, 25px); }
  .tiles p { margin: 0; color: var(--dim); font-size: 15.5px; }
  .tiles .amount { margin-top: auto; font-family: var(--mono); font-weight: 700; color: var(--text); }
  .tiles .amount small { font-family: var(--font); font-weight: 500; color: var(--dim); margin-left: 8px; }
  .tiles .go { font-size: 14px; font-weight: 600; color: var(--azure); }

  /* ---- заголовок секции со ссылкой справа ---- */
  .sechead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: clamp(24px, 3vw, 38px);
  }

  .sechead h2 { margin: 0; }

  /* ---- анонсы новостей на главной ---- */
  .nlist { display: grid; gap: clamp(28px, 3vw, 40px) clamp(28px, 3.4vw, 56px); }
  @media (min-width: 720px) { .nlist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

  .nlist a {
    position: relative;
    display: grid;
    gap: 12px;
    align-content: start;
    padding-top: 24px;
    min-width: 0;
  }

  .nlist a::before,
  .nlist a::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; }
  .nlist a::before { background: var(--line-strong); }
  .nlist a::after {
    background: var(--azure);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .38s cubic-bezier(.16, .84, .3, 1);
  }

  .nlist a:hover { text-decoration: none; }
  .nlist a:hover::after, .nlist a:focus-visible::after { transform: scaleX(1); }

  .nlist time {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dim);
  }

  .nlist h3 {
    font-size: clamp(19px, 1.6vw, 22px);
    line-height: 1.22;
    letter-spacing: -0.02em;
    transition: color .2s ease;
  }

  .nlist a:hover h3 { color: var(--azure); }
  .nlist p { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.55; }

  .nlist__go {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--azure);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .28s ease, transform .28s ease;
  }

  .nlist a:hover .nlist__go, .nlist a:focus-visible .nlist__go { opacity: 1; transform: none; }
  @media (hover: none) { .nlist__go { opacity: 1; transform: none; } }

  /* ---- новости ---- */
  .news { border-top: 1px solid var(--line); }
  .news article { padding: clamp(24px, 3vw, 34px) 0; border-bottom: 1px solid var(--line); }
  .news time { font-family: var(--mono); font-size: 13.5px; color: var(--azure); }
  .news h2 { font-size: clamp(23px, 2.4vw, 32px); margin: 10px 0 12px; }
  .news p { margin: 0; color: var(--dim); max-width: 80ch; }

  /* ---- переключатель типов телефонии ---- */
  .switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
  .switch button {
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 11px 18px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--dim);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
  }
  .switch button[aria-pressed="true"] { color: var(--on-azure); background: var(--azure); border-color: var(--azure); }
  .pane[hidden] { display: none; }

  /* ---- карточка контактов ---- */
  .cinfo { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
  @media (min-width: 760px) { .cinfo { grid-template-columns: repeat(2, 1fr); } }
  .cinfo div { background: var(--ground); padding: clamp(20px, 2.4vw, 30px); }
  .cinfo b { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
  .cinfo a, .cinfo span { font-size: 18px; font-weight: 600; color: var(--text); text-decoration: none; }
  .cinfo a:hover { color: var(--azure); }

  /* описание площадки в блоке «Адрес и контакты»: полный текст, который
     раньше стоял лидом в шапке — в шапке остался короткий вариант */
  .vabout { margin: 0 0 24px; max-width: 62ch; font-size: 17px; line-height: 1.65; color: var(--dim); }

  /* ---- сноска-предупреждение ---- */
  .callout {
    border-left: 3px solid var(--azure);
    background: color-mix(in srgb, var(--azure) 6%, transparent);
    padding: 18px 22px;
    color: var(--dim);
    font-size: 15.5px;
  }
  .callout b { color: var(--text); }

  /* ---- появление блоков при скролле ---- */
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal="out"] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.16, .84, .3, 1); }
    [data-reveal="in"] { opacity: 1; transform: none; }
  }

  /* ---- второе мега-меню (площадки) и активный раздел ---- */
  .mega--sm { width: min(520px, calc(100vw - 40px)); }
  /* панель у правого края экрана прижимается вправо, чтобы не уезжать за границу */
  .drop:last-of-type .mega { left: auto; right: -14px; }
  .mega__grid--1 { grid-template-columns: 1fr; }
  .nav a[data-active="true"],
  .nav__top[data-active="true"] { color: var(--deep-text); }
  .head[data-stuck="true"] .nav a[data-active="true"],
  .head[data-stuck="true"] .nav__top[data-active="true"] { color: var(--text); }
  .nav a[data-active="true"]::after,
  .nav__top[data-active="true"]::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    background: var(--azure);
  }
  .nav a, .nav__top { position: relative; }

  /* ---- правки после первого прогона многостраничника ---- */
  .wrap > h2 + .note { margin: 14px 0 30px; }
  .wrap > h2 + .ptable--scroll,
  .wrap > h2 + .tiles,
  .wrap > h2 + .specs,
  .wrap > h2 + .news,
  .wrap > h2 + .metrics,
  .wrap > h2 + .cinfo,
  .wrap > h2 + .switch { margin-top: 30px; }
  .phero + .net { padding-top: clamp(20px, 3vw, 44px); }
  .tiles .amount { text-align: left; }
  .util__status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  @media (max-width: 860px) {
    .util__more { display: none; }
  }

  /* ---- кнопки в герое вместо снятой проверки адреса ---- */
  .hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
  .hero__cta .btn { min-height: 52px; }

  /* ---- полоса прогресса прокрутки ---- */
  .progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    width: 0;
    height: 3px;
    background: linear-gradient(120deg, var(--azure) 0%, #7FD4F7 55%, var(--brass) 100%);
    pointer-events: none;
    transition: width .08s linear;
  }

  /* ---- верхняя строка: лицензии ссылкой на страницу ---- */
  a.util__status { text-decoration: none; transition: color .2s ease; }
  a.util__status:hover { color: var(--azure); }

  /* ---- поиск по сайту в верхней строке ---- */
  .usearch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--deep-line);
    border-radius: 999px;
    color: var(--deep-soft);
    transition: border-color .2s ease, background .2s ease;
  }

  .usearch:focus-within { border-color: var(--azure); background: rgba(41, 180, 240, .06); }
  .usearch svg { flex: none; }

  .usearch input {
    width: 132px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12.5px;
    color: var(--deep-text);
    transition: width .25s ease, color .3s ease;
  }

  .usearch input::placeholder { color: #A6BCCD; }
  .usearch input:focus { outline: none; width: 200px; }
  .head[data-stuck="true"] .usearch input { color: var(--text); }

  /* панель результатов вынесена в fixed: у .util есть overflow: hidden
     (им сворачивается строка при скролле), иначе список обрезался бы */
  .usearch__out {
    position: fixed;
    top: 46px;
    right: var(--pad);
    width: min(420px, calc(100vw - 40px));
    max-height: 60vh;
    overflow-y: auto;
    background: var(--deep);
    border: 1px solid var(--deep-line);
    box-shadow: var(--deep-drop);
    z-index: 90;
    text-align: left;
  }

  .usearch__out a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--deep-line);
    transition: background .16s ease;
  }

  .usearch__out a:last-child { border-bottom: 0; }
  .usearch__out a:hover,
  .usearch__out a[aria-selected="true"] { background: rgba(41, 180, 240, .1); }
  .usearch__out b { display: block; font-size: 14.5px; font-weight: 700; color: var(--deep-text); }
  .usearch__out small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--deep-dim); }
  .usearch__out p { margin: 0; padding: 14px 16px; font-size: 13px; color: var(--deep-dim); }

  /* ============================================================
     НОМЕР СЕКЦИИ (приём с sdm-sv.ru). Сам номер расставляет генератор —
     см. numberSections() в gen-site.mjs: там же решается, нумеровать
     страницу или нет.
     ============================================================ */
  .secnum {
    margin-right: .85em;
    color: var(--brass);
    letter-spacing: .04em;
    font-style: normal;
  }

  /* ============================================================
     СПИСОК УСЛУГ НУМЕРОВАННЫМИ СТРОКАМИ (образец — блок «Услуги»
     на sdm-sv.ru). Плотнее плиток: номер, название, одна фраза.
     ============================================================ */
  .slist {
    list-style: none;
    margin: 26px 0 0;
    /* без заголовка секции верхний отступ не нужен */
    padding: 0;
    display: grid;
    border-top: 1px solid var(--line);
  }

  @media (min-width: 760px) {
    .slist { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3.4vw, 56px); }
    /* семь услуг — последняя строка одна в ряду, растягиваем на обе колонки,
       чтобы под ней не оставалось обрезанной линии */
    .slist > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  }

  .slist--top { margin-top: 0; }

  .slist > li { display: grid; }

  .slist a {
    color: var(--text);
    text-decoration: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0 clamp(14px, 1.6vw, 22px);
    padding: clamp(18px, 2vw, 24px) 0;
    border-bottom: 1px solid var(--line);
    transition: color .18s ease;
  }

  .slist__num {
    font-size: 13px;
    color: var(--brass);
    letter-spacing: .04em;
    padding-top: 3px;
  }

  .slist__body { display: grid; gap: 5px; }
  .slist__body b { font-size: clamp(17px, 1.5vw, 19.5px); font-weight: 700; line-height: 1.25; }
  .slist__body span { font-size: 14.5px; line-height: 1.5; color: var(--dim); text-wrap: pretty; }

  .slist__go {
    color: var(--azure);
    font-size: 15px;
    padding-top: 3px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .18s ease, transform .18s ease;
  }

  .slist a:hover { color: var(--azure); }
  .slist a:hover .slist__body span { color: var(--azure); }
  .slist a:hover .slist__go,
  .slist a:focus-visible .slist__go { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    .slist__go { transition: none; }
  }

  /* ============================================================
     ПОЛОСА СОГЛАСИЯ НА COOKIE. В разметке появляется только при
     заданном номере счётчика (INTEGRATIONS.metrikaId), показывается
     из site.js — и только если выбор ещё не сделан.
     ============================================================ */
  .cookiebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 95;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(16px, 2.4vw, 40px);
    padding: 16px var(--pad);
    background: var(--surface);
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -18px 44px rgba(2, 10, 18, .28);
  }

  .cookiebar[hidden] { display: none; }
  .cookiebar p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--dim); max-width: 82ch; }
  .cookiebar p a { color: var(--azure); }
  .cookiebar__go { display: flex; gap: 10px; flex-wrap: wrap; }
  .cookiebar__go .btn { padding: 10px 20px; font-size: 14px; white-space: nowrap; }

  /* .btn--line рассчитана на тёмный герой (--deep-text по прозрачному фону).
     На светлой подложке полосы она была белым по белому — переопределяем. */
  .cookiebar__go .btn--line { color: var(--text); border-color: var(--line-strong); }
  .cookiebar__go .btn--line:hover { color: var(--azure); border-color: var(--azure); }

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

  /* капча Яндекса на форме заявки — появляется только при заданном client key */
  .captcha { min-height: 102px; }

  /* ============================================================
     ПРАВОВЫЕ ДОКУМЕНТЫ (/dokumenty/*)
     Одна колонка ограниченной меры: юридический текст читают подряд,
     а не сканируют, поэтому строка не должна быть длиннее ~78 знаков.
     ============================================================ */
  /* меру задаём детям, а не самой .wrap: иначе узкий блок центрируется
     вместе с обёрткой и текст документа уезжает от левого края страницы */
  .legal > * { max-width: 78ch; }

  .legal h2 {
    margin: clamp(34px, 3.4vw, 52px) 0 14px;
    font-size: clamp(19px, 1.8vw, 23px);
    line-height: 1.25;
    letter-spacing: -.01em;
  }

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

  .legal p { margin: 0 0 14px; font-size: 16px; line-height: 1.62; color: var(--text); }

  .legal ul {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
  }

  .legal ul li {
    position: relative;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.55;
  }

  .legal ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .68em;
    width: 7px;
    height: 1px;
    background: var(--brass);
  }

  .legal ul li b { font-weight: 700; }

  /* реквизиты: термин слева, значение справа, по тонким линиям */
  .legal dl {
    margin: 0 0 20px;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .legal dl dt {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dim);
    padding: 14px 0 0;
  }

  .legal dl dd {
    margin: 0;
    padding: 2px 0 14px;
    font-size: 15.5px;
    line-height: 1.5;
    border-bottom: 1px solid var(--line);
  }

  @media (min-width: 720px) {
    /* колонки без зазора, отступ — паддингом: иначе линия под строкой
       разрывается в промежутке между термином и значением */
    .legal dl { grid-template-columns: minmax(0, 258px) minmax(0, 1fr); }
    .legal dl dt { padding: 14px clamp(20px, 2.4vw, 36px) 14px 0; border-bottom: 1px solid var(--line); }
    .legal dl dd { padding: 14px 0; }
  }

  .legal a { color: var(--azure); }

  /* заголовки документов длинные («Политика в отношении обработки персональных
     данных»), поэтому в шапке документа h1 мельче обычного героя */
  .phero--doc h1 { font-size: clamp(27px, 3.2vw, 44px); }

  /* дата редакции в шапке документа */
  .phero__rev { margin: 18px 0 0; font-size: 13.5px; color: var(--deep-dim); }

  /* нижняя строка подвала: несколько правовых ссылок в ряд */
  .foot__legals { display: flex; flex-wrap: wrap; gap: 6px 20px; }

  /* ============================================================
     ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ
     Иконка показывает, что получится по нажатию: в тёмной теме —
     солнце, в светлой — луна. Правила повторяют логику токенов:
     база = тёмная (её и видно, пока выбор не сделан), светлая
     приходит только из [data-theme="light"].
     ============================================================ */
  .tsw {
    width: 46px;
    height: 46px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--deep-line);
    border-radius: 999px;
    background: transparent;
    color: var(--deep-text);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
  }

  .tsw:hover { color: var(--azure); border-color: var(--azure); }
  .head[data-stuck="true"] .tsw { color: var(--text); border-color: var(--line-strong); }
  .head[data-stuck="true"] .tsw:hover { color: var(--azure); border-color: var(--azure); }

  .tsw__moon { display: none; }

  :root[data-theme="light"] .tsw__sun { display: none; }
  :root[data-theme="light"] .tsw__moon { display: block; }

  :root[data-theme="dark"] .tsw__sun { display: block; }
  :root[data-theme="dark"] .tsw__moon { display: none; }
