@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  color-scheme: light;
  --brand: #176b87;
  --brand-light: color-mix(in srgb, var(--brand) 12%, white);
  --brand-mid: color-mix(in srgb, var(--brand) 24%, white);
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e2e7ef;
  --border-faint: #edf0f5;
  --text: #111827;
  --text-secondary: #374151;
  --muted: #6b7280;
  --muted-faint: #9ca3af;
  --code-bg: #0d1520;
  --code-surface: #131f2e;
  --code-border: #1e2f42;
  --code-line: #1a2a3a;
  --success: #065f46;
  --success-bg: #d1fae5;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --neutral-bg: #f1f5f9;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --font-display: 'IBM Plex Sans', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --panel-header-bg: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  --panel-muted-bg: #f8fafc;
  --pre-text: #f4f7fb;
  --code-text: #e2e8f0;
  --required-bg: #fff1f2;
  --required-border: #fca5a5;
  --required-color: #b91c1c;
}

[data-theme="dark"] {
  color-scheme: dark;
  --brand-light: color-mix(in srgb, var(--brand) 18%, #0b1120);
  --brand-mid: color-mix(in srgb, var(--brand) 28%, #0b1120);
  --bg: #0b1120;
  --surface: #111827;
  --surface-raised: #1a2332;
  --border: #243044;
  --border-faint: #1c2738;
  --text: #f3f4f6;
  --text-secondary: #d1d5db;
  --muted: #9ca3af;
  --muted-faint: #6b7280;
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --neutral-bg: #1a2332;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3);
  --topbar-bg: rgba(17, 24, 39, 0.92);
  --panel-header-bg: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  --panel-muted-bg: #151f31;
  --required-bg: rgba(248, 113, 113, 0.12);
  --required-border: rgba(248, 113, 113, 0.35);
  --required-color: #fca5a5;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Search trigger ─────────────────────────────────── */

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  width: 260px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.search-trigger span {
  flex: 1;
  text-align: left;
}

.search-trigger:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.search-trigger kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-faint);
  margin-left: 4px;
}

/* ── Search palette ──────────────────────────────────── */

.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  animation: backdropIn 0.15s ease;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.search-palette {
  position: fixed;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 201;
  width: min(580px, calc(100vw - 32px));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  animation: paletteIn 0.15s cubic-bezier(0.2, 0, 0, 1.2);
}

@keyframes paletteIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-faint);
  color: var(--muted);
}

#search-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
}

#search-input::placeholder {
  color: var(--muted-faint);
}

.search-esc {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted-faint);
  flex-shrink: 0;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}

.search-result:hover,
.search-result[aria-selected="true"] {
  background: var(--brand-light);
}

.search-result[aria-selected="true"] .search-result-name {
  color: var(--brand);
}

.search-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
  color: white;
}

.search-result-badge.get    { background: #059669; }
.search-result-badge.post   { background: var(--brand); }
.search-result-badge.put    { background: #d97706; }
.search-result-badge.delete { background: #dc2626; }
.search-result-badge.patch  { background: #7c3aed; }
.search-result-badge.schema { background: #475569; }
.search-result-badge.prop   { background: #0e7490; }
.search-result-badge.guide  { background: #7c3aed; }

.search-result-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-path {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-faint);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.search-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.search-footer {
  display: flex;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--border-faint);
  background: var(--bg);
  font-size: 11px;
  color: var(--muted-faint);
}

.search-footer kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--muted);
  margin-right: 3px;
}

/* ── Topbar ─────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 52px;
  padding: 0 clamp(20px, 3vw, 56px) 0 clamp(16px, 2vw, 40px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, var(--shadow-sm);
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

/* ── Client switcher ────────────────────────────────── */

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}

.language-switcher a:hover {
  color: var(--text);
  background: var(--border-faint);
}

.language-switcher a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-light);
}

.client-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.client-switcher-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

#client-switcher {
  min-width: 180px;
  max-width: 220px;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#client-switcher:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

#client-switcher:focus-visible {
  outline: 0px;
  outline-offset: 0px;
}

/* ── Theme toggle ───────────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--text);
  background: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 50%, white);
  outline-offset: 2px;
}

.theme-icon {
  display: none;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .theme-icon-moon,
[data-theme="dark"] .theme-icon-sun {
  display: inline-flex;
}

/* ── Layout ─────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px clamp(20px, 3vw, 56px) 64px clamp(16px, 2vw, 40px);
}

/* ── Sidebar ─────────────────────────────────────────── */

.sidebar {
  position: sticky;
  top: 68px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: start;
  padding: 8px 4px 8px 0;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  max-height: calc(100vh - 80px);
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.sidebar a {
  position: relative;
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0;
}

.sidebar a::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: var(--brand);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
  opacity: 0;
}

