/* Burnaverse Protocol (BUV) — Multi-page site */
/* Theme: Web3 investor + impact hybrid */

:root{
  --bg:#070a12;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.08);
  --text:#e8eefc;
  --muted:rgba(232,238,252,.72);
  --line:rgba(255,255,255,.12);
  --accent:#8b5cf6;
  --accent2:#22c55e;
  --danger:#ef4444;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius:18px;
  --radius2:26px;
  --max:1120px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background:
    radial-gradient(1000px 650px at 18% 10%, rgba(139,92,246,.30), transparent 55%),
    radial-gradient(900px 550px at 85% 16%, rgba(34,197,94,.22), transparent 50%),
    radial-gradient(900px 650px at 70% 85%, rgba(59,130,246,.16), transparent 55%),
    var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
.wrap{max-width:var(--max);margin:0 auto;padding:22px}
header{
  position:sticky;top:0;z-index:50;
  backdrop-filter:saturate(150%) blur(14px);
  background:linear-gradient(to bottom, rgba(7,10,18,.78), rgba(7,10,18,.35));
  border-bottom:1px solid rgba(255,255,255,.08);
}

.nav{display:flex;align-items:center;justify-content:space-between;gap:14px}
.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:45px;height:45px;border-radius:18px;
  background:linear-gradient(135deg, rgba(139,92,246,.95), rgba(34,197,94,.85));
  box-shadow:0 10px 30px rgba(139,92,246,.25);
  position:relative;
}
.logo:after{
  content:"";position:absolute;inset:10px;border-radius:10px;
  background:rgba(7,10,18,.55);border:1px solid rgba(255,255,255,.14);
}
.brand h1{font-size:14px;margin:0;letter-spacing:.2px}
.brand p{margin:0;color:var(--muted);font-size:12px}

.links{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.pill{
  padding:10px 12px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  border-radius:999px;
  font-size:13px;color:var(--muted);
  transition:.18s transform, .18s background, .18s border-color;
  display:inline-flex;align-items:center;gap:8px;
}
.pill:hover{transform:translateY(-1px);background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.20)}
.pill.active{border-color:rgba(139,92,246,.45);background:rgba(139,92,246,.12);color:rgba(232,238,252,.9)}

.btn{
  padding:11px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.14);
  background:linear-gradient(135deg, rgba(139,92,246,.92), rgba(34,197,94,.82));
  color:#0b0f1a;font-weight:800;
  box-shadow:0 12px 38px rgba(139,92,246,.22);
  transition:.18s transform, .18s filter;
  display:inline-flex;align-items:center;gap:8px;
  cursor:pointer;
}
.btn:hover{transform:translateY(-1px);filter:saturate(1.1)}
.btn.ghost{
  background:rgba(255,255,255,.05);
  color:var(--text);
  font-weight:650;
  box-shadow:none;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.12);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
}

.hero{
  padding:44px 0 18px;
  display:grid;grid-template-columns: 1.2fr .8fr;gap:22px;align-items:stretch;
}
.hero .left{padding:28px}
.hero .right{padding:18px;display:flex;flex-direction:column;gap:12px}
.kicker{
  display:inline-flex;gap:8px;align-items:center;
  padding:7px 10px;border-radius:999px;
  background:rgba(139,92,246,.14);
  border:1px solid rgba(139,92,246,.30);
  color:rgba(232,238,252,.92);
  font-size:13px;
}
.kdot{width:7px;height:7px;border-radius:999px;background:var(--accent)}
.hero h2{font-size:44px;line-height:1.05;margin:16px 0 10px;letter-spacing:-.6px}
.hero p{margin:0;color:var(--muted);font-size:16px;line-height:1.6;max-width:60ch}
.cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}

.stats{
  margin-top:18px;
  display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:10px;
}
.stat{
  padding:12px 12px;border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
}
.stat .k{font-size:12px;color:var(--muted);margin:0}
.stat .v{margin:6px 0 0;font-weight:850;font-size:15px}

.sectionTitle{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:18px 0 12px}
.sectionTitle h3{margin:0;font-size:22px}
.sectionTitle p{margin:0;color:var(--muted);font-size:13px}

.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.col12{grid-column:span 12}
.col8{grid-column:span 8}
.col6{grid-column:span 6}
.col4{grid-column:span 4}

