/* Сайт «Теории без заговоров» (teor-bez.ru). Палитра — визуальный канон §2.1: кремовый фон, тёмно-синий текст,
   голубой — второй план, красный — один акцент. Шрифты системные: страница не тянет ничего с чужих серверов,
   кроме счётчика Метрики. Собирает scripts/build_site.py (копирует этот файл в /assets/style.css). */

:root {
  --paper: #F2E8C6;
  --paper-light: #F7F0D8;
  --ink: #1B2836;
  --navy: #1E3A5F;
  --blue: #70A6C1;
  --red: #D8352B;
  --muted: #56606C;
  --rule: rgba(30, 58, 95, .22);
  --rule-strong: rgba(30, 58, 95, .45);
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "PT Sans", Arial, sans-serif;
  --wrap: 1120px;
  --text: 700px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.62 var(--serif);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--rule-strong);
    text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.22; font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; top: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- шапка ---------- */
.masthead { text-align: center; padding: 28px 0 0; }
.brand { margin: 0; font: 700 40px/1.1 var(--serif); letter-spacing: -.01em; }
.brand a { color: var(--navy); text-decoration: none; }
.brand a:hover { color: var(--navy); }
.tagline { margin: 6px 0 18px; font-style: italic; color: var(--muted); font-size: 16px; }
.topnav { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); padding: 9px 0;
          font: 14px/1.5 var(--sans); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.topnav a { text-decoration: none; color: var(--navy); }
.topnav a:hover { color: var(--red); }
.topnav a[aria-current="page"] { color: var(--red); }
.topnav .ext { color: var(--muted); }
.masthead.compact { padding-top: 18px; }
.masthead.compact .brand { font-size: 28px; }
.masthead.compact .tagline { margin-bottom: 12px; font-size: 15px; }

/* ---------- общие элементы ---------- */
.meta { font: 14px/1.5 var(--sans); color: var(--muted); margin: 8px 0 0; }
.meta .sep { margin: 0 .45em; }
.kind { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.section-title { font: 600 13px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
                 margin: 0 0 14px; padding-top: 10px; border-top: 2px solid var(--navy); }
.more-link { font: 15px/1.5 var(--sans); margin: 18px 0 0; }
.more-link a { text-decoration: none; }
.cover { display: block; background: var(--paper-light); border: 1px solid var(--rule); }
.cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- главная ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 28px; padding-bottom: 40px; }
@media (min-width: 920px) { .home { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; } }

.lead-story h2 { font-size: 30px; margin: 0 0 14px; text-align: center; }
.lead-story h2 a, .card h3 a { text-decoration: none; color: var(--navy); }
.lead-story h2 a:hover, .card h3 a:hover { color: var(--red); }
.lead-story .dek { margin: 14px 0 0; font-size: 18.5px; }
.lead-story .meta { text-align: left; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 40px; }
@media (min-width: 620px) { .pair { grid-template-columns: 1fr 1fr; gap: 36px; } }
.card h3 { font-size: 21px; margin: 0 0 12px; text-align: center; }
.card .dek { margin: 12px 0 0; font-size: 16.5px; line-height: 1.55; }

.stories { margin-top: 44px; }
.story-list { list-style: none; margin: 0; padding: 0; }
.story-list li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 17px; line-height: 1.45; }
.story-list li:first-child { padding-top: 0; }
.story-list a { text-decoration: none; }
.story-list a:hover { text-decoration: underline; }
.story-list time { font: 13.5px/1.4 var(--sans); color: var(--muted); white-space: nowrap; margin-left: .4em; }
.story-list .kind { margin-left: .5em; }

.column { align-self: start; }
.column-box { background: var(--paper-light); border: 1px solid var(--rule-strong); padding: 6px 22px 18px; }
.column .section-title { border-top-color: var(--red); }
.col-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.col-item:last-of-type { border-bottom: 0; }
.col-item h3 { font-size: 18px; margin: 0 0 4px; }
.col-item h3 a { text-decoration: none; }
.col-item h3 a:hover { text-decoration: underline; }
.col-item time { font: 13px/1.4 var(--sans); color: var(--muted); }
.col-item p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.55; }
.column .more-link { margin-top: 6px; }
.column .about { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 22px 2px 0; }

