:root {
  --aibix-radius-sm: 8px;
  --aibix-radius-md: 12px;
  --aibix-radius-lg: 20px;
  --aibix-radius-pill: 999px;
  --aibix-action-primary: var(--theme-primary);
  --aibix-action-primary-hover: var(--theme-primary-hover);
  --aibix-action-focus: var(--theme-focus-ring);
  --aibix-action-secondary-surface: var(--material-control-surface);
  --aibix-action-secondary-hover: var(--theme-accent-soft);
  --aibix-action-secondary-border: var(--theme-secondary-border);
  --aibix-action-secondary-text: var(--theme-secondary-text);
  --aibix-dialog-surface: var(--material-dialog-fallback);
  --aibix-dialog-surface-glass: var(--material-dialog-surface);
  --aibix-dialog-border: var(--material-dialog-border);
  --aibix-dialog-shadow: var(--material-dialog-shadow);
  --aibix-dialog-backdrop: var(--material-dialog-backdrop);
  --site-header-surface: var(--material-header-fallback);
  --site-header-surface-glass: var(--material-header-surface);
  --site-header-border: var(--material-header-border);
  --site-header-shadow: var(--material-header-shadow);
  --site-header-text: #1b1f22;
  --site-header-muted: rgba(45, 49, 52, 0.72);
  --site-header-primary: var(--theme-primary);
  --site-header-primary-hover: var(--theme-primary-hover);
  --site-header-secondary: var(--theme-secondary-header-text);
}

/* Shared site header surface for the homepage and editorial pages. */
.site-header-surface,
.practice-topbar {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--site-header-border);
  border-radius: var(--aibix-radius-lg);
  background: var(--site-header-surface);
  box-shadow: var(--site-header-shadow);
  color: var(--site-header-text);
  isolation: isolate;
  overflow: hidden;
}

.site-header-surface::before,
.practice-topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--material-highlight);
  box-shadow: var(--material-highlight-shadow);
  opacity: var(--material-highlight-opacity);
  pointer-events: none;
}

.site-header-surface > *,
.practice-topbar > * {
  position: relative;
  z-index: 1;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header-surface,
  .practice-topbar {
    background: var(--site-header-surface-glass);
    -webkit-backdrop-filter: var(--material-header-filter);
    backdrop-filter: var(--material-header-filter);
  }
}

.site-global-header {
  position: sticky;
  top: max(0.5rem, env(safe-area-inset-top));
  z-index: 10;
  align-self: center;
  width: min(100%, 94rem);
  margin-bottom: 0.55rem;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.practice-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

body.is-article-visible .site-global-header,
body:has(.product-lightbox.is-open) .site-global-header {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.is-article-visible #main {
  z-index: 20;
}

html {
  scroll-padding-top: 6.5rem;
}

#header {
  grid-template-areas:
    "content content";
}

#header > .hero-registry-badge {
  grid-row: 1;
}

.site-global-header .site-header-surface .logo,
.practice-topbar .practice-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--site-header-text);
  text-decoration: none;
}

.site-global-header .site-header-surface .logo {
  gap: 0.85rem;
  justify-self: auto;
}

.site-global-header .site-header-surface .logo img {
  width: 2.85rem;
  max-width: 2.85rem;
  max-height: 2.85rem;
  height: 2.85rem;
  filter: none;
}

.site-global-header .site-header-surface .logo .logo__wordmark {
  color: var(--site-header-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.practice-topbar .practice-brand__name {
  color: var(--site-header-text);
}

.practice-topbar .practice-brand__tagline {
  color: var(--site-header-muted);
}

.site-global-header .site-header-surface nav,
.practice-topbar .practice-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  width: auto;
  min-width: 0;
  justify-self: auto;
  align-self: center;
}

.site-global-header .site-header-surface nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.site-global-header .site-header-surface nav ul li {
  padding: 0;
  border: 0;
}

.site-global-header .site-header-surface nav ul li .header-nav__link,
.practice-topbar .practice-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.5rem;
  height: auto;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(36, 41, 45, 0.16);
  border-radius: var(--aibix-radius-pill);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none !important;
  color: #2c3134 !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-global-header .site-header-surface nav ul li .header-nav__link:hover,
.practice-topbar .practice-nav__link:hover {
  border-color: rgba(36, 41, 45, 0.32);
  background: rgba(255, 255, 255, 0.98);
  color: var(--site-header-text) !important;
}

.site-global-header .site-header-surface nav ul li .header-nav__link:focus-visible,
.practice-topbar .practice-nav__link:focus-visible,
.site-global-header .site-header-surface .logo:focus-visible,
.practice-topbar .practice-brand:focus-visible {
  outline: 3px solid var(--theme-focus-ring);
  outline-offset: 3px;
}

.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="trial_only"] {
  border-color: var(--site-header-primary);
  background: var(--site-header-primary);
  color: #ffffff !important;
}

