/* =========================================================
   Бариатрия Волгоград — bariatria-volgograd.ru
   Дизайн-система: спокойный медицинский стиль.
   Один файл, без внешних зависимостей и шрифтов.
   ========================================================= */

:root {
  --ink:        #16292e;
  --ink-soft:   #44595f;
  --muted:      #6f8288;
  --line:       #dce5e3;
  --line-soft:  #eaf0ee;
  --paper:      #ffffff;
  --sand:       #f7f4ee;
  --sand-deep:  #efe9dd;
  --teal:       #0f5d57;
  --teal-dark:  #0a4641;
  --teal-soft:  #e4efec;
  --teal-tint:  #f2f8f6;
  --gold:       #a8732a;
  --gold-deep:  #8a5c1c;
  --gold-soft:  #f6ecda;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(22, 41, 46, .06), 0 1px 3px rgba(22, 41, 46, .04);
  --shadow-md: 0 10px 30px -12px rgba(22, 41, 46, .18);
  --shadow-lg: 0 30px 60px -30px rgba(22, 41, 46, .28);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --wrap-narrow: 760px;
  --header-h: 72px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
strong, b { font-weight: 650; }

h1, h2, h3, h4 {
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.018em;
  margin: 0 0 .6em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.45rem + 1.7vw, 2.75rem); line-height: 1.1; letter-spacing: -.028em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: clamp(1.18rem, 1.05rem + .5vw, 1.4rem); }
p  { margin: 0 0 1em; text-wrap: pretty; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--wrap-narrow); }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--r-sm);
  transition: top .18s;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1rem; letter-spacing: -.02em; }
.brand-tag { font-size: .66rem; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; margin-top: 3px; }

.main-nav { margin-left: auto; }
.main-nav .nav-list { row-gap: 4px; }
.nav-list { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 9px 10px; border-radius: var(--r-pill);
  font-size: .875rem; font-weight: 500; white-space: nowrap; font-weight: 500; color: var(--ink-soft); text-decoration: none;
  transition: background .16s, color .16s;
}
.nav-list a:hover { background: var(--teal-tint); color: var(--teal-dark); }
.nav-list a[aria-current="page"] { background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }

.header-cta { margin-left: 4px; }
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; cursor: pointer; align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle span { position: relative; display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .18s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1199px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none; padding: 12px 24px 20px;
  }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: 12px 14px; border-radius: var(--r-sm); font-size: 1rem; }
  .header-cta { display: none; }
  .main-nav .header-cta { display: block; margin: 12px 0 0; }
  .main-nav .header-cta .btn { width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: var(--r-pill);
  font: inherit; font-size: .97rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 8px 20px -10px rgba(168, 115, 42, .8); }
.btn-primary:hover { background: var(--gold-deep); color: #fff; }
.btn-secondary { background: var(--teal); color: #fff; }
.btn-secondary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-tint); }
.btn-arrow::after { content: "→"; font-weight: 400; transition: transform .18s; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 18px 0 0; font-size: .84rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: #b9c6c4; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--teal); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 44px 0 64px; overflow: hidden; background: var(--sand); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 45%; height: 720px;
  background: radial-gradient(circle at 50% 40%, var(--teal-soft) 0%, rgba(228, 239, 236, 0) 62%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: start; }
.hero h1 { margin-bottom: 22px; max-width: 17ch; }
.hero-lead { font-size: clamp(1.06rem, 1rem + .4vw, 1.28rem); color: var(--ink-soft); line-height: 1.55; max-width: 33ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 28px; padding: 0; margin: 0; list-style: none; font-size: .9rem; color: var(--ink-soft); }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 28px 0 48px; }
  .hero-lead { max-width: 46ch; }
}

