/* ============================================================
   ArtificialQA — Public Documentation
   Brand: gradient #FD5236 → #B12785 · Montserrat · Dark mode
   ============================================================ */

:root {
  --bg: #09090b;
  --bg-soft: radial-gradient(ellipse at top right, rgba(177,39,133,0.06), transparent 60%),
             radial-gradient(ellipse at bottom left, rgba(253,82,54,0.04), transparent 60%),
             #09090b;
  --card: #18181b;
  --card-hover: #1f1f23;
  --card-light: #27272a;
  --border: rgba(63,63,70,0.4);
  --border-strong: rgba(63,63,70,0.8);
  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #b8b8c1;
  --coral: #FD5236;
  --magenta: #B12785;
  --emerald: #10B981;
  --amber: #F59E0B;
  --red: #EF4444;
  --blue: #3B82F6;
  --violet: #8B5CF6;
  --gradient: linear-gradient(135deg, #FD5236 0%, #B12785 100%);
  --sidebar-w: 260px;
  --toc-w: 240px;
  --header-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: var(--bg-soft);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

/* Prevent any wide content (long URLs, tables, pre blocks) from forcing
   horizontal page scroll. Each element handles overflow within its own box. */
.content { min-width: 0; }
.content img,
.content video,
.content iframe { max-width: 100%; height: auto; }
.content pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.content table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.content p,
.content li,
.content h1,
.content h2,
.content h3,
.content h4 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.content code {
  word-break: break-word;
}
/* Headings keep Montserrat for brand */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Header (fixed) ──────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  display: flex; align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

.header .logo {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: var(--text-primary);
}
.header .logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.header .docs-label {
  background: rgba(255,255,255,0.06);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.header .spacer { flex: 1; }

.search-trigger {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 0.5rem;
  cursor: pointer;
  min-width: 240px;
  transition: border-color 0.15s;
  font-family: inherit;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.search-trigger .kbd {
  margin-left: auto;
  background: var(--card-light);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'SF Mono', monospace;
}

.lang-toggle {
  display: flex; gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-toggle a {
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.lang-toggle a:hover { color: var(--text-primary); }
.lang-toggle a.active {
  background: var(--gradient);
  color: white;
}

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

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(to bottom, #0d0b0f, #1a0e16);
  border-right: 1px solid var(--border);
  position: fixed;
  left: 0; top: var(--header-h); bottom: 0;
  overflow-y: auto;
  padding: 1.5rem 1rem 4rem;
}
.sidebar h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 1.4rem 0 0.5rem 0.5rem;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.sidebar nav a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.sidebar nav a.active {
  background: rgba(253,82,54,0.08);
  color: var(--text-primary);
  border-left-color: var(--coral);
  font-weight: 500;
}
.sidebar nav span.coming-soon {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-left: 2px solid transparent;
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}
.sidebar nav span.coming-soon::after {
  content: 'soon';
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--card-light);
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  font-weight: 600;
  vertical-align: middle;
}

/* ─── Onboarding progress (sidebar) ───────────────────────── */
.sidebar { counter-reset: step; }
.sidebar nav.onboarding a {
  position: relative;
  padding-left: 2.4rem;
}
.sidebar nav.onboarding a::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.sidebar nav.onboarding a:hover::before { color: var(--text-secondary); }
.sidebar nav.onboarding a.active::before { color: var(--coral); }

.onboarding-progress {
  display: none;
  background: rgba(253, 82, 54, 0.06);
  border: 1px solid rgba(253, 82, 54, 0.18);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin: 0 0.5rem 1.3rem;
}
.onboarding-progress.visible { display: block; }
.onboarding-progress .op-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.onboarding-progress .op-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.onboarding-progress .op-fill {
  height: 100%;
  background: var(--gradient);
  width: 0%;
  border-radius: 2px;
  transition: width 0.35s ease;
}
.onboarding-progress .op-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Main content ────────────────────────────────────────── */
.content {
  margin-left: var(--sidebar-w);
  margin-right: var(--toc-w, 240px);
  flex: 1;
  padding: 3rem 4rem 6rem;
  max-width: 1100px;
  position: relative;
}
@media (max-width: 1400px) {
  .content { margin-right: 0; padding: 3rem 3.5rem 6rem; }
}
@media (max-width: 1024px) {
  .content { margin-left: 0; padding: 5rem 1.5rem 4rem; max-width: 100%; }
}

/* ─── Hamburger / mobile sidebar toggle ───────────────────── */
.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 38px; height: 38px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 0.5rem;
}
.hamburger:hover { background: var(--card); border-color: var(--coral); }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 50;
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.open { display: block; }
@media (max-width: 1024px) {
  .hamburger { display: inline-flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 60;
    box-shadow: 8px 0 32px rgba(0,0,0,0.3);
  }
  .sidebar.open { transform: translateX(0); }
}
.content .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.content .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.content .breadcrumb a:hover { color: var(--text-secondary); }

/* Headings */
.content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.content h1 .grad,
.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.content .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}
.content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
  letter-spacing: -0.015em;
  position: relative;
}
.content h2::before {
  content: '';
  position: absolute;
  left: -1.2rem; top: 0.5rem;
  width: 4px; height: 1.4rem;
  background: var(--gradient);
  border-radius: 2px;
}
.content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.7rem;
  color: var(--text-primary);
}
.content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.content p {
  margin: 0.8rem 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}
.content p strong { color: var(--text-primary); font-weight: 600; }
.content p code,
.content li code {
  background: var(--card-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  color: var(--coral);
}

.content ul, .content ol {
  margin: 0.8rem 0 1rem 1.4rem;
  color: var(--text-secondary);
}
.content li {
  margin: 0.4rem 0;
  line-height: 1.65;
}
.content ul li::marker { color: var(--coral); }

.content a {
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px dotted var(--coral);
}
.content a:hover { color: var(--magenta); border-bottom-style: solid; }

/* Hero */
.hero {
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s;
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--border);
}
.card:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
  background: var(--card-hover);
}
.card .icon {
  font-size: 1.8rem;
  margin-bottom: 0.7rem;
}
.card .title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.card .desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.card.coming-soon-card {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
.card.coming-soon-card::after {
  content: 'COMING SOON';
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  background: var(--card-light);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

/* Tables */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.content th {
  background: var(--card);
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.content td {
  padding: 0.7rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(63,63,70,0.3);
}
.content td:first-child { font-weight: 500; color: var(--text-primary); }
.content tr:last-child td { border-bottom: none; }

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem 1.5rem;
  display: flex; flex-direction: column;
  position: relative;
}
.pricing-card.featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--gradient) border-box;
}
.pricing-card .pop-badge {
  position: absolute; top: -12px; right: 18px;
  background: var(--gradient);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.pricing-card .name {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.pricing-card .price {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.4rem 0 0.2rem;
}
.pricing-card .price-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.2rem;
}
.pricing-card ul {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  flex: 1;
}
.pricing-card li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.pricing-card li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--emerald);
  font-weight: 700;
}
.pricing-card li.disabled {
  color: var(--text-muted);
  opacity: 0.6;
}
.pricing-card li.disabled::before {
  content: '—';
  color: var(--text-muted);
}
.pricing-card .specs {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.pricing-card .specs li {
  display: flex; justify-content: space-between;
  padding: 0.3rem 0;
}
.pricing-card .specs li::before { display: none; }
.pricing-card .specs li .k { color: var(--text-muted); font-size: 0.85rem; }
.pricing-card .specs li .v { color: var(--text-primary); font-weight: 600; font-size: 0.9rem; }

/* Notes / callouts */
.note {
  background: linear-gradient(135deg, rgba(253,82,54,0.08), rgba(177,39,133,0.05));
  border-left: 3px solid var(--coral);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.note.tip { border-left-color: var(--emerald); background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02)); }
