/* One shared header. Scoped values keep legacy page themes out of navigation. */
body:has(> .pcp-header) {
  margin: 0;
}

.pcp-header,
.pcp-header * {
  box-sizing: border-box;
}

.pcp-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(214, 222, 234, 0.9) !important;
  border-radius: 0;
  background: rgba(243, 246, 251, 0.96) !important;
  color: #111827 !important;
  font: 16px/1.5 Aptos, "Segoe UI", Arial, system-ui, sans-serif;
  text-align: left;
  letter-spacing: normal;
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.pcp-header .pcp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  padding: 0;
  gap: 20px;
}

.pcp-header .pcp-brand {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #111827;
  text-decoration: none;
}

.pcp-header .pcp-brand img {
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.pcp-header .pcp-brand-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pcp-header .pcp-brand-text strong {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.1;
}

.pcp-header .pcp-brand-text small {
  margin: 0;
  color: #586374;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.pcp-header .pcp-nav {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.pcp-header .pcp-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #1535a7;
  font: 800 16px/1.25 Aptos, "Segoe UI", Arial, system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}

.pcp-header .pcp-nav a:hover,
.pcp-header .pcp-nav a:focus-visible,
.pcp-header .pcp-nav a[aria-current] {
  border-color: #d6deea !important;
  background: #ffffff !important;
  color: #1535a7 !important;
}

.pcp-header a:focus-visible {
  outline: 3px solid #2457f5 !important;
  outline-offset: 3px;
}

/* Owner controls remain in their own toolbar below the shared navigation. */
.pcp-header + .app-header {
  position: static;
}

@media (max-width: 960px) {
  .pcp-header {
    position: static;
  }

  .pcp-header .pcp-header-inner {
    display: grid;
    gap: 12px;
    padding: 14px 0;
  }

  .pcp-header .pcp-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 100%;
  }

  .pcp-header .pcp-nav a {
    padding: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 620px) {
  .pcp-header .pcp-header-inner {
    width: calc(100% - 28px);
  }

  .pcp-header .pcp-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pcp-header .pcp-nav a:last-child {
    grid-column: 1 / -1;
  }
}
