@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/plex-sans-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/plex-sans-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/plex-sans-cyrillic-400.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/plex-sans-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/plex-sans-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/plex-sans-cyrillic-600.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --alt: #eceff2;
  --text: #1c2430;
  --muted: #535d6b;
  --border: #dde1e6;
  --accent: #0e6f69;
  --accent-text: #ffffff;
  --gold: #a77a1f;
  --warn: #b04a0e;
  --focus: #1f6feb;
  --shadow: 0 18px 48px rgba(28, 36, 48, 0.16);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #12161c;
  --surface: #1a2028;
  --alt: #171c23;
  --text: #e6eaf0;
  --muted: #a3adba;
  --border: #2c3440;
  --accent: #3fb3a6;
  --accent-text: #0d1f1d;
  --gold: #d4a851;
  --warn: #f0a467;
  --focus: #6ea8fe;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c;
    --surface: #1a2028;
    --alt: #171c23;
    --text: #e6eaf0;
    --muted: #a3adba;
    --border: #2c3440;
    --accent: #3fb3a6;
    --accent-text: #0d1f1d;
    --gold: #d4a851;
    --warn: #f0a467;
    --focus: #6ea8fe;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 16px; }
h3 { font-size: 19px; margin-bottom: 6px; }
p { margin: 0 0 12px; }
code { font-size: 0.9em; background: var(--alt); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.narrow { max-width: 820px; }

.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--text); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.langs { display: flex; gap: 2px; }
.langs a { display: grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.langs a[aria-current="page"] { color: var(--text); background: var(--alt); }
.theme { display: flex; gap: 2px; padding: 2px; background: var(--alt); border-radius: 10px; }
.theme button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.theme button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.hero { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
h1 { font-size: clamp(34px, 5.4vw, 54px); margin-bottom: 20px; }
.lead { font-size: 20px; color: var(--muted); max-width: 40em; margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn-line { background: transparent; color: var(--text); border-color: var(--border); }
.btn-line:hover { background: var(--surface); filter: none; }
.small { font-size: 14px; color: var(--muted); }
.ver { white-space: nowrap; }
figure { margin: 0; }
.hero-shot img, .pair img { display: block; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-shot { justify-self: center; }

.block { padding: 72px 0; }
.block.alt { background: var(--alt); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.features { margin: 8px 0 0; display: grid; gap: 22px; }
.features dt { font-weight: 600; font-size: 19px; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--muted); }
.pair { display: flex; gap: 20px; justify-content: center; }
.pair img { width: calc(50% - 10px); max-width: 300px; }
.pair img + img { margin-top: 48px; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.rules article { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.rules p { color: var(--muted); margin: 0; }
.spark { width: 120px; height: 48px; display: block; margin-bottom: 14px; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.spark .base { stroke: var(--accent); }
.spark .mark { stroke: var(--warn); }
.spark .ghost { stroke: var(--warn); stroke-dasharray: 6 6; }

.sites { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sites li { padding: 10px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }

.install { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.install ol { padding-left: 20px; color: var(--muted); margin: 8px 0 18px; }
.install li { margin-bottom: 6px; }

.foot { border-top: 1px solid var(--border); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 15px; color: var(--muted); }
.foot-in { display: grid; gap: 14px; }
.foot-title { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.family a, .legal a { color: var(--text); }
.legal { margin: 0; }

.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(30px, 4.6vw, 42px); }
.doc h2 { font-size: 22px; margin: 32px 0 10px; }
.doc section + section { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 15px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; padding-bottom: 56px; }
  .hero-shot img { width: 300px; }
  .split, .rules, .install { grid-template-columns: 1fr; }
  .block { padding: 56px 0; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .bar-in { gap: 12px; }
  .logo { font-size: 17px; }
  .tools { gap: 6px; }
  .langs a { min-width: 34px; }
  .theme button { width: 36px; height: 40px; }
  .cta .btn { width: 100%; }
  .pair img + img { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
