:root {
  --bg: #0b0a10;
  --surface: #16141f;
  --border: #2a2738;
  --text: #f2f0f7;
  --muted: #a39fb3;
  --accent: linear-gradient(90deg, #ff9f43, #ff5e8a, #9b6bff);
  --link: #ff8fb0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.lang {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
}

h1 {
  font-size: clamp(32px, 7vw, 44px);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 21px;
  margin: 36px 0 8px;
}

.gradient {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  margin: 0 0 24px;
}

.meta {
  color: var(--muted);
  font-size: 15px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin: 24px 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

ul { padding-left: 22px; }
li { margin: 6px 0; }

a { color: var(--link); }

details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

details:last-of-type { border-bottom: 1px solid var(--border); }

summary {
  cursor: pointer;
  font-weight: 600;
}

details p, details ol { color: var(--muted); margin-bottom: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
}

footer {
  margin-top: 56px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer a { color: var(--muted); }

[lang="ru"] [data-lang="en"],
[lang="en"] [data-lang="ru"] { display: none; }
