/* ── Tokens ────────────────────────────────────────────────────────── */
:root {
  --accent: #3b82f6;
  --bg: #0b0d10;
  --panel: #111418;
  --panel-alt: #16191e;
  --panel-alt2: #1a1d23;
  --fg: #e8e6e3;
  --mute: rgba(232, 230, 227, 0.55);
  --faint: rgba(232, 230, 227, 0.35);
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --bubble: rgba(255, 255, 255, 0.04);
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --font-sans: 'Manrope', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1440px;
}

[data-theme="light"] {
  --bg: #fafaf9;
  --panel: #ffffff;
  --panel-alt: #f3f3f1;
  --panel-alt2: #ece8df;
  --fg: #0b0d10;
  --mute: rgba(11, 13, 16, 0.55);
  --faint: rgba(11, 13, 16, 0.35);
  --hair: rgba(0, 0, 0, 0.08);
  --hair-strong: rgba(0, 0, 0, 0.14);
  --bubble: rgba(0, 0, 0, 0.04);
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.18);
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}
button { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; }

main { display: block; }
section { width: 100%; }

em { font-style: italic; color: var(--accent); font-weight: 500; }

.h2 {
  font-size: 52px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.bold { font-weight: 600; }
.accent-text { color: var(--accent); }
.accent-bg { background: var(--accent); color: #0b0d10; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn-accent {
  background: var(--accent);
  color: #12100e;
  box-shadow: 0 8px 24px -8px var(--accent);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px var(--accent); }

/* Install buttons use the accent blue — same hue as the motion-art orbs
   and the marketing accents elsewhere, so the primary CTA reads as part of
   the brand palette instead of a separate green pop-out. */
.btn-install {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 24px -8px var(--accent);
}
.btn-install:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 88%, #000);
  box-shadow: 0 14px 28px -10px var(--accent);
}
.btn-install .btn-icon { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.btn-install.btn-sm .btn-icon { width: 16px; height: 16px; }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--hair-strong);
}
.btn-ghost:hover { background: var(--bubble); }

/* "Получен" — a tier the user already holds via a higher plan. Green, and
   always disabled, so it reads as a done/owned state rather than an action. */