.pad{padding:18px}
.note{
  padding:14px 16px;border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:13px;line-height:1.6;
}

.addrRow{
  display:flex;gap:10px;align-items:center;justify-content:space-between;
  padding:12px;border-radius:16px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
}
.addr{font-family:var(--mono);font-size:12.5px;color:rgba(232,238,252,.92);word-break:break-all}

.mini{
  padding:9px 10px;border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  font-size:12.5px;
  cursor:pointer;
  transition:.18s transform, .18s background, .18s border-color;
}
.mini:hover{transform:translateY(-1px);background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.18)}
.mini.good{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.10)}
.mini.bad{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.10)}

.hr{height:1px;background:rgba(255,255,255,.10);margin:14px 0}

.list{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}
.li{
  padding:12px 12px;border-radius:16px;background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  display:flex;gap:10px;align-items:flex-start;
}
.icon{
  width:30px;height:30px;border-radius:12px;
  background:rgba(139,92,246,.14);
  border:1px solid rgba(139,92,246,.25);
  display:flex;align-items:center;justify-content:center;
  flex:0 0 auto;
}
.li b{display:block;margin-bottom:3px}
.li span{color:var(--muted);font-size:13px;line-height:1.5}

.badgeRow{display:flex;gap:8px;flex-wrap:wrap}
.badge{
  padding:8px 10px;border-radius:999px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  color:var(--muted);
  font-size:12.5px;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
}
.table th, .table td{
  padding:12px 12px;
  text-align:left;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
  font-size:13.5px;
}
.table th{
  color:rgba(232,238,252,.92);
  font-weight:800;
  background:rgba(255,255,255,.04);
}
.table tr:last-child td{border-bottom:none}
.table td{color:var(--muted);line-height:1.55}

footer{
  padding:28px 0 44px;color:var(--muted);font-size:13px;
  border-top:1px solid rgba(255,255,255,.08);
  margin-top:18px;
}
.footRow{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}

.toast{
  position:fixed;left:50%;bottom:18px;transform:translateX(-50%);
  background:rgba(10,14,26,.88);
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:10px 14px;
  color:rgba(232,238,252,.9);
  font-size:13px;
  box-shadow:0 16px 50px rgba(0,0,0,.5);
  opacity:0;pointer-events:none;
  transition:.22s opacity, .22s transform;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-2px)}

@media (max-width: 980px){
  .hero{grid-template-columns:1fr; padding-top:26px}
  .hero h2{font-size:36px}
  .col6,.col4,.col8{grid-column:span 12}
  .stats{grid-template-columns:1fr;gap:10px}
  .links{justify-content:flex-start}
}


/* === v2 UI upgrades: themes, motion, components === */
:root{
  --bg:#070a12; --bg2:#0b1020;
  --panel:rgba(255,255,255,.06); --panel2:rgba(255,255,255,.08);
  --text:#e8eefc; --muted:rgba(232,238,252,.72);
  --line:rgba(255,255,255,.12);
  --accent:#8b5cf6; --accent2:#22c55e; --accent3:#38bdf8;
  --danger:#ef4444;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow2: 0 12px 40px rgba(0,0,0,.35);
  --radius:18px; --radius2:26px;
  --glass: saturate(170%) blur(14px);
  --ease: cubic-bezier(.2,.8,.2,1);
}
html[data-theme="light"]{
  --bg:#f7f8ff; --bg2:#eef1ff;
  --panel:rgba(10,14,26,.05); --panel2:rgba(10,14,26,.07);
  --text:#0b1020; --muted:rgba(11,16,32,.70);
  --line:rgba(11,16,32,.12);
  --shadow: 0 18px 60px rgba(11,16,32,.14);
  --shadow2: 0 12px 40px rgba(11,16,32,.10);
}
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto!important; transition:none!important; animation:none!important}
}
@keyframes shine{0%{transform:translateX(-120%)}100%{transform:translateX(180%)}}
@keyframes fadeUp{0%{opacity:0; transform:translateY(10px)}100%{opacity:1; transform:translateY(0)}}
@keyframes pop{0%{transform:scale(.98); opacity:0}100%{transform:scale(1); opacity:1}}
.page-enter{animation:fadeUp .45s var(--ease) both}
.page-leave{opacity:0; transform:translateY(6px); transition:.22s var(--ease)}

