/* Шрифты: Onest — интерфейс, Source Serif 4 — заголовки и текст статей */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/onest-cyrillic-ext-normal.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/onest-cyrillic-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/onest-latin-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-cyrillic-ext-normal.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-cyrillic-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-latin-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-cyrillic-ext-italic.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-cyrillic-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/source-serif-4-latin-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #161412;
  --ink-soft: #3a3632;
  --muted: #6b645c;
  --paper: #f7f4ef;
  --sand: #ece6dc;
  --rule: #d8d0c4;
  --accent: #a3141c;
  --accent-dark: #7d0f15;
  --night: #161412;

  --sans: "Onest", "Segoe UI", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --gap: clamp(20px, 2.6vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 650; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: calc(700px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: 100%; max-width: calc(1000px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Верхняя строка: страны и язык */
.topbar { background: var(--night); color: #d9d2c7; font-size: 14px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.countries { overflow-x: auto; scrollbar-width: none; }
.countries::-webkit-scrollbar { display: none; }
.countries ul { display: flex; gap: 20px; white-space: nowrap; }
.countries a { text-decoration: none; display: inline-block; padding: 10px 0; }
.countries a[aria-current] { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.topbar a:hover { color: #fff; }
.lang-switch ul { display: flex; border: 1px solid #4a443e; }
.lang-switch li + li { border-left: 1px solid #4a443e; }
.lang-switch a, .lang-switch span { display: block; padding: 4px 10px; text-decoration: none; font-weight: 500; }
.lang-switch span { background: var(--paper); color: var(--ink); }

/* Шапка */
.masthead { border-bottom: 1px solid var(--ink); background: var(--paper); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px 18px; }
.wordmark { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.wordmark:hover { color: inherit; }
.wordmark__mark { width: 40px; height: 40px; flex: none; }
.wordmark__text { display: flex; flex-direction: column; min-width: 0; }
.wordmark__name { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); line-height: 1; letter-spacing: -0.02em; }
.wordmark__country { margin-top: 6px; font-size: 14px; color: var(--muted); }
.is-country .wordmark__country { color: var(--accent); font-weight: 600; font-size: 15px; }

.menu-toggle { display: none; align-items: center; gap: 10px; padding: 10px 0; background: none; border: 0; cursor: pointer; font-weight: 500; }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-menu { border-top: 1px solid var(--rule); }
.site-menu__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rubrics ul { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.rubrics a { display: inline-block; padding: 13px 0 11px; text-decoration: none; font-weight: 600; font-size: 16px; }
.rubrics a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); }

.search-form { display: flex; align-items: stretch; min-width: 260px; }
.search-form input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--rule); border-right: 0; background: #fff; border-radius: 0; }
.search-form input:focus { outline: none; border-color: var(--ink); }
.search-form button, .button {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; border-radius: 0;
}
.search-form button:hover, .button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.search-form--page { max-width: 520px; margin-top: 20px; }

/* Заголовки разделов: линейка сверху, как в газете */
.section-title { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; padding-top: 10px; border-top: 3px solid var(--ink); margin-bottom: 22px; }
.section-title a { text-decoration: none; }
.section-title--small { border-top-width: 2px; margin-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--ink); margin-bottom: 22px; }
.section-head .section-title { border: 0; margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.01em; font-weight: 700; }
.section-head__more { font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; }

.site-main > section, .site-main > .wrap, .site-main > article { margin-top: clamp(28px, 4vw, 48px); }
.site-main { padding-bottom: clamp(48px, 6vw, 80px); }

/* Сетка карточек */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Карточка */
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card__media { display: block; overflow: hidden; background: var(--sand); aspect-ratio: 3 / 2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.025); }
.card__body { display: flex; flex-direction: column; gap: 6px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.card__rubric, .card__country { color: var(--accent); font-weight: 600; text-decoration: none; }
.card__region { color: var(--muted); text-decoration: none; }
a.card__region:hover, a.card__rubric:hover { text-decoration: underline; }
.card__title { font-size: 21px; line-height: 1.2; }
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__excerpt { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.5; }
.card__date { font-size: 13.5px; color: var(--muted); }
.card--no-image .card__body { border-top: 1px solid var(--rule); padding-top: 12px; }

.card--lead .card__media { aspect-ratio: 16 / 10; }
.card--lead .card__title { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.06; letter-spacing: -0.02em; }
.card--lead .card__excerpt { font-family: var(--serif); font-size: 19px; line-height: 1.45; max-width: 62ch; }
.card--lead .card__meta { font-size: 14.5px; }

.card--row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.card--row .card__media { order: 2; aspect-ratio: 1; }
.card--row .card__title { font-size: 17.5px; }
.card--row.card--no-image { grid-template-columns: 1fr; }
.card--row.card--no-image .card__body { border: 0; padding: 0; }

/* Главная страны */
.front-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: calc(var(--gap) * 1.5); align-items: start; }
.front-top__side .card--row:last-child { border-bottom: 0; }

.region-index { columns: 3 220px; column-gap: var(--gap); }
.region-index li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.region-index a, .region-index li > span { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; text-decoration: none; }
.region-index__name { font-family: var(--serif); font-size: 18px; }
.region-index__count { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; font-size: 14px; }
.region-index .is-empty { color: var(--muted); }
.more-link { text-align: center; }

/* Общая главная */
.hub-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gap) calc(var(--gap) * 2); align-items: end; padding-top: clamp(16px, 3vw, 40px); }
.hub-intro__title { font-size: clamp(38px, 6vw, 76px); line-height: 0.98; letter-spacing: -0.03em; font-weight: 700; }
.hub-intro__text { font-size: 17.5px; color: var(--ink-soft); }
.hub-intro__text p:last-child { margin-bottom: 0; }

.country-list { border-bottom: 1px solid var(--ink); counter-reset: country; }
.country { border-top: 1px solid var(--ink); }
.country__link { display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px var(--gap); align-items: baseline; padding: 22px 0; text-decoration: none; }
a.country__link:hover { color: inherit; background: linear-gradient(var(--sand), var(--sand)) no-repeat; background-size: 100% 100%; }
a.country__link:hover .country__name { color: var(--accent); }
.country__num { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; padding-left: 4px; }
.country__names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.country__name { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4.4vw, 54px); line-height: 1; letter-spacing: -0.025em; transition: color .15s; }
.country__local { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2vw, 24px); color: var(--muted); }
.country__info { display: flex; flex-direction: column; gap: 6px; padding-right: 8px; }
.country__facts { font-size: 14px; color: var(--muted); }
.country__latest { font-family: var(--serif); font-size: 18px; line-height: 1.3; }
.country__latest.is-muted { color: var(--muted); font-style: italic; }
.country--external .country__latest { color: var(--accent); font-family: var(--sans); font-size: 16px; font-weight: 600; }
.country--soon .country__name { color: var(--muted); font-weight: 600; }

