/* Shared two-row site nav layout — pair with /js/metis-site-nav.js (FMT-N25-nav) */

.metis-site-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
  /* Solid plate so reading text cannot show through while stuck */
  background: #f2e8d0;
  background-image: radial-gradient(ellipse 100% 80% at 50% 0%, #e8d4a8 0%, #f2e8d0 70%);
  pointer-events: auto;
  isolation: isolate;
  transition: transform 0.28s ease;
  will-change: transform;
}

/* FMT-N27-nav — reading pages: compact title, nav slides away on scroll down */
body > nav.unified-nav:not(.metis-site-nav-wrap nav) {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(242, 232, 208, 0.96);
  background-image: radial-gradient(ellipse 100% 80% at 50% 0%, #e8d4a8 0%, #f2e8d0 70%);
  transition: transform 0.28s ease;
  will-change: transform;
}

.metis-site-nav-wrap.is-nav-away,
body > nav.unified-nav.is-nav-away {
  transform: translateY(-100%);
  pointer-events: none;
}

header.metis-site-header h1 .sub,
body > header h1 .sub {
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
  max-height: 3rem;
}

body.is-chrome-compact > header,
body.is-chrome-compact header.metis-site-header {
  padding-top: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom-width: 1px;
}

body.is-chrome-compact > header::before,
body.is-chrome-compact > header::after,
body.is-chrome-compact header.metis-site-header::before,
body.is-chrome-compact header.metis-site-header::after {
  display: none;
}

body.is-chrome-compact > header h1,
body.is-chrome-compact header.metis-site-header h1 {
  font-size: clamp(0.82rem, 2.4vw, 1.05rem);
  letter-spacing: 0.12em;
}

body.is-chrome-compact > header h1 .sub,
body.is-chrome-compact header.metis-site-header h1 .sub {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .metis-site-nav-wrap,
  body > nav.unified-nav {
    transition: none;
  }
}

.unified-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  padding: 0.38rem 0.65rem 0.45rem;
  border-bottom: 1px solid rgba(196, 168, 120, 0.55);
  background: rgba(242, 232, 208, 0.92);
  position: relative;
  z-index: 10;
}

.unified-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.28rem;
  width: 100%;
}

.unified-nav-row-secondary {
  padding-top: 0.28rem;
  border-top: 1px solid rgba(196, 168, 120, 0.42);
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.unified-nav-row-secondary a,
.unified-nav-row-secondary .nav-user-label {
  font-size: 0.48rem !important;
  letter-spacing: 0.14em !important;
  padding: 0.26rem 0.48rem !important;
  pointer-events: auto;
  position: relative;
  z-index: 4;
}

.nav-oracle-group {
  display: flex;
  align-items: center;
  gap: 0;
  /* No outer box — text-only oracle links, matching the rest of the nav */
  border: none;
  overflow: visible;
}

.unified-nav a,
.nav-user-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #7a6040;
  padding: 0.35rem 0.7rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.oracle-discipline-icon-wrap {
  display: none !important;
}

.oracle-discipline-icon {
  display: none !important;
}

.nav-admin-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(90, 48, 96, 0.45);
  overflow: hidden;
  background: rgba(90, 48, 96, 0.06);
}

.unified-nav a.nav-admin {
  color: #5a3060 !important;
  letter-spacing: 0.16em;
}

.unified-nav a.nav-admin:hover,
.unified-nav a.nav-admin.active {
  color: #2a1f0e !important;
  background: rgba(90, 48, 96, 0.14) !important;
}

.nav-admin-group a.nav-admin + a.nav-admin {
  border-left: 1px solid rgba(90, 48, 96, 0.35);
}

.unified-nav a:hover {
  color: #2a1f0e;
  background: rgba(196, 168, 120, 0.15);
}

.unified-nav a.active {
  color: #2a1f0e;
  background: rgba(196, 168, 120, 0.25);
}

.nav-tarot,
.nav-iching,
.nav-runes,
.nav-ogham {
  border-right: 1px solid rgba(196, 168, 120, 0.55);
}

.nav-sep {
  width: 1px;
  height: 14px;
  background: rgba(196, 168, 120, 0.55);
  margin: 0 0.35rem;
  display: inline-block;
  vertical-align: middle;
}

.nav-user-label {
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  cursor: default;
}

.nav-journal-tri,
.nav-journal-transcribe {
  color: #5a3060 !important;
}

.unified-nav-row-secondary a:hover,
.unified-nav-row-secondary a:focus-visible {
  color: #2a1f0e;
  background: rgba(90, 48, 96, 0.08);
}

.unified-nav-row-secondary a.active {
  color: #2a1f0e;
  background: rgba(90, 48, 96, 0.14);
}

.nav-journal-tri:hover,
.nav-journal-tri.active,
.nav-journal-transcribe:hover,
.nav-journal-transcribe.active {
  background: rgba(90, 48, 96, 0.08) !important;
  color: #5a3060 !important;
}

/* ── Herstory dropdown (lore / history / research) ── */
.nav-herstory {
  position: relative;
  display: inline-block;
}

.nav-herstory-summary {
  font-family: 'Cinzel', serif;
  font-size: 0.48rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a6040;
  padding: 0.26rem 0.48rem;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
  user-select: none;
  transition: background 0.2s, color 0.2s;
}

.nav-herstory-summary::-webkit-details-marker {
  display: none;
}

