.akgm,
.akgm * {
  box-sizing: border-box;
}

.akgm {
  --akgm-paper: #f4f1ea;
  --akgm-forest: #173d33;
  position: fixed;
  z-index: 100100;
  inset: 0 0 auto;
  height: 72px;
  color: var(--akgm-forest);
  background: var(--akgm-paper);
  border-bottom: 1px solid rgba(23, 61, 51, .1);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

body.admin-bar .akgm {
  top: 32px;
}

.akgm__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  height: 100%;
  padding: 0 32px;
}

.akgm a,
.akgm a:visited,
.akgm a:hover,
.akgm a:focus {
  color: inherit !important;
  text-decoration: none !important;
}

.akgm__brand {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.4;
}

.akgm__desktop {
  margin-left: auto;
}

.akgm__list {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.akgm__list > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.akgm__list > li > a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.akgm__desktop .akgm__list > li > a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}

.akgm__desktop .akgm__list > li > a:hover::after,
.akgm__desktop .akgm__list > li > a:focus-visible::after {
  transform: scaleX(1);
}

.akgm a:focus-visible,
.akgm summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.akgm__mobile {
  display: none;
}

/* Shared navigation replaces the menus embedded in the published pages. */
body.akgm-home .ak-v9-nav,
body.akgm-home .ak-v9-mobile,
body.akgm-project .rtj-nav,
body.akgm-project .enc-nav {
  display: none !important;
}

body.akgm-home .akgm {
  transition: background-color .28s ease, color .28s ease, border-color .28s ease;
}

body.akgm-home .akgm.akgm--home-dark {
  color: var(--akgm-paper);
  background: var(--akgm-forest);
  border-bottom-color: rgba(244, 241, 234, .08);
}

body.akgm-home .akgm.akgm--home-top {
  background: transparent;
  border-bottom-color: transparent;
}

body.akgm-home .akgm.akgm--menu-open {
  color: var(--akgm-forest);
  background: var(--akgm-paper);
  border-bottom-color: rgba(23, 61, 51, .14);
}

/* About uses this shared navigation instead of its embedded navigation. */
body.akgm-about .ak-about-v4__nav,
body.akgm-about .ak-about-v4__mobile {
  display: none !important;
}

@media (max-width: 1023px) {
  .akgm {
    height: 64px;
  }

  .akgm__inner {
    padding: 0 20px;
  }

  .akgm__desktop {
    display: none;
  }

  .akgm__mobile {
    display: block;
    margin-left: auto;
  }

  .akgm__mobile > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 12px 12px;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    list-style: none;
  }

  .akgm__mobile > summary::-webkit-details-marker {
    display: none;
  }

  .akgm__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 22px;
    height: 22px;
  }

  .akgm__icon > span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform .2s ease;
  }

  .akgm__mobile[open] .akgm__icon > span:first-child {
    transform: translateY(3.25px) rotate(45deg);
  }

  .akgm__mobile[open] .akgm__icon > span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
  }

  .akgm__panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 20px 20px 26px;
    background: var(--akgm-paper);
    color: var(--akgm-forest);
    border-bottom: 1px solid rgba(23, 61, 51, .14);
  }

  .akgm__panel .akgm__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .akgm__panel .akgm__list > li > a {
    display: block;
    padding: 12px 0;
    font-size: 18px;
    line-height: 1.3;
  }
}

@media (max-width: 782px) {
  body.admin-bar .akgm {
    top: 46px;
  }
}

/* About V7 forces two hero columns with a 300px minimum photo even on phones.
   Restore a single column at tablet/phone widths. */
@media (max-width: 1100px) {
  body.akgm-about .ak-about-v4__hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 48px !important;
  }
}

@media (max-width: 767px) {
  body.akgm-about .ak-about-v4__hero .ak-about-v4__eyebrow {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .akgm__desktop .akgm__list > li > a::after,
  .akgm__icon > span {
    transition: none;
  }
}
