/* ===================================================================
   Помощник классного руководителя
   Оформление: дружелюбная «учительская» система — светлый тёплый фон,
   мягкие скруглённые формы, крупный и спокойный текст, тёплый
   зелёный акцент. Задача — чтобы страницу было приятно читать
   вечером после уроков с телефона, а не ощущение документа.
   =================================================================== */

:root {
  /* тёплая светлая шкала — белее и воздушнее, меньше «бумажной тяжести» */
  --bg: #fbf9f5;
  --bg-tint: #f5f0e8;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --surface-3: #f3eee6;
  --ink: #23201b;
  --ink-2: #4a453d;
  --ink-3: #6d675e;
  --ink-4: #948d83;
  --ink-soft: #6d675e;
  --line: rgba(80, 66, 45, .10);
  --line-2: rgba(80, 66, 45, .18);

  /* акцент: тёплый живой зелёный — дружелюбный, «растущий»,
     без официоза тёмно-бирюзового */
  --accent: #2f8f6b;
  --accent-hover: #26785a;
  --accent-soft: rgba(47, 143, 107, .10);
  --accent-line: rgba(47, 143, 107, .28);

  /* дружелюбные опорные цвета разделов */
  --sun: #d99b3f;
  --sun-soft: rgba(217, 155, 63, .14);
  --rose: #d1748a;
  --rose-soft: rgba(209, 116, 138, .12);
  --sky: #5a9fd4;
  --sky-soft: rgba(90, 159, 212, .12);

  --red: #c05248;
  --red-soft: rgba(192, 82, 72, .09);
  --green: #2f8f6b;
  --green-soft: rgba(47, 143, 107, .10);
  --amber: #c2822a;
  --amber-soft: rgba(194, 130, 42, .11);

  /* скругления мягче — главный сигнал «дружелюбно» в силуэте */
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* тени мягче и светлее: формы «парят», а не лежат под стеклом */
  --shadow-1: 0 1px 2px rgba(80, 66, 45, .04), 0 2px 8px rgba(80, 66, 45, .04);
  --shadow-2: 0 2px 8px rgba(80, 66, 45, .05), 0 12px 32px rgba(80, 66, 45, .06);
  --shadow-3: 0 6px 18px rgba(80, 66, 45, .07), 0 24px 56px rgba(80, 66, 45, .10);

  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.32, .72, 0, 1);
}

* { box-sizing: border-box; }

/* Базовый сброс типографики.
   Без него 73 «голых» <p> в карточках тянут браузерные 1em сверху и снизу,
   из-за чего внутри карточек появляются двойные отступы, а текст,
   следующий за заголовком, «прыгает». Заголовки ниже заданы явно. */
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote {
  margin-top: 0;
}
h1, h2, h3, h4, h5, h6 {
  margin-bottom: .5em;
  text-wrap: balance;
}
p {
  margin-bottom: 1em;
  text-wrap: pretty;
}
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  /* крупнее и «дышит шире»: 17 -> 17.5px, интерлиньяж 1.55 -> 1.65 */
  font-size: 17.5px;
  line-height: 1.65;
  letter-spacing: -.011em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

::selection { background: var(--accent-soft); }

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

