:root {
  --accent: #1f3a5f;            /* переопределяется инлайн-темой сайта */
  --accent-dark: color-mix(in srgb, var(--accent) 78%, #000);
  --ink: #20242b;
  --muted: #6b6f77;
  --bg: #faf8f4;                /* тёплая бумага */
  --bg-alt: #f2efe8;
  --card: #fffdf9;
  --line: #e5dfd2;
  --radius: 8px;
  --max: 820px;
  --font-head: Georgia, "PT Serif", "Times New Roman", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16.5px/1.7 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(27px, 5vw, 40px); line-height: 1.18; margin: 0.3em 0; }
h2 { font-size: clamp(21px, 3.4vw, 28px); line-height: 1.25; margin: 1em 0 0.5em; }
h3 { font-size: 18.5px; margin: 0 0 0.35em; }
p { margin: 0.55em 0; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }
.muted { color: var(--muted); font-size: 14px; }

/* Шапка: тонкая линия бренда сверху */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--accent); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); white-space: nowrap; text-decoration: none; }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .nav { display: none; } }

/* Кнопки: спокойные, почти плоские */
.btn {
  display: inline-block; padding: 11px 24px; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15.5px;
  letter-spacing: 0.02em; border: 0; cursor: pointer; text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-sm { padding: 7px 15px; font-size: 13.5px; }
.btn-lg { padding: 14px 32px; font-size: 16.5px; }

/* Секции с редакторской нумерацией: 01 · 02 · … */
main { counter-reset: sec; }
section.sec { padding: 44px 0 40px; }
section.sec-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.sec h2::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero) " · ";
  color: var(--accent);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: 0.25em;
}

/* Hero: слева, с линейкой-подчёрком */
.hero { padding: 54px 0 46px; }
.hero .wrap { border-left: 3px solid var(--accent); padding-left: 26px; }
.hero h1 { max-width: 21em; }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; margin: 14px 0 22px; }
.hero-note { margin-top: 14px; }

/* Карточки: волосы, а не коробки */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { margin-top: 0; }
.card a { color: var(--ink); text-decoration: none; }
.card a:hover { color: var(--accent); text-decoration: underline; }
.card.quote { border-left: 3px solid var(--accent); }
.card.quote p:first-child { font-size: 15.5px; margin: 0 0 6px; }

/* Списки: тире вместо галочек */
.checks { padding: 0; list-style: none; }
.checks li { padding: 5px 0 5px 26px; position: relative; }
.checks li::before { content: "—"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }

/* Таблица фактов: строки с линейками */
.facts { width: 100%; border-collapse: collapse; margin: 14px 0; }
.facts th, .facts td { text-align: left; padding: 11px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 38%; font-weight: 600; color: var(--muted); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 2px 0; }
details summary { cursor: pointer; font-weight: 600; padding: 13px 30px 13px 0; list-style: none; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 6px; color: var(--accent); font-size: 20px; font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); }

/* Статьи */
.article h1 { margin-top: 8px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 20px 0 6px; }
.crumbs span { color: var(--ink); }
.article table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.article table th, .article table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.article img { max-width: 100%; }
.ctabox { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 24px 26px; margin: 34px 0; }
.ctabox h2 { margin-top: 0; }
.related { padding-left: 20px; }

/* Финальный CTA: тёмный блок цвета чернил */
section.sec-cta { background: var(--ink); color: #f3f1ec; text-align: left; padding: 48px 0; border-top: 3px solid var(--accent); }
section.sec-cta h2 { color: #fff; }
section.sec-cta p { color: #c9cbd1; max-width: 34em; }
section.sec-cta .btn { background: var(--accent); color: #fff; margin-top: 12px; }
section.sec-cta .btn:hover { background: color-mix(in srgb, var(--accent) 90%, #fff); }

/* Футер */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 30px 0; margin-top: 36px; font-size: 14px; color: var(--muted); }
.footer-brand { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.footer .muted { margin-top: 12px; }

/* Cookie-бар */
.cookiebar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 20px; background: var(--ink); color: #f3f1ec; font-size: 14px;
}
.cookiebar[hidden] { display: none; }
