/*
 * dev0 Brand System — v1.0
 * Dark-first, engineer-native. Centralized tokens consumed by every HTML
 * in frontend/public/**.html. Keep this file dependency-free.
 *
 * Tokens follow the dev0 brand reference:
 *   Dark  — bg #14181B, header #0d1117, text #c9d1d9, muted #8b949e
 *   Light — bg #f7f7f7, header #ffffff, text #111827, muted #4b5563
 *   Accent #34d399 (shared)
 *
 * Fonts are imported once here so every subpage gets the same family
 * (League Spartan for UI / JetBrains Mono for code) without each HTML
 * re-declaring its own Google Fonts URL.
 */
@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:where(html) {
  --brand-font-main: 'League Spartan', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --brand-font-sans: var(--brand-font-main);
  --brand-font:      var(--brand-font-main);
  --brand-font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Page horizontal gutter (landing + marketing subpages) */
  --brand-page-gutter: clamp(24px, 5vw, 48px);
  --brand-content-max: 1280px;
  --brand-content-width: min(var(--brand-content-max), calc(100vw - (var(--brand-page-gutter) * 2)));

  /* Accent (shared) */
  --brand-accent: #34d399;
  --brand-accent-hover: #10b981;
  --brand-accent-deep: #059669;
  --brand-accent-soft: rgba(52, 211, 153, 0.12);
  --brand-accent-glow: rgba(52, 211, 153, 0.35);

  /* Status (shared semantics; per-theme values below) */
  --brand-danger: #fb7185;
  --brand-warn:   #fbbf24;
  --brand-info:   #60a5fa;

  /* Dark palette (default) */
  --brand-bg-dark: #14181B;
  --brand-header-dark: #0d1117;
  --brand-surface-dark: #161b22;
  --brand-edge-dark: #30363d;
  --brand-text-dark: #c9d1d9;
  --brand-muted-dark: #8b949e;
  --brand-btn-grad-dark-a: #1c1e21;
  --brand-btn-grad-dark-b: #0d1117;

  /* Light palette */
  --brand-bg-light: #f7f7f7;
  --brand-header-light: #ffffff;
  --brand-surface-light: #ffffff;
  --brand-edge-light: #e5e7eb;
  --brand-text-light: #111827;
  --brand-muted-light: #4b5563;

  /* Active palette — follows data-theme. Dark is the default. */
  --brand-bg: var(--brand-bg-dark);
  --brand-header: var(--brand-header-dark);
  --brand-surface: var(--brand-surface-dark);
  --brand-edge: var(--brand-edge-dark);
  --brand-text: var(--brand-text-dark);
  --brand-muted: var(--brand-muted-dark);

  /* Static marketing/subpage compatibility aliases.
     Older pages used page-local token names; keep them backed by the brand
     system so subpages can drop duplicate :root blocks incrementally. */
  --bg-body: var(--brand-bg);
  --body-bg: var(--brand-bg);
  --bg-header: var(--brand-header);
  --header-bg: var(--brand-header);
  --bg-elev: var(--brand-surface);
  --bg-soft: var(--brand-header);
  --card-bg: var(--brand-surface);
  --card: var(--brand-surface);
  --text-main: var(--brand-text);
  --text-primary: var(--brand-text);
  --text: var(--brand-text);
  --text-sub: var(--brand-muted);
  --text-secondary: var(--brand-muted);
  --muted: var(--brand-muted);
  --accent: var(--brand-accent);
  --accent-color: var(--brand-accent);
  --border: var(--brand-edge);
  --border-color: var(--brand-edge);
  --line: var(--brand-edge);
  --btn-grad: linear-gradient(135deg, var(--brand-btn-grad-dark-a) 0%, var(--brand-btn-grad-dark-b) 100%);
  --btn-shadow: rgba(0, 0, 0, 0.7);
  --d0-font: var(--brand-font-main);
  --d0-text: var(--brand-text);
  --d0-bg-deep: var(--brand-bg);
  --d0-accent-blur: rgba(52, 211, 153, 0.14);
  --dev0-bg: var(--brand-bg);
  --dev0-card: var(--brand-surface);
  --dev0-main-text: var(--brand-text);
  --dev0-sub-text: var(--brand-muted);
  --dev0-accent: var(--brand-accent);
  --dev0-border: var(--brand-edge);
  --dev0-amber: var(--brand-warn);
  --dev0-bg-body: var(--brand-bg);
  --dev0-bg-header: var(--brand-header);
  --dev0-bg-card: var(--brand-surface);
  --dev0-text-main: var(--brand-text);
  --dev0-text-muted: var(--brand-muted);
  --dev0-btn-grad: var(--btn-grad);

  /* ── Dashboard (`--dash-*`) — same semantic surface, sized for the app shell.
     Defined here so the whole dashboard reads from a single source of truth
     and ships matching values for dark + light. */
  --dash-bg:           #070c16;
  --dash-panel:        rgba(13, 17, 23, 0.78);
  --dash-panel-strong: rgba(22, 27, 34, 0.94);
  --dash-line:         rgba(139, 148, 158, 0.18);
  --dash-line-strong:  rgba(52, 211, 153, 0.36);
  --dash-text:         var(--brand-text-dark);
  --dash-muted:        var(--brand-muted-dark);
  --dash-accent:       var(--brand-accent);
  --dash-danger:       var(--brand-danger);
  --dash-warn:         var(--brand-warn);
  --dash-blue:         var(--brand-info);
  --dash-border:        #30363d;
  --dash-border-strong: rgba(48, 54, 61, 0.95);
  --dash-edge:          #30363d;
  --dash-edge-soft:     rgba(48, 54, 61, 0.55);
  --dash-elevated:      #0d1117;
  --dash-muted-surface: #101620;
  --dash-bg-strong:     #14181b;   /* tab strip / table head bg */
  --dash-surface-1:     #161b22;   /* secondary surfaces (icon-action, chip wells) */
  --dash-text-strong:   #f0f6fc;   /* primary headings, key text */
  --dash-row-line:      rgba(48, 54, 61, 0.55); /* table tbody underline */

  /* Radius scale — only these values are valid for cards / chips / inputs.
     Pick by container size: pill = chips, sm = inputs, md = buttons,
     lg = panels-in-panels, xl = top-level cards.  See docs/design-system.md. */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-base: 10px;
  --radius-lg:   12px;
  --radius-xl:   14px;
  --radius-2xl:  16px;
  --radius-pill: 999px;

  /* Spacing scale (4px baseline). Replace any literal padding/margin
     in dashboard chrome with these. */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;

  /* Elevation (used sparingly; the dashboard is mostly flat). */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.35);

  /* Motion */
  --brand-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --brand-speed-fast: 180ms;
  --brand-speed-base: 320ms;
  --brand-speed-slow: 500ms;

  /* Sticky nav — matches landing `index.html` (.landing-nav) */
  --brand-nav-line: rgba(139, 148, 158, 0.2);
  --brand-nav-shadow: rgba(0, 0, 0, 0.34);
}

