:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f5f7fa;
  --border: #e5e7eb;
  --text: #1e293b;
  --text-muted: #64748b;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: #e5e7eb;

  --step: #2563eb;
  --step-bg: #eff6ff;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --note: #7c3aed;
  --note-bg: #f5f3ff;

  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --node-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

:root[data-theme="dark"] {
  --bg: #1a1a2e;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-alt: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.45);
  --nav-bg: rgba(26, 26, 46, 0.9);
  --nav-border: rgba(255, 255, 255, 0.08);

  --step: #818cf8;
  --step-bg: rgba(129, 140, 248, 0.14);
  --ok: #22d3ee;
  --ok-bg: rgba(34, 211, 238, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.14);
  --note: #f472b6;
  --note-bg: rgba(244, 114, 182, 0.14);

  --code-bg: rgba(0, 0, 0, 0.4);
  --code-text: rgba(255, 255, 255, 0.85);
  --node-shadow: none;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

code {
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 0.92em;
  background: var(--surface-alt);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

a {
  color: var(--step);
}

section {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 32px;
}

#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex: 1;
  overflow-x: auto;
}

.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

:root[data-theme="light"] .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: none;
}

#hero {
  text-align: center;
  padding: 72px 32px 32px;
}

#hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.time-pill {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--step-bg);
  color: var(--step);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 28px 0 10px;
}

p {
  margin-bottom: 14px;
}

ul,
ol {
  margin: 0 0 16px 22px;
}

li {
  margin-bottom: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 650;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.code-wrap {
  position: relative;
  margin-bottom: 20px;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.code-wrap:hover .copy-btn,
.copy-btn:focus {
  opacity: 1;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.callout {
  border-left: 3px solid var(--note);
  background: var(--note-bg);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
}

.callout.warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}

.callout.ok {
  border-left-color: var(--ok);
  background: var(--ok-bg);
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong {
  font-weight: 650;
}

.faq {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--node-shadow);
}

.faq h4 {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 6px;
}

.faq p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 0;
}

.divider {
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

footer {
  text-align: center;
  padding: 48px 32px 72px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  #hero h1 {
    font-size: 30px;
  }

  section {
    padding: 40px 20px;
  }
}
