/**
 * Site header navigation (V2) — loaded after page CSS so migrated styles cannot break the menu.
 * Crimson Pro triggers, single-level dropdowns, dark drawer accordions.
 */

.site-header {
  --topbar-height: 68px;
}

body {
  padding-top: var(--topbar-height);
  --topbar-height: 68px;
}


.site-header .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
  background: rgba(7, 18, 30, 0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--rule-dark);
  transition: background 0.3s;
}

.site-header .topbar.scrolled {
  background: rgba(7, 18, 30, 0.98);
}

.site-header .logo {
  font-family: 'Crimson Pro', serif;
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.2px;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.site-header .logo > span:first-of-type {
  color: var(--teal);
  font-style: italic;
}

.site-header .logo-tail {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: #fff;
  font-style: normal;
}

.site-header .logo-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #14b8a6 100%);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
}

body.site-drawer-nav,
body.site-has-breadcrumb {
  --section-rail-max: 1200px;
  --section-rail-gutter: 1.25rem;
}

@media (min-width: 640px) {
  body.site-drawer-nav,
  body.site-has-breadcrumb {
    --section-rail-gutter: 2rem;
  }
}

@media (min-width: 900px) {
  body.site-drawer-nav,
  body.site-has-breadcrumb {
    --section-rail-gutter: 2.5rem;
  }
}

body.site-has-breadcrumb {
  --topbar-height: 112px;
}