:where(html[data-theme='light']) {
  --brand-bg: var(--brand-bg-light);
  --brand-header: var(--brand-header-light);
  --brand-surface: var(--brand-surface-light);
  --brand-edge: var(--brand-edge-light);
  --brand-text: var(--brand-text-light);
  --brand-muted: var(--brand-muted-light);

  --brand-danger: #e11d48;
  --brand-warn:   #d97706;
  --brand-info:   #2563eb;

  --dash-bg:           #f3f6fb;
  --dash-panel:        rgba(255, 255, 255, 0.94);
  --dash-panel-strong: rgba(255, 255, 255, 0.99);
  --dash-line:         rgba(15, 23, 42, 0.12);
  --dash-line-strong:  rgba(52, 211, 153, 0.45);
  --dash-text:         var(--brand-text-light);
  --dash-muted:        var(--brand-muted-light);

  --brand-nav-line: rgba(15, 23, 42, 0.12);
  --brand-nav-shadow: rgba(15, 23, 42, 0.12);
  --dash-danger:       var(--brand-danger);
  --dash-warn:         var(--brand-warn);
  --dash-blue:         var(--brand-info);
  --dash-border:        var(--brand-edge-light);
  --dash-border-strong: rgba(15, 23, 42, 0.16);
  --dash-edge:          var(--brand-edge-light);
  --dash-edge-soft:     rgba(15, 23, 42, 0.08);
  --dash-elevated:      #ffffff;
  --dash-muted-surface: #f8fafc;
  --dash-bg-strong:     #ffffff;
  --dash-surface-1:     #ffffff;
  --dash-text-strong:   #111827;
  --dash-row-line:      rgba(15, 23, 42, 0.06);

  --btn-shadow: rgba(0, 0, 0, 0.2);
  --d0-accent-blur: rgba(52, 211, 153, 0.10);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.14);
}

