/* EDJE · Polish layer — ambient gradients, glow accents, subtle animation.
   Inject on dark-themed pages (watchlist, portfolio, performance, search, trending, execute, copy, indices, ask). */

/* Ambient radial-gradient backdrop that slowly shifts */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(212,162,76,0.08), transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(34,211,238,0.06), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139,92,246,0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: edjeAmbient 24s ease-in-out infinite alternate;
}
@keyframes edjeAmbient {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.7; transform: scale(0.98); }
}
body > * { position: relative; z-index: 1; }

/* Glow on key numeric stats */
.stat .v, .idx .lvl, h1 em {
  text-shadow: 0 0 24px currentColor, 0 0 48px rgba(212,162,76,0.3);
}

/* Pulse animation on all gold-colored accents */
@keyframes edjePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}
.kicker, .vchip.linked .dot, .sb.live, .source-badge.live {
  animation: edjePulse 2.6s ease-in-out infinite;
}

/* Subtle shimmer on hero h1 — only when loaded */
h1 em {
  background: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #22D3EE 50%, #8B5CF6 75%, #22D3EE 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: edjeShimmer 6s linear infinite;
}
@keyframes edjeShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Soft glow border on key cards */
.card, .idx, .acct.linked, .stat, .chart-card, .about, .method {
  position: relative;
}
.card::after, .idx::after, .stat::after, .chart-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(212,162,76,0.25), transparent 30%, transparent 70%, rgba(34,211,238,0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}
.card:hover::after, .idx:hover::after, .stat:hover::after {
  opacity: 1;
  transition: opacity 0.3s;
}

/* Live price animation (subtle fade when number changes) */
.live-flash {
  animation: edjeFlash 0.6s ease-out;
}
@keyframes edjeFlash {
  0% { background-color: rgba(16,185,129,0.3); }
  100% { background-color: transparent; }
}

/* Subtle hover-lift on grid items */
.item, .result, .row, .idx, .m-card, .cta, .acct {
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.15s;
}
.item:hover, .result:hover, .idx:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -12px rgba(212,162,76,0.3);
}

/* Dot indicator for linked status */
.vchip .dot {
  box-shadow: 0 0 0 2px rgba(16,185,129,0.3);
}

