/* Grand Credit — оформление.
 *
 * Человек отдаёт в залог квартиру. Всё оформление подчинено одному:
 * чтобы на той стороне читалась контора, которая ведёт документы,
 * а не продаёт мечту.
 *
 * Отсюда почти монохром. Графит и костяная бумага, цвет — только
 * табачный акцент на том, что действительно нужно нажать или прочесть.
 * Палитра, в которой нечему блестеть, не может выглядеть дёшево:
 * ей нечем это сделать.
 *
 * Язык деталей — межевой план и бланк строгой отчётности: волосяные
 * линейки, угловые засечки, гильоше, гравированная печать, буквица,
 * табличные цифры. Всё это рисуется линиями, а не заливками, потому что
 * заливка — это про рекламу, а линия — про документ.
 *
 * Гарнитура одна — Inter. Она несёт латышскую диакритику и кириллицу,
 * так что русская страница не съезжает на подменный шрифт, и у неё
 * настоящие табличные цифры: строка не дёргается при пересчёте.
 * Заголовки держатся не гарнитурой, а кеглем, весом и плотным
 * трекингом — в монохроме этого достаточно.
 */

/* --- Шрифт ------------------------------------------------------------------
   Inter лежит на своём сервере, а не подгружается с Google Fonts: каждый
   запрос к серверам Google передаёт им IP посетителя, и для кредитора
   в ЕС это вопрос GDPR — немецкие суды уже признавали такую подгрузку
   нарушением. Подмножества — латиница с латышской диакритикой и
   кириллица; браузер скачивает только те, чьи символы есть на странице.
   Лицензия шрифта — SIL Open Font License, самостоятельное размещение
   разрешено. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/inter-cyrillic-ext-9f2e7a23.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/inter-cyrillic-a10feb6d.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/inter-latin-ext-5a6754fc.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/inter-latin-496a588b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Графит. Пять ступеней — чтобы тёмные блоки не выглядели одной
     плоской заливкой, а слои читались. */
  --ink-900: #16181a;
  --ink-800: #1e2124;
  --ink-700: #2c3033;
  --ink-600: #3d4247;
  --ink-500: #565c61;

  /* Табак. Два оттенка: тёмный работает на светлой бумаге, светлый —
     на графите. Один и тот же цвет в обеих ролях не набирает нужного
     контраста ни в одной. */
  --accent: #6b4a2f;
  --accent-lt: #b08a5e;
  --accent-soft: rgba(107, 74, 47, 0.12);
  /* Акцент для цифр на тёмном фоне: фирменный #6b4a2f там сливается
     (контраст 1,9:1), этот читается — 7,5:1 на карточке калькулятора. */
  --accent-on-dark: #d6b183;

  /* Бумага тёплая. Холодный белый рядом с графитом даёт офисную
     распечатку, тёплый — бланк. */
  --paper: #f5f2ec;
  --surface: #fcfaf6;
  --surface-2: #efebe3;
  --surface-3: #e4ded2;

  --text: #1a1c1e;
  --text-soft: #4e5358;
  --text-faint: #84888c;

  --on-dark: #eae6de;
  --on-dark-soft: #9a9d9f;

  /* Линейки тоже тёплые: серая черта на кремовой бумаге выглядит
     грязной. */
  --rule: #ddd7ca;
  --rule-soft: #e8e3d8;
  --rule-dark: rgba(234, 230, 222, 0.14);

  --ok: #3f6b4a;
  --alert: #8c3a2b;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: var(--sans);

  --gutter: 20px;
  --measure: 68ch;
  --radius: 2px;
  --radius-lg: 3px;

  /* Одна кривая на весь сайт: разнобой в анимации читается как
     несобранность интерфейса. */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

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

/* Атрибут hidden должен прятать всегда: любое display в классе
   (баннер cookies — flex) иначе перебивает его, и «скрытый» блок
   остаётся на странице прозрачным слоем. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.8vw, 4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); letter-spacing: -0.032em; }
h3 { font-size: clamp(1.18rem, 1.9vw, 1.4rem); letter-spacing: -0.018em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent); color: var(--paper); }

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

/* --- Раскладка ------------------------------------------------------------ */

.wrap {
  width: min(1200px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.wrap--narrow { width: min(760px, 100% - var(--gutter) * 2); }
.wrap--mid    { width: min(960px, 100% - var(--gutter) * 2); }

.section { padding-block: clamp(56px, 8vw, 110px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }

.section--dark {
  background: var(--ink-900);
  color: var(--on-dark);
}

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

/* Шапка раздела: надзаголовок с золотой чертой, заголовок, подзаголовок.
   Повторяется на всех страницах — раздел должен узнаваться по форме,
   а не по цвету. */
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-head--center { text-align: center; margin-inline: auto; max-width: 62ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.eyebrow[data-no]::before {
  content: attr(data-no) " ·";
  width: auto;
  height: auto;
  background: none;
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1;
}

.section--dark .eyebrow[data-no]::before { color: var(--accent-lt); }

.section--dark .eyebrow { color: var(--on-dark-soft); }
.section-head--center .eyebrow::before { display: none; }

.section-head p {
  max-width: var(--measure);
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.section--dark .section-head p { color: var(--on-dark-soft); }
.section-head--center p { margin-inline: auto; }

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

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

/* Единственная заливка цветом на всём сайте. Поэтому она означает
   ровно одно: здесь главное действие страницы. */
.btn--accent {
  background: var(--accent);
  color: var(--paper);
}
.btn--accent:hover { background: #573b25; color: var(--paper); }

.btn--ink {
  background: var(--ink-800);
  color: var(--paper);
}
.btn--ink:hover { background: var(--ink-600); color: var(--paper); }

.btn--ghost {
  border-color: var(--rule);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--ink-800); color: var(--ink-800); }

.btn--ghost-light {
  border-color: var(--rule-dark);
  color: var(--on-dark);
  background: transparent;
}
.btn--ghost-light:hover {
  border-color: var(--accent);
  color: var(--accent-lt);
}

.btn--wide { width: 100%; }
.btn--lg { padding: 17px 32px; font-size: 1rem; }

/* Стрелка уезжает вправо при наведении — единственное украшение,
   которое кнопка себе позволяет. */
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* --- Шапка ---------------------------------------------------------------- */

.topbar {
  background: var(--ink-900);
  color: var(--on-dark-soft);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--rule-dark);
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 40px;
  flex-wrap: wrap;
}

.topbar__left { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar a:hover { color: var(--accent-lt); }

.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--on-dark);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lang {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.lang__item {
  min-width: 34px;
  padding: 3px 9px;
  border-radius: 999px;
  text-align: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang__item.is-current { background: var(--on-dark); color: var(--ink-900); }
.topbar .lang__item:not(.is-current):hover { color: var(--accent-lt); }

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-900);
  border-bottom: 1px solid var(--rule-dark);
}

.masthead__row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.logo { display: inline-flex; align-items: center; }
/* Оригинальный растровый логотип старого сайта, белый на прозрачном. */
.logo__img { display: block; width: 60px; height: 50px; }
.logo:hover .logo__img { opacity: 0.85; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav__link {
  position: relative;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--on-dark);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent-lt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav__link:hover { color: var(--on-dark); }
.nav__link:hover::after, .nav__link[aria-current]::after { transform: scaleX(1); }

.nav__cta { margin-left: 12px; }

.burger {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius);
  color: var(--on-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.burger__bars { display: grid; gap: 4px; }
.burger__bars span { display: block; width: 18px; height: 1.5px; background: currentColor; }

.drawer {
  display: none;
  padding: 8px 0 24px;
  border-top: 1px solid var(--rule-dark);
}
.drawer[data-open] { display: block; }

.drawer__link {
  display: block;
  padding: 13px 2px;
  color: var(--on-dark);
  font-size: 1rem;
  border-bottom: 1px solid var(--rule-dark);
}
.drawer__link:hover { color: var(--accent-lt); }
.drawer .btn { margin-top: 18px; }

@media (max-width: 1040px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  color: var(--on-dark);
  padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 112px);
}

/* Три слоя фона: чертёжная сетка, золотое свечение и виньетка.
   По отдельности каждый почти незаметен, вместе дают глубину,
   которой плоская заливка не даёт. */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(234, 230, 222, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(234, 230, 222, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(120% 90% at 18% 0%, #000 30%, transparent 78%);
}

/* Фасад стоит за стеклянной карточкой и обрезается нижней кромкой
   экрана — как настоящий дом не помещается в кадр целиком. Крыша и
   стены выходят из-за карточки: раньше её закрывала вся середина
   дома, и чертежа не было видно вовсе. */
.hero__facade {
  position: absolute;
  right: -6%;
  top: -6%;
  width: min(700px, 62vw);
  color: var(--on-dark);
  --lines: 0.5;
  pointer-events: none;
}

/* На телефоне карточка ниже текста — дом стоит справа за текстом,
   а не за краем экрана, как раньше. */
@media (max-width: 960px) {
  .hero__facade { right: -40%; top: 210px; width: 100vw; --lines: 0.32; }
}

.facade, .skyline { width: 100%; height: auto; display: block; }

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-lt);
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.hero h1 { color: var(--on-dark); }

/* Вторая строка — светлее весом и табачная по цвету: у рубленого
   курсив читается просто наклонённым текстом, а не интонацией. */
.hero h1 em {
  display: block;
  font-style: normal;
  font-weight: 400;
  color: var(--accent-lt);
}

.hero__lead {
  max-width: 52ch;
  margin-top: 26px;
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  color: var(--on-dark-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--rule-dark);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--on-dark-soft);
}

.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

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

/* --- Стеклянный калькулятор ----------------------------------------------- */

.glass {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(234, 230, 222, 0.16);
  border-radius: var(--radius-lg);
  background: linear-gradient(158deg, rgba(61, 66, 71, 0.5), rgba(22, 24, 26, 0.78));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}

/* Золотая нить по верхней кромке — единственная деталь, которая
   отделяет карточку от фона без рамки-«коробки». */
.glass::before {
  content: "";
  position: absolute;
  inset: -1px 24px auto;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-lt), transparent);
}

.calc__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.calc__field + .calc__field { margin-top: 22px; }

.calc__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--on-dark-soft);
}

.calc__value {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
}

/* Ползунок рисуется вручную: системный на тёмном фоне выглядит
   чужеродно в любой из трёх платформ.
   Сам input — высокая прозрачная полоса (44 px, палец), а тонкая линия
   нарисована фоном по центру: при высоте 3 px попасть в ползунок на
   телефоне можно было только «в точку». touch-action: none отдаёт жест
   ползунку целиком (range-touch.js), а не прокрутке страницы. */
.range {
  --track: rgba(234, 230, 222, 0.16);
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: -20px 0;
  background: linear-gradient(var(--track), var(--track)) center / 100% 3px no-repeat;
  outline: none;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.range::-webkit-slider-runnable-track { height: 44px; background: none; }
.range::-moz-range-track { height: 3px; background: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent-lt); outline-offset: 3px; }

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-lt);
  border: 3px solid var(--ink-900);
  box-shadow: 0 0 0 1px var(--accent-lt);
  cursor: grab;
  transition: transform 0.2s var(--ease);
}
.range::-webkit-slider-thumb:hover { transform: scale(1.14); }

