/* Shared masthead styles from the installed SelahMC website. */
.selah-masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0d1110;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .selah-masthead::after {
      position: absolute;
      z-index: 1;
      inset: auto 0 0;
      height: 1px;
      transform-origin: left center;
      background: #829d82;
      content: "";
      pointer-events: none;
      animation: selah-reading-position linear both;
      animation-timeline: scroll(root block);
    }
    @keyframes selah-reading-position {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }
}

.selah-masthead-row {
  position: relative;
  display: grid;
  min-height: 66px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
}

.selah-masthead .selah-brand {
  gap: 8px;
  font: 800 1.17rem/1 var(--selah-sans);
  letter-spacing: -.03em;
}

.selah-masthead .selah-brand-mark {
  width: 38px;
  height: 38px;
  transition: transform .3s var(--selah-settle), filter .3s ease;
}

.selah-masthead .selah-brand:active .selah-brand-mark { transform: scale(.94); }
.selah-masthead .selah-brand-mc { color: #c4d3b6; font-size: 1em; }

.selah-masthead-nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.1vw, 16px);
}

.selah-masthead-nav a,
.selah-masthead .selah-mobile-nav nav a {
  display: flex;
  min-height: 37px;
  align-items: center;
  padding: 0 clamp(9px, .9vw, 13px);
  border-radius: 7px;
  color: #b1bcb3;
  font-size: .88rem;
  font-weight: 675;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}

.selah-masthead-nav a:hover,
.selah-masthead .selah-mobile-nav nav a:hover {
  color: var(--selah-ivory);
  background: #18251e;
}

.selah-masthead-nav a[aria-current="page"],
.selah-masthead .selah-mobile-nav nav a[aria-current="page"] {
  color: #e1ebdc;
  background: #26332c;
}

.selah-masthead-login {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #b6c2b032;
  border-radius: 7px;
  background-color: #b6c2b010;
  color: #e6ede1;
  font-size: .85rem;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, transform .2s var(--selah-settle);
}

