/* ==========================================================================
   Дома Магнитогорска — стили лендинга
   Направление: тёплый швейцарский минимализм. Много воздуха, строгая сетка,
   крупная типографика, тонкие 1px линии, минимум теней.
   ========================================================================== */

/* ---------- Токены ---------- */
:root {
  --bg: #F7F5F0;            /* тёплый off-white */
  --surface: #FFFFFF;
  --ink: #17181A;           /* основной текст, основная кнопка */
  --ink-hover: #2A2B2E;
  --muted: #5B5B57;         /* вторичный текст, контраст 6.3:1 на --bg */
  --line: #E3DFD6;          /* линии */
  --line-strong: #CFC9BD;   /* обводка полей и вторичной кнопки */
  --accent: #1E5A44;        /* глубокий зелёный: акценты, иконки, focus-ring */
  --accent-soft: rgba(30, 90, 68, 0.08);
  --error: #A3261E;

  --font-head: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 5vw, 64px);
  --header-h: 64px;
  --frame-inset: 12px;      /* отступ hero-картинки от краёв экрана */
  --section-y: clamp(64px, 8vw, 120px);

  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --z-header: 50;
}

@media (min-width: 48em) {
  :root {
    --header-h: 72px;
    --frame-inset: 16px;
  }
}

/* ---------- Базовое ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 400 1rem / 1.6 var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

h1, h2, h3, p, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; }

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

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Неразрывный фрагмент: диапазоны цифр, число + единица */
.nowrap { white-space: nowrap; }

/* Текст только для скринридера */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Типографика ---------- */
h1, h2, h3, .stat-num, .stat-unit, .step-num, .brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-title {
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 22ch;
  text-wrap: balance;
}

.section-subtitle {
  margin-top: 16px;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
}

h3 {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}

.micro {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Без висячего однословного «хвоста» в последней строке (прогрессивное улучшение) */
.card-text, .step-text, .stat-label, .stat-note, .section-subtitle, .micro, .footer-note {
  text-wrap: pretty;
}

/* Надзаголовок: капитель с короткой линией слева — швейцарский акцент */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: currentColor;
}

/* Сноски-источники: маленькие superscript-ссылки */
.fn {
  font-size: 0.6875em;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.15em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
}
.fn-link {
  font-weight: 600;
  /* Тап-таргет ≈16×28px: вертикальный padding у inline-элемента не двигает строку */
  padding: 8px 4px;
  margin: 0 -2px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.2s var(--ease);
}
.fn-link:hover { text-decoration-color: currentColor; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 500 1rem / 1 var(--font-body);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }

