/* ==========================================================================
   CashToYou.kz — main stylesheet
   Palette is authored in OKLCH (as in the source design) with an sRGB
   fallback for engines without OKLCH support (Chrome <111 / Safari <15.4).
   ========================================================================== */

:root {
  /* --- fallback (sRGB) ------------------------------------------------- */
  --bg:            #f8fafd;
  --surface:       #fbfcfe;
  --surface-2:     #f5f7f9;
  --surface-3:     #eef0f4;

  --text:          #11213e;
  --text-strong:   #2f3339;
  --text-soft:     #494d54;
  --muted:         #51555c;
  --muted-2:       #5a5e65;
  --muted-3:       #5f636a;
  --muted-4:       #656970;
  --muted-5:       #6d7279;

  --line:          #dbdee3;
  --line-2:        #e2e5e9;
  --line-3:        #e5e8ec;
  --line-strong:   #cdd1d8;

  --brand:         #1f5ed9;
  --brand-link:    #1e59cd;
  --brand-hover:   #033fb2;
  --brand-ink:     #1043a8;
  --brand-soft:    #e7f1ff;

  --ink:           #0d275c;
  --ink-2:         #173268;
  --ink-3:         #19356b;
  --ink-line:      #2f497b;
  --ink-line-2:    #344f81;
  --ink-line-3:    #3c578a;
  --ink-line-4:    #446093;

  --on-ink:        #f3f5f8;
  --on-ink-2:      #e9ebef;
  --on-ink-soft:   #b6c5df;
  --on-ink-dim:    #a0afc8;
  --on-ink-dim-2:  #9dabc5;
  --on-ink-link:   #c8d5ec;
  --on-ink-label:  #8593ab;
  --on-ink-note:   #8b99b2;
  --accent:        #83b0ff;

  --shadow-card:   0 24px 60px -24px rgba(7, 40, 105, 0.45);

  --font:          'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:          'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap:          1180px;
  --gutter:        24px;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --bg:            oklch(0.985 0.004 260);
    --surface:       oklch(0.99 0.003 260);
    --surface-2:     oklch(0.975 0.004 260);
    --surface-3:     oklch(0.955 0.006 260);

    --text:          oklch(0.25 0.06 262);
    --text-strong:   oklch(0.32 0.012 260);
    --text-soft:     oklch(0.42 0.012 260);
    --muted:         oklch(0.45 0.012 260);
    --muted-2:       oklch(0.48 0.012 260);
    --muted-3:       oklch(0.50 0.012 260);
    --muted-4:       oklch(0.52 0.012 260);
    --muted-5:       oklch(0.55 0.012 260);

    --line:          oklch(0.90 0.008 260);
    --line-2:        oklch(0.92 0.006 260);
    --line-3:        oklch(0.93 0.006 260);
    --line-strong:   oklch(0.86 0.01 260);

    --brand:         oklch(0.52 0.20 262);
    --brand-link:    oklch(0.50 0.19 262);
    --brand-hover:   oklch(0.42 0.19 262);
    --brand-ink:     oklch(0.42 0.17 262);
    --brand-soft:    oklch(0.955 0.025 262);

    --ink:           oklch(0.29 0.10 262);
    --ink-2:         oklch(0.33 0.10 262);
    --ink-3:         oklch(0.34 0.10 262);
    --ink-line:      oklch(0.41 0.09 262);
    --ink-line-2:    oklch(0.43 0.09 262);
    --ink-line-3:    oklch(0.46 0.09 262);
    --ink-line-4:    oklch(0.49 0.09 262);

    --on-ink:        oklch(0.97 0.004 260);
    --on-ink-2:      oklch(0.94 0.006 260);
    --on-ink-soft:   oklch(0.82 0.04 262);
    --on-ink-dim:    oklch(0.75 0.04 262);
    --on-ink-dim-2:  oklch(0.74 0.04 262);
    --on-ink-link:   oklch(0.87 0.035 262);
    --on-ink-label:  oklch(0.66 0.04 262);
    --on-ink-note:   oklch(0.68 0.04 262);
    --accent:        oklch(0.76 0.13 262);

    --shadow-card:   0 24px 60px -24px oklch(0.30 0.12 262 / 0.45);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--brand-link); text-decoration: none; }
a:hover { color: var(--brand-hover); }

img { max-width: 100%; height: auto; }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

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

.container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-link);
  margin-bottom: 18px;
}
.eyebrow--on-ink { color: var(--accent); margin-bottom: 22px; }

