/* ==========================================================================
   Публичные страницы: шапка, герой, секции, футер, служебные слои.
   ========================================================================== */

main { position: relative; z-index: 1; }

/* --- Служебные слои: прогресс, шторка, прелоадер, курсор --- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 120;
  pointer-events: none;
}

.wipe {
  position: fixed;
  inset: 0;
  z-index: 290;
  pointer-events: none;
  background: var(--ink);
  transform: translateY(101%);
}
.wipe::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  background: var(--accent);
}
.wipe-in .wipe { transform: translateY(0); transition: transform 0.5s var(--ease-io); }
.is-wiping .wipe { transform: translateY(0); }
.is-wiping.wipe-out .wipe { transform: translateY(-101%); transition: transform 0.8s var(--ease-io); }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s var(--ease-io);
}
html:not(.first-visit) .preloader, .reduce .preloader { display: none; }
.preloader.is-done { clip-path: inset(0 0 100% 0); }
.preloader__top { display: flex; justify-content: space-between; align-items: flex-start; color: #8d8a82; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.preloader__brand { align-self: center; display: flex; align-items: center; gap: clamp(18px, 3vw, 48px); }
.preloader__mark { width: clamp(96px, 16vw, 260px); height: auto; overflow: visible; flex: none; }
.preloader__mark path { fill: none; stroke-width: 2.2; stroke-linejoin: miter; }
.preloader__mark .pm-ghost { stroke: rgba(235, 233, 227, 0.14); }
.preloader__mark .pm-draw { stroke: var(--paper); }
.preloader__mark .pm-pulse { stroke: var(--accent); stroke-width: 2.6; }
.preloader__word { position: relative; font-weight: 800; font-size: clamp(44px, 9vw, 168px); line-height: 0.9; letter-spacing: -0.05em; text-transform: uppercase; font-variation-settings: 'SHRP' 100; white-space: nowrap; }
.preloader__word .pw-ghost { color: transparent; -webkit-text-stroke: 1px rgba(235, 233, 227, 0.22); }
.preloader__word .pw-fill { position: absolute; inset: 0; color: var(--paper); clip-path: inset(0 100% 0 0); }
@media (max-width: 640px) { .preloader__brand { flex-direction: column; align-items: flex-start; } }
.preloader__num {
  font-family: var(--f-mono);
  font-weight: 300;
  font-stretch: 75%;
  font-size: clamp(72px, 16vw, 260px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: flex-start; gap: .04em;
}
.preloader__num small { font-size: .28em; line-height: 1; margin-top: .12em; color: var(--accent); letter-spacing: 0; }
.preloader__bottom { display: grid; gap: 14px; }
.preloader__track { height: 1px; background: rgba(235, 233, 227, 0.2); position: relative; overflow: hidden; }
.preloader__bar { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.has-cursor, .has-cursor a, .has-cursor button, .has-cursor label { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 280;
  width: 0;
  height: 0;
  pointer-events: none;
  mix-blend-mode: difference;
}
.cursor::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  left: -6px;
  top: -6px;
  background: #fff;
  transition: transform 0.35s var(--ease), width 0.35s var(--ease), height 0.35s var(--ease), left 0.35s var(--ease), top 0.35s var(--ease);
}
.cursor.is-link::before { width: 44px; height: 44px; left: -22px; top: -22px; transform: rotate(45deg); }
.cursor.is-text::before { width: 2px; height: 26px; left: -1px; top: -13px; }
.cursor.has-label::before { width: 92px; height: 92px; left: -46px; top: -46px; transform: none; }
.cursor__label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  color: #000;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor.has-label .cursor__label { opacity: 1; }

/* --- Шапка --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: transform 0.6s var(--ease), background 0.3s, border-color 0.3s;
}
.site-header.is-scrolled { background: rgba(235, 233, 227, 0.88); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-101%); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }

.nav { display: flex; gap: 26px; margin-left: 24px; }
.nav a { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; font-stretch: 87.5%; position: relative; padding: 4px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform var(--t) var(--ease); }
.nav a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); transform-origin: 0 50%; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.header-actions .link { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; font-stretch: 87.5%; }

.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--ink); position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease), opacity 0.2s; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 26px; }
.menu-open .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  padding: calc(var(--header-h) + 24px) var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-io);
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-open .site-header { color: var(--paper); background: transparent; border-color: transparent; backdrop-filter: none; }
.menu-open .burger { border-color: var(--paper); }
.mobile-menu nav { display: grid; }
.mobile-menu nav a {
  font-size: clamp(30px, 9.6vw, 72px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 1;
  padding: 10px 0;
  border-bottom: 1px solid rgba(235, 233, 227, 0.14);
  font-variation-settings: 'SHRP' 100;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.menu-open .mobile-menu nav a { transform: none; opacity: 1; }
.mobile-menu nav a:nth-child(2) { transition-delay: 0.05s; }
.mobile-menu nav a:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu nav a:nth-child(4) { transition-delay: 0.15s; }
.mobile-menu nav a:nth-child(5) { transition-delay: 0.2s; }
.mobile-menu nav a:nth-child(6) { transition-delay: 0.25s; }
.mobile-menu .btn { width: 100%; }

@media (max-width: 960px) {
  .nav, .header-actions .link, .header-actions .btn { display: none; }
  .burger { display: block; }
}

/* --- Секции --- */
.section { position: relative; padding: clamp(88px, 11vw, 176px) 0; border-top: 1px solid var(--rule); }
.section__head { margin-bottom: clamp(44px, 6vw, 104px); align-items: end; }
.section__index { grid-column: 1 / span 3; display: flex; gap: 10px; align-items: center; padding-bottom: 0.6em; }
.section__index .num { color: var(--accent); }
.section__title { grid-column: 4 / span 9; }
@media (max-width: 960px) {
  .section__index { grid-column: 1 / -1; padding-bottom: 18px; }
  .section__title { grid-column: 1 / -1; }
}