.sidebar a:hover {
  color: var(--text);
  background: var(--border-faint);
}

.sidebar a.active {
  color: var(--brand);
  background: var(--brand-light);
}

[data-theme="dark"] .sidebar a.active {
  color: #fff;
}

.sidebar a.active::before {
  transform: translateY(-50%) scaleY(1);
  opacity: 1;
}

/* ── Sidebar submenu ─────────────────────────────────── */

.sidebar-submenu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 2px 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.sidebar-submenu-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 5px 8px 5px 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  transition: color 0.15s, background 0.15s;
  line-height: 1.35;
}

.sidebar-submenu-item:hover {
  color: var(--text);
}

.sidebar-submenu-item.active {
  color: var(--brand);
}

#guides-submenu .sidebar-submenu-item.nav-depth-0 {
  font-weight: 500;
}

#guides-submenu .sidebar-guide-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#guides-submenu .sidebar-guide-group-header {
  min-width: 0;
}

#guides-submenu .sidebar-guide-group-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 5px 6px 5px 8px;
  box-sizing: border-box;
}

#guides-submenu .sidebar-guide-group-label .submenu-label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

#guides-submenu .sidebar-guide-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

#guides-submenu .sidebar-guide-group-toggle:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}

#guides-submenu .sidebar-guide-group-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 50%, white);
  outline-offset: 1px;
}

#guides-submenu .sidebar-guide-chevron {
  transition: transform 0.2s ease;
}

#guides-submenu .sidebar-guide-group.collapsed .sidebar-guide-chevron {
  transform: rotate(-90deg);
}

#guides-submenu .sidebar-submenu-item.nav-depth-0.active {
  background: var(--brand-light);
  border-radius: var(--radius-sm);
}

#guides-submenu .sidebar-guide-group-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#guides-submenu .sidebar-guide-group.collapsed .sidebar-guide-group-items {
  display: none;
}

#guides-submenu .sidebar-submenu-item.nav-depth-1 {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

#guides-submenu .sidebar-submenu-item.nav-depth-2 {
  margin-left: 22px;
  padding-left: 10px;
  border-left: 1px solid var(--border-faint);
  font-size: 11.5px;
}

#guides-submenu .sidebar-submenu-item.nav-depth-1.active,
#guides-submenu .sidebar-submenu-item.nav-depth-2.active {
  background: var(--brand-light);
  border-radius: var(--radius-sm);
}

.submenu-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 18px;
  margin-top: 1px;
  padding: 0 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  color: white;
}

.submenu-method.get    { background: #059669; }
.submenu-method.post   { background: var(--brand); }
.submenu-method.put    { background: #d97706; }
.submenu-method.delete { background: #dc2626; }
.submenu-method.patch  { background: #7c3aed; }

.submenu-label {
  word-break: break-word;
}

/* ── Content ─────────────────────────────────────────── */

.content {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
}

.section,
.endpoint {
  scroll-margin-top: 68px;
}

.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.section:first-child {
  padding-top: 8px;
}

.section-label {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  opacity: 0.7;
}

/* ── Hero ─────────────────────────────────────────── */


.hero-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero p {
  max-width: min(680px, 100%);
  color: var(--muted);
  margin-top: 10px;
}

.region-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, white);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 8px;
  flex-shrink: 0;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

p {
  margin: 0 0 8px;
  color: var(--muted);
}

/* ── Summary grid ─────────────────────────────────── */

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.summary-grid div {
  min-width: 200px;
}

.summary-grid div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.summary-grid span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-faint);
  margin-bottom: 4px;
}

.summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── Auth code block ──────────────────────────────── */

pre {
  overflow-x: auto;
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--code-bg);
  color: var(--pre-text);
  margin: 14px 0 0;
  box-shadow: var(--shadow);
}

code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ── Regional notes ───────────────────────────────── */

.regional-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.regional-note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  background: var(--brand-light);
}

.note-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.note-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.differences-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.differences-table thead tr {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border-bottom: 2px solid color-mix(in srgb, var(--brand) 20%, var(--border));
}

.differences-table th {
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.differences-table td {
  padding: 12px 16px;
  vertical-align: top;
  border-top: 1px solid var(--border-faint);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.differences-table tr:first-child td {
  border-top: none;
}

.differences-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand) 4%, transparent);
}

.diff-area {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.diff-regional {
  color: var(--text);
  font-weight: 500;
}

.regional-section-header {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Guides ───────────────────────────────────────── */

.guides-list {
  display: grid;
  gap: 24px;
  margin-top: 8px;
}

.guide-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 68px;
}

.guide-header {
  padding: 13px 18px;
  background: var(--panel-header-bg);
  border-bottom: 1px solid var(--border-faint);
}

.guide-body {
  padding: 18px 20px 20px;
}

.guide-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.guide-description {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  line-height: 1.6;
}

.guide-subsection {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-faint);
  scroll-margin-top: 68px;
}

