/* ==========================================================================
   Tyumex Terminal — сайт-продажник
   Дизайн-система: «морозное стекло в полночь» (AuthKit / WorkOS reference)
   Токены и правила зафиксированы в README.md → «Дизайн-система».
   ========================================================================== */

:root {
  /* Поверхности */
  --canvas: #05060f;
  --steel: #2f343e;
  --glass: rgba(186, 214, 247, 0.03);
  --glass-2: rgba(186, 214, 247, 0.06);
  --glass-3: rgba(186, 214, 247, 0.12);
  --deep-glass: rgba(5, 6, 15, 0.97);

  /* Текст: приглушённые тона полупрозрачные, чтобы оставаться родными полотну.
     Тон 0.32 из эталона намеренно не используем — он не проходит по контрасту. */
  --ink-head: #d8ecf8;
  --ink-body: #d1e4fa;
  --ink-muted: rgba(200, 212, 234, 0.78);
  --ink-help: rgba(199, 211, 234, 0.64);
  --ink-max: #ffffff;

  /* Линии и акцент */
  --hairline: rgba(186, 215, 247, 0.12);
  --hairline-soft: rgba(186, 215, 247, 0.06);
  --hairline-strong: rgba(186, 215, 247, 0.24);
  --accent: #663af3;
  --accent-hi: #7c56f6;
  --blueprint: #b6d9fc;

  /* Рынок */
  --up: #22c58b;
  --down: #ef5b68;

  /* Геометрия: иерархия радиусов, а не один на всё */
  --r-large: 28px;
  --r-card: 16px;
  --r-code: 10px;
  --r-badge: 6px;
  --r-pill: 999px;
  --r-round: 9999px;
  --shell: 1200px;
  --gap-el: 16px;
  --gap-section: 120px;
  --pad-card: 24px;

  /* Тени: возвышение через внутренний иней + тёмный ореол */
  --el-card: inset 0 1px 1px rgba(199, 211, 234, 0.12),
    inset 0 24px 48px rgba(199, 211, 234, 0.05), 0 24px 32px rgba(6, 6, 14, 0.7);
  --el-modal: inset 0 1px 1px rgba(216, 236, 248, 0.2),
    inset 0 24px 48px rgba(168, 216, 245, 0.06), 0 16px 32px rgba(0, 0, 0, 0.3);
  --el-hairline: inset 0 0 0 1px var(--hairline);
  /* Стекло, подсвеченное изнутри — ключевая тень эталона */
  --el-lit: inset -0.5px 0.5px 1px rgba(199, 211, 234, 0.12),
    inset 0 0 96px rgba(186, 215, 247, 0.08);
  --el-halo: 0 0 6px rgba(186, 207, 247, 0.32), 0 0 12px rgba(238, 186, 247, 0.24);

  /* Типографика */
  --font-display: 'Manrope', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

/* Атрибут hidden сильнее оформления: у скрытых блоков кабинета и виджета
   поддержки есть свой display, и без этого правила они остались бы видны. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ink-head);
  text-decoration: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

a:hover {
  color: var(--ink-max);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(102, 58, 243, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(182, 217, 252, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-head);
  letter-spacing: 0; /* дисплейный трекинг эталона — ровно ноль */
  margin: 0;
}

p {
  margin: 0;
}

/* Фоновые слои: чертёжная сетка + прожектор */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: -2px;
  background-image: linear-gradient(to right, var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 35%, transparent 85%);
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 35%, transparent 85%);
  opacity: 0.9;
}

.bg-spotlight {
  position: absolute;
  left: 50%;
  top: -18vh;
  width: min(1500px, 150vw);
  height: 130vh;
  transform: translateX(-50%);
  background: conic-gradient(
    at 50% -5%,
    transparent 45%,
    rgba(124, 145, 182, 0.3) 49%,
    rgba(124, 145, 182, 0.5) 50%,
    rgba(124, 145, 182, 0.3) 51%,
    transparent 55%
  );
  opacity: 0.55;
  filter: blur(0.5px);
}

.bg-glow {
  position: absolute;
  left: 50%;
  top: -280px;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(102, 58, 243, 0.16), transparent 70%);
  filter: blur(20px);
}

