/* ================================================================
   Scrapeeg — Design System (v4, refactored)
   All CSS lives here. HTML files contain ZERO inline <style> tags.
   ================================================================ */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-latin-wght-normal.woff2') format('woff2');
}


:root, [data-theme="dark"] {
  --bg: #212529;
  --card: #2C3035;
  --card-hi: #383D42;
  --bd: #383D42;
  --bd2: #4A5056;
  --tx: #F8FAFC;
  --cap: #A0AEC0;
  --bl: #4EA8F1;
  --bl-hover: #3B8ED6;
  --bl-soft: rgba(78, 168, 241, 0.12);
  --bl-glow: rgba(78, 168, 241, 0.18);
  --gr: #10B981;
  --am: #F59E0B;
  --rd: #F87171;
  --radius: 14px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --card-grad-end: #2C3035;
  --pill-bg: #1C2024;
  --pill-bd: #383D42;
  --pre-bg: #1A1D21;
  --pre-fg: #CFE3FF;
  --thead-bg: #1C2024;
  --prose-fg: #C2CCD9;
  --cta-fg: #C7DEF5;
  --link-hover: #6EBBF5;
  --accent-soft: #ADD7F9;
  --bd-hover: #556074;
  --placeholder: #5B6B7E;
  --field-bg: #1A1D21;
  --nav-bg: rgba(33, 37, 41, 0.88);
  --logo-text: #FFFFFF;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --card-hi: #F1F5F9;
  --bd: #E2E8F0;
  --bd2: #CBD5E1;
  --tx: #0F172A;
  --cap: #64748B;
  --bl: #0284C7;
  --bl-hover: #0369A1;
  --bl-soft: rgba(2, 132, 199, 0.10);
  --bl-glow: rgba(2, 132, 199, 0.15);
  --gr: #059669;
  --am: #D97706;
  --rd: #DC2626;
  --radius: 14px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
  --card-grad-end: #F8FAFC;
  --pill-bg: #F1F5F9;
  --pill-bd: #E2E8F0;
  --pre-bg: #FFFFFF;
  --pre-fg: #0F172A;
  --thead-bg: #F8FAFC;
  --prose-fg: #334155;
  --cta-fg: #1E3A5F;
  --link-hover: #0284C7;
  --accent-soft: #0369A1;
  --bd-hover: #94A3B8;
  --placeholder: #94A3B8;
  --field-bg: #F8FAFC;
  --nav-bg: rgba(248, 250, 252, 0.88);
  --logo-text: #64748B;
  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.65; color: var(--tx); background: var(--bg); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { letter-spacing: -0.03em; margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.06; margin: 0 0 14px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; margin: 0 0 12px; }
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 10px; }
h4 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0; color: var(--cap); font-size: 16.5px; line-height: 1.65; }
a { color: var(--bl); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--link-hover); text-decoration: none; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
::selection { background: rgba(78, 168, 241, 0.3); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--bl);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 99; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; top: 12px; }

