@import url("fonts.css");

/* ============================================================
   Дизайн-система: тёмный монохром, стекло, приборная точность.

   Акцентного цвета нет — ровно один тон от почти-чёрного к белому.
   Единственный цвет на странице семантический: зелёный/жёлтый/красный
   у статусов расчёта. На монохромном фоне они читаются как индикаторы
   прибора, а не как украшение — в этом весь смысл.

   Тёмная тема основная, светлая — равноправная, не инверсия.
   ============================================================ */

:root {
  --bg:         #09090B;
  --surface:    #131316;
  --surface-2:  #18181B;
  --surface-3:  #202024;
  --text:       #FAFAFA;
  --muted:      #A1A1AA;
  --faint:      #8B8B94;

  /* «Акцент» в монохроме — это белый. Кнопка белая, текст на ней тёмный. */
  --accent:      #FAFAFA;
  --accent-ink:  #09090B;
  --accent-soft: rgba(255,255,255,.06);

  --line:      rgba(255,255,255,.09);
  --line-soft: rgba(255,255,255,.05);
  --line-lit:  rgba(255,255,255,.22);

  --good: #4ADE80;
  --warn: #FBBF24;
  --bad:  #FB7185;
  --good-soft: rgba(74,222,128,.10);
  --warn-soft: rgba(251,191,36,.10);
  --bad-soft:  rgba(251,113,133,.10);

  --glass-bg:     rgba(9,9,11,.72);
  --glass-border: rgba(255,255,255,.08);

  --shadow:      0 1px 2px rgba(0,0,0,.4);
  --shadow-lift: 0 8px 30px rgba(0,0,0,.5);

  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Onest', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --col: 720px;
  --wide: 1140px;
  --pad: 24px;
  --radius: 14px;
}

/* Светлая тема: тот же монохром, перевёрнутый осознанно.
   Тёплый оттенок фона, а не чистый белый — иначе слепит. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:        #FAFAFA;
    --surface:   #FFFFFF;
    --surface-2: #F4F4F5;
    --surface-3: #E9E9EC;
    --text:      #09090B;
    --muted:     #52525B;
    --faint:     #6B6B74;

    --accent:      #18181B;
    --accent-ink:  #FFFFFF;
    --accent-soft: rgba(9,9,11,.05);

    --line:      rgba(9,9,11,.11);
    --line-soft: rgba(9,9,11,.06);
    --line-lit:  rgba(9,9,11,.28);

    --good: #15803D;
    --warn: #A16207;
    --bad:  #BE123C;
    --good-soft: rgba(21,128,61,.09);
    --warn-soft: rgba(161,98,7,.09);
    --bad-soft:  rgba(190,18,60,.08);

    --glass-bg:     rgba(250,250,250,.78);
    --glass-border: rgba(9,9,11,.08);

    --shadow:      0 1px 2px rgba(9,9,11,.05), 0 2px 8px rgba(9,9,11,.04);
    --shadow-lift: 0 8px 30px rgba(9,9,11,.10);
  }
}

:root[data-theme="light"] {
  --bg:        #FAFAFA;
  --surface:   #FFFFFF;
  --surface-2: #F4F4F5;
  --surface-3: #E9E9EC;
  --text:      #09090B;
  --muted:     #52525B;
  --faint:     #6B6B74;

  --accent:      #18181B;
  --accent-ink:  #FFFFFF;
  --accent-soft: rgba(9,9,11,.05);

  --line:      rgba(9,9,11,.11);
  --line-soft: rgba(9,9,11,.06);
  --line-lit:  rgba(9,9,11,.28);

  --good: #15803D;
  --warn: #A16207;
  --bad:  #BE123C;
  --good-soft: rgba(21,128,61,.09);
  --warn-soft: rgba(161,98,7,.09);
  --bad-soft:  rgba(190,18,60,.08);

  --glass-bg:     rgba(250,250,250,.78);
  --glass-border: rgba(9,9,11,.08);

  --shadow:      0 1px 2px rgba(9,9,11,.05), 0 2px 8px rgba(9,9,11,.04);
  --shadow-lift: 0 8px 30px rgba(9,9,11,.10);
}

* { 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; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 700; line-height: 1.12;
  margin: 0; text-wrap: balance; letter-spacing: -.02em;
}
h1 { font-size: 46px; }
h2 { font-size: 34px; }
h3 { font-size: 25px; letter-spacing: -.015em; }
h4 { font-size: 20px; letter-spacing: -.01em; }
p  { margin: 0; }

@media (max-width: 767px) {
  body { font-size: 16px; }
  h1 { font-size: 31px; }
  h2 { font-size: 25px; }
  h3 { font-size: 21px; }
  h4 { font-size: 18px; }
}

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-lit); }
a:hover { text-decoration-color: currentColor; }

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

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

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

/* ─────────────────────────────────── Разметка */

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad); }
.col  { max-width: var(--col);  margin: 0 auto; padding: 0 var(--pad); }
@media (max-width: 767px) { :root { --pad: 16px; } }

