:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --soft2: #f1f5f9;
  --accent: #0f172a;
  --blue: #2563eb;
  --green: #047857;
  --orange: #c2410c;
  --code-bg: #0f172a;
  --code-fg: #f8fafc;
  --header-offset: 88px;
}
* { box-sizing: border-box; }
html { 
  scroll-behavior: smooth;
  /* scroll-padding-top: var(--header-offset); */
 }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
}

h1[id],
h2[id],
h3[id],
h4[id],
section[id] {
  scroll-margin-top: var(--header-offset);
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 22px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topnav { display: flex; gap: 14px; font-size: 13px; white-space: nowrap; align-items: center; }
.topnav a { color: #334155; text-decoration: none; }
.topnav a:hover, .footer a:hover { text-decoration: underline; }
.topnav a.active { color: #0f172a; font-weight: 700; }
.page {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}
.toc {
  position: sticky;
  top: 82px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
  font-size: 13px;
}
.toc-title { font-weight: 800; margin-bottom: 10px; }
.toc a { display: block; color: #334155; text-decoration: none; padding: 4px 0; }
.toc a:hover { color: #0f172a; text-decoration: underline; }
.toc .toc-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.content { min-width: 0; }
.hero {
  padding: 28px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  margin-bottom: 26px;
}
.hero h1 { margin-top: 0; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: 38px; line-height: 1.2; letter-spacing: -.035em; margin: 10px 0 18px; }
h2 { font-size: 26px; border-top: 1px solid var(--line); padding-top: 26px; margin-top: 42px; }
h3 { font-size: 21px; margin-top: 30px; }
h4 { font-size: 17px; margin-top: 24px; }
p { margin: 12px 0; }
ul, ol { padding-left: 1.4em; }
.lead { color: #334155; font-size: 17px; max-width: 900px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.card { display:block; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-decoration: none; }
.card:hover { box-shadow: 0 8px 24px rgba(15,23,42,.08); transform: translateY(-1px); }
.card strong { display: block; font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.notice, .warning, .spec-link, .verified {
  padding: 14px 16px;
  border-radius: 14px;
  margin: 18px 0;
}
.notice { border: 1px solid #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.warning { border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; }
.verified { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.spec-link { border: 1px solid var(--line); background: var(--soft); color: #334155; }
.spec-link strong { display:block; color: var(--fg); margin-bottom: 4px; }
.spec-link a, .button { display:inline-flex; align-items:center; justify-content:center; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background:#0f172a; color:#fff; text-decoration:none; font-weight:700; font-size:13px; }
.button.secondary { background: var(--soft2); color: var(--fg); border:1px solid var(--line); }
table { width: 100%; border-collapse: collapse; margin: 18px 0; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--soft2); }
pre { overflow: auto; background: var(--code-bg); color: var(--code-fg); padding: 16px; border-radius: 14px; font-size: 13px; line-height: 1.6; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
:not(pre) > code { background: var(--soft2); color: #0f172a; border-radius: 5px; padding: .15em .35em; }
.kbd { border: 1px solid var(--line); background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: 12px; }
.footer { padding: 18px 22px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.openapi-frame { min-height: calc(100vh - 116px); }
@media (max-width: 1100px) { .topnav { overflow-x: auto; } }
@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; }
  .toc { position: relative; top: auto; }
  .cards { grid-template-columns: 1fr; }
  h1 { font-size: 31px; }
  .topnav { display:none; }
}

.pill { display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; background:var(--soft2); border:1px solid var(--line); font-size:12px; font-weight:700; color:#334155; }
.step-list { counter-reset: step; list-style:none; padding-left:0; }
.step-list > li { counter-increment: step; padding:14px 16px 14px 52px; margin:12px 0; border:1px solid var(--line); border-radius:14px; background:#fff; position:relative; }
.step-list > li::before { content: counter(step); position:absolute; left:16px; top:16px; width:24px; height:24px; border-radius:50%; background:#0f172a; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:800; font-size:12px; }
.openapi-intro { max-width: 1180px; margin: 0 auto; padding: 28px 24px 10px; }
.openapi-intro .notice { max-width: 880px; }