.btn-owned {
  background: color-mix(in srgb, #22c55e 16%, transparent);
  color: #22c55e;
  border: 1px solid color-mix(in srgb, #22c55e 45%, transparent);
}

.btn-tg {
  padding: 9px 16px 9px 14px;
  background: var(--panel-alt);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .btn-tg {
  background: #ffffff;
  color: var(--fg);
  border: 1px solid var(--hair-strong);
  box-shadow: 0 4px 14px -8px rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .btn-tg:hover {
  background: #f4f3ef;
}

.footer-credit-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-credit-link:hover { color: var(--accent); }
.btn-tg:not(.btn-sm) { padding: 14px 22px 14px 18px; font-size: 15px; }
.btn-tg:hover { transform: translateY(-1px); }
.btn-tg .tg-glyph circle { fill: var(--accent); }
.btn-tg .tg-glyph path { fill: #fff; }

.btn-tg-filled {
  background: var(--accent);
  color: #0b0d10;
  border: none;
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-tg-filled .tg-glyph circle { fill: #0b0d10; }

/* ── Header ────────────────────────────────────────────────────────── */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 56px;
  border-bottom: 1px solid var(--hair);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1; justify-self: start; width: max-content; }
.brand-logo { height: 29px; width: auto; }
.brand-logo.small { height: 22px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-name.small { font-size: 14px; }

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--mute);
  justify-self: center;
}
.site-nav a { text-decoration: none; transition: color 0.15s; }
.site-nav a:hover { color: var(--fg); }

.header-actions { display: flex; gap: 10px; align-items: center; justify-self: end; }
.header-divider { width: 1px; height: 20px; background: var(--hair); margin: 0 4px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--hair);
  color: var(--fg);
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--bubble); }

/* ── More menu ─────────────────────────────────────────────────────── */
.more-menu { position: relative; }
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 252px;
  background: var(--panel-alt);
  border: 1px solid var(--hair);
  border-radius: 16px;
  overflow: hidden;
  z-index: 60;
  box-shadow: 0 28px 56px -22px rgba(0, 0, 0, 0.7);
  /* 8px inset on every side — children get rounded hover states inside
     this band instead of edge-to-edge bars, which was the old "bar of
     soap" feel. menu-divider compensates with negative margins so the
     hairlines still go full-bleed. */
  padding: 8px;
}
[data-theme="light"] .menu-panel { background: #fff; box-shadow: 0 28px 56px -22px rgba(0,0,0,0.18); }
.menu-label {
  padding: 10px 8px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--mute);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.menu-divider {
  height: 1px;
  background: var(--hair);
  margin: 8px -8px;
}

/* Toast — small floating status bubble at the bottom of the viewport.
   Used by menu.js for actions that aren't wired yet (e.g. Sign in). */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--panel-alt);
  color: var(--fg);
  border: 1px solid var(--hair);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
/* Mobile-only nav rows inside the more-menu. The header's inline .site-nav
   is hidden at <= 720px to free space for the install/Telegram pills, so
   nav links re-appear here so users can still reach Pricing/etc.
   Exception: the divider directly after the auth-row stays visible on
   desktop too — it separates the Sign in / Sign up CTAs from the
   appearance / language / support cluster regardless of viewport. */
.menu-nav, .menu-nav-divider { display: none; }
.menu-auth-row + .menu-nav-divider { display: block; }
@media (max-width: 720px) {
  .menu-nav, .menu-nav-divider { display: block; }
}
.lang-row { display: flex; padding: 2px 0; gap: 6px; }
.lang-btn {
  flex: 1; padding: 8px 0;
  font-size: 12px; font-weight: 600;
  border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--fg);
  border: 1px solid var(--hair);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.lang-btn:hover { background: var(--bubble); }
.lang-btn.is-active { background: var(--accent); color: #0b0d10; border-color: var(--accent); }
.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color .12s ease;
}
.menu-row + .menu-row { margin-top: 2px; }
.menu-row:hover { background: var(--bubble); }
.menu-row-button { user-select: none; }
.menu-row-label { display: inline-flex; align-items: center; gap: 10px; }
.menu-row-arrow { color: var(--faint, rgba(255,255,255,.4)); font-size: 11px; font-family: var(--font-mono); }
.menu-row:hover .menu-row-arrow { color: var(--mute); }
.theme-switch {
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--accent);
  position: relative; flex-shrink: 0;
  display: inline-block;
}
[data-theme="light"] .theme-switch { background: var(--hair-strong); }
.theme-knob {
  position: absolute; top: 2px; left: 16px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: left 0.15s ease;
}
[data-theme="light"] .theme-knob { left: 2px; }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 56px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Motion-art background: 4 soft-glow orbs that drift around independently
   on long, offset keyframe cycles. Each orb has its own size, hue, position,
   and animation timing — the asymmetric cycles mean the composition never
   repeats exactly, giving an "alive" feel without any JS or canvas.

   Implementation notes:
   - Mix-blend-mode 'screen' (dark) / 'multiply' (light) lets overlapping
     orbs add color cleanly rather than just stacking opacity.
   - blur(80px) is the GPU's heavy lift — it stays cheap because the orbs
     are static-sized and only animate transform (composited, no repaint).
   - `inset: 0` + container overflow:hidden clips the drift so we don't
     leak glow into adjacent sections. */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero-aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .7;
  mix-blend-mode: screen;
  will-change: transform;
}
.hero-aurora span:nth-child(1) {
  width: 520px; height: 520px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, #3b82f6 0%, rgba(59,130,246,0) 70%);
  animation: orb-drift-1 22s ease-in-out infinite alternate;
}
.hero-aurora span:nth-child(2) {
  width: 620px; height: 620px;
  top: 10%; right: -180px;
  background: radial-gradient(circle, #8b5cf6 0%, rgba(139,92,246,0) 70%);
  animation: orb-drift-2 28s ease-in-out infinite alternate;
}
.hero-aurora span:nth-child(3) {
  width: 480px; height: 480px;
  bottom: -160px; left: 28%;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6,182,212,0) 70%);
  animation: orb-drift-3 19s ease-in-out infinite alternate;
}
.hero-aurora span:nth-child(4) {
  width: 380px; height: 380px;
  top: 38%; left: 18%;
  background: radial-gradient(circle, #22d3ee 0%, rgba(34,211,238,0) 70%);
  opacity: .45;
  animation: orb-drift-4 24s ease-in-out infinite alternate;
}
@keyframes orb-drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(160px, 120px, 0) scale(1.15); }
}
@keyframes orb-drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-200px, 140px, 0) scale(0.9); }
}
@keyframes orb-drift-3 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(120px, -180px, 0) scale(1.2); }
}
@keyframes orb-drift-4 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-140px, -100px, 0) scale(0.85); }
}
[data-theme="light"] .hero-aurora span {
  mix-blend-mode: multiply;
  opacity: .25;
  filter: blur(90px);
}
@media (prefers-reduced-motion: reduce) {
  .hero-aurora span { animation: none; }
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-title {
  font-size: 76px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--mute);
  margin: 28px 0 0;
  max-width: 540px;
  text-wrap: pretty;
}
.hero-sub.centered { margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

/* ── Carousel + browser frame ─────────────────────────────────────── */
.carousel { position: relative; }
.browser-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--panel);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 12px 30px -15px rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .browser-frame { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.25), 0 12px 30px -15px rgba(0, 0, 0, 0.15); }
.carousel-frame {
  transform: perspective(1800px) rotateY(-3deg) rotateX(2deg);
  transform-origin: center;
}
.browser-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair);
  background: var(--panel);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser-url {
  flex: 1; margin-left: 14px;
  background: var(--bubble);
  border-radius: 7px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
}
.browser-body { background: #0e1014; line-height: 0; aspect-ratio: 8 / 5; cursor: zoom-in; }
.browser-body img { width: 100%; height: 100%; display: block; object-fit: cover; image-rendering: high-quality; }

/* ── Lightbox ──────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(7, 9, 12, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 64px 80px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  cursor: zoom-out;
  user-select: none;
}
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06); color: #e8e6e3;
  cursor: pointer; display: grid; place-items: center;
  font-size: 18px; line-height: 1; padding: 0;
  transition: background 0.15s, transform 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.12); transform: scale(1.05); }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06); color: #e8e6e3;
  cursor: pointer; display: grid; place-items: center;
  font-size: 20px; padding: 0;
  transition: background 0.15s;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.14); }
.lightbox-arrow.prev { left: 20px; }
.lightbox-arrow.next { right: 20px; }
.lightbox-caption {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 12px;
  color: rgba(232,230,227,0.7);
  letter-spacing: 0.04em;
  padding: 8px 16px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  white-space: nowrap;
  max-width: calc(100vw - 80px);
  overflow: hidden; text-overflow: ellipsis;
}
.lightbox-caption .counter { color: var(--accent); margin-right: 8px; }

body.no-scroll { overflow: hidden; }

@media (max-width: 720px) {
  .lightbox { padding: 16px; }
  .lightbox-arrow { width: 40px; height: 40px; }
  .lightbox-arrow.prev { left: 8px; }
  .lightbox-arrow.next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-caption { bottom: 12px; font-size: 11px; }
}

.carousel-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.carousel-caption {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--mute);
  flex: 1;
  text-wrap: pretty;
}
.carousel-counter { color: var(--accent); margin-right: 8px; }
.carousel-nav { display: flex; align-items: center; gap: 8px; }
.carousel-dots { display: flex; gap: 6px; margin-right: 8px; }
.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--hair-strong);
  border: none; padding: 0;
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.carousel-dot.is-active { width: 22px; background: var(--accent); }
.carousel-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: grid; place-items: center;
}
.carousel-arrow.ghost {
  background: transparent;
  border: 1px solid var(--hair-strong);
  color: var(--fg);
}
.carousel-arrow.accent {
  background: var(--accent);
  color: #12100e;
  border: none;
}

/* Carousel placeholder slides */
.slide-placeholder { background: #0e1014; padding: 48px; min-height: 380px; color: #e8e6e3; }
.slide-placeholder .meta { font-size: 13px; font-family: var(--font-mono); color: rgba(232,230,227,0.45); margin-bottom: 8px; }
.slide-placeholder .title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.themes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.theme-card {
  padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.theme-card.is-active { border-color: var(--accent); }
.theme-card .swatch { height: 90px; border-radius: 8px; margin-bottom: 10px; }
.theme-card .name { font-size: 12px; font-weight: 600; }
.theme-card .active { font-size: 10px; color: var(--accent); margin-top: 2px; font-family: monospace; }
.themes-foot {
  margin-top: 24px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(232,230,227,0.5);
  font-family: monospace;
}

.bump-rules { display: grid; gap: 8px; }
.bump-row {
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: 16px 1fr 140px 90px;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.bump-row .name { font-weight: 600; }
.bump-row .freq { color: rgba(232,230,227,0.55); font-family: monospace; font-size: 12px; }
.bump-row .pos { color: var(--accent); font-family: monospace; font-size: 12px; text-align: right; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.live { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.dot.paused { background: #71717a; }

.analytics-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.analytics-num { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; }
.analytics-delta { font-size: 13px; color: #22c55e; font-family: monospace; }
.analytics-bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; }
.analytics-bars i { flex: 1; border-radius: 4px 4px 0 0; display: block; }
.analytics-axis { display: flex; justify-content: space-between; font-size: 11px; font-family: monospace; color: rgba(232,230,227,0.4); margin-top: 8px; }

/* ── Stat strip ────────────────────────────────────────────────────── */
.stat-strip {
  padding: 80px 56px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.stat-label {
  font-size: 12px;
  color: var(--mute);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

/* ── Features ──────────────────────────────────────────────────────── */
.features { padding: 80px 56px 110px; max-width: var(--max); margin: 0 auto; }
.features-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 40px;
}
.features-head > div { max-width: 640px; }
.features-aside {
  font-size: 14px;
  color: var(--mute);
  max-width: 320px;
  text-wrap: pretty;
  margin: 0 0 8px;
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.bento-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 16px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.bento-card:hover { transform: translateY(-2px); border-color: var(--hair-strong); }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-2 { grid-column: span 2; }
.bento-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 20px 0 10px; }
.bento-card p { font-size: 14px; line-height: 1.55; color: var(--mute); margin: 0; text-wrap: pretty; }
.glyph {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--bubble);
  border: 1px solid var(--hair);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.bump-preview {
  margin-top: 24px;
  padding: 16px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
}
[data-theme="light"] .bump-preview { background: rgba(0,0,0,0.03); }
.bump-preview .bump-name { color: var(--fg); }
.bump-preview .bump-rank { margin-left: auto; color: var(--accent); }
.theme-swatches { margin-top: 20px; display: flex; gap: 8px; }
.theme-swatches span { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--hair); display: block; }

/* ── How it works ──────────────────────────────────────────────────── */
.how-it-works { padding: 110px 56px; max-width: var(--max); margin: 0 auto; }
.section-head-center { text-align: center; margin-bottom: 72px; }
.section-head-center .kicker { display: block; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.step-line {
  position: absolute;
  top: 36px; left: 16%; right: 16%;
  height: 1px;
  border-top: 1px dashed var(--hair);
  z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step-num {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--hair);
  margin: 0 auto 24px;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: -0.02em;
}
.step h3 { font-size: 24px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.02em; }
.step p { font-size: 15px; line-height: 1.55; color: var(--mute); margin: 0 auto; max-width: 280px; text-wrap: pretty; }

/* ── Community ─────────────────────────────────────────────────────── */
.community { padding: 110px 56px; border-top: 1px solid var(--hair); }
.community-channel { background: var(--panel-alt); }
.community-chat { background: var(--panel-alt2); border-bottom: 1px solid var(--hair); border-top: none; }
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.community-grid.reverse { grid-template-columns: 1.1fr 1fr; }
.community-body { font-size: 17px; line-height: 1.6; color: var(--mute); margin: 0 0 28px; max-width: 460px; text-wrap: pretty; }
.bullets { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.bullets li { font-size: 14px; color: var(--mute); display: flex; gap: 10px; line-height: 1.5; }
.bullets li span { color: var(--accent); font-weight: 700; }

.dev-note {
  margin: 56px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--mute);
  max-width: 1280px;
}

/* TG card mock */
.tg-card {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.tg-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}
.tg-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.tg-avatar.sm { width: 36px; height: 36px; font-size: 14px; font-weight: 700; }
.tg-card-meta { flex: 1; min-width: 0; }
.tg-card-title { font-weight: 700; color: var(--fg); font-size: 15px; }
.tg-card-sub { font-size: 12px; color: var(--mute); }
.tg-posts { display: grid; gap: 12px; margin-top: 16px; }
.tg-post {
  padding: 14px;
  background: var(--bubble);
  border-radius: 12px;
}
.tg-post-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tg-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
}
.tg-time { font-size: 11px; color: var(--faint); }
.tg-post-title { font-size: 14px; font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.tg-post-body { font-size: 13px; color: var(--mute); line-height: 1.5; }

.tg-msgs { display: grid; gap: 12px; margin-top: 16px; }
.tg-msg { display: flex; gap: 10px; align-items: flex-start; }
.tg-msg > div:last-child { flex: 1; }
.tg-msg-name { font-size: 12px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
.tg-msg-bubble {
  background: var(--bubble);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--fg);
  line-height: 1.5;
}
.dev-tag {
  margin-left: 6px;
  font-size: 9px;
  padding: 1px 6px;
  background: var(--accent);
  color: #0b0d10;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.tg-typing {
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* ── Browsers ──────────────────────────────────────────────────────── */
.browsers { padding: 100px 56px; border-bottom: 1px solid var(--hair); max-width: var(--max); margin: 0 auto; }
.browser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}
.browser-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 14px;
}
.browser-logo { width: 36px; height: 36px; flex-shrink: 0; display: block; object-fit: contain; }
.browser-tile-name { font-size: 14px; font-weight: 600; color: var(--fg); line-height: 1.2; }
.browser-tile-detail { font-size: 11px; color: var(--faint); font-family: var(--font-mono); margin-top: 4px; letter-spacing: 0.04em; }
.browser-foot {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  flex-wrap: wrap;
}

/* ── Final CTA ─────────────────────────────────────────────────────── */
.final-cta { padding: 140px 56px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-title {
  font-size: 84px;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0 auto 24px;
  max-width: 1000px;
  text-wrap: balance;
}
.cta-buttons { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Footer ────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--hair);
  padding: 44px 56px;
  /* 3-column grid keeps the link row dead-centered regardless of how
     wide the brand or credit columns end up — flex space-between only
     positioned items relative to their siblings, not to the page. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 13px;
  color: var(--mute);
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 16px; justify-self: start; }
.footer-year { font-family: var(--font-mono); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-self: center; justify-content: center; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--fg); }
.footer-credit { justify-self: end; }
.sep { color: var(--faint); }
.footer-credit .bold { color: var(--fg); }

/* ── Pricing page ──────────────────────────────────────────────────── */
.pricing-main { position: relative; overflow: hidden; isolation: isolate; }
.pricing-hero { padding: 80px 56px; text-align: center; max-width: 900px; margin: 0 auto; }
.pricing-hero h1 {
  font-size: 80px;
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.pricing-hero h1 .muted { color: var(--mute); }
.pricing-hero .lead {
  font-size: 19px; line-height: 1.55; color: var(--mute);
  max-width: 560px; margin: 28px auto 0; text-wrap: pretty;
}
.billing-toggle {
  display: inline-flex; padding: 4px;
  background: var(--bubble); border-radius: 999px;
  font-size: 13px;
  margin-top: 36px;
}
.billing-toggle button {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  font-weight: 600;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
}
.billing-toggle button.is-active { background: var(--accent); color: #12100e; }
.discount-tag {
  font-size: 10px; padding: 2px 7px;
  background: var(--accent); color: #12100e;
  border-radius: 999px; font-weight: 700;
}
.billing-toggle button.is-active .discount-tag { background: rgba(0,0,0,0.18); }

/* Month / Year billing toggle above the tier grid. */
.bill-period {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto 36px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 999px;
}
.bill-period-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.bill-period-opt:hover { color: var(--fg); }
.bill-period-opt.is-active { background: var(--accent); color: #fff; }
.bill-period-save {
  margin: 0 8px 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: #22c55e;
  background: color-mix(in srgb, #22c55e 14%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 56px 100px;
}
/* Two-tier layout (Basic + Community) — fixed-width tracks centered in
   the container so the pair sits as a visually balanced unit instead of
   stretching to fill an arbitrary desktop width. */
.tier-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
  max-width: none;
}
@media (max-width: 720px) {
  /* On phones, single column already stacks via the global .tier-grid
     override; let the card use the full width instead of capping at 380. */
  .tier-grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* Disabled button state — used by the "Текущий план" CTA on Basic. */
.btn:disabled,
.btn[disabled] {
  cursor: default;
  opacity: 0.55;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.tier {
  position: relative;
  padding: 32px;
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--hair);
  min-height: 540px;
  display: flex;
  flex-direction: column;
}
.tier.featured {
  /* Gradient border that matches .grad-indigo (the Community badge).
     CSS borders can't take a gradient as border-color directly with a
     border-radius, so we layer two backgrounds: an inner panel-coloured
     fill clipped to the padding box, and the badge gradient clipped to
     the border box. The 1px transparent border becomes the visible
     gradient stripe. */
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) border-box;
  box-shadow: 0 40px 80px -40px rgba(124, 58, 237, 0.35);
}
.tier.pro {
  /* Same gradient-border trick as .featured, but matching .grad-orange
     (yellow → orange) for the Pro tier. */
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, #facc15 0%, #f97316 100%) border-box;
  box-shadow: 0 40px 80px -40px rgba(249, 115, 22, 0.4);
}
.tier-ribbon {
  position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  color: white;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.tier-badge {
  display: inline-flex; align-self: flex-start;
  align-items: center; gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  color: white;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.tier-tagline { font-size: 14px; color: var(--mute); margin: 0 0 20px; text-wrap: pretty; }
.tier-price {
  /* Caption ("навсегда" / "Для активных участников...") sits BELOW the
     price number, not next to it — keeps every card's price block the
     same shape and frees vertical alignment between the two tiers. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}
.tier-price .num { font-size: 52px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.tier-price .period { font-size: 13px; color: var(--mute); }
.tier hr { border: 0; height: 1px; background: var(--hair); margin: 24px 0; }
/* align-content: start prevents grid from stretching the gaps between
   bullets when the list grows via flex: 1 to push the CTA to the bottom.
   Gap stays a literal 12px in both 3-bullet and 6-bullet cards. */
.tier-bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; flex: 1; align-content: start; }
.tier-bullets li { font-size: 14px; display: flex; gap: 10px; line-height: 1.45; color: var(--mute); }
.tier-bullets li .check { color: var(--accent); flex-shrink: 0; font-weight: 700; }
.tier-cta { margin-top: 28px; }
.tier-cta .btn { width: 100%; justify-content: center; }
/* Owned-tier personalisation (pricing page, signed-in visitors). */
.tier[data-owned] { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-grad {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(239,68,68,0.5);
}

/* Yellow→orange gradient button — pairs with .grad-orange Pro badge. */
.btn-orange {
  background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
  color: #422006;
  box-shadow: 0 8px 24px -8px rgba(249, 115, 22, 0.5);
}
.btn-orange:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(249, 115, 22, 0.6); }

/* Indigo→violet gradient button — matches the .grad-indigo badge used on
   the Community pricing tier, so the CTA feels paired with the badge. */
.btn-indigo {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.5);
}
.btn-indigo:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(124, 58, 237, 0.6); }

.grad-silver { background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%); }
.grad-indigo { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
.grad-orange { background: linear-gradient(135deg, #facc15 0%, #f97316 100%); }

.compare {
  padding: 80px 56px;
  border-top: 1px solid var(--hair);
}
.compare-inner { max-width: 1100px; margin: 0 auto; }
.compare h2 { font-size: 44px; line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 48px; }
.compare table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th {
  text-align: center;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--hair);
}
.compare th.feature-col {
  text-align: left;
  font-weight: 600;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.compare th.pro-col { color: var(--accent); }
.compare td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
}
.compare td.center { text-align: center; }
.compare td.feature { color: var(--fg); }
.compare td.dash { color: var(--faint); text-align: center; }
.compare td.check { color: var(--mute); text-align: center; font-size: 16px; }
.compare td.check.pro { color: var(--accent); font-weight: 700; }
.compare td.note { color: var(--mute); text-align: center; font-family: var(--font-mono); font-size: 13px; }

.faq {
  padding: 100px 56px;
  border-top: 1px solid var(--hair);
}
.faq-inner { max-width: 900px; margin: 0 auto; }
.faq h2 { font-size: 44px; line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 48px; text-align: center; }
.faq-list { display: grid; gap: 12px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 20px 24px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 18px;
  transition: transform 0.15s ease;
}
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { font-size: 15px; line-height: 1.6; color: var(--mute); margin: 14px 0 0; text-wrap: pretty; }

.pricing-cta { padding: 120px 56px; text-align: center; border-top: 1px solid var(--hair); }
.pricing-cta h2 {
  font-size: 64px; line-height: 0.98; font-weight: 700;
  letter-spacing: -0.035em; margin: 0 auto 32px;
  max-width: 800px; text-wrap: balance;
}

/* ── Privacy page ──────────────────────────────────────────────────── */
/* ── Stub pages (Terms etc.) ──────────────────────────────────────── */
.stub-hero {
  padding: 120px 56px 160px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.stub-hero h1 {
  font-size: 64px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.stub-hero .lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--mute);
  margin: 28px auto 40px;
  max-width: 580px;
  text-wrap: pretty;
}
.stub-hero .cta-buttons {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0 40px;
  text-align: left;
}
.support-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 16px;
  color: var(--fg);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.support-card:hover {
  transform: translateY(-2px);
  border-color: var(--hair-strong);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.4);
}
.support-card .glyph { color: var(--accent); }
.support-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 20px 0 8px;
}
.support-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mute);
  margin: 0 0 18px;
}
.support-card-value {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
}
.support-copy-hint {
  font-family: var(--font-sans, inherit);
  font-size: 12px;
  color: var(--mute);
  margin-left: 4px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .support-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Payment modal ─────────────────────────────────────────────────
   Generic overlay used by the Pro "Купить" CTA. The modal opens with a
   provider-selection list (CryptoBot, Heleket, …); each .pay-method is a
   clickable button that will later kick off the provider's checkout flow.
   Backdrop and any [data-modal-close] element trigger close, as does ESC. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-fade-in 200ms ease-out;
}
.modal-panel {
  position: relative;
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
  animation: modal-slide-up 280ms cubic-bezier(.2,.7,.2,1);
}
.modal-panel-pay {
  width: min(760px, 100%);
  padding: 32px 32px 28px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--mute);
  font-size: 24px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--bubble); color: var(--fg); }
.modal-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.modal-sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--mute);
}
.modal-foot {
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--mute);
  text-align: center;
}

/* ── Payment modal: two-column body ──────────────────────────────────── */
.pay-modal-head { margin-bottom: 20px; }
.pay-modal-head .modal-title { margin-bottom: 4px; }
.pay-modal-head .modal-sub { margin: 0; }

/* Secondary "coming soon" modal — shown on top of the main payment
   modal when PAYMENTS_ENABLED=false and the user hits Оплатить.
   Lives in its own dialog so the underlying flow stays intact. */
.modal-panel-notice {
  width: min(420px, 100%);
  padding: 32px 28px 24px;
  text-align: center;
}
.modal-panel-notice .pay-disabled-icon {
  width: 64px; height: 64px;
  margin: 4px auto 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--mute) 14%, transparent);
  color: var(--mute);
}
.pay-disabled-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pay-disabled-text {
  margin: 0 auto 18px;
  max-width: 360px;
  font-size: 14px;
  color: var(--mute);
  line-height: 1.5;
}
.pay-disabled-close {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
}

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 720px) {
  .pay-grid { grid-template-columns: 1fr; gap: 16px; }
  .modal-panel-pay { padding: 28px 22px 22px; }
}
.pay-col-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Methods column */
.pay-methods-col { display: flex; flex-direction: column; }
.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--bubble);
  border: 1px solid var(--hair);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--fg);
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
}
.pay-method:hover { background: color-mix(in srgb, var(--bubble) 60%, var(--fg) 4%); }
.pay-method:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pay-method[aria-checked="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--bubble) 70%, var(--accent) 10%);
}
.pay-method[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}
.pay-method[aria-disabled="true"]:hover { background: var(--bubble); }
.pay-method-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  overflow: hidden;
}
[data-theme="light"] .pay-method-icon { background: rgba(0, 0, 0, 0.05); }
.pay-method-logo { width: 100%; height: 100%; object-fit: contain; }
/* The fallback SVG sits behind the <img>; when the logo file is missing
   the inline onerror handler hides <img>, revealing the fallback. */
