/*
Theme Name: Gofingo Ledger
Theme URI: https://gofingo.kz/
Author: Gofingo
Description: Собственная тема gofingo.kz. Направление «Ledger» — редакционная финансовая типографика, измерительная линейка как основной мотив, калькулятор займа с нарисованным законным потолком переплаты.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: Proprietary
Text Domain: gofingo
*/

/* ==========================================================================
   1. Токены
   ========================================================================== */

:root {
  /* Чернила — из логотипа #222248 */
  --ink-900: #14142e;
  --ink-800: #1c1c3d;
  --ink-700: #222248;
  --ink-600: #33335e;
  --ink-500: #4d4d78;
  --ink-400: #6f6f96;
  --ink-300: #9b9bb6;
  --ink-200: #c7c7d6;

  /* Бумага */
  --paper: #fdfdfb;
  --paper-2: #f4f4f0;
  --paper-3: #ecece6;
  --rule: #ddddd4;
  --rule-soft: #e9e9e2;

  /* Небо — акцент из логотипа #72CBE1, используется как измерительная линия */
  --sky: #72cbe1;
  --sky-deep: #2f93b1;
  --sky-ink: #1c6d87;
  --sky-wash: #eaf6fa;

  /* Действие */
  --go: #12874a;
  --go-hi: #16a34a;
  --go-deep: #0c6537;
  --go-wash: #e9f5ee;

  /* Предупреждение / потолок закона */
  --limit: #b4471f;
  --limit-wash: #fbeee8;

  /* Панели, тёмные по замыслу: калькулятор, подвал, CTA-полоса.
     Отдельные токены нужны потому, что --ink-* в тёмной теме
     переворачиваются, и панель уезжала в белое с белым текстом. */
  --panel: #14142e;
  --panel-2: #1c1c3d;
  --panel-3: #262649;
  --panel-line: rgba(255, 255, 255, .12);
  --panel-text: #d6dae8;
  --panel-mute: #a9b0c8;
  --panel-faint: #79819c;

  /* Типографика */
  --display: "Literata", "PT Serif", Georgia, "Times New Roman", serif;
  --text: "Golos Text", "Helvetica Neue", Arial, sans-serif;

  /* Ритм */
  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --shell: 1180px;

  /* Тени — плоские, «печатные», без размытого AI-глоу */
  --lift-1: 0 1px 0 var(--rule), 0 1px 2px rgba(34, 34, 72, .06);
  --lift-2: 0 2px 0 var(--rule), 0 10px 28px -14px rgba(34, 34, 72, .35);
  --lift-3: 0 24px 60px -28px rgba(20, 20, 46, .55);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12122a;
    --paper-2: #191934;
    --paper-3: #21213f;
    --rule: #2f2f52;
    --rule-soft: #262646;

    --ink-900: #f3f3f8;
    --ink-800: #e7e7f0;
    --ink-700: #dcdce8;
    --ink-600: #c2c2d6;
    --ink-500: #a3a3bf;
    --ink-400: #8b8bab;
    --ink-300: #6d6d90;
    --ink-200: #3d3d64;

    --sky-ink: #8bd6e8;
    --sky-deep: #72cbe1;
    --sky-wash: #16283a;

    --go: #34b46a;
    --go-hi: #45c67b;
    --go-deep: #2a9d5b;
    --go-wash: #142c20;

    --limit: #e08a63;
    --limit-wash: #2e1c14;

    --panel: #0d0d22;
    --panel-2: #16162f;
    --panel-3: #1f1f3e;

    --lift-1: 0 1px 0 var(--rule);
    --lift-2: 0 2px 0 var(--rule), 0 10px 28px -14px rgba(0, 0, 0, .6);
    --lift-3: 0 24px 60px -28px rgba(0, 0, 0, .8);

    color-scheme: dark;
  }
}

/* ==========================================================================
   2. База
   ========================================================================== */

*, *::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: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-700);
  font-family: var(--text);
  font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Бумажное зерно — очень слабое, даёт «печатную» фактуру вместо плоской заливки */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { opacity: .28; }
}

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

