/* Local preview navigation: keep links usable when JavaScript is unavailable. */
.menu-toggle { display: none; }

@media (max-width: 900px) {
  html header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 18px;
  }

  .menu-toggle {
    display: none;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(245, 239, 230, .35);
    border-radius: 4px;
    background: rgba(18, 16, 14, .68);
    color: #f5efe6;
    font: 600 .9rem 'Bricolage Grotesque', sans-serif;
    cursor: pointer;
  }

  .menu-toggle::before {
    content: '';
    width: 16px;
    height: 12px;
    border-top: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
  }

  .menu-toggle:hover,
  .menu-toggle[aria-expanded='true'] {
    border-color: #ffb547;
    color: #ffcf85;
  }

  header #site-nav {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 4px 0;
    overflow: visible;
    border-top: 1px solid rgba(245, 239, 230, .16);
  }

  header #site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 4px;
    border-bottom: 1px solid rgba(245, 239, 230, .09);
    white-space: normal;
    font-size: .95rem;
  }

  html.nav-enhanced .menu-toggle { display: inline-flex; }
  html.nav-enhanced header #site-nav { display: none; }
  html.nav-enhanced header #site-nav.is-open { display: flex; }
}

@media (max-width: 400px) {
  html header { padding-inline: 16px; column-gap: 8px; }
  header .brand .mark { width: 26px; height: 33px; }
  header .brand-lanthorn { font-size: 22px; }
  header .brand-learning { font-size: 10px; }
  .menu-toggle { gap: 7px; padding-inline: 10px; }
}

/* A gentle invitation onward, shared by every page in the preview. */
nav.page-flow {
  display: block;
  width: 100%;
  padding: clamp(28px, 4vw, 54px) 0;
  background: #efe5d7;
  border-top: 1px solid rgba(39, 31, 23, .13);
}

.page-flow__inner {
  width: min(100% - 2 * clamp(24px, 5vw, 78px), 1240px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

nav.page-flow a.page-flow__previous {
  color: #5f5142;
  font-size: .9rem;
  text-decoration: none;
  padding: 12px 0;
}

nav.page-flow a.page-flow__previous:hover { color: #1a1612; text-decoration: underline; }

nav.page-flow a.page-flow__next {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
  padding: 15px 20px;
  color: #1a1612;
  background: #f9f4ec;
  border: 1px solid #d7c4aa;
  border-radius: 3px;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease;
}

nav.page-flow a.page-flow__next::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 200px 85px at 44px 50%, rgba(255, 181, 71, .22), rgba(255, 181, 71, .07) 55%, transparent 100%);
}

nav.page-flow a.page-flow__next:hover { color: #1a1612; border-color: #a57537; background: #fffaf2; }
nav.page-flow a:focus-visible { outline: 2px solid #8d5d21; outline-offset: 4px; }
.page-flow__next .section-lantern { width: 48px; height: 60px; color: #6e4b25; }
.page-flow__copy { display: flex; flex-direction: column; gap: 4px; }
.page-flow__eyebrow { color: #76542d; font: 500 .62rem 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
.page-flow__title { font-size: clamp(1rem, 1.4vw, 1.18rem); font-weight: 600; }
.page-flow__arrow { margin-left: 8px; color: #8c5d26; font-size: 1.25rem; }

@media (max-width: 600px) {
  .page-flow__inner { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  nav.page-flow a.page-flow__next { width: 100%; margin: 0; }
  .page-flow__next .section-lantern { width: 42px; height: 52px; }
  .page-flow__arrow { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  nav.page-flow a.page-flow__next { transition: none; }
}
