/* ==========================================================================
   Global / Theme
   Consolidated from: index.html + navbar.html + footer.html
   ========================================================================== */

:root {
  /* ======================================================================
     THEME
     Every colour, radius, shadow, spacing and timing in this site comes from
     here. Do not hardcode values in rules or in page-level <style> blocks —
     reuse a token or add one.

     Tokens below the "THEMED" marker flip between light and dark. Everything
     above it is theme-invariant: brand colour, geometry, motion, layout.
     ====================================================================== */

  /* ---------- Typography ---------- */
  --qd-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";

  /* ---------- Brand / gradient (theme-invariant) ---------- */
  --qd-gradDark: #1a4a7f;
  --qd-gradA: #39C9F0;
  --qd-gradB: #B15CFF;
  --qd-accent: #4E7BFF;
  --qd-outline: linear-gradient(135deg, var(--qd-gradDark), var(--qd-gradA), var(--qd-gradB));

  /* Channel triples: the brand colours are used at 8+ different alphas each,
     which a hex token cannot serve -> rgba(var(--qd-gradA-rgb), .18) */
  --qd-gradA-rgb: 57, 201, 240;
  --qd-gradB-rgb: 177, 92, 255;
  --qd-accent-rgb: 78, 123, 255;
  --qd-ink-rgb: 11, 13, 16;

  /* Node-editor categories. Theme-invariant like the brand ramp above, so a
     node keeps its identity in both themes. */
  --qd-node-value: #2FA96B;
  --qd-node-data: #4E7BFF;
  --qd-node-math: #D9902B;
  --qd-node-io: #DB5563;

  /* ---------- Radii ---------- */
  --qd-r-sm: 12px;
  --qd-r: 14px;
  --qd-r-md: 16px;
  --qd-r-lg: 18px;
  --qd-r-xl: 20px;
  --qd-r-2xl: 26px;
  --qd-r-pill: 999px;

  /* ---------- Type scale ---------- */
  --qd-fs-xs: 11px;
  --qd-fs-sm: 12.5px;
  --qd-fs-base: 14px;
  --qd-fs-md: 16px;
  --qd-fs-lg: 20px;
  --qd-fs-xl: 26px;
  --qd-fs-2xl: 34px;
  --qd-fs-3xl: clamp(30px, 4.4vw, 52px);
  --qd-fs-hero: clamp(38px, 6vw, 72px);

  /* ---------- Vertical rhythm ---------- */
  --qd-section-y: clamp(56px, 8vw, 112px);
  --qd-section-x: 20px;

  /* ---------- Spacing / control sizing ---------- */
  --qd-gap: 10px;
  --qd-field-pad: 11px 12px;
  --qd-control-pad: 0 16px;
  --qd-control-h: 42px;
  --qd-control-h-sm: 36px;
  --qd-outline-w: 3px;

  /* ---------- Motion ---------- */
  --qd-transition: 0.12s ease;

  /* ---------- Blur ---------- */
  --qd-blur: blur(10px);
  --qd-blur-modal: blur(6px);
  --qd-blur-nav: blur(16px);

  /* ---------- Layout ---------- */
  --qd-max: 1400px;
  --nav-h: 72px;
  --qd-page-top: calc(var(--nav-h) + 44px);

  /* ======================================================================
     THEMED — light values. The dark overrides below restate exactly this set.
     ====================================================================== */

  --qd-surface: #ffffff;
  --qd-surface-sunken: rgba(78, 123, 255, 0.04);
  --qd-surface-raised-dark: rgba(15, 18, 22, 0.92);
  --qd-glass-dark: rgba(255, 255, 255, 0.06);
  --qd-glass-dark-hover: rgba(255, 255, 255, 0.08);
  --qd-glassA: rgba(255, 255, 255, 0.94);
  --qd-glassB: rgba(255, 255, 255, 0.78);
  --qd-hover-tint: rgba(57, 201, 240, 0.14);

  --qd-text: #0b0d10;
  --qd-muted: rgba(11, 13, 16, 0.62);
  --qd-on-accent: #ffffff;
  --qd-on-dark: rgba(255, 255, 255, 0.92);
  --qd-on-dark-muted: rgba(255, 255, 255, 0.68);
  /* Semantic success (the sign-up username-available check). Emerald reads on
     both themes, so it is shared -- no per-theme override needed. */
  --qd-success: #10b981;
  /* Semantic danger (destructive confirmations). Shared for the same reason. */
  --qd-danger: #ef4444;

  --qd-line: rgba(11, 13, 16, 0.1);
  --qd-line-strong: rgba(11, 13, 16, 0.12);
  --qd-line-soft: rgba(11, 13, 16, 0.08);
  --qd-line-dark: rgba(255, 255, 255, 0.14);
  --qd-line-dark-soft: rgba(255, 255, 255, 0.12);
  --qd-focus-ring: rgba(57, 201, 240, 0.45);

  /* Canvas graph paper: a fine cell line and a stronger one every 5th. */
  --qd-grid-fine: rgba(11, 13, 16, 0.08);
  --qd-grid-bold: rgba(11, 13, 16, 0.17);

  --qd-shadow-card: 0 12px 26px rgba(0, 0, 0, 0.06);
  --qd-shadow-hover: 0 12px 26px rgba(0, 0, 0, 0.1);
  --qd-shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.28);
  --qd-shadow-modal: 0 18px 55px rgba(0, 0, 0, 0.45);
  --qd-shadow2: 0 10px 26px rgba(0, 0, 0, 0.1);

  --qd-nav-bg: rgba(255, 255, 255, 0.72);
  --qd-nav-fg: var(--qd-text);
  --qd-nav-hover: rgba(11, 13, 16, 0.06);
  --qd-nav-shadow: 0 18px 55px rgba(0, 0, 0, 0.10);
  --qd-nav-panel: rgba(255, 255, 255, 0.97);

  /* Hero — themed, so light mode gives a light homepage. */
  --hero-bg: #f5f8fc;
  --hero-soft: rgba(78, 123, 255, 0.16);
  --hero-soft2: rgba(177, 92, 255, 0.13);
  --hero-text: #0b0d10;
  --hero-muted: rgba(11, 13, 16, 0.68);
  /* The hero visual stays a dark "screen" in both themes — the orb inside it
     is built from translucent whites and only reads on dark. */
  --hero-panel: rgba(10, 14, 18, 0.94);
  --hero-panel-line: rgba(11, 13, 16, 0.14);

  color-scheme: light;
}