/* --------------------------------------------------------------------------
   Каркас
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 28px;
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 1;
  display: block;
}

.section {
  padding-block: clamp(72px, 9vw, var(--gap-section));
  position: relative;
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section__head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.section__title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
}

.section__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 520px;
}

/* Eyebrow: подпись раздела между растворяющимися линиями */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-feature-settings: 'tnum';
  width: 100%;
  max-width: 560px;
  justify-content: center;
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  min-width: 24px;
  background: linear-gradient(to right, transparent, var(--hairline), transparent);
}

.eyebrow--left {
  justify-content: flex-start;
  max-width: none;
}

.eyebrow--left::before {
  display: none;
}

.grad {
  background: linear-gradient(180deg, #d8ecf8 0%, #98c0ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Кнопки — все пилюли 999px
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--glass-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  box-shadow: var(--el-hairline);
  color: var(--ink-max);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.2s var(--ease), box-shadow 0.25s var(--ease),
    transform 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  --btn-bg: var(--glass-3);
  color: var(--ink-max);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  --btn-bg: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 24px rgba(6, 6, 14, 0.55);
}

.btn--primary:hover {
  --btn-bg: var(--accent-hi);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 32px rgba(6, 6, 14, 0.6);
}

.btn--outline {
  --btn-bg: transparent;
  color: var(--ink-body);
}

.btn--outline:hover {
  --btn-bg: var(--glass-2);
}

.btn--sm {
  padding: 8px 18px;
  font-size: 14px;
}

/* Крупная кнопка: 44px, как их «Get started», а не плита 56px */
.btn--lg {
  padding: 12px 26px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

.btn__icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-head);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* Бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--r-badge);
  background: rgba(199, 211, 234, 0.12);
  box-shadow: inset -0.5px 0.5px 1px rgba(199, 211, 234, 0.12),
    inset 0 0 96px rgba(186, 215, 247, 0.08);
  color: var(--ink-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.badge--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-round);
  background: var(--up);
  box-shadow: 0 0 8px rgba(34, 197, 139, 0.8);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--hairline);
  background: rgba(5, 6, 15, 0.9);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--el-hairline);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-head);
  letter-spacing: -0.01em;
}

.brand__thin {
  color: var(--ink-help);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav a:hover {
  background: var(--glass-2);
  color: var(--ink-max);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

/* Переключатель языка — сегментированная пилюля */
.langswitch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
}

.langswitch__btn {
  padding: 5px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-help);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.langswitch__btn:hover {
  color: var(--ink-body);
}

.langswitch__btn.is-active {
  background: var(--glass-3);
  color: var(--ink-max);
}

.navtoggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  position: relative;
}

.navtoggle span,
.navtoggle span::before,
.navtoggle span::after {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--ink-body);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.navtoggle span {
  top: 50%;
  margin-top: -0.75px;
}

.navtoggle span::before {
  content: '';
  top: -5px;
  left: 0;
  transform: none;
}

.navtoggle span::after {
  content: '';
  top: 5px;
  left: 0;
  transform: none;
}

.navtoggle[aria-expanded='true'] span {
  transform: translateX(-50%) rotate(45deg);
}

.navtoggle[aria-expanded='true'] span::before {
  opacity: 0;
}

.navtoggle[aria-expanded='true'] span::after {
  transform: rotate(-90deg);
  top: 0;
}

/* --------------------------------------------------------------------------
   Герой
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero__title {
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.16;
  letter-spacing: 0;
  max-width: 20ch;
  text-wrap: balance;
}

.hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 480px;
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-help);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta span::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: var(--r-round);
  background: var(--hairline-strong);
}

.hero__stage {
  position: relative;
  margin-top: clamp(36px, 5vw, 64px);
  margin-inline: auto;
  width: 100%;
  max-width: 820px; /* воздух по краям вместо скриншота во всю ширину */
}

.hero__chips {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-el);
}

.hero__chip {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--deep-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--el-lit), var(--el-hairline);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hero__chip b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-head);
  line-height: 1.2;
}

.hero__chip i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-help);
}

.hero__chip--a {
  grid-column: 1;
}

