/* ============================================================
   Владимир Семакин — тёмная тема, редакция 2026-09-20.
   Шрифт: Geist (variable, self-hosted). Палитра: тёплая ночная
   зелень + янтарь/лайм/коралл. Меняешь этот файл — меняется
   весь сайт: разметка держится на этих классах.

   Принципы редакции:
   · глубина — слои, свечение, зерно, а не плоские плашки;
   · всё, что можно навести, отвечает движением;
   · движение отключается по prefers-reduced-motion;
   · цвета только через токены — хардкод запрещён.
   ============================================================ */

@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/geist-cyrillic.woff2) format("woff2");
  unicode-range: U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/geist-latin.woff2) format("woff2");
  unicode-range: U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  color-scheme: dark;

  /* Поверхности: от самой глубокой к самой близкой */
  --deep:    #090c07;
  --surface: #0c100a;
  --bg:      #10140e;
  --card:    #151a11;
  --raise:   #1a2015;

  /* Текст. --faint держит 4.9:1 на --bg — это порог AA для мелкого */
  --ink:   #f4f1e6;
  --dim:   #d8d4c2;
  --muted: #9a9886;
  --faint: #868475;

  /* Линии */
  --line:       #2f3826;
  --line-soft:  #242c1d;
  --line-hover: #5a6749;

  /* Акценты */
  --accent:   #ffc957;
  --accent-2: #b8f03c;
  --accent-3: #ff8a5c;
  --live:     #7ee65f;
  --sel-ink:  #1a1405;

  --accent-soft: rgba(255, 201, 87, .35);
  --glow-amber:  rgba(255, 201, 87, .16);
  --glow-lime:   rgba(184, 240, 60, .10);
  --glow-coral:  rgba(255, 138, 92, .12);

  --grad-warm: linear-gradient(100deg, #ffc957 0%, #ff8a5c 55%, #ff5e78 100%);
  --grad-lime: linear-gradient(100deg, #b8f03c 0%, #7ee65f 100%);
  --grad-sun:  linear-gradient(100deg, #ffd66e 0%, #b8f03c 55%, #5cd6a8 100%);
  --grad-text: linear-gradient(92deg, #ffd66e 0%, #ffc957 40%, #ff9a6a 100%);

  /* Рамка с градиентом: используется через маску в ::before */
  --grad-border: linear-gradient(135deg, rgba(255,201,87,.55) 0%, rgba(184,240,60,.22) 45%, rgba(255,255,255,.04) 100%);

  /* Шапка: тот же тон, что --bg, иначе на стыке виден шов */
  --header-bg: rgba(16, 20, 14, .72);

  /* Тени: холодные и глубокие — на тёмном фоне мягкая тень не читается */
  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -18px rgba(0,0,0,.8);
  --shadow-2: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 60px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,201,87,.06);

  --font-body: Geist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --radius: 22px;
  --radius-sm: 14px;

  /* Одна кривая на все переходы: движение читается как одно целое */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .18s var(--ease);
  --t-med:  .32s var(--ease);
}

/* ---------- База ---------- */
* { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--sel-ink); }

/* Плавная прокрутка — только тем, кто не просил её отключить */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Свечения выходят за край экрана; без clip на телефоне появлялась бы
   горизонтальная прокрутка ровно на ширину этих слоёв. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Мягкий верхний свет: страница не выглядит «залитой одним цветом» */
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,201,87,.07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(184,240,60,.04), transparent 60%);
  background-repeat: no-repeat;
}