/* ==================== Шапка ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 245, .84);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 66px;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 13px; flex-shrink: 0;
  /* тёплый дружелюбный градиент — марка «улыбается», а не давит */
  background: linear-gradient(145deg, #56b98d 0%, var(--accent) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 650; letter-spacing: -.02em;
  box-shadow: 0 3px 10px rgba(47, 143, 107, .26), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.brand-text { line-height: 1.2; }
.brand-title { display: block; font-weight: 650; font-size: 15.5px; letter-spacing: -.012em; color: var(--ink); }
.brand-sub { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: 0; }

.main-nav { margin-left: auto; }
.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 980px;
  font: inherit; font-size: 14.5px; font-weight: 550;
  padding: 8px 17px; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.nav-toggle:hover { background: var(--accent-soft); border-color: var(--accent-line); }

.nav-list {
  display: flex; gap: 3px; list-style: none; margin: 0; padding: 0;
}
.nav-list a {
  display: block; padding: 7px 13px; border-radius: 980px;
  font-size: 14px; font-weight: 550; color: var(--ink-2);
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-list a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.nav-list a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(47, 143, 107, .25);
}

/* ==================== Типографика страниц ==================== */
/* Внутренние страницы: мягкое свечение сверху, как у главной,
   чтобы переход между разделами не выглядел обрывом стиля. */
.page-head {
  position: relative;
  padding: 64px 0 20px;
  isolation: isolate;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(900px 300px at 8% -20%, var(--accent-soft), transparent 62%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  pointer-events: none;
}

.eyebrow {
  display: inline-block; margin: 0 0 14px;
  font-size: 12px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 980px;
  padding: 5px 14px;
}

.page-head h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -.026em;
  font-weight: 700;
  color: var(--ink);
}
.page-head .lead {
  margin: 0; max-width: 720px;
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.6;
  color: var(--ink-3);
  letter-spacing: -.012em;
}

/* ==================== Hero ==================== */
/* Главный экран: тёплая подложка и мягкое свечение — страница
   начинается с приветствия, а не с плоского поля. */
.hero {
  position: relative;
  padding: 80px 0 38px;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 400px at 10% -12%, var(--accent-soft), transparent 64%),
    radial-gradient(760px 320px at 94% 0%, var(--sun-soft), transparent 62%),
    radial-gradient(600px 300px at 55% 8%, var(--sky-soft), transparent 65%);
  -webkit-mask-image: linear-gradient(to bottom, #000 64%, transparent);
  mask-image: linear-gradient(to bottom, #000 64%, transparent);
  pointer-events: none;
}
.hero-text { max-width: 820px; }
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
}
.hero p.lead {
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.62;
  color: var(--ink-3);
  letter-spacing: -.013em;
  max-width: 640px;
}

/* ==================== Секции ==================== */
section.block { padding: 52px 0; }
/* чередующиеся секции получают тёплую подложку — страница
   ритмично делится на блоки; границы убраны, только мягкий переход */
section.block:nth-of-type(even) {
  background: var(--bg-tint);
  border-radius: var(--r-xl);
  margin: 0 -8px;
  padding: 52px 8px;
}

.section-title {
  position: relative;
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -.022em;
  font-weight: 700;
  color: var(--ink);
}
/* мягкая круглая «капля» вместо строгой вертикальной черты */
.section-title::before {
  content: "";
  position: absolute; left: 0; top: .22em;
  width: 7px; height: .7em;
  border-radius: 4px;
  background: linear-gradient(180deg, #56b98d, var(--accent));
}
.section-sub {
  margin: 0 0 26px;
  padding-left: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-3);
  letter-spacing: -.01em;
  max-width: 720px;
}

h3.sub-title {
  margin: 34px 0 12px;
  font-size: 19.5px; font-weight: 650; letter-spacing: -.015em;
  color: var(--ink);
}
h4.mini-title, h3.mini-title {
  margin: 20px 0 9px;
  font-size: 16.5px; font-weight: 650; letter-spacing: -.012em;
  color: var(--ink);
}

/* ==================== Карточки ==================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-2);
}
.card + .card { margin-top: 18px; }
.card > h2, .card > h3 { margin-top: 0; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); }

/* Карточки в одной строке сетки выравниваются по высоте —
   иначе ряды выглядят «рваными» из-за разной длины текста. */
.grid > .card { height: 100%; }

/* ==================== Карточки разделов ==================== */
.section-cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  counter-reset: sec;
}
.section-card {
  counter-increment: sec;
  position: relative;
  display: flex; flex-direction: column; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 22px;
  color: inherit;
  box-shadow: var(--shadow-2);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  overflow: hidden;
}
/* «шапка» карточки с лёгким тонированным градиентом —
   у каждого раздела свой оттенок, сетка читается как каталог */
.section-card::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 5px;
  background: var(--accent);
  transition: height .3s var(--ease);
}
.section-card:nth-child(3n+2)::after { background: var(--sun); }
.section-card:nth-child(3n+3)::after { background: var(--rose); }

