:root{
  --bg:#070A12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.10);
  --text:#F3F6FF;
  --muted: rgba(243,246,255,.72);
  --line: rgba(255,255,255,.14);
  --accent:#7C5CFF;
  --accent2:#22D3EE;
  --danger:#FF3B7A;
  --ok:#22C55E;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius:16px;

  /* Sidebar */
  --snav-w: 240px;

  /* Bottom dock (mobile) */
  --bnav-h: 64px;

  /* Adaptive grading defaults (JS sets --mdDanger 0..1) */
  --mdDanger: 0;
  --mdGradeWarm: calc(var(--mdDanger) * 0.20);
  --mdGradeSat: calc(1 - (var(--mdDanger) * 0.18));
  --mdGradeBri: calc(1 - (var(--mdDanger) * 0.08));
}

*{box-sizing:border-box}

/* =========================================================
   GLOBAL SCROLL MODEL (FIXED)
   - allow normal document scrolling (prevents scroll lock)
   - sidebar stays sticky
   ========================================================= */
html,body{
  height:auto;
  min-height:100%;
  overflow-x:hidden;
  overflow-y:auto; /* ✅ FIX: allow page to scroll normally */
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(124,92,255,.20), transparent 55%),
    radial-gradient(900px 500px at 80% 0%, rgba(34,211,238,.14), transparent 60%),
    radial-gradient(900px 500px at 60% 90%, rgba(255,59,122,.10), transparent 55%),
    var(--bg);
  color:var(--text);

  /* Adaptive grading */
  filter: saturate(var(--mdGradeSat)) brightness(var(--mdGradeBri)) hue-rotate(calc(var(--mdGradeWarm) * -18deg));
  transition: filter 240ms ease;
}

a{color:var(--accent2); text-decoration:none}
a:hover{opacity:.9; text-decoration:underline}

/* =========================
   LAYOUT (Sidebar + Main)
   ========================= */

.layout{
  display:flex;
  min-height:100vh; /* ✅ FIX: no hard height clamp */
  width:100%;
  overflow:visible; /* ✅ FIX: prevent clipping */
}

/* Sidebar (desktop) */
.snav{
  width: var(--snav-w);
  flex: 0 0 var(--snav-w);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden; /* <- never scroll the sidebar */
  padding: 16px 14px;
  border-right: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.snav .brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  letter-spacing:.3px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.snav .brand small{
  margin-left:auto;
  font-weight:800;
  font-size:12px;
  color: rgba(243,246,255,.65);
  border: 1px solid rgba(255,255,255,.12);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
}

/* ✅ your view.php uses: <nav class="snav-links"> */
.snav-links{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* keep support if some pages still use .snav nav */
.snav nav{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.snav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(243,246,255,.78);
  font-weight: 800;
  text-decoration:none;
  transition: transform .12s ease, filter .12s ease, background .12s ease, color .12s ease;
}

.snav a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  color: rgba(243,246,255,.92);
  filter: brightness(1.05);
}

.snav a.active{
  color: rgba(243,246,255,.96);
  background: rgba(0, 200, 255, .12);
  border-color: rgba(0, 200, 255, .25);
}

.snav .spacer{flex:1}
.snav .logout{margin-top: 14px; opacity:.9}

/* MAIN: NOT A SCROLL CONTAINER ANYMORE (prevents scroll lock) */
.main{
  flex:1;
  min-width:0;
  height:auto;           /* ✅ FIX */
  overflow:visible;      /* ✅ FIX */
  display:flex;
  flex-direction:column;
}

/* Make sure inner wrappers do NOT create their own scrollbars */
.wrap{
  max-width: min(1320px, calc(100vw - 32px));
  margin:0 auto;
  padding:22px 16px 44px;
  overflow: visible;
}

/* If any pages set their own scroll, this neutralizes it globally */
.cityhub,
.maincol,
.sidecol{
  overflow: visible !important;
  height: auto !important;
}

/* Mobile: hide sidebar, enable bottom dock + extra bottom spacing */
@media (max-width: 980px){
  .snav{display:none;}
  .wrap{
    padding-bottom: calc(var(--bnav-h) + 28px + env(safe-area-inset-bottom));
  }
}

/* =========================
   Topbar / Panels
   ========================= */

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand{
  display:flex; align-items:center; gap:12px;
  font-weight:900; letter-spacing:.4px;
}

.badge{
  padding:4px 10px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.28);
  color:var(--muted);
  font-size:12px;
}

