/* QuarterEdge logo + brand chrome that follows the picked color (Nov 23 2026, themelogo).
   Every logo badge and wordmark is a two-color gradient made from the theme's two accents.
   Purple is the default for anyone who hasn't picked a color.
   Call colors (amber #E8C872, green #7dffc8, red #ff8aa0) are NOT touched here. */
:root, html[data-theme="purple"] {
  /* logo-only two-hue stops (twohue) */
  --qe-g1: #8B5CF6; --qe-g1-rgb: 139, 92, 246; --qe-g2: #FF4FD8; --qe-g2-rgb: 255, 79, 216;
  --qe-l1: #7A2BB8; --qe-l1-rgb: 122, 43, 184;
  --qe-l2: #D9A8FF; --qe-l2-rgb: 217, 168, 255;
  --qe-lw: #A55CE6;
}
html[data-theme="calm"] {
  /* logo-only two-hue stops (twohue) */
  --qe-g1: #FF3B3B; --qe-g1-rgb: 255, 59, 59; --qe-g2: #FFD23F; --qe-g2-rgb: 255, 210, 63;
  --qe-l1: #FF3B3B; --qe-l1-rgb: 255, 59, 59;
  --qe-l2: #FFD23F; --qe-l2-rgb: 255, 210, 63;
  --qe-lw: #FF6A6A;
}
html[data-theme="pink"] {
  /* logo-only two-hue stops (twohue) */
  --qe-g1: #FF3FA4; --qe-g1-rgb: 255, 63, 164; --qe-g2: #FF9A3C; --qe-g2-rgb: 255, 154, 60;
  --qe-l1: #C2367F; --qe-l1-rgb: 194, 54, 127;
  --qe-l2: #FF9FCF; --qe-l2-rgb: 255, 159, 207;
  --qe-lw: #E0609F;
}
html[data-theme="blue"] {
  /* logo-only two-hue stops (twohue) */
  --qe-g1: #3B82F6; --qe-g1-rgb: 59, 130, 246; --qe-g2: #22E1FF; --qe-g2-rgb: 34, 225, 255;
  --qe-l1: #1F6FD1; --qe-l1-rgb: 31, 111, 209;
  --qe-l2: #8FD0FF; --qe-l2-rgb: 143, 208, 255;
  --qe-lw: #4A95F0;
}
html[data-theme="green"] {
  /* logo-only two-hue stops (twohue) */
  --qe-g1: #22C55E; --qe-g1-rgb: 34, 197, 94; --qe-g2: #D4FF3A; --qe-g2-rgb: 212, 255, 58;
  --qe-l1: #1F9E5A; --qe-l1-rgb: 31, 158, 90;
  --qe-l2: #B4F07A; --qe-l2-rgb: 180, 240, 122;
  --qe-lw: #3FCB7E;
}

