/* ============================================================
   Калькулятор дефицита калорий — тёмная «фитнес» тема
   ============================================================ */

:root {
  --bg: #070908;
  --bg-soft: #0A0D0B;
  --panel: #0E1310;
  --panel-2: #111713;
  --line: #1F2822;
  --line-soft: #19211B;
  --text: #EDF3EE;
  --muted: #8E9A91;
  --muted-2: #6C776F;
  --lime: #C9FF3D;
  --lime-soft: rgba(201, 255, 61, .12);
  --amber: #FFB020;
  --red: #FF5F56;
  --blue: #6FB8FF;
  --radius: 22px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto 0;
  height: 900px;
  background:
    radial-gradient(600px 380px at 50% 0%, rgba(201, 255, 61, .09), transparent 70%),
    radial-gradient(500px 300px at 85% 10%, rgba(111, 184, 255, .05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

::selection { background: var(--lime); color: #070908; }

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

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(7, 9, 8, .78);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--lime); }

.nav { display: flex; gap: 22px; margin-left: auto; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}
.nav a:hover { color: var(--text); }
.nav a.is-current { color: var(--text); }

/* переключатель калькуляторов */

.page-switch {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #090D0A;
  margin-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page-switch::-webkit-scrollbar { display: none; }

.page-switch a {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.page-switch a:hover { color: var(--text); }
.page-switch a.is-active { background: var(--lime); color: #0A0E0B; }

/* ---------- главная: карточки калькуляторов ---------- */

.tools { padding: 18px 24px 24px; }

.tools h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.tools-lede { margin: 0 0 26px; max-width: 640px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

.tool-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

.tool-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tool-card--wide { grid-column: span 3; }

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 22px 46px -34px var(--accent);
}

.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tool-num { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--accent); }

.tool-card h3 { margin: 10px 0 8px; font-size: 19px; letter-spacing: -.01em; }
.tool-card--wide h3 { font-size: 22px; }

.tool-card p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.tool-meta {
  margin-top: auto;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tool-arrow { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent); }

/* ---------- тренировки: сплит и таблица ---------- */

.split-block { margin-top: 18px; }

.split-title {
  margin: 6px 0;
  font-size: clamp(25px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--lime);
}

.split-sub { margin: 0; font-size: 13px; color: var(--muted); }

.split-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.day-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0A0F0C;
  font-size: 12.5px;
  color: var(--text);
}

.day-chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime);
  color: #0A0E0B;
  font-size: 10.5px;
}

.volume-table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 13px; }

.volume-table th {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.volume-table td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--text); }

.volume-table td:nth-child(2) { color: var(--lime); font-weight: 600; font-variant-numeric: tabular-nums; }
.volume-table td:nth-child(3) { color: var(--muted); }

.volume-table th:nth-child(2), .volume-table td:nth-child(2) { width: 96px; text-align: center; }
.volume-table th:nth-child(3), .volume-table td:nth-child(3) { width: 76px; text-align: right; }

.cardio-line { margin: 14px 0 0; font-size: 12.8px; line-height: 1.5; color: var(--muted); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--lime);
  color: #0A0E0B;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: filter .15s;
}
.nav-cta:hover { filter: brightness(1.08); }

/* ---------- hero ---------- */

.hero { padding: 76px 24px 48px; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lime);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--muted-2);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--muted-2); }

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 800;
  max-width: 1040px;
  text-wrap: balance;
}

.hero h1 em { font-style: normal; color: var(--lime); }

.lede {
  margin: 24px 0 0;
  max-width: 620px;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.facts li { display: flex; flex-direction: column; gap: 2px; }

.facts strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.facts span { font-size: 12.5px; color: var(--muted-2); }

/* ---------- calculator layout ---------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 24px;
}

.calc > * { min-width: 0; }

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}

.panel-hint { font-size: 12px; color: var(--muted-2); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lime);
}

.live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 255, 61, .12);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 255, 61, .12); }
  50% { box-shadow: 0 0 0 7px rgba(201, 255, 61, .04); }
}

/* ---------- form ---------- */

.group { margin-top: 22px; }

.group-title {
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.group-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted-2); }