/* ========================================================================
   DARK THEME
   Follows the OS by default; [data-theme] on <html> overrides it in both
   directions so the toggle always wins. Only the THEMED set is restated —
   brand, geometry and motion are shared.
   ======================================================================== */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --qd-surface: #0b0f13;
    --qd-surface-sunken: rgba(255, 255, 255, 0.03);
    --qd-surface-raised-dark: rgba(15, 18, 22, 0.96);
    --qd-glass-dark: rgba(255, 255, 255, 0.06);
    --qd-glass-dark-hover: rgba(255, 255, 255, 0.1);
    --qd-glassA: rgba(18, 22, 27, 0.94);
    --qd-glassB: rgba(11, 15, 19, 0.78);
    --qd-hover-tint: rgba(57, 201, 240, 0.16);

    --qd-text: rgba(255, 255, 255, 0.92);
    --qd-muted: rgba(255, 255, 255, 0.62);
    --qd-on-accent: #ffffff;
    --qd-on-dark: rgba(255, 255, 255, 0.92);
    --qd-on-dark-muted: rgba(255, 255, 255, 0.68);

    --qd-line: rgba(255, 255, 255, 0.1);
    --qd-line-strong: rgba(255, 255, 255, 0.14);
    --qd-line-soft: rgba(255, 255, 255, 0.08);
    --qd-line-dark: rgba(255, 255, 255, 0.14);
    --qd-line-dark-soft: rgba(255, 255, 255, 0.12);
    --qd-focus-ring: rgba(57, 201, 240, 0.55);

  /* Canvas graph paper: a fine cell line and a stronger one every 5th. */
  --qd-grid-fine: rgba(255, 255, 255, 0.07);
  --qd-grid-bold: rgba(255, 255, 255, 0.15);

    --qd-shadow-card: 0 12px 26px rgba(0, 0, 0, 0.5);
    --qd-shadow-hover: 0 12px 26px rgba(0, 0, 0, 0.6);
    --qd-shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.55);
    --qd-shadow-modal: 0 18px 55px rgba(0, 0, 0, 0.7);
    --qd-shadow2: 0 10px 26px rgba(0, 0, 0, 0.5);

    --qd-nav-bg: rgba(15, 18, 22, 0.55);
    --qd-nav-fg: rgba(255, 255, 255, 0.92);
    --qd-nav-hover: rgba(255, 255, 255, 0.08);
    --qd-nav-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    --qd-nav-panel: rgba(10, 12, 14, 0.94);

    --hero-bg: #050a0b;
    --hero-soft: rgba(78, 123, 255, 0.25);
    --hero-soft2: rgba(177, 92, 255, 0.18);
    --hero-text: rgba(255, 255, 255, 0.94);
    --hero-muted: rgba(255, 255, 255, 0.72);
    --hero-panel: rgba(255, 255, 255, 0.03);
    --hero-panel-line: rgba(255, 255, 255, 0.12);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --qd-surface: #0b0f13;
  --qd-surface-sunken: rgba(255, 255, 255, 0.03);
  --qd-surface-raised-dark: rgba(15, 18, 22, 0.96);
  --qd-glass-dark: rgba(255, 255, 255, 0.06);
  --qd-glass-dark-hover: rgba(255, 255, 255, 0.1);
  --qd-glassA: rgba(18, 22, 27, 0.94);
  --qd-glassB: rgba(11, 15, 19, 0.78);
  --qd-hover-tint: rgba(57, 201, 240, 0.16);

  --qd-text: rgba(255, 255, 255, 0.92);
  --qd-muted: rgba(255, 255, 255, 0.62);
  --qd-on-accent: #ffffff;
  --qd-on-dark: rgba(255, 255, 255, 0.92);
  --qd-on-dark-muted: rgba(255, 255, 255, 0.68);

  --qd-line: rgba(255, 255, 255, 0.1);
  --qd-line-strong: rgba(255, 255, 255, 0.14);
  --qd-line-soft: rgba(255, 255, 255, 0.08);
  --qd-line-dark: rgba(255, 255, 255, 0.14);
  --qd-line-dark-soft: rgba(255, 255, 255, 0.12);
  --qd-focus-ring: rgba(57, 201, 240, 0.55);

  /* Canvas graph paper: a fine cell line and a stronger one every 5th. */
  --qd-grid-fine: rgba(255, 255, 255, 0.07);
  --qd-grid-bold: rgba(255, 255, 255, 0.15);

  --qd-shadow-card: 0 12px 26px rgba(0, 0, 0, 0.5);
  --qd-shadow-hover: 0 12px 26px rgba(0, 0, 0, 0.6);
  --qd-shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.55);
  --qd-shadow-modal: 0 18px 55px rgba(0, 0, 0, 0.7);
  --qd-shadow2: 0 10px 26px rgba(0, 0, 0, 0.5);

  --qd-nav-bg: rgba(15, 18, 22, 0.55);
  --qd-nav-fg: rgba(255, 255, 255, 0.92);
  --qd-nav-hover: rgba(255, 255, 255, 0.08);
  --qd-nav-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  --qd-nav-panel: rgba(10, 12, 14, 0.94);

  --hero-bg: #050a0b;
  --hero-soft: rgba(78, 123, 255, 0.25);
  --hero-soft2: rgba(177, 92, 255, 0.18);
  --hero-text: rgba(255, 255, 255, 0.94);
  --hero-muted: rgba(255, 255, 255, 0.72);
  --hero-panel: rgba(255, 255, 255, 0.03);
  --hero-panel-line: rgba(255, 255, 255, 0.12);

  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--qd-font);
}

