/* Shared site header — same chrome as the SPA docs/home header. */
.site-header,
.site-header button,
.site-header a,
.site-header select {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-header .v1-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
}
.cadding-logo {
  display: block;
  object-fit: contain;
  filter: brightness(0);
}
.theme-dark .cadding-logo,
html.theme-dark .cadding-logo {
  filter: brightness(0) invert(1);
}

.site-header {
  position: relative;
  height: 68px;
  min-height: 68px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 28px;
  background: #fffdfa;
  border: 1px solid #eee5dd;
  border-radius: 20px;
  box-shadow: 0 4px 20px #55402a08;
  z-index: 40;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #392e2a;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  flex: none;
}
.site-brand .cadding-logo { width: 28px; height: 28px; }
.site-brand strong,
.site-brand > span { display: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.site-nav-workspace { display: contents; }
.site-nav-workspace[hidden] { display: none !important; }
.site-nav-button {
  border: 0;
  background: transparent;
  color: #716158;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.site-nav-button.active,
.site-nav-button:hover {
  background: #f5ebe5;
  color: #9B353A;
}

.site-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
}
.site-header-actions > :not(:first-child) {
  margin-left: 8px;
}
.site-header-actions > .site-avatar,
.site-header-actions > .account-button {
  margin-left: 3px;
  margin-right: 0;
}
.site-nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #eadfd6;
  border-radius: 12px;
  background: #fff;
  color: #4d3e35;
  cursor: pointer;
  flex: none;
}
.site-nav-toggle > span {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 99px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.site-header.nav-open .site-nav-toggle > span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.nav-open .site-nav-toggle > span:nth-child(2) { opacity: 0; }
.site-header.nav-open .site-nav-toggle > span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.site-theme {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid #eadfd6;
  border-radius: 12px;
  background: #fff;
  color: #4d3e35;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
  font-size: 0;
  line-height: 0;
}
.site-theme:hover { border-color: #d4b4b0; color: #9B353A; }

.site-cta,
.site-header .site-cta,
.site-header .primary-button.site-cta,
a.site-cta,
a.primary-button.site-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px;
  padding: 0 14px !important;
  border: 0;
  border-radius: 999px !important;
  background: #9B353A !important;
  border-color: #9B353A !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  /* Anchor CTA — kill UA / visited link underlines on every state. */
  text-decoration: none !important;
  text-decoration-line: none !important;
  cursor: pointer;
  box-shadow: none !important;
}
.site-cta:link,
.site-cta:visited,
.site-cta:active,
.site-cta:focus,
.site-cta:focus-visible,
.site-header .site-cta:link,
.site-header .site-cta:visited,
a.site-cta:link,
a.site-cta:visited,
a.site-cta:active,
a.site-cta:focus {
  color: #fff !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
}
.site-cta:hover,
.site-header .site-cta:hover,
a.site-cta:hover {
  background: #822C30 !important;
  border-color: #822C30 !important;
  color: #fff !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
}
.site-cta-full,
.site-cta-short {
  text-decoration: none !important;
  text-decoration-line: none !important;
}
.site-cta-short { display: none; }

.site-avatar,
.account-button {
  box-sizing: border-box !important;
  aspect-ratio: 1 / 1 !important;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  padding: 0 !important;
  margin: 0;
  border: 0;
  border-radius: 50% !important;
  background: #9B353A;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1 !important;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}
.site-avatar.is-default-avatar,
.account-button.is-default-avatar {
  background: #F3E6E0;
  color: #9B353A;
  border: 1px solid #eadfd6;
}
.site-avatar .avatar-glyph,
.account-button .avatar-glyph {
  width: 58%;
  height: 58%;
  display: block;
}
.site-avatar[hidden],
.account-button[hidden] { display: none !important; }
.site-avatar img,
.account-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.theme-dark .site-avatar.is-default-avatar,
.theme-dark .account-button.is-default-avatar,
html.theme-dark .site-avatar.is-default-avatar,
html.theme-dark .account-button.is-default-avatar {
  background: #241617;
  color: #F3E6E0;
  border-color: #2A2826;
}

.theme-dark .site-header,
html.theme-dark .site-header {
  background: #0F0E0D;
  border-color: #2A2826;
  box-shadow: none;
}
.theme-dark .site-brand,
html.theme-dark .site-brand { color: #F4EEE8; }
.theme-dark .site-nav-button,
html.theme-dark .site-nav-button {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #9A908A;
}
.theme-dark .site-nav-button:hover,
.theme-dark .site-nav-button.active,
html.theme-dark .site-nav-button:hover,
html.theme-dark .site-nav-button.active {
  background: transparent;
  color: #9B353A;
}
.theme-dark .site-theme,
html.theme-dark .site-theme {
  background: #171615;
  border-color: #2A2826;
  color: #9A908A;
}
.theme-dark .site-avatar,
.theme-dark .account-button,
html.theme-dark .site-avatar,
html.theme-dark .account-button {
  background: #9B353A;
  border-color: #9B353A;
  color: #FFFFFF;
}

@media (max-width: 1100px) {
  .site-nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid #eee5dd;
    border-radius: 16px;
    background: #fffdfa;
    box-shadow: 0 12px 32px #55402a14;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .theme-dark .site-nav,
  html.theme-dark .site-nav {
    background: #0F0E0D;
    border-color: #2A2826;
  }
}
@media (max-width: 650px) {
  .site-header {
    height: 60px;
    min-height: 60px;
    gap: 10px;
    padding: 0 12px;
    border-radius: 16px;
  }
  .site-brand .cadding-logo { width: 26px; height: 26px; }
  .site-cta-full { display: none; }
  .site-cta-short { display: inline; }
  .site-cta,
  .site-header .site-cta {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }
}