.note.warning { border-left-color: var(--amber); background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.02)); }
.note strong { color: var(--text-primary); }

/* Workflow visual */
.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 2rem 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.workflow .step {
  padding: 1.5rem 1.2rem;
  text-align: center;
  border-right: 1px solid var(--border);
  position: relative;
}
.workflow .step:last-child { border-right: none; }
.workflow .step::after {
  content: '→';
  position: absolute;
  right: -10px; top: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--coral);
  font-weight: 700;
  z-index: 2;
}
.workflow .step:last-child::after { display: none; }
.workflow .step .step-num {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.workflow .step .step-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.workflow .step .step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.workflow .step .step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Images */
.content figure {
  margin: 1.5rem 0;
}
.content img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.content figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* Page feedback widget (above footer) */
.page-feedback {
  margin-top: 4rem;
  padding: 1.5rem 1.7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-feedback .pf-q { font-weight: 600; color: var(--text-primary); }
.page-feedback .pf-buttons { display: flex; gap: 0.5rem; }
.page-feedback button {
  background: var(--card-light);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.page-feedback button:hover { border-color: var(--coral); transform: translateY(-1px); }
.page-feedback button.active-yes { background: rgba(16, 185, 129, 0.15); border-color: var(--emerald); }
.page-feedback button.active-no { background: rgba(239, 68, 68, 0.15); border-color: var(--red); }
.page-feedback .pf-thanks {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Anchor copy on H2/H3 */
.content h2, .content h3 { position: relative; }
.content h2 .anchor-link, .content h3 .anchor-link {
  opacity: 0;
  margin-left: 0.5rem;
  font-size: 0.85em;
  color: var(--text-muted);
  text-decoration: none;
  transition: opacity 0.15s;
  cursor: pointer;
}
.content h2:hover .anchor-link, .content h3:hover .anchor-link { opacity: 1; }
.content h2 .anchor-link:hover, .content h3 .anchor-link:hover { color: var(--coral); }

/* Table responsive on mobile */
@media (max-width: 768px) {
  .evaluator-table { display: block; overflow-x: auto; font-size: 0.85rem; }
  .evaluator-table th, .evaluator-table td { padding: 0.5rem 0.6rem; }
  .cards { grid-template-columns: 1fr !important; }
  .pricing-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .workflow { flex-direction: column !important; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
}

/* Footer */
/* ─── Next page button (auto-generated by JS) ─────────────── */
.next-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.6rem;
  margin: 3.5rem 0 0;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}
.next-page:hover {
  border-color: var(--coral);
  background: var(--card-hover);
  transform: translateY(-1px);
}
.next-page .next-meta {
  flex: 1;
  min-width: 0;
}
.next-page .next-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.next-page .next-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}
.next-page .next-arrow {
  font-size: 1.4rem;
  color: var(--coral);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.next-page:hover .next-arrow {
  transform: translateX(4px);
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--coral); }

/* Search modal */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-overlay.open { display: flex; }
.search-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(620px, 92vw);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0,0,0,0.6);
}
.search-modal input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.2rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}
.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.search-results .result {
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(63,63,70,0.2);
}
.search-results .result:hover { background: var(--card-light); }
.search-results .result .title {
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.search-results .result .section {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.search-results .empty {
  padding: 1rem 1.2rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Figure / screenshot — alineado al ancho del contenido */
figure.shot {
  margin: 2rem 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px -20px rgba(253, 82, 54, 0.15), 0 8px 24px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 100%;
}
figure.shot::before {
  /* Glow gradient sutil */
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(253,82,54,0.3), rgba(177,39,133,0.2), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
}
figure.shot figcaption {
  padding: 0.8rem 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

/* Hero — gradient orb decorativo + más respiración */
.hero {
  position: relative;
  padding: 2rem 0 2.5rem;
  margin-bottom: 1rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.8rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: #ffffff;
  color: #0d0b0f;
  border: 2px solid #ffffff;
  box-shadow: 0 10px 30px -8px rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  background: var(--coral);
  color: #ffffff;
  border-color: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -8px rgba(253, 82, 54, 0.55);
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--coral);
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary { justify-content: center; }
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(253,82,54,0.18), rgba(177,39,133,0.08) 40%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(177,39,133,0.12), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

/* ─── Right TOC (Table of Contents) ───────────────────────── */
.toc {
  position: fixed;
  right: 0; top: var(--header-h);
  width: var(--toc-w);
  padding: 3rem 1.5rem 2rem 1rem;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: rgba(9,9,11,0.4);
}
.toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-left: 1px solid var(--border);
}
.toc nav a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.85rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.4;
  transition: all 0.15s;
}
.toc nav a.h3 {
  padding-left: 1.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.toc nav a:hover {
  color: var(--text-secondary);
  border-left-color: var(--border-strong);
}
.toc nav a.active {
  color: var(--coral);
  border-left-color: var(--coral);
  font-weight: 500;
}
@media (max-width: 1400px) {
  .toc { display: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; padding: 2rem 1.5rem 4rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr; }
  .workflow .step { border-right: none; border-bottom: 1px solid var(--border); }
  .workflow .step::after { display: none; }
  .header .docs-label { display: none; }
  /* Search button: keep magnifier icon visible, hide "Search..." text and ⌘K hint */
  .search-trigger {
    min-width: 0;
    padding: 0.45rem 0.55rem;
    flex-shrink: 0;
  }
  .search-trigger span:nth-child(2) { display: none; }  /* "Search..." text */
  .search-trigger .kbd { display: none; }               /* ⌘K hint */
}

/* Phone-sized: tighten header so logo + search + lang-toggle all fit */
@media (max-width: 640px) {
  .header { padding: 0 0.75rem; gap: 0.5rem; }
  .header .logo-img { height: 24px; }
  .lang-toggle { flex-shrink: 0; }
  .lang-toggle a { padding: 0.35rem 0.5rem; font-size: 0.75rem; }
  .search-trigger { padding: 0.4rem 0.5rem; font-size: 0.95rem; }
  .hamburger { padding: 0.35rem 0.5rem; font-size: 1.05rem; flex-shrink: 0; }
  .header .logo { flex-shrink: 1; min-width: 0; overflow: hidden; }
}