button, input, textarea, select { font-family: inherit; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }

body {
  background: var(--qd-surface);
  color: var(--qd-text);
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.wrap {
  max-width: var(--qd-max);
  margin: 0 auto;
  padding: 56px 20px;
}

/* ==========================================================================
   Buttons (shared)
   ========================================================================== */
/* Reusable gradient-outline pill */
.pillOutline {
  position: relative;
  border-radius: var(--qd-r);
  background: var(--qd-glass-dark);
  backdrop-filter: var(--qd-blur);
  -webkit-backdrop-filter: var(--qd-blur);
  box-shadow: var(--qd-shadow-glass);
}

/* Gradient border using background-clip trick */
.pillOutline::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: var(--qd-outline-w); /* outline thickness */
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.btnRow {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btnPrimary {
  display: inline-flex;
  align-items: center;
  gap: var(--qd-gap);
  text-decoration: none;
  color: var(--qd-on-accent);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: var(--qd-r);
  position: relative;
  background: var(--qd-gradB); /* dark blue -> cyan -> purple */
  box-shadow: 0 14px 30px rgba(26, 74, 127, 0.35); /* dark blue shadow */
  transition: transform var(--qd-transition), box-shadow var(--qd-transition);
}

.btnPrimary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: transparent; /* removed gradient outline for solid fill */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(78, 123, 255, 0.3);
}

.btnPrimary:active { transform: translateY(0); }

.btnGhost {
  display: inline-flex;
  align-items: center;
  gap: var(--qd-gap);
  text-decoration: none;
  color: var(--hero-text);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: var(--qd-r);
  position: relative;
  border: 0;
  background: var(--qd-glass-dark);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transition: transform var(--qd-transition), box-shadow var(--qd-transition), border-color var(--qd-transition), background var(--qd-transition);
  backdrop-filter: var(--qd-blur);
  -webkit-backdrop-filter: var(--qd-blur);
}

.btnGhost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.btnGhost:hover {
  transform: translateY(-1px);
  background: var(--qd-glass-dark-hover);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}

.btnGhost:active { transform: translateY(0); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  background: var(--hero-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--qd-glass-dark);
  min-height: 100vh;
}

/* decorative gradients */
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(900px 480px at 18% 30%, var(--hero-soft), transparent 60%),
    radial-gradient(900px 480px at 42% 75%, var(--hero-soft2), transparent 60%),
    radial-gradient(800px 420px at 82% 40%, rgba(57, 201, 240, 0.16), transparent 58%);
  filter: blur(2px);
  pointer-events: none;
}

/* wave glow */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -140px;
  height: 420px;
  background:
    radial-gradient(800px 240px at 30% 20%, rgba(177, 92, 255, 0.25), transparent 60%),
    radial-gradient(900px 280px at 65% 50%, rgba(78, 123, 255, 0.22), transparent 58%),
    radial-gradient(900px 280px at 80% 80%, rgba(57, 201, 240, 0.18), transparent 56%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
}

.heroWrap {
  position: relative;
  z-index: 1;
  max-width: var(--qd-max);
  margin: 0 auto;

  min-height: 100vh;
  box-sizing: border-box;

  padding: calc(var(--nav-h) + 26px) 20px 70px;

  display: flex;
  align-items: center;
}

.heroGrid {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
}

.heroTitle {
  margin: 0 0 14px;
  font-size: 56px;
  letter-spacing: -0.8px;
  line-height: 1.02;
  color: var(--hero-text);
  font-weight: 800;
}

.heroTitle .accent { color: var(--qd-gradA); }

.heroLead {
  margin: 0 0 18px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--hero-muted);
  max-width: 62ch;
}

