/* Site header and footer (hand-written; loaded after the page's style profile).
   Desktop: brand + actions, then a slim row of pages. Below 1024px: one row + a menu panel. */

.lh {
  --lh-ink: #163f37;
  --lh-muted: #5d716c;
  --lh-line: #dce8e3;
  --lh-soft: #eef5f2;
  --lh-accent: #ef725f;
  --lh-teal: #076f79;
  --lh-danger: #b4382b;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--lh-line);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--lh-ink);
  transition: box-shadow 0.2s ease;
}
.lh.lh-scrolled { box-shadow: 0 6px 24px rgba(22, 63, 55, 0.08); }
.lh a { text-decoration: none; color: inherit; }
.lh button { font: inherit; color: inherit; cursor: pointer; }
.lh :focus-visible { outline: 2px solid var(--lh-teal); outline-offset: 2px; }

.lh-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

/* Brand */
.lh-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lh-brand .mark {
  width: 42px; height: 42px; flex: none; margin: 0; padding: 0;
  background: none; border: 0; border-radius: 50%; box-shadow: none; display: block;
}
.lh-brand .mark svg { width: 100%; height: 100%; display: block; }
.lh-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.lh-brand-text strong { font-size: 19px; font-weight: 800; letter-spacing: 0.08em; color: var(--lh-ink); }
.lh-brand-text span { font-size: 11.5px; color: var(--lh-muted); max-width: 270px; line-height: 1.3; margin-top: 2px; }

/* Tools on the right */
.lh-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.lh-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-width: 40px; padding: 0 10px;
  border: 1px solid var(--lh-line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; transition: background 0.15s, border-color 0.15s;
}
.lh-icon-btn:hover { background: var(--lh-soft); border-color: #c8dbd3; }
.lh-search { padding: 0 14px 0 12px; color: var(--lh-muted); min-width: 40px; }
.lh-search-label { font-weight: 500; }

.lh-emergency {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: 999px; background: #fdecea; color: var(--lh-danger) !important;
  font-size: 14px; font-weight: 700; white-space: nowrap; border: 1px solid #f6cfca;
}
.lh-emergency:hover { background: #fbdeda; }

/* Language menu */
.lh-lang { position: relative; }
.lh-lang-btn { padding: 0 12px; }
.lh-lang-short { display: none; }
.lh-lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--lh-line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(22, 63, 55, 0.16);
  animation: lh-pop 0.14s ease-out;
}
.lh-lang-menu button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 0; border-radius: 10px; background: none; font-size: 15px; text-align: start;
}
.lh-lang-menu button:hover { background: var(--lh-soft); }
.lh-lang-menu button[aria-checked="true"] { font-weight: 700; color: var(--lh-teal); }

/* Join / Donate */
.lh-actions { display: flex; gap: 8px; }
.lh-pill {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; transition: filter 0.15s, transform 0.15s;
}
.lh-pill:hover { filter: brightness(0.95); }
.lh-pill-join { background: var(--lh-ink); color: #fff !important; }
.lh-pill-donate { background: var(--lh-accent); color: #fff !important; }

.lh-menu-btn { display: none; }

/* Pages row (desktop) */
.lh-nav { display: block; border-top: 1px solid rgba(220, 232, 227, 0.7); }
.lh-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px);
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.lh-nav-inner::-webkit-scrollbar { display: none; }
.lh-link {
  position: relative; background: none !important; border-radius: 0; padding: 12px 12px; font-size: 14.5px; font-weight: 600; color: #40554f !important; white-space: nowrap;
}
.lh-link::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--lh-teal); transform: scaleX(0); transition: transform 0.18s ease;
}
.lh-link:hover { color: var(--lh-ink) !important; }
.lh-link:hover::after { transform: scaleX(0.5); }
.lh-link[aria-current="page"] { color: var(--lh-ink) !important; }
.lh-link[aria-current="page"]::after { transform: scaleX(1); }

/* Menu panel (below 1024px) */
.lh-panel { display: none; }
.lh-scrim { display: none; }

@media (max-width: 1199px) {
  .lh-brand-text span { display: none; }
  .lh-search-label { display: none; }
  .lh-search { padding: 0; width: 40px; }
}

@media (max-width: 1023px) {
  .lh-nav { display: none; }
  .lh-menu-btn { display: inline-flex; padding: 0; width: 44px; height: 44px; }
  .lh-panel[hidden] { display: none; }
  .lh-panel {
    display: block; position: absolute; inset-inline: 0; top: 100%;
    max-height: calc(100dvh - 100%); overflow-y: auto;
    background: #fff; border-bottom: 1px solid var(--lh-line);
    box-shadow: 0 24px 48px rgba(22, 63, 55, 0.18);
    padding: 12px clamp(16px, 4vw, 40px) 22px;
    animation: lh-slide 0.2s ease-out;
  }
  .lh-panel-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .lh-panel-link {
    display: block; padding: 13px 12px; border-radius: 12px; background: none; font-size: 16px; font-weight: 600; color: #2b4741 !important;
  }
  .lh-panel-link:hover { background: var(--lh-soft); }
  .lh-panel-link[aria-current="page"] { background: var(--lh-soft); color: var(--lh-teal) !important; }
  .lh-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--lh-line); }
  .lh-panel-actions .lh-pill, .lh-panel-actions .lh-emergency { height: 46px; flex: 1 1 140px; justify-content: center; font-size: 15px; }
  .lh-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(15, 35, 30, 0.28); }
  body.lh-locked { overflow: hidden; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Join, Donate and first aid are already in the bar. */
  .lh-panel-actions { display: none; }
}

