  :root, [data-theme=dark] {
    color-scheme: dark;
    --bg: #0b0e14; --bg2: #0e121a; --surface: #121722; --raised: #171e2c; --line: #222b3d; --line-strong: #2f3a52;
    --text: #eceef3; --muted: #9aa4b5; --accent: #7c83fd; --on-accent: #080a2e; --accent-soft: rgba(124,131,253,.12);
    --link: #c3c7ff; --error: #ff8a7a; --ok: #7dd3a8;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 40px 80px -40px rgba(0,0,0,.8);
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  }
  [data-theme=light] {
    color-scheme: light;
    --bg: #fbfbf9; --bg2: #f4f4f0; --surface: #ffffff; --raised: #f7f7f4; --line: #e7e6e1; --line-strong: #d6d4cc;
    --text: #0f1219; --muted: #586072; --accent: #4f56e6; --on-accent: #ffffff; --accent-soft: rgba(79,86,230,.08);
    --link: #3a41c9; --error: #c2352a; --ok: #1f8f5f;
    --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(16,24,40,.04), 0 30px 60px -30px rgba(16,24,40,.22);
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65;
         -webkit-font-smoothing: antialiased; }
  a { color: inherit; }
  a:hover { color: var(--link); }
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 2px solid var(--link); outline-offset: 3px; }
  .col { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
  .muted { color: var(--muted); }
  .small { font-size: 14px; }

  .logo { font-weight: 650; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; text-decoration: none; }
  .logo i { width: 22px; height: 22px; border-radius: 6px; background: var(--text); display: grid; place-items: center; }
  .logo i::after { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--bg); transform: rotate(45deg); }
  .site-nav { display: flex; justify-content: space-between; align-items: center; height: 76px; }
  .site-nav .links { display: flex; gap: 28px; font-size: 15px; align-items: center; }
  .site-nav .links a:not(.btn) { color: var(--muted); text-decoration: none; }
  .site-nav .links a:not(.btn):hover { color: var(--text); }
  .theme { background: none; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; padding: 0; }
  .theme:hover { color: var(--text); border-color: var(--text); }
  .theme svg { width: 16px; height: 16px; }
  [data-theme=dark] .theme .moon, [data-theme=light] .theme .sun { display: none; }
  .fine { color: var(--muted); font-size: 14px; }
  .fine b { color: var(--text); font-weight: 500; }

  h1 { font-size: 56px; line-height: 1.05; font-weight: 650; letter-spacing: -0.03em; margin: 0 0 24px; }
  h2 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 24px; }
  p { margin: 0 0 16px; max-width: 40em; }

  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 12px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none;
         border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s; }
  .btn:hover { border-color: var(--text); color: var(--text); }
  .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .btn-primary:hover { color: var(--on-accent); filter: brightness(1.07); border-color: var(--accent); }
  .btn.sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
  .btn[disabled] { opacity: .6; cursor: default; }

  footer { margin-top: 104px; border-top: 1px solid var(--line); padding: 28px 0 48px; }
  footer .col { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
  
  .doc { max-width: 720px; padding-bottom: 24px; }
  .doc h1 { font-size: 40px; line-height: 1.1; margin: 28px 0 8px; }
  .doc h2 { font-size: 22px; margin: 40px 0 12px; }
  .doc p, .doc li { color: var(--muted); max-width: none; }
  .doc ul { padding-left: 22px; margin: 0 0 16px; }
  .doc a { color: var(--text); text-underline-offset: 3px; }
  .doc strong { color: var(--text); font-weight: 600; }
  .doc .meta { font-size: 14px; }
  @media (max-width: 720px) { .doc h1 { font-size: 32px; } .site-nav .links a:not(.btn) { display: none; } }
