/* =============================================================================
   kursrd — дизайн-система
   Палитра целиком выведена из логотипа: зелёный #007c36, синий #0054a6,
   красный #d62d2a и приглушённый шалфейный #556b5a. Нейтральные тона — не серые,
   а с тем же шалфейным подтоном, поэтому страница читается как одно целое с
   гербом, а не как белый фон, на который положили цветной значок.
   Разбор решений — docs/design-system.md
   ========================================================================== */

/* -------------------------------------------------------------- 1. Токены */
:root {
  /* Фирменные цвета — ровно из SVG логотипа, не трогать */
  --brand-green: #007c36;
  --brand-blue: #0054a6;
  --brand-red: #d62d2a;
  --brand-sage: #556b5a;

  /* Рабочие роли. Зелёный чуть притемлён до контраста AA на белом */
  --primary: #00722f;
  --primary-strong: #005726;
  --primary-tint: #e7f3ea;
  --primary-tint-2: #d3e8d9;
  --info: #0054a6;
  --info-tint: #e8effa;
  --accent: #d62d2a;

  /* Нейтральные с шалфейным подтоном */
  --ink: #0e1712;
  --ink-2: #2c3b32;
  --ink-3: #55655b;
  --ink-4: #7e8d84;
  --line: #dde5df;
  --line-2: #eaf0eb;
  --surface: #ffffff;
  --surface-2: #f5f8f5;
  --surface-3: #eaf0ea;
  --surface-dark: #0d1611;

  /* Типографика: один шрифт, шесть насыщенностей, плавная шкала */
  --font: "Golos Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--2: 0.75rem;
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --step-2: clamp(1.3rem, 1.18rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.36rem + 1vw, 2.1rem);
  --step-4: clamp(2rem, 1.6rem + 1.7vw, 3rem);
  --step-5: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem);

  /* Шаг сетки — 4px */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 2.5rem;   --s-8: 3rem;
  --s-9: 4rem;     --s-10: 5rem;    --s-11: 6.5rem;  --s-12: 8rem;

  --radius-1: 4px;
  --radius-2: 10px;
  --radius-3: 18px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(14, 23, 18, .05);
  --shadow-2: 0 2px 6px rgba(14, 23, 18, .06), 0 12px 28px -18px rgba(14, 23, 18, .35);
  --shadow-3: 0 4px 12px rgba(14, 23, 18, .08), 0 24px 48px -26px rgba(14, 23, 18, .45);

  --ease: cubic-bezier(.22, .68, .2, 1);
  --fast: 160ms;
  --base: 260ms;
  --slow: 480ms;

  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 68px;

  /* Флаг республики как графический приём: одна линия на весь сайт */
  --tricolor: linear-gradient(90deg,
    var(--brand-green) 0 33.33%, var(--brand-blue) 33.33% 66.66%, var(--brand-red) 66.66%);
}

/* ---------------------------------------------------------------- 2. База */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.14; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: var(--step-5); letter-spacing: -0.035em; }
h2 { font-size: var(--step-4); letter-spacing: -0.03em; }
h3 { font-size: var(--step-2); }
.title-2 { font-size: var(--step-4); letter-spacing: -0.03em; }
p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-1);
}

::selection { background: var(--primary-tint-2); color: var(--ink); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: var(--s-3) var(--s-5);
  border-radius: 0 0 var(--radius-2) 0;
}
.skip-link:focus { left: 0; }

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

/* ------------------------------------------------------------- 3. Разметка */
.wrap { width: min(100% - 2 * var(--s-5), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--s-5), var(--wrap-narrow)); }

.section { padding-block: clamp(var(--s-8), 6vw, var(--s-11)); }
.section--tint { background: var(--surface-2); }
.section--ink { background: var(--surface-dark); color: #fff; }

.section__head { max-width: 62ch; margin-bottom: var(--s-7); }
.section__head--center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--step--1); font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-4);
}
.kicker::before {
  content: ""; width: 30px; height: 3px; border-radius: 2px; background: var(--tricolor);
}
.section__head--center .kicker { justify-content: center; }
.section__lead { font-size: var(--step-1); color: var(--ink-3); margin-top: var(--s-4); }

/* -------------------------------------------------------------- 4. Кнопки */
.btn {
  --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0.72em 1.35em; border: 1px solid var(--btn-bd); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-size: var(--step--1); font-weight: 600; letter-spacing: .02em;
  cursor: pointer; transition: transform var(--fast) var(--ease),
    background var(--fast) var(--ease), color var(--fast) var(--ease),
    border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bd: var(--primary); --btn-fg: var(--primary-strong); }