/* ---------- статья, выпуск колонки, служебные страницы ---------- */
.page { max-width: var(--text); margin: 0 auto; padding: 24px 20px 48px; }
.crumbs { font: 13.5px/1.5 var(--sans); color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span { margin: 0 .4em; }
.article h1, .page h1 { font-size: 34px; margin: 0 0 14px; letter-spacing: -.005em; }
.article .dek { font-size: 20px; line-height: 1.5; font-style: italic; color: var(--navy); margin: 0 0 14px; }
.article .meta { margin: 0 0 24px; }
.article figure { margin: 0 0 28px; }
.article figure img { width: 100%; border: 1px solid var(--rule); }
.body p { margin: 0 0 1.05em; }
.body h2 { font-size: 25px; margin: 1.8em 0 .6em; }
.body h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.body ul, .body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.body li { margin: 0 0 .45em; }
.body blockquote { margin: 1.2em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--blue); color: var(--navy); }
.body hr { border: 0; border-top: 1px solid var(--rule-strong); margin: 2em 0; }
.body code { font: .88em/1.4 ui-monospace, Consolas, monospace; background: var(--paper-light); padding: 1px 4px; }
.body a { overflow-wrap: anywhere; }
.body .note { font-size: 16px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 1.6em; }
.body .credit { font: 13.5px/1.5 var(--sans); color: var(--muted); }
.body .sources-title { font-size: 20px; }
.body .sources, .body .sources-line { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.body .sources li { margin-bottom: .55em; }
.tags { font: 14px/1.6 var(--sans); color: var(--muted); margin: 28px 0 0; }
.tags span { display: inline-block; border: 1px solid var(--rule-strong); padding: 1px 9px; margin: 0 6px 6px 0; color: var(--navy); }

.follow { margin: 32px 0 0; padding: 18px 20px; background: var(--paper-light); border: 1px solid var(--rule-strong);
          border-left: 3px solid var(--red); font-size: 16.5px; line-height: 1.55; }
.follow p { margin: 0; }
.related { margin-top: 40px; }
.pager { display: flex; justify-content: space-between; gap: 18px; margin: 32px 0 0; padding-top: 14px;
         border-top: 1px solid var(--rule); font: 15px/1.45 var(--sans); }
.pager a { text-decoration: none; }
.pager .next { text-align: right; margin-left: auto; }

.archive-month { font: 600 13px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 32px 0 8px; }
.archive-month:first-of-type { margin-top: 8px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.archive-list a { font-size: 19px; line-height: 1.35; text-decoration: none; font-weight: 700; }
.archive-list a:hover { text-decoration: underline; }
.archive-list p { margin: 5px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.archive-list .meta { margin-top: 4px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 0; padding-top: 16px;
              border-top: 1px solid var(--rule-strong); font: 15px/1.4 var(--sans); }
.pagination a { text-decoration: none; }
.pagination .prev, .pagination .next { min-width: 90px; }
.pagination .next { text-align: right; }
.pagination .nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.pagination .nums a, .pagination .nums span { display: inline-block; min-width: 32px; padding: 5px 8px; text-align: center; }
.pagination .nums a { border: 1px solid var(--rule); }
.pagination .nums a:hover { border-color: var(--red); }
.pagination [aria-current="page"] { background: var(--navy); color: var(--paper); border: 1px solid var(--navy); }
.pagination .gap { color: var(--muted); }

.notfound { text-align: center; padding-top: 40px; }
.notfound .code { font: 700 72px/1 var(--serif); color: var(--red); margin: 0 0 8px; }
.notfound .story-list { text-align: left; margin-top: 28px; }

/* ---------- подвал ---------- */
.footer { border-top: 1px solid var(--rule-strong); margin-top: 8px; padding: 16px 0 28px; text-align: center;
          font: 13.5px/1.6 var(--sans); color: var(--muted); }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--red); }
.footer .sep { margin: 0 .45em; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .brand { font-size: 27px; }
  .masthead.compact .brand { font-size: 24px; }
  .lead-story h2 { font-size: 25px; }
  .article h1, .page h1 { font-size: 27px; }
  .article .dek { font-size: 18px; }
  .body h2 { font-size: 22px; }
  .topnav { gap: 2px 14px; }
}

@media print {
  body { background: #fff; }
  .topnav, .follow, .related, .pager, .column, .skip { display: none; }
}
