/* ============================================================
   Joker Watch Docs — Enterprise Design System v0.2.1
   Inspired by Stripe Docs / Linear / Resend
   ============================================================ */

:root {
  /* Surfaces */
  --bg-0: #07080c;
  --bg-1: #0c0e15;
  --bg-2: #11141d;
  --bg-3: #161a25;
  --bg-code: #0a0d14;
  --bg-code-header: #11141d;

  /* Borders */
  --border-1: #1a1f2e;
  --border-2: #232a3d;
  --border-3: #2f3850;

  /* Text */
  --text-1: #e8ecf2;
  --text-2: #9aa3b6;
  --text-3: #6b7388;
  --text-4: #4a5168;

  /* Brand */
  --accent: #00d4aa;
  --accent-2: #00b894;
  --accent-soft: rgba(0, 212, 170, 0.12);
  --accent-glow: rgba(0, 212, 170, 0.25);

  /* HTTP method semantics */
  --method-get: #5ea0ff;
  --method-get-bg: rgba(94, 160, 255, 0.12);
  --method-post: #00d4aa;
  --method-post-bg: rgba(0, 212, 170, 0.12);
  --method-patch: #ffb547;
  --method-patch-bg: rgba(255, 181, 71, 0.12);
  --method-delete: #ff5b6b;
  --method-delete-bg: rgba(255, 91, 107, 0.12);

  /* Severity */
  --sev-fatal: #ff5b6b;
  --sev-error: #ff8a4c;
  --sev-warning: #ffb547;
  --sev-info: #5ea0ff;

  /* Shadows */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 0 1px var(--accent), 0 0 30px var(--accent-glow);

  /* Radii */
  --radius-1: 6px;
  --radius-2: 10px;
  --radius-3: 14px;
  --radius-4: 18px;

  /* Type */
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'Roboto Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

  /* Layout */
  --topbar-h: 60px;
  --left-w: 272px;
  --right-w: 460px;
  --content-max: 760px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-variant-ligatures: common-ligatures;
}

/* Subtle dotted noise overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 0;
  opacity: 0.6;
}

::selection { background: var(--accent-soft); color: var(--accent); }

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

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
.topbar.scrolled {
  border-bottom-color: var(--border-1);
  background: rgba(7, 8, 12, 0.88);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text-1); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #00a884 100%);
  color: #06231d;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.3), 0 4px 12px rgba(0, 212, 170, 0.2);
}
.brand-version {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.topbar-search {
  flex: 1;
  max-width: 460px;
  margin: 0 28px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 38px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.topbar-search input::placeholder { color: var(--text-3); }
.topbar-search input:focus {
  border-color: var(--accent);
  background: var(--bg-0);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  width: 14px;
  height: 14px;
}
.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 11px;
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar-link {
  padding: 7px 12px;
  border-radius: var(--radius-1);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 140ms ease, background 140ms ease;
}
.topbar-link:hover { color: var(--text-1); background: var(--bg-2); }
.topbar-link.primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #06231d;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 4px 12px rgba(0, 212, 170, 0.25);
}
.topbar-link.primary:hover {
  color: #06231d;
  background: linear-gradient(180deg, #00e4b8 0%, var(--accent) 100%);
}

/* Search results dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-2);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}
.search-results.open { display: block; }
.search-result {
  display: block;
  padding: 10px 14px;
  color: var(--text-1);
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-1);
  cursor: pointer;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.active { background: var(--bg-2); color: var(--accent); }
.search-result .res-section { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ============================================================
   LEFT NAV
   ============================================================ */