/* Плёночное зерно поверх всего: убирает «стерильность» ровных заливок.
   Рисуется SVG-шумом, лежит фиксированно, кликов не ловит. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Видимый фокус для клавиатуры. :focus-visible — чтобы кольцо не
   вспыхивало при клике мышью. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 10px; z-index: 10000;
  background: var(--accent); color: var(--sel-ink);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
}
.skip-link:focus { left: 16px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}
@media (min-width: 768px) { .wrap { padding-inline: 40px; } }

/* ---------- Появление при прокрутке ----------
   Класс .reveal ставит скрипт, поэтому без JS всё видно сразу.
   Задержка через --i даёт «волну» по соседям. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  transition: background var(--t-med), box-shadow var(--t-med);
}
/* Волосяная линия с растворением по краям вместо ровной полосы */
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}
.header.scrolled {
  background: rgba(12, 16, 10, .86);
  box-shadow: 0 12px 30px -20px rgba(0,0,0,.9);
}
.header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: -.2px;
  white-space: nowrap; color: var(--ink);
}
/* Знак бренда: янтарная точка с ореолом, тот же, что «● в эфире» */
.brand::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,201,87,.18), 0 0 14px rgba(255,201,87,.55);
}
.brand b { font-weight: 700; color: var(--accent); }

.nav { display: none; gap: 4px; align-items: center; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  position: relative;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim);
  padding: 8px 10px; border-radius: 8px;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav a.cta {
  margin-left: 10px;
  background: var(--ink); color: var(--sel-ink);
  padding: 9px 18px; border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px -12px rgba(255,201,87,.5);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.nav a.cta:hover {
  background: #fff; color: var(--sel-ink);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 12px 30px -10px rgba(255,201,87,.6);
}

/* Мобильное меню */
.menu-btn {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; margin: -10px; cursor: pointer;
  border-radius: 10px;
}
@media (min-width: 900px) { .menu-btn { display: none; } }
.menu-btn span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform var(--t-med), opacity var(--t-med);
  transform-origin: center;
}
/* Три полоски складываются в крест, когда меню открыто */
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: rgba(12,16,10,.96);
  padding: 8px 24px 20px;
}
.mobile-nav.open { display: block; animation: drop .28s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  border-bottom: 1px solid var(--line-soft);
  color: var(--dim);
}
.mobile-nav a::after { content: "→"; color: var(--faint); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .mobile-nav.open { animation: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  padding: 72px 0 88px;
}
@media (min-width: 768px) { .hero { padding: 112px 0 128px; } }
/* Два пятна света: янтарное слева-сверху и лаймовое справа.
   Радиальные градиенты, а не blur — дешевле и не тормозят прокрутку. */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  border-radius: 50%;
}
.hero::before {
  width: 70vw; max-width: 900px; aspect-ratio: 1;
  left: -20vw; top: -35%;
  background: radial-gradient(closest-side, var(--glow-amber), transparent 70%);
}
.hero::after {
  width: 50vw; max-width: 640px; aspect-ratio: 1;
  right: -15vw; top: -10%;
  background: radial-gradient(closest-side, var(--glow-lime), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.hero h1 {
  font-size: clamp(42px, 7.4vw, 96px);
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 800;
  margin: 0 0 26px;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .lead {
  max-width: 600px;
  font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; font-weight: 450;
  color: var(--dim);
  margin: 0 0 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .005em;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-light {
  background: linear-gradient(180deg, #ffffff, #efece2);
  color: var(--sel-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px -14px rgba(255,201,87,.55), 0 0 0 1px rgba(255,255,255,.08);
}
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -16px rgba(255,201,87,.75), 0 0 0 1px rgba(255,255,255,.12);
}
.btn-ghost {
  border: 1px solid var(--line); color: var(--ink);
  background: rgba(255,255,255,.02);
}
.btn-ghost:hover {
  border-color: var(--line-hover);
  background: rgba(255,255,255,.05);
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--grad-lime); color: var(--sel-ink);
  box-shadow: 0 0 22px rgba(184,240,60,.28);
}
.btn-accent:hover { filter: brightness(1.06); transform: translateY(-2px); }

/* ---------- Секции ---------- */
.section {
  position: relative;
  padding: 80px 0;
}
@media (min-width: 768px) { .section { padding: 112px 0; } }
/* Разделитель растворяется к краям — ровная линия на весь экран смотрится
   как таблица, а не как страница. */
.section::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.section h2 {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0 0 18px;
  max-width: 680px;
}
.section .sub {
  color: var(--muted); font-size: 17px; max-width: 580px;
  margin: 0 0 44px;
}
/* Номер секции над заголовком */
.section .eyebrow { margin-bottom: 18px; }

/* Сетка карточек */
.grid { display: grid; gap: 18px; }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Карточки ---------- */
.card {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, var(--raise), var(--card) 60%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  overflow: hidden;
}
/* Градиентная рамка: рисуется в ::before и вырезается маской так, чтобы
   остался только контур в 1px. Появляется при наведении. */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--t-med);
}
/* Блик в углу — свет от рамки «падает» внутрь */
.card::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 60%; aspect-ratio: 1; left: -20%; top: -30%;
  background: radial-gradient(closest-side, rgba(255,201,87,.12), transparent 70%);
  opacity: 0; transition: opacity var(--t-med);
}
.card > * { position: relative; z-index: 2; }
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,201,87,.18);
  box-shadow: var(--shadow-2);
}
.card:hover::before, .card:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

