/* Scoped navigation for the long guild decision chapter. */
.guild-case {
  --decision-header-height: 72px;
  --decision-nav-height: 56px;
}
.decision-nav {
  position: fixed;
  z-index: 90;
  inset: var(--decision-header-height) 0 auto;
  color: #e3e0eb;
  background: rgba(24, 22, 32, .64);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  backdrop-filter: blur(22px) saturate(120%);
  border-bottom: 1px solid #ffffff14;
}
.decision-nav[hidden] { display: none; }
.decision-nav__inner {
  position: relative;
  left: var(--decision-nav-center, 50%);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  min-height: var(--decision-nav-height);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}
.decision-nav__label {
  display: none;
  flex-shrink: 0;
  font-size: 11px;
  color: #e1dce9;
  letter-spacing: .08em;
}
.decision-nav__label span { margin-left: 18px; color: #635e71; }
.decision-nav__links { display: flex; align-items: center; gap: 8px; }
.decision-nav__links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 7px;
  color: #f2eff7;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.decision-nav__links a:hover { background: #ffffff0d; color: #fff; }
.decision-nav__links a[aria-current="location"] {
  color: #b8f5ed;
  background: #4de6e014;
  box-shadow: inset 0 -2px #4de6e0;
}
.decision-nav a:focus-visible,
.decision-nav button:focus-visible { outline: 2px solid #4de6e0; outline-offset: 2px; }
.decision-nav__toggle { display: none; }
/* Combined with the site's existing 100px root scroll padding. */
.guild-case #decisions :is(#decision-discovery, #decision-rules, #decision-goals,
  #coop-feedback, #ftue-learning, #motion-orchestration) {
  scroll-margin-top: calc(var(--decision-header-height) + var(--decision-nav-height) + 20px - 100px);
}
@media (max-width: 760px) {
  .guild-case { --decision-header-height: 66px; --decision-nav-height: 48px; }
  .decision-nav__inner {
    position: static;
    left: auto;
    transform: none;
    width: calc(100% - 32px);
    margin: 0 auto;
    gap: 12px;
  }
  .decision-nav__label { display: inline; }
  .decision-nav__label span { display: none; }
  .decision-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0 4px 0 12px;
    border: 0;
    background: transparent;
    color: #b8f5ed;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }
  .decision-nav__chevron { font-size: 19px; }
  .decision-nav__toggle[aria-expanded="true"] .decision-nav__chevron { transform: rotate(180deg); }
  .decision-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 16px 16px;
    max-height: calc(100dvh - var(--decision-header-height) - var(--decision-nav-height) - 16px);
    overflow-y: auto;
    background: rgba(24, 22, 32, .84);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    backdrop-filter: blur(22px) saturate(120%);
    border-bottom: 1px solid #ffffff26;
    box-shadow: 0 16px 24px #0003;
  }
  .decision-nav.is-open .decision-nav__links { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .decision-nav__links a { min-height: 44px; padding: 0 12px; }
}
/* Keep navigation readable if glass effects are unavailable or unwanted. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .decision-nav { background: rgba(24, 22, 32, .96); }
  @media (max-width: 760px) {
    .decision-nav__links { background: rgba(24, 22, 32, .96); }
  }
}
@media (prefers-reduced-transparency: reduce) {
  .decision-nav { background: #181620; -webkit-backdrop-filter: none; backdrop-filter: none; }
  @media (max-width: 760px) {
    .decision-nav__links { background: #181620; -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
}
