.ref-nav {
  --ref-background: 0 0% 98%;
  --ref-foreground: 210 100% 18%;
  --ref-card: 0 0% 100%;
  --ref-primary: 210 100% 22%;
  --ref-secondary: 25 100% 50%;
  --ref-muted: 210 30% 96%;
  --ref-muted-foreground: 210 20% 45%;
  --ref-border: 210 25% 88%;
  --ref-radius: 0.75rem;
  --ref-gradient-primary: linear-gradient(135deg, hsl(210 100% 22%), hsl(210 100% 15%));
  --ref-gradient-hero: linear-gradient(180deg, hsl(210 100% 15% / 0.95), hsl(210 100% 10% / 0.98));
  --ref-gradient-accent: linear-gradient(135deg, hsl(25 100% 50%), hsl(25 100% 40%));
  --ref-shadow-card: 0 4px 20px hsl(210 100% 25% / 0.08);
  --ref-shadow-glow: 0 0 40px hsl(25 100% 50% / 0.3);
  --ref-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: clip;
  min-height: 100vh;
  padding-bottom: 4rem;
  background: hsl(var(--ref-background));
  color: hsl(var(--ref-foreground));
}

.ref-nav__bg-shape {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.35;
}

.ref-nav__bg-shape--one {
  top: -120px;
  right: -120px;
  width: 340px;
  height: 340px;
  background: hsl(var(--ref-secondary));
}

.ref-nav__bg-shape--two {
  top: 140px;
  left: -150px;
  width: 320px;
  height: 320px;
  background: hsl(var(--ref-primary));
}

.ref-nav__header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid hsl(0 0% 100% / 0.16);
  background: var(--ref-gradient-primary);
  box-shadow: 0 10px 26px hsl(210 100% 12% / 0.25);
}

.ref-nav__header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ref-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.ref-nav__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: hsl(var(--ref-primary));
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ref-nav__brand-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.ref-nav__quick {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.ref-nav__quick a {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid hsl(0 0% 100% / 0.18);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: hsl(0 0% 100% / 0.9);
  transition: var(--ref-transition);
}

.ref-nav__quick a:hover,
.ref-nav__quick a.is-active {
  color: #fff;
  background: hsl(0 0% 100% / 0.18);
  box-shadow: none;
}

.ref-nav__mobile-toggle {
  display: none;
  border: 1px solid hsl(0 0% 100% / 0.2);
  border-radius: 999px;
  background: hsl(0 0% 100% / 0.14);
  color: #fff;
  font-weight: 700;
  padding: 0.56rem 1rem;
}

.ref-nav__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  padding-top: 1.2rem;
}

.ref-nav__sidebar {
  position: sticky;
  top: 102px;
  align-self: start;
  background: hsl(var(--ref-card));
  border: 1px solid hsl(var(--ref-border));
  border-radius: calc(var(--ref-radius) + 0.25rem);
  box-shadow: var(--ref-shadow-card);
  padding: 1.1rem;
}

.ref-nav__sidebar-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: hsl(var(--ref-secondary));
}

.ref-nav__sidebar-head h2 {
  margin: 0.2rem 0 0.9rem;
  font-size: 1.1rem;
  color: hsl(var(--ref-primary));
}

.ref-tree details {
  border-bottom: 1px solid hsl(var(--ref-border));
  padding: 0.42rem 0;
}

.ref-tree details:last-child {
  border-bottom: none;
}

.ref-tree summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 800;
  color: hsl(var(--ref-foreground));
  padding-right: 1.2rem;
}

.ref-tree summary::-webkit-details-marker {
  display: none;
}

.ref-tree summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: hsl(var(--ref-secondary));
}

.ref-tree details[open] summary::after {
  content: "-";
}

.ref-tree ul {
  margin: 0.55rem 0 0;
  padding-left: 0.95rem;
}

.ref-tree li {
  margin: 0.42rem 0;
}

.ref-tree a {
  color: hsl(var(--ref-muted-foreground));
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--ref-transition);
}

.ref-tree a:hover,
.ref-tree a.is-active {
  color: hsl(var(--ref-primary));
}

.ref-nav__content {
  display: grid;
  gap: 1rem;
}