.pay-method-fallback { color: var(--mute); }
.pay-method-logo + .pay-method-fallback { display: none; }
.pay-method-logo[style*="display: none"] + .pay-method-fallback,
.pay-method-logo[style*="display:none"]  + .pay-method-fallback { display: block; }
.pay-method-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-method-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.pay-method-meta { font-size: 12px; color: var(--mute); }
.pay-method-fee { font-size: 12px; font-weight: 600; color: var(--accent); }
.pay-method-fee.is-unavailable { color: var(--mute); font-weight: 500; }
.pay-method-radio {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--hair);
  position: relative;
  transition: border-color 0.15s, background-color 0.15s;
}
.pay-method[aria-checked="true"] .pay-method-radio {
  border-color: var(--accent);
  background: var(--accent);
}
.pay-method[aria-checked="true"] .pay-method-radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--panel);
}
.pay-method-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mute) 20%, transparent);
  color: var(--mute);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.pay-methods-foot {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--mute);
}

/* Summary column */
.pay-summary {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 18px;
  background: var(--panel-alt);
  border: 1px solid var(--hair);
  border-radius: 14px;
}
.pay-summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--mute);
}
.pay-summary-line dd { margin: 0; color: var(--fg); }
.pay-summary-line dd strong { font-weight: 600; }
/* Breathing room between the promo block and the charge breakdown. */
.pay-summary-charge { margin-top: 20px; }
.pay-summary-hr {
  border: none;
  border-top: 1px solid var(--hair);
  margin: 14px 0;
}
.pay-promo { display: flex; flex-direction: column; gap: 8px; }
.pay-promo-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.pay-promo-row { display: flex; gap: 8px; }
.pay-promo-input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--fg);
  background: var(--bubble);
  border: 1px solid var(--hair);
  border-radius: 10px;
  transition: border-color 0.15s, background-color 0.15s;
}
.pay-promo-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
}
.pay-promo-input::placeholder { color: var(--mute); opacity: 0.7; }
.pay-promo-apply {
  flex-shrink: 0;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--fg);
  background: var(--bubble);
  border: 1px solid var(--hair);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.pay-promo-apply:hover { background: color-mix(in srgb, var(--bubble) 50%, var(--fg) 6%); }
