/* The top bar on every page (markup: src/lib/site-header.mjs). Stays at the top while scrolling.
   Own colours and sizes, so it looks the same on the React pages, the magazine and the legal pages. */
.sh {
  --sh-cream: hsl(48 100% 99%); --sh-navy: hsl(238 61% 20%); --sh-orange: hsl(24 95% 53%);
  --sh-line: hsl(214 32% 91%); --sh-hover: hsl(210 40% 96%);
  position: sticky; top: 0; z-index: 50;
  background: hsl(48 100% 99% / .85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--sh-line);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5;
}
.sh *, .sh *::before, .sh *::after { box-sizing: border-box; }
.sh-bar { position: relative; display: flex; align-items: center; gap: 32px; width: min(100% - 32px, 1400px); margin-inline: auto; padding-block: 8px; }
.sh-brand { display: flex; margin-right: auto; }
.sh-brand img { display: block; height: 40px; width: auto; max-width: none; }
.sh-menu { display: flex; align-items: center; gap: 32px; }
.sh-menu a { color: var(--sh-navy); font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.sh-menu a:hover, .sh-menu a[aria-current] { color: var(--sh-orange); }
.sh a:focus-visible, .sh summary:focus-visible, .sh button:focus-visible { outline: 3px solid var(--sh-orange); outline-offset: 3px; border-radius: 6px; }

/* Language list: a button with the flag, opening a list of every language. */
.sh-lang { position: relative; }
.sh-lang summary { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; list-style: none; cursor: pointer;
  color: var(--sh-navy); font-size: 14px; font-weight: 800; user-select: none; }
.sh-lang summary::-webkit-details-marker { display: none; }
.sh-lang summary:hover, .sh-lang[open] summary { background: var(--sh-hover); }
.sh-chevron { transition: transform .15s; }
.sh-lang[open] .sh-chevron { transform: rotate(180deg); }
.sh-flag { display: block; flex: none; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px hsl(238 61% 20% / .15); }
.sh-lang-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; margin: 0; padding: 6px; list-style: none;
  background: white; border: 1px solid var(--sh-line); border-radius: 14px; box-shadow: 0 16px 32px -12px hsl(238 61% 20% / .35); }
.sh-lang-list li { margin: 0; }
.sh-lang-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: var(--sh-navy); font-size: 15px; font-weight: 700; text-decoration: none; }
.sh-lang-list a:hover { background: var(--sh-hover); color: var(--sh-navy); }
.sh-lang-list a[aria-current] { color: var(--sh-orange); }
.sh-check { margin-left: auto; }

.sh-burger { display: none; width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 10px; background: none; color: var(--sh-navy); cursor: pointer; }
.sh-burger:hover { background: var(--sh-hover); }
.sh-burger svg { display: block; }
.sh-burger .sh-i-close, .sh-burger[aria-expanded="true"] .sh-i-menu { display: none; }
.sh-burger[aria-expanded="true"] .sh-i-close { display: block; }

@media (max-width: 860px) {
  .sh-bar { gap: 8px; }
  .sh-brand img { height: 32px; }
  .sh-burger { display: block; order: 3; }
  .sh-lang { order: 2; }
  .sh-menu { display: none; position: absolute; top: 100%; left: -16px; right: -16px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: var(--sh-cream); border-bottom: 1px solid var(--sh-line); box-shadow: 0 16px 24px -20px hsl(238 61% 20% / .5); }
  .sh-menu.open { display: flex; }
  .sh-menu a { padding: 12px 4px; font-size: 17px; border-bottom: 1px solid var(--sh-line); }
  .sh-menu a:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .sh-chevron { transition: none; } }
@media print { .sh { display: none; } }
/* The homepage sections the Love Stories and Mission tabs jump to: land below the bar, not under it. */
#stories, #mission { scroll-margin-top: 64px; }
