/* ============================================================
   Ananas GDS Documentation — Main Design System
   Brand: Black #0d0d0d | Gold #c9a84c | Off-white #f5f2eb
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --black:        #0d0d0d;
  --black-soft:   #111111;
  --black-mid:    #181818;
  --black-border: #2a2a2a;
  --gold:         #c9a84c;
  --gold-light:   #e8d49a;
  --gold-dark:    #a8873a;
  --gold-faint:   rgba(201,168,76,0.08);
  --gold-faint2:  rgba(201,168,76,0.15);
  --off-white:    #f5f2eb;
  --white:        #ffffff;
  --gray-100:     #f0ede6;
  --gray-200:     #e0dbd0;
  --gray-300:     #c8c2b8;
  --gray-400:     #a09a8e;
  --gray-500:     #7a7470;
  --gray-600:     #6b6560;
  --gray-700:     #4a4540;
  --gray-800:     #2e2c29;
  --green:        #3d7a5e;
  --green-light:  rgba(61,122,94,0.15);
  --red:          #9b3a3a;
  --red-light:    rgba(155,58,58,0.12);
  --blue:         #3a6b9b;
  --blue-light:   rgba(58,107,155,0.12);
  --sidebar-w:    272px;
  --toc-w:        220px;
  --topnav-h:     56px;
  --content-max:  760px;
  --radius:       6px;
  --radius-lg:    10px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.5);
  --transition:   0.18s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--off-white);
  background: var(--black);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Navigation ─────────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--black);
  border-bottom: 1px solid var(--black-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: var(--topnav-h);
  gap: 0;
}
.topnav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topnav-logo .logo-gds { color: var(--off-white); font-weight: 300; }
.topnav-version {
  font-size: 11px;
  color: var(--gray-600);
  background: var(--black-mid);
  border: 1px solid var(--black-border);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 10px;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.topnav-search {
  flex: 1;
  max-width: 360px;
  margin: 0 24px;
  position: relative;
}
.topnav-search input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  background: var(--black-mid);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  color: var(--off-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  outline: none;
  transition: border-color var(--transition);
}
.topnav-search input::placeholder { color: var(--gray-600); }
.topnav-search input:focus { border-color: var(--gold-dark); background: var(--black-soft); }
.topnav-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  pointer-events: none;
}
.topnav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-left: auto;
  align-items: center;
}
.topnav-links a {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.topnav-links a:hover { color: var(--gold); background: var(--gold-faint); }
.topnav-cta {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--black) !important;
  background: var(--gold) !important;
  padding: 6px 14px !important;
  border-radius: var(--radius) !important;
}
.topnav-cta:hover { background: var(--gold-light) !important; color: var(--black) !important; }
.topnav-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gray-400);
  margin-left: auto;
}

/* ── Layout ─────────────────────────────────────────────────── */
.doc-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.doc-main {
  display: flex;
  flex: 1;
  min-width: 0;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--black-soft);
  border-right: 1px solid var(--black-border);
  position: sticky;
  top: var(--topnav-h);
  height: calc(100vh - var(--topnav-h));
  overflow-y: auto;
  padding: 20px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--black-border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--black-border); border-radius: 2px; }

.sidebar-section { margin-bottom: 4px; }
.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  cursor: pointer;
  user-select: none;
}
.sidebar-section-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gray-600);
  transition: color var(--transition);
}
.sidebar-section-header:hover .sidebar-section-title { color: var(--gray-400); }
.sidebar-chevron {
  color: var(--gray-700);
  font-size: 10px;
  transition: transform var(--transition);
}
.sidebar-section.collapsed .sidebar-chevron { transform: rotate(-90deg); }
.sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
}
.sidebar-section.collapsed ul { display: none; }
.sidebar-section ul li a {
  display: block;
  padding: 5px 20px 5px 28px;
  font-size: 13.5px;
  color: var(--gray-500);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  border-left: 2px solid transparent;
  line-height: 1.5;
}
.sidebar-section ul li a:hover {
  color: var(--off-white);
  background: var(--gold-faint);
  border-left-color: var(--gold-dark);
}
.sidebar-section ul li a.active {
  color: var(--gold);
  background: var(--gold-faint2);
  border-left-color: var(--gold);
  font-weight: 500;
}
.sidebar-divider {
  height: 1px;
  background: var(--black-border);
  margin: 12px 20px;
}