.pay-promo-status {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--mute);
}
.pay-promo-status[data-state="ok"] { color: #10b981; }
.pay-promo-status[data-state="error"] { color: #ef4444; }
.pay-summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pay-summary-total-label {
  font-size: 13px;
  color: var(--mute);
  letter-spacing: 0.01em;
}
.pay-summary-total-amount {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.pay-primary-btn {
  width: 100%;
  justify-content: center;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.005em;
  border-radius: 12px;
}
.pay-primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none !important;
  box-shadow: none !important;
}
.pay-summary-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--mute);
  text-align: center;
  line-height: 1.45;
}

@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-panel { animation: none; }
}
@media (max-width: 480px) {
  .modal-panel { padding: 28px 20px 20px; border-radius: 16px; }
  .pay-method { padding: 12px 14px; gap: 12px; }
  .pay-method-icon { width: 40px; height: 40px; }
}

/* ── Legal page (Privacy / Terms etc.) ─────────────────────────────
   Single-column reading view: title + lead + numbered sections. No TOC,
   no decorative side panels. Optimised for legibility on first scroll. */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 100px;
}
.legal-title {
  font-size: 48px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.legal-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--mute);
  margin: 0 0 48px;
  text-wrap: pretty;
}
.legal-section {
  margin: 0 0 32px;
}
.legal-section h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.legal-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 12px;
}
.legal-section ul {
  margin: 4px 0 12px;
  padding-left: 22px;
}
.legal-section li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 6px;
}
.legal-closing {
  margin: 40px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--hair);
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
  font-weight: 600;
}
.legal-support-note {
  margin: 48px 0 0;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mute);
}
.legal-support-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.legal-support-note a:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .legal-page { padding: 48px 20px 80px; }
  .legal-title { font-size: 36px; }
  .legal-lead { font-size: 15px; margin-bottom: 32px; }
}

