:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #667085;
  --line: #e2e5ea;
  --accent: #2f6f6a;
  --accent-text: #ffffff;
  --accent-soft: #e3f0ee;
  --answer: #eef6f4;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c; --surface: #1a2029; --text: #e6e9ee; --muted: #98a2b3; --line: #2c3542;
    --accent: #6fbfb7; --accent-text: #0e1a19; --accent-soft: #1d3432; --answer: #172b29;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 21px; line-height: 1.3; margin: 28px 0 10px; }
h3 { font-size: 18px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { font-weight: 750; color: var(--text); text-decoration: none; font-size: 17px; }
.top-nav { display: flex; align-items: center; gap: 14px; }
.top-nav > a:not(.btn) { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: 12px 22px; border-radius: 12px; background: var(--accent); color: var(--accent-text);
  font-weight: 700; font-size: 17px; text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-small { min-height: 38px; padding: 7px 14px; font-size: 15px; border-radius: 10px; }
.cta { margin: 16px 0 24px; }
.cta-sub { color: var(--muted); font-size: 15px; margin: 8px 0 0; }

.hero { padding: 32px 0 8px; }
.hero h1 { font-size: 34px; }
.lead { font-size: 19px; color: var(--muted); }
.block { margin: 28px 0; }
.features, .steps { padding-left: 1.2em; margin: 0; }
.features li, .steps li { margin: 0 0 10px; }
.step-title { display: block; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.cards { display: grid; gap: 12px; margin: 12px 0; }
.card { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--accent); }
.card-title { display: block; font-weight: 700; }
.card-meta { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.card-text { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { margin: 10px 0 0; }
.final-cta { text-align: left; }

.crumbs { font-size: 14px; color: var(--muted); margin: 16px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.article .meta { color: var(--muted); margin-bottom: 4px; }
.condition, .article section > p, .article li { max-width: 68ch; }
.solution, .options { padding-left: 1.4em; }
.solution li, .options li { margin: 0 0 10px; }
.answer { display: block; margin: 24px 0; padding: 16px 18px; background: var(--answer); border-left: 4px solid var(--accent); border-radius: 12px; }
.answer-label { display: block; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.answer-value { display: block; font-size: 20px; font-weight: 700; }
.math-block { display: block; overflow-x: auto; padding: 4px 0; }
math { font-size: 1.1em; math-style: normal; }
math mfrac { padding: 0 1px; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 20px 0; }
.preview-banner { background: #fdf2d9; color: #8a5a00; padding: 10px 14px; border-radius: 10px; margin: 16px 0 0; }
.doc p { white-space: pre-line; }

.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 32px; background: var(--surface); font-size: 15px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.foot-subjects a { color: var(--text); }

.sticky-cta { display: none; }
@media (max-width: 720px) {
  h1, .hero h1 { font-size: 26px; }
  .top-nav .btn-small { display: none; }
  .btn { width: 100%; }
  /* Компактная закреплённая кнопка; отступ снизу не даёт ей закрыть текст. */
  .with-sticky { padding-bottom: 76px; }
  .with-sticky .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .sticky-cta .btn { min-height: 46px; }
}
@media (min-width: 721px) { .cards { grid-template-columns: 1fr 1fr; } }
