/* Главная: одна колонка, плотный ритм. В фоне — поле замеров на canvas,
   которое реагирует на курсор. Все цвета — из переменных темы. */

.home {
  padding: 0;
  position: relative;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- фон: поле замеров ---------- */

.field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .85;
}
.field-veil {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(101deg,
    color-mix(in oklab, var(--bg) 88%, transparent) 0%,
    color-mix(in oklab, var(--bg) 46%, transparent) 26%,
    color-mix(in oklab, var(--bg) 10%, transparent) 50%,
    transparent 66%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- герой: живой сигнал ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding-block: clamp(40px, 5vw, 76px) clamp(30px, 3.6vw, 48px);
}

.live-badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: clamp(20px, 2.4vw, 30px);
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--text-soft);
  opacity: 0; transform: translateY(12px);
  animation: badge-in .7s cubic-bezier(.2,.7,.2,1) .05s forwards;
}
@keyframes badge-in { to { opacity: 1; transform: none; } }
.live-badge .dot {
  width: 7px; height: 7px; flex: none; border-radius: 50%;
  background: var(--accent2); box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent2) 55%, transparent);
  animation: ping 2.4s ease-out infinite;
}
.live-badge .dot.stale { background: var(--warn-fg); animation: none; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent2) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.headline {
  margin: 0;
  font-size: clamp(2.25rem, 4.7vw, 4rem);
  line-height: 1.03;
  letter-spacing: -.033em;
  font-weight: 750;
  text-wrap: balance;
}
.headline-line { display: block; overflow: hidden; padding-bottom: .08em; }
.headline-line > span { display: block; }
html.js .headline-line > span {
  transform: translateY(108%);
  animation: line-in .85s cubic-bezier(.18,.76,.2,1) forwards;
}
html.js .headline-line:nth-child(1) > span { animation-delay: .12s; }
html.js .headline-line:nth-child(2) > span { animation-delay: .21s; }
html.js .headline-line:nth-child(3) > span { animation-delay: .30s; }
@keyframes line-in { to { transform: translateY(0); } }
.headline em {
  font-style: normal;
  color: var(--link);
  position: relative;
  white-space: nowrap;
}
.headline em::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -.02em; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  animation: underline-in .6s cubic-bezier(.2,.7,.2,1) .95s forwards;
  opacity: .55;
}
@keyframes underline-in { to { transform: scaleX(1); } }

.lede {
  margin: clamp(18px, 2vw, 26px) 0 0;
  max-width: 55ch;
  font-size: clamp(1rem, 1.1vw, 1.0625rem);
  line-height: 1.62;
  color: var(--text-soft);
  opacity: 0; transform: translateY(14px);
  animation: soft-in .8s cubic-bezier(.2,.7,.2,1) .58s forwards;
}
@keyframes soft-in { to { opacity: 1; transform: none; } }

.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; opacity: 0; transform: translateY(14px); animation: soft-in .8s cubic-bezier(.2,.7,.2,1) .72s forwards; }
.btn.big { padding: 13px 22px; font-size: 15px; border-radius: 11px; }

/* ---------- радар в герое ---------- */

