/* Intentionally unlayered: load after legacy CSS. Font-weight resets defeat its global !important rules. */
.kg-header,
.kg-footer {
  --kg-ink: #080b0a;
  --kg-white: #ffffff;
  --kg-mint: #9befcd;
  --kg-muted: #b9c3be;
  --kg-line: #303a35;
  --kg-gutter: 32px;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--kg-ink);
  color: var(--kg-white);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  box-shadow: none;
  color-scheme: dark;
}

:is(.kg-header, .kg-footer),
:is(.kg-header, .kg-footer) * {
  box-sizing: border-box;
  min-width: 0;
  font-family: inherit !important;
  font-weight: 400 !important;
  font-style: normal;
  letter-spacing: 0 !important;
  text-transform: none;
  text-shadow: none;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:is(.kg-header, .kg-footer) :is(p, h3, ul, li, details, summary) {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  line-height: inherit;
  list-style: none;
}

:is(.kg-header, .kg-footer) a {
  margin: 0;
  color: inherit;
  text-decoration: none;
  line-height: 1.5;
}

:is(.kg-header, .kg-footer) :is(a, summary):focus-visible {
  outline: 2px solid var(--kg-mint);
  outline-offset: 3px;
}

:is(.kg-header, .kg-footer) .kg-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:is(.kg-header, .kg-footer) .kg-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 2px 0;
}

:is(.kg-header, .kg-footer) .kg-wordmark strong {
  display: block;
  font-size: 18px;
  font-weight: 600 !important;
  line-height: 1.4;
}

:is(.kg-header, .kg-footer) .kg-wordmark small {
  display: block;
  color: var(--kg-muted);
  font-size: 12px;
  line-height: 1.5;
}

.kg-header {
  position: relative;
  z-index: 100;
  isolation: isolate;
}

.kg-header .kg-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  width: min(100%, 1344px);
  min-height: 88px;
  margin: 0 auto;
  padding: 16px var(--kg-gutter);
}

.kg-header .kg-navigation-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.kg-header .kg-nav-group {
  position: relative;
}

.kg-header :is(.kg-group-toggle, .kg-menu-toggle) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  border-radius: 4px;
  color: var(--kg-white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600 !important;
  list-style: none;
}

.kg-header summary::marker {
  content: "";
}

.kg-header summary::-webkit-details-marker {
  display: none;
}

.kg-header .kg-group-toggle:hover,
.kg-header .kg-nav-group[open] > .kg-group-toggle {
  color: var(--kg-mint);
}

.kg-header .kg-icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.kg-header .kg-icon-chevron {
  flex-basis: 16px;
  width: 16px;
  height: 16px;
}

.kg-header .kg-nav-group[open] > summary .kg-icon-chevron {
  transform: rotate(180deg);
}

.kg-header .kg-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 1;
  width: 232px;
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 368px);
  max-height: min(70dvh, 368px);
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--kg-line);
  border-radius: 8px;
  background: var(--kg-ink);
  box-shadow: 0 16px 36px #00000029;
  scrollbar-width: thin;
}

.kg-header .kg-navigation-desktop > .kg-nav-group:last-child .kg-dropdown {
  right: 0;
  left: auto;
}

.kg-header .kg-link-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--kg-muted);
  font-size: 14px;
}

.kg-header .kg-link-list a:hover,
.kg-header .kg-link-list a:focus-visible {
  background: #17251e;
  color: var(--kg-white);
}

.kg-header .kg-start-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--kg-mint);
  color: var(--kg-ink);
  font-size: 14px;
  font-weight: 600 !important;
  white-space: nowrap;
}

.kg-header .kg-start-link:hover {
  background: #c1f6e1;
}

.kg-header .kg-mobile-menu {
  display: none;
}

.kg-header .kg-disclosure {
  border-top: 1px solid var(--kg-line);
  background: #111713;
  color: var(--kg-muted);
}