/* ── Content Area ───────────────────────────────────────────── */
.doc-content {
  flex: 1;
  min-width: 0;
  padding: 44px 56px;
  max-width: calc(var(--content-max) + 112px);
}
.doc-content-wide {
  flex: 1;
  min-width: 0;
  padding: 44px 56px;
}

/* ── Table of Contents (right side) ─────────────────────────── */
.doc-toc {
  width: var(--toc-w);
  flex-shrink: 0;
  padding: 48px 24px 40px 8px;
  position: sticky;
  top: var(--topnav-h);
  height: calc(100vh - var(--topnav-h));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.doc-toc:hover { scrollbar-color: var(--black-border) transparent; }
.toc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gray-700);
  margin-bottom: 10px;
  padding-left: 12px;
}
.toc-list { list-style: none; }
.toc-list li a {
  display: block;
  font-size: 12.5px;
  color: var(--gray-600);
  text-decoration: none;
  padding: 3px 12px;
  border-left: 1px solid var(--black-border);
  transition: color var(--transition), border-color var(--transition);
  line-height: 1.5;
}
.toc-list li a:hover { color: var(--gray-400); border-left-color: var(--gray-600); }
.toc-list li a.active { color: var(--gold); border-left-color: var(--gold); }
.toc-list .toc-h3 a { padding-left: 22px; font-size: 12px; color: var(--gray-700); }
.toc-list .toc-h3 a:hover { color: var(--gray-500); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray-600);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--gray-600); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--gray-700); }
.breadcrumb-current { color: var(--gray-400); }

/* ── Page Header ────────────────────────────────────────────── */
.page-header { margin-bottom: 40px; }
.page-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  line-height: 1.15;
  color: var(--off-white);
  margin-bottom: 14px;
}
.page-desc {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 580px;
  line-height: 1.65;
}
.page-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.page-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}
.badge-stable { background: var(--green-light); color: #6abf99; border: 1px solid rgba(106,191,153,0.3); }
.badge-beta { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.badge-dev { background: var(--red-light); color: #d47a7a; border: 1px solid rgba(212,122,122,0.3); }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'DM Serif Display', serif;
  color: var(--off-white);
  font-weight: 400;
}
h2 {
  font-size: 24px;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--black-border);
  scroll-margin-top: calc(var(--topnav-h) + 16px);
}
h3 {
  font-size: 18px;
  margin: 32px 0 12px;
  color: var(--off-white);
  scroll-margin-top: calc(var(--topnav-h) + 16px);
}
h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--gray-300);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
p { margin-bottom: 16px; color: var(--gray-400); }
p strong { color: var(--off-white); font-weight: 600; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
ul, ol { margin: 0 0 16px 20px; color: var(--gray-400); }
ul li, ol li { margin-bottom: 6px; line-height: 1.65; }
li strong { color: var(--off-white); font-weight: 600; }
hr {
  border: none;
  border-top: 1px solid var(--black-border);
  margin: 40px 0;
}

/* ── Inline Code ────────────────────────────────────────────── */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--black-mid);
  color: var(--gold-light);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--black-border);
}

/* ── Code Blocks ────────────────────────────────────────────── */
.code-block {
  position: relative;
  margin: 20px 0 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--black-border);
  overflow: hidden;
  background: #0a0a0a;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--black-mid);
  border-bottom: 1px solid var(--black-border);
}
.code-block-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gray-600);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.copy-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  color: var(--gray-600);
  background: none;
  border: 1px solid var(--black-border);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.copy-btn:hover { color: var(--gold); border-color: var(--gold-dark); background: var(--gold-faint); }
