/* =========================================================================
   Гайд по Standoff 2 — единственный стиль сайта.
   Направление: «полевой справочник» — тёплая бумага, графитная краска,
   волосяные линейки, нумерованные разделы, таблица как главный герой.
   Один горячий акцент (охра) + холодный контрапункт (сине-зелёный) для
   разведения сторон на схемах карт.
   ========================================================================= */

/* --- Шрифт: самохостинг, вариативное начертание, OFL-1.1 ---------------- */
/* Golos Text Variable · © 2019 The Golos Text Project Authors · SIL OFL 1.1
   Лицензия целиком — /assets/fonts/OFL.txt                                 */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic-var.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/golos-text-latin-var.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 {
  color-scheme: light dark;

  --ground: #f5f0e6;
  --surface: #fffdf8;
  --surface-2: #ece4d5;
  --ink: #1a1815;
  --ink-2: #5d564a;
  --ink-3: #6f6759;
  --rule: #dcd2be;
  --rule-strong: #b9ac93;
  --accent: #ab420b;
  --accent-ink: #ffffff;
  --accent-wash: #f6e3d2;
  --cool: #1f5b67;
  --cool-wash: #d9e8ea;
  --dot: rgb(26 24 21 / 8%);
  --edge-shadow: rgb(26 24 21 / 17%);
  --shadow: 0 1px 0 rgb(26 24 21 / 6%), 0 12px 28px -22px rgb(26 24 21 / 45%);

  --measure: 44rem;
  --header-h: 7.25rem;
  --gutter: clamp(1.05rem, 4.5vw, 3rem);

  --step-body: 1.0625rem;
  --lh-body: 1.68;
}

@media (min-width: 40em) {
  :root {
    --header-h: 4.25rem;
    --step-body: 1.125rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #131210;
    --surface: #1b1916;
    --surface-2: #24211c;
    --ink: #ece4d5;
    --ink-2: #a79d8c;
    --ink-3: #99907f;
    --rule: #332f28;
    --rule-strong: #4c463b;
    --accent: #ef9143;
    --accent-ink: #1a1815;
    --accent-wash: #33251a;
    --cool: #6cbccb;
    --cool-wash: #16292e;
    --dot: rgb(236 228 213 / 7%);
    --edge-shadow: rgb(0 0 0 / 55%);
    --shadow: 0 1px 0 rgb(0 0 0 / 30%), 0 14px 30px -22px rgb(0 0 0 / 80%);
  }
}

/* --- База --------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-size: var(--step-body);
  line-height: var(--lh-body);
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

:where(a) {
  color: var(--accent);
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

:where(a:hover) {
  text-decoration-thickness: 0.16em;
}

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

/* Липкая шапка не должна накрывать элемент, на который пришёл фокус с клавиатуры. */
:where(a, summary, button, [tabindex]) {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  touch-action: manipulation;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin: 0;
}

p,
ul,
ol {
  margin: 0;
}

/* max() с env() — чтобы на телефоне с вырезом в альбомной ориентации
   текст не уезжал под скруглённый угол экрана. */
.shell {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

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

/* --- Шапка -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-block: 0.7rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  width: fit-content;
}

.brand-mark {
  color: var(--accent);
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text b {
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
}

.brand-text i {
  font-style: normal;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.16rem;
}

.site-nav {
  margin-inline: calc(-1 * var(--gutter));
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  padding: 0 var(--gutter);
  margin: 0;
}

.site-nav a {
  display: block;
  white-space: nowrap;
  padding: 0.75rem 0.7rem;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a.is-quiet {
  font-weight: 500;
}

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

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Индикатор прочитанного — чистый CSS, без скриптов.
   Браузеры без scroll-timeline просто не показывают полосу. */
.progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  scale: 0 1;
}

@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress-grow linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes progress-grow {
  from {
    scale: 0 1;
  }
  to {
    scale: 1 1;
  }
}

@media (min-width: 40em) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 0;
    min-height: var(--header-h);
  }

  /* Начиная с волны 2 пунктов меню больше, чем помещается рядом с брендом:
     на 1280 они укладываются, между 40em и ~55em — нет. Прокручиваемая строка
     остаётся включённой и здесь (тот же приём, что на телефоне), иначе страница
     едет вбок. `min-width: 0` обязателен: flex-элемент без него не сжимается
     ниже ширины содержимого, а `flex: none` у бренда не даёт схлопнуть его
     вместо навигации. */
  .brand {
    flex: none;
  }

  .site-nav {
    margin-inline: 0;
    min-width: 0;
  }

  .site-nav ul {
    padding: 0;
    gap: 0.15rem;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: var(--header-h);
    padding-inline: 0.55rem;
    border-bottom-width: 3px;
  }
}

/* --- Общая раскладка страницы ------------------------------------------ */

main:focus {
  outline: none;
}

.page {
  padding-block: 1.5rem 4rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.55rem;
  color: var(--rule-strong);
}

