:root {
  --bg: #070c16;
  --surface: #0f172a;
  --surface-2: #162036;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-bg: rgba(16, 185, 129, 0.12);
  --danger: #f87171;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(900px 460px at 50% -80px, rgba(16, 185, 129, 0.14), transparent 70%), var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }
.doc-wrap { width: min(820px, calc(100% - 32px)); margin: 0 auto; }

header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 12, 22, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.hdr {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #10b981);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}
.brand span { color: var(--accent-2); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }
.lang-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 11px;
  font: 600 12.5px var(--font);
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent); }

.hero { padding: 72px 0 48px; text-align: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-bg);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  margin: 0 auto;
  max-width: 780px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 17px;
  color: var(--muted);
}
.cta-row {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn:hover { text-decoration: none; border-color: rgba(255, 255, 255, 0.25); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #059669; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 0 64px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.doc { padding: 48px 0 72px; }
.doc h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.025em; }
.meta { color: var(--muted); font-size: 13.5px; margin-bottom: 28px; }
.doc h2 { margin: 30px 0 10px; font-size: 19px; color: var(--text); }
.doc p, .doc li { color: #cbd5e1; font-size: 14.8px; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin: 6px 0; }
.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}
.box.warn { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.06); }
code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--accent-2);
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 13.5px;
}
.ftr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ftr nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ftr a { color: var(--muted); }
.ftr a:hover { color: var(--text); }

[data-lang="ru"] .en, [data-lang="en"] .ru { display: none !important; }
@media (max-width: 640px) {
  .nav a.hide-sm { display: none; }
}