.hero__chip--b {
  grid-column: 2;
}

.hero__chip--c {
  grid-column: 3;
}

.hero__note {
  margin: 20px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-help);
}

/* Запасной выход из рамки: заметен, но тише подписи — это страховка, а не призыв. */
.hero__out {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.hero__out:hover {
  color: var(--ink-head);
  text-decoration-color: var(--ink-help);
}

/* --------------------------------------------------------------------------
   Рамка «окно приложения» для скриншотов
   -------------------------------------------------------------------------- */

.shot {
  margin: 0;
  border-radius: var(--r-card);
  background: var(--deep-glass);
  box-shadow: var(--el-modal), var(--el-lit), var(--el-hairline);
  overflow: hidden;
  position: relative;
}

.shot::after {
  /* Мягкий блик сверху — «стекло, подсвеченное сзади» */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(216, 236, 248, 0.06), transparent 22%);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(186, 214, 247, 0.03);
}

.shot__dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.shot__dots i {
  width: 9px;
  height: 9px;
  border-radius: var(--r-round);
  background: var(--hairline-strong);
  display: block;
}

.shot__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-help);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot__body {
  display: block;
  width: 100%;
  background: #070b13;
}

.shot__body img {
  width: 100%;
  height: auto;
  display: block;
}

.shot--hero {
  max-width: 760px; /* композиция эталона: карточки 400–760px, а не полная ширина */
  margin-inline: auto;
  transform: perspective(2000px) rotateX(2.5deg);
  transform-origin: 50% 0;
}

.shot--stack {
  box-shadow: var(--el-card), var(--el-hairline);
}

/* --------------------------------------------------------------------------
   Живой терминал в рамке героя

   Витрина открывается в <iframe> внутри той же рамки, что и скриншоты, поэтому
   первый экран остаётся композиционно тем же. Наклон рамки для живого режима
   снят: перспектива делает текст терминала мутным, сдвигает попадание курсора и
   мешает развороту на весь экран (transform создаёт систему отсчёта для fixed).
   -------------------------------------------------------------------------- */

.shot--live {
  transform: none;
}

.shot--live .shot__title {
  flex: 1;
  min-width: 0;
}

.shot__clock {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-help);
  font-variant-numeric: tabular-nums;
}

.shot__expand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 0;
  border-radius: var(--r-round);
  background: var(--glass);
  box-shadow: var(--el-hairline);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.shot__expand svg {
  width: 13px;
  height: 13px;
}

.shot__expand:hover {
  background: var(--glass-2);
  color: var(--ink-head);
}

/* Пропорция держится сама, чтобы страница не дёргалась при вставке терминала:
   высота считается от ширины, а не от содержимого рамки. */
.shot__body--live {
  position: relative;
  aspect-ratio: 1440 / 765;
  background: var(--canvas);
}

.demo__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Превью приглушено: пока терминал не открыт, первой читается кнопка. */
  opacity: 0.5;
  filter: saturate(0.85);
}

/* Витрина рендерится в настольной ширине и вписывается в макет масштабом.
   Если отдать ей 760 px напрямую, терминал складывает раскладку и показывает 6
   полотен из 18 — вместо трёх окон получается обрубок. Масштаб считает скрипт
   из data-demo-width, курсор браузер пересчитывает сам. */
.demo__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--demo-width, 1440px);
  height: var(--demo-height, 765px);
  transform: scale(var(--demo-scale, 1));
  transform-origin: top left;
  border: 0;
  display: block;
}

.demo__start {
  position: absolute;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
}

.demo__state {
  position: absolute;
  inset: auto 0 18px;
  margin: 0 auto;
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--deep-glass);
  box-shadow: var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-muted);
}

/* Щит поверх терминала: пока по нему не щёлкнули, колесо мыши прокручивает
   страницу, а не масштабирует график. Без этого первый экран становится
   ловушкой прокрутки. */
.demo__shield {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-muted);
  transition: opacity 0.2s var(--ease);
}

