/*
 * Kridity — дизайн-система.
 * Идея: «справочник, которому можно верить». Спокойный чернильный синий, зелёная «печать проверки»,
 * заголовки PT Serif (знакомая по документам кириллица), текст Golos Text (шрифт госсервисов).
 * Карточки не одинаковые: у каждого уровня свой вес (рамка, фон, линия), без теней-подушек.
 */
:root {
  --ink: #15283c;        /* текст и заголовки */
  --ink-soft: #4a5a6b;   /* второстепенный текст */
  --paper: #ffffff;
  --mist: #eef2f1;       /* фон панелей */
  --rule: #d5dcdf;       /* линии */
  --link: #1c5d99;
  --seal: #1f6f54;       /* проверено, безопасно */
  --seal-tint: #e3f0ea;
  --amber: #8f5a0c;      /* предупреждения */
  --amber-tint: #fbf1de;
  --focus: #f2b632;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 68ch;
  --r-sm: 4px;
  --r-md: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- типографика ---------- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.18; margin: 8px 0 16px; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 2.8vw, 27px); line-height: 1.3; margin: 40px 0 12px; }
h3 { font-size: 19px; line-height: 1.4; margin: 28px 0 8px; }
p, li { max-width: var(--measure); }
strong { font-weight: 600; }
.num, .calc-result strong, .offer-terms dd { font-variant-numeric: tabular-nums; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.logo { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.logo b { font: 700 22px/1 var(--serif); }
.logo small { font-size: 12px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 10px; white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 15px; border-radius: var(--r-sm); }
.nav a:hover, .nav a[aria-current] { background: var(--mist); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--seal); }

/* ---------- хлебные крошки ---------- */
.crumbs { font-size: 14px; color: var(--ink-soft); margin: 18px 0 4px; }
.crumbs a { color: var(--ink-soft); }
.crumbs .sep { margin: 0 6px; }

/* ---------- статья: колонка + боковая панель ---------- */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1000px) { .page { grid-template-columns: minmax(0, 720px) 280px; justify-content: space-between; } }
.aside { display: none; }
@media (min-width: 1000px) {
  .aside { display: block; }
  .aside-in { position: sticky; top: 84px; }
  .content .toc { display: none; }
}

.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.byline img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.byline .who { display: flex; align-items: center; gap: 10px; }
.byline .who a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* «Справка» — главный элемент доверия: короткий ответ и печать проверки */
.brief { display: grid; grid-template-columns: 1fr; border: 1.5px solid var(--ink); border-radius: var(--r-md); margin: 8px 0 28px; overflow: hidden; }
@media (min-width: 640px) { .brief { grid-template-columns: 1fr 150px; } .brief.no-seal { grid-template-columns: 1fr; } }
.brief-body { padding: 18px 20px; }
.brief-body h2 { font-size: 18px; margin: 0 0 8px; }
.brief-body ul { margin: 0; padding-left: 20px; }
.brief-body li { margin: 4px 0; }
.seal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; background: var(--seal-tint); color: var(--seal); text-align: center; font-size: 13px; line-height: 1.35; border-top: 1px solid var(--rule); }
@media (min-width: 640px) { .seal { border-top: 0; border-left: 1px solid var(--rule); } }
.seal svg { width: 44px; height: 44px; }
.seal b { font-weight: 600; }

/* оглавление */
.toc { font-size: 15px; }
.toc strong { display: block; font-family: var(--serif); font-size: 17px; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--seal); font-weight: 600; }
.content .toc { background: var(--mist); border-radius: var(--r-md); padding: 14px 16px; margin: 20px 0; }
.aside-tools { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15px; }
.aside-tools strong { font-family: var(--serif); font-size: 17px; display: block; margin-bottom: 6px; }
.aside-tools a { display: block; padding: 4px 0; }

/* текстовые элементы */
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 6px 0; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--rule); border-radius: var(--r-md); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
th { background: var(--mist); font-weight: 600; }
blockquote { margin: 20px 0; padding: 14px 18px; background: var(--mist); border-left: 3px solid var(--ink); border-radius: 0 var(--r-md) var(--r-md) 0; }
code { background: var(--mist); padding: 1px 5px; border-radius: 3px; font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* FAQ — раскрывающиеся ответы, текст всё равно в HTML */
.faq { border-top: 1px solid var(--rule); }
.faq:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 18px; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--sans); color: var(--ink-soft); }
.faq[open] summary::after { content: "−"; }
.faq > :not(summary) { margin-top: 0; }
.faq > :last-child { margin-bottom: 16px; }

/* источники */
.sources { margin: 36px 0 0; font-size: 15px; }
.sources h2 { font-size: 20px; margin-bottom: 8px; }
.sources ol { padding-left: 22px; color: var(--ink-soft); }
.sources a { word-break: break-word; }

/* автор */
.author-box { display: grid; grid-template-columns: 56px 1fr; gap: 14px; margin: 36px 0; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 15px; }
.author-box .ph { width: 56px; height: 56px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; font: 700 22px var(--serif); color: var(--ink-soft); overflow: hidden; }
.author-box .ph img { width: 100%; height: 100%; object-fit: cover; }
.author-box p { margin: 4px 0 0; color: var(--ink-soft); }