.container { width: min(1080px, calc(100% - 44px)); margin-inline: auto; }
.muted { color: var(--cap); }
.lead { color: var(--prose-fg); font-size: 17.5px; line-height: 1.65; max-width: 64ch; margin: 0; }
.u-inline { display: inline; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--bd);
}
.nav-inner { width: min(1080px, calc(100% - 44px)); margin-inline: auto; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--tx); }
.brand:hover { color: var(--tx); }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; flex: none; box-shadow: 0 2px 12px var(--bl-glow); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--cap); font-weight: 600; font-size: 14px; position: relative; }
.nav-links a:hover { color: var(--tx); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--bl); transition: right 0.2s ease; }
.nav-links a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-menu { display: none; }
.nav-menu summary { list-style: none; cursor: pointer; color: var(--tx); font-size: 20px; line-height: 1; padding: 6px 10px; border: 1px solid var(--bd2); border-radius: 9px; background: transparent; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-drop { display: none; position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--bd); border-radius: 12px; padding: 8px; box-shadow: var(--shadow-md); min-width: 190px; z-index: 60; }
.nav-menu[open] .nav-drop { display: flex; }
.nav-drop a { color: var(--cap); font-weight: 600; font-size: 14px; padding: 9px 12px; border-radius: 8px; }
.nav-drop a:hover { color: var(--tx); background: var(--card-hi); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 42px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--bl); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 20px var(--bl-glow);
}
.btn-primary:hover {
  background: var(--bl-hover); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 28px var(--bl-glow);
}
.btn-ghost { background: rgba(255, 255, 255, 0.02); color: var(--tx); border-color: var(--bd2); }
.btn-ghost:hover { background: var(--card-hi); border-color: var(--bd-hover); }
.btn.light { background: #fff; color: #181A1F; }
.btn.light:hover { background: #F0F3F8; color: #181A1F; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--bd); }
.section:first-of-type { padding-top: 56px; border-top: 0; }
.page-hero { max-width: 760px; margin: 44px auto 4px; text-align: left; }
.page-hero h1 { font-size: clamp(34px, 4.5vw, 48px); line-height: 1.05; margin: 6px 0 14px; }
.blog-head { max-width: none; margin: 18px 0 8px; text-align: left; }

/* ---------- Eyebrow / chips / pills ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
  border: 1px solid rgba(78, 168, 241, 0.28);
  background: var(--bl-soft); color: var(--accent-soft);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow .ic { width: 13px; height: 13px; }

.schip, .pill, .urlpill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; border-radius: 999px;
  border: 1px solid var(--bd2); background: var(--card-hi); color: var(--cap);
  font-size: 12px; font-weight: 700; padding: 4px 10px; white-space: nowrap;
}
.schip { font-family: ui-monospace, monospace; border-style: dashed; }
.schip.feat-tag { color: var(--accent-soft); border-style: solid; border-color: rgba(78, 168, 241, 0.35); background: var(--bl-soft); }
.pill.ok, .pill.success { color: #6EE7B7; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.28); }
.pill.warn { color: #FCD34D; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.28); }
.urlpill { margin-left: 10px; font: 600 12px ui-monospace, monospace; color: var(--cap); background: var(--pill-bg); border: 1px solid var(--pill-bd); border-radius: 7px; padding: 4px 10px; }

/* ---------- Cards ---------- */
.card, .panel, .pcard, .authorcard, .postnav a {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.pcard:hover {
  border-color: var(--bd2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card h2, .card h3 { margin: 0 0 8px; font-size: 18px; color: var(--tx); }
.card p { margin: 0; color: var(--cap); font-size: 14.5px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.price { margin: 8px 0; font-size: 34px; font-weight: 800; letter-spacing: -0.04em; color: var(--tx); }
.list { margin: 14px 0; padding-left: 18px; color: var(--cap); }
.list li { margin: 6px 0; }

/* ---------- Pricing Specific ---------- */
.toggle { display: flex; justify-content: center; align-items: center; gap: 4px; border: 1px solid var(--bd); background: var(--card); border-radius: 999px; padding: 4px; margin: 0 auto 32px; width: fit-content; }
.tg-btn { background: transparent; border: 0; color: var(--cap); padding: 10px 20px; border-radius: 999px; cursor: pointer; font: inherit; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 13.5px; font-weight: 500; line-height: 1; transition: all 0.2s; }
.tg-btn:hover { color: var(--tx); }
.tg-btn.is-on { background: var(--bl); color: #fff; font-weight: 600; box-shadow: 0 2px 10px rgba(78, 168, 241, 0.3); }
.save-note { font-weight: 400; opacity: .8; }
.per { font-size: .55em; font-weight: 600; opacity: .7; margin-left: 2px; }
.eff { margin-top: -2px; font-size: 13px; }
.badge { position: absolute; top: 20px; right: 20px; display: inline-block; background: rgba(78, 168, 241, 0.15); color: var(--accent-soft); border: 1px solid rgba(78, 168, 241, 0.4); font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 16px; border-top: 1px solid var(--bd); }
details.qa { border-bottom: 1px solid var(--bd); }
details.qa summary { list-style: none; cursor: pointer; padding: 18px 4px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--tx); transition: color 0.15s; }
details.qa summary:hover { color: var(--bl); }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; color: var(--bl); font-size: 22px; font-weight: 700; line-height: 1; transition: transform 0.2s; }
details.qa[open] summary::after { transform: rotate(45deg); }
.qa-a { padding: 0 4px 18px; color: var(--cap); font-size: 14.5px; line-height: 1.7; max-width: 72ch; }

/* ---------- CTA band ---------- */
.ctaband {
  margin: 56px 0 16px; text-align: center; border-radius: 20px; padding: 56px 24px;
  background: linear-gradient(120deg, rgba(78, 168, 241, 0.14), rgba(78, 168, 241, 0.05) 55%, rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(78, 168, 241, 0.22);
  box-shadow: var(--shadow-md);
}
.ctaband h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 10px; }
.ctaband p { color: var(--cta-fg); margin: 0 0 22px; }
.ctaband .muted { color: var(--cta-fg); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--bd); border-radius: 12px; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--bd); text-align: left; vertical-align: top; font-size: 14px; }
thead th { background: var(--thead-bg); color: var(--cap); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.015); }

/* ---------- Code ---------- */
pre { background: var(--pre-bg); border: 1px solid var(--bd); border-radius: 12px; padding: 16px; overflow: auto; margin: 0; color: var(--pre-fg); font-size: 13px; line-height: 1.6; }
code { color: var(--pre-fg); }
pre code { background: none; border: 0; padding: 0; }

/* ---------- Prose (blog / pages) ---------- */
.prose { max-width: 760px; color: var(--prose-fg); font-size: 16px; line-height: 1.78; }
.prose h1 { font-size: clamp(28px, 3.8vw, 40px); margin: 0 0 14px; color: var(--tx); }
.prose h2 { color: var(--tx); font-size: 24px; margin: 36px 0 12px; }
.prose h3 { color: var(--tx); font-size: 18px; margin: 26px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose code { background: var(--pre-bg); border: 1px solid var(--bd); border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.prose pre { background: var(--pre-bg); border: 1px solid var(--bd); border-radius: 12px; padding: 16px; margin: 18px 0; overflow: auto; }
.prose blockquote { border-left: 3px solid var(--bl); margin: 20px 0; padding: 4px 0 4px 18px; color: var(--cap); background: rgba(78, 168, 241, 0.04); border-radius: 0 8px 8px 0; }
.prose hr { border: 0; border-top: 1px solid var(--bd); margin: 28px 0; }
.prose img { max-width: 100%; border-radius: 12px; border: 1px solid var(--bd); }
.prose a { color: var(--bl); text-decoration: underline; text-decoration-color: rgba(78, 168, 241, 0.4); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: var(--bl); }
.prose strong { color: var(--tx); font-weight: 700; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; display: block; overflow-x: auto; }
.prose thead th { background: var(--thead-bg); color: var(--cap); text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.06em; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bd); }
.prose tbody td { padding: 10px 12px; border-bottom: 1px solid var(--bd); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose ul li::marker, .prose ol li::marker { color: var(--bl); }
.prose li > p { margin: 0 0 6px; }
.prose li > p + p { margin-top: 6px; }

/* ---------- Blog cards ---------- */
.section-h { font-size: 22px; letter-spacing: -0.02em; margin: 32px 0 8px; color: var(--tx); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 8px; }
.rel-grid { margin-top: 10px; }
.pcard { position: relative; display: flex; flex-direction: column; padding: 22px; }
.pcard .stackrow { margin: 0 0 12px; }
.pcard h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.3; color: var(--tx); letter-spacing: -0.01em; transition: color 0.15s; }
.pcard:hover h3 { color: var(--bl); }
.pcard p { margin: 0 0 14px; color: var(--cap); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--cap); }
.pcard-meta .dotsep { opacity: 0.5; }
.pcard-meta a { color: var(--cap); }
.pcard-meta a:hover { color: var(--bl); }
.readarrow { margin-left: auto; color: var(--bl); font-weight: 700; }
.pcard:hover .readarrow { text-decoration: underline; }
.pcard a.stretch { color: inherit; text-decoration: none; }
.pcard a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pcard a.stretch:focus-visible { outline: none; }
.pcard a.stretch:focus-visible::after { outline: 2px solid var(--bl); outline-offset: 2px; }
.pcard.feature { grid-column: 1 / -1; flex-direction: row; gap: 26px; align-items: center; padding: 26px; }
.pcard.feature .fbody { flex: 1; min-width: 0; }
.pcard.feature h3 { font-size: clamp(22px, 3vw, 30px); }
.pcard.feature p { -webkit-line-clamp: 3; font-size: 15px; }

/* ---------- Article shell ---------- */
.article { max-width: 740px; margin: 0 auto; padding: 30px 0 8px; }
.article > header h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.1; margin: 10px 0 16px; letter-spacing: -0.025em; }
.art-sum { color: var(--prose-fg); font-size: 17px; line-height: 1.65; margin: 14px 0 0; max-width: 64ch; }
.article .prose { margin-top: 20px; }
.byline { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; }
.byline b { display: block; font-size: 13.5px; color: var(--tx); }
.byline i { display: block; font: 12px ui-monospace, monospace; color: var(--cap); font-style: normal; }
.byline .copywrap { margin-left: auto; position: relative; }
.stackrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.av { width: 26px; height: 26px; border-radius: 50%; flex: none; background: rgba(148, 163, 184, 0.15); border: 1px solid rgba(255, 255, 255, 0.1); }
.authorcard .av { width: 44px; height: 44px; }
.authorcard { display: flex; gap: 14px; align-items: flex-start; margin: 36px 0 0; }
.authorcard b { display: block; color: var(--tx); font-size: 15px; }
.authorcard p { margin: 4px 0 0; color: var(--cap); font-size: 13.5px; line-height: 1.6; }
.copylink { background: none; border: 1px solid var(--bd2); color: var(--cap); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; transition: color 0.15s, border-color 0.15s; }
.copylink:hover { color: var(--tx); border-color: var(--bd-hover); }
.copyfield { display: none; position: absolute; top: calc(100% + 6px); right: 0; width: min(340px, 72vw); background: var(--field-bg); border: 1px solid var(--bd2); border-radius: 9px; padding: 9px 11px; color: var(--tx); font: 12.5px ui-monospace, monospace; z-index: 20; box-shadow: var(--shadow-md); }
.copywrap[open] .copyfield { display: block; }
.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 0; }
.postnav a { display: block; padding: 16px 18px; color: var(--tx); }
.postnav a:hover { border-color: var(--bd2); text-decoration: none; }
.postnav span { display: block; font-size: 11.5px; color: var(--cap); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.postnav .next { text-align: right; }
.postnav b { font-size: 14px; line-height: 1.4; display: block; font-weight: 600; }
.backline { margin: 26px 0 0; font-size: 14px; }

/* ---------- Footer ---------- */
.footer { margin-top: 80px; border-top: 1px solid var(--bd); padding: 48px 0 24px; color: var(--cap); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; margin-bottom: 24px; }
.footer-grid h4 { margin: 0 0 14px; font-size: 12px; color: var(--tx); text-transform: uppercase; letter-spacing: 0.08em; }
.footer-grid a { display: block; color: var(--cap); font-size: 13.5px; margin: 8px 0; transition: color 0.15s; }
.footer-grid a:hover { color: var(--bl); text-decoration: none; }
.footer .muted { font-size: 12.5px; text-align: center; border-top: 1px solid var(--bd); margin-top: 28px; padding-top: 20px; }

/* ---------- Auth Pages (Login / Signup) ---------- */
.auth-shell { min-height: calc(100vh - 170px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(100%, 26rem); background: var(--card); border: 1px solid var(--bd); border-radius: 18px; box-shadow: var(--shadow-md); padding: 1.75rem; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .55rem; margin-bottom: 1.1rem; font-weight: 700; }
.auth-brand img { width: 28px; height: 28px; }
.auth-card h1 { margin: 0 0 .35rem; text-align: center; font-size: 1.65rem; line-height: 1.15; }
.auth-sub { margin: 0 0 1.25rem; text-align: center; color: var(--cap); font-size: .95rem; }
.auth-alert { margin: 0 0 1rem; padding: .7rem .85rem; border-radius: 12px; font-size: .92rem; }
.auth-alert.err { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .25); color: #fecaca; }
.auth-alert.ok { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .25); color: #bbf7d0; }
.auth-google { width: 100%; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--bd2); background: #fff; color: #111; font-weight: 650; text-decoration: none; }
.auth-google:hover { background: #f7f7f7; }
.auth-or { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--cap); font-size: .85rem; }
.auth-or:before, .auth-or:after { content: ""; height: 1px; flex: 1; background: var(--bd); }
.auth-field { margin-bottom: .9rem; }
.auth-field label { display: block; margin-bottom: .35rem; font-size: .85rem; color: var(--cap); }
.auth-field input { width: 100%; box-sizing: border-box; padding: .78rem .85rem; border-radius: 12px; border: 1px solid var(--bd); background: var(--bg); color: var(--tx); font-size: 1rem; outline: none; }
.auth-field input:focus { border-color: var(--bl); box-shadow: 0 0 0 3px var(--bl-soft); }
.auth-submit { width: 100%; display: flex; justify-content: center; margin-top: .35rem; padding: .82rem 1rem; border-radius: 12px; font-weight: 650; }
.auth-foot { text-align: center; margin-top: 1.1rem; font-size: .9rem; color: var(--cap); }
.auth-legal { text-align: center; margin-top: .8rem; font-size: .78rem; color: var(--cap); }

/* ---------- Docs Page ---------- */
.docwrap { width: 100%; max-width: 1760px; margin-inline: auto; padding: 30px clamp(20px, 2.4vw, 44px) 72px; display: grid; grid-template-columns: 244px minmax(0, 1fr) 240px; gap: 40px; align-items: start; }
.docaside { position: sticky; top: 84px; align-self: start; display: grid; gap: 10px; align-content: start; padding: 0 0 0 18px; border-left: 1px solid var(--bd); }
.da-t { font: 10px ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; color: var(--cap); }
.da-btn { display: block; text-align: center; font: 600 13px/1.1 inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--bd); color: var(--tx); text-decoration: none; background: var(--card); }
.da-btn:hover { border-color: var(--bd2); text-decoration: none; background: var(--card-hi); }
.da-btn.da-primary { background: var(--bl); color: #fff; border-color: transparent; font-weight: 750; }
.da-btn.da-primary:hover { background: var(--bl-hover); }
.da-card { border: 1px solid var(--bd); border-radius: 12px; padding: 4px 12px; background: var(--card); }
.da-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--bd); font-size: 12.5px; color: var(--cap); }
.da-row:first-child { border-top: 0; }
.da-row code { font: 12px ui-monospace, monospace; color: var(--tx); background: var(--bg); border: 1px solid var(--bd); border-radius: 6px; padding: 1px 6px; }
.da-live { color: #6EE7B7; font-weight: 600; }
.da-note { margin: 2px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--cap); }
.docmain p, .docmain ul, .docmain ol, .docmain .intro, .docmain .callout, .docmain .docfoot, .docmain h1, .docmain h2, .docmain h3 { max-width: 74ch; }
.docmain .doc-code, .docmain .doc-table, .docmain .tabs, .docmain .ep { max-width: 1120px; }
.docside { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; padding-right: 6px; }
.docside .grp { font: 10px ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; color: var(--cap); padding: 14px 10px 5px; }
.docside a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--cap); font-size: 13px; font-weight: 600; text-decoration: none; border-left: 2px solid transparent; }
.docside a:hover { color: var(--tx); background: var(--card); text-decoration: none; }
.docmain { min-width: 0; }
.docmain .eyebrow { margin-bottom: 8px; }
.docmain h1 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; letter-spacing: -.03em; color: var(--tx); }
.docmain .intro { margin: 0 0 6px; color: var(--cap); font-size: 15.5px; line-height: 1.7; max-width: 74ch; }
.docmain h2 { margin: 46px 0 0; padding-top: 26px; border-top: 1px solid var(--bd); font-size: 23px; letter-spacing: -.02em; color: var(--tx); }
.docmain h2:first-of-type { border-top: 0; padding-top: 8px; }
.docmain h3 { margin: 26px 0 6px; font-size: 16px; letter-spacing: -.01em; color: var(--tx); }
.docmain p { margin: 10px 0; color: var(--prose-fg); font-size: 14.5px; line-height: 1.7; max-width: 78ch; }
.docmain a { color: var(--bl); text-decoration: none; }
.docmain a:hover { text-decoration: underline; }
.docmain ul { margin: 10px 0; padding-left: 20px; color: var(--prose-fg); font-size: 14.5px; line-height: 1.75; max-width: 78ch; }
.docmain li { margin: 5px 0; }
.docmain code { font: 12.5px ui-monospace, monospace; background: var(--bg); border: 1px solid var(--bd); border-radius: 6px; padding: 1px 6px; color: var(--pre-fg); }
.docmain h2[id], .docmain section[id] { scroll-margin-top: 84px; }
.doc-code { margin: 14px 0 0; border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; background: var(--pre-bg); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.doc-code .ch { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--bd); background: var(--card); font: 10.5px ui-monospace, monospace; letter-spacing: .05em; text-transform: uppercase; color: var(--cap); }
.doc-code .ch .lang { margin-left: auto; color: var(--cap); text-transform: none; letter-spacing: 0; }
.doc-code pre { margin: 0; padding: 14px 15px; overflow: auto; color: var(--pre-fg); font: 12.5px/1.7 ui-monospace, monospace; white-space: pre; max-height: 520px; }
.doc-code.tall pre { max-height: 640px; }
.ep { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 4px; }
.ep .m { font: 11px ui-monospace, monospace; font-weight: 700; letter-spacing: .04em; border-radius: 7px; padding: 4px 9px; flex: none; }
.ep .m.get { color: #6EE7B7; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.28); }
.ep .m.post { color: var(--accent-soft); background: var(--bl-soft); border: 1px solid rgba(78,168,241,.28); }
.ep .path { font: 13.5px ui-monospace, monospace; color: var(--tx); word-break: break-all; }
.ep .req { margin-left: auto; font: 10.5px ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; color: var(--cap); border: 1px solid var(--bd); border-radius: 6px; padding: 3px 8px; }
.ep .req.key { color: var(--am); border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.08); }
.ep .req.free { color: #6EE7B7; border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.08); }
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0 0; font-size: 13.5px; border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; }
.doc-table th { text-align: left; color: var(--cap); font: 10.5px ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; padding: 10px 13px; border-bottom: 1px solid var(--bd); background: var(--thead-bg); }
.doc-table td { padding: 11px 13px; border-bottom: 1px solid var(--bd); color: var(--prose-fg); vertical-align: top; line-height: 1.55; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td.f { font: 12.5px ui-monospace, monospace; color: var(--tx); white-space: nowrap; }
.doc-table td.t { font: 12px ui-monospace, monospace; color: var(--cap); white-space: nowrap; }
.doc-table td .yes { color: #6EE7B7; font-weight: 700; }
.doc-table td .no { color: var(--cap); }
.doc-table code { font-size: 12px; }
.tabs { margin: 14px 0 0; }
.tabs .r { position: absolute; opacity: 0; pointer-events: none; }
.tabs .bar { display: inline-flex; gap: 2px; background: var(--card); border: 1px solid var(--bd); border-radius: 9px; padding: 3px; margin-bottom: 0; }
.tabs .bar label { font: 11.5px ui-monospace, monospace; color: var(--cap); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
#hero-t-curl:checked ~ .bar label[for=hero-t-curl],#hero-t-py:checked ~ .bar label[for=hero-t-py],#hero-t-node:checked ~ .bar label[for=hero-t-node]{color:var(--tx); background: var(--card-hi);}
.tabs .pane { display: none; }
#hero-t-curl:checked ~ .p-curl,#hero-t-py:checked ~ .p-py,#hero-t-node:checked ~ .p-node{display:block;}
.tabs .doc-code { margin-top: 10px; border-radius: 12px; }
.callout { margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(78,168,241,.24); background: rgba(78,168,241,.06); border-radius: 11px; color: #BCD3E6; font-size: 13.5px; line-height: 1.65; }
.callout b { color: var(--tx); }
.callout.warn { border-color: rgba(245,158,11,.28); background: rgba(245,158,11,.07); color: #FCD9A6; }
.docfoot { margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--bd); color: var(--cap); font-size: 12.5px; line-height: 1.7; }
.docfoot a { color: var(--bl); }
@media (max-width: 1320px) { .docwrap { grid-template-columns: 244px minmax(0, 1fr); } .docaside { display: none; } }
@media (max-width: 980px) { .docwrap { grid-template-columns: 1fr; gap: 18px; } .docside { position: static; max-height: none; grid-auto-flow: column; grid-auto-columns: max-content; overflow: auto; padding-bottom: 6px; border-right: 0; } .docside .grp { display: none; } .docmain p, .docmain ul, .docmain .intro, .docmain .callout, .docmain h1, .docmain h2, .docmain h3, .docmain .docfoot { max-width: none; } }


/* ---------- PREMIUM DASHBOARD ---------- */
body:has(.dbx) .nav, body:has(.dbx) .footer { display: none !important; }
body:has(.dbx) { background: #0F172A; }

.dbx { display: flex; min-height: 100vh; width: 100%; font-feature-settings: "tnum" 1; }

/* Sidebar */
.dbx-rail { position: fixed; top: 0; left: 0; bottom: 0; width: 252px; background: #0F172A; border-right: 1px solid #334155; padding: 20px 16px; display: flex; flex-direction: column; gap: 16px; z-index: 40; overflow-y: auto; }
.rail-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.rail-logo .mk { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 800 16px ui-monospace, monospace; background: #4EA8F1; }
.rail-logo b { font-size: 16px; color: #F8FAFC; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.rail-nav .grp { font: 11px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: #94A3B8; padding: 12px 10px 4px; }
.rail-nav .grp.rail-sep { border-top: 1px solid var(--bd); margin-top: 12px; padding-top: 16px; }
.rail-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #94A3B8; font-weight: 500; font-size: 13.5px; text-decoration: none; transition: all 0.2s; }
.rail-nav a:hover { color: #F8FAFC; background: #1E293B; }
.rail-nav a.on { color: #F8FAFC; background: #1E293B; box-shadow: inset 2px 0 0 #4EA8F1; border-radius: 4px 8px 8px 4px; }
.rail-nav a .ic { width: 16px; height: 16px; color: #4EA8F1; }
.rail-nav a .tg { margin-left: auto; font: 10px ui-monospace, monospace; color: #94A3B8; border: 1px solid #334155; border-radius: 4px; padding: 2px 6px; }
.rail-nav a .tg.live { color: #4EA8F1; border-color: rgba(78,168,241,0.3); background: rgba(78,168,241,0.1); }
.rail-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 16px 8px 8px; border-top: 1px solid #334155; }
.rail-user .av { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 800 14px ui-monospace, monospace; background: #4EA8F1; flex: none; }
.rail-user .who b { display: block; font-size: 13px; color: #F8FAFC; word-break: break-all; line-height: 1.3; }
.rail-user .who .row { display: flex; gap: 8px; margin-top: 6px; }
.rail-user .who .badge { font: 10px ui-monospace, monospace; color: #94A3B8; border: 1px solid #334155; border-radius: 4px; padding: 2px 6px; }
.rail-user .out { background: none; border: 0; color: #94A3B8; font: 500 12px/1 inherit; cursor: pointer; padding: 0; }
.rail-user .out:hover { color: #F8FAFC; }

/* Main Area */
.dbx-main { margin-left: 252px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 32px; background: #0F172A; border-bottom: 1px solid #334155; position: sticky; top: 0; z-index: 30; }
.topbar .sp { flex: 1; }
.topbar .btn { min-height: 36px; font-size: 13px; }
.topbar .ibtn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #334155; display: grid; place-items: center; color: #94A3B8; transition: all 0.2s; }
.topbar .ibtn:hover { color: #F8FAFC; background: #1E293B; }
.topbar .av { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 800 14px ui-monospace, monospace; background: #4EA8F1; text-decoration: none; }
.stream { padding: 32px; display: flex; flex-direction: column; gap: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* Headers */
.ovh { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 8px; }
.ovh h1 { margin: 4px 0 8px; font-size: 28px; font-weight: 700; color: #F8FAFC; }
.ovh p { color: #94A3B8; font-size: 14px; max-width: 70ch; }
.ovh .usage { text-align: right; }
.ovh .usage .k { font: 11px ui-monospace, monospace; text-transform: uppercase; color: #94A3B8; }
.ovh .usage .v { font: 14px ui-monospace, monospace; color: #F8FAFC; margin-top: 4px; }
.ovh .usage .v b { font-size: 18px; color: #4EA8F1; }

/* Cards */
.card { background: #1E293B; border: 1px solid #334155; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; box-sizing: border-box; }
.card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 16px; font-weight: 600; color: #F8FAFC; border-bottom: 1px solid #334155; padding-bottom: 12px; }
.card-h .ic { color: #4EA8F1; width: 18px; height: 18px; }
.card-h .right { margin-left: auto; display: flex; gap: 10px; }

/* Plan */
.planhero { background: linear-gradient(120deg, rgba(78,168,241,0.08), transparent), #1E293B; }
.planhero .name { font-size: 28px; font-weight: 700; color: #F8FAFC; margin-top: 4px; }
.meter { margin-top: 24px; }
.meter .lab { display: flex; justify-content: space-between; font-size: 13px; color: #94A3B8; margin-bottom: 8px; }
.meter .lab b { color: #F8FAFC; }
.meter .bar { height: 8px; border-radius: 4px; background: #0F172A; border: 1px solid #334155; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: #4EA8F1; }

/* API Keys */
.keyrow { display: flex; align-items: center; gap: 16px; border: 1px solid #334155; border-radius: 12px; padding: 16px; background: #1E293B; margin-top: 12px; box-sizing: border-box; }
.keyrow .icw { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(78,168,241,0.1); color: #4EA8F1; flex: none; }
.keyrow .tx { flex: 1; min-width: 0; }
.keyrow .tx b { font-size: 14px; color: #F8FAFC; display: block; }
.keyrow .tx span { font-size: 12px; color: #94A3B8; display: block; margin-top: 4px; }
.keyrow .num { text-align: right; }
.keyrow .num b { font: 700 16px ui-monospace, monospace; color: #F8FAFC; }
.keyrow .num span { font: 10px ui-monospace, monospace; text-transform: uppercase; color: #94A3B8; }
.kbox { display: flex; align-items: center; gap: 8px; background: #0F172A; border: 1px solid #334155; border-radius: 8px; padding: 10px 14px; margin-top: 8px; }
.kbox .kfull { flex: 1; font: 13px ui-monospace, monospace; color: #4EA8F1; white-space: nowrap; overflow-x: auto; }
.kbox .keye, .kbox .kcopy { background: #1E293B; border: 1px solid #334155; border-radius: 6px; width: 28px; height: 28px; display: grid; place-items: center; color: #94A3B8; cursor: pointer; padding: 0; }
.kbox .keye:hover, .kbox .kcopy:hover { color: #F8FAFC; border-color: #4A5056; }

/* Grid Layouts */
.row1 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: stretch; }
.row2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch; }
.row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.row5 { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: stretch; }

/* Charts */
.chart { position: relative; border: 1px solid #334155; border-radius: 8px; overflow: hidden; background: #0F172A; width: 100%; height: 240px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .gl { stroke: #334155; stroke-width: 1; }
.chart .base { stroke: #475569; stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .yl, .chart .xl { fill: #94A3B8; font: 10px ui-monospace, monospace; }
.emptyov { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 13px; color: #94A3B8; }

/* KPIs */
.kpi .top { display: flex; align-items: center; gap: 10px; }
.kpi .icw { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.kpi .icw.b { background: rgba(78,168,241,0.1); color: #4EA8F1; }
.kpi .icw.t { background: rgba(16,185,129,0.1); color: #10B981; }
.kpi .icw.g { background: rgba(245,158,11,0.1); color: #F59E0B; }
.kpi .icw.o { background: rgba(239,68,68,0.1); color: #EF4444; }
.kpi .k { font: 11px ui-monospace, monospace; text-transform: uppercase; color: #94A3B8; }
.kpi .v { margin-top: 16px; font: 700 32px ui-monospace, monospace; color: #F8FAFC; line-height: 1; }
.kpi .s { margin-top: 4px; font-size: 12px; color: #94A3B8; }

/* Teasers */
.teaser { display: flex; align-items: center; gap: 16px; }
.teaser .icw { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #0F172A; border: 1px solid #334155; color: #4EA8F1; flex: none; }
.teaser .tx b { display: block; font-size: 15px; color: #F8FAFC; }
.teaser .tx span { display: block; font-size: 13px; color: #94A3B8; margin-top: 4px; }

/* Quickstart */
.lg-r { position: absolute; opacity: 0; pointer-events: none; }
.lg-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: #0F172A; border: 1px solid #334155; border-radius: 8px; padding: 4px; margin-bottom: 16px; width: fit-content; }
.lg-tabs label { font: 12px ui-monospace, monospace; color: #94A3B8; padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.lg-tabs label:hover { color: #F8FAFC; }
#lg-curl:checked~.lg-tabs label[for=lg-curl], #lg-py:checked~.lg-tabs label[for=lg-py], #lg-node:checked~.lg-tabs label[for=lg-node], #lg-php:checked~.lg-tabs label[for=lg-php], #lg-java:checked~.lg-tabs label[for=lg-java], #lg-go:checked~.lg-tabs label[for=lg-go], #lg-res:checked~.lg-tabs label[for=lg-res]{ background: #1E293B; color: #F8FAFC; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.lg-pane { display: none; }
#lg-curl:checked~.pane-curl, #lg-py:checked~.pane-py, #lg-node:checked~.pane-node, #lg-php:checked~.pane-php, #lg-java:checked~.pane-java, #lg-go:checked~.pane-go, #lg-res:checked~.pane-res { display: block; }
.codebox { background: #0F172A; border: 1px solid #334155; border-radius: 8px; overflow: hidden; position: relative; }
.codebox pre { margin: 0; padding: 16px; color: #E2E8F0; font: 13px/1.7 ui-monospace, monospace; overflow-x: auto; }
.codebox .cp-ico { position: absolute; top: 12px; right: 12px; cursor: pointer; color: #94A3B8; opacity: 0; transition: opacity 0.2s; }
.codebox:hover .cp-ico { opacity: 1; }

/* Footer */
.dbxfoot { border-top: 1px solid #334155; padding-top: 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 24px; margin-top: 24px; }
.dbxfoot .brandcol .mk { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dbxfoot .brandcol .mk .icw { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: #4EA8F1; color: #fff; font: 800 14px monospace; }
.dbxfoot h4 { margin: 0 0 12px; font: 11px ui-monospace, monospace; text-transform: uppercase; color: #94A3B8; }
.dbxfoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dbxfoot ul a { color: #94A3B8; font-size: 13px; text-decoration: none; transition: color 0.2s; }
.dbxfoot ul a:hover { color: #F8FAFC; }
.dbxfoot .copy { grid-column: 1/-1; margin-top: 16px; padding-top: 16px; border-top: 1px solid #334155; color: #94A3B8; font-size: 12px; text-align: center; }

/* Responsive */
@media (max-width: 1024px) { .row2 { grid-template-columns: 1fr 1fr; } .dbxfoot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .dbx-rail { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid #334155; } .dbx-main { margin-left: 0; } .row1, .row3, .row5, .sbx-grid { grid-template-columns: 1fr; } .rail-nav { flex-direction: row; overflow-x: auto; } }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } .dbxfoot { grid-template-columns: 1fr; } }

[id] { scroll-margin-top: 80px; }

.dbx .ovh p { font-size: 14px; line-height: 1.7; color: var(--cap); max-width: 74ch; }
.dbx .ovh .eyebrow { display: inline-block; margin: 0 0 6px; padding: 0; border: 0; background: none; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--cap); }
.dbx .ovh .usage .k { color: var(--cap); font-size: 9.5px; }
.dbx .ovh .usage .v { color: var(--tx); font-size: 13px; }
.dbx .ovh .usage .v b { color: var(--tx); }
.dbx .card-h { font-size: 14px; font-weight: 650; letter-spacing: -.006em; color: var(--tx); margin-bottom: 10px; }
.dbx .card-h .ic { width: 15px; height: 15px; color: var(--cap); }
.dbx .sec-h h2 { font-size: 15px; font-weight: 700; letter-spacing: -.012em; color: var(--tx); }
.dbx .sec-h .link { font-size: 12.5px; color: var(--bl); }
.dbx .kpi .v { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--tx); }
.dbx .kpi .v.dim { color: var(--cap); }
.dbx .kpi .k { font-size: 10px; letter-spacing: .06em; color: var(--cap); }
.dbx .kpi .s { font-size: 12px; color: var(--cap); }
.dbx .sq .v { font-size: 24px; color: var(--tx); }
.dbx .sq .v.dim { color: var(--cap); }
.dbx .sq .s { font-size: 11.5px; color: var(--cap); }
.dbx .psub { font-size: 13px; line-height: 1.65; color: var(--cap); }
.dbx .note, .dbx .mut { font-size: 12px; color: var(--cap); }
.dbx .lbl { color: var(--cap); }
.dbx .meter .lab { color: var(--cap); }
.dbx .meter .lab b { color: var(--tx); }
.dbx .keyrow .tx b { color: var(--tx); }
.dbx .keyrow .tx span { color: var(--cap); }
.dbx .keyrow .num b { font-size: 18px; color: var(--tx); }
.dbx .keyrow .num span { color: var(--cap); }
.dbx .teaser .tx b { color: var(--tx); }
.dbx .teaser .tx span { color: var(--cap); }
.dbx .nextup .r { font-size: 13px; color: var(--tx); padding: 12px 0; }
.dbx .nextup .r small { color: var(--cap); }
.dbx .card { border-color: var(--bd); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); background: var(--card); }
.dbx .planhero { border-color: rgba(78,168,241,.15); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-md); }
.dbx .planhero .name { font-size: 30px; letter-spacing: -.028em; color: var(--tx); }
.dbx .codebox { border-color: var(--bd); background: var(--pre-bg); box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
.dbx .codebox pre { color: var(--tx); font-size: 12.5px; line-height: 1.7; }
.dbx .chart { border-color: var(--bd); background: var(--bg); box-shadow: inset 0 1px 2px rgba(0,0,0,.45); }
.dbx .chart .gl { stroke: var(--bd); }
.dbx .chart .base { stroke: var(--bd2); }
.dbx .chart .mk { stroke: var(--bl); }
.dbx .chart .yl, .dbx .chart .xl { fill: var(--cap); }
.dbx .badge, .dbx .pill { font-size: 10px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 7px; border-color: var(--bd); background: var(--card); color: var(--cap); }
.dbx .badge.ok, .dbx .pill.ok { color: var(--bl); border-color: rgba(78,168,241,.24); background: var(--bl-soft); }
.dbx .badge.man, .dbx .pill.warn { color: var(--am); border-color: rgba(245,158,11,.24); background: rgba(245,158,11,.08); }
.dbx .dbx .badge.off { color: var(--cap); }
.dbx .keyrow .icw { background: var(--bl-soft); color: var(--bl); box-shadow: inset 0 0 0 1px rgba(78,168,241,.16); }
.dbx .teaser .icw { background: var(--card); border-color: var(--bd); }
.dbx .teaser .icw .ic { color: var(--bl); }
.dbx .stream { gap: 28px; padding: 28px 32px 60px; }
.dbx .row1, .dbx .row2, .dbx .row3, .dbx .row5 { gap: 18px; }
.dbx .kpi { min-height: 118px; padding: 18px 18px 16px; }
.dbx .teaser { padding: 18px; }
.dbx .keyrow { padding: 16px 18px; }
.dbx .emptyov { color: var(--cap); font-size: 12px; }
.dbx .emptyov b { color: var(--tx); font-weight: 600; font-size: 11.5px; }
.dbx .dbx-rail { background: var(--card); border-right-color: var(--bd); box-shadow: inset -1px 0 0 var(--bd); }
.dbx .rail-logo .mk { box-shadow: 0 4px 14px rgba(78,168,241,.32); }
.dbx .rail-nav a { font-size: 13px; padding: 8px 10px; color: var(--cap); }
.dbx .rail-nav a:hover { color: var(--tx); background: var(--card-hi); }
.dbx .rail-nav a.on { color: var(--tx); background: linear-gradient(90deg, var(--bl-soft), transparent); box-shadow: inset 2px 0 0 var(--bl); }
.dbx .rail-nav a .ic { color: var(--bl); }
.dbx .rail-nav .grp { color: var(--cap); font-size: 9.5px; }
.dbx .rail-user { background: var(--card-hi); border-color: var(--bd); border-radius: 12px; padding: 12px; }
.dbx .rail-user .who b { color: var(--tx); font-size: 12px; }
.dbx .rail-user .out { color: var(--cap); }
.dbx .rail-user .out:hover { color: var(--tx); }
.dbx .topbar { padding: 11px 32px; border-bottom-color: var(--bd); background: var(--card); backdrop-filter: blur(12px); }
.dbx .topbar .btn { font-size: 12.5px; min-height: 36px; }
.dbx .ibtn { border-color: var(--bd); background: var(--card-hi); color: var(--cap); }
.dbx .ibtn:hover { color: var(--tx); border-color: var(--bd2); background: var(--card-hi); }
.dbx .meter .bar { height: 9px; border-color: var(--bd); background: var(--bg); box-shadow: inset 0 1px 3px rgba(0,0,0,.55); }
.dbx .meter .bar i { background: var(--bl); box-shadow: 0 0 12px rgba(78,168,241,.45); }
.dbx .qs-tabs { background: var(--card-hi); border-color: var(--bd); box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.dbx .qs-tabs label { color: var(--cap); font-size: 11px; padding: 6px 12px; }
#qs-curl:checked ~ .qs-tabs label[for=qs-curl],#qs-res:checked ~ .qs-tabs label[for=qs-res]{color: var(--tx); background: var(--card-hi); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset,0 2px 8px rgba(0,0,0,.4);}
.dbx .card:hover, .dbx .kpi:hover, .dbx .teaser:hover { border-color: var(--bd2); }
.dbx .kpi:hover, .dbx .teaser:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dbx .keyrow:hover { border-color: var(--bd2); box-shadow: var(--shadow-sm); }
.dbx .teaser .go, .dbx .kpi a.chev { transition: transform .18s ease, color .18s ease; }
.dbx .teaser:hover .go, .dbx .kpi:hover a.chev { transform: translateX(2px); color: var(--tx); }
.dbx-main::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 620px; background: radial-gradient(60% 90% at 26% -8%, rgba(78,168,241,.07), transparent 70%), radial-gradient(50% 80% at 100% 8%, rgba(78,168,241,.04), transparent 72%); pointer-events: none; }
.dbx .dbxfoot { border-top-color: var(--bd); padding-top: 24px; }
.dbx .dbxfoot h4 { color: var(--cap); font-size: 10px; }
.dbx .dbxfoot ul a { color: var(--cap); font-size: 12px; }
.dbx .dbxfoot ul a:hover { color: var(--tx); }
.dbx .dbxfoot .brandcol p { color: var(--cap); }
.dbx .dbxfoot .copy { color: var(--cap); border-top-color: var(--bd); }
.dbx .res a { color: var(--cap); border-color: var(--bd); font-size: 11.5px; }
.dbx .res a:hover { color: var(--tx); border-color: var(--bd2); }
.dbx a:focus-visible, .dbx button:focus-visible, .dbx label:focus-visible, .dbx input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(78,168,241,.32); border-radius: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .page-hero h1 { font-size: clamp(28px, 7vw, 40px); }
  .pcard.feature { flex-direction: column; align-items: flex-start; gap: 14px; }
  .postnav { grid-template-columns: 1fr; }
  .postnav .next { text-align: left; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Misc Utilities ---------- */
.ic { display: inline-block; vertical-align: middle; flex: none; }
.spin { display: none; width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; margin-left: 6px; }
.spin.htmx-request { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.dc-form { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.dc-form input { flex: 1 1 220px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--bd2); background: var(--field-bg); color: var(--tx); font: 13.5px ui-monospace, monospace; }
.dc-form input::placeholder { color: var(--placeholder); }
.dc-form input:focus { outline: none; border-color: var(--bl); box-shadow: 0 0 0 3px rgba(78, 168, 241, 0.2); }
.kbox { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 11px 13px; border-radius: 10px; background: #08111D; border: 1px solid var(--bd); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.kbox .kfull { flex: 1 1 auto; min-width: 0; display: block; color: #7EF0C0; font: 12.5px ui-monospace, monospace; white-space: nowrap; overflow-x: auto; word-break: normal; user-select: all; -webkit-user-select: all; }
.kbox .khide { position: absolute; opacity: 0; pointer-events: none; }
.kbox .khide:checked ~ .kfull { filter: blur(7px); user-select: none; -webkit-user-select: none; }
.kbox .keye, .kbox .kcopy { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--bd); background: var(--card); color: var(--cap); cursor: pointer; flex: none; padding: 0; text-decoration: none; transition: color 0.15s, border-color 0.15s; }
.kbox .keye:hover, .kbox .kcopy:hover { color: var(--tx); border-color: var(--bd2); }
.kbox .kcopy.copied { color: #7EF0C0; border-color: rgba(126, 240, 192, 0.4); background: rgba(126, 240, 192, 0.08); }
.kbox .kcopy, .codebox .cbx .cp-ico, .doc-code .cp-ico { position: relative; }
.copy-tip::after { content: ""; position: absolute; bottom: -4px; right: 10px; width: 8px; height: 8px; background: var(--bg); border-right: 1px solid rgba(126, 240, 192, 0.35); border-bottom: 1px solid rgba(126, 240, 192, 0.35); transform: rotate(45deg); }
/* ---------- Dashboard Quickstart Language Tabs ---------- */
.lg-r { position: absolute; opacity: 0; pointer-events: none; }
.lg-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.lg-tabs label { cursor: pointer; padding: 6px 12px; border: 1px solid var(--bd); border-radius: 8px; font-size: 12.5px; color: var(--cap); background: var(--bg); }
.lg-pane { display: none; }
.cbx { position: relative; }
.cbx pre { user-select: all; -webkit-user-select: all; }
.cbx .cp-ico { position: absolute; top: 8px; right: 10px; color: var(--cap); opacity: .85; cursor: pointer; transition: color .15s ease, opacity .15s ease; }
.codebox:hover .cp-ico { color: var(--tx); opacity: 1; }
#lg-curl:checked~.lg-tabs label[for=lg-curl],#lg-py:checked~.lg-tabs label[for=lg-py],#lg-node:checked~.lg-tabs label[for=lg-node],#lg-php:checked~.lg-tabs label[for=lg-php],#lg-java:checked~.lg-tabs label[for=lg-java],#lg-go:checked~.lg-tabs label[for=lg-go],#lg-res:checked~.lg-tabs label[for=lg-res]{background:var(--card-hi);color:var(--tx);border-color:var(--bl)}
#lg-curl:checked~.pane-curl,#lg-py:checked~.pane-py,#lg-node:checked~.pane-node,#lg-php:checked~.pane-php,#lg-java:checked~.pane-java,#lg-go:checked~.pane-go,#lg-res:checked~.pane-res{display:block}

body, .nav, .footer, .card { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }


/* ---------- Theme toggle (v2 - bulletproof) ---------- */
.theme-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  margin: 0;
  border-radius: 9px;
  border: 1px solid var(--bd2) !important;
  background: transparent !important;
  color: var(--cap) !important;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex: none;
  -webkit-appearance: none;
  appearance: none;
}
.theme-toggle:hover {
  color: var(--tx) !important;
  border-color: var(--cap) !important;
  background: var(--card-hi) !important;
}
.theme-toggle svg {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
}
.theme-toggle .icon-sun { display: none !important; }
[data-theme="light"] .theme-toggle .icon-sun { display: block !important; }
[data-theme="light"] .theme-toggle .icon-moon { display: none !important; }

/* Premium Pricing Card Hover */
.card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--bd2);
  box-shadow: var(--shadow-md);
}

/* Highlight only the "Most Popular" card */


/* Premium Docs Sidebar */
.docside a {
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s ease;
}
.docside a:hover {
  background: var(--card);
  color: var(--tx);
  border-left-color: var(--bd2);
}
.docside a.active {
  background: var(--card);
  color: var(--tx);
  border-left-color: var(--bl);
  font-weight: 600;
}
.docside .grp {
  margin-top: 8px;
  color: var(--cap);
  border-bottom: 1px solid var(--bd);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

/* Docs Copy Button */
.doc-code { position: relative; }
.cp-ico {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--cap);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--card-hi);
  border: 1px solid var(--bd);
}
.doc-code:hover .cp-ico { opacity: 1; }
.cp-ico:hover { color: var(--tx); border-color: var(--bd2); }
.cp-ico.copied { color: var(--gr); opacity: 1; }

/* Bulletproof Docs Copy Button */
.doc-code { position: relative !important; }
.doc-code .ch { padding-right: 45px !important; } /* Prevent text overlap */

.cp-ico {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  color: var(--cap);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
  z-index: 100;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--card-hi);
  border: 1px solid var(--bd);
}
.doc-code:hover .cp-ico { opacity: 1; }
.cp-ico:hover { color: var(--tx); border-color: var(--bd2); }
.cp-ico.copied { color: var(--gr); opacity: 1; }


/* ══════════════════════════════════════════════
   PREMIUM BLOG & EDITORIAL STYLES
   ══════════════════════════════════════════════ */

/* 1. Post Cards */
.pcard {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
  box-shadow: none;
}
.pcard:hover {
  transform: translateY(-3px);
  border-color: var(--bd2);
  box-shadow: var(--shadow-md);
}
.pcard h3 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}
.pcard p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--cap);
}
.pcard-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--cap);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
}
.pcard:hover h3 { color: var(--bl); }

/* 2. Featured Post */
.pcard.feature {
  background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 100%);
  border-color: var(--bd2);
  padding: 40px;
  margin-bottom: 32px;
}
.pcard.feature h3 {
  font-size: 28px;
  line-height: 1.3;
  margin: 16px 0;
}
.pcard.feature p {
  font-size: 16px;
  max-width: 80ch;
}

/* 3. Tags & Badges */
.schip {
  background: var(--bg);
  border: 1px solid var(--bd);
  color: var(--cap);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.schip:hover {
  color: var(--tx);
  border-color: var(--bd2);
}
.schip.feat-tag {
  background: var(--bl-soft);
  color: var(--bl);
  border-color: rgba(78, 168, 241, 0.3);
}

/* 4. Article Reading Experience */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0;
}
.article > header h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
  margin: 16px 0;
}
.art-sum {
  font-size: 19px;
  color: var(--cap);
  line-height: 1.6;
  margin-bottom: 32px;
}
.prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--tx);
}
.prose p {
  margin-bottom: 24px;
  color: #D4D4D8;
}
.prose h2 {
  font-size: 28px;
  margin: 48px 0 20px;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--bd);
  padding-bottom: 8px;
}
.prose h3 { font-size: 22px; margin: 36px 0 16px; }
.prose blockquote {
  border-left: 3px solid var(--bl);
  background: var(--bl-soft);
  padding: 16px 24px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
  color: var(--tx);
  font-style: italic;
}
.prose code {
  background: var(--pre-bg);
  border: 1px solid var(--bd);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-soft);
}

/* 5. Article Author Card */
.authorcard {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 48px 0;
}
.authorcard .av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bl-soft);
  border: 1px solid rgba(78, 168, 241, 0.3);
}

/* 6. Article Post Navigation (Prev / Next) */
.postnav a {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}
.postnav a:hover {
  border-color: var(--bd2);
  background: var(--card-hi);
}
.postnav span {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--bl);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.postnav b { font-size: 15px; color: var(--tx); }

/* ══════════════════════════════════════════════
   PREMIUM SPLIT-SCREEN AUTH
   ══════════════════════════════════════════════ */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg);
}
.auth-visual-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--card);
  border-left: 1px solid var(--bd);
  position: relative;
  overflow: hidden;
}
/* The glowing aura behind the visual */
.auth-visual-side::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--bl-glow) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}
.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
}
.auth-visual-content h2 {
  font-size: 32px;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--tx), var(--cap));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-visual-content p {
  font-size: 16px;
  color: var(--cap);
  line-height: 1.6;
  margin-bottom: 32px;
}
.auth-visual-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.auth-visual-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--tx);
}
.auth-visual-list svg {
  color: var(--bl);
  flex: none;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.auth-brand {
  margin-bottom: 32px;
  justify-content: flex-start;
}
.auth-card h1 { text-align: left; font-size: 28px; margin-bottom: 8px; }
.auth-sub { text-align: left; margin-bottom: 24px; }
.auth-field input {
  background: var(--card);
  border: 1px solid var(--bd);
}
.auth-field input:focus {
  background: var(--bg);
  border-color: var(--bl);
  box-shadow: 0 0 0 3px var(--bl-soft);
}
.auth-google { background: var(--card); border-color: var(--bd); color: var(--tx); }
.auth-google:hover { background: var(--card-hi); }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-visual-side { display: none; }
}

/* ══════════════════════════════════════════════
   PREMIUM MICRO-DETAILS (Scrollbars & Selection)
   ══════════════════════════════════════════════ */
::selection {
  background: var(--bl-soft);
  color: var(--tx);
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--bd);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--bd2);
}

/* Fix Browser Autofill (The Yellow Bug) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--card) inset !important;
  -webkit-text-fill-color: var(--tx) !important;
  transition: background-color 5000s ease-in-out 0s;
  border-color: var(--bd) !important;
}

/* The Mini Terminal */
.auth-terminal {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}
.auth-terminal-bar {
  background: var(--card-hi);
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--bd);
}
.auth-terminal-bar span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bd2);
}
.auth-terminal-body {
  padding: 16px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--tx);
}
.auth-terminal-body .c-key { color: var(--bl); }
.auth-terminal-body .c-str { color: #10B981; }

/* Form Container Polish */
.auth-card {
  background: var(--bg);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--bd);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ══════════════════════════════════════════════
   PERFECT SPLIT-SCREEN AUTH
   ══════════════════════════════════════════════ */

/* Hide global nav and footer on auth pages for a full-screen app feel */
body:has(.auth-split) .nav,
body:has(.auth-split) .footer {
  display: none !important;
}
body:has(.auth-split) main {
  height: 100vh;
  display: flex;
}

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg);
}

.auth-visual-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--card);
  border-left: 1px solid var(--bd);
  position: relative;
  overflow: hidden;
}

/* Subtle, premium glow instead of a harsh grid */
.auth-visual-side::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--bl-glow) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

/* Clean Form (No double box) */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.auth-brand { margin-bottom: 32px; justify-content: flex-start; }
.auth-card h1 { text-align: left; font-size: 28px; margin-bottom: 8px; }
.auth-sub { text-align: left; margin-bottom: 24px; }

/* Terminal Snippet */
.auth-terminal {
  margin-top: 40px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.8);
}
.auth-terminal-bar {
  background: var(--card-hi);
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--bd);
}
.auth-terminal-bar span {
  width: 10px; height: 10px; border-radius: 50%; background: var(--bd2);
}
.auth-terminal-body {
  padding: 20px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--tx);
}
.auth-terminal-body .c-key { color: var(--bl); }
.auth-terminal-body .c-str { color: #10B981; }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-visual-side { display: none; }
}

/* ══════════════════════════════════════════════
   PREMIUM MICRO-INTERACTIONS & ANIMATIONS
   ══════════════════════════════════════════════ */

/* 1. Smooth Page Transitions (Native App Feel) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 150ms cubic-bezier(0.4, 0, 0.2, 1) both fade-out;
}
::view-transition-new(root) {
  animation: 150ms cubic-bezier(0.4, 0, 0.2, 1) both fade-in;
}
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* 2. Premium Services Cards */
.service-card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--bd2);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 0 24px -6px var(--bl-glow);
}
.service-card h3 {
  font-size: 22px;
  margin: 16px 0 8px;
}
.service-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cap);
  flex-grow: 1;
}
.pill.ok {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.pill.warn {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* 3. Premium Error Page (404) */
.error-wrapper {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}
.error-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--bl-soft) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.error-code {
  font-size: clamp(80px, 15vw, 140px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, var(--tx) 0%, var(--cap) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}
.error-wrapper h1 {
  font-size: 28px;
  margin-bottom: 12px;
}
.error-wrapper p {
  font-size: 16px;
  color: var(--cap);
  max-width: 400px;
  margin-bottom: 32px;
}

/* ══════════════════════════════════════════════
   PREMIUM DASHBOARD OVERHAUL (Scrapfly Style)
   ══════════════════════════════════════════════ */

/* Layout & Backgrounds */
body:has(.dbx) { background: var(--bg); }
.dbx { background: var(--bg); }
.dbx-rail { background: var(--bg); border-right: 1px solid var(--bd); }
.dbx-main { background: var(--bg); }
.dbx .topbar { background: var(--bg); border-bottom: 1px solid var(--bd); }

/* Sidebar Links */
.dbx .rail-nav a { color: var(--cap); transition: all 0.2s; }
.dbx .rail-nav a:hover { background: var(--card); color: var(--tx); }
.dbx .rail-nav a.on {
  background: var(--card);
  color: var(--tx);
  border-left-color: var(--bl);
  box-shadow: inset 2px 0 0 var(--bl);
}

/* Cards */
.dbx .card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: none;
  transition: all 0.2s ease;
}
.dbx .card:hover {
  border-color: var(--bd2);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}
.dbx .planhero {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
}
.dbx .card-h { font-size: 16px; font-weight: 600; color: var(--tx); border-bottom: 1px solid var(--bd); padding-bottom: 12px; margin-bottom: 16px; }

/* API Key Box */
.dbx .keyrow {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
}
.dbx .kbox {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
}
.dbx .kbox .kfull { color: var(--bl); }
.dbx .kbox .keye, .dbx .kbox .kcopy {
  background: var(--card-hi);
  border-color: var(--bd);
}
.dbx .kbox .keye:hover, .dbx .kbox .kcopy:hover { color: var(--tx); border-color: var(--bd2); }
.dbx .keyrow .icw { background: var(--bl-soft); color: var(--bl); }

/* Quickstart Tabs */
.dbx .lg-tabs {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 4px;
}
.dbx .lg-tabs label { color: var(--cap); border-radius: 6px; padding: 6px 12px; transition: all 0.2s; }
.dbx .lg-tabs label:hover { color: var(--tx); }
#lg-curl:checked~.lg-tabs label[for=lg-curl],
#lg-py:checked~.lg-tabs label[for=lg-py],
#lg-node:checked~.lg-tabs label[for=lg-node],
#lg-php:checked~.lg-tabs label[for=lg-php],
#lg-java:checked~.lg-tabs label[for=lg-java],
#lg-go:checked~.lg-tabs label[for=lg-go],
#lg-res:checked~.lg-tabs label[for=lg-res] {
  background: var(--card-hi);
  color: var(--tx);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.dbx .codebox {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
}
.dbx .codebox pre { color: var(--tx); }

/* Charts & Meters */
.dbx .meter .bar { background: var(--bg); border: 1px solid var(--bd); }
.dbx .meter .bar i { background: var(--bl); box-shadow: 0 0 10px var(--bl-glow); }
.dbx .chart { background: var(--bg); border: 1px solid var(--bd); border-radius: 10px; }

/* KPI Cards */
.dbx .kpi .icw.b { background: var(--bl-soft); color: var(--bl); }
.dbx .kpi .icw.t { background: rgba(16, 185, 129, 0.1); color: var(--gr); }
.dbx .kpi .icw.g { background: rgba(245, 158, 11, 0.1); color: var(--am); }
.dbx .kpi .icw.o { background: rgba(239, 68, 68, 0.1); color: var(--rd); }
.dbx .kpi .v { color: var(--tx); font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.dbx .kpi .k { color: var(--cap); }

/* Footer */
.dbx .dbxfoot { border-top-color: var(--bd); }
.dbx .dbxfoot .brandcol .mk .icw { background: var(--bl); color: #fff; }
.dbx .dbxfoot ul a:hover { color: var(--bl); }

/* ══════════════════════════════════════════════
   DASHBOARD LAYOUT FIXES
   ══════════════════════════════════════════════ */

/* 1. Fix the Plan Card Stretching */
.planhero .top {
  display: flex;
  align-items: flex-start !important;
  justify-content: space-between;
  gap: 16px;
}
.planhero .btn {
  flex-shrink: 0;
  height: 40px;
}
.planhero .meter {
  margin-top: 24px;
}
.planhero .meter .bar {
  height: 10px;
  border-radius: 5px;
  background: #0F172A;
  border: 1px solid #334155;
}
.planhero .meter .bar i {
  background: #4EA8F1;
  height: 100%;
  border-radius: 5px;
}

/* 2. Fix the Teasers (Top domains / Recent errors) */
.teaser {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px;
}
.teaser .icw {
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}
.teaser .tx b {
  font-size: 15px;
  color: #F8FAFC;
}
.teaser .tx span {
  font-size: 13px;
  color: #94A3B8;
  margin-top: 4px;
  display: block;
}

/* 3. Fix the Sidebar User Text Overflow */
.rail-user .who {
  min-width: 0;
  flex: 1;
}
.rail-user .who b {
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.rail-user .who .row {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* 4. Fix the Chart Overlapping Labels */
.chart {
  height: 260px !important;
}
.chart svg {
  padding: 10px 0;
}
.chart .yl, .chart .xl {
  font-size: 11px !important;
  fill: #94A3B8 !important;
}

/* 5. Fix the KPI Cards */
.kpi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.kpi .top {
  align-items: center;
  gap: 12px;
}
.kpi .icw {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.kpi .v {
  font-size: 32px !important;
  font-weight: 700 !important;
  margin-top: 16px;
}

/* 6. Fix Codebox Copy Button */
.codebox {
  position: relative;
}
.codebox .cp-ico {
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0.5;
  cursor: pointer;
  color: #94A3B8;
}
.codebox:hover .cp-ico {
  opacity: 1;
  color: #F8FAFC;
}

/* ══════════════════════════════════════════════
   FINAL DASHBOARD POLISH (Fixing remaining bugs)
   ══════════════════════════════════════════════ */

/* 1. Fix the massive icon inside the Manage Subscription button */
.planhero .btn svg {
  width: 16px !important;
  height: 16px !important;
  flex: none;
}

/* 2. Fix the Plan Hero layout */
.planhero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px !important;
}
.planhero .top {
  display: flex;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100%;
  margin-bottom: 24px;
}
.planhero .name {
  font-size: 32px !important;
  margin-top: 4px !important;
}

/* 3. Fix the Progress Bar (Make it look like a track) */
.planhero .meter {
  margin-top: 0 !important;
}
.planhero .meter .lab {
  margin-bottom: 12px !important;
}
.planhero .meter .bar {
  height: 12px !important;
  background: #0F172A !important; /* Dark track */
  border-radius: 6px !important;
  border: 1px solid #334155 !important;
  width: 100%;
  display: block;
}
.planhero .meter .bar i {
  background: #4EA8F1 !important;
  height: 100%;
  border-radius: 6px !important;
}

/* 4. Fix the Chart Card Empty Gap */
.row1 {
  align-items: start !important;
}
.row1 .card:first-child {
  padding-bottom: 16px !important;
}
.chart {
  height: 220px !important;
  margin-top: 10px;
}

/* 5. Clean up the Account status card to match the chart height */
.statuscard {
  height: 100%;
}
/* ═══════════════════════════════════════════════════════════════════════
   LANDING PAGE (homepage) — unified into the shared design system
   Appended at end of file. Does NOT modify existing rules above.
   Every rule is scoped to .landing (except .demo-* which is shared with
   the dashboard's Live test output — fixes an existing bug there).
   ═══════════════════════════════════════════════════════════════════════ */

.landing { --max-w: 1160px; }
.landing .wrap { width: min(var(--max-w), calc(100% - 48px)); margin-inline: auto; }
.landing h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1.05; font-weight: 800; letter-spacing: -0.05em; }
.landing h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; font-weight: 750; letter-spacing: -0.04em; }
.landing h3 { font-size: 22px; line-height: 1.3; font-weight: 600; color: var(--tx); letter-spacing: -0.02em; }
.landing p { margin: 0; color: var(--cap); font-size: 17px; line-height: 1.6; }

.landing .section { padding: 120px 0; border-top: 1px solid var(--bd); }
.landing .section:first-of-type { padding-top: 120px; border-top: 1px solid var(--bd); }

.landing .hero { position: relative; padding: 110px 0 80px; text-align: center; overflow: hidden; }
.landing .hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--bd); border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--tx); background: var(--card); margin-bottom: 24px; }
.landing .hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bl); }
.landing .hero h1 { margin-bottom: 24px; }
.landing .hero h1 em { font-style: normal; color: var(--bl); }
.landing .hero p { font-size: 20px; max-width: 60ch; margin: 0 auto 40px; }
.landing .hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 64px; }

.landing .trust-strip { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 64px; opacity: 0.8; }
.landing .trust-strip p { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--cap); }
.landing .trust-logos { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; }
.landing .trust-logos svg { height: 28px !important; width: 28px !important; fill: var(--tx); opacity: 1; transition: all 0.3s ease; }
.landing .trust-logos svg:hover { fill: var(--bl); transform: scale(1.05); }

.landing .term-wrap { max-width: 1000px; margin: 0 auto; background: var(--card); border: 1px solid var(--bd); border-radius: 12px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); overflow: hidden; text-align: left; position: relative; }
.landing .term-bar { background: var(--bg); padding: 12px 16px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 10px; }
.landing .dots { display: flex; gap: 6px; }
.landing .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bd2); }
.landing .term-title { font: 12px ui-monospace, Menlo, monospace; color: var(--cap); margin-left: 8px; }
.landing .term-body { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.landing .term-body::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--bd); }
.landing .term-pane { padding: 24px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; line-height: 1.7; overflow-x: auto; position: relative; }
.landing .term-pane-label { font: 11px ui-monospace, Menlo, monospace; color: var(--cap); text-transform: uppercase; margin-bottom: 16px; letter-spacing: 0.05em; display: flex; justify-content: space-between; align-items: center; }
.landing .cmd { color: var(--tx); }
.landing .flag { color: #F472B6; }
.landing .str { color: #10B981; }
.landing .j-key { color: var(--bl); }
.landing .j-val { color: #F59E0B; }
.landing .j-bool { color: #EF4444; }

.landing .metrics { border-top: 1px solid var(--bd); border-bottom: 1px solid var(--bd); background: var(--card); padding: 48px 0; margin-top: 64px; }
.landing .metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.landing .metric { border-left: 1px solid var(--bd); padding: 0 32px; text-align: center; }
.landing .metric:first-child { border-left: 0; padding-left: 0; }
.landing .metric .v { font: 800 44px ui-monospace, Menlo, monospace; letter-spacing: -0.04em; color: var(--tx); margin-bottom: 8px; line-height: 1; }
.landing .metric .k { font: 12px ui-monospace, Menlo, monospace; color: var(--cap); text-transform: uppercase; letter-spacing: 0.1em; }

.landing .section-header { text-align: center; max-width: 640px; margin: 0 auto 72px; }
.landing .section-header h2 { margin-bottom: 16px; }
.landing .section-header p { font-size: 19px; }

.landing .feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.landing .feat-card { background: var(--card); border: 1px solid var(--bd); border-radius: 16px; padding: 32px; transition: border-color 0.2s; }
.landing .feat-card:hover { border-color: var(--bd2); }
.landing .feat-card h3 { margin-bottom: 12px; }
.landing .feat-card p { font-size: 15px; line-height: 1.6; }
.landing .feat-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--bg); color: var(--bl); display: grid; place-items: center; margin-bottom: 20px; border: 1px solid var(--bd); }

.landing .split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-bottom: 120px; }
.landing .split:last-child { margin-bottom: 0; }
.landing .split-text h3 { margin-bottom: 16px; }
.landing .split-text p { font-size: 16px; margin-bottom: 24px; }
.landing .split-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.landing .split-list li { display: flex; gap: 12px; font-size: 15px; color: var(--tx); align-items: flex-start; }
.landing .split-list svg { color: var(--bl); flex: none; margin-top: 3px; }

.landing .code-glow { background: var(--bg); border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; }
.landing .code-head { background: var(--card); padding: 12px 16px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 8px; }
.landing .code-body { padding: 32px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; line-height: 1.7; overflow-x: auto; }
.landing .c-key { color: var(--bl); }
.landing .c-str { color: #10B981; }
.landing .c-num { color: #F59E0B; }
.landing .c-bool { color: #EF4444; }

.landing .pricing { padding: 120px 0; text-align: center; border-top: 1px solid var(--bd); background: var(--card); }
.landing .pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: left; margin-top: 56px; }
.landing .price-card { background: var(--bg); border: 1px solid var(--bd); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; transition: border-color 0.2s; }
.landing .price-card:hover { border-color: var(--bd2); }
.landing .price-card.pop { border-color: var(--bl); background: var(--card); }
.landing .price-name { font: 12px ui-monospace, Menlo, monospace; color: var(--cap); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.landing .badge { background: var(--bl); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 99px; font-family: Inter, sans-serif; text-transform: none; letter-spacing: 0; font-weight: 700; position: static; top: auto; right: auto; display: inline; border: none; }
.landing .price-val { font-size: 44px; font-weight: 800; color: var(--tx); margin-bottom: 8px; line-height: 1; letter-spacing: -0.04em; }
.landing .price-val span { font-size: 16px; font-weight: 500; color: var(--cap); letter-spacing: normal; }
.landing .price-desc { font-size: 13.5px; color: var(--cap); margin-bottom: 24px; min-height: 40px; }
.landing .price-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; flex: 1; }
.landing .price-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--tx); }
.landing .price-list svg { width: 16px !important; height: 16px !important; color: var(--bl); flex: none; }

.landing .faq { padding: 120px 0; max-width: 800px; margin: 0 auto; border-top: 1px solid var(--bd); }
.landing .faq h2 { text-align: center; margin-bottom: 56px; }
.landing .faq details { border-bottom: 1px solid var(--bd); padding: 24px 0; }
.landing .faq summary { font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--tx); transition: color 0.2s; }
.landing .faq summary:hover { color: var(--bl); }
.landing .faq summary::-webkit-details-marker { display: none; }
.landing .faq summary::after { content: "+"; color: var(--cap); font-size: 20px; font-weight: 300; transition: transform 0.2s; }
.landing .faq details[open] summary::after { transform: rotate(45deg); }
.landing .faq details p { margin-top: 16px; font-size: 15px; color: var(--cap); line-height: 1.7; padding-right: 40px; }

.landing .cta-band { padding: 100px 0; text-align: center; border-top: 1px solid var(--bd); background: var(--card); }
.landing .cta-band h2 { margin-bottom: 16px; font-size: 48px; }
.landing .cta-band p { margin-bottom: 32px; font-size: 18px; }

.landing .urlpill { font: 600 12px ui-monospace, monospace; color: var(--cap); background: var(--bg); border: 1px solid var(--bd); border-radius: 7px; padding: 4px 10px; min-height: 0; }
.landing .pill { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; min-height: 0; display: inline-flex; align-items: center; }
.landing .pill.ok { color: #4EA8F1; background: rgba(78,168,241,.1); border: 1px solid rgba(78,168,241,.2); }
.landing .pill.warn { color: #F59E0B; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2); }
.landing .pill.success { color: #10B981; background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2); }

@media (max-width: 900px) {
  .landing .term-body { grid-template-columns: 1fr; }
  .landing .term-body::after { display: none; }
  .landing .term-pane:first-child { border-bottom: 1px solid var(--bd); }
  .landing .metrics-grid { grid-template-columns: 1fr 1fr; }
  .landing .metric { border-left: 0; padding: 24px 0; border-top: 1px solid var(--bd); }
  .landing .metric:nth-child(1), .landing .metric:nth-child(2) { border-top: 0; }
  .landing .feat-grid { grid-template-columns: 1fr; gap: 40px; }
  .landing .split { grid-template-columns: 1fr; gap: 40px; }
  .landing .split:nth-child(even) { display: flex; flex-direction: column-reverse; }
  .landing .pricing-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .landing .pricing-grid { grid-template-columns: 1fr; }
}

/* Demo output — global (not scoped) because _demo_out.html also renders
   inside the dashboard's Live test section. Fixes an existing bug there. */
.demo-card { margin-top: 0; }
.demo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.demo-head .pill { margin-left: auto; }
.demo-json { background: var(--bg); border: 1px solid var(--bd); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.demo-json pre { margin: 0; padding: 20px; max-height: none; overflow: auto; font-family: ui-monospace, monospace; font-size: 13.5px; line-height: 1.7; color: var(--tx); }
.demo-note { font-size: 12.5px; color: var(--cap); margin: 12px 2px 0; display: flex; gap: 6px; align-items: flex-start; }
.demo-note b { color: var(--tx); }
.demo-note svg { color: var(--bl); flex: none; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   SESSION 3 — Premium visual layer
   ═══════════════════════════════════════════════════════════════════════ */


/* 2 — Hero ambient mesh gradient */
.landing .hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 0%, var(--bl-soft), transparent 70%),
    radial-gradient(45% 40% at 15% 40%, rgba(16,185,129,0.05), transparent 70%);
}

/* 3 — Display font (Space Grotesk, graceful fallback to Inter) */

/* 4 — Grain overlay (skips dashboard) */
body:not(:has(.dbx))::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  z-index: 1; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 5 — Copy button visible on touch devices */
.cp-ico { opacity: 0.4 !important; }
.doc-code:hover .cp-ico,
.codebox:hover .cp-ico,
.doc-code .cp-ico:focus-visible,
.codebox .cp-ico:focus-visible { opacity: 1 !important; }

/* Session 4: pricing lift + card hover + onboarding strip */
.landing .price-card.pop {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -20px var(--bl-glow), 0 0 32px -8px var(--bl-glow);
}
.landing .price-card.pop:hover { transform: translateY(-10px); }


.pcard:hover { border-color: var(--bl); }

.onboarding-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin: 0 auto 40px; max-width: 820px;
}
.ob-step {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border: 1px solid var(--bd);
  border-radius: 12px; background: var(--card);
  color: var(--cap); font-size: 14px;
}
.ob-num {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bl-soft); color: var(--bl);
  font-family: ui-monospace, monospace; font-weight: 700;
  font-size: 13px; flex: none;
}
.ob-step a { color: var(--tx); font-weight: 600; }
.ob-step a:hover { color: var(--bl); }
@media (max-width: 768px) { .onboarding-strip { grid-template-columns: 1fr; } }

/* Fix pricing card alignment (button sticks to bottom) */
.grid .card {
  display: flex;
  flex-direction: column;
}
.grid .card .list {
  flex-grow: 1;
}
.grid .card > .btn {
  margin-top: auto;
}

/* Footer social row (added — non-destructive) */
.footer-social { display: flex; gap: 10px; justify-content: center; margin: 4px 0 20px; flex-wrap: wrap; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--cap); border: 1px solid var(--bd); transition: color .15s ease, border-color .15s ease, background .15s ease; }
.footer-social a:hover { color: var(--tx); border-color: var(--bd2); background: var(--card-hi); }
.footer-social a .ic { width: 16px; height: 16px; }

/* Active nav state (added — non-destructive) */
.nav-links a.is-active { color: var(--tx); }
.nav-links a.is-active::after { right: 0; }

/* Landing metric captions (added — non-destructive) */
.landing .metric-sub { font-size: 11.5px; color: var(--cap); margin-top: 6px; line-height: 1.4; letter-spacing: 0; }

/* Landing stack strip (added — non-destructive) */
.landing .stack-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: -32px auto 40px; max-width: 720px; font-size: 13px; }
.landing .stack-strip .muted { margin-right: 6px; font-size: 12.5px; }
.landing .stack-strip .urlpill { font-size: 11.5px; }

/* ══════════════════════════════════════════════════════════════
   Dashboard card CSS — completes 5 unstyled templates
   (added — non-destructive, no existing rule modified)
   ══════════════════════════════════════════════════════════════ */

/* Account status card — .statlist / .dotk / .sk / .sv */
.dbx .statlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.dbx .statlist li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--bd); font-size: 13px; }
.dbx .statlist li:last-child { border-bottom: 0; padding-bottom: 0; }
.dbx .statlist .dotk { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--cap); }
.dbx .statlist .dotk.live { background: var(--gr); box-shadow: 0 0 6px var(--gr); }
.dbx .statlist .dotk.manual { background: var(--am); }
.dbx .statlist .dotk.none { background: var(--bd2); }
.dbx .statlist .sk { color: var(--cap); font-size: 13px; }
.dbx .statlist .sv { margin-left: auto; color: var(--tx); font-size: 13px; font-weight: 600; font-family: ui-monospace, monospace; }

/* Chart legend — .legend / .ln */
.dbx .legend { display: flex; flex-wrap: wrap; gap: 16px; margin: -4px 0 10px; font-size: 12px; color: var(--cap); }
.dbx .legend > span { display: inline-flex; align-items: center; gap: 6px; }
.dbx .legend .ln { width: 10px; height: 10px; border-radius: 50%; background: var(--bl); flex: none; display: inline-block; }
.dbx .legend .ln.pay { background: var(--bl); }

/* Empty state — .dbx-empty */
.dbx .dbx-empty { margin: 0; padding: 20px; color: var(--cap); font-size: 13px; line-height: 1.6; text-align: center; background: var(--bg); border: 1px dashed var(--bd); border-radius: 10px; }

/* Account card — .kv definition list */
.dbx .kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0 0 14px; font-size: 13px; }
.dbx .kv dt { color: var(--cap); font-weight: 500; }
.dbx .kv dd { margin: 0; color: var(--tx); font-weight: 600; word-break: break-all; }

/* Sandbox grid base — 2-column on desktop */
.sbx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .sbx-grid { grid-template-columns: 1fr; } }

/* Static teaser — disable hover lift (they aren't clickable) */
.dbx .teaser.is-static:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--bd); }

/* ══════════════════════════════════════════════════════════════
   Sprint 3 additions — hero tabs, code cards, compliance, pricing
   (all additive, no existing rules modified)
   ══════════════════════════════════════════════════════════════ */

/* Hero code tabs wrapper */
.landing .hero-tabs { max-width: 760px; margin: 40px auto 48px; padding: 0 24px; }
.landing .hero-tabs .tabs { margin: 0; }
.landing .hero-tabs .tabs .bar { margin: 0 auto; display: flex; justify-content: center; width: fit-content; }
.landing .hero-tabs .tabs .pane { padding-top: 12px; }

/* Mini-code blocks in feature cards */
.landing .code-mini { background: var(--bg); border: 1px solid var(--bd); border-radius: 8px; padding: 10px 12px; font: 12px/1.5 ui-monospace, Menlo, monospace; color: var(--tx); overflow-x: auto; margin: 14px 0 0; white-space: pre; }
.landing .code-mini code { color: var(--tx); background: none; border: 0; padding: 0; font: inherit; }

/* Compliance strip */
.landing .compliance-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto; padding: 8px 24px 24px; max-width: 900px; }
.landing .compliance-strip .pill { font-size: 11.5px; padding: 5px 12px; }

/* Pricing struck-through original */
.price-strike { color: var(--cap); text-decoration: line-through; font-size: 22px; font-weight: 600; margin-right: 8px; opacity: 0.65; vertical-align: middle; }

/* Fix landing tabs for 6 languages and left-aligned code */
.landing .hero-tabs .tabs .bar { flex-wrap: wrap; width: auto; max-width: 100%; }
.landing .hero-tabs .code-body { text-align: left; }
.landing #hero-t-php:checked ~ .bar label[for=hero-t-php],
.landing #hero-t-java:checked ~ .bar label[for=hero-t-java],
.landing #hero-t-go:checked ~ .bar label[for=hero-t-go] { color: var(--tx); background: var(--card-hi); }
.landing #hero-t-php:checked ~ .p-php,
.landing #hero-t-java:checked ~ .p-java,
.landing #hero-t-go:checked ~ .p-go { display: block; }

/* ══════════════════════════════════════════════════════════════
   Sprint 5: Premium Visuals & Safe Layout Fixes
   (All additive, no existing rules removed)
   ══════════════════════════════════════════════════════════════ */

/* 1. Hero Terminal Glow */
.landing .term-wrap { box-shadow: 0 20px 40px -20px rgba(0,0,0,.5), 0 0 40px -10px var(--bl-glow); }

/* 2. Demo Section (responsive padding) */
.landing .demo-section { background: var(--card); border: 1px solid var(--bd); border-radius: 16px; padding: 40px; box-shadow: 0 0 60px -20px var(--bl-glow); max-width: 100%; margin: 0 auto; }
@media (max-width: 900px) { .landing .demo-section { padding: 24px; } }

/* 3. Demo JSON Scrolling (fixes 500px wall of text) */
.demo-json { max-height: 400px; overflow-y: auto; scrollbar-width: thin; margin-bottom: 12px; }
.demo-json pre { max-height: none; padding: 20px; font-size: 13.5px; }
.demo-json pre code { font-size: 13.5px; }

/* 4. Mobile Pricing Badge Overlap Fix */
@media (max-width: 900px) { 
  .landing .badge { position: static; display: inline-block; margin-bottom: 8px; }
  .card .badge { position: static; display: inline-block; margin-bottom: 8px; }
}

/* 5. Hero Tab Copy Button */
.landing .hero-tabs .cp-ico { opacity: 0.6; margin-left: auto; position: static !important; border: none !important; background: transparent !important; padding: 0 !important; width: 24px !important; height: 24px !important; display: grid !important; place-items: center; cursor: pointer; }
.landing .hero-tabs .cp-ico:hover { color: var(--tx); opacity: 1; }
.landing .hero-tabs .code-head { display: flex; align-items: center; width: 100%; }

/* Fix badge dots (Live test, Sandbox, Account) */
.dbx .badge .dotk { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--gr); box-shadow: 0 0 4px var(--gr); }
.dbx .badge .dotk.none { background: var(--cap); box-shadow: none; }
.dbx .badge .dotk.manual { background: var(--am); box-shadow: 0 0 4px var(--am); }

/* Docs 6-language quickstart tabs */
.docmain #doc-t-curl:checked ~ .bar label[for=doc-t-curl],
.docmain #doc-t-py:checked ~ .bar label[for=doc-t-py],
.docmain #doc-t-node:checked ~ .bar label[for=doc-t-node],
.docmain #doc-t-php:checked ~ .bar label[for=doc-t-php],
.docmain #doc-t-java:checked ~ .bar label[for=doc-t-java],
.docmain #doc-t-go:checked ~ .bar label[for=doc-t-go] { color: var(--tx); background: var(--card-hi); }

.docmain #doc-t-curl:checked ~ .p-curl,
.docmain #doc-t-py:checked ~ .p-py,
.docmain #doc-t-node:checked ~ .p-node,
.docmain #doc-t-php:checked ~ .p-php,
.docmain #doc-t-java:checked ~ .p-java,
.docmain #doc-t-go:checked ~ .p-go { display: block; }

/* Premium polish: pulsing live indicator in hero badge */
@keyframes hero-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--bl-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
.landing .hero-badge .dot { animation: hero-dot-pulse 2.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .landing .hero-badge .dot { animation: none; } }

/* Premium polish: feature cards get the same hover lift as blog cards */
.landing .feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--bd2); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }

/* Premium polish: less aggressive negative margin on stack strip */
.landing .stack-strip { margin: 8px auto 40px; }

/* Premium polish: clear disabled button state */
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:disabled:hover, .btn[disabled]:hover { transform: none; box-shadow: none; }

/* Premium polish: styled scrollbars inside code blocks */
.demo-json::-webkit-scrollbar { width: 8px; height: 8px; }
.demo-json::-webkit-scrollbar-track { background: var(--bg); border-radius: 4px; }
.demo-json::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 4px; }
.demo-json::-webkit-scrollbar-thumb:hover { background: var(--cap); }
.demo-json { scrollbar-color: var(--bd2) var(--bg); scrollbar-width: thin; }

/* ══════════════════════════════════════════════════════════════
   Fix Docs Table Cell Widths (Prevent stretching from long text)
   ══════════════════════════════════════════════════════════════ */

/* Force fixed layout and wrap long words */
.doc-table { table-layout: fixed; width: 100%; }
.doc-table th, .doc-table td { word-wrap: break-word; overflow-wrap: break-word; }

/* 2-Column Table (Status at a glance) */
.doc-table th:first-child:nth-last-child(2) { width: 75%; }
.doc-table th:last-child:nth-child(2) { width: 25%; }

/* 3-Column Tables (Response schema, Errors) */
.doc-table th:first-child:nth-last-child(3) { width: 25%; }
.doc-table th:nth-child(2):nth-last-child(2) { width: 20%; }
.doc-table th:last-child:nth-child(3) { width: 55%; }

/* 4-Column Table (Request body) */
.doc-table th:first-child:nth-last-child(4) { width: 20%; }
.doc-table th:nth-child(2):nth-last-child(3) { width: 15%; }
.doc-table th:nth-child(3):nth-last-child(2) { width: 10%; }
.doc-table th:last-child:nth-child(4) { width: 55%; }

/* Fix Table Column Widths (Override nowrap from earlier rules) */
.doc-table td.f, .doc-table td.t { white-space: normal !important; word-break: break-word; }

/* Specific column widths for 3-column tables (Schema, Errors) */
.doc-table th:first-child:nth-last-child(3),
.doc-table td:first-child:nth-last-child(3) { width: 28% !important; }
.doc-table th:nth-child(2):nth-last-child(2),
.doc-table td:nth-child(2):nth-last-child(2) { width: 18% !important; }
.doc-table th:last-child:nth-child(3),
.doc-table td:last-child:nth-child(3) { width: 54% !important; }

/* Specific column widths for 4-column tables (Request body) */
.doc-table th:first-child:nth-last-child(4),
.doc-table td:first-child:nth-last-child(4) { width: 15% !important; }
.doc-table th:nth-child(2):nth-last-child(3),
.doc-table td:nth-child(2):nth-last-child(3) { width: 12% !important; }
.doc-table th:nth-child(3):nth-last-child(2),
.doc-table td:nth-child(3):nth-last-child(2) { width: 15% !important; }
.doc-table th:last-child:nth-child(4),
.doc-table td:last-child:nth-child(4) { width: 58% !important; }

/* ══════════════════════════════════════════════════════════════
   Docs Organization: Overview list and Schema spacing
   ══════════════════════════════════════════════════════════════ */

/* Overview list block */
.docmain .ov-list { display: flex; flex-direction: column; gap: 16px; margin: 16px 0 24px; }
.docmain .ov-item { background: var(--card); border: 1px solid var(--bd); border-radius: 10px; padding: 16px; }
.docmain .ov-item b { display: block; color: var(--tx); font-size: 14px; margin-bottom: 4px; }
.docmain .ov-item p { margin: 0; font-size: 13.5px; line-height: 1.6; }

/* Schema tables separation */
.docmain .schema-block { margin-bottom: 40px; }
.docmain .schema-block:last-child { margin-bottom: 0; }
.docmain .schema-block h3 { margin-top: 0; border-bottom: 1px solid var(--bd); padding-bottom: 8px; margin-bottom: 12px; }

/* ══════════════════════════════════════════════════════════════
   Premium Docs Layout Fixes (Errors Table, Endpoints, Status)
   ══════════════════════════════════════════════════════════════ */

/* 1. Compact the Errors Table (so it doesn't stretch 1000px wide) */
#errors .doc-table { max-width: 800px; margin-inline: auto; }
#errors .doc-table th:nth-child(1), #errors .doc-table td:nth-child(1) { width: 15%; text-align: center; }
#errors .doc-table th:nth-child(2), #errors .doc-table td:nth-child(2) { width: 35%; }
#errors .doc-table th:nth-child(3), #errors .doc-table td:nth-child(3) { width: 50%; }

/* 2. Premium Endpoint Headers (Make them look like distinct cards) */
.docmain .ep {
  background: var(--card);
  border: 1px solid var(--bd);
  padding: 12px 18px;
  border-radius: 10px;
  margin-top: 40px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.docmain .ep .path { font-weight: 600; font-size: 14.5px; }
.docmain .ep .m { padding: 4px 10px; font-size: 11px; letter-spacing: 0.5px; }
.docmain .ep .req { margin-left: auto; }

/* 3. Fix Status Table Widths (Prevent long text from breaking layout) */
#status .doc-table th:nth-child(1), #status .doc-table td:nth-child(1) { width: 70%; }
#status .doc-table th:nth-child(2), #status .doc-table td:nth-child(2) { width: 30%; text-align: right; }

/* Fix Errors Table: Tight status column, wide text columns */
#errors .doc-table {
  table-layout: fixed !important;
  width: 100% !important;
}
#errors .doc-table th:nth-child(1),
#errors .doc-table td:nth-child(1) {
  width: 80px !important; /* Tight width for 200, 401, etc. */
  text-align: center !important;
}
#errors .doc-table th:nth-child(2),
#errors .doc-table td:nth-child(2) {
  width: 35% !important; /* Meaning */
}
#errors .doc-table th:nth-child(3),
#errors .doc-table td:nth-child(3) {
  width: auto !important; /* What to do takes the rest */
}