.card h3 { font-size: 21px; line-height: 1.22; letter-spacing: -.015em; margin: 0 0 12px; font-weight: 700; }
.card p  { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 8px; }
.card .more {
  margin-top: auto; padding-top: 18px;
  color: var(--accent); font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap var(--t-fast), transform var(--t-fast);
}
.card:hover .more { transform: translateX(4px); }

.badge {
  display: inline-flex; align-items: center;
  background: rgba(244,241,230,.08); color: var(--dim);
  border: 1px solid rgba(244,241,230,.1);
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 20px;
}
.badge-accent {
  background: rgba(255,201,87,.14); color: var(--accent);
  border-color: rgba(255,201,87,.28);
}

/* Кейс: ЗАДАЧА / РЕЗУЛЬТАТ */
.case-label {
  display: block;
  color: var(--faint); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  margin: 16px 0 4px;
}
.card p.case-text { margin: 0; color: var(--dim); }

/* ---------- Заголовок раздела (страницы-списки) ---------- */
.page-head { position: relative; isolation: isolate; padding: 56px 0 8px; }
.page-head::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 60vw; max-width: 760px; aspect-ratio: 1; left: -18vw; top: -60%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-amber), transparent 70%);
}
.page-head h1 {
  font-size: clamp(38px, 6.2vw, 76px);
  letter-spacing: -.04em; line-height: .98;
  margin: 0 0 18px; font-weight: 800;
}
.page-head .standfirst { color: var(--dim); max-width: 640px; font-size: 17px; }
.stamp { color: var(--faint); font-size: 13px; letter-spacing: .02em; }
.stamp b { color: var(--live); }

/* Хлебные крошки */
.crumbs { color: var(--faint); font-size: 13px; margin: 26px 0 0; }
.crumbs a { color: var(--muted); transition: color var(--t-fast); }
.crumbs a:hover { color: var(--ink); }