.demo__shield span {
  padding: 8px 14px;
  border-radius: var(--r-round);
  background: var(--deep-glass);
  box-shadow: var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.demo__shield:hover span {
  color: var(--ink-head);
}

/* Разворот на весь экран: рамка остаётся тем же элементом DOM, поэтому сеанс
   терминала не перезагружается и место в очереди не тратится второй раз.
   Основной путь — системный полный экран, запасной — рамка поверх страницы. */
.shot--live:fullscreen {
  max-width: none;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
}

.shot--live:fullscreen .shot__body--live,
.shot--live.is-expanded .shot__body--live {
  aspect-ratio: auto;
  height: calc(100% - 43px);
}

/* Развёрнутая рамка отдаёт терминалу настоящий размер: масштаб снимается, и
   витрина сама перекладывает окна под экран. Перезагрузки при этом нет. */
.shot--live:fullscreen .demo__frame,
.shot--live.is-expanded .demo__frame {
  width: 100%;
  height: 100%;
  transform: none;
}

.shot--live.is-expanded {
  position: fixed;
  inset: 12px;
  z-index: 90;
  max-width: none;
  margin: 0;
  border-radius: var(--r-card);
}

body.is-demo-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Полоса источников данных
   -------------------------------------------------------------------------- */

.sources {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: 26px;
  background: linear-gradient(180deg, rgba(186, 214, 247, 0.02), transparent);
}

.sources__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
}

.sources__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-help);
}

.sources__list {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sources__list li {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: var(--el-hairline);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Лента возможностей (кружки, соединённые линией)
   -------------------------------------------------------------------------- */

.timeline {
  margin-top: clamp(40px, 5vw, 64px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--hairline) 12%, var(--hairline) 88%, transparent);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  position: relative;
}

.tile__icon {
  width: 60px;
  height: 60px;
  border-radius: var(--r-round);
  background: var(--canvas);
  box-shadow: var(--el-hairline), inset 0 1px 1px rgba(216, 236, 248, 0.12),
    0 0 0 6px var(--canvas);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.tile:hover .tile__icon {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--hairline-strong), inset 0 1px 1px rgba(216, 236, 248, 0.2),
    0 0 0 6px var(--canvas), 0 0 24px rgba(186, 207, 247, 0.18);
}

.tile__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--ink-body);
  stroke-width: 1.5;
  fill: none;
}

.tile__label {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-muted);
  max-width: 15ch;
}

/* --------------------------------------------------------------------------
   Крупные разделы «текст + скриншот»
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split--flip .split__text {
  order: 2;
}

.split__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  text-align: left;
}

.split__title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.16;
}

.split__lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 480px;
}

.checklist {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.checklist svg {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  stroke: var(--blueprint);
  stroke-width: 1.5;
  fill: none;
  flex: none;
}

.checklist b {
  color: var(--ink-head);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Бенто-сетка карточек
   -------------------------------------------------------------------------- */

.bento {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-el);
}

.card {
  padding: var(--pad-card);
  border-radius: var(--r-card);
  background: var(--glass);
  box-shadow: var(--el-card), var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  background: rgba(186, 214, 247, 0.05);
  box-shadow: var(--el-card), var(--el-lit), inset 0 0 0 1px var(--hairline-strong);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.card__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--blueprint);
  stroke-width: 1.5;
  fill: none;
}

.card__title {
  font-size: 18px;
  line-height: 1.3;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-head);
}

.card__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
}

.card--wide {
  grid-column: span 2;
}

/* --------------------------------------------------------------------------
   Доступ: режимы и шаги
   -------------------------------------------------------------------------- */

.modes {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-el);
}

.mode {
  padding: var(--pad-card);
  border-radius: var(--r-card);
  background: var(--glass);
  box-shadow: var(--el-card), var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Выделение — светом и линией, а не фиолетовой заливкой */
.mode--featured {
  background: rgba(186, 214, 247, 0.05);
  box-shadow: var(--el-card), inset 0 0 0 1px var(--hairline-strong),
    inset -0.5px 0.5px 1px rgba(199, 211, 234, 0.12),
    inset 0 0 96px rgba(186, 215, 247, 0.14);
}

.mode__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mode__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-head);
}

.mode__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
  max-width: 520px;
}

.mode__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  color: var(--ink-muted);
}

.mode__list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.5;
}

.mode__list svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  stroke: var(--ink-help);
  stroke-width: 1.6;
  fill: none;
}