.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--ink-hover); }
.btn-primary:active { background: #000; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 1.0625rem;
}
.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9375rem;
}
.btn-block { width: 100%; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: rgba(247, 245, 240, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.brand-name {
  font-weight: 700;
  font-size: clamp(0.8125rem, 3.6vw, 1.125rem);
  letter-spacing: -0.015em;
  white-space: nowrap;
}
/* До 480px в шапке не хватает места на знак + текст + телефон + кнопку: знак скрываем, текст логотипа остаётся */
@media (max-width: 29.99em) {
  .brand-mark { display: none; }
  .header-actions .btn-sm {
    padding: 0 12px;
    font-size: clamp(0.8125rem, 3.5vw, 0.875rem);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.phone:hover { color: var(--accent); background: var(--accent-soft); }
.phone .icon { width: 20px; height: 20px; }
.phone-text { display: none; }

@media (min-width: 48em) {
  .header-actions { gap: 16px; }
  .phone { padding: 0 12px; }
  .phone-text { display: inline; }
}

/* ==========================================================================
   Экран 1 — Hero
   Три раскладки:
     <1024   — стек: картинка (кроп 4:5 / 3:2), текст под ней на off-white;
     1024–1439 — две колонки: текст слева, портретный кроп справа;
     ≥1440   — оверлей: картинка 16:9 на весь экран, текст в левой трети на небе.
   ========================================================================== */
.hero {
  padding: var(--frame-inset) var(--gutter) 0;
}

.hero-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #DCE4EA; /* цвет неба — пока грузится картинка */
  /* Высота ограничена, чтобы кнопка «Подобрать дом» попадала в первый мобильный экран */
  height: clamp(300px, 42svh, 520px);
}
.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
}
.hero-media img {
  object-fit: cover;
  object-position: 50% 22%; /* держим трубу дома в кадре (svh в реальном Safari/Chrome ≈ 660–700), режем гравий снизу */
}

.hero-content {
  padding: 24px 0 8px;
  max-width: 40rem;
}

.hero-title {
  margin-top: 10px;
  font-size: clamp(2rem, 1.2rem + 3.3vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: pretty;
}

.hero-lead {
  margin-top: 16px;
  font-size: clamp(1rem, 0.9rem + 0.25vw, 1.125rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 36rem;
  text-wrap: pretty; /* без висячего слова в последней строке */
}

.hero-cta {
  margin-top: 22px;
}
.hero-cta .btn { width: 100%; }
.hero-cta .micro {
  margin-top: 12px;
  max-width: 28rem;
}

@media (min-width: 40em) {
  .hero-cta .btn { width: auto; }
}

/* --- 1024–1439: две колонки --- */
@media (min-width: 64em) {
  .hero-frame {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 4vw, 56px);
    align-items: center;
    max-width: var(--container);
    margin-inline: auto;
    min-height: calc(100svh - var(--header-h) - var(--frame-inset));
  }
  .hero-media {
    grid-column: 2;
    grid-row: 1;
    height: clamp(520px, calc(100svh - var(--header-h) - 2 * var(--frame-inset)), 760px);
    border-radius: 24px;
  }
  .hero-media img { object-position: 50% 20%; } /* труба дома в кадре и на 1366×768 */
  .hero-content {
    grid-column: 1;
    grid-row: 1;
    padding: 32px 0;
  }
  /* 3.5vw: H1 всегда крупнее H2 (1200: 42 > 40,8; 1280: 44,8 > 42,2); на 1024 работает нижняя граница 40px */
  .hero-title {
    margin-top: 14px;
    font-size: clamp(2.5rem, 3.5vw, 3.75rem);
  }
}

/* --- ≥1440: оверлей на небе --- */
@media (min-width: 90em) {
  .hero {
    padding: var(--frame-inset);
  }
  .hero-frame {
    display: block;
    position: relative;
    max-width: none;
    overflow: hidden;
    border-radius: 24px;
    /* Ровно один экран: 100svh минус шапка и отступы; но не выше 16:9-пропорции кадра */
    height: min(calc(100svh - var(--header-h) - 2 * var(--frame-inset)), calc((100vw - 2 * var(--frame-inset)) * 0.56));
    min-height: 620px;
    background: #DCE4EA;
  }
  .hero-media {
    position: absolute;
    inset: 0;
    height: auto;
    border-radius: 0;
  }
  .hero-media picture { height: 100%; }
  /* Картинка на 10% выше рамки, якорь — левый верх: гравий внизу уходит за кадр,
     а зона чистого неба слева становится выше — под неё ложится весь текст. */
  .hero-media img {
    height: 110%;
    object-position: 0 0;
  }
  .hero-content {
    position: absolute;
    /* На широких экранах (~1780+) левый край текста совпадает с контейнером 1280 — как логотип и H2 */
    left: max(13.5%, calc((100% - var(--container)) / 2));
    top: 4%;
    width: min(40rem, 34%);
    padding: 0;
    isolation: isolate; /* подложка ::before с z-index:-1 рисуется внутри блока, не под картинкой */
  }
  /* Едва заметное осветление за текстом — страховка контраста у нижнего края текстового блока */
  .hero-content::before {
    content: '';
    position: absolute;
    inset: -10% -18% -12% -16%;
    z-index: -1;
    background: radial-gradient(ellipse at 45% 50%, rgba(247, 245, 240, 0.42), rgba(247, 245, 240, 0) 68%);
    pointer-events: none;
  }
  /* Отклонение от брифа (clamp(2.75rem, 4.5vw, 5rem)): чистое небо занимает ~50% высоты
     16:9-кадра слева, и заголовок в 65–80px с подзаголовком и кнопкой в эту зону не помещается —
     текст лёг бы на крышу террасы. 3.1vw (45px на 1440, 60px на 1920) — максимум, при котором
     весь блок остаётся на небе без подложки. */
  .hero-title {
    margin-top: 14px;
    font-size: clamp(2.75rem, 3.1vw, 3.75rem);
    line-height: 1.02;
  }
  .hero-lead {
    margin-top: 16px;
    max-width: 30rem;
    font-size: 1.0625rem; /* 17px — компактнее, чтобы блок оставался на небе и на 1536×864 */
  }
  .hero-cta { margin-top: 20px; }
  .hero-cta .micro { max-width: 30rem; }
}

/* ≥1680: под небом остаётся ~130px запаса — H1 до 68px (на 1920). 3.6vw — чтобы неразрывная строка
   «в Магнитогорске —» помещалась в колонку 34% и на 1680–1800. На 1440 не действует. */
@media (min-width: 105em) {
  .hero-title { font-size: min(4.25rem, 3.6vw); }
}

/* ==========================================================================
   Секции
   ========================================================================== */
.section {
  padding-block: var(--section-y);
}
.section .container {
  position: relative;
}
/* Тонкая линия-разделитель сверху каждой секции */
.section-stats .container::before,
.section-steps .container::before,
.section-lead .container::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--section-y));
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.section-head { margin-bottom: clamp(36px, 4vw, 56px); }
.section-title + .cards,
.section-title + .steps { margin-top: clamp(36px, 4vw, 56px); }

/* ---------- Экран 2 — карточки ---------- */
.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 6px;
}
.card-title { color: var(--ink); }
.card-text {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 48em) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 75em) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
  .card { padding: 32px 28px; }
}

