/* Planveyor — сайт. Визуальный язык презентации v7: бумага, чернила, один акцент. */

:root {
  --paper: #f4f2ea;
  --paper-2: #eeece3;
  --surface: #fbfaf6;
  --ink: #172526;
  --text: #223132;
  --muted: #56655e;
  --line: #c9cfc5;
  --line-2: #dde0d6;
  --soft: #e6e9df;
  --accent: #244ef0;
  --accent-hover: #1a3fd6;
  --on-accent: #ffffff;
  --accent-wash: rgba(36, 78, 240, 0.08);

  --panel: #172526;
  --panel-2: #213335;
  --panel-text: #f4f2ea;
  --panel-muted: #a9b9ae;
  --panel-line: #34494a;
  --panel-accent: #c3f48e;

  --focus: #a86a00;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(23, 37, 38, 0.04), 0 18px 40px -22px rgba(23, 37, 38, 0.35);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101c1d;
    --paper-2: #142324;
    --surface: #172829;
    --ink: #f2f0e7;
    --text: #dfe4da;
    --muted: #a1b2a7;
    --line: #2f4544;
    --line-2: #233635;
    --soft: #1a2e2c;
    --accent: #c3f48e;
    --accent-hover: #d6faae;
    --on-accent: #132120;
    --accent-wash: rgba(195, 244, 142, 0.08);
    --panel: #0a1415;
    --panel-2: #142425;
    --panel-text: #f2f0e7;
    --panel-muted: #a1b2a7;
    --panel-line: #2a3e3e;
    --panel-accent: #c3f48e;
    --focus: #dfab46;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 20px 44px -22px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #101c1d;
  --paper-2: #142324;
  --surface: #172829;
  --ink: #f2f0e7;
  --text: #dfe4da;
  --muted: #a1b2a7;
  --line: #2f4544;
  --line-2: #233635;
  --soft: #1a2e2c;
  --accent: #c3f48e;
  --accent-hover: #d6faae;
  --on-accent: #132120;
  --accent-wash: rgba(195, 244, 142, 0.08);
  --panel: #0a1415;
  --panel-2: #142425;
  --panel-text: #f2f0e7;
  --panel-muted: #a1b2a7;
  --panel-line: #2a3e3e;
  --panel-accent: #c3f48e;
  --focus: #dfab46;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 20px 44px -22px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  text-wrap: balance;
}

p {
  margin: 0;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
}

.nb {
  white-space: nowrap;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: 32px;
  }
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.mark rect {
  fill: var(--accent);
}

.mark path {
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  margin-left: auto;
  position: static;
}