/* ---- Logo badge: every page (dash .login-mark, site .logo-mark, account .mark, pop-up .qe-hc-mark) ---- */
html .login-mark, html .login-mark.sm,
html .logo-mark, html .mark, html .qe-hc-mark {
  color: #050308 !important;
  background: linear-gradient(135deg, var(--qe-g1) 0%, var(--qe-g2) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 0 12px rgba(var(--qe-g1-rgb), 0.45),
    0 0 22px rgba(var(--qe-g2-rgb), 0.25) !important;
}

/* ---- Wordmark "QuarterEdge" ---- */
html .wordmark, html .brand-name.wordmark, html .login-card h1.wordmark, html .qe-wordmark {
  background: linear-gradient(135deg, var(--qe-lw) 0%, var(--qe-l1) 45%, var(--qe-l2) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 10px rgba(var(--qe-l1-rgb), 0.35)) drop-shadow(0 0 18px rgba(var(--qe-l2-rgb), 0.22)) !important;
}
/* Purple/pink/blue/green wordmark: the two logo hues (twohue). Easy on the Eyes keeps its rule above. */
html:not([data-theme="calm"]) .wordmark, html:not([data-theme="calm"]) .qe-wordmark {
  background: linear-gradient(135deg, var(--qe-g1) 0%, var(--qe-g1) 15%, var(--qe-g2) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  filter: drop-shadow(0 0 10px rgba(var(--qe-g1-rgb), 0.35)) drop-shadow(0 0 18px rgba(var(--qe-g2-rgb), 0.22)) !important;
}

/* ---- Public site chrome (landing, contact, legal pages use landing.css) ----
   Default/neon picks get the matching accent instead of the old red/yellow. "Easy on the Eyes"
   (calm) keeps the original red/yellow look. Scoped to body.qe-site so the dash is unaffected. */
html:not([data-theme="calm"]) body.qe-site { --purple: var(--qe-l1); --line-strong: rgba(var(--qe-l2-rgb), 0.38); }
html:not([data-theme="calm"]) body.qe-site .fx-glow {
  background:
    radial-gradient(1000px 640px at 50% -10%, rgba(var(--qe-l1-rgb), 0.14), transparent 58%),
    radial-gradient(900px 520px at 8% 0%, rgba(var(--qe-l2-rgb), 0.08), transparent 55%),
    radial-gradient(820px 480px at 100% 8%, rgba(var(--qe-l1-rgb), 0.08), transparent 55%),
    radial-gradient(1100px 420px at 50% 112%, rgba(var(--qe-l1-rgb), 0.12), transparent 58%),
    radial-gradient(900px 380px at 80% 118%, rgba(var(--qe-l2-rgb), 0.07), transparent 55%);
}
html:not([data-theme="calm"]) body.qe-site .fx-grid {
  background-image:
    linear-gradient(rgba(var(--qe-l2-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--qe-l2-rgb), 0.08) 1px, transparent 1px);
}
html:not([data-theme="calm"]) body.qe-site .le-btn.primary {
  background: linear-gradient(135deg, var(--qe-l1), var(--qe-l2));
  color: #050308;
  box-shadow: 0 0 14px rgba(var(--qe-l1-rgb), 0.32), 0 0 24px rgba(var(--qe-l2-rgb), 0.18);
}
html:not([data-theme="calm"]) body.qe-site .le-btn.primary:hover { color: #050308; }
html:not([data-theme="calm"]) body.qe-site .glass {
  background:
    linear-gradient(180deg, rgba(14, 8, 22, 0.92), rgba(5, 3, 10, 0.96)) padding-box,
    linear-gradient(135deg, var(--qe-l1) 0%, var(--qe-l2) 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(var(--qe-l1-rgb), 0.18),
    0 0 18px rgba(var(--qe-l1-rgb), 0.16),
    0 16px 40px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
html:not([data-theme="calm"]) body.qe-site .glass::before {
  background-image:
    radial-gradient(80% 50% at 8% 0%, rgba(var(--qe-l1-rgb), 0.12), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(var(--qe-l2-rgb), 0.10), transparent 60%),
    url("/static/fx/dots.svg");
}
html:not([data-theme="calm"]) body.qe-site .glass::after {
  background:
    linear-gradient(var(--qe-l1), var(--qe-l1)) 10px 10px / 16px 2px no-repeat,
    linear-gradient(var(--qe-l1), var(--qe-l1)) 10px 10px / 2px 16px no-repeat,
    linear-gradient(var(--qe-l2), var(--qe-l2)) calc(100% - 10px) 10px / 16px 2px no-repeat,
    linear-gradient(var(--qe-l2), var(--qe-l2)) calc(100% - 10px) 10px / 2px 16px no-repeat,
    linear-gradient(var(--qe-l2), var(--qe-l2)) 10px calc(100% - 10px) / 16px 2px no-repeat,
    linear-gradient(var(--qe-l2), var(--qe-l2)) 10px calc(100% - 10px) / 2px 16px no-repeat,
    linear-gradient(var(--qe-l2), var(--qe-l2)) calc(100% - 10px) calc(100% - 10px) / 16px 2px no-repeat,
    linear-gradient(var(--qe-l2), var(--qe-l2)) calc(100% - 10px) calc(100% - 10px) / 2px 16px no-repeat;
}
/* Loss box keeps its red: it shows losses, not brand. */
html:not([data-theme="calm"]) body.qe-site .worst {
  background:
    linear-gradient(180deg, rgba(18, 8, 16, 0.78), rgba(8, 4, 10, 0.9)) padding-box,
    linear-gradient(135deg, rgba(255, 59, 59, 0.7), rgba(255, 210, 63, 0.35)) border-box;
}
html:not([data-theme="calm"]) body.qe-site .site-header { border-bottom-color: rgba(var(--qe-l2-rgb), 0.18); }
html:not([data-theme="calm"]) body.qe-site .hero-copy h1 .glow {
  background: linear-gradient(135deg, var(--qe-lw) 0%, var(--qe-l1) 40%, var(--qe-l2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html:not([data-theme="calm"]) body.qe-site .device-wrap::before {
  background:
    radial-gradient(50% 50% at 70% 20%, rgba(var(--qe-l2-rgb), 0.16), transparent 70%),
    radial-gradient(50% 50% at 30% 80%, rgba(var(--qe-l1-rgb), 0.16), transparent 70%);
}
html:not([data-theme="calm"]) body.qe-site .device {
  background:
    linear-gradient(180deg, rgba(14, 8, 22, 0.95), rgba(5, 4, 10, 0.98)) padding-box,
    linear-gradient(135deg, var(--qe-l1), var(--qe-l2)) border-box;
}

/* ---- Account pages (sign in, sign up, account, forgot/reset): follow the member's pick on this device.
   Purple (default) keeps the original look; other picks recolor the accents, links and main button. */
html[data-theme]:not([data-theme="purple"]) body.qe-mp {
  --purple: var(--qe-l2); --purple-rgb: var(--qe-l1-rgb);
  --line: rgba(var(--qe-l2-rgb), 0.18);
  --bg-2: #07070A; --card: rgba(10, 10, 14, 0.92);
}
html[data-theme]:not([data-theme="purple"]) body.qe-mp {
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(var(--qe-l1-rgb), 0.22), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(var(--qe-l2-rgb), 0.12), transparent 60%), var(--bg);
}
html[data-theme]:not([data-theme="purple"]) body.qe-mp a:not(.brand) { color: var(--qe-l2); }
html[data-theme]:not([data-theme="purple"]) body.qe-mp .top nav a { color: var(--muted); }
html[data-theme]:not([data-theme="purple"]) body.qe-mp .btn.primary {
  background: linear-gradient(135deg, var(--qe-l1), var(--qe-l2));
  color: #050308;
  box-shadow: 0 0 22px rgba(var(--qe-l1-rgb), 0.35);
}