.selah-masthead-login svg { color: #b7d5b6; }
.selah-masthead-login:hover { background-color: #b6c2b024; border-color: #b6c2b05e; }
.selah-masthead-login:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .selah-masthead .selah-brand:hover .selah-brand-mark { filter: drop-shadow(0 0 7px #d2b67547); }
}
@media (prefers-reduced-motion: reduce) {
  .selah-masthead .selah-brand:active .selah-brand-mark,
  .selah-masthead-login:active { transform: none; }
}

.selah-masthead .selah-mobile-nav { display: none; }

@media (max-width: 940px) {
  .selah-masthead-row { min-height: 64px; grid-template-columns: 1fr auto auto; gap: 10px; }
  .selah-masthead-nav { display: none; }
  .selah-masthead .selah-mobile-nav { display: block; justify-self: end; }
  .selah-masthead .selah-mobile-nav summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid #aac39935;
    border-radius: 7px;
    background: #152019;
    color: var(--selah-ivory);
    cursor: pointer;
    list-style: none;
  }
  .selah-masthead .selah-mobile-nav summary::-webkit-details-marker { display: none; }
  .selah-masthead .selah-mobile-nav:not([open]) summary svg:last-child,
  .selah-masthead .selah-mobile-nav[open] summary svg:first-child { display: none; }
  .selah-masthead .selah-mobile-nav nav {
    position: absolute;
    z-index: 2;
    top: calc(100% + 5px);
    right: 0;
    display: grid;
    width: min(255px, 100%);
    gap: 3px;
    padding: 8px;
    border: 1px solid #adbb935e;
    border-radius: 12px;
    background: #152017;
    box-shadow: 0 18px 35px #000a;
  }
  .selah-masthead .selah-mobile-nav nav a { min-height: 44px; }
}

@media (max-width: 420px) {
  .selah-masthead .selah-brand { gap: 8px; font-size: 1.15rem; }
  .selah-masthead .selah-brand-mark { width: 36px; height: 36px; }
  .selah-masthead-login { min-height: 44px; padding-inline: 12px; }
}
.selah-masthead {
  --selah-sans: var(--sans);
  --selah-ivory: #fff4df;
  --selah-settle: cubic-bezier(.22,1,.36,1);
  border-bottom: 1px solid #b8c8b324;
}
.selah-masthead > .selah-masthead-row { width: min(1160px,calc(100% - clamp(32px,10vw,154px))); margin-inline: auto; }
.selah-masthead .selah-brand { display: inline-flex; align-items: center; justify-self: start; width: fit-content; color: var(--selah-ivory); white-space: nowrap; }
.selah-brand-mark { display: grid; place-items: center; flex: none; }
.selah-brand-mark img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.selah-masthead a:is(:hover,:focus-visible) { text-decoration: none; }
.selah-masthead :is(.selah-brand:active .selah-brand-mark,.selah-masthead-login:active) { transform: none; }
.selah-masthead .selah-masthead-account { min-width: 0; max-width: min(10rem,100%); padding-inline: 7px 10px; }
.selah-nav-portrait { position: relative; place-items: center; flex: 0 0 24px; display: inline-grid; width: 24px; height: 24px; overflow: hidden; isolation: isolate; border-radius: 50%; color: #fff1cf; background: #294535; font: 700 11px/1 var(--sans); }
.selah-nav-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.selah-nav-account-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selah-masthead details[open] nav { max-height: calc(100vh - 78px); max-height: calc(100dvh - 78px); overflow: auto; overscroll-behavior: contain; }
.selah-masthead :focus-visible { outline-color: #f8e7c4; }
.workshop-jump-links { align-self: center; display: inline-flex; justify-content: center; margin-top: 1rem; padding: 2px; border: 1px solid #a3b49c2b; border-radius: 999px; }
.workshop-jump-links a { min-height: 32px; border-radius: 999px; padding: .15rem .85rem; font-size: .77rem; color: #b7c2bb; transition: background-color 180ms ease, color 180ms ease; }
.workshop-jump-links a[aria-current] { color: #eee7d7; background: #27312b; }
@media (max-width: 780px) { .selah-masthead > .selah-masthead-row { width: calc(100% - 36px); } }
@media (max-width: 620px) { .selah-masthead > .selah-masthead-row { width: calc(100% - 28px); } }
@media (max-width: 610px) { .workshop-jump-links { display: inline-flex; } .workshop-jump-links a { min-height: 38px; } }
@media (max-width: 520px) {
  .selah-masthead .selah-masthead-account { justify-content: center; width: 44px; padding: 5px; }
  .selah-masthead-account .selah-nav-account-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .selah-masthead *, .workshop-jump-links a { transition: none; } }

/* Hold the masthead geometry while the account request resolves. */
@media (min-width: 941px) {
  .selah-masthead-row { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
}
.selah-masthead #workshop-account {
  inline-size: min(9rem,100%);
  padding-inline: 12px;
}
#workshop-account > svg { flex: none; }
.selah-masthead .selah-mobile-nav nav a.selah-nav-menu-account { white-space: nowrap; }
@media (max-width: 520px) {
  .selah-masthead #workshop-account { inline-size: 44px; padding-inline: 5px; }
  #workshop-account > .selah-nav-account-label { display: none; }
}

/* Homepage masthead parity for the Workshop document. */
.selah-masthead[data-workshop-nav][data-selah-workshop-chrome] { border-bottom: 0; }

.selah-masthead[data-selah-workshop-chrome] #workshop-account {
  inline-size: auto;
  max-inline-size: 100%;
  padding-inline: 14px;
}

.selah-masthead[data-selah-workshop-chrome] #workshop-account.selah-masthead-account {
  max-inline-size: min(10rem, 100%);
}

[data-selah-workshop-chrome] #workshop-account > .selah-nav-account-label { display: inline; }

@media (max-width: 420px) {
  .selah-masthead[data-selah-workshop-chrome] #workshop-account { padding-inline: 12px; }
  .selah-masthead[data-selah-workshop-chrome] #workshop-account.selah-masthead-account {
    max-inline-size: min(7.2rem, 100%);
  }
}