.hub-about { max-width: calc(780px + 2 * var(--gutter)); }

/* Заголовок архива */
.page-head { padding-top: clamp(8px, 2vw, 24px); }
.page-head__kicker { margin: 0 0 8px; color: var(--accent); font-weight: 600; font-size: 15px; }
.page-head__title { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 700; }
.page-head__text { margin-top: 14px; max-width: 64ch; color: var(--ink-soft); }
.page-head__page { margin-top: 10px; color: var(--muted); font-size: 15px; }
header.page-head.wrap { padding-bottom: 28px; border-bottom: 1px solid var(--ink); margin-bottom: clamp(24px, 3vw, 36px); }

/* Статья */
.story__head { padding-top: clamp(8px, 2vw, 24px); }
.story__kicker { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 16px; font-size: 15px; font-weight: 600; }
.story__kicker a { text-decoration: none; color: var(--accent); }
.story__kicker a + a { color: var(--muted); font-weight: 500; }
.story__title { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; }
.story__lede { margin: 20px 0 0; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.4; color: var(--ink-soft); }
.story__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14.5px; }
.story__figure { margin-top: clamp(24px, 3vw, 36px); margin-bottom: 0; }
.story__figure img { width: 100%; }
.story__figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.story__body { margin-top: clamp(24px, 3vw, 36px); }
.story__foot { margin-top: 36px; display: flex; flex-direction: column; gap: 22px; }