/* мягкое цветное свечение в углу — «тепло» без декоративного шума */
.section-card::before {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--accent-soft);
  opacity: .9;
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}
.section-card:nth-child(3n+2)::before { background: var(--sun-soft); }
.section-card:nth-child(3n+3)::before { background: var(--rose-soft); }

.section-card:hover {
  text-decoration: none;
  transform: translateY(-5px);
  box-shadow: var(--shadow-3);
  border-color: var(--line-2);
}
.section-card:hover::before { transform: scale(1.25); opacity: 1; }

.section-card .num {
  position: relative;
  display: inline-block; align-self: flex-start;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 980px;
  padding: 3px 11px;
  margin-bottom: 2px;
}
.section-card:nth-child(3n+2) .num { color: #a9721f; background: var(--sun-soft); }
.section-card:nth-child(3n+3) .num { color: #ad566b; background: var(--rose-soft); }
.section-card h3 {
  position: relative;
  margin: 0; font-size: 19px; font-weight: 650;
  letter-spacing: -.018em; line-height: 1.32; color: var(--ink);
}
.section-card p {
  position: relative;
  margin: 0; font-size: 15px; line-height: 1.6;
  color: var(--ink-3); flex: 1;
}
.section-card .go {
  position: relative;
  font-size: 14.5px; font-weight: 650; color: var(--accent);
  margin-top: 8px;
}
.section-card .go::after {
  content: " →";
  transition: margin-left .3s var(--ease);
  display: inline-block;
}
.section-card:hover .go::after { margin-left: 4px; }

/* ==================== Списки ==================== */
ul.ticks, ol.steps, ul.plain, ul.checklist { margin: 12px 0 16px; padding-left: 0; list-style: none; }

ul.ticks li, ul.plain li, ol.steps li {
  position: relative; padding-left: 28px; margin-bottom: 10px;
  color: var(--ink-2); line-height: 1.6;
}
ul.plain li { padding-left: 20px; }
ul.plain li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4);
}

/* галочка в мягком зелёном кружке — дружелюбнее, чем голый штрих */
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
}
ul.ticks li::after {
  content: ""; position: absolute; left: 5px; top: .62em;
  width: 8px; height: 4px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

ol.steps { counter-reset: step; }
ol.steps li { padding-left: 38px; counter-increment: step; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .08em;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
ul.ticks li > ul.plain, ol.steps li > ol.steps, ul.plain li > ul.plain { margin-top: 10px; }

/* ==================== Чек-лист ==================== */
ul.checklist { margin: 6px 0 0; }
ul.checklist li {
  position: relative; padding-left: 38px; margin-bottom: 4px;
  padding-top: 11px; padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  transition: color .2s var(--ease);
}
ul.checklist li:last-child { border-bottom: none; }
ul.checklist li::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 22px; height: 22px;
  border: 1.8px solid var(--line-2); border-radius: 8px;
  background: var(--surface);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
ul.checklist li[data-id] {
  cursor: pointer; user-select: none;
  border-radius: 10px; padding-left: 38px;
}
ul.checklist li[data-id]:hover { background: var(--accent-soft); }
ul.checklist li[data-id]:hover::before { border-color: var(--accent); }
ul.checklist li[data-id]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
ul.checklist li.done { color: var(--ink-4); }
ul.checklist li.done::before {
  background: var(--accent); border-color: var(--accent);
}
ul.checklist li.done::after {
  content: ""; position: absolute; left: 6px; top: 19px;
  width: 10px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
ul.checklist li.done > span {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-4);
}

/* ==================== Плашки ==================== */
/* Акцентная плашка получает боковую полосу — так важное сообщение
   видно при быстром просмотре, а не сливается с карточками. */
.callout {
  position: relative;
  border-radius: var(--r);
  padding: 16px 19px 16px 22px;
  margin: 22px 0;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-left-width: 4px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); font-weight: 650; }
.callout.warn {
  background: var(--red-soft);
  border-color: rgba(192, 82, 72, .26);
  border-left-color: var(--red);
}
.callout.ok {
  background: var(--green-soft);
  border-color: rgba(47, 143, 107, .28);
  border-left-color: var(--green);
}

/* текстовая ссылка-действие в карточках */
.card a:not(.btn)::after {
  content: " →";
  display: inline-block;
  transition: transform .25s var(--ease);
}
.card a:not(.btn):hover::after { transform: translateX(3px); }

.pill {
  display: inline-block;
  font-size: 13.5px; font-weight: 550;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid transparent;
  border-radius: 980px;
  padding: 4px 12px;
  margin: 0 6px 6px 0;
}
.pill.blue { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

/* ==================== Таблицы ==================== */
/* Таблица прокручивается по горизонтали внутри своей рамки.
   Прилипающая шапка работает только если у обёртки ограничена высота,
   иначе sticky «прилипает» к самому контейнеру и незаметна — поэтому
   шапку держим обычной, но с фоном, чтобы не просвечивал текст. */
.table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin: 18px 0;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 15px; min-width: 540px;
  letter-spacing: -.008em;
}
table.data th, table.data td {
  padding: 13px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.55;
}
table.data th strong, table.data td strong { color: var(--ink); font-weight: 650; }
table.data thead th {
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 13px; font-weight: 650;
  letter-spacing: .01em; text-transform: none;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--accent-soft); }

