/* Continental Brief - restrained Brussels policy journal.
   Palette: bg #f5f7fa, cards #ffffff, ink #16294a, muted #5c6b82, accent #b57900.
   Type: Literata (display, leads) + Karla (text, UI). Radius 4. Light theme only. */

:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #16294a;
  --ink-soft: #3c4c66;
  --muted: #5c6b82;
  --accent: #b57900;
  --accent-deep: #8a5c00;
  --accent-wash: #f7efdd;
  --line: #dbe2ec;
  --line-soft: #e7ecf3;
  --radius: 4px;
  --font-display: "Literata", "Georgia", serif;
  --font-text: "Karla", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --skel-base: rgba(22, 41, 74, 0.08);
  --skel-sheen: rgba(255, 255, 255, 0.6);
  --skel-radius: 4px;
  --shadow-soft: 0 10px 24px rgba(22, 41, 74, 0.08);
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "liga" 1;
  /* Страховка от горизонтальной прокрутки: если какой-то блок всё же
     вылезет за правый край, страница не поедет вбок. Именно clip, а не
     hidden: hidden создаёт контейнер прокрутки и ломает position: sticky. */
  overflow-x: clip;
}

h1, h2, h3, h4, p, figure, ul, ol, blockquote { margin: 0; }

img { max-width: 100%; display: block; }

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(22, 41, 74, 0.35);
}

a:hover { color: var(--accent-deep); text-decoration-color: var(--accent); }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--accent-wash); color: var(--ink); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 120;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus-visible { top: 0; color: #fff; }

/* Scotch rule: the journal's signature double rule */
.scotch { border-top: 3px solid var(--ink); }
.scotch::before {
  content: "";
  display: block;
  border-top: 1px solid var(--ink);
  margin-top: 2px;
}

/* ---------- header ---------- */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}

.topbar-tag { letter-spacing: 0.02em; }

.topbar-date {
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.masthead { background: var(--card); }

.masthead-in {
  display: grid;
  /* minmax(0, 1fr) вместо 1fr: боковые дорожки не обязаны быть шире своего
     содержимого (бургер, кнопка поиска), поэтому длинный логотип по центру
     не выдавливает шапку за край на узких экранах. */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding-top: 22px;
  padding-bottom: 18px;
}

.logo {
  grid-column: 2;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
}

.logo:hover { color: var(--ink); }

.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.logo-word em { font-style: italic; font-weight: 600; }

.logo-dot { color: var(--accent); }

.logo-sub {
  display: block;
  font-family: var(--font-text);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.mast-search {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.mast-search:hover { border-color: var(--accent); color: var(--accent-deep); }
.mast-search:active { transform: scale(0.97); }
.mast-search .ph { font-size: 1.05rem; }

.burger {
  grid-column: 1;
  justify-self: start;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
}

.burger:active { transform: scale(0.95); }

.site-nav {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--ink);
}

.nav-in {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover { color: var(--ink); border-bottom-color: var(--line); }

.site-nav a.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* mobile nav panel */
@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .mast-search span { display: none; }
  .mast-search { padding: 0; width: 44px; justify-content: center; }
  .site-nav { display: none; }
  body.nav-open .site-nav { display: block; }
  .nav-in { flex-direction: column; gap: 0; padding: 8px 0; }
  .site-nav a {
    width: 100%;
    min-height: 48px;
    border-bottom: 1px solid var(--line-soft);
    border-left: 3px solid transparent;
    padding-left: 20px;
  }
  .site-nav a.is-active { border-left-color: var(--accent); border-bottom-color: var(--line-soft); }
}

/* ---------- kickers, meta, common ---------- */

.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-decoration: none;
}

a.kicker:hover { color: var(--accent-deep); text-decoration: underline; text-decoration-color: var(--accent); }

.meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.meta b { color: var(--ink-soft); font-weight: 700; }

.meta .sep { color: var(--line); }

.title-link { text-decoration: none; }
.title-link:hover { color: var(--accent-deep); }

.excerpt { color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover { background: #0f1f3a; color: #fff; }
.btn:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-ghost:hover { background: var(--ink); color: #fff; }

input[type="text"], input[type="email"], input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

input::placeholder { color: var(--muted); opacity: 1; }

input[type="text"]:focus, input[type="email"]:focus, input[type="search"]:focus {
  outline: 2px solid var(--accent-deep);
  outline-offset: 1px;
  border-color: var(--accent);
}

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* ---------- media / skeleton system ---------- */

.media {
  position: relative;
  overflow: hidden;
  background: var(--skel-base);
  border-radius: var(--radius);
}

.media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.media > img.loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .media > img { transition: none; }
}

.skel {
  position: relative;
  overflow: hidden;
  background: var(--skel-base);
  border-radius: var(--skel-radius);
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skel-sheen), transparent);
  animation: skel-sheen 1.4s ease-in-out infinite;
}

@keyframes skel-sheen {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .skel::after { animation: none; display: none; }
}

.skel-line { height: 0.85em; }
.skel-line.w-40 { width: 40%; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-80 { width: 80%; }
.skel-title { height: 1.6em; width: 70%; }
.skel-kicker { height: 0.75em; width: 18%; }
.skel-media { aspect-ratio: 16 / 9; width: 100%; border-radius: var(--skel-radius); }
.skel-avatar { width: 40px; height: 40px; border-radius: 50%; }

#route-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 80;
  background: var(--accent, currentColor);
  opacity: 0;
  transition: width 0.4s ease, opacity 0.2s ease;
  pointer-events: none;
}

#route-progress.is-active { width: 70%; opacity: 1; }

/* skeleton layout mirrors (silhouettes of real layouts) */

.sk-stack > * + * { margin-top: 12px; }

.sk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  padding: 40px 0 48px;
}

