/* AdFans — marketing site */
:root {
  --bg: #FFFFFF;
  --bg-elev: #FAFAFA;
  --bg-sunken: #F4F5F7;
  --fg: #0A0B0F;
  --fg-muted: #5A6072;
  --fg-subtle: #8B93A7;
  --line: #E7E9EF;
  --line-strong: #D5D9E3;
  --accent: #2E5BFF;
  --accent-ink: #1E3FC2;
  --accent-wash: #EEF2FF;
  --success: #0EA564;
  --warn: #E88C1A;
  --danger: #E5484D;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(10, 11, 15, 0.04), 0 1px 1px rgba(10, 11, 15, 0.03);
  --shadow: 0 4px 14px -4px rgba(10, 11, 15, 0.08), 0 2px 4px -2px rgba(10, 11, 15, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(10, 11, 15, 0.14), 0 8px 16px -8px rgba(10, 11, 15, 0.08);
  --grid: 72px;
  --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #07080B;
  --bg-elev: #0D0F14;
  --bg-sunken: #111319;
  --fg: #F5F6F8;
  --fg-muted: #9098AD;
  --fg-subtle: #5F6578;
  --line: #1C1F28;
  --line-strong: #262A36;
  --accent: #4D77FF;
  --accent-ink: #7A9BFF;
  --accent-wash: #111A3A;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  transition: background-color .2s ease, color .2s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Typography */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.03em; font-weight: 600; }
h1 { font-size: clamp(44px, 6vw, 84px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 560; }
h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 560; }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; }
h4 { font-size: 15px; line-height: 1.3; font-weight: 550; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  font-weight: 500;
}
.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }

/* Layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.wrap-sm { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
section { padding: 120px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 60px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.nav-logo { display: inline-flex; align-items: center; font-weight: 600; letter-spacing: -0.02em; font-size: 16px; line-height: 0; height: 28px; }
.nav-logo .logo-img { height: auto; width: 108px; max-width: 140px; }
.footer-grid .logo-img { height: auto; width: 136px; max-width: 180px; }
[data-theme="light"] .logo-dark { display: none !important; }
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="light"] .logo-light { display: block; }
[data-theme="dark"] .logo-dark { display: block; }
.nav-logo-mark {
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, #4D77FF 0%, #1B2D5C 100%);
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.nav-logo-mark::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.4), transparent 60%);
}
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; }
.nav-links a {
  padding: 6px 12px; border-radius: 6px; font-size: 14px; color: var(--fg-muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-sunken); }
.nav-cta { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 10px; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { color: var(--fg-muted); }
.btn-ghost:hover { color: var(--fg); background: var(--bg-sunken); }
.btn-outline { border: 1px solid var(--line-strong); color: var(--fg); }
.btn-outline:hover { background: var(--bg-sunken); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }

/* Tag / chip */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-sunken); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em;
  color: var(--fg-muted);
}
.tag-accent { background: var(--accent-wash); border-color: transparent; color: var(--accent-ink); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Hero */
.hero { padding-top: 100px; padding-bottom: 0; border-top: 0; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center;
  padding-bottom: 80px;
}
.hero h1 { margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: 19px; line-height: 1.5; color: var(--fg-muted); max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 40px; }
.hero-meta { display: flex; gap: 28px; color: var(--fg-muted); font-size: 13px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .check { color: var(--success); }

/* Hero mock: Meta Ads Manager */
.hero-mock {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(2400px) rotateY(-3deg) rotateX(1deg);
  transform-origin: left center;
}
.mock-chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg-sunken); font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted);
}
.mock-dots { display: flex; gap: 6px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock-body { padding: 20px; }

/* Hero metrics row */
.metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.metric { padding: 14px 16px; background: var(--bg-elev); }
.metric-label { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); margin-bottom: 6px; }
.metric-value { font-size: 22px; font-weight: 550; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-delta { font-size: 11px; font-family: var(--font-mono); margin-top: 2px; }
.metric-delta.up { color: var(--success); }
.metric-delta.down { color: var(--danger); }

/* Campaign table */
.ad-table { font-size: 12.5px; width: 100%; border-collapse: collapse; }
.ad-table th { text-align: left; padding: 8px 10px; font-weight: 500; font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); border-bottom: 1px solid var(--line); }
.ad-table td { padding: 10px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-table .cell-name { display: flex; align-items: center; gap: 8px; }
.ad-table .swatch { width: 6px; height: 14px; border-radius: 2px; background: var(--accent); }
.ad-table .status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-muted); font-family: var(--font-mono); }
.ad-table .status.live::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 20%, transparent); }
.ad-table .status.paused::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--fg-subtle); }
.num-pos { color: var(--success); }
.num-neg { color: var(--danger); }
.right { text-align: right; }