.col-left {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 28px 16px 60px 24px;
  border-right: 1px solid var(--border-1);
}
.col-left::-webkit-scrollbar { width: 6px; }
.col-left::-webkit-scrollbar-track { background: transparent; }
.col-left::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.nav-group { margin-bottom: 24px; }
.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
  padding: 0 10px;
  margin-bottom: 6px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 1px 0;
  border-radius: var(--radius-1);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.4;
  transition: color 120ms ease, background 120ms ease;
}
.nav-item:hover { color: var(--text-1); background: var(--bg-2); }
.nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* HTTP method badge (in nav and headings) */
.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.method-badge.get    { color: var(--method-get);    background: var(--method-get-bg);    border-color: rgba(94, 160, 255, 0.25); }
.method-badge.post   { color: var(--method-post);   background: var(--method-post-bg);   border-color: rgba(0, 212, 170, 0.25); }
.method-badge.patch  { color: var(--method-patch);  background: var(--method-patch-bg);  border-color: rgba(255, 181, 71, 0.25); }
.method-badge.delete { color: var(--method-delete); background: var(--method-delete-bg); border-color: rgba(255, 91, 107, 0.25); }

.nav-item .method-badge { font-size: 9px; min-width: 38px; padding: 1px 4px; flex-shrink: 0; }
.nav-item .route { font-family: var(--mono); font-size: 12.5px; }

/* ============================================================
   CENTER ARTICLE
   ============================================================ */
.col-center {
  min-width: 0;
  padding: 56px 64px 96px;
  max-width: calc(var(--content-max) + 128px);
}

.col-center h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--text-1);
}
.col-center h2 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.018em;
  line-height: 1.25;
  margin: 64px 0 18px;
  color: var(--text-1);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-1);
}
.col-center h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin: 40px 0 14px;
  color: var(--text-1);
}
.col-center h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text-1);
}
.col-center p, .col-center li {
  font-size: 16px;
  line-height: 1.75;
  color: #c9ced9;
}
.col-center p { margin: 0 0 16px; }
.col-center ul, .col-center ol { padding-left: 22px; margin: 0 0 18px; }
.col-center li { margin-bottom: 6px; }
.col-center a { border-bottom: 1px solid rgba(0, 212, 170, 0.3); padding-bottom: 1px; }
.col-center a:hover { border-bottom-color: var(--accent); }

.col-center strong { color: var(--text-1); font-weight: 600; }

/* Inline code */
.col-center code:not(pre code) {
  font-family: var(--mono);
  font-size: 0.87em;
  padding: 1px 6px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 4px;
  color: var(--accent);
  white-space: nowrap;
}

/* Tables */
.col-center table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  overflow: hidden;
  font-size: 14px;
}
.col-center th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-1);
}
.col-center td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-1);
  color: var(--text-2);
  vertical-align: top;
}
.col-center tr:last-child td { border-bottom: none; }
.col-center td code { white-space: nowrap; }

/* Callouts */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin: 22px 0;
  border-radius: var(--radius-2);
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-left: 3px solid var(--accent);
  font-size: 14.5px;
  color: var(--text-2);
}
.callout.warning { border-left-color: var(--method-patch); }
.callout.danger  { border-left-color: var(--method-delete); }
.callout.info    { border-left-color: var(--method-get); }
.callout strong { color: var(--text-1); }

/* Method header (endpoint sections) */
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 8px;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  font-family: var(--mono);
  font-size: 14px;
}
.endpoint-header .method-badge { min-width: 56px; }
.endpoint-header .path { color: var(--text-1); font-weight: 500; }

/* Severity chips */
.sev-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sev-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sev-chip.fatal   { color: var(--sev-fatal);   background: rgba(255, 91, 107, 0.12); }
.sev-chip.error   { color: var(--sev-error);   background: rgba(255, 138, 76, 0.12); }
.sev-chip.warning { color: var(--sev-warning); background: rgba(255, 181, 71, 0.12); }
.sev-chip.info    { color: var(--sev-info);    background: rgba(94, 160, 255, 0.12); }

/* ============================================================
   CODE BLOCKS (article body)
   ============================================================ */