.sk-rail-item {
  display: grid;
  /* fr по умолчанию = minmax(auto, 1fr) и не сжимается уже содержимого */
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.sk-band { padding: 32px 0; border-top: 2px solid var(--line); }

.sk-cols {
  display: grid;
  /* в колонках лежат плашки-картинки: без minmax(0, ...) одна дорожка
     распирается, а соседние схлопываются */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.sk-listing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  padding: 40px 0;
}

.sk-row {
  display: grid;
  /* текстовая дорожка должна уметь сжиматься уже своего содержимого */
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}

.sk-row .skel-media { aspect-ratio: 3 / 2; }

.sk-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0;
}

/* Заглушка под главную картинку статьи режется тем же потолком, что и сама
   картинка, иначе при загрузке страница дёргается: сперва высокий серый
   прямоугольник, потом низкая картинка. */
.sk-article .skel-media { max-height: clamp(240px, 40vh, 400px); }

@media (max-width: 1020px) {
  .sk-hero { grid-template-columns: minmax(0, 1fr); }
  .sk-listing { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .sk-cols { grid-template-columns: minmax(0, 1fr); }
  .sk-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- home: briefing hero ---------- */

.briefing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  padding: 44px 0 52px;
}

/* min-width: 0 детям грида: иначе элемент не даёт дорожке сжаться уже
   своего min-content (длинный заголовок, картинка) и ломает соседнюю колонку */
.lead-story { padding-right: 44px; min-width: 0; }

.brief-rail { min-width: 0; }

.lead-story .kicker { margin-bottom: 12px; }

.lead-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.lead-title a { text-decoration: none; }
.lead-title a:hover { color: var(--accent-deep); }

.lead-dek {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 60ch;
}

.lead-story .meta { margin-top: 16px; }

.lead-figure { margin-top: 24px; }

.lead-figure .media { aspect-ratio: 16 / 9; }

.lead-figure figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.brief-rail {
  border-left: 1px solid var(--line);
  padding-left: 36px;
}

.brief-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 3px solid var(--ink);
  padding-top: 12px;
  margin-bottom: 4px;
}