.h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.mono { font-family: var(--mono); }
.num  { font-family: var(--mono); white-space: nowrap; }

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 28px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 0;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }

.btn--ghost-ink {
  border: 1px solid var(--ink-line-4);
  color: var(--on-ink-2);
  font-weight: 500;
  background: transparent;
}
.btn--ghost-ink:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.btn--outline {
  border: 1px solid var(--ink-2);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.btn--sm { height: 46px; font-size: 15px; border-radius: 5px; padding: 0 20px; }
.btn--block { display: flex; width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
}

.header-inner {
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px 20px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  color: var(--on-ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  flex: none;
}
.logo:hover { color: #fff; }
.logo span { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-left: 4px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex: 1 1 auto;
}
.site-nav a { color: var(--on-ink-link); }
.site-nav a:hover { color: #fff; }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  flex: none;
  white-space: nowrap;
  border: 1px solid var(--ink-line-3);
  border-radius: 5px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
/* ссылки, а не кнопки: /ru/ — отдельный URL, переключение работает без JS */
.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  flex: none;
  background: transparent;
  color: var(--on-ink-dim);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current='page'] {
  background: var(--ink-line);
  color: var(--on-ink);
}

.header-cta { height: 42px; padding: 0 18px; font-size: 15px; border-radius: 5px; white-space: nowrap; flex: none; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ink-line-3);
  border-radius: 5px;
  color: var(--on-ink);
  cursor: pointer;
}
.nav-bars,
.nav-bars::before,
.nav-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  content: '';
  position: relative;
}
.nav-bars::before { position: absolute; top: -6px; }
.nav-bars::after  { position: absolute; top: 6px; }

/* the nav also carries a CTA for the collapsed mobile menu — desktop uses
   the one in .header-actions instead */
.site-nav .header-cta { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: var(--ink);
  color: var(--on-ink);
  padding: 76px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
}

/* The source design caps the h1 at 62px, but the hero column is 561px at the
   1180px container — too narrow for either headline to hold its intended
   two-line break. Each language is capped at the largest size that still
   lands the break where it was drawn (Kazakh runs longer than Russian). */
.hero h1 {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
}
html[lang='kk'] .hero h1 { font-size: clamp(30px, 3.9vw, 46px); }

.hero-lead {
  margin: 24px 0 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--on-ink-soft);
  max-width: 520px;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 52px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  overflow: hidden;
}
.stat { background: var(--ink-2); padding: 16px 18px; }
.stat-value { font-family: var(--mono); font-size: 20px; font-weight: 500; }
.stat-label { font-size: 12px; color: var(--on-ink-dim-2); margin-top: 6px; }

/* ==========================================================================
   Calculator
   ========================================================================== */

.calc {
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 88px;
}

.calc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.calc-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.calc-first {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
}
.calc-first input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.field { margin-top: 26px; }
.field + .field { margin-top: 22px; }

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.field-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.field-value { font-family: var(--mono); font-size: 22px; font-weight: 500; white-space: nowrap; }

.field-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-5);
}

/* range: 4px track as designed, but with a real 24px tall control so the
   thumb is a comfortable touch target on mobile */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 8px 0 4px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(13, 39, 92, 0.35);
}
.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(13, 39, 92, 0.35);
}
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--brand); }

.summary {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-3);
  font-size: 14px;
}
.summary-row dt { color: var(--muted); margin: 0; }
.summary-row dd { font-family: var(--mono); font-weight: 500; margin: 0; white-space: nowrap; }

.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--brand-soft);
  border-bottom: 0;
}
.summary-total dt { font-weight: 600; font-size: 15px; color: var(--text); margin: 0; }
.summary-total dd { font-family: var(--mono); font-size: 19px; font-weight: 500; margin: 0; white-space: nowrap; }

.calc .btn { margin-top: 20px; }

.calc-note {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-4);
}

/* ==========================================================================
   Products
   ========================================================================== */

