:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #09090b;
  --text-2: #52525b;
  --text-3: #71717a;
  --accent: #10b981;
  --accent-2: #059669;
  --accent-soft: rgba(16, 185, 129, 0.1);
  --accent-border: rgba(16, 185, 129, 0.3);
  --amber-soft: rgba(245, 158, 11, 0.14);
  --amber-text: #b45309;
  --blue-soft: rgba(59, 130, 246, 0.1);
  --blue-text: #1d4ed8;
  --shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.12);
  --radius: 16px;
}

[data-theme="dark"] {
  --bg: #090b0f;
  --surface: #11141b;
  --surface-2: #181c26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --accent-border: rgba(52, 211, 153, 0.32);
  --amber-soft: rgba(245, 158, 11, 0.18);
  --amber-text: #fbbf24;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --blue-text: #93c5fd;
  --shadow: 0 18px 42px -14px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.025em; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.nav a:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 8px; }

/* Глобальный поиск в шапке */
.global-search { position: relative; width: 210px; }
.global-search input {
  width: 100%; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 13px; outline: none;
}
.global-search input:focus { border-color: var(--accent); }
.search-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 260px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 13px;
  box-shadow: var(--shadow); padding: 6px; display: none; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto;
}
.search-drop.is-open { display: flex; }
.search-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 9px; font-size: 13px;
}
.search-row:hover { background: var(--surface-2); }
.search-row-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.search-row-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-row-cat { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }

/* Мобильное меню */
.menu-btn { display: none; }
.mobile-nav {
  display: none; border-bottom: 1px solid var(--border); background: var(--surface); padding: 14px 20px 18px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; font-weight: 600; font-size: 15px; }
.mobile-nav-links a { padding: 6px 0; color: var(--text-2); }
.mobile-nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 10px 18px; font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none; color: #ffffff; box-shadow: 0 10px 24px -8px rgba(16, 185, 129, 0.52);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

.hero {
  position: relative; padding: 60px 0 44px; overflow: hidden;
  background: radial-gradient(700px 320px at 50% -60px, rgba(16, 185, 129, 0.16), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent-2); font-size: 12.5px; font-weight: 700; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 16px; }
.hero p.lead { font-size: 16.5px; color: var(--text-2); max-width: 560px; margin-bottom: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.browsers-note { margin-top: 14px; font-size: 12.5px; color: var(--text-3); }

.demo-card {
  border-radius: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
}
.demo-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; }
.demo-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-2); }
.demo-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo-step { padding: 9px 10px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.demo-step.is-on { border-color: var(--accent-border); background: var(--accent-soft); }
.demo-bar { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; margin-bottom: 7px; }
.demo-bar span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: 99px; }
.demo-disc { font-size: 14px; font-weight: 800; }
.demo-min { font-size: 11.5px; color: var(--text-3); }

.section { padding: 40px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section h2 { font-size: clamp(22px, 2.8vw, 29px); font-weight: 800; letter-spacing: -0.025em; }
.section-sub { color: var(--text-2); font-size: 14.5px; margin-top: 4px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  padding: 7px 13px; border-radius: 999px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.search-input {
  min-width: 240px; padding: 9px 14px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 13.5px; outline: none;
}
.search-input:focus { border-color: var(--accent); }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.store-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.store-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.store-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.store-title-link { font-weight: 700; font-size: 15.5px; letter-spacing: -0.015em; }
.store-title-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.store-card-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; position: relative; z-index: 2; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.store-cat { font-size: 12px; color: var(--text-3); }
.count-badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-2); flex-shrink: 0; }
.store-best { font-size: 13.5px; font-weight: 600; color: var(--accent-2); }