.brief-head h2 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brief-head .brief-day {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.brief-item {
  display: grid;
  /* колонка текста: без minmax(0, ...) длинная ссылка/слово распирает строку
     и время слева уезжает за край рейла */
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.brief-item:last-of-type { border-bottom: 0; }

.brief-time {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.brief-item p {
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 500;
}

.brief-item p a { text-decoration: none; }
.brief-item p a:hover { color: var(--accent-deep); text-decoration: underline; text-decoration-color: var(--accent); }

.brief-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.brief-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-decoration: none;
}

.brief-all:hover { text-decoration: underline; text-decoration-color: var(--accent); }

@media (max-width: 1020px) {
  .briefing { grid-template-columns: minmax(0, 1fr); }
  .lead-story { padding-right: 0; }
  .brief-rail { border-left: 0; padding-left: 0; margin-top: 40px; }
}

/* ---------- sections ---------- */

.section { padding: 40px 0 48px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  margin-bottom: 26px;
}

.section-title {
  /* сосед .section-all стоит с white-space: nowrap, поэтому заголовок должен
     уметь сжиматься и переноситься, иначе шапка секции распирает контейнер */
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.section-all {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 0;
}

.section-all:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* family: feature + headline stack */

.band-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 44px;
}

/* дети .band-split: без min-width: 0 картинка и длинный заголовок не дают
   дорожке сжаться, и вторая колонка схлопывается в столбик по одному слову */
.feature-card { display: block; min-width: 0; }

.feature-card .media { aspect-ratio: 4 / 3; }

.feature-card .kicker { margin-top: 16px; }

.feature-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.22;
  margin-top: 8px;
}

.feature-title a { text-decoration: none; }
.feature-title a:hover { color: var(--accent-deep); }

.feature-card .excerpt { margin-top: 10px; max-width: 56ch; }
.feature-card .meta { margin-top: 10px; }

.headline-stack { display: flex; flex-direction: column; min-width: 0; }

.headline-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.headline-item:first-child { padding-top: 4px; }
.headline-item:last-child { border-bottom: 0; }

.headline-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.3;
  margin-top: 6px;
}

.headline-item h3 a { text-decoration: none; }
.headline-item h3 a:hover { color: var(--accent-deep); }

.headline-item .meta { margin-top: 8px; }

@media (max-width: 1020px) {
  .band-split { grid-template-columns: minmax(0, 1fr); }
}

/* family: quote of the week */

.quotewk-wrap { padding: 8px 0 48px; }

.quotewk {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 52px 32px 44px;
  text-align: center;
  position: relative;
}

.quotewk::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 64px;
  border-top: 3px solid var(--accent);
}

.quotewk-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.quotewk blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.4;
  max-width: 46ch;
  margin: 18px auto 0;
}

.quotewk-who {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.quotewk-who b {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

/* family: mosaic grid */

.mosaic {
  display: grid;
  /* в каждой ячейке картинка и заголовок: чистый 1fr не сжимается уже
     содержимого, из-за чего одна карточка распирается, а соседние сплющиваются */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.mosaic-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* карточка — элемент грида: разрешаем ей быть уже своего min-content */
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mosaic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.mosaic-card.is-wide { grid-column: span 2; }

.mosaic-card .media { aspect-ratio: 16 / 9; border-radius: 0; }

.mosaic-card.is-tall .media { aspect-ratio: 4 / 3; }

.mosaic-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.mosaic-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.28;
}

.mosaic-card.is-wide .mosaic-body h3 { font-size: 1.32rem; }

.mosaic-body h3 a { text-decoration: none; }
.mosaic-body h3 a:hover { color: var(--accent-deep); }

.mosaic-body .meta { margin-top: auto; padding-top: 8px; }

@media (max-width: 1020px) {
  /* та же причина, что и в базовом правиле: дорожки должны сжиматься */
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic-card.is-wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .mosaic { grid-template-columns: minmax(0, 1fr); }
  .mosaic-card.is-wide { grid-column: auto; }
}

/* family: analysis list rows */

.analysis-list { display: flex; flex-direction: column; }

.analysis-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 120px;
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}

.analysis-row:last-child { border-bottom: 0; }

/* дети строки анализа (картинка, текст, дата) должны сжиматься вместе с дорожками */
.analysis-row > * { min-width: 0; }

.analysis-row .media { aspect-ratio: 1 / 1; }

.analysis-row h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
  margin-top: 4px;
}

.analysis-row h3 a { text-decoration: none; }
.analysis-row h3 a:hover { color: var(--accent-deep); }