.nav-herstory-summary::after {
  content: '▾';
  margin-left: 0.32em;
  font-size: 0.85em;
  opacity: 0.7;
}

.nav-herstory[open] > .nav-herstory-summary::after {
  content: '▴';
}

.nav-herstory-summary:hover,
.nav-herstory[open] > .nav-herstory-summary,
.nav-herstory.active > .nav-herstory-summary {
  color: #2a1f0e;
  background: rgba(196, 168, 120, 0.2);
}

.nav-herstory-menu {
  position: absolute;
  top: calc(100% + 0.28rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.3rem 0;
  background: rgba(246, 238, 218, 0.99);
  border: 1px solid rgba(196, 168, 120, 0.6);
  box-shadow: 0 10px 26px rgba(42, 31, 14, 0.22);
  z-index: 60;
}

.unified-nav .nav-herstory-menu a {
  justify-content: flex-start;
  font-size: 0.48rem !important;
  letter-spacing: 0.14em !important;
  padding: 0.4rem 0.95rem !important;
  white-space: nowrap;
}

.unified-nav .nav-herstory-menu a:hover {
  background: rgba(196, 168, 120, 0.22);
}

@media (max-width: 640px) {
  .nav-herstory-menu {
    left: 0;
    transform: none;
  }
}

/* ── Night / celestial: same structure, dark palette ── */
.metis-site-nav-wrap--night,
body.metis-nav-night .metis-site-nav-wrap {
  background: #080b14;
  background-image: radial-gradient(ellipse 100% 80% at 50% 0%, #12182a 0%, #080b14 70%);
}

.metis-site-nav-wrap--night .unified-nav,
body.metis-nav-night .unified-nav {
  background: rgba(8, 11, 20, 0.94);
  border-bottom-color: #6b5638;
}

.metis-site-nav-wrap--night .unified-nav-row-secondary,
body.metis-nav-night .unified-nav-row-secondary {
  border-top-color: rgba(107, 86, 56, 0.65);
}

.metis-site-nav-wrap--night .nav-oracle-group,
body.metis-nav-night .nav-oracle-group {
  border: none;
}

.metis-site-nav-wrap--night .unified-nav a,
.metis-site-nav-wrap--night .nav-user-label,
body.metis-nav-night .unified-nav a,
body.metis-nav-night .nav-user-label {
  font-family: 'JetBrains Mono', 'Cinzel', monospace;
  color: #9a9484;
}

.metis-site-nav-wrap--night .unified-nav a:hover,
body.metis-nav-night .unified-nav a:hover {
  color: #f4f1e6;
  background: rgba(169, 131, 90, 0.12);
}

.metis-site-nav-wrap--night .unified-nav a.active,
body.metis-nav-night .unified-nav a.active {
  color: #f4f1e6;
  background: rgba(92, 117, 99, 0.25);
}

.metis-site-nav-wrap--night .nav-tarot,
.metis-site-nav-wrap--night .nav-iching,
.metis-site-nav-wrap--night .nav-runes,
body.metis-nav-night .nav-tarot,
body.metis-nav-night .nav-iching,
body.metis-nav-night .nav-runes {
  border-right-color: #6b5638;
}

.metis-site-nav-wrap--night .nav-sep,
body.metis-nav-night .nav-sep {
  background: #6b5638;
}

.metis-site-nav-wrap--night .nav-journal-tri,
body.metis-nav-night .nav-journal-tri {
  color: #a8c4b0 !important;
}

.metis-site-nav-wrap--night .nav-herstory-summary,
body.metis-nav-night .nav-herstory-summary {
  font-family: 'JetBrains Mono', 'Cinzel', monospace;
  color: #9a9484;
}

.metis-site-nav-wrap--night .nav-herstory-summary:hover,
.metis-site-nav-wrap--night .nav-herstory[open] > .nav-herstory-summary,
.metis-site-nav-wrap--night .nav-herstory.active > .nav-herstory-summary,
body.metis-nav-night .nav-herstory-summary:hover,
body.metis-nav-night .nav-herstory[open] > .nav-herstory-summary,
body.metis-nav-night .nav-herstory.active > .nav-herstory-summary {
  color: #f4f1e6;
  background: rgba(169, 131, 90, 0.14);
}

.metis-site-nav-wrap--night .nav-herstory-menu,
body.metis-nav-night .nav-herstory-menu {
  background: rgba(10, 13, 22, 0.98);
  border-color: #6b5638;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.metis-site-nav-wrap--night .unified-nav .nav-herstory-menu a:hover,
body.metis-nav-night .unified-nav .nav-herstory-menu a:hover {
  background: rgba(169, 131, 90, 0.16);
}

.metis-site-nav-wrap--night .nav-admin-group,
body.metis-nav-night .nav-admin-group {
  border-color: rgba(168, 196, 176, 0.45);
  background: rgba(168, 196, 176, 0.08);
}

.metis-site-nav-wrap--night .unified-nav a.nav-admin,
body.metis-nav-night .unified-nav a.nav-admin {
  color: #a8c4b0 !important;
}

.metis-site-nav-wrap--night .nav-admin-group a.nav-admin + a.nav-admin,
body.metis-nav-night .nav-admin-group a.nav-admin + a.nav-admin {
  border-left-color: rgba(168, 196, 176, 0.35);
}