.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }

.field { display: block; margin-top: 14px; }
.row .field { margin-top: 0; }

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.opt {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.input-wrap { position: relative; display: block; }

input[type="number"], input[type="date"], select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #090D0A;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
}

input[type="number"] { padding-right: 52px; }
input[type="date"] { padding-right: 12px; }

/* Нативные стрелки числа налезают на суффиксы — убираем их */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] { -moz-appearance: textfield; }

input::placeholder { color: #4E5A52; }

input:focus, select:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(201, 255, 61, .13);
}

input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 95, 86, .12); }

.suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted-2);
  pointer-events: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(.45);
  cursor: pointer;
}

.select-wrap { position: relative; display: block; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select option { background: #0E1310; color: var(--text); }

/* segmented control */

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #090D0A;
}

.seg button {
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.seg button:hover { color: var(--text); }

.seg button.is-active {
  background: var(--lime);
  color: #0A0E0B;
}

/* chips */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.chip {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.chip:hover { border-color: #33413A; color: var(--text); }

.chip.is-active {
  border-color: var(--lime);
  background: var(--lime-soft);
  color: var(--lime);
}

.field-hint { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.45; color: var(--muted-2); }

/* ---------- results ---------- */

.results { border-color: #263125; }

.limit-block { margin-top: 18px; }

.limit-label {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.limit-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: clamp(54px, 7.2vw, 78px);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.05em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.limit-unit { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }

.limit-note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

.limit-value { transition: color .2s; }
.limit-value.is-danger { color: var(--amber); }
.limit-value.is-stop { color: var(--red); }

/* ИМТ: цвет по категории */

.limit-value.cat-under { color: var(--blue); }
.limit-value.cat-normal { color: var(--lime); }
.limit-value.cat-over { color: var(--amber); }
.limit-value.cat-ob1 { color: #FF7A45; }
.limit-value.cat-ob2,
.limit-value.cat-ob3 { color: var(--red); }

/* ИМТ: шкала */

.bmi-scale { position: relative; margin-top: 22px; padding-top: 14px; }

.bmi-track {
  display: flex;
  gap: 2px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.bmi-seg { display: block; height: 100%; }
.seg-under { width: 11.667%; background: var(--blue); }
.seg-normal { width: 21.666%; background: var(--lime); }
.seg-over { width: 16.667%; background: var(--amber); }
.seg-ob1 { width: 16.667%; background: #FF7A45; }
.seg-ob2 { width: 16.667%; background: var(--red); }
.seg-ob3 { width: 16.667%; background: #C93B34; }

.bmi-marker {
  position: absolute;
  top: 10px;
  left: 0;
  transform: translateX(-50%);
  opacity: 0;
  transition: left .3s ease, opacity .2s ease;
}

.bmi-marker i {
  display: block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(7, 9, 8, .55);
}

.bmi-ticks { position: relative; height: 16px; margin-top: 6px; }

.bmi-ticks span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* ИМТ: пояснение в форме и переход к калориям */

.note-card {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #0A0F0C;
}

.note-card p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted-2); }
.note-card strong { color: var(--text); font-weight: 600; }

.bmi-legend { margin-top: 20px; }
.bmi-legend ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.bmi-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.bmi-legend i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.dot-under { background: var(--blue); }
.dot-normal { background: var(--lime); }
.dot-over { background: var(--amber); }
.dot-ob { background: var(--red); }

.next-step {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(201, 255, 61, .22);
  border-radius: 16px;
  background: rgba(201, 255, 61, .045);
}

.next-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.next-step .btn { width: auto; }

/* ---------- danger / safe notice ---------- */

.danger {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
}

.danger:empty { display: none; }

.danger.is-warn { border-color: rgba(255, 176, 32, .38); background: rgba(255, 176, 32, .07); }
.danger.is-stop { border-color: rgba(255, 95, 86, .45); background: rgba(255, 95, 86, .08); }
.danger.is-safe { border-color: rgba(201, 255, 61, .3); background: rgba(201, 255, 61, .05); }

.danger-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
}

.danger.is-stop .danger-head { color: var(--red); }
.danger.is-safe .danger-head { color: var(--lime); }

.danger-list {
  display: grid;
  gap: 5px;
  margin: 9px 0 0;
  padding-left: 18px;
  font-size: 12.8px;
  line-height: 1.5;
  color: #E7EDE8;
}

.danger-list li::marker { color: currentColor; }

.danger-risk { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.danger-safe { margin: 10px 0 0; font-size: 12.8px; line-height: 1.5; color: var(--text); }
.danger-safe strong { color: var(--lime); }
.danger-text { margin: 8px 0 0; font-size: 12.8px; line-height: 1.5; color: var(--muted); }

.btn.btn-safe, .btn.btn-ghost { height: 40px; margin-top: 12px; padding: 0 16px; font-size: 13px; }
.btn.btn-safe { background: var(--lime); color: #0A0E0B; border: 0; }
.btn.btn-safe:hover { filter: brightness(1.07); }
.btn.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.btn-ghost:hover { border-color: #3A4A40; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.stat { padding: 13px 0 12px; min-width: 0; }
.stat:nth-child(odd) { border-right: 1px solid var(--line-soft); padding-right: 14px; }
.stat:nth-child(even) { padding-left: 16px; }
.stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }

.stat-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stat strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat-sub { font-size: 11.5px; color: var(--muted-2); }

.macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }

.macro {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #0A0F0C;
}

.macro-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.macro-label i { width: 7px; height: 7px; border-radius: 50%; }

.macro strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.macro-sub { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

.macro-p i { background: var(--lime); }
.macro-f i { background: var(--amber); }
.macro-c i { background: var(--blue); }

.macro-bar {
  display: flex;
  gap: 3px;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #0A0F0C;
}

.macro-bar span { height: 100%; width: 0; transition: width .35s ease; }
.macro-bar span:nth-child(1) { background: var(--lime); }
.macro-bar span:nth-child(2) { background: var(--amber); }
.macro-bar span:nth-child(3) { background: var(--blue); }

.equiv { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted-2); }
.equiv.is-alert { color: var(--amber); font-size: 13px; }

.is-hidden { display: none !important; }

.chart-wrap { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

#chart { display: block; width: 100%; height: auto; overflow: visible; }

.bmi-line { margin: 8px 0 0; font-size: 12px; color: var(--muted-2); }

/* warnings */

.warnings { display: grid; gap: 8px; margin-top: 14px; }
.warnings:empty { display: none; }

.warning {
  padding: 10px 13px;
  border-radius: 12px;
  border-left: 3px solid var(--line);
  font-size: 12.8px;
  line-height: 1.5;
  color: #C6D2C9;
  background: rgba(255, 255, 255, .025);
}

.warning.warn { border-left-color: var(--amber); background: rgba(255, 176, 32, .07); }
.warning.stop { border-left-color: var(--red); background: rgba(255, 95, 86, .08); color: #FFD9D5; }
.warning.info { border-left-color: #3E5145; }

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s, transform .1s;
}

.btn-primary { background: var(--lime); color: #0A0E0B; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: scale(.98); }

.water { font-size: 12px; color: var(--muted-2); }

/* ---------- how ---------- */

.how { padding: 72px 24px 24px; }

.how h2, .faq h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.03em;
  line-height: 1.05;
}

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

.how-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.how-num { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: var(--lime); }

.how-card h3 { margin: 10px 0 8px; font-size: 18px; letter-spacing: -.01em; }

.how-card p { margin: 0; font-size: 13.8px; line-height: 1.6; color: var(--muted); }

.how-card code {
  display: block;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #090D0A;
  color: #BFD9C7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-x: auto;
}

.how-note { margin: 18px 0 0; max-width: 720px; font-size: 13px; line-height: 1.6; color: var(--muted-2); }

/* ---------- faq ---------- */

.faq { padding: 56px 24px 80px; }

.faq-list { margin-top: 24px; border-top: 1px solid var(--line); }

details { border-bottom: 1px solid var(--line); }

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  flex: none;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--lime);
}

details[open] summary::after { content: "−"; }

details p {
  margin: 0;
  padding: 0 0 18px;
  max-width: 780px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

details p a { color: var(--lime); text-decoration: none; border-bottom: 1px solid rgba(201, 255, 61, .35); }
details p a:hover { border-bottom-color: var(--lime); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line-soft); padding: 34px 0 46px; }

.footer-inner { display: grid; gap: 10px; }

.footer-logo { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.footer-logo span { color: var(--lime); }

.footer-text { margin: 0; max-width: 660px; font-size: 12.5px; line-height: 1.6; color: var(--muted-2); }

.footer-copy { margin: 8px 0 0; font-size: 12px; color: #4E5A52; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted-2);
}

.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- cookie banner ---------- */

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid #2A362C;
  border-radius: 16px;
  background: rgba(16, 21, 18, .97);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .85);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .25s ease, transform .25s ease;
}

.cookie.is-visible { opacity: 1; transform: none; }

.cookie-inner { display: flex; align-items: center; gap: 18px; }

.cookie-text { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.cookie-text strong { color: var(--text); font-weight: 600; }
.cookie-text a { color: var(--lime); }

.cookie-actions { display: flex; flex: none; gap: 8px; }
.cookie .btn { height: 40px; padding: 0 18px; font-size: 13px; width: auto; }

/* ---------- страница политики ---------- */

.policy { max-width: 880px; padding: 64px 24px 80px; }

.policy h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.policy-meta { margin: 0 0 30px; font-size: 12.5px; color: var(--muted-2); }
.policy h2 { margin: 34px 0 10px; font-size: 20px; letter-spacing: -.01em; }

.policy p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.75; color: var(--muted); }
.policy ul { display: grid; gap: 6px; margin: 0 0 14px; padding-left: 22px; }
.policy li { font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.policy strong { color: var(--text); font-weight: 600; }
.policy a { color: var(--lime); }

.policy code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #0A0F0C;
  color: #BFD9C7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.policy table { width: 100%; margin: 8px 0 18px; border-collapse: collapse; font-size: 13.5px; }

.policy th {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.policy td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); vertical-align: top; }

.policy .btn { margin-top: 4px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--lime);
  color: #0A0E0B;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .calc { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
  .how-grid { grid-template-columns: 1fr; }
  .page-switch { width: 100%; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card, .tool-card--wide { grid-column: span 1; }
  .tool-card:last-child { grid-column: span 2; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav-cta { margin-left: auto; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-cta { margin-left: auto; }
  .logo { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 40px 18px 34px; }
  .panel { padding: 20px; border-radius: 18px; }
  .facts { gap: 22px; }
  .facts strong { font-size: 22px; }
  .lede { font-size: 16px; }
  .macro { padding: 10px; }
  .macro strong { font-size: 18px; }
  .stat strong { font-size: 17.5px; }
  .limit-value { font-size: 58px; }
  .result-actions { justify-content: stretch; }
  .btn-primary { width: 100%; }
  .water { order: -1; }
  .chips { gap: 6px; }
  .chip { height: 30px; padding: 0 10px; font-size: 12px; }
  .page-switch a { padding: 8px 12px; font-size: 12.5px; }
  .tools, .how, .faq { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card:last-child { grid-column: span 1; }
  .cookie { left: 10px; right: 10px; bottom: 10px; padding: 14px; }
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-actions .btn { flex: 1; width: auto; }
  .policy { padding: 44px 18px 64px; }
  .policy table { font-size: 12px; }
  .policy th, .policy td { padding-right: 6px; }
}

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