.analysis-row .excerpt { margin-top: 6px; max-width: 62ch; }

.analysis-date {
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

@media (max-width: 700px) {
  .analysis-row { grid-template-columns: 84px minmax(0, 1fr); }
  .analysis-date { display: none; }
}

/* family: capitals strip */

.capitals-strip {
  display: grid;
  /* колонки с текстом: длинное слово в заголовке не должно распирать полосу */
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capital-cell {
  min-width: 0;
  padding: 4px 28px 8px 0;
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.capital-cell:first-child { border-left: 0; padding-left: 0; }

.capital-city {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.capital-cell h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.32;
  margin-top: 10px;
}

.capital-cell h3 a { text-decoration: none; }
.capital-cell h3 a:hover { color: var(--accent-deep); }

.capital-cell p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}

@media (max-width: 1020px) {
  .capitals-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .capital-cell:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 640px) {
  .capitals-strip { grid-template-columns: minmax(0, 1fr); }
  .capital-cell { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 18px; }
  .capital-cell:first-child { border-top: 0; padding-top: 0; }
}

/* family: newsletter band */

.newsletter-band {
  margin: 8px 0 56px;
  padding-top: 6px;
}

.newsletter-inner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: center;
}

.newsletter-inner h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
}

.newsletter-inner .excerpt { margin-top: 10px; max-width: 48ch; }

.newsletter-form .form-row { display: flex; gap: 10px; }

/* min-width: 0 обязателен: у input свой intrinsic-минимум (~20 символов),
   без этого поле не сжимается и строка формы вылезает из колонки */
.newsletter-form input { flex: 1; min-width: 0; }

.newsletter-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 10px;
}

.newsletter-success {
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .newsletter-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---------- breadcrumbs ---------- */

.crumbs { padding: 20px 0 0; }

.crumbs ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); text-decoration: underline; }

.crumbs [aria-current="page"] { color: var(--ink-soft); font-weight: 600; }

/* ---------- listing pages ---------- */

.listing-head { padding: 28px 0 8px; }

.listing-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.1;
}

.listing-desc {
  margin-top: 12px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip:active { transform: scale(0.97); }

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  padding: 28px 0 56px;
}

/* дети грида: колонка списка и сайдбар должны уметь быть уже своего
   содержимого (в списке лежат картинки и длинные заголовки) */
.listing-main { min-width: 0; }
.listing-grid > .sidebar { min-width: 0; }

.post-row {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 26px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

/* текстовая половина строки — элемент грида: без min-width: 0 длинный
   заголовок не даёт дорожке сжаться и строка вылезает за край */
.post-row > div { min-width: 0; }

.post-row:first-child { padding-top: 6px; }

.post-row .media { aspect-ratio: 3 / 2; }

.post-row h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.28;
  margin-top: 6px;
}

.post-row h2 a { text-decoration: none; }
.post-row h2 a:hover { color: var(--accent-deep); }

.post-row .excerpt { margin-top: 8px; }
.post-row .meta { margin-top: 10px; }

@media (max-width: 700px) {
  .post-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* pagination */

.pagination {
  display: flex;
  flex-wrap: wrap; /* много страниц не помещается в узкий экран одной строкой */
  align-items: center;
  gap: 8px;
  padding: 28px 0 0;
}

.pagination .page,
.pagination a.page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--card);
}

