/* Load after dimensions/style.css. No scroll locking or scroll-driven hiding. */
:root { --rma-header-height: 88px; }
.topbar.rma-global-header,
.reading.content-fit .topbar.rma-global-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--rma-header-height);
  min-height: var(--rma-header-height);
  padding: 0 var(--gutter, 32px);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transform: none;
  color: #f3f0e8;
  background: #05090f;
  border-bottom: 1px solid #f3f0e82b;
}
.rma-global-header .brand { flex-shrink: 0; white-space: nowrap; color: #f3f0e8; }
.rma-global-header a { text-decoration: none; }
.rma-global-header :is(a, summary, button):focus-visible {
  outline: 2px solid #d8ff45;
  outline-offset: 4px;
}
.rma-desktop-nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 40px); margin-left: auto; }
.rma-desktop-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #f3f0e8;
  font-size: 13px;
  white-space: nowrap;
}
.rma-global-header .rma-nav-contact { color: #d8ff45; }
.rma-global-header a:hover { color: #d8ff45; }
.rma-global-header .rma-nav-contact:hover { color: #f3f0e8; }
.rma-header-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.rma-global-header #mode { font-family: inherit; cursor: pointer; white-space: nowrap; }
.rma-global-header #mode[disabled] { cursor: default; }
.rma-global-header #mode[hidden] { display: none; }
.rma-mobile-menu { display: none; }
/* content-fit previously put the header in normal flow: preserve hero clearance. */
.reading.content-fit .rma-global-header ~ .journey .chapter:first-child {
  padding-top: calc(var(--rma-header-height) + 60px);
}
@media (max-width: 1000px) {
  :root { --rma-header-height: 72px; }
  .topbar.rma-global-header,
  .reading.content-fit .topbar.rma-global-header { padding: 0 clamp(16px, 3vw, 30px); gap: 12px; }
  .rma-desktop-nav { display: none; }
  .rma-header-controls { gap: 8px; }
  .rma-global-header #mode { min-height: 38px; padding: 0 10px; font-size: 10px; }
  .rma-mobile-menu { display: block; }
  .rma-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    list-style: none;
    color: #f3f0e8;
    cursor: pointer;
    border: 1px solid #f3f0e840;
    border-radius: 50%;
    touch-action: manipulation;
  }
  .rma-menu-toggle::-webkit-details-marker { display: none; }
  .rma-menu-toggle::marker { content: ""; }
  .rma-menu-toggle:hover,
  .rma-mobile-menu[open] .rma-menu-toggle { color: #d8ff45; border-color: #d8ff45; }
  .rma-menu-close { display: none; }
  .rma-mobile-menu[open] .rma-menu-hamburger { display: none; }
  .rma-mobile-menu[open] .rma-menu-close { display: inline; }
  .rma-mobile-nav {
    position: fixed;
    inset: var(--rma-header-height) 0 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 20px clamp(22px, 5vw, 48px) max(28px, env(safe-area-inset-bottom));
    color: #f3f0e8;
    background: #05090f;
    border-bottom: 1px solid #f3f0e82b;
    scrollbar-gutter: stable;
  }
  .rma-mobile-nav-inner { max-width: 720px; margin: 0 auto; }
  .rma-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
  .rma-mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 0;
    color: #f3f0e8;
    font-size: clamp(18px, 2.8vw, 25px);
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  .rma-mobile-nav .rma-services-overview { color: #d8ff45; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .rma-mobile-nav .rma-service-links { padding-bottom: 16px; border-bottom: 1px solid #f3f0e82b; }
  .rma-mobile-nav .rma-page-links { padding-top: 16px; }
  /* Without JS there is no focus-exit/anchor auto-close. Keep the expanded
     disclosure in normal flow instead of covering the destination or focus. */
  .topbar.rma-global-header:has(.rma-mobile-menu:not([data-navigation-ready])[open]) {
    position: relative;
    display: block;
    height: auto;
    padding: 24px;
  }
  .rma-global-header:has(.rma-mobile-menu:not([data-navigation-ready])[open]) .rma-header-controls { display: block; }
  .rma-mobile-menu:not([data-navigation-ready])[open] .rma-menu-toggle { position: absolute; top: 14px; right: 20px; }
  .rma-mobile-menu:not([data-navigation-ready])[open] .rma-mobile-nav { position: static; padding: 24px 0 0; overflow: visible; }
}
@media (max-width: 380px) {
  .rma-global-header .brand { font-size: 18px; gap: 8px; }
  .rma-global-header .mark { width: 22px; height: 22px; border-width: 8px; }
  .rma-global-header #mode { padding-inline: 8px; }
  .topbar.rma-global-header,
  .reading.content-fit .topbar.rma-global-header { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .rma-global-header *, .rma-global-header *::before, .rma-global-header *::after {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}

/* Vector geometry instead of OS-dependent emoji glyphs. */
.rma10-btn::after{content:none}
.rma-arrow{display:inline-block;width:20px;height:20px;flex:none;vertical-align:middle}
.read-section .rma-arrow{width:17px;height:17px;margin-left:16px}
@media(max-width:600px){
  /* Stable large viewport: collapsing browser chrome must not resize WebGL. */
  .world{bottom:auto;height:100lvh}
}
