:root {
  --ctm-global-header-height: 76px;
  --ctm-global-header-height-compact: 64px;
  --ctm-global-header-content: 1380px;
  --ctm-global-header-gutter: 24px;
  --ctm-global-header-gutter-tablet: 18px;
  --ctm-global-header-gutter-mobile: 14px;
  --ctm-global-header-forest: #174b3e;
  --ctm-global-header-forest-dark: #0b342d;
  --ctm-global-header-terracotta: #cf452a;
  --ctm-global-header-terracotta-dark: #ab351f;
  --ctm-global-header-surface: rgba(255, 253, 249, 0.96);
  --ctm-global-header-surface-solid: #fffdf9;
  --ctm-global-header-surface-muted: #f3ede2;
  --ctm-global-header-border: #ded8cd;
  --ctm-global-header-border-soft: #eee8df;
  --ctm-global-header-font-serif: "Iowan Old Style", Baskerville, "Times New Roman", Georgia, serif;
  --ctm-global-header-font-sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

body.menu-is-open,
body.nav-open,
body.has-overlay {
  overflow: hidden;
}

/* One visual contract for every static prototype Header. */
.site-header {
  position: relative;
  inset: auto;
  z-index: 1000;
  height: auto;
  min-height: var(--ctm-global-header-height);
  border-bottom: 1px solid rgba(222, 216, 205, 0.7);
  background: var(--ctm-global-header-surface);
  box-shadow: 0 4px 20px rgba(65, 52, 42, 0.04);
  color: var(--ctm-global-header-forest-dark);
  backdrop-filter: none;
}

.site-header__inner,
.header-shell {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  width: min(
    calc(100% - (2 * var(--ctm-global-header-gutter))),
    var(--ctm-global-header-content)
  );
  min-height: var(--ctm-global-header-height);
  height: auto;
  margin-inline: auto;
  gap: 24px;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  gap: 10px;
  color: var(--ctm-global-header-forest-dark);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.site-header .brand__seal {
  display: flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--ctm-global-header-terracotta);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: var(--ctm-global-header-font-serif);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.site-header .brand__seal > span {
  display: inline-grid;
  width: 50%;
  place-items: center;
}

.site-header .brand__seal br {
  display: none;
}

.site-header .brand__name,
.site-header .brand > span:last-child:not(.brand__seal) {
  font-family: var(--ctm-global-header-font-serif);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
}

.desktop-nav,
.global-nav,
.site-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  height: auto;
  gap: clamp(12px, 1.65vw, 27px);
  font-size: inherit;
  font-weight: inherit;
}

.desktop-nav > a,
.global-nav > a:not(.global-nav__mobile-cta),
.site-nav > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ctm-global-header-forest);
  font-family: var(--ctm-global-header-font-sans);
  font-size: clamp(0.76rem, 1vw, 0.91rem);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.desktop-nav > a::after,
.global-nav > a:not(.global-nav__mobile-cta)::after,
.site-nav > a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ctm-global-header-terracotta);
  content: "";
  opacity: 1;
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.desktop-nav > a:hover::after,
.desktop-nav > a:focus-visible::after,
.desktop-nav > a.is-current::after,
.desktop-nav > a[aria-current="page"]::after,
.global-nav > a:not(.global-nav__mobile-cta):hover::after,
.global-nav > a:not(.global-nav__mobile-cta):focus-visible::after,
.global-nav > a:not(.global-nav__mobile-cta)[aria-current="page"]::after,
.site-nav > a:hover::after,
.site-nav > a:focus-visible::after,
.site-nav > a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions,
.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 10px;
}

.site-header .header-search,
.site-header .header-search-button,
.site-header .search-button,
.site-header .icon-button,
.site-header .menu-button,
.site-header .menu-toggle,
.site-header .global-menu-button,
.site-header .global-nav__mobile-head button,
.site-header .mobile-menu__close,
.site-header .global-menu__close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--ctm-global-header-forest);
}

.site-header .header-search:hover,
.site-header .header-search-button:hover,
.site-header .search-button:hover,
.site-header .icon-button:hover,
.site-header .menu-button:hover,
.site-header .menu-toggle:hover,
.site-header .global-menu-button:hover,
.site-header .global-nav__mobile-head button:hover,
.site-header .mobile-menu__close:hover,
.site-header .global-menu__close:hover {
  background: var(--ctm-global-header-surface-muted);
}

.site-header .header-cta,
.site-header .header-primary-cta,
.site-header .button.button--accent.header-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ctm-global-header-terracotta);
  box-shadow: 0 9px 22px rgba(182, 84, 59, 0.2);
  color: #fff;
  font-family: var(--ctm-global-header-font-sans);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.site-header .header-cta:hover,
.site-header .header-primary-cta:hover,
.site-header .button.button--accent.header-primary-cta:hover {
  background: var(--ctm-global-header-terracotta-dark);
  color: #fff;
  transform: none;
}

.site-header a:focus-visible,
.site-header button:focus-visible,
.site-header select:focus-visible {
  outline: 3px solid var(--ctm-global-header-terracotta-dark);
  outline-offset: 3px;
}