.beacon {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 0;
  opacity: 0; transform: scale(.94);
  animation: beacon-in 1.1s cubic-bezier(.2,.7,.2,1) .35s forwards;
}
@keyframes beacon-in { to { opacity: 1; transform: none; } }
.beacon-stage { position: relative; width: min(100%, 340px); aspect-ratio: 1; }
.radar {
  position: absolute; inset: 4%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in oklab, var(--accent) 12%, transparent) 0%,
    color-mix(in oklab, var(--accent) 5%, transparent) 38%,
    transparent 70%);
  border: 1px solid color-mix(in oklab, var(--accent) 24%, var(--line));
}
.radar-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent calc(50% - .5px), color-mix(in oklab, var(--line-hover) 55%, transparent) 50%, transparent calc(50% + .5px)),
    linear-gradient(to bottom, transparent calc(50% - .5px), color-mix(in oklab, var(--line-hover) 55%, transparent) 50%, transparent calc(50% + .5px));
}
.radar-ring {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--line));
  transform: translate(-50%, -50%);
}
.radar-ring.r1 { width: 34%; height: 34%; }
.radar-ring.r2 { width: 62%; height: 62%; }
.radar-ring.r3 { width: 88%; height: 88%; }
.radar-core {
  position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 18%, transparent), 0 0 18px color-mix(in oklab, var(--accent) 60%, transparent);
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    transparent 300deg,
    color-mix(in oklab, var(--accent) 3%, transparent) 330deg,
    color-mix(in oklab, var(--accent) 34%, transparent) 358deg,
    color-mix(in oklab, var(--accent) 70%, transparent) 360deg);
  animation: sweep 5.5s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.blip {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 10px 2px color-mix(in oklab, var(--accent2) 65%, transparent);
  opacity: 0;
  animation: blip 5.5s ease-out infinite;
}
.blip::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--accent2) 70%, transparent);
  animation: blip-ring 2.2s ease-out infinite;
}
@keyframes blip-ring { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.b1 { top: 24%; left: 67%; animation-delay: .4s; }
.b2 { top: 39%; left: 80%; animation-delay: 1.1s; }
.b3 { top: 70%; left: 69%; animation-delay: 2.0s; }
.b4 { top: 76%; left: 33%; animation-delay: 2.8s; }
.b5 { top: 40%; left: 23%; animation-delay: 3.6s; }
.b6 { top: 26%; left: 47%; animation-delay: 4.4s; }
@keyframes blip {
  0%, 8% { opacity: 0; transform: scale(.4); }
  14% { opacity: 1; transform: scale(1); }
  60% { opacity: .8; }
  100% { opacity: 0; transform: scale(.7); }
}
.radar-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar-line path {
  stroke: color-mix(in oklab, var(--accent) 45%, var(--line));
  stroke-width: 1; stroke-dasharray: 3 5;
  opacity: .7;
}
.beacon-caption { text-align: center; margin-top: 14px; }
.beacon-title {
  display: block; font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text);
}
.beacon-sub { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }

/* ---------- четыре блока статистики ---------- */

.pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(8px, 1.4vw, 18px);
  padding-bottom: clamp(24px, 3vw, 40px);
}
.pulse-card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 72%, transparent);
  overflow: hidden;
  opacity: 0; transform: translateY(16px);
  animation: soft-in .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.pulse-card:nth-child(1) { animation-delay: .80s; }
.pulse-card:nth-child(2) { animation-delay: .90s; }
.pulse-card:nth-child(3) { animation-delay: 1.0s; }
.pulse-card:nth-child(4) { animation-delay: 1.1s; }
.pulse-card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: .55;
}
.pulse-ico {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--link);
}
.pulse-ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pulse-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pulse-num {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.pulse-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-left: auto; flex: none; opacity: .8; }
.pulse-spark i {
  width: 3px; border-radius: 2px; background: var(--accent);
  height: 30%; transform-origin: bottom;
  animation: bar-breathe 2.8s ease-in-out infinite;
}
.pulse-spark i:nth-child(2) { animation-delay: .18s; }
.pulse-spark i:nth-child(3) { animation-delay: .36s; }
.pulse-spark i:nth-child(4) { animation-delay: .54s; }
.pulse-spark i:nth-child(5) { animation-delay: .72s; }
.pulse-spark.alt i { background: var(--accent2); }
@keyframes bar-breathe { 0%,100% { transform: scaleY(.55); } 50% { transform: scaleY(1.45); } }

/* ---------- секции ---------- */

.sec {
  padding-block: clamp(34px, 4vw, 58px);
  border-top: 1px solid var(--line);
}
.sec-head { max-width: 68ch; }
.sec-kicker {
  margin: 0 0 10px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.95rem);
  line-height: 1.16;
  letter-spacing: -.025em;
  font-weight: 650;
  text-wrap: balance;
}
.sec-lede {
  margin: 12px 0 0;
  font-size: clamp(.9375rem, 1.05vw, 1rem);
  line-height: 1.62;
  color: var(--text-soft);
  max-width: 62ch;
}

/* ---------- шаги ---------- */

.steps {
  list-style: none;
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 28px;
  counter-reset: none;
}
.steps li { min-width: 0; }
.step-num {
  display: block;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-hover);
}
.steps h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.32;
  letter-spacing: -.01em;
  font-weight: 620;
}
.steps p { margin: 0; font-size: 13.5px; line-height: 1.58; color: var(--text-soft); }

/* ---------- схема расчёта ---------- */

.calc {
  margin: clamp(26px, 3vw, 38px) 0 0;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 78%, transparent);
  backdrop-filter: blur(3px);
}
.calc-title {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: var(--mono, ui-monospace, monospace);
}
.calc-body {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}
.calc-graph { width: 100%; height: auto; display: block; color: var(--accent); }
.calc-nums {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.calc-nums dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.35;
}
.calc-nums dd {
  margin: 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 20px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}