.prose { font-family: var(--serif); font-size: 19.5px; line-height: 1.62; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 23px; margin-top: 1.4em; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--accent); font-size: 23px; line-height: 1.4; font-style: italic; }
.prose blockquote cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 15px; color: var(--muted); }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.prose .alignwide { margin-inline: calc((min(1000px, 100vw - 2 * var(--gutter)) - 100%) / -2); }
.prose .embed iframe, .prose .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 6px; text-align: left; }
.page .prose { font-family: var(--sans); font-size: 17.5px; line-height: 1.6; }
.page .prose h2 { font-family: var(--serif); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-block; padding: 4px 10px; border: 1px solid var(--rule); text-decoration: none; font-size: 14px; }
.tags a:hover { border-color: var(--accent); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); font-size: 15px; }
.share__label { font-weight: 700; }
.share ul { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.share a { text-decoration: none; }
.share a:hover { text-decoration: underline; }
.share__copy { padding: 0; border: 0; background: none; cursor: pointer; color: var(--accent); font-weight: 600; }

/* Пагинация */
.pagination { margin-top: 44px; border-top: 1px solid var(--ink); padding-top: 16px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination a, .pagination span { display: inline-block; min-width: 40px; padding: 8px 12px; text-align: center; text-decoration: none; border: 1px solid transparent; font-variant-numeric: tabular-nums; }
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination .current { background: var(--ink); color: var(--paper); }

.empty { padding: 40px 0; max-width: 640px; }
.empty__title { font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.not-found { padding-block: 24px 40px; max-width: 760px; }
.not-found__code { margin: 0; font-family: var(--serif); font-size: clamp(90px, 18vw, 180px); line-height: 0.9; color: var(--accent); font-weight: 700; letter-spacing: -0.04em; }
.not-found .page-head__title { margin: 16px 0 12px; }

/* Подвал */
.footer { background: var(--night); color: #cfc7bb; font-size: 15px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); padding-block: 44px 32px; }
.footer__name { font-family: var(--serif); font-size: 26px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer__about p:last-child { margin-bottom: 0; }
.footer__nav li + li { margin-top: 8px; }
.footer .is-soon { color: #8d857a; }
.footer .is-soon small { font-size: 12.5px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-block: 16px 24px; border-top: 1px solid #3a3530; font-size: 14px; color: #8d857a; }
.footer__age { border: 1px solid #5a534b; padding: 0 6px; }

/* Планшет */
@media (max-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front-top { grid-template-columns: 1fr; }
  .hub-intro { grid-template-columns: 1fr; }
  .site-menu__inner { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
  .search-form { min-width: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}

/* Телефон */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .grid--3 { grid-template-columns: 1fr; }
  .is-country .menu-toggle { display: inline-flex; }
  .is-country .site-menu { display: none; }
  .is-country .site-menu.is-open { display: block; }
  .rubrics ul { flex-direction: column; gap: 0; }
  .rubrics li { border-bottom: 1px solid var(--rule); }
  .rubrics a { display: block; padding: 12px 0; font-size: 18px; }
  .rubrics a[aria-current] { box-shadow: none; color: var(--accent); }
  .site-menu .search-form { margin-top: 14px; }
  .wordmark__mark { width: 34px; height: 34px; }
  .masthead__inner { padding-block: 16px 14px; }
  .card--lead .card__excerpt { font-size: 17.5px; }
  .card--row { grid-template-columns: minmax(0, 1fr) 84px; }
  .country__link { grid-template-columns: 1fr; padding: 18px 0; }
  .country__num { display: none; }
  .region-index { columns: 1; }
  .prose { font-size: 18.5px; }
  .prose .alignwide { margin-inline: 0; }
  .story__figure { padding-inline: 0; }
  .story__figure figcaption { padding-inline: var(--gutter); }
  .footer__grid { grid-template-columns: 1fr; }
  .topbar { font-size: 13.5px; }
  .countries ul { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .site-menu, .menu-toggle, .share, .related, .footer { display: none; }
  body { background: #fff; }
}
