:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f6368;
  --accent: #d9480f;
  --accent-soft: #fff1e8;
  --code-bg: #f3f2ee;
  --border: #e4e2dc;
  --ok: #2b8a3e;
  --warn: #b25e00;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14151a;
    --surface: #1d1f26;
    --text: #ececf1;
    --muted: #a0a4ad;
    --accent: #ff8a4c;
    --accent-soft: #2a1f18;
    --code-bg: #23252d;
    --border: #2f323c;
    --ok: #69db7c;
    --warn: #ffd43b;
  }
}

:root[data-theme="dark"] {
  --bg: #14151a;
  --surface: #1d1f26;
  --text: #ececf1;
  --muted: #a0a4ad;
  --accent: #ff8a4c;
  --accent-soft: #2a1f18;
  --code-bg: #23252d;
  --border: #2f323c;
  --ok: #69db7c;
  --warn: #ffd43b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

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

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

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
header.site .brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
header.site .brand span { color: var(--accent); }
header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.95rem;
}
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--text); }

.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: var(--surface);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.05); }

.demo {
  margin: 40px auto 0;
  max-width: 860px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.demo img { display: block; width: 100%; height: auto; }

section { padding: 48px 0; }
section h2 { font-size: 1.7rem; margin: 0 0 8px; letter-spacing: -0.01em; }
section > .wrap > p.sub { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .icon { font-size: 1.5rem; margin-bottom: 8px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 46px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.steps li h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.steps li p { margin: 0; color: var(--muted); }

pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--code-bg); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0;
}
.callout strong { color: var(--accent); }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

.statuses span {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  margin: 2px 4px 2px 0;
}

footer.site { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* usage page layout */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px 0 60px; }
.doc aside { position: sticky; top: 90px; align-self: start; font-size: 0.95rem; }
.doc aside a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.doc aside a:hover { color: var(--text); }
.doc h1 { font-size: 2.2rem; margin: 0 0 8px; letter-spacing: -0.02em; }
.doc h2 { font-size: 1.5rem; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.doc h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.doc p.lead { color: var(--muted); font-size: 1.1rem; }

@media (max-width: 760px) {
  .doc { grid-template-columns: 1fr; }
  .doc aside { position: static; }
  header.site nav a { margin-left: 14px; font-size: 0.88rem; }
  .hero { padding: 48px 0 28px; }
}
