html{scroll-behavior:smooth}
a{text-decoration:none}
::selection{background:#10b981;color:#fff}

/* Kill ALL focus outlines, borders, rings */
*:focus,*:focus-within,*:focus-visible,*:active{
  outline:none!important;
  box-shadow:none!important;
  border-color:transparent!important;
}
button,a,input,select,textarea{
  outline:none!important;
  box-shadow:none!important;
}
button::after,a::after{
  outline:none!important;
  box-shadow:none!important;
}

/* Override Tailwind preflight border-color on all elements */
button,a,img,input{
  border-color:inherit;
}
button{
  border:none!important;
}

/* ========================================
   SIGNALS GRID — Responsive
   ======================================== */
.fp-sig-grid{
  display:grid!important;
  grid-template-columns:repeat(4,1fr)!important;
  gap:12px!important;
  margin-bottom:24px;
}

/* ========================================
   HERO STATS — Responsive
   ======================================== */
.fp-hero-stats{
  display:grid!important;
  grid-template-columns:repeat(4,1fr)!important;
  gap:16px!important;
}

/* ========================================
   FEATURES GRID — Responsive centering
   ======================================== */
.fp-features-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:24px;
}

/* ========================================
   DARK MODE (default)
   ======================================== */
html.dark body{background:hsl(222.2 84% 4.9%);color:hsl(210 40% 98%)}

/* ========================================
   LIGHT MODE
   ======================================== */
html.light body{background:hsl(210 20% 94%);color:hsl(222.2 84% 12%)}
html.light .fp-site{color:hsl(222.2 84% 12%)}
html.light .fp-site h1,html.light .fp-site h2,html.light .fp-site h3,html.light .fp-site h4{color:hsl(222.2 84% 12%)}
html.light .glass{background:rgba(255,255,255,0.8);border-color:rgba(0,0,0,0.06);box-shadow:0 1px 3px rgba(0,0,0,0.04)}
html.light .ticker-item{background:rgba(0,0,0,0.03)}
html.light .bg-grid{background-image:linear-gradient(rgba(0,0,0,0.02) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,0.02) 1px,transparent 1px)}

/* Light mode: Header */
html.light header{background:hsl(210 20% 96%/0.95)!important;box-shadow:0 1px 3px rgba(0,0,0,0.04)}
html.light header~div{background:hsl(210 20% 96%/0.95)!important}
html.light #site-header{background:hsl(210 20% 96%/0.95)!important}
html.light #site-header~div{background:hsl(210 20% 96%/0.95)!important}
html.light header a{color:hsl(222.2 84% 12%)}
html.light header .text-muted-foreground{color:hsl(215.3 16.3% 40%)!important}

/* Light mode: Ticker bar */
html.light .ticker-animate{background:transparent}
html.light [style*="background:hsl(222.2 84% 4.9%"]{background:hsl(210 20% 96%)!important}
html.light [style*="background:hsl(222.2 84% 4.9%/0.95)"]{background:hsl(210 20% 96%/0.95)!important}
html.light [style*="background:rgba(15,23,42"]{background:rgba(255,255,255,0.9)!important;border-color:rgba(0,0,0,0.06)!important}
html.light [style*="background:rgba(255,255,255,0.03)"]{background:rgba(0,0,0,0.03)!important}
html.light [style*="background:rgba(255,255,255,0.02)"]{background:rgba(0,0,0,0.02)!important}
html.light [style*="border:1px solid rgba(255,255,255,0.05)"]{border-color:rgba(0,0,0,0.08)!important}
html.light [style*="border:1px solid rgba(255,255,255,0.06)"]{border-color:rgba(0,0,0,0.08)!important}
html.light [style*="border-bottom:1px solid rgba(255,255,255,0.04)"]{border-bottom-color:rgba(0,0,0,0.06)!important}
html.light [style*="border-bottom:1px solid rgba(255,255,255,0.06)"]{border-bottom-color:rgba(0,0,0,0.06)!important}

