/* ─────────────────────────────────────────────────────────────
   Раздел «Знания»: список, страница категории, страница статьи.
   @version 3
   Дополняет site.css и берёт из него всю палитру и шрифты —
   отдельной темы у раздела нет, это тот же сайт.
   Обложка — единственное тёмное пятно на светлой странице:
   она собрана по утверждённому шаблону в палитре Aurora.
   ───────────────────────────────────────────────────────────── */
:root { --void: #0A0816; }

/* ── Обложка ────────────────────────────────────────────────── */
.cover {
  position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden;
  background: var(--void); container-type: inline-size; display: grid; place-items: center;
}
.cover .bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cover .veil {
  position: absolute; inset: 0;
  background: radial-gradient(58% 66% at 50% 50%, rgba(10,8,22,.9) 0%, rgba(10,8,22,.55) 55%, rgba(10,8,22,.15) 100%);
}
.cover .t { position: relative; text-align: center; max-width: 84%; padding: 0 2cqi; }
.cover .cat {
  font-size: 2.4cqi; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 600; color: #8F86BE; margin: 0 0 3.2cqi;
}
.cover .title {
  font-size: 6.6cqi; line-height: 1.14; font-weight: 700; letter-spacing: -.022em;
  margin: 0; text-wrap: balance; color: #F5F2FF;
}
.cover .rule {
  width: 9cqi; height: 1cqi; border-radius: 1cqi; margin: 4cqi auto 0;
  background: linear-gradient(135deg, #7C6CF0, #B084FF);
}
.cover.g .rule { background: #55efc4; }
.cover.r .rule { background: #ff7675; }
.cover .accentword {
  background: linear-gradient(135deg, #9A87FF, #C9A6FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Страница статьи ────────────────────────────────────────── */
.page { padding: 28px clamp(18px, 4vw, 56px) 44px; }
/* Одна колонка по центру: боковая колонка на широком экране держала
   оглавление и пустоту под ним, всё её содержимое работает внутри текста. */
.col { max-width: 800px; margin: 0 auto; }


.zart { display: flex; flex-direction: column; gap: 26px; padding-top: 26px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-3); }
.meta .zchip { background: var(--tint); color: var(--accent); border-radius: 999px; padding: 3px 11px; font-weight: 600; font-size: 12.5px; }
.fresh { background: var(--mint-tint); color: var(--mint); border-radius: 999px; padding: 3px 11px; font-weight: 600; font-size: 12.5px; }

.tldr { background: var(--tint); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tldr b { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.tldr p { font-size: 16px; color: var(--ink-2); line-height: 1.6; margin: 0; }

/* Оглавление стоит в начале: человек с поиска сразу видит, отвечает ли
   страница на его вопрос, и прыгает в нужный раздел. */
.toc { background: #FAF8FF; border-radius: var(--r-md); padding: 16px 20px; display: flex; flex-direction: column; gap: 11px; }
.toc > b { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.toc a { font-size: 15.5px; color: var(--ink-2); text-decoration: none; line-height: 1.4; display: flex; gap: 9px; }
.toc a i { color: var(--ink-3); font-style: normal; font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--accent); }

.body { display: flex; flex-direction: column; gap: 16px; }
.body h2 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 14px 0 0; text-wrap: balance; scroll-margin-top: 18px; }
.body p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0; }
.body p b, .body li b { color: var(--ink); font-weight: 600; }
.body > ul { display: flex; flex-direction: column; gap: 8px; }
.body > ul li { font-size: 17px; line-height: 1.6; color: var(--ink-2); padding-left: 22px; position: relative; }
.body > ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--tint-2); }

/* Плашки «Задание» / «Чек-лист» / «Важно» — в css/blocks.css */

.tbl { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tbl th { background: #FAF8FF; font-weight: 600; font-size: 13px; letter-spacing: .03em; color: var(--ink-3); text-transform: uppercase; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
/* Колонки с числами — вправо, как в калькуляторах: разряды встают друг под другом */
.tbl td.num, .tbl th.num { text-align: right; }
.tbl td.num { white-space: nowrap; }
/* Телефон: таблица должна влезть в 320 px без прокрутки — мельче шрифт, уже поля, переносы по слогам */
@media (max-width: 640px) {
  .tbl table { font-size: 13.5px; line-height: 1.4; hyphens: auto; -webkit-hyphens: auto; }
  .tbl th, .tbl td { padding: 8px 8px; }
  .tbl th { font-size: 11px; letter-spacing: .02em; }
}

.zfaq { display: flex; flex-direction: column; gap: 10px; }
.zfaq h2 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 4px; }
.zqa { border-bottom: 1px solid var(--line); padding-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.zqa b { font-size: 16.5px; font-weight: 600; }
.zqa p { font-size: 16px; color: var(--ink-2); line-height: 1.65; margin: 0; }

/* Приложение — баннером внутри текста, тесты живут только в приложении */
.appbar, .quiz {
  border-radius: var(--r-lg); padding: 22px 26px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 18px; justify-content: space-between; color: #EFECFF;
}
.appbar { background: var(--void); }
.quiz { background: var(--night); }
.appbar__txt, .quiz__txt { display: flex; flex-direction: column; gap: 6px; min-width: 240px; flex: 1; }
.appbar__txt b, .quiz__txt b { font-size: 17.5px; font-weight: 700; line-height: 1.3; }
.appbar__txt span, .quiz__txt span { font-size: 15px; color: #B3ABD8; line-height: 1.55; }

.next { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.next a {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 15px 17px; display: flex; flex-direction: column; gap: 6px; text-decoration: none;
}
.next a span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.next a b { font-size: 16px; font-weight: 600; line-height: 1.35; }
@media (max-width: 720px) { .next { grid-template-columns: minmax(0, 1fr); } }

/* ── Список раздела и страница категории ────────────────────── */
.hub {
  max-width: 1100px; margin: 0 auto; padding: 36px clamp(18px, 4vw, 40px) 40px;
  display: flex; flex-direction: column; gap: 30px;
}

.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats a {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; font-size: 14.5px; color: var(--ink-2); text-decoration: none;
}
.cats a:hover { border-color: var(--tint-2); color: var(--accent); }


/* Карта раздела: секция на категорию, внутри — карточки статей.
   Сами карточки (.arts / .art / .art__*) живут в site.css: в списках
   раздела стоит ровно та же карточка, что на главной, а не её копия. */
.catsecs { display: flex; flex-direction: column; gap: 42px; }
.catsec { display: flex; flex-direction: column; gap: 16px; }

:where(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Калькулятор в статье: таблица ставок семейной ипотеки с платежом (js/semeynaya.js).
   Префикс sk-: страница статьи не грузит portal.css, поля и переключатель — свои копии. */
.sk { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sk__top { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.sk__f { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 150px; }
.sk__f--wide { flex-basis: 100%; }
.sk__f--term { flex: 0 1 110px; }
.sk__f > span:first-child { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sk-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--ground); padding: 4px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); align-self: flex-start; }
.sk-seg button { font: inherit; font-size: 14px; font-weight: 500; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.sk-seg button:hover { color: var(--accent); }
.sk-seg button[aria-pressed="true"] { background: var(--card); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }
.sk-inp { display: flex; align-items: center; background: var(--ground); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 0 14px; }
.sk-inp:focus-within { box-shadow: inset 0 0 0 2px var(--accent); background: var(--card); }
.sk-inp input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 600; padding: 10px 0; color: var(--ink); font-variant-numeric: tabular-nums; outline: 0; }
.sk-inp i { font-style: normal; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.sk-scroll { overflow-x: auto; }
.sk-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.sk-tbl th, .sk-tbl td { padding: 10px 8px; text-align: right; white-space: nowrap; }
.sk-tbl th:first-child, .sk-tbl td:first-child { text-align: left; }
.sk-tbl thead th { font-size: 12.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.sk-tbl tbody tr + tr td { border-top: 1px solid var(--line); }
.sk-tbl tbody tr { cursor: pointer; }
.sk-tbl tbody tr:hover td { background: var(--ground); }
.sk-tbl tr.is-on td { background: var(--tint); }
.sk-tbl tr.is-on td:first-child { font-weight: 700; color: var(--accent); }
.sk-tbl td.sk-pay { font-weight: 700; color: var(--ink); }
.sk-over { display: block; font-size: 12px; font-weight: 500; color: var(--amber); white-space: normal; }
.body .sk p { font-size: 14px; line-height: 1.55; }
.body .sk .sk__note { color: var(--ink-3); }
.body .sk .sk__disc { color: var(--ink-3); font-size: 13px; }
.sk__warn { color: var(--amber) !important; background: var(--amber-tint); border-radius: var(--r-sm); padding: 8px 12px; }
.sk__warn[hidden] { display: none; }
.sk__checked { align-self: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--mint-tint); padding: 5px 12px; border-radius: 99px; }
.sk__checked a { color: var(--mint); font-weight: 600; }
@media (max-width: 640px) {
  .sk { padding: 14px; }
  .sk-tbl th, .sk-tbl td { padding: 9px 5px; font-size: 14px; }
  .sk-tbl .sk-hide { display: none; }
}
