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

:root {
  --bg: #ffffff;
  --fg: #0a0f1e;
  --muted: #64748b;
  --accent: #1e3a5f;
  --accent-hover: #162d4a;
  --accent-rgb: 30, 58, 95;
  --border: #e2e8f0;
  --card-bg: #f8fafc;
  --code-bg: #0d1b2e;
  --code-fg: #e2e8f0;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { max-width: 100%; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; }
body { font-family: var(--font); color: var(--fg); background: var(--bg); line-height: 1.6; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; justify-content: space-between; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* Preview banner */
.preview-banner { background: var(--accent); color: #fff; text-align: center; font-size: 0.8rem; padding: 8px 16px; letter-spacing: 0.01em; }
.preview-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 0; background: var(--bg); z-index: 10; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 40px; width: auto; display: block; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
nav a:hover { color: var(--fg); }

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--fg); }
.nav-toggle svg { display: block; }
.nav-menu { display: contents; }
.nav-menu.open { display: flex; flex-direction: column; }

/* Buttons */
.btn-primary { background: var(--accent); color: #fff; padding: 10px 20px; border-radius: var(--radius); text-decoration: none; font-size: 0.9rem; font-weight: 500; display: inline-block; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border: 1px solid var(--border); color: var(--fg); padding: 9px 20px; border-radius: var(--radius); text-decoration: none; font-size: 0.9rem; font-weight: 500; display: inline-block; background: none; cursor: pointer; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.btn-ghost:hover { text-decoration: underline; }
.btn-danger { background: #dc2626; color: #fff; border: none; padding: 6px 14px; border-radius: var(--radius); font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin-bottom: 20px; }
.subhead { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* Code section */
.code-section { background: var(--code-bg); padding: 72px 0; }
.code-section h2 { color: #fff; font-size: 1.75rem; margin-bottom: 24px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #94a3b8; padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-family: var(--mono); }
.tab.active { border-color: #5b8db8; color: #fff; background: rgba(30,58,95,0.5); }
.code-block { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 24px; overflow-x: auto; }
.code-block code { font-family: var(--mono); font-size: 0.875rem; color: var(--code-fg); white-space: pre; }
.hidden { display: none; }

/* Features */
.features { padding: 72px 0; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card-icon { font-size: 1.75rem; margin-bottom: 12px; }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 0.9rem; color: var(--muted); }

/* Pricing */
.pricing { padding: 72px 0; background: var(--card-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pricing h2 { font-size: 1.75rem; margin-bottom: 36px; }
.pricing-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; position: relative; }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 3px 12px; border-radius: 99px; white-space: nowrap; }
.pricing-card h3 { font-size: 1rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.price { font-size: 2.25rem; font-weight: 800; margin-bottom: 20px; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-card ul { list-style: none; margin-bottom: 28px; }
.pricing-card li { font-size: 0.9rem; color: var(--muted); padding: 5px 0; border-bottom: 1px solid var(--border); }
.pricing-card li::before { content: '✓ '; color: var(--accent); font-weight: 700; }

/* Invoice Showcase */
.showcase { padding: 80px 0; background: var(--card-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.showcase-split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: center; }
.showcase-left h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 16px; }
.showcase-left p { font-size: 1rem; color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
.showcase-left .showcase-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.showcase-right { position: relative; }

/* The invoice mock — a faithful replica of the rendered invoice template */
.inv-mock { background: #fff; border-radius: 4px; box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 20px 60px rgba(0,0,0,0.12); overflow: hidden; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px; color: #1a1a1a; }
.inv-mock-header { background: #0f172a; color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -0.5px; padding: 20px 40px; }
.inv-mock-body { padding: 0 0 28px; position: relative; overflow: hidden; }
.inv-mock-from { float: right; width: 160px; border-left: 3px solid #e2e8f0; padding: 2px 0 2px 12px; margin: 20px 40px 0 20px; }
.inv-mock-from img { height: 28px; width: auto; display: block; margin-bottom: 5px; }
.inv-mock-from-name { font-size: 10px; font-weight: 700; color: #0f172a; display: block; margin-bottom: 2px; }
.inv-mock-from-line { font-size: 9.5px; color: #374151; line-height: 1.6; }
.inv-mock-meta { margin: 20px 40px 0; overflow: hidden; font-size: 10px; line-height: 1.9; color: #374151; }
.inv-mock-meta strong { color: #0f172a; font-weight: 600; }
.inv-mock-divider { clear: both; height: 16px; }
.inv-mock-table { width: calc(100% - 80px); margin: 0 40px; border-collapse: collapse; }
.inv-mock-table thead tr { border-bottom: 2px solid #0f172a; }
.inv-mock-table thead th { padding: 0 8px 7px; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; text-align: left; }
.inv-mock-table thead th:nth-child(2) { text-align: center; }
.inv-mock-table thead th:nth-child(3), .inv-mock-table thead th:nth-child(4) { text-align: right; }
.inv-mock-table tbody td { padding: 9px 8px; border-bottom: 1px solid #f1f5f9; font-size: 10px; color: #374151; }
.inv-mock-table tbody td:nth-child(2) { text-align: center; color: #64748b; }
.inv-mock-table tbody td:nth-child(3) { text-align: right; color: #64748b; }
.inv-mock-table tbody td:nth-child(4) { text-align: right; font-weight: 600; color: #0f172a; }
.inv-mock-table tbody tr:last-child td { border-bottom: none; }
.inv-mock-totals { width: auto; min-width: 180px; margin: 0 40px 0 auto; border-collapse: collapse; border-top: 1px solid #e2e8f0; }
.inv-mock-totals td { padding: 5px 0 5px 24px; font-size: 10px; color: #64748b; text-align: right; }
.inv-mock-totals tr:last-child td { border-top: 2px solid #0f172a; padding-top: 8px; font-size: 13px; font-weight: 700; color: #0f172a; }
.inv-mock-hr { border: none; border-top: 1px solid #e2e8f0; margin: 20px 40px 12px; clear: both; }
.inv-mock-note { font-size: 9px; color: #94a3b8; margin: 0 40px; }

/* Footer */
.site-footer { padding: 24px 0; border-top: 1px solid var(--border); }
.site-footer .logo img { height: 28px; opacity: 0.45; }
.site-footer nav a { font-size: 0.85rem; }

/* Dashboard */
.dash-wrap { min-height: 100vh; background: var(--card-bg); }
.dash-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 14px 0; }
.dash-main { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.dash-main h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }
.dash-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.dash-card h2 { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.stat-row { display: flex; gap: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-bottom: 2px; }
.stat-value { font-size: 1.1rem; font-weight: 600; }
.badge-plan { display: inline-block; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; text-transform: capitalize; }
.badge-live { background: #059669; color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 99px; }
.badge-test { background: var(--muted); color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 99px; }

/* Dashboard tabs */
.dash-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.dash-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 20px; font-size: 0.9rem; font-weight: 500; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.dash-tab:hover { color: var(--fg); }
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dash-tab-panel { display: none; }
.dash-tab-panel.active { display: block; }

/* Keys table */
.keys-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.keys-table th { text-align: left; padding: 8px 12px; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.keys-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.keys-table tr:last-child td { border-bottom: none; }
.mono { font-family: var(--mono); font-size: 0.8rem; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--card-bg); }
.login-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 100%; max-width: 420px; }
.login-card h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.login-card p { font-size: 0.875rem; color: var(--muted); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; }
.form-group input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 0.9rem; font-family: var(--mono); outline: none; }
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12); }
.error-msg { color: #dc2626; font-size: 0.85rem; margin-top: 8px; }
.muted { color: var(--muted); font-size: 0.8rem; }

/* Quickstart */
.quickstart pre { background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius); padding: 16px; font-family: var(--mono); font-size: 0.8rem; overflow-x: auto; white-space: pre; }

/* Key reveal banner */
.key-reveal { border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.key-reveal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.key-reveal-label { font-size: 0.8rem; font-weight: 600; color: #166534; }
.key-reveal-dismiss { background: none; border: none; cursor: pointer; color: #6b7280; font-size: 1rem; line-height: 1; padding: 0; }
.key-reveal-dismiss:hover { color: var(--fg); }
.key-reveal-body { display: flex; gap: 8px; align-items: center; }
.key-reveal-body code { flex: 1; font-family: var(--mono); font-size: 0.8rem; color: #14532d; word-break: break-all; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 4px; padding: 8px 10px; display: block; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 16px; }
.alert-success { background: #dbeafe; color: #1e3a5f; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Templates showcase */
.templates { padding: 72px 0; background: var(--card-bg); border-top: 1px solid var(--border); }
.templates h2 { font-size: 1.75rem; margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 32px; }
.section-sub code { font-family: var(--mono); font-size: 0.85rem; background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); }

.tmpl-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tmpl-tab { background: #fff; border: 1px solid var(--border); color: var(--muted); padding: 7px 20px; border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.tmpl-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }

.tmpl-pane { display: none; }
.tmpl-pane.active { display: block; }
.tmpl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

.tmpl-code { background: var(--code-bg); border-radius: var(--radius); overflow: hidden; }
.tmpl-code-label, .tmpl-preview-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.tmpl-code-label { color: #64748b; padding: 12px 16px 0; }
.tmpl-code pre { padding: 12px 16px 16px; margin: 0; overflow-x: auto; background: transparent; border: none; border-radius: 0; }
.tmpl-code pre code { font-family: var(--mono); font-size: 0.75rem; color: var(--code-fg); white-space: pre-wrap; word-break: break-all; background: transparent; padding: 0; }

/* PDF page mockup */
.pdf-page { background: #fff; border-radius: 4px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 12px 40px -4px rgba(0,0,0,0.15); overflow: hidden; font-size: 11px; line-height: 1.5; color: #1a1a1a; }

/* Invoice mockup */
.invoice-preview { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #1a1a1a; overflow: hidden; }
.invoice-preview h1 { background: #111; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: -0.3px; padding: 12px 20px; margin-bottom: 16px; }
.invoice-preview .inv-body { padding: 0 20px 20px; }
.invoice-preview p { font-size: 10.5px; line-height: 1.75; color: #444; margin-bottom: 12px; }
.invoice-preview p strong { color: #111; font-weight: 600; }
.invoice-preview table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.invoice-preview thead tr { background: #111; }
.invoice-preview thead th { padding: 7px 10px; text-align: left; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; }
.invoice-preview thead th:last-child { text-align: right; }
.invoice-preview tbody td { padding: 8px 10px; border-bottom: 1px solid #eee; font-size: 10.5px; color: #333; }
.invoice-preview tbody td:last-child { text-align: right; font-weight: 500; color: #111; }
.invoice-preview tbody tr:last-child td { border-bottom: none; }
.invoice-preview tbody tr:nth-child(even) td { background: #fafafa; }
.invoice-preview table ~ p { text-align: right; padding-top: 10px; border-top: 1px solid #eee; margin-bottom: 0; color: #555; }
.invoice-preview hr { border: none; border-top: 1px solid #eee; margin: 14px 0 10px; }
.invoice-preview hr ~ p { text-align: left; font-size: 8.5px; color: #aaa; line-height: 1.7; padding-top: 0; border-top: none; margin-bottom: 0; }

/* AI Summary mockup */
.pdf-report-header { background: #0d1b2e; padding: 20px 24px 16px; }
.pdf-report-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; margin-bottom: 6px; }
.pdf-report-title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px; line-height: 1.2; margin-bottom: 4px; }
.pdf-report-meta { font-size: 9.5px; color: #94a3b8; }
.pdf-report-body { padding: 16px 24px; }
.pdf-section-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; margin: 14px 0 6px; }
.pdf-callout { background: #f0f9ff; border-left: 3px solid #1e3a5f; padding: 10px 12px; font-size: 10.5px; color: #0c4a6e; line-height: 1.6; border-radius: 0 4px 4px 0; margin-bottom: 4px; }
.pdf-findings { padding-left: 16px; margin: 0; }
.pdf-findings li { font-size: 10.5px; color: #374151; margin-bottom: 4px; line-height: 1.5; }
.pdf-table-report thead { background: transparent; }
.pdf-table-report thead th { padding: 7px 10px; font-size: 9px; font-weight: 700; text-transform: uppercase; color: #475569; border-bottom: 1.5px solid #e2e8f0; background: #f8fafc; }
.pdf-table-report tbody td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; font-size: 10.5px; }

/* Resume mockup */
.pdf-resume { padding: 28px 32px; }
.pdf-resume-name { font-size: 22px; font-weight: 800; color: #0d1b2e; letter-spacing: -0.5px; margin-bottom: 3px; }
.pdf-resume-contact { font-size: 10px; color: #64748b; margin-bottom: 20px; }
.pdf-resume-section { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; border-bottom: 1.5px solid #0d1b2e; padding-bottom: 4px; margin: 16px 0 8px; }
.pdf-resume-role { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; margin-bottom: 3px; }
.pdf-resume-role span { font-size: 9.5px; color: #94a3b8; }
.pdf-resume-desc { font-size: 10px; color: #374151; line-height: 1.55; margin-bottom: 10px; }

/* Docs */
.docs-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; min-height: 100vh; }
.docs-nav { border-right: 1px solid var(--border); padding: 32px 24px; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; align-self: start; }
.docs-nav h3 { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 10px; margin-top: 24px; }
.docs-nav h3:first-child { margin-top: 0; }
.docs-nav a { display: block; font-size: 0.875rem; color: var(--muted); text-decoration: none; padding: 4px 0; }
.docs-nav a:hover { color: var(--fg); }
.docs-nav a.active { color: var(--accent); font-weight: 500; }
.docs-body { padding: 48px 56px; max-width: 820px; min-width: 0; }
.docs-body h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.docs-body > p { color: var(--muted); margin-bottom: 40px; }
.docs-section { margin-bottom: 56px; }
.docs-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.docs-section h3 { font-size: 0.95rem; font-weight: 600; margin: 24px 0 10px; }
.docs-section p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.docs-section p code { font-family: var(--mono); font-size: 0.8rem; background: var(--card-bg); border: 1px solid var(--border); padding: 1px 5px; border-radius: 3px; color: var(--fg); }
.endpoint { display: inline-flex; align-items: center; gap: 10px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; font-family: var(--mono); font-size: 0.875rem; }
.method { font-weight: 700; font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; }
.method-post { background: #dbeafe; color: #1e3a5f; }
.method-get  { background: #d1fae5; color: #065f46; }
.docs-section pre { background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius); padding: 16px 20px; font-family: var(--mono); font-size: 0.8rem; overflow-x: auto; white-space: pre; margin: 12px 0 20px; line-height: 1.6; }
.docs-section table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 12px 0 20px; }
.docs-section th { text-align: left; padding: 8px 12px; background: var(--card-bg); border: 1px solid var(--border); font-weight: 600; font-size: 0.8rem; }
.docs-section td { padding: 8px 12px; border: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.docs-section td code { font-family: var(--mono); font-size: 0.8rem; color: var(--fg); }
.docs-section td:first-child code { color: var(--accent); }
.badge-req { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: #fee2e2; color: #991b1b; }
.badge-opt { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: var(--card-bg); color: var(--muted); border: 1px solid var(--border); }

/* SDK tabs */
.sdk-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.sdk-tab { background: #fff; border: 1px solid var(--border); color: var(--muted); padding: 6px 18px; border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.sdk-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }
.sdk-pane { display: none; }
.sdk-pane.active { display: block; }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .tmpl-split { grid-template-columns: 1fr; }
  .docs-wrap { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
  .docs-body { padding: 32px 24px; }
  .showcase-split { grid-template-columns: 1fr; }
  .showcase { padding: 56px 0; }
  .showcase-links .btn-primary { display: none; }
}

@media (max-width: 700px) {
  /* Layout */
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions a, .hero-actions button { text-align: center; width: 100%; }

  /* Logo */
  .logo img { height: 32px; }

  /* Nav — hamburger on mobile */
  nav { gap: 12px; }
  .nav-toggle { display: flex; }
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
    gap: 14px;
    z-index: 20;
  }
  .nav-menu.open a { font-size: 1rem; color: var(--fg); }
  .nav-menu.open .btn-outline { align-self: flex-start; }

  /* Code section */
  .code-section { padding: 48px 0; }
  .code-block { padding: 16px; }
  .code-block code { font-size: 0.75rem; }

  /* Features / Pricing */
  .features { padding: 48px 0; }
  .pricing { padding: 48px 0; }
  .pricing h2 { font-size: 1.4rem; }
  .pricing-card { padding: 24px; }

  /* Templates */
  .templates { padding: 48px 0; }
  .tmpl-tabs { gap: 6px; }
  .tmpl-tab { padding: 6px 14px; font-size: 0.8rem; }

  /* Dashboard */
  .dash-main { margin: 20px auto; padding: 0 16px; }
  .dash-card { padding: 16px; }
  .stat-row { gap: 16px; }

  /* Keys table — hide Created / Last Used on mobile */
  .keys-table th:nth-child(3),
  .keys-table td:nth-child(3),
  .keys-table th:nth-child(4),
  .keys-table td:nth-child(4) { display: none; }

  /* Quickstart */
  .quickstart pre { font-size: 0.72rem; }

  /* Login */
  .login-card { padding: 24px 20px; }

  /* Docs */
  .docs-wrap { grid-template-columns: minmax(0, 1fr); }
  .docs-body { padding: 24px 16px; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .docs-body h1 { font-size: 1.4rem; }
  .docs-section pre { white-space: pre-wrap; word-break: break-all; overflow-x: hidden; }
  .docs-section table { display: block; overflow-x: auto; max-width: 100%; }
  .docs-section p { word-break: break-word; }
  .docs-section p code { word-break: break-all; }
  .endpoint { flex-wrap: wrap; font-size: 0.8rem; max-width: 100%; }
}