/* Ширины колонок распределяются по содержимому, а не по
   захардкоженным процентам: длинные текстовые колонки забирают
   остаток места, короткие («Срочно», «Причина») — по минимуму. */
table.data { table-layout: auto; }
table.data td, table.data th { word-break: break-word; }

/* Колонка-ярлык (первая ячейка строки) в «паспортных» таблицах
   растягивается по содержимому, а не съедает место у текста. */
table.data th[scope="row"],
table.data tbody th {
  color: var(--ink); font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}

/* Содержимое обычной карточки: длинные абзацы не липнут к краям,
   а первые/последние элементы не дают двойных отступов. */
.card > p { margin: 0 0 12px; color: var(--ink-2); }
.card > p:last-child { margin-bottom: 0; }
.card > ul.plain, .card > ol.steps, .card > ul.ticks { margin-bottom: 0; }

/* ==================== Аккордеон ==================== */
details.acc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
details.acc[open] { box-shadow: var(--shadow-1); }
details.acc > summary {
  cursor: pointer; list-style: none;
  padding: 14px 44px 14px 18px;
  font-weight: 600; font-size: 16px;
  letter-spacing: -.012em;
  color: var(--ink);
  position: relative;
  transition: background .2s var(--ease);
}
details.acc > summary:hover { background: var(--surface-2); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after {
  content: "";
  position: absolute; right: 19px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.8px solid var(--ink-4);
  border-bottom: 1.8px solid var(--ink-4);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .3s var(--ease);
}
details.acc[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}
details.acc .acc-body {
  padding: 2px 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}
details.acc .acc-body > *:first-child { margin-top: 14px; }

/* ==================== Файлы для скачивания ==================== */
.dl-card {
  display: flex; gap: 15px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 17px;
  box-shadow: var(--shadow-1);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.dl-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.dl-icon {
  flex-shrink: 0;
  width: 42px; height: 50px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  color: #fff;
  font-family: var(--mono);
  border: 1px solid rgba(0, 0, 0, .08);
}
.dl-icon.pdf { background: #c9271f; }
.dl-icon.docx { background: #1a5fa8; }
.dl-icon.png { background: #2f7d4f; }
.dl-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start;
}
.dl-body h4 {
  margin: 0 0 4px; font-size: 15.5px; font-weight: 600;
  letter-spacing: -.014em; line-height: 1.3; color: var(--ink);
}
.dl-body p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.dl-meta {
  font-size: 12px; color: var(--ink-4);
  margin-bottom: 11px; letter-spacing: 0;
}
/* Две кнопки в карточке файла (PDF + PNG): на узком экране — в столбик,
   от 420px — в строку. Инлайновые margin-left из разметки убраны:
   они заставляли вторую кнопку «прилипать» при переносе. */
.dl-body > .btn + .btn { margin-top: 8px; }
.dl-body > .btn:first-of-type { margin-top: auto; }
@media (min-width: 420px) {
  .dl-body > .btn + .btn { margin-left: 8px; }
}

/* ==================== Кнопки ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600; font-size: 15px;
  letter-spacing: -.01em; line-height: 1.3;
  text-align: center;
  padding: 11px 22px;
  border-radius: 980px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease),
              box-shadow .2s var(--ease);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(47, 143, 107, .22);
}
.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(47, 143, 107, .3);
}
.btn:active { transform: scale(.98); }
.btn.ghost {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent-line);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  transform: translateY(-1px);
}

/* ==================== Печатные шаблоны ==================== */
.print-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.print-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 12px 15px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.print-item:hover { box-shadow: var(--shadow-3); transform: translateY(-3px); }
.print-item img {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.print-item p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.print-item p strong { color: var(--ink); font-weight: 650; font-size: 14.5px; }
.print-item .print-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.print-item .print-actions .btn { font-size: 13.5px; padding: 8px 16px; }

/* ==================== Новости ==================== */
.news-item {
  display: grid; grid-template-columns: 190px 1fr; gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
  margin-bottom: 16px;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.news-item:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.news-photo {
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  background: var(--surface-3);
  min-height: 130px;
  display: grid; place-items: center;
  color: var(--ink-4);
  font-size: 13px; font-weight: 550;
  padding: 10px;
}
.news-date {
  display: inline-block;
  font-size: 12.5px; font-weight: 650; color: var(--accent);
  background: var(--accent-soft);
  border-radius: 980px;
  padding: 2px 11px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.news-item h3 {
  margin: 0 0 8px; font-size: 18px; font-weight: 650;
  letter-spacing: -.016em; color: var(--ink);
}
.news-item p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-3); }

/* ==================== Правила класса ==================== */
.rules-banner {
  display: grid; grid-template-columns: 280px 1fr; gap: 26px; align-items: start;
}
.rules-banner img {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  position: sticky; top: 88px;
}

/* ==================== Поиск и оглавление ==================== */
.search-bar {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 980px;
  padding: 7px 8px 7px 18px;
  box-shadow: var(--shadow-2);
  margin: 0 0 18px;
  max-width: 720px;
}
.search-bar input[type="search"] {
  flex: 1; min-width: 200px;
  font: inherit; font-size: 15px;
  letter-spacing: -.01em;
  padding: 10px 4px;
  border: none;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease),
              box-shadow .2s var(--ease);
}
.search-bar input[type="search"]::placeholder { color: var(--ink-4); }
.search-bar input[type="search"]:focus {
  outline: none;
  box-shadow: none;
}
.search-bar:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-2);
}
.search-bar .small-btn {
  font: inherit; font-size: 14px; font-weight: 550;
  cursor: pointer;
  background: var(--accent); color: #fff;
  border: 1px solid transparent;
  border-radius: 980px;
  padding: 9px 20px;
  transition: background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.search-bar .small-btn:hover { background: var(--accent-hover); color: #fff; }
/* Служебные кнопки рядом с поиском («Развернуть все», «Свернуть все»)
   — вторичные: акцентной остаётся одна кнопка на строку. */
.search-bar .small-btn:not(#searchGo) {
  background: var(--surface-3);
  color: var(--ink-2);
  border-color: var(--line);
  font-weight: 500;
}
.search-bar .small-btn:not(#searchGo):hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line-2);
}
#searchEmpty {
  display: none; padding: 30px 20px; text-align: center;
  color: var(--ink-4); font-size: 15px;
}

/* результаты поиска по сайту */
.search-results {
  display: none;
  margin-top: -6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  max-width: 720px;
}
.search-results.open { display: block; }
.sr-item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background .15s var(--ease);
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--accent-soft); text-decoration: none; }
.sr-item:hover .sr-title { color: var(--accent); }
.sr-title { font-size: 15.5px; font-weight: 550; letter-spacing: -.01em; }
.sr-desc {
  flex-shrink: 0;
  font-size: 12.5px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.sr-empty {
  padding: 20px 18px;
  font-size: 15px; color: var(--ink-4);
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 22px 0;
  box-shadow: var(--shadow-1);
}
.toc h2 {
  margin: 0 0 12px;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent);
}
.toc ol {
  margin: 0; padding-left: 20px;
  columns: 2; column-gap: 36px;
}
.toc li { margin-bottom: 7px; font-size: 15px; break-inside: avoid; line-height: 1.5; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ==================== Футер ==================== */
.site-footer {
  margin-top: 72px;
  padding: 44px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-4);
  font-size: 14px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 20px 36px;
  justify-content: space-between; align-items: flex-start;
  line-height: 1.7;
}
.footer-inner strong { color: var(--ink); font-weight: 650; font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a {
  color: var(--ink-3); font-size: 14px;
  transition: color .2s var(--ease);
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ==================== Кнопка «наверх» ==================== */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2);
  cursor: pointer;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink-2);
  font-size: 15px;
  display: grid; place-items: center;
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); background: #fff; }

