:root{--bg:#000000;--bg2:#0A0A0A;--panel:#0E0E0E;--line:#222222;--violet:#8B7CF6;--violet-soft:#B4A8FF;--cyan:#38BDF8;--text:#EAECF5;--muted:#8A90A6;--muted2:#787E94;--mono:"JetBrains Mono",monospace;--sans:"Sora",system-ui,sans-serif;--mint:#34D399;--rose:#FB7185;--amber:#FBBF55;--panel2:#141414;--radius:14px}
*{box-sizing:border-box}
html,body{scrollbar-gutter:stable; margin:0;padding:0;overflow-x:clip;width:100%}
html{scroll-padding-top:60px}
body{background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;line-height:1.6}
a{color:inherit}
.wrap{max-width:1140px;margin:0 auto;padding:0 20px}
main.wrap{padding-top:48px}
article.wrap{padding-top:48px}

/* === Sticky Navbar === */
.sitenav{position:sticky;top:0;z-index:9999;background:rgba(10,11,16,0.85);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);contain:layout style;transform:translateZ(0);will-change:transform;min-height:56px;box-sizing:border-box}
.nav-row{display:flex;align-items:center;gap:18px;padding-top:11px;padding-bottom:11px}
.sitenav .brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--text);flex:none}
.sitenav .brand svg.logo{width:38px;height:38px}
.sitenav .wordmark{font-size:19px;font-weight:700;letter-spacing:-.02em;color:var(--text)}
.topnav{display:flex;align-items:center;gap:2px;flex:1;flex-wrap:nowrap;margin:0}
.navdrop::after{content:'';position:absolute;left:0;top:100%;width:100%;height:15px}
.navlink{font-family:var(--sans);font-size:14px;font-weight:500;color:var(--muted);background:none;border:none;cursor:pointer;text-decoration:none;padding:8px 13px;border-radius:9px;transition:.15s;display:inline-flex;align-items:center;gap:5px}
.navlink:hover{color:var(--text);background:var(--panel)}
.navdrop{position:relative;display:inline-flex;align-items:center}
.navdrop .navcaret{color:var(--muted2);font-size:11px;margin-inline-start:-8px;pointer-events:none}
.navmenu{position:absolute;top:42px;inset-inline-start:0;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:7px;min-width:210px;z-index:140;display:none;box-shadow:0 24px 60px -22px rgba(0,0,0,.85)}
.navdrop.open .navmenu{display:block}
.menu-all .navmenu{inset-inline-start:auto;inset-inline-end:0}
.navmenu a{display:block;font-size:13.5px;color:var(--text);text-decoration:none;padding:10px 12px;border-radius:8px;cursor:pointer}
.navmenu a:hover{background:var(--bg2);color:var(--violet-soft)}

/* === Mobile Menu === */
.mobile-menu{display:none;flex-direction:column;background:var(--bg);overflow-y:auto;width:100%;max-width:100vw}
.mobile-menu .menu-category{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--violet-soft);padding:18px 20px 4px;margin:0;border-top:1px solid var(--line);background:var(--bg2)}
.mobile-menu .menu-category:first-child{border-top:none}
.mobile-menu a{font-family:var(--sans);font-size:15px;font-weight:500;color:var(--text);text-decoration:none;padding:13px 20px;border-top:1px solid var(--line)}
.mobile-menu a:hover,.mobile-menu a:active{color:var(--violet-soft);background:var(--panel)}
@media(min-width:769px){.mobile-menu{display:none!important}.menu-all{display:none!important}}
@media(max-width:480px){ #syncInd{display:none} }
@media(max-width:768px){
 html,body{overflow-x:clip;width:100%;max-width:100vw}
 .sitenav{overflow-x:clip;backdrop-filter:none;-webkit-backdrop-filter:none;will-change:auto;transform:none;contain:none}
 .mobile-menu.open{display:flex;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior:contain;max-height:calc(100dvh - 56px)}
 .nav-row{flex-wrap:nowrap!important;justify-content:space-between}
 .sitenav .topnav > .navlink{display:none}
 .sitenav .topnav > .navdrop:not(.menu-all){display:none}
 .sitenav .topnav{order:0;width:auto;flex:none;flex-wrap:nowrap}
 .menu-all{margin-right:16px}
 .menu-all .navcaret{display:none}
 .menu-all .navlink{padding:12px 16px}
 .menu-all.open .navmenu{display:none!important}
 .sitenav .wordmark{font-size:17px}
 .navmenu{max-width:calc(100vw - 40px)}
}
.dot{display:inline-block}
#syncInd{min-width:135px}

/* === Premium Cyber-Grid Footer === */
.site-footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 60px 0 30px; margin-top: 60px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h4 { color: var(--text); font-size: 15px; margin-bottom: 20px; font-weight: 600; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: inherit; text-decoration: none; transition: transform 0.2s ease, color 0.2s ease; display: inline-block; }
.footer-col a:hover { color: var(--cyan); transform: translateX(2px); }
.footer-brand p { font-size: 13px; line-height: 1.6; max-width: 250px; margin-bottom: 15px; color: var(--muted2); }
.system-status { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); background: rgba(255,255,255,0.03); padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.foot-live { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: pulse 1.8s infinite; margin-inline-end: 6px; }
.disclaimer { font-size: 12px; color: var(--muted2); margin-top: 20px; max-width: 800px; line-height: 1.6; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; font-size: 13px; color: var(--muted2); font-family: var(--mono); }
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(52,211,153,.55)}70%{box-shadow:0 0 0 9px rgba(52,211,153,0)}100%{box-shadow:0 0 0 0 rgba(52,211,153,0)}}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } .footer-col.brand-col { grid-column: span 2; } .footer-bottom { flex-direction: column; gap: 15px; text-align: center; } }

