:root {
  --bg: #f6f7f9; --card: #fff; --text: #16191d; --muted: #5f6b7a; --line: #e3e6eb;
  --accent: #1f5eff; --accent-ink: #fff; --accent-soft: #e9efff; --err: #b42318; --ok: #067647;
  --code-bg: #0f1720; --code-text: #e6edf3; --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 13px/1.5 ui-monospace, Consolas, "Cascadia Mono", monospace; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; font-size: 17px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 32px; border: 2px solid var(--accent); border-radius: 4px; display: grid; place-items: center; font-size: 10px; color: var(--accent); }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a:not(.btn) { color: var(--muted); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; border-color: #c9ced6; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1a4fdb; border-color: #1a4fdb; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.muted { color: var(--muted); }
.err { color: var(--err); white-space: pre-wrap; font-size: 13px; }

/* Code blocks */
.code { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: 10px; margin: 8px 0 16px; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/1.55 ui-monospace, Consolas, "Cascadia Mono", monospace; }
.code .copy { position: absolute; top: 8px; right: 8px; background: #233040; color: #c9d4df; border: 0; border-radius: 6px; padding: 4px 10px; font: 12px system-ui, sans-serif; cursor: pointer; }
.code .copy:hover { background: #2e3e52; }

/* Forms */
label span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=url], input[type=number], input[type=password], input[type=text], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

footer { color: var(--muted); font-size: 13px; padding: 32px 0; text-align: center; }