/* FIX: Override previous Errors table CSS - Force 1-line rows */
#errors .doc-table {
  table-layout: auto !important;
  width: 100% !important;
  max-width: none !important; /* Remove the 800px limit */
}
#errors .doc-table th:nth-child(1),
#errors .doc-table td:nth-child(1) {
  width: 1% !important;       /* Forces column to shrink to content */
  white-space: nowrap !important; /* Prevents wrapping */
  text-align: center !important;
}
#errors .doc-table th:nth-child(2),
#errors .doc-table td:nth-child(2) {
  width: 35% !important;      /* Gives Meaning plenty of space */
}
#errors .doc-table th:nth-child(3),
#errors .doc-table td:nth-child(3) {
  width: auto !important;     /* Rest of the space */
}

/* ══════════════════════════════════════════════════════════════
   THE FINAL FIX: Errors Table (Force full width, 1-line rows)
   ══════════════════════════════════════════════════════════════ */
.docmain #errors .doc-table {
    width: 100% !important;
    max-width: 100% !important; /* Overrides the 800px mistake */
    margin: 0 !important;       /* Removes the centering */
    table-layout: auto !important;
}

/* 1. Status Column: Tiny and centered */
.docmain #errors .doc-table th:nth-child(1),
.docmain #errors .doc-table td:nth-child(1) {
    width: 1% !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* 2 & 3. Meaning and What to do: Force single line */