.col-center pre {
  margin: 18px 0;
  padding: 0;
  background: var(--bg-code);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.col-center pre code {
  display: block;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: #d4d8e1;
  overflow-x: auto;
  font-variant-ligatures: none;
}

/* Syntax highlight tokens */
.tk-k { color: #ff7b9c; }   /* keyword */
.tk-s { color: #a3e3a3; }   /* string */
.tk-n { color: #ffb547; }   /* number */
.tk-c { color: #6b7388; font-style: italic; } /* comment */
.tk-f { color: #5ea0ff; }   /* function */
.tk-t { color: #b18aff; }   /* type */
.tk-p { color: #e8ecf2; }   /* punctuation */

/* ============================================================
   CODE TABS (right column)
   ============================================================ */
.code-tabs {
  background: var(--bg-code);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.code-tab-bar {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: var(--bg-code-header);
  border-bottom: 1px solid var(--border-1);
  position: relative;
  padding-left: 70px;
}
.code-tab-bar::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 12px;
  background-image:
    radial-gradient(circle, #ff5b6b 5px, transparent 5px),
    radial-gradient(circle, #ffb547 5px, transparent 5px),
    radial-gradient(circle, #00d4aa 5px, transparent 5px);
  background-size: 14px 12px, 14px 12px, 14px 12px;
  background-position: 0 0, 14px 0, 28px 0;
  background-repeat: no-repeat;
  opacity: 0.55;
}
.code-tab {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  transition: color 120ms ease;
}
.code-tab:hover { color: var(--text-2); }
.code-tab.active { color: var(--text-1); }
.code-tab.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.code-tab-panels { position: relative; }
.code-tab-panel {
  display: none;
  animation: fadeIn 180ms ease;
}
.code-tab-panel.active { display: block; }
.code-tab-panel pre {
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.code-tab-panel pre code {
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.6;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(232, 236, 242, 0.06);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}
.col-center pre:hover .copy-btn,
.code-tab-panel:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: var(--bg-3); color: var(--text-1); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   RIGHT COLUMN
   ============================================================ */
.col-right {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 28px 24px 60px;
  border-left: 1px solid var(--border-1);
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.015) 0%, transparent 200px);
}
.col-right::-webkit-scrollbar { width: 6px; }
.col-right::-webkit-scrollbar-track { background: transparent; }
.col-right::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.right-section { margin-bottom: 26px; }
.right-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.right-section pre code { font-size: 12px; line-height: 1.6; }

.resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-1);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.resource-link:hover {
  border-color: var(--border-3);
  color: var(--accent);
  transform: translateX(2px);
}
.resource-link .arrow { font-family: var(--mono); opacity: 0.6; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  margin-bottom: 8px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
}
.hero-badge.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(0, 212, 170, 0.3);
}
.hero .lead {
  font-size: 18px;
  line-height: 1.7;
  color: #b8c0d0;
  margin: 0 0 22px;
  max-width: 680px;
}
.hero-question {
  font-size: 16px;
  line-height: 1.75;
  color: #c9ced9;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  margin: 0 0 8px;
}
.hero-question strong { color: var(--accent); font-weight: 600; }

/* ============================================================
   CONCEPT CARDS GRID (replaces simple table)
   ============================================================ */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 12px;
}
.concept-card {
  position: relative;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  transition: border-color 160ms ease, transform 160ms ease;
}
.concept-card:hover {
  border-color: var(--border-3);
  transform: translateY(-1px);
}
.concept-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.concept-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.concept-card-prefix {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
}
.concept-card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

/* ============================================================
   ANCHOR LINKS
   ============================================================ */
.col-center h2, .col-center h3 { scroll-margin-top: calc(var(--topbar-h) + 24px); }
.anchor {
  margin-left: 8px;
  opacity: 0;
  color: var(--text-3);
  font-weight: 400;
  transition: opacity 140ms ease;
}
.col-center h2:hover .anchor, .col-center h3:hover .anchor { opacity: 1; }

/* ============================================================
   DIAGRAM
   ============================================================ */
.diagram {
  margin: 22px 0;
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre;
  overflow-x: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.docs-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border-1);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand-block .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-1);
  font-weight: 600;
}
.footer-tagline {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-3);
  max-width: 240px;
  margin: 0;
}
.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--text-2);
  font-size: 13.5px;
  border-bottom: none;
  padding: 0;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 24px;
  border-top: 1px solid var(--border-1);
  font-size: 12.5px;
  color: var(--text-3);
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   MOBILE
   ============================================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-2);
  color: var(--text-1);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 1280px) {
  :root { --right-w: 400px; }
  .col-center { padding: 56px 40px 96px; }
}

@media (max-width: 1080px) {
  .app { grid-template-columns: var(--left-w) minmax(0, 1fr); }
  .col-right { display: none; }
}

@media (max-width: 820px) {
  .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .col-left {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--topbar-h));
    background: var(--bg-0);
    transform: translateX(-100%);
    transition: transform 220ms ease;
    z-index: 90;
  }
  .col-left.open { transform: translateX(0); }
  .col-center { padding: 36px 22px 80px; }
  .col-center h1 { font-size: 32px; }
  .col-center h2 { font-size: 24px; }
  .concept-grid { grid-template-columns: 1fr; }
  .topbar-search { margin: 0 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ============================================================
   COMPATIBILITY LAYER — match existing HTML class names
   ============================================================ */

/* Top bar version pill (HTML uses .version-pill) */
.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 4px;
  border-radius: 5px;
  background: var(--accent-soft);
  border: 1px solid rgba(0, 212, 170, 0.3);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Top bar search wrap (HTML uses .search-wrap + .search-input) */
.search-wrap {
  flex: 1;
  max-width: 460px;
  margin: 0 28px;
  position: relative;
}
.search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 38px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-0);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Article container (HTML uses .layout instead of .app) */
.layout {
  display: grid;
  grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
  align-items: start;
  position: relative;
  z-index: 1;
}
@media (max-width: 1280px) { .layout { grid-template-columns: var(--left-w) minmax(0, 1fr) 400px; } }
@media (max-width: 1080px) { .layout { grid-template-columns: var(--left-w) minmax(0, 1fr); } }
@media (max-width: 820px)  { .layout { grid-template-columns: minmax(0, 1fr); } }