/* V2 breadcrumb — dedicated row below logo on sub-section routes */
.header-breadcrumb {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 899;
  padding: 0.8rem var(--section-rail-gutter, 1.25rem) 0.95rem;
  background: rgba(7, 18, 30, 0.96);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.site-header .topbar.scrolled + .header-breadcrumb,
.site-header.site-header--has-breadcrumb .topbar.scrolled + .header-breadcrumb {
  background: rgba(7, 18, 30, 0.99);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  width: 100%;
  max-width: var(--section-rail-max, 1200px);
  margin: 0 auto;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.breadcrumb-trail .breadcrumb-sep {
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  line-height: 1;
  margin: 0 0.1rem;
  flex-shrink: 0;
}

.breadcrumb-trail .breadcrumb-link {
  color: rgba(157, 228, 244, 0.95);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-trail .breadcrumb-link:hover {
  color: #c8f0fa;
}

.breadcrumb-trail .breadcrumb-current {
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* In-hero breadcrumb (Coverage Gap articles) uses same trail styling */
.hero-breadcrumb {
  position: relative;
  z-index: 2;
  padding: 0;
  margin: 0 0 1.75rem;
  background: none;
  border: 0;
  backdrop-filter: none;
}

/* Sticky section navigator (V2 art-nav) */
.art-nav {
  position: sticky;
  top: var(--topbar-height);
  z-index: 400;
  background: rgba(12, 29, 46, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.art-nav--gold {
  border-top: 2px solid rgba(201, 162, 39, 0.6);
  --art-accent: #c9a227;
  --art-accent-soft: rgba(201, 162, 39, 0.15);
  --art-accent-mid: rgba(201, 162, 39, 0.35);
  --art-accent-bg: rgba(201, 162, 39, 0.1);
  --art-active: #f0d27a;
}

.art-nav--azure {
  border-top: 2px solid rgba(42, 127, 196, 0.6);
  --art-accent: #2a7fc4;
  --art-accent-soft: rgba(42, 127, 196, 0.15);
  --art-accent-mid: rgba(42, 127, 196, 0.35);
  --art-accent-bg: rgba(42, 127, 196, 0.1);
  --art-active: #a8d4f0;
}

.art-nav--emerald {
  border-top: 2px solid rgba(14, 140, 107, 0.6);
  --art-accent: #0e8c6b;
  --art-accent-soft: rgba(14, 140, 107, 0.15);
  --art-accent-mid: rgba(14, 140, 107, 0.35);
  --art-accent-bg: rgba(14, 140, 107, 0.1);
  --art-active: #7eecc8;
  --art-hover-bg: rgba(14, 140, 107, 0.08);
}

.art-nav--teal {
  background: rgba(12, 29, 46, 0.98);
  border-top: 2px solid rgba(26, 155, 181, 0.6);
  border-bottom-color: rgba(26, 155, 181, 0.12);
  --art-accent: #1a9bb5;
  --art-accent-soft: rgba(26, 155, 181, 0.2);
  --art-accent-mid: rgba(26, 155, 181, 0.45);
  --art-accent-bg: rgba(26, 155, 181, 0.12);
  --art-active: #7dd3e8;
  --art-hover-bg: rgba(26, 155, 181, 0.08);
}

.art-nav--amber {
  background: rgba(6, 26, 31, 0.98);
  border-top: 2px solid rgba(201, 147, 42, 0.6);
  border-bottom-color: rgba(201, 147, 42, 0.12);
  --art-accent: #c9932a;
  --art-accent-soft: rgba(201, 147, 42, 0.2);
  --art-accent-mid: rgba(201, 147, 42, 0.45);
  --art-accent-bg: rgba(201, 147, 42, 0.12);
  --art-active: #e8b86a;
  --art-hover-bg: rgba(201, 147, 42, 0.08);
}

.art-nav--phosphor {
  background: rgba(4, 13, 20, 0.98);
  border-top: 2px solid rgba(45, 212, 160, 0.6);
  border-bottom-color: rgba(45, 212, 160, 0.12);
  --art-accent: #2dd4a0;
  --art-accent-soft: rgba(45, 212, 160, 0.2);
  --art-accent-mid: rgba(45, 212, 160, 0.45);
  --art-accent-bg: rgba(45, 212, 160, 0.12);
  --art-active: #7eecc8;
  --art-hover-bg: rgba(45, 212, 160, 0.08);
}

.art-nav--crimson {
  background: rgba(7, 18, 30, 0.98);
  border-top: 2px solid rgba(192, 57, 43, 0.6);
  border-bottom-color: rgba(192, 57, 43, 0.12);
  --art-accent: #c0392b;
  --art-accent-soft: rgba(192, 57, 43, 0.2);
  --art-accent-mid: rgba(192, 57, 43, 0.45);
  --art-accent-bg: rgba(192, 57, 43, 0.12);
  --art-active: #e8857d;
  --art-hover-bg: rgba(192, 57, 43, 0.08);
}

.art-nav--teal .art-nav-label,
.art-nav--teal .art-pill,
.art-nav--teal .art-pill-num,
.art-nav--amber .art-nav-label,
.art-nav--amber .art-pill,
.art-nav--amber .art-pill-num,
.art-nav--phosphor .art-nav-label,
.art-nav--phosphor .art-pill,
.art-nav--phosphor .art-pill-num,
.art-nav--emerald .art-nav-label,
.art-nav--emerald .art-pill,
.art-nav--emerald .art-pill-num,
.art-nav--crimson .art-nav-label,
.art-nav--crimson .art-pill,
.art-nav--crimson .art-pill-num {
  font-family: 'Crimson Pro', serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.art-nav--teal .art-nav-label,
.art-nav--amber .art-nav-label,
.art-nav--phosphor .art-nav-label,
.art-nav--emerald .art-nav-label,
.art-nav--crimson .art-nav-label {
  font-size: 10px;
  letter-spacing: 2.2px;
}

.art-nav--teal .art-pill:hover,
.art-nav--amber .art-pill:hover,
.art-nav--phosphor .art-pill:hover,
.art-nav--emerald .art-pill:hover,
.art-nav--crimson .art-pill:hover {
  background: var(--art-hover-bg, rgba(201, 162, 39, 0.06));
}

.art-nav-inner {
  max-width: var(--section-rail-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--section-rail-gutter, 1.25rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 48px;
}

.art-nav-inner::-webkit-scrollbar {
  display: none;
}

.art-nav-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--art-active, #f0d27a);
  white-space: nowrap;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

.art-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid var(--art-accent-mid, rgba(201, 162, 39, 0.42));
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.art-pill:hover {
  color: #fff;
  border-color: var(--art-accent, rgba(201, 162, 39, 0.65));
  background: var(--art-hover-bg, rgba(201, 162, 39, 0.1));
}

.art-pill.active {
  color: var(--art-active, #f0d27a);
  border-color: var(--art-accent, rgba(201, 162, 39, 0.7));
  background: var(--art-accent-bg, rgba(201, 162, 39, 0.14));
  font-weight: 600;
}

.art-pill-num {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  opacity: 1;
  color: var(--art-active, #f0d27a);
}

.art-pill.active .art-pill-num {
  color: var(--art-active, #f0d27a);
  opacity: 1;
}

@media (min-width: 640px) {
  .art-nav-inner {
    gap: 0.65rem;
  }
}

@media (min-width: 900px) {
  .art-nav-inner {
    gap: 0.75rem;
  }
}

/* Stack in-article progress nav below section art-nav */
.art-nav + .guide-nav-wrap {
  top: calc(var(--topbar-height) + 44px);
}

body.site-has-breadcrumb .art-nav {
  margin-top: 0.15rem;
}

/* In-article section nav — stick below fixed topbar + breadcrumb */
body.site-has-breadcrumb .guide-nav-wrap {
  top: var(--topbar-height);
}

body.site-has-breadcrumb .sec[id] {
  scroll-margin-top: calc(var(--topbar-height) + 52px);
}

.site-header .topbar-nav {
  display: none;
}

.site-header .topbar-link {
  font-family: 'Crimson Pro', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.site-header .topbar-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.site-header .topbar-link.active {
  color: var(--teal2);
}


.site-header .nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.site-header .nav-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Crimson Pro', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.site-header .nav-trigger:hover {
  color: rgba(255, 255, 255, 0.9);
}

.site-header .nav-trigger.active {
  color: var(--teal2);
}

.site-header .nav-caret {
  font-size: 9px;
  opacity: 0.6;
  transition: transform 0.25s ease;
  line-height: 1;
  margin-top: 1px;
}

.site-header .nav-item.open .nav-caret {
  transform: rotate(180deg);
}


.site-header .nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  min-width: 320px;
  width: max-content;
  max-width: calc(100vw - 2rem);
  background: #0c1d2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 920;
}

.site-header .nav-dropdown--wide {
  min-width: 420px;
}

.site-header .nav-dropdown--end {
  left: auto;
  right: 0;
  transform: translateY(-6px);
}

.site-header .nav-item.open .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.site-header .nav-item.open .nav-dropdown--end {
  transform: translateY(0);
}

.site-header .nav-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 6px;
  background: #0c1d2e;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.site-header .nav-dropdown--end::before {
  left: auto;
  right: 1.5rem;
  transform: none;
}

.site-header .dd-overview {
  display: block;
  padding: 0.7rem 1.25rem;
  font-family: 'Crimson Pro', serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(232, 240, 248, 0.85);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color 0.18s, background 0.18s;
}

.site-header .dd-overview:hover,
.site-header .dd-overview.is-active {
  color: #7dd3e8;
  background: rgba(26, 155, 181, 0.08);
}

.site-header .dd-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.3rem 0.75rem;
}

.site-header .dd-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  text-decoration: none;
  transition: background 0.18s;
  white-space: nowrap;
}

.site-header .dd-link--counted {
  justify-content: space-between;
}

.site-header .dd-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.site-header .dd-link.is-active {
  background: rgba(26, 155, 181, 0.12);
  box-shadow: inset 3px 0 0 var(--teal);
}

.site-header .dd-link.is-active .dd-title {
  color: var(--teal2);
  font-weight: 500;
}

.site-header .dd-link.is-active .dd-pillar {
  color: var(--teal);
  opacity: 1;
}

.site-header .dd-link-left {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.site-header .dd-pillar {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header .dd-title {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(232, 240, 248, 0.72);
  line-height: 1.3;
  transition: color 0.18s;
  white-space: nowrap;
}

.site-header .dd-link:hover .dd-title {
  color: #fff;
}

.site-header .dd-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--teal2);
  opacity: 0.85;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 0.75rem;
  flex-shrink: 0;
}

.site-header .dd-link:hover .dd-count,
.site-header .dd-link.is-active .dd-count {
  color: var(--teal2);
  opacity: 1;
}

/* Pillar colours */
.site-header .dd-link.p-animal .dd-pillar { color: rgba(168, 212, 240, 0.65); }
.site-header .dd-link.p-physics .dd-pillar { color: rgba(196, 181, 253, 0.65); }
.site-header .dd-link.p-system .dd-pillar { color: rgba(125, 232, 184, 0.65); }
.site-header .dd-link.p-record .dd-pillar { color: rgba(245, 208, 128, 0.65); }
.site-header .dd-link.p-encounter .dd-pillar { color: rgba(74, 184, 255, 0.65); }
.site-header .dd-link.p-science .dd-pillar { color: rgba(240, 210, 122, 0.7); }
.site-header .dd-link.p-explainer .dd-pillar { color: rgba(168, 212, 240, 0.7); }
.site-header .dd-link.p-guide .dd-pillar { color: rgba(95, 212, 176, 0.7); }
.site-header .dd-link.p-ops .dd-pillar { color: rgba(125, 211, 232, 0.7); }
.site-header .dd-link.p-live .dd-pillar { color: rgba(232, 184, 106, 0.7); }
.site-header .dd-link.p-trip .dd-pillar { color: rgba(126, 236, 208, 0.7); }
.site-header .dd-link.p-gap .dd-pillar { color: rgba(232, 133, 125, 0.75); }
.site-header .dd-link.p-profile .dd-pillar { color: rgba(168, 200, 224, 0.75); }
.site-header .dd-link.p-claims .dd-pillar { color: rgba(232, 184, 106, 0.75); }
.site-header .dd-link.p-enc .dd-pillar { color: rgba(126, 236, 208, 0.75); }
.site-header .dd-link.p-und .dd-pillar { color: rgba(168, 212, 240, 0.75); }


.site-header .ham-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.site-header .ham-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-header .ham-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

.site-header .ham-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header .ham-btn.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.site-header .ham-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


.site-header .nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 910;
  pointer-events: none;
  transition: background 0.35s ease;
}

.site-header .nav-overlay.open {
  background: rgba(0, 0, 0, 0.55);
  pointer-events: all;
}

.site-header .nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 92vw);
  background: #fff;
  z-index: 920;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

.site-header .nav-drawer.open {
  transform: translateX(0);
}

.site-header .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.site-header .drawer-logo {
  font-family: 'Crimson Pro', serif;
  font-size: 22px;
  font-weight: 400;
  color: #08182e;
  text-decoration: none;
  letter-spacing: -0.2px;
}

.site-header .drawer-logo span {
  color: var(--teal);
  font-style: italic;
}

.site-header .drawer-close {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: rgba(8, 24, 46, 0.35);
  transition: all 0.2s;
  font-size: 22px;
  line-height: 1;
}

.site-header .drawer-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #08182e;
}

.site-header .drawer-nav {
  padding: 1rem 0;
  flex: 1;
}

.site-header .drawer-link {
  display: block;
  padding: 0.85rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(8, 24, 46, 0.55);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.site-header .drawer-link:hover {
  color: #08182e;
  background: rgba(0, 0, 0, 0.03);
  border-left-color: var(--teal);
}

.site-header .drawer-link.active {
  color: var(--teal);
  border-left-color: var(--teal);
  background: rgba(26, 155, 181, 0.05);
}

/* Drawer accordions */
.site-header .drawer-group {
  border-left: 2px solid transparent;
}

.site-header .drawer-group.open {
  border-left-color: var(--teal);
}

.site-header .drawer-group.drawer-group--active-sub .drawer-group-trigger {
  color: var(--teal);
  font-weight: 600;
}

.site-header .drawer-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 16px;
  font-weight: 500;
  color: rgba(8, 24, 46, 0.55);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s, background 0.2s;
}

.site-header .drawer-group-trigger:hover {
  color: #08182e;
  background: rgba(0, 0, 0, 0.03);
}

.site-header .drawer-group.open .drawer-group-trigger {
  color: var(--teal);
  background: rgba(26, 155, 181, 0.05);
}

.site-header .drawer-group-caret {
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.25s ease;
}

.site-header .drawer-group.open .drawer-group-caret {
  transform: rotate(180deg);
}

.site-header .drawer-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header .drawer-group.open .drawer-sub {
  max-height: 900px;
}

.site-header .drawer-sub-link {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.6rem 1.5rem 0.6rem 2.25rem;
  font-size: 14px;
  font-weight: 400;
  color: rgba(8, 24, 46, 0.45);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
}

.site-header .drawer-sub-link:hover {
  color: var(--teal);
  background: rgba(26, 155, 181, 0.04);
}

.site-header .drawer-sub-link.active-sub {
  color: var(--teal);
  font-weight: 600;
  background: rgba(26, 155, 181, 0.08);
  box-shadow: inset 3px 0 0 var(--teal);
}

.site-header .drawer-sub-link.active-sub .drawer-sub-pillar {
  color: var(--teal);
  opacity: 1;
}

.site-header .drawer-sub-overview {
  font-weight: 600;
  color: rgba(8, 24, 46, 0.6);
}

.site-header .drawer-sub-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0.25rem 1.5rem 0.25rem 2.25rem;
}

.site-header .drawer-sub-pillar {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  display: block;
  width: 100%;
  margin-bottom: 1px;
  flex-basis: 100%;
}

.site-header .drawer-sub-name {
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(8, 24, 46, 0.5);
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0.5rem;
}

.site-header .drawer-sub-link:hover .drawer-sub-name,
.site-header .drawer-sub-link.active-sub .drawer-sub-name {
  color: var(--teal);
}

.site-header .drawer-sub-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: var(--teal);
  opacity: 0.9;
  margin-left: auto;
  padding-left: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: baseline;
}

.site-header .drawer-sub-link:hover .drawer-sub-count,
.site-header .drawer-sub-link.active-sub .drawer-sub-count {
  color: var(--teal);
  opacity: 1;
}

.site-header .p-animal .drawer-sub-pillar { color: rgba(42, 127, 196, 0.6); }
.site-header .p-physics .drawer-sub-pillar { color: rgba(142, 68, 173, 0.6); }
.site-header .p-system .drawer-sub-pillar { color: rgba(45, 184, 122, 0.6); }
.site-header .p-record .drawer-sub-pillar { color: rgba(232, 160, 32, 0.6); }
.site-header .p-encounter .drawer-sub-pillar { color: rgba(74, 184, 255, 0.6); }
.site-header .p-science .drawer-sub-pillar { color: rgba(201, 162, 39, 0.7); }
.site-header .p-explainer .drawer-sub-pillar { color: rgba(42, 127, 196, 0.7); }
.site-header .p-guide .drawer-sub-pillar { color: rgba(14, 140, 107, 0.7); }
.site-header .p-ops .drawer-sub-pillar { color: rgba(26, 155, 181, 0.65); }
.site-header .p-live .drawer-sub-pillar { color: rgba(201, 147, 42, 0.7); }
.site-header .p-trip .drawer-sub-pillar { color: rgba(14, 140, 107, 0.7); }
.site-header .p-gap .drawer-sub-pillar { color: rgba(192, 57, 43, 0.65); }
.site-header .p-profile .drawer-sub-pillar { color: rgba(74, 127, 160, 0.7); }
.site-header .p-claims .drawer-sub-pillar { color: rgba(201, 147, 42, 0.7); }
.site-header .p-enc .drawer-sub-pillar { color: rgba(14, 140, 107, 0.75); }
.site-header .p-und .drawer-sub-pillar { color: rgba(42, 127, 196, 0.75); }

.site-header .drawer-dan {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: auto;
  flex-shrink: 0;
}

.site-header .drawer-dan a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
}

.site-header .drawer-dan a:hover {
  text-decoration: underline;
}


@media (min-width: 640px) {
  .site-header .topbar {
    padding: 0 2rem;
  }

  .site-header .logo {
    font-size: 24px;
  }

  .site-header .logo-badge {
    font-size: 7.5px;
    padding: 2px 8px;
  }
}

@media (min-width: 900px) {
  .site-header .topbar {
    padding: 0 2.5rem;
  }

  .site-header .logo {
    font-size: 26px;
  }

  .site-header .logo-badge {
    font-size: 8px;
    padding: 3px 9px;
  }

  .site-header .topbar-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }

  .site-header .ham-btn {
    display: none;
  }

  /* Sub-section routes: drawer menu on desktop too */
  .site-header.site-header--drawer-nav .topbar-nav {
    display: none !important;
  }

  .site-header.site-header--drawer-nav .ham-btn {
    display: flex !important;
  }
}