/* ---------- Экран 3 — цифры ---------- */
.stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
@media (min-width: 30em) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
}
.stat {
  border-top: 1px solid var(--line-strong);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
}
.stat-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.stat-num {
  font-size: clamp(2.25rem, 3vw, 3.5rem);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.035em;
  color: var(--accent);
}
.stat-unit {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 4px;
}
.stat-label {
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
.stat-note {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 75em) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .stat { padding-top: 24px; }
  .stat-label { margin-top: 18px; }
}

/* ---------- Экран 4 — шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.step {
  position: relative;
  padding-left: 64px;
}
.step-num {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
/* Вертикальная линия таймлайна между кружками (мобильный) */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 44px;
  bottom: -36px;
  width: 1px;
  background: var(--line);
}
.step-title {
  padding-top: 8px;
}
.step-text {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

@media (min-width: 64em) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
  .step {
    padding-left: 0;
    padding-top: 64px;
  }
  /* Горизонтальная линия между кружками (десктоп) */
  .step:not(:last-child)::after {
    left: 44px;
    right: -36px;
    top: 20px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .step-title { padding-top: 0; }
}
/* 1024–1199: четыре колонки ещё тесны (~206px, 7 строк текста) — 2×2 без соединительных линий.
   Горизонтальный таймлайн в 4 колонки — с 75em, как карточки и цифры. */
@media (min-width: 64em) and (max-width: 74.99em) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 40px;
  }
  .step:not(:last-child)::after { display: none; }
}

/* ---------- Экран 5 — заявка ---------- */
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

.contacts {
  /* Отступ сверху даёт gap сетки .lead-grid (мобильный: после формы; ≥1024: под подводкой) */
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contacts li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.contacts .icon { width: 20px; height: 20px; color: var(--accent); }
.contacts a {
  /* Вся строка — тап-таргет 44px; подчёркивание остаётся у текста */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}
.contacts a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 40px);
  max-width: 560px; /* и в стеке (768): поля и кнопка не растягиваются на всю ширину */
  /* Единственная тень на странице — мягкая, у карточки формы */
  box-shadow: 0 24px 48px -28px rgba(23, 24, 26, 0.18);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field + .field { margin-top: 18px; }
.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem / 1.4 var(--font-body);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input::placeholder { color: #73726C; } /* ≈4,8:1 на белом */
.input:hover { border-color: #B7B1A4; }
.input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 90, 68, 0.18);
}
.input[aria-invalid="true"] {
  border-color: var(--error);
}
.input[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 38, 30, 0.16);
}
.input:disabled { opacity: 0.6; }
.field-error {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--error);
}
.field-error[hidden] { display: none; }

.lead-form .btn { margin-top: 24px; }
.form-micro { margin-top: 14px; }

/* Экран «спасибо» */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-height: 280px;
  justify-content: center;
}
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.success-icon .icon { stroke-width: 2; }
.success-title {
  font-size: 1.625rem;
  outline: none;
}
.success-text {
  color: var(--muted);
  line-height: 1.6;
}
.success-text a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.success-text a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (min-width: 64em) {
  .lead-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr; /* лишняя высота формы уходит во 2-й ряд, контакты стоят ровно под подводкой */
    gap: 28px clamp(40px, 6vw, 96px); /* строки: подводка → контакты 28px; колонки: текст ↔ форма */
    align-items: start;
  }
  /* Текст и контакты слева на краю контейнера (как все H2), форма справа на два ряда */
  .lead-text { grid-column: 1; grid-row: 1; padding-top: 8px; }
  .contacts { grid-column: 1; grid-row: 2; }
  .form-card { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
}

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}
.footer-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-copy { color: var(--ink); font-weight: 500; }
.footer-note { max-width: 64ch; }

.sources {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.sources-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 500;
  user-select: none;
}
.sources-summary::-webkit-details-marker { display: none; }
.sources-summary .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}
.sources[open] .sources-summary .icon { transform: rotate(180deg); }
.sources-summary:hover { color: var(--accent); }

.sources-list {
  margin: 8px 0 0;
  padding-left: 1.5em;
  display: grid;
  gap: 6px;
  max-width: 72ch;
}
.sources-list li { padding-left: 0.25em; }
.sources-list li:target {
  color: var(--ink);
}
.sources-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sources-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (min-width: 48em) {
  .footer-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 32px;
  }
  .footer-copy { flex: none; white-space: nowrap; }
  .footer-note { text-align: right; }
}

/* ==========================================================================
   Появление при скролле
   Скрываем только при наличии JS (класс .js на <html>), иначе всё видно сразу.
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Без анимаций: всё видно сразу, скролл — мгновенный */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