.heroVisual {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--hero-panel-line);
  background: var(--hero-panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   HERO VISUAL — Interactive Orb (replaces placeholder image)
   ========================================================================== */

/* Particle canvas sits behind everything */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Orb container */
.orbWrap {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

/* Outer pulsing glow */
.orbGlow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57,201,240,0.18) 0%, rgba(177,92,255,0.12) 50%, transparent 72%);
  filter: blur(14px);
  animation: orbPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%       { transform: scale(1.08); opacity: 1; }
}

/* Glass sphere */
.orbSphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(57,201,240,0.28) 0%, transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(177,92,255,0.22) 0%, transparent 55%),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -2px 8px rgba(0,0,0,0.4),
    0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

/* Sphere inner highlight */
.orbSphere::before {
  content: "";
  position: absolute;
  top: 10%; left: 15%;
  width: 40%; height: 32%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
  filter: blur(4px);
}

/* Rotating latitude lines */
.orbLat {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(57,201,240,0.18);
}
.orbLat:nth-child(1) { top: 20%; }
.orbLat:nth-child(2) { top: 35%; }
.orbLat:nth-child(3) { top: 50%; background: rgba(57,201,240,0.3); }
.orbLat:nth-child(4) { top: 65%; }
.orbLat:nth-child(5) { top: 80%; }

/* Rotating longitude lines */
.orbLon {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  animation: spinLon 14s linear infinite;
}
.orbLon span {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(177,92,255,0.18);
}
.orbLon span:nth-child(1) { left: 20%; }
.orbLon span:nth-child(2) { left: 35%; }
.orbLon span:nth-child(3) { left: 50%; background: rgba(177,92,255,0.28); }
.orbLon span:nth-child(4) { left: 65%; }
.orbLon span:nth-child(5) { left: 80%; }

@keyframes spinLon {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* Blinking dots on sphere */
.orbDots {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  animation: spinDots 28s linear infinite;
}
.orbDot {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--qd-gradA);
  box-shadow: 0 0 6px var(--qd-gradA);
  animation: dotBlink var(--d, 3s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
.orbDot.p { background: var(--qd-gradB); box-shadow: 0 0 6px var(--qd-gradB); }

@keyframes spinDots  { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes dotBlink  {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50%      { opacity: 0.25; transform: scale(0.6); }
}

/* Orbiting rings */
.orbRing1 {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(57,201,240,0.45);
  border-bottom-color: rgba(57,201,240,0.15);
  animation: ringA 8s linear infinite;
  pointer-events: none;
}
.orbRing2 {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px solid transparent;
  border-left-color: rgba(177,92,255,0.45);
  border-right-color: rgba(177,92,255,0.15);
  animation: ringB 12s linear infinite reverse;
  pointer-events: none;
}
@keyframes ringA { from { transform: rotateX(70deg) rotate(0deg); }   to { transform: rotateX(70deg) rotate(360deg); } }
@keyframes ringB { from { transform: rotateY(65deg) rotate(0deg); }   to { transform: rotateY(65deg) rotate(360deg); } }

/* Orbiting nodes */
.orbNode {
  position: absolute;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--qd-gradA);
  box-shadow: 0 0 12px var(--qd-gradA), 0 0 24px rgba(57,201,240,0.5);
  top: 50%; left: 50%;
  pointer-events: none;
  animation: nodeOrbit 8s linear infinite;
}
.orbNode.p {
  background: var(--qd-gradB);
  box-shadow: 0 0 12px var(--qd-gradB), 0 0 24px rgba(177,92,255,0.5);
  animation-delay: -4s;
  animation-direction: reverse;
}
@keyframes nodeOrbit {
  from { transform: translate(-50%,-50%) rotate(0deg)   translateX(120px) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg) translateX(120px) rotate(-360deg); }
}

/* Floating info labels around the orb */
.orbLabel {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px;
  border-radius: var(--qd-r-sm);
  background: rgba(15,18,22,0.82);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.32);
  white-space: nowrap;
  pointer-events: none;
  animation: labelFloat var(--ld, 5s) ease-in-out infinite;
  animation-delay: var(--ll, 0s);
}
@keyframes labelFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.orbLabel--a { top: 4%;  right: 4%;  --ld: 5.2s; --ll: 0s; }
.orbLabel--b { bottom: 8%; left: 2%; --ld: 6s;   --ll: -2s; }
.orbLabel--c { top: 44%; right: 0%;  --ld: 4.8s; --ll: -1s; }

.orbLabel .licon {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
}
.licon-a { background: rgba(57,201,240,0.2); }
.licon-b { background: rgba(177,92,255,0.2); }
.licon-c { background: rgba(78,123,255,0.2); }

.orbLabel .ltitle { font-weight: 700; font-size: 11px; color: rgba(255,255,255,0.9); display: block; }
.orbLabel .lval   { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.45); display: block; }

/* Mouse-follow tilt wrapper */
.heroVisualTilt {
  transform-style: preserve-3d;
  perspective: 900px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s linear;
}

/* ==========================================================================
   Content sections / cards / layout
   ========================================================================== */

.sectionTitle {
  font-size: 22px;
  margin: 0 0 10px;
  letter-spacing: 0.1px;
}

.sectionLead {
  margin: 0 0 20px;
  line-height: 1.7;
  color: var(--qd-muted);
  font-weight: 500;
}

.cardGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  border: 1px solid var(--qd-line);
  border-radius: var(--qd-r-lg);
  padding: 14px;
  background: var(--qd-surface);
  box-shadow: var(--qd-shadow-card);
}