.privacy-hero { padding: 100px 56px 60px; max-width: 1100px; margin: 0 auto; }
.privacy-hero h1 {
  font-size: 88px;
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
  max-width: 900px;
}
.privacy-hero .lead {
  font-size: 19px; line-height: 1.55; color: var(--mute);
  margin: 28px 0 0; max-width: 640px; text-wrap: pretty;
}

.privacy-body { padding: 40px 56px 120px; }
.privacy-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  max-width: 1240px;
  margin: 0 auto;
  align-items: start;
}
.privacy-toc {
  position: sticky;
  top: 96px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.privacy-toc-label {
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}
.privacy-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.privacy-toc a {
  display: flex; gap: 12px;
  text-decoration: none;
  color: var(--fg);
  line-height: 1.4;
  transition: color 0.15s;
}
.privacy-toc a:hover .toc-title { color: var(--fg); }
.privacy-toc .toc-num { color: var(--accent); flex-shrink: 0; }
.privacy-toc .toc-title { font-family: var(--font-sans); font-size: 13px; color: var(--mute); }
.privacy-toc-source {
  margin-top: 32px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: var(--panel);
}
.privacy-toc-source .label { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; }
.privacy-toc-source .text { font-family: var(--font-sans); font-size: 13px; color: var(--fg); line-height: 1.5; margin-bottom: 12px; }
.privacy-toc-source .link { font-family: var(--font-mono); font-size: 12px; color: var(--accent); text-decoration: none; }

.privacy-sections { display: grid; gap: 64px; }
.privacy-section { scroll-margin-top: 96px; }
.privacy-section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.privacy-section-head .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); font-weight: 600; }
.privacy-section h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; margin: 0; line-height: 1.1; }
.privacy-section p { font-size: 16px; line-height: 1.65; color: var(--mute); margin: 0 0 16px; text-wrap: pretty; max-width: 680px; }
.privacy-section dl { margin: 20px 0 0; display: grid; gap: 18px; max-width: 720px; }
.privacy-section .row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hair);
}
.privacy-section dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.privacy-section dd { margin: 0; font-size: 15px; line-height: 1.6; color: var(--mute); text-wrap: pretty; }

