:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --card: #ffffff;
  --fg: #1f2330;
  --muted: #5f6675;
  --line: #e2e5ea;
  --accent: #4c6ef5;
  --accent-fg: #ffffff;
  --bar: #e4e7ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161922;
    --card: #1f2330;
    --fg: #eef0f4;
    --muted: #a0a7b4;
    --line: #33384a;
    --accent: #6c8cff;
    --accent-fg: #10131c;
    --bar: #33384a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.top, main, footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

.top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  font-weight: 650;
}

section { margin: 56px 0; }
.hero { margin-top: 48px; }

h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.fine { font-size: 14px; color: var(--muted); }

ul, ol { margin: 0 0 14px; padding-left: 1.3em; }
li { margin: 6px 0; }

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bar);
  font: 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.button {
  display: inline-block;
  margin: 12px 0 10px;
  padding: 13px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 650;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.button:focus-visible, summary:focus-visible, .demo-switch input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---- demo ---- */
.demo-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 600;
  cursor: pointer;
}
.demo-switch input {
  appearance: none;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 12px;
  background: var(--bar);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.demo-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.demo-switch input:checked { background: var(--accent); }
.demo-switch input:checked::after { transform: translateX(20px); }
.demo-switch .off, .demo:has(#demo-toggle:not(:checked)) .on { display: none; }
.demo:has(#demo-toggle:not(:checked)) .off { display: inline; }

.page {
  padding: 22px 24px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.page .kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.page h2 { margin: 2px 0 16px; font-size: 21px; }
.bar {
  height: 11px;
  margin: 10px 0;
  border-radius: 6px;
  background: var(--bar);
}
.bar.short { width: 62%; }

.fake-comments {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.fake-comments h3 { margin: 0 0 10px; font-size: 15px; }
.fake-comments p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  color: var(--muted);
}
.fake-comments i {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bar);
}
.fake-comments b { color: var(--fg); margin-right: 4px; }
.demo:has(#demo-toggle:checked) .fake-comments { display: none; }

/* ---- install ---- */
details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  margin: 10px 0;
  padding: 0 18px;
}
summary {
  padding: 14px 0;
  font-weight: 650;
  cursor: pointer;
  border-radius: 8px;
}
details > :last-child { margin-bottom: 16px; }

footer {
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