.mode--featured .mode__list svg {
  stroke: var(--blueprint);
}

.steps {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-el);
  counter-reset: step;
}

.step {
  padding: var(--pad-card);
  border-radius: var(--r-card);
  background: var(--glass);
  box-shadow: var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step__num {
  width: 32px;
  height: 32px;
  border-radius: var(--r-round);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-body);
  margin-bottom: 4px;
}

.step__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-head);
}

.step__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
}

/* --------------------------------------------------------------------------
   Скачивание
   -------------------------------------------------------------------------- */

.download {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--r-large);
  background: var(--deep-glass);
  box-shadow: var(--el-modal), var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -60%;
  width: 700px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(102, 58, 243, 0.1), transparent 70%);
  pointer-events: none;
}

.download__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  position: relative;
}

.download__title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.16;
}

.download__note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
}

.spec {
  position: relative;
  border-radius: 12px;
  background: rgba(186, 214, 247, 0.04);
  box-shadow: var(--el-hairline);
  overflow: hidden;
}

.spec__row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 14px;
  align-items: baseline;
}

.spec__row:last-child {
  border-bottom: 0;
}

.spec__key {
  color: var(--ink-help);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec__val {
  color: var(--ink-body);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.spec__val--mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--ink-muted);
}

.codebox {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-code);
  background: rgba(5, 6, 15, 0.8);
  box-shadow: var(--el-hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted);
  overflow-x: auto;
  white-space: pre;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  color: var(--ink-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.copy-btn:hover {
  background: var(--glass-3);
  color: var(--ink-max);
}

.copy-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

/* --------------------------------------------------------------------------
   Безопасность
   -------------------------------------------------------------------------- */

.grid-4 {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-el);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  margin-top: clamp(36px, 4vw, 56px);
  max-width: 800px;
  margin-inline: auto;
  border-radius: var(--r-large);
  background: var(--glass);
  box-shadow: var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.faq__item {
  border-bottom: 1px solid var(--hairline-soft);
}

.faq__item:last-child {
  border-bottom: 0;
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-head);
  transition: background 0.2s var(--ease);
}

.faq__q:hover {
  background: var(--glass);
}

.faq__sign {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--r-round);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  display: grid;
  place-items: center;
  position: relative;
}

.faq__sign::before,
.faq__sign::after {
  content: '';
  position: absolute;
  background: var(--ink-body);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.faq__sign::before {
  width: 11px;
  height: 1.5px;
}

.faq__sign::after {
  width: 1.5px;
  height: 11px;
}

.faq__q[aria-expanded='true'] .faq__sign::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq__a {
  overflow: hidden;
  height: 0;
  transition: height 0.32s var(--ease);
}

.faq__a p {
  padding: 0 24px 22px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-help);
  max-width: 560px;
}

/* --------------------------------------------------------------------------
   Финальный призыв и подвал
   -------------------------------------------------------------------------- */

.closer {
  text-align: center;
  padding-block: clamp(64px, 8vw, 112px);
  position: relative;
}

.closer__glow {
  position: absolute;
  left: 50%;
  top: 10%;
  width: min(760px, 92vw);
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(186, 215, 247, 0.08), transparent 70%);
  pointer-events: none;
}

.closer__title {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.16;
  letter-spacing: 0;
  max-width: 20ch;
  margin-inline: auto;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 44px 36px;
  position: relative;
  z-index: 1;
  background: rgba(5, 6, 15, 0.6);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.footer__tag {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
}

.footer__cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-help);
  margin-bottom: 4px;
}

.footer__col a,
.footer__col span {
  font-size: 14px;
  color: var(--ink-muted);
}

.footer__bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-help);
  line-height: 1.6;
}

.disclaimer {
  max-width: 620px;
}

/* --------------------------------------------------------------------------
   Личный кабинет (cabinet.html)
   Те же токены, что и на продающей странице: ни одного нового цвета и ни одной
   новой ступени кегля. Фиолетовый здесь только на одной кнопке действия.
   -------------------------------------------------------------------------- */

/* Стеклянная кнопка со значком — вход в кабинет в шапке */
.btn--ghost {
  --btn-bg: var(--glass);
  color: var(--ink-body);
}