.section-products { padding: 96px 0 20px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.section-head > div { max-width: 640px; }
.section-head p {
  margin: 0;
  max-width: 380px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.pcard {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 26px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.pcard--dark  { background: var(--ink); color: var(--on-ink); }
.pcard--muted { background: var(--surface-3); }

.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard-name { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }

.pcard-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  white-space: nowrap;
}
.pcard-badge--solid   { background: var(--brand); color: #fff; }
.pcard-badge--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--text-soft); }

.pcard p { margin: 12px 0 22px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.pcard--dark p { color: var(--on-ink-soft); }

.pcard-specs {
  margin-top: auto;
  display: grid;
  gap: 1px;
  background: var(--line-2);
  border-radius: 7px;
  overflow: hidden;
  font-size: 14px;
}
.pcard-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: var(--surface-2);
}
.pcard-specs dt { color: var(--muted-2); margin: 0; }
.pcard-specs dd { font-family: var(--mono); margin: 0; text-align: right; }

.pcard--dark .pcard-specs { background: var(--ink-line-2); }
.pcard--dark .pcard-specs > div { background: var(--ink-3); }
.pcard--dark .pcard-specs dt { color: var(--on-ink-dim); }

.pcard--muted .pcard-specs { background: var(--line); }
.pcard--muted .pcard-specs > div { background: var(--bg); }

.pcard .btn { margin-top: 18px; }
.pcard--dark .btn--outline { border-color: var(--ink-line-4); color: var(--on-ink); }
.pcard--dark .btn--outline:hover { background: rgba(255, 255, 255, 0.08); }

/* ==========================================================================
   Terms (определения ГЭСВ / МРП)
   ========================================================================== */

.section-terms { padding: 76px 0 0; }
.section-terms .h2 { margin-bottom: 36px; }

.terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.term {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 26px;
  background: var(--surface);
}
.term h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.term p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   How it works
   ========================================================================== */

.section-how { padding: 96px 0; }

.how-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}
.how-grid .h2 { margin-bottom: 40px; }

.steps {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px 0;
  background: var(--bg);
  margin: 0;
}
.step-num { font-family: var(--mono); font-size: 13px; color: var(--brand-link); }
.step-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.reqs {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 26px;
  background: var(--surface);
}
.reqs-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.reqs ul {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-strong);
}
.reqs li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; }
.reqs li::before { content: '·'; color: var(--brand); }
.reqs-note {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-4);
  border-top: 1px solid var(--line-2);
  padding-top: 16px;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.section-faq { padding: 72px 0 96px; }

.faq-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: start;
}
.faq-intro .h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.06; }
.faq-intro p {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.faq-item { background: var(--bg); padding: 22px 0; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
/* вопрос обёрнут в h2 ради структуры — гасим дефолты, чтобы шапка аккордеона
   осталась строкой 18px, а не блоком 27px */
.faq-item summary h2 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.35;
  display: inline;
}
.faq-item summary::after {
  content: '+';
  flex: none;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: var(--brand-link);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--brand-link); }
.faq-item p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 640px;
}

@media (max-width: 900px) {
  .faq-grid { grid-template-columns: 1fr; gap: 36px; }
  .section-faq { padding: 48px 0 64px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--on-ink-2);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-about p {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-ink-dim);
  max-width: 320px;
}
.footer-about .logo { display: inline-flex; }

.footer-col-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-ink-label);
}
.footer-links { display: grid; gap: 10px; margin-top: 16px; font-size: 14px; }
.footer-links a { color: var(--on-ink-link); }
.footer-links a:hover { color: #fff; }

.footer-contacts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--on-ink-link);
}
.footer-contacts a { color: var(--on-ink-link); font-family: var(--mono); }
.footer-contacts a:hover { color: #fff; }
.footer-contacts address { font-style: normal; line-height: 1.5; color: var(--on-ink-dim); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--on-ink-note);
}
.footer-disclaimer { max-width: 700px; }
.footer-copy { margin-left: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* While the hero is two columns the stat strip only has ~561px, which is not
   enough for four tiles of 20px mono without breaking values mid-string.
   Below 1081px the hero is a single column and all four fit side by side. */
@media (min-width: 1081px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-lead { max-width: none; }
  .how-grid { grid-template-columns: 1fr; gap: 44px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .section-head p { max-width: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    order: 10;
    flex: 1 0 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 16px;
    border-top: 1px solid var(--ink-line);
    padding-top: 6px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 2px; }
  .header-actions { margin-left: auto; gap: 10px; }
  .header-cta { display: none; }
  /* the design's 29px-tall toggle is too small to hit reliably on touch */
  .lang-switch button { min-height: 42px; padding: 0 12px; }
  .site-nav .header-cta { display: inline-flex; margin: 10px 0 6px; justify-content: center; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; }
  .terms-grid { grid-template-columns: 1fr; }
  .section-terms { padding-top: 56px; }
  .hero { padding: 48px 0 56px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 36px; }
  .calc { padding: 22px; }
  .section-products { padding: 64px 0 20px; }
  .section-how { padding: 64px 0; }
  .product-grid { grid-template-columns: 1fr; margin-top: 32px; }
  .section-head { gap: 20px; }
  .step { grid-template-columns: 40px 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-about p { max-width: none; }
  /* на десктопе ссылки футера 17px с gap:10 — пальцем в них не попасть,
     на мобильном разводим до ~40px по вертикали */
  .footer-links { gap: 0; }
  .footer-links a { padding: 11px 0; }
  .footer-contacts { gap: 4px; }
  .footer-contacts a { padding: 10px 0; }
  .site-footer { padding: 48px 0 32px; }
  .footer-copy { margin-left: 0; }
}

@media (max-width: 420px) {
  .field-value { font-size: 19px; }
  .stat-value { font-size: 18px; } /* keeps "ГЭСВ ≤ 179%" on one line in a half-width tile */
  .pcard { padding: 20px; }
  .btn { padding: 0 18px; font-size: 16px; }
}

/* ==========================================================================
   Внутренние страницы: шапка-герой, панели, контакты, надзор
   ========================================================================== */

.page-hero { background: var(--ink); color: var(--on-ink); padding: 64px 0 72px; }
.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}
.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.page-hero-lead {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-ink-soft);
  max-width: 560px;
}

.contact-cards {
  display: grid;
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: 9px;
  overflow: hidden;
}
.contact-card { background: var(--ink-3); padding: 18px 20px; }
.contact-card-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--on-ink);
  display: inline-block;
}
.contact-card-value:hover { color: var(--accent); }
.contact-card-value--sm { font-size: 18px; }
.contact-card-label { font-size: 13px; color: var(--on-ink-dim-2); margin-top: 6px; }