.pagination a.page[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pagination .page.is-disabled {
  color: var(--muted);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.65;
}

.pagination-note { font-size: 0.78rem; color: var(--muted); margin-left: 8px; }

/* ---------- sidebar ---------- */

.sidebar { display: flex; flex-direction: column; gap: 36px; }

.widget {
  border-top: 3px solid var(--ink);
  padding-top: 14px;
}

.widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.mostread { list-style: none; padding: 0; counter-reset: mr; }

.mostread li {
  counter-increment: mr;
  display: grid;
  /* дорожка заголовка должна сжиматься: длинная ссылка иначе распирает сайдбар */
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.mostread li:last-child { border-bottom: 0; }

.mostread li::before {
  content: counter(mr, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-deep);
  line-height: 1.2;
}

.mostread a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.97rem;
  line-height: 1.35;
  text-decoration: none;
}

.mostread a:hover { color: var(--accent-deep); }

.widget .excerpt { font-size: 0.88rem; }

.widget-newsletter .newsletter-form { margin-top: 14px; }
.widget-newsletter .form-row { display: flex; flex-direction: column; gap: 10px; }

.widget-about p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.widget-about a.more { font-size: 0.85rem; font-weight: 700; color: var(--accent-deep); text-decoration: none; display: inline-block; margin-top: 10px; padding: 8px 0; }
.widget-about a.more:hover { text-decoration: underline; text-decoration-color: var(--accent); }

@media (max-width: 1020px) {
  .listing-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
}

/* ---------- article ---------- */

.article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.article-head { padding-top: 26px; }

.article-head .kicker { margin-bottom: 14px; }

.article-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.article-lead {
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.article-meta b { color: var(--ink); font-weight: 700; }

.article-figure { margin-top: 28px; }

/* Ограничение высоты главной картинки статьи.
   Колонка статьи 780px, пропорция 16:9 давала около 439px, и на ноутбуке
   картинка съедала почти весь первый экран: до текста надо было скроллить.
   Пропорцию задаём явно, а высоту режем потолком. Картинка при этом
   обрезается по центру: у .media есть overflow: hidden, а у .media > img
   уже стоят height: 100% и object-fit: cover, так что сжатия не будет.
   На узких экранах потолок не срабатывает: при ширине окна 375px
   собственная высота картинки около 190px, что ниже нижней границы
   clamp в 240px, поэтому полоски не возникает. */
.article-figure .media {
  aspect-ratio: 16 / 9;
  /* width: 100% обязателен: при ширине auto браузер переносит потолок высоты
     обратно в ширину через пропорцию, и обёртка ужималась до 640px вместо 780px,
     то есть картинка уменьшалась, а не обрезалась. */
  width: 100%;
  max-height: clamp(240px, 40vh, 400px);
}

.article-figure figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
}

/* Длинные ссылки и слова без пробелов из редактора не должны вылезать
   за колонку текста; перенос включается только при переполнении. */
.article-body { margin-top: 30px; overflow-wrap: break-word; }

/* моноширинные блоки редактора: прокрутка внутри блока, а не всей страницы */
.article-body pre { overflow-x: auto; max-width: 100%; }

.article-body p {
  font-size: 1.04rem;
  line-height: 1.75;
  margin: 0 0 22px;
  color: #1f3050;
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 36px 0 14px;
}

.article-body a { text-decoration-color: var(--accent); }

.article-body p.has-dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--ink);
}

.pullquote {
  margin: 34px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
}

.pullquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}

.pullquote footer {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.pullquote footer b { color: var(--ink-soft); }

.readalso {
  margin: 34px 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px 24px;
}

.readalso-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.readalso ul { list-style: none; padding: 0; margin-top: 10px; }

.readalso li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.readalso li:last-child { border-bottom: 0; }

.readalso a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
}

.readalso a:hover { color: var(--accent-deep); text-decoration: underline; text-decoration-color: var(--accent); }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-decoration: none;
  background: var(--card);
}

.tag:hover { border-color: var(--accent); }

