/* v29.21.0 eight-door menu. Square corners, navy and gold, IBM Plex.
   Loads after the page stylesheets on every page and inside the gated-page shell (which loads no other site CSS).
   Without JS: every link is a plain link. Desktop shows a door's panel on hover or keyboard focus;
   the phone menu lists everything. With JS (html.js): click or Enter opens one panel at a time. */

.eight-header {
  --navy: #0B2545; --navy-soft: #13315C; --gold: #C9A24A; --gold-ink: #7A5C14;
  --sand: #F7F0DE; --mist: #F4F6F9; --line: #D5DBE3; --lagoon: #0E6E78; --ink: #14202E; --slate: #475467; --warm: #F8F4EC;
  --e-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --e-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  position: relative;
  z-index: 40;
}

/* ---------- Nav bar (desktop, 1080 px and up) ---------- */
.eight-nav { margin-left: auto; flex: 0 1 auto; font-family: var(--e-sans); }
.eight-nav ul { list-style: none; margin: 0; padding: 0; }
.eight-nav li { margin: 0; padding: 0; }
.eight-nav .doors { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 0; }
.eight-nav .door { position: static; }
.eight-nav .door-home { display: none; }
.eight-nav .door-link,
.eight-nav .door-btn {
  display: flex; align-items: center; width: auto; min-height: 44px; margin: 0; padding: 10px 10px;
  background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  font: 600 16px/1.3 var(--e-sans); color: var(--navy); text-decoration: none; text-align: left;
  white-space: nowrap; cursor: pointer; box-shadow: none;
}
.eight-nav .door-link:hover, .eight-nav .door-btn:hover,
.eight-nav .door-btn[aria-expanded="true"],
.eight-nav .door-link[aria-current="page"], .eight-nav .door-btn[aria-current="page"],
.eight-nav .door-link[aria-current="true"], .eight-nav .door-btn[aria-current="true"] { color: var(--navy); border-bottom-color: var(--gold); background: none; }
.eight-nav .door-link:focus-visible, .eight-nav .door-btn:focus-visible { outline: 3px solid var(--lagoon); outline-offset: -3px; }

/* ---------- Panels ---------- */
.eight-nav .panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 3px solid var(--gold); border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(7,26,51,.14); padding: 26px 0 30px; z-index: 50; text-align: left;
}
.eight-nav .panel-grid {
  display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 24px 32px;
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
}
.eight-nav .panel-contact .panel-grid { max-width: 1120px; grid-template-columns: minmax(0, 280px); justify-content: end; }
.eight-nav .group-label {
  margin: 0 0 8px; padding: 0 0 6px; border-bottom: 1px solid var(--line);
  font: 700 12px/1.3 var(--e-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink);
}
.eight-nav .panel a {
  display: block; padding: 7px 0; font: 500 16px/1.35 var(--e-sans); color: var(--navy); text-decoration: none;
}
.eight-nav .panel a:hover { color: var(--lagoon); text-decoration: underline; text-underline-offset: .18em; }
.eight-nav .panel a.lead, .eight-nav .panel a.more { font-weight: 600; }
.eight-nav .panel a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.eight-nav .panel a:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 2px; }
.eight-nav .text-box { background: var(--mist); border-top: 4px solid var(--gold); padding: 16px 18px 18px; align-self: start; }
.eight-nav .text-box p { margin: 0 0 10px; font: 400 15px/1.45 var(--e-sans); color: var(--slate); }
.eight-nav .text-box .tb-title { font: 600 19px/1.25 var(--e-serif); color: var(--navy); margin: 0 0 6px; }
.eight-nav .text-box .btn-text,
.eight-nav .panel .text-box a.btn-text {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; margin: 4px 0 0;
  background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 0;
  font: 600 16px/1.3 var(--e-sans); text-decoration: none;
}
.eight-nav .text-box .btn-text:hover { background: var(--navy-soft); border-color: var(--navy-soft); color: #fff; text-decoration: none; }

/* Open states. No JS: hover or keyboard focus (desktop only). JS: .is-open, one at a time. */
@media (min-width: 1080px) {
  html:not(.js) .eight-nav .door:hover > .panel,
  html:not(.js) .eight-nav .door:focus-within > .panel { display: block; }
  .js .eight-nav .door.is-open > .panel { display: block; }
}


/* ---------- Phone and tablet menu (1079 px and below) ---------- */
@media (max-width: 1079px) {
  html:not(.js) .eight-header .nav-toggle { display: none; }
  html:not(.js) .eight-header > .wrap, html:not(.js) .eight-header .wrap { flex-wrap: wrap; }
  html:not(.js) .eight-nav { flex: 1 0 100%; margin: 0; }
  .js .eight-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; z-index: 50;
    background: #fff; border-bottom: 1px solid var(--line); border-top: 3px solid var(--gold);
    box-shadow: 0 10px 20px rgba(7,26,51,.15);
    max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); overflow-y: auto; overscroll-behavior: contain;
  }
  .js .eight-nav.open { display: block; }
  .eight-nav .doors { display: block; padding: 4px 20px 16px; }
  .eight-nav .door { border-bottom: 1px solid var(--line); }
  .eight-nav .door-home { display: block; }
  .eight-nav .door-link, .eight-nav .door-btn {
    width: 100%; justify-content: space-between; min-height: 48px; padding: 12px 4px; border-bottom: 0; font-size: 17px; white-space: normal;
  }
  .eight-nav .door-link:hover, .eight-nav .door-btn:hover { background: var(--sand); }
  .eight-nav .door-btn::after {
    content: ""; flex: none; width: 9px; height: 9px; margin: -4px 4px 0 12px;
    border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg);
  }
  .eight-nav .door-btn[aria-expanded="true"]::after { margin-top: 4px; transform: rotate(-135deg); }
  .eight-nav .door-btn[aria-expanded="true"], .eight-nav .door.is-current > .door-btn { border-left: 3px solid var(--gold); padding-left: 10px; }
  .eight-nav .panel {
    position: static; border: 0; box-shadow: none; background: transparent; padding: 0 0 14px 12px;
  }
  html:not(.js) .eight-nav .panel { display: block; }
  .js .eight-nav .door.is-open > .panel { display: block; }
  .eight-nav .panel-grid { display: block; max-width: none; padding: 0; }
  .eight-nav .group { margin: 0 0 12px; }
  .eight-nav .panel a { padding: 11px 4px; min-height: 44px; font-size: 16px; box-sizing: border-box; }
  .eight-nav .text-box { margin: 8px 0 0; }
}