.section-contacts { padding: 72px 0 0; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.panel {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 30px;
  background: var(--surface);
}
.panel-title { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.panel-lead { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.panel-rows {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-strong);
}
.panel .btn { margin-top: 20px; }
.contact-alt { margin-top: 10px; }

.map-stub {
  margin-top: 22px;
  height: 220px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background-image: repeating-linear-gradient(135deg, var(--surface-3) 0 10px, var(--surface-2) 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-4);
}

.section-supervision { padding: 52px 0 88px; }
.supervision {
  border: 1px dashed var(--brand-soft);
  border-color: color-mix(in oklch, var(--brand) 30%, var(--line));
  border-radius: 11px;
  padding: 28px;
  background: var(--brand-soft);
}
.supervision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 18px; }
.sup-name { font-size: 17px; font-weight: 600; }
.supervision p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-soft); }
.sup-contact { margin-top: 10px; font-size: 13px; color: var(--text-strong); }

@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .contacts-grid { grid-template-columns: 1fr; }
  .supervision-grid { grid-template-columns: 1fr; gap: 24px; }
  .page-hero { padding: 48px 0 56px; }
  .section-contacts { padding-top: 48px; }
  .section-supervision { padding: 40px 0 64px; }
}

/* ==========================================================================
   Раскрытие информации
   ========================================================================== */

.section-disclosure { padding: 72px 0 96px; }
.dc-title { margin-bottom: 40px; }
.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dc-grid--second { margin-top: 20px; }

.spec-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
}
.spec-card-title {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  font-size: 16px;
  font-weight: 600;
}
.spec-rows { display: grid; margin: 0; }
.spec-rows > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-3);
  font-size: 14px;
}
.spec-rows > div:last-child { border-bottom: 0; }
.spec-rows dt { color: var(--muted-2); margin: 0; }
.spec-rows dd { margin: 0; }

.panel-subtitle { margin: 0; font-size: 16px; font-weight: 600; }

.dc-rights {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-strong);
}

.doc-list {
  display: grid;
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
}
.doc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
}
.doc-tag { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted-5); flex: none; }
.doc-note { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

@media (max-width: 900px) {
  .dc-grid { grid-template-columns: 1fr; }
  .section-disclosure { padding: 48px 0 64px; }
  .spec-rows > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ==========================================================================
   Погашение / О компании
   ========================================================================== */

.h2--sm { font-size: clamp(26px, 3vw, 38px); line-height: 1.06; }

.section-pay { padding: 72px 0 0; }
.section-pay .h2 { margin-bottom: 28px; }
.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pay-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 26px;
  background: var(--surface);
}
.pay-card h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pay-card p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.pay-tag {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-link);
}

.section-early { padding: 72px 0 0; }

.num-steps {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-strong);
}
.num-steps li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.num-step-i { font-family: var(--mono); font-size: 12px; color: var(--brand-link); }

