/* ==========================================================================
   Публичный сайт федерации. Дизайн-система макета v5.
   Порядок секций: шрифты → токены → база → типографика → утилиты →
   обвязка (шапка, меню, формы, контент, внутренние страницы, подвал).
   ========================================================================== */

/* --- Локальные шрифты (кириллица + латиница), без внешних запросов --- */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bebas-neue-400-latin.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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin.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: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-italic-latin.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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-latin.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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-500-latin.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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-600-latin.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: "IBM Plex Sans Accent";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans Accent";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-700-latin.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: "Oswald";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/oswald-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/oswald-500-latin.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: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/oswald-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/oswald-600-latin.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 {
  /* цвет: светлая часть сайта */
  --bg: #FFFFFF;
  --surface: #F2F2F2;
  --fg: #2F2F2F;
  --fg-soft: rgba(47, 47, 47, 0.64);
  --fg-faint: rgba(47, 47, 47, 0.40);
  --line: rgba(47, 47, 47, 0.16);
  --line-strong: rgba(47, 47, 47, 0.36);

  /* олива — текст и мелкие акценты, лайм — только крупные заливки */
  --accent: #618200;
  --accent-deep: #4C6900;
  --lime: #8DBC00;
  --lime-deep: #7CA600;
  --on-accent: #FFFFFF;
  --on-lime: #2F2F2F;

  /* инверсная (тёмная) шапка и подвал */
  --invert-bg: #2F2F2F;
  --invert-fg: #FFFFFF;
  --invert-soft: rgba(255, 255, 255, 0.66);
  --invert-line: rgba(255, 255, 255, 0.24);

  /* роли шрифтов */
  --font-display: "IBM Plex Sans", "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --font-date: "IBM Plex Sans", "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "PT Mono", Consolas, monospace;

  color-scheme: light;
}

/* --- База --- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0 0 0.75em;
}

p:last-child {
  margin-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

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

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

/* --- Типографика --- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.06;
  letter-spacing: 0.015em;
  color: var(--accent);
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

/* --- Утилиты --- */
.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}

.band {
  padding-block: clamp(48px, 9vw, 120px);
}

.band-feed,
.band-contacts {
  padding-top: 0;
}

.measure {
  max-width: 64ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.8px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

/* Заголовок секции с волосной линией до правого края. */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
  min-width: 0;
}

.sec-head h2 {
  min-width: 0;
  overflow-wrap: break-word;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

.sec-head::after {
  content: "";
  flex: 1;
  min-width: 0;
  height: 1px;
  background: var(--line-strong);
  transform: translateY(-6px);
}

.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;
}

.empty {
  color: var(--fg-soft);
}

/* --- Ссылка «к содержимому» --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  background: var(--bg);
  color: var(--accent-deep);
}

.skip-link:focus {
  left: 16px;
  top: 8px;
}

/* Ссылка всплывает над тёмной шапкой — рамка светлая. */
.skip-link:focus-visible {
  outline-color: var(--invert-fg);
}

/* --- Шапка --- */
.site-header {
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-bottom: 4px solid var(--lime);
}

/* Одна колонка: логотип слева, название справа, ниже — поиск и меню. */
.header-inner {
  display: grid;
  align-items: center;
  padding-block: 5px;
  gap: 6px clamp(16px, 2vw, 32px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  color: var(--invert-fg);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--invert-fg);
  text-decoration: none;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  height: clamp(60px, 8.5vw, 116px);
  width: auto;
  max-width: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  line-height: 1.12;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
  color: var(--invert-fg);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 32px);
  min-width: 0;
}

/* --- Меню: checkbox-паттерн без JavaScript --- */
.main-nav {
  width: 100%;
}

/*
 * Чекбокс визуально скрыт, но остаётся в потоке и в порядке табуляции,
 * чтобы меню можно было открыть с клавиатуры. Без display: none.
 */
#nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid var(--invert-fg);
  outline-offset: 2px;
}

.nav-toggle-label {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--invert-line);
  color: var(--invert-fg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.nav-toggle-label:hover {
  border-color: var(--invert-fg);
}

.main-nav ul {
  display: none;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  border-bottom: 1px solid var(--invert-line);
}

.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--invert-soft);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--invert-fg);
  border-bottom-color: var(--lime);
}

.main-nav a[aria-current="page"] {
  color: var(--invert-fg);
  border-bottom-color: var(--lime);
}