/* ---- Utility classes (opt-in; won't fire unless the class is used) ----- */

* { box-sizing: border-box; }

body.dev0-subpage,
body.dev0-subpage button,
body.dev0-subpage input,
body.dev0-subpage select,
body.dev0-subpage textarea {
  font-family: var(--brand-font-main);
}
body.dev0-subpage :is(code, pre, kbd, samp, .mono) {
  font-family: var(--brand-font-mono);
}

body.dev0-subpage {
  min-height: 100vh;
  margin: 0;
  color: var(--brand-text);
  background:
    radial-gradient(circle at 18% 8%, rgba(52, 211, 153, 0.12), transparent 34rem),
    radial-gradient(circle at 84% 20%, rgba(96, 165, 250, 0.10), transparent 32rem),
    var(--brand-bg);
  -webkit-font-smoothing: antialiased;
}

html[data-theme='light'] body.dev0-subpage {
  background:
    radial-gradient(circle at 18% 8%, rgba(52, 211, 153, 0.10), transparent 34rem),
    radial-gradient(circle at 84% 20%, rgba(96, 165, 250, 0.08), transparent 32rem),
    var(--brand-bg);
}

body.dev0-subpage.dev0-has-shell {
  padding-top: 78px;
}

/* /docs + /docs/* — no top padding (header is not fixed). */
body.dev0-docs-static-header.dev0-has-shell {
  padding-top: 0;
}

body.dev0-subpage.dev0-has-shell > main:first-of-type {
  width: 100%;
}

body.dev0-subpage a:not(.vibe-btn-primary):not(.landing-btn) {
  color: inherit;
}

/* Match landing page gutters — Tailwind `px-6` (24px) is too tight on wide screens. */
body.dev0-subpage :is(main, section)[class*='px-6'] {
  padding-inline: var(--brand-page-gutter);
}

.landing-logo-img,
.logo-dark,
.logo-light {
  width: auto;
}
.landing-logo-img {
  display: block;
  height: 32px;
}
.landing-logo-img--light,
.logo-light {
  display: none;
}
html[data-theme='light'] .landing-logo-img--dark,
html[data-theme='light'] .logo-dark {
  display: none;
}
html[data-theme='light'] .landing-logo-img--light,
html[data-theme='light'] .logo-light {
  display: block;
}