/* Logo clouds */
.logos { display: flex; gap: clamp(24px, 3vw, 48px); align-items: center; justify-content: space-between; flex-wrap: nowrap; width: 100%; }
.logo-slot { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; color: var(--fg-muted); white-space: nowrap; }
.logo-slot .brand-mark { height: 22px; width: 22px; display: block; flex-shrink: 0; }
.logo-slot .brand-word { font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: -0.3px; color: var(--fg); }
[data-theme="light"] .brand-mark-dark { display: none; }
[data-theme="dark"] .brand-mark-light { display: none; }

/* Section header */
.section-head { max-width: 760px; margin-bottom: 64px; }
.section-head h2 { margin-bottom: 20px; }
.section-head p { font-size: 19px; color: var(--fg-muted); max-width: 620px; }
.section-head .eyebrow { margin-bottom: 16px; display: block; }

/* Feature bento grid */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  position: relative;
  transition: border-color .2s;
}
.bento-card:hover { border-color: var(--line-strong); }
.bento-card h3 { margin-bottom: 8px; }
.bento-card p { color: var(--fg-muted); font-size: 14px; line-height: 1.5; }
.bc-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--accent); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.bc-art { margin-top: 24px; margin-left: -28px; margin-right: -28px; margin-bottom: -28px; min-height: 180px; border-top: 1px solid var(--line); background: var(--bg-sunken); position: relative; overflow: hidden; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

/* Flow diagram */
.flow {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; align-items: stretch; margin-top: 40px;
}
.flow-node {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; position: relative; min-height: 160px;
}
.flow-node .eyebrow { margin-bottom: 10px; }
.flow-node h4 { margin-bottom: 6px; font-size: 16px; }
.flow-node p { font-size: 12.5px; color: var(--fg-muted); line-height: 1.45; }
.flow-arrow { position: absolute; right: -10px; top: 50%; width: 20px; height: 1px; background: var(--line-strong); }
.flow-arrow::after { content:''; position:absolute; right:0; top:-3px; border-left: 6px solid var(--line-strong); border-top:3px solid transparent; border-bottom: 3px solid transparent; }

/* Subpage module (anchored) */
.subpage {
  display: grid; grid-template-columns: 360px 1fr; gap: 48px; align-items: start;
}
.subpage-side { position: sticky; top: 80px; }
.subpage-side .eyebrow { margin-bottom: 16px; display: block; }
.subpage-side h2 { margin-bottom: 20px; }
.subpage-side p { color: var(--fg-muted); font-size: 16px; margin-bottom: 28px; }
.subpage-list { display: flex; flex-direction: column; gap: 14px; }
.subpage-list .item { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.subpage-list .item::before {
  content:''; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--accent); background: var(--accent-wash); flex-shrink: 0; margin-top: 2px;
  background-image: radial-gradient(circle, var(--accent) 30%, transparent 35%);
}

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; position: relative;
}
.price-card.featured { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.price-card.featured h3, .price-card.featured .price-num { color: var(--bg); }
.price-card.featured .price-features li { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.price-card.featured .price-features li strong { color: var(--bg); }
.price-name { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.price-num { font-size: 48px; letter-spacing: -0.04em; font-weight: 550; line-height: 1; }
.price-per { color: var(--fg-muted); font-size: 13px; margin-top: 8px; margin-bottom: 24px; font-family: var(--font-mono); }
.price-features { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 10px; }
.price-features li { font-size: 14px; color: var(--fg-muted); display: flex; gap: 10px; align-items: flex-start; }
.price-features li strong { color: var(--fg); font-weight: 500; }
.price-features li::before { content:'✓'; color: var(--accent); font-family: var(--font-mono); font-size: 12px; margin-top: 1px; }
.price-card.featured .price-features li::before { color: var(--accent-ink); filter: brightness(2); }
.price-card .btn { width: 100%; justify-content: center; margin-top: 24px; }

/* Security grid */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sec-item {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.sec-item h4 { margin-bottom: 8px; }
.sec-item p { color: var(--fg-muted); font-size: 13px; line-height: 1.5; }
.sec-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--accent-wash); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 16px; font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

/* Changelog */
.changelog { display: flex; flex-direction: column; }
.cl-item {
  display: grid; grid-template-columns: 160px 1fr; gap: 32px;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.cl-item:last-child { border-bottom: 1px solid var(--line); }
.cl-date { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); padding-top: 4px; }
.cl-date .v { display: block; color: var(--accent); font-size: 11px; margin-top: 4px; }
.cl-body h3 { margin-bottom: 12px; font-size: 20px; }
.cl-body p { color: var(--fg-muted); margin-bottom: 12px; }
.cl-body ul { padding-left: 18px; margin: 0; color: var(--fg-muted); font-size: 14px; }
.cl-body ul li { margin-bottom: 4px; }

/* Use-case */
.usecase { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.usecase-card {
  padding: 40px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.usecase-card .eyebrow { display: block; margin-bottom: 16px; }
.usecase-card h3 { margin-bottom: 12px; font-size: 26px; }
.usecase-card p { color: var(--fg-muted); margin-bottom: 24px; }
.usecase-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.usecase-stat { background: var(--bg-elev); padding: 14px; text-align: center; }
.usecase-stat .v { font-size: 24px; font-weight: 560; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.usecase-stat .l { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); margin-top: 4px; }

/* CTA */
.cta-final {
  background: var(--fg); color: var(--bg); border-radius: var(--radius-xl);
  padding: 80px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-final h2 { color: var(--bg); margin-bottom: 20px; }
.cta-final p { color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 19px; max-width: 520px; margin: 0 auto 32px; }
.cta-final .btn-primary { background: var(--bg); color: var(--fg); }
.cta-final .btn-primary:hover { background: var(--accent); color: #fff; }
.cta-final .btn-ghost { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.cta-final .btn-ghost:hover { color: var(--bg); background: color-mix(in srgb, var(--bg) 10%, transparent); }

/* Footer */
footer { padding: 80px 0 48px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 48px; margin-bottom: 64px; }
.footer-col h5 { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); margin: 0 0 16px; font-family: var(--font-mono); }
.footer-col a { display: block; padding: 4px 0; color: var(--fg-muted); font-size: 14px; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--fg-muted); font-size: 12px; font-family: var(--font-mono); padding-top: 32px; border-top: 1px solid var(--line); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 16px; box-shadow: var(--shadow-lg);
  min-width: 240px; display: none;
}
.tweaks-panel.active { display: block; }
.tweaks-panel h5 { margin: 0 0 12px; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-muted); font-weight: 500; }
.tweak-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; font-size: 13px; }
.toggle { width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; }
.toggle::after { content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition: left .2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 18px; }

/* Mock illustrations  -------------------------------------------- */
.ill { position: absolute; inset: 0; overflow: hidden; }

/* Telegram bubbles */
.tg-bubbles { display: flex; flex-direction: column; gap: 6px; padding: 18px; font-size: 12px; }
.tg-bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; line-height: 1.35; }
.tg-bubble.in { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; }
.tg-bubble.out { background: var(--accent); color:#fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.tg-bubble.bot { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.tg-bubble .mono { font-size: 11px; opacity: .75; display: block; margin-top: 4px; }

/* OF accounts list */
.of-list { padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.of-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.of-avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #FFC1D9, #FF6EA3); flex-shrink: 0; }
.of-avatar.b { background: linear-gradient(135deg, #C3D3FF, #4D77FF); }
.of-avatar.c { background: linear-gradient(135deg, #D6F5E4, #0EA564); }
.of-avatar.d { background: linear-gradient(135deg, #FFE3B8, #E88C1A); }
.of-name { flex: 1; font-weight: 500; }
.of-handle { color: var(--fg-muted); font-family: var(--font-mono); font-size: 11px; }
.of-sync { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-family: var(--font-mono); }

/* Chart */
.chart-svg { width: 100%; height: 100%; display: block; }
.chart-wrap { padding: 16px; height: 100%; display: flex; align-items: stretch; }

/* RBAC tree */
.rbac { padding: 18px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7; color: var(--fg-muted); }
.rbac .role { color: var(--fg); font-weight: 500; }
.rbac .role.sa { color: var(--accent); }

/* Conversion ticker */
.ticker { padding: 14px; font-family: var(--font-mono); font-size: 11px; display: flex; flex-direction: column; gap: 6px; }
.ticker-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.ticker-row .t { color: var(--fg-subtle); }
.ticker-row .e { color: var(--fg); }
.ticker-row .a { color: var(--success); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding-bottom: 60px; }
  .hero-mock { transform: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-3, .span-2, .span-4, .span-6 { grid-column: span 2; }
  .flow { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .usecase { grid-template-columns: 1fr; }
  .subpage { grid-template-columns: 1fr; }
  .subpage-side { position: static; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .logos { flex-wrap: wrap; justify-content: center; gap: 14px 24px; }
  section { padding: 80px 0; }
  .cta-final { padding: 48px 24px; }
  .cl-item { grid-template-columns: 1fr; gap: 8px; }
}


/* ======================== AUDIENCES ======================== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .audience-grid { grid-template-columns: 1fr; } }

.audience-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, transform .15s ease;
}
.audience-card:hover { border-color: var(--line-strong); }

.audience-card .ac-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.audience-card h3 { font-size: 19px; letter-spacing: -0.02em; margin: 0; line-height: 1.25; }
.audience-card p { color: var(--fg-muted); font-size: 14px; line-height: 1.55; margin: 0; flex: 1; }

.audience-card .ac-modules {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.audience-card .ac-modules span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -0.01em;
  color: var(--fg-muted);
  padding: 3px 8px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 5px;
}

/* ======================== SCOUTING MARKETPLACE ======================== */
.scouting-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1.3fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 960px) { .scouting-grid { grid-template-columns: 1fr; gap: 32px; } }

.scouting-side { padding-top: 20px; }
.scouting-side .scouting-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 999px;
  margin-bottom: 16px;
}
.scouting-side h3 { font-size: 32px; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
.scouting-side > p { color: var(--fg-muted); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.scouting-list { display: flex; flex-direction: column; gap: 12px; }
.scouting-list .item {
  padding-left: 26px;
  position: relative;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.55;
}
.scouting-list .item::before {
  content: "→";
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.scouting-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.scouting-row .sr-avatar { width: 40px; height: 40px; border-radius: 50%; }
.scouting-row .sr-info { min-width: 0; }
.scouting-row .sr-name { font-size: 13px; font-weight: 550; }
.scouting-row .sr-meta { color: var(--fg-muted); font-weight: 400; font-family: var(--font-mono); font-size: 11px; }
.scouting-row .sr-tags { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.scouting-row .sr-tags .tag { font-size: 10px; padding: 2px 7px; }

/* ======================== MODULAR PRICING ======================== */
.price-base {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}
@media (max-width: 720px) { .price-base { grid-template-columns: 1fr; } }

.price-base h3 { font-size: 22px; letter-spacing: -0.02em; }
.price-base-amount { text-align: right; }
.price-base-amount .price-num { font-size: 36px; }

.modules-price-head { margin-bottom: 24px; }
.modules-price-head .eyebrow { display: inline-block; margin-bottom: 8px; }
.modules-price-head h3 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 6px; }
.modules-price-head p { color: var(--fg-muted); font-size: 14px; margin: 0; max-width: 620px; }

.modules-price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}
@media (max-width: 1100px) { .modules-price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .modules-price-grid { grid-template-columns: 1fr; } }

.module-price {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.module-price .mp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.module-price h4 { font-size: 15px; font-weight: 560; letter-spacing: -0.01em; margin: 0; }
.module-price .mp-num {
  font-size: 28px;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.module-price .mp-num .unit {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 400;
  margin-left: 4px;
  letter-spacing: 0;
  font-family: var(--font-sans);
}
.module-price ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.module-price li {
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}
.module-price li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}
.module-price-accent {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.module-price-accent h4,
.module-price-accent .mp-num { color: var(--bg); }
.module-price-accent li { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.module-price-accent li::before { color: var(--bg); opacity: .7; }
.module-price-accent .tag {
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  color: var(--bg);
  border-color: transparent;
}

.price-example {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 640px;
  margin: 0 auto;
}
.price-example h3 { font-size: 18px; letter-spacing: -0.02em; }
.example-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.example-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}
.example-row span:last-child { color: var(--fg); font-weight: 550; }
.example-total {
  border-bottom: 0;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.example-total span:last-child { color: var(--accent); font-size: 16px; }


/* ======================== MOBILE (≤640) ======================== */
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; }

@media (max-width: 640px) {
  /* Layout */
  .wrap, .wrap-sm { padding: 0 20px; }
  section { padding: 64px 0; }

  /* Nav */
  .nav-inner { padding: 14px 20px; }
  .nav-logo .logo-img { height: 26px; }
  .nav-cta .btn-ghost { display: none; }
  .nav-cta .btn-sm { font-size: 12px; padding: 8px 12px; }

  /* Hero */
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(40px, 11vw, 54px) !important; line-height: 1.03; letter-spacing: -0.035em; }
  .hero-sub { font-size: 16px; line-height: 1.55; }
  .hero-actions { flex-wrap: wrap; gap: 10px; }
  .hero-actions .btn-lg { flex: 1 1 auto; justify-content: center; font-size: 14px; padding: 12px 16px; }
  .hero-meta { flex-direction: column; gap: 8px; align-items: flex-start; font-size: 13px; }
  .hero-mock { transform: none; }
  .mock-body { padding: 14px; }
  .hero-mock .mock-body > div:first-child { flex-direction: column; gap: 10px; align-items: flex-start !important; }

  /* KPI grids inside mocks → 2x2 */
  .mock-body > div[style*="grid-template-columns:repeat(4,1fr)"],
  .mock-body > div[style*="grid-template-columns: repeat(4,1fr)"],
  .mock-body > div[style*="grid-template-columns:repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Section heads */
  .section-head h2, h2 { font-size: clamp(28px, 7.5vw, 36px) !important; letter-spacing: -0.025em; line-height: 1.12; }
  .section-head p { font-size: 15px; }

  /* Bento → single column */
  .bento { grid-template-columns: 1fr !important; gap: 14px; }
  .span-3, .span-2, .span-4, .span-6 { grid-column: span 1 !important; }
  .bento-card h3 { font-size: 20px; letter-spacing: -0.02em; }
  .bento-card { padding: 24px; }
  .bc-art { padding: 0; }

  /* Flow → single column, remove arrows */
  .flow { grid-template-columns: 1fr !important; gap: 12px; }
  .flow-node { padding: 20px; }
  .flow-arrow { display: none; }
  .flow-node h4 { font-size: 17px; }

  /* Subpages */
  .subpage { grid-template-columns: 1fr !important; gap: 32px; }
  .subpage > * { min-width: 0; }
  .subpage-side { position: static; }
  .subpage h2 { font-size: 28px !important; }
  .hero-mock { max-width: 100%; overflow: hidden; }
  .mock-body { max-width: 100%; overflow-x: auto; }

  /* Audience/scouting already handled, tighten cards */
  .audience-card { padding: 22px 22px 20px; }
  .audience-card h3 { font-size: 18px; }
  .scouting-grid { gap: 28px !important; }
  .scouting-row { gap: 10px; flex-wrap: wrap; }
  .scouting-row .sr-action { order: 3; width: 100%; }

  /* Meta Ads table → drop low-signal columns (Impr., CPA) so it fits */
  .mock-body:has(.ad-table) { overflow-x: auto; }
  .ad-table { min-width: 0; font-size: 12px; }
  .ad-table th:nth-child(2), .ad-table td:nth-child(2),
  .ad-table th:nth-child(6), .ad-table td:nth-child(6) { display: none; }
  .ad-table th, .ad-table td { padding: 8px 6px; }

  /* Telegram split panel → stack */
  .mock-body > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .mock-body > div[style*="grid-template-columns:1fr 1fr"] > div:first-child { border-right: 0 !important; border-bottom: 1px solid var(--line); }

  /* Creative hub 4-col → 2-col */
  .bc-art[style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* Usecase, security */
  .usecase { grid-template-columns: 1fr !important; }
  .usecase-card { padding: 28px; }
  .usecase-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .usecase-stat .v { font-size: 22px; }
  .sec-grid { grid-template-columns: 1fr !important; }
  .sec-item { padding: 22px; }

  /* Pricing */
  .price-base { grid-template-columns: 1fr !important; gap: 18px; text-align: left; padding: 28px; }
  .price-base-amount { text-align: left !important; }
  .price-base-amount > div:last-child { text-align: left !important; }
  .price-num { font-size: 40px !important; }
  .modules-price-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .module-price { padding: 24px; }
  .mp-num { font-size: 28px !important; }
  .price-example { padding: 28px 24px; }
  .price-example h3 { font-size: 20px !important; line-height: 1.3; }
  .example-row { font-size: 13px; }

  /* Changelog */
  .cl-item { grid-template-columns: 1fr !important; gap: 10px; }
  .cl-date { font-size: 13px; }
  .cl-body h3 { font-size: 18px; }

  /* CTA */
  .cta-final { padding: 48px 24px !important; }
  .cta-final h2 { font-size: 28px !important; }
  .cta-final > div:last-child { flex-direction: column; gap: 10px !important; }
  .cta-final .btn-lg { width: 100%; justify-content: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* Tags */
  .tag { font-size: 11px; }

  /* Tweaks panel */
  .tweaks-panel { right: 12px !important; bottom: 12px !important; left: 12px !important; min-width: 0 !important; }
}

/* Extra-small */
@media (max-width: 380px) {
  .hero h1 { font-size: 38px !important; }
  .section-head h2, h2 { font-size: 26px !important; }
  .nav-cta .btn-sm { font-size: 11px; padding: 7px 10px; }
}

/* Theme toggle button in nav */
.theme-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 14px;
  line-height: 1;
}
.theme-btn:hover { background: var(--bg-sunken); }
.theme-btn-icon { display: none; }
[data-theme="light"] .theme-btn-dark { display: inline; }
[data-theme="dark"] .theme-btn-light { display: inline; }
