:root {
  --p1:#1E0459;--p2:#3B0764;--p3:#4C1D95;--p4:#5B21B6;--p5:#6D28D9;
  --p6:#7C3AED;--p7:#8B5CF6;--p8:#A78BFA;--p9:#C4B5FD;--p10:#EDE9FE;
  --green:#10B981;--green-d:rgba(16,185,129,.14);--green-b:rgba(16,185,129,.28);
  --blue:#3B82F6;--blue-d:rgba(59,130,246,.14);
  --orange:#F59E0B;--orange-d:rgba(245,158,11,.12);
  --teal:#14B8A6;--teal-d:rgba(20,184,166,.14);
  --indigo:#6366F1;--indigo-d:rgba(99,102,241,.14);
  --amber:#F59E0B;
  --bg:#05000F;
  --card:rgba(255,255,255,.033);
  --border:rgba(255,255,255,.07);
  --bp:rgba(139,92,246,.22);
  --tm:rgba(255,255,255,.42);
  --tmid:rgba(255,255,255,.65);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Nunito Sans',sans-serif;
  background:var(--bg);color:#fff;
  overflow-x:hidden;line-height:1.6;
}
body::after{
  content:'';position:fixed;inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity:.025;pointer-events:none;z-index:9000;
}

/* ── TYPOGRAPHY ── */
.display{font-family:'Nunito',sans-serif;font-weight:900}
.grad{background:linear-gradient(145deg,#fff 30%,var(--p9) 70%,var(--p8) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.grad-vivid{background:linear-gradient(135deg,var(--p9) 0%,var(--p7) 50%,var(--p6) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}

/* ── NAV ── */
nav{
  position:fixed;top:0;left:0;right:0;z-index:500;height:62px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 2.5rem;
  backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  background:rgba(5,0,15,.6);
  border-bottom:1px solid rgba(139,92,246,.1);
  transition:background .3s;
}
nav.scrolled{background:rgba(3,0,10,.9)}
.logo{
  font-family:'Nunito',sans-serif;font-weight:900;font-size:1.5rem;
  letter-spacing:-.05em;text-decoration:none;
  background:linear-gradient(135deg,var(--p9),var(--p7));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.nav-links{display:flex;list-style:none;gap:2rem}
.nav-links a{
  text-decoration:none;color:var(--tm);font-size:.875rem;font-weight:700;
  letter-spacing:.01em;transition:color .2s;position:relative;padding-bottom:2px;
}
.nav-links a::after{content:'';position:absolute;bottom:0;left:0;right:0;height:1.5px;background:var(--p7);transform:scaleX(0);transition:transform .25s;border-radius:2px}
.nav-links a:hover{color:#fff}
.nav-links a:hover::after,.nav-links a.active::after{transform:scaleX(1)}
.nav-links a.active{color:#fff}
.btn-nav{
  background:linear-gradient(135deg,var(--p6),var(--p4));
  color:#fff;padding:.55rem 1.3rem;border-radius:100px;
  font-weight:800;font-size:.85rem;border:none;cursor:pointer;
  text-decoration:none;font-family:'Nunito',sans-serif;
  box-shadow:0 0 20px rgba(124,58,237,.35);transition:all .25s;
}
.btn-nav:hover{transform:translateY(-1px);box-shadow:0 0 32px rgba(124,58,237,.55)}

/* ── BUTTONS ── */
.btn-primary{
  background:linear-gradient(135deg,var(--p6),var(--p4));
  color:#fff;padding:.8rem 2rem;border-radius:100px;
  font-weight:800;font-size:.95rem;border:none;cursor:pointer;
  text-decoration:none;font-family:'Nunito',sans-serif;
  box-shadow:0 0 28px rgba(124,58,237,.4);transition:all .25s;display:inline-block;
}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 0 44px rgba(124,58,237,.65)}
.btn-ghost{
  background:rgba(139,92,246,.09);color:var(--p8);padding:.8rem 2rem;
  border-radius:100px;font-weight:800;font-size:.95rem;
  border:1px solid rgba(139,92,246,.28);cursor:pointer;
  text-decoration:none;font-family:'Nunito',sans-serif;transition:all .25s;display:inline-block;
}
.btn-ghost:hover{background:rgba(139,92,246,.18);transform:translateY(-2px)}
.btn-back{
  display:inline-flex;align-items:center;gap:.5rem;
  text-decoration:none;color:var(--tm);font-size:.85rem;font-weight:700;
  background:var(--card);border:1px solid var(--border);
  border-radius:100px;padding:.45rem 1.1rem;transition:all .25s;
}
.btn-back:hover{color:#fff;border-color:var(--bp)}

/* ── PILLS ── */
.pill{
  display:inline-flex;align-items:center;gap:7px;
  background:rgba(139,92,246,.1);border:1px solid var(--bp);
  border-radius:100px;padding:5px 15px;
  font-size:.72rem;font-weight:800;color:var(--p8);letter-spacing:.07em;text-transform:uppercase;
}
.pill .live-dot{width:6px;height:6px;border-radius:50%;background:var(--green);animation:blink 1.8s infinite}

/* ── CARDS ── */
.glass-card{
  background:var(--card);border:1px solid var(--border);
  border-radius:22px;backdrop-filter:blur(12px);
  transition:all .3s;
}
.glass-card:hover{border-color:var(--bp);box-shadow:0 20px 60px rgba(0,0,0,.4)}

/* ── SECTION ── */
section{padding:6rem 2.5rem;position:relative}
.sec-inner{max-width:1280px;margin:0 auto}
.sec-divider{height:1px;background:linear-gradient(90deg,transparent,rgba(139,92,246,.18),transparent);margin:0 2.5rem}

/* ── GLOW ── */
.orb{position:absolute;border-radius:50%;filter:blur(110px);pointer-events:none;animation:glowPulse 7s ease-in-out infinite}
@keyframes glowPulse{0%,100%{opacity:.7;transform:scale(1)}50%{opacity:1;transform:scale(1.08)}}

/* ── ANIMATIONS ── */
@keyframes blink{0%,100%{opacity:1}50%{opacity:.25}}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
@keyframes float2{0%,100%{transform:translateY(0) rotate(1deg)}50%{transform:translateY(-10px) rotate(-1deg)}}
@keyframes pulseRing{0%{box-shadow:0 0 0 0 rgba(124,58,237,.6)}70%{box-shadow:0 0 0 14px rgba(124,58,237,0)}100%{box-shadow:0 0 0 0 rgba(124,58,237,0)}}
@keyframes shimmer{0%{background-position:200% center}100%{background-position:-200% center}}
@keyframes slideIn{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}
@keyframes fadeUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes countUp{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes scanLine{0%{top:0}100%{top:100%}}

/* ── REVEAL ── */
.reveal{opacity:0;transform:translateY(24px);transition:opacity .7s ease,transform .7s ease}
.reveal.up{opacity:1;transform:translateY(0)}
.d1{transition-delay:.07s}.d2{transition-delay:.14s}.d3{transition-delay:.21s}
.d4{transition-delay:.28s}.d5{transition-delay:.35s}.d6{transition-delay:.42s}

/* ── DETAIL PAGE HERO ── */
.detail-hero{
  min-height:70vh;display:flex;align-items:center;
  padding:8rem 2.5rem 5rem;position:relative;overflow:hidden;
}
.detail-hero-inner{max-width:1280px;margin:0 auto;width:100%;position:relative;z-index:2}
.detail-h1{
  font-family:'Nunito',sans-serif;font-weight:900;
  font-size:clamp(2.8rem,6vw,5.5rem);line-height:.98;letter-spacing:-.04em;
  margin-bottom:1.25rem;
}
.detail-sub{font-size:1.1rem;color:var(--tm);line-height:1.8;max-width:560px;font-weight:500;margin-bottom:2rem}

/* ── FOOTER ── */
footer{
  border-top:1px solid var(--border);padding:2.5rem;
  max-width:1280px;margin:0 auto;
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1.5rem;
}
.footer-links{display:flex;gap:2rem;list-style:none}
.footer-links a{text-decoration:none;color:rgba(255,255,255,.3);font-size:.85rem;font-weight:700;transition:color .2s}
.footer-links a:hover{color:rgba(255,255,255,.65)}
.footer-copy{font-size:.78rem;color:rgba(255,255,255,.18);font-weight:600}

/* ── COMMON COMPONENTS ── */
.feature-list{display:flex;flex-direction:column;gap:.9rem}
.feat-item{
  display:flex;gap:.9rem;align-items:flex-start;padding:1.1rem 1.4rem;
  background:var(--card);border:1px solid var(--border);border-radius:16px;transition:all .3s;
}
.feat-item:hover{border-color:var(--bp);transform:translateX(5px)}
.feat-ico{font-size:1.3rem;flex-shrink:0;margin-top:.1rem}
.feat-title{font-family:'Nunito',sans-serif;font-weight:800;font-size:.92rem;color:#fff;margin-bottom:.2rem}
.feat-desc{font-size:.8rem;color:var(--tm);line-height:1.65}

.step-list{display:flex;flex-direction:column;gap:0}
.step-item{display:flex;gap:1rem;align-items:flex-start;padding:1rem 0;border-bottom:1px solid var(--border)}
.step-item:last-child{border-bottom:none}
.step-num{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  font-size:.65rem;font-weight:900;color:#fff;
  background:linear-gradient(135deg,var(--p6),var(--p4));
  box-shadow:0 0 10px rgba(124,58,237,.4);
}
.step-title{font-family:'Nunito',sans-serif;font-weight:800;font-size:.9rem;margin-bottom:.2rem}
.step-desc{font-size:.8rem;color:var(--tm);line-height:1.6}

/* ── HAMBURGER NAV ── */
.nav-hamburger{
  display:none;flex-direction:column;justify-content:center;align-items:center;
  width:40px;height:40px;cursor:pointer;gap:5px;z-index:600;
  background:none;border:none;padding:6px;
}
.nav-hamburger span{
  display:block;width:22px;height:2px;border-radius:2px;
  background:rgba(255,255,255,.75);transition:all .3s;
}
.nav-hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav-hamburger.open span:nth-child(2){opacity:0;transform:scaleX(0)}
.nav-hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

.mobile-menu{
  position:fixed;top:62px;left:0;right:0;
  background:rgba(5,0,15,.97);backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
  border-bottom:1px solid rgba(139,92,246,.15);z-index:8000;
  padding:1.25rem 1.5rem 1.75rem;display:flex;flex-direction:column;gap:0;
  transform:translateY(-12px);opacity:0;
  transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s;
  pointer-events:none;visibility:hidden;
}
.mobile-menu.open{
  transform:translateY(0);opacity:1;pointer-events:all;visibility:visible;
}
.mobile-menu a{
  display:block;text-decoration:none;color:rgba(255,255,255,.65);
  font-weight:800;font-size:1rem;padding:.85rem 0;
  border-bottom:1px solid rgba(255,255,255,.05);transition:color .2s;
  font-family:'Nunito',sans-serif;
}
.mobile-menu a:last-child{border-bottom:none}
.mobile-menu a:hover,.mobile-menu a.active{color:#fff}
.mobile-menu .mm-cta{
  margin-top:1rem;background:linear-gradient(135deg,var(--p6),var(--p4));
  color:#fff !important;text-align:center;border-radius:100px;padding:.75rem 1.5rem;
  box-shadow:0 0 22px rgba(124,58,237,.4);border-bottom:none !important;
}

/* ── RESPONSIVE ── */
@media(max-width:900px){
  /* Nav */
  nav{padding:0 1.25rem}
  nav .nav-links{display:none}
  nav .btn-nav{display:none}
  .nav-hamburger{display:flex}

  /* Sections */
  section{padding:4rem 1.25rem}
  .sec-divider{margin:0 1.25rem}
  .detail-hero{padding:6.5rem 1.25rem 3.5rem;min-height:auto}
  .detail-h1{font-size:clamp(2.2rem,8vw,3.5rem)}
  .detail-sub{font-size:.95rem;max-width:100%}

  /* Footer */
  footer{padding:1.75rem 1.25rem;flex-direction:column;align-items:flex-start;gap:1rem}
  .footer-links{flex-wrap:wrap;gap:1rem}

  /* Hover effects off on touch */
  .feat-item:hover{transform:none}
  .glass-card:hover{box-shadow:none}
}

@media(max-width:640px){
  section{padding:3.5rem 1rem}
  .sec-divider{margin:0 1rem}
  .detail-hero{padding:5.5rem 1rem 3rem}
  .btn-primary,.btn-ghost{padding:.75rem 1.5rem;font-size:.9rem}
}


/* ══════════════════════════════════════════════════════
   LIGHT THEME  –  applied via  body.light
   ══════════════════════════════════════════════════════ */

/* Global smooth transition on theme switch */
*, *::before, *::after {
  transition:
    background-color .3s ease,
    border-color .3s ease,
    color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease !important;
}
/* But keep animation-driven transitions unaffected */
.reveal, .orb, .nav-hamburger span, .theme-toggle-knob {
  transition:
    background-color .3s ease,
    border-color .3s ease,
    color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease,
    transform .3s cubic-bezier(.34,1.56,.64,1) !important;
}

/* ── CSS variable overrides ── */
body.light {
  --bg: #F0EEFF;
  --card: rgba(255,255,255,.75);
  --border: rgba(109,40,217,.13);
  --bp: rgba(109,40,217,.28);
  --tm: rgba(30,4,89,.5);
  --tmid: rgba(30,4,89,.72);
  --green-d: rgba(16,185,129,.1);
  --green-b: rgba(16,185,129,.22);
  --blue-d: rgba(59,130,246,.1);
  --orange-d: rgba(245,158,11,.1);
  --teal-d: rgba(20,184,166,.1);
  --indigo-d: rgba(99,102,241,.1);
  background: var(--bg);
  color: #1E0459;
}

body.light::after { opacity: .01; }

/* ── Gradient text ── */
body.light .grad {
  background: linear-gradient(145deg, #1E0459 15%, var(--p5) 55%, var(--p6) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.light .grad-vivid {
  background: linear-gradient(135deg, var(--p4) 0%, var(--p6) 50%, var(--p7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Nav ── */
body.light nav {
  background: rgba(240,238,255,.85);
  border-bottom-color: rgba(109,40,217,.12);
}
body.light nav.scrolled { background: rgba(240,238,255,.97); }
body.light .nav-links a { color: rgba(30,4,89,.55); }
body.light .nav-links a:hover,
body.light .nav-links a.active { color: #1E0459; }

/* ── Mobile menu ── */
body.light .mobile-menu {
  background: rgba(240,238,255,.98);
  border-bottom-color: rgba(109,40,217,.13);
}
body.light .mobile-menu a { color: rgba(30,4,89,.58); }
body.light .mobile-menu a:hover,
body.light .mobile-menu a.active { color: #1E0459; }

/* ── Buttons ── */
body.light .btn-back {
  color: rgba(30,4,89,.55);
  background: rgba(109,40,217,.07);
  border-color: rgba(109,40,217,.18);
}
body.light .btn-back:hover { color: #1E0459; border-color: var(--p6); }
body.light .btn-ghost {
  background: rgba(109,40,217,.07);
  border-color: rgba(109,40,217,.22);
  color: var(--p5);
}
body.light .btn-ghost:hover { background: rgba(109,40,217,.14); }

/* ── Cards ── */
body.light .glass-card {
  background: rgba(255,255,255,.8);
  border-color: rgba(109,40,217,.12);
  box-shadow: 0 2px 20px rgba(109,40,217,.07);
}
body.light .glass-card:hover {
  border-color: rgba(109,40,217,.28);
  box-shadow: 0 12px 40px rgba(109,40,217,.13);
}

/* ── Feature bento cards ── */
body.light .fc-card {
  background: rgba(255,255,255,.82);
  border-color: rgba(109,40,217,.12);
}
body.light .fc-card:hover {
  box-shadow: 0 28px 64px rgba(109,40,217,.15);
}
body.light .fc-card.c-green:hover  { border-color: rgba(16,185,129,.4); }
body.light .fc-card.c-purple:hover { border-color: rgba(109,40,217,.45); }
body.light .fc-card.c-blue:hover   { border-color: rgba(59,130,246,.4); }
body.light .fc-card.c-teal:hover   { border-color: rgba(20,184,166,.4); }
body.light .fc-card.c-orange:hover { border-color: rgba(245,158,11,.35); }
body.light .fc-card.c-amber:hover  { border-color: rgba(251,191,36,.35); }
body.light .fc-card.c-indigo:hover { border-color: rgba(99,102,241,.4); }
body.light .fc-card.c-dim { opacity: .4; }

/* ── Card text ── */
body.light .card-title { color: #1E0459; }
body.light .card-desc  { color: rgba(30,4,89,.52); }
body.light .card-tag   { color: rgba(30,4,89,.5); }

/* ── Stat row ── */
body.light .stat-c  { border-color: rgba(109,40,217,.1); }
body.light .stat-n  { color: #1E0459; }
body.light .stat-l  { color: rgba(30,4,89,.55); }

/* ── Hero ── */
body.light .hero-h1 { color: #1E0459; }
body.light .hero-p  { color: rgba(30,4,89,.55); }
body.light .ht-item { color: rgba(30,4,89,.5); }

/* ── Phone mockup ── */
body.light .phone-frame {
  background: linear-gradient(165deg, #e8e0ff, #d5caff);
  box-shadow: 0 40px 80px rgba(109,40,217,.25), 0 0 0 1px rgba(109,40,217,.18);
}
body.light .phone-screen {
  background: linear-gradient(165deg, #f5f2ff, #ede8ff);
}
body.light .ps-head   { background: rgba(109,40,217,.08); border-color: rgba(109,40,217,.12); }
body.light .ps-greet  { color: rgba(30,4,89,.55); }
body.light .ps-name   { color: #1E0459; }
body.light .ps-av     { background: linear-gradient(135deg,var(--p5),var(--p7)); }
body.light .ps-custody{ background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); }
body.light .ps-clabel { color: rgba(30,4,89,.5); }
body.light .fc        { background: rgba(255,255,255,.92); border-color: rgba(109,40,217,.14);
                        box-shadow: 0 4px 16px rgba(109,40,217,.1); }
body.light .fc-lbl    { color: rgba(30,4,89,.5); }
body.light .fc-val    { color: #1E0459; }
body.light .fc-sub    { color: rgba(30,4,89,.45); }

/* ── Pills ── */
body.light .pill {
  background: rgba(109,40,217,.08);
  border-color: rgba(109,40,217,.2);
  color: var(--p5);
}

/* ── Section divider ── */
body.light .sec-divider {
  background: linear-gradient(90deg, transparent, rgba(109,40,217,.14), transparent);
}

/* ── Feature / step lists ── */
body.light .feat-item {
  background: rgba(255,255,255,.75);
  border-color: rgba(109,40,217,.1);
}
body.light .feat-item:hover { border-color: rgba(109,40,217,.3); }
body.light .feat-title { color: #1E0459; }
body.light .feat-desc  { color: rgba(30,4,89,.52); }
body.light .step-item  { border-bottom-color: rgba(109,40,217,.1); }
body.light .step-title { color: #1E0459; }
body.light .step-desc  { color: rgba(30,4,89,.52); }

/* ── Orbs (soft on light) ── */
body.light .orb { opacity: .35; filter: blur(100px); }

/* ── Footer ── */
body.light footer { border-top-color: rgba(109,40,217,.12); }
body.light .footer-links a       { color: rgba(30,4,89,.32); }
body.light .footer-links a:hover { color: rgba(30,4,89,.65); }
body.light .footer-copy          { color: rgba(30,4,89,.2); }

/* ── Detail page hero ── */
body.light .detail-h1 {
  background: linear-gradient(145deg, #1E0459 15%, var(--p5) 55%, var(--p6) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.light .detail-sub { color: rgba(30,4,89,.55); }

/* ─────────── PAGE-SPECIFIC ─────────── */

/* index: stats */
body.light .stats-row         { background: transparent; }

/* index: bento bus card dim tag */
body.light .bus-dim-tag {
  background: rgba(109,40,217,.06);
  border-color: rgba(109,40,217,.14);
  color: rgba(30,4,89,.4);
}

/* custody */
body.light .big-flow    { background: rgba(255,255,255,.7); border-color: rgba(109,40,217,.12); }
body.light .bf-circle   { box-shadow: 0 0 0 6px rgba(109,40,217,.1); }
body.light .bf-lbl      { color: rgba(30,4,89,.55); }
body.light .bf-state    { color: rgba(30,4,89,.45); }
body.light .bf-arr      { color: rgba(109,40,217,.4); }
body.light .live-alert  { background: rgba(16,185,129,.09); border-color: rgba(16,185,129,.2); }
body.light .la-txt      { color: #1E0459; }
body.light .la-time     { color: rgba(30,4,89,.45); }
body.light .sc          { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.11); }
body.light .sc-name     { color: #1E0459; }
body.light .sc-desc     { color: rgba(30,4,89,.52); }

/* intel-iq */
body.light .bv-chip     { background: rgba(255,255,255,.8); border-color: rgba(109,40,217,.18);
                          box-shadow: 0 2px 10px rgba(109,40,217,.08); }
body.light .bv-out-chip { background: rgba(255,255,255,.8); border-color: rgba(109,40,217,.18); }
body.light .ic-card     { background: rgba(255,255,255,.8); border-color: rgba(109,40,217,.12); }
body.light .ic-card:hover { box-shadow: 0 20px 50px rgba(109,40,217,.12); }
body.light .ic-title    { color: #1E0459; }
body.light .ic-body     { color: rgba(30,4,89,.55); }
body.light .ic-bar      { background: rgba(109,40,217,.1); }
body.light .how-card    { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.11); }

/* attendance */
body.light .rollcall    { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.12); }
body.light .rc-title    { color: #1E0459; }
body.light .rc-date,
body.light .rc-class    { color: rgba(30,4,89,.5); }
body.light .rc-student.present { background: rgba(16,185,129,.12); color: #0d7a58; border-color: rgba(16,185,129,.25); }
body.light .rc-student.absent  { background: rgba(239,68,68,.08); color: #c0392b; border-color: rgba(239,68,68,.2); }
body.light .rc-bar      { background: rgba(109,40,217,.1); }
body.light .rs-num      { color: #1E0459; }
body.light .rs-lbl      { color: rgba(30,4,89,.52); }
body.light .alert-card  { background: rgba(255,255,255,.8); border-color: rgba(109,40,217,.12); }
body.light .chart-bar   { background: rgba(109,40,217,.08); }

/* analytics */
body.light .dash-mock   { background: rgba(255,255,255,.78); border-color: rgba(109,40,217,.12); }
body.light .dm-title    { color: #1E0459; }
body.light .dm-badge    { background: rgba(16,185,129,.1); color: #0d7a58; }
body.light .kpi         { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.1); }
body.light .kpi-num     { color: #1E0459; }
body.light .kpi-lbl     { color: rgba(30,4,89,.52); }
body.light .bs-track    { background: rgba(109,40,217,.1); }
body.light .bs-label    { color: rgba(30,4,89,.55); }
body.light .bs-pct      { color: rgba(30,4,89,.5); }
body.light .mood-ring-inner { background: var(--bg); }
body.light .ml-item     { color: rgba(30,4,89,.58); }

/* meals */
body.light .menu-card   { background: rgba(255,255,255,.78); border-color: rgba(109,40,217,.12); }
body.light .mc-title    { color: #1E0459; }
body.light .meal-name   { color: #1E0459; }
body.light .meal-desc   { color: rgba(30,4,89,.52); }
body.light .cl-row      { border-color: rgba(109,40,217,.1); }
body.light .cl-child    { color: #1E0459; }
body.light .child-log   { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.12); }
body.light .meal-section-lbl { color: rgba(30,4,89,.45); }

/* parent-app */
body.light .pa-cards    { background: rgba(255,255,255,.78); border-color: rgba(109,40,217,.12); }
body.light .pas-name    { color: #1E0459; }
body.light .pas-date    { color: rgba(30,4,89,.5); }
body.light .psg         { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.1); }
body.light .psg-lbl     { color: rgba(30,4,89,.52); }
body.light .psg-val     { color: #1E0459; }
body.light .update-feed { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.12); }
body.light .uf-title    { color: #1E0459; }
body.light .uf-txt      { color: rgba(30,4,89,.55); }
body.light .uf-time     { color: rgba(30,4,89,.4); }
body.light .intel-strip { background: rgba(109,40,217,.07); border-color: rgba(109,40,217,.18); }
body.light .is-title    { color: #1E0459; }

/* planner */
body.light .planner-big { background: rgba(255,255,255,.78); border-color: rgba(109,40,217,.12); }
body.light .pb-title    { color: #1E0459; }
body.light .pb-day-h    { color: rgba(30,4,89,.5); }
body.light .pbt         { color: #1E0459; }
body.light .pb-publish  { background: rgba(255,255,255,.75); border-color: rgba(109,40,217,.12); }
body.light .pp-txt      { color: rgba(30,4,89,.55); }

/* ── Legal pages ── */
body.light .legal-hero    { border-bottom-color: rgba(109,40,217,.12); }
body.light .legal-h1 {
  background: linear-gradient(145deg, #1E0459 15%, var(--p5) 55%, var(--p6) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.light .legal-badge   { background: rgba(109,40,217,.08); border-color: rgba(109,40,217,.18); color: var(--p5); }
body.light .legal-updated { color: rgba(30,4,89,.42); }
body.light .legal-intro   { color: rgba(30,4,89,.55); }
body.light .toc-card      { background: rgba(255,255,255,.7); border-color: rgba(109,40,217,.14); }
body.light .toc-title     { color: var(--p5); }
body.light .toc-list li a { color: rgba(30,4,89,.55); }
body.light .toc-list li a:hover { color: var(--p5); background: rgba(109,40,217,.07); }
body.light .toc-list li a span  { background: rgba(109,40,217,.08); border-color: rgba(109,40,217,.18); color: var(--p5); }
body.light .legal-section { border-bottom-color: rgba(109,40,217,.1); }
body.light .ls-num        { box-shadow: 0 0 12px rgba(109,40,217,.18); }
body.light .ls-title      { color: #1E0459; }
body.light .ls-text       { color: rgba(30,4,89,.57); }
body.light .ls-sub        { background: rgba(255,255,255,.6); border-color: rgba(109,40,217,.1); }
body.light .ls-sub-title  { color: rgba(30,4,89,.52); }
body.light .ls-sub-title::before { background: var(--p6); }
body.light .ls-list li    { color: rgba(30,4,89,.57); }
body.light .ls-list li::before { background: var(--p6); }
body.light .ls-highlight  { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.2); }
body.light .ls-highlight-text { color: rgba(30,4,89,.65); }
body.light .ls-warning    { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.22); }
body.light .ls-contact    { background: rgba(109,40,217,.06); border-color: rgba(109,40,217,.18); }
body.light .ls-contact-name { color: #1E0459; }
body.light .ls-contact a  { color: var(--p5); }
body.light .ls-divider    { opacity: .12; }

/* ── Theme toggle switch ── */
.theme-toggle {
  width: 46px; height: 26px; border-radius: 100px;
  background: rgba(139,92,246,.15);
  border: 1.5px solid rgba(139,92,246,.3);
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; padding: 4px;
  position: relative;
}
.theme-toggle:hover {
  background: rgba(139,92,246,.25);
  border-color: var(--p7);
}
.theme-toggle-knob {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--p7), var(--p9));
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; line-height: 1;
  transform: translateX(0);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1) !important;
}
body.light .theme-toggle {
  background: rgba(109,40,217,.1);
  border-color: rgba(109,40,217,.25);
}
body.light .theme-toggle:hover {
  background: rgba(109,40,217,.18);
  border-color: var(--p5);
}
body.light .theme-toggle-knob {
  transform: translateX(20px);
  background: linear-gradient(135deg, var(--p5), var(--p7));
}

/* ── Classes created by inline-style patch ── */
.ast-txt    { color: var(--tmid); }
.ast-strong { color: #fff; }
body.light .ast-txt    { color: rgba(30,4,89,.65); }
body.light .ast-strong { color: #1E0459; }

.kpi-section-lbl { color: rgba(255,255,255,.6); }
body.light .kpi-section-lbl { color: rgba(30,4,89,.5); }

.ic-hero-sub { color: rgba(255,255,255,.75); }
body.light .ic-hero-sub { color: rgba(30,4,89,.6); }

.iq-title-grad {
  font-size: 1.55rem;
  background: linear-gradient(135deg, #fff, var(--p9), var(--p7));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.light .iq-title-grad {
  background: linear-gradient(135deg, #1E0459, var(--p5), var(--p7));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.bus-dim-tag {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.35);
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 100px; padding: 4px 12px;
  font-size: .65rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: .85rem; width: fit-content; position: relative; z-index: 1;
}

.ls-strong { color: #fff; }
body.light .ls-strong { color: #1E0459; }

/* ── Anti-flash: applied before body paints ── */
html[data-theme='light'] body { background: #F0EEFF; color: #1E0459; }