/* Subpage header — same glass treatment as landing `.landing-nav` (index.html) */
header.landing-nav.dev0-site-header,
.dev0-site-header.landing-nav,
.dev0-site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    background var(--brand-speed-base) var(--brand-ease),
    border-color var(--brand-speed-base) var(--brand-ease),
    box-shadow var(--brand-speed-base) var(--brand-ease);
}
header.landing-nav.dev0-site-header[data-scrolled='true'],
header.landing-nav.dev0-site-header:focus-within,
.dev0-site-header.landing-nav[data-scrolled='true'],
.dev0-site-header.landing-nav:focus-within,
.dev0-site-header[data-scrolled='true'],
.dev0-site-header:focus-within {
  border-bottom-color: var(--brand-nav-line);
  background: color-mix(in srgb, var(--brand-header) 82%, transparent);
  box-shadow: 0 12px 40px var(--brand-nav-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* /docs + /docs/* — header scrolls with the page (override fixed subpage header above). */
body.dev0-docs-static-header header.landing-nav.dev0-site-header,
body.dev0-docs-static-header .dev0-site-header.landing-nav,
body.dev0-docs-static-header .dev0-site-header {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  border-bottom-color: var(--brand-nav-line);
  background: color-mix(in srgb, var(--brand-header) 82%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.dev0-site-header .landing-nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: var(--brand-content-width);
  min-height: 78px;
  margin: 0 auto;
  gap: 16px;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}
/*
 * The injected logo carries `height="28"`, but Tailwind's preflight resets
 * `img { height: auto }` which makes the browser fall back to the image's
 * natural pixel size (~1056×435). Force the rendered size here so the
 * header/footer brand mark stays a sensible 28px wherever it's injected.
 *
 * Scoped to `[data-dev0-logo]` so the standalone landing page (which uses
 * its own `.landing-logo-img` class at a different size) is unaffected.
 */
img[data-dev0-logo] {
  display: block;
  height: 28px;
  width: auto;
  max-width: none;
}
.landing-desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 22px);
  color: var(--brand-muted);
  font-size: 14px;
  font-weight: 600;
}
.landing-desktop-nav > a,
.dev0-site-footer nav > a {
  color: inherit;
  text-decoration: none;
  transition: color var(--brand-speed-fast) var(--brand-ease);
}
.landing-desktop-nav > a:hover,
.dev0-site-footer nav > a:hover {
  color: var(--brand-accent);
}
.landing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.landing-btn,
.auth-cta,
.glass,
.quick-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--brand-edge);
  border-radius: 999px;
  color: var(--brand-text);
  background: color-mix(in srgb, var(--brand-surface) 78%, transparent);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--brand-speed-fast) var(--brand-ease), color var(--brand-speed-fast) var(--brand-ease), background var(--brand-speed-fast) var(--brand-ease), transform var(--brand-speed-fast) var(--brand-ease);
}
.landing-btn,
.auth-cta {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
}
.glass,
.quick-chip {
  padding: 0.65rem 0.95rem;
}
.landing-btn:not(.landing-btn--primary):hover,
.auth-cta:hover,
.glass:hover,
.quick-chip:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  transform: translateY(-1px);
}
.landing-btn--primary {
  border: 1px solid color-mix(in srgb, var(--brand-accent) 72%, #ffffff);
  color: #041f17;
  font-weight: 700;
  background: var(--brand-accent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 0 0 1px rgba(52, 211, 153, 0.28),
    0 6px 18px rgba(52, 211, 153, 0.22);
}
.landing-btn--primary:hover {
  color: #041f17;
  background: var(--brand-accent-hover);
  border-color: color-mix(in srgb, var(--brand-accent-hover) 75%, #ffffff);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 0 0 1px rgba(52, 211, 153, 0.42),
    0 10px 24px rgba(52, 211, 153, 0.3);
  transform: translateY(-1px);
}
html[data-theme='light'] .landing-btn--primary {
  border-color: rgba(4, 120, 87, 0.38);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.1),
    0 6px 18px rgba(15, 23, 42, 0.12);
}
html[data-theme='light'] .landing-btn--primary:hover {
  border-color: rgba(4, 120, 87, 0.48);
}
.dev0-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--brand-edge);
  border-radius: 12px;
  color: var(--brand-text);
  background: color-mix(in srgb, var(--brand-surface) 84%, transparent);
  cursor: pointer;
}
.dev0-theme-toggle:hover,
.dev0-theme-toggle:focus-visible {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  outline: none;
}
.landing-mobile-toggle {
  display: none;
}
.landing-mobile-menu {
  display: none;
}
.dev0-site-footer {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: var(--brand-content-width);
  margin: 96px auto 0;
  padding: 40px 0 56px;
  border-top: 1px solid var(--brand-edge);
  color: var(--brand-muted);
}
.dev0-site-footer p {
  margin: 16px 0 0;
  max-width: 420px;
  line-height: 1.55;
  font-size: 14px;
}
.dev0-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  max-width: 620px;
  color: var(--brand-muted);
  font-size: 14px;
  font-weight: 600;
}
.landing-footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 48px;
  align-items: flex-start;
}
.landing-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.landing-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.landing-footer-col h4 {
  margin: 0 0 12px;
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.landing-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.landing-footer-col a {
  color: var(--brand-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--brand-speed-fast) var(--brand-ease);
}
.landing-footer-col a:hover {
  color: var(--brand-accent);
}
.landing-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--brand-edge);
  color: var(--brand-muted);
  font-size: 13px;
}
.landing-footer-bottom .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--brand-accent);
  box-shadow: 0 0 8px var(--brand-accent-glow);
  vertical-align: middle;
}
.feature-kicker {
  color: var(--brand-accent);
  font: 700 0.72rem/1 var(--brand-font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.feature-desc {
  color: var(--brand-muted);
  line-height: 1.6;
}
.lp-footer {
  border-top: 1px solid var(--brand-edge);
  color: var(--brand-muted);
}
.dev0-legal-page #content-container {
  border-top: 0 !important;
}
.dev0-legal-page #content-area {
  line-height: 1.8;
  font-size: 1.1rem;
}
.dev0-legal-page #content-area h1 {
  display: inline-block;
  margin: 0 0 2rem;
  border-bottom: 4px solid var(--brand-accent);
  color: var(--brand-text);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
}
.dev0-legal-page #content-area h2 {
  margin: 3rem 0 1rem;
  color: var(--brand-accent);
  font-size: 1.5rem;
  font-weight: 700;
}
.dev0-legal-page #content-area p {
  margin: 0 0 1.5rem;
  color: var(--brand-text);
  opacity: 0.9;
}
.dev0-legal-page #content-area ul {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  list-style: disc;
}

