/* Версия 2: глубокий зелёный + слоновая кость + медь. Гротеск Onest, карточки, без анимации. */

:root {
  --green: #12382f;
  --green-2: #1b4a3f;
  --green-soft: #e3ece7;
  --ivory: #f5f2ea;
  --paper: #ffffff;
  --copper: #b8693d;
  --copper-2: #9d5530;
  --ink: #15201c;
  --muted: #5b6862;
  --line: #ddd8cc;
  --r: 20px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 400 18px/1.6 "Onest", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(36px, 5.2vw, 64px); }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: 22px; letter-spacing: -0.01em; }
p { margin: 0; }
section[id] { scroll-margin-top: 90px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- кнопки и «пилюли» */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 17px 30px; border-radius: 999px; font-family: inherit; font-weight: 600; font-size: 17px; line-height: 1;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-accent { background: var(--copper); color: #fff; }
.btn-accent:hover { background: var(--copper-2); }
.btn-ghost { border-color: var(--green); color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-big { font-size: 22px; padding: 20px 34px; white-space: nowrap; }
.pill {
  display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); text-decoration: none; font-weight: 500; font-size: 16px;
  transition: border-color .15s, background-color .15s;
}
.pill:hover { border-color: var(--copper); }
.pill-dark { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; white-space: nowrap; }
.pill-dark:hover { background: var(--green-2); }

/* ---------- шапка */
.header { position: sticky; top: 0; z-index: 20; background: rgba(245, 242, 234, .96); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 36px; min-height: 78px; }
.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--green); }
.logo-name.small { font-size: 22px; color: #fff; }
.logo-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 17px; }
.nav a:hover { color: var(--copper); }

/* ---------- первый экран */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: end; }
.kicker { color: var(--copper); font-weight: 600; font-size: 16px; margin-bottom: 22px; }
.lead { font-size: 21px; color: var(--muted); max-width: 36em; margin-top: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.badges { list-style: none; padding: 0; margin: 34px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.badges li { padding: 8px 16px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 15px; font-weight: 500; }

.portrait { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; background: var(--green); }
.portrait img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; object-position: 60% top; }
.portrait figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 18px;
  background: var(--paper); border-radius: 14px; display: flex; flex-direction: column;
}
.portrait figcaption span { font-size: 14px; color: var(--muted); }

/* ---------- цифры */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.stat { background: var(--paper); border-radius: var(--r); padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font-size: 44px; letter-spacing: -0.03em; color: var(--green); line-height: 1; }
.stat span { color: var(--muted); font-size: 16px; }