.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-lt);
  border: 3px solid var(--ink-900);
  box-shadow: 0 0 0 1px var(--accent-lt);
  cursor: grab;
}

.range__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.74rem;
  color: rgba(154, 157, 159, 0.72);
  font-variant-numeric: tabular-nums;
}

.calc__result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-dark);
}

/* Сумма не должна рваться на две строки: «2 348,18» сверху и «€»
   снизу читается как две разные цифры. Поэтому сумма набрана одной
   строкой, а кегль считается от ширины карточки (cqi), а не экрана:
   карточка калькулятора на странице узкая при широком окне, и кегль
   от ширины окна там переполнял строку. 14cqi вмещает самый длинный
   платёж — 150 000 € на 6 месяцев, «25 7xx,xx €». Подпись «mēnesī»,
   если не влезает, уходит на следующую строку целиком. */
.calc__payment {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.calc__payment b {
  font-family: var(--display);
  font-size: min(3.1rem, 14cqi);
  font-weight: 600;
  color: var(--accent-on-dark);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.glass, .calc-page__result { container-type: inline-size; }

.calc__payment > span { font-size: 0.95rem; color: var(--on-dark-soft); }

.calc__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.calc__meta div { min-width: 0; }
.calc__meta dt {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(154, 157, 159, 0.82);
}
.calc__meta dd {
  margin: 4px 0 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
  .calc__meta { grid-template-columns: repeat(2, 1fr); }
}

.calc__note {
  margin-top: 20px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(154, 157, 159, 0.76);
}

.calc__link { margin-top: 18px; }

/* --- Полоса показателей --------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-dark);
}

.stats__item {
  padding: clamp(26px, 3vw, 38px) 26px;
  border-right: 1px solid var(--rule-dark);
}
.stats__item:last-child { border-right: 0; }
.stats__item:first-child { padding-left: 0; }

.stats__value {
  font-family: var(--display);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 500;
  color: var(--accent-lt);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stats__note {
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--on-dark-soft);
  max-width: 24ch;
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats__item { border-bottom: 1px solid var(--rule-dark); padding-left: 0; padding-right: 18px; }
  /* Правая колонка отступает от разделителя так же, как левая до него. */
  .stats__item:nth-child(2n) { border-right: 0; padding-left: 18px; padding-right: 0; }
  /* «16 000 m²» не должно рваться на две строки в полуколонке телефона. */
  .stats__value { font-size: min(2rem, 7vw); white-space: nowrap; }
}

/* --- Две аудитории -------------------------------------------------------- */

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

.split__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.split__card:hover {
  border-color: var(--ink-600);
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -32px rgba(22, 24, 26, 0.32);
}

/* Полоса появляется слева направо: движение подсказывает, что карточка
   ведёт дальше, а не просто подсветилась. */
.split__card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.split__card:hover::after { transform: scaleX(1); }

.split__count {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.split__card h3 { margin: 14px 0 12px; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.split__card p { color: var(--text-soft); }

.split__list {
  margin: 22px 0 28px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.split__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.94rem;
}

/* «no 11 %» переносить нельзя, а «Рассматриваем индивидуально» — нужно:
   на узком экране запрет переноса выталкивает текст за карточку, и его
   срезает. Поэтому неразрывность держим на самой короткой записи,
   а длинной разрешаем занять вторую строку. */
.split__list .rate {
  font-weight: 600;
  color: var(--ink-700);
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-wrap: balance;
}

@media (min-width: 560px) { .split__list .rate { white-space: nowrap; } }

.split__card .btn { margin-top: auto; align-self: flex-start; }

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

/* --- Карточки программ ---------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.card:hover {
  border-color: var(--ink-600);
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -34px rgba(22, 24, 26, 0.36);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover::after { transform: scaleX(1); }

/* Номер программы крупной контурной антиквой: он держит сетку и даёт
   каталогу вид каталога, а не списка ссылок. */
.card__index {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--surface-3);
  pointer-events: none;
  user-select: none;
  transition: -webkit-text-stroke-color 0.3s var(--ease);
}
.card:hover .card__index { -webkit-text-stroke-color: var(--accent-soft); }

.card__icon {
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
  color: var(--ink-600);
}

.card__tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.card h3 {
  font-size: 1.28rem;
  margin-bottom: 12px;
  padding-right: 48px;
}

.card__lead {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.84rem;
  color: var(--text-faint);
}

.card__terms b {
  color: var(--ink-700);
  font-variant-numeric: tabular-nums;
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-700);
}
.card:hover .card__more { color: var(--accent); }
.card__more .arrow { transition: transform 0.25s var(--ease); }
.card:hover .card__more .arrow { transform: translateX(4px); }

/* Ссылка растянута на всю карточку: кликается карточка, а не «Подробнее». */
.card__link { position: absolute; inset: 0; }

/* --- Шаги сделки ---------------------------------------------------------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* Направляющая проходит через узлы, а не под ними: так последовательность
   читается сразу, без нумерации. */
.steps::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 13px;
  right: 13px;
  height: 1px;
  background: linear-gradient(to right, var(--rule-dark), var(--accent-lt), var(--rule-dark));
}

.step { position: relative; }

.step__node {
  position: relative;
  width: 27px;
  height: 27px;
  margin-bottom: 24px;
  border-radius: 50%;
  border: 1px solid var(--accent-lt);
  background: var(--ink-900);
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.step h3 { font-size: 1.16rem; color: var(--on-dark); margin-bottom: 10px; }
.step p { font-size: 0.92rem; color: var(--on-dark-soft); }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { top: 0; bottom: 0; left: 13px; right: auto; width: 1px; height: auto;
                   background: linear-gradient(to bottom, var(--accent-lt), var(--rule-dark)); }
  .step { padding-left: 52px; padding-bottom: 32px; }
  .step__node { position: absolute; left: 0; top: 0; margin: 0; }
}