.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }
@media (max-width: 767px) {
  .section { padding: 56px 0; }
  .section--tight { padding: 40px 0; }
}

.stack { display: flex; flex-direction: column; }
.stack-8  { gap: 8px; }
.stack-16 { gap: 16px; }
.stack-24 { gap: 24px; }
.stack-32 { gap: 32px; }
.stack-48 { gap: 48px; }

.label {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}

.lead { font-size: 20px; line-height: 1.55; color: var(--muted); }
@media (max-width: 767px) { .lead { font-size: 17px; } }

.muted { color: var(--muted); }
.small { font-size: 15px; }
.tiny  { font-size: 13px; }

/* Светящаяся линия-разделитель — приём из референса: полоса, яркая
   в середине и растворяющаяся к краям. */
.beam {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-lit), transparent);
}

/* ─────────────────────────────────── Шапка */

.hdr {
  position: sticky; top: 0; z-index: 50; height: 64px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.hdr__in {
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad);
  height: 100%; display: flex; align-items: center; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 18px; font-weight: 700;
  letter-spacing: -.02em; color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 26px; height: 26px; flex: none; color: var(--text); display: block; }

.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.hdr__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.themetoggle, .burger {
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--line); border-radius: 9px;
  background: transparent; color: var(--muted);
  cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, color .15s, background .15s;
}
.themetoggle:hover, .burger:hover { border-color: var(--line-lit); color: var(--text); background: var(--accent-soft); }
.burger { display: none; }

@media (max-width: 1023px) {
  .nav { display: none; }
  .burger { display: grid; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px var(--pad) 16px;
  }
  .nav.is-open a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 10px; border: 1px solid transparent;
  font: 600 15.5px/1 var(--sans); letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease),
              transform .12s var(--ease), opacity .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--bg)); }

.btn--secondary { background: var(--accent-soft); color: var(--text); border-color: var(--line); }
.btn--secondary:hover { border-color: var(--line-lit); background: var(--surface-2); }

.btn--sm { height: 38px; padding: 0 15px; font-size: 14px; }