.privacy-end {
  margin-top: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.privacy-cta { padding: 100px 56px; text-align: center; border-top: 1px solid var(--hair); }
.privacy-cta h2 {
  font-size: 56px; line-height: 0.98; font-weight: 700;
  letter-spacing: -0.035em; margin: 0 auto 24px;
  max-width: 720px; text-wrap: balance;
}
.privacy-cta p { font-size: 17px; color: var(--mute); max-width: 520px; margin: 0 auto 36px; }

html { scroll-behavior: smooth; }

.site-nav a.is-current { color: var(--fg); font-weight: 600; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features-head { flex-direction: column; align-items: flex-start; }
  .community-grid, .community-grid.reverse { grid-template-columns: 1fr; gap: 48px; }
  .browser-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .hero-title { font-size: 56px; }
  .h2 { font-size: 40px; }
  .cta-title { font-size: 60px; }
}

@media (max-width: 720px) {
  .site-header { grid-template-columns: 1fr auto; padding: 16px 20px; }
  .site-nav { display: none; }
  .hero, .features, .how-it-works, .community, .browsers, .final-cta { padding-left: 20px; padding-right: 20px; }
  /* Phones already fit hero content within their viewport; relax the 100vh
     min-height so we don't leave a whitespace gap below the carousel. */
  .hero { padding-top: 48px; padding-bottom: 32px; min-height: 0; display: block; }
  .features, .how-it-works, .community, .browsers { padding-top: 64px; padding-bottom: 64px; }
  .final-cta { padding-top: 80px; padding-bottom: 80px; }
  .hero-title { font-size: 40px; }
  .h2 { font-size: 30px; }
  .cta-title { font-size: 44px; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.span-4, .bento-card.span-2 { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step-line { display: none; }
  .browser-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; padding: 32px 20px; }
  /* Revert grid → flex column on mobile so brand / links / credit stack. */
  .site-footer { display: flex; flex-direction: column; align-items: flex-start; padding: 32px 20px; }
  .footer-brand, .footer-links, .footer-credit { justify-self: auto; }
  .footer-links { justify-content: flex-start; }
  .header-actions .btn-tg { display: none; }
  .header-divider { display: none; }
  .footer-links { gap: 16px; }
  .carousel-frame { transform: none; }
  .pricing-hero h1 { font-size: 48px; }
  .privacy-hero h1 { font-size: 48px; }
  .privacy-grid { grid-template-columns: 1fr; gap: 40px; }
  .privacy-toc { position: static; }
  .privacy-section .row { grid-template-columns: 1fr; gap: 6px; }
  .tier-grid { grid-template-columns: 1fr; padding: 24px 20px 64px; }
  .tier.featured { transform: none; }
  .compare, .faq, .pricing-cta, .privacy-cta, .privacy-body, .pricing-hero, .privacy-hero { padding-left: 20px; padding-right: 20px; }
  .compare table { font-size: 12px; min-width: 480px; }
  .compare th, .compare td { padding: 10px 8px; }
  /* Many phones are < 480px wide; let the comparison table scroll
     horizontally inside its container instead of squeezing the cells. */
  .compare-inner { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pricing-cta h2 { font-size: 40px; }
  .privacy-cta h2 { font-size: 36px; }
  .stub-hero { padding: 64px 20px 96px; }
  .stub-hero h1 { font-size: 36px; }
}

/* Narrow phones (≤ 480px): tighten the header so the install pill stops
   crowding the brand, and stack stacked-button rows into vertical, full-
   width touch targets. */
@media (max-width: 480px) {
  /* Header install button: collapse to icon-only. The CWS logo alone
     reads as "install" and frees ~220px back to the brand. */
  .btn-install.btn-sm { padding: 8px 10px; gap: 0; }
  .btn-install.btn-sm span { display: none; }

  /* Headline + CTA typography one notch tighter so they don't wrap onto 4-5 lines */
  .hero-title { font-size: 36px; }
  .h2 { font-size: 26px; }
  .cta-title { font-size: 36px; }
  .pricing-cta h2 { font-size: 32px; }
  .privacy-cta h2 { font-size: 30px; }
  .privacy-hero h1 { font-size: 38px; }
  .stub-hero h1 { font-size: 30px; }

  /* CTA button rows go vertical with full-width buttons — easier to
     thumb-press, no awkward hanging single-button row after wrap. */
  .hero-cta,
  .final-cta .cta-buttons,
  .pricing-cta .cta-buttons,
  .privacy-cta .cta-buttons,
  .stub-hero .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta .btn,
  .final-cta .btn,
  .pricing-cta .btn,
  .privacy-cta .btn,
  .stub-hero .btn { justify-content: center; }

  /* Pricing tiers: looser padding inside the card so content breathes */
  .tier { padding: 24px; min-height: 0; }
  .tier-cta .btn { width: 100%; }

  /* Stat-strip top padding scales down (was ~80px from the 720 breakpoint) */
  .stat-strip { padding: 32px 20px; }

  /* Hero padding tighter top */
  .hero { padding-top: 32px; }

  /* Final CTA padding */
  .final-cta { padding-top: 64px; padding-bottom: 64px; }
}

/* ── Entrance animations ───────────────────────────────────────────── */

/* Hero text: stagger-in on load. Delays keep it tight: title → sub → cta. */
@keyframes fade-up {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: none; }
}
.hero-title,
.hero-sub,
.hero-cta,
.hero .carousel {
  opacity: 0;
  animation: fade-up 700ms cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-title  { animation-delay:  60ms; }
.hero-sub    { animation-delay: 180ms; }
.hero-cta    { animation-delay: 300ms; }
.hero .carousel { animation-delay: 200ms; animation-duration: 900ms; }

/* Scroll-revealed blocks. JS adds .is-in when they enter the viewport. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 700ms cubic-bezier(.2,.7,.2,1),
    transform 700ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* When the reveal contains a grid of items (bento, browsers, stat-strip),
   we let each child animate in with its own staggered delay. JS sets
   --i on each child; CSS turns that into a delay. */
.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 600ms cubic-bezier(.2,.7,.2,1),
    transform 600ms cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-stagger.is-in > * {
  opacity: 1;
  transform: none;
}

/* Respect user preference — kills both load-in and scroll-in. The hero
   aurora gets pinned to a static position too, so no transition jank. */
@media (prefers-reduced-motion: reduce) {
  .hero-title, .hero-sub, .hero-cta, .hero .carousel {
    opacity: 1;
    animation: none;
  }
  .reveal, .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero::before, .hero::after { transition: none; }
}

/* ── Auth pages (login / register) ─────────────────────────────────── */
.auth-hero {
  max-width: 460px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.auth-card {
  background: var(--card-bg, rgba(255,255,255,.04));
  border: 1px solid var(--card-border, rgba(255,255,255,.08));
  border-radius: 18px;
  padding: 40px 32px;
}
.auth-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
}
.auth-card .lead {
  margin: 0 0 28px;
  color: var(--muted, rgba(255,255,255,.65));
  font-size: 15px;
}
.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn-auth:hover {
  background: rgba(255,255,255,.1);
}
.btn-auth:active {
  transform: scale(.985);
}
.auth-switch {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--muted, rgba(255,255,255,.6));
}
.auth-switch a {
  color: var(--accent, #ff8a3d);
  text-decoration: none;
  margin-left: 6px;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
  background: rgba(255, 90, 90, .12);
  border: 1px solid rgba(255, 90, 90, .35);
  color: #ffb3b3;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 18px;
  font-size: 14px;
  text-align: left;
}

/* ── Wide multi-column footer ──────────────────────────────────────── */
.site-footer-wide {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 1fr 1fr 1fr;
  grid-template-areas: "brand docs contact account";
  gap: 48px;
  align-items: start;
  padding: 56px 56px 40px;
}
.site-footer-wide .footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-col-brand { grid-area: brand; }
.site-footer-wide .footer-col-brand .brand { gap: 10px; }
.site-footer-wide .footer-col-brand .footer-year { font-size: 12px; }
.footer-tagline {
  margin: 0;
  font-size: 13px;
  color: var(--mute);
  max-width: 280px;
  line-height: 1.5;
}
.footer-col-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: .65;
}
.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-link-list a {
  color: var(--mute);
  text-decoration: none;
  font-size: 14px;
  transition: color .12s ease;
}
.footer-link-list a:hover { color: var(--fg); }

@media (max-width: 1024px) {
  .site-footer-wide {
    grid-template-columns: minmax(220px, 1fr) 1fr 1fr;
    grid-template-areas:
      "brand brand brand"
      "docs contact account";
    gap: 40px;
  }
}
@media (max-width: 720px) {
  .site-footer-wide {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "docs" "contact" "account";
    gap: 36px;
    padding: 36px 24px 28px;
  }
}

/* ── Header auth links ─────────────────────────────────────────────── */
.header-auth-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--mute);
  transition: color .12s ease, background-color .12s ease;
}
.header-auth-link:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, .06);
}
.header-auth-link-cta {
  color: var(--fg);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}