/* ---------- Список записей (главная, шаги) ---------- */
.entry-list { display: flex; flex-direction: column; margin-top: 28px; }
.entry {
  position: relative;
  border-top: 1px solid var(--line-soft);
  padding: 28px 0;
  transition: padding var(--t-med);
}
.entry:last-child { border-bottom: 1px solid var(--line-soft); }
/* Подсветка строки: фон выходит за поля на ширину отступа */
.entry::before {
  content: ""; position: absolute; inset: 0 -20px; z-index: -1;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  opacity: 0; transition: opacity var(--t-med);
}
a.entry:hover::before { opacity: 1; }
a.entry:hover { padding-left: 16px; }
a.entry::after {
  content: "→"; position: absolute; right: 0; top: 50%; transform: translate(8px, -50%);
  color: var(--accent); font-size: 22px; opacity: 0;
  transition: opacity var(--t-med), transform var(--t-med);
}
a.entry:hover::after { opacity: 1; transform: translate(0, -50%); }
.entry .meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  color: var(--faint); font-size: 12.5px; letter-spacing: .04em;
  margin-bottom: 10px;
}
.entry .meta .no { color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.entry .meta .tag {
  color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 11.5px;
}
.entry h3 {
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.2; letter-spacing: -.02em;
  margin: 0 0 8px; font-weight: 700;
  transition: color var(--t-fast);
}
a.entry:hover h3 { color: var(--accent); }
.entry .dek { color: var(--muted); font-size: 15px; margin: 0; max-width: 720px; }
@media (prefers-reduced-motion: reduce) { a.entry:hover { padding-left: 0; } }

/* ---------- CTA / подвал ---------- */
.cta-box {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, var(--raise), var(--surface));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 64px 32px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
@media (min-width: 768px) { .cta-box { padding: 88px 48px; } }
/* Два световых пятна и градиентный контур — блок читается как «сцена» */
.cta-box::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 40% at 20% 30%, var(--glow-amber), transparent 70%),
    radial-gradient(35% 35% at 80% 70%, var(--glow-lime), transparent 70%),
    radial-gradient(30% 30% at 60% 20%, var(--glow-coral), transparent 70%);
}
.cta-box::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .7;
}
.cta-box h2 { margin-inline: auto; }
.cta-box .sub { margin-bottom: 36px; }

.footer {
  position: relative;
  margin-top: 40px;
  padding: 64px 0 40px;
  color: var(--faint); font-size: 14px;
  background: linear-gradient(180deg, transparent, rgba(9,12,7,.6));
}
.footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.footer-top {
  display: grid; gap: 40px;
  padding-bottom: 40px; margin-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.2fr 2fr; gap: 64px; } }
.footer-brand p { color: var(--muted); max-width: 360px; margin: 14px 0 0; font-size: 15px; line-height: 1.55; }
.footer-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; }
.footer-nav b {
  display: block; margin-bottom: 12px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.footer-nav a {
  display: block; padding: 5px 0; color: var(--muted); font-size: 14.5px;
  transition: color var(--t-fast), transform var(--t-fast);
}
.footer-nav a:hover { color: var(--ink); transform: translateX(3px); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: 13px; }
/* Старый подвал в две строки — на случай, если где-то остался */
.footer .wrap > span { display: inline-block; }
.footer a:hover { color: var(--ink); }

/* ============================================================
   Разделы-ленты (Статьи, Эксперименты): липкая левая колонка + лента.
   ============================================================ */
.lab-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  padding: 56px 0 96px;
}
.lab-layout > * { min-width: 0; }
.lab-side { position: sticky; top: 96px; align-self: start; }
@media (max-width: 1000px) {
  .lab-layout { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 64px; }
  .lab-side { position: static; }
}
.lab-title {
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: .96; letter-spacing: -.04em;
  font-weight: 800; margin: 0 0 20px;
  hyphens: auto;
}
.lab-side .standfirst { color: var(--dim); font-size: 16px; }
.lab-side .standfirst p + p { margin-top: 12px; }
.lab-stamp {
  margin: 22px 0 0; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint); font-size: 11.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
}
.lab-stamp b { color: var(--live); text-shadow: 0 0 10px rgba(126,230,95,.6); }

.lab-search { margin-top: 26px; }
.lab-search input {
  width: 100%;
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast);
}
.lab-search input::placeholder { color: var(--faint); }
.lab-search input:focus { border-bottom-color: var(--accent); }
.lab-search .hits {
  display: block; margin-top: 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  min-height: 14px;
}