.heroWrap{position:relative}
.heroGlowLine{
  position:absolute; left:0; right:0; top:-1px; height:1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.65), rgba(34,197,94,.55), transparent);
  opacity:.55;
}
.kicker{position:relative; overflow:hidden;}
.kicker::after{
  content:""; position:absolute; inset:-60px auto -60px -40%;
  width:120px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-18deg);
  opacity:.7;
  animation: shine 5.5s var(--ease) infinite;
}
.btn{position:relative; overflow:hidden;}
.btn::after{
  content:""; position:absolute; inset:-60px auto -60px -40%;
  width:120px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-18deg);
  opacity:.65;
}
.btn:hover::after{animation: shine 1.2s var(--ease) 1}
.pill.active{box-shadow:0 10px 28px rgba(139,92,246,.18)}

.card{position:relative; overflow:hidden;}
.card::before{
  content:""; position:absolute; inset:-1px;
  border-radius:var(--radius2);
  padding:1px;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(34,197,94,.14), rgba(56,189,248,.12));
  -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:.75;
}

.chipRow{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  padding:9px 10px;border-radius:999px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  color:var(--muted); font-size:12.5px;
  display:inline-flex;align-items:center;gap:8px;
}
.dot{width:8px;height:8px;border-radius:999px;background:var(--accent3);opacity:.9}
.dot.g{background:var(--accent2)}
.dot.p{background:var(--accent)}
.dot.r{background:var(--danger)}

.metricGrid{display:grid;grid-template-columns:repeat(4, minmax(0,1fr));gap:10px}
.metric{
  padding:12px;border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
}
.metric .k{margin:0;color:var(--muted);font-size:12px}
.metric .v{margin:6px 0 0;font-weight:900;font-size:16px;letter-spacing:-.2px}
@media (max-width:980px){.metricGrid{grid-template-columns:repeat(2, minmax(0,1fr))}}

.modalBack{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter: var(--glass);
  display:none; align-items:center; justify-content:center;
  z-index:100;
  padding:18px;
}
.modalBack.show{display:flex; animation: pop .18s var(--ease) both}
.modal{
  width:min(720px, 100%);
  border-radius:26px;
  background:linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modalHead{
  padding:16px 18px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.modalHead h3{margin:0;font-size:16px}
.modalBody{padding:16px 18px}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:12px}
.field label{font-size:12px; color:var(--muted)}
.input, textarea, select{
  font-family:var(--sans);
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
}
html[data-theme="light"] .input, html[data-theme="light"] textarea, html[data-theme="light"] select{
  background:rgba(255,255,255,.6);
}
textarea{min-height:110px; resize:vertical}
.row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
@media (max-width:980px){.row{grid-template-columns:1fr}}
.helper{font-size:12px; color:var(--muted); margin-top:-6px}

/* v3: header brand logo image */
.logo{display:none!important;}
.logoImg{
  width:38px;height:38px;border-radius:12px;
  box-shadow:0 10px 30px rgba(139,92,246,.25);
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  object-fit:cover;
}
html[data-theme="light"] .logoImg{border-color:rgba(11,16,32,.14);}


/* === Masterpiece nav: responsive, neat on all devices === */
header{position:sticky; top:0; z-index:60;}
.nav{position:relative;}
.navRight{display:flex;align-items:center;gap:10px;margin-left:auto}

/* Desktop links */
.links{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}
@media (min-width: 981px){
  .links{
    flex-wrap:nowrap;
    overflow:auto hidden;
    scrollbar-width:none;
  }
  .links::-webkit-scrollbar{display:none}
}

/* Mobile toggle button */
.navToggle{
  display:none;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
  line-height:1;
  align-items:center;
  gap:8px;
}
.navToggle svg{width:18px;height:18px;display:block}

/* Mobile drawer */
@media (max-width: 980px){
  .nav{gap:10px}
  .navToggle{display:inline-flex}
  .links{
    position:fixed;
    top:72px;
    left:12px;
    right:12px;
    max-height: calc(100vh - 98px);
    overflow:auto;
    padding:12px;
    border-radius:22px;
    background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
    border:1px solid rgba(255,255,255,.14);
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass);
    display:none;
    flex-direction:column;
    align-items:stretch;
  }
  .links.open{display:flex; animation: pop .18s var(--ease) both}
  .pill, .btn.ghost{justify-content:center;width:100%}
  .btn.ghost{padding:12px 14px}
}