/* ==================== Адаптив ==================== */
@media (max-width: 860px) {
  .header-inner { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-list {
    display: none;
    position: absolute; left: -24px; right: -24px; top: 100%;
    background: rgba(251, 249, 245, .97);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    padding: 10px 16px 16px;
    flex-direction: column; gap: 2px;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 13px 14px; font-size: 16px; border-radius: 12px; }
  /* в мобильном меню активный пункт тоже заливкой — заметнее */
  .nav-list a.active { background: var(--accent); color: #fff; box-shadow: none; }
}

@media (max-width: 980px) {
  .rules-banner { grid-template-columns: 1fr; }
  .rules-banner img { position: static; max-width: 320px; }
  .news-item { grid-template-columns: 1fr; gap: 16px; }
  .news-photo { min-height: 100px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  body { font-size: 17px; }
  .page-head { padding: 40px 0 10px; }
  .hero { padding: 44px 0 14px; }
  .card { padding: 20px; }
  section.block { padding: 34px 0; }
  section.block:nth-of-type(even) { margin: 0; padding: 34px 0; border-radius: 0; }
  .section-cards { gap: 14px; }
  .section-card { padding: 22px 20px 20px; }
  .toc ol { columns: 1; }
  .to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .brand-sub { display: none; }
  /* карточка файла остаётся в строку (иконка + текст) и на телефоне —
     иконка лишь чуть меньше; так заголовок и кнопка не «разваливаются» */
  .dl-card { gap: 13px; }
  .dl-icon { width: 38px; height: 45px; }
  /* кнопки на всю ширину — крупная зона нажатия на телефоне */
  .search-bar .small-btn { flex: 1; }
  .dl-actions .btn, .dl-body > .btn { max-width: 100%; }
  .print-actions .btn { flex: 1; }
  .callout { padding: 15px 16px 15px 18px; }
}

/* ==================== Доступность ==================== */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==================== Печать ==================== */
@media print {
  .site-header, .site-footer, .to-top, .btn, .no-print, .search-bar { display: none !important; }
  body { background: #fff; font-size: 11pt; color: #000; }
  /* декоративные подложки, свечения и цветные полосы на бумаге не нужны */
  .hero::before, .page-head::before { display: none !important; }
  .section-card::before, .section-card::after,
  .section-title::before { display: none !important; }
  section.block:nth-of-type(even) { background: #fff; border: 0; margin: 0; padding: 34px 0; border-radius: 0; }
  .section-card { box-shadow: none; border-color: #d0d0d0; transform: none; }
  .card, .dl-card, .print-item, .news-item { box-shadow: none; border-color: #d0d0d0; page-break-inside: avoid; }
  .news-date { background: none; padding: 0; }
  details.acc { border-color: #d0d0d0; page-break-inside: avoid; }
  details.acc:not([open]) .acc-body { display: block; }
  details.acc > summary::after { display: none; }
  a { color: #000; text-decoration: none; }
}