.nav__list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list a {
  display: block;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.93rem;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav__list a:hover,
.nav__list a[aria-current="true"] {
  color: var(--ink);
  background: var(--soft);
}

.nav__toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav__toggle:hover,
.theme-toggle:hover {
  border-color: var(--muted);
}

.theme-toggle {
  width: 40px;
  padding: 0;
  flex: none;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .i-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .i-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .i-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .i-moon {
    display: none;
  }
}

.nav__toggle {
  display: none;
  padding: 0 14px;
}

.nav__toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

@media (max-width: 959px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__list {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav.is-open .nav__list {
    display: flex;
  }

  .nav__list a {
    padding: 13px 12px;
    border-radius: 10px;
    font-size: 1.05rem;
  }
}

/* ---------- Общие элементы разделов ---------- */

.section {
  padding-block: clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--line);
}

.section__head {
  max-width: 860px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow b {
  color: var(--accent);
  font-weight: 700;
}

.eyebrow::after {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--line);
}

h2 {
  margin-top: 18px;
  font-size: clamp(2rem, 1.2rem + 2.7vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
}

h3 {
  font-size: clamp(1.28rem, 1.08rem + 0.75vw, 1.62rem);
  line-height: 1.2;
  letter-spacing: -0.024em;
}

.lead {
  max-width: 36em;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.34rem);
  line-height: 1.52;
  text-wrap: pretty;
}

.sub {
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: clamp(40px, 5vw, 48px);
  border-top: 1px solid var(--line-2);
}

.sub__head h3 {
  margin-top: 10px;
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.sub__head {
  max-width: 820px;
  margin-bottom: 32px;
}

.sub__head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.1rem;
}

.tag .mono {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95em;
}

.tag {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.note {
  margin-top: 22px;
  max-width: 52em;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.prose p + p {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .lead,
  .col p,
  .note,
  .prose p {
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  padding-block: clamp(28px, 3vw, 40px) clamp(56px, 7vw, 96px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 78% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 65% at 78% 0%, #000 0%, transparent 72%);
  opacity: 0.75;
  pointer-events: none;
}

.hero > .wrap {
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.pill b {
  color: var(--ink);
  font-weight: 600;
}

.pill__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out 2;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px transparent;
  }
}

.hero h1 {
  max-width: 13.2em;
  margin-top: 20px;
  font-size: clamp(2.45rem, 1.15rem + 4.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.042em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lead {
  max-width: 38em;
  margin-top: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
}

/* ---------- Конвейер плана ---------- */

.conveyor {
  --n: 6;
  --step: 0;
  position: relative;
  margin: clamp(36px, 5vw, 48px) 0 0;
  padding: 26px 20px 22px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--panel-text);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.conveyor::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(244, 242, 234, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
}

.conveyor > * {
  position: relative;
}

.conveyor__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--panel-line);
}

.conveyor__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-accent);
}

.conveyor__hint {
  color: var(--panel-muted);
  font-size: 0.92rem;
}

.conveyor__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.conveyor__pause {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: transparent;
  color: var(--panel-text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.conveyor__pause:hover {
  border-color: var(--panel-accent);
}

.conveyor__pause[hidden] {
  display: none;
}

.conveyor__pause::before {
  content: "";
  width: 8px;
  height: 10px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.conveyor__pause[data-state="paused"]::before {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  border-right: 0;
}

.conveyor__owner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--panel-muted);
  font-size: 0.95rem;
}

.conveyor__owner b {
  color: var(--panel-text);
  font-weight: 650;
}

.conveyor__owner::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid var(--panel-accent);
  border-radius: 50%;
  flex: none;
}

.lane {
  position: relative;
  margin-top: 18px;
}

.track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Вертикальная линия на телефоне */
.track::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--panel-line);
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-content: start;
  gap: 2px 16px;
  padding: 12px 0;
}