/* Light mode header contrast */
html[data-theme="light"] header{
  background:linear-gradient(to bottom, rgba(247,248,255,.92), rgba(247,248,255,.55));
  border-bottom:1px solid rgba(11,16,32,.10);
}
html[data-theme="light"] .navToggle{
  border-color: rgba(11,16,32,.14);
  background: rgba(11,16,32,.04);
}

/* Brand spacing on tiny screens */
.brand{min-width: 220px}
@media (max-width: 420px){
  .brand{min-width: 0}
  .brand h1{font-size:13px}
  .brand p{font-size:11px}
}


/* Section header actions */
.sectionTitle{align-items:flex-start}
.sectionActions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
@media (max-width: 980px){
  .sectionTitle{flex-direction:column; align-items:flex-start}
}


/* === State-of-the-art blockchain styling (mature) === */
:root{
  --bg:#060812;
  --bg2:#0a0e1f;
  --grid: rgba(255,255,255,.05);
  --accent:#7c5cff;
  --accent2:#21d19f;
  --accent3:#46b5ff;
  --text:#eef2ff;
  --muted:rgba(238,242,255,.72);
  --shadow: 0 18px 70px rgba(0,0,0,.55);
  --shadow2: 0 12px 40px rgba(0,0,0,.38);
}

body{
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:
    radial-gradient(900px 550px at 18% 10%, rgba(124,92,255,.30), transparent 60%),
    radial-gradient(800px 500px at 85% 16%, rgba(33,209,159,.20), transparent 60%),
    radial-gradient(900px 650px at 70% 85%, rgba(70,181,255,.16), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  position:relative;
}

body::before{
  content:"";
  position:fixed; inset:0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity:.25;
  pointer-events:none;
  mask-image: radial-gradient(circle at 30% 20%, rgba(0,0,0,1), rgba(0,0,0,.35) 55%, rgba(0,0,0,0) 78%);
}

.card{ background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); }
.pill{font-weight:600}
.btn{letter-spacing:.2px}
.brand h1{letter-spacing:.3px}
.brand p{opacity:.9}

header{
  background:linear-gradient(to bottom, rgba(6,8,18,.88), rgba(6,8,18,.45));
  border-bottom:1px solid rgba(255,255,255,.10);
}

/* Mobile drawer: dark, not transparent */
@media (max-width: 980px){
  .links{
    background: rgba(6,8,18,.96) !important;
    border:1px solid rgba(255,255,255,.14);
    backdrop-filter: none !important;
  }
}

/* Connect wallet button variant */
.btn.wallet{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(33,209,159,.85));
  color:#071014;
  font-weight:900;
}


/* Header wallet status + balance chips */
.walletMeta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.walletChip{
  padding:9px 10px;border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  color:var(--muted);
  font-size:12.5px;
  display:inline-flex;align-items:center;gap:8px;
}
.walletChip.good{border-color: rgba(33,209,159,.35); background: rgba(33,209,159,.10); color: rgba(238,242,255,.88);}
.walletChip.bad{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); color: rgba(238,242,255,.88);}
.walletChip b{color:var(--text)}
@media (max-width:980px){
  .walletMeta{justify-content:stretch}
  .walletChip{width:100%; justify-content:center}
}


/* === Left-wing slide drawer navigation (state-of-the-art) === */
.navRight{display:flex;align-items:center;gap:10px;margin-left:auto}

.navOverlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  z-index:90;
}
.navOverlay.show{display:block; animation: pop .16s var(--ease) both}

#navLinks.links{
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:auto !important;
  height:100vh !important;
  width:min(360px, 88vw) !important;
  max-height:none !important;
  padding:14px 14px 18px !important;
  border-radius:0 24px 24px 0 !important;
  background: rgba(6,8,18,.98) !important;
  border-right:1px solid rgba(255,255,255,.14) !important;
  border-top:none !important;
  border-left:none !important;
  border-bottom:none !important;
  box-shadow: 18px 0 70px rgba(0,0,0,.55) !important;
  backdrop-filter:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:10px !important;
  transform: translateX(-102%) !important;
  transition: transform .22s var(--ease) !important;
  z-index:100 !important;
}
#navLinks.links.open{transform: translateX(0) !important}

