:root {
  color-scheme: light;
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Sora', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --bg: #f7f8fa; --surface: #fff; --surface-2: #f2f4f7; --surface-3: #eceef2;
  --border: #e4e7ec; --text: #101828; --text-2: #344054; --text-3: #667085; --text-4: #98a2b3;
  --accent: #3b40d6; --accent-text: #2b2fa0;
  --get: #175cd3; --post: #067647; --delete: #b42318; --put: #a64a07;
  --code-bg: #0b1020; --code-text: #e6ebf5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0e1a; --surface: #111726; --surface-2: #161d2e; --surface-3: #1b2335;
    --border: #232c42; --text: #f4f6fb; --text-2: #c4cce0; --text-3: #94a0ba; --text-4: #6b7897;
    --accent: #6f74ff; --accent-text: #a9adff;
    --get: #7cb3ff; --post: #75e0a7; --delete: #ffa7a0; --put: #fac176;
    --code-bg: #060912; --code-text: #d6deec;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); font-size: .88em; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.25; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; background: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.brand .ver { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); background: var(--surface-3); padding: 1px 7px; border-radius: 999px; }
.top-nav { display: flex; gap: 18px; font-size: 14px; }
.top-nav a { color: var(--text-3); }
.top-nav a:hover { color: var(--text); text-decoration: none; }

.layout { display: grid; grid-template-columns: 250px 1fr; max-width: 1180px; margin: 0 auto; }
.sidebar { position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); overflow-y: auto; padding: 24px 12px 24px 24px; border-right: 1px solid var(--border); }
.sidebar .group { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-4); margin: 18px 0 6px; }
.sidebar a { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 7px; color: var(--text-2); font-size: 13.5px; }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a.active { background: var(--surface-3); color: var(--text); font-weight: 550; }
.sidebar .m { font-family: var(--font-mono); font-size: 10px; font-weight: 700; width: 38px; flex-shrink: 0; }
.m.GET { color: var(--get); } .m.POST { color: var(--post); } .m.DELETE { color: var(--delete); } .m.PUT { color: var(--put); }

.content { padding: 36px 40px 120px; min-width: 0; }
.content section { scroll-margin-top: 72px; }
.content h1 { font-size: 30px; margin: 0 0 8px; }
.content h2 { font-size: 22px; margin: 44px 0 12px; padding-top: 8px; }
.content h3 { font-size: 16px; margin: 24px 0 8px; }
.content p { color: var(--text-2); }
.lede { font-size: 17px; color: var(--text-3); }

.endpoint { border: 1px solid var(--border); border-radius: 12px; margin: 20px 0; overflow: hidden; background: var(--surface); }
.endpoint > .head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.method { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.method.GET { color: var(--get); background: color-mix(in srgb, var(--get) 14%, transparent); }
.method.POST { color: var(--post); background: color-mix(in srgb, var(--post) 14%, transparent); }
.method.DELETE { color: var(--delete); background: color-mix(in srgb, var(--delete) 14%, transparent); }
.method.PUT { color: var(--put); background: color-mix(in srgb, var(--put) 14%, transparent); }
.endpoint .path { font-family: var(--font-mono); font-size: 14px; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.endpoint .scope { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); background: var(--surface-3); padding: 2px 8px; border-radius: 999px; }
.endpoint .body { padding: 16px; }
.endpoint .desc { margin: 0 0 14px; color: var(--text-2); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 6px 0; }
th { text-align: left; padding: 8px 10px; color: var(--text-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
td:first-child { font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; color: var(--text); }
tr:last-child td { border-bottom: 0; }
.req { color: var(--delete); font-weight: 700; }
.enumv { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; margin: 1px; display: inline-block; }

pre { background: var(--code-bg); color: var(--code-text); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; margin: 12px 0; }
pre .k { color: #8ab4ff; } pre .s { color: #7ee0a1; } pre .c { color: #7f8aa3; }
.inline { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: .85em; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 8px; padding: 12px 14px; margin: 14px 0; font-size: 14px; color: var(--text-2); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 24px 18px 80px; }
  .top-nav { display: none; }
}

/* Event catalogue cards */
.event-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 12px 0; background: var(--surface); }
.event-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.event-name { font-size: 15px; font-weight: 600; color: var(--text); }
.reserved { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-4); background: var(--surface-3); padding: 2px 8px; border-radius: 999px; }
.event-when { color: var(--text-3); font-size: 14px; margin: 2px 0 8px; }
.event-card pre { margin: 0; font-size: 12.5px; }