/* Light mode: Body inline dark overrides */
html.light body{background:hsl(210 20% 94%)!important;color:hsl(222.2 84% 12%)!important}
html.light h1,html.light h2,html.light h3,html.light h4{color:hsl(222.2 84% 12%)!important}
html.light p,html.light span,html.light div{color:inherit}
html.light span[style*="color:hsl(210,40%,98%)"],html.light div[style*="color:hsl(210,40%,98%)"],html.light h4[style*="color:hsl(210,40%,98%)"]{color:hsl(222.2 84% 12%)!important}
html.light span[style*="color:rgba(255,255,255,0.4)"],html.light div[style*="color:rgba(255,255,255,0.4)"],html.light div[style*="color:rgba(255,255,255,0.45)"],html.light span[style*="color:rgba(255,255,255,0.35)"]{color:hsl(215.3 16.3% 40%)!important}
html.light div[style*="color:rgba(255,255,255,0.06)"]{background:rgba(0,0,0,0.04)!important}

/* Light mode: Green border wrapper */
html.light .border-emerald-500{border-color:hsl(160 84% 39%)!important}

/* Light mode: Footer */
html.light footer{background:hsl(210 20% 92%)!important;color:hsl(222.2 84% 12%)}
html.light .text-foreground{color:hsl(222.2 84% 12%)!important}
html.light .text-muted-foreground{color:hsl(215.3 16.3% 35%)!important}
html.light a{color:hsl(222.2 84% 12%)}

/* Light mode: Cards */
html.light .sig-card,html.light .dash-card,html.light .market-card,html.light .mover-card,html.light .inst-rel-card,html.light .inst-sig-card{background:rgba(255,255,255,0.9);border-color:rgba(0,0,0,0.06)}
html.light .fp-sig-card{background:rgba(255,255,255,0.8)!important;border-color:rgba(0,0,0,0.06)!important}
html.light .fp-sig-card [style*="color:hsl(210,40%,98%)"]{color:hsl(222.2 84% 12%)!important}
html.light .fp-sig-card [style*="color:rgba(255,255,255,0.4)"]{color:hsl(215.3 16.3% 40%)!important}
html.light .fp-sig-card [style*="color:rgba(255,255,255,0.35)"]{color:hsl(215.3 16.3% 40%)!important}
html.light .fp-sig-card [style*="background:rgba(255,255,255,0.03)"]{background:rgba(0,0,0,0.03)!important}
html.light .fp-rsidebar{position:relative!important;top:auto!important}
html.light .fp-rsidebar [style*="background:rgba(15,23,42,0.6)"]{background:rgba(255,255,255,0.9)!important;border-color:rgba(0,0,0,0.06)!important}
html.light .fp-rsidebar [style*="color:hsl(210,40%,98%)"]{color:hsl(222.2 84% 12%)!important}
html.light .fp-rsidebar [style*="color:hsl(215,16%,47%)"]{color:hsl(215.3 16.3% 40%)!important}
html.light .fp-rsidebar [style*="color:hsl(210,40%,90%)"]{color:hsl(222.2 84% 12%)!important}
html.light .fp-rsidebar [style*="border-bottom:1px solid rgba(255,255,255,0.04)"]{border-bottom-color:rgba(0,0,0,0.06)!important}
html.light .fp-rsidebar [style*="border-bottom:1px solid rgba(255,255,255,0.06)"]{border-bottom-color:rgba(0,0,0,0.06)!important}

