/* 2026-08-13 — Approved navigation A, shared by every public page.
   Spacious framed composition, larger wordmark and clearer touch targets. */

html body[data-page] .home-topbar,
html body[data-page="draw"].home-landing-state.site-interaction-v2 .home-landing > .home-topbar,
html body[data-page="draw"].site-interaction-v2:not(.home-landing-state) .home-topbar {
  box-sizing: border-box !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  z-index: 30 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: clamp(28px, 3vw, 64px) !important;
  width: calc(100% - 24px) !important;
  max-width: none !important;
  min-height: 100px !important;
  height: 100px !important;
  margin: 10px auto 0 !important;
  padding: 0 clamp(28px, 3.2vw, 58px) !important;
  overflow: visible !important;
  border: 1px solid rgba(218, 157, 51, .7) !important;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(246, 204, 99, .08), transparent 25rem),
    linear-gradient(90deg, rgba(1, 8, 7, .985), rgba(6, 17, 12, .955) 50%, rgba(1, 8, 7, .985)) !important;
  box-shadow:
    inset 0 0 0 7px rgba(234, 190, 85, .035),
    inset 0 -1px 0 rgba(244, 199, 96, .12),
    0 10px 30px rgba(0, 0, 0, .28) !important;
}

html body[data-page] .home-topbar::before,
html body[data-page="draw"].home-landing-state.site-interaction-v2 .home-landing > .home-topbar::before,
html body[data-page="draw"].site-interaction-v2:not(.home-landing-state) .home-topbar::before {
  content: "" !important;
  position: absolute !important;
  inset: 7px !important;
  z-index: 0 !important;
  display: block !important;
  pointer-events: none !important;
  border: 1px solid rgba(230, 174, 65, .24) !important;
  background:
    linear-gradient(90deg, rgba(222, 157, 55, .72), rgba(222, 157, 55, .1), transparent 31%, transparent 69%, rgba(222, 157, 55, .1), rgba(222, 157, 55, .72)) top / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(222, 157, 55, .72), rgba(222, 157, 55, .1), transparent 31%, transparent 69%, rgba(222, 157, 55, .1), rgba(222, 157, 55, .72)) bottom / 100% 1px no-repeat !important;
}

html body[data-page] .home-topbar::after,
html body[data-page="draw"].home-landing-state.site-interaction-v2 .home-landing > .home-topbar::after,
html body[data-page="draw"].site-interaction-v2:not(.home-landing-state) .home-topbar::after {
  content: "" !important;
  position: absolute !important;
  right: auto !important;
  bottom: -4px !important;
  left: 50% !important;
  display: block !important;
  width: 6px !important;
  height: 6px !important;
  opacity: 1 !important;
  border: 0 solid transparent !important;
  border-radius: 50% !important;
  background: #f2c86c !important;
  box-shadow: 0 0 13px rgba(242, 200, 108, .65) !important;
  filter: none !important;
  transform: translateX(-50%) !important;
}

html body[data-page] .home-topbar .home-brand,
html body[data-page] .home-topbar .home-nav {
  position: relative !important;
  z-index: 1 !important;
}

html body[data-page] .home-topbar .home-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 64px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 8px .08em !important;
  border: 0 !important;
  color: rgba(255, 221, 139, .97) !important;
  background: transparent !important;
  box-shadow: none !important;
  font: 600 clamp(2.1rem, 3vw, 3rem) / 1 "Songti SC", "STSong", "Noto Serif SC", serif !important;
  letter-spacing: .15em !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  text-shadow: 0 0 14px rgba(246, 201, 93, .3), 0 2px 5px rgba(0, 0, 0, .5) !important;
}

html body[data-page] .home-topbar .home-brand::before,
html body[data-page] .home-topbar .home-brand::after {
  content: none !important;
  display: none !important;
}