.sup-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.section-mission { padding: 72px 0 0; }
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.mission-p { margin: 20px 0 0; font-size: 17px; line-height: 1.6; color: var(--text-strong); }
.mission-p + .mission-p { margin-top: 16px; }

.section-responsible { padding: 72px 0 0; }
.resp-title { margin-bottom: 28px; }
.resp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.resp-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 24px;
  background: var(--surface);
}
.resp-card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.resp-card p { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

.section-license { padding: 72px 0 0; }
.lic-cta { margin-top: 22px; width: auto; display: inline-flex; }

.section-cta { padding: 72px 0 88px; }
.cta-band {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 14px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.cta-band p { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--on-ink-soft); max-width: 560px; }
.cta-band > div { max-width: 560px; }

@media (max-width: 900px) {
  .pay-grid, .mission-grid { grid-template-columns: 1fr; gap: 20px; }
  .resp-grid { grid-template-columns: repeat(2, 1fr); }
  .section-pay, .section-early, .section-mission, .section-responsible, .section-license { padding-top: 48px; }
  .cta-band { padding: 32px; }
  .section-cta { padding: 48px 0 64px; }
}
@media (max-width: 620px) {
  .resp-grid { grid-template-columns: 1fr; }
}
.section-products--page { padding-top: 56px; }

/* контекстная перелинковка */
.section-inline-links { padding: 40px 0 0; }
.inline-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; font-size: 15px; font-weight: 500; }
.inline-links--tight { margin-top: 28px; }
.faq-more { margin: 12px 0 0 !important; font-size: 14px !important; font-weight: 500; }

/* первоисточники */
.section-sources { padding: 56px 0 72px; }
.sources { border-top: 1px solid var(--line); padding-top: 24px; }
.sources-note { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 720px; }
.sources-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; }
.sources-list a { font-weight: 500; }
.sources-list a::after { content: ' ↗'; font-size: 12px; color: var(--muted-5); }
.inline-links-lead { margin: 0 0 12px; font-size: 15px; color: var(--muted); }

/* иконки способов оплаты */
.pay-icon { width: 26px; height: 26px; color: var(--brand-link); display: block; margin-bottom: 12px; }

/* схема четырёх шагов */
.flow { margin: 0 0 32px; padding: 0; }
.flow-svg { width: 100%; height: auto; display: block; color: var(--line-strong); }
.flow-node circle { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.2; }
.flow-n { font-family: var(--mono); font-size: 13px; fill: var(--brand-ink); }
.flow-l { font-family: var(--font); font-size: 14px; font-weight: 600; fill: var(--text); }
@media (max-width: 760px) { .flow { display: none; } }

/* примеры расчёта в карточках продуктов */
.pcard-example {
  margin: 16px 0 0 !important;
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--brand-soft);
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--text) !important;
}
.pcard--dark .pcard-example { background: var(--ink-2); color: var(--on-ink-soft) !important; }
.pcard--muted .pcard-example { background: var(--bg); }
.ex-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 5px;
}
.pcard--dark .ex-label { color: var(--accent); }
.section-exnote { padding: 28px 0 0; }
.ex-note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 760px; }

/* расширенные текстовые секции */
.section-expl { padding: 56px 0 0; }
.section-expl .h2 { margin-bottom: 24px; }
.expl-list { display: grid; gap: 16px; max-width: 860px; }
.expl-list p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-strong); }
.panel-lead--lg { font-size: 15px; line-height: 1.65; margin-top: 16px; }
.inline-links--stack { flex-direction: column; gap: 10px; margin-top: 16px; }

/* акция на первый заём */
.section-promo { padding: 56px 0 0; }
.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 14px;
  padding: 34px 36px;
}
.promo-body { max-width: 680px; }
.promo-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  border-radius: 4px;
  padding: 4px 9px;
}
.promo-title {
  margin: 14px 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.promo-text { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--on-ink-soft); }
.promo-note { margin: 10px 0 0; font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--on-ink-note); }
.promo-cta { flex: none; }

@media (max-width: 760px) {
  .promo { padding: 26px 22px; gap: 22px; }
  .promo-cta { width: 100%; }
  .section-promo { padding-top: 40px; }
}

.pr-intro { margin: 0 0 32px; font-size: 16px; line-height: 1.65; color: var(--text-strong); max-width: 860px; }

/* документные страницы */
.page-hero--doc .page-hero-lead { max-width: 720px; }
.section-doc { padding: 56px 0 16px; }
.doc-body { max-width: 780px; }
.doc-body h2 {
  margin: 32px 0 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 10px 0 0; font-size: 16px; line-height: 1.65; color: var(--text-strong); }