.global-nav__mobile-head,
.global-nav__mobile-cta,
.mobile-menu > .button,
.global-menu__cta,
.mobile-menu,
.mobile-menu-backdrop,
.site-header .menu-button,
.site-header .menu-toggle,
.global-menu,
.site-header .global-menu-button,
.global-menu-backdrop {
  display: none;
}

.global-search-icon,
.site-header .search-icon {
  position: relative;
  display: inline-block;
  width: 21px;
  height: 21px;
}

.global-search-icon::before,
.site-header .search-icon::before {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border: 1.75px solid currentColor;
  border-radius: 50%;
  content: "";
}

.global-search-icon::after,
.site-header .search-icon::after {
  position: absolute;
  right: 1px;
  bottom: 3px;
  width: 8px;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
  transform-origin: right center;
}

@media (max-width: 1180px) {
  .site-header__inner,
  .header-shell {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
  }

  .desktop-nav,
  .global-nav,
  .site-nav {
    gap: 12px;
  }

  .site-header .brand__name,
  .site-header .brand > span:last-child:not(.brand__seal) {
    font-size: 1.08rem;
  }
}

@media (max-width: 1024px) {
  .site-header,
  .site-header__inner,
  .header-shell {
    min-height: var(--ctm-global-header-height-compact);
  }

  .site-header__inner,
  .header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    width: min(
      calc(100% - (2 * var(--ctm-global-header-gutter-tablet))),
      var(--ctm-global-header-content)
    );
    gap: 8px;
  }

  .desktop-nav,
  .site-nav {
    display: none;
  }

  .site-header .menu-button,
  .site-header .menu-toggle,
  .site-header .global-menu-button {
    display: inline-grid;
  }

  .site-header .header-search,
  .site-header .header-search-button,
  .site-header .search-button {
    display: inline-grid;
  }

  .global-nav,
  .mobile-menu,
  .global-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    visibility: hidden;
    width: min(430px, calc(100vw - 36px));
    height: 100dvh;
    min-height: 100vh;
    padding: 0 24px 28px;
    overflow-y: auto;
    background: #fbfaf6;
    box-shadow: -24px 0 64px rgba(10, 31, 25, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateX(104%);
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 240ms ease, visibility 0s linear 320ms;
    flex-direction: column;
  }

  body.nav-open .global-nav,
  .site-header.is-menu-open .mobile-menu,
  .mobile-menu.is-open,
  .site-header.is-global-menu-open .global-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .global-nav__mobile-head,
  .mobile-menu__head,
  .global-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--ctm-global-header-border);
    color: var(--ctm-global-header-forest-dark);
    font-family: var(--ctm-global-header-font-serif);
    font-weight: 700;
  }

  .global-nav > a:not(.global-nav__mobile-cta),
  .mobile-menu nav a,
  .global-menu nav a {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 15px 0;
    border-bottom: 1px solid var(--ctm-global-header-border-soft);
    color: var(--ctm-global-header-forest-dark);
    font-family: var(--ctm-global-header-font-sans);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
  }

  .global-nav > a:not(.global-nav__mobile-cta)::after,
  .mobile-menu nav a::after,
  .global-menu nav a::after {
    display: none;
  }

  .mobile-menu nav,
  .global-menu nav {
    display: flex;
    padding: 18px 0;
    flex-direction: column;
  }

  .global-nav__mobile-cta,
  .mobile-menu > .button,
  .global-menu__cta {
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: auto;
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--ctm-global-header-terracotta);
    color: #fff;
    font-family: var(--ctm-global-header-font-sans);
    font-size: 0.84rem;
    font-weight: 800;
  }

  .nav-backdrop,
  .mobile-menu-backdrop,
  .global-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1150;
    display: block;
    visibility: hidden;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(5, 30, 25, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 210ms ease, visibility 0s linear 210ms;
  }

  body.nav-open .nav-backdrop,
  .site-header.is-menu-open .mobile-menu-backdrop,
  .mobile-menu-backdrop.is-open,
  .site-header.is-global-menu-open .global-menu-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
  }
}

@media (max-width: 768px) {
  .header-actions,
  .site-header__actions {
    gap: 3px;
  }

  body .site-header .header-cta,
  body .site-header .header-primary-cta,
  body .site-header [data-save-guide] {
    display: none !important;
  }

  .global-nav__mobile-cta,
  .mobile-menu > .button,
  .global-menu__cta {
    display: inline-flex;
  }

}

@media (max-width: 560px) {
  .site-header__inner,
  .header-shell {
    width: calc(100% - (2 * var(--ctm-global-header-gutter-mobile)));
    gap: 4px;
  }

  .site-header .brand {
    min-width: 0;
    max-width: 100%;
  }

  .site-header .brand__seal {
    width: 34px;
    min-width: 34px;
    height: 34px;
    font-size: 0.62rem;
  }

  .site-header .brand__name,
  .site-header .brand > span:last-child:not(.brand__seal) {
    overflow: hidden;
    max-width: 150px;
    font-size: 1rem;
    text-overflow: ellipsis;
  }

  .global-nav,
  .mobile-menu,
  .global-menu {
    right: 14px;
    width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after {
    transition-duration: 1ms !important;
  }
}