.btn--on-dark { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.4); }
.btn--on-dark:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--lg { font-size: var(--step-0); padding: 0.85em 1.7em; }
.btn__arrow { transition: transform var(--base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* --------------------------------------------------------- 5. Шапка и низ */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120;
  background: var(--tricolor);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  will-change: transform;
}

.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.header[data-scrolled="true"] { border-bottom-color: var(--line); box-shadow: var(--shadow-1); }
.header__inner {
  display: flex; align-items: center; gap: var(--s-5);
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: var(--s-3); margin-right: auto; min-width: 0; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__name { font-size: var(--step--1); font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap; }
.brand__sub { font-size: var(--step--2); color: var(--ink-4); }

.nav { display: flex; align-items: center; gap: var(--s-1); }
.nav__link {
  position: relative; padding: var(--s-2) var(--s-3); border-radius: var(--radius-1);
  font-size: var(--step--1); font-weight: 600; color: var(--ink-2);
  white-space: nowrap; flex: none;
  transition: color var(--fast) var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--tricolor);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--base) var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after, .nav__link[aria-current]::after { transform: scaleX(1); }
.nav__link[aria-current] { color: var(--primary-strong); }

.header__actions { display: flex; align-items: center; gap: var(--s-2); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease),
    background var(--fast) var(--ease);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary-strong); background: var(--primary-tint); }

.burger { display: none; }

.footer { background: var(--surface-dark); color: #fff; padding-block: var(--s-8) var(--s-6); }
.footer::before { content: ""; display: block; height: 3px; background: var(--tricolor); margin-bottom: var(--s-8); }
.footer__grid { display: grid; gap: var(--s-6); grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
.footer a { color: rgba(255,255,255,.8); }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__title { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .14em;
  color: rgba(255,255,255,.5); margin-bottom: var(--s-4); font-weight: 700; }
.footer__list { list-style: none; display: grid; gap: var(--s-2); font-size: var(--step--1); }
.footer__bottom {
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between;
  font-size: var(--step--2); color: rgba(255,255,255,.55);
}

/* -------------------------------------------------------------- 6. Обложка */
.hero { position: relative; color: #fff; isolation: isolate; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(9,18,13,.62) 0%, rgba(9,18,13,.28) 55%, rgba(9,18,13,.12) 100%),
    linear-gradient(180deg, rgba(9,18,13,.68) 0%, rgba(9,18,13,.42) 45%, rgba(9,18,13,.84) 100%),
    radial-gradient(120% 80% at 20% 20%, rgba(0,124,54,.32), transparent 60%);
}
.hero__inner { padding-block: clamp(var(--s-10), 13vh, 9rem) var(--s-9); }
.hero__kicker {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-4); border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius-pill); font-size: var(--step--1); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(6px);
  background: rgba(255,255,255,.08);
}
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(0,124,54,.28); }
.hero h1 { margin: var(--s-5) 0 0; max-width: 16ch; text-wrap: balance; }
.hero__sub { margin-top: var(--s-5); max-width: 46ch; font-size: var(--step-1); color: rgba(255,255,255,.82); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-7); }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; margin-top: var(--s-9);
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-3); overflow: hidden;
}
.stat { background: rgba(11,20,15,.42); backdrop-filter: blur(8px); padding: var(--s-5) var(--s-5); }
.stat__value { font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat__label { margin-top: var(--s-2); font-size: var(--step--1); color: rgba(255,255,255,.7); }

/* ---------------------------------------------------------------- 7. Об организации */
.about { display: grid; gap: clamp(var(--s-6), 5vw, var(--s-9)); grid-template-columns: 5fr 7fr; align-items: center; }
.about__figure { position: relative; }
.about__figure img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-3); box-shadow: var(--shadow-3);
}
.about__badge {
  position: absolute; left: calc(-1 * var(--s-4)); bottom: var(--s-6);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-green);
  border-radius: var(--radius-2); padding: var(--s-4) var(--s-5); box-shadow: var(--shadow-2);
  max-width: 15rem;
}
.about__badge b { display: block; font-size: var(--step-2); letter-spacing: -.02em; }
.about__badge span { font-size: var(--step--1); color: var(--ink-3); }
.about__text { font-size: var(--step-1); color: var(--ink-2); }

.facts { list-style: none; display: grid; gap: var(--s-4); margin-top: var(--s-7); }
.facts li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: baseline;
  padding-top: var(--s-4); border-top: 1px solid var(--line); }