.fav-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1;
}
.fav-btn:hover { border-color: var(--border-strong); color: var(--amber-text); }
.fav-btn.is-fav { color: #f59e0b; border-color: rgba(245, 158, 11, 0.4); background: var(--amber-soft); }

.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.top-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.top-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.top-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feat-num { font-size: 12px; font-weight: 800; color: var(--accent-2); margin-bottom: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.feat h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.015em; }
.feat p { font-size: 14px; color: var(--text-2); }

/* Store page */
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; font-size: 13px; color: var(--text-3); padding: 22px 0 10px; }
.crumbs a:hover { color: var(--text); }
.store-hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 24px;
}
.store-hero h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.store-hero p { color: var(--text-2); font-size: 14.5px; max-width: 660px; }
.store-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.store-layout { display: grid; grid-template-columns: 1fr 330px; gap: 24px; align-items: start; }

.scale-box {
  padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--accent-border); margin-bottom: 18px;
}
.scale-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.scale-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2); }
.scale-sum { font-size: 14px; font-weight: 700; }
.scale-msg { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.scale-slider { width: 100%; accent-color: #10b981; cursor: pointer; margin-bottom: 12px; }
.scale-milestones { display: grid; gap: 8px; }

.promo-list { display: flex; flex-direction: column; gap: 12px; }
.promo-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.promo-card:hover { border-color: var(--border-strong); }
.promo-info { flex: 1; min-width: 240px; }
.promo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.tag-new { background: var(--blue-soft); color: var(--blue-text); border-color: transparent; }
.tag-ok { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; }
.tag-hot { background: var(--amber-soft); color: var(--amber-text); border-color: transparent; }
.tag-ad {
  font-family: inherit; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-3); cursor: pointer;
}
.tag-ad:hover { color: var(--text); border-color: var(--accent); }
.promo-title { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 4px; }
.promo-desc { font-size: 13.5px; color: var(--text-2); }
.promo-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 195px; }
.code-revealed {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 800; letter-spacing: 0.06em; padding: 6px 12px;
  border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--accent);
}

.side-card {
  padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); margin-bottom: 16px;
}
.side-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.side-card p, .side-card li { font-size: 13.5px; color: var(--text-2); }
.side-card ol { padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.other-list { display: flex; flex-direction: column; gap: 10px; }
.other-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border);
}
.other-row:hover { border-color: var(--accent); }
.other-name { font-size: 13.5px; font-weight: 700; }
.other-sub { font-size: 12px; color: var(--accent-2); font-weight: 600; }

.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
details.faq {
  padding: 14px 18px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border);
}
details.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; color: var(--accent-2); font-size: 18px; line-height: 1; }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { margin-top: 10px; font-size: 14px; color: var(--text-2); }

.prose { max-width: 780px; padding: 28px 0 56px; }
.prose h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.prose h2 { font-size: 20px; font-weight: 700; margin: 26px 0 10px; }
.prose p, .prose li { color: var(--text-2); margin-bottom: 10px; }
.prose ul { padding-left: 20px; margin-bottom: 14px; }

.footer {
  border-top: 1px solid var(--border); padding: 34px 0 42px; margin-top: 40px;
  color: var(--text-3); font-size: 13px;
}
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* Modals (Copy-and-Go & 38-ФЗ) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(9, 11, 15, 0.62);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  width: 100%; max-width: 430px; border-radius: 20px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--accent);
}
.modal-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; font-weight: 800; letter-spacing: 0.05em; word-break: break-all; }
.vote-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2);
}
.vote-btns { display: flex; gap: 6px; }
.vote-btn {
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  padding: 5px 11px; border-radius: 8px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.vote-btn:hover { border-color: var(--accent); }
.vote-btn:disabled { opacity: 0.55; cursor: default; }

.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 100; padding: 11px 16px; border-radius: 11px;
  background: #0f172a; color: #ffffff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); opacity: 0; transform: translateY(8px);
  pointer-events: none; transition: all 0.2s ease;
}
.toast.is-show { opacity: 1; transform: translateY(0); }

[hidden] { display: none !important; }

@media (max-width: 960px) {
  .hero-grid, .store-layout, .features-grid { grid-template-columns: 1fr; }
  .nav, .global-search, .desktop-cta { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  .promo-cta { align-items: stretch; width: 100%; }
  .demo-steps { grid-template-columns: 1fr; }
  .top-grid { grid-template-columns: 1fr; }
}