.copy-btn.copied { color: #6abf99; border-color: rgba(106,191,153,0.4); }
.code-block pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #d4cfc8;
}
.code-block pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ── Callout Boxes ──────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 20px 0;
  border: 1px solid;
}
.callout-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.6;
}
.callout-body { flex: 1; min-width: 0; }
.callout-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'DM Sans', sans-serif;
}
.callout-body p { font-size: 13.5px; margin: 0; line-height: 1.6; }
.callout.info {
  background: var(--blue-light);
  border-color: rgba(58,107,155,0.3);
}
.callout.info .callout-title { color: #7aabda; }
.callout.info .callout-body p { color: #9abcd4; }
.callout.warning {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.25);
}
.callout.warning .callout-title { color: var(--gold); }
.callout.warning .callout-body p { color: var(--gray-400); }
.callout.danger {
  background: var(--red-light);
  border-color: rgba(155,58,58,0.3);
}
.callout.danger .callout-title { color: #d47a7a; }
.callout.danger .callout-body p { color: #c09090; }
.callout.success {
  background: var(--green-light);
  border-color: rgba(61,122,94,0.3);
}
.callout.success .callout-title { color: #6abf99; }
.callout.success .callout-body p { color: #88b8a0; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0 24px;
  border-radius: var(--radius);
  border: 1px solid var(--black-border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  background: var(--black-mid);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--black-border);
  white-space: nowrap;
}
tbody td {
  padding: 10px 16px;
  color: var(--gray-400);
  border-bottom: 1px solid var(--black-border);
  vertical-align: top;
  line-height: 1.55;
}
tbody td strong { color: var(--off-white); }
tbody td code { font-size: 12px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gold-faint); }

/* ── Method Badges ──────────────────────────────────────────── */
.method {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.method-get    { background: var(--green-light); color: #6abf99; border: 1px solid rgba(106,191,153,0.3); }
.method-post   { background: var(--blue-light); color: #7aabda; border: 1px solid rgba(122,171,218,0.3); }
.method-put    { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.method-patch  { background: rgba(168,115,201,0.12); color: #c8a0e8; border: 1px solid rgba(200,160,232,0.3); }
.method-delete { background: var(--red-light); color: #d47a7a; border: 1px solid rgba(212,122,122,0.3); }

/* ── Endpoint Block ─────────────────────────────────────────── */
.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--black-mid);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  margin: 16px 0 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--gray-300);
  flex-wrap: wrap;
}
.endpoint-auth {
  margin-left: auto;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-600);
  background: var(--black-border);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Status Badges ──────────────────────────────────────────── */
.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.status-active { background: var(--green-light); color: #6abf99; }
.status-beta { background: rgba(201,168,76,0.12); color: var(--gold); }
.status-deprecated { background: var(--red-light); color: #d47a7a; }
.status-planned { background: var(--blue-light); color: #7aabda; }

/* ── Step List ──────────────────────────────────────────────── */
.steps { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: steps; }
.steps > li {
  counter-increment: steps;
  position: relative;
  padding: 0 0 28px 52px;
  color: var(--gray-400);
}
.steps > li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  background: var(--gold-faint2);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
}
.steps > li::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 1px;
  background: var(--black-border);
}
.steps > li:last-child::after { display: none; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li strong { color: var(--off-white); display: block; margin-bottom: 4px; }

/* ── Property Table (model docs) ────────────────────────────── */
.prop-table { margin: 16px 0 28px; }
.prop-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--black-border);
  align-items: start;
}
.prop-row:last-child { border-bottom: none; }
.prop-name { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--gold-light); }
.prop-type { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--gray-600); }
.prop-desc { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

/* ── Cards Grid ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.card {
  background: var(--black-soft);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card:hover {
  border-color: var(--gold-dark);
  background: var(--gold-faint);
  transform: translateY(-1px);
}
.card-icon { font-size: 22px; }
.card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  color: var(--off-white);
}
.card-desc { font-size: 13px; color: var(--gray-500); line-height: 1.5; }
.card-arrow { color: var(--gold-dark); font-size: 14px; margin-top: auto; }

/* ── Feature Grid ───────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.feature-item {
  padding: 20px;
  background: var(--black-mid);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
}
.feature-item h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--off-white);
  margin: 0 0 8px;
  text-transform: none;
  letter-spacing: normal;
}
.feature-item p { font-size: 13px; margin: 0; }

/* ── Prev / Next Navigation ─────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--black-border);
}
.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--black-soft);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  text-decoration: none;
  max-width: 48%;
  transition: border-color var(--transition), background var(--transition);
}
.page-nav a:hover { border-color: var(--gold-dark); background: var(--gold-faint); }
.page-nav-label {
  font-size: 11px;
  color: var(--gray-600);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page-nav-title { font-size: 14px; color: var(--off-white); font-weight: 500; }
.page-nav .prev .page-nav-label::before { content: '← '; }
.page-nav .next { margin-left: auto; text-align: right; }
.page-nav .next .page-nav-label::after { content: ' →'; }

/* ── Search Results Dropdown ────────────────────────────────── */
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--black-soft);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 300;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.search-results.visible { display: block; }
.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--black-border);
  transition: background var(--transition);
  text-decoration: none;
  display: block;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--gold-faint); }
.search-result-title { font-size: 13.5px; color: var(--off-white); margin-bottom: 2px; }
.search-result-section { font-size: 11.5px; color: var(--gray-600); }
.search-result-excerpt { font-size: 12px; color: var(--gray-600); margin-top: 2px; }
.search-no-results { padding: 16px 14px; color: var(--gray-600); font-size: 13px; text-align: center; }

/* ── Hero (index page) ──────────────────────────────────────── */
.hero {
  background: var(--black);
  padding: 72px 56px 64px;
  border-bottom: 1px solid var(--black-border);
}
.hero-inner { max-width: 700px; }
.hero-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}
.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: 46px;
  line-height: 1.1;
  color: var(--off-white);
  margin-bottom: 18px;
}
.hero-title em { color: var(--gold); font-style: normal; }
.hero-desc {
  font-size: 17px;
  color: var(--gray-500);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 32px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary {
  background: var(--gold);
  color: var(--black);
}
.btn-primary:hover { background: var(--gold-light); color: var(--black); }
.btn-secondary {
  background: var(--black-mid);
  color: var(--off-white);
  border: 1px solid var(--black-border);
}
.btn-secondary:hover { border-color: var(--gold-dark); background: var(--gold-faint); color: var(--gold); }

/* ── Section Patterns ───────────────────────────────────────── */
.section { padding: 56px 56px 64px; }
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 24px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--off-white);
  margin-bottom: 8px;
}
.section-desc {
  font-size: 15px;
  color: var(--gray-500);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ── Two-column content ─────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.two-col-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin: 20px 0; }