/* Light mode: Form inputs */
html.light input,html.light select,html.light textarea{background:#fff!important;border-color:rgba(0,0,0,0.1)!important;color:hsl(222.2 84% 12%)!important}

/* Light mode: Signal badges */
html.light .sig-badge.buy,html.light .sig-badge.strong-buy{background:rgba(16,185,129,0.15);color:#059669}
html.light .sig-badge.sell,html.light .sig-badge.strong-sell{background:rgba(239,68,68,0.15);color:#dc2626}
html.light .sig-badge.hold{background:rgba(59,130,246,0.15);color:#2563eb}

/* Light mode: Dashboard */
html.light .dash-wrap{color:hsl(222.2 84% 12%)}
html.light .dash-card{background:rgba(255,255,255,0.9)!important;border-color:rgba(0,0,0,0.06)!important}
html.light .dash-card h2{color:hsl(222.2 84% 12%)!important;border-bottom-color:rgba(0,0,0,0.06)!important}
html.light .dash-sig-card{background:rgba(255,255,255,0.8)!important;border-color:rgba(0,0,0,0.06)!important}
html.light .dash-sig-card:hover{border-color:rgba(16,185,129,0.3)!important}
html.light .dash-sig-inner{color:hsl(222.2 84% 12%)}
html.light .dash-sig-name,html.light .inst-sym,html.light .mover-card .sym{color:hsl(222.2 84% 12%)!important}
html.light .dash-sig-desc,html.light .inst-name,html.light .mover-card .name,html.light .dash-section-title span,html.light .dash-sig-conf-label,html.light .dash-sig-price-label{color:hsl(215.3 16.3% 40%)!important}
html.light .dash-sig-conf-val,html.light .inst-price,html.light .mover-card .price,html.light .dash-sig-price-val{color:hsl(222.2 84% 12%)!important}
html.light .dash-empty{color:hsl(215.3 16.3% 40%)}
html.light .login-card{background:rgba(255,255,255,0.9)!important;border-color:rgba(0,0,0,0.06)!important}
html.light .login-card h2{color:hsl(222.2 84% 12%)!important}
html.light .login-card p{color:hsl(215.3 16.3% 40%)!important}
html.light .mover-card{background:rgba(255,255,255,0.9)!important;border-color:rgba(0,0,0,0.06)!important}
html.light .mover-card:hover{border-color:rgba(16,185,129,0.3)!important}
html.light .dash-sig-conf-track{background:rgba(0,0,0,0.06)!important}
html.light .dash-sig-price{background:rgba(0,0,0,0.03)!important}

/* Light mode: Mobile nav */
html.light #mobile-nav{background:hsl(210 20% 96%/0.95)!important}
html.light #mobile-nav a{color:hsl(222.2 84% 12%)!important}
html.light #mobile-nav hr{border-color:rgba(0,0,0,0.08)!important}

/* Light mode: Notifications popup */
html.light [style*="background:hsl(222.2 84% 12%)"][style*="border:1px solid rgba(255,255,255,0.1)"]{background:hsl(210 20% 96%)!important;border-color:rgba(0,0,0,0.08)!important}
html.light [style*="color:#e2e8f0"]{color:hsl(222.2 84% 12%)!important}
html.light [style*="color:#94a3b8"]{color:hsl(215.3 16.3% 40%)!important}

/* Footer link hover visibility */
footer a:hover,
footer a:focus {
    color: hsl(210 40% 98%) !important; /* white in dark mode */
}
html.light footer a:hover,
html.light footer a:focus {
    color: hsl(222.2 84% 12%) !important; /* dark in light mode */
}

/* ========================================
   RESPONSIVE — Signals grid
   ======================================== */
@media(max-width:1024px){
  .fp-sig-grid{grid-template-columns:repeat(2,1fr)!important}
}
@media(max-width:640px){
  .fp-sig-grid{grid-template-columns:1fr!important}
}

/* ========================================
   RESPONSIVE — Hero stats grid
   ======================================== */
@media(max-width:768px){
  .fp-hero-stats{grid-template-columns:repeat(2,1fr)!important}
}
@media(max-width:480px){
  .fp-hero-stats{grid-template-columns:1fr 1fr!important;gap:10px!important}
}

/* ========================================
   RESPONSIVE — Features grid centering
   ======================================== */
@media(max-width:640px){
  .fp-features-grid{grid-template-columns:1fr!important;text-align:center}
  .fp-features-grid a{text-align:center}
  .fp-features-grid div[style*="display:flex;align-items:center;justify-content:center"]{justify-content:center!important}
}

/* ========================================
   RESPONSIVE — Footer
   ======================================== */
@media(max-width:640px){
  footer .grid{grid-template-columns:1fr 1fr!important;text-align:center}
  footer .flex{flex-direction:column!important;text-align:center}
}