.btn.is-loading { color: transparent !important; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 17px; height: 17px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  color: var(--accent-ink); animation: spin .7s linear infinite;
}
.btn--secondary.is-loading::after { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────── Карточки */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
a.card {
  display: block; color: inherit; text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s;
}
a.card:hover {
  border-color: var(--line-lit); transform: translateY(-2px);
  background: var(--surface-2); text-decoration: none;
}

/* ─────────────────────────────────── Калькулятор */

.calc {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 32px; align-items: start;
}
@media (max-width: 1023px) { .calc { grid-template-columns: 1fr; gap: 24px; } }
.calc__inputs, .calc__results { min-width: 0; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border-radius: 10px; border: 1px solid var(--line);
}
.seg button {
  border: 0; background: transparent; color: var(--muted);
  font: 600 14.5px/1 var(--sans); padding: 10px 16px; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.field__box { position: relative; display: flex; }
.field__box input {
  width: 100%; height: 46px; padding: 0 64px 0 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  font: 500 16.5px/1 var(--sans); font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -moz-appearance: textfield;
}
.field__box input::-webkit-outer-spin-button,
.field__box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__box input:hover { border-color: var(--line-lit); }
.field__box input:focus {
  outline: none; border-color: var(--text); background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field__unit {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--faint); pointer-events: none;
  max-width: 52px; text-align: right;
}
.field__hint { font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.field.is-error .field__box input { border-color: var(--bad); }
.field.is-error .field__box input:focus { box-shadow: 0 0 0 3px var(--bad-soft); }
.field__error { display: none; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--bad); }
.field.is-error .field__error { display: flex; }
.field__error::before {
  content: "!"; flex: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bad); color: var(--bg); font-size: 10px; font-weight: 700;
  display: grid; place-items: center; margin-top: 2px;
}

.res {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start;
}
.res__stripe { flex: none; width: 2px; align-self: stretch; border-radius: 2px; background: var(--line); }
.res.is-good .res__stripe { background: var(--good); }
.res.is-warn .res__stripe { background: var(--warn); }
.res.is-bad  .res__stripe { background: var(--bad); }
.res__body { min-width: 0; flex: 1; }
.res__label { font-size: 14px; color: var(--muted); font-weight: 500; }
.res__value {
  font-size: 33px; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums; letter-spacing: -.025em;
  margin-top: 3px; word-break: break-word; font-family: var(--display);
}
.res__value .u { font-size: 17px; font-weight: 500; color: var(--faint); margin-left: 4px; letter-spacing: 0; }
.res--primary .res__value { font-size: 42px; }
@media (max-width: 767px) {
  .res__value { font-size: 27px; }
  .res--primary .res__value { font-size: 33px; }
}
.res__hint { font-size: 12.5px; color: var(--faint); margin-top: 4px; line-height: 1.45; }
.res__note { font-size: 13.5px; line-height: 1.5; margin-top: 8px; }
.res.is-good .res__note { color: var(--good); }
.res.is-warn .res__note { color: var(--warn); }
.res.is-bad  .res__note { color: var(--bad); }

.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.res-grid .res--primary { grid-column: 1 / -1; }
@media (max-width: 520px) { .res-grid { grid-template-columns: 1fr; } }

.bench { padding: 20px; }
.bench__bar {
  position: relative; height: 8px; border-radius: 4px; margin: 28px 0 10px;
  background: linear-gradient(90deg, var(--bad) 0%, var(--bad) 30%, var(--warn) 30%,
              var(--warn) 62%, var(--good) 62%, var(--good) 100%);
  opacity: .85;
}
.bench__you {
  position: absolute; top: -7px; width: 2px; height: 22px; border-radius: 2px;
  background: var(--text); transform: translateX(-50%); transition: left .3s var(--ease);
}
.bench__you::after {
  content: "вы здесь"; position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--text);
}
.bench__scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

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

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th {
  background: var(--surface-2); color: var(--muted);
  text-align: left; font-weight: 600; padding: 12px 16px; white-space: nowrap;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
}
tbody td { padding: 13px 16px; border-top: 1px solid var(--line-soft); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
.delta-pos { color: var(--good); font-weight: 600; }
.delta-neg { color: var(--bad); font-weight: 600; }

/* ─────────────────────────────────── Врезки */

.note {
  border: 1px solid var(--line); border-left: 2px solid var(--line-lit);
  border-radius: 0 12px 12px 0; padding: 18px 22px; background: var(--surface);
  font-size: 15.5px; line-height: 1.6;
}
.note--accent { border-left-color: var(--text); background: var(--surface-2); }
.note--warn { border-left-color: var(--warn); background: var(--warn-soft); border-color: transparent; }

.formula {
  font-family: var(--mono); font-size: 14px; line-height: 1.75;
  white-space: pre-wrap; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
  overflow-x: auto; color: var(--muted);
}

details.faq { border-bottom: 1px solid var(--line-soft); padding: 18px 0; }
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16.5px; list-style: none;
  display: flex; gap: 12px; align-items: flex-start;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "+"; flex: none; color: var(--faint); font-weight: 400; width: 16px; font-size: 19px; line-height: 1.2; }
details.faq[open] summary::before { content: "\2212"; }
details.faq p { margin-top: 10px; padding-left: 28px; color: var(--muted); line-height: 1.65; }