a { color: var(--sky-ink); text-underline-offset: .18em; text-decoration-thickness: from-font; }
a:hover { color: var(--ink-900); }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.012em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem); letter-spacing: -.022em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.35vw, 2.15rem); }
h3 { font-size: clamp(1.16rem, 1.06rem + .45vw, 1.4rem); }
h4 { font-size: 1.05rem; font-family: var(--text); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.05em; text-wrap: pretty; }

strong, b { font-weight: 600; color: var(--ink-900); }

/* Цифры везде табличные — это финансовый сайт, колонки должны выравниваться */
table, .num, .g-stat__value, .calc *, time { font-variant-numeric: tabular-nums lining-nums; }

::selection { background: var(--sky); color: var(--ink-900); }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--panel); color: #fff;
  padding: .7rem 1.1rem; border-radius: 0 0 6px 6px;
  font-weight: 600; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ==========================================================================
   3. Каркас
   ========================================================================== */

.shell {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.shell--tight { max-width: 820px; }

/* Разделитель-линейка: тонкая линия с делениями, повторяется по сайту */
.ruler {
  height: 11px;
  border-top: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    to right,
    var(--sky-deep) 0 1px,
    transparent 1px 100%
  );
  background-size: 12px 5px;
  background-repeat: repeat-x;
  background-position: 0 0;
  opacity: .55;
}

.ruler--major {
  background-image:
    repeating-linear-gradient(to right, var(--sky-deep) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(to right, var(--ink-400) 0 1px, transparent 1px 100%);
  background-size: 12px 5px, 60px 10px;
  opacity: .7;
}

/* ==========================================================================
   4. Шапка
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.masthead__bar {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
  min-height: 72px;
  padding-block: .6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand img, .brand svg { width: auto; height: 30px; max-width: none; }
.brand__mark { display: block; }
.brand__meta {
  display: none;
  font-size: .72rem;
  line-height: 1.25;
  color: var(--ink-400);
  border-left: 1px solid var(--rule);
  padding-left: .6rem;
  max-width: 15ch;
}
@media (min-width: 1240px) { .brand__meta { display: block; } }

.nav { margin-left: auto; }

/* На широком экране кнопка живёт в .masthead__aside, в выпадающем меню — своя */
.nav__cta { display: none; }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 1.4vw, 1.35rem);
  list-style: none;
  margin: 0; padding: 0;
}

.nav__list a {
  display: block;
  color: var(--ink-600);
  text-decoration: none;
  font-size: .935rem;
  font-weight: 500;
  padding: .4rem 0;
  position: relative;
  white-space: nowrap;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .05rem;
  height: 2px;
  background: var(--sky);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s cubic-bezier(.2, .8, .3, 1);
}
.nav__list a:hover { color: var(--ink-900); }
.nav__list a:hover::after,
.nav__list .is-current a::after { transform: scaleX(1); }
.nav__list .is-current a { color: var(--ink-900); font-weight: 600; }

.masthead__aside {
  display: none;
  align-items: center;
  gap: .9rem;
}
@media (min-width: 900px) { .masthead__aside { display: flex; } }
/* Между 900 и 1180 px шесть пунктов меню, телефон и кнопка в строку не влезают —
   кнопку обрезало по правому краю. Телефон на этих ширинах убираем, он есть
   в подвале и на странице контактов. */
@media (max-width: 1180px) { .masthead__aside .tel { display: none; } }

.tel {
  font-family: var(--display);
  font-size: .98rem;
  font-weight: 600;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
}
.tel small {
  display: block;
  font-family: var(--text);
  font-size: .68rem;
  font-weight: 400;
  color: var(--ink-400);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Бургер */
.burger {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--ink-800);
  transition: transform .22s ease, opacity .18s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 860px) { .burger { display: none; } }

@media (max-width: 859px) {
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--lift-2);
    padding: .5rem var(--gutter) 1.4rem;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--rule-soft); }
  .nav__list a { padding: .95rem 0; font-size: 1.05rem; }
  .nav__list a::after { display: none; }
  .nav__cta { display: block; margin-top: 1.15rem; }
}

