/* Canonical visual and responsive contract for the shared public Header/Footer. */
@media screen {
  body .site-header {
    position: sticky;
    inset-block-start: max(10px, env(safe-area-inset-top));
    inset-inline-start: auto;
    z-index: 70;
    inline-size: min(1200px, 100%, calc(100vw - 32px));
    max-inline-size: none;
    container-type: inline-size;
    overflow: hidden;
    margin: 0 auto 34px;
    padding: 0;
    border: 1px solid rgba(16, 35, 28, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84) !important;
    color: #243229;
    box-shadow: 0 16px 44px rgba(17, 40, 32, 0.08);
    backdrop-filter: blur(18px) saturate(1.12) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
    transform: none;
  }

  body .site-header .header-inner {
    min-block-size: 66px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "navigation";
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }

  body .site-header .brand {
    grid-area: brand;
    min-inline-size: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    color: #10231c;
    text-decoration: none;
  }

  body .site-header .brand-logo {
    inline-size: 38px;
    block-size: 38px;
    flex: 0 0 38px;
    display: block !important;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #00c92f;
    box-shadow: none;
  }

  body .site-header .brand-logo img {
    inline-size: 100%;
    block-size: 100%;
    display: block;
    object-fit: cover;
  }

  body .site-header .brand-copy {
    min-inline-size: 0;
    display: grid;
    gap: 3px;
  }

  body .site-header .brand-name {
    overflow: hidden;
    color: #10231c;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body .site-header .brand-caption {
    display: block !important;
    overflow: hidden;
    color: #657269;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body .site-header :is(.site-nav, .quick-nav) {
    grid-area: navigation;
    min-inline-size: 0;
    max-inline-size: 100%;
    display: block;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    mask-image: none;
    -webkit-mask-image: none;
  }

  body .site-header :is(.site-nav-scroll, .quick-nav-scroll) {
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    overflow: visible;
    padding: 2px;
    scrollbar-width: none;
  }

  body .site-header :is(.site-nav-scroll, .quick-nav-scroll)::-webkit-scrollbar {
    display: none !important;
  }

  body .site-header :is(.site-nav, .quick-nav) a {
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #53605a;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transform: none;
    transition: border-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 220ms cubic-bezier(0.2, 0.8, 0.2, 1), color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
  }

  @media (hover: hover) and (pointer: fine) {
    body .site-header :is(.site-nav, .quick-nav) a:hover {
      border-color: rgba(18, 63, 52, 0.1);
      background: #edf4cf;
      color: #123f34;
      box-shadow: none;
      transform: none;
    }
  }

  body .site-header :is(.site-nav, .quick-nav) a:focus-visible,
  body .site-header :is(.site-nav, .quick-nav) a[aria-current="page"] {
    border-color: rgba(18, 63, 52, 0.1);
    background: #edf4cf;
    color: #123f34;
    box-shadow: none;
    transform: none;
  }

  body .site-footer {
    position: relative;
    inset-inline-start: auto;
    inline-size: min(1180px, 100%, calc(100vw - 32px));
    max-inline-size: none;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 18px 28px;
    margin: clamp(44px, 7vw, 86px) auto 0;
    padding: 20px 22px;
    border: 1px solid rgba(16, 35, 28, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    color: #5f6963;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
  }

  body .site-footer .footer-brand {
    min-inline-size: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  body .site-footer .footer-brand strong {
    color: #10231c;
    font-weight: 800;
  }

  body .site-footer .footer-logo {
    inline-size: 36px;
    block-size: 36px;
    flex: 0 0 36px;
    display: block;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: #00c92f;
    box-shadow: none;
  }

  body .site-footer .footer-logo img {
    inline-size: 100%;
    block-size: 100%;
    display: block;
    object-fit: cover;
  }

  body .site-footer .footer-copy {
    min-inline-size: 0;
    display: grid;
    justify-items: end;
    gap: 6px;
    color: #5f6963;
    text-align: right;
  }

  body .site-footer .footer-copy p {
    margin: 0;
    color: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
  }

  body .site-footer .footer-links {
    min-inline-size: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 14px;
  }

  body .site-footer .footer-link {
    max-inline-size: 100%;
    display: inline-flex;
    color: #10231c;
    font-size: 14px;
    font-weight: 720;
    line-height: 1.6;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  @media (hover: hover) and (pointer: fine) {
    body .site-footer .footer-link:hover {
      color: #123f34;
      text-decoration: underline;
      text-decoration-color: rgba(18, 63, 52, 0.28);
      text-underline-offset: 3px;
    }
  }

  body .site-footer .footer-link:focus-visible,
  body .site-footer .footer-link[aria-current="page"] {
    color: #123f34;
    text-decoration: underline;
    text-decoration-color: #bddf3d;
    text-underline-offset: 3px;
  }
}

/* The single-row state starts only when the intrinsic brand and nav fit. */
@media screen {
  @container (min-width: 64rem) {
    body .site-header .header-inner {
      grid-template-columns: max-content minmax(0, 1fr);
      grid-template-areas: "brand navigation";
      gap: 12px;
    }

    body .site-header :is(.site-nav-scroll, .quick-nav-scroll) {
      inline-size: auto;
      justify-content: flex-end;
      flex-wrap: nowrap;
      overflow-x: visible;
    }
  }
}

@media screen and (max-width: 920px) {
  body .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  body .site-footer .footer-copy {
    justify-items: start;
    text-align: left;
  }

  body .site-footer .footer-links {
    justify-content: flex-start;
  }
}

@media screen and (max-width: 680px) {
  body .site-header {
    inset-block-start: max(6px, env(safe-area-inset-top));
    border-radius: 18px;
    margin-bottom: 12px;
  }

  body .site-header .header-inner {
    min-block-size: 104px;
    gap: 7px;
    padding: 7px;
  }

  body .site-header .brand {
    gap: 10px;
    padding-inline: 2px;
  }

  body .site-header .brand-name {
    font-size: 15px;
    white-space: normal;
  }

  body .site-header .brand-caption {
    display: none !important;
  }

  body .site-header :is(.site-nav-scroll, .quick-nav-scroll) {
    gap: 4px;
    padding: 0;
  }

  body .site-header :is(.site-nav, .quick-nav) a {
    min-block-size: 30px;
    padding: 6px 9px;
  }
}

@media print {
  .site-header {
    container-type: normal;
  }
}