/* ---------- предупреждение и следующий шаг ---------- */
.note { background: var(--amber-tint); border-left: 3px solid var(--amber); padding: 12px 16px; border-radius: 0 var(--r-md) var(--r-md) 0; margin: 20px 0; font-size: 15px; }
.next { margin: 32px 0; padding: 18px 20px; background: var(--mist); border-radius: var(--r-md); }
.next h2 { margin: 0 0 8px; font-size: 20px; }
.next ul { margin: 0; padding-left: 20px; }

/* ---------- офферы ---------- */
.offers { display: grid; gap: 12px; margin: 24px 0; }
.offers-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.offer { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px; display: grid; gap: 12px; }
@media (min-width: 720px) { .offer { grid-template-columns: 1fr auto; align-items: center; } }
.offer-main { display: grid; gap: 10px; }
.offer-check { margin: 0; }
.offer-head { display: flex; align-items: center; gap: 10px; }
.offer-head img { border-radius: var(--r-sm); }
.offer-name { font-weight: 600; font-size: 17px; }
.ad-label { font-size: 12px; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 3px; padding: 0 5px; }
.offer-terms { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.offer-terms dt { font-size: 12px; color: var(--ink-soft); }
.offer-terms dd { margin: 0; font-weight: 600; }
.offer-check { font-size: 13px; color: var(--seal); display: flex; align-items: center; gap: 6px; }
.offer-legal { grid-column: 1 / -1; font-size: 12px; color: var(--ink-soft); margin: 0; }

.btn { display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: var(--r-md); padding: 11px 20px; font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: #0d1b2a; color: #fff; }
.btn-seal { background: var(--seal); }
.btn-seal:hover { background: #175640; }

/* ---------- калькулятор ---------- */
.calc { border: 1.5px solid var(--ink); border-radius: var(--r-md); padding: 20px; margin: 20px 0 28px; background: var(--paper); }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: end; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.calc input { font: 500 18px/1.2 var(--sans); padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); width: 100%; color: var(--ink); background: #fff; }
.calc input:focus { border-color: var(--ink); }
.calc-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 20px 0 8px; border-top: 1px solid var(--rule); }
.calc-result div { padding: 14px 0 4px; }
.calc-result span { display: block; font-size: 13px; color: var(--ink-soft); }
.calc-result strong { font: 700 28px/1.2 var(--serif); }
.calc-note { font-size: 13px; color: var(--ink-soft); max-width: none; }
.schedule summary { cursor: pointer; color: var(--link); padding: 8px 0; }
.calc .btn { width: 100%; }
.calc.js-live .btn { display: none; }

/* ---------- главная ---------- */
.hero { display: grid; gap: 32px; padding: 32px 0 16px; }
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 460px; align-items: start; padding-top: 48px; } }
.hero h1 { font-size: clamp(32px, 5vw, 50px); margin-top: 0; }
.hero-lead { font-size: 19px; color: var(--ink-soft); max-width: 52ch; }
.promises { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.promises li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 16px; }
.promises svg { width: 20px; height: 20px; color: var(--seal); margin-top: 3px; }
.hero .calc { margin: 0; }
.hero .calc h2 { margin: 0 0 14px; font-size: 20px; }
.calc-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.calc-tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-size: 14px; }
.calc-tabs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

.topics { display: grid; gap: 0; margin: 40px 0; border-top: 1.5px solid var(--ink); }
@media (min-width: 720px) { .topics { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.topic { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.topic b { font: 700 19px/1.3 var(--serif); }
.topic span { display: block; color: var(--ink-soft); font-size: 15px; margin-top: 4px; }
.topic:hover b { text-decoration: underline; text-decoration-thickness: 1px; }

.list h2 { margin-top: 48px; }
.cards { list-style: none; padding: 0; margin: 0; }
.cards li { padding: 14px 0; border-bottom: 1px solid var(--rule); max-width: none; }
.cards a { font-weight: 600; font-size: 17px; text-decoration: none; color: var(--ink); }
.cards a:hover { text-decoration: underline; }
.cards p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.cards time { font-size: 13px; color: var(--ink-soft); }

.how { margin: 48px 0; padding: 24px; background: var(--mist); border-radius: var(--r-md); display: grid; gap: 20px; }
@media (min-width: 820px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how h3 { margin: 0 0 6px; font-size: 18px; }
.how p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* ---------- подвал ---------- */
.site-footer { margin-top: 64px; background: var(--ink); color: #c9d3dc; padding: 36px 0; font-size: 14px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid b { display: block; color: #fff; font: 700 17px var(--serif); margin-bottom: 8px; }
.footer-grid nav a { display: block; padding: 3px 0; text-decoration: none; }
.footer-grid nav a:hover { text-decoration: underline; }
.disclaimer { margin-top: 28px; padding-top: 18px; border-top: 1px solid #2c4258; font-size: 13px; max-width: none; }

@media (max-width: 760px) {
  .header-in { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .nav { margin: 4px -16px 0; padding: 0 12px 6px; width: calc(100% + 32px); }
  .nav a { font-size: 14px; padding: 6px 10px; }
}
@media (max-width: 639px) {
  .seal { flex-direction: row; justify-content: flex-start; text-align: left; padding: 10px 20px; gap: 12px; }
  .seal svg { width: 32px; height: 32px; flex: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .logo small { display: none; }
  .calc { padding: 16px; }
  .calc-result strong { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