.lab-chips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.lab-chip {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.lab-chip:hover { color: var(--ink); border-color: var(--line-hover); transform: translateY(-1px); }
.lab-chip[aria-pressed="true"] {
  color: var(--sel-ink);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 6px 18px -8px rgba(255,201,87,.7);
}
.lab-chip b { color: var(--faint); margin-left: 4px; font-weight: 600; }
.lab-chip[aria-pressed="true"] b { color: rgba(26,20,5,.55); }

/* Лента */
.lab-feed { display: flex; flex-direction: column; }
.lab-entry { position: relative; border-bottom: 1px solid var(--line-soft); }
.lab-entry a {
  position: relative; display: block; padding: 32px 0 36px;
  transition: padding var(--t-med);
}
.lab-entry a::before {
  content: ""; position: absolute; inset: 8px -24px; z-index: -1;
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  opacity: 0; transition: opacity var(--t-med);
}
.lab-entry a:hover::before { opacity: 1; }
.lab-entry .top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
  margin: 0;
}
.lab-entry .no { color: var(--accent); font-size: 15px; letter-spacing: 0; }
.lab-entry h3 {
  font-size: clamp(23px, 2.5vw, 32px);
  line-height: 1.14; letter-spacing: -.025em;
  font-weight: 700; margin: 16px 0 0; max-width: 26ch;
  transition: color var(--t-fast);
}
.lab-entry .dek {
  margin-top: 12px; color: var(--muted);
  font-size: 16.5px; line-height: 1.55; max-width: 64ch;
}
.lab-entry .more {
  display: inline-block; margin-top: 18px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  transition: transform var(--t-fast), color var(--t-fast);
}
.lab-entry a:hover h3 { color: var(--accent); }
.lab-entry a:hover .more { transform: translateX(4px); }
.lab-entry[hidden] { display: none; }
@media (max-width: 600px) {
  .lab-entry .top { flex-direction: column; gap: 6px; }
}

/* Миниатюра: текст | картинка */
.lab-entry .entry-flex {
  display: grid;
  grid-template-columns: minmax(0,1fr) 220px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1000px) {
  .lab-entry .entry-flex { grid-template-columns: 1fr; gap: 16px; }
}
.lab-entry .thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  display: block;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}
.lab-entry a:hover .thumb {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(255,201,87,.25);
  box-shadow: var(--shadow-2);
}
@media (prefers-reduced-motion: reduce) {
  .lab-entry a:hover .thumb, .card:hover .more, .lab-entry a:hover .more { transform: none; }
}

/* ============================================================
   Вложенная страница (статья / эксперимент)
   ============================================================ */
.post-topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
}
.post-topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}
.post-topbar .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.post-topbar .wrap > span a { color: var(--ink); transition: color var(--t-fast); }
.post-topbar .wrap > span a:hover { color: var(--accent); }
.post-topbar .back { color: var(--muted); white-space: nowrap; transition: color var(--t-fast), transform var(--t-fast); }
.post-topbar .back:hover { color: var(--ink); transform: translateX(-3px); }

