:root {
  --bg: #ffffff;
  --bg-soft: #f5f5fb;
  --text: #1c1c28;
  --muted: #5d5d72;
  --accent: #5a5ff0;
  --accent-2: #7a4fe6;
  --border: #e4e4ef;
  --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111118;
    --bg-soft: #1a1a24;
    --text: #ececf4;
    --muted: #a3a3b8;
    --accent: #8d91ff;
    --accent-2: #a98bff;
    --border: #2c2c3a;
    --card: #1a1a24;
  }
}

* { 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, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

.hero { text-align: center; padding: 64px 0 40px; }
.hero img { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 12px 40px rgba(20, 184, 166, 0.35); }
.hero h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; margin: 28px 0 12px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 auto; max-width: 560px; }
.badge {
  display: inline-block; margin-top: 28px; padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 600; font-size: 15px;
}

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; padding: 24px 0 48px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

section.band { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 36px 0; }
section.band h2 { margin-top: 0; }

article { padding: 40px 0 56px; }
article h1 { font-size: 34px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.01em; }
article .updated { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
article h2 { font-size: 22px; margin: 36px 0 8px; }
article h3 { font-size: 18px; margin: 24px 0 6px; }
article ul { padding-left: 22px; }
article li { margin: 4px 0; }

/* Setup guide */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a { color: var(--text); text-decoration: none; font-size: 15px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; }
.toc a:hover { border-color: var(--accent); }
article h2[id] { scroll-margin-top: 16px; }

.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 16px 0; }
.req { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.req h3 { margin: 4px 0 8px; font-size: 17px; }
.req ul { margin: 0; padding-left: 20px; font-size: 15px; color: var(--muted); }
.req-tag { display: inline-block; margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; background: var(--accent); color: var(--bg); }
.req-tag.optional { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.note { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; font-size: 15px; }

.steps { list-style: none; counter-reset: step; padding-left: 0; margin: 16px 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 8px 52px; margin: 0 0 12px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--border); font-weight: 700; font-size: 15px;
}
.steps > li h3 { margin: 4px 0 4px; font-size: 18px; }
.steps > li p { margin: 0 0 8px; }
.steps > li ul { margin: 0 0 8px; }
code { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }

.chain { display: flex; align-items: center; gap: 8px; margin: 12px 0 20px; flex-wrap: wrap; }
.chain .node { flex: 1 1 120px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: center; font-weight: 600; font-size: 15px; line-height: 1.3; }
.chain .node span { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.chain .node.split { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.chain .node.split > div { border: 1px dashed var(--border); border-radius: 8px; padding: 6px; }
.chain .arrow { flex: 0 0 18px; height: 2px; background: var(--muted); position: relative; }
.chain .arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--muted); border-right: 0; }
@media (max-width: 640px) {
  .chain { flex-direction: column; align-items: stretch; }
  .chain .node { flex: none; }
  .chain .arrow { flex: none; width: 2px; height: 16px; align-self: center; }
  .chain .arrow::after { right: auto; left: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--muted); border-bottom: 0; }
}

footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; padding: 24px 0 40px; }
footer.site p { margin: 4px 0; }
footer.site a { color: var(--muted); }