.drawerHead{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 8px 12px;
  border-bottom:1px solid rgba(255,255,255,.10);
  margin-bottom:6px;
}
.drawerBrand{
  display:flex;align-items:center;gap:10px;
}
.drawerBrand b{font-size:13px}
.drawerBrand span{font-size:12px;color:var(--muted)}
.drawerClose{
  padding:10px 12px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
}

.drawerGroup{
  display:flex;flex-direction:column;gap:8px;
  padding-top:4px;
}
.drawerGroup .pill, .drawerGroup .btn.ghost{
  width:100%;
  justify-content:flex-start;
}
.drawerDivider{height:1px;background:rgba(255,255,255,.10);margin:6px 0}
.drawerMeta{display:flex;flex-direction:column;gap:8px;margin-top:auto;padding-top:10px;border-top:1px solid rgba(255,255,255,.10)}
.drawerMeta .walletMeta{justify-content:stretch}
.drawerMeta .walletChip{width:100%;justify-content:center}

/* Header: keep clean */
.links{overflow:visible !important}
@media (min-width:981px){
  .links{flex-wrap:nowrap}
}

/* Ensure hamburger always visible now */
.navToggle{display:inline-flex !important}

/* Make header right area not wrap */
@media (max-width: 980px){
  .navRight{flex-wrap:wrap; justify-content:flex-end}
}


/* === Drawer interaction lock + solid theme (v2) === */
body.nav-locked{
  overflow:hidden !important;
}
body.nav-locked main{pointer-events:none;}
body.nav-locked header{pointer-events:none;}
body.nav-locked #navLinks{pointer-events:auto;}
body.nav-locked #navToggle{pointer-events:auto;}
body.nav-locked #navOverlay{pointer-events:auto;}

#navLinks.links{
  background: #0b1020 !important; /* solid dark */
  color: var(--text) !important;
}
#navLinks .pill, #navLinks .btn.ghost{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: rgba(238,242,255,.92);
}
#navLinks .pill:hover, #navLinks .btn.ghost:hover{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.20);
}
#navLinks .drawerBrand span{color: rgba(238,242,255,.72);}
#navLinks .drawerClose{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}
#navLinks .drawerClose:hover{background: rgba(255,255,255,.10);}

.navOverlay{
  background: rgba(0,0,0,.68) !important;
}

/* Better drawer spacing on very small devices */
@media (max-width: 380px){
  #navLinks.links{width: 92vw !important;}
  #navLinks .drawerBrand b{font-size:12.5px}
  #navLinks .drawerBrand span{font-size:11.5px}
}

/* Make drawer scroll smooth and keep footer meta visible */
#navLinks.links{overscroll-behavior: contain;}


/* === Typography & structure upgrades (v2) === */
h2,h3,h4{letter-spacing:-.2px}
.card{box-shadow: var(--shadow);}
.note{background: rgba(255,255,255,.045);}
.table{background: rgba(255,255,255,.035);}


/* === Perfect scroll lock: background fixed, drawer scrollable === */
body.nav-locked{
  overflow:hidden !important;
  /* JS sets position:fixed and top to preserve scroll position */
}
#navLinks.links{
  overflow-y:auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.navOverlay{
  touch-action: none;
}


/* === Drawer bright polish (v4) === */
#navLinks.links{
  background:#0b1020 !important; /* brighter dark */
  color: var(--text) !important;
  border-right: 1px solid rgba(255,255,255,.16) !important;
}
#navLinks .drawerHead{
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 12px 10px 12px;
}
#navLinks .drawerGroup .pill,
#navLinks .drawerGroup .btn.ghost{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: rgba(238,242,255,.95);
}
#navLinks .drawerGroup .pill:hover,
#navLinks .drawerGroup .btn.ghost:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.24);
}
#navLinks .drawerMeta{
  background: rgba(255,255,255,.02);
}
#navLinks .drawerClose{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
}
#navLinks .drawerClose:hover{background: rgba(255,255,255,.14);}