.crumbs a {
  color: var(--ink-3);
  text-decoration: none;
}

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

.page-head {
  max-width: 46rem;
  margin-bottom: 2.25rem;
}

.page-head h1 {
  font-size: clamp(2rem, 1.35rem + 3.1vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.033em;
}

.audience {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.audience-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
  border-radius: 50%;
  flex: none;
}

.lead {
  margin-top: 1.1rem;
  font-size: clamp(1.075rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Порядок чтения на телефоне: «Коротко» → оглавление → текст.
   На широком экране оглавление уезжает в правую колонку и залипает. */
.page-body {
  display: grid;
  gap: 2.25rem;
}

.brief {
  order: 1;
  max-width: var(--measure);
}

.page-aside {
  order: 2;
  max-width: var(--measure);
}

.page-main {
  order: 3;
  min-width: 0;
  max-width: var(--measure);
}

@media (min-width: 74em) {
  .page-body {
    grid-template-columns: minmax(0, var(--measure)) minmax(13rem, 1fr);
    column-gap: 4.5rem;
    row-gap: 2.5rem;
    align-items: start;
  }

  .brief {
    grid-column: 1;
    grid-row: 1;
  }

  .page-main {
    grid-column: 1;
    grid-row: 2;
  }

  .page-aside {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

/* --- Блок «Коротко» ----------------------------------------------------- */

.brief {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 2px 12px 12px 2px;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
}

.brief ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.985rem;
  line-height: 1.55;
}

/* Маркер рисуется абсолютно, а не колонкой grid: внутри пункта бывают ссылки,
   а любой элемент-потомок grid-контейнера стал бы отдельным grid-элементом. */
.brief li {
  position: relative;
  padding-left: 1.35rem;
}

.brief li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--accent);
  rotate: 45deg;
}

/* --- Оглавление --------------------------------------------------------- */

.toc {
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
}

.toc ol {
  counter-reset: toc;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.05rem;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: grid;
  grid-template-columns: 1.55rem 1fr;
  gap: 0.35rem;
  padding: 0.42rem 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.12em;
}

.toc a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

/* --- Тело статьи -------------------------------------------------------- */

.prose {
  counter-reset: sec;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2 {
  counter-increment: sec;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: baseline;
  margin-top: 3rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.35rem, 1.15rem + 1.05vw, 1.85rem);
  font-weight: 800;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.075rem;
  font-weight: 700;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.prose p {
  text-wrap: pretty;
}

/* :where() держит специфичность на уровне .prose — иначе списки статьи
   переопределяют собственные стили компонентов, которые в неё вкладываются
   (легенда схемы карты). Компонент со своим классом должен выигрывать. */
.prose :where(ul, ol) {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
}

.prose :where(li)::marker {
  color: var(--accent);
  font-weight: 700;
}

.prose :where(li) > :where(ul, ol) {
  margin-top: 0.5rem;
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  margin-inline: 0;
  padding: 1rem 1.15rem;
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  border-radius: 2px 8px 8px 2px;
  font-size: 0.975rem;
}

.prose blockquote > * + * {
  margin-top: 0.7rem;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin-block: 2.25rem;
}

.prose code {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Чек-лист — не форма, а печатный список: квадрат под галочку */
.prose .checklist {
  list-style: none;
  padding-left: 0;
  gap: 0.7rem;
}

.prose .checklist li {
  position: relative;
  padding-left: 1.85rem;
}

.prose .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: 3px;
  background: var(--surface);
}

/* --- Таблицы ------------------------------------------------------------ */

/* Тень у края показывает, что таблица прокручивается, и гаснет у своего конца.
   Приём чисто фоновый: два слоя «local» закрывают тень, когда прокрутка упёрлась. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, var(--surface), transparent),
    linear-gradient(to left, var(--surface), transparent),
    linear-gradient(to right, var(--edge-shadow), transparent),
    linear-gradient(to left, var(--edge-shadow), transparent);
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 2.5rem 100%, 2.5rem 100%, 1rem 100%, 1rem 100%;
  background-attachment: local, local, scroll, scroll;
  -webkit-overflow-scrolling: touch;
}

.table-wrap:focus-visible {
  outline-offset: 0;
}

.prose table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.45;
}

.prose thead th {
  position: sticky;
  top: 0;
  text-align: left;
  vertical-align: bottom;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface-2);
  border-bottom: 2px solid var(--ink);
  padding: 0.7rem 0.85rem;
}

.prose tbody td {
  vertical-align: top;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose tbody tr:hover td {
  background: var(--surface-2);
}

.prose tbody td:first-child {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

/* --- Схема карты -------------------------------------------------------- */

.schema {
  margin: 0 0 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.75rem 0.75rem 0;
  box-shadow: var(--shadow);
}

.schema img {
  width: 100%;
}

.schema figcaption {
  padding: 0.75rem 0.15rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
  margin-top: 0.5rem;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 2px;
  border: 1px solid var(--rule-strong);
  flex: none;
}

.legend-swatch[data-tone="attack"] {
  background: var(--accent);
  border-color: var(--accent);
}

.legend-swatch[data-tone="defense"] {
  background: var(--cool);
  border-color: var(--cool);
}

.legend-swatch[data-tone="site"] {
  background: var(--surface-2);
  border-style: dashed;
  border-color: var(--ink-2);
}

.legend-swatch[data-tone="route"] {
  background: transparent;
  border: 0;
  border-top: 2px dashed var(--ink-2);
  width: 1.5rem;
  height: 0;
  border-radius: 0;
}

/* --- FAQ ---------------------------------------------------------------- */

.block-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.faq,
.related {
  margin-top: 3.5rem;
}

.faq details {
  border-top: 1px solid var(--rule);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 1.1rem;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  background:
    linear-gradient(var(--accent), var(--accent)) center/100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center/1.5px 100% no-repeat;
  transition: rotate 0.2s ease;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq summary:hover {
  color: var(--accent);
}

.faq-answer {
  padding: 0 0 1.15rem;
  font-size: 0.975rem;
  color: var(--ink-2);
  max-width: 40rem;
}

.faq-answer > * + * {
  margin-top: 0.7rem;
}

/* --- «Читайте дальше» --------------------------------------------------- */

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  counter-reset: rel;
}

.related li {
  counter-increment: rel;
  background: var(--surface);
}

.related a {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.5rem 0.75rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}

.related a::before {
  content: counter(rel, decimal-leading-zero);
  grid-row: span 2;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35em;
}

.related-title {
  font-weight: 700;
  line-height: 1.3;
  font-size: 1rem;
}

.related-note {
  grid-column: 2;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-2);
}

.related a:hover {
  background: var(--surface-2);
}

.related a:hover .related-title {
  color: var(--accent);
}

.updated {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* --- Главная и хабы ----------------------------------------------------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 22px 22px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% 30%;
  height: 22rem;
  background: radial-gradient(ellipse at center, var(--accent-wash), transparent 68%);
  opacity: 0.85;
  pointer-events: none;
}

/* Левый край героя совпадает с левым краем всех остальных полос:
   ограничиваем длину строки, а не ширину самой полосы. */
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.75rem, 9vw, 5.5rem) clamp(2.25rem, 7vw, 4rem);
}