.btn--ghost:hover {
  --btn-bg: var(--glass-2);
}

.btn--ghost.is-current {
  --btn-bg: var(--glass-2);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--ink-max);
}

.cab {
  padding: clamp(112px, 12vw, 152px) 0 clamp(72px, 8vw, 112px);
  position: relative;
  z-index: 1;
}

.cab__shell {
  display: block;
}

/* Вход: слева обещание, справа форма */
.cab__auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.cab__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding-top: 6px;
}

.cab__title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.16;
}

.cab__lead {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.cab__list {
  margin-top: 6px;
}

.cab__list li {
  font-size: 14px;
}

.authcard {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--r-large);
  background: var(--deep-glass);
  box-shadow: var(--el-modal), var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.authcard::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -70%;
  width: 520px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(102, 58, 243, 0.1), transparent 70%);
  pointer-events: none;
}

.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: var(--el-hairline);
  position: relative;
}

.tabs__btn {
  padding: 8px 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-help);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.tabs__btn:hover {
  color: var(--ink-head);
}

.tabs__btn.is-active {
  background: var(--glass-3);
  box-shadow: var(--el-hairline);
  color: var(--ink-max);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.form.is-busy {
  opacity: 0.7;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-help);
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-code);
  background: rgba(5, 6, 15, 0.6);
  box-shadow: var(--el-hairline);
  color: var(--ink-max);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.input::placeholder {
  color: var(--ink-help);
}

.input:hover {
  background: rgba(5, 6, 15, 0.72);
}

.input:focus {
  outline: none;
  background: rgba(5, 6, 15, 0.8);
  box-shadow: inset 0 0 0 1px var(--hairline-strong), var(--el-lit);
}

.input--mono {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Поле кода: шесть цифр читаются лучше вразрядку и по центру. */
.input--code {
  letter-spacing: 0.34em;
  text-align: center;
}

/* Текстовая кнопка внутри подсказки: ведёт себя как ссылка, но остаётся
   кнопкой для клавиатуры и озвучки. */
.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  color: var(--ink-head);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
}

.linkbtn:hover {
  color: var(--ink-max);
}

.linkbtn[disabled] {
  color: var(--ink-help);
  text-decoration-color: transparent;
  cursor: default;
}

.cab__mail {
  color: var(--ink-head);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.cab__timer {
  margin-left: 6px;
  color: var(--ink-help);
  font-variant-numeric: tabular-nums;
}

.form__msg {
  padding: 11px 14px;
  border-radius: var(--r-code);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-body);
}

.form__msg--bad {
  color: var(--down);
}

.form__msg--ok {
  color: var(--up);
}

.form__hint {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
}

.form__hint--top {
  margin-bottom: 2px;
}

.authcard__foot {
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 14px;
  color: var(--ink-help);
}

.authcard__foot a {
  color: var(--ink-head);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
}

/* Кабинет: шапка и сетка карточек */
.cab__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cab__headtext {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cab__user {
  color: var(--ink-max);
}

.cab__alert {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: var(--r-code);
  background: var(--glass-2);
  box-shadow: var(--el-hairline), var(--el-lit);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-body);
  max-width: 720px;
}

.cabgrid {
  margin-top: clamp(28px, 3.5vw, 44px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-el);
}

.cabcard {
  gap: 14px;
}

/* Информационная карточка не подпрыгивает под курсором: её не нажимают */
.card--flat:hover {
  transform: none;
  background: var(--glass);
  box-shadow: var(--el-card), var(--el-lit), var(--el-hairline);
}

.cabcard--wide {
  grid-column: span 2;
}

.cabcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cabcard__title {
  font-size: 18px;
  line-height: 1.3;
}

.cabcard__note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-help);
  max-width: 520px;
}

.cabcard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cabcard__actions--cta {
  margin-top: 4px;
  gap: 12px;
}

.cabcard__hash {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-help);
  overflow-wrap: anywhere;
}

.badge__dot--warn {
  background: var(--blueprint);
  box-shadow: 0 0 8px rgba(182, 217, 252, 0.7);
}