/* --- Репрезентативный пример ---------------------------------------------- */

/* Четыре колонки, а не auto-fit: при семи ячейках в ряд подписи
   («Gada procentu likme (GPL)») ломаются на три строки и таблица
   перестаёт читаться. В две строки два ключевых числа — GPL и итог —
   встают рядом, и взгляд находит их сразу. */
.example {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

@media (max-width: 880px) { .example { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .example { grid-template-columns: 1fr; } }

.example__cell {
  padding: 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 118px;
}

.example__cell dt { min-height: 2.6em; }

.example__cell dt {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.4;
}

.example__cell dd {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Два числа, ради которых пример вообще существует: GPL и итог. */
.example__cell--key { background: var(--ink-900); color: var(--on-dark); }
.example__cell--key dt { color: var(--on-dark-soft); }
.example__cell--key dd { color: var(--accent-lt); }

.example__note {
  margin-top: 18px;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--text-faint);
  max-width: var(--measure);
}

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

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

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

.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 22px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s var(--ease);
}
.faq__q:hover { color: var(--ink-600); }

/* Плюс превращается в минус поворотом одной черты — без иконки
   и без подмены символа. */
.faq__sign {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 5px;
}
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.3s var(--ease);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__item[data-open] .faq__sign::after { transform: rotate(0deg); }

.faq__a {
  display: none;
  padding-bottom: 24px;
  max-width: var(--measure);
  color: var(--text-soft);
}
.faq__item[data-open] .faq__a { display: block; }

/* --- Материалы ------------------------------------------------------------ */

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

.post {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.post:hover { border-color: var(--ink-600); transform: translateY(-3px); }

.post__date {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.post h3 { margin: 14px 0 12px; font-size: 1.2rem; }
.post p { font-size: 0.93rem; color: var(--text-soft); }
.post__more { margin-top: 20px; font-size: 0.88rem; font-weight: 600; color: var(--ink-700); }
.post:hover .post__more { color: var(--accent); }

/* --- Полоса обратного звонка ---------------------------------------------- */

.callback {
  position: relative;
  overflow: hidden;
  background: var(--ink-800);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 60px);
  color: var(--on-dark);
}

/* Тот же фасад, что в шапках, — одна графика на весь сайт читается
   как рисунок одной рукой, набор разных — как склад заготовок.
   Здесь он стоит колонкой и виден полностью: подложкой под полями
   ввода чертёж мешал их читать. */
.callback__facade {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--on-dark);
  --lines: 0.5;
}

/* Чертёж шире колонки и обрезается — но не ножом: правая кромка
   растворяется, иначе срез читается ошибкой вёрстки. */
.callback__facade .facade {
  min-width: 250px;
  mask-image: linear-gradient(to right, #000 58%, transparent 96%);
  -webkit-mask-image: linear-gradient(to right, #000 58%, transparent 96%);
}

.callback__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px minmax(300px, 400px);
  gap: clamp(24px, 3vw, 44px);
  align-items: center;
}

.callback h2 { color: var(--on-dark); }
.callback p { margin-top: 14px; color: var(--on-dark-soft); max-width: 46ch; }

.callback__form { display: flex; flex-direction: column; gap: 12px; }

.callback__row { display: flex; gap: 10px; }
.callback__row .field { flex: 1; }

.callback__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--on-dark-soft);
}
.callback__or a { color: var(--accent-lt); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Колонка с чертежом уходит первой: на узком экране место нужнее
   форме, а фасад там всё равно в шапке страницы. */
@media (max-width: 1080px) {
  .callback__inner { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); }
  .callback__facade { display: none; }
}

@media (max-width: 880px) {
  .callback__inner { grid-template-columns: 1fr; }
  .callback__row { flex-direction: column; }
}

/* --- Формы ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 7px; }

.field > label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea { min-height: 116px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink-600);
  box-shadow: 0 0 0 3px rgba(107, 74, 47, 0.12);
}

.field__hint { font-size: 0.78rem; color: var(--text-faint); }
.field__error { font-size: 0.8rem; color: var(--alert); }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--alert); }

/* На тёмном поле поля формы инвертируются: белая заливка на графите
   выглядит вырезанной дырой. */
.on-dark .field > label { color: var(--on-dark-soft); }
.on-dark .field input,
.on-dark .field select,
.on-dark .field textarea {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--rule-dark);
  color: var(--on-dark);
}
.on-dark .field input::placeholder { color: rgba(154, 157, 159, 0.62); }
.on-dark .field input:focus, .on-dark .field textarea:focus {
  border-color: var(--accent-lt);
  box-shadow: 0 0 0 3px rgba(176, 138, 94, 0.16);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-soft);
  cursor: pointer;
}
.check input { margin-top: 3px; flex: none; width: 17px; height: 17px; accent-color: var(--ink-700); }
.on-dark .check { color: var(--on-dark-soft); }
.check a { text-decoration: underline; text-underline-offset: 2px; }

/* Галочка рассылок в заявке — крупная, чтобы её заметили: единственная
   галочка формы и необязательная. Пустая показывает бледный след
   отметки, отмеченная заливается табаком — это то, что нажимают. */
.check--big { align-items: center; gap: 14px; font-size: 0.95rem; color: var(--text); }
.check--big input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  margin: 0;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.check--big input::after {
  content: "";
  width: 14px;
  height: 7px;
  border: solid var(--surface-3);
  border-width: 0 0 3px 3px;
  transform: translateY(-2px) rotate(-45deg);
  transition: border-color 0.2s var(--ease);
}
.check--big input:checked { background: var(--accent); border-color: var(--accent); }
.check--big input:checked::after { border-color: var(--paper); }
.check--big input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
/* В тёмном блоке обратного звонка — та же галочка, инвертированная,
   как поля ввода: белая заливка на графите выглядит дырой. */
.on-dark .check--big { color: var(--on-dark); }
.on-dark .check--big input { background: rgba(255, 255, 255, 0.06); border-color: var(--rule-dark); }
.on-dark .check--big input::after { border-color: rgba(255, 255, 255, 0.14); }
.on-dark .check--big input:checked { background: var(--accent); border-color: var(--accent); }
.on-dark .check--big input:checked::after { border-color: var(--paper); }

/* Согласие на проверку данных — текстом под кнопкой отправки, а не
   галочкой: нажать кнопку и значит согласиться. */
.form-consent { margin-top: 12px; font-size: 0.78rem; line-height: 1.5; color: var(--text-faint); }
.form-consent a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 2px; }
.on-dark .form-consent { color: var(--on-dark-soft); }
.on-dark .form-consent a { color: var(--on-dark); }
.form-consent--end { text-align: right; }
@media (max-width: 560px) { .form-consent--end { text-align: left; } }

/* Ловушка для ботов. Не display:none — часть заполнителей форм такие
   поля пропускает; уводим за пределы экрана. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.form-grid--full { grid-template-columns: 1fr; }
.form-grid .span-2 { grid-column: 1 / -1; }

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}

.form-section + .form-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.form-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.form-section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.tabs {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 32px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.tabs a {
  padding: 10px 22px;
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.tabs a[aria-current] { background: var(--ink-800); color: var(--paper); }

.flash {
  padding: 14px 18px;
  margin-bottom: 24px;
  border-left: 3px solid var(--alert);
  background: rgba(179, 64, 47, 0.07);
  font-size: 0.92rem;
  color: var(--alert);
}
.flash--ok { border-color: var(--ok); background: rgba(31, 122, 92, 0.07); color: var(--ok); }

/* --- Страница программы --------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  color: var(--on-dark);
  padding-block: clamp(40px, 5vw, 76px) clamp(44px, 6vw, 84px);
}

.page-hero__facade {
  position: absolute;
  right: 2%;
  bottom: -22%;
  width: min(360px, 42vw);
  color: var(--on-dark);
  --lines: 0.26;
  pointer-events: none;
}

.page-hero__inner { position: relative; }
.page-hero h1 { color: var(--on-dark); font-size: clamp(2rem, 4.4vw, 3.2rem); }
.page-hero__lead {
  margin-top: 20px;
  max-width: 58ch;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  color: var(--on-dark-soft);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: 0.82rem;
  color: var(--on-dark-soft);
}
.crumbs a:hover { color: var(--accent-lt); }
.crumbs span[aria-hidden] { opacity: 0.4; }

/* Условия программы — самая важная таблица на сайте: её читают
   прежде текста и по ней сравнивают с банком. */
.terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  margin-top: clamp(32px, 4vw, 48px);
  background: var(--rule-dark);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.terms__cell { padding: 22px; background: var(--ink-900); }
.terms__cell dt {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.terms__cell dd {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 1.42rem;
  font-weight: 600;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.terms__cell--accent dd { color: var(--accent-lt); }

/* «Izskatām individuāli» и адрес залога — текст, а не число. Крупная
   антиква под них не рассчитана: строка ломается и перевешивает
   соседние ячейки с цифрами. */
.terms__cell dd.is-text {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
}
.terms__cell dd small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--on-dark-soft);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 960px) { .product-layout { grid-template-columns: 1fr; } }

.prose { max-width: var(--measure); font-size: 1.05rem; color: var(--text-soft); }
.prose p { margin-bottom: 1.15em; }
.prose strong { color: var(--text); }
.prose h2 { margin: 1.6em 0 0.6em; font-size: 1.7rem; color: var(--text); }
.prose h3 { margin: 1.5em 0 0.5em; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose a { color: var(--ink-700); text-decoration: underline; text-underline-offset: 2px; }

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

.ticks li {
  position: relative;
  padding: 13px 0 13px 34px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.97rem;
}
.ticks li:first-child { border-top: 1px solid var(--rule); }

/* Галочка нарисована двумя чертами: иконочный шрифт ради одного знака
   грузить незачем. */
.ticks li::before,
.ticks li::after {
  content: "";
  position: absolute;
  background: var(--accent);
}
.ticks li::before { left: 4px; top: 21px; width: 6px; height: 1.5px; transform: rotate(45deg); }
.ticks li::after  { left: 7px; top: 19px; width: 12px; height: 1.5px; transform: rotate(-52deg); }

.docs-list { margin: 0; padding: 0; list-style: none; counter-reset: doc; }

.docs-list li {
  position: relative;
  padding: 13px 0 13px 38px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.97rem;
  counter-increment: doc;
}
.docs-list li:first-child { border-top: 1px solid var(--rule); }
.docs-list li::before {
  content: counter(doc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.aside-card {
  position: sticky;
  top: 96px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}

.aside-card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.aside-card p { font-size: 0.92rem; color: var(--text-soft); margin-bottom: 20px; }

.aside-card__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--text-faint);
}
.aside-card__phone b { color: var(--ink-700); font-variant-numeric: tabular-nums; }

/* --- Таблицы -------------------------------------------------------------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-lg); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}

table.data th, table.data td { padding: 12px 18px; text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }

table.data thead th {
  position: sticky;
  top: 0;
  background: var(--ink-900);
  color: var(--on-dark);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

table.data tbody tr { border-top: 1px solid var(--rule); }
table.data tbody tr:nth-child(even) { background: var(--surface-2); }
table.data tbody tr:hover { background: var(--accent-soft); }

/* --- Вехи ----------------------------------------------------------------- */

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--rule));
}

.timeline li { position: relative; padding: 0 0 34px 34px; }
.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--accent);
}

.timeline__year {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-700);
  font-variant-numeric: tabular-nums;
}
.timeline p { margin-top: 6px; color: var(--text-soft); max-width: 56ch; }

/* --- Ценности ------------------------------------------------------------- */

.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; }
.values > div { padding: 30px 26px; background: var(--surface); }
.values h3 { font-size: 1.14rem; margin-bottom: 10px; }
.values p { font-size: 0.93rem; color: var(--text-soft); }

/* --- Контакты ------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contact-grid > div { padding: 26px; background: var(--surface); }
.contact-grid dt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-grid dd { margin: 10px 0 0; font-size: 1.05rem; font-weight: 600; }
.contact-grid dd a:hover { color: var(--ink-600); }
.contact-grid dd small { display: block; margin-top: 6px; font-size: 0.85rem; font-weight: 400; color: var(--text-soft); }

.requisites { margin: 0; font-size: 0.93rem; }
.requisites div { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.requisites dt { min-width: 13ch; color: var(--text-faint); }
.requisites dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

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

.footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  color: var(--on-dark-soft);
  padding-top: clamp(48px, 6vw, 80px);
  font-size: 0.9rem;
}

.footer__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: 48px;
}

.footer h4 {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark);
}

.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li { margin-bottom: 11px; }
.footer a:hover { color: var(--accent-lt); }

.footer__brand p { margin-top: 18px; max-width: 34ch; }

.footer__license {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.82rem;
  line-height: 1.55;
  max-width: 42ch;
}

.footer__legal {
  padding: 28px 0;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(154, 157, 159, 0.76);
}

.footer__legal p { max-width: 96ch; }

.footer__warning {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--accent-lt);
  color: var(--accent-lt);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.8rem;
}

.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }

@media (max-width: 900px) {
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer__cols { grid-template-columns: 1fr; }
}

/* --- Липкая полоса на телефоне -------------------------------------------- */

.sticky-cta {
  position: fixed;
  inset: auto 0 0;
  z-index: 70;
  display: none;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(22, 24, 26, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--rule-dark);
}
.sticky-cta .btn { flex: 1; padding: 13px 16px; font-size: 0.9rem; }

@media (max-width: 720px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 74px; }
}

/* --- Появление при прокрутке ---------------------------------------------- */

/* Начальное состояние — только когда скрипт работает (.js ставится
   в <head>). Сдвиг через translate, а не transform: transform у
   показанного блока перебивал бы подъём карточки при наведении. */
.js [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.8s var(--ease), translate 0.9s var(--ease);
}
.js [data-reveal][data-visible] { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; translate: none; }
}

/* --- Мелочи --------------------------------------------------------------- */

.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-soft); max-width: var(--measure); }
.muted { color: var(--text-faint); }
.nums { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.mt-l { margin-top: clamp(32px, 4vw, 52px); }
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: var(--ink-700);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.link-more:hover { color: var(--accent); }
.section--dark .link-more { color: var(--accent-lt); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink-900);
  border-radius: var(--radius);
}

/* --- Админка -------------------------------------------------------------- */

.admin-shell { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.admin-shell h1 { font-size: 1.8rem; margin-bottom: 24px; }
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--ok { background: rgba(31, 122, 92, 0.12); color: var(--ok); }
.badge--wait { background: rgba(179, 64, 47, 0.12); color: var(--alert); }

/* --- Страница калькулятора ------------------------------------------------ */

.calc-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.calc-page__controls .calc__field + .calc__field { margin-top: 34px; }
.calc-page .calc__label { color: var(--text-soft); }
.calc__value--dark { color: var(--ink-800); }

.range--dark { --track: var(--surface-3); }

/* На сенсорных экранах бегунок крупнее — под палец, а не под курсор. */
@media (pointer: coarse) {
  .range { --thumb: 28px; }
  .range::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: 8px; }
  .range::-moz-range-thumb { width: 22px; height: 22px; }
}
.range--dark::-webkit-slider-thumb {
  background: var(--accent);
  border-color: var(--paper);
  box-shadow: 0 0 0 1px var(--accent);
}
.range--dark::-moz-range-thumb {
  background: var(--accent);
  border-color: var(--paper);
  box-shadow: 0 0 0 1px var(--accent);
}
.range__scale--dark { color: var(--text-faint); }

.calc-page__result {
  position: sticky;
  top: 96px;
  padding: 30px 28px;
  background: var(--ink-900);
  border-radius: var(--radius-lg);
  color: var(--on-dark);
}

.result-list { margin: 26px 0 24px; padding-top: 22px; border-top: 1px solid var(--rule-dark); }
.result-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  font-size: 0.92rem;
}
.result-list dt { color: var(--on-dark-soft); }
/* Сумма не рвётся: переносится подпись слева, а не «€» справа. */
.result-list dd { margin: 0; font-weight: 600; color: var(--on-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-list__total {
  margin-top: 8px;
  padding-top: 14px !important;
  border-top: 1px solid var(--rule-dark);
}
.result-list__total dd { color: var(--accent-lt); font-size: 1.1rem; }

.breakdown { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--rule); }

.breakdown__title {
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.breakdown__bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
}

.breakdown__part { display: block; height: 100%; transition: width 0.4s var(--ease); }
.breakdown__part--principal { background: var(--ink-700); }
.breakdown__part--interest  { background: var(--accent); }
.breakdown__part--fee       { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--rule); }