/* Ensure only drawer scrolls while open (101% usability) */
body.nav-locked{overflow:hidden !important;}
body.nav-locked main{pointer-events:none;}
body.nav-locked header{pointer-events:none;}
body.nav-locked #navLinks{pointer-events:auto;}
body.nav-locked #navOverlay{pointer-events:auto;}
#navLinks.links{
  height:100vh !important;
  overflow-y:auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}


/* Overlay tuned */
.navOverlay{background: rgba(0,0,0,.70) !important;}


/* === Drawer accordion (v5) === */
.drawerSection{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  border-radius:18px;
  overflow:hidden;
}
.drawerSectionHead{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  border:none;
  cursor:pointer;
  background: rgba(255,255,255,.04);
  color: rgba(238,242,255,.92);
  font-weight:800;
  font-size:13px;
}
.drawerSectionHead:hover{background: rgba(255,255,255,.06);}
.drawerChevron{
  width:18px;height:18px;flex:0 0 auto;
  transition: transform .18s var(--ease);
  opacity:.9;
}
.drawerSection.open .drawerChevron{transform: rotate(180deg);}
.drawerSectionBody{
  display:none;
  padding:10px 10px 12px;
  gap:8px;
  flex-direction:column;
}
.drawerSection.open .drawerSectionBody{display:flex;}
.drawerSectionBody .pill{background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16);}

#navLinks .pill.active{
  background: linear-gradient(135deg, rgba(124,92,255,.22), rgba(33,209,159,.14)) !important;
  border-color: rgba(124,92,255,.40) !important;
  color: rgba(238,242,255,.96) !important;
  box-shadow: 0 10px 24px rgba(124,92,255,.12);
}


/* === Drawer stability improvements (v6) === */
#navLinks.links{
  height: 100dvh !important; /* dynamic viewport for mobile address bar */
  padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important;
}
.navOverlay{height:100dvh;}
body.nav-locked{
  /* allow vertical gestures to be handled by drawer */
  touch-action: pan-y;
}


/* === ChatGPT-style sidebar (v7) === */
/* Layout wrapper */
.pageShell{
  display:flex;
  min-height:100vh;
}