.badge__dot--off {
  background: var(--down);
  box-shadow: 0 0 8px rgba(239, 91, 104, 0.7);
}

.keybox {
  padding: 14px 16px;
  border-radius: var(--r-code);
  background: rgba(5, 6, 15, 0.8);
  box-shadow: var(--el-hairline);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink-head);
  overflow-wrap: anywhere;
}

/* Порог активности: полоса, а не таблица чисел */
.gauge {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gauge__bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: rgba(5, 6, 15, 0.7);
  box-shadow: var(--el-hairline);
  overflow: hidden;
}

.gauge__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--blueprint);
  transition: width 0.5s var(--ease);
}

.gauge__bar i.is-met {
  background: var(--up);
}

.gauge__legend {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.gauge__now {
  font-size: 18px;
  color: var(--ink-max);
}

.gauge__need {
  color: var(--ink-help);
}

/* Посещаемость: три числа и столбики по дням. Своих цветов и кеглей блок не
   вводит — берёт те же переменные и ступени шкалы, что остальной кабинет. */
.tally {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.tally__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-code);
  background: var(--glass);
  box-shadow: var(--el-lit);
}

.tally__key {
  font-size: 12px;
  color: var(--ink-help);
}

.tally__num {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-max);
}

.tally__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-help);
}

.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
  margin-top: 14px;
}

/* Столбик рисуется своей высотой в процентах; пустой день остаётся тонкой
   полоской у основания, чтобы график не выглядел рваным. Цвет — тот же
   «чертёжный», что у индикатора активности: фиолетовый на странице занят
   кнопкой загрузки, и третьей акцентной плашки здесь быть не должно. */
.spark i {
  flex: 1 1 0;
  min-height: 2px;
  border-radius: 2px;
  background: var(--blueprint);
  opacity: 0.45;
}

.spark i.is-top {
  opacity: 0.9;
}

@media (max-width: 620px) {
  .tally {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .tally__cell {
    padding: 10px;
  }
}

.acclist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acclist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-code);
  background: rgba(186, 214, 247, 0.04);
  box-shadow: var(--el-hairline);
}

.acclist__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-head);
}

.acclist__tag {
  font-size: 12px;
  color: var(--ink-help);
}

.acclist__empty {
  font-size: 14px;
  color: var(--ink-help);
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Поддержка: кнопка внизу справа и окно переписки
   -------------------------------------------------------------------------- */

.support {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  bottom: clamp(16px, 2vw, 28px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.support__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--deep-glass);
  box-shadow: var(--el-modal), var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-head);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease),
    box-shadow 0.25s var(--ease);
}

.support__btn:hover {
  transform: translateY(-1px);
  color: var(--ink-max);
  box-shadow: var(--el-modal), var(--el-lit), inset 0 0 0 1px var(--hairline-strong);
}

.support__btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.support__dot {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: var(--r-round);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(102, 58, 243, 0.9);
}

.support__panel {
  width: min(340px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-large);
  background: var(--deep-glass);
  box-shadow: var(--el-modal), var(--el-lit), var(--el-hairline);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.support__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline-soft);
}

.support__headtext {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.support__headtext b {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-head);
}

.support__headtext span {
  font-size: 12px;
  color: var(--ink-help);
}

.support__close {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-round);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  color: var(--ink-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.support__close:hover {
  background: var(--glass-3);
  color: var(--ink-max);
}

.support__close svg {
  width: 14px;
  height: 14px;
}

.support__list {
  flex: 1;
  min-height: 120px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.support__hello,
.support__note {
  padding: 12px 14px;
  border-radius: var(--r-code);
  background: var(--glass);
  box-shadow: var(--el-hairline);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.support__note {
  color: var(--ink-help);
}

.support__msg {
  max-width: 90%;
  padding: 10px 13px;
  border-radius: var(--r-code);
  background: var(--glass-2);
  box-shadow: var(--el-hairline);
  align-self: flex-start;
}

.support__msg--me {
  align-self: flex-end;
  background: rgba(102, 58, 243, 0.22);
}

.support__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support__time {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-help);
}

.support__form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--hairline-soft);
}