/* ---------- BMI calculator ---------- */
.calc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}
.calc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.calc-head svg { width: 26px; height: 26px; color: var(--teal); }
.calc-title { font-size: 1.15rem; font-weight: 650; margin: 0; }
.calc-hint { font-size: .85rem; color: var(--muted); margin: 0 0 20px; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fcfdfd; color: var(--ink);
}
.field input:focus { border-color: var(--teal); background: #fff; }
.calc-result {
  margin-top: 18px; border-radius: var(--r-md); background: var(--teal-tint);
  border: 1px solid var(--teal-soft); padding: 16px 18px;
}
.calc-value { display: flex; align-items: baseline; gap: 10px; }
.calc-value output { font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--teal-dark); }
.calc-value span { font-size: .85rem; color: var(--muted); }
.calc-status { font-weight: 600; margin: 6px 0 4px; }
.calc-note { margin: 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.5; }
.calc-scale { display: flex; gap: 3px; margin-top: 14px; }
.calc-scale i { height: 6px; border-radius: 3px; flex: 1; background: var(--line); }
.calc-scale i.on { background: var(--teal); }
.calc-legend { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: 6px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--sand { background: var(--sand); }
.section--teal { background: var(--teal); color: #dfecea; }
.section--teal h2, .section--teal h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; margin-bottom: 0; }
.section--teal .section-head p { color: #c5dad6; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 26px; text-decoration: none; color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
a.card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal-dark); margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 0; line-height: 1.55; }
.card .card-more { margin-top: 16px; font-size: .88rem; font-weight: 600; color: var(--teal); display: inline-flex; align-items: center; gap: 6px; }
a.card:hover .card-more { text-decoration: underline; }
.card--flat { background: var(--teal-tint); border-color: transparent; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; margin: 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; padding-bottom: 32px; }
.step:last-child { padding-bottom: 0; }
.step-num {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 1.05rem;
  display: grid; place-items: center; margin-top: 4px;
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 48px; bottom: 0; width: 2px; background: var(--line);
}
.step h3 { font-size: 1.1rem; margin: 8px 0 8px; }
.step p { font-size: .95rem; color: var(--ink-soft); margin-bottom: .6em; }
.step p:last-child { margin-bottom: 0; }
.step-meta { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); display: block; margin-top: 2px; }

/* ---------- Split / media ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split--reverse .split-media { order: 2; }
.split h2 { margin-bottom: 20px; }
.split p:last-child { margin-bottom: 0; }
.split-media img { border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.media-frame { position: relative; }
.media-frame::after {
  content: ""; position: absolute; inset: 16px -16px -16px 16px; border-radius: var(--r-md);
  border: 1px solid var(--teal-soft); background: var(--teal-tint); z-index: -1;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split-media { order: 0; }
}

/* ---------- Checklist / indications ---------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 34px; font-size: .98rem; color: var(--ink-soft); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f5d57' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.check-list--cross li::before {
  background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23a8732a' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- Note / disclaimer ---------- */
.note {
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 18px 22px;
  font-size: .9rem;
  color: #4a3a20;
  line-height: 1.55;
}
.note strong { color: #3a2c15; }
.note--teal { border-left-color: var(--teal); background: var(--teal-tint); color: var(--ink-soft); }
.note--teal strong { color: var(--ink); }
.note p:last-child { margin-bottom: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.stat { background: var(--paper); padding: 26px; }
.stat-value { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; letter-spacing: -.03em; color: var(--teal-dark); line-height: 1; }
.stat-label { font-size: .84rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.45; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 600; font-size: 1.02rem; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item[open] summary { color: var(--teal-dark); }
.faq-body { padding: 0 56px 22px 24px; font-size: .95rem; color: var(--ink-soft); }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
caption { caption-side: top; text-align: left; font-size: .82rem; color: var(--muted); padding: 12px 16px 10px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--teal-tint); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-dark); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fbfcfb; }
.table-note { font-size: .8rem; color: var(--muted); margin-top: -12px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--teal); color: #d8e7e3;
  border-radius: var(--r-lg); padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center;
}
.cta-band::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.cta-band h2 { color: #fff; margin-bottom: 14px; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
.cta-band p { color: #c2d8d4; margin-bottom: 0; font-size: 1rem; }
.cta-band .btn { justify-self: end; }
@media (max-width: 800px) {
  .cta-band { grid-template-columns: 1fr; gap: 24px; }
  .cta-band .btn { justify-self: start; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.contact-list .ci {
  width: 40px; height: 40px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark);
  display: grid; place-items: center;
}
.contact-list svg { width: 20px; height: 20px; }
.contact-list dt, .contact-list .cl-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.contact-list .cl-value { font-size: 1.02rem; font-weight: 600; }
.contact-list .cl-value a { text-decoration: none; }
.contact-list .cl-value a:hover { text-decoration: underline; }
.contact-list .cl-note { font-size: .82rem; color: var(--muted); font-weight: 400; }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-md); }
.form-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.form-card > p { font-size: .92rem; color: var(--ink-soft); margin-bottom: 22px; }
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
.form-field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; font: inherit; font-size: .97rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fcfdfd; color: var(--ink);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--teal); background: #fff; }
.form-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; color: var(--muted); margin: 4px 0 18px; line-height: 1.45; }
.form-consent input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--teal); }
.form-hint { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row--2 { grid-template-columns: 1fr; }
}