.guide-subsection .guide-subsection {
  margin-top: 20px;
  padding-top: 0;
  border-top: none;
}

.guide-subsection-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.guide-paragraph {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.guide-field-list {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.7;
}

.guide-field-list code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
}

.guide-example-label {
  font-weight: 500;
  color: var(--text);
}

.guide-example-string,
.guide-code-block {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--code-surface);
  border: 1px solid var(--code-border);
  overflow-x: auto;
}

.guide-example-string code,
.guide-code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--code-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.guide-code-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.guide-figure {
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guide-figure img {
  display: block;
  width: 75%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.guide-figure figcaption {
  margin-top: 8px;
  width: 75%;
  max-width: 100%;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.guide-image-grid {
  display: grid;
  gap: 16px;
  margin: 12px 0 4px;
  justify-items: center;
}

.guide-image-grid .guide-figure {
  width: 75%;
  max-width: 100%;
}

.guide-image-grid .guide-figure img,
.guide-image-grid .guide-figure figcaption {
  width: 100%;
}

.guide-steps {
  margin: 0 0 8px;
  padding-left: 22px;
  display: grid;
  gap: 20px;
}

.guide-step {
  padding-left: 4px;
}

.guide-step .guide-paragraph {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 500;
}

/* ── See also callout ─────────────────────────────── */

.see-also {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
}

.see-also-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  flex-shrink: 0;
}

.see-also-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent);
  transition: text-decoration-color 0.15s;
}

.see-also-link:hover {
  text-decoration-color: var(--brand);
}

.see-also-link::before {
  content: '↗';
  font-size: 11px;
  opacity: 0.7;
}

/* ── Endpoints ────────────────────────────────────── */

.endpoint-list,
.schema-list {
  display: grid;
  gap: 24px;
  margin-top: 8px;
}

.endpoint,
.schema {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.endpoint:hover {
  box-shadow: var(--shadow);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: var(--panel-header-bg);
  border-bottom: 1px solid var(--border-faint);
}

.copy-curl-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.copy-curl-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
  background: var(--brand-light);
}

.method {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000));
  color: white;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--brand) 40%, transparent);
  flex-shrink: 0;
}