/* Buttons get a subtle gradient on hover */
button.send:hover, .btn:hover, .cta:hover {
  background: linear-gradient(135deg, #D4A24C 0%, #22D3EE 200%);
  transition: background 0.3s;
}

/* Headers get a tiny gold underline on the active nav link */
nav a[style*="color:var(--ink)"] {
  position: relative;
}
nav a[style*="color:var(--ink)"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4A24C, transparent);
  animation: edjePulse 2.6s ease-in-out infinite;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Micro-animation on page load */
main > * {
  animation: edjeFadeIn 0.5s ease-out backwards;
}
main > *:nth-child(1) { animation-delay: 0ms; }
main > *:nth-child(2) { animation-delay: 60ms; }
main > *:nth-child(3) { animation-delay: 120ms; }
main > *:nth-child(4) { animation-delay: 180ms; }
main > *:nth-child(5) { animation-delay: 240ms; }
main > *:nth-child(6) { animation-delay: 300ms; }
main > *:nth-child(7) { animation-delay: 360ms; }
@keyframes edjeFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Honor reduce-motion preference */
@media (prefers-reduced-motion: reduce) {
  body::before, h1 em, .kicker, .vchip.linked .dot, .source-badge.live,
  main > *, .item, .result, .idx {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ===== Nov 4 · Nav de-duplication =====
   Many Terminal-era pages have their own <header><nav>...</nav></header> block.
   The site-wide nav is now injected globally by edje-nav.js, so the page-level
   duplicate makes every page look like it has two navigation bars. Hide any
   top-level <header> that contains a <nav>. The injected nav lives in a
   separate container so it is not affected. */
body > header:not(.edje-injected-header):has(nav) { display: none !important; }
/* Also catch Terminal pages that put the nav inside a <header class="...">
   directly under main containers. Scoped to visible duplicates only. */
main > header:not(.edje-injected-header):has(nav),
.wrap > header:not(.edje-injected-header):has(nav),
.container > header:not(.edje-injected-header):has(nav) { display: none !important; }

/* ===== Nov 4 · Unified EDJE brand gradient system =====
   The canonical EDJE brand look is a horizontally-shifting cyan→purple
   shimmer. It appears on the <em> word in every hero headline and now on the
   brand mark, CTAs, pill accents, and anywhere a pop of EDJE identity is
   wanted. Driven by CSS custom properties so individual pages can tint it
   if needed.
*/
:root {
  --edje-gradient: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%);
  --edje-gradient-size: 300% 100%;
  --edje-shimmer-duration: 8s;
}

/* Reusable utility: apply a shifting brand gradient as a text fill. */
.edje-brand-gradient,
.hero-edge .he-ribbon,
.hero-edge .he-edge.pos,
h1 em, h2 em,
.brand .dmd {
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* Reusable utility: apply a shifting brand gradient as a solid background
   (for CTAs, pills, dividers). Locks pill shape + padding so later cascading
   rules can't flatten the button into a rectangle. */
.edje-brand-fill,
.hero-edge .he-cta,
.nav-cta,
.edje-signin-cta {
  background: var(--edje-gradient) !important;
  background-size: var(--edje-gradient-size) !important;
  color: #0A0A10 !important;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 11px 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 108px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: 0 6px 20px -8px rgba(139,92,246,0.4) !important;
}
.hero-edge .he-cta:hover,
.nav-cta:hover,
.edje-signin-cta:hover { transform: translateY(-1px); filter: brightness(1.08); }
/* Mobile: slightly tighter to fit in nav */
@media (max-width: 720px) {
  .nav-cta, .edje-signin-cta {
    padding: 8px 18px !important;
    min-width: 0 !important;
    font-size: 13px !important;
  }
}

/* Reusable utility: use as a thin top accent line on cards. */
.edje-brand-rule {
  height: 2px;
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
  border-radius: 2px;
}

/* Restore the subtle 2px top accent line on hero cards site-wide. */
.hero-edge::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* Keep the shimmer keyframes (also referenced above) available even on pages
   that don't include the original rule block. */
@keyframes edjeShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ===== Nov 4 · EDJE gradient expansion ·  logo shimmer + global accents =====
   The shimmer is now the EDJE identity signature. Applied to every "here is the
   brand" moment across the site, including the wordmark itself. */

/* The EDJE wordmark (brand) shimmers, not just the ◆ mark. */
.brand, a.brand, .brand-logo, .logo-edje, .wordmark-edje,
.t-mark, .footer-brand, .ib-brand {
  background: var(--edje-gradient) !important;
  background-size: var(--edje-gradient-size) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite !important;
  text-decoration: none;
}
/* Make sure the ◆ mark inside brand still animates (it was inheriting). */
.brand .dmd, .brand .mark { background: inherit; -webkit-background-clip: text; background-clip: text; color: inherit; animation: inherit; }

/* Section kickers / eyebrows across Terminal pages (◆ RECENT RESOLUTIONS, ◆ PICKS, etc). */
.kicker, .section-kicker, .eyebrow, .pre-head, [data-kicker] {
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* Prominent edge numbers across the site (not just hero). */
.edge-value, .edge-pts, .big-edge, .stat-value, .big-number {
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* "LIVE" / "NEW" / small status pills — subtle shimmer backdrop. */
.chip-live, .chip-new, .pill-live, [data-live] {
  position: relative; overflow: hidden;
}
.chip-live::before, .chip-new::before, .pill-live::before, [data-live]::before {
  content: ''; position: absolute; inset: 0;
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  opacity: 0.18;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
  pointer-events: none;
}

/* Thin top accent on cards flagged as hero/featured. */
.card-featured::before, .card-hero::before, [data-brand-rule]::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}
.card-featured, .card-hero, [data-brand-rule] { position: relative; }

/* Links that use the gold accent shift to the brand shimmer for consistency. */
a[style*="color:var(--gold)"], a[style*="color:#D4A24C"],
.he-ribbon, .footer-brand-mark {
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* Install prompt / toast "EDJE" marks. */
.ib-brand, .edje-install-brand, .toast-brand {
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* ===== Nov 4 · Terminal pages polish sweep =====
   Apply EDJE identity to the 30+ Terminal pages (Engine Room, Theater, Graph,
   Clock, Topology, Flow, Whales, Scanner, Indices, etc.) that have their own
   stylesheets. These catches common selectors so the gradient + typography
   lands even on pages we never touched individually. */

/* Any page-level big headline that uses the Fraunces serif. */
.page-title, .big-head, .headline, .hero-title {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.page-title em, .big-head em, .headline em, .hero-title em {
  font-style: italic;
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* Monospace labels/stats — mute everywhere by default. */
.mono, .stat-label, .kpi-label, .metric-label {
  font-family: var(--mono, 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #8992a3);
}

/* Big numbers: Fraunces, clean, with optional gradient for positive stats. */
.big-num, .headline-num, .hero-num {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.big-num.pos, .headline-num.pos, .hero-num.pos,
.big-num.gradient, .headline-num.gradient, .hero-num.gradient {
  background: var(--edje-gradient);
  background-size: var(--edje-gradient-size);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
}

/* Status chips (WIN / LOSS / PENDING / LIVE) across Terminal pages. */
.chip-win, .pill-win, .stamp.g { color: var(--win, #1a7a3e); }
.chip-loss, .pill-loss, .stamp.r { color: var(--lose, #9B2C2C); }
.chip-live, .pill-live, .live-chip { position: relative; }

/* Hover affordance for any tabular row that acts as a link. */
tr.row-link:hover, tr[data-href]:hover { background: rgba(212,162,76,0.06); cursor: pointer; }

/* Card hairlines: tighter, warmer, consistent across Terminal pages. */
.card, .panel, .surface { border: 1px solid rgba(246,246,242,0.08); border-radius: 16px; }
.card:hover, .panel:hover { border-color: rgba(212,162,76,0.3); }

/* ===== Nov 4 · Chip overlap defense =====
   Venue/category chips were rendering behind other chips on some pages
   (POLYMARKET · CRYPTO showing ghost text from a second chip underneath).
   Lock their stacking + background so they can't bleed. */
.vchip, .venue-chip, .category-chip, .meta-chip, .status-chip,
.hero-edge .he-venue, .card-meta .venue, .card-meta .category {
  position: relative;
  z-index: 1;
  background: rgba(13,16,24,0.85);
  text-shadow: none !important;
  isolation: isolate;
}

/* Kill ambient body-wide radial gradients on the market detail page so the
   empty state heading isn’t tinted into near-invisibility. */
.market-detail body::before,
body.m-page::before { opacity: 0.25 !important; }

/* ===== Nov 4 · Mobile bottom tabbar — always on, not just PWA =====
   Users were scrolling through thousands of markets with no reachable nav.
   The .pwa-tabbar was gated behind `@media (display-mode: standalone)` so it
   only appeared in installed-PWA mode. Now it renders on every mobile browser
   viewport too, and we reserve bottom padding on body so content isn't
   covered by the bar.
*/
@media (max-width: 900px) {
  /* Always-visible bottom tab bar. */
  .pwa-tabbar { display: flex !important; }
  /* Reserve space so content sits above the bar, respecting safe-area. */
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; }
  /* Make the bar legible against the dark site chrome; the file-default is
     white but the EDJE site is darker — override to a semi-transparent dark. */
  .pwa-tabbar {
    background: rgba(13,16,24,0.92) !important;
    border-top: 1px solid rgba(246,246,242,0.08) !important;
    backdrop-filter: blur(20px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
    box-shadow: 0 -10px 24px -8px rgba(0,0,0,0.5) !important;
  }
  .pwa-tab { color: #8992a3 !important; }
  .pwa-tab.active, .pwa-tab:active {
    background: var(--edje-gradient);
    background-size: var(--edje-gradient-size);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: edjeShimmer var(--edje-shimmer-duration) linear infinite;
  }
  .pwa-tab.active svg, .pwa-tab:active svg { stroke: #22D3EE !important; }

  /* Hide the hamburger in the top nav on mobile since the bottom tabbar now
     handles primary navigation — fewer competing controls. */
  .nav-toggle { display: none !important; }
  /* Nav links that would open behind the hamburger: hide on mobile so only the
     tabbar is the nav affordance. */
  .nav-links { display: none !important; }
  /* Keep brand + any search/sign-in CTAs still showing in the top nav. */
}

/* Reserve a tiny bit of top padding too so the sticky header + tabbar don't
   collide with floating edges on short devices. */
@media (max-width: 900px) and (max-height: 760px) {
  .pwa-tabbar { padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ===== Nov 4 · UNIFIED EDJE LOGO · site-wide homogeneity =====
   Every EDJE wordmark on every page — nav, tagline strip, footer, PWA chrome,
   Terminal headers, admin/backend surfaces — now wears the exact same shifting
   brand gradient. No variation. One identity.

   Contrast strategy: the gradient has enough darker stops (purple #8B5CF6,
   gold #D4A24C) to read on white backgrounds. On very light pages we also
   apply a subtle drop shadow so cyan stops remain legible. Dark pages get
   the default shimmer treatment.
*/

/* Base target set — any element that functions as the EDJE wordmark.
   Two-layer approach: first set a SOLID fallback color so the text is always
   visible even if background-clip:text, CSS variables, or animations fail.
   Then overlay the gradient as text-fill. If the gradient paints, the
   transparent text-fill lets it show through; if it doesn't, the solid
   fallback color is what the user sees. No more invisible logos. */
.brand,
a.brand,
.t-mark, .t-mark *,
.footer-brand, .footer-brand-mark,
.brand-blurb, .brand-blurb strong,
.wmk, .wordmark, .wordmark-edje, .logo-edje, .edje-logo, .brand-logo,
.ib-brand, .edje-install-brand, .toast-brand,
.edje-logotype,
[data-edje-logo] {
  /* Fallback (visible even without gradient support) */
  color: #D4A24C;
  /* Gradient layer */
  background-image: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
          background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: edjeShimmer 8s linear infinite !important;
  text-decoration: none !important;
}

/* The ◆ diamond mark alongside the wordmark inherits the shimmer. */
.brand .dmd, .brand .mark, .brand .brand-mark,
.t-mark::before, [data-edje-logo] .mark {
  background: inherit !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: inherit !important;
  color: inherit !important;
  animation: inherit !important;
}

/* Backend/admin surfaces usually use <header class="brand"> or a bare text EDJE.
   Force the shimmer on those too. */
header .brand, header a[href="/"], header [data-brand] {
  background: var(--edje-gradient) !important;
  background-size: var(--edje-gradient-size) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: edjeShimmer var(--edje-shimmer-duration) linear infinite !important;
}

/* Light-page refinement — if the page body has a light background color set
   inline or via a known light theme, shift to a slightly darker gradient so the
   cyan stops stay legible. Uses CSS variable override; falls back to the
   regular gradient if not defined. */
@media (prefers-color-scheme: light) {
  html[data-theme="light"],
  body[style*="background:#fff"],
  body[style*="background:white"],
  body.light-page {
    --edje-gradient: linear-gradient(90deg, #0E7490 0%, #6D28D9 25%, #B45309 50%, #6D28D9 75%, #0E7490 100%);
  }
}
/* Explicit opt-in for pages that know they're dark/light. */
html[data-theme="dark"] body, body.dark-page {
  --edje-gradient: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%);
}

/* ===== Nov 4 · Contrast rescue · no black-on-black anywhere =====
   Catch-all rules that force readable text when a dark color somehow landed on
   a dark surface. Explicit inline-styled dark colors are overridden with the
   site ink color when they appear on body/cards/hero shells.
*/

/* Body dark theme baseline — ensures default text is readable on dark pages. */
body {
  color: var(--ink, #F6F6F2);
}

/* Any element with an inline dark color that sits inside a known dark container
   gets rescued to the light ink. These attribute selectors are brittle on
   purpose — they target exactly the patterns that appear across the codebase. */
body [style*="color:#000"]:not(.nav-cta):not(.hero-ask-btn):not([class*="light-bg"]):not([class*="btn"]):not(.open-btn):not(.he-cta):not(button):not(a[class*="btn"]):not(a[class*="cta"]),
body [style*="color: #000"]:not(.nav-cta):not(.hero-ask-btn):not([class*="light-bg"]):not([class*="btn"]):not(.open-btn):not(.he-cta):not(button):not(a[class*="btn"]):not(a[class*="cta"]),
body [style*="color:black"]:not([class*="btn"]):not([class*="cta"]):not(button),
body [style*="color:#0A0A10"]:not([class*="btn"]):not([class*="cta"]):not(button),
body [style*="color:#06060a"]:not([class*="btn"]):not([class*="cta"]):not(button) {
  color: var(--ink, #F6F6F2) !important;
}

/* Explicit safeguards for any text element that has a dark background set to
   the same color as its text — invisible by default. Make the text light. */
[style*="background:#000"][style*="color:#000"],
[style*="background:#06060a"][style*="color:#06060a"],
[style*="background:#0D1018"] [style*="color:#000"],
[style*="background:#0D1018"] [style*="color:#0A0A10"] {
  color: var(--ink, #F6F6F2) !important;
}

/* Dark containers: ensure their default text color is bright. */
.hero-edge, .card, .panel, .surface, .pwa-tabbar, .topbar, .shell > .card,
[style*="background:#101218"], [style*="background:#0D1018"],
[style*="background:#06060a"], [style*="background:#0a0a10"] {
  color: var(--ink, #F6F6F2);
}

/* Tiny safety — force the generic SVG background-mask of the install banner icon
   to have readable text if it inverted. */
#edje-install-banner, .edje-install-brand {
  color: var(--ink, #F6F6F2);
}

/* ===== Nov 4 · Logo specificity override for edge-core.css =====
   The base edge-core.css sets .tagline-strip .t-mark { color:#ffffff !important }
   and various mobile rules that strip our gradient. These selectors are
   sharper than my earlier rules so they definitely win regardless of load order.
   Uniform mobile + desktop + light + dark presentation.
*/
.tagline-strip .t-mark,
.tagline-strip .tagline-stack .t-mark,
nav.nav .brand,
header .brand,
.nav .brand,
.brand.brand,
.brand.wordmark,
.brand .wmk,
.wmk.wmk {
  color: #D4A24C;
  background-image: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: edjeShimmer 8s linear infinite !important;
  text-shadow: none !important;
}

/* Preserve the signature skew but make sure it doesn't kill the gradient. */
.brand, .t-mark, nav.nav .brand, header .brand {
  display: inline-block;
}
/* On mobile, keep the gradient — do NOT revert to a solid color. */
@media (max-width: 720px) {
  .brand, a.brand, .t-mark,
  nav.nav .brand, header .brand,
  .tagline-strip .t-mark {
    background: var(--edje-gradient) !important;
    background-size: var(--edje-gradient-size) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: edjeShimmer var(--edje-shimmer-duration) linear infinite !important;
  }
}

/* ===== Nov 4 · Final brand lockdown =====
   Page-local .brand rules on 9 Terminal pages (clock, engine-room, graph, rules,
   signals, sources, theater, topology, whales, picks) hardcoded the 3-color
   cyan→purple→pink gradient with no shimmer. Override at the end so the EDJE
   gold shimmer wins everywhere without editing each page. */
html body .brand,
html body a.brand,
html body header .brand,
html body nav .brand,
html body .wordmark-edje,
html body .logo-edje,
html body .edje-logo,
html body .brand-logo,
html body .footer-brand {
  background: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: edjeShimmer 8s linear infinite !important;
}

/* ===== Nov 5 · Global primary-CTA shimmer =====
   The /edge Return Uplift calculator's primary CTA became the user's favorite
   piece of the brand ("the color-changing button"). Apply the same shimmer
   treatment to every primary action pill across the site so the brand feels
   unified. Only hits selectors that are already styled as prominent CTAs
   (gradient background + rounded pill + bold text); secondary buttons and
   nav pills are untouched. */
.cta-primary,
.btn-primary,
.primary-btn,
.btn-cta,
button.primary,
a.primary-cta,
.hero-ask-btn,
.place-bet-btn,
.venue-cta-btn,
.pricing-cta,
.pay-cta,
.subscribe-cta,
a[href*="/pricing"].nav-cta,
.edje-cta-primary,
[data-cta="primary"] {
  background: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%) !important;
  background-size: 300% 100% !important;
  color: #07080C !important;
  -webkit-text-fill-color: #07080C !important;
  border: none !important;
  animation: edjeCtaShimmer 6s linear infinite !important;
  box-shadow: 0 10px 30px -10px rgba(139,92,246,0.5) !important;
  font-weight: 800 !important;
  transition: transform .15s, box-shadow .15s !important;
}
.cta-primary:hover,
.btn-primary:hover,
.primary-btn:hover,
.btn-cta:hover,
button.primary:hover,
a.primary-cta:hover,
.hero-ask-btn:hover,
.place-bet-btn:hover,
.venue-cta-btn:hover,
.pricing-cta:hover,
.pay-cta:hover,
.subscribe-cta:hover,
a[href*="/pricing"].nav-cta:hover,
.edje-cta-primary:hover,
[data-cta="primary"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 36px -10px rgba(139,92,246,0.65) !important;
}
@keyframes edjeCtaShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Hero "Today's top edge" Place-bet pill on /picks was using flat gold —
   switch to the shimmer so it matches the rest. */
.hero-edge a[href*="polymarket"],
.hero-edge a[href*="kalshi"],
.hero-edge .place-btn,
.hero-edge .btn-place {
  background: linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%) !important;
  background-size: 300% 100% !important;
  color: #07080C !important;
  -webkit-text-fill-color: #07080C !important;
  animation: edjeCtaShimmer 6s linear infinite !important;
  font-weight: 800 !important;
}

/* ===== Nov 9 · Accessibility quick-wins =====
   Site-wide a11y improvements injected via the polish stylesheet
   so every page benefits without having to edit each HTML file. */

/* Visible focus ring for keyboard users — WCAG 2.1 SC 2.4.7 */
*:focus-visible {
  outline: 2px solid #22D3EE !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}
/* Mouse users don't see the ring — :focus without keyboard */
*:focus:not(:focus-visible) { outline: none !important; }

/* Honor prefers-reduced-motion — kill shimmer animations when requested */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-to-content link — appears only on keyboard focus */
.edje-skip-link {
  position: absolute; top: -40px; left: 0;
  background: #22D3EE; color: #07080C; padding: 8px 16px;
  font-weight: 800; font-size: 14px; text-decoration: none;
  border-radius: 0 0 8px 0; z-index: 10000;
}
.edje-skip-link:focus { top: 0; }

/* Ensure form inputs have visible focus states */
input:focus, select:focus, textarea:focus, button:focus {
  outline: 2px solid #22D3EE;
  outline-offset: 2px;
}

/* Interactive elements need min 44x44 tap target on touch */
@media (pointer: coarse) {
  button, a.btn, [role="button"], .pill, .chip, input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ══════════════════════════════════════════════════════════════ */
/* Nov 11 · EDJE logo shimmer on mobile + unified brand gradient */
/* ══════════════════════════════════════════════════════════════ */

/* Brand links in the top nav — make them shimmer same as desktop */
nav.nav .brand,
nav.nav-top .brand,
header .brand,
.pwa-tabbar .brand,
a.brand:not(.no-shimmer) {
  background: var(--edje-gradient, linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%));
  background-size: var(--edje-gradient-size, 300% 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: edjeShimmer var(--edje-shimmer-duration, 8s) linear infinite;
  font-weight: 900;
}

/* Mobile brand especially — ensure it shimmers on all breakpoints */
@media (max-width: 899px) {
  a.brand, .brand {
    background: var(--edje-gradient, linear-gradient(90deg, #22D3EE 0%, #8B5CF6 25%, #D4A24C 50%, #8B5CF6 75%, #22D3EE 100%)) !important;
    background-size: var(--edje-gradient-size, 300% 100%) !important;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: edjeShimmer var(--edje-shimmer-duration, 8s) linear infinite !important;
  }
}

/* Honor reduced-motion */
@media (prefers-reduced-motion: reduce) {
  a.brand, .brand, nav.nav .brand {
    animation: none !important;
    -webkit-text-fill-color: #22D3EE !important;
    color: #22D3EE !important;
    background: none !important;
  }
}
