html[data-locale-loading] {
  background: var(--site-background);
}
html[data-locale-loading] body {
  visibility: hidden;
}
html[data-locale-loading] .site-home,
.locale-load-error {
  visibility: visible;
}
.locale-load-error {
  position: fixed;
  inset: 30vh 1rem auto;
  margin: 0 auto;
  max-width: 36rem;
  text-align: center;
  font:
    16px/1.5 Arial,
    sans-serif;
}
.locale-load-error a {
  color: #d4bb85;
}

.site-navigation {
  /* The menus drop over the page, including the professions and calculator sticky bars (z-index 30). */
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 72px;
  min-height: 64px;
  padding: 0 max(var(--site-gutter), calc((100% - var(--site-content-width)) / 2));
  border-bottom: 1px solid var(--site-line);
  background: var(--site-surface);
  font:
    14px/1.4 Arial,
    sans-serif;
}
.site-navigation .site-home {
  width: 104px;
  flex-shrink: 0;
}
/* The logo alone: the menus below carry their own icons at their own size. */
.site-navigation .site-home img {
  display: block;
  width: 100%;
  height: 54px;
  object-fit: contain;
}
/* Four translated links must wrap onto a second line rather than widen the page at 320px. */
.site-navigation > .site-navigation-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  gap: 28px;
  flex: 1;
}
.site-navigation > .site-language {
  display: flex;
  margin-left: auto;
  flex-shrink: 0;
}
#site-language {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 52px;
  min-height: 44px;
  padding: 8px;
  background: transparent;
  color: #b9b2a5;
  border: 0;
  cursor: pointer;
}
#site-language svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.site-language-caret {
  border: 4px solid transparent;
  border-bottom: 0;
  border-top-color: currentColor;
}
#site-language:hover,
#site-language[aria-expanded='true'] {
  color: #d4bb85;
}
#site-language:focus-visible,
.site-language-menu button:focus-visible {
  outline: 2px solid #f0d59c;
  outline-offset: -2px;
}
.site-language-menu {
  position: fixed;
  inset: auto;
  box-sizing: border-box;
  width: max-content;
  min-width: 190px;
  max-width: calc(100vw - 16px);
  overflow-y: auto;
  margin: 0;
  padding: 6px 0;
  border: 1px solid #514737;
  border-radius: 4px;
  background: #211f1b;
  color: #e9e5dc;
  box-shadow: 0 6px 18px #0008;
  font:
    14px/1.4 Arial,
    sans-serif;
}
.site-language-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 16px;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.site-language-menu button::before {
  content: '';
  width: 16px;
  flex-shrink: 0;
}
.site-language-menu button[aria-checked='true'] {
  color: #d4bb85;
  font-weight: bold;
}
.site-language-menu button[aria-checked='true']::before {
  content: '✓';
}
.site-language-menu button:hover,
.site-language-menu button:focus-visible {
  background: #393225;
}
.site-language-menu button[data-language='auto'] {
  border-bottom: 1px solid #514737;
  margin-bottom: 4px;
}
@media (max-width: 1100px) {
  .site-navigation {
    gap: 24px;
  }
}
.site-navigation a {
  color: #b9b2a5;
  text-decoration: none;
}
.site-navigation .site-nav-link {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 0.75rem;
  box-sizing: border-box;
  border-bottom: 3px solid transparent;
  color: #b9b2a5;
}
.site-navigation .site-nav-link:hover {
  color: #fff;
}
.site-navigation .site-nav-link[aria-current='page'] {
  color: #fff0c2;
  border-bottom-color: #d4bb85;
  background: #d4bb8512;
}
.site-navigation a:focus-visible {
  outline: 2px solid #f0d59c;
  outline-offset: 5px;
}
@media (max-width: 760px) {
  .site-navigation {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
  }
  .site-navigation .site-home {
    width: 98px;
    grid-column: 1;
    grid-row: 1;
  }
  .site-navigation > .site-language {
    grid-column: 2;
    grid-row: 1;
  }
  .site-navigation > .site-navigation-links {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 0 12px;
    justify-content: space-between;
    font-size: 12px;
  }
  .site-navigation .site-nav-link {
    min-height: 44px;
  }
}
@media (max-width: 479px) {
  .site-navigation .site-nav-link {
    padding-inline: 0.25rem;
  }
}

/* Menus -------------------------------------------------------------------- */