html body[data-page] .home-topbar .home-nav {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: stretch !important;
  justify-content: flex-end !important;
  width: auto !important;
  min-height: 62px !important;
  height: 62px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: clamp(28px, 3.2vw, 62px) !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body[data-page] .home-topbar .home-nav-link,
html body[data-page] .home-topbar .home-nav .hero-contact-link {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: auto !important;
  min-height: 62px !important;
  height: 62px !important;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: rgba(248, 234, 203, .68) !important;
  background: transparent !important;
  box-shadow: none !important;
  font: 700 clamp(1.08rem, 1.35vw, 1.36rem) / 1 "Songti SC", "STSong", "Noto Serif SC", serif !important;
  letter-spacing: .02em !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

html body[data-page] .home-topbar .home-nav-link + .home-nav-link {
  box-shadow: none !important;
}

html body[data-page] .home-topbar .home-nav-link::before {
  content: none !important;
  display: none !important;
}

html body[data-page] .home-topbar .home-nav-link::after {
  content: "" !important;
  position: absolute !important;
  right: 50% !important;
  bottom: 10px !important;
  left: 50% !important;
  display: block !important;
  width: auto !important;
  height: 1px !important;
  opacity: 1 !important;
  background: linear-gradient(90deg, transparent, #f4cb68 42%, #76bbaa 75%, transparent) !important;
  box-shadow: 0 0 12px rgba(242, 200, 108, .42) !important;
  transform: none !important;
  transition: right 180ms ease, left 180ms ease !important;
}

html body[data-page] .home-topbar .home-nav-link:hover,
html body[data-page] .home-topbar .home-nav-link:focus-visible,
html body[data-page] .home-topbar .home-nav-link.is-active,
html body[data-page] .home-topbar .home-nav-link[aria-current="page"] {
  color: rgba(255, 222, 132, .98) !important;
}

html body[data-page] .home-topbar .home-nav-link:hover::after,
html body[data-page] .home-topbar .home-nav-link:focus-visible::after,
html body[data-page] .home-topbar .home-nav-link.is-active::after,
html body[data-page] .home-topbar .home-nav-link[aria-current="page"]::after {
  right: 20% !important;
  left: 20% !important;
}

/* Compact-header state is driven by JavaScript as well as media queries.
   This keeps the table header safe in embedded/mobile browsers whose layout
   viewport is wider than the visible window. */
html body[data-page].is-compact-header .home-topbar,
html body[data-page="draw"].is-compact-header:not(.home-landing-state) .home-topbar {
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: calc(100% - 16px) !important;
  min-height: 118px !important;
  height: 118px !important;
  margin: 8px auto 0 !important;
  padding: 7px 8px 8px !important;
  gap: 4px !important;
  overflow: hidden !important;
}

html body[data-page].is-compact-header .home-topbar::after {
  content: none !important;
  display: none !important;
}

html body[data-page].is-compact-header .home-topbar .home-brand {
  justify-content: center !important;
  width: 100% !important;
  min-height: 54px !important;
  height: 54px !important;
  padding: 0 8px .1em !important;
  font-size: clamp(2rem, 5.2vw, 2.55rem) !important;
  line-height: 1 !important;
  letter-spacing: .13em !important;
}

html body[data-page].is-compact-header .home-topbar .home-nav,
html body[data-page="draw"].is-compact-header:not(.home-landing-state) .home-topbar .home-nav {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-height: 46px !important;
  height: 46px !important;
  margin: 0 -3px !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(221, 164, 59, .28) !important;
}

html body[data-page].is-compact-header .home-topbar .home-nav-link,
html body[data-page].is-compact-header .home-topbar .home-nav .hero-contact-link {
  grid-column: auto !important;
  grid-row: auto !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 46px !important;
  height: 46px !important;
  padding: 0 2px !important;
  font-size: clamp(.95rem, 2.25vw, 1.12rem) !important;
  line-height: 1 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/*
  Phone browsers do not all expose the same CSS viewport. Some Android and
  in-app browsers report a width well above 760px even though the page is
  shown in a narrow portrait window. Keep the approved A composition across
  the entire compact range so the wordmark and four links never get squeezed
  into one line.
*/
@media (max-width: 1080px), (orientation: portrait) and (max-width: 1366px) {
  html body[data-page="meanings"] .app-shell {
    padding-top: 0 !important;
  }

  html body[data-page] .home-topbar,
  html body.home-landing-state .home-landing > .home-topbar,
  html body[data-page="draw"].home-landing-state.site-interaction-v2 .home-landing > .home-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: calc(100% - 16px) !important;
    min-height: 118px !important;
    height: 118px !important;
    margin: 8px auto 0 !important;
    padding: 7px 8px 8px !important;
    gap: 4px !important;
    overflow: hidden !important;
    border: 1px solid rgba(218, 157, 51, .7) !important;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(248, 211, 112, .08), transparent 48%),
      linear-gradient(90deg, rgba(2, 9, 7, .99), rgba(8, 18, 13, .95) 50%, rgba(2, 9, 7, .99)) !important;
    box-shadow: inset 0 0 0 5px rgba(234, 190, 85, .025), 0 7px 18px rgba(0, 0, 0, .24) !important;
  }

  html body[data-page] .home-topbar::before {
    inset: 5px !important;
    display: block !important;
    border-color: rgba(230, 174, 65, .24) !important;
  }

  html body[data-page] .home-topbar::after {
    content: none !important;
    display: none !important;
  }

  html body[data-page] .home-topbar .home-brand {
    justify-content: center !important;
    width: 100% !important;
    min-height: 54px !important;
    height: 54px !important;
    padding: 0 8px .1em !important;
    font-size: clamp(2rem, 5.2vw, 2.55rem) !important;
    line-height: 1 !important;
    letter-spacing: .13em !important;
  }

  html body[data-page] .home-topbar .home-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    margin: 0 auto !important;
    gap: 0 !important;
    overflow: hidden !important;
    border-top: 1px solid rgba(221, 164, 59, .28) !important;
  }

  html body[data-page] .home-topbar .home-nav-link,
  html body[data-page] .home-topbar .home-nav .hero-contact-link {
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 2px !important;
    font-size: clamp(.95rem, 2.25vw, 1.12rem) !important;
    line-height: 1 !important;
  }

  html body[data-page] .home-topbar .home-nav-link + .home-nav-link {
    box-shadow: -1px 0 0 rgba(218, 160, 56, .3) !important;
  }

  html body[data-page] .home-topbar .home-nav-link::after {
    bottom: 5px !important;
  }

  /* The table page keeps an older, more-specific compact header rule after
     leaving the landing state. Reassert the shared A header at equal/higher
     specificity so its navigation row is never clipped. */
  html body[data-page="draw"]:not(.home-landing-state) .home-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: calc(100% - 16px) !important;
    min-height: 118px !important;
    height: 118px !important;
    margin: 8px auto 0 !important;
    padding: 7px 8px 8px !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  /*
    The entered table header still lives inside `.app-shell` / `.home-landing`.
    On phones those wrappers add 8px on both sides, while the other public
    pages place the shared header directly on the viewport rail. Let this
    header fill its already-inset wrapper instead of adding a second 8px
    margin, without changing the table content padding.
  */
  @media (max-width: 820px) {
    html body[data-page="draw"]:not(.home-landing-state) .home-topbar,
    html body[data-page="draw"].is-compact-header:not(.home-landing-state) .home-topbar {
      width: 100% !important;
      margin-right: 0 !important;
      margin-left: 0 !important;
    }
  }

  html body[data-page="draw"]:not(.home-landing-state) .home-topbar::after {
    content: none !important;
    display: none !important;
  }

  html body[data-page="draw"]:not(.home-landing-state) .home-topbar .home-brand {
    justify-content: center !important;
    width: 100% !important;
    min-height: 54px !important;
    height: 54px !important;
    padding: 0 8px .1em !important;
    font-size: clamp(2rem, 5.2vw, 2.55rem) !important;
    line-height: 1 !important;
    letter-spacing: .13em !important;
  }

  html body[data-page="draw"]:not(.home-landing-state) .home-topbar .home-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    gap: 0 !important;
    border-top: 1px solid rgba(221, 164, 59, .28) !important;
    overflow: hidden !important;
  }

  html body[data-page="draw"]:not(.home-landing-state) .home-topbar .home-nav-link,
  html body[data-page="draw"]:not(.home-landing-state) .home-topbar .home-nav .hero-contact-link {
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 2px !important;
    color: rgba(248, 234, 203, .72) !important;
    font-size: clamp(.95rem, 2.25vw, 1.12rem) !important;
    line-height: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html body[data-page="draw"]:not(.home-landing-state) .home-topbar .home-nav-link.is-active,
  html body[data-page="draw"]:not(.home-landing-state) .home-topbar .home-nav-link[aria-current="page"] {
    color: rgba(255, 222, 132, .98) !important;
  }
}

@media (max-width: 390px) {
  html body[data-page] .home-topbar .home-nav-link,
  html body[data-page] .home-topbar .home-nav .hero-contact-link {
    font-size: .93rem !important;
    letter-spacing: -.03em !important;
  }
}