/* --- Десктопное меню: единственный min-width в файле --- */
@media (min-width: 720px) {
  /* Логотип занимает всю высоту шапки, справа — название и меню. */
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "logo name"
      "logo nav";
    align-content: center;
    padding-block: 6px;
  }

  /* Ссылка-бренд растворяется в сетке, чтобы логотип и название
     стали её отдельными ячейками. */
  .brand {
    display: contents;
  }

  .brand-logo {
    grid-area: logo;
  }

  .brand-name {
    grid-area: name;
    justify-self: end;
  }

  .header-bar {
    grid-area: nav;
  }

  #nav-toggle {
    display: none;
  }

  .nav-toggle-label {
    display: none;
  }

  .main-nav {
    width: auto;
    /* Держит девять пунктов в двух строках, как в макете v5. */
    max-width: 30rem;
  }

  .main-nav ul,
  #nav-toggle:checked ~ ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px 14px;
    margin: 0;
  }

  .main-nav li {
    border-bottom: 0;
  }

  .main-nav a {
    display: inline-block;
    padding-block: 5px;
  }
}

/* --- Узкие экраны: шапка в одну колонку, меню раскрывается вниз --- */
@media (max-width: 719.98px) {
  .brand-name {
    white-space: normal;
    text-align: left;
    font-size: clamp(0.95rem, 3.4vw, 1.2rem);
  }

  .header-bar {
    justify-content: space-between;
  }

  .main-nav {
    width: 100%;
    order: 2;
  }

  #nav-toggle:checked ~ ul {
    display: block;
  }

  .main-nav a {
    display: block;
    padding-block: 9px;
  }
}

/* --- Формы: поиск и фильтры внутренних страниц --- */
.site-search,
.document-filters,
.event-filters,
.judge-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  min-width: 0;
}

.site-search,
.document-filters,
.event-filters,
.judge-filters {
  margin: 16px 0 20px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.site-search p,
.document-filters p,
.event-filters p,
.judge-filters p {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.site-search label,
.document-filters label,
.event-filters label,
.judge-filters label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.site-search input[type="search"],
.document-filters input[type="search"],
.document-filters select,
.event-filters select,
.judge-filters input[type="search"],
.judge-filters select {
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.site-search input[type="search"],
.document-filters input[type="search"],
.judge-filters input[type="search"] {
  flex: 1 1 9rem;
}

.site-search button,
.document-filters button,
.event-filters button,
.judge-filters button,
.feedback-form button {
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.site-search button:hover,
.site-search button:focus-visible,
.document-filters button:hover,
.event-filters button:hover,
.judge-filters button:hover,
.feedback-form button:hover,
.document-filters button:focus-visible,
.event-filters button:focus-visible,
.judge-filters button:focus-visible,
.feedback-form button:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* --- Форма обратной связи --- */
.contacts-info {
  max-width: 64ch;
}

.feedback-form {
  margin-top: clamp(32px, 5vw, 48px);
}

.feedback-form form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  max-width: 64ch;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.feedback-form form p {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

/* Последний абзац — кнопка, ей не нужна вся ширина. */
.feedback-form form p:last-child {
  flex: 0 0 auto;
}

.feedback-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.feedback-form textarea {
  min-height: 140px;
  resize: vertical;
}

.feedback-form .success {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

.feedback-form .form-errors,
.feedback-form .field-errors {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
}

.feedback-form .form-errors {
  flex: 1 1 100%;
}

.feedback-form .errorlist {
  margin: 0;
  padding-left: 1.2em;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
}

/* --- Контент --- */
main {
  min-width: 0;
  padding-block: clamp(32px, 5vw, 56px) 0;
}

/* Ссылки в содержимом подчёркнуты, чтобы отличаться не только цветом. */
main a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
}

main a:hover,
main a:focus-visible {
  text-decoration-color: currentColor;
}

/* --- Внутренние страницы --- */
.table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  background: var(--bg);
}

.documents-table,
.events-table,
.judges-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.documents-table th,
.documents-table td,
.events-table th,
.events-table td,
.judges-table th,
.judges-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.documents-table th,
.events-table th,
.judges-table th {
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-soft);
  white-space: nowrap;
}

.documents-table td,
.events-table td,
.judges-table td {
  border-bottom: 1px solid var(--line);
}

.documents-table tbody tr:nth-child(even),
.events-table tbody tr:nth-child(even),
.judges-table tbody tr:nth-child(even) {
  background: var(--surface);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.pagination a {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  text-decoration: none;
}

.pagination a:hover,
.pagination a:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent-deep);
}

.breadcrumbs {
  padding-block: 12px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-soft);
}

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

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* Группы результатов поиска: тот же ритм, что у таблиц и списков. */
.search-summary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.search-group {
  margin-top: clamp(24px, 4vw, 40px);
}

.search-results {
  margin: 0.5em 0 0;
  padding-left: 1.2em;
}

.search-results li {
  margin-bottom: 0.5em;
}

.search-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-soft);
}