@media (max-width: 1040px) {
  .dev0-site-header .landing-nav-inner {
    display: flex;
    justify-content: space-between;
  }
  .landing-desktop-nav,
  .landing-btn--ghost,
  .landing-btn--primary {
    display: none;
  }
  .landing-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--brand-edge);
    border-radius: 12px;
    color: var(--brand-text);
    background: color-mix(in srgb, var(--brand-surface) 84%, transparent);
  }
  .landing-mobile-menu.is-open {
    display: grid;
    gap: 8px;
    width: var(--brand-content-width);
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--brand-edge);
    border-radius: 16px;
    background: var(--brand-header);
  }
  .landing-mobile-menu a {
    padding: 10px 12px;
    color: var(--brand-muted);
    text-decoration: none;
  }
  .dev0-site-footer {
    margin-top: 72px;
  }
  .dev0-site-footer nav {
    justify-content: flex-start;
  }
  .landing-footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .landing-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }
}

@media (max-width: 560px) {
  .landing-footer-grid {
    grid-template-columns: 1fr;
  }
  .landing-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.brand-glow {
  filter: drop-shadow(0 0 8px var(--brand-accent-glow));
}

.brand-mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(52, 211, 153, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(52, 211, 153, 0.03) 0%, transparent 50%);
}

.brand-wordmark { height: 26px; width: auto; display: block; }
.brand-wordmark-lg { height: 36px; width: auto; display: block; }

/*
 * Vibe Button — theme-independent deep-dark gradient with green sweep.
 * Per brand reference: stays dark even in light mode.
 */
:is(a, button).vibe-btn-primary,
body.dev0-subpage :is(a, button).vibe-btn-primary,
.vibe-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 10px;
  font-family: var(--brand-font-main);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-btn-grad-dark-a) 0%, var(--brand-btn-grad-dark-b) 100%);
  border: 1px solid var(--brand-edge-dark);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background var(--brand-speed-base) var(--brand-ease),
    border-color var(--brand-speed-base) var(--brand-ease),
    color var(--brand-speed-base) var(--brand-ease),
    transform var(--brand-speed-base) var(--brand-ease),
    box-shadow var(--brand-speed-base) var(--brand-ease);
}
:is(a, button).vibe-btn-primary :is(span, svg, strong),
body.dev0-subpage :is(a, button).vibe-btn-primary :is(span, svg, strong) {
  color: inherit;
}

.vibe-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.2), transparent);
  transition: left var(--brand-speed-slow) var(--brand-ease);
}

:is(a, button).vibe-btn-primary:hover,
body.dev0-subpage :is(a, button).vibe-btn-primary:hover,
.vibe-btn-primary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #333333 0%, #111111 100%);
  border-color: var(--brand-accent);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}
html[data-theme='light'] :is(a, button).vibe-btn-primary,
html[data-theme='light'] body.dev0-subpage :is(a, button).vibe-btn-primary,
html[data-theme='light'] .vibe-btn-primary {
  color: #ffffff;
}
html[data-theme='light'] :is(a, button).vibe-btn-primary:hover,
html[data-theme='light'] body.dev0-subpage :is(a, button).vibe-btn-primary:hover,
html[data-theme='light'] .vibe-btn-primary:hover {
  color: #ffffff;
}

.vibe-btn-primary:hover::after { inset: 0 -100% 0 100%; }
.vibe-btn-primary:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.vibe-btn-primary[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.vibe-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-family: var(--brand-font-main);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand-text);
  background: transparent;
  border: 1px solid var(--brand-edge);
  transition: all var(--brand-speed-base) var(--brand-ease);
  cursor: pointer;
}
.vibe-btn-secondary:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  transform: translateY(-1px);
}

/* Smooth theme swap on documents that actually toggle data-theme. */
:where([data-theme]) body,
:where([data-theme]) nav,
:where([data-theme]) header,
:where([data-theme]) footer {
  transition:
    background-color var(--brand-speed-slow) var(--brand-ease),
    color var(--brand-speed-slow) var(--brand-ease),
    border-color var(--brand-speed-slow) var(--brand-ease);
}

/* Selection & scrollbar accent, kept subtle */
::selection { background: color-mix(in srgb, var(--brand-accent) 35%, transparent); color: var(--brand-text); }
@supports (scrollbar-color: auto) {
  :where(html) { scrollbar-color: var(--brand-edge) transparent; }
}