.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="trial_only"]:hover,
.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="trial_only"]:focus-visible,
.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="trial_only"]:active {
  border-color: var(--site-header-primary-hover);
  background: var(--site-header-primary-hover);
  color: #ffffff !important;
}

.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="all"] {
  border-color: var(--theme-secondary-border);
  background: var(--theme-secondary-emphasis-surface);
  color: var(--site-header-secondary) !important;
}

.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="all"]:hover,
.site-global-header .site-header-surface nav ul li .header-nav__link[data-buy-entry-mode="all"]:focus-visible {
  border-color: var(--theme-secondary-border-hover);
  background: var(--theme-accent-soft);
  color: var(--theme-secondary-text) !important;
}

@media screen and (min-width: 1101px) and (max-width: 1400px) {
  .site-global-header .site-header-surface {
    gap: 0.8rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .site-global-header .site-header-surface nav ul {
    gap: 0.35rem;
  }

  .site-global-header .site-header-surface nav ul li .header-nav__link {
    padding-right: 0.62rem;
    padding-left: 0.62rem;
    font-size: 0.7rem;
  }
}

@media screen and (max-width: 1100px) {
  html {
    scroll-padding-top: 13rem;
  }

  #header {
    grid-template-areas:
      "registry"
      "content";
  }

  .site-global-header > .site-header-surface--home {
    flex-direction: column;
    align-items: stretch;
  }

  .site-global-header .site-header-surface .logo {
    align-self: flex-start;
    justify-content: flex-start;
  }

  .site-global-header .site-header-surface nav {
    width: 100%;
  }

  .site-global-header .site-header-surface nav ul {
    justify-content: flex-start;
  }
}

@media screen and (max-width: 980px) {
  .practice-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-topbar .practice-nav {
    justify-content: flex-start;
    width: 100%;
  }
}

@media screen and (max-width: 736px) {
  .site-header-surface,
  .practice-topbar {
    gap: 0.8rem;
    padding: 0.9rem;
    border-radius: var(--aibix-radius-lg);
  }

  .site-global-header .site-header-surface .logo img {
    width: 2.65rem;
    max-width: 2.65rem;
    max-height: 2.65rem;
    height: 2.65rem;
  }

  .site-global-header .site-header-surface nav ul li .header-nav__link,
  .practice-topbar .practice-nav__link {
    min-height: 2.5rem;
    padding: 0.52rem 0.8rem;
    font-size: 0.73rem;
  }
}

@media screen and (max-width: 480px), (hover: none) and (pointer: coarse) {
  html {
    scroll-padding-top: 23rem;
  }

  .site-global-header > .site-header-surface--home {
    min-height: 20.25rem;
  }

  .site-global-header .site-header-surface .logo {
    width: auto;
    max-width: 100%;
    padding: 0;
  }

  .site-global-header .site-header-surface .logo img {
    width: 2.65rem;
    max-width: 2.65rem;
    max-height: 2.65rem;
    height: 2.65rem;
    filter: none;
  }

  .site-global-header .site-header-surface .logo .logo__wordmark {
    color: var(--site-header-text);
    font-size: 1.2rem;
  }

  .site-global-header .site-header-surface nav {
    max-width: 100%;
  }

  .site-global-header .site-header-surface nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
  }

  .site-global-header .site-header-surface nav ul li,
  .site-global-header .site-header-surface nav ul li .header-nav__link {
    width: 100%;
  }

  .site-global-header .site-header-surface nav ul li .header-nav__link {
    min-height: 2.9rem;
    padding: 0.68rem 0.62rem;
    white-space: normal;
  }
}

@media screen and (max-width: 480px) {
  .site-global-header {
    margin-top: 1.5rem;
    margin-bottom: 1.15rem;
  }

  #header {
    padding-top: 0;
  }
}

@media screen and (max-width: 736px) {
  html {
    scroll-padding-top: 0;
  }

  .site-global-header,
  .practice-site-header {
    position: static;
    top: auto;
    z-index: auto;
  }
}