.kg-header .kg-disclosure p {
  width: min(100%, 1344px);
  margin: 0 auto;
  padding: 8px var(--kg-gutter);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.kg-footer .kg-footer-inner {
  width: min(100%, 1344px);
  margin: 0 auto;
  padding: 36px var(--kg-gutter) 24px;
}

.kg-footer .kg-footer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--kg-line);
}

.kg-footer .kg-footer-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--kg-mint);
  font-size: 14px;
  font-weight: 600 !important;
}

.kg-footer .kg-footer-navigation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 40px;
  padding: 28px 0;
}

.kg-footer .kg-footer-group h3 {
  margin-bottom: 10px;
  color: var(--kg-mint);
  font-size: 14px;
  font-weight: 600 !important;
  line-height: 1.5;
}

.kg-footer .kg-link-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  color: var(--kg-muted);
  font-size: 14px;
}

.kg-footer a:hover {
  color: var(--kg-white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.kg-footer .kg-footer-legal {
  display: grid;
  gap: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--kg-line);
  color: var(--kg-muted);
  font-size: 12px;
  line-height: 1.8;
}

.kg-footer .kg-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 12px;
  color: var(--kg-muted);
  font-size: 12px;
}

.kg-footer .kg-footer-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.kg-footer .kg-footer-sources a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

@media (max-width: 1119px) {
  .kg-header,
  .kg-footer {
    --kg-gutter: 24px;
  }

  .kg-header .kg-header-inner {
    grid-template-columns: minmax(0, 1fr) auto 44px;
    gap: 20px;
    min-height: 80px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .kg-header .kg-navigation-desktop {
    display: none;
  }

  .kg-header .kg-mobile-menu {
    position: static;
    display: block;
  }

  .kg-header .kg-menu-toggle {
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--kg-line);
  }

  .kg-header .kg-menu-toggle .kg-icon-close {
    display: none;
  }

  .kg-header .kg-mobile-menu[open] > .kg-menu-toggle .kg-icon-menu {
    display: none;
  }

  .kg-header .kg-mobile-menu[open] > .kg-menu-toggle .kg-icon-close {
    display: block;
  }

  .kg-header .kg-mobile-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 2;
    max-height: min(65vh, 544px, calc(100vh - 128px));
    max-height: min(65dvh, 544px, calc(100dvh - 128px));
    padding: 12px var(--kg-gutter) 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--kg-line);
    background: var(--kg-ink);
    box-shadow: 0 16px 28px #00000029;
    scrollbar-width: thin;
  }

  .kg-header .kg-navigation-mobile {
    display: block;
    width: min(100%, 720px);
    margin: 0 auto;
  }

  .kg-header .kg-navigation-mobile .kg-nav-group {
    border-bottom: 1px solid var(--kg-line);
  }

  .kg-header .kg-navigation-mobile .kg-group-toggle {
    min-height: 52px;
    padding: 12px 4px;
  }

  .kg-header .kg-navigation-mobile .kg-dropdown {
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    padding: 0 0 12px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .kg-header .kg-navigation-mobile .kg-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
}

@media (max-width: 699px) {
  .kg-header,
  .kg-footer {
    --kg-gutter: 16px;
  }

  .kg-footer .kg-footer-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
  }

  .kg-footer .kg-footer-sources {
    gap: 4px 16px;
  }
}

@media (max-width: 519px) {
  .kg-header .kg-header-inner {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 12px 16px;
  }

  .kg-header .kg-start-link {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 44px;
  }

  .kg-header .kg-mobile-menu {
    grid-column: 2;
    grid-row: 1;
  }

  .kg-header .kg-disclosure p {
    text-align: left;
  }

  .kg-header .kg-navigation-mobile .kg-link-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .kg-header .kg-mobile-panel {
    max-height: min(65vh, 544px, calc(100vh - 196px));
    max-height: min(65dvh, 544px, calc(100dvh - 196px));
  }

  .kg-footer .kg-footer-inner {
    padding-top: 28px;
  }
}