/* --- Герой --- */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(16px, 2vw, 32px)); min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.hero > .wrap { container-type: inline-size; }
.hero__meta { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: clamp(14px, 2vw, 28px); }
.hero__live { display: grid; gap: 6px; text-align: right; }
.hero__live-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.hero__title {
  font-size: clamp(36px, 9.4vw, 172px);
  font-size: min(clamp(52px, 9.4vw, 172px), 15cqi);
  line-height: 1.04;
  position: relative;
}
.hero__title .line { display: block; white-space: nowrap; }
.hero__title .line--accent { color: var(--accent); }
.hero__title .blk {
  display: inline-block;
  width: 0.5em;
  height: 0.74em;
  background: var(--ink);
  margin-left: 0.06em;
  vertical-align: baseline;
  animation: blink 1.05s steps(2, jump-none) infinite;
}
.hero__aside {
  position: absolute;
  right: 0;
  bottom: 0.15em;
  width: min(330px, 26vw);
  font-family: var(--f-display);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.45;
  font-weight: 400;
  font-size: 15px;
  color: var(--fg-2);
  font-variation-settings: 'SHRP' 20;
}
.hero__aside .mono { display: block; margin-bottom: 10px; color: var(--fg); }
.hero__scope {
  position: relative;
  height: clamp(110px, 16vh, 200px);
  margin: clamp(16px, 2vw, 30px) 0 0;
  border-bottom: 1px solid var(--rule);
}
.hero__scope::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s var(--ease-io) 0.2s; }
.hero__scope.is-in::before, .reduce .hero__scope::before, html:not(.js) .hero__scope::before { transform: scaleX(1); }
.hero__scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bottom { padding: clamp(18px, 2vw, 28px) 0 clamp(20px, 2.4vw, 32px); align-items: end; row-gap: 28px; }
.hero__lead { grid-column: 1 / span 5; }
.hero__url { grid-column: 6 / span 4; }
.hero__cta { grid-column: 10 / span 3; display: flex; flex-direction: column; gap: 10px; }
.hero__cta .btn { width: 100%; }
@media (max-width: 1100px) {
  .hero__lead { grid-column: 1 / span 7; }
  .hero__url { grid-column: 1 / span 7; }
  .hero__cta { grid-column: 8 / span 5; grid-row: 1 / span 2; align-self: end; }
  .hero__aside { display: none; }
}
@media (max-width: 760px) {
  .hero__meta { flex-direction: column; }
  .hero__live { text-align: left; }
  .hero__live-row { justify-content: flex-start; }
  .hero__lead, .hero__url, .hero__cta { grid-column: 1 / -1; grid-row: auto; }
}

.urlchip {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink);
  height: 52px;
  font-family: var(--f-code);
  font-size: 14px;
  min-width: 0;
  background: var(--paper);
}
.urlchip__k { display: flex; align-items: center; padding: 0 12px; background: var(--ink); color: var(--paper); font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; flex: none; }
.urlchip__v { display: flex; align-items: center; padding: 0 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; min-width: 0; }
.urlchip__copy { flex: none; width: 52px; border-left: 1px solid var(--ink); display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast); }
.urlchip__copy:hover { background: var(--accent); }
.urlchip-label { margin-bottom: 8px; display: block; }

