.history-page {
  --history-ink: #0b2538;
  --history-paper: #f5f0e5;
  --history-river: #2c6c7b;
  --history-copper: #c66b3d;
  --history-gold: #d9ad5b;
  --history-moss: #526b58;
}

.history-page [id] {
  scroll-margin-top: 6.5rem;
}

.history-route {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 8vw, 8rem) 0;
  color: #f9f3e7;
  background:
    radial-gradient(circle at 85% 14%, rgb(217 173 91 / 19%), transparent 28rem),
    linear-gradient(145deg, #112f40 0%, #0b2538 55%, #173e48 100%);
}

.history-route::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(90deg, transparent 49.8%, #fff 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, #fff 50%, transparent 50.2%);
  background-size: 5rem 5rem;
}

.history-route .wrap {
  position: relative;
}

.history-route__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.65fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  margin-bottom: 3rem;
}

.history-route__intro h2,
.history-compendium-intro h2,
.history-volume__mast h2,
.history-next__head h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.7rem, 6vw, 6.5rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.history-route__intro h2 em,
.history-compendium-intro h2 em {
  color: var(--history-gold);
  font-weight: 400;
}

.history-route__intro > p {
  margin: 0;
  color: rgb(249 243 231 / 76%);
  font-size: 1.04rem;
  line-height: 1.8;
}

.history-route__paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgb(255 255 255 / 16%);
  background: rgb(4 20 31 / 38%);
  box-shadow: 0 2rem 5rem rgb(0 0 0 / 18%);
}

.history-route__path {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.history-route__path + .history-route__path {
  border-left: 1px solid rgb(255 255 255 / 16%);
}

.history-route__path > p {
  margin: 0 0 0.8rem;
  color: var(--history-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.history-route__path h3 {
  max-width: 16ch;
  margin: 0 0 2rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
}

.history-route__path ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-route__path li {
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.history-route__path a {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  min-height: 3.55rem;
  padding: 0.85rem 0.45rem 0.75rem 0;
  color: inherit;
  line-height: 1.35;
  text-decoration: none;
  transition: color 180ms ease, padding 180ms ease;
}

.history-route__path a:hover,
.history-route__path a:focus-visible {
  padding-left: 0.35rem;
  color: #f4ce83;
}

.history-route__path a span {
  min-width: 1.7rem;
  color: rgb(249 243 231 / 45%);
  font-size: 0.72rem;
  font-weight: 800;
}

.history-route__start {
  width: fit-content;
  margin-top: 1.4rem;
  border-bottom: 1px solid var(--history-gold);
  color: #f4ce83 !important;
  font-weight: 800;
}

.history-era-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
  overflow-x: auto;
  margin-top: 3rem;
  padding-bottom: 0.8rem;
  scrollbar-color: var(--history-gold) rgb(255 255 255 / 9%);
}

.history-era-rail span {
  position: relative;
  min-width: 8rem;
  padding: 1.35rem 1rem 0 0;
  border-top: 1px solid rgb(255 255 255 / 25%);
  color: rgb(249 243 231 / 56%);
  font-size: 0.72rem;
  line-height: 1.4;
}

.history-era-rail span::before {
  content: "";
  position: absolute;
  top: -0.31rem;
  left: 0;
  width: 0.58rem;
  height: 0.58rem;
  border: 2px solid var(--history-ink);
  border-radius: 50%;
  background: var(--history-gold);
}

.history-era-rail b {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
  font-size: 0.78rem;
}

.history-page .page-jump-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 0.5rem 2rem rgb(11 37 56 / 10%);
}

.history-compendium-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 10rem) 0 clamp(4rem, 8vw, 7rem);
  color: #f8f0df;
  background:
    radial-gradient(circle at 12% 82%, rgb(74 118 115 / 38%), transparent 30rem),
    linear-gradient(120deg, #071c2a, #102f3a 62%, #1f493f);
}

.history-compendium-intro::after {
  content: "1391  1880  1883  1940  1987";
  position: absolute;
  right: -1rem;
  bottom: -0.18em;
  color: rgb(255 255 255 / 3.7%);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(5rem, 13vw, 13rem);
  line-height: 0.8;
  white-space: nowrap;
}

.history-compendium-intro__grid,
.history-compendium-intro__nav {
  position: relative;
  z-index: 1;
}

.history-compendium-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.75fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  align-items: start;
}

.history-compendium-intro__lead {
  margin-top: 0;
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.45;
}

.history-compendium-intro__grid > div:last-child > p:last-child {
  color: rgb(248 240 223 / 68%);
  line-height: 1.8;
}

.history-compendium-intro__nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid rgb(255 255 255 / 16%);
  border-bottom: 1px solid rgb(255 255 255 / 16%);
}