.docmain #errors .doc-table th:nth-child(2),
.docmain #errors .doc-table td:nth-child(2),
.docmain #errors .doc-table th:nth-child(3),
.docmain #errors .doc-table td:nth-child(3) {
    white-space: nowrap !important; /* Forces the text to stay on one line */
}

/* =========================================================
   THE DEFINITIVE FIX FOR ERRORS TABLE (Overrides everything)
   ========================================================= */

/* 1. Target the table using sibling selector (~) */
.docmain h2#errors ~ table.doc-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important; /* Let it size based on content */
    margin-top: 16px !important;
}

/* 2. Status Column: Tiny (1%), centered, no wrap */
.docmain h2#errors ~ table.doc-table th:nth-child(1),
.docmain h2#errors ~ table.doc-table td:nth-child(1) {
    width: 1% !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 3. Meaning and What to do Columns: Forced to single line */
.docmain h2#errors ~ table.doc-table th:nth-child(2),
.docmain h2#errors ~ table.doc-table td:nth-child(2),
.docmain h2#errors ~ table.doc-table th:nth-child(3),
.docmain h2#errors ~ table.doc-table td:nth-child(3) {
    white-space: nowrap !important; /* Forces single line, no wrapping */
}

/* Make the Enterprise pricing card stack on mobile */
@media (max-width: 768px) {
  .grid > .card[style*="grid-column: 1 / -1"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .grid > .card[style*="grid-column: 1 / -1"] > div:last-child {
    text-align: left !important;
    margin-left: 0 !important;
    margin-top: 20px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   FINAL: 5-column pricing grid (Free, Starter, Growth, Pro, Scale)
   ══════════════════════════════════════════════════════════════ */
.pricing-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 20px;
}

/* Enterprise banner spans full width */
.pricing-grid-5 > .card:last-child {
  grid-column: 1 / -1 !important;
}

/* Responsive: 3 columns on tablet */
@media (max-width: 1200px) {
  .pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
}

/* Responsive: 2 columns on smaller tablet */
@media (max-width: 900px) {
  .pricing-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

/* Responsive: 1 column on mobile */
@media (max-width: 600px) {
  .pricing-grid-5 { grid-template-columns: 1fr; }
  /* Enterprise card already stacks properly via existing flex rules */
}


/* ══════════════════════════════════════════════════════════════
   DEFINITIVE PREMIUM PRICING LAYOUT (5 Columns)
   ══════════════════════════════════════════════════════════════ */

/* 1. Container constraint: 1150px is the sweet spot for 5 cards */
.grid.pricing-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 20px;
  align-items: stretch; /* Make all cards same height */
}

/* 2. Card padding and layout */
.grid.pricing-grid-5 > .card {
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 3. Fix the Price text alignment (struck-through, main price, /mo) */
.grid.pricing-grid-5 .price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 40px;
  margin-bottom: 8px;
}
.grid.pricing-grid-5 .price s {
  font-size: 16px;
  opacity: 0.5;
  margin-right: 2px;
}
.grid.pricing-grid-5 .price span:not(.per) {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.grid.pricing-grid-5 .per {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.7;
}

/* 4. Tighten list spacing to keep cards from getting too tall */
.grid.pricing-grid-5 .list {
  margin: 12px 0;
  padding-left: 16px;
}
.grid.pricing-grid-5 .list li {
  font-size: 13.5px;
  margin-bottom: 6px;
  line-height: 1.4;
}

/* 5. Push buttons to the bottom of the cards */
.grid.pricing-grid-5 > .card > .btn {
  margin-top: auto;
  width: 100%;
  font-size: 14px;
  padding: 12px;
}

/* 6. The Enterprise Banner */
.grid.pricing-grid-5 > .card:last-child {
  grid-column: 1 / -1 !important;
  margin-top: 10px;
}

/* 7. Responsive Breakpoints */
@media (max-width: 1200px) {
  .grid.pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid.pricing-grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid.pricing-grid-5 { grid-template-columns: 1fr; }
}




/* Premium Lift for the Most Popular card */
.card.popular {
  border-color: var(--bl);
  box-shadow: 0 24px 48px -20px var(--bl-glow), 0 0 32px -8px var(--bl-glow);
  transform: translateY(-8px);
  position: relative;
  z-index: 2;
}
.card.popular:hover {
  transform: translateY(-10px);
}


/* ══════════════════════════════════════════════════════════════
   DEFINITIVE PRICING LAYOUT: Proportionally Scaled & Balanced
   ══════════════════════════════════════════════════════════════ */

/* 1. Widen the container for 5 cards to breathe */
.pricing-page-container {
  width: min(1200px, calc(100% - 40px)) !important;
  max-width: 1200px !important;
  margin-inline: auto !important;
}

/* 2. Grid setup: Equal heights for all cards */
.grid.pricing-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: stretch; /* Forces equal height */
  margin-top: 24px;
}

/* 3. Card internal layout (Balanced padding, flexbox for buttons) */
.grid.pricing-grid-5 > .card {
  display: flex;
  flex-direction: column;
  padding: 28px 20px; /* Balanced width/height padding */
  min-width: 0; /* Prevents overflow */
}

/* 4. Price layout: No wrapping, perfect baseline alignment */
.grid.pricing-grid-5 .price {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  margin-bottom: 16px;
}
.grid.pricing-grid-5 .price s {
  font-size: 16px;
  opacity: 0.5;
  margin-right: 4px;
}
.grid.pricing-grid-5 .price span:not(.per) {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.grid.pricing-grid-5 .per {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 4px;
}

/* 5. Push content to fill space naturally */
.grid.pricing-grid-5 .list {
  flex-grow: 1; /* Makes the list take up available height */
  margin-bottom: 24px; /* Space before the button */
}
.grid.pricing-grid-5 .list li {
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* 6. Button at the bottom */
.grid.pricing-grid-5 > .card > .btn {
  margin-top: auto;
  width: 100%;
}

/* 7. Premium Lift for the Most Popular card */
.card.popular {
  border-color: var(--bl);
  box-shadow: 0 24px 48px -20px var(--bl-glow), 0 0 32px -8px var(--bl-glow);
  transform: translateY(-8px);
  position: relative;
  z-index: 2;
}
.card.popular:hover {
  transform: translateY(-10px);
}

/* 8. Responsive wrapping */
@media (max-width: 1200px) {
  .grid.pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .card.popular { transform: none; }
}
@media (max-width: 900px) {
  .grid.pricing-grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid.pricing-grid-5 { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   FIX: Scale Card Wrapping on Yearly View
   (Applies uniformly to all cards to maintain consistency)
   ══════════════════════════════════════════════════════════════ */

/* 1. Reduce padding slightly to give text more horizontal room */
.grid.pricing-grid-5 > .card {
  padding: 24px 14px !important;
}

/* 2. Force price container to stay on one line */
.grid.pricing-grid-5 .price {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  gap: 2px !important;
  min-height: 36px;
}

/* 3. Reduce struck-through price size */
.grid.pricing-grid-5 .price s {
  font-size: 14px !important;
  opacity: 0.5 !important;
}

/* 4. Reduce main price size (Overrides the 30px inline style) */
.grid.pricing-grid-5 .price span:not(.per) {
  font-size: 24px !important; 
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

/* 5. Reduce /mo text size (Overrides the 16px inline style) */
.grid.pricing-grid-5 .per {
  font-size: 12px !important;
  font-weight: 500 !important;
  opacity: 0.7 !important;
  margin-left: 2px !important;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM BADGES & RIBBONS
   ══════════════════════════════════════════════════════════════ */

/* 1. The Premium Save X% Badge (Soft Green) */
.grid.pricing-grid-5 .badge {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10B981 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* 2. The Floating "Most Popular" Ribbon */
.card.popular {
  position: relative;
  overflow: visible; /* Allows the ribbon to break out of the card */
}

.popular-ribbon {
  position: absolute;
  top: -14px; /* Floats halfway off the top edge */
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--bl), #2563EB);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(78, 168, 241, 0.4);
  white-space: nowrap;
  z-index: 10;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM PRICING CARDS (Airy spacing & Custom Checkmarks)
   ══════════════════════════════════════════════════════════════ */

/* 1. Give the cards more internal breathing room */
.grid.pricing-grid-5 > .card {
  padding: 32px 24px !important;
}

/* 2. Style the list container */
.grid.pricing-grid-5 .list {
  list-style: none !important; /* Remove default dots */
  padding: 0 !important;
  margin: 24px 0 32px 0 !important;
  flex-grow: 1;
}

/* 3. Create the premium checkmark */
.grid.pricing-grid-5 .list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 16px !important; /* Space between lines */
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--prose-fg);
}
.grid.pricing-grid-5 .list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--gr); /* Green checkmark */
  font-weight: 800;
  font-size: 14px;
}

/* 4. Make the 'Buffer' text pop slightly */
.grid.pricing-grid-5 .list li:first-child {
  color: var(--tx);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   SUBTLE REQUEST BUFFER NOTE (Secondary text)
   ══════════════════════════════════════════════════════════════ */

/* Style the buffer note to look like a subtle footnote */
.grid.pricing-grid-5 .list li.buffer-note {
  font-size: 11.5px !important;
  color: var(--cap) !important;
  font-style: italic;
  opacity: 0.8;
  margin-top: 8px !important;
}

/* Remove the green checkmark from the buffer note to keep it subtle */
.grid.pricing-grid-5 .list li.buffer-note::before {
  content: "•";
  color: var(--cap) !important;
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM "NO CARD" BADGE (Free Plan)
   ══════════════════════════════════════════════════════════════ */

.badge-no-card {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gr);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}


/* ══════════════════════════════════════════════════════════════
   CLEAN BILLING TEXT (Replaces the boxy tags)
   ══════════════════════════════════════════════════════════════ */

.billed-text {
  font-size: 12.5px;
  color: var(--cap);
  margin-top: 2px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM BILLING SUBTITLE
   ══════════════════════════════════════════════════════════════ */

.billing-sub {
  font-size: 12.5px;
  color: var(--cap);
  margin-top: 4px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM BILLING SUBTITLE
   ══════════════════════════════════════════════════════════════ */

.billing-sub {
  font-size: 12.5px;
  color: var(--cap);
  margin-top: 4px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════════════════════
   CRYSTAL CLEAR BILLING SUBTITLE
   ══════════════════════════════════════════════════════════════ */

.billing-sub {
  font-size: 13px;
  color: var(--cap);
  margin-top: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.billing-sub strong {
  color: var(--tx);
  font-weight: 700;
}

/* Force the billing subtitle to stay on one line and look premium */
.billing-sub {
  white-space: nowrap !important;
  font-size: 12px !important; /* Slightly smaller to guarantee it fits */
  letter-spacing: 0 !important;
}





/* Clean Billing Text */
.billing-sub {
  font-size: 13px;
  color: var(--cap);
  margin-top: 4px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap !important;
}

.billing-sub strong {
  color: var(--tx);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════
   FIX: TIGHTEN FEATURE LIST SPACING & ALIGNMENT
   ══════════════════════════════════════════════════════════════ */

/* 1. Remove the huge gap between credits and the list */
.grid.pricing-grid-5 .muted.eff {
  margin-bottom: 0 !important;
}

/* 2. Decrease the top margin of the list */
.grid.pricing-grid-5 .list {
  margin-top: 12px !important; /* Was 24px */
  margin-bottom: 24px !important;
  padding-left: 0 !important;
}

/* 3. Ensure the list text aligns perfectly with the left edge */
.grid.pricing-grid-5 .list li {
  padding-left: 22px !important; /* Space for the checkmark */
  margin-bottom: 12px !important; /* Tighter spacing between items */
}


/* ══════════════════════════════════════════════════════════════
   Tier Animations — Scroll Reveal & Back-to-Top
   ══════════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

#back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 12px; background: var(--card); color: var(--tx); border: 1px solid var(--bd); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, border-color .2s; z-index: 90; box-shadow: var(--shadow-md); }
#back-to-top.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { border-color: var(--bd2); background: var(--card-hi); }


/* ══════════════════════════════════════════════════════════════
   Demo Shimmer Loading State
   ══════════════════════════════════════════════════════════════ */
#demo-out { transition: opacity 0.3s ease; }
#demo-out.htmx-request {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
#demo-out.htmx-request > * {
  visibility: hidden; /* Hides the old JSON while loading */
}
#demo-out.htmx-request::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--card) 25%, var(--bd) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  visibility: visible;
}
#demo-out.htmx-request::after {
  content: "Fetching live data...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--tx);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  visibility: visible;
  z-index: 2;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ══════════════════════════════════════════════════════════════
   Premium Demo Layout Fixes
   ══════════════════════════════════════════════════════════════ */
.demo-result { background: var(--bg); border: 1px solid var(--bd); border-radius: 12px; padding: 24px; text-align: left; min-height: 200px; transition: opacity 0.3s ease; }
.demo-json { background: var(--pre-bg); border: 1px solid var(--bd); border-radius: 10px; overflow: hidden; margin-top: 16px; max-height: 450px; overflow-y: auto; }
.demo-json pre { margin: 0; padding: 20px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; line-height: 1.7; color: var(--tx); }
.demo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
.demo-note { font-size: 13px; color: var(--cap); margin: 16px 0 0; display: flex; gap: 8px; align-items: center; }


/* ══════════════════════════════════════════════════════════════
   Scroll Progress Bar
   ══════════════════════════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--bl);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--bl-glow);
}


/* ══════════════════════════════════════════════════════════════
   FIX PRICING LIGHT MODE (Overrides leaked dashboard styles)
   ══════════════════════════════════════════════════════════════ */
.grid.pricing-grid-5 > .card {
    background-color: var(--card) !important;
    color: var(--tx) !important;
    border-color: var(--bd) !important;
}
.grid.pricing-grid-5 > .card.popular {
    border-color: var(--bl) !important;
}
.grid.pricing-grid-5 > .card h2,
.grid.pricing-grid-5 > .card .price {
    color: var(--tx) !important;
}
.grid.pricing-grid-5 > .card .muted {
    color: var(--cap) !important;
}
/* Fix the separator line to match the theme */
.grid.pricing-grid-5 > .card div[style*="height: 1px"] {
    background-color: var(--bd) !important;
}
/* Fix the badge colors for light mode */
.grid.pricing-grid-5 > .card .pill.ok {
    color: var(--bl) !important;
    background: var(--bl-soft) !important;
    border-color: rgba(78, 168, 241, 0.3) !important;
}


/* ══════════════════════════════════════════════════════════════
   PREMIUM PRICING MICRO-INTERACTIONS
   ══════════════════════════════════════════════════════════════ */
   
/* 1. Smooth hover lift for all cards */
.grid.pricing-grid-5 > .card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}
.grid.pricing-grid-5 > .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--bd2);
}

/* 2. Make the Pro card pop with a subtle glow (respects light/dark mode) */
.grid.pricing-grid-5 > .card.popular {
    box-shadow: 0 0 24px -6px var(--bl-glow);
}
.grid.pricing-grid-5 > .card.popular:hover {
    box-shadow: 0 12px 32px -8px var(--bl-glow), 0 0 32px -4px var(--bl-glow);
}

/* 3. Button hover polish */
.grid.pricing-grid-5 > .card .btn {
    transition: all 0.2s ease;
}
.grid.pricing-grid-5 > .card .btn:hover {
    transform: translateY(-2px);
}


/* ══════════════════════════════════════════════════════════════
   HOMEPAGE 5-CARD PRICING GRID (Safe override)
   ══════════════════════════════════════════════════════════════ */
.landing .pricing-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 16px !important;
}
.landing .price-card {
    padding: 24px 16px !important;
}
.landing .price-val {
    font-size: 32px !important;
}
.landing .price-list li {
    font-size: 13px !important;
}
@media (max-width: 1200px) {
    .landing .pricing-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 900px) {
    .landing .pricing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    .landing .pricing-grid { grid-template-columns: 1fr !important; }
}