/* --- Бегущая строка --- */
.ticker { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; height: 58px; display: flex; align-items: center; position: relative; z-index: 2; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.ticker__item { display: flex; align-items: center; gap: 14px; padding: 0 28px; white-space: nowrap; font-family: var(--f-mono); font-size: 12px; font-stretch: 87.5%; text-transform: uppercase; }
.ticker__item b { font-weight: 600; }
.ticker__item .sq { width: 8px; height: 8px; background: var(--accent); }
.ticker__item .up { color: var(--fg-muted); }

/* --- Подключение: шаги + терминал --- */
.connect { align-items: start; }
.steps { grid-column: 1 / span 5; border-top: 1px solid var(--ink); }
.term { grid-column: 7 / span 6; position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1100px) {
  .steps, .term { grid-column: 1 / -1; position: static; }
  .term { margin-top: 48px; }
}
.step { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--rule); position: relative; }
.step__n { font-family: var(--f-mono); font-size: 48px; font-weight: 300; font-stretch: 75%; line-height: 0.9; letter-spacing: -0.05em; transition: color var(--t) var(--ease), transform var(--t) var(--ease); }
.step:hover .step__n { color: var(--accent-text); transform: translateX(6px); }
.step__t { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; line-height: 1.15; }
.step p { margin: 0; color: var(--fg-2); }