/* Left nav HTTP method (HTML uses .method.post not .method-badge.post) */
.nav-item .method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 1px 5px;
  margin-right: 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.nav-item .method.get    { color: var(--method-get);    background: var(--method-get-bg);    border-color: rgba(94, 160, 255, 0.25); }
.nav-item .method.post   { color: var(--method-post);   background: var(--method-post-bg);   border-color: rgba(0, 212, 170, 0.25); }
.nav-item .method.patch  { color: var(--method-patch);  background: var(--method-patch-bg);  border-color: rgba(255, 181, 71, 0.25); }
.nav-item .method.delete,
.nav-item .method.del    { color: var(--method-delete); background: var(--method-delete-bg); border-color: rgba(255, 91, 107, 0.25); }
.nav-item { font-family: var(--sans); }
.nav-item:not(.active) > .method + * { color: inherit; }

/* Endpoint head block (HTML uses .endpoint-head with .endpoint-path .endpoint-auth) */
.endpoint-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-2);
  font-family: var(--mono);
  font-size: 14px;
  flex-wrap: wrap;
}
.endpoint-head .method-badge { min-width: 56px; }
.endpoint-path {
  color: var(--text-1);
  font-weight: 500;
  font-size: 14.5px;
}
.endpoint-auth {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
}

/* Heading anchor (HTML uses .heading-anchor) */
.heading-anchor {
  margin-left: 10px;
  color: var(--text-4);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 140ms ease, color 140ms ease;
  border-bottom: none !important;
}
.col-center h2:hover .heading-anchor,
.col-center h3:hover .heading-anchor { opacity: 1; }
.heading-anchor:hover { color: var(--accent); }

/* Copy button alt class (HTML may use .copy-button) */
.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(232, 236, 242, 0.06);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
  z-index: 2;
}
pre:hover .copy-button { opacity: 1; }
.copy-button:hover { background: var(--bg-3); color: var(--text-1); }
.copy-button.copied { color: var(--accent); border-color: var(--accent); }
pre { position: relative; }