.source-box {
  margin-top: 28px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.source-box .source-label {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.source-box a {
  font-weight: 700;
  color: var(--ink);
  text-decoration-color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* адрес источника бывает длинным и без пробелов — режем только при
     переполнении, чтобы он не выталкивал блок за край статьи */
  min-width: 0;
  overflow-wrap: anywhere;
}

.source-box a:hover { color: var(--accent-deep); }

.author-box {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.author-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.author-box h2 { font-size: 0.95rem; font-weight: 700; }

.author-box p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; margin-top: 4px; }

/* more on topic */

.morefrom { padding: 8px 0 56px; }

.morefrom-grid {
  display: grid;
  /* в ячейках картинки 3/2 и заголовки: без minmax(0, ...) одна колонка
     распирается по картинке, остальные схлопываются */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.more-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.more-card .media { aspect-ratio: 3 / 2; }

.more-card .kicker { margin-top: 10px; }

.more-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.3;
}

.more-card h3 a { text-decoration: none; }
.more-card h3 a:hover { color: var(--accent-deep); }

@media (max-width: 860px) {
  .morefrom-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- search page ---------- */

.search-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.search-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
}

.search-page .listing-desc { margin-top: 10px; }

.search-form { margin-top: 28px; }

.search-row { display: flex; gap: 10px; }

/* без min-width: 0 поле держит свой intrinsic-минимум и распирает строку */
.search-row input { flex: 1; min-width: 0; }

.search-results { margin-top: 36px; }

.results-note {
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 4px;
}

.result-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.result-row .kicker { margin-bottom: 6px; }

.result-row h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
}

.result-row h2 a { text-decoration: none; }
.result-row h2 a:hover { color: var(--accent-deep); }

.result-row .excerpt { margin-top: 6px; }
.result-row .meta { margin-top: 8px; }

.search-hint {
  margin-top: 34px;
  font-size: 0.9rem;
  color: var(--muted);
}

.search-hint b { color: var(--ink-soft); }

@media (max-width: 560px) {
  .search-row { flex-direction: column; }
}

/* ---------- static pages / prose ---------- */

.static-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.static-wrap h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

/* та же защита, что и в теле статьи: длинные адреса не рвут колонку */
.prose { margin-top: 26px; overflow-wrap: break-word; }

.prose pre { overflow-x: auto; max-width: 100%; }

.prose p { font-size: 1.02rem; line-height: 1.7; margin-bottom: 18px; color: #1f3050; }

.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 30px 0 12px;
}

.prose ul { padding-left: 22px; margin-bottom: 18px; }
.prose li { margin-bottom: 8px; line-height: 1.6; color: #1f3050; }

.prose a { text-decoration-color: var(--accent); }

.contact-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  padding: 22px 24px;
  margin: 22px 0;
}

.contact-card h2 { margin-top: 0; font-size: 1.05rem; font-family: var(--font-text); font-weight: 700; }
.contact-card p { margin-bottom: 6px; font-size: 0.95rem; }

/* ---------- 404 ---------- */

.notfound {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 88px;
  text-align: center;
}

.notfound-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 10vw, 6.5rem);
  line-height: 1;
  color: var(--ink);
}

.notfound-code span { color: var(--accent); }

.notfound h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 18px;
}

.notfound p { color: var(--muted); margin-top: 12px; }

.notfound .actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--card);
  margin-top: 24px;
}

.foot-rule { margin: 0; }

.foot-in {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 44px;
  padding: 44px 0 36px;
}

/* колонки подвала — элементы грида: длинное название рубрики не должно
   распирать свою дорожку и съедать соседние */
.foot-brand, .foot-col { min-width: 0; }

.foot-brand .logo-word { font-size: 1.5rem; }

.foot-brand p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 34ch;
}

.foot-col h2 {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.foot-col ul { list-style: none; padding: 0; }

.foot-col li { margin-bottom: 2px; }

.foot-col a {
  display: inline-block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.foot-col a:hover { color: var(--accent-deep); text-decoration: underline; text-decoration-color: var(--accent); }

.foot-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}

/* ---------- cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}

.cookie-banner p { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }

.cookie-actions { display: flex; gap: 10px; margin-top: 14px; }

.cookie-actions .btn { min-height: 44px; padding: 0 18px; font-size: 0.82rem; }

@media (max-width: 480px) {
  .cookie-banner { left: 12px; right: 12px; max-width: none; }
}

/* ---------- helpers ---------- */

.ext-icon { font-size: 0.95em; }

@media (max-width: 700px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .section { padding: 32px 0 36px; }
  .briefing { padding: 30px 0 36px; }
}

/* ---------- newsnet: тело статьи из базы ----------
   В прототипе врезка-цитата и буквица размечались классами (.pullquote,
   .has-dropcap). Санитайзер движка вырезает атрибут class из тела статьи,
   поэтому те же правила вешаем на голые теги внутри .article-body.
   Внешний вид не меняется. */

.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--ink);
}

.article-body blockquote {
  margin: 34px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
  font-size: 0.82rem;
  color: var(--muted);
}

.article-body blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 12px;
}

.article-body blockquote p:last-child { margin-bottom: 0; }
