/* ============================================================
   HOMS WhatsApp Order Manager — Documentation Styles
   Design: Editorial SaaS docs — clean, precise, readable
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  /* Brand */
  --primary: #005a4d;
  --primary-dark: #003d34;
  --primary-light: #e6f4f2;
  --primary-mid: #c2e4df;
  --accent: #00c896;
  --accent-dim: #b3efe3;

  /* Semantic */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --info: #0369a1;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --error-border: #fecaca;

  /* Neutrals */
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-2: #44403c;
  --text-3: #78716c;
  --text-4: #a8a29e;

  /* Feature icon colours */
  --icon-green: #dcfce7;
  --icon-green-fg: #166534;
  --icon-blue: #dbeafe;
  --icon-blue-fg: #1e40af;
  --icon-amber: #fef3c7;
  --icon-amber-fg: #92400e;
  --icon-purple: #ede9fe;
  --icon-purple-fg: #5b21b6;

  /* Layout */
  --header-h: 58px;
  --sidebar-w: 268px;
  --content-max: 780px;

  /* Typography */
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --t: 150ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.3;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
}
code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  color: var(--primary);
}

/* ── HEADER ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.header-inner {
  /* max-width: 1400px; */
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: transparent;
  color: #fff;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px transparent;
}

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

.brand-accent {
  color: var(--primary);
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2em 0.55em;
  border-radius: 20px;
  border: 1px solid var(--primary-mid);
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.version-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.25em 0.65em;
  border-radius: 20px;
}

.header-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t);
}

.header-link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
}
.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all var(--t);
}
.mobile-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── LAYOUT ────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* ── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-inner {
  padding: 1.25rem 0 0rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Search */
.sidebar-search {
  position: relative;
  margin: 0 1rem 1.25rem;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  pointer-events: none;
}

#doc-search {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition:
    border-color var(--t),
    background var(--t),
    box-shadow var(--t);
}

#doc-search::placeholder {
  color: var(--text-4);
}
#doc-search:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 90, 77, 0.1);
}

/* Nav */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 0.85rem 1.1rem 0.3rem;
  user-select: none;
}

.nav-item {
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.1rem;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-right: 2px solid transparent;
  transition:
    color var(--t),
    background var(--t),
    border-color var(--t);
  border-radius: 0;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 700;
  border-right-color: var(--primary);
  background: var(--primary-light);
}

.nav-link svg {
  color: inherit;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-link.active svg {
  opacity: 1;
}

/* Hidden during search */
.nav-item.search-hidden {
  display: none;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-support-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--t);
}
.sidebar-support-link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 49;
  backdrop-filter: blur(2px);
}

/* ── MAIN CONTENT ──────────────────────────────────────── */
.content {
  flex: 1;
  min-width: 0;
  padding: 0 2.5rem;
  max-width: calc(var(--content-max) + 5rem);
}

/* ── DOC SECTIONS ──────────────────────────────────────── */
.doc-section {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.doc-section:last-of-type {
  border-bottom: none;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
  padding: 0.25em 0.7em;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.section-lead {
  font-size: 16.5px;
  color: var(--text-2);
  margin: 0 0 2rem;
  line-height: 1.65;
  max-width: 620px;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

/* ── HERO CARD ─────────────────────────────────────────── */
.hero-card {
  display: flex;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, #f0fdf9 100%);
  border: 1px solid var(--primary-mid);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.hero-card-icon {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  background: var(--primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 90, 77, 0.3);
}

.hero-card-body h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 0.5rem;
}

.hero-card-body p {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
}

/* ── FEATURE GRID ──────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  transition:
    box-shadow var(--t),
    transform var(--t);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.feature-icon--green {
  background: var(--icon-green);
  color: var(--icon-green-fg);
}
.feature-icon--blue {
  background: var(--icon-blue);
  color: var(--icon-blue-fg);
}
.feature-icon--amber {
  background: var(--icon-amber);
  color: var(--icon-amber-fg);
}
.feature-icon--purple {
  background: var(--icon-purple);
  color: var(--icon-purple-fg);
}

.feature-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

/* ── CALLOUTS ──────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  font-size: 13.5px;
  border: 1px solid;
  margin: 1.25rem 0;
  line-height: 1.6;
}

.callout--info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}
.callout--warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: #78350f;
}
.callout--success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.callout--error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error);
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.callout a {
  color: inherit;
  font-weight: 600;
}

/* ── REQUIREMENTS TABLE ────────────────────────────────── */
.requirements-table {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  font-size: 13.5px;
}

.req-row {
  display: grid;
  grid-template-columns: 140px 160px 1fr;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.req-row:last-child {
  border-bottom: none;
}
.req-row:nth-child(even):not(.req-row--header) {
  background: var(--surface-2);
}

.req-row--header {
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── STEPS ─────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 1.75rem;
}

.step:last-child {
  padding-bottom: 0;
}

/* Connector line between steps */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 38px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-mid), transparent);
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-body {
  padding-top: 0.35rem;
  flex: 1;
}

.step-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.step-body p {
  margin: 0 0 0.75rem;
  font-size: 14px;
  color: var(--text-2);
}
.step-body p:last-child {
  margin-bottom: 0;
}

/* ── PROVIDER COMPARE ──────────────────────────────────── */
.provider-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.provider-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem;
  background: var(--surface);
}

.provider-logo {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.3em 0.9em;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.provider-logo--twilio {
  background: #f22f46;
  color: #fff;
}
.provider-logo--meta {
  background: #1877f2;
  color: #fff;
}

/* ── LISTS ─────────────────────────────────────────────── */
.doc-list {
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding: 0;
  color: var(--text-2);
  font-size: 14px;
}

.doc-list li {
  margin-bottom: 0.3rem;
}
.doc-list li:last-child {
  margin-bottom: 0;
}

.doc-list--numbered {
  list-style: decimal;
}

/* ── CODE BLOCKS ───────────────────────────────────────── */
.code-block {
  position: relative;
  background: #1a1a2e;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.6rem;
  right: 2.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.code-block pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e2e8f0;
  background: none;
  border: none;
  padding: 0;
  line-height: 1.7;
}

.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  border-radius: var(--r-sm);
  padding: 0.35rem 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all var(--t);
}

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

.copy-btn.copied {
  background: rgba(0, 200, 150, 0.2);
  border-color: rgba(0, 200, 150, 0.4);
  color: var(--accent);
}

/* ── COLLAPSIBLE ───────────────────────────────────────── */
.collapsible {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 1rem;
  overflow: hidden;
}

.collapsible-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  transition: background var(--t);
  user-select: none;
}

