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

:root {
  --brand: #553924;
  --brand-hover: #372314;
  --brand-light: #734f33;
  --brand-subtle: #F7F3EF;
  --brand-border: #D8CCC3;
  --brand-accent: #783E0F;
  
  --bg-main: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F6F2ED;
  --bg-dark: #1F1712;
  --bg-code: #18120E;
  
  --text-main: #241A14;
  --text-muted: #4E4038;
  --text-light: #5A4D45;
  --text-inverse: #FAF8F5;
  
  --border: #D8CCC3;
  --border-light: #E8DFD8;
  
  --font-heading: 'Outfit', 'Prompt', sans-serif;
  --font-body: 'Prompt', 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(85, 57, 36, 0.04);
  --shadow-md: 0 10px 30px rgba(85, 57, 36, 0.07);
  --shadow-lg: 0 20px 50px rgba(85, 57, 36, 0.11);
  --shadow-card: 0 1px 3px rgba(85, 57, 36, 0.05), 0 10px 24px -6px rgba(85, 57, 36, 0.04);
  
  --container-max: 1200px;
  --header-height: 70px;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--brand);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 99999;
  transition: top 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
}

/* Screen Reader Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* HTML & Body: NEVER use overflow-x: hidden here as it breaks position: sticky! */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* =========================================
   STICKY HEADER (WORKS 100% RELIABLY)
========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  width: 100%;
  box-shadow: 0 1px 4px rgba(85, 57, 36, 0.04);
}

body {
  padding-top: var(--header-height);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

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

.brand-logo img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(85, 57, 36, 0.15);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* =========================================
   BUTTONS
========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  white-space: nowrap;
  min-height: 40px;
  touch-action: manipulation;
}

.btn-primary {
  background-color: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(85, 57, 36, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--brand);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--brand-subtle);
  border-color: var(--brand-border);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  min-height: 34px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.98rem;
}

/* =========================================
   HERO SECTION (LANDING)
========================================= */
.hero-section {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(circle, rgba(184, 115, 51, 0.12) 0%, rgba(85, 57, 36, 0.05) 50%, transparent 80%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--brand-subtle);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 20px;
  max-width: 95%;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--brand);
  max-width: 860px;
  margin: 0 auto 16px;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.hero-title span {
  color: var(--brand-accent);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  max-width: 780px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================
   SECTIONS
========================================= */
.section {
  padding: 60px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.25;
  margin-bottom: 10px;
  word-break: break-word;
}

.section-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
}

/* =========================================
   MODES & ONBOARDING CARDS
========================================= */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-border);
}

.mode-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: var(--brand-subtle);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  border: 1px solid var(--brand-border);
  flex-shrink: 0;
}

.mode-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
}

.mode-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}

.mode-list {
  list-style: none;
  margin-top: auto;
  border-top: 1px dashed var(--border-light);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mode-list-item {
  font-size: 0.82rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-list-item code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--brand-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--brand);
  font-weight: 600;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--brand);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================
   QUICK REFERENCE TABLE (LANDING)
========================================= */
.quick-ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  width: 100%;
  box-sizing: border-box;
}

.quick-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}

.quick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.quick-table th {
  background: var(--bg-card-alt);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.quick-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.quick-link-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* =========================================
   DEDICATED DOCS PORTAL (docs.html)
========================================= */
.docs-wrapper {
  padding: 24px 20px 60px;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  box-sizing: border-box;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr); /* minmax(0, 1fr) is critical to prevent blowout */
  gap: 28px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* Mobile Quick Jump Bar */
.mobile-doc-nav {
  display: none;
}

.mobile-endpoint-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  outline: none;
}

/* Sticky Sidebar */
.docs-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-card);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-search-wrap {
  position: relative;
  margin-bottom: 14px;
  width: 100%;
}

.doc-search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-main);
  font-size: 0.8rem;
  outline: none;
  box-sizing: border-box;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
}

.docs-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.sidebar-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-accent);
  padding: 0 6px;
  margin-bottom: 4px;
  display: block;
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-link:hover {
  background: var(--brand-subtle);
  color: var(--brand);
}

.sidebar-link.active {
  background: var(--brand);
  color: #FFFFFF;
  font-weight: 600;
}

.sidebar-link.active .badge-mini {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.badge-mini {
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 3px;
}

/* Main Content Area */
.docs-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.docs-hero-callout {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F4F0 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.callout-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  display: block;
  margin-bottom: 4px;
}

.callout-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
  word-break: break-word;
}

.callout-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.base-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-code);
  color: #F0E8E1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid #382B23;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.base-url-box code {
  word-break: break-all;
  font-size: 0.8rem;
}

.btn-copy-inline {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.docs-section-group {
  margin-bottom: 40px;
  width: 100%;
  box-sizing: border-box;
}

.docs-group-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.group-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.group-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.25;
  word-break: break-word;
}

.group-subheading {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* API CARD LAYOUT (FLUID & BOUNDED) */
.api-cards-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.api-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 90px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.api-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #FCFAF8;
  width: 100%;
  box-sizing: border-box;
}

.api-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.method-post {
  background-color: #553924;
  color: #FFFFFF;
}

.method-patch {
  background-color: #7D4111;
  color: #FFFFFF;
}

.api-endpoint {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

.api-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--brand-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  word-break: break-word;
}

.api-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  background-color: var(--brand-subtle);
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}