/* === Theme Toggle === */
.theme-toggle{background:none;border:1px solid var(--line);border-radius:8px;padding:6px 8px;cursor:pointer;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;transition:.15s;flex:none;touch-action:manipulation}
.menu-all .navlink{touch-action:manipulation}
.theme-toggle:hover{color:var(--text);border-color:var(--violet)}
.theme-toggle .sun-icon{display:block}
.theme-toggle .moon-icon{display:none}
html.light-theme .theme-toggle .sun-icon{display:none}
html.light-theme .theme-toggle .moon-icon{display:block}

/* === Light Theme === */
html.light-theme{--bg:#FFFFFF;--bg2:#F5F5F7;--panel:#FFFFFF;--panel2:#F0F0F2;--line:#E2E2E8;--text:#1A1A2E;--muted:#5A5F73;--muted2:#6B7085}
html.light-theme .sitenav{background:rgba(255,255,255,.85)}
html.light-theme .navmenu{box-shadow:0 24px 60px -22px rgba(0,0,0,.1)}
html.light-theme .bar-track{background:#E8E8ED}
html.light-theme tbody td{border-bottom-color:#E8E8ED}
html.light-theme tbody tr:hover{background:#F0F0F2}
html.light-theme .fb-panel{background:#FFFFFF;border-color:#E2E2E8}
html.light-theme .fb-panel textarea{background:#F5F5F7;border-color:#E2E2E8;color:#1A1A2E}

/* === Light Theme Typography Fix === */
html.light-theme p,
html.light-theme li,
html.light-theme td,
html.light-theme label,
html.light-theme article,
html.light-theme .text-muted,
html.light-theme .text-gray,
html.light-theme .muted,
html.light-theme .desc,
html.light-theme .description,
html.light-theme .subtitle,
html.light-theme .subtext {
    color: var(--muted) !important;
}

html.light-theme h1,
html.light-theme h2,
html.light-theme h3,
html.light-theme h4,
html.light-theme h5,
html.light-theme h6,
html.light-theme strong,
html.light-theme b,
html.light-theme th {
    color: var(--text) !important;
}

/* === Safe Light Theme Variable Overrides === */
html.light-theme {
    --violet-soft: #6E56CF !important; /* WCAG AA Dark Purple */
    --cyan: #0B7ECB !important; /* WCAG AA Dark Blue */
}

/* === Desktop Hover-to-Open Dropdowns === */
@media (min-width: 800px) {
  .navdrop:not(.menu-all):hover .navmenu {
    display: flex !important;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease;
    z-index: 999;
  }
  .navdrop:not(.menu-all):hover > .navlink {
    color: var(--violet-soft);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
  }
}

/* === BRUTE FORCE LIGHT THEME LINKS === */
html.light-theme .subnav a,
html.light-theme .hotlabel {
    color: #6E56CF !important; 
}
html.light-theme .footer-col a { color: #6E56CF !important; }
html.light-theme .subnav a:hover,
html.light-theme .subnav a.active {
    color: #0B7ECB !important; 
}
.header-end{display:flex;align-items:center;gap:16px;flex:none}
