/* сайт: макет lenta, палитра more, пара 6 — собрано build.py из макетов Дизайна */
/* Пара 6 «Графа»: заголовки — Unbounded (широкий гротеск), текст и служебные — Onest. Обе — OFL.
   У Onest нет курсива — выделение в тексте полужирным, а не курсивом. */
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded/unbounded-normal.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/onest/onest-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  --font-body: "Onest", system-ui, "Segoe UI", Arial, sans-serif;
  --font-head: "Unbounded", system-ui, "Segoe UI", Arial, sans-serif;
  --font-ui: "Onest", system-ui, "Segoe UI", Arial, sans-serif;
  --fs-body: 17px; --lh-body: 1.65; --head-weight: 600; --head-tracking: -0.02em; --ui-weight: 500;
  --measure: 58ch;   /* ширина колонки текста: у этой гарнитуры ≈ 70 знаков в строке */
}

:root {          /* Море — холодный светлый, бирюзово-синий акцент */
  color-scheme: light;
  --bg: #F3F7F8; --surface: #FFFFFF; --surface-2: #E7F0F2;
  --text: #18252B; --heading: #0E191E; --muted: #51636B; --line: #D6E2E6;
  --accent: #0E6675; --accent-hover: #0A4F5B; --accent-ink: #FFFFFF; --accent-soft: #DEEFF2;
}
p:where(.lbl) { font-size: 1.5em; font-weight: bold; margin-block: 0.83em; }
/* Макет «Лента рубрик» — хронологическая лента записей по дням, фильтр по рубрикам сверху, статья узкой колонкой.
   Лёгкий и частый: короткие записи, время и рубрика у каждой, редкие миниатюры справа. Похож на ленту новостей, а не на журнал.
   Цвета — только переменные палитры (../variacii/palitry.css), шрифты — только переменные пары (../variacii/pary/para-N.css).
   Сетка 8 px; лента 760, статья — колонка текста пары (--measure). */

/* ── Основа ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  font-kerning: normal; font-variant-numeric: lining-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 {
  margin: 0; color: var(--heading); font-family: var(--font-head); font-weight: var(--head-weight);
  letter-spacing: var(--head-tracking); line-height: 1.2; text-wrap: balance;
}
p:where(.lbl) {
  margin: 0; color: var(--heading); font-family: var(--font-head); font-weight: var(--head-weight);
  letter-spacing: var(--head-tracking); line-height: 1.2; text-wrap: balance;
}
p { margin: 0; }
.wrap { --pad: 20px; max-width: 1080px; margin-inline: auto; padding-inline: var(--pad); }
.col { max-width: 760px; margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 20; padding: 8px 16px; background: var(--surface); color: var(--heading); }
.tag {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; background: var(--accent-soft);
  font-family: var(--font-ui); font-size: 13px; line-height: 16px; font-weight: var(--ui-weight); color: var(--accent); text-decoration: none; white-space: nowrap;
}
a.tag:hover { background: var(--accent); color: var(--accent-ink); }

/* ── Шапка ──────────────────────────────────────────────────────────────── */
.bar { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar__row { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; }
.name { margin: 0; font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); font-size: 22px; line-height: 1.15; }
.name a { color: var(--heading); text-decoration: none; }
.name a:hover { color: var(--accent); }
.bar__note { font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.bar-t { position: absolute; opacity: 0; pointer-events: none; }
.bar-b {
  display: none; align-items: center; gap: 8px; min-height: 40px; margin-left: auto; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px;
  font-family: var(--font-ui); font-size: 15px; font-weight: var(--ui-weight); color: var(--heading); cursor: pointer; user-select: none;
}
.bar-b::before { content: ""; width: 14px; height: 10px; border-block: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.bar-t:focus-visible ~ .bar-b, .bar-t:focus-visible ~ * .bar-b { outline: 2px solid var(--accent); outline-offset: 3px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; font-family: var(--font-ui); font-size: 15px; font-weight: var(--ui-weight); }
.links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--heading); text-decoration: none; }
.links a:hover, .links a[aria-current] { color: var(--accent); }

/* Шапка A — название слева, служебные ссылки справа */
/* Шапка B — название по центру и строка «обновляется каждый день» под ним */
.bar--b .bar__row { flex-direction: column; justify-content: center; gap: 4px; padding-block: 20px 16px; text-align: center; }
.bar--b .name { font-size: 30px; }
.bar--b .links { margin: 8px 0 0; justify-content: center; }
/* Шапка C — сплошная полоса акцента */
.bar--c { background: var(--accent); border-bottom: 0; }
.bar--c .name a, .bar--c .links a, .bar--c .bar__note { color: var(--accent-ink); }
.bar--c .name a:hover, .bar--c .links a:hover, .bar--c .links a[aria-current] { color: var(--accent-ink); text-decoration: underline; }
.bar--c .bar-b { color: var(--accent-ink); border-color: var(--accent-ink); }
.bar--c :focus-visible { outline-color: var(--accent-ink); }