.support__input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-code);
  background: rgba(5, 6, 15, 0.6);
  box-shadow: var(--el-hairline);
  color: var(--ink-max);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  resize: none;
}

.support__input::placeholder {
  color: var(--ink-help);
}

.support__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.support__send {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-round);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: var(--ink-max);
  transition: background 0.2s var(--ease);
}

.support__send:hover {
  background: var(--accent-hi);
}

.support__send:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.support__send svg {
  width: 18px;
  height: 18px;
}

.support__foot {
  padding: 0 18px 16px;
  font-size: 12px;
  color: var(--ink-help);
}

.support__foot a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Появление при скролле
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  /* Подсказку композитору снимаем сразу после появления: иначе will-change
     остаётся на десятках блоков и, что важнее, создаёт систему отсчёта —
     развёрнутая рамка терминала считала бы свои размеры от сцены героя. */
  will-change: auto;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1080px) {
  .bento,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card--wide {
    grid-column: span 2;
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 32px;
  }

  .timeline::before {
    display: none;
  }

  /* Шапке уже тесно: «Скачать» есть в меню и в разделе загрузки, а вход в
     кабинет остаётся — это второй раздел сайта. */
  .header__actions .btn:not(.btn--ghost) {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --gap-section: 88px;
  }

  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 14px 20px 22px;
    background: rgba(5, 6, 15, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--hairline);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 13px 14px;
    font-size: 16px;
  }

  .navtoggle {
    display: block;
  }

  /* Кнопка «Скачать» уезжает в меню, а вход в кабинет остаётся: это второй
     раздел сайта, и на телефоне он нужен так же, как на настольном экране.
     На узком экране от неё остаётся только значок. */
  .header__actions .btn:not(.btn--ghost) {
    display: none;
  }

  .btn--ghost .btn__icon {
    width: 18px;
    height: 18px;
  }

  .cab__auth,
  .cabgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cabcard--wide {
    grid-column: span 1;
  }

  .split,
  .download {
    grid-template-columns: minmax(0, 1fr);
  }

  .split--flip .split__text {
    order: 0;
  }

  .modes,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__stage {
    margin-top: 40px;
  }

  .hero__chips {
    gap: 10px;
    margin-top: 20px;
  }

  .shot--hero {
    transform: none;
  }

  /* На телефоне витрина сама показывает одно окно, поэтому рамке нужна высокая
     пропорция — иначе терминал сжимается в полоску. Масштаб не нужен: в узкой
     раскладке витрина читается лучше настольной. */
  .shot__body--live {
    aspect-ratio: 390 / 560;
  }

  .demo__frame {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .demo__preview {
    object-position: top center;
  }

  .shot__expand span {
    display: none;
  }

  /* Без подписи кнопке нужен свой размер под палец. */
  .shot__expand {
    min-width: 36px;
    min-height: 32px;
    justify-content: center;
    padding: 6px 10px;
  }
}

@media (max-width: 620px) {
  .shell {
    padding-inline: 20px;
  }

  .bento,
  .grid-4,
  .hero__chips {
    grid-template-columns: minmax(0, 1fr);
  }

  .card--wide {
    grid-column: span 1;
  }

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

  .spec__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .footer__cols {
    gap: 32px;
  }

  .hero__cta .btn {
    width: 100%;
  }

  .faq__q {
    padding: 17px 18px;
    font-size: 16px;
  }

  .faq__a p {
    padding: 0 18px 20px;
  }

  /* Длинная команда на узком экране переносится, а не уезжает в прокрутку. */
  .codebox {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* На телефоне кнопке поддержки хватает значка: подпись съедала бы экран. */
  .support__btnlabel {
    display: none;
  }

  .support__btn {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }

  /* То же у входа в кабинет: значок помещается рядом с RU/EN и меню. */
  .header__actions .btn--ghost span {
    display: none;
  }

  .header__actions .btn--ghost {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--r-round);
  }

  /* Три элемента в правом углу узкого экрана: сжимаем зазоры, а не подписи. */
  .header__actions {
    gap: 8px;
  }

  .langswitch__btn {
    padding: 5px 10px;
  }

  .cab__head .btn {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .shot--hero {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .bg-layers,
  .site-header {
    display: none;
  }
}