.breakdown__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.breakdown__legend li { display: inline-flex; align-items: center; gap: 8px; }
.breakdown__legend b { color: var(--text); font-variant-numeric: tabular-nums; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot--principal { background: var(--ink-700); }
.dot--interest  { background: var(--accent); }
.dot--fee       { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--rule); }

@media (max-width: 900px) {
  .calc-page { grid-template-columns: 1fr; }
  .calc-page__result { position: static; }
}

.on-dark-title { color: var(--on-dark); }

/* --- Страница «спасибо» --------------------------------------------------- */

.thanks { padding-block: clamp(40px, 7vw, 90px); }

.thanks__mark {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 32px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

/* --- Списки на служебных страницах ---------------------------------------- */

.faq-group + .faq-group, .doc-group + .doc-group { margin-top: clamp(40px, 5vw, 64px); }
.faq-group h2, .doc-group h2 { margin-bottom: 20px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

.doc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }

.doc-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.doc-list__icon { flex: none; color: var(--ink-600); }
.doc-list__body { flex: 1; min-width: 0; }
.doc-list__body b { display: block; font-weight: 600; }
.doc-list__body small { display: block; margin-top: 3px; font-size: 0.85rem; color: var(--text-faint); }

.doc-list__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink-700);
}
.doc-list__action:hover { color: var(--accent); }
.doc-list__action--muted { color: var(--text-faint); font-weight: 400; }

@media (max-width: 560px) {
  .doc-list li { flex-wrap: wrap; }
  .doc-list__action { width: 100%; padding-left: 36px; }
}

.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(28px, 4vw, 52px); }
.sitemap-cols h2 { font-size: 1.3rem; margin-bottom: 18px; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 0.94rem; }
.plain-list a:hover { color: var(--ink-600); }
.badge--info { background: rgba(107, 74, 47, 0.12); color: var(--ink-700); }

/* ==========================================================================
   Язык документа
   ==========================================================================
   Набор приёмов, которыми набирают межевой план, выписку из земельной
   книги и бланк строгой отчётности. В монохроме именно они делают
   работу, которую в цветной вёрстке делает цвет: разделяют разделы,
   отмечают важное, задают ритм. */

/* --- Зерно бумаги --------------------------------------------------------- */
/* Ровная заливка кремовым выглядит как незагрузившийся фон. Зерно даёт
   поверхности материальность, оставаясь на пороге различимости. */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

/* Содержимое должно лежать над зерном, иначе оно затрёт текст.
   Шапку и мобильную полосу сюда не включать: у них своё позиционирование
   (sticky и fixed) с z-index выше зерна, а это правило стоит ниже по файлу
   и перебивало его — шапка переставала липнуть, полоса уезжала в конец
   страницы. */
.topbar, main, .footer { position: relative; z-index: 2; }

/* --- Двойная линейка ------------------------------------------------------ */
/* Две черты разной толщины под заголовком — подпись бланка. Одна черта
   читается как разделитель, две — как оформление документа. */

.rule-double {
  position: relative;
  height: 4px;
  margin: 22px 0 0;
  border-top: 1.5px solid currentColor;
  opacity: 0.85;
}
.rule-double::after {
  content: "";
  position: absolute;
  inset: 3px 0 auto;
  border-top: 0.5px solid currentColor;
  opacity: 0.6;
}

.section-head .rule-double { max-width: 108px; color: var(--accent); }
.section--dark .section-head .rule-double { color: var(--accent-lt); }

/* --- Угловые засечки ------------------------------------------------------ */
/* Рамка съёмочного плана: углы обозначены, сторон нет. Замкнутая рамка
   превращает блок в коробку, углы — оставляют его частью листа.
//
   Засечки рисуются на ::before и ::after, поэтому .framed нельзя вешать
   на блок, у которого эти псевдоэлементы уже заняты: правила сольются
   и вместо уголка выйдет залитый квадрат. */

.framed { position: relative; }

.framed::before,
.framed::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  opacity: 0.5;
  pointer-events: none;
}
.framed::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.framed::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.section--dark .framed::before,
.section--dark .framed::after { border-color: var(--accent-lt); opacity: 0.6; }

/* --- Номер раздела в поле ------------------------------------------------- */
/* Римская цифра на левом поле и волосяная черта под ней — регистр
   разделов, как нумерация статей в договоре. */

.section-head { position: relative; }

.section-mark {
  display: block;
  margin-bottom: 14px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--accent);
  font-feature-settings: "lnum" 1;
}
.section--dark .section-mark { color: var(--accent-lt); }

/* --- Вертикальная метка на кромке ----------------------------------------- */

.edge-label {
  position: absolute;
  left: -54px;
  top: 0;
  writing-mode: vertical-rl;
  /* Без запрета переноса строка ломается на две вертикальные колонки
     и налезает на номер раздела. */
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  user-select: none;
}
.section--dark .edge-label { color: var(--on-dark-soft); opacity: 0.6; }

@media (max-width: 1440px) { .edge-label { display: none; } }

/* --- Буквица -------------------------------------------------------------- */
/* Обычная литера того же шрифта, просто крупно. Никакой отдельной
   гарнитуры: буквица должна открывать текст, а не отвлекать от него. */

.prose--dropcap > p:first-of-type::first-letter {
  float: left;
  margin: 0.02em 0.11em 0 0;
  font-size: 3.4em;
  line-height: 0.88;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--accent);
}

/* --- Заметка на поле ------------------------------------------------------ */

.marginalia {
  margin: 28px 0;
  padding: 2px 0 2px 20px;
  border-left: 1px solid var(--accent);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.marginalia b { display: block; margin-bottom: 4px; color: var(--text); }

/* --- Гроссбух ------------------------------------------------------------- */
/* Таблица без заливок: только волосяные линейки и табличные цифры.
   Полосатая заливка строк — приём из интерфейсов, а не из документов,
   и рядом с гравюрой выглядит чужой. */

table.data tbody tr:nth-child(even) { background: transparent; }
table.data tbody tr { border-top: 1px solid var(--rule-soft); }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data tbody tr:nth-child(12n) { border-top-color: var(--rule); }
table.data thead th { background: var(--ink-900); color: var(--on-dark); }

/* --- Мелочи --------------------------------------------------------------- */

/* Всё, что пересчитывается на глазах, — табличными цифрами, иначе
   строка дёргается при каждом движении ползунка. */
.nums, .calc__value, .calc__payment b, .calc__meta dd, .result-list dd,
table.data, .terms__cell dd, .example__cell dd { font-variant-numeric: tabular-nums; }

/* --- Линия крыш ----------------------------------------------------------- */
/* Полоса стоит между разделами и подхватывает цвет того, к которому
   примыкает: сверху светлый фон, снизу графит, силуэт рисуется
   графитом по светлому. */

.skyline-band {
  position: relative;
  overflow: hidden;
  line-height: 0;
  background: var(--paper);
  color: var(--ink-900);
}

.skyline-band .skyline {
  width: 100%;
  height: auto;
  opacity: 0.3;
}

/* Полоса перед тёмным разделом: под крышами уже графит. */
.skyline-band--down { background: var(--paper); }
.skyline-band--down::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--ink-900);
}

.section--surface + .skyline-band { background: var(--surface-2); }

/* --- Виды залога ---------------------------------------------------------- */

.ptypes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.ptype {
  margin: 0;
  padding: 26px 24px 28px;
  background: var(--paper);
  transition: background 0.3s var(--ease);
}
.ptype:hover { background: var(--surface); }

/* Чертежи крупнее подписей: смысл раздела в них, а не в тексте. */
.ptype svg {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin: 0 auto 24px;
  color: var(--ink-700);
}

/* Общая линия земли у всех четырёх должна совпадать по высоте, иначе
   ряд рассыпается. Одинаковый viewBox это и обеспечивает. */
.ptype { display: flex; flex-direction: column; }

