/* Shared site navigation used by every public page. */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-2);
}

.top .top-in {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  max-width: 1180px;
  margin-inline: auto;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--ground, #fff);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.top.open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.top.open .menu-btn span:nth-child(2) { opacity: 0; }
.top.open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.top nav.site-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .15rem;
  flex-wrap: nowrap;
  padding: .25rem;
  border-radius: 999px;
  background: var(--sky);
}

.site-menu .section-tabs { display: flex; align-items: center; gap: .15rem; }

.site-menu a,
.site-menu button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .5rem .72rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 .92rem/1.2 var(--display);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-menu a:hover,
.site-menu button:hover,
.site-menu a[aria-current="page"],
.site-menu button[aria-selected="true"] {
  background: var(--ground, #fff);
  color: var(--ink);
}

.site-menu a:focus-visible,
.site-menu button:focus-visible,
.menu-btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.site-menu a.cta,
.site-menu button[data-tab="start"] {
  background: var(--blue);
  color: var(--on-blue, #12293D);
}

.site-menu a.cta:hover,
.site-menu button[data-tab="start"]:hover {
  background: #1A5F8C;
  color: #fff;
}

@media (max-width: 960px) {
  .top .top-in { flex-wrap: nowrap; }
  .top .menu-btn { display: inline-flex; }
  .top nav.site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 31;
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: .65rem max(20px, env(safe-area-inset-right, 0px)) 1rem max(20px, env(safe-area-inset-left, 0px));
    border-radius: 0 0 18px 18px;
    border-bottom: 1px solid var(--line-2);
    background: var(--ground, #fff);
    box-shadow: 0 18px 40px -20px rgba(23, 50, 74, .35);
  }

  .top.open nav.site-menu { display: flex; animation: menu-in .18s ease both; }
  .site-menu .section-tabs { align-items: stretch; flex-direction: column; gap: .25rem; }
  .site-menu a,
  .site-menu button {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: .85rem 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
    text-align: left;
  }
  .site-menu a.cta,
  .site-menu button[data-tab="start"] {
    justify-content: center;
    margin-top: .3rem;
    text-align: center;
  }
}

@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .menu-btn span { transition: none; }
  .top.open nav.site-menu { animation: none; }
}