.content-page {
  min-width: 0;
}

.content-page .intro {
  max-width: 64ch;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  color: var(--fg-soft);
}

.content-page .body {
  max-width: 72ch;
}

/* Заголовки внутри richtext-текста не должны липнуть к абзацам. */
.body h2,
.body h3 {
  margin-block: 1.1em 0.4em;
}

.attachments {
  margin-top: clamp(24px, 4vw, 40px);
}

.attachments h2 {
  font-size: 1.3rem;
}

.attachments ul {
  padding-left: 1.2em;
}

.attachments li {
  margin-bottom: 0.4em;
}

/* --- Главная: вступление --- */
.hero {
  padding-top: clamp(8px, 1.5vw, 16px);
}

.hero .eyebrow {
  margin-bottom: 4.5px;
}

.hero h1 {
  margin-top: 9px;
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.hero .lead {
  margin-top: 26px;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--fg-soft);
}

.hero .body {
  margin-top: 18px;
}

.hero-links {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.hero-links .announcement-block {
  margin: 0;
}

/* --- Главная: лента объявлений --- */
.announcement-list {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.announcement {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 20px clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 4vw, 40px);
}

.announcement:first-child {
  border-top: 0;
  padding-top: 0;
}

.announcement-when {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

/* День и месяц — только цифры: в Bebas Neue нет кириллицы. */
.announcement-day {
  font-family: var(--font-date);
  font-size: clamp(2.5rem, 4.6vw, 3.1rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.announcement-month {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.announcement--done .announcement-day {
  color: var(--fg-faint);
}

.announcement--done h3 {
  color: var(--fg-soft);
}

.announcement--anons .announcement-day {
  color: var(--accent);
}

.announcement-body {
  min-width: 0;
}

.announcement-body h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.12;
}

/* Логотипы организаторов — подложка под содержимым после заголовка.
   Ряд одинаковых по высоте логотипов прижат вправо и растворяется к краям. */
.announcement-rest {
  position: relative;
  isolation: isolate;
  min-width: 0;
}

.announcement-logos {
  position: absolute;
  inset: -4px -20px;
  z-index: -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 24px);
  overflow: hidden;
  opacity: 0.18;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at 82% 50%, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 92%);
  mask-image: radial-gradient(ellipse 90% 100% at 82% 50%, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 92%);
  pointer-events: none;
}

.announcement-logo {
  display: block;
  height: clamp(40px, 5vw, 64px);
  max-height: 100%;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.announcement-block {
  margin: 0.5rem 0;
}

.announcement-block--lead {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
}

.announcement-block--heading {
  font-size: 1.2rem;
  font-weight: 600;
}

.announcement-block--normal {
  font-size: 1rem;
}

.announcement-block--small {
  font-size: 0.875rem;
  color: var(--fg-soft);
}

.announcement-block--accent {
  color: var(--accent-deep);
  font-family: "IBM Plex Sans Accent", var(--font-body);
  font-weight: 700;
}

.announcement-photo {
  margin: 1rem 0;
}

.announcement-photo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.announcement-photo--wide img {
  width: 100%;
}

.announcement-photo figcaption {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-soft);
}

/* --- Главная: контакты --- */
.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 64ch;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.contact-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.contact-name {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.contact-val {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* --- Узкий экран: карточка ленты в одну колонку --- */
@media (max-width: 620px) {
  .announcement {
    grid-template-columns: minmax(0, 1fr);
  }

  .announcement-when {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
  }

  .announcement-day {
    font-size: 2.6rem;
  }
}

/* --- Подвал --- */
.site-footer {
  margin-top: clamp(48px, 9vw, 120px);
  border-top: 1px solid var(--invert-line);
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: clamp(28px, 4vw, 44px);
  min-width: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.footer-logo {
  display: block;
  flex-shrink: 0;
  width: 52px;
  height: auto;
}

.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--invert-fg);
}

.footer-contact {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--invert-fg);
  text-decoration-color: var(--invert-line);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--lime);
  text-decoration-color: var(--lime);
}

/* На тёмных шапке и подвале фокус-рамка светлая. */
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--invert-fg);
}

/* --- Уважение к prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