/* ==========================================================================
   5. Кнопки
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--text);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: .92rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2, .8, .3, 1), box-shadow .16s ease, background-color .16s ease;
  min-height: 48px;
}

.btn--go {
  background: var(--go);
  color: #fff;
  box-shadow: 0 1px 0 var(--go-deep), 0 8px 20px -10px rgba(18, 135, 74, .8);
}
.btn--go:hover, .btn--go:focus-visible {
  background: var(--go-hi);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 var(--go-deep), 0 12px 26px -10px rgba(18, 135, 74, .85);
}
.btn--go:active { transform: translateY(0); }

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

.btn--onDark {
  background: var(--sky);
  color: var(--ink-900);
}
.btn--onDark:hover { background: #8ed8ea; color: var(--ink-900); transform: translateY(-1px); }

.btn--wide { width: 100%; }
.btn--sm { padding: .6rem 1rem; min-height: 40px; font-size: .92rem; }

/* ==========================================================================
   6. Герой
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(2.25rem, 1rem + 5vw, 4.5rem) clamp(2rem, 1rem + 4vw, 3.5rem);
  overflow: hidden;
}

/* Гильош — гравюрная сетка как на ценных бумагах, живёт под героем справа */
.hero::after {
  content: "";
  position: absolute;
  top: -18%; right: -14%;
  width: min(760px, 72vw);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      transparent 0 13px,
      color-mix(in srgb, var(--sky-deep) 26%, transparent) 13px 14px);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero::after { opacity: .3; }
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(400px, 440px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sky-ink);
  margin-bottom: 1.15rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
}

.hero h1 { margin-bottom: .55rem; }

.hero__lede {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem);
  color: var(--ink-500);
  max-width: 46ch;
  margin-bottom: 1.9rem;
}

/* Ключевые числа — «шкала» с делениями сверху */
.hero__figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.9rem;
}

.figure {
  background: var(--paper);
  padding: 1rem 1.05rem 1.05rem;
  position: relative;
}
.figure::before {
  content: "";
  position: absolute;
  top: 0; left: 1.05rem; right: 1.05rem;
  height: 3px;
  background-image: repeating-linear-gradient(to right, var(--sky-deep) 0 1px, transparent 1px 6px);
}
.figure__value {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.figure__label {
  display: block;
  font-size: .8rem;
  color: var(--ink-400);
  margin-top: .3rem;
  line-height: 1.35;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

.hero__fineprint {
  margin-top: 1.4rem;
  font-size: .84rem;
  color: var(--ink-400);
  max-width: 52ch;
}

/* ==========================================================================
   7. Калькулятор — главный объект страницы
   ========================================================================== */

.calc {
  background: var(--panel);
  color: #eef0f7;
  border-radius: 16px;
  padding: clamp(1.25rem, 1rem + 1.4vw, 1.85rem);
  box-shadow: var(--lift-3);
  position: relative;
  overflow: hidden;
}

/* Гравюрная штриховка внутри панели */
.calc::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(114, 203, 225, .05) 0 1px,
    transparent 1px 7px
  );
}

.calc > * { position: relative; }

.calc__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.calc__title {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.calc__badge {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sky);
  white-space: nowrap;
}

.calc__field + .calc__field { margin-top: 1.35rem; }

.calc__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .55rem;
}
.calc__label span:first-child {
  font-size: .85rem;
  color: #a9b0c8;
}
.calc__out {
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
}

/* Ползунок — трек как измерительная лента */
.calc__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: transparent;
  cursor: pointer;
  margin: 0;
  display: block;
}
.calc__range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(var(--sky), var(--sky)) 0 / var(--fill, 50%) 100% no-repeat,
    rgba(255, 255, 255, .16);
}
.calc__range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}
.calc__range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--sky);
}
.calc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--panel);
  box-shadow: 0 0 0 2px var(--sky), 0 4px 10px rgba(0, 0, 0, .5);
  transition: transform .14s ease;
}
.calc__range::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--panel);
  box-shadow: 0 0 0 2px var(--sky), 0 4px 10px rgba(0, 0, 0, .5);
}
.calc__range:active::-webkit-slider-thumb { transform: scale(1.12); }

