.site-nav {
  position: relative;
  z-index: 5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-nav-bar {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 12px;
}

.site-nav-compact {
  width: min(100%, var(--site-shell-width, 460px));
  margin: 0 auto 8px;
}

.site-nav-wide {
  width: min(1440px, calc(100% - 32px));
}

.site-nav-inline {
  display: flex;
  align-items: center;
  height: 42px;
  width: auto;
  margin: 0;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border, rgba(126, 156, 201, 0.18));
  border-radius: 22px;
  background: color-mix(in srgb, var(--panel, #ffffff) 88%, transparent);
  box-shadow: var(--shadow, 0 18px 45px rgba(24, 39, 75, 0.10));
  backdrop-filter: blur(14px);
}

.site-nav-inline .site-nav-inner {
  gap: 10px;
  align-items: center;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.site-nav-inline.site-nav-compact {
  width: auto;
  margin: 0;
}

.site-nav-inline.site-nav-compact .site-nav-inner {
  gap: 10px;
  align-items: center;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.site-nav-compact .site-nav-inner {
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--panel-soft, #efede8);
  box-shadow: none;
  backdrop-filter: none;
}

.site-nav-home {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border, #d9e1ec);
  border-radius: 999px;
  background: var(--panel-soft, #f8fbff);
  color: var(--text, var(--ink, #172033));
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-compact .site-nav-home {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: var(--text, #21202a);
  font-size: 14px;
  font-weight: 400;
}

.site-nav-inline .site-nav-home {
  display: none;
}

.site-nav-home.is-current {
  border-color: color-mix(in srgb, var(--accent, #315f9f) 45%, var(--border, #d9e1ec));
  background: var(--accent-soft, #e8f0fb);
  color: var(--accent, #315f9f);
}

.site-nav-compact .site-nav-home.is-current {
  background: var(--panel, #ffffff);
  color: var(--text, #21202a);
  box-shadow: 0 4px 12px rgba(33, 32, 42, 0.08);
}

.site-nav-field {
  display: grid;
  gap: 7px;
  min-width: min(100%, 360px);
}

.site-nav-compact .site-nav-field {
  gap: 0;
}

.site-nav-inline .site-nav-field {
  display: flex;
  align-items: center;
  height: 42px;
  min-height: 42px;
  line-height: 0;
  gap: 0;
  min-width: clamp(190px, 20vw, 260px);
}

.site-nav-label {
  color: var(--muted, #68758a);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav-compact .site-nav-label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-nav-inline .site-nav-label {
  display: none;
}

.site-nav-select {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--border, #d9e1ec);
  border-radius: 14px;
  background: var(--panel, #ffffff);
  color: var(--text, var(--ink, #172033));
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  outline: none;
  cursor: pointer;
}

.site-nav-compact .site-nav-select {
  height: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--panel, #ffffff);
  color: var(--text, #21202a);
  font-size: 14px;
  font-weight: 400;
  box-shadow: 0 4px 12px rgba(33, 32, 42, 0.08);
}

.site-nav-inline .site-nav-select {
  display: block;
  height: 42px;
  min-height: 42px;
  margin: 0;
  border-radius: 999px;
  font-size: 0.88rem;
  padding-inline: 14px 34px;
}

.hero-actions:has(.site-nav-inline) {
  display: flex;
  align-items: center;
  justify-content: end;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav-inline + .theme-toggle,
.hero-actions:has(.site-nav-inline) .theme-toggle {
  height: 42px;
  min-height: 42px;
  min-width: 96px;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.site-nav-select:focus {
  border-color: var(--accent, #315f9f);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, #315f9f) 16%, transparent);
}

.site-nav-compact .site-nav-select:focus {
  box-shadow: 0 0 0 3px rgba(23, 101, 216, 0.16);
}

@media (max-width: 640px) {
  .site-nav {
    width: min(100% - 20px, 1120px);
  }

  .site-nav-bar {
    margin-top: 12px;
  }

  .site-nav-inline {
    width: 100%;
  }

  .hero-actions:has(.site-nav-inline) {
    width: 100%;
    align-items: stretch;
  }

  .site-nav-inner,
  .site-nav-inline .site-nav-inner {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .site-nav-home {
    justify-content: center;
  }

  .site-nav-inline .site-nav-field {
    min-width: 0;
  }
}