.history-compendium-intro__nav a {
  display: grid;
  gap: 0.5rem;
  padding: 1.35rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.history-compendium-intro__nav a + a {
  border-left: 1px solid rgb(255 255 255 / 16%);
}

.history-compendium-intro__nav a:hover,
.history-compendium-intro__nav a:focus-visible {
  color: #f6ce7e;
  background: rgb(255 255 255 / 7%);
}

.history-compendium-intro__nav span {
  color: rgb(255 255 255 / 42%);
  font-size: 0.7rem;
  font-weight: 800;
}

.history-volume {
  --volume-accent: var(--history-copper);
  position: relative;
  border-top: 0.55rem solid var(--volume-accent);
}

.history-volume--kerk {
  --volume-accent: #a06a78;
}

.history-volume--maas {
  --volume-accent: #347a8e;
}

.history-volume--spoor {
  --volume-accent: #a17945;
}

.history-volume--oorlog {
  --volume-accent: #6f5c51;
}

.history-volume__mast {
  display: grid;
  grid-template-columns: minmax(5rem, 0.28fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-top: clamp(4.5rem, 9vw, 8rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.history-volume__number {
  color: var(--volume-accent);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(5rem, 11vw, 11rem);
  font-weight: 400;
  line-height: 0.75;
  opacity: 0.72;
}

.history-volume__mast h2 {
  max-width: 15ch;
  color: var(--history-ink);
}

.history-volume__lead {
  max-width: 52rem;
  margin: 1.8rem 0 2rem;
  color: #3d4e58;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.5;
}

.history-volume__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-volume__facts li {
  padding: 0.55rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--volume-accent) 42%, transparent);
  border-radius: 99rem;
  color: #44535c;
  background: color-mix(in srgb, var(--volume-accent) 7%, white);
  font-size: 0.76rem;
  font-weight: 750;
}

.history-volume > .content-section {
  border-top: 1px solid rgb(11 37 56 / 9%);
}

.history-volume > .content-section:nth-of-type(even) {
  background: #ece8dd;
}

.history-volume .content-heading .eyebrow span {
  color: var(--volume-accent);
}

.history-volume .content-heading h3 {
  margin: 0;
  color: var(--history-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.7rem, 4.6vw, 5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.history-volume .content-heading h3 em {
  color: var(--volume-accent);
  font-weight: 400;
}

.history-volume .history-reading h4 {
  margin-top: 2.4rem;
  color: var(--history-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.25;
}

.history-volume .history-reading h5 {
  margin: 2rem 0 0.65rem;
  color: var(--volume-accent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-volume__return {
  display: flex;
  justify-content: flex-end;
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.history-volume__return a {
  color: var(--history-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
  text-transform: uppercase;
}

.history-photo-link {
  position: relative;
  display: block;
  overflow: hidden;
  color: #fff;
  background: var(--history-ink);
}

.history-photo-link img {
  display: block;
  width: 100%;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1), opacity 220ms ease;
}

.history-photo-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(transparent, rgb(3 18 28 / 64%));
  opacity: 0;
  transition: opacity 220ms ease;
}

.history-photo-link__label {
  position: absolute;
  z-index: 1;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.48rem 0.64rem;
  border-radius: 0.18rem;
  color: #0b2538;
  background: #f5c870;
  box-shadow: 0 0.6rem 1.5rem rgb(0 0 0 / 18%);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  line-height: 1;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 180ms ease, transform 180ms ease;
  text-transform: uppercase;
}

.history-photo-link:hover img,
.history-photo-link:focus-visible img {
  opacity: 0.88;
  transform: scale(1.025);
}

.history-photo-link:hover::after,
.history-photo-link:focus-visible::after,
.history-photo-link:hover .history-photo-link__label,
.history-photo-link:focus-visible .history-photo-link__label {
  opacity: 1;
}

.history-photo-link:hover .history-photo-link__label,
.history-photo-link:focus-visible .history-photo-link__label {
  transform: translateY(0);
}

.history-photo-link:focus-visible {
  outline: 0.22rem solid #f5c870;
  outline-offset: 0.18rem;
}

.history-next {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  color: #f6efe2;
  background: #0b2538;
}

.history-next__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.55fr);
  gap: 1rem 5rem;
  align-items: end;
  margin-bottom: 2.8rem;
}

.history-next__head .eyebrow {
  grid-column: 1 / -1;
}

.history-next__head p:last-child {
  color: rgb(246 239 226 / 66%);
  line-height: 1.75;
}

.history-next__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgb(255 255 255 / 14%);
}

.history-next__grid a {
  display: grid;
  min-height: 13rem;
  padding: 1.6rem;
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.history-next__grid a + a {
  border-left: 1px solid rgb(255 255 255 / 14%);
}

.history-next__grid a:hover,
.history-next__grid a:focus-visible {
  color: #f4ca77;
  background: rgb(255 255 255 / 6%);
}

.history-next__grid span {
  color: rgb(255 255 255 / 42%);
  font-size: 0.7rem;
  font-weight: 800;
}

.history-next__grid strong {
  align-self: end;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 500;
}

.history-next__grid small {
  margin-top: 0.55rem;
  color: rgb(246 239 226 / 55%);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .history-route__intro,
  .history-compendium-intro__grid,
  .history-next__head {
    grid-template-columns: 1fr;
  }

  .history-route__paths {
    grid-template-columns: 1fr;
  }

  .history-route__path + .history-route__path {
    border-top: 1px solid rgb(255 255 255 / 16%);
    border-left: 0;
  }

  .history-compendium-intro__nav {
    grid-template-columns: repeat(5, minmax(7rem, 1fr));
    overflow-x: auto;
  }

  .history-volume__mast {
    grid-template-columns: 1fr;
  }

  .history-volume__number {
    font-size: 5rem;
  }

  .history-next__grid {
    grid-template-columns: 1fr;
  }

  .history-next__grid a {
    min-height: 10rem;
  }

  .history-next__grid a + a {
    border-top: 1px solid rgb(255 255 255 / 14%);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .history-route__path ol {
    grid-template-columns: 1fr;
  }

  .history-route__path {
    padding: 1.4rem;
  }

  .history-compendium-intro__nav a {
    padding-inline: 0.75rem;
  }

  .history-photo-link__label {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-photo-link img,
  .history-photo-link__label,
  .history-route__path a {
    transition: none;
  }
}
