/* Shared v2 header and footer. Product accent is steel #6B7280.
   Accent is the mark and the header rule only. It never colors text.
   Endorser, nav, and footer use the parent sans. Wordmark is Cinzel. */

nav.site-header,
.site-footer {
  --brand-sans: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
  --brand-ink: #F0ECE4;
  --brand-secondary: #D4CFC6;
  --brand-line: #24324A;
  --brand-navy: #0A1628;
  --brand-muted: #8D94A3;
}

nav.site-header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 88px;
  padding: 0 48px;
  background: var(--brand-navy);
  backdrop-filter: none;
  border-bottom: 2px solid rgba(107, 114, 128, 0.55);
}

nav.site-header .site-header-bar {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 0;
}

nav.site-header .brand-lockup {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

nav.site-header .brand-lockup .forge-mark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex: 0 0 auto;
}

nav.site-header .brand-lockup .forge-mark svg {
  display: block;
  height: 44px;
  width: auto;
}

nav.site-header .brand-word {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  font-size: 32px;
}

nav.site-header .brand-lockup-name {
  font-family: 'Cinzel', serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--brand-ink);
}

nav.site-header .brand-subline {
  font-family: 'Cinzel', serif;
  font-size: 0.32em;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--brand-secondary);
}

nav.site-header .nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  position: static;
  background: transparent;
  border: 0;
}

nav.site-header .nav-link,
nav.site-header .nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border-bottom: 1px solid transparent;
  font-family: var(--brand-sans);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  text-decoration: none;
  color: var(--brand-secondary);
  background: none;
  box-shadow: none;
  border-radius: 0;
}

nav.site-header .nav-link:hover,
nav.site-header .nav-links a:hover,
nav.site-header .nav-link--active,
nav.site-header .nav-links a[aria-current="page"] {
  color: var(--brand-ink);
  border-bottom-color: var(--brand-ink);
}

nav.site-header .nav-link--logout {
  color: var(--brand-secondary);
}

nav.site-header button.nav-link {
  border: 0;
  background: none;
  cursor: pointer;
  text-align: inherit;
}

nav.site-header .nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
}

nav.site-header .nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--brand-secondary);
}

nav.site-header a:focus-visible,
nav.site-header .nav-toggle:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  /* One row. The open menu overlays the page, so the bar itself stays ≤ 88px. */
  nav.site-header {
    height: 72px;
    min-height: 72px;
    max-height: 88px;
    align-items: center;
    padding: 0 16px;
  }

  nav.site-header .site-header-bar {
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
    gap: 8px;
  }

  nav.site-header .brand-lockup { flex: 1 1 auto; }
  nav.site-header .nav-toggle { display: flex; margin-left: 0; }
  nav.site-header .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: 4px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    background: var(--brand-navy);
    border-bottom: 2px solid rgba(107, 114, 128, 0.55);
    z-index: 101;
  }
  nav.site-header .nav-links.nav-links--open { display: flex; }
  nav.site-header .nav-link,
  nav.site-header .nav-links a {
    min-height: 48px;
    width: 100%;
    padding: 0 8px;
    font-size: 16px;
  }
  nav.site-header .nav-link--logout {
    margin-top: 4px;
    border-top: 1px solid var(--brand-line);
  }
}

@media (max-width: 360px) {
  /* Subline stays 0.32× the wordmark. Shrink the wordmark so 320px stays one row. */
  nav.site-header .brand-word { font-size: 26px; }
  nav.site-header { padding: 0 12px; }
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  margin-top: auto;
  padding: 28px 24px 36px;
  border-top: 1px solid var(--brand-line);
  text-align: center;
  background: var(--brand-navy);
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  font-family: var(--brand-sans);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-secondary);
  text-decoration: none;
  margin: 0;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a[aria-current="page"] {
  color: var(--brand-ink);
}

.site-footer .forge-mark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  margin: 4px 0 8px;
}

.site-footer .forge-mark svg {
  display: block;
  height: 24px;
  width: auto;
}

.site-footer .jd-endorse {
  margin: 0;
  font-family: var(--brand-sans);
  font-size: 15px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-secondary);
  text-align: center;
  line-height: 1.4;
  text-wrap: balance;
}

.site-footer .site-footer-copy {
  margin: 0;
  max-width: 40rem;
  font-family: var(--brand-sans);
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  color: var(--brand-muted);
  text-align: center;
  line-height: 1.45;
  text-wrap: balance;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .site-footer { padding: 24px 16px 32px; }
  .site-footer .footer-links { display: flex; }
  .site-footer .footer-links a {
    display: inline-flex;
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 380px) {
  /* Four links do not fit on one row. Pair them so one link is not left alone. */
  .site-footer .footer-links {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    column-gap: 8px;
    row-gap: 0;
  }
}