@media (max-width: 899px) {
  .site-header .ham-btn {
    display: flex;
  }
}

/* Series / profile numbers — global visibility (loads after per-page CSS) */
.hero .hero-ghost-num {
  color: rgba(255, 255, 255, 0.12);
}

.guide-card .gc-ghost,
.gap-card .gc-ghost,
.gap-card-ghost,
.featured-left-ghost,
.q-ghost {
  color: rgba(255, 255, 255, 0.11);
}

/* Hub category cards — numbered navigation + readable metadata */
.cat-card .cat-ghost {
  position: absolute;
  top: 0.75rem;
  right: 1.25rem;
  font-family: 'Crimson Pro', serif;
  font-size: clamp(4rem, 9vw, 6rem);
  font-weight: 200;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -4px;
  z-index: 1;
  color: color-mix(in srgb, var(--cat-accent2, var(--card-accent2, #7dd3e8)) 24%, transparent);
}

.cat-card.gap .cat-ghost,
.cat-card.profile .cat-ghost,
.cat-card.claims .cat-ghost {
  top: auto;
  bottom: 1rem;
  right: 1.5rem;
  font-size: clamp(3.5rem, 8vw, 5rem);
}

.cat-card .cat-index {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--cat-accent2, var(--card-accent2, rgba(125, 211, 232, 0.92)));
  margin-bottom: 1rem;
}

.cat-card .cat-eyebrow {
  color: var(--cat-accent2, var(--card-accent2, rgba(125, 211, 232, 0.9)));
}

.cat-card .cat-num {
  color: var(--cat-accent2, var(--card-accent2, rgba(232, 240, 248, 0.88)));
}

.cat-card .cat-tag {
  color: color-mix(in srgb, var(--cat-accent2, var(--card-accent2, #e8f0f8)) 70%, #e8f0f8);
}

.cat-card .cat-arrow {
  opacity: 0.88;
  color: var(--cat-accent2, var(--card-accent2, rgba(125, 211, 232, 0.92)));
}

.cat-card .cat-count-label {
  color: rgba(232, 240, 248, 0.82);
}

.cat-card:hover .cat-arrow {
  opacity: 1;
}

/* Article hub cards — index numbers + panel metadata */
.article-card .ac-index {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-family: 'Crimson Pro', serif;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -3px;
  user-select: none;
  pointer-events: none;
  z-index: 0;
  color: color-mix(in srgb, var(--ac-accent2, rgba(255, 255, 255, 0.8)) 22%, transparent);
}

.article-card .ac-pillar-tag {
  color: color-mix(in srgb, var(--ac-accent2, #e8f0f8) 90%, transparent);
}

.article-card .ac-subtitle {
  color: color-mix(in srgb, var(--ac-accent2, #e8f0f8) 68%, transparent);
}

.location-callout-ghost {
  color: rgba(255, 255, 255, 0.09);
}

.location-callout-ghost.solomons {
  color: rgba(125, 211, 232, 0.12);
}

.location-callout-ghost.cozumel {
  color: rgba(192, 57, 43, 0.14);
}

.guardian-box-ghost {
  color: rgba(168, 212, 240, 0.12);
}

.threshold-box-ghost {
  color: rgba(196, 181, 253, 0.12);
}

.guide-card .gc-num {
  font-weight: 600;
}

.gap-card .gc-num {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.gap-card-num {
  font-weight: 600;
}

.guides-sec .guide-card .gc-num {
  font-weight: 600;
}

/* In-hero / legacy page breadcrumbs — brighter trail site-wide */
.breadcrumb a,
.breadcrumb .bc-link {
  color: rgba(157, 228, 244, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover,
.breadcrumb .bc-link:hover {
  color: #fff;
}

.breadcrumb-sep,
.breadcrumb .bc-sep,
.bc-sep {
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  line-height: 1;
}

.breadcrumb-current,
.breadcrumb .bc-current,
.bc-current {
  font-weight: 600;
}

.hero-breadcrumb .breadcrumb-trail {
  font-size: 14px;
}

/* Deep Brief article hero — readable metadata over photography */
.deep-brief-article .guide-hero .hero-overlay {
  background:
    linear-gradient(
      to right,
      rgba(7, 18, 30, 0.65) 0%,
      rgba(7, 18, 30, 0.34) 38%,
      rgba(7, 18, 30, 0.12) 62%,
      rgba(7, 18, 30, 0.04) 82%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      rgba(7, 18, 30, 0.24) 0%,
      rgba(7, 18, 30, 0.1) 28%,
      rgba(7, 18, 30, 0.4) 58%,
      rgba(7, 18, 30, 0.9) 80%,
      rgba(7, 18, 30, 0.97) 100%
    );
}

.deep-brief-article .guide-hero .hero-sub {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

.deep-brief-article .guide-hero .hero-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.92),
    0 2px 18px rgba(0, 0, 0, 0.78);
}

.deep-brief-article .guide-hero .hero-edition {
  font-weight: 600;
  gap: 0.55rem;
}

.deep-brief-article .guide-hero .hero-edition > span:not(.hero-edition-pill) {
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.88),
    0 2px 14px rgba(0, 0, 0, 0.72);
}

.deep-brief-article .guide-hero .hero-edition-pill {
  background: rgba(7, 18, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.97);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  padding: 4px 13px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.deep-brief-article .guide-hero .hero-edition-season {
  background: rgba(7, 18, 30, 0.76);
  border-color: rgba(255, 255, 255, 0.34);
  color: rgba(232, 240, 248, 0.96);
}

.deep-brief-article .guide-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  font-size: clamp(1rem, 3.2vw, 1.28rem);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 2px 16px rgba(0, 0, 0, 0.72);
}

/* Platform-wide back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--circle-arrow-border, rgba(14, 107, 140, 0.28));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--circle-arrow-teal, #0e6b8c);
  box-shadow: 0 4px 18px rgba(7, 18, 30, 0.14);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s, border-color 0.2s, color 0.2s;
}
.back-to-top svg {
  width: 13px;
  height: 13px;
  display: block;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #fff;
  border-color: rgba(14, 107, 140, 0.45);
  color: var(--circle-arrow-teal-hover, #0a5a75);
}
.back-to-top:focus-visible {
  outline: 2px solid rgba(14, 107, 140, 0.55);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: none;
  }
}