.panel{
  margin-top:16px;
  padding:16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.h1{font-size:34px; margin:10px 0 0 0}
.h2{font-size:20px; margin:0 0 10px 0; color:var(--muted)}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
@media (max-width:720px){
  .grid{grid-template-columns:1fr;}
  .h1{font-size:28px;}
}

.card{
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  padding:14px;
  transition:transform .12s ease, filter .12s ease;
  will-change: transform, filter;
}
.card b{display:block; font-size:16px; margin-bottom:6px}
.card small{color:var(--muted)}
.card:active{transform:scale(.985)}
.card:hover{filter:brightness(1.05)}
.card .meta{margin-top:6px;color:var(--muted);font-size:12px}

/* =========================
   Utilities (shared)
   ========================= */

.sub{
  margin-top:6px;
  color: rgba(243,246,255,.72);
  font-size:13px;
  line-height:1.35;
}

.card-h{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: rgba(243,246,255,.78);
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
}

/* Buttons (anchor + button parity) */
a.btn, button.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: rgba(255,255,255,.92);
  font-weight:900;
  text-decoration:none;
  width:auto;
  min-height:44px;
  transition: transform .12s ease, filter .12s ease, background .12s ease, color .12s ease;
}

button.btn{cursor:pointer}
a.btn:hover, button.btn:hover{filter:brightness(1.06); text-decoration:none}
a.btn:active, button.btn:active{transform:scale(.985)}

a.btn.primary, button.btn.primary{
  border:0;
  background: linear-gradient(90deg, rgba(124,92,255,.85), rgba(34,211,238,.55));
}

a.btn.ghost, button.btn.ghost{
  background: rgba(255,255,255,.04);
  color: rgba(243,246,255,.62);
  border-color: rgba(255,255,255,.10);
}

a.btn[aria-disabled="true"], button.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  filter:none;
  transform:none;
}

/* Optional utility: force full-width buttons when needed */
.btn.block{width:100%;}

/* Jobs page layout tuning (scoped by class) */
.jobs-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}