/* ── Крошки ─────────────────────────────────────────────────────────────── */
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0 0 16px; padding: 0; list-style: none; font-family: var(--font-ui); font-size: 14px; line-height: 20px; color: var(--muted); }
.crumbs li + li::before { content: "·"; margin-inline: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ── Фильтр по рубрикам ─────────────────────────────────────────────────── */
.filter { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; margin: 0; padding: 12px 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  font-family: var(--font-ui); font-size: 15px; font-weight: var(--ui-weight); color: var(--heading); text-decoration: none; white-space: nowrap;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips a[aria-current] { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.chips__n { margin-left: 6px; font-weight: 400; opacity: 0.8; }

/* ── Лента ──────────────────────────────────────────────────────────────── */
.feed { padding-block: 24px 8px; }
.feed h1 { font-size: 30px; }
.feed__sub { margin-top: 6px; font-family: var(--font-ui); font-size: 15px; color: var(--muted); }
.day { margin-top: 32px; }
.day__h {
  display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
  font-family: var(--font-ui); font-size: 13px; line-height: 16px; font-weight: var(--ui-weight); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.day__h::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.entries { margin: 0; padding: 0; list-style: none; }
.entry { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 16px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry__time { grid-row: 1 / span 3; padding-top: 3px; font-family: var(--font-ui); font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry__top { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entry__title { grid-column: 2; grid-row: 2; }
.entry__text { grid-column: 2; grid-row: 3; }
.entry__top:empty { display: none; }
.also .entry__title { grid-row: 1; }   /* место каждой части задано явно: без миниатюры сетка не заводит лишнюю колонку */
.entry__title { font-size: 20px; line-height: 1.3; }
.entry__title a { color: var(--heading); text-decoration: none; }
.entry__title a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.entry__text { font-size: calc(var(--fs-body) - 1px); line-height: 1.55; color: var(--text); }
.entry__thumb { grid-column: 3; grid-row: 1 / span 3; display: block; width: 136px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.entry__thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry--big { grid-template-columns: 56px minmax(0, 1fr); }
.entry--big .entry__thumb { grid-column: 2; grid-row: 4; width: 100%; aspect-ratio: 16 / 9; margin-top: 8px; }
.entry--big .entry__title { font-size: 26px; }
.more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-ui); font-size: 15px; }
.more__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); font-weight: var(--ui-weight); text-decoration: none; }
.more__btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.pages { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pages a, .pages span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 20px; color: var(--heading); text-decoration: none; }
.pages a:hover { background: var(--surface-2); }
.pages [aria-current] { background: var(--surface-2); font-weight: 700; }

/* ── Запись (статья) ────────────────────────────────────────────────────── */
.post { padding-block: 32px 8px; }
.post__col { max-width: calc(var(--measure, 66ch) + 0px); margin-inline: auto; }
.post__top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.post h1 { margin-top: 16px; font-size: clamp(28px, 1.4vw + 20px, 40px); line-height: 1.15; }
.post__lead { margin-top: 16px; font-size: calc(var(--fs-body) + 2px); line-height: 1.5; color: var(--heading); }
.post__pic { margin: 28px 0 0; }
.post__pic .ph { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.post__pic .ph img { width: 100%; height: 100%; object-fit: cover; }
.post__pic figcaption { margin-top: 8px; font-family: var(--font-ui); font-size: 14px; line-height: 20px; color: var(--muted); }
.entry__body { margin-top: 28px; }
.entry__body > * + * { margin-top: 1em; }
.entry__body h2 { margin-top: 1.6em; font-size: clamp(22px, 0.5vw + 18px, 26px); }
.entry__body p:where(.lbl) { margin-top: 1.6em; font-size: clamp(22px, 0.5vw + 18px, 26px); }
.entry__body h3 { margin-top: 1.4em; font-size: 20px; }
.entry__body h2 + *, .entry__body h3 + * { margin-top: 0.5em; }
.entry__body p:where(.lbl) + * { margin-top: 0.5em; }
.entry__body ul, .entry__body ol { padding-left: 1.3em; }
.entry__body li + li { margin-top: 0.35em; }
.entry__body li::marker { color: var(--accent); }
.entry__body strong { color: var(--heading); }
.entry__body blockquote { margin: 1.6em 0; padding: 16px 20px; background: var(--surface); border-radius: 10px; border: 1px solid var(--line); font-style: italic; }
.entry__body blockquote p + p { margin-top: 0.5em; }
.entry__body .tbl { overflow-x: auto; margin-block: 1.6em; }
.entry__body table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
.entry__body th { padding: 8px 12px 8px 0; text-align: left; border-bottom: 2px solid var(--line); color: var(--heading); }
.entry__body td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.aside-note { padding: 16px 20px; border-radius: 10px; background: var(--accent-soft); }
.aside-note b { color: var(--heading); }
.post__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.post__src { width: 100%; margin-bottom: 8px; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.post__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.post__nav a { display: grid; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--heading); text-decoration: none; font-size: 16px; line-height: 1.35; }
.post__nav a:hover { border-color: var(--accent); }
.post__nav span { font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.post__nav a:last-child { text-align: right; }
.also { margin-top: 40px; }
.also h2 { font-size: 20px; margin-bottom: 8px; }
.also p:where(.lbl) { font-size: 20px; margin-bottom: 8px; }
.also .entry { grid-template-columns: 96px minmax(0, 1fr); padding-block: 14px; }
.also .entry__title { font-size: 17px; }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.nf { padding-block: 56px 16px; }
.nf h1 { font-size: clamp(28px, 1.4vw + 20px, 38px); }
.nf__code { font-family: var(--font-ui); font-size: 14px; font-weight: var(--ui-weight); color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.nf p.nf__text { margin-top: 12px; }
.nf .chips { flex-wrap: wrap; overflow: visible; padding-top: 20px; }

/* ── Подвал ─────────────────────────────────────────────────────────────── */
.end { margin-top: 64px; border-top: 1px solid var(--line); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; color: var(--muted); }
.end a { color: var(--text); text-decoration: none; }
.end a:hover { color: var(--accent); text-decoration: underline; }
.end ul { margin: 0; padding: 0; list-style: none; }
.end__name { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); font-size: 20px; color: var(--heading); }
.end__line { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 16px; font-size: 14px; }
.end__line::before { content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad); border-top: 1px solid var(--line); }
/* Подвал A — колонка о ленте и рубрики строкой */
.end--a .end__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; padding-block: 32px 24px; }
.end--a .end__in p { margin-top: 8px; max-width: 42ch; }
.end--a ul { display: flex; flex-wrap: wrap; gap: 4px 20px; align-content: start; }
/* Подвал B — одна строка */
.end--b .end__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 24px; }
.end--b ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
/* Подвал C — на второй поверхности, по центру */
.end--c { background: var(--surface-2); border-top: 0; text-align: center; }
.end--c .end__in { padding-block: 36px 20px; }
.end--c .end__in p { margin: 8px auto 0; max-width: 52ch; }
.end--c ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: 16px; }
.end--c .end__line { justify-content: center; }

/* ── Ширины ─────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .wrap { --pad: 16px; }
  .bar-b { display: inline-flex; }
  .bar__row { column-gap: 12px; }
  .name { font-size: 20px; }
  .bar .links { display: none; width: 100%; flex-direction: column; gap: 0; margin: 0 0 8px; }
  .bar .links a { min-height: 48px; border-top: 1px solid var(--line); }
  .bar--c .links a { border-top-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); }
  .bar-t:checked ~ .links, .bar-t:checked ~ * .links { display: flex; }
  .bar--b .bar__row { flex-direction: row; justify-content: space-between; text-align: left; padding-block: 12px; flex-wrap: wrap; }
  .bar--b .name { font-size: 24px; }
  .bar--b .bar__note { display: none; }
  .bar__row > .bar__note { display: none; }
  .entry, .entry--big { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding-block: 18px; align-items: center; }
  .entry__time { grid-column: 1; grid-row: 1; padding-top: 0; }
  .entry__top { grid-column: 2; grid-row: 1; }
  .entry__title { grid-column: 1 / -1; grid-row: 2; }
  .entry__text { grid-column: 1 / -1; grid-row: 3; }
  .entry--big .entry__thumb { grid-column: 1 / -1; grid-row: 4; }
  .also .entry__title { grid-column: 2; grid-row: 1; }
  .crumbs li[aria-current] { display: none; }
  .entry__thumb { display: none; }
  .entry--big .entry__thumb { display: block; }
  .entry--big .entry__title { font-size: 22px; }
  .more { justify-content: center; }
  .post__nav { grid-template-columns: minmax(0, 1fr); }
  .post__nav a:last-child { text-align: left; }
  .also .entry { grid-template-columns: auto minmax(0, 1fr); }
  .end--a .end__in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .end ul a { display: inline-flex; align-items: center; min-height: 40px; }
  .end--b ul { margin-left: 0; }
}
@media (max-width: 380px) {
  .name { font-size: 18px; }   /* широкие гарнитуры заголовков (Unbounded) — кнопка меню остаётся в строке с названием */
}