.calc-nums dd span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
}
.calc-out { padding-left: 18px; border-left: 1px solid var(--line); }
.calc-out dd { color: var(--link); }
.calc-note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 78ch;
}

/* ---------- словарь ---------- */

.digits {
  list-style: none;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
}
.digits li {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.dg-sample {
  display: inline-block;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
}
.dg-dash { color: var(--muted); }
.digits p {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--text-soft);
  max-width: 46ch;
}

/* ---------- живые примеры ---------- */

.live { list-style: none; margin: clamp(22px, 2.6vw, 32px) 0 0; padding: 0; }
.live-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.live-card:last-child { border-bottom: 1px solid var(--line); }
.live-thumb {
  display: block;
  border-radius: 9px;
  overflow: hidden;
  background: var(--thumb-grad);
  aspect-ratio: 4/5;
}
.live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-ph {
  display: grid; place-items: center; height: 100%;
  font-size: 11px; color: var(--thumb-ph); font-family: var(--mono, monospace);
}
.live-comm {
  display: inline-block;
  font-weight: 620;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--text);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-comm:hover { color: var(--link); }
.live-nums {
  margin: 5px 0 0;
  display: flex; flex-wrap: wrap; gap: 5px 16px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.live-vph { color: var(--link); }
.live-txt {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.more {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--link);
  border-bottom: 1px solid color-mix(in oklab, var(--link) 40%, transparent);
  padding-bottom: 2px;
}
.more:hover { border-bottom-color: var(--link); }
.empty-note {
  margin: 20px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-soft);
  padding: 14px 16px;
  border: 1px dashed var(--line-hover);
  border-radius: 12px;
  max-width: 60ch;
}

/* график (появляется, когда в базе достаточно замеров) */

.speed {
  margin: 26px 0 0;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(3px);
}
.speed-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 8px;
  font-size: 12.5px; color: var(--muted);
}
.speed-title { font-family: var(--mono, ui-monospace, monospace); }
.speed-read {
  font-family: var(--mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
  min-height: 1.2em;
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
}
.speed-plot { position: relative; }
.speed-plot canvas { display: block; width: 100%; height: 240px; }
.speed-cursor {
  position: absolute; top: 0; left: 0; width: 1px; height: 100%;
  background: var(--line-hover);
  opacity: 0;
  transition: opacity .12s ease;
  pointer-events: none;
}
.speed-cursor.on { opacity: 1; }
.speed figcaption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- границы ---------- */

.limits {
  list-style: none;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 30px;
}
.limits li { padding-top: 14px; border-top: 1px solid var(--line); min-width: 0; }
.limits h3 {
  margin: 0 0 7px;
  font-size: 14.5px;
  line-height: 1.32;
  font-weight: 620;
  letter-spacing: -.01em;
}
.limits p { margin: 0; font-size: 13px; line-height: 1.58; color: var(--text-soft); }

/* ---------- доступ после входа ---------- */

.sec--access { border-top: 1px solid var(--line); }
.access {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 50%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 55%),
    color-mix(in oklab, var(--surface) 70%, transparent);
}
.access-visual { position: relative; display: grid; place-items: center; min-height: 190px; }
.access-orbit { position: absolute; inset: 0; }
.access-orbit span {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--accent) 24%, var(--line));
  transform: translate(-50%, -50%);
}
.access-orbit span:nth-child(1) { width: 96px; height: 96px; }
.access-orbit span:nth-child(2) { width: 150px; height: 150px; border-style: dashed; animation: orbit-spin 28s linear infinite; }
.access-orbit span:nth-child(3) { width: 200px; height: 200px; }
@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.access-lock {
  position: relative; width: 66px; height: 66px; color: var(--link);
  filter: drop-shadow(0 6px 14px color-mix(in oklab, var(--accent) 28%, transparent));
}
.access-main h2 { max-width: 20ch; }
.access-main .sec-lede { max-width: 66ch; margin-top: 14px; }
.access-main .sec-lede b { color: var(--text); font-weight: 650; }
.sec--access .acts { margin-top: 24px; }
.access-note {
  margin: 18px 0 0; font-size: 12px; color: var(--muted);
  font-family: var(--mono, ui-monospace, monospace);
}

/* ---------- якоря и фокус ---------- */

.sec { scroll-margin-top: 96px; }