.header-auth-link-cta:hover {
  background: rgba(255, 255, 255, .14);
}

@media (max-width: 880px) {
  .header-auth-link { display: none; }
}

/* ── Auth buttons inside the more-menu dropdown ─────────────────────── */
.menu-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  /* Lives at the top of the panel, no top margin — panel padding gives
     the breathing room. Bottom margin only when followed by a divider
     would be redundant (divider already has its own margin). */
}
.menu-auth-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
}
/* The orange CTA gradient is great on the marketing pages but reads as
   neon-loud inside the muted dropdown. Inside .menu-auth-btn, neutralise
   it into a high-contrast "filled" style that reuses the theme's
   foreground colour — works for both dark and light schemes without
   maintaining two gradients. */
.menu-auth-btn.btn-orange {
  background: var(--fg);
  color: var(--panel-alt);
  box-shadow: none;
}
.menu-auth-btn.btn-orange:hover {
  background: var(--fg);
  color: var(--panel-alt);
  transform: none;
  box-shadow: none;
  opacity: 0.88;
}

/* ── Authenticated menu row (signed-in state) ──────────────────────────
   Mirrors .menu-auth-row layout but shows the nickname + a Logout button.
   Toggled against .menu-auth-row by render.ts (SSR) and auth.js (client
   fallback): one of the two carries [hidden] at any time. */
.menu-user-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 4px 2px 8px;
}
/* Mini section header ("Аккаунт") above the nick — same look as the
   .menu-label section headers (Appearance / Language / Support). */
.menu-user-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mute);
}
/* The `display` rules above override the UA stylesheet's [hidden]{display:none}
   (an author `display` always beats UA), so the [hidden] attribute alone would
   not hide either row — both would show at once. Re-assert hiding with
   class+attribute specificity so the SSR / auth.js toggle actually takes. */
.menu-auth-row[hidden],
.menu-user-row[hidden] {
  display: none;
}
.menu-user-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* When the access token carries no name claim the nick is empty — collapse it
   so only the "Аккаунт" header + Log out show. */
.menu-user-name:empty {
  display: none;
}
/* Logout sits on its own line below the nick (full width via .menu-auth-btn). */
.menu-user-row .menu-auth-btn {
  margin-top: 4px;
}

/* ── Payment success / polling page ───────────────────────────────────── */
.success-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 18px;
  border: 3px solid var(--hair-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: success-spin 0.8s linear infinite;
}
@keyframes success-spin { to { transform: rotate(360deg); } }