.facts dt, .facts__key { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-4); font-weight: 700; }
.facts__value { font-weight: 600; }

/* ------------------------------------------------------------- 8. Карточки */
.cards { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3);
  transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease),
    border-color var(--base) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--line-2); }
.card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-3); }
.card__media img { width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--slow) var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.card__index {
  position: absolute; top: var(--s-4); left: var(--s-4); z-index: 1;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-pill);
  background: rgba(13,22,17,.6); backdrop-filter: blur(8px); color: #fff;
  font-size: var(--step--1); font-weight: 700;
}
.card__title { font-size: var(--step-1); font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  font-size: var(--step--1); color: var(--ink-4); }
.card__excerpt { color: var(--ink-3); font-size: calc(var(--step-0) - 1px); }
.card__link::after { content: ""; position: absolute; inset: 0; }

/* ------------------------------------------------------------- 9. Правление */
.board { display: grid; gap: var(--s-6); grid-template-columns: 5fr 7fr; align-items: start; }
.chair {
  display: grid; gap: var(--s-5); padding: var(--s-6);
  background: linear-gradient(160deg, var(--primary-tint), var(--surface) 70%);
  border: 1px solid var(--primary-tint-2); border-radius: var(--radius-3);
  position: sticky; top: calc(var(--header-h) + var(--s-5));
}
.chair__role { font-size: var(--step--1); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary-strong); }
.chair__name { font-size: var(--step-3); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }

.monogram {
  display: grid; place-items: center; flex: none;
  width: 3.25rem; height: 3.25rem; border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--ink-3);
  font-weight: 700; font-size: var(--step-0); letter-spacing: .02em;
}
.monogram--lg { width: 5rem; height: 5rem; font-size: var(--step-2); }
.monogram--chair { background: var(--brand-green); color: #fff; }

.people { list-style: none; display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.person {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius-2);
  background: var(--surface);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.person:hover { border-color: var(--primary-tint-2); background: var(--primary-tint); }
.person__name { font-weight: 600; line-height: 1.25; font-size: calc(var(--step-0) - 1px); }
.person__role { font-size: var(--step--1); color: var(--ink-4); }

/* --------------------------------------------------------------- 10. Устав */
.charter { display: grid; gap: var(--s-7); grid-template-columns: 260px 1fr; align-items: start; }
.charter__toc { position: sticky; top: calc(var(--header-h) + var(--s-5)); }
.charter__toc ol { list-style: none; display: grid; gap: var(--s-1); counter-reset: toc; }
.charter__toc a {
  display: block; padding: var(--s-2) var(--s-3); border-left: 2px solid var(--line);
  font-size: var(--step--1); color: var(--ink-3);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.charter__toc a:hover, .charter__toc a[aria-current="true"] {
  color: var(--primary-strong); border-left-color: var(--brand-green); background: var(--primary-tint);
}

.accordion { border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-5) 0; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.acc__num {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: var(--radius-1); background: var(--surface-3);
  font-size: var(--step--1); font-weight: 700; color: var(--ink-3);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.acc__title { flex: 1; font-size: var(--step-1); font-weight: 600; letter-spacing: -.01em; }
.acc__chev { flex: none; transition: transform var(--base) var(--ease); color: var(--ink-4); }
.acc[data-open="true"] .acc__chev { transform: rotate(180deg); }
.acc[data-open="true"] .acc__num { background: var(--brand-green); color: #fff; }
.acc__btn:hover .acc__title { color: var(--primary-strong); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--base) var(--ease); }
.acc[data-open="true"] .acc__panel { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__text { padding-bottom: var(--s-6); max-width: 68ch; color: var(--ink-2); }
.acc__text p { margin-bottom: var(--s-3); }

/* ------------------------------------------------------------ 11. Хроника */
.chronicle { display: grid; gap: var(--s-7); grid-template-columns: 1fr; }

.pulse {
  display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-3);
  background: var(--surface-2);
}
.pulse__item { display: grid; gap: var(--s-2); }
.pulse__value { font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.pulse__label { font-size: var(--step--1); color: var(--ink-4); }
.pulse__bars { display: flex; align-items: flex-end; gap: var(--s-2); height: 46px; }
.pulse__bar { flex: 1; display: grid; gap: var(--s-1); align-content: end; text-align: center; }
.pulse__bar i {
  display: block; border-radius: 3px 3px 0 0; background: var(--brand-green);
  height: var(--h, 4px); opacity: .85;
  transition: height var(--slow) var(--ease);
}
.pulse__bar span { font-size: var(--step--2); color: var(--ink-4); }

.controls {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center;
  padding-block: var(--s-4);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.search { position: relative; flex: 1 1 16rem; min-width: 12rem; }
.search input {
  width: 100%; padding: 0.7em 2.6em 0.7em 2.6em; font: inherit; font-size: var(--step--1);
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--ink); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); outline: none; }
.search__icon { position: absolute; left: 0.9em; top: 50%; transform: translateY(-50%); color: var(--ink-4); }
.search__hint {
  position: absolute; right: 0.7em; top: 50%; transform: translateY(-50%);
  font-size: var(--step--2); color: var(--ink-4); border: 1px solid var(--line);
  border-radius: var(--radius-1); padding: 1px 6px; pointer-events: none;
}
.search input:focus ~ .search__hint { opacity: 0; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.5em 0.95em; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--step--1);
  font-weight: 600; cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease),
    color var(--fast) var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary-strong); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__count { font-size: var(--step--2); opacity: .65; font-weight: 600; }

.result-line { font-size: var(--step--1); color: var(--ink-4); margin-left: auto; white-space: nowrap; }

.timeline { margin-top: var(--s-7); }

/* Каждый год — отдельная сетка, а не общая на всю ленту. Иначе липкий заголовок
   года остаётся приклеенным за пределами своих событий и наезжает на следующий:
   у sticky-элемента область прилипания — его собственная ячейка сетки. */
.timeline__group { display: grid; grid-template-columns: 92px 1fr; gap: 0 var(--s-6); }
.timeline__group[hidden] { display: none; }
.timeline__year {
  grid-column: 1; position: sticky; top: calc(var(--header-h) + 4.5rem); align-self: start;
  padding-top: var(--s-5); margin: 0;
  font-size: var(--step-2); font-weight: 800; letter-spacing: -.03em; color: var(--ink-4);
}
.timeline__items { grid-column: 2; position: relative; display: grid; gap: var(--s-5);
  padding-bottom: var(--s-8); }
.timeline__items::before {
  content: ""; position: absolute; left: calc(-1 * var(--s-6) / 2 - 1px); top: var(--s-6); bottom: 0;
  width: 2px; background: linear-gradient(180deg, var(--line), transparent);
}

.event {
  position: relative; display: grid; grid-template-columns: 15rem 1fr; gap: var(--s-5);
  padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius-3);
  background: var(--surface);
  transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease),
    border-color var(--base) var(--ease), opacity var(--slow) var(--ease);
}
.event::before {
  content: ""; position: absolute; left: calc(-1 * var(--s-6) / 2 - 5px); top: var(--s-7);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand-green);
  transition: transform var(--base) var(--ease), background var(--base) var(--ease);
}
.event:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.event:hover::before { background: var(--brand-green); transform: scale(1.25); }
.event__media { overflow: hidden; border-radius: var(--radius-2); background: var(--surface-3);
  aspect-ratio: 3 / 2; }
.event__media img { width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--slow) var(--ease); }
.event:hover .event__media img { transform: scale(1.05); }
.event__body { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-2) var(--s-3) var(--s-3) 0; }
.event__title { font-size: var(--step-2); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.event__excerpt { color: var(--ink-3); font-size: calc(var(--step-0) - 1px); max-width: 62ch; }
.event__more { margin-top: auto; font-size: var(--step--1); font-weight: 600; color: var(--primary-strong);
  display: inline-flex; align-items: center; gap: var(--s-2); }
.event__link::after { content: ""; position: absolute; inset: 0; }
.event[hidden] { display: none; }

.tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.2em 0.7em; border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--ink-3);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.tag--green { background: var(--primary-tint); color: var(--primary-strong); }
.tag--blue { background: var(--info-tint); color: var(--info); }
.date { font-size: var(--step--1); color: var(--ink-4); font-variant-numeric: tabular-nums; }

.empty {
  padding: var(--s-9) var(--s-5); text-align: center; color: var(--ink-4);
  border: 1px dashed var(--line); border-radius: var(--radius-3);
}

/* ------------------------------------------------------- 12. Страница события */
.post { padding-block: var(--s-7) var(--s-10); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2);
  font-size: var(--step--1); color: var(--ink-4); margin-bottom: var(--s-5); }