.home a:focus-visible,
.home button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- адаптив ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 20px; align-items: center; padding-block: 34px 24px; }
  .beacon { width: 100%; max-width: 280px; margin: 0 auto; }
  .beacon-stage { width: min(100%, 230px); margin: 0 auto; }
  .beacon-caption { margin-top: 6px; }
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .free { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .beacon { max-width: 300px; }
  .field { opacity: .4; }
  .field-veil { display: none; }
  .calc-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .calc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .calc-out { padding-left: 0; border-left: 0; }
  .digits { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 620px) {
  .page { padding: 0 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .limits { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .acts .btn { flex: 1 1 100%; justify-content: center; }
  .live-card { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .beacon-stage { width: min(100%, 240px); }
  .pulse { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pulse-card { padding: 14px; }
  .access { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 8px; }
  .access-visual { min-height: 150px; }
  .access-orbit span:nth-child(3) { width: 170px; height: 170px; }
  .access-orbit span:nth-child(2) { width: 126px; height: 126px; }
  .access-orbit span:nth-child(1) { width: 82px; height: 82px; }
}

/* ---------- без анимации ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js .headline-line > span,
  .live-badge, .lede, .acts, .beacon, .pulse-card,
  .headline em::after { animation: none; opacity: 1; transform: none; }
  .radar-sweep, .blip, .blip::after, .pulse-spark i,
  .live-badge .dot, .access-orbit span:nth-child(2) { animation: none; }
  .blip { opacity: .8; }
  .speed-cursor { transition: none; }
}

/* ===== компактнее: без пустых провалов, но с ритмом ===== */
.hero{padding-block:clamp(26px,3.2vw,44px) clamp(18px,2.2vw,28px)}
.hero .lede{margin-top:16px;max-width:52ch}
.hero .acts{margin-top:20px}
.sec{padding-block:clamp(24px,2.8vw,40px)}
.sec-head{max-width:60ch}
.sec-lede{margin-top:8px}
.steps{margin-top:clamp(18px,2vw,26px);gap:14px}
.steps h3{margin-bottom:6px}
.steps p{font-size:13.5px;line-height:1.5}
.digits{margin-top:clamp(16px,1.8vw,22px)}
.digits p{line-height:1.45}
.calc{margin-top:clamp(20px,2.2vw,28px)}
.live{margin-top:clamp(14px,1.6vw,20px)}
.speed{margin-top:clamp(18px,2vw,26px)}
.sec--free{padding-block:clamp(26px,3vw,40px)}
.free{gap:clamp(18px,2vw,28px)}

/* заголовки секций ближе к своему содержимому */
.sec-kicker{margin-bottom:7px}
.sec-head h2{margin:0}

/* превью в ленте: если картинка VK протухла, остаётся аккуратная заглушка */
.live-thumb{position:relative;overflow:hidden}
.live-thumb .live-ph{position:absolute;inset:0;z-index:0}
.live-thumb img{position:relative;z-index:1}

/* ---------- ниши дня ---------- */

.sec-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
}
.sec-link {
  flex: none;
  font-size: 13px;
  color: var(--link);
  padding: 4px 2px;
  border-bottom: 1px solid color-mix(in oklab, var(--link) 40%, transparent);
  transition: border-color .12s, color .12s;
}
.sec-link:hover { border-bottom-color: var(--link); color: var(--accent); }

/* ---------- ниши дня ---------- */

/* Сигнальные цвета темы бледные в светлых схемах: в cream «рост» на светлом
   фоне давал 1.6:1, спарклайн в citrus — 2.9:1. Подмешиваем к ним цвет текста:
   оттенок остаётся «своим», а контраст выходит ≥4.5:1 в любой из схем. */
.sec--niches {
  --nc-up: color-mix(in oklab, var(--accent2) 55%, var(--text));
  --nc-spark: color-mix(in oklab, var(--accent) 68%, var(--text));
  --nc-bar-a: color-mix(in oklab, var(--accent) 14%, transparent);
  --nc-bar-b: color-mix(in oklab, var(--accent) 9%, transparent);
  --nc-bar-edge: color-mix(in oklab, var(--accent) 82%, var(--text));
  --nc-rule: color-mix(in oklab, var(--text) 10%, transparent);
  /* якорь #niches не должен уезжать под липкую шапку */
  scroll-margin-top: 96px;
}

.niches-sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 66ch;
}

.niches {
  list-style: none;
  margin: clamp(14px, 1.8vw, 20px) 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.niches li + li { border-top: 1px solid var(--nc-rule); }

/* Колонки фиксированных ширин: цифры стоят в столбик от строки к строке,
   «1fr» забирает остаток на название. */
.niche {
  --nc-gap: clamp(10px, 1.2vw, 16px);
  /* спарклайн + просмотры + постов + Δ с отбивками и небольшим воздухом —
     зона, куда бар объёма не заходит, чтобы засечка не резала график и цифры */
  --nc-numzone: calc(64px + 96px + 62px + 56px + 4 * var(--nc-gap) + 16px + 8px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 96px 62px 56px;
  align-items: center;
  column-gap: var(--nc-gap);
  padding: 12px 16px;
  isolation: isolate;
  transition: background-color .12s;
}
.niche:hover { background-color: var(--hover); }
.niche:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, var(--text));
  outline-offset: -2px;
}

/* бар объёма: доля ниши от самой крупной за сутки.
   Живёт только в «графической» зоне слева от цифр (--wp — доля в процентах),
   иначе засечка бьёт по правым столбцам. Заливка тихая, правый край — чёткая
   засечка: без неё длину не прочитать. */
.niche-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc((100% - var(--nc-numzone)) * var(--wp, 0) / 100);
  max-width: 100%;
  z-index: -1;
  background: linear-gradient(90deg, var(--nc-bar-a) 0%, var(--nc-bar-b) 100%);
  border-right: 2px solid var(--nc-bar-edge);
  pointer-events: none;
}

/* название: две строки максимум, дальше аккуратное многоточие.
   Полный текст всегда в title ссылки. */
.niche-name {
  font-size: clamp(.9375rem, .35vw + .75rem, 1rem);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.012em;
  color: var(--text);
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.niche-spark {
  display: block;
  width: 64px;
  height: 18px;
  color: var(--nc-spark);
}

.niche-sum {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -.005em;
}
/* «просм.» не должно спорить с самим числом */
.niche-sum-unit { font-size: .9em; opacity: .85; }

.niche-cur {
  font-size: clamp(1rem, .3vw + .9rem, 1.125rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  letter-spacing: -.02em;
  color: var(--text);
}
.niche-delta {
  font-size: 13px;
  font-weight: 650;
  font-style: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.niche-delta.up { color: var(--nc-up); }
.niche-delta.down { color: var(--bad-fg); }
.niche-delta.flat { color: var(--muted); }
.niche-delta.new { color: var(--warn-fg); }

.niches-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 74ch;
}
.niches-note a { color: var(--link); border-bottom: 1px solid color-mix(in oklab, var(--link) 34%, transparent); }
.niches-note a:hover { border-bottom-color: var(--link); }

/* Сверх пяти тем: лишние строки прячет JS (класс is-collapsed на списке),
   а не разметка — без скрипта список остаётся полным, кнопка не появляется.
   Высоту не анимируем: display:none честнее, чем список, который «плывёт». */
.niches.is-collapsed li.niche-extra { display: none; }

.niches-more { margin: 10px 0 0; }

.niches-toggle {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.005em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.niches-toggle:hover {
  background: var(--hover);
  border-color: color-mix(in oklab, var(--accent) 42%, var(--line));
}
.niches-toggle:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, var(--text));
  outline-offset: 2px;
}

/* телефон: название и цифры в первой строке, спарклайн и просмотры — во второй.
   Ширины «цифровых» колонок те же, чтобы столбик не гулял между строками. */
@media (max-width: 640px) {
  .sec--niches { scroll-margin-top: 120px; }
  .niches-sub { font-size: 12.5px; max-width: none; }
  .niche {
    --nc-gap: 10px;
    --nc-numzone: calc(54px + 52px + 2 * var(--nc-gap) + 13px + 6px);
    grid-template-columns: minmax(0, 1fr) 54px 52px;
    grid-template-areas:
      "name  cur   delta"
      "spark sum   sum";
    column-gap: var(--nc-gap);
    row-gap: 3px;
    padding: 11px 13px;
  }
  .niche-name { grid-area: name; font-size: .9375rem; }
  .niche-cur { grid-area: cur; font-size: 1.0625rem; }
  .niche-delta { grid-area: delta; font-size: 12.5px; }
  .niche-spark { grid-area: spark; width: 56px; height: 16px; }
  .niche-sum { grid-area: sum; font-size: 11.5px; }
  .niches-note { font-size: 12px; }
  .niches-toggle { font-size: 12.5px; padding: 7px 13px; }
}