/* ============================================================
   QLM Developer Docs — Design System
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* --- Tokens --- */
:root {
  --bg-deep: #0B1929;
  --bg-card: #0f2035;
  --bg-card-hover: #132840;
  --bg-code: #0d1c2e;
  --bg-input: #091420;
  --border: #1a3350;
  --border-hover: #234568;

  --text-primary: #FDFBF8;
  --text-secondary: #a8b8c8;
  --text-muted: #607080;

  --accent: #00A896;
  --accent-light: #2ec4b6;
  --accent-dark: #008f80;
  --accent-glow: rgba(0, 168, 150, 0.15);

  --green: #00A896;
  --green-bg: rgba(0, 168, 150, 0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.12);
  --orange: #f97316;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;

  --sidebar-w: 280px;
  --content-max: 780px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #a5b4fc; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }

img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font-sans); }

/* --- Layout --- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo .logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
}

.sidebar-logo span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.sidebar nav { flex: 1; padding: 1rem 0; }

.sidebar .nav-section {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.sidebar .nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.sidebar .nav-link.active {
  color: var(--accent-light);
  border-left-color: var(--accent);
  background: var(--accent-glow);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Main Content --- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

.content-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* --- Mobile hamburger --- */
.hamburger {
  display: none;
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

/* --- Hero (index page) --- */
.hero {
  background: linear-gradient(135deg, #0B1929 0%, #0f2035 40%, #0d2a3d 100%);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(0,168,150,0.08) 0%, transparent 50%);
  animation: hero-glow 8s ease-in-out infinite alternate;
}

@keyframes hero-glow {
  from { transform: scale(1); opacity: 0.5; }
  to   { transform: scale(1.2); opacity: 1; }
}

.hero-inner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #FDFBF8 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,168,150,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border-hover);
  color: #fff;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p { font-size: 0.9rem; }

/* --- Code Blocks --- */
.code-block {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.code-block code {
  font-family: var(--font-mono);
}

.copy-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.copy-btn.copied {
  color: var(--green);
  border-color: var(--green);
}

/* Inline code */
code:not([class]) {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-light);
}

/* --- Syntax Highlighting (CSS classes) --- */
.tok-key { color: #2ec4b6; }
.tok-str { color: #34d399; }
.tok-num { color: #f59e0b; }
.tok-bool { color: #f97316; }
.tok-null { color: #6b7280; }
.tok-bracket { color: #6b7280; }
.tok-comment { color: #555570; font-style: italic; }
.tok-keyword { color: #c084fc; }
.tok-func { color: #60a5fa; }
.tok-param { color: #f9a8d4; }
.tok-op { color: #9ca3af; }

/* --- Method Badges --- */
.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 52px;
  text-align: center;
}

.method-get    { background: var(--green-bg); color: var(--green); }
.method-post   { background: var(--blue-bg); color: var(--blue); }
.method-put    { background: var(--yellow-bg); color: var(--yellow); }
.method-delete { background: var(--red-bg); color: var(--red); }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Collapsible --- */
.collapsible {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.75rem 0;
  overflow: hidden;
}

.collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.collapsible-trigger:hover { background: var(--bg-card-hover); }

.collapsible-trigger .arrow {
  transition: transform var(--transition);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.collapsible.open .collapsible-trigger .arrow {
  transform: rotate(90deg);
}

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

.collapsible.open .collapsible-body { display: block; }

/* --- Endpoint Card --- */
.endpoint {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  overflow: hidden;
  background: var(--bg-card);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.endpoint-header:hover { background: var(--bg-card-hover); }

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.endpoint-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.endpoint-body {
  display: none;
  padding: 1.25rem;
}

.endpoint.open .endpoint-body { display: block; }

/* --- Try-It Panel --- */
.try-it {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
}

.try-it-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.try-it textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  resize: vertical;
  line-height: 1.5;
}

.try-it textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.try-it-response {
  margin-top: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

/* --- Progress Bar --- */
.progress-bar {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background var(--transition);
}

.progress-step.active { background: var(--accent); }
.progress-step.done { background: var(--green); }

.step-indicators {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.step-indicator {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}

.step-indicator.active { color: var(--accent-light); }
.step-indicator.done { color: var(--green); }

/* --- Wizard Steps --- */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.pricing-card.featured {
  border-color: var(--accent);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 1rem 0 0.25rem;
}

.price span { font-size: 1rem; font-weight: 400; color: var(--text-secondary); }

.pricing-features {
  list-style: none;
  margin: 1.5rem 0;
  flex: 1;
}

.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.faq-question:hover { background: var(--bg-card-hover); }

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-card);
}

.faq-item.open .faq-answer { display: block; }

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:hover td { background: rgba(255,255,255,0.02); }

/* --- Playground Layout --- */
.playground-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.playground-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.playground-panel-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playground-panel textarea {
  flex: 1;
  width: 100%;
  background: var(--bg-code);
  border: none;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
}

.playground-panel textarea:focus { outline: none; }

.playground-response {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-code);
  white-space: pre-wrap;
  color: var(--text-secondary);
}

.playground-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.playground-toolbar select,
.playground-toolbar input[type="text"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
}

.playground-toolbar select:focus,
.playground-toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.playground-toolbar input[type="text"] {
  flex: 1;
  min-width: 200px;
}

/* --- Concept Diagrams (CSS-only) --- */
.diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 0;
  text-align: center;
}

.diagram-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.diagram-box {
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.diagram-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.diagram-box.highlight {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-light);
}

/* Sequential items animation */
.seq-items {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  margin: 1rem 0;
}

.seq-item {
  width: 28px; height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  animation: seq-fade 3s ease-in-out infinite;
}

.seq-item:nth-child(odd) { background: var(--red-bg); color: var(--red); }
.seq-item:nth-child(even) { background: var(--green-bg); color: var(--green); }

@keyframes seq-fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.seq-item:nth-child(1) { animation-delay: 0s; }
.seq-item:nth-child(2) { animation-delay: 0.2s; }
.seq-item:nth-child(3) { animation-delay: 0.4s; }
.seq-item:nth-child(4) { animation-delay: 0.6s; }
.seq-item:nth-child(5) { animation-delay: 0.8s; }
.seq-item:nth-child(6) { animation-delay: 1.0s; }
.seq-item:nth-child(7) { animation-delay: 1.2s; }
.seq-item:nth-child(8) { animation-delay: 1.4s; }
.seq-item:nth-child(9) { animation-delay: 1.6s; }
.seq-item:nth-child(10) { animation-delay: 1.8s; }

/* optimization burst */
.opt-burst {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  margin: 1rem 0;
}

.opt-item {
  width: 28px; height: 28px;
  border-radius: 4px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-light);
  animation: opt-pop 1.5s ease-in-out infinite;
}

@keyframes opt-pop {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* State Machine */
.state-machine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.state-node {
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid;
}

.state-explore { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.state-exploit { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.state-converge { border-color: var(--accent); color: var(--accent-light); background: var(--accent-glow); }

.state-edge {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: center;
}

/* Domain grid */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.domain-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition);
}

.domain-item:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.domain-item .icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.domain-item .name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }

/* --- Social Proof Banner --- */
.social-proof {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}

.social-proof .stat-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stat { text-align: center; }
.stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-light);
}
.stat .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  color: var(--green);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- Demo Box --- */
.demo-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
}

.demo-box .demo-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* --- Error codes table highlights --- */
.status-2xx { color: var(--green); font-weight: 600; }
.status-4xx { color: var(--yellow); font-weight: 600; }
.status-5xx { color: var(--red); font-weight: 600; }

/* --- Feature Comparison Table --- */
.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  text-align: center;
}

.check { color: var(--green); }
.cross { color: var(--text-muted); }

/* --- Utility --- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.85rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.inline-flex { display: inline-flex; align-items: center; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent-light); }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 0.75rem; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  :root { --sidebar-w: 240px; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }

  .sidebar {
    transform: translateX(-100%);
  }

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

  .overlay.show { display: block; }

  .main { margin-left: 0; }

  .content, .content-wide {
    padding: 4.5rem 1.25rem 4rem;
  }

  .hero { padding: 4rem 1.25rem 3rem; }
  .hero h1 { font-size: 2rem; }

  .playground-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

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

  .social-proof .stat-row { gap: 1.5rem; }

  .endpoint-desc { display: none; }
}
