
  :root {
    /* Dark theme (default) */
    --bg: #0e0e12;
    --bg-soft: #16161c;
    --surface: #14141a;
    --code-bg: #0a0a0e;
    --code-bg-head: #1c1c24;
    --text: #ececf0;
    --text-2: #c8c8d0;
    --text-dim: #8e8e9a;
    --text-faint: #62626e;
    --border: #25252e;
    --border-strong: #34343f;
    --accent: #b794f6;
    --accent-deep: #c4a8ff;
    --accent-soft: rgba(159, 122, 234, 0.14);
    --accent-tint: rgba(159, 122, 234, 0.06);
    --get: #60a5fa;
    --post: #b794f6;
    --delete: #f87171;
    --warn: #fbbf24;
    --header-bg: rgba(14, 14, 18, 0.78);
    --auth-bg: rgba(251, 191, 36, 0.12);
    --auth-public-bg: rgba(255, 255, 255, 0.05);
    --note-border: rgba(159, 122, 234, 0.25);
    --status-err-bg: rgba(248, 113, 113, 0.12);
    --status-ok-bg: rgba(34, 197, 94, 0.12);
    --status-ok: #4ade80;
    --scrollbar-thumb: #2c2c36;
    --scrollbar-thumb-hover: #3d3d49;
    --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --radius: 8px;
    --radius-sm: 5px;
    color-scheme: dark;
  }

  :root[data-theme="light"] {
    --bg: #fcfcfb;
    --bg-soft: #f5f4f1;
    --surface: #ffffff;
    --code-bg: #1a1a1f;
    --code-bg-head: #232329;
    --text: #1a1a1f;
    --text-2: #3a3a44;
    --text-dim: #6b6b75;
    --text-faint: #9a9aa3;
    --border: #e8e7e2;
    --border-strong: #d4d3cd;
    --accent: #9f7aea;
    --accent-deep: #7c52d4;
    --accent-soft: #f3edff;
    --accent-tint: #faf6ff;
    --get: #2563eb;
    --post: #9f7aea;
    --delete: #dc2626;
    --warn: #b45309;
    --header-bg: rgba(252, 252, 251, 0.85);
    --auth-bg: #fef3e7;
    --auth-public-bg: #ececea;
    --note-border: #e6dcff;
    --status-err-bg: #fef2f2;
    --status-ok-bg: #f0fdf4;
    --status-ok: #16a34a;
    --scrollbar-thumb: #dcdbd5;
    --scrollbar-thumb-hover: #c4c3bd;
    color-scheme: light;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  ::selection { background: var(--accent-soft); color: var(--accent-deep); }
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border: 3px solid var(--bg); border-radius: 8px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

  a { color: var(--accent-deep); text-decoration: none; }
  a:hover { color: var(--accent); }

  code { font-family: var(--mono); font-size: 0.88em; }

  /* ========== HEADER ========== */
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    max-width: 1400px;
    margin: 0 auto;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
  }

  .logo-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background-image: url('favicon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .logo-divider {
    width: 1px;
    height: 16px;
    background: var(--border-strong);
    margin: 0 4px;
  }

  .logo-tag {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 14px;
  }

  .header-meta {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 13px;
    color: var(--text-dim);
  }

  .version-pill {
    font-family: var(--mono);
    font-size: 12px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    padding: 4px 9px;
    border-radius: 99px;
    font-weight: 500;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
  }

  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  }

  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
  }

  .theme-toggle:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-soft);
  }

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

  /* ========== HERO ========== */
  .hero {
    padding: 88px 32px 72px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
    opacity: 0.6;
    pointer-events: none;
  }

  .hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-deep);
    background: var(--accent-soft);
    padding: 6px 12px;
    border-radius: 99px;
    margin-bottom: 28px;
  }

  .eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
  }

  .hero h1 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 22px;
    max-width: 880px;
    color: var(--text);
  }

  .hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent-deep);
  }

  .hero-tagline {
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 660px;
    margin-bottom: 44px;
    font-weight: 400;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
  }

  .hero-meta-item .label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 6px;
    display: block;
  }

  .hero-meta-item .value {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
  }

  .hero-meta-item .value.mono {
    font-family: var(--mono);
    font-size: 14px;
  }

  /* ========== LAYOUT ========== */
  .container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
  }

  /* ========== SIDEBAR ========== */
  .sidebar {
    border-right: 1px solid var(--border);
    padding: 36px 28px 60px 32px;
    position: sticky;
    top: 57px;
    align-self: start;
    height: calc(100vh - 57px);
    overflow-y: auto;
    font-size: 14px;
  }

  .search-box {
    position: relative;
    margin-bottom: 32px;
  }

  .search-box input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    padding: 9px 12px 9px 34px;
    outline: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
  }

  .search-box input::placeholder { color: var(--text-faint); }

  .search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  .search-box svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    pointer-events: none;
  }

  .nav-group { margin-bottom: 24px; }

  .nav-group-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 8px;
    padding: 0 8px;
  }

  .nav-list { list-style: none; }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    color: var(--text-2);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all 0.12s;
    text-decoration: none;
    margin-bottom: 1px;
  }

  .nav-item:hover {
    color: var(--text);
    background: var(--bg-soft);
  }

  .nav-item.active {
    color: var(--accent-deep);
    background: var(--accent-soft);
    font-weight: 500;
  }

  .nav-item.active .nav-method { opacity: 1; }

  .nav-method {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    min-width: 32px;
    opacity: 0.75;
  }

  .nav-method.get { color: var(--get); }
  .nav-method.post { color: var(--post); }
  .nav-method.delete { color: var(--delete); }
  .nav-method.dot { color: var(--text-faint); }

  .nav-item.hidden { display: none; }

  /* ========== MAIN ========== */
  .main {
    padding: 64px 56px 120px;
    min-width: 0;
  }

  .section-header {
    padding-top: 80px;
    margin-top: -80px;
    margin-bottom: 12px;
  }

  .section-header.first { padding-top: 0; margin-top: 0; }

  .section-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-deep);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
  }

  .section-title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 36px;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text);
  }

  .section-desc {
    color: var(--text-dim);
    margin-bottom: 36px;
    max-width: 720px;
    font-size: 15px;
    line-height: 1.65;
  }

  .section-desc strong { color: var(--text); font-weight: 600; }

  .section-desc code {
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-deep);
  }

  /* ========== INTRO BLOCKS ========== */
  .intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 56px;
  }

  .intro-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
  }

  .intro-card .label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 10px;
  }

  .intro-card .value {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
  }

  .intro-card .value.purple { color: var(--accent-deep); }

  /* ========== ENDPOINT CARD ========== */
  .endpoint {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 24px;
    scroll-margin-top: 80px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  .endpoint:hover {
    border-color: var(--border-strong);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .endpoint-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--bg-soft);
  }

  .method {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 5px 9px;
    line-height: 1;
    border-radius: 4px;
    color: #fff;
  }

  .method.get { background: var(--get); }
  .method.post { background: var(--post); }
  .method.delete { background: var(--delete); }

  .endpoint-path {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
    flex: 1;
    word-break: break-all;
    min-width: 0;
  }

  .endpoint-path .param { color: var(--accent-deep); }

  .endpoint-auth {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--warn);
    background: var(--auth-bg);
    padding: 4px 9px;
    border-radius: 4px;
  }

  .endpoint-auth.public {
    color: var(--text-dim);
    background: var(--auth-public-bg);
  }

  .endpoint-body {
    padding: 24px 28px 28px;
  }

  .endpoint-desc {
    color: var(--text-2);
    margin-bottom: 24px;
    font-size: 14.5px;
    line-height: 1.65;
  }

  .endpoint-desc strong { color: var(--text); font-weight: 600; }

  .endpoint-desc code {
    background: var(--bg-soft);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent-deep);
    font-size: 0.85em;
  }

  .ep-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 24px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  .ep-row.first { padding-top: 0; border-top: none; }

  .ep-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding-top: 9px;
  }

  .ep-content { min-width: 0; }

  /* Code block */
  .code-block {
    background: var(--code-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--code-bg-head);
  }

  .code-tag {
    background: var(--code-bg-head);
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #b4b4be;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .code-tag .copy {
    background: transparent;
    border: 1px solid #3a3a44;
    color: #b4b4be;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 4px 9px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
  }

  .code-tag .copy:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(159, 122, 234, 0.1);
  }

  .code-tag .copy.copied {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
  }

  .code-content {
    padding: 16px 18px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.65;
    overflow-x: auto;
    white-space: pre;
    color: #e6e6ec;
  }

  /* Syntax accents - dark theme */
  .tk-key { color: #c4a8ff; }
  .tk-str { color: #fcd34d; }
  .tk-num { color: #93c5fd; }
  .tk-bool { color: #fb7185; }
  .tk-null { color: #6b6b75; }
  .tk-com { color: #6b6b75; font-style: italic; }
  .tk-mtd { color: #c4a8ff; font-weight: 600; }

  /* Param table */
  .param-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .param-table th {
    text-align: left;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
  }

  .param-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }

  .param-table tr:last-child td { border-bottom: none; }

  .param-name {
    font-family: var(--mono);
    color: var(--accent-deep);
    font-weight: 500;
    white-space: nowrap;
    font-size: 13px;
  }

  .param-name .req {
    color: var(--delete);
    margin-left: 3px;
    font-size: 14px;
    vertical-align: middle;
    font-weight: 600;
  }

  .param-type {
    color: var(--text-dim);
    font-style: italic;
    font-size: 13px;
    white-space: nowrap;
    font-family: var(--mono);
  }

  .param-desc { color: var(--text-2); font-size: 13.5px; line-height: 1.55; }

  .param-desc code {
    background: var(--bg-soft);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--accent-deep);
    font-size: 0.92em;
  }

  /* Notes */
  .note {
    background: var(--accent-tint);
    border: 1px solid var(--note-border);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text-2);
    margin-bottom: 22px;
    border-radius: var(--radius-sm);
    line-height: 1.6;
  }

  .note strong { color: var(--accent-deep); font-weight: 600; }
  .note code {
    background: rgba(159, 122, 234, 0.08);
    padding: 1px 6px;
    border-radius: 3px;
    color: var(--accent-deep);
  }

  /* Status code styling */
  .status-code {
    font-family: var(--mono);
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 12px;
  }
  .status-code.s400, .status-code.s401, .status-code.s404 {
    background: var(--status-err-bg);
    color: var(--delete);
  }
  .status-code.s200 {
    background: var(--status-ok-bg);
    color: var(--status-ok);
  }

  /* Footer */
  .footer {
    border-top: 1px solid var(--border);
    padding: 36px 32px;
    margin-top: 80px;
    color: var(--text-faint);
    font-size: 13px;
    text-align: center;
    background: var(--surface);
  }

  .footer .accent { color: var(--accent-deep); font-weight: 500; }

  /* Responsive */
  @media (max-width: 1024px) {
    .container { grid-template-columns: 1fr; }
    .sidebar {
      position: static;
      height: auto;
      border-right: none;
      border-bottom: 1px solid var(--border);
      padding: 24px 24px;
    }
    .main { padding: 40px 24px 80px; }
    .hero-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
    .ep-row { grid-template-columns: 1fr; gap: 8px; }
    .ep-label { padding-top: 0; }
    .intro-grid { grid-template-columns: 1fr; }
  }

  @media (max-width: 600px) {
    .hero { padding: 56px 20px 48px; }
    .header-inner { padding: 12px 18px; }
    .header-meta { gap: 12px; }
    .header-meta .status-pill { display: none; }
    .main { padding: 32px 18px 60px; }
    .endpoint-head { padding: 14px 18px; gap: 10px; }
    .endpoint-body { padding: 20px 18px 22px; }
    .section-title { font-size: 28px; }
    .endpoint-path { font-size: 13px; }
    .hero-meta { grid-template-columns: 1fr; gap: 18px; }
    .logo-tag { display: none; }
  }