.calc__scale {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: #7b839e;
  margin-top: .3rem;
}

.calc__result {
  margin-top: 1.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.calc__rows { display: grid; gap: .55rem; margin-bottom: 1.1rem; }

.calc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
  color: #a9b0c8;
}
.calc__row b { color: #fff; font-weight: 600; font-size: 1rem; white-space: nowrap; }

.calc__row--total {
  padding-top: .7rem;
  margin-top: .25rem;
  border-top: 1px dashed rgba(255, 255, 255, .18);
  font-size: 1rem;
}
.calc__row--total b {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -.015em;
}

/* Полоса «сколько от потолка закона» — то, чего нет у конкурентов */
.gauge { margin: 1.25rem 0 1.1rem; }

.gauge__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .76rem;
  color: #8890aa;
  margin-bottom: .45rem;
}

.gauge__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.gauge__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky-deep), var(--sky));
  width: 0;
  transition: width .38s cubic-bezier(.2, .8, .3, 1), background .3s ease;
}
.gauge__fill.is-near { background: linear-gradient(90deg, #d98b2b, #e8b45f); }
.gauge__fill.is-over { background: linear-gradient(90deg, #a83a18, #d5643a); }

.gauge__legend {
  font-size: .74rem;
  color: #8890aa;
  margin-top: .5rem;
  line-height: 1.45;
}
.gauge__legend b { color: var(--sky); font-weight: 600; }

.calc__note {
  font-size: .74rem;
  line-height: 1.5;
  color: #79819c;
  margin: 1rem 0 0;
}
.calc__note a { color: var(--sky); }

/* ==========================================================================
   8. Секции и контент
   ========================================================================== */

.band { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.25rem); }
.band--soft { background: var(--paper-2); border-block: 1px solid var(--rule); }
.band--ink {
  background: var(--panel);
  color: var(--panel-text);
  border-block: 1px solid var(--panel-2);
}
.band--ink h2, .band--ink h3 { color: #fff; }
.band--ink a { color: var(--sky); }

.band__head { max-width: 60ch; margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.band__head p { color: var(--ink-500); margin-bottom: 0; }
.band--ink .band__head p { color: var(--panel-mute); }

/* Проза: стилизует HTML, приходящий из редактора WordPress.
   Мера строки задаётся тексту, а таблицам, карточкам и врезкам отдаётся
   вся ширина колонки — иначе шестиколоночная таблица ГЭСВ ужимается
   до нечитаемого и рвёт числа вроде «194 625 ₸» посреди суммы. */
.prose { max-width: none; }
.prose > p,
.prose > ul,
.prose > ol,
.prose > h2,
.prose > h3,
.prose > blockquote { max-width: var(--measure); }
.prose > * + * { margin-top: 1.05em; }
.prose > h2 { margin-top: 2.2em; }
.prose > h3 { margin-top: 1.7em; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }

.prose ul, .prose ol { padding-left: 1.35em; margin-block: 0 1.05em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--sky-deep); }

.prose ul { list-style: none; padding-left: 0; }
.prose ul > li {
  position: relative;
  padding-left: 1.6em;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: .25em; top: .68em;
  width: 8px; height: 2px;
  background: var(--sky-deep);
}

.prose a { font-weight: 500; }

.prose blockquote {
  margin: 1.6em 0;
  padding: .2em 0 .2em 1.4em;
  border-left: 3px solid var(--sky);
  color: var(--ink-500);
  font-family: var(--display);
  font-size: 1.05em;
}

/* Таблицы — «регистр»: без вертикальных линий, с волосяными правилами */
.prose table, .g-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .95rem;
}
.prose table caption, .g-table caption {
  caption-side: top;
  text-align: left;
  font-size: .82rem;
  color: var(--ink-400);
  padding-bottom: .6em;
}
.prose th, .g-table th,
.prose td, .g-table td {
  text-align: left;
  vertical-align: top;
  padding: .72em .9em;
  border-bottom: 1px solid var(--rule-soft);
}
.prose thead th, .g-table thead th {
  font-family: var(--text);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-400);
  border-bottom: 1px solid var(--ink-300);
  padding-bottom: .55em;
}
.prose tbody tr:last-child td, .g-table tbody tr:last-child td { border-bottom: 1px solid var(--ink-300); }
.prose tbody th, .g-table tbody th { font-weight: 500; color: var(--ink-600); }
.prose td:not(:first-child), .g-table td:not(:first-child) { color: var(--ink-800); font-weight: 500; }
.prose td, .g-table td { text-wrap: pretty; }

/* Таблица «параметр → значение» */
.g-table--spec tbody th { width: 42%; font-weight: 400; color: var(--ink-500); }

/* Горизонтальный скролл только внутри обёртки, страница не едет */
.scroller {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.scroller > table { margin-block: 1.6em; min-width: 34rem; }

/* Заметки / врезки */
.note {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--sky-deep);
  background: var(--sky-wash);
  border-radius: 0 10px 10px 0;
  padding: 1.05rem 1.25rem;
  margin: 1.6em 0;
  font-size: .95rem;
}
.note > :last-child { margin-bottom: 0; }
.note__title {
  display: block;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: .35em;
  font-size: .95rem;
}

.note--limit { border-left-color: var(--limit); background: var(--limit-wash); }
.note--go { border-left-color: var(--go); background: var(--go-wash); }

/* Карточки */
.cards {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.card {
  background: var(--paper);
  padding: clamp(1.15rem, 1rem + .7vw, 1.6rem);
}
.card h3 { font-size: 1.08rem; margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-500); font-size: .95rem; }

.card__idx {
  display: block;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 600;
  color: var(--sky-deep);
  letter-spacing: .08em;
  margin-bottom: .8rem;
}

.band--ink .cards { background: var(--panel-3); border-color: var(--panel-3); }
.band--ink .card { background: var(--panel-2); }
.band--ink .card p { color: var(--panel-mute); }

/* Шаги */
.steps { counter-reset: step; display: grid; gap: 0; margin: 1.8em 0; }
.step {
  counter-increment: step;
  position: relative;
  padding: 1.1rem 0 1.1rem 3.4rem;
  border-bottom: 1px solid var(--rule-soft);
}
.steps .step:last-child { border-bottom: 0; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1.05rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-900);
  border: 1px solid var(--ink-300);
  border-radius: 50%;
}
.step h3 { font-size: 1.02rem; margin-bottom: .25em; }
.step p { margin-bottom: 0; color: var(--ink-500); font-size: .95rem; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); margin: 1.8em 0; }

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

