:root {
  --background: #2f2a19;
  --text: #ead7d1;
  --primary: #c78c7b;
  --accent: #e8e116;
  --surface: #3b3422;
  --panel: #493e2a;
  --shadow: #211d12;
  --divider: #9a8168;
  --section-gap: 82px;
  --duration: 150ms;
}

html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 20px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.field-journal {
  width: calc(100% - 68px);
  max-width: 982px;
  margin-inline: auto;
  padding-inline: 0;
}

.heritage-heading {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 110px;
  padding-block: 8px;
  border-bottom: 1px dotted var(--divider);
}

.field-journal__skip {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.field-journal__skip:focus {
  width: auto;
  height: auto;
  padding: 8px 14px;
  clip-path: none;
  background: var(--accent);
  color: var(--background);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.journal-wordmark {
  display: grid;
  min-width: 64px;
  min-height: 58px;
  padding: 5px 9px;
  place-items: center;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--shadow);
  color: var(--background);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.heritage-heading__note {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-journal__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(982px, calc(100% - 68px)) minmax(0, 1fr);
  padding-block: var(--section-gap);
}

.field-journal__layout > main {
  display: grid;
  grid-row: 1;
  grid-column: 1 / -1;
  grid-template-columns: 216px minmax(0, 1fr);
  align-items: start;
  column-gap: 24px;
}

.heritage-nav {
  z-index: 1;
  grid-row: 1;
  grid-column: 2;
  align-self: start;
  justify-self: start;
  width: 216px;
  max-width: 100%;
}

.heritage-nav__toggle {
  display: none;
  list-style: none;
}

.heritage-nav__toggle::-webkit-details-marker {
  display: none;
}

.heritage-nav__label {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navigation-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 12px;
  border-inline-start: 1px solid var(--divider);
  list-style: none;
}

.navigation-list a,
.publisher-info a {
  display: block;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.navigation-list a[aria-current="page"],
.publisher-info a[aria-current="page"],
.editors-notes__related a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent);
}

.collection-cards,
.heritage-story {
  display: grid;
  grid-column: 2;
  min-width: 0;
  gap: var(--section-gap);
}

.first-page__opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30%);
  align-items: center;
  gap: 20px;
  min-height: 260px;
  padding: clamp(18px, 3.2vw, 38px);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow);
}

.first-page h1,
.entry-head h1 {
  margin: 0;
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.first-page h1 {
  max-width: 12ch;
}

.first-page__art {
  display: block;
  justify-self: end;
  width: 100%;
  height: auto;
}

.subjects__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px dotted var(--divider);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.woodcut__section,
.heritage-nav__toggle svg {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--background);
}

.subjects,
.collection-cards__materials,
.featured-spread,
.editors-notes__related {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.subjects__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-entry__section {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--background);
  color: var(--primary);
  font-size: 0.9em;
  font-weight: 600;
}

.subjects__list .field-entry__section {
  padding: 6px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}

#collection-cards {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-entry {
  --preview-height: 208px;
  display: grid;
  grid-template-areas: "preview copy";
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-width: 0;
  padding: 30px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--shadow);
}

.field-entry:nth-child(even) {
  --preview-height: 232px;
  grid-template-areas: "copy preview";
  grid-template-columns: minmax(0, 1fr) 176px;
}

.field-entry:nth-child(3) {
  --preview-height: 184px;
}

.field-entry__image {
  display: grid;
  grid-area: preview;
  place-items: center;
  width: 100%;
  min-width: 0;
  height: var(--preview-height);
  border-radius: 5px;
  background: var(--panel);
}

.field-entry__image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  object-fit: cover;
}

.field-entry__copy {
  display: grid;
  grid-area: copy;
  min-width: 0;
  gap: 10px;
  text-align: center;
}

.field-entry__copy h3,
.field-entry__summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.field-entry__copy h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.field-entry__details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  margin: 0;
  font-size: 14px;
}

.field-entry__copy .field-entry__details {
  justify-content: center;
}

.heritage-story__reading-time {
  white-space: nowrap;
}

.field-entry__summary {
  font-size: 0.9em;
}

.story-action,
.featured-spread__playback {
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.story-action {
  display: block;
  width: 100%;
  text-decoration: none;
}

.featured-spread {
  width: 75%;
  margin-inline-start: auto;
}

.slider-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.slider-ready .slider-body {
  grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
}

.featured-spread__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.featured-spread__choice {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.featured-spread__choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--panel);
  color: var(--accent);
}

.featured-spread__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-radius: 5px;
  background: var(--shadow);
  box-shadow: 5px 5px 0 var(--shadow);
}

.featured-spread__item[hidden] {
  display: none;
}

.featured-spread__item img {
  display: block;
  grid-area: 1 / 1;
  align-self: start;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  object-fit: cover;
}

.featured-spread__title {
  grid-area: 1 / 1;
  align-self: end;
  margin: 0;
  padding: clamp(12px, 2vw, 24px);
  border-radius: 0 0 5px 5px;
  background: linear-gradient(0deg, #211d12 40%, rgba(33, 29, 18, 0.93));
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.13;
}

.featured-spread__title a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
}

.featured-spread__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.featured-spread__progress {
  flex: 1 1 110px;
  width: 100%;
  min-width: 0;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 5px;
  background: var(--panel);
  color: var(--accent);
}