.term__box { background: var(--ink); color: #e9e6dd; border: 1px solid var(--ink); box-shadow: 14px 14px 0 var(--accent); }
.term__bar { display: flex; align-items: stretch; border-bottom: 1px solid rgba(235, 233, 227, 0.14); overflow-x: auto; scrollbar-width: none; }
.term__bar::-webkit-scrollbar { display: none; }
.term__tab {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  font-stretch: 87.5%;
  padding: 0 16px;
  height: 46px;
  color: #8d8a82;
  border-right: 1px solid rgba(235, 233, 227, 0.14);
  white-space: nowrap;
  position: relative;
  transition: color var(--t-fast);
}
.term__tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform var(--t) var(--ease); }
.term__tab:hover { color: #e9e6dd; }
.term__tab[aria-selected='true'] { color: #e9e6dd; }
.term__tab[aria-selected='true']::after { transform: scaleX(1); }
.term__copy { margin-left: auto; padding: 0 16px; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; color: #e9e6dd; display: flex; align-items: center; gap: 8px; flex: none; }
.term__copy:hover { color: var(--accent); }
.term__file { padding: 12px 22px 0; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; color: #8d8a82; }
.term pre { margin: 0; padding: 14px 22px 26px; min-height: 280px; font-family: var(--f-code); font-size: 13.5px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.caret { display: inline-block; width: 0.6em; height: 1.15em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s steps(2, jump-none) infinite; }
.term__note { margin-top: 36px; color: var(--fg-muted); font-size: 14px; max-width: 60ch; }

/* --- Сцена «как это работает» (прикреплённая прокрутка) --- */
.story { position: relative; height: 420vh; border-top: 1px solid var(--rule); }
.story__sticky { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: calc(var(--header-h) + 16px) 0 clamp(16px, 3vh, 36px); overflow: hidden; }
.story__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.story__counter { font-family: var(--f-mono); font-stretch: 75%; font-weight: 300; font-size: clamp(40px, 6vw, 88px); line-height: 0.85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.story__counter span { color: var(--fg-muted); }
.story__stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 12px 0; }
.story__stage svg { width: 100%; height: 100%; max-height: 54vh; overflow: visible; }
.story-svg--tall { display: none; }
.story-svg--tall .sv-label { font-size: 16px; }
.story-svg--tall .sv-small { font-size: 12.5px; }
@media (max-width: 760px) {
  .story-svg--wide { display: none; }
  .story-svg--tall { display: block; }
  .story__stage svg.story-svg--tall { max-height: 52svh; }
}
.story__steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.story__step { padding: 16px 18px 0 0; position: relative; opacity: 0.35; transition: opacity 0.5s var(--ease); }
.story__step::before { content: ''; position: absolute; top: -1px; left: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.story__step.is-active, .story__step.is-done { opacity: 1; }
.story__step h3 { font-size: 15px; font-weight: 700; margin: 6px 0 6px; letter-spacing: -0.01em; text-transform: uppercase; }
.story__step p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--fg-2); max-width: 34ch; }
@media (max-width: 860px) {
  .story { height: 360vh; }
  .story__steps { grid-template-columns: 1fr; }
  .story__step { display: none; padding-right: 0; }
  .story__step.is-active { display: block; }
}

/* SVG сцены */
.sv-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.sv-box--ink { fill: var(--ink); }
.sv-label { font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; fill: var(--ink); letter-spacing: 0.02em; }
.sv-label--inv { fill: var(--paper); }
.sv-small { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); text-transform: uppercase; }
.sv-wire { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.sv-wire--ghost { stroke: var(--line); stroke-dasharray: 4 6; }
.sv-wire--back { stroke: var(--accent); stroke-width: 2.5; }
.sv-packet { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.sv-bad { stroke: var(--bad); stroke-width: 3; }
.sv-bar-bg { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.sv-bar-hold { fill: url(#hatch); }
.sv-bar-spent { fill: var(--ink); }
.sv-state { transition: opacity 0.4s var(--ease); }

/* --- Таблица цен --- */
.filters { display: flex; flex-wrap: nowrap; gap: 0; border: 1px solid var(--ink); width: max-content; max-width: 100%; margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; }
.filters button { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; font-stretch: 87.5%; height: 40px; padding: 0 16px; border-right: 1px solid var(--ink); transition: background var(--t-fast), color var(--t-fast); }
.filters button:last-child { border-right: 0; }
.filters button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.filters button:not([aria-pressed='true']):hover { background: var(--paper-2); }

.ptable { width: 100%; border-collapse: collapse; }
.ptable th { text-align: left; font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; font-weight: 450; font-stretch: 87.5%; color: var(--fg-muted); padding: 0 14px 14px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.ptable th.r, .ptable td.r { text-align: right; }
.ptable td {
  padding: 24px 14px 24px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / 0 100%;
  transition: background-size 0.55s var(--ease), color 0.3s;
}
.ptable td:first-child { padding-left: 14px; }
.ptable td:last-child { padding-right: 14px; }
.ptable tbody tr:hover td { background-size: 100% 100%; color: var(--paper); }
.ptable tbody tr:hover .muted { color: #a9a69e; }
.ptable tbody tr:hover .tag { border-color: rgba(235, 233, 227, 0.5); }
.ptable tbody tr td:nth-child(2) { transition-delay: 0.03s; }
.ptable tbody tr td:nth-child(3) { transition-delay: 0.06s; }
.ptable tbody tr td:nth-child(4) { transition-delay: 0.09s; }
.ptable tbody tr td:nth-child(5) { transition-delay: 0.12s; }
.ptable tbody tr td:nth-child(6) { transition-delay: 0.15s; }
.pm-name { font-size: clamp(20px, 1.8vw, 28px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.pm-id { font-family: var(--f-code); font-size: 12px; color: var(--fg-muted); margin-top: 4px; }
.pm-price { font-family: var(--f-mono); font-stretch: 87.5%; font-size: clamp(15px, 1.25vw, 19px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-feats { display: flex; flex-wrap: wrap; gap: 4px; }
.ptable-note { margin-top: 18px; color: var(--fg-muted); font-size: 14px; max-width: 80ch; }
.ptable tbody tr { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 0.06s); }
.ptable.is-in tbody tr, .reduce .ptable tbody tr { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .ptable thead { display: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable td { display: block; width: 100%; }
  .ptable tr { border-bottom: 1px solid var(--ink); padding: 18px 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 10px; }
  .ptable td { border: 0; padding: 0 !important; background: none !important; }
  .ptable tbody tr:hover td { color: inherit; }
  .ptable td:first-child, .ptable td.feats { grid-column: 1 / -1; }
  .ptable td.r { text-align: left; }
  .ptable td[data-l]::before { content: attr(data-l); display: block; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 4px; }
}

/* --- Калькулятор --- */
.calc { align-items: stretch; }
.calc__controls { grid-column: 1 / span 6; display: grid; gap: 30px; align-content: start; }
.calc__result { grid-column: 7 / span 6; padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 520px; }
@media (max-width: 960px) {
  .calc__controls, .calc__result { grid-column: 1 / -1; }
  .calc__result { margin-top: 40px; min-height: 0; }
}
.calc-row { display: grid; gap: 10px; }
.calc-row__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.calc-row__val { font-family: var(--f-mono); font-size: 18px; font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.calc__big { font-family: var(--f-mono); font-stretch: 75%; font-weight: 300; font-size: clamp(54px, 7.4vw, 124px); line-height: 0.9; letter-spacing: -0.05em; display: flex; align-items: baseline; flex-wrap: wrap; }
.calc__big .unit { font-size: 0.42em; margin-left: 0.15em; color: var(--accent); }
.calc__lines { display: grid; border-top: 1px solid var(--rule); }
.calc__line { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.calc__line b { font-family: var(--f-mono); font-weight: 450; font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
.calc__split { display: flex; height: 18px; border: 1px solid var(--rule); }
.calc__split span { height: 100%; transition: width 0.7s var(--ease); }
.calc__split .s-in { background: var(--paper); }
.calc__split .s-cache { background: repeating-linear-gradient(45deg, var(--paper) 0 2px, transparent 2px 6px); }
.calc__split .s-out { background: var(--accent); }
.calc__legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.calc__legend span { display: inline-flex; align-items: center; gap: 8px; }
.calc__legend i { width: 10px; height: 10px; display: inline-block; border: 1px solid var(--fg-muted); }



/* --- Преимущества: сетка с заливкой по направлению --- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.feature { position: relative; overflow: hidden; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: clamp(22px, 2.4vw, 36px); min-height: clamp(300px, 26vw, 400px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; isolation: isolate; }
.dir-fill { position: absolute; inset: 0; background: var(--ink); transform: translate(-101%, 0); transition: transform 0.6s var(--ease); z-index: -1; }
.feature.is-hover { color: var(--paper); }
.feature.is-hover .feature__text { color: #c9c6be; }
.feature.is-hover .feature__icon { color: var(--accent); }
.feature__top { display: flex; justify-content: space-between; align-items: flex-start; }
.feature__icon { width: 64px; height: 64px; transition: color 0.4s; }
.feature__icon path, .feature__icon rect, .feature__icon line, .feature__icon polyline { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.8s var(--ease-io); }
.feature.is-in .feature__icon * { stroke-dashoffset: 0; }
.reduce .feature__icon * { stroke-dashoffset: 0; }
.feature__title { font-size: clamp(22px, 2vw, 30px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 12px; transition: color 0.3s; }
.feature__text { color: var(--fg-2); margin: 0; font-size: 15.5px; transition: color 0.3s; max-width: 40ch; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } .feature { min-height: 0; } }

/* --- Живой статус --- */
.status-list { border-top: 1px solid var(--ink); }
.st-row { display: grid; grid-template-columns: minmax(180px, 2.2fr) 5fr 1fr 1fr; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.st-name { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.st-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 34px; align-items: end; }
.st-bars i { display: block; height: 100%; background: var(--ok); transform: scaleY(0); transform-origin: 50% 100%; transition: transform 0.8s var(--ease); transition-delay: calc(var(--i) * 0.025s); }
.st-bars i.idle { background: var(--paper-3); }
.st-bars i.warn { background: var(--warn); }
.st-bars i.bad { background: var(--bad); }
.is-in .st-bars i, .reduce .st-bars i { transform: scaleY(1); }
.st-num { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.st-num small { display: block; font-size: 10px; color: var(--fg-muted); text-transform: uppercase; }
@media (max-width: 760px) {
  .st-row { grid-template-columns: 1fr 1fr; }
  .st-bars { grid-column: 1 / -1; grid-row: 2; }
  .st-num { text-align: left; }
}

/* --- Бонусы --- */
.bonus { align-items: start; row-gap: 40px; }
.bonus__scale { grid-column: 1 / span 7; }
.bonus__cards { grid-column: 9 / span 4; display: grid; gap: 0; border-top: 1px solid var(--ink); }
@media (max-width: 960px) { .bonus__scale, .bonus__cards { grid-column: 1 / -1; } }
.bscale__readout { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.bscale__amount { font-family: var(--f-mono); font-stretch: 75%; font-weight: 300; font-size: clamp(48px, 6vw, 96px); letter-spacing: -0.05em; line-height: 0.9; }
.bscale__plus { font-family: var(--f-mono); font-stretch: 87.5%; font-size: clamp(18px, 1.6vw, 26px); color: var(--accent-text); }
.bscale__track { position: relative; height: 72px; margin-top: 18px; border-bottom: 1px solid var(--ink); }
.bscale__tick { position: absolute; bottom: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; transition: color 0.3s; }
.bscale__tick::after { content: ''; width: 1px; height: 18px; background: currentColor; }
.bscale__tick.is-on { color: var(--accent-text); }
.bscale__tick b { font-family: var(--f-mono); font-size: 11px; font-weight: 500; }
.bscale__tick span { font-family: var(--f-mono); font-size: 10px; color: var(--fg-muted); }
.bcard { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.bcard__k { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bcard__v { font-size: clamp(26px, 2.4vw, 38px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variation-settings: 'SHRP' 100; }
.bcard p { margin: 10px 0 0; color: var(--fg-2); font-size: 15px; }

/* --- FAQ --- */
.faq { grid-column: 4 / span 9; border-top: 1px solid var(--ink); }
@media (max-width: 960px) { .faq { grid-column: 1 / -1; } }
.qa { border-bottom: 1px solid var(--rule); }
.qa__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; text-align: left; font-size: clamp(19px, 1.7vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; transition: color var(--t-fast); }
.qa__q:hover { color: var(--accent-text); }
.qa__icon { flex: none; width: 22px; height: 22px; position: relative; }
.qa__icon::before, .qa__icon::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform 0.5s var(--ease); }
.qa__icon::after { transform: rotate(90deg); }
.qa[aria-expanded='true'] .qa__icon::after, .qa.is-open .qa__icon::after { transform: rotate(0); }
.qa.is-open .qa__icon::before { transform: rotate(180deg); }
.qa__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.qa.is-open .qa__a { grid-template-rows: 1fr; }
.qa__a > div { overflow: hidden; }
.qa__a p { margin: 0 0 26px; max-width: 70ch; color: var(--fg-2); }

/* --- Финальный призыв --- */
.cta { background: var(--accent); color: var(--ink); border-top: 1px solid var(--ink); overflow: hidden; padding: clamp(60px, 8vw, 120px) 0 0; position: relative; }
.cta__lead { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 60px); }
.cta__lead p { max-width: 40ch; margin: 0; font-size: 18px; }
.cta__big { display: block; border-top: 1px solid var(--ink); padding: clamp(10px, 2vw, 30px) 0 clamp(6px, 1vw, 16px); overflow: hidden; white-space: nowrap; }
.cta__big .marquee__track { gap: 0.4em; font-size: clamp(72px, 15vw, 270px); }
.cta__big .marquee__track span { display: inline-flex; align-items: center; gap: 0.35em; padding-right: 0.4em; }
.cta__big .sq { display: inline-block; width: 0.5em; height: 0.5em; background: var(--ink); transition: transform 0.6s var(--ease); }
.cta__big:hover .sq { transform: rotate(45deg); }

/* --- Футер --- */
.site-footer { padding: clamp(60px, 7vw, 110px) 0 0; overflow: hidden; position: relative; z-index: 1; }
.site-footer > .wrap { container-type: inline-size; }
.foot-cols { row-gap: 40px; }
.foot-col { grid-column: span 3; display: grid; gap: 10px; align-content: start; min-width: 0; }
.foot-col .mono { color: var(--fg-muted); margin-bottom: 6px; }
.foot-col a { width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.foot-legal { grid-column: 1 / span 6; color: var(--fg-muted); font-size: 13px; line-height: 1.55; }
@media (max-width: 860px) { .foot-col { grid-column: span 6; } .foot-legal { grid-column: 1 / -1; } }
.foot-word {
  font-size: clamp(0px, 24vw, 416px);
  font-size: clamp(0px, 25.5cqi, 416px);
  line-height: 0.94;
  margin: clamp(48px, 6vw, 90px) 0 0;
  letter-spacing: -0.065em;
  white-space: nowrap;
  padding-bottom: 0.06em;
  color: var(--fg);
  font-weight: 800;
  text-transform: uppercase;
  font-variation-settings: 'SHRP' 100;
  user-select: none;
}
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid var(--rule); color: var(--fg-muted); }

/* --- Внутренние страницы (документация, статус, документы) --- */
.page-hero { padding: calc(var(--header-h) + clamp(40px, 7vw, 110px)) 0 clamp(40px, 5vw, 80px); border-bottom: 1px solid var(--ink); }
.page-hero .display { font-size: clamp(48px, 9vw, 160px); }
.page-hero .lead { margin-top: 24px; }

.doc-layout { padding: clamp(40px, 5vw, 80px) 0 clamp(80px, 8vw, 140px); align-items: start; }
.doc-nav { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; border-left: 1px solid var(--ink); }
.doc-nav a { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; font-stretch: 87.5%; padding: 7px 14px; position: relative; color: var(--fg-muted); transition: color var(--t-fast); }
.doc-nav a::before { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: scaleY(0); transition: transform var(--t) var(--ease); }
.doc-nav a.is-active, .doc-nav a:hover { color: var(--fg); }
.doc-nav a.is-active::before { transform: scaleY(1); }
.doc { grid-column: 4 / span 8; min-width: 0; }
@media (max-width: 960px) {
  .doc-nav { display: none; }
  .doc { grid-column: 1 / -1; }
}
.doc section { padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h) + 20px); }
.doc h2 { font-size: clamp(28px, 3vw, 44px); letter-spacing: -0.035em; line-height: 1; margin-bottom: 22px; font-weight: 800; font-variation-settings: 'SHRP' 100; }
.doc h3 { font-size: 20px; letter-spacing: -0.02em; margin: 30px 0 12px; }
.doc p, .doc li { color: var(--fg-2); max-width: 72ch; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent-text); }
.doc code:not(pre code) { background: var(--paper-2); padding: 1px 6px; font-size: 0.86em; border: 1px solid var(--line); }
.doc .codeblock { margin: 16px 0 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th { text-align: left; font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; font-weight: 450; color: var(--fg-muted); border-bottom: 1px solid var(--ink); padding: 0 12px 10px 0; }
.doc td { border-bottom: 1px solid var(--rule); padding: 12px 12px 12px 0; vertical-align: top; }
.doc td code { white-space: nowrap; }
.callout { border: 1px solid var(--ink); border-left: 6px solid var(--accent); padding: 16px 18px; margin: 18px 0; background: var(--paper-2); font-size: 15px; }
.callout p:last-child { margin: 0; }

.legal { grid-column: 3 / span 8; padding: clamp(40px, 5vw, 80px) 0 clamp(80px, 8vw, 140px); counter-reset: sec; }
@media (max-width: 960px) { .legal { grid-column: 1 / -1; } }
.legal h2 { font-size: 22px; letter-spacing: -0.02em; margin: 40px 0 14px; counter-increment: sec; display: flex; gap: 14px; }
.legal h2::before { content: counter(sec, decimal-leading-zero); font-family: var(--f-mono); color: var(--accent-text); font-weight: 400; font-size: 14px; padding-top: 5px; }
.legal p, .legal li { color: var(--fg-2); }
.legal .callout { margin-bottom: 30px; }

/* Статус-страница */
.status-hero__state { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.status-hero__state .sq { width: 22px; height: 22px; background: var(--ok); }
.status-hero__state.is-degraded .sq { background: var(--warn); }
.status-hero__state.is-outage .sq { background: var(--bad); }
.status-refresh { height: 2px; background: var(--rule); position: relative; margin-top: 30px; overflow: hidden; }
.status-refresh i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; }

/* 404 */
.nf { min-height: 100svh; display: grid; align-content: center; padding-top: var(--header-h); }
.nf .display { font-size: clamp(120px, 34vw, 560px); line-height: 0.8; }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.glitch::before { color: var(--accent); clip-path: inset(0 0 60% 0); transform: translateX(-0.02em); animation: glitch-a 2.4s steps(1) infinite; }
.glitch::after { clip-path: inset(62% 0 0 0); transform: translateX(0.02em); animation: glitch-b 1.9s steps(1) infinite; }
@keyframes glitch-a { 0%, 86%, 100% { transform: none; } 88% { transform: translateX(-0.05em); } 92% { transform: translateX(0.03em); } }
@keyframes glitch-b { 0%, 70%, 100% { transform: none; } 72% { transform: translateX(0.04em); } 76% { transform: translateX(-0.06em); } }

/* Тестовая оплата */
.paybox { max-width: 520px; margin: 0 auto; border: 1px solid var(--ink); box-shadow: 14px 14px 0 var(--accent); background: var(--paper); }
.paybox__head { padding: 18px 22px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; }
.paybox__body { padding: 28px 22px; display: grid; gap: 18px; }

/* --- Вход и регистрация --- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100svh; position: relative; z-index: 1; }
.auth__side { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: var(--gutter); overflow: hidden; }
.auth__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth__top .logo svg path { stroke: var(--paper); }
.auth__top .logo .logo-pulse { stroke: var(--accent); }
.auth__scope { position: relative; margin: 24px calc(-1 * var(--gutter)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); align-self: center; height: clamp(140px, 26vh, 260px); }
.auth__scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth__claim .display { font-size: clamp(56px, 8vw, 132px); margin-bottom: 26px; }
.auth__claim .display.is-long { font-size: clamp(36px, 4.3vw, 76px); }
.auth__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--fg-2); }
.auth__main { display: grid; grid-template-rows: 1fr auto; padding: var(--gutter); }
.auth__panel { width: min(460px, 100%); margin: auto; padding: clamp(32px, 6vh, 80px) 0; }
.auth__form { display: grid; gap: 18px; }
.auth__head { padding-bottom: 14px; border-bottom: 1px solid var(--ink); margin-bottom: 6px; }
.auth__row { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.auth__error { margin: 0; padding: 12px 14px; border: 1px solid var(--bad); border-left-width: 6px; color: var(--bad); font-size: 14px; background: rgba(211, 38, 26, 0.06); }
.auth__or { display: flex; align-items: center; gap: 14px; margin: 28px 0 18px; }
.auth__or::before, .auth__or::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.auth__providers { display: grid; gap: 10px; }
.auth__provider { justify-content: space-between; text-transform: none; }
.auth__provider [data-provider-state] { font-size: 11px; }
.auth__social-consent { margin-top: 18px; }
.auth__alt .hint { font-size: 12px; line-height: 1.5; color: var(--fg-2); margin-top: 16px; }
.tg-widget { min-height: 40px; display: flex; justify-content: center; }
.auth__foot { text-align: center; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 4px; }
.meter i { background: var(--rule); transition: background 0.3s; }
.meter i.on { background: var(--ink); }
.meter[data-score='4'] i.on { background: var(--ok); }
.shake { animation: shake 0.42s var(--ease-io); }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__side { position: relative; height: auto; min-height: 0; grid-template-rows: auto auto auto; }
  .auth__scope { height: 120px; }
  .auth__claim .display { font-size: clamp(48px, 15vw, 88px); margin-bottom: 16px; }
  .auth__claim .display.is-long { font-size: clamp(34px, 9.5vw, 64px); }
  .auth__list { display: none; }
}

/* ── Ролики ─────────────────────────────────────────────────────────── */
.reels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) var(--gutter); }
.reel { margin: 0; position: relative; }
.reel__screen { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--ink); background: var(--ink); cursor: ew-resize; overflow: hidden; outline: none; }
.reel__screen:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.reel__screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.reel__hud { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.reel__state { color: var(--fg-muted); }
.reel.is-paused .reel__state { color: var(--accent-text); }
.reel__tc { font-variant-numeric: tabular-nums; }
.reel__bar { height: 2px; background: var(--rule); overflow: hidden; }
.reel__bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.reel__cap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gutter); padding-top: 14px; }
.reel__cap b { font-weight: 700; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -0.02em; line-height: 1.1; }
.reel__cap span { color: var(--fg-muted); font-size: 15px; line-height: 1.45; }
.reels__hint { margin: clamp(24px, 3vw, 40px) 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 900px) {
  .reels { grid-template-columns: minmax(0, 1fr); }
  .reel__screen { cursor: pointer; }
  .reel__cap { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .reels__hint { display: none; }
}

/* ── Галерея ────────────────────────────────────────────────────────── */
.gallery { position: relative; overflow: hidden; border-top: 1px solid var(--rule); padding: clamp(56px, 7vw, 120px) 0; }
.gallery__track { display: flex; gap: var(--gutter); padding: 0 var(--gutter); width: max-content; will-change: transform; }
.gallery__item { margin: 0; width: clamp(300px, 46vw, 820px); flex: none; }
.gallery__item:nth-child(even) { margin-top: clamp(40px, 6vw, 110px); }
.gallery__img { aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--ink); background: var(--paper-2); cursor: zoom-in; }
.gallery__img { position: relative; }
.gallery__img img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12) brightness(.92); transition: transform .6s var(--ease), filter .6s var(--ease); }
.gallery__img::after { content: ''; position: absolute; inset: 0; background: var(--accent); mix-blend-mode: multiply; opacity: .18; pointer-events: none; transition: opacity .6s var(--ease); }
.gallery__img:hover img { filter: none; }
.gallery__img:hover::after { opacity: 0; }
@media (hover: none) { .gallery__img img { filter: grayscale(.35) contrast(1.05); } .gallery__img::after { opacity: .08; } }
.gallery__item figcaption { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gutter); padding-top: 14px; }
.gallery__item figcaption b { font-weight: 700; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -0.02em; line-height: 1.1; }
.gallery__item figcaption span { color: var(--fg-muted); font-size: 15px; line-height: 1.45; }
@media (max-width: 900px) {
  .gallery { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery__item { width: 82vw; scroll-snap-align: center; }
  .gallery__item:nth-child(even) { margin-top: 0; }
  .gallery__item figcaption { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .gallery__img { cursor: default; }
}
.reels__note { margin: clamp(24px, 3vw, 40px) 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.reels__note + .reels__hint { margin-top: 8px; }
.gallery__credit { margin-top: 18px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
