/* ── 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 get their own green so the primary "go" action reads
   distinctly from the blue accent used everywhere else. */
.btn-install {
  background: #22c55e;
  color: #052e1a;
  box-shadow: 0 8px 24px -8px #22c55e;
}
.btn-install:hover { transform: translateY(-1px); background: #16a34a; box-shadow: 0 14px 28px -10px #16a34a; }
.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); }

.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: #0b0d10;
  color: #e8e6e3;
  border: none;
}
.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; }
.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% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--panel-alt);
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
  z-index: 60;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  padding: 6px 0;
}
[data-theme="light"] .menu-panel { background: #fff; box-shadow: 0 24px 48px -20px rgba(0,0,0,0.18); }
.menu-label {
  padding: 10px 14px 4px;
  font-size: 10px; font-weight: 700;
  color: var(--mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.menu-divider { height: 1px; background: var(--hair); margin: 4px 0; }
.lang-row { display: flex; padding: 4px 12px 8px; gap: 6px; }
.lang-btn {
  flex: 1; padding: 8px 0;
  font-size: 12px; font-weight: 600;
  border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--fg);
  border: 1px solid var(--hair);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.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: 10px 14px;
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
}
.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(--mute); font-size: 11px; font-family: var(--font-mono); }
.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 {
  /* min-height: 100vh ensures the stat-strip starts below the fold on
     any monitor. Content stays naturally aligned at the top of the
     section via the existing top padding — the extra space sits below
     the content as invisible whitespace. */
  min-height: 100vh;
  padding: 80px 56px 60px;
}
.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 60px;
  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;
}
.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: 110px 56px; 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; }
.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-hero { padding: 32px 56px 16px; 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); }

.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 {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--accent) 35%, transparent);
}
.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; }
.btn-grad {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(239,68,68,0.5);
}

.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, #f59e0b 0%, #ef4444 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;
}

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