.card h3 { margin: 0 0 6px; font-size: 14px; }

.card p {
  margin: 0;
  color: var(--qd-muted);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* FAQ */
.faq details {
  border: 1px solid var(--qd-line);
  border-radius: var(--qd-r-md);
  padding: 12px 14px;
  background: var(--qd-surface);
  box-shadow: var(--qd-shadow-card);
}

.faq summary { cursor: pointer; font-weight: 700; font-size: 13px; }

.faq p {
  margin: 10px 0 0;
  color: var(--qd-muted);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ==========================================================================
   Contact form
   ========================================================================== */

.contactBox {
  border: 1px solid rgba(var(--qd-accent-rgb), 0.22);
  border-radius: var(--qd-r-xl);
  background: var(--qd-surface);
  box-shadow: var(--qd-shadow2);
  padding: 16px;
}

.fieldRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--qd-gap);
}

.field { display: flex; flex-direction: column; gap: 6px; }

label { font-weight: 600; font-size: 12px; color: var(--qd-text); }

input, textarea {
  border: 1px solid var(--qd-line-strong);
  border-radius: var(--qd-r);
  padding: var(--qd-field-pad);
  font-weight: 500;
  font-size: 13px;
  outline: none;
}

textarea { min-height: 110px; resize: vertical; }

.formNote { margin: 10px 0 0; font-size: 12px; color: var(--qd-muted); font-weight: 500; }

/* ==========================================================================
   NAVBAR (qdNav)
   ========================================================================== */

.qdNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  width: 100%;
}

.qdNav__bar {
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.qdNav__inner {
  max-width: var(--qd-max);
  margin: 14px auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--qd-r);

  background: var(--qd-nav-bg);
  border: 1px solid var(--qd-line-soft);

  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);

  box-shadow: var(--qd-nav-shadow);
}

.qdNav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--qd-nav-fg);
  min-width: fit-content;
}

.qdNav__logo { height: 38px; width: auto; object-fit: contain; display: block; }

.qdNav__brandText { display: flex; flex-direction: column; line-height: 1.05; }

.qdNav__company {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .2px;
  color: var(--qd-nav-fg);
}

/* --qd-nav-fg, not --qd-on-dark-muted: the hero behind the bar is themed now,
   so the nav is not always sitting on a dark surface. */
.qdNav__product {
  font-weight: 750;
  font-size: 12px;
  color: var(--qd-nav-fg);
  opacity: 0.72;
}

.qdNav__links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--qd-r);
  border: 0;
  background: var(--qd-glass-dark);
}

.qdNav__link {
  text-decoration: none;
  color: var(--qd-nav-fg);
  font-weight: 600;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--qd-r);
  transition: transform var(--qd-transition), background var(--qd-transition);
}

.qdNav__link:hover { background: var(--qd-hover-tint); transform: translateY(-1px); }
.qdNav__link:active { transform: translateY(0); }

.qdNav__actions { display: flex; align-items: center; gap: var(--qd-gap); }

/* language menu */
.qdNav__lang { position: relative; }

.qdNav__langBtn {
 display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  border: 0;
  background: var(--qd-glass-dark);
  border-radius: var(--qd-r);
  padding: 9px 12px;
  font-weight: 850;
  font-size: 12px;
  color: var(--qd-nav-fg);
  cursor: pointer;

  /* FIX: make shadow/outline respect rounded corners */
border-radius: var(--qd-r);
overflow: hidden;

  transition: transform var(--qd-transition), border-color var(--qd-transition), background var(--qd-transition);
  text-decoration: none; /* ensures anchor never underlines */
}

.qdNav__langBtn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.qdNav__langBtn:hover {
  background: var(--qd-glass-dark-hover);
  transform: translateY(-1px);
}

.qdNav__chev { opacity: .8; }

.qdNav__langMenu {
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 170px;
  border-radius: var(--qd-r-md);
  border: 1px solid var(--qd-line-dark);
  background: var(--qd-nav-panel);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  padding: 6px;
  display: none;
  overflow: hidden;
}

.qdNav__langMenu button {
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: var(--qd-r-sm);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  color: var(--qd-nav-fg);
}

.qdNav__langMenu button:hover { background: var(--qd-hover-tint); }
.qdNav__lang.isOpen .qdNav__langMenu { display: block; }

/* CTA */
.qdNav__cta {
  text-decoration: none;
  color: var(--qd-on-accent);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: var(--qd-r);
  position: relative;
  background: var(--qd-gradB);
}

.qdNav__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: transparent; /* removed gradient outline for solid fill */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.qdNav__cta:hover { transform: translateY(-1px); box-shadow: 0 20px 48px rgba(78,123,255,.34); }
.qdNav__cta:active { transform: translateY(0); }

/* burger */
.qdNav__burger {
  display: none;
  width: 44px;
  height: 40px;
  border-radius: var(--qd-r);
  position: relative;
  border: 0;
  background: var(--qd-glass-dark);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0,0,0,.24);
  transition: transform var(--qd-transition), background var(--qd-transition), border-color var(--qd-transition);
}

.qdNav__burger::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.qdNav__burger:hover {
  transform: translateY(-1px);
  background: var(--qd-glass-dark-hover);
}