.collapsible-trigger:hover {
  background: var(--surface-2);
}

.collapsible-icon {
  color: var(--primary);
  flex-shrink: 0;
  display: flex;
}

.collapsible-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-4);
  transition: transform var(--t);
}

.collapsible-trigger[aria-expanded="true"] .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.collapsible-body p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 0.75rem;
}

/* ── SETTINGS GROUPS ───────────────────────────────────── */
.settings-group {
  margin-bottom: 1.25rem;
}

.settings-group h4 {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

/* ── TEMPLATE TABLE ────────────────────────────────────── */
.template-table {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 13.5px;
  margin: 0.75rem 0;
}

.template-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.template-row:last-child {
  border-bottom: none;
}
.template-row:nth-child(even):not(.template-row--header) {
  background: var(--surface-2);
}

.template-row--header {
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── PLACEHOLDER GRID ──────────────────────────────────── */
.placeholder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.placeholder-grid code {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-mid);
  font-size: 0.8em;
}

/* ── JOURNEY STEPS ─────────────────────────────────────── */
.journey-steps {
  position: relative;
  padding-left: 2.25rem;
}

.journey-step {
  position: relative;
  margin-bottom: 2rem;
}

.journey-step-marker {
  position: absolute;
  left: -2.25rem;
  top: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.journey-step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-light);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.journey-step-line {
  width: 2px;
  flex: 1;
  min-height: 2rem;
  background: linear-gradient(to bottom, var(--primary-mid), var(--border));
  margin-top: 4px;
}

.journey-step-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.journey-step-content p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 0.5rem;
}

/* ── SETTINGS REFERENCE ────────────────────────────────── */
.option-table {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.option-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  font-size: 13.5px;
}

.option-row:last-child {
  border-bottom: none;
}
.option-row:nth-child(even) {
  background: var(--surface-2);
}

.option-key code {
  display: block;
  font-size: 0.78em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-desc strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.option-desc {
  color: var(--text-2);
  font-size: 13px;
}

/* ── FAQ ───────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background var(--t);
}

.faq-trigger:hover {
  background: var(--surface-2);
}
.faq-trigger[aria-expanded="true"] {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-4);
  transition: transform var(--t);
}

.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 13.5px;
  color: var(--text-2);
}

.faq-answer p {
  margin: 0 0 0.75rem;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ── HOOK LIST ─────────────────────────────────────────── */
.hook-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hook-item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  background: var(--surface);
}

.hook-signature {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hook-signature code {
  font-size: 0.85em;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-mid);
}

.hook-params {
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: var(--text-3);
}

.hook-item > p {
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0 0 0.75rem;
}
.hook-item > p:last-child {
  margin-bottom: 0;
}
.hook-item .code-block {
  margin: 0.75rem 0 0;
}

/* ── CONTENT FOOTER ────────────────────────────────────── */
.content-footer {
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.content-footer-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 13px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.content-footer-inner a {
  color: var(--text-3);
}
.content-footer-inner a:hover {
  color: var(--primary);
}
.footer-sep {
  color: var(--border-strong);
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content {
    padding: 0 1.75rem;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 280px;
  }

  .mobile-menu-toggle {
    display: flex;
  }
  .header-link {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    height: calc(100vh - var(--header-h));
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
  }

  .step-body {
    width: 80% !important;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay.is-active {
    display: block;
  }

  .content {
    padding: 0 1.25rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

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

  .provider-compare {
    grid-template-columns: 1fr;
  }

  .requirements-table {
    display: none;
  }

  .req-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .option-row {
    grid-template-columns: 1fr;
  }
  .option-key {
    order: 2;
  }
  .option-desc {
    order: 1;
  }

  .template-row {
    grid-template-columns: 1fr;
  }
  .template-row--header {
    display: none;
  }

  .hero-card {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 0 1rem;
  }
  .doc-section {
    padding: 2.5rem 0 1.5rem;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .version-tag {
    display: none;
  }
}

/* ── SCROLL PROGRESS BAR ───────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  z-index: 101;
  transition: width 0.1s linear;
  width: 0%;
}

/* ── SMOOTH PAGE ENTRY ANIMATION ───────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-section {
  animation: fadeUp 0.4s ease both;
}
.doc-section:nth-child(1) {
  animation-delay: 0.05s;
}
.doc-section:nth-child(2) {
  animation-delay: 0.1s;
}
.doc-section:nth-child(3) {
  animation-delay: 0.15s;
}