.post-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border-bottom: 1px solid var(--line-soft);
  padding: 56px 0 52px;
}
.post-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 70vw; max-width: 900px; aspect-ratio: 1; left: -20vw; top: -70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-amber), transparent 70%);
}
.post-hero-grid {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 40px; align-items: start;
}
@media (max-width: 1000px) { .post-hero-grid { grid-template-columns: 1fr; gap: 18px; } }
.post-no {
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1; font-weight: 800; letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.post-hero-meta {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.post-hero-tags { margin-top: 8px; color: var(--accent); }
.post-hero h1 {
  font-size: clamp(34px, 4.8vw, 62px);
  line-height: 1.04; letter-spacing: -.035em;
  font-weight: 800; margin: 0;
}

.post-body {
  display: grid; grid-template-columns: 320px 1fr; gap: 64px;
  padding: 52px 0 44px;
}
.post-body > * { min-width: 0; }
@media (max-width: 1000px) { .post-body { grid-template-columns: 1fr; gap: 32px; padding: 36px 0 56px; } }

.post-side { position: sticky; top: 88px; align-self: start; }
@media (max-width: 1000px) { .post-side { position: static; } }

.facts-list { border-top: 1px solid var(--line); }
.facts-list .f {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.facts-list .f span { flex: 0 0 auto; }
.facts-list .f b { color: var(--ink); text-align: right; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.facts-list .f a { color: var(--accent); }
.facts-list .f a:hover { text-decoration: underline; }

.toc-side { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.toc-side h2 {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 14px;
}
.toc-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc-side a {
  display: block; font-size: 13.5px; line-height: 1.35; color: var(--faint);
  padding: 7px 0 7px 14px; border-left: 1px solid var(--line);
  transition: color var(--t-fast), border-color var(--t-fast), padding-left var(--t-fast);
}
.toc-side a:hover { color: var(--ink); padding-left: 18px; }
.toc-side li.now a { color: var(--ink); border-left-color: var(--accent); }

.files-side { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.files-side h2 {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 14px;
}
.files-side a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--dim);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,.02);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.files-side a:hover { border-color: var(--accent); color: var(--ink); transform: translateX(3px); }
.files-side a .ext { color: var(--faint); font-size: 11px; text-transform: uppercase; }

.post-text { max-width: 720px; }
.post-text h2 { font-size: 28px; letter-spacing: -.025em; line-height: 1.15; margin: 48px 0 14px; }
.post-text h3 { font-size: 21px; letter-spacing: -.015em; margin: 32px 0 10px; }
.post-text p  { color: var(--dim); font-size: 17.5px; line-height: 1.65; margin: 0 0 18px; }
.post-text ul, .post-text ol { color: var(--dim); padding-left: 22px; margin: 0 0 18px; }
.post-text li { margin-bottom: 8px; }
.post-text a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(255,201,87,.35); text-underline-offset: 3px; transition: text-decoration-color var(--t-fast); }
.post-text a:hover { text-decoration-color: var(--accent); }
.post-text code {
  font-family: var(--font-mono); font-size: .84em;
  background: var(--deep); border: 1px solid var(--line);
  border-radius: 6px; padding: .14em .4em; overflow-wrap: anywhere;
}
.post-text pre {
  background: var(--deep); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; margin: 0 0 18px;
}
.post-text pre code { background: none; border: none; padding: 0; }
.post-text blockquote {
  border-left: 2px solid var(--accent);
  margin: 20px 0; padding: 4px 0 4px 20px; color: var(--muted);
}
.post-text img { border-radius: var(--radius-sm); margin: 8px 0 20px; border: 1px solid var(--line-soft); }

/* «Если коротко» */
.synopsis {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, var(--raise), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 36px; margin-bottom: 44px;
  box-shadow: var(--shadow-1);
}
.synopsis::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .6;
}
.synopsis::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 50%; aspect-ratio: 1; right: -20%; top: -40%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-amber), transparent 70%);
}
@media (max-width: 700px) { .synopsis { padding: 26px 22px; border-radius: 18px; } }
.synopsis h2 {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 22px;
}
.synopsis dl { margin: 0; }
.synopsis .row {
  display: grid; grid-template-columns: 132px 1fr; gap: 26px;
  padding: 15px 0; border-top: 1px solid var(--line-soft);
}
.synopsis .row:first-of-type { border-top: 0; padding-top: 0; }
@media (max-width: 700px) { .synopsis .row { grid-template-columns: 1fr; gap: 6px; } }
.synopsis dt {
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; color: var(--faint); padding-top: 5px;
}
.synopsis dd { font-size: 17.5px; line-height: 1.5; color: var(--ink); margin: 0; }

.share-row { margin-top: 26px; display: flex; gap: 18px; flex-wrap: wrap; }
.share-row button {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer;
  transition: color var(--t-fast);
}
.share-row button:hover { color: var(--accent); }

/* Файлы в теле статьи */
.dl-grid { display: grid; gap: 10px; margin: 20px 0; }
.dl-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: rgba(255,255,255,.02);
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.dl-card:hover { border-color: var(--accent); background: rgba(255,201,87,.04); transform: translateY(-2px); }
.dl-card .t { font-weight: 600; color: var(--ink); font-size: 15px; }
.dl-card .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dl-card .size { color: var(--faint); font-size: 12px; white-space: nowrap; }