/* ─────────────────────────────────── Каталог */

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat-card__cat { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.cat-card h3 { font-size: 19px; margin: 10px 0 6px; }
.cat-card p { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.cat-card--soon { opacity: .5; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  background: var(--accent-soft); color: var(--muted); border: 1px solid var(--line);
}
.badge--soon { background: transparent; color: var(--faint); }

/* ─────────────────────────────────── Мобильная липкая панель */

.sticky-metric {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: center; gap: 16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--glass-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
}
.sticky-metric__label { font-size: 12.5px; color: var(--faint); }
.sticky-metric__value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; font-family: var(--display); }
.sticky-metric.is-good .sticky-metric__value { color: var(--good); }
.sticky-metric.is-bad  .sticky-metric__value { color: var(--bad); }
.sticky-metric .btn { margin-left: auto; }
@media (max-width: 1023px) { .sticky-metric.is-visible { display: flex; } body.has-sticky { padding-bottom: 80px; } }

/* ─────────────────────────────────── Крошки */

.crumbs { font-size: 13.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { opacity: .45; }

/* ─────────────────────────────────── Футер */

.ftr {
  background: var(--bg); color: var(--muted);
  padding: 56px 0 32px; margin-top: 96px;
  border-top: 1px solid var(--line);
}
.ftr a { color: var(--muted); text-decoration: none; }
.ftr a:hover { color: var(--text); }
.ftr__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.ftr h4 {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px;
}
.ftr ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; }
.ftr__bottom {
  border-top: 1px solid var(--line-soft); margin-top: 40px; padding-top: 24px;
  font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; color: var(--faint);
}
.ftr__bottom .sep { margin-left: auto; }

/* ═══════════════════════════════════════ Главная ═══════════════════ */

.hero { position: relative; padding: 88px 0 96px; overflow: hidden; }
@media (max-width: 767px) { .hero { padding: 48px 0 56px; } }

/* Сетка связей на фоне — рисуется на canvas, не путается с контентом. */
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .55;
  mask-image: radial-gradient(120% 80% at 50% 30%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 30%, #000 25%, transparent 75%);
}
.hero > .wrap { position: relative; z-index: 1; }

.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}
@media (max-width: 1023px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }

.hero h1 { font-size: 56px; letter-spacing: -.035em; }
@media (max-width: 1023px) { .hero h1 { font-size: 42px; } }
@media (max-width: 767px)  { .hero h1 { font-size: 33px; } }

.hero__lead { font-size: 18.5px; line-height: 1.65; color: var(--muted); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13.5px; color: var(--faint); }
.hero__trust span { display: flex; align-items: center; gap: 7px; }
.hero__trust span::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); flex: none;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 6px 13px 6px 9px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--accent-soft);
  font-size: 12.5px; color: var(--muted);
}
.eyebrow b { color: var(--text); font-weight: 600; }
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}

/* Живой прибор в первом экране */
.instr {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-lift);
  padding: 24px; display: flex; flex-direction: column; gap: 20px;
}
/* Светящаяся кромка сверху — приём из референса. */
.instr::before {
  content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-lit), transparent);
}
.instr__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.instr__title { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.instr__live { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.instr__live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}

.instr__slider { display: flex; flex-direction: column; gap: 8px; }
.instr__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.instr__row b { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--text); font-family: var(--display); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; margin: 6px 0;
  background: var(--surface-3); cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text); border: 4px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; border: 4px solid var(--surface);
  background: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: grab;
}
input[type="range"]:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

.instr__out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.instr__cell {
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 3px;
}
.instr__cell small { font-size: 11.5px; color: var(--faint); }
.instr__cell strong {
  font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1.2;
  font-family: var(--display); letter-spacing: -.02em;
}
.instr__cell.is-good strong { color: var(--good); }
.instr__cell.is-warn strong { color: var(--warn); }
.instr__cell.is-bad  strong { color: var(--bad); }

.instr__verdict { font-size: 13.5px; line-height: 1.55; padding: 13px 15px; border-radius: 12px; }
.instr__verdict.is-good { color: var(--good); background: var(--good-soft); }
.instr__verdict.is-warn { color: var(--warn); background: var(--warn-soft); }
.instr__verdict.is-bad  { color: var(--bad);  background: var(--bad-soft);  }

.instr__foot { font-size: 12px; color: var(--faint); }

/* ─────────────────────────────────── Три задачи */

.jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1023px) { .jobs { grid-template-columns: 1fr; } }

.job {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s;
}
.job:hover { border-color: var(--line-lit); transform: translateY(-2px); background: var(--surface-2); }
.job__icon { color: var(--muted); width: 28px; height: 28px; }
.job__title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.job p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.job a { font-size: 14.5px; font-weight: 600; margin-top: auto; padding-top: 6px; text-decoration: none; color: var(--text); }
.job a:hover { text-decoration: underline; text-underline-offset: 4px; }

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

.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mat {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; color: inherit; text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s;
}
a.mat:hover { border-color: var(--line-lit); transform: translateY(-2px); background: var(--surface-2); text-decoration: none; }
.mat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mat__icon { color: var(--muted); width: 24px; height: 24px; flex: none; }
.mat h3 { font-size: 18.5px; }
.mat p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.mat__meta { font-size: 12.5px; color: var(--faint); margin-top: auto; padding-top: 8px; }
.mat--soon { opacity: .5; }

/* ─────────────────────────────────── Полоса курса */

