:root {
  --bg: #041512;
  --bg2: #0B3A34;
  --text: #EAF7F5;
  --muted: #B8D9D4;
  --brand: #1EC4B8;
  --border: rgba(255,255,255,0.14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(30,196,184,0.18), transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg2) 55%, #06241f);
  min-height: 100vh;
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(860px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(4,21,18,0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 1.15rem;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
}
.lang-switch button.active {
  background: rgba(30,196,184,0.22);
  color: var(--text);
  font-weight: 700;
}
.hero { padding: 72px 0 40px; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
}
.hero p { margin: 0; color: var(--muted); max-width: 40rem; font-size: 1.08rem; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 12px 0 64px;
}
.card {
  display: block;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.09); text-decoration: none; }
.card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.doc { padding: 40px 0 72px; }
.doc-card {
  padding: clamp(20px, 4vw, 36px);
  border-radius: 20px;
  background: rgba(14,61,54,0.55);
  border: 1px solid var(--border);
}
.doc h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.meta { color: var(--muted); margin: 0 0 28px; font-size: 0.95rem; }
.doc h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  color: var(--brand);
}
.doc p, .doc li { color: var(--text); }
.doc ol { padding-left: 1.2rem; }
.doc li { margin: 6px 0; }
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .row {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* Language: only one visible. Prefer [hidden] + class fallback. */
[data-lang][hidden] { display: none !important; }
html.lang-ru [data-lang="en"],
html.lang-en [data-lang="ru"] { display: none !important; }
html.lang-ru [data-lang="ru"]:not([hidden]),
html.lang-en [data-lang="en"]:not([hidden]) { display: revert; }
html.lang-ru span[data-lang="ru"],
html.lang-en span[data-lang="en"] { display: inline; }