.crumbs a:hover { color: var(--primary-strong); }
.post__head { max-width: 46rem; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.post h1 { font-size: var(--step-4); }
.post__lead { margin-top: var(--s-5); font-size: var(--step-1); color: var(--ink-3); max-width: 60ch; }
.post__body { margin-top: var(--s-7); max-width: 40rem; font-size: var(--step-1); color: var(--ink-2); }
.post__body p { margin-bottom: var(--s-5); }
.post__body a { color: var(--info); text-decoration: underline; text-underline-offset: 3px; }

.post__source { margin-top: var(--s-6); }

.gallery { margin-top: var(--s-7); }
.gallery__stage {
  position: relative; border-radius: var(--radius-3); overflow: hidden; background: var(--surface-3);
  aspect-ratio: 3 / 2;              /* пропорция исходных снимков — кадр почти не режется */
  max-height: 74vh;
}
.gallery__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity var(--base) var(--ease);
}
.gallery__slide[data-active="true"] { opacity: 1; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow-2); transition: transform var(--fast) var(--ease);
}
.gallery__nav:hover { transform: translateY(-50%) scale(1.06); }
.gallery__nav--prev { left: var(--s-4); }
.gallery__nav--next { right: var(--s-4); }
.gallery__counter {
  position: absolute; right: var(--s-4); bottom: var(--s-4); z-index: 2;
  padding: 0.25em 0.7em; border-radius: var(--radius-pill);
  background: rgba(13,22,17,.65); color: #fff; font-size: var(--step--1);
  font-variant-numeric: tabular-nums; backdrop-filter: blur(6px);
}
.gallery__thumbs { display: flex; gap: var(--s-2); margin-top: var(--s-3); overflow-x: auto; padding-bottom: var(--s-2); }
.gallery__thumb {
  flex: none; width: 84px; aspect-ratio: 3 / 2; border-radius: var(--radius-1); overflow: hidden;
  border: 2px solid transparent; background: none; padding: 0; cursor: pointer;
  transition: border-color var(--fast) var(--ease), opacity var(--fast) var(--ease); opacity: .6;
}
.gallery__thumb[aria-selected="true"] { border-color: var(--brand-green); opacity: 1; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.post__foot {
  margin-top: var(--s-9); padding-top: var(--s-6); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; align-items: center;
}
.pager { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-top: var(--s-6); }
.pager__item {
  display: grid; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--line);
  border-radius: var(--radius-2); transition: border-color var(--fast) var(--ease),
    background var(--fast) var(--ease);
}
.pager__item:hover { border-color: var(--primary-tint-2); background: var(--primary-tint); }
.pager__dir { font-size: var(--step--1); color: var(--ink-4); }
.pager__title { font-weight: 600; line-height: 1.3; }
.pager__item--next { text-align: right; }

/* ------------------------------------------------------------ 13. Появление */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal[data-shown="true"] {
  opacity: 1; transform: none;
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------ 14. Адаптив */
/* Между 1080 и 1240 подпись под названием и меню в строку уже не уживаются —
   подпись убираем, название оставляем одной строкой. */
@media (max-width: 1240px) {
  .brand__sub { display: none; }
  .nav { gap: 0; }
  .nav__link { padding-inline: var(--s-2); }
}

/* Шесть пунктов меню перестают помещаться раньше, чем ломается вёрстка страниц,
   поэтому бургер включается на 1080, а перестроение блоков — ниже. */
@media (max-width: 1080px) {
  :root { --header-h: 60px; }
  .burger { display: inline-grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 90;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-4) var(--s-5) var(--s-6);
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
  }
  .nav[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding: var(--s-4) var(--s-2); font-size: var(--step-0);
    border-bottom: 1px solid var(--line-2); }
  .nav__link::after { display: none; }

  .about, .board { grid-template-columns: 1fr; }
  .chair { position: static; }
  .charter { grid-template-columns: 1fr; }
  .charter__toc { display: none; }
}

@media (max-width: 860px) {
  .event { grid-template-columns: 1fr; }
  .event::before { display: none; }
  .timeline__group { grid-template-columns: 1fr; gap: var(--s-4); }
  .timeline__year { position: static; padding-top: var(--s-6); }
  .timeline__items::before { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .about__badge { position: static; max-width: none; margin-top: var(--s-4); }
  .controls { position: static; }
  .result-line { margin-left: 0; }
}

/* --------------------------------------------------------------- 15. Печать */
@media print {
  .header, .footer, .progress, .controls, .gallery__nav, .gallery__thumbs,
  .btn, .pager, .skip-link { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .acc__panel { grid-template-rows: 1fr !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