.api-card-body {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.api-details-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.api-desc {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.55;
  word-break: break-word;
}

.param-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.param-table th {
  background: var(--bg-card-alt);
  padding: 7px 10px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.param-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: top;
}

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

.param-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--brand);
  word-break: break-word;
}

.param-req {
  font-size: 0.68rem;
  color: #B91C1C;
  font-weight: 700;
  margin-left: 3px;
}

.param-opt {
  font-size: 0.68rem;
  color: var(--text-light);
  margin-left: 3px;
}

/* Code Column */
.api-code-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.code-block-wrap {
  background: var(--bg-code);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid #332720;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.code-header {
  background: #231B16;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #332720;
}

.code-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #D3C3B9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-copy {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #D3C3B9;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  min-height: 24px;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.code-content {
  padding: 10px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.5;
  color: #F0E8E1;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

pre {
  margin: 0;
  white-space: pre;
}

/* =========================================
   SUPPORT & CONTACT SECTION
========================================= */
.support-card {
  background: linear-gradient(135deg, #553924 0%, #372314 100%);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  box-sizing: border-box;
}

.support-info h3 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 6px;
  word-break: break-word;
}

.support-info p {
  color: #E2D5CC;
  max-width: 600px;
  font-size: 0.92rem;
}

.support-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-light {
  background-color: #FFFFFF;
  color: var(--brand);
}

.btn-light:hover {
  background-color: var(--brand-subtle);
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
  background: #1F1712;
  color: #BDB0A6;
  padding: 32px 0;
  font-size: 0.84rem;
  border-top: 1px solid #332720;
  width: 100%;
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
}

.footer-link:hover {
  color: #FFFFFF;
}

/* =========================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
========================================= */
@media (max-width: 992px) {
  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    display: none;
  }

  .mobile-doc-nav {
    display: block;
    position: -webkit-sticky;
    position: sticky;
    top: var(--header-height);
    z-index: 9900;
    background: rgba(250, 248, 245, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    width: 100%;
  }

  .docs-wrapper {
    padding: 16px 12px 60px;
  }

  .api-card-body {
    display: block;
    padding: 14px 12px;
  }

  .api-details-col {
    margin-bottom: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 54px;
  }

  .site-header {
    height: 54px;
  }

  .site-header .container {
    padding: 0 10px;
  }

  .container {
    padding: 0 10px;
  }

  .nav-links {
    display: none;
  }

  .nav-wrap {
    gap: 6px;
  }

  .brand-logo {
    gap: 6px;
  }

  .brand-logo img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .brand-title {
    font-size: 0.9rem;
  }

  .brand-badge {
    display: none;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions .btn {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .header-actions .btn svg {
    display: none;
  }

  .hero-section {
    padding: 36px 0 28px;
  }

  .hero-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .hero-desc {
    font-size: 0.92rem;
    margin-bottom: 20px;
  }

  .hero-stats {
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding-top: 16px;
  }

  .stat-item {
    background: var(--bg-card);
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .docs-hero-callout {
    padding: 16px 12px;
    gap: 12px;
  }

  .callout-title {
    font-size: 1.2rem;
  }

  .base-url-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
  }

  .base-url-box code {
    font-size: 0.74rem;
  }

  .btn-copy-inline {
    width: 100%;
    text-align: center;
    padding: 5px 8px;
  }

  .callout-actions {
    width: 100%;
  }

  .callout-actions .btn {
    width: 100%;
    font-size: 0.74rem;
    justify-content: center;
  }

  .docs-group-header {
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 14px;
  }

  .group-num-badge {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .group-heading {
    font-size: 1.15rem;
  }

  .api-card {
    border-radius: var(--radius-sm);
  }

  .api-card-header {
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .api-endpoint {
    font-size: 0.82rem;
  }

  .api-card-name {
    font-size: 0.75rem;
  }

  .api-card-body {
    padding: 12px 10px;
  }

  .param-table th, .param-table td {
    padding: 5px 6px;
    font-size: 0.74rem;
  }

  .code-content {
    padding: 8px;
    font-size: 0.7rem;
  }

  .quick-ref-card {
    padding: 16px 10px;
  }

  .support-card {
    padding: 22px 14px;
    flex-direction: column;
    text-align: center;
  }

  .support-actions {
    justify-content: center;
    width: 100%;
  }

  .support-actions .btn {
    width: 100%;
  }

  .footer-wrap {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .modes-grid, .onboarding-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mode-card, .step-card {
    padding: 16px 12px;
  }
}

/* =========================================
   RESPONSIVE QUICK REFERENCE (TABLE VS CARDS)
========================================= */
.quick-table-desktop {
  display: block;
  width: 100%;
}

.quick-cards-mobile {
  display: none;
  width: 100%;
}

.quick-summary-item {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  transition: all 0.2s ease;
}

.quick-summary-item:hover {
  border-color: var(--brand-border);
  background: #FFFFFF;
}

.quick-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-item-path {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand);
  font-size: 0.88rem;
  word-break: break-all;
}

.quick-item-auth {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.quick-item-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
}

.quick-item-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.quick-item-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 36px;
}

@media (max-width: 768px) {
  .quick-table-desktop {
    display: none;
  }

  .quick-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .site-header {
    height: 50px;
  }
  body {
    padding-top: 50px;
  }
  .site-header .container {
    padding: 0 10px;
  }
  .brand-logo {
    gap: 6px;
  }
  .brand-logo img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  .brand-title {
    font-size: 0.86rem;
  }
  .header-actions .btn {
    padding: 4px 8px;
    font-size: 0.72rem;
    min-height: 30px;
  }
}