/* Standalone header: used only by the gated-page shell, which loads no other site CSS. */
.eight-standalone { background: var(--warm); border-bottom: 1px solid var(--line); font-family: var(--e-sans); }
.eight-standalone .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: nowrap; max-width: 1120px; margin: 0 auto; padding: 8px 24px; }
.eight-standalone .brand { display: block; flex: none; line-height: 0; }
.eight-standalone .brand-logo { display: block; height: 44px; width: auto; }
.eight-standalone .nav-toggle {
  display: none; width: auto; min-height: 44px; margin: 0 0 0 auto; padding: 8px 14px;
  background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: 0; font: 600 16px/1.3 var(--e-sans); cursor: pointer;
}
@media (max-width: 1079px) {
  .eight-standalone .nav-toggle { display: block; }
  html:not(.js) .eight-standalone .nav-toggle { display: none; }
  .eight-standalone .wrap { gap: 10px; }
}
@media (max-width: 520px) { .eight-standalone .brand-logo { height: 36px; } .eight-standalone .wrap { padding: 8px 18px; } }
.eight-header .nav-toggle[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .eight-nav * { transition: none !important; } }
@media print { .eight-nav, .eight-header .nav-toggle { display: none !important; } }
/* Very narrow phones (320px): keep the Menu button inside the screen */
@media (max-width: 359px) { .eight-header .nav-toggle { padding-left: 12px; padding-right: 12px; } .eight-header .brand img { height: 34px; width: auto; } .eight-header .wrap { gap: 8px; } }

/* ---------- v29.23.1 site search ----------
   Phone and tablet menu: a search box at the top. Desktop: a Search link (icon) after the eight doors that opens /search/.
   The box is a plain GET form to /search/?q=..., so it works without JavaScript. */
.eight-nav .menu-search { display: none; }
.eight-nav .menu-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eight-nav .search-item { display: block; }
.eight-nav .search-link {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 10px 10px;
  border-bottom: 3px solid transparent; border-radius: 0; color: var(--navy); text-decoration: none; font: 600 16px/1.3 var(--e-sans);
}
.eight-nav .search-link:hover, .eight-nav .search-link[aria-current="page"] { border-bottom-color: var(--gold); }
.eight-nav .search-link:focus-visible { outline: 3px solid var(--lagoon); outline-offset: -3px; }
.eight-nav .search-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1079px) {
  .eight-nav .search-item { display: none; }
  .eight-nav .menu-search { display: block; padding: 14px 20px 4px; }
  .eight-nav .menu-search-row { display: flex; align-items: stretch; }
  .eight-nav .menu-search input[type="search"] {
    flex: 1 1 auto; min-width: 0; min-height: 48px; margin: 0; padding: 10px 12px; box-sizing: border-box;
    border: 2px solid var(--navy); border-right: 0; border-radius: 0; background: #fff; color: var(--ink);
    font: 400 16px/1.3 var(--e-sans); -webkit-appearance: none; appearance: none;
  }
  .eight-nav .menu-search input[type="search"]:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 2px; }
  .eight-nav .menu-search-btn {
    flex: none; min-height: 48px; margin: 0; padding: 10px 16px; background: var(--navy); color: #fff;
    border: 2px solid var(--navy); border-left: 4px solid var(--gold); border-radius: 0; font: 600 16px/1.3 var(--e-sans); cursor: pointer;
  }
  .eight-nav .menu-search-btn:hover { background: var(--navy-soft); border-color: var(--navy-soft); border-left-color: var(--gold); }
  .eight-nav .menu-search-btn:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 2px; }
}
@media print { .eight-nav .menu-search, .eight-nav .search-item { display: none !important; } }
