:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #1c2430;
  --text-soft: #5b6676;
  --border: #e2e7ee;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --code-bg: #0f1722;
  --code-text: #e6edf3;
  --code-comment: #8b98a9;
  --hero-from: #0b2a4a;
  --hero-to: #145a8f;
  --hero-text: #ffffff;
  --swift: #f05138;
  --radius: 10px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-soft: #151b23;
    --text: #e6edf3;
    --text-soft: #9aa6b4;
    --border: #273140;
    --accent: #4c8dff;
    --code-bg: #0a0f16;
    --hero-from: #071a2e;
    --hero-to: #0e3d63;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
:not(pre) > code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
pre {
  background: var(--code-bg); color: var(--code-text);
  border-radius: var(--radius); padding: 16px 18px; margin: 12px 0 20px;
  overflow-x: auto; line-height: 1.5;
}
pre .c { color: var(--code-comment); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.brand .lang {
  font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  color: #fff; background: var(--swift); border-radius: 999px; padding: 3px 8px;
  margin-left: 8px; vertical-align: 2px;
}
nav.main { display: flex; align-items: center; gap: 22px; margin-left: auto; }
nav.main a { color: var(--text-soft); font-weight: 500; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--text); text-decoration: none; }
nav.main .github { display: inline-flex; color: var(--text); }
nav.main .github svg { width: 22px; height: 22px; fill: currentColor; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text); text-align: center; padding: 88px 0 96px;
}
.hero h1 { font-size: clamp(36px, 6vw, 56px); margin: 0 0 12px; letter-spacing: -0.02em; }
.hero p { font-size: clamp(17px, 2.2vw, 20px); max-width: 720px; margin: 0 auto 32px; opacity: 0.9; }
.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 600;
  background: var(--hero-text); color: var(--hero-from); border: 1px solid transparent;
}
.button.secondary { background: transparent; color: var(--hero-text); border-color: rgba(255, 255, 255, 0.5); }
.button:hover { text-decoration: none; filter: brightness(0.95); }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 56px auto 16px; }
.feature { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--bg-soft); }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-soft); font-size: 15px; }

/* Install tabs */
section.install { margin: 48px auto 72px; }
section.install h2 { font-size: 28px; margin: 0 0 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 16px; font: inherit; font-weight: 600; color: var(--text-soft); cursor: pointer; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.panel { padding: 20px 0 0; }
.panel[hidden] { display: none; }
.panel p { margin: 0 0 8px; }

/* Article (getting started) */
main.article { max-width: 820px; margin: 0 auto; padding: 40px 16px 80px; }
main.article h1 { font-size: 36px; margin: 0 0 8px; letter-spacing: -0.01em; }
main.article .lead { color: var(--text-soft); font-size: 18px; margin: 0 0 32px; }
main.article h2 { margin: 40px 0 8px; font-size: 24px; }
main.article h2 .step {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 15px; vertical-align: 3px;
}
main.article img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.note { border-left: 3px solid var(--accent); background: var(--bg-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.note.warn { border-left-color: #d29922; }

footer.site { border-top: 1px solid var(--border); color: var(--text-soft); font-size: 14px; }
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding: 20px 16px; }

main, section, .panel, .feature { min-width: 0; }
:not(pre) > code { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  header.site .wrap { gap: 10px; }
  .brand { font-size: 16px; white-space: nowrap; }
  nav.main { gap: 12px; font-size: 14px; }
  nav.main a { white-space: nowrap; }
  .hero { padding: 56px 0 64px; }
  .features { grid-template-columns: 1fr; margin-top: 32px; }
}
