/* One compact header replaces the old desktop/mobile navigation on public pages. */
html { scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
.masthead.persistent-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fff;
  color: #14262d;
  border-bottom: 1px solid #d6ddda;
  box-shadow: 0 2px 10px #14262d0c;
}
.persistent-header .header-inner {
  min-height: 60px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: nowrap;
  gap: 12px;
}
.persistent-header .brand-name { font-size: 14px; }
.persistent-header .brand-symbol { width: 30px; height: 30px; }
.persistent-header .brand-name span { color: #425453; }
.persistent-nav { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; font-size: 14px; }
.persistent-home, .persistent-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #c5cdc6;
  border-radius: 6px;
  background: #f5f3ec;
  color: #14262d;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.persistent-menu { position: relative; }
.persistent-menu > summary { list-style: none; }
.persistent-menu > summary::-webkit-details-marker { display: none; }
.persistent-menu[open] > summary { background: #14262d; color: #fff; }
.persistent-menu-links {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 32px));
  max-height: calc(100dvh - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #c5cdc6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px #14262d26;
}
.persistent-menu-links a { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 10px 12px; border-radius: 4px; color: #14262d; text-decoration: none; font-size: 14px; line-height: 1.4; }
.persistent-menu-links a:hover { background: #f5f3ec; }
.persistent-nav a:focus-visible, .persistent-menu > summary:focus-visible { outline: 3px solid #a75618; outline-offset: 2px; }
/* Keep layout stable while a native dialog or a phone keyboard owns the screen. */
body:has(dialog[open]) .persistent-header { visibility: hidden; pointer-events: none; }
@media (max-width: 760px) {
  .persistent-header .header-inner { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .persistent-header .brand { gap: 0; }
  .persistent-header .brand-symbol { display: none; }
  .persistent-header .brand-name { font-size: 12px; letter-spacing: .6px; }
  .persistent-header .brand-name span { font-size: 7px; letter-spacing: 1px; }
  .persistent-home, .persistent-menu > summary { padding: 10px 12px; }
  .site-actions-suppressed .persistent-header,
  body:has(input:focus, textarea:focus, select:focus, [contenteditable="true"]:focus) .persistent-header { visibility: hidden; pointer-events: none; }
}
@media print { .masthead.persistent-header { position: static; box-shadow: none; } .persistent-nav { display: none; } }