.site-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}
.site-nav-caret {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 44px;
  margin-left: -0.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b9b2a5;
  cursor: pointer;
}
.site-nav-item:hover .site-nav-caret,
.site-nav-caret[aria-expanded='true'] {
  color: #fff;
}
.site-nav-caret:focus-visible {
  outline: 2px solid #f0d59c;
  outline-offset: -2px;
}
/* Closed panels stay out of the document entirely, so their icons cost no request until opened. */
.site-nav-menu {
  display: none;
}
.site-nav-menu-panel {
  box-sizing: border-box;
  min-width: 13rem;
  max-width: calc(100vw - 16px);
  padding: 6px 0;
  border: 1px solid #514737;
  border-radius: 4px;
  background: #211f1b;
  box-shadow: 0 6px 18px #0008;
}
/* Two columns, each as wide as the longest translated name needs. */
.site-nav-menu-panel.is-professions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: max-content;
}
/* Scoped to the nav: every page stylesheet also colours its own `a`, and loads after this one. */
.site-navigation .site-nav-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 16px;
  color: var(--class-color, #e9e5dc);
}
/* The calculator's classic-talents-node-frame, in its neutral grey state.
   Scale its 48px frame geometry with the artwork; keep this host's static CSS
   independent of the calculator bundle and its availability/rank states. */
.wow-icon-frame,
.home-page .classic-professions-entity-icon {
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: var(--wow-icon-size, 40px);
  height: var(--wow-icon-size, 40px);
  padding: calc(var(--wow-icon-size, 40px) / 12);
  background: linear-gradient(145deg, #8b8d89, #3b4248 35%, #161d24 65%, #5d6164);
  clip-path: polygon(
    14.583% 0,
    85.417% 0,
    100% 14.583%,
    100% 85.417%,
    85.417% 100%,
    14.583% 100%,
    0 85.417%,
    0 14.583%
  );
}
.wow-icon-frame::before,
.home-page .classic-professions-entity-icon::before {
  content: '';
  position: absolute;
  inset: calc(var(--wow-icon-size, 40px) / 24);
  background: #111820;
  clip-path: polygon(
    13.636% 0,
    86.364% 0,
    100% 13.636%,
    100% 86.364%,
    86.364% 100%,
    13.636% 100%,
    0 86.364%,
    0 13.636%
  );
}
.wow-icon-frame > img,
.home-page .classic-professions-entity-icon > img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  clip-path: polygon(10% 0, 90% 0, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0 90%, 0 10%);
}
.site-nav-menu-link .wow-icon-frame {
  --wow-icon-size: 28px;
}
.site-navigation .site-nav-menu-link:hover,
.site-navigation .site-nav-menu-link:focus-visible {
  background: #393225;
}
.site-nav-menu-link:focus-visible {
  outline: 2px solid #f0d59c;
  outline-offset: -2px;
}
/* Below 1024px the two landing pages are the pickers: no caret, no panel, no extra row height. */
@media (min-width: 1024px) {
  .site-nav-caret {
    display: flex;
  }
  /* The current page's tint and underline span the label and its caret: they are one nav item.
     Painted on the wrapper (inset shadow, so no height change); older browsers keep the link's own. */
  @supports selector(:has(*)) {
    .site-nav-item:has(> .site-nav-caret):has(> .site-nav-link[aria-current='page']) {
      background: #d4bb8512;
      box-shadow: inset 0 -3px 0 #d4bb85;
    }
    .site-nav-item:has(> .site-nav-caret) > .site-nav-link[aria-current='page'] {
      border-bottom-color: transparent;
      background: none;
    }
    .site-nav-item:has(> .site-nav-link[aria-current='page']) > .site-nav-caret {
      color: #fff0c2;
    }
  }
  .site-nav-item[data-open] > .site-nav-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    animation: site-nav-menu-open 0.12s ease-out;
  }
}
@keyframes site-nav-menu-open {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav-item[data-open] > .site-nav-menu {
    animation: none;
  }
}

/* Shopping lists ----------------------------------------------------------- */

/* Hidden until this browser's active list has recipes, and only where the row has room for it. */
.site-navigation .site-nav-lists {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  color: #d4bb85;
}
@media (min-width: 1024px) {
  .site-navigation .site-nav-lists:not([hidden]) {
    display: flex;
  }
}
.site-navigation .site-nav-lists:hover {
  color: #f0d59c;
}
.site-nav-lists-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 10px;
  padding: 0 4px;
  border: 1px solid #0b0d10;
  border-radius: 999px;
  background: #d4bb85;
  color: #0b0d10;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
.site-nav-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