/* ---------- Articles listing ---------- */
.article-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: inherit; transition: border-color .18s, box-shadow .18s; background: #fff; }
.article-card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); color: inherit; }
.article-card img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-sm); }
.article-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.article-card p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
@media (max-width: 760px) {
  .article-card { grid-template-columns: 1fr; gap: 16px; }
  .article-card img { aspect-ratio: 16 / 7; }
}

/* ---------- Article typography (для статей) ---------- */
.article-page { padding: 8px 0 72px; }
.article-hero { padding: 36px 0 8px; }
.article-hero h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
.article-hero .lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 70ch; }
.article-meta-line { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .82rem; color: var(--muted); margin-top: 18px; }
.article-body { max-width: 800px; }
.article-body p, .article-body li { font-size: 1.02rem; }
.article-body .content-section { margin-top: 44px; }
.article-body .content-section:first-of-type { margin-top: 8px; }
.article-body h2 { font-size: clamp(1.36rem, 1.15rem + .75vw, 1.7rem); margin-top: 0; scroll-margin-top: calc(var(--header-h) + 20px); }
.article-body h3 { font-size: 1.14rem; margin-top: 1.7em; }
.article-body .icon { font-style: normal; margin-right: 6px; }
.article-body .lead { font-size: 1.06rem; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body li { margin-bottom: .45em; }
.article-body li::marker { color: var(--teal); }
.article-body sup.ist { font-size: .68em; line-height: 0; }
.article-body sup.ist a { text-decoration: none; color: var(--teal); font-weight: 700; }
.article-body .toc { background: var(--teal-tint); border: 1px solid var(--teal-soft); border-radius: var(--r-md); padding: 24px 26px; margin: 36px 0 44px; }
.article-body .toc-title { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-dark); margin-bottom: 14px; }
.article-body .toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.article-body .toc-item { display: flex; gap: 10px; font-size: .92rem; text-decoration: none; color: var(--ink-soft); align-items: baseline; }
.article-body .toc-item:hover { color: var(--teal-dark); text-decoration: underline; }
.article-body .toc-num { font-size: .74rem; font-weight: 700; color: var(--teal); min-width: 14px; }
@media (max-width: 680px) { .article-body .toc-grid { grid-template-columns: 1fr; } }
.article-body .info-card { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--r-sm); background: var(--teal-tint); padding: 22px 26px; margin: 26px 0; }
.article-body .info-card.warning { border-left-color: var(--gold); background: var(--gold-soft); }
.article-body .info-card-title { font-weight: 700; margin-bottom: 12px; color: var(--teal-dark); }
.article-body .info-card.warning .info-card-title { color: var(--gold-deep); }
.article-body .info-card ul { margin-bottom: 0; padding-left: 1.2em; }
.article-body .info-card li { font-size: .95rem; margin-bottom: .55em; }
.article-body .info-card p:last-child { margin-bottom: 0; }
.article-body .table-wrap table { min-width: 640px; }
.article-body .checklist { list-style: none; padding-left: 0; }
.article-body .checklist li { position: relative; padding-left: 30px; }
.article-body .checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 700; }
.article-body .checklist.crosslist li::before { content: "✕"; color: var(--gold-deep); }
.article-body .related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.article-body .related-card { display: block; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; text-decoration: none; background: #fff; transition: border-color .16s; }
.article-body .related-card:hover { border-color: var(--teal); text-decoration: none; }
.article-body .param-code { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.article-body .param-name { font-size: .9rem; font-weight: 600; margin-top: 4px; }
@media (max-width: 620px) { .article-body .related-grid { grid-template-columns: 1fr 1fr; } }
.article-body .istochniki { font-size: .84rem; color: var(--ink-soft); padding-left: 1.2em; }
.article-body .istochniki li { font-size: .84rem; margin-bottom: .8em; overflow-wrap: anywhere; }
.article-body .table-note { font-size: .8rem; color: var(--muted); }
.article-body .cta-block { display: none; }

/* FAQ внутри статьи: строится из .faq-item / .faq-question / .faq-answer */
.article-body #faq .faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.article-body #faq .faq-item + .faq-item { margin-top: 12px; }
.article-body #faq .faq-question {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 20px 56px 20px 24px; position: relative; font-weight: 600; font-size: 1.02rem; line-height: 1.4;
  background: none; border: 0; color: var(--ink); font-family: inherit;
}
.article-body #faq .faq-question span { position: absolute; right: 22px; top: 50%; font-size: .8rem; color: var(--teal); transform: translateY(-50%); transition: transform .18s; }
.article-body #faq .faq-item[open] .faq-question span { transform: translateY(-50%) rotate(180deg); }
.article-body #faq .faq-item[open] .faq-question { color: var(--teal-dark); }
.article-body #faq .faq-answer { padding: 0 56px 22px 24px; font-size: .95rem; color: var(--ink-soft); }
.article-body #faq .faq-answer p:last-child { margin-bottom: 0; }
.article-body #faq .faq-item:not([open]) .faq-answer { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: #102a2e; color: #a9bfbc; margin-top: 0; padding: 56px 0 32px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; font-weight: 700; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: #7d9b98; }
.footer-about p { margin: 18px 0 0; max-width: 32ch; line-height: 1.6; color: #93aeab; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: #c6d9d6; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-contacts a { color: #fff; font-weight: 600; text-decoration: none; }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-size: .8rem; color: #7d9b98;
}
.footer-disclaimer { margin-top: 18px; font-size: .78rem; color: #6d8a87; line-height: 1.6; max-width: 90ch; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.text-muted { color: var(--muted); }
.small { font-size: .88rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 1080px) { .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1279px) { .header-cta { display: none; } .main-nav .header-cta { display: block; } }
@media (max-width: 900px) {
  .card-grid, .card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .container { padding: 0 20px; }
  .section { padding: 52px 0; }
  .card-grid, .card-grid--2, .card-grid--4 { grid-template-columns: 1fr; }
  .calc { padding: 22px; }
  .calc-fields { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .step { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .step-num { width: 36px; height: 36px; font-size: .95rem; }
  .step:not(:last-child)::after { left: 17px; top: 40px; }
}

/* ---------- Печать ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .cta-band, .calc, .faq-item summary::after { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .section { padding: 12pt 0; }
  .hero::before, .media-frame::after { display: none; }
}

/* ---------- Тёмная тема не поддерживается намеренно: ----------
   медицинский контент читают при ярком свете, поликлинический стиль. */

/* ---------- Дополнения главной ---------- */
.hero-art { position: relative; }
.hero-art img { width: 100%; max-width: 520px; display: block; margin: -10px auto 0; }

.quote-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0 28px;
  max-width: 760px;
}
.quote {
  font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem);
  line-height: 1.4;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 10px;
  text-wrap: balance;
}
.quote::before { content: "«"; color: var(--gold); }
.quote::after { content: "»"; color: var(--gold); }
.quote-src { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0; font-weight: 600; }

.stack { display: grid; gap: 18px; }

.numbers-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 10px 28px;
}
.numbers-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.numbers-row:last-child { border-bottom: 0; }
.numbers-value { font-size: clamp(1.7rem, 1.3rem + 1vw, 2.2rem); font-weight: 700; color: var(--teal-dark); letter-spacing: -.03em; line-height: 1; }
.numbers-row span:last-child { font-size: .92rem; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 520px) {
  .numbers-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
}

.section--teal .steps--light .step h3 { color: #fff; }
.section--teal .steps--light .step p { color: #c2d8d4; }
.section--teal .steps--light .step-num { background: #e8c07d; color: #3a2c15; }
.section--teal .steps--light .step:not(:last-child)::after { background: rgba(255,255,255,.18); }
.section--teal .steps--light .step-meta { color: #e8c07d; }
.section--teal .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #e6f0ee; }
.section--teal .card h3 { color: #fff; }
.section--teal .card p { color: #c2d8d4; }
.section--teal .card-icon { background: rgba(255,255,255,.12); color: #e8c07d; }

/* ---------- Оглавление внутри обычной страницы ---------- */
.toc-article {
  background: var(--teal-tint);
  border: 1px solid var(--teal-soft);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 34px 0 0;
}
.toc-article-title { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-dark); margin: 0 0 12px; }
.toc-article ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.toc-article li { font-size: .93rem; margin-bottom: .4em; break-inside: avoid; }
.toc-article li::marker { color: var(--teal); font-weight: 700; }
.toc-article a { color: var(--ink-soft); text-decoration: none; }
.toc-article a:hover { color: var(--teal-dark); text-decoration: underline; }
@media (max-width: 640px) { .toc-article ol { columns: 1; } }

/* ---------- Сетки и мини-карточки ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 26px 0; }
.mini-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; }
.mini-card h3 { font-size: 1rem; margin-bottom: 12px; }
.mini-card p:last-child, .mini-card ul:last-child { margin-bottom: 0; }
.mini-card .check-list li { font-size: .92rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.num-list { list-style: none; counter-reset: n; margin: 0; padding: 0; display: grid; gap: 14px; }
.num-list li { position: relative; padding-left: 40px; font-size: .98rem; color: var(--ink-soft); counter-increment: n; }
.num-list li::before {
  content: counter(n); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark);
  font-size: .8rem; font-weight: 700; display: grid; place-items: center;
}
.num-list li strong { color: var(--ink); }

.toc-article + .note { margin-top: 18px; }

/* ---------- Якорные ссылки заголовков статей ---------- */
.article-body .anchor-link {
  margin-left: 10px; font-weight: 400; color: var(--muted); text-decoration: none;
  opacity: 0; font-size: .85em; transition: opacity .15s;
}
.article-body h2:hover .anchor-link, .article-body h3:hover .anchor-link,
.article-body .anchor-link:focus { opacity: 1; }
@media (hover: none) { .article-body .anchor-link { opacity: .5; } }

/* CTA в мобильном меню — без прозрачности, золотая кнопка */
.main-nav .header-cta { margin: 16px 14px 4px; }
.main-nav .header-cta .btn { display: flex; width: 100%; }
.main-nav .nav-list > .header-cta > .btn-primary,
.main-nav .nav-list > .header-cta > .btn-primary:visited { color: #fff; }

/* ---------- Страницы-статьи: белое полотно ---------- */
.article-hero { background: var(--paper); }
.article-page { background: var(--paper); padding-bottom: 8px; }

/* Повествовательные секции на внутренних страницах — на белом */
.section--tight { background: var(--paper); }
.section--tight .toc-article { margin-top: 0; }

/* Лента-разделитель перед цветными секциями */
.section--sand { border-top: 1px solid var(--line-soft); }

/* Хлебные крошки выровнены по колонке контента */
.breadcrumbs .narrow { margin: 0 auto; }