.method.get { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 1px 3px rgba(5,150,105,0.3); }
.method.post { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); box-shadow: 0 1px 3px color-mix(in srgb, var(--brand) 40%, transparent); }
.method.put { background: linear-gradient(135deg, #d97706, #b45309); box-shadow: 0 1px 3px rgba(217,119,6,0.3); }
.method.delete { background: linear-gradient(135deg, #dc2626, #b91c1c); box-shadow: 0 1px 3px rgba(220,38,38,0.3); }
.method.patch { background: linear-gradient(135deg, #7c3aed, #6d28d9); box-shadow: 0 1px 3px rgba(124,58,237,0.3); }

.path {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
}

.endpoint-body {
  padding: 18px 30px 30px;
}

.endpoint-body h3 {
  margin-bottom: 4px;
}

.endpoint-body > p {
  margin: 0 0 10px;
  font-size: 13.5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-top: 6px;
  margin-right: 4px;
  border-radius: 4px;
  padding: 0 8px;
  background: var(--neutral-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ── HTTP codes ───────────────────────────────────── */

.http-codes {
  margin-top: 16px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.http-codes h4 {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-faint);
  background: var(--panel-muted-bg);
}

.status-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid var(--border-faint);
  font-size: 13px;
}

.status-row:first-of-type {
  border-top: 0;
}

.status-code {
  border-radius: 4px;
  padding: 2px 8px;
  background: var(--neutral-bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
}

.status-success { background: var(--success-bg); color: var(--success); }
.status-warning { background: var(--warning-bg); color: var(--warning); }
.status-danger  { background: var(--danger-bg);  color: var(--danger); }

/* ── Example panels (tabbed) ──────────────────────── */

.example-tabs {
  margin-top: 18px;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: var(--shadow-lg);
}

.example-tabbar {
  display: flex;
  background: var(--code-surface);
  border-bottom: 1px solid var(--code-border);
  padding: 0 4px;
  gap: 0;
  overflow-x: auto;
}

.example-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b8099;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  -webkit-appearance: none;
}

.example-tab:hover {
  color: #c8d8e8;
}

.example-tab.active {
  color: #e8f0f8;
  border-bottom-color: var(--brand);
}

.example-tab .tab-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.tab-badge.success { background: rgba(5,150,105,0.25); color: #34d399; }
.tab-badge.error   { background: rgba(220,38,38,0.2);  color: #f87171; }
.tab-badge.request { background: rgba(99,179,237,0.2); color: #7dd3fc; }

.example-panels {
  position: relative;
}

.example-panel-content {
  display: none;
}

.example-panel-content.active {
  display: block;
}

.example-panel-content pre {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  min-height: 180px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--code-bg);
  padding: 20px;
}

.example-panel-content code {
  color: #dce8f5;
  white-space: pre;
}

.json-key     { color: #7dd3fc; }
.json-string  { color: #86efac; }
.json-number  { color: #fbbf24; }
.json-boolean { color: #c4b5fd; }
.json-null    { color: #94a3b8; }

/* ── Schemas ──────────────────────────────────────── */

.schema {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.schema .endpoint-header {
  padding: 14px 20px;
}

.schema .endpoint-header h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
}

.schema-body {
  padding: 0 20px 16px;
}

.schema-props {
  display: grid;
  gap: 0;
  margin-top: 0;
  min-width: 720px;
}

.schema-props-header {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 96px minmax(200px, 2.5fr) minmax(88px, 1fr);
  gap: 16px;
  padding: 7px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-faint);
  min-width: 720px;
}

.schema-props-header span {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-faint);
}

.schema-prop {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) 96px minmax(200px, 2.5fr) minmax(88px, 1fr);
  gap: 16px;
  padding: 11px 12px;
  border-top: 1px solid var(--border-faint);
  transition: background 0.1s;
  min-width: 720px;
}

.inline-schema {
  margin-top: 18px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.inline-schema-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 20px;
  border: 0;
  background: var(--bg);
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
  transition: background 0.15s;
}

.inline-schema-toggle:hover {
  background: color-mix(in srgb, var(--brand) 4%, var(--bg));
}

.inline-schema-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 50%, white);
  outline-offset: -2px;
}

.inline-schema:not(.collapsed) .inline-schema-toggle {
  border-bottom: 1px solid var(--border-faint);
}

.inline-schema-label {
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.inline-schema-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.inline-schema.collapsed .inline-schema-chevron {
  transform: rotate(-90deg);
}

.inline-schema-body {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
}

.inline-schema.collapsed .inline-schema-body {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.inline-schema-body-inner {
  min-height: 0;
  overflow: hidden;
}

.inline-schema:not(.collapsed) .inline-schema-body-inner {
  overflow-x: auto;
}

@media (prefers-reduced-motion: reduce) {
  .inline-schema-body,
  .inline-schema-chevron {
    transition: none;
  }
}

.inline-schema .schema-props-header {
  padding: 8px 20px;
}

.inline-schema .schema-prop {
  padding: 12px 20px;
}

.inline-schema .schema-props .schema-prop:last-child {
  padding-bottom: 16px;
}

.prop-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.prop-indent {
  display: inline-block;
  width: calc(var(--indent, 0) * 14px);
  flex-shrink: 0;
}

.prop-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--required-bg);
  border: 1px solid var(--required-border);
  color: var(--required-color);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  line-height: 1.4;
}

.schema-props .schema-prop:first-child {
  border-top: none;
}

.schema-prop:hover {
  background: color-mix(in srgb, var(--brand) 3%, transparent);
}

.schema-prop span {
  /* min-width: 0; */
  overflow-wrap: anywhere;
  font-size: 13px;
}

.schema-prop strong {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.prop-type {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  align-self: start;
  padding-top: 1px;
}

.enum-type {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 100%;
}

.enum-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--brand) 8%, white);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
  color: color-mix(in srgb, var(--brand) 80%, var(--text));
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.prop-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  min-width: 0;
  align-self: start;
  overflow-wrap: anywhere;
}

.prop-example {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
  align-self: center;
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
}

/* ── Scrollspy active nav ─────────────────────────── */

ul { margin: 0; padding-left: 22px; }
li { margin: 7px 0; }

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 20px;
    gap: 12px;
    min-height: auto;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .search-trigger {
    flex: 1 1 220px;
    width: auto;
  }

  .language-switcher,
  .client-switcher,
  .theme-toggle {
    align-self: flex-start;
  }

  .layout {
    display: block;
    padding: 20px 20px 48px;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 0 12px;
    margin-bottom: 20px;
    gap: 4px;
  }

  .sidebar a {
    white-space: nowrap;
    padding: 7px 14px;
  }

  .sidebar a::before { display: none; }

  .hero h1 {
    font-size: 28px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .schema-prop,
  .schema-props-header {
    grid-template-columns: 1fr 1fr;
  }

  .schema-props-header span:nth-child(3),
  .schema-props-header span:nth-child(4) {
    display: none;
  }

  .schema-prop .prop-desc,
  .schema-prop .prop-example {
    display: none;
  }

  .differences-table th:nth-child(2),
  .differences-table td:nth-child(2) {
    display: none;
  }
}