.faq__q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(1rem, .97rem + .18vw, 1.12rem);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.35;
}

.faq__sign {
  flex: 0 0 auto;
  width: 1.4rem; height: 1.4rem;
  margin-top: .1rem;
  position: relative;
}
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 13px; height: 2px;
  background: var(--sky-deep);
  transform: translate(-50%, -50%);
  transition: transform .24s cubic-bezier(.2, .8, .3, 1);
}
.faq__sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s cubic-bezier(.2, .8, .3, 1);
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { color: var(--ink-500); font-size: .97rem; }
.faq__a > div > :first-child { padding-top: .15rem; }
.faq__a > div > :last-child { margin-bottom: 1.3rem; }

/* Полоса-CTA */
.cta-strip {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 1.2rem + 1.6vw, 2.4rem);
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 780px) {
  .cta-strip { grid-template-columns: 1fr auto; gap: 2.5rem; }
}
.cta-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .6;
  background-image: repeating-linear-gradient(-45deg, rgba(114,203,225,.05) 0 1px, transparent 1px 7px);
}
.cta-strip > * { position: relative; }
.cta-strip h2 { color: #fff; margin-bottom: .4rem; font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); }
.cta-strip p { color: var(--panel-mute); margin-bottom: 0; font-size: .97rem; max-width: 54ch; }

/* Подпись под материалом */
.byline {
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-size: .84rem;
  color: var(--ink-400);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
}

/* Хлебные крошки */
.crumbs {
  font-size: .82rem;
  color: var(--ink-400);
  padding-block: 1rem .25rem;
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .45rem; color: var(--ink-200); }
/* Заголовки страниц длинные — в крошках последний пункт обрезается,
   иначе строка занимает две-три полосы над самим заголовком. */
.crumbs li:last-child {
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs a { color: var(--ink-400); text-decoration: none; }
.crumbs a:hover { color: var(--ink-900); text-decoration: underline; }

/* Шапка внутренней страницы */
.page-head { padding-block: clamp(1.25rem, 1rem + 1.5vw, 2.25rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.page-head h1 { max-width: 22ch; }
.page-head__lede {
  font-size: clamp(1.02rem, 1rem + .25vw, 1.15rem);
  color: var(--ink-500);
  max-width: 58ch;
  margin-bottom: 0;
}

/* Раскладка «контент + боковая колонка» */
.layout { display: grid; gap: clamp(2rem, 4vw, 3.25rem); align-items: start; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

.aside { position: sticky; top: 96px; display: grid; gap: 1.25rem; }
@media (max-width: 999px) { .aside { position: static; } }

.panel {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--paper);
  box-shadow: var(--lift-1);
}
.panel h3 { font-size: 1rem; margin-bottom: .6rem; }
.panel p { font-size: .9rem; color: var(--ink-500); }
.panel > :last-child { margin-bottom: 0; }

.panel__links { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.panel__links li + li { margin-top: .1rem; border-top: 1px solid var(--rule-soft); }
.panel__links a {
  display: block;
  padding: .6rem 0;
  color: var(--ink-600);
  text-decoration: none;
}
.panel__links a:hover { color: var(--ink-900); }
.panel__links a::before { content: "→"; color: var(--sky-deep); margin-right: .5rem; }

/* ==========================================================================
   9. Подвал
   ========================================================================== */

.colophon {
  background: var(--panel);
  color: #9aa2bb;
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem) 2rem;
  font-size: .92rem;
  margin-top: 0;
}

.colophon a { color: #c8cee0; text-decoration: none; }
.colophon a:hover { color: #fff; text-decoration: underline; }

.colophon__grid {
  display: grid;
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.colophon__brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .colophon__brand { grid-column: auto; } }
.colophon__brand img { height: 28px; width: auto; margin-bottom: .9rem; }
.colophon__brand p { font-size: .88rem; line-height: 1.6; max-width: 34ch; }

.colophon h2 {
  font-family: var(--text);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: .9rem;
}

.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: .5rem; line-height: 1.45; }

.colophon__legal {
  padding-top: 1.5rem;
  font-size: .82rem;
  line-height: 1.65;
  color: #767e97;
  display: grid;
  gap: .9rem;
}
.colophon__legal p { margin: 0; max-width: 92ch; }

.colophon__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  align-items: center;
  padding-top: .5rem;
}

/* ==========================================================================
   10. Попап
   ========================================================================== */

.pop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(16, 16, 38, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s;
}
.pop.is-open { opacity: 1; visibility: visible; }

.pop__box {
  position: relative;
  width: min(100%, 30rem);
  background: var(--paper);
  border-radius: 16px;
  padding: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem);
  box-shadow: var(--lift-3);
  transform: translateY(12px) scale(.98);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
  border-top: 4px solid var(--sky);
}
.pop.is-open .pop__box { transform: none; }

.pop__box img.pop__logo { height: 28px; width: auto; margin-bottom: 1.1rem; }
.pop__box h2 { font-size: 1.4rem; margin-bottom: .55rem; }
.pop__box p { font-size: .95rem; color: var(--ink-500); }

.pop__close {
  position: absolute;
  top: .7rem; right: .7rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-400);
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
}
.pop__close:hover { color: var(--ink-900); background: var(--paper-2); }

/* ==========================================================================
   11. Появление при загрузке
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .68s cubic-bezier(.2, .8, .3, 1) both; }
  .reveal:nth-child(1) { animation-delay: .04s; }
  .reveal:nth-child(2) { animation-delay: .12s; }
  .reveal:nth-child(3) { animation-delay: .2s; }
  .reveal:nth-child(4) { animation-delay: .28s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   12. Печать
   ========================================================================== */

@media print {
  .masthead, .colophon, .pop, .cta-strip, .aside, .hero__actions, .calc { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before { display: none; }
  .prose { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
