:root {
  --a-text: #111;
  --a-muted: #6b7280;
  --a-border: rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
a { color: var(--a-text); text-decoration: none; }
a:hover { opacity: 0.85; }

/* Desktop navbar */
.aegis-nav {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: #fff; border-bottom: 1px solid var(--a-border);
  z-index: 1000;
}

.aegis-brand img { height: 36px; width: auto; object-fit: contain; }
.aegis-links { display: flex; gap: 18px; align-items: center; font-weight: 600; }

.aegis-dropdown { position: relative; }
.aegis-dropdown__toggle { font-weight: 700; }
.aegis-dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--a-border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 6px; display: none; min-width: 160px;
}
.aegis-dropdown__menu a { display: block; padding: 10px 12px; border-radius: 8px; }
.aegis-dropdown__menu a:hover { background: rgba(0,0,0,0.04); }
.aegis-dropdown.open .aegis-dropdown__menu { display: block; }

/* Mobile top bar */
.aegis-mtop {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  display: none; align-items: center; gap: 10px;
  background: #fff; border-bottom: 1px solid var(--a-border);
  padding-inline: 10px; z-index: 1100;
}
.aegis-mtop__toggle {
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  display: inline-flex; align-items: center; justify-content: center;
}
.aegis-mtop__brand img { height: 28px; width: auto; object-fit: contain; }

/* Drawer */
.aegis-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  z-index: 1190;
}
.aegis-overlay[hidden] { display: none; }

.aegis-drawer {
  position: fixed; top: 0; left: 0; height: 100dvh; width: min(80vw, 320px);
  background: #fff; border-right: 1px solid var(--a-border);
  transform: translateX(-100%); transition: transform 220ms ease-in-out;
  z-index: 1200; display: flex; flex-direction: column;
}
.aegis-drawer.is-open { transform: translateX(0); }

.aegis-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border-bottom: 1px solid var(--a-border);
}
.aegis-drawer__brand { height: 32px; object-fit: contain; }
.aegis-drawer__close { border: 0; background: transparent; padding: 6px; border-radius: 8px; }

.aegis-drawer__links {
  display: flex; flex-direction: column; padding: 10px; gap: 6px;
}
.aegis-drawer__links a {
  padding: 12px; border-radius: 10px; font-weight: 600;
}
.aegis-drawer__links a:hover {
  background: rgba(0,0,0,0.04);
}

.aegis-drawer__foot {
  margin-top: auto; padding: 12px 14px 16px;
  color: var(--a-muted); border-top: 1px solid var(--a-border);
}

/* Layout adjustments */
@media (min-width: 801px) {
  body { padding-top: 64px; }
}
@media (max-width: 800px) {
  body { padding-top: 56px; }
}

/* Show mobile vs desktop */
@media (max-width: 800px) {
  #aegis-desktop { display: none; }
  #aegis-mobile { display: flex; }
}
@media (min-width: 801px) {
  #aegis-desktop { display: flex; }
  #aegis-mobile { display: none; }
}