/* Sidebar */
.sidebar{
  position:sticky;
  top:0;
  height:100dvh;
  width: 320px;
  flex:0 0 auto;
  background:#0b1020; /* solid */
  border-right:1px solid rgba(255,255,255,.10);
  display:flex;
  flex-direction:column;
  z-index:80;
}
.sidebarInner{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:12px;
  gap:10px;
}
.sidebarTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 8px;
}
.sidebarBrand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.sidebarBrand .logoImg{width:28px;height:28px;border-radius:10px}
.sidebarBrand .title{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.sidebarBrand .title b{
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebarBrand .title span{
  font-size:11.5px;
  color:rgba(238,242,255,.70);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebarToggle{
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
}
.sidebarToggle:hover{background:rgba(255,255,255,.10)}
.sidebarToggle svg{width:18px;height:18px;display:block}

/* Sidebar sections */
.sidebarScroll{
  overflow:auto;
  padding:4px;
  border-radius:18px;
}
.sidebarSection{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  border-radius:18px;
  overflow:hidden;
  margin-bottom:10px;
}
.sidebarSectionHead{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  border:none;
  cursor:pointer;
  background:rgba(255,255,255,.04);
  color:rgba(238,242,255,.92);
  font-weight:800;
  font-size:13px;
}
.sidebarSectionHead:hover{background:rgba(255,255,255,.06)}
.sidebarChevron{width:18px;height:18px;transition:transform .18s var(--ease)}
.sidebarSection.open .sidebarChevron{transform:rotate(180deg)}
.sidebarSectionBody{
  display:none;
  padding:10px;
  gap:8px;
  flex-direction:column;
}
.sidebarSection.open .sidebarSectionBody{display:flex}
.sidebarLink{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:rgba(238,242,255,.92);
  font-size:13px;
  font-weight:650;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.sidebarLink:hover{background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.20)}
.sidebarLink.active{
  background: linear-gradient(135deg, rgba(124,92,255,.22), rgba(33,209,159,.14));
  border-color: rgba(124,92,255,.42);
  box-shadow: 0 10px 24px rgba(124,92,255,.12);
}
.sidebarPillRow{display:flex;gap:8px;flex-wrap:wrap}
.sidebarPill{padding:9px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:rgba(238,242,255,.86);font-size:12.5px;font-weight:650}
.sidebarPill:hover{background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.20)}

/* Sidebar bottom (wallet) */
.sidebarBottom{
  margin-top:auto;
  padding:10px 8px 8px;
  border-top:1px solid rgba(255,255,255,.10);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sidebarBottom .walletChip{
  width:100%;
  justify-content:center;
}
.sidebarBottom .btn.wallet{width:100%}

/* Main content */
.mainShell{
  flex:1 1 auto;
  min-width:0;
}
header{
  position:sticky;
  top:0;
  z-index:70;
}
.wrap{max-width:var(--max)}

/* Desktop collapsed rail */
body.sidebar-collapsed .sidebar{
  width: 76px;
}
body.sidebar-collapsed .sidebarBrand .title{display:none}
body.sidebar-collapsed .sidebarScroll{display:none}
body.sidebar-collapsed .sidebarBottom .walletMeta{display:none}
body.sidebar-collapsed .sidebarBottom .sidebarTheme{display:none}
body.sidebar-collapsed .sidebarBottom .btn.wallet{padding:11px 10px;font-size:0}
body.sidebar-collapsed .sidebarBottom .btn.wallet::after{
  content:"🔗";
  font-size:16px;
  color:#071014;
  position:relative;
}
body.sidebar-collapsed .sidebarTop{justify-content:center}
body.sidebar-collapsed .sidebarToggle{border-radius:14px}

/* Mobile: offcanvas */
.sidebarOverlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.70);
  display:none;
  z-index:79;
}
.sidebarOverlay.show{display:block; animation: pop .16s var(--ease) both}

@media (max-width: 980px){
  .sidebar{
    position:fixed;
    left:0; top:0;
    transform: translateX(-102%);
    transition: transform .22s var(--ease);
    box-shadow: 18px 0 70px rgba(0,0,0,.55);
  }
  body.sidebar-open .sidebar{transform: translateX(0)}
  body.sidebar-open .sidebarOverlay{display:block}
  /* On mobile header shows hamburger */
  #navToggle{display:inline-flex !important}
}

/* Header hamburger for mobile */


/* When sidebar open, lock background correctly */


/* v7: navLinks legacy disabled */
#navLinks{display:none !important;}

@media (max-width: 980px){ body.sidebar-open{ overflow:hidden; } }

/* v10: disable collapsed rail feature (always expanded) */
body.sidebar-collapsed .sidebar{width:320px !important;}
body.sidebar-collapsed .sidebarBrand .title{display:flex !important;}
body.sidebar-collapsed .sidebarScroll{display:block !important;}
body.sidebar-collapsed .sidebarBottom .walletMeta{display:flex !important;}
body.sidebar-collapsed .sidebarBottom .sidebarTheme{display:inline-flex !important;}
body.sidebar-collapsed .sidebarBottom .btn.wallet{font-size:14px !important; padding:11px 14px !important;}
body.sidebar-collapsed .sidebarBottom .btn.wallet::after{content:none !important;}
/* v10: icon-only hamburger */
#navToggle.navToggle{padding:10px 10px; gap:0 !important;}
#navToggle.navToggle span{display:none;}
/* v10: mobile close button in sidebar */
.sidebarCloseMobile{
  display:none;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
}
.sidebarCloseMobile svg{width:18px;height:18px;display:block}
.sidebarCloseMobile:hover{background:rgba(255,255,255,.10)}
@media (max-width:980px){ .sidebarCloseMobile{display:inline-flex;} }
/* v10: layout neatness */
.mainShell{min-width:0;}
main.wrap{padding-top:10px;}


/* === v11: hamburger controls open/close === */
#navToggle.navToggle{display:inline-flex;}
@media (min-width: 981px){
  /* Desktop: allow sidebar to be closed fully */
  body.sidebar-closed .sidebar{display:none !important;}
  body.sidebar-closed .mainShell{width:100%;}
}
/* Keep overlay only for mobile open state */
@media (min-width: 981px){
  .sidebarOverlay{display:none !important;}
}