.band {
  background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 72px 0; position: relative;
}
@media (max-width: 767px) { .band { padding: 48px 0; } }
.band::before {
  content: ""; position: absolute; top: -1px; left: 25%; right: 25%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-lit), transparent);
}
.band__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 1023px) { .band__grid { grid-template-columns: 1fr; gap: 32px; } }
.band__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.band__stat { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.band__stat strong {
  display: block; font-size: 28px; font-variant-numeric: tabular-nums;
  line-height: 1.15; font-family: var(--display); letter-spacing: -.025em;
}
.band__stat small { font-size: 12.5px; color: var(--faint); }

/* ─────────────────────────────────── Консультация */

.consult { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
@media (max-width: 767px) { .consult { padding: 22px; } }
.consult__form { display: flex; flex-direction: column; gap: 16px; }
.consult__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .consult__row { grid-template-columns: 1fr; } }
.consult textarea {
  width: 100%; min-height: 96px; padding: 12px 14px; resize: vertical;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  font: 400 15.5px/1.55 var(--sans);
}
.consult textarea::placeholder { color: var(--faint); }
.consult textarea:focus { outline: none; border-color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.consult__ok {
  display: none; gap: 10px; align-items: flex-start;
  padding: 15px 17px; border-radius: 12px;
  background: var(--good-soft); color: var(--good); font-size: 14.5px; line-height: 1.55;
}
.consult.is-sent .consult__ok { display: flex; }
.consult.is-sent .consult__form { display: none; }

/* ─────────────────────────────────── Печать */

@media print {
  /* На печати тема всегда светлая: тёмный фон съедает картридж, а если
     посетитель смотрел сайт в тёмной теме, карточки ушли бы чёрными
     прямоугольниками. Переопределяем токены, а не отдельные правила. */
  :root, :root[data-theme="dark"], :root[data-theme="light"] {
    --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F7F7F8; --surface-3: #EFEFF1;
    --text: #111113; --muted: #44444A; --faint: #6B6B74;
    --accent: #111113; --accent-ink: #FFFFFF; --accent-soft: #F2F2F4;
    --line: #D6D6DB; --line-soft: #E8E8EC; --line-lit: #B8B8C0;
    --good: #15803D; --warn: #A16207; --bad: #BE123C;
    --good-soft: #EDF6F0; --warn-soft: #FBF4E6; --bad-soft: #FBEDF1;
    --shadow: none; --shadow-lift: none;
  }

  .hdr, .ftr, .sticky-metric, .btn, .themetoggle, .burger,
  .hero__canvas, .crumbs, .skip { display: none !important; }

  body { background: #fff; font-size: 11pt; }
  @page { margin: 14mm 12mm; }

  /* Раскладка «поля слева, результаты справа» на ширине листа сжимала
     правую колонку так, что крупные числа переносились по одной цифре.
     На печати раскладываем сверху вниз. */
  .calc { grid-template-columns: 1fr !important; gap: 14px; }
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }

  /* Число — единый неразрывный блок. Именно break-word рассыпал «120 000 ₽». */
  .res__value {
    font-size: 20pt !important; white-space: nowrap; word-break: normal;
    overflow-wrap: normal; letter-spacing: -.02em;
  }
  .res--primary .res__value { font-size: 24pt !important; }
  .res__value .u { font-size: 11pt; }
  .res { padding: 10px 12px; }
  .res__note { font-size: 9pt; }
  .res__hint { font-size: 8pt; }

  /* Поля ввода на бумаге читаются как значения, а не как элементы формы. */
  .field__box input {
    height: auto; padding: 4px 8px; font-size: 11pt;
    border-color: var(--line); background: #fff;
  }
  .field__hint { font-size: 8pt; }

  .section, .section--tight { padding: 10px 0 !important; }
  h1 { font-size: 20pt; } h2 { font-size: 14pt; } h3 { font-size: 12pt; }
  .lead { font-size: 11pt; }
  .formula { font-size: 9pt; padding: 10px 12px; }

  /* Разрывы страниц: карточка не должна рваться пополам,
     заголовок не должен оставаться внизу листа без текста. */
  .card, .res, .tablewrap, .note, details.faq { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }

  /* Раскрытие ответов делает обработчик beforeprint — CSS тут не поможет.
     Здесь убираем только знак сворачивания: на бумаге он бессмыслен. */
  details.faq summary::before { content: "" !important; width: 0 !important; }
  details.faq { padding: 10px 0; }
  details.faq p { padding-left: 0; }

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