/* ==========================================================================
   Axiom Persistent Top Menu Bar + Responsive Drawer + Section Navigation
   ========================================================================== */
.mbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(20, 22, 26, 0.12);
  font-family: var(--text, "Hanken Grotesk", system-ui, sans-serif);
  background: rgba(245, 242, 234, 0.98);
  transition: background 0.3s, border-color 0.3s;
}

.mbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(245, 242, 234, 0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body.dk .mbar {
  background: rgba(15, 18, 22, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8e6df;
}

body.dk .mbar::before {
  background: rgba(15, 18, 22, 0.98);
}

.mb-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mb-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  color: var(--ink, #14161a);
  font-family: var(--display, "Source Serif 4", Georgia, serif);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

body.dk .mb-home {
  color: #e8e6df;
}

.mb-home i {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.mb-home i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: currentColor;
}

.mb-home .mb-arrow {
  color: var(--pass, #0b6b4a);
  font-size: 1.15rem;
  line-height: 1;
  margin-top: -2px;
}

body.dk .mb-home .mb-arrow {
  color: var(--term-pass, #52d6a0);
}

/* Desktop nav links */
.mb-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mb-nav a {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--ink-2, #4a505b);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.mb-nav a:hover {
  color: var(--ink, #14161a);
  background: rgba(20, 22, 26, 0.06);
}

.mb-nav a[aria-current="page"] {
  color: var(--ink, #14161a);
  background: rgba(11, 107, 74, 0.12);
  font-weight: 700;
}

body.dk .mb-nav a {
  color: #a3a9b3;
}
body.dk .mb-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
body.dk .mb-nav a[aria-current="page"] {
  color: #ffffff;
  background: rgba(82, 214, 160, 0.16);
}

/* Right side actions */
.mb-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mb-btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.775rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--ink, #14161a);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.mb-btn-cta:hover {
  background: #000000;
}

body.dk .mb-btn-cta {
  background: #e8e6df;
  color: #0f1216;
}

/* Menu Toggle & Drawer */
.mb-menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 4px 0 8px;
  color: var(--ink, #14161a);
  font-weight: 600;
  font-size: 0.8125rem;
  user-select: none;
}
.mb-menu > summary::-webkit-details-marker,
.mb-menu > summary::marker {
  display: none;
  content: "";
}

body.dk .mb-menu > summary {
  color: #e8e6df;
}

.mb-ico, .mb-ico::before, .mb-ico::after {
  display: block;
  width: 15px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, background 0.25s;
}
.mb-ico { position: relative; }
.mb-ico::before, .mb-ico::after { content: ""; position: absolute; left: 0; }
.mb-ico::before { top: -5px; }
.mb-ico::after { top: 5px; }

.mb-menu[open] .mb-ico { background: transparent; }
.mb-menu[open] .mb-ico::before { transform: translateY(5px) rotate(45deg); }
.mb-menu[open] .mb-ico::after { transform: translateY(-5px) rotate(-45deg); }

.mb-menu > summary:focus-visible, .mb-home:focus-visible, .mb-nav a:focus-visible, .mb-btn-cta:focus-visible {
  outline: 2px solid var(--pass, #0b6b4a);
  outline-offset: 2px;
  border-radius: 6px;
}

.mb-panel {
  position: fixed;
  top: 42px;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  height: calc(100vh - 42px);
  height: calc(100dvh - 42px);
  z-index: 999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #ffffff;
  border-left: 1px solid rgba(20, 22, 26, 0.14);
  padding: 20px 22px 36px;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.15);
  font-family: var(--text, "Hanken Grotesk", sans-serif);
}

body.dk .mb-panel {
  background: #0f1216;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.6);
  color: #e8e6df;
}

.mb-panel .btn-panel-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
  padding: 12px 18px;
  background: var(--ink, #14161a);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.mb-panel .btn-panel-cta:hover { background: #000; }

body.dk .mb-panel .btn-panel-cta {
  background: #e8e6df;
  color: #0f1216;
}

.mb-h {
  font-family: var(--text, "Hanken Grotesk", sans-serif) !important;
  font-size: 0.775rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2, #4a505b);
  margin: 0 0 10px !important;
  line-height: 1.3 !important;
}

body.dk .mb-h { color: #a3a9b3; }

.mb-slides, .mb-pages { list-style: none; margin: 0 0 24px; padding: 0; }
.mb-slides { counter-reset: ms; columns: 2; column-gap: 10px; }
.mb-slides li { counter-increment: ms; break-inside: avoid; }
.mb-slides a { display: flex; gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 6px; color: var(--ink, #14161a); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.mb-slides a::before { content: counter(ms); color: var(--pass, #0b6b4a); font-weight: 700; min-width: 1.2em; font-variant-numeric: tabular-nums; }
.mb-slides a:hover { background: rgba(20, 22, 26, 0.06); }
.mb-slides a[aria-current] { background: rgba(11, 107, 74, 0.12); color: var(--pass, #0b6b4a); font-weight: 700; }

body.dk .mb-slides a { color: #e8e6df; }
body.dk .mb-slides a::before { color: var(--term-pass, #52d6a0); }
body.dk .mb-slides a:hover { background: rgba(255, 255, 255, 0.06); }
body.dk .mb-slides a[aria-current] { background: rgba(82, 214, 160, 0.16); color: var(--term-pass, #52d6a0); }

.mb-pages a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink, #14161a); text-decoration: none; font-weight: 600; font-size: 0.925rem; margin-bottom: 4px; }
.mb-pages a small { display: block; color: var(--ink-2, #4a505b); font-weight: 400; font-size: 0.8rem; margin-top: 2px; line-height: 1.35; }
.mb-pages a:hover { background: rgba(20, 22, 26, 0.05); }
.mb-pages a[aria-current] { background: rgba(11, 107, 74, 0.12); color: var(--pass, #0b6b4a); }

body.dk .mb-pages a { color: #e8e6df; }
body.dk .mb-pages a small { color: #a3a9b3; }
body.dk .mb-pages a:hover { background: rgba(255, 255, 255, 0.06); }
body.dk .mb-pages a[aria-current] { background: rgba(82, 214, 160, 0.16); color: var(--term-pass, #52d6a0); }

html.mb-open, html.mb-open body { overflow: hidden; }

@media (min-width: 900px) {
  .mb-mobile-on-page { display: none; }
}

@media (max-width: 899px) {
  .mb-nav { display: none; }
  .mb-btn-cta { display: none; }
  .mb-panel {
    width: 100vw;
    width: 100%;
    left: 0;
    right: 0;
    top: 42px;
    bottom: 0;
    height: calc(100vh - 42px);
    height: calc(100dvh - 42px);
    border-left: 0;
    z-index: 999;
    background: #ffffff;
    box-shadow: none;
    padding: 16px 16px 40px;
  }
  body.dk .mb-panel {
    background: #0f1216;
  }
  .mb-slides { columns: 1; }
}
