:root { --bg: #20232b; --card: #191c23; --card-2: #292d37; --line: #343a46; --text: #eef0f5; --text-2: #bcc3cf; --muted: #969faf; --gold: #e8bd59; color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 Inter, system-ui, sans-serif; }
a { color: var(--gold); text-decoration: none; } a:hover { text-decoration: underline; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; font: 600 18px Inter, system-ui, sans-serif; color: var(--text); letter-spacing: -.025em; }
.brand:hover { text-decoration: none; } .brand img { width: 28px; } .brand span { color: var(--gold); font-weight: 700; }
.top-links { margin-left: auto; display: flex; gap: 14px; align-items: center; } .top-links a:not(.btn) { color: var(--text-2); font-weight: 600; }
.btn { display: inline-flex; padding: 8px 14px; border-radius: 9px; background: #1d212c; color: var(--text); font-weight: 600; }
.btn.primary { background: var(--gold); color: #111; } .btn:hover { text-decoration: none; filter: brightness(1.1); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 18px; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; }
.side { position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto; padding: 22px 16px; border-right: 1px solid var(--line); }
.search { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; margin-bottom: 14px; }
.toc { display: grid; gap: 2px; }
.toc a { color: var(--text-2); padding: 6px 10px; border-radius: 7px; font-weight: 500; font-size: 14px; }
.toc a:hover { background: var(--card); text-decoration: none; color: var(--text); }
.toc a.on { background: rgba(245, 197, 24, .12); color: var(--gold); }
.doc { padding: 26px 40px 80px; min-width: 0; }
.doc section { padding: 8px 0 26px; border-bottom: 1px solid var(--line); }
.doc section:last-child { border-bottom: 0; }
.doc section[hidden], [data-doc-panel][hidden], [data-doc-scope][hidden], .toc a[hidden] { display: none !important; }
.docs-tabs { display: flex; gap: 6px; padding: 9px max(20px,calc((100vw - 1200px)/2)); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 61px; z-index: 19; overflow-x: auto; }
.docs-tabs a { padding: 7px 12px; border-radius: 6px; white-space: nowrap; color: var(--text-2); font-size: 13px; font-weight: 600; }
.docs-tabs a.on { background: var(--card); color: var(--gold); }
.docs-tabs a:hover { text-decoration: none; background: var(--card); }
.side { top: 113px; height: calc(100dvh - 113px); }
.doc section { scroll-margin-top: 130px; }
h1 { font: 600 clamp(30px, 4vw, 42px)/1.15 Inter, system-ui, sans-serif; letter-spacing: -.035em; margin: 14px 0 16px; }
h1 em { font-style: normal; color: var(--gold); }
h2 { font: 600 24px Inter, system-ui, sans-serif; letter-spacing: -.02em; margin: 28px 0 12px; }
h3 { font: 700 17px Inter, sans-serif; margin: 22px 0 8px; color: var(--text); }
h4 { margin: 0 0 4px; font-size: 15px; }
p { color: var(--text-2); } p b, li b { color: var(--text); }
.lead { font-size: 17px; max-width: 720px; }
code { font: 13px 'JetBrains Mono', ui-monospace, monospace; background: #161923; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; color: #e8eaf0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 20px 0; }
.card { display: grid; gap: 6px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
.card span { color: var(--text-2); font-size: 13.5px; }
.kv, .ref { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.kv td, .ref td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:first-child { color: var(--muted); width: 120px; font-weight: 600; white-space: nowrap; }
.ref td:first-child { width: 80px; }
.m { display: inline-block; min-width: 58px; text-align: center; font: 700 11px 'JetBrains Mono', monospace; padding: 3px 6px; border-radius: 5px; }
.m-get { background: #12301f; color: #4ade80; } .m-post { background: #2d2610; color: #fbbf24; } .m-put { background: #172a45; color: #60a5fa; }
.m-patch { background: #2a1d40; color: #c084fc; } .m-delete { background: #3a1417; color: #f87171; }
.steps { color: var(--text-2); padding-left: 20px; display: grid; gap: 8px; }
.code { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0b0d12; }
.code-h { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; background: var(--card); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 600; }
.copy { background: #1d212c; color: var(--text); border: 0; border-radius: 6px; padding: 4px 10px; font: 600 12px Inter, sans-serif; cursor: pointer; }
.copy.done { background: #12301f; color: #4ade80; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code pre code { background: none; padding: 0; font-size: 13px; line-height: 1.6; white-space: pre; overflow-wrap: normal; }
.warn { background: rgba(245, 197, 24, .08); border: 1px solid rgba(245, 197, 24, .3); border-radius: 10px; padding: 10px 14px; color: #f7dc7a; }
.note { font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.grid2 > div { padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.grid2 p { margin: 0; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plain { color: var(--text-2); display: grid; gap: 6px; }
mark { background: rgba(245, 197, 24, .35); color: inherit; border-radius: 3px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 113px 0 auto 0; height: auto; max-height: 70vh; background: var(--bg); z-index: 20; border-right: 0; border-bottom: 1px solid var(--line); }
  body.menu .side { display: block; }
  .menu-btn { display: block; } .top-links { display: none; }
  .doc { padding: 16px 16px 60px; }
  .kv td:first-child { width: 90px; white-space: normal; }
}