.ptype figcaption b {
  display: block;
  margin-bottom: 7px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ptype figcaption span {
  display: block;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
}

@media (max-width: 900px) { .ptypes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ptypes { grid-template-columns: 1fr; } }

/* Полоса перед подвалом примыкает к светлому разделу, каким бы он
   ни был: страницы заканчиваются по-разному. */
main + .skyline-band { background: var(--paper); }

/* Русский «Кредитный калькулятор · от 11 %» в шапке карточки длиннее
   латышского и на узком экране ломается пополам. Ужимаем разрядку. */
@media (max-width: 460px) {
  .calc__title { font-size: 0.72rem; letter-spacing: 0.08em; }
}

/* ==========================================================================
   Движение
   ==========================================================================
   Правило одно: двигается то, что имеет отношение к недвижимости или
   к деньгам. Чертежи дочерчиваются, окна загораются, цифры
   прокатываются, рельс сделки заполняется. Ничего не прыгает
   и не крутится ради того, чтобы крутиться.

   Все начальные состояния — под .js: без скрипта страница целиком
   видна в конечном виде. Всё движение гаснет при prefers-reduced-motion
   (общее правило в начале файла плюс проверки в контроллерах). */

/* --- Первый экран: выход на сцену ---------------------------------------- */

@keyframes rise-line { from { transform: translateY(108%); } to { transform: translateY(0); } }
@keyframes fade-up   { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes rule-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Строки заголовка поднимаются каждая из-под своей кромки. */
.hero__title .line { display: block; overflow: hidden; padding-block: 0.12em; margin-block: -0.12em; }
.hero__title .line > span { display: inline-block; }

.js .hero__title .line > span { animation: rise-line 1.1s var(--ease) both; }
.js .hero__title .line:nth-child(1) > span { animation-delay: 0.25s; }
.js .hero__title .line:nth-child(2) > span { animation-delay: 0.4s; }

.js .hero__eyebrow   { animation: fade-in 0.9s ease 0.1s both; }
.js .hero__eyebrow::before,
.js .hero__eyebrow::after { transform-origin: center; animation: rule-grow 0.9s var(--ease) 0.2s both; }
.js .hero__lead      { animation: fade-up 0.9s var(--ease) 0.65s both; }
.js .hero__actions   { animation: fade-up 0.9s var(--ease) 0.8s both; }
.js .hero__chips     { animation: fade-up 0.9s var(--ease) 0.95s both; }
.js .hero .glass     { animation: fade-up 1.1s var(--ease) 0.55s both; }
.js .scroll-cue      { animation: fade-in 1s ease 1.6s both; }

/* Страницы второго уровня: заголовок тоже выезжает, но быстрее —
   человек пришёл сюда за условиями, а не за спектаклем. */
.js .page-hero h1          { animation: fade-up 0.8s var(--ease) 0.05s both; }
.js .page-hero__lead       { animation: fade-up 0.8s var(--ease) 0.18s both; }
.js .page-hero .terms      { animation: fade-up 0.9s var(--ease) 0.3s both; }
.js .page-hero .crumbs     { animation: fade-in 0.8s ease both; }

/* --- Сетка под фонарём ---------------------------------------------------- */
/* Второй слой сетки — плотнее и светлее первого — виден только в круге
   вокруг курсора. Получается чертёж, который подсвечивают фонарём. */

.hero__grid--lit {
  background-image:
    linear-gradient(to right, rgba(176, 138, 94, 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(176, 138, 94, 0.28) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0;
  transition: opacity 0.6s ease;
  -webkit-mask-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 72%);
  mask-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 72%);
}
.hero.has-spotlight:hover .hero__grid--lit { opacity: 1; }

/* Мягкое табачное свечение под курсором поверх всего фона. */
.hero.has-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(176, 138, 94, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero.has-spotlight:hover::after { opacity: 1; }

.page-hero.has-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(176, 138, 94, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.page-hero.has-spotlight:hover::after { opacity: 1; }

/* --- Фасад: линии и свет -------------------------------------------------- */

.facade__lines { opacity: var(--lines, 0.3); }

.facade .win {
  opacity: 0;
  transition: opacity 1.8s ease;
}
.facade .win.is-lit { opacity: 0.62; }

.callback__facade .facade .win.is-lit { opacity: 0.5; }

/* Пунктирные линии чертежа не дочерчиваются, а проявляются в конце. */
/* Прозрачность здесь только гасится и отпускается, а не ставится в 1:
   у многих элементов своя прозрачность в атрибуте (табачная заливка —
   0.14), и жёсткая единица залила бы их сплошным цветом. */
.draw-fade { transition: opacity 0.9s ease 0.8s; }
.is-drawing:not(.is-drawn) .draw-fade { opacity: 0; }

/* --- Указатель прокрутки -------------------------------------------------- */

@keyframes cue-run {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

.scroll-cue {
  position: absolute;
  left: max(var(--gutter), calc((100% - 1200px) / 2));
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.scroll-cue__line {
  position: relative;
  width: 1px;
  height: 38px;
  overflow: hidden;
  background: var(--rule-dark);
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--accent-lt));
  animation: cue-run 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}

@media (max-width: 960px) { .scroll-cue { display: none; } }

/* --- Калькулятор: наклон -------------------------------------------------- */

.glass.has-tilt {
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.glass.has-tilt:hover { box-shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.85); }

/* --- Роликовые цифры ------------------------------------------------------ */

.odo { display: inline-flex; align-items: baseline; white-space: nowrap; }

.odo__digit {
  position: relative;
  display: inline-block;
  height: 1.12em;
  overflow: hidden;
  line-height: 1.12;
  vertical-align: bottom;
}

/* Ленту рисует псевдоэлемент: десять строк по одной цифре. В тексте
   документа её нет — см. комментарий в lib/odometer.js. */
.odo__strip {
  display: block;
  transition: transform 1.05s cubic-bezier(.2, .9, .25, 1);
}
.odo__strip::before {
  content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
  display: block;
  white-space: pre;
  line-height: 1.12;
  text-align: center;
}

.odo__char { display: inline-block; line-height: 1.12; }
.odo__char::before { content: attr(data-char); }

/* Настоящее значение — для чтения экраном и копирования, не для глаз. */
.odo__value {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.odo { position: relative; }

/* Разряды катятся не синхронно, а лесенкой справа налево — как
   механический счётчик, где младший разряд тянет старший. */
.odo .odo__digit:nth-last-child(1) .odo__strip { transition-delay: 0ms; }
.odo .odo__digit:nth-last-child(2) .odo__strip { transition-delay: 40ms; }
.odo .odo__digit:nth-last-child(3) .odo__strip { transition-delay: 80ms; }
.odo .odo__digit:nth-last-child(4) .odo__strip { transition-delay: 120ms; }
.odo .odo__digit:nth-last-child(5) .odo__strip { transition-delay: 160ms; }
.odo .odo__digit:nth-last-child(6) .odo__strip { transition-delay: 200ms; }

.stats__value .odo__strip { transition-duration: 1.6s; }

/* --- Рельс сделки --------------------------------------------------------- */
/* Базовая линия остаётся, поверх неё идёт табачная заливка длиной
   --progress. Рельс кончается на центре последнего узла, а не у края
   колонки: иначе заливка доходила бы до четвёртого узла раньше, чем
   тот загорался. */

.steps::before { right: calc(25% - 34px); background: var(--rule-dark); }

.steps::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 13px;
  right: calc(25% - 34px);
  height: 1px;
  background: linear-gradient(to right, var(--accent-lt), #e2b77f);
  box-shadow: 0 0 12px rgba(226, 183, 127, 0.5);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  transition: transform 0.25s linear;
}

.step__node {
  z-index: 1;
  transition: background 0.5s var(--ease), color 0.5s var(--ease),
              box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}
.step__node.is-active {
  background: var(--accent-lt);
  color: var(--ink-900);
  box-shadow: 0 0 0 6px rgba(176, 138, 94, 0.14), 0 0 22px rgba(226, 183, 127, 0.35);
  transform: scale(1.08);
}
.step h3 { transition: color 0.5s ease; }
.step:has(.is-active) h3 { color: var(--accent-lt); }

@media (max-width: 900px) {
  .steps::before { right: auto; }
  .steps::after {
    top: 0;
    bottom: 0;
    left: 13px;
    right: auto;
    width: 1px;
    height: auto;
    transform-origin: top;
    transform: scaleY(var(--progress, 0));
    background: linear-gradient(to bottom, var(--accent-lt), #e2b77f);
  }
}

/* --- Двойная линейка дочерчивается ---------------------------------------- */

.js .section-head .rule-double {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease) 0.15s;
}
.js .section-head--center .rule-double { transform-origin: center; }
.js .section-head[data-visible] .rule-double { transform: scaleX(1); }

/* --- Пятно света на карточках --------------------------------------------- */

.card, .split__card, .ptype { position: relative; }

.card.has-spotlight::before,
.split__card.has-spotlight::before,
.ptype.has-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(107, 74, 47, 0.09), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card.has-spotlight:hover::before,
.split__card.has-spotlight:hover::before,
.ptype.has-spotlight:hover::before { opacity: 1; }

.card > *, .split__card > *, .ptype > * { position: relative; z-index: 1; }
.card > .card__index { position: absolute; }
.card > .card__link  { position: absolute; z-index: 2; }

/* Чертёж вида залога чуть приподнимается при наведении. */
.ptype svg { transition: transform 0.6s var(--ease); }
.ptype:hover svg { transform: translateY(-4px); }

/* --- Иконка дочерчивается при наведении ----------------------------------- */

@keyframes icon-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Медленно и ровно: быстрая отрисовка на наведении читается миганием,
   а не жестом пера. Кривая симметричная — линия трогается мягко
   и так же мягко доходит до конца. */
.card:hover .card__icon path {
  stroke-dasharray: 1;
  animation: icon-draw 2.6s cubic-bezier(.45, 0, .25, 1) both;
}
.card .card__icon { transition: color 0.9s ease; }
.card:hover .card__icon { color: var(--accent); }

/* --- Блик на главной кнопке ----------------------------------------------- */

.btn--accent::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  z-index: -1;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 205, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.75s var(--ease);
}
.btn--accent:hover::after { left: 120%; }

/* --- Полоса прочитанного -------------------------------------------------- */

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  z-index: 2;
  background: linear-gradient(to right, var(--accent), var(--accent-lt), #e2b77f);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* --- Меньше движения ------------------------------------------------------ */
/* Общее правило в начале файла обнуляет длительности, но бесконечные
   циклы и начальные состояния лучше выключить явно. */

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line::after { animation: none; }
  .js .hero__title .line > span { animation: none; opacity: 1; transform: none; }
  .js .section-head .rule-double { transform: none; }
}

/* --- Варианты сценария ---------------------------------------------------- */

.variants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.variant { padding: 22px 22px 20px; background: var(--surface); }
.variant h3 { font-size: 1.06rem; margin-bottom: 8px; }
.variant p { font-size: 0.93rem; color: var(--text-soft); margin: 0; }

/* --- Репрезентативный пример строкой -------------------------------------- */

.rep-line {
  max-width: 96ch;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-faint);
}
.rep-line__label { font-weight: 600; color: var(--text-soft); }
.rep-line a { margin-left: 6px; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.section--dark .rep-line, .hero .rep-line { color: var(--on-dark-soft); }
.section--dark .rep-line__label, .hero .rep-line__label { color: var(--on-dark); }
.hero .rep-line a { color: var(--accent-lt); }

/* --- Калькулятор «Cik varu saņemt» ---------------------------------------- */

.borrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.borrow__inputs .calc__field { margin-top: 30px; }
.borrow__inputs .calc__label { color: var(--text-soft); }

.borrow__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.borrow__result {
  padding: 30px 28px;
  background: var(--ink-900);
  border-radius: var(--radius-lg);
  color: var(--on-dark);
  container-type: inline-size;
}

.borrow__caption { display: block; font-size: 0.86rem; color: var(--on-dark-soft); }

.borrow__limit {
  display: block;
  margin-top: 8px;
  font-size: min(3rem, 13cqi);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--accent-lt);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.borrow__over { display: none; margin-top: 8px; font-size: 0.82rem; color: var(--on-dark-soft); }
.borrow[data-over-max] .borrow__over { display: block; }
.borrow[data-over-max] .borrow__limit::before { content: "≥ "; opacity: 0.6; }

.borrow__outside p { color: var(--on-dark-soft); margin-bottom: 20px; }
.borrow__result .calc__note { margin-top: 18px; }
.borrow__result .result-list { margin: 22px 0; }

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

/* --- Сценарии на главной -------------------------------------------------- */

.scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.scenario {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 30px 28px 26px;
  background: var(--paper);
  transition: background 0.4s var(--ease);
}
.scenario:hover { background: var(--surface); }

.scenario__no {
  position: absolute;
  top: 26px;
  right: 28px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.scenario__icon { color: var(--ink-600); margin-bottom: 22px; transition: color 0.9s ease; }
.scenario:hover .scenario__icon { color: var(--accent); }
.scenario:hover .scenario__icon path {
  stroke-dasharray: 1;
  animation: icon-draw 2.6s cubic-bezier(.45, 0, .25, 1) both;
}

.scenario h3 { font-size: 1.28rem; margin-bottom: 10px; }
.scenario p { font-size: 0.93rem; color: var(--text-soft); margin-bottom: 22px; }

.scenario__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
.scenario__more .arrow { transition: transform 0.3s var(--ease); }
.scenario:hover .scenario__more .arrow { transform: translateX(4px); }

/* Плитка для предприятий — графитовая: это вход в другой раздел,
   а не ещё одна ситуация в том же ряду. */
.scenario--business { background: var(--ink-900); color: var(--on-dark); }
.scenario--business:hover { background: var(--ink-800); }
.scenario--business p { color: var(--on-dark-soft); }
.scenario--business .scenario__icon { color: var(--accent-lt); }
.scenario--business .scenario__more { color: var(--accent-lt); }
.scenario--business .scenario__no { color: var(--on-dark-soft); }

.scenario.has-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(107, 74, 47, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.scenario.has-spotlight:hover::before { opacity: 1; }
.scenario > * { position: relative; }
.scenario > .scenario__no { position: absolute; }

@media (max-width: 900px) { .scenarios { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .scenarios { grid-template-columns: 1fr; } .scenario { min-height: 0; } }

/* Строка репрезентативного примера под первым экраном. */
.hero__rep { position: relative; margin-top: clamp(28px, 4vw, 44px); }
.hero__rep .rep-line { max-width: 110ch; }

/* --- Калькулятор перекредитования ---------------------------------------- */

.refi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.refi__head, .refi__row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 36px;
  gap: 12px;
  align-items: center;
}
.refi__head {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.refi__row { margin-bottom: 10px; }
.refi__row .field input { padding: 11px 13px; }
.refi__mobile-label { display: none; }

.refi__remove {
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-faint);
  cursor: pointer;
}
.refi__remove:hover { border-color: var(--alert); color: var(--alert); }

.refi__term { margin-top: 30px; }
.refi__term .calc__label { color: var(--text-soft); }

.refi__result {
  padding: 28px 26px;
  background: var(--ink-900);
  border-radius: var(--radius-lg);
  color: var(--on-dark);
}
.refi__result .result-list:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.refi__result .result-list { margin: 18px 0; }
.refi__result .result-list__total dd.is-worse { color: #d9a08c; }
.refi__warning {
  margin: 0 0 20px;
  padding-left: 14px;
  border-left: 2px solid #d9a08c;
  font-size: 0.86rem;
  color: var(--on-dark-soft);
}

@media (max-width: 900px) { .refi { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .refi__head { display: none; }
  .refi__row { grid-template-columns: 1fr 1fr; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .refi__row > label:first-child { grid-column: 1 / -1; }
  .refi__mobile-label { display: block; font-size: 0.78rem; color: var(--text-faint); }
}

/* --- Анкета по шагам ------------------------------------------------------ */

.wizard__step { margin: 0; padding: 0; border: 0; min-width: 0; }
.wizard__step + .wizard__step { margin-top: 40px; }
.wizard__step legend { width: 100%; padding: 0; }

/* Скрываем шаги только когда мастер запущен: без скрипта анкета видна
   целиком и отправляется обычной формой. */
.wizard.is-ready .wizard__step { display: none; margin-top: 0; }
.wizard.is-ready .wizard__step.is-current { display: block; animation: fade-up 0.5s var(--ease) both; }
.wizard:not(.is-ready) .wizard__nav button[type=button] { display: none; }
.wizard:not(.is-ready) .wizard__progress { display: none; }

.wizard__progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.wizard__progress li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 2px solid var(--rule);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-faint);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.wizard__progress li span {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.74rem;
}
.wizard__progress li.is-current { border-color: var(--accent); color: var(--text); }
.wizard__progress li.is-done { border-color: var(--accent); color: var(--accent); }
.wizard__progress li.is-done span { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.wizard__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.wizard__consents { margin-top: 26px; }

@media (max-width: 560px) {
  .wizard__progress li { font-size: 0; gap: 0; justify-content: center; }
  .wizard__nav .btn--lg { padding-inline: 20px; }
}

/* --- Баннер cookies ------------------------------------------------------- */
/* Сам баннер — из гема landing_kit; здесь тёмные цвета сайта. */
.lk-consent {
  --lk-bg: rgba(22, 24, 26, 0.97); --lk-text: var(--on-dark); --lk-muted: var(--on-dark-soft);
  --lk-line: var(--rule-dark); --lk-accent: var(--accent); --lk-accent-text: #fff;
  --lk-radius: var(--radius-lg); --lk-font: var(--sans);
  backdrop-filter: blur(10px);
}
.lk-consent__text a { color: var(--accent-lt); }
.lk-consent__btn--ghost { color: var(--on-dark); }

/* --- Статья: подзаголовки, списки, следующий шаг ------------------------- */

.prose h2 { margin: 1.8em 0 0.6em; font-size: clamp(1.4rem, 2.4vw, 1.75rem); color: var(--text); }
.prose ul { margin: 0 0 1.2em; padding: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: 0.55em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.related-cta {
  display: grid;
  gap: 6px;
  margin-top: clamp(36px, 5vw, 56px);
  padding: 28px 30px;
  background: var(--ink-900);
  border-radius: var(--radius-lg);
  color: var(--on-dark);
  transition: background 0.4s var(--ease);
}
.related-cta:hover { background: var(--ink-800); }
.related-cta__label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-lt); }
.related-cta b { font-size: 1.3rem; letter-spacing: -0.02em; }
.related-cta span:not([class]) { color: var(--on-dark-soft); font-size: 0.95rem; }
.related-cta__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; color: var(--accent-lt); }
.related-cta:hover .arrow { transform: translateX(4px); }

/* На телефоне шапке внутренней страницы некуда поставить фасад сбоку —
   он ложится под заголовок и лид и мешает читать. Прячем. */
@media (max-width: 640px) { .page-hero__facade { display: none; } }

/* --- Cenrādis --------------------------------------------------------------- */
/* Таблица «услуга — цена» без заливок, как гроссбух: длинные названия
   услуг переносятся, цена держится справа и не рвётся. */
/* --- Прейскурант ---------------------------------------------------------- */
.price-page__head { margin-bottom: 22px; }
.price-highlights { margin-bottom: clamp(36px, 5vw, 56px); }
.price-highlights dd small {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-faint);
}
.price-highlights .example__cell--key dd small { color: var(--on-dark-soft); }

/* Переключатель частным лицам / предприятиям — радиокнопки и :has(),
   без скрипта: таблицы на странице сразу, их видит и поиск. */
.price-switch > input { position: absolute; opacity: 0; pointer-events: none; }
.price-switch__tabs { display: none; }
.price-switch__tabs label {
  padding: 10px 22px;
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
@supports selector(:has(*)) {
  .price-switch__tabs { display: inline-flex; }
  .price-audience__title { display: none; }
  .price-switch:has(#price-private:checked) .price-audience--business,
  .price-switch:has(#price-business:checked) .price-audience--private { display: none; }
  .price-switch:has(#price-private:checked) label[for="price-private"],
  .price-switch:has(#price-business:checked) label[for="price-business"] { background: var(--ink-800); color: var(--paper); }
  .price-switch:has(#price-private:focus-visible) label[for="price-private"],
  .price-switch:has(#price-business:focus-visible) label[for="price-business"] { outline: 2px solid var(--accent); outline-offset: 2px; }
}
.price-audience { display: grid; gap: 18px; }
.price-audience + .price-audience { margin-top: clamp(40px, 5vw, 64px); }
.price-audience__title { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 0; }

.price-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(20px, 3vw, 32px);
}
.price-card__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}
.price-card__title::before { content: ""; width: 22px; height: 1px; background: var(--accent); flex: none; }
.price-rows { margin: 0; }
.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 38%);
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.price-row:first-child { border-top: 0; }
.price-row dt { color: var(--text-soft); line-height: 1.5; }
.price-row dd {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.price-row dd.is-free { color: var(--ok); }
.price-card__note { margin: 12px 0 0; font-size: 0.82rem; line-height: 1.6; color: var(--text-faint); }

.price-page__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.price-page__foot p { margin: 0; max-width: 60ch; font-size: 0.9rem; color: var(--text-faint); }
.price-page__actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  /* Четыре главные цены — сеткой 2×2, а не столбиком на весь экран. */
  .price-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-highlights .example__cell { padding: 16px; min-height: 0; }
  .price-highlights dd { font-size: 1.15rem; }
  .price-row { grid-template-columns: 1fr; gap: 4px; }
  @supports selector(:has(*)) { .price-switch__tabs { display: flex; } }
  .price-switch__tabs label { flex: 1; text-align: center; padding-inline: 10px; }
}

/* --- Izvēlieties piemēroto: четыре карточки примеров ----------------------- */
.offers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.offer { display: flex; flex-direction: column; gap: 16px; padding: 26px 24px; background: var(--paper);
         border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.offer__title { margin: 0; font-size: 1.15rem; }
.offer__terms { margin: 0; display: grid; gap: 10px; }
.offer__terms div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem;
                    padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.offer__terms dt { color: var(--text-soft); }
.offer__terms dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.offer__payment { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.offer__payment span { font-size: 0.82rem; color: var(--text-soft); }
.offer__payment b { font-size: 1.7rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer__more { font-size: 0.88rem; color: var(--text-soft); text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.offers__note { margin-top: 18px; }
@media (max-width: 1080px) { .offers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .offers { grid-template-columns: 1fr; } }

/* Репрезентативный пример — обязателен, но не должен спорить с первым
   экраном: мельче и тише основного текста (просьба заказчика). */
.rep-line { font-size: 0.72rem; }
.rep-line__label { font-weight: 500; }
.hero .rep-line { color: rgba(234, 230, 222, 0.48); }
.hero .rep-line__label { color: rgba(234, 230, 222, 0.62); }

.short-form__full { margin-top: 22px; }

/* --- Статьи редакции (гем newsroom) в разделе «Jaunumi» ------------------- */
/* Лента общая со старыми статьями (.posts/.post); у статьи редакции на
   карточке ещё рубрика. Страница статьи — как news/show: тёмная шапка,
   текст на бумаге, оглавление сбоку, следующий шаг — калькулятор. */

.post__date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.post__tag {
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.news-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.news-cats a {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.news-cats a:hover { border-color: var(--ink-600); color: var(--text); }
.news-cats a[aria-current] { background: var(--ink-900); border-color: var(--ink-900); color: var(--on-dark); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  font-variant-numeric: tabular-nums;
}
.article-meta__tag { color: var(--accent-on-dark); }
.page-hero h1.article-title { margin-top: 14px; max-width: 24ch; font-size: clamp(1.9rem, 4vw, 2.9rem); }
.article-byline { margin-top: 22px; font-size: 0.88rem; color: var(--on-dark-soft); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.article-main { grid-column: 2; min-width: 0; max-width: var(--measure); }

.article-aside { position: sticky; top: 96px; }
.article-toc { padding-top: 14px; border-top: 2px solid var(--accent); }
.article-toc__title {
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.article-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.article-toc li {
  counter-increment: toc;
  display: grid;
  grid-template-columns: 26px 1fr;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.4;
}
.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.article-toc a { color: var(--text-soft); }
.article-toc a:hover { color: var(--accent); }

.article-cover { margin: 0 0 clamp(28px, 4vw, 40px); }
.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
}

.article-body h2, .article-body h3 { scroll-margin-top: 96px; }
.article-body ol { margin: 0 0 1.2em; }
.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--text);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--rule); }
.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 1.4em 0 1.6em;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.article-body th, .article-body td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.article-body th {
  background: var(--surface-2);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* Без оглавления текст — по центру колонки, как у старых статей. */
.article-layout:not(:has(.article-aside)) { grid-template-columns: minmax(0, 1fr); }
.article-layout:not(:has(.article-aside)) .article-main { grid-column: 1; margin-inline: auto; width: 100%; }

@media (max-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-main { grid-column: 1; max-width: none; }
  .article-aside { position: static; }
}

/* Cloudflare Turnstile: обычно пустое место — галочка появляется,
   только когда Cloudflare сомневается. */
.turnstile:empty { display: none; }
.turnstile.field--invalid { outline: 2px solid var(--alert); outline-offset: 4px; border-radius: 4px; }