.station__node {
  grid-row: span 3;
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: 2px solid var(--panel-line);
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  color: var(--panel-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.station__role {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--panel-text);
}

.station__what {
  color: var(--panel-muted);
  font-size: 0.93rem;
  line-height: 1.4;
}

.station__status {
  justify-self: start;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  color: var(--panel-muted);
  font-size: 0.76rem;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.station.is-done .station__node {
  border-color: var(--panel-accent);
  background: var(--panel-accent);
  color: var(--panel);
}

.station.is-active .station__node {
  border-color: var(--panel-accent);
  background: var(--panel);
  color: var(--panel-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--panel-accent) 18%, transparent);
}

.station.is-active .station__status {
  color: var(--panel);
  background: var(--panel-accent);
  border-color: var(--panel-accent);
}

.chip {
  display: none;
}

.rail {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--panel-line);
  color: var(--panel-muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.rail b {
  margin-right: 6px;
  color: var(--panel-text);
  font-weight: 650;
}

@media (min-width: 960px) {
  .conveyor {
    padding: 24px 32px 26px;
  }

  .conveyor__owner {
    margin-top: 16px;
  }

  .lane {
    margin-top: 54px;
  }

  .track {
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  }

  .track::before {
    left: calc(100% / var(--n) / 2);
    right: calc(100% / var(--n) / 2);
    top: 13px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .track::after {
    content: "";
    position: absolute;
    left: calc(100% / var(--n) / 2);
    top: 13px;
    height: 2px;
    width: calc(var(--step) * 100% / var(--n));
    background: var(--panel-accent);
    transition: width 0.9s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .station {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    justify-items: center;
    gap: 0;
    padding: 0 8px;
    text-align: center;
  }

  .station__node {
    grid-row: auto;
    margin: 0 0 16px;
  }

  .station__what {
    max-width: 13em;
    margin-top: 4px;
  }

  .station__status {
    justify-self: center;
    margin-top: 12px;
    white-space: normal;
    text-align: center;
    text-wrap: balance;
  }

  .js .chip {
    position: absolute;
    top: -46px;
    left: calc((var(--step) + 0.5) * 100% / var(--n));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 9px;
    border-radius: 9px;
    background: var(--panel-text);
    color: var(--panel);
    font-size: 0.85rem;
    font-weight: 650;
    white-space: nowrap;
    transform: translateX(-50%);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
    transition: left 0.9s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .js .chip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: var(--panel-text);
    transform: translateX(-50%) rotate(45deg);
  }

  .chip svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
  }

  .rail {
    margin-top: 26px;
    padding-right: 22%;
  }
}

.conveyor.is-resetting .track::after,
.conveyor.is-resetting .chip {
  transition: none;
}

/* ---------- Откуда ---------- */

.origin {
  display: grid;
  gap: 40px;
}

.timeline-h {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-h li {
  position: relative;
  padding: 0 0 26px 30px;
}

.timeline-h li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: var(--paper);
}

.timeline-h li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-h li:last-child::after {
  display: none;
}

.timeline-h li:last-child::before {
  border-color: var(--accent);
  background: var(--accent);
}

.timeline-h time {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.timeline-h b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.timeline-h li:last-child b {
  color: var(--accent);
}

.timeline-h span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

@media (min-width: 860px) {
  .timeline-h {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .timeline-h li {
    padding: 30px 0 0;
  }

  .timeline-h li::before {
    top: 0;
  }

  .timeline-h li::after {
    left: 22px;
    right: -26px;
    top: 6px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .timeline-h b {
    font-size: 1.85rem;
  }
}

/* ---------- Полоса шагов ---------- */

.flow {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--panel-text);
  overflow: hidden;
}

.flow li {
  position: relative;
  padding: 16px 20px;
}

.flow li + li {
  border-top: 1px solid var(--panel-line);
}

.flow__n {
  color: var(--panel-accent);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.flow b {
  display: block;
  margin-top: 6px;
  font-size: 1.28rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.flow span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--panel-muted);
  font-size: 0.98rem;
}

@media (min-width: 860px) {
  .flow {
    grid-template-columns: repeat(4, 1fr);
  }

  .flow li {
    padding: 24px 26px;
  }

  .flow li + li {
    border-top: 0;
    border-left: 1px solid var(--panel-line);
  }

  .flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -8px;
    width: 14px;
    height: 14px;
    border-top: 1px solid var(--panel-line);
    border-right: 1px solid var(--panel-line);
    background: var(--panel);
    transform: translateY(-50%) rotate(45deg);
  }
}

/* ---------- Колонки ---------- */

.cols {
  display: grid;
  gap: 32px;
  margin-top: 44px;
}

.cols--tight {
  margin-top: 0;
}

@media (min-width: 760px) {
  .cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }

  .cols--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.col,
.state article,
.roadmap article {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.col::before,
.state article::before,
.roadmap article::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
}

.col--accent::before,
.state article:last-child::before,
.roadmap article::before {
  background: var(--accent);
}

.col h3 {
  margin-top: 10px;
  font-size: 1.36rem;
}

.col p,
.col ul {
  margin-top: 10px;
}

.col ul {
  padding-left: 1.1em;
}

.col li + li {
  margin-top: 6px;
}

.kv {
  margin: 12px 0 0;
}

.kv div + div {
  margin-top: 8px;
}

.kv dt {
  display: inline;
  color: var(--ink);
  font-weight: 650;
}

.kv dd {
  display: inline;
  margin: 0;
}

/* ---------- Полоса-пояснение ---------- */

.band {
  display: grid;
  gap: 6px 28px;
  margin-top: 32px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.band b {
  color: var(--ink);
  font-weight: 650;
  text-wrap: balance;
}

@media (min-width: 760px) {
  .band {
    grid-template-columns: 280px 1fr;
    align-items: baseline;
    padding: 22px 26px;
  }
}

/* ---------- Цитата и принципы ---------- */

.thesis {
  display: grid;
  gap: 32px;
  margin-top: clamp(48px, 6vw, 72px);
}

@media (min-width: 900px) {
  .thesis {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: start;
  }
}

.quote {
  margin: 0;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: clamp(1.4rem, 1.08rem + 1.25vw, 2.05rem);
  font-weight: 560;
  line-height: 1.26;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.quote cite {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

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

.table-wrap {
  margin-top: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
}

.table th {
  padding: 0 20px 12px 0;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.table td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table td:last-child,
.table th:last-child {
  padding-right: 0;
}

.table td:first-child {
  color: var(--ink);
  font-weight: 650;
}

.table--roles td:first-child {
  width: 14%;
}

.table--roles td:nth-child(2) {
  width: 40%;
}

.table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 759px) {
  .table:not(.table--keep),
  .table:not(.table--keep) tbody,
  .table:not(.table--keep) tr,
  .table:not(.table--keep) td {
    display: block;
    width: 100% !important;
  }

  .table:not(.table--keep) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table:not(.table--keep) tr {
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }

  .table:not(.table--keep) tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .table:not(.table--keep) td {
    padding: 3px 0;
    border: 0;
  }

  .table:not(.table--keep) td:first-child {
    font-size: 1.12rem;
    padding-bottom: 6px;
  }

  .table:not(.table--keep) td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .table:not(.table--keep) td[data-label]:not(:first-child) + td[data-label] {
    margin-top: 8px;
  }

  .table--tests td[data-label]:not(:first-child) {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-top: 0 !important;
  }

  .table--tests td[data-label]:not(:first-child)::before {
    flex: 0 0 96px;
  }
}

/* ---------- Пять артефактов ---------- */

.stack {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

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

.stack__n {
  grid-row: span 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 0.95rem;
}

.stack h4 {
  margin-top: 0;
  line-height: 1.45;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.stack p {
  color: var(--text);
}

.stack small {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (min-width: 900px) {
  .stack li {
    grid-template-columns: 40px 230px 1fr;
    gap: 6px 24px;
    align-items: start;
  }

  .stack__n {
    grid-row: span 2;
  }

  .stack h4 {
    grid-row: span 2;
  }

  .stack p {
    font-size: 1.12rem;
  }
}

/* ---------- Карточки ---------- */

.cards {
  display: grid;
  gap: 18px;
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .cards--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cards--spaced {
  margin-top: 44px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  margin-top: 10px;
  font-size: 1.35rem;
}

.card p {
  margin-top: 10px;
}

.card .kv {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 0.97rem;
}

.card__cmd {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: 1px;
}

/* ---------- Цепочки ---------- */

.chain {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.chain li {
  position: relative;
  padding: 18px 20px;
}

.chain li + li {
  border-top: 1px solid var(--line);
}

.chain b {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.chain span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.chain li:last-child b {
  color: var(--accent);
}

@media (min-width: 860px) {
  .chain {
    grid-template-columns: repeat(4, 1fr);
  }

  .chain--5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .chain li + li {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .chain li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -7px;
    width: 12px;
    height: 12px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--surface);
    transform: translateY(-50%) rotate(45deg);
  }
}

.cmdline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
}

.cmdline > span:first-child {
  margin-right: 4px;
  color: var(--ink);
  font-weight: 650;
}

.cmdline code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  white-space: nowrap;
}

.cmdline i {
  color: var(--muted);
  font-style: normal;
}

/* ---------- Ревью ---------- */

.gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.gate span {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.gate span:last-of-type {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.gate + .cols {
  margin-top: 36px;
}

.gate i {
  color: var(--accent);
  font-style: normal;
}

.pair {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}

@media (min-width: 860px) {
  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.pair > div {
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.pair b {
  color: var(--ink);
}

.principles {
  display: grid;
  gap: 0;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.principles li {
  display: grid;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.principles b {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.principles span {
  color: var(--muted);
}

@media (min-width: 860px) {
  .principles li {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: baseline;
  }
}

/* ---------- Sibling ---------- */

.repo {
  display: grid;
  gap: 18px;
}

.repo__box {
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 4px 0 var(--ink);
}

.repo__box--sibling {
  box-shadow: inset 0 4px 0 var(--accent);
}

.repo__box h3 {
  margin-top: 8px;
}

.repo__box--sibling h3 {
  color: var(--accent);
}

.repo__box ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.repo__box li {
  padding: 11px 0;
  border-top: 1px solid var(--line-2);
}

.repo__links {
  display: grid;
  gap: 12px;
  align-content: center;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.repo__link b {
  display: block;
  color: var(--ink);
  font-weight: 650;
}

.repo__arrow {
  display: block;
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 1;
  transform: rotate(90deg);
}

@media (min-width: 900px) {
  .repo {
    grid-template-columns: 1fr 210px 1fr;
    gap: 26px;
  }

  .repo__arrow {
    font-size: 2.3rem;
    transform: none;
  }
}

/* ---------- Тёмный раздел: пример ---------- */

.section--dark {
  --focus: #dfab46;
  --ink: var(--panel-text);
  --text: #dde3da;
  --muted: var(--panel-muted);
  --line: var(--panel-line);
  --line-2: #2a3e3e;
  --soft: var(--panel-2);
  --surface: var(--panel-2);
  --accent: var(--panel-accent);
  --on-accent: #132120;
  --accent-wash: rgba(195, 244, 142, 0.1);
  background: radial-gradient(70% 50% at 85% 0%, rgba(195, 244, 142, 0.07), transparent 70%), var(--panel);
  color: var(--text);
  border-top: 0;
}

:root[data-theme="dark"] .section--dark {
  box-shadow: inset 0 1px 0 var(--panel-line), inset 0 -1px 0 var(--panel-line);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section--dark {
    box-shadow: inset 0 1px 0 var(--panel-line), inset 0 -1px 0 var(--panel-line);
  }
}

.case {
  display: grid;
  gap: 40px;
}

.case > div {
  min-width: 0;
}

.case .table-wrap {
  overflow-x: auto;
}

@media (min-width: 960px) {
  .case {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }

  .case > div + div {
    padding-left: 48px;
    border-left: 1px solid var(--line);
  }
}

.case h3 {
  margin-bottom: 16px;
}

.formula {
  margin: 28px 0 10px;
  color: var(--accent);
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.result {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 1rem;
}

.result li {
  display: grid;
  grid-template-columns: 3em 1fr auto;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.result li:first-child {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--ink);
}

.rules {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.rules li {
  position: relative;
  padding: 8px 0 8px 22px;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.code {
  margin: 24px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code .k {
  color: var(--accent);
}

.proof {
  display: grid;
  gap: 32px;
}

@media (min-width: 640px) {
  .proof {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

.bignum {
  color: var(--accent);
  font-size: clamp(4rem, 2.6rem + 5vw, 6.6rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.bignum small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.34em;
  letter-spacing: -0.01em;
}

.proof h3 {
  margin-top: 16px;
  font-size: 1.25rem;
}

.proof p {
  margin-top: 8px;
}

.statusline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.statusline li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 2px 14px;
  position: relative;
  padding: 0 0 18px;
}

.statusline li::before {
  content: "";
  position: absolute;
  left: 70px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.statusline li::after {
  content: "";
  position: absolute;
  left: 74px;
  top: 20px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.statusline li:last-child::after {
  display: none;
}

.statusline li:last-child::before {
  background: var(--accent);
}

.statusline time {
  grid-row: span 2;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.statusline code,
.statusline span {
  padding-left: 26px;
}

.statusline code {
  color: var(--ink);
  font-size: 0.86rem;
}

.statusline li:last-child code {
  color: var(--accent);
}

.statusline span {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.order {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.97rem;
}

.order b {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.case-foot {
  max-width: 52em;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Состояние ---------- */

.state {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .state {
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
  }
}

.state h3 {
  margin-top: 10px;
}

.checks,
.steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.checks li,
.steps li {
  position: relative;
  padding: 13px 0 13px 36px;
  border-bottom: 1px solid var(--line);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 21px;
  width: 6px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(40deg);
}

.steps {
  counter-reset: s;
}

.steps li {
  counter-increment: s;
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.steps b,
.checks b {
  color: var(--ink);
  font-weight: 650;
}

.roadmap {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .roadmap {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }
}



.roadmap h3 {
  margin-top: 10px;
}

.roadmap ul {
  margin: 14px 0 0;
  padding-left: 1.1em;
}

.roadmap li {
  margin: 10px 0;
}

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

.footer {
  --focus: #dfab46;
  padding-block: clamp(56px, 8vw, 96px) 40px;
  background: var(--panel);
  color: var(--panel-muted);
}

.footer .mark rect {
  fill: var(--panel-accent);
}

.footer .mark path {
  stroke: var(--panel);
}

.footer__grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 860px) {
  .footer__grid {
    grid-template-columns: 1.3fr 1fr;
    align-items: end;
  }
}

.footer .brand {
  color: var(--panel-text);
}

.footer__say {
  max-width: 30em;
  margin-top: 18px;
  color: var(--panel-text);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.contacts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contacts a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  color: var(--panel-text);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contacts a:hover {
  border-color: var(--panel-accent);
  background: var(--panel-2);
}

.contacts span {
  color: var(--panel-muted);
  font-size: 0.9rem;
}

.contacts b {
  font-weight: 600;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--panel-line);
  font-size: 0.9rem;
}

.footer__meta a {
  color: var(--panel-text);
}

/* ---------- Страница 404 ---------- */

.lost {
  min-height: calc(100vh - 64px);
  display: grid;
  align-content: center;
  padding-block: 64px;
}

.lost h1 {
  margin-top: 22px;
  font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.048em;
}

/* ---------- Подробнее, призыв, команды ---------- */

.more {
  margin-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.more + .more {
  margin-top: 0;
  border-top: 0;
}

.more > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
}

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

.more > summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.more > summary:hover::after {
  border-color: var(--accent);
}

.more[open] > summary::after {
  content: "−";
}

.more__title {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.024em;
  line-height: 1.2;
}

.more__body {
  padding-bottom: 32px;
}

.more__lead {
  max-width: 44em;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta {
  padding-block: clamp(64px, 8vw, 104px);
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta__eyebrow {
  justify-content: center;
}

.cta__eyebrow::after {
  display: none;
}

.cta h2 {
  margin-top: 14px;
}

.cta__actions {
  justify-content: center;
}

.cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.col .rules,
.col .statusline {
  margin-top: 14px;
}

.case > div > .caption {
  margin-top: 12px;
}

p code {
  white-space: nowrap;
}

@media (min-width: 900px) {
  #work .card {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
  }
}

/* ---------- Телефон ---------- */

@media (max-width: 959px) {
  .nav.is-open::before {
    content: "";
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(10, 20, 21, 0.35);
    pointer-events: none;
  }

  .nav.is-open .nav__toggle {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }

  .nav__list {
    z-index: 1;
    background: var(--surface);
    counter-reset: n 1;
  }

  .nav__list li {
    counter-increment: n;
  }

  .nav__list a::before {
    content: counter(n, decimal-leading-zero);
    margin-right: 12px;
    color: var(--accent);
    font: 600 0.8rem var(--mono);
  }

  .station.is-done::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 41px;
    bottom: -13px;
    width: 2px;
    background: var(--panel-accent);
  }
}

@media (max-width: 859px) {
  .flow li {
    display: grid;
    grid-template-columns: 2.2em 1fr;
    column-gap: 8px;
    padding: 14px 18px;
  }

  .flow__n {
    grid-row: span 2;
    padding-top: 7px;
  }

  .flow b {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .lead,
  .col p,
  .note,
  .prose p {
    hyphenate-limit-chars: 10 4 4;
    -webkit-hyphenate-limit-before: 4;
    -webkit-hyphenate-limit-after: 4;
  }

  .code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .pill {
    align-items: flex-start;
    border-radius: 14px;
  }

  .pill__dot {
    margin-top: 5px;
  }

  .actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ---------- Движение ---------- */

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

@media print {
  .topbar,
  .actions,
  .theme-toggle {
    display: none;
  }

  .section {
    break-inside: avoid-page;
  }
}