.ref-hero,
.ref-card,
.ref-block,
.ref-timeline,
.ref-map {
  background: hsl(var(--ref-card));
  border: 1px solid hsl(var(--ref-border));
  border-radius: calc(var(--ref-radius) + 0.35rem);
  box-shadow: var(--ref-shadow-card);
}

.ref-hero {
  background: var(--ref-gradient-hero);
  color: #fff;
  padding: clamp(1.15rem, 2.4vw, 2rem);
}

.ref-hero__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 800;
  color: hsl(var(--ref-secondary));
}

.ref-hero h1 {
  margin: 0.42rem 0 0.62rem;
  font-size: clamp(1.55rem, 3.8vw, 2.45rem);
  line-height: 1.18;
}

.ref-hero__lead {
  margin: 0;
  max-width: 64ch;
  color: hsl(0 0% 100% / 0.86);
}

.ref-hero__cta-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ref-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.58rem 1rem;
  transition: var(--ref-transition);
}

.ref-hero__cta--primary {
  background: var(--ref-gradient-accent);
  color: #fff;
  box-shadow: var(--ref-shadow-glow);
}

.ref-hero__cta--ghost {
  background: transparent;
  border: 1px solid hsl(0 0% 100% / 0.32);
  color: #fff;
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.ref-card {
  padding: 1rem;
}

.ref-card__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
  color: hsl(var(--ref-secondary));
}

.ref-card h3 {
  margin: 0.45rem 0 0.5rem;
  font-size: 1.02rem;
  color: hsl(var(--ref-primary));
}

.ref-card p {
  margin: 0;
  color: hsl(var(--ref-muted-foreground));
}

.ref-block {
  padding: 1rem;
}

.ref-block h2,
.ref-map h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: hsl(var(--ref-primary));
}

.ref-block p {
  margin: 0;
  color: hsl(var(--ref-muted-foreground));
}

.ref-list-inline {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ref-list-inline li {
  border: 1px solid hsl(var(--ref-border));
  background: hsl(var(--ref-muted));
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: hsl(var(--ref-primary));
}

.ref-timeline {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ref-timeline__item {
  border: 1px solid hsl(var(--ref-border));
  border-radius: 0.85rem;
  padding: 0.8rem;
  background: hsl(var(--ref-muted));
}

.ref-timeline__item span {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: hsl(var(--ref-secondary));
}

.ref-timeline__item p {
  margin: 0;
  color: hsl(var(--ref-muted-foreground));
  font-weight: 600;
}

.ref-map {
  padding: 1rem;
}

.ref-map__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ref-map__grid article {
  border-radius: 0.9rem;
  background: var(--ref-gradient-primary);
  color: #fff;
  padding: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.ref-block--accent {
  background: linear-gradient(130deg, hsl(0 0% 100%), hsl(210 30% 97%));
  border-color: hsl(var(--ref-border));
}

.ref-inline-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 800;
  color: hsl(var(--ref-primary));
}

.ref-mobile {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.ref-mobile__backdrop {
  position: absolute;
  inset: 0;
  background: hsl(210 100% 10% / 0.52);
}

.ref-mobile__panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(88vw, 360px);
  padding: 1rem;
  overflow-y: auto;
  background: hsl(var(--ref-card));
  border-right: 1px solid hsl(var(--ref-border));
  box-shadow: 0 20px 40px hsl(210 100% 10% / 0.24);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
}

.ref-mobile.is-open .ref-mobile__panel {
  transform: translateX(0);
}

.ref-mobile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.ref-mobile__head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: hsl(var(--ref-primary));
}

.ref-mobile__close {
  border: 1px solid hsl(var(--ref-border));
  border-radius: 999px;
  background: hsl(var(--ref-muted));
  color: hsl(var(--ref-foreground));
  font-weight: 700;
  padding: 0.42rem 0.85rem;
}

.ref-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.ref-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .ref-nav__quick {
    display: none;
  }

  .ref-nav__mobile-toggle {
    display: inline-flex;
  }

  .ref-nav__layout {
    grid-template-columns: 1fr;
  }

  .ref-nav__sidebar {
    display: none;
  }

  .ref-grid,
  .ref-timeline,
  .ref-map__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ref-nav__brand-text {
    display: none;
  }

  .ref-nav__header-inner {
    min-height: 68px;
  }

  .ref-mobile__panel {
    width: min(94vw, 360px);
  }
}