/* ── Dark Mode Toggle ───────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--black-border);
  color: var(--gray-600);
  padding: 6px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
  display: flex;
  align-items: center;
}
.theme-toggle:hover { border-color: var(--gold-dark); color: var(--gold); background: var(--gold-faint); }

/* ── Footer ─────────────────────────────────────────────────── */
.doc-footer {
  border-top: 1px solid var(--black-border);
  padding: 24px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: var(--gold);
}
.footer-brand span { color: var(--gray-600); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--gray-600); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; color: var(--gray-700); }

/* ── Diagram/ASCII art ──────────────────────────────────────── */
.diagram {
  background: #080808;
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--gray-400);
  overflow-x: auto;
  margin: 20px 0 24px;
  white-space: pre;
}

/* ── Inline tag chips ───────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  vertical-align: middle;
}
.tag-auth { background: rgba(58,107,155,0.15); color: #7aabda; }
.tag-public { background: var(--green-light); color: #6abf99; }
.tag-admin { background: var(--red-light); color: #d47a7a; }
.tag-new { background: rgba(201,168,76,0.12); color: var(--gold); }

/* ── Mobile nav overlay ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 150;
}
.sidebar-overlay.visible { display: block; }

/* ── Highlight (for search) ─────────────────────────────────── */
mark { background: rgba(201,168,76,0.2); color: var(--gold-light); border-radius: 2px; padding: 0 2px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .doc-toc { display: none; }
  .doc-content { max-width: 100%; }
}
@media (max-width: 860px) {
  .topnav-search { display: none; }
  .topnav-links { display: none; }
  .topnav-menu-btn { display: flex; }
  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--topnav-h);
    height: calc(100vh - var(--topnav-h));
    z-index: 160;
    transition: left var(--transition);
    border-right: 1px solid var(--black-border);
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { left: 0; }
  .doc-content { padding: 28px 24px; }
  .hero { padding: 40px 24px 48px; }
  .hero-title { font-size: 32px; }
  .section { padding: 36px 24px; }
  .doc-footer { padding: 20px 24px; }
  .two-col, .two-col-3 { grid-template-columns: 1fr; }
  .page-nav { flex-direction: column; }
  .page-nav a { max-width: 100%; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .prop-row { grid-template-columns: 1fr 1fr; }
  .prop-desc { grid-column: 1 / -1; }
}