.qdNav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--qd-nav-fg);
  border-radius: var(--qd-r);
  margin: 4px auto;
  transition: transform .18s ease, opacity .18s ease;
}

.qdNav__burger.isOpen span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.qdNav__burger.isOpen span:nth-child(2) { opacity: 0; }
.qdNav__burger.isOpen span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile dropdown */
.qdNav__mobile {
  width: 100%;
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: var(--qd-nav-panel);
  backdrop-filter: var(--qd-blur-nav);
  -webkit-backdrop-filter: var(--qd-blur-nav);
  transform-origin: top;
  animation: qdDrop .18s ease-out;
}

@keyframes qdDrop {
  from { opacity: 0; transform: translateY(-8px) scaleY(.98); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

.qdNav__mobileInner {
  max-width: var(--qd-max);
  margin: 0 auto;
  padding: 12px 18px 16px;
}

.qdNav__mLink {
  display: block;
  text-decoration: none;
  color: var(--qd-nav-fg);
  font-weight: 900;
  padding: 12px 12px;
  border-radius: var(--qd-r);
}

.qdNav__mLink:hover { background: var(--qd-hover-tint); }

.qdNav__divider {
  height: 1px;
  background: var(--qd-line-dark-soft);
  margin: 10px 6px;
}

.qdNav__mCta {
  display: block;
  text-decoration: none;
  text-align: center;
  color: var(--qd-on-accent);
  font-weight: 700;
  padding: 12px 14px;
  border-radius: var(--qd-r);
  position: relative;
  background: var(--qd-gradB);
}

.qdNav__mCta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: transparent; /* removed gradient outline for solid fill */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ==========================================================================
   FOOTER (qdFooter)
   ========================================================================== */

.qdFooter {
  width: 100%;
  margin-top: 64px;
}

.qdFooter__bg {
  width: 100%;
  background:
    radial-gradient(1100px 420px at 12% 0%, rgba(78, 123, 255, 0.14), transparent 55%),
    radial-gradient(900px 360px at 92% 0%, rgba(57, 201, 240, 0.12), transparent 52%),
    linear-gradient(180deg, var(--qd-glassA), var(--qd-glassB));
  border-top: 1px solid var(--qd-line-soft);
}

.qdFooter__inner {
  max-width: var(--qd-max);
  margin: 0 auto;
  padding: 28px 18px 26px;
}

.qdFooter__top {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 1fr;
  gap: 22px;
  align-items: start;
  padding-bottom: 18px;
}

.qdFooter__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--qd-text);
  min-width: fit-content;
}

.qdFooter__logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.qdFooter__brandText { display: flex; flex-direction: column; line-height: 1.05; }

.qdFooter__company {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.qdFooter__product {
  font-weight: 750;
  font-size: 12px;
  color: var(--qd-muted);
}

.qdFooter__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
}

.qdFooter__title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
  color: var(--qd-text);
}

.qdFooter__link {
  display: block;
  text-decoration: none;
  color: var(--qd-muted);
  font-weight: 500;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--qd-r-sm);
  width: fit-content;
  transition: background var(--qd-transition), transform var(--qd-transition), color var(--qd-transition);
}

.qdFooter__link:hover {
  background: rgba(78, 123, 255, 0.10);
  color: var(--qd-text);
  transform: translateY(-1px);
}

.qdFooter__callTitle {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--qd-text);
}

.qdFooter__callText {
  font-weight: 750;
  font-size: 12px;
  color: var(--qd-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.qdFooter__callBtns {
  display: flex;
  gap: var(--qd-gap);
  flex-wrap: wrap;
}

/* Footer buttons (primary + ghost) */
.qdFooter__btnPrimary {
  text-decoration: none;
  color: var(--qd-on-accent);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--qd-r);
  position: relative;
  background: var(--qd-gradB);
}

.qdFooter__btnPrimary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: transparent; /* removed gradient outline for solid fill */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.qdFooter__btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(78, 123, 255, 0.28);
}

.qdFooter__btnGhost {
  text-decoration: none;
  color: var(--qd-text);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--qd-r);
  position: relative;
  border: 0;
  background: var(--qd-surface);
  transition: transform var(--qd-transition), box-shadow var(--qd-transition), border-color var(--qd-transition);
}

.qdFooter__btnGhost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.qdFooter__btnGhost:hover {
  transform: translateY(-1px);
  box-shadow: var(--qd-shadow-hover);
}

.qdFooter__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--qd-line-soft);
}

.qdFooter__copy {
  font-size: 12px;
  font-weight: 500;
  color: var(--qd-muted);
}

.qdFooter__social {
  display: flex;
  gap: var(--qd-gap);
  align-items: center;
}

.qdFooter__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--qd-r);
  position: relative;
  border: 0;
  background: var(--qd-surface);
  color: var(--qd-text);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transition: transform var(--qd-transition), box-shadow var(--qd-transition), border-color var(--qd-transition);
}

.qdFooter__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.qdFooter__icon:hover {
  transform: translateY(-1px);
  box-shadow: var(--qd-shadow-hover);
}

/* currentColor, not a literal: the disc behind these is --qd-surface, which is
   near-black in dark mode. A hardcoded rgba(11,13,16,.82) fill made the glyphs
   black-on-black and they disappeared entirely. */
.qdFooter__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.82;
  transition: opacity var(--qd-transition);
}