@media (min-width: 1100px){
  .jobs-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (min-width: 1500px){
  .jobs-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* forms */
input,select,button{
  width:100%;
  padding:12px 12px;
  margin:8px 0;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.35);
  color:var(--text);
  outline:none;
}
button{
  cursor:pointer;
  background: linear-gradient(90deg, rgba(124,92,255,.85), rgba(34,211,238,.55));
  border:0;
  font-weight:800;
}
button:hover{filter:brightness(1.05)}

.help{color:var(--muted); font-size:13px; line-height:1.35}
.alert-ok{color:var(--ok)}
.alert-bad{color:var(--danger)}

/* =========================
   HUD
   ========================= */

.hudpanel{position:relative; overflow:hidden;}

.hudgrid{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr 1fr;
  gap:12px;
  margin-top:12px;
}
@media (max-width:720px){.hudgrid{grid-template-columns:1fr 1fr;}}

.statbox{
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  transform:translateZ(0);
  will-change: transform, box-shadow, filter;
}
.statlabel{font-size:12px;color:var(--muted);margin-bottom:6px}

.staticon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  margin-right:8px;
  border-radius:8px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.staticon.energy{outline:1px solid rgba(124,92,255,.25)}
.staticon.cash{outline:1px solid rgba(34,211,238,.25)}
.staticon.heat{outline:1px solid rgba(255,59,122,.25)}

.statvalue{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
}

.statvalue small.heatlabel{
  font-size:12px;
  color: rgba(243,246,255,.72);
  font-weight:800;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
}

.meter{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  margin-top:10px
}
.meter > i{
  display:block;
  height:100%;
  width:50%;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  border-radius:999px;
  transition: width .55s cubic-bezier(.2,.8,.2,1);
}
.meter.heat > i{background:linear-gradient(90deg,#22c55e,#f59e0b,#ef4444)}
.subhint{margin-top:8px;font-size:12px;color:var(--muted);line-height:1.3}

/* =========================
   Toast
   ========================= */
.toast{
  position:sticky;
  top:10px;
  z-index:20;
  margin:10px 0;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  backdrop-filter: blur(10px);
}
.toast.ok{background:rgba(34,197,94,.10);color:#d1fae5;border-color:rgba(34,197,94,.25)}
.toast.bad{background:rgba(239,68,68,.10);color:#fee2e2;border-color:rgba(239,68,68,.25)}
.toast.warn{background:rgba(245,158,11,.10);color:#fffbeb;border-color:rgba(245,158,11,.25)}

/* =========================
   Bottom Dock (mobile only)
   ========================= */
.bnav{display:none;} /* desktop off */

@media (max-width: 980px){
  .bnav{
    display:block;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(920px, calc(100vw - 24px));
    z-index: 9999;
  }

  .bnav .bar{
    height: var(--bnav-h);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(10, 14, 22, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
  }

  .bnav .bar a{
    display:flex;
    align-items:center;
    justify-content:center;
    height:44px;
    border-radius:12px;
    text-decoration:none;
    font-weight:800;
    font-size:12px;
    letter-spacing:.2px;
    color: rgba(255,255,255,.72);
    transition: transform .12s ease, background .12s ease, color .12s ease;
  }

  .bnav .bar a:hover{
    transform: translateY(-1px);
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.06);
  }

  .bnav .bar a.active{
    color: rgba(255,255,255,.96);
    background: rgba(0, 200, 255, .12);
    border: 1px solid rgba(0, 200, 255, .25);
  }
}

/* =========================
   Footer (professional + consistent)
   ========================= */
.footer{
  margin-top:auto;
  padding: 14px 0 18px;
  text-align:center;
  color: rgba(243,246,255,.55);
  font-size:12px;
}

/* =========================
   If md_header prints raw link row, style it
   ========================= */
.toplinks, .topnav, .md-toplinks{
  margin: 10px 0 0;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.toplinks a, .topnav a, .md-toplinks a{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(243,246,255,.72);
  font-weight: 900;
  font-size: 12px;
  text-decoration: none;
}

.toplinks a:hover, .topnav a:hover, .md-toplinks a:hover{
  color: rgba(243,246,255,.92);
  background: rgba(255,255,255,.06);
  text-decoration:none;
}

/* =========================
   Scrollbar theme (apply to page scroll now)
   ========================= */
:root{
  --sb-track: rgba(255,255,255,0.06);
  --sb-thumb: rgba(124,92,255,0.35);
  --sb-thumb-hover: rgba(34,211,238,0.45);
}

/* Firefox */
html{
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

/* Chromium/WebKit */
html::-webkit-scrollbar{ width: 10px; height: 10px; }
html::-webkit-scrollbar-track{
  background: var(--sb-track);
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb{
  background: var(--sb-thumb);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.35);
}
html::-webkit-scrollbar-thumb:hover{ background: var(--sb-thumb-hover); }

/* Optional: hide scrollbar but keep scroll */
.scroll-hide{
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scroll-hide::-webkit-scrollbar{ display:none; }

/* =========================================================
   Top HUD upgrades (logo + stat pills)
   ========================================================= */

/* Make the HUD bar a little taller & cleaner */
.topbar.hud{
  gap:14px;
  padding: 12px 14px;
  min-height: 72px;
}

.hud-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 320px;
}

.hud-right{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 260px;
  justify-content:flex-end;
}

/* ✅ PREMIUM logo capsule + BIGGER IMAGE */
.mdlogo{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;

  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.22));
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mdlogo-img{
  height: 52px;
  width: auto;
  display:block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.45));
}

.mdlogo-text{
  font-weight: 950;
  letter-spacing: .3px;
  color: rgba(243,246,255,.94);
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 10px 22px rgba(0,0,0,.45);
}

/* Optional: slightly smaller on smaller screens so it doesn’t crush HUD */
@media (max-width: 1200px){
  .hud-left{ min-width: 280px; }
  .mdlogo-img{ height: 46px; }
  .mdlogo-text{ font-size: 16px; }
}
@media (max-width: 980px){
  .hud-left{ min-width: 200px; }
  .mdlogo{ padding: 8px 10px; border-radius: 14px; }
  .mdlogo-img{ height: 40px; }
  .mdlogo-text{ font-size: 14px; }
}

/* Make logout look like a pill (md_header prints a plain anchor) */
.topbar.hud a[href*='logout']{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: rgba(243,246,255,.75);
  font-weight:950;
  font-size:12px;
  text-decoration:none;
}
.topbar.hud a[href*='logout']:hover{
  background: rgba(255,255,255,.06);
  text-decoration:none;
}

.userchip{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(243,246,255,.80);
  font-weight:950;
  font-size:12px;
}

/* =========================
   Sidebar accordion (City)
   ========================= */
.snav .suser{
  margin-top: 12px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  font-weight: 950;
}
.snav .srole{
  display:block;
  margin-top:4px;
  font-size:12px;
  opacity:.7;
  font-weight:900;
}

.accpanel{
  display:none;
  flex-direction:column;
  gap:6px;
  margin: -2px 0 8px 0;
  padding: 8px 8px 10px 12px;
  border-left: 2px solid rgba(0, 200, 255, .22);
}
.accpanel.is-open{ display:flex; }

.accpanel .sub{
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(243,246,255,.70);
  font-weight: 900;
  text-decoration:none;
}
.accpanel .sub:hover{
  background: rgba(255,255,255,.06);
  color: rgba(243,246,255,.90);
  text-decoration:none;
}

/* =========================================================
   Logo sizing override (v2)
   Ensures /assets/mafiad.png is large + crisp in the HUD.
   ========================================================= */
.topbar.hud{ min-height:72px; padding:12px 14px; }
.topbar.hud .hud-left{ min-width:320px; }
.topbar.hud .mdlogo{
  padding:10px 12px;
  border-radius:16px;
}
.topbar.hud .mdlogo-img{
  height:56px;
  width:auto;
  display:block;
  object-fit:contain;
}
.topbar.hud .mdlogo-text{
  font-size:18px;
  line-height:1;
}

/* Keep it usable on narrower screens */
@media (max-width: 1200px){
  .topbar.hud .hud-left{ min-width:280px; }
  .topbar.hud .mdlogo-img{ height:48px; }
  .topbar.hud .mdlogo-text{ font-size:16px; }
}
@media (max-width: 980px){
  .topbar.hud .hud-left{ min-width:200px; }
  .topbar.hud .mdlogo{ padding:8px 10px; border-radius:14px; }
  .topbar.hud .mdlogo-img{ height:40px; }
  .topbar.hud .mdlogo-text{ font-size:14px; }
}

/* =========================================================
   City Hub UI (v3 tidy layout)
   ========================================================= */

.md-subbar{
  margin-top:16px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.md-subbar-left .md-title{
  font-size:20px;
  font-weight:950;
  letter-spacing:.2px;
}
.md-subbar-left .md-subtitle{
  margin-top:4px;
  color: rgba(243,246,255,.70);
  font-size:12px;
  font-weight:800;
}

.md-pillbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

.md-pillbar .btn{
  min-height:38px;
  padding:9px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:950;
}

.md-kvrow{
  display:grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
@media (max-width: 1100px){
  .md-kvrow{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 720px){
  .md-kvrow{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.md-kv{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  border-radius: 12px;
  padding:10px 10px;
  display:flex;
  flex-direction:column;
  gap:4px;
  min-height:54px;
}
.md-kv-label{
  font-size:11px;
  color: rgba(243,246,255,.62);
  font-weight:900;
  letter-spacing:.2px;
  text-transform:none;
}
.md-kv-val{
  font-size:13px;
  font-weight:950;
  color: rgba(243,246,255,.92);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.md-btnrow{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.md-btnrow .btn,
.md-btnrow a.btn,
.md-btnrow button.btn{
  width:auto;
  min-height:40px;
  padding:10px 12px;
  border-radius:12px;
  font-size:12px;
  font-weight:950;
}

.md-btnrow form{ margin:0; }
.md-btnrow form .btn{ width:auto; }

.md-muted{ color: rgba(243,246,255,.62); font-size:12px; }

.md-list{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.md-listrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.md-propbox{
  margin-top:12px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
}
.md-prophead{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.md-proptitle{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.md-proptitle b{ font-size:15px; }

.md-newsitem{
  margin-top:10px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.md-newshead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.md-newstag{
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(243,246,255,.74);
  font-weight:950;
  font-size:11px;
  white-space:nowrap;
}
.md-newsmeta{
  margin-top:6px;
  color: rgba(243,246,255,.60);
  font-size:11px;
}

/* Collapsible sections (no JS required) */
.md-collapse{
  margin-top:16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.md-collapse > summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  user-select:none;
  font-weight:950;
  color: rgba(243,246,255,.90);
}
.md-collapse > summary::-webkit-details-marker{ display:none; }
.md-collapse > summary .sub{
  margin:0;
  font-weight:900;
  color: rgba(243,246,255,.62);
}
.md-collapse .md-collapse-body{
  padding: 0 16px 16px;
}

/* Ensure bottom breathing room */
.wrap{ padding-bottom: 80px; }