@media (max-width: 767px) {
  .lh-bar { min-height: 60px; padding-block: 8px; gap: 10px; }
  .lh-tools { gap: 6px; }
  .lh-bar .lh-emergency, .lh-bar .lh-actions { display: none; }
  .lh-brand .mark { width: 38px; height: 38px; }
  .lh-brand-text strong { font-size: 17px; }
}

@media (max-width: 479px) {
  .lh-lang-long { display: none; }
  .lh-lang-short { display: inline; }
  .lh-lang-btn { padding: 0 10px; gap: 5px; }
  .lh-panel-links { grid-template-columns: 1fr; }
}

@keyframes lh-pop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes lh-slide { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .lh, .lh *, .lh-panel, .lh-lang-menu { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- footer */
.lf {
  display: block; margin: 0; padding: 0; border: 0;
  background: #12352e; color: #d6e6e1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.lf a { color: inherit; text-decoration: none; }
.lf :focus-visible { outline: 2px solid #8fd6c4; outline-offset: 3px; border-radius: 6px; }
.lf-inner { max-width: 1280px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 40px) 26px; }
.lf-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.lf-brand { display: flex; align-items: center; gap: 12px; max-width: 380px; }
.lf-brand .mark {
  width: 48px; height: 48px; flex: none; margin: 0; padding: 0;
  background: none; border: 0; border-radius: 50%; box-shadow: none; display: block;
}
.lf-brand .mark svg { width: 100%; height: 100%; display: block; }
.lf-brand-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
.lf-brand-text strong { color: #fff; font-size: 19px; letter-spacing: .08em; }
.lf-brand-text span { font-size: 13px; color: #a9c6bd; }
.lf-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
.lf-links a { padding: 6px 0; font-size: 14.5px; font-weight: 600; color: #e6f1ee; }
.lf-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.lf-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12);
}
.lf-note, .lf-copy { margin: 0; font-size: 13px; color: #a9c6bd; line-height: 1.6; }
.lf-copy { white-space: nowrap; }

@media (max-width: 767px) {
  .lf-inner { padding: 34px 18px calc(22px + env(safe-area-inset-bottom)); }
  .lf-top { flex-direction: column; align-items: stretch; gap: 22px; }
  .lf-brand { max-width: none; }
  .lf-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .lf-links a {
    display: flex; align-items: center; min-height: 48px; padding: 10px 14px;
    border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
    font-size: 15px; line-height: 1.3;
  }
  .lf-links a:hover, .lf-links a:active { background: rgba(255, 255, 255, .12); text-decoration: none; }
  .lf-bottom { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 24px; }
}
@media (max-width: 340px) {
  .lf-links { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- language chooser */
.lg .lg-panel { text-align: center; }
.lg .lg-panel .mark { width: 56px; height: 56px; margin: 0 auto 6px; background: none; border: 0; box-shadow: none; display: block; }
.lg .lg-panel .mark svg { width: 100%; height: 100%; display: block; }
.lg .lg-question { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 22px; font-size: clamp(22px, 5vw, 28px); line-height: 1.3; }
.lg .lg-question span:not(:first-child) { font-size: .72em; font-weight: 500; color: #5d716c; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }

/* ---------------------------------------------------------------- search window */
.site-search-dialog {
  width: min(640px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 48px));
  border: 0; border-radius: 22px; padding: 22px; box-shadow: 0 30px 80px rgba(15, 40, 34, .3);
}
.site-search-dialog::backdrop { background: rgba(12, 32, 28, .45); backdrop-filter: blur(3px); }
.site-search-dialog .site-search-input {
  width: 100%; height: 52px; padding: 0 16px; font-size: 16px; border-radius: 14px;
  border: 1px solid #cfe0d9; background: #f7faf9; outline: none; box-shadow: none;
}
.site-search-dialog .site-search-input:focus { border-color: #0b6b62; background: #fff; box-shadow: 0 0 0 4px rgba(11, 107, 98, .14); outline: none; }
.site-search-dialog .site-search-close {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: #eef5f2; color: #163f37; font-size: 22px; cursor: pointer;
}
.site-search-dialog .site-search-results li { padding: 12px 4px; }
.site-search-dialog .site-search-results a { text-decoration: none; font-weight: 700; color: #0b5e56; }
.site-search-dialog .site-search-results a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-search-dialog .site-search-kind { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; background: #eef5f2; font-size: 11.5px; font-weight: 700; color: #3f5852; vertical-align: middle; }
@media (max-width: 640px) {
  .site-search-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
}

/* "Edit this page" (signed-in editors only) */
.le-edit-fab {
  position: fixed; z-index: 60; inset-inline-end: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  padding: 13px 20px; border-radius: 999px; background: #12302a; color: #fff !important; text-decoration: none !important;
  font: 800 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; box-shadow: 0 14px 34px rgba(18, 48, 42, .35);
}
.le-edit-fab:hover { background: #1d5045; }
@media print { .le-edit-fab { display: none; } }

/* Join form (registry page) */
.intake-panel fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.intake-panel fieldset > label:not(.intake-check) { display: grid; gap: 6px; font-weight: 600; color: #24443d; }
.intake-panel input[type="text"], .intake-panel input[type="tel"] {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid #cfe0d9; background: #fff; font-size: 16px; color: #12302a;
}
.intake-panel input[type="text"]:focus, .intake-panel input[type="tel"]:focus { outline: none; border-color: #0b6b62; box-shadow: 0 0 0 4px rgba(11, 107, 98, .14); }
.intake-panel .intake-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; }
.intake-panel .intake-check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: #0b6b62; }
.intake-panel button.primary { height: 52px; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer; }
.intake-panel fieldset:disabled { opacity: .6; }

/* Long words in page bodies never push the page sideways. */
main { overflow-wrap: anywhere; }