.qdFooter__icon:hover svg { opacity: 1; }

/* ==========================================================================
   Scroll hint + heroMiniCta (kept exactly as original)
   ========================================================================== */
.scrollHint,
.heroMiniCta{
  position: relative;
}

.scrollHint::before,
.heroMiniCta::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}
.heroMiniCta {
  display: inline-flex;
  align-items: center;
  gap: var(--qd-gap);
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--qd-r);
  color: var(--hero-text);
  text-decoration: none;
  font-weight: 900;
  font-size: 12px;
  border: 0;
  background: var(--qd-glass-dark);
  backdrop-filter: var(--qd-blur);
  -webkit-backdrop-filter: var(--qd-blur);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transition: transform var(--qd-transition), box-shadow var(--qd-transition), border-color var(--qd-transition);
}

.heroMiniCta:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 183, 178, 0.35);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.heroMiniCta .dot {
  width: 34px;
  height: 28px;
  border-radius: var(--qd-r);
  display: grid;
  place-items: center;
  background: rgba(57, 201, 240, 0.18);
  border: 1px solid rgba(16, 183, 178, 0.25);
}

.scrollHint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--qd-gap);
  padding: 10px 14px;
  border-radius: var(--qd-r);
  text-decoration: none;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .2px;
  border: 0;
  /* Sits on the hero, so it reads from the hero's own themed pair rather
     than assuming a permanently dark backdrop. */
  color: var(--hero-text);
  background: var(--qd-glass-dark);
  backdrop-filter: var(--qd-blur);
  -webkit-backdrop-filter: var(--qd-blur);
  box-shadow: var(--qd-shadow-glass);
}

/* The standard surface/text pair: a white arrow on black in dark mode, black
   on white in light. Surface sits a shade off --hero-bg, so the disc still
   reads against the hero, and the hairline keeps its edge defined. */
.scrollHint .chev {
  width: 28px;
  height: 28px;
  border-radius: var(--qd-r);
  display: grid;
  place-items: center;
  background: var(--qd-surface);
  border: 1px solid var(--qd-line);
  color: var(--qd-text);
  animation: bob 1.3s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .heroGrid { grid-template-columns: 1fr; }
  .heroTitle { font-size: 44px; }
  .heroVisual { min-height: 260px; }
  .cardGrid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .fieldRow { grid-template-columns: 1fr; }
  .heroWrap { padding: calc(var(--nav-h) + 18px) 20px 76px; }

  .qdNav__links { display: none; }
  .qdNav__burger { display: block; }
  .qdNav__product { display: none; }

  .qdFooter__top { grid-template-columns: 1fr; }
  .qdFooter__cols { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
}

@media (max-width: 680px) {
  .qdFooter__cols { grid-template-columns: 1fr 1fr; }
  .qdFooter__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .heroTitle { font-size: 38px; }
  .qdNav__brandText { display: none; }
}

/* Keep login from underlining */
.qdNav__loginBtn,
.qdNav__loginBtn:link,
.qdNav__loginBtn:visited,
.qdNav__loginBtn:hover,
.qdNav__loginBtn:active{
  text-decoration: none;
}

/* Make Login + Sign up the same size */
.qdNav__actions .qdNav__loginBtn,
.qdNav__actions .qdNav__cta{
  height: var(--qd-control-h);              /* adjust if you want taller/shorter */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;           /* same horizontal padding */
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}

.qdNav__actions .qdNav__loginBtn{
  border-radius: var(--qd-r);
}

/* Animated gradient border on the Login button.
   An oversized repeating gradient whose background-position is animated, so the
   colours travel continuously around the border. background-position animation
   is universally supported — no @property registration needed. */
.qdNav__loginBtn::before {
  background: linear-gradient(
    90deg,
    #1a4a7f, #39C9F0, #B15CFF, #39C9F0, #1a4a7f
  ) 0 50% / 300% 100% repeat-x;
}

.qdNav__loginBtn:hover::before {
  animation: qdBorderFlow 2s linear infinite;
}

.qdNav__loginBtn:hover {
  box-shadow: 0 0 22px rgba(57,201,240,.28);
}

@keyframes qdBorderFlow {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="force"]) .qdNav__loginBtn:hover::before { animation: none; }
}

/* ======================================================================
   LOGIN MODAL (qdModal)
   ====================================================================== */

html.qdModalLock, html.qdModalLock body { overflow: hidden; }

.qdModal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.qdModal.isOpen{ display: block; }

.qdModal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: var(--qd-blur-modal);
  -webkit-backdrop-filter: var(--qd-blur-modal);
}

.qdModal__panel{
  position: relative;
  width: min(520px, calc(100% - 32px));
  margin: 10vh auto 0;
  border-radius: var(--qd-r-lg);
  background: var(--qd-surface);
  border: 1px solid var(--qd-line);
  box-shadow: var(--qd-shadow-modal);
  padding: 18px;
  color: var(--qd-text);
}

.qdModal__panel::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--qd-r-lg);
  padding: var(--qd-outline-w);
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}

.qdModal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: var(--qd-r);
  border: 0;
  cursor: pointer;
  background: var(--qd-surface-sunken);
  color: var(--qd-text);
  font-size: 22px;
  line-height: 1;
}