.featured-spread__progress::-webkit-progress-bar {
  border-radius: 5px;
  background: var(--panel);
}

.featured-spread__progress::-webkit-progress-value {
  border-radius: 5px;
  background: var(--accent);
}

.featured-spread__progress::-moz-progress-bar {
  border-radius: 5px;
  background: var(--accent);
}

.featured-spread__playback {
  cursor: pointer;
}

.heritage-story {
  width: 100%;
  max-width: 702px;
  margin-left: auto;
  margin-right: auto;
}

.entry-head {
  display: grid;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px dotted var(--divider);
}

.entry-head .field-entry__section {
  background: var(--surface);
  color: var(--text);
}

.entry-trail {
  font-size: 15px;
}

.entry-trail ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-trail__divider {
  margin-inline-end: 8px;
  color: var(--primary);
}

.heritage-story__text {
  min-width: 0;
}

.heritage-story__text p,
.heritage-story__text ul,
.heritage-story__text ol,
.heritage-story__text blockquote {
  margin-block: 0 1em;
}

.heritage-story__text h2,
.heritage-story__text h3 {
  margin-block: 1.4em 0.5em;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

.heritage-story__text h2 {
  font-size: 1.6em;
}

.heritage-story__text h3 {
  font-size: 1.25em;
}

.heritage-story__text ul,
.heritage-story__text ol {
  padding-inline-start: 1.4em;
}

.heritage-story__text ul {
  list-style-type: square;
}

.heritage-story__text li + li {
  margin-block-start: 0.35em;
}

.heritage-story__text blockquote {
  margin-inline: 0;
  padding: 16px 20px;
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
}

.heritage-story__text blockquote > :last-child {
  margin-block-end: 0;
}

.heritage-story__text cite {
  color: var(--primary);
  font-size: 0.9em;
  font-style: italic;
}

.heritage-story__text table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  text-align: start;
}

.heritage-story__text th,
.heritage-story__text td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
  text-align: start;
  vertical-align: top;
}

.heritage-story__text th {
  color: var(--primary);
  font-weight: 700;
}

.heritage-story__text caption {
  padding-block: 0 8px;
  font-weight: 600;
  text-align: start;
}

.heritage-story__text img,
.heritage-story__text svg {
  max-width: 100%;
  height: auto;
}

.heritage-story__text > :first-child {
  margin-block-start: 0;
}

.heritage-story__text > :last-child {
  margin-block-end: 0;
}

.editors-notes__related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.editors-notes__related a {
  display: block;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--surface);
  font-size: 16px;
}

.publisher-info {
  display: flex;
  padding-block: 22px;
  border-top: 1px dotted var(--divider);
}

@media (max-width: 940px) {
  .first-page__opening {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .first-page__art {
    max-width: 138px;
  }
}

@media (max-width: 846px) {
  .field-entry,
  .field-entry:nth-child(even) {
    grid-template-areas: "preview" "copy";
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-spread {
    width: 100%;
    margin-inline-start: 0;
  }
}

@media (max-width: 678px) {
  :root {
    --section-gap: 44px;
  }

  body {
    font-size: 18px;
  }

  .heritage-heading {
    min-height: 64px;
  }

  .journal-wordmark {
    min-width: 52px;
    min-height: 44px;
    font-size: 19px;
  }

  .heritage-heading__note {
    font-size: 11px;
  }

  .field-journal__layout {
    row-gap: 24px;
    padding-block-start: 0;
  }

  .field-journal__layout > main {
    display: block;
    grid-row: 2;
  }

  .heritage-nav {
    width: 100%;
    padding-block-start: 10px;
  }

  .heritage-nav__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }

  .site-navigation {
    padding-block-start: 12px;
  }

  .heritage-nav[open] .site-navigation {
    animation: menu-fade var(--duration) ease-out;
  }

  .heritage-nav__label {
    display: none;
  }

  .first-page h1,
  .entry-head h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .subjects__header {
    font-size: 24px;
  }

  #collection-cards,
  .field-entry {
    gap: 18px;
  }

  .field-entry {
    padding: 18px;
  }

  .slider-ready .slider-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-spread__list {
    display: flex;
    flex-wrap: wrap;
  }

  .featured-spread__list li {
    flex: 1 1 130px;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .field-journal {
    width: calc(100% - 44px);
  }

  .field-journal__layout {
    grid-template-columns: minmax(0, 1fr) min(982px, calc(100% - 44px)) minmax(0, 1fr);
  }
}

@keyframes menu-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heritage-nav[open] .site-navigation {
    animation: none;
    transition: none;
  }
}

.heritage-story__cover { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; border-radius:5px; margin:24px 0; }
.field-entry__copy h3 { display:block; overflow:visible; -webkit-line-clamp:unset; }
.field-entry__copy h3 a { color:inherit; text-decoration:none; }
.field-entry__copy h3 a:hover { text-decoration:underline; }
.subjects__list a { text-decoration:none; }
.subjects__list a:hover { text-decoration:underline; }
.publisher-info { flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
.publisher-info nav { display:flex; flex-wrap:wrap; gap:8px 12px; }
.publisher-info__rights { margin:0; font-size:14px; }
.featured-spread__item .field-entry__details { margin-top:10px; }