/* ---------- экстренно */
.sos {
  margin: 16px 0 0; background: var(--green); color: #e8efe9; border-radius: var(--r);
  padding: 40px 44px; display: flex; align-items: center; gap: 40px;
}
.sos h2 { color: #fff; font-size: clamp(26px, 2.6vw, 34px); margin: 6px 0 10px; }
.sos p { max-width: 44em; }
.sos-label { color: #f0b48f; font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.sos .btn { margin-left: auto; }

/* ---------- секции */
.section { padding: 96px 0; }
.section-soft { background: #ece7db; }
.section-dark { background: var(--green); color: #dfe8e3; }
.section-head { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: baseline; margin-bottom: 40px; }
.section-head .num { font-size: 16px; font-weight: 600; color: var(--copper); }
.section-head p { grid-column: 2; color: var(--muted); margin-top: 12px; }
.section-head.on-dark h2 { color: #fff; }
.section-head.on-dark .num { color: #f0b48f; }

/* ---------- услуги: сетка карточек */
/* Сетка: ряд 1 — главная карточка на всю ширину; ряд 2 — две равные; ряд 3 — две компактные.
   Карточки в ряду одной высоты, пустот нет. */
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--paper); border-radius: var(--r); padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.card-main { grid-column: 1 / -1; padding: 34px 36px; }
.card-soft { background: var(--green-soft); }
.card-head { display: flex; align-items: center; gap: 16px; }
.card-head h3 { margin: 0; }
.card-sub { color: var(--muted); font-size: 16px; margin-top: 2px; }
.ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.card-soft .ico { background: var(--paper); }
.ico svg { width: 26px; height: 26px; }

.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 36px; margin-top: 18px; }
.group h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--copper); }

.list { list-style: none; padding: 0; margin: 10px 0 0; }
.list li { padding: 11px 0 11px 24px; border-top: 1px solid var(--line); position: relative; font-size: 17px; line-height: 1.45; }
.list li::before { content: ""; position: absolute; left: 4px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); }
.group .list { margin-top: 6px; }

.urgent-row { margin-top: 22px; padding: 18px 22px; border-radius: 14px; background: #f7e6db; display: flex; align-items: center; gap: 24px; }
.urgent-row p { color: #5e2e14; }
.urgent-row b { color: #3f1d0b; }
.urgent-row .btn { margin-left: auto; padding: 14px 22px; white-space: nowrap; }

.card-compact { gap: 16px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--paper); border-radius: 999px; padding: 8px 14px; font-size: 16px; line-height: 1.3; }

/* ---------- о нас */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.about .section-head { grid-column: 1 / -1; }
.about-lead { font-size: 24px; line-height: 1.45; color: #fff; margin-bottom: 18px; }
.creds { list-style: none; margin: 0; padding: 0; }
.creds li { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; gap: 3px; }
.creds li:first-child { border-top: 0; padding-top: 0; }
.creds b { color: #fff; font-size: 19px; }
.creds span { font-size: 16px; color: #b9cac1; }
.values { grid-column: 1 / -1; margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.values div { background: var(--green-2); border-radius: var(--r); padding: 24px 26px; display: flex; flex-direction: column; gap: 4px; }
.values b { color: #fff; font-size: 20px; }
.values span { color: #b9cac1; font-size: 16px; }

/* ---------- процесс */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process li { background: var(--paper); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.step { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.process b { font-size: 20px; }
.process p { color: var(--muted); font-size: 16px; }

/* ---------- новости */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news time { color: var(--copper); font-weight: 600; font-size: 15px; }
.news h3 { font-size: 20px; line-height: 1.35; font-weight: 600; }
.card-channels { background: var(--green); color: #fff; }
.channels { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }
.channels .pill { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.channels .pill:hover { border-color: #f0b48f; }

/* ---------- контакты */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-card { background: var(--green); color: #dfe8e3; border-radius: var(--r); padding: 44px; }
.contact-card .section-head { margin-bottom: 28px; }
.phone-big { display: inline-block; font-size: clamp(32px, 3.4vw, 44px); font-weight: 700; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.phone-big:hover { color: #f0b48f; }
.muted-light { color: #b9cac1; margin-top: 4px; }
.contact-rows { margin-top: 32px; display: flex; flex-direction: column; }
.contact-rows div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.18); }
.contact-rows span { color: #b9cac1; font-size: 16px; }
.contact-rows a { color: #fff; font-weight: 500; }
.contact-rows a:hover { color: #f0b48f; }

.form { background: var(--paper); border-radius: var(--r); padding: 44px; display: flex; flex-direction: column; gap: 16px; }
.form h3 { font-size: 28px; }
.form-note { color: var(--muted); }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 16px; }
.form input:not([type=checkbox]), .form textarea {
  font: inherit; font-size: 18px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--ivory); color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 3px solid #ecd2c2; border-color: var(--copper); background: #fff; }
.form .consent { flex-direction: row; gap: 10px; font-weight: 400; font-size: 15px; color: var(--muted); }
.form .consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--green); }
.form .btn { align-self: flex-start; }
.form-status { font-size: 16px; min-height: 1.4em; }
.form-status.error { color: #a23b1c; }
.form-status.ok { color: var(--green); }
.field-error { border-color: #a23b1c !important; }

/* ---------- подвал */
.footer { background: #0c2620; color: #9fb3a9; font-size: 15px; padding: 40px 0; }
.footer-in { display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.footer-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: #fff; }
.footer-note { font-size: 14px; color: #9fb3a9; margin-top: 6px; }
.footer p { margin-top: 8px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { color: #dfe8e3; }

.callbar { display: none; }

/* ---------- планшет */
@media (max-width: 1040px) {
  .nav { display: none; }
  .header .pill-dark { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 440px; }
  .stats { grid-template-columns: 1fr 1fr; }
  /* планшет: группы друг под другом, пункты внутри — сеткой 2×2, без «дыр» */
  .groups { grid-template-columns: 1fr; gap: 22px; }
  .group .list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .about, .contact-grid { grid-template-columns: 1fr; }
  .about-text { margin-bottom: 32px; }
  .values, .news { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .sos { flex-direction: column; align-items: flex-start; gap: 24px; }
  .sos .btn { margin-left: 0; }
}

/* ---------- телефон */
@media (max-width: 640px) {
  body { font-size: 17px; padding-bottom: 64px; }
  .wrap { padding: 0 16px; }
  .header-in { min-height: 64px; gap: 12px; }
  .logo-name { font-size: 22px; }
  .logo-sub { display: none; }
  .header .pill-dark { padding: 9px 14px; font-size: 15px; }
  .hero { padding: 32px 0 24px; }
  h1 { font-size: 30px; }
  h2 { font-size: 28px; }
  .lead { font-size: 19px; }
  .hero-actions .btn { width: 100%; }
  .stat { padding: 20px; }
  .stat b { font-size: 34px; }
  .sos { padding: 28px 22px; }
  .sos .btn { width: 100%; font-size: 20px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 28px; }
  .svc, .process, .groups, .group .list { grid-template-columns: 1fr; }
  .card, .card-main { padding: 24px 20px; }
  .groups { gap: 18px; }
  .urgent-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .urgent-row .btn { margin-left: 0; }
  .about-lead { font-size: 20px; }
  .contact-card, .form { padding: 28px 20px; }
  .contact-rows div { grid-template-columns: 1fr; gap: 2px; }
  .form .btn { align-self: stretch; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  }
  .callbar a { padding: 17px; text-align: center; font-weight: 700; text-decoration: none; color: #fff; background: var(--green); }
  .callbar a + a { background: var(--copper); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ================================================================ Статьи (генерируются build.py) */
.more-link { color: var(--copper); font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.inner main { padding-top: 36px; padding-bottom: 88px; }
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); }

/* карточка статьи */
.acard { padding: 0; overflow: hidden; }
.acard[hidden] { display: none; }
.acard a { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.acard a:hover h3 { color: var(--copper); }
.acard-img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--green-soft); }
.acard-body { display: flex; flex-direction: column; gap: 10px; padding: 26px 28px; flex: 1; }
.acard h3 { font-size: 20px; line-height: 1.32; font-weight: 600; }
.acard-cat { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--copper); }
.acard-meta { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.xpost { font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--ink); }
.agrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.empty { color: var(--muted); padding: 24px 0; }

/* список статей: фильтры и поиск */
.stati-tools { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1; padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: background-color .15s, border-color .15s; }
.chip:hover { border-color: var(--copper); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.search { font: inherit; font-size: 17px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); min-width: 280px; }
.search:focus { outline: 3px solid #ecd2c2; border-color: var(--copper); }

/* страница статьи */
.article-wrap { max-width: 820px; }
.article-head h1 { font-size: clamp(32px, 4.2vw, 48px); margin: 12px 0 18px; }
.article-lead { font-size: 21px; color: var(--muted); line-height: 1.55; }
.byline { display: flex; gap: 14px; align-items: center; margin-top: 26px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline img, .author img { border-radius: 50%; object-fit: cover; object-position: 60% 15%; flex: none; }
.byline img { width: 48px; height: 48px; }
.byline div { display: flex; flex-direction: column; font-size: 15px; }
.byline span { color: var(--muted); }
.article-cover { margin: 28px 0 0; }
.article-cover img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--r); }
.demo-note { margin-top: 22px; padding: 12px 16px; border-radius: 12px; background: #f7e6db; font-size: 15px; }
.toc { margin-top: 28px; padding: 22px 26px; background: var(--paper); border-radius: var(--r); }
.toc b { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ol { margin: 10px 0 0; padding-left: 22px; }
.toc li { padding: 3px 0; }
.toc a { color: var(--ink); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--copper); }
.prose { margin-top: 30px; font-size: 19px; line-height: 1.75; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1em; }
.prose h2 { font-size: 30px; margin: 1.6em 0 .6em; scroll-margin-top: 96px; }
.prose h3 { font-size: 22px; margin: 1.3em 0 .5em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--copper); }
.prose a { color: var(--green); font-weight: 500; text-decoration-color: var(--copper); }
.prose blockquote { border-left: 4px solid var(--copper); background: var(--paper); padding: 16px 22px; border-radius: 0 12px 12px 0; }
.prose blockquote p { margin: 0; }
.prose-img { margin: 1.4em 0; }
.prose-img img { width: 100%; border-radius: var(--r); }
.disclaimer { margin-top: 26px; font-size: 15px; color: var(--muted); }
.also { margin-top: 8px; font-size: 16px; color: var(--muted); }
.also a { color: var(--green); }
.cta-box { margin-top: 36px; padding: 28px 30px; background: var(--green); color: #dfe8e3; border-radius: var(--r);
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-box b { color: #fff; font-size: 22px; }
.cta-box p { margin-top: 4px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost-light:hover { background: var(--green-2); color: #fff; }
.author { display: flex; gap: 20px; align-items: center; margin-top: 24px; padding: 24px; background: var(--paper); border-radius: var(--r); }
.author img { width: 88px; height: 88px; }
.author p { color: var(--muted); font-size: 16px; margin-top: 4px; }
.related { margin-top: 64px; }
.related h2 { font-size: 28px; margin-bottom: 20px; }
@media (min-width: 900px) {
  .article-wrap .related { width: min(1144px, calc(100vw - 56px)); margin-left: 50%; translate: -50% 0; }
}
@media (max-width: 1040px) { .agrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .agrid { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  .prose { font-size: 18px; }
  .prose h2 { font-size: 25px; }
  .cta-actions .btn { flex: 1; }
  .author { flex-direction: column; align-items: flex-start; }
}

/* ================================================================ Мобильная версия (v4) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
.menu-btn { display: none; }

@media (max-width: 1040px) {
  .header-in { gap: 12px; }
  .header .pill-dark { margin-left: auto; }

  /* кнопка меню */
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--paper); cursor: pointer; padding: 0;
  }
  .menu-btn:hover { border-color: var(--copper); }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--green); content: "";
  }
  .menu-bars { position: relative; }
  .menu-bars::before { position: absolute; top: -6px; left: 0; }
  .menu-bars::after { position: absolute; top: 6px; left: 0; }
  .menu-btn[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-bars::after { top: 0; transform: rotate(-45deg); }

  /* выпадающий список разделов */
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0;
    flex-direction: column; gap: 0; background: var(--ivory);
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(18, 56, 47, .12);
    padding: 6px 16px 14px; max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav.nav-open { display: flex; }
  .nav a { display: flex; align-items: center; min-height: 54px; font-size: 19px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
}

@media (max-width: 640px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .header-in { min-height: 62px; gap: 10px; }
  .logo-name { font-size: 21px; }
  .header .pill-dark { padding: 11px 14px; font-size: 15px; }

  /* первый экран: портрет компактнее, чтобы кнопки и контент были ближе */
  .hero { padding: 26px 0 20px; }
  .kicker { margin-bottom: 14px; font-size: 15px; }
  .lead { margin-top: 18px; font-size: 18px; }
  .hero-actions { margin-top: 24px; gap: 10px; }
  .btn { padding: 16px 22px; }
  .badges { margin-top: 22px; gap: 8px; }
  .portrait img { aspect-ratio: 4 / 3; object-position: 58% 18%; }
  .portrait figcaption { left: 10px; right: 10px; bottom: 10px; padding: 11px 14px; }

  /* цифры */
  .stats { gap: 10px; padding-top: 18px; padding-bottom: 18px; }
  .stat { padding: 16px 14px; border-radius: 16px; }
  .stat b { font-size: 30px; }
  .stat span { font-size: 15px; line-height: 1.35; }

  /* блоки и отступы */
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 22px; column-gap: 12px; }
  .sos { padding: 24px 18px; border-radius: 16px; }
  .sos h2 { font-size: 24px; }
  .card, .card-main { padding: 20px 16px; border-radius: 16px; }
  .list li { padding: 10px 0 10px 22px; font-size: 16.5px; }
  .group h4 { margin-top: 6px; }
  .tags li { padding: 8px 12px; font-size: 15px; }
  .process li { padding: 20px 18px; }
  .values div { padding: 18px; }
  .creds li { padding: 14px 0; }

  /* контакты и форма: крупные зоны нажатия */
  .contact-card, .form { padding: 24px 16px; border-radius: 16px; }
  .phone-big { font-size: 30px; padding: 6px 0; }
  .contact-rows a { display: inline-block; padding: 6px 0; }
  .contact-rows div { padding: 10px 0; }
  .form input:not([type=checkbox]), .form textarea { padding: 14px; font-size: 18px; }
  .form .consent input { width: 24px; height: 24px; }
  .form .btn { padding: 17px; }

  /* подвал */
  .footer { padding: 32px 0 28px; }
  .footer-in { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer-name { font-size: 21px; }
  .footer-links { flex-direction: column; gap: 0; width: 100%; }
  .footer-links a { display: block; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
  .footer-links span { padding-top: 12px; }

  /* нижняя панель «Позвонить / WhatsApp»: с учётом «подбородка» iPhone */
  .callbar a { padding: 17px 12px calc(17px + env(safe-area-inset-bottom)); font-size: 17px; }

  /* страницы статей */
  .inner main { padding-top: 24px; padding-bottom: 56px; }
  .article-head h1 { font-size: 29px; }
  .article-lead { font-size: 18px; }
  .toc { padding: 18px 16px; }
  .cta-box { padding: 22px 18px; }
  .chip { padding: 12px 16px; }
}

/* очень узкие экраны: вместо номера в шапке — значок трубки (номер есть в нижней панели и в контактах) */
@media (max-width: 350px) {
  .header .pill-dark {
    font-size: 0; width: 46px; height: 46px; padding: 0; border-radius: 12px; flex: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/></svg>");
    background-repeat: no-repeat; background-position: center; background-size: 22px;
  }
  .logo-name { font-size: 20px; }
  h1 { font-size: 27px; }
  h2 { font-size: 25px; }
}

/* атрибут height у <img> не должен задавать высоту — только пропорции */
.portrait img { height: auto; }