.qdModal__title{
  margin: 6px 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.qdModal__sub{
  margin: 0 0 14px;
  color: var(--qd-muted);
  font-weight: 600;
  font-size: 12px;
}

.qdModal__form{ display: grid; gap: var(--qd-gap); }

.qdModal__label{
  font-weight: 800;
  font-size: 12px;
  color: var(--qd-text);
}

.qdModal__input{
  border: 1px solid var(--qd-line);
  border-radius: var(--qd-r);
  padding: var(--qd-field-pad);
  font-weight: 600;
  font-size: 13px;
  background: var(--qd-surface-sunken);
  color: var(--qd-text);
  outline: none;
}

.qdModal__input:focus{
  border-color: var(--qd-focus-ring);
  box-shadow: 0 0 0 3px rgba(57,201,240,.12);
}

.qdModal__submit{
  margin-top: 6px;
  height: var(--qd-control-h);
  border-radius: var(--qd-r);
  border: 0;
  cursor: pointer;
  font-weight: 800;
  color: var(--qd-on-accent);
  background: var(--qd-gradB);
}

/* ======================================================================
   qdModal extras (for Login + Signup flow) - DOES NOT change existing look
   ====================================================================== */

.qdModal__link{
  color: var(--qd-text);
  text-decoration: underline;
  text-decoration-color: var(--qd-focus-ring);
  text-underline-offset: 2px;
}

.qdModal__req{
  color: var(--qd-muted);
  margin-left: 4px;
}

.qdModal__sso{
  display: grid;
  gap: var(--qd-gap);
  margin: 12px 0 12px;
}

.qdModal__btn{
  height: var(--qd-control-h);
  border-radius: var(--qd-r);
  border: 0;
  cursor: not-allowed;
  font-weight: 800;
  font-size: 12px;
  color: var(--qd-text);
  background: var(--qd-surface-sunken);
  position: relative;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

.qdModal__btn::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--qd-r);
  padding: var(--qd-outline-w); /* matches your thicker outline */
  background: var(--qd-outline);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}

.qdModal__btnWhite{
  cursor: not-allowed;
}

.qdModal__divider{
  display: flex;
  align-items: center;
  gap: var(--qd-gap);
  margin: 10px 0 10px;
}

.qdModal__divider::before,
.qdModal__divider::after{
  content:"";
  height: 1px;
  flex: 1;
  background: var(--qd-line-soft);
}

.qdModal__divider span{
  font-weight: 900;
  font-size: 11px;
  color: var(--qd-muted);
  letter-spacing: .2px;
}

.qdModal__field{
  display: grid;
  gap: 6px;
}

.qdModal__pwWrap{
  position: relative;
  display: grid;
}

.qdModal__pwWrap .qdModal__input{
  padding-right: 64px;
}

.qdModal__show{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px;
  border-radius: var(--qd-r-sm);
  border: 0;
  cursor: pointer;
  font-weight: 900;
  font-size: 11px;
  color: var(--qd-text);
  background: var(--qd-surface-sunken);
}

.qdModal__forgot{
  margin-top: 2px;
}

.qdModal__switch{
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--qd-muted);
}

.qdModal__check{
  display: flex;
  gap: var(--qd-gap);
  align-items: flex-start;
  font-weight: 700;
  font-size: 12px;
  color: var(--qd-muted);
}

.qdModal__check input{
  margin-top: 3px;
}

.qdModal__backRow{
  margin-bottom: 10px;
}

.qdModal__back{
  border: 0;
  background: transparent;
  color: var(--qd-text);
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.qdModal__inputWithIcon{
  position: relative;
}

.qdModal__checkIcon{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  color: var(--qd-success);
}

.qdModal__help{
  font-size: 11px;
  font-weight: 700;
  color: var(--qd-muted);
}

/* The username-available confirmation -- the one non-muted help state. */
.qdModal__help.isAvailable{
  color: var(--qd-success);
}

/* ======================================================================
   Navbar user menu (logged-in state)
   ====================================================================== */
.qdNav__user { position: relative; }

.qdNav__userMenu{
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 190px;
  border-radius: var(--qd-r-md);
  border: 1px solid var(--qd-line-dark);
  background: var(--qd-nav-panel);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  padding: 6px;
  display: none;
  overflow: hidden;
}

.qdNav__user.isOpen .qdNav__userMenu{ display:block; }

.qdNav__userItem{
  width: 100%;
  display: block;
  text-align: left;
  padding: 10px 10px;
  border-radius: var(--qd-r-sm);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  color: var(--qd-nav-fg);
  text-decoration: none;
}

.qdNav__userItem:hover{ background: var(--qd-hover-tint); }

.qdNav__divider--thin{
  height: 1px;
  background: var(--qd-line-dark-soft);
  margin: 6px 6px;
}
/* ==========================================================================
   Theme toggle
   ========================================================================== */

.qdNav__themeBtn {
  padding: 0;
  width: var(--qd-control-h);
  height: var(--qd-control-h);
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.qdNav__mThemeBtn {
  display: flex;
  align-items: center;
  gap: var(--qd-gap);
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Applied for one frame while the theme switches, so hundreds of colour
   transitions do not all fire at once and stutter. */
.qdNoTransition,
.qdNoTransition *,
.qdNoTransition *::before,
.qdNoTransition *::after {
  transition: none !important;
  animation-duration: 0.001ms !important;
}
