/* Header layout and responsive navigation. Shared with every locale and page. */
.header {
  --header-height: 64px;
  height: var(--header-height);
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  gap: 18px;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}
.header.scrolled, .inner .header { position: fixed; background: #0c1510f5; backdrop-filter: blur(16px); }
.header #navigation { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-group { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  min-width: 260px;
  padding: 10px;
  border: 1px solid;
  border-radius: 12px;
  box-shadow: 0 18px 45px #0007;
}
.nav-dropdown[hidden] { display: none; }
.nav-dropdown a { display: block; padding: 14px; border-radius: 7px; white-space: normal; color: var(--header-control-text); }
.nav-dropdown a:hover, .nav-dropdown a[aria-current=page] { background: var(--header-control-hover); color: var(--header-control-active); }
.nav-dropdown strong { display: block; font-size: .92rem; }
.nav-dropdown small { display: block; font-size: .75rem; color: #aebfa4; margin-top: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
/* Brand lockup, also reused by the footer. */
.brand { display: flex; align-items: center; gap: 9px; line-height: 1.05; }
.brand-symbol { display: block; width: 36px; height: 36px; object-fit: contain; flex: none; }
.brand-wordmark { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.brand-prefix { font-size: 8px; letter-spacing: 2px; font-weight: 650; color: #c4d0b9; }
.brand-name { font: 800 20px/1 Georgia,'Times New Roman',serif; letter-spacing: 2px; color: var(--text); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.footer-brand .brand-symbol { width: 34px; height: 34px; }
/* One control surface for navigation links, disclosure buttons and language select. */
.header {
  --header-control-text: var(--text);
  --header-control-hover: #ffffff0d;
  --header-control-active: var(--lime);
  --header-panel-bg: #17271c;
  --header-panel-border: #40563a;
}
.header .header-control {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--header-control-text);
  font: 400 14px/1.5 var(--font);
  cursor: pointer;
  text-decoration: none;
}
.header .header-control:hover { background: var(--header-control-hover); color: var(--header-control-active); }
.header .header-control[aria-expanded="true"] { color: var(--header-control-active); }
.header .header-control:focus-visible { outline: 2px solid var(--header-control-active); outline-offset: 3px; }
.header .nav-dropdown { background: var(--header-panel-bg); border-color: var(--header-panel-border); }
.header .language-picker { position: relative; display: inline-flex; color: var(--header-control-text); }
.header-chevron { font-size: 12px; line-height: 1; }
.header .menu-toggle { display: none; }

@media(max-width:900px) {
  .header { --header-height: 60px; gap: 12px; }
  .header .brand-symbol { width: 32px; height: 32px; }
  .header .brand-name { font-size: 19px; }
  .header .brand-prefix { font-size: 8px; }
  .header-actions { margin-left: auto; gap: 8px; }
  .header .menu-toggle { display: inline-flex; }
  .header #navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 16px 5%;
    background: var(--header-panel-bg);
    border-bottom: 1px solid var(--header-panel-border);
    max-height: calc(100dvh - var(--header-height));
    overflow: auto;
  }
  .header #navigation.open { display: block; }
  .header .nav-about, .header .nav-trigger { display: flex; width: 100%; padding: 14px 12px; justify-content: space-between; }
  .nav-group { border-top: 1px solid var(--header-panel-border); }
  .nav-dropdown { position: static; min-width: 0; box-shadow: none; margin: 0 0 10px; padding: 5px; }
  .nav-dropdown a { padding: 12px; }
}
@media(max-width:380px) {
  .header { padding: 0 4%; gap: 7px; }
  .header .brand-symbol { width: 30px; height: 30px; }
  .header .brand-name { font-size: 17px; }
  .header .brand-prefix { font-size: 6px; }
  .header .brand { gap: 6px; }
  .header .brand-wordmark { min-width: 0; }
  .header-actions { gap: 6px; }
  .header .header-control { font-size: 12px; padding-left: 8px; padding-right: 8px; }
}

/* Locale picker reuses the navigation disclosure and panel surface. */
.header .language-trigger { min-width: 112px; justify-content: space-between; }
.header .language-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: auto;
  right: 0;
  width: 212px;
  max-height: calc(100dvh - var(--header-height) - 24px);
  overflow: auto;
  min-width: 0;
  padding: 8px;
  margin: 0;
  box-shadow: 0 18px 45px #0007;
}
.language-heading { margin: 8px 12px 10px; font-size: 11px; color: #aebfa4; letter-spacing: .04em; }
.language-dropdown a { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 11px 12px; font-size: 14px; }
.language-check { visibility: hidden; font-size: 15px; color: var(--header-control-active); }
.language-dropdown a[aria-current=true] { color: var(--header-control-active); background: #c4eb8510; }
.language-dropdown a[aria-current=true] .language-check { visibility: visible; }
.header .header-control[aria-expanded=true] .header-chevron { transform: rotate(180deg); }
@media(max-width:900px) { .header .language-trigger { min-width: 102px; } }
@media(max-width:380px) { .header .language-trigger { min-width: 88px; } .header .language-dropdown { width: 196px; right: -52px; } }
