/* The Layonara site header for the forum and wiki (with /embed/header). Self-contained:
   it only styles .layo-shell and its children, and brings the site's fonts.

   User area markup the including app puts at <!--layonara-user-->:
     signed in:  <a class="layo-shell__me" href="…profile">
                   <span class="layo-shell__username">Name</span>
                   <img class="layo-shell__avatar" src="…/api/avatar/u/<username>" alt="">
                 </a>
                 <a class="layo-shell__signout" href="…logout">Sign out</a>
     signed out: <a class="layo-shell__signin" href="…login">Sign in</a> */

@font-face {
  font-family: "Cinzel";
  src: url("/fonts/cinzel-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

.layo-shell {
  position: relative;
  z-index: 50;
  background: linear-gradient(180deg, #0a0f14 0%, #101a22 100%);
  border-bottom: 1px solid rgb(224 166 74 / 0.25);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #e6edf0;
}
.layo-shell *,
.layo-shell *::before,
.layo-shell *::after {
  box-sizing: border-box;
}
.layo-shell a {
  text-decoration: none;
}
.layo-shell__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
.layo-shell__logo img {
  display: block;
  height: 48px;
  width: auto;
}
.layo-shell__nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.layo-shell__nav a,
.layo-shell__menu nav a {
  color: rgb(255 255 255 / 0.92);
  transition: color 0.15s;
}
.layo-shell__nav a:hover,
.layo-shell__nav a.is-active,
.layo-shell__menu nav a:hover,
.layo-shell__menu nav a.is-active {
  color: #f3c375;
}
.layo-shell__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}
.layo-shell__me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(255 255 255 / 0.92);
}
.layo-shell__me:hover {
  color: #f3c375;
}
.layo-shell__username {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layo-shell__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.2);
  object-fit: cover;
}
.layo-shell__signout {
  font-size: 13px;
  font-weight: 500;
  color: rgb(201 214 220 / 0.7);
}
.layo-shell__signout:hover {
  color: #fff;
}
.layo-shell__signin {
  border: 1px solid #e0a64a;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  color: #f3c375;
}
.layo-shell__signin:hover {
  background: rgb(224 166 74 / 0.15);
}

/* Phones: links move into a menu. */
.layo-shell__menu {
  display: none;
  position: relative;
}
.layo-shell__menu summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}
.layo-shell__menu summary::-webkit-details-marker {
  display: none;
}
.layo-shell__menu summary span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
.layo-shell__menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12rem;
  padding: 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 0.75rem;
  background: rgb(10 15 20 / 0.97);
  box-shadow: 0 20px 40px rgb(0 0 0 / 0.6);
}
.layo-shell__menu nav a {
  display: block;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
@media (max-width: 760px) {
  .layo-shell__nav {
    display: none;
  }
  .layo-shell__menu {
    display: block;
  }
  .layo-shell__user {
    margin-left: auto;
  }
  .layo-shell__username,
  .layo-shell__signout {
    display: none;
  }
  .layo-shell__logo img {
    height: 40px;
  }
}
