/* Shared header component — no astrology-specific selectors. */
.ast-site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  background: var(--ast-header-surface, #fff);
  border-bottom: 1px solid var(--ast-hairline);
  box-shadow: 0 3px 22px rgb(76 35 56 / 4%);
}
.ast-site-header__inner {
  min-height: var(--ast-header-height);
  display: grid;
  grid-template-columns: minmax(214px, var(--ast-logo-max)) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2.1vw, 34px);
}
.ast-site-header__brand {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 7px;
  color: var(--ast-plum);
  text-decoration: none;
  flex-shrink: 0;
}
.ast-site-header__brand:focus-visible { border-radius: 4px; }
.ast-site-header__emblem {
  display: block;
  width: clamp(44px, 4.1vw, 54px);
  height: clamp(44px, 4.1vw, 54px);
  flex: 0 0 auto;
}
.ast-site-header__emblem svg { display: block; width: 100%; height: 100%; }
.ast-site-header__brand-type {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.ast-site-header__wordmark {
  display: block;
  font-family: var(--ast-font-display);
  font-size: clamp(29px, 2.75vw, 37px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .94;
  white-space: nowrap;
}
.ast-site-header__signature {
  display: block;
  font-size: clamp(7px, .64vw, 9px);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: .06em;
  color: #846676;
  white-space: nowrap;
  margin-top: 5px;
}
.ast-site-header__logo-img {
  display: block;
  width: auto;
  max-width: var(--ast-logo-max);
  max-height: calc(var(--ast-header-height) - 10px);
  object-fit: contain;
  object-position: left center;
}
.ast-site-header__nav {
  display: flex;
  gap: clamp(14px, 1.55vw, 26px);
  align-items: stretch;
  justify-content: center;
  height: var(--ast-header-height);
  min-width: 0;
}
.ast-site-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-align: center;
  color: #45334c;
  font-size: var(--ast-nav-font-size, clamp(11px, .93vw, 13px));
  font-weight: var(--ast-nav-font-weight, 600);
  line-height: 1.25;
  letter-spacing: -.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: color .16s ease;
}
.ast-site-header__nav-link:hover,
.ast-site-header__nav-link:focus-visible { color: var(--ast-plum); }
/* Small decorative gold star before each navigation label, without widening the desktop menu. */
.ast-site-header__nav-star {
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  color: var(--ast-gold, #cd9963);
  font: 400 10px/1 Georgia, serif;
  pointer-events: none;
  user-select: none;
}
.ast-site-header__nav-link::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--ast-plum);
  left: 0;
  right: 0;
  bottom: 14px;
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .16s, transform .16s;
}
.ast-site-header__nav-link:hover::after,
.ast-site-header__nav-link:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}
.ast-site-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(13px, 1.4vw, 20px);
}
.ast-site-header__sparkle {
  color: var(--ast-gold);
  font-size: 25px;
  font-family: Georgia, serif;
  line-height: 1;
  user-select: none;
}
.ast-site-header__account {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 142px;
  min-height: 43px;
  padding: 10px 23px;
  color: #fff;
  background: linear-gradient(105deg, #8b2c61, #5f1246);
  border: 1px solid #842758;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgb(94 24 64 / 13%);
  font-size: var(--ast-account-font-size, 12px);
  font-weight: var(--ast-account-font-weight, 600);
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
a.ast-site-header__account:hover { transform: translateY(-1px); box-shadow: 0 8px 19px rgb(94 24 64 / 22%); }
.ast-site-header__account.is-pending { cursor: default; }
.ast-site-header__toggle, .ast-site-header__mobile-account { display: none; }
@media (max-width: 1180px) and (min-width: 1121px) {
  .ast-site-header__inner { gap: 13px; }
  .ast-site-header__nav { gap: 13px; }
  .ast-site-header__sparkle--right { display: none; }
  .ast-site-header__account { min-width: 124px; padding-inline: 14px; }
}
@media (max-width: 1024px) {
  .ast-site-header__inner {
    min-height: 74px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .ast-site-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    height: auto;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 13px max(20px, var(--ast-gutter)) 22px;
    border-bottom: 1px solid #eadacb;
    background: #fff;
    box-shadow: 0 18px 30px rgb(52 20 55 / 12%);
  }
  .ast-site-header[data-js-ready="true"] .ast-site-header__nav { display: none; }
  .ast-site-header[data-js-ready="true"].is-open .ast-site-header__nav { display: flex; }
  .ast-site-header__nav-link {
    justify-content: flex-start;
    text-align: left;
    min-height: 48px;
    font-size: var(--ast-nav-mobile-font-size, 14px);
    padding: 7px 2px;
    border-bottom: 1px solid #f4ece5;
  }
  .ast-site-header__nav-link::after { display: none; }
  .ast-site-header__nav-star {
    position: static;
    transform: none;
    margin-right: 9px;
  }
  .ast-site-header__actions > .ast-site-header__account,
  .ast-site-header__sparkle { display: none; }
  .ast-site-header__mobile-account { display: block; padding-top: 17px; }
  .ast-site-header__mobile-account .ast-site-header__account {
    width: 100%;
    max-width: 300px;
    min-height: 46px;
  }
  .ast-site-header__toggle {
    display: inline-flex;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #e9d9cb;
    border-radius: 12px;
    background: #fff9f5;
    cursor: pointer;
    color: var(--ast-plum);
  }
  .ast-site-header__toggle span {
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .18s, opacity .18s;
  }
  .ast-site-header.is-open .ast-site-header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .ast-site-header.is-open .ast-site-header__toggle span:nth-child(2) { opacity: 0; }
  .ast-site-header.is-open .ast-site-header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 440px) {
  .ast-site-header__inner { min-height: 68px; }
  .ast-site-header__emblem { width: 42px; height: 42px; }
  .ast-site-header__wordmark { font-size: clamp(27px, 8vw, 32px); }
  .ast-site-header__signature { font-size: 7px; letter-spacing: 0; }
  .ast-site-header__toggle { width: 42px; height: 42px; flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ast-site-header__nav-link, .ast-site-header__nav-link::after,
  .ast-site-header__account, .ast-site-header__toggle span { transition: none; }
}

/* Approved plum-and-white brand image: respect its original proportions. */
@media (max-width: 1024px) {
  .ast-site-header__logo-img { max-height: 62px; max-width: min(232px, calc(100vw - 106px)); }
}
@media (max-width: 440px) {
  .ast-site-header__logo-img { max-height: 55px; max-width: min(194px, calc(100vw - 102px)); }
}


/* CP24 — header search popover and AstroEngine-ready solar indicator.
   Shared across departments; no Studio settings or database migration. */
.ast-site-header__actions { position: relative; gap: clamp(7px, .85vw, 13px); }
.ast-site-header__search { position: relative; flex: 0 0 auto; }
.ast-site-header__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 39px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ast-plum, #681044);
  cursor: pointer;
  transition: background .15s ease;
}
.ast-site-header__icon-button:hover,
.ast-site-header__icon-button[aria-expanded="true"] { background: #f8edf3; }
.ast-site-header__icon-button:focus-visible,
.ast-site-header__search-panel input:focus-visible { outline: 2px solid var(--ast-plum, #681044); outline-offset: 2px; }
.ast-site-header__search-panel[hidden] { display: none !important; }
.ast-site-header__search-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 35;
  box-sizing: border-box;
  width: min(340px, calc(100vw - 32px));
  padding: 15px;
  border: 1px solid #ecd6e1;
  border-radius: 12px;
  background: #fffaf6;
  box-shadow: 0 13px 38px rgb(62 26 53 / 17%);
}
.ast-site-header__search-panel label {
  display: block;
  margin: 0 0 8px;
  color: #572049;
  font-size: 12px;
  font-weight: 700;
}
.ast-site-header__search-panel input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 41px;
  padding: 8px 12px;
  border: 1px solid #ddc6d4;
  border-radius: 8px;
  color: #43213e;
  background: white;
  font: inherit;
  font-size: 14px;
}
.ast-site-header__search-panel small {
  display: block;
  margin-top: 8px;
  color: #826677;
  font-size: 11px;
  line-height: 1.5;
}
.ast-site-header__sky {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 50px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
}
.ast-site-header__sun { color: #c58a36; }
.ast-site-header__moon { color: var(--ast-plum, #681044); }
.ast-site-header__sky[data-solar-status="pending"] svg { opacity: .78; width: 22px; height: 22px; }
.ast-site-header__sky[data-solar-status="ready"][data-solar-phase="day"] .ast-site-header__moon,
.ast-site-header__sky[data-solar-status="ready"][data-solar-phase="night"] .ast-site-header__sun { display: none; }
.ast-site-header__sky[data-solar-status="ready"] { width: 36px; }
.ast-site-header__sky[data-solar-status="ready"] svg { width: 25px; height: 25px; }
@media (min-width: 1025px) and (max-width: 1300px) {
  .ast-site-header__inner { gap: 12px; }
  .ast-site-header__nav { gap: 12px; }
  .ast-site-header__sparkle { display: none; }
  .ast-site-header__account { min-width: 112px; padding-inline: 13px; }
}
@media (max-width: 1024px) {
  .ast-site-header__search-panel { top: calc(100% + 19px); }
  .ast-site-header__sky { width: 45px; }
}
@media (max-width: 440px) {
  .ast-site-header__actions { gap: 3px; }
  .ast-site-header__sky { width: 40px; gap: 1px; }
  .ast-site-header__sky[data-solar-status="pending"] svg { width: 19px; height: 19px; }
  .ast-site-header__icon-button { width: 34px; }
  .ast-site-header__search-panel { right: -44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ast-site-header__icon-button { transition: none; }
}
