.tn-site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  padding: 20px 12px 0;
  box-sizing: border-box;
  font-family: "Playfair Display", serif;
}

.tn-site-header__logo-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
  line-height: 0;
}

.tn-site-header__logo {
  display: block;
  width: auto;
  height: 120px;
  margin: 0 auto;
}

.tn-site-header__nav {
  position: relative;
  margin: 0 0 1rem;
  background: transparent;
}

.tn-site-header__links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.tn-site-header__link {
  display: block;
  margin: 0 1rem;
  padding: 0.5rem 1rem;
  font-family: "Playfair Display", serif;
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(#5e6fa5, #eee, #44ce9b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tn-site-header__link:hover,
.tn-site-header__link:focus-visible {
  filter: brightness(1.18);
}

.tn-site-header__link[aria-disabled="true"] {
  cursor: wait;
  pointer-events: none;
}

.tn-site-header__link:focus-visible,
.tn-site-header__toggle:focus-visible {
  outline: 2px solid #44ce9b;
  outline-offset: 4px;
}

.tn-site-header__toggle {
  display: none;
  width: 46px;
  height: 42px;
  margin: 8px auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tn-site-header__toggle-icon,
.tn-site-header__toggle-icon::before,
.tn-site-header__toggle-icon::after {
  position: absolute;
  display: block;
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tn-site-header__toggle-icon {
  position: relative;
  margin: 0 auto;
}

/* The legacy flipbook centers itself against the browser window. Give it a
   positioned viewport below the shared header so the two regions never
   overlap, and allow the full reader to scroll on shorter screens. */
.tn-reader-page {
  overflow-y: auto;
}

.tn-reader-page .flipbook-viewport {
  position: relative;
  height: 640px;
  overflow: visible;
}

/* basic.css offsets the legacy flipbook by 3% to position it on pages without
   a header. The shared reader header now provides that spacing, and retaining
   the offset pushes the bottom of the 600px book outside its viewport. */
.tn-reader-page .flipbook-viewport .container {
  margin-top: 0 !important;
}

.tn-site-header__toggle-icon::before,
.tn-site-header__toggle-icon::after {
  content: "";
  left: 0;
}

.tn-site-header__toggle-icon::before {
  top: -8px;
}

.tn-site-header__toggle-icon::after {
  top: 8px;
}

.tn-site-header--open .tn-site-header__toggle-icon {
  background: transparent;
}

.tn-site-header--open .tn-site-header__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.tn-site-header--open .tn-site-header__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 991px) {
  .tn-site-header__link {
    margin: 0 0.7rem;
    font-size: 1.35em;
  }
}

@media (max-width: 768px) {
  .tn-site-header__logo {
    height: 100px;
  }

  .tn-site-header__toggle {
    display: block;
  }

  .tn-site-header__nav {
    display: none;
  }

  .tn-site-header--open .tn-site-header__nav {
    display: block;
  }

  .tn-site-header__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .tn-site-header__link {
    width: 100%;
    margin: 0.3rem 0;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .tn-site-header__logo {
    height: 85px;
  }

  .tn-site-header__link {
    font-size: 1.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tn-site-header__toggle-icon,
  .tn-site-header__toggle-icon::before,
  .tn-site-header__toggle-icon::after {
    transition: none;
  }
}