.hero-inner > * {
  max-width: 52rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 1.25rem + 5.1vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-top: 0.35rem;
}

.hero .lead {
  max-width: 38rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-facts li::before {
  content: "";
  width: 1.1rem;
  height: 1px;
  background: var(--rule-strong);
}

.band {
  padding-block: clamp(2.5rem, 7vw, 4.25rem);
  border-bottom: 1px solid var(--rule);
}

.band-head {
  max-width: 42rem;
  margin-bottom: 1.75rem;
}

.band-head h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem);
  font-weight: 800;
}

.band-head p {
  margin-top: 0.75rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Три дорожки входа */
.tracks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  counter-reset: track;
}

@media (min-width: 52em) {
  .tracks {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tracks li {
  counter-increment: track;
}

.tracks a {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.6rem;
  padding: 1.35rem 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tracks a::before {
  content: "Дорожка " counter(track, decimal-leading-zero);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.tracks b {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tracks span {
  font-size: 0.925rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.tracks em {
  font-style: normal;
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.tracks em::after {
  content: " →";
  display: inline-block;
  transition: translate 0.18s ease;
}

.tracks a:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}

.tracks a:hover em::after {
  translate: 0.25rem 0;
}

/* Сетка карточек-ссылок из волосяных линеек */
.card-group + .card-group {
  margin-top: 2.25rem;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.cards li {
  background: var(--surface);
}

.cards a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 1.15rem 1.15rem 1.35rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}

.cards a:hover {
  background: var(--surface-2);
}

.cards b {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.cards a:hover b {
  color: var(--accent);
}

.cards span {
  font-size: 0.87rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.cards em {
  font-style: normal;
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Блок «первые 10 минут» */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  max-width: 46rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.95rem 0 0.95rem 2.85rem;
  border-top: 1px solid var(--rule);
  line-height: 1.5;
}

.steps li:last-child {
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* --- Подвал ------------------------------------------------------------- */

.site-footer {
  background: var(--surface-2);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 22px 22px;
  border-top: 1px solid var(--rule);
  padding-block: 2.75rem 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 52em) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 3.5rem;
  }
}

.disclaimer {
  font-size: 0.855rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44rem;
  text-wrap: pretty;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-nav a:hover {
  color: var(--accent);
  border-bottom-color: currentColor;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule-strong);
}

.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
}

.age-badge b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 1.85rem;
  padding-inline: 0.4rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.age-badge span {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  max-width: 7rem;
  line-height: 1.25;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--ink-3);
  margin: 0;
}

/* --- Уважение к настройкам пользователя --------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .tracks a:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .page-aside,
  .related {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
