:root {
  --background: #f6fcef;
  --text: #503f2c;
  --primary: #563d21;
  --accent: #044915;
  --soft: #e7eedd;
  --line: #c8cfbc;
}

html {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button {
  max-width: 100%;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
  max-width: 100%;
  flex-shrink: 0;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.content-frame {
  width: calc(100% - 68px);
  max-width: 1212px;
  margin-inline: auto;
  padding-inline: 0;
}

.jump {
  display: block;
  padding-block: 5px;
  color: var(--accent);
  font-size: 16px;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 72px;
  padding-block: 10px;
  background: var(--background);
}

.site-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  color: var(--accent);
  text-decoration: none;
  outline: 1px solid transparent;
  outline-offset: 4px;
  transition: outline-color 150ms ease;
}

.site-link:hover {
  outline-color: var(--accent);
}

.site-link img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.site-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.masthead-note {
  margin: 0 0 0 auto;
  font-size: 18px;
  font-style: italic;
}

.navigation-button,
.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: var(--background);
  font-size: 18px;
  font-weight: 600;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: outline-color 150ms ease;
}

.navigation-button {
  display: none;
  margin-inline-start: auto;
}

.navigation-button:hover,
.dialog-close:hover {
  outline-color: var(--accent);
}

.navigation-button svg,
.dialog-close svg,
.action svg,
.text-link svg,
.section-mark svg,
.play-button svg,
.nav-arrow {
  width: 20px;
  height: 20px;
}

.page-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 192px;
  align-items: start;
  gap: 28px;
  padding-block-start: 38px;
  scroll-margin-top: 88px;
}

.page-sections {
  display: flex;
  flex-direction: column;
  gap: 38px;
  min-width: 0;
}

.lead {
  min-width: 0;
}

.lead p,
.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#intro-heading {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.lead #intro-heading {
  max-width: 22ch;
  margin-block-start: 10px;
}

.feature {
  min-width: 0;
  width: 100%;
}

.slide-stage {
  min-width: 0;
}

.slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
}

.slide[hidden],
.feature-controls[hidden],
.play-button svg[hidden] {
  display: none;
}

.slide-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: 24px 24px 24px 0;
}

.slide:not([hidden]) .slide-copy {
  animation: text-enter 150ms ease-out both;
}

.slide-copy h2 {
  max-width: 100%;
  margin: 22px 0 0;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.slide-description {
  max-width: 32ch;
  margin: 18px 0 26px;
  font-size: 20px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.slide-media {
  min-width: 0;
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--line);
}

.slide-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  background: var(--soft);
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 2px;
  background: var(--primary);
  color: var(--background);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: outline-color 150ms ease;
}

a.action:hover {
  outline-color: var(--primary);
}

.feature-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-block-start: 18px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--line);
}

.slide-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  padding: 12px 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
}

.nav-button span {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 2px;
  background: #a5b19a;
  outline: 1px solid transparent;
  transition: outline-color 150ms ease;
}

.nav-button[aria-pressed='true'] span {
  background: var(--accent);
}

.nav-button:hover span {
  outline-color: var(--accent);
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 2px;
  background: var(--soft);
  color: var(--accent);
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: outline-color 150ms ease;
}

.play-button:hover {
  outline-color: var(--accent);
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block-end: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.story-section,
.topics {
  min-width: 0;
}

.story-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  scroll-margin-top: 96px;
}

.story {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 24px;
  border-radius: 3px;
  background: #eef4e6;
  text-align: center;
  text-decoration: none;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: outline-color 150ms ease;
}

.story:hover {
  outline-color: var(--accent);
}

.story-wide {
  grid-column: 1 / -1;
  background: var(--soft);
}

.story-picture {
  align-self: start;
  width: 170px;
  max-width: 100%;
  min-width: 0;
}

.story-picture img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  background: #dce6d1;
}

.story-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: calc(170px * 4 / 3);
}

.story h3 {
  display: -webkit-box;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.4;
}

.story-label {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 2px;
  background: #dce8d3;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.duration {
  font-size: 16px;
}

.story .duration {
  flex-basis: 100%;
}

.story-details .action {
  align-self: flex-start;
  margin-block-start: auto;
}

.topic-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--background);
}

.topic-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 2px;
  background: rgb(246 252 239 / 12%);
}

.topic-band .story-label {
  padding: 0;
  background: transparent;
  color: var(--background);
  font-size: 22px;
  font-weight: 500;
}

.topic-band p {
  margin: 0;
  font-size: 18px;
}

.site-panel {
  position: sticky;
  top: 100px;
  min-width: 0;
  width: 192px;
  max-width: 100%;
}

.site-panel > .kicker {
  margin-block-end: 20px;
}

.nav-place,
#navigation {
  min-width: 0;
  max-width: 100%;
}

.nav-tab,
.nav-group summary,
.nav-list a {
  display: block;
  max-width: 100%;
  padding: 12px 14px;
  border-inline-start: 1px solid var(--line);
  font-size: 18px;
  text-decoration: none;
  overflow-wrap: anywhere;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: outline-color 150ms ease;
}

.nav-tab[aria-current='page'],
.nav-group .current-tab {
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--accent);
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-tab:hover,
.nav-group summary:hover,
.nav-list a:hover {
  outline-color: var(--accent);
}

.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-arrow {
  color: var(--accent);
}

.nav-group[open] .nav-arrow {
  transform: rotate(180deg);
}

.nav-list {
  margin: 0;
  padding: 0 0 0 12px;
  list-style: none;
}

.nav-list a {
  padding-block: 9px;
  font-size: 16px;
}

.panel-note {
  max-width: 16ch;
  margin: 28px 0 0;
  font-size: 18px;
  font-style: italic;
}

.reading-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 690px);
  align-items: start;
  gap: 24px;
  width: 100%;
  max-width: 932px;
  min-width: 0;
  margin-inline: auto;
}

.story-page {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 690px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

.trail {
  margin-block-end: 20px;
  font-size: 16px;
}

.trail ol {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trail li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.trail a {
  color: var(--accent);
}

.reading-head .story-meta {
  justify-content: flex-start;
  margin-block-start: 18px;
}

.reading {
  min-width: 0;
  margin-block-start: 24px;
  font-size: 20px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

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

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

.reading p {
  margin: 0 0 18px;
}

.reading h2 {
  margin: 28px 0 14px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.reading h3 {
  margin: 24px 0 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.reading h4 {
  margin: 22px 0 12px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.reading a {
  color: var(--accent);
}

.reading blockquote {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--primary);
  border-radius: 2px;
  background: #edf3e5;
  color: var(--primary);
  font-weight: 500;
}

.reading blockquote p:last-child {
  margin-block-end: 0;
}

.reading cite {
  display: block;
  margin-block-start: 12px;
  font-size: 18px;
  font-style: normal;
}

.reading ul,
.reading ol {
  margin: 18px 0;
  padding-inline-start: 24px;
}

.reading ul {
  list-style-type: square;
}

.reading li + li {
  margin-block-start: 8px;
}

.reading li::marker {
  color: var(--accent);
}

.reading table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 18px;
  line-height: 1.4;
  text-align: left;
}

.reading caption {
  padding-block-end: 12px;
  font-weight: 600;
  text-align: left;
}

.reading th,
.reading td {
  padding: 12px 14px;
  vertical-align: top;
}

.reading th {
  background: var(--accent);
  color: var(--background);
  font-weight: 600;
}

.reading tbody tr:nth-child(odd) {
  background: #e4edd9;
}

.reading tbody tr:nth-child(even) {
  background: #eff5e7;
}

.reading-note {
  grid-column: 1;
  grid-row: 1;
  width: 218px;
  max-width: 100%;
  min-width: 0;
  padding: 20px;
  border-radius: 3px;
  background: var(--soft);
  font-size: 18px;
}

.reading-note h2 {
  margin: 10px 0 18px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.reading-note > p:not(.kicker) {
  margin: 0 0 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: var(--accent);
  font-size: 18px;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: outline-color 150ms ease;
}

.text-link:hover {
  outline-color: var(--accent);
}

.story-links {
  margin-block-start: 38px;
}

.story-links h2 {
  margin: 6px 0 16px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}

.story-links ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  scroll-margin-top: 96px;
}

.story-links a {
  display: block;
  padding: 12px 16px;
  border-inline-start: 1px solid var(--line);
  border-radius: 2px;
  background: #edf3e5;
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: outline-color 150ms ease;
}

.story-links a:hover {
  outline-color: var(--accent);
}

.story-links a[aria-current='page'] {
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.colophon {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-block-start: 38px;
  padding-block: 24px;
  font-size: 16px;
}

.colophon p {
  margin: 0;
}

.colophon p:first-child {
  font-style: italic;
}

.navigation-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, calc(100% - 22px));
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: 22px;
  overflow-y: auto;
  border: 0;
  border-radius: 3px 0 0 3px;
  background: var(--background);
  color: var(--text);
}

.navigation-dialog:not([open]) {
  display: none;
}

.navigation-dialog::backdrop {
  background: rgb(15 35 15 / 38%);
}

html:has(dialog:modal) {
  overflow: hidden;
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 28px;
}

.dialog-top p {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
}

.dialog-close {
  width: 44px;
  padding: 12px;
  flex-shrink: 0;
}

.dialog-slot {
  min-width: 0;
}

.reveal {
  width: calc(100% - 8px);
  margin-inline: auto;
}

.reveal.is-visible {
  animation: enter 150ms ease-out 150ms both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes text-enter {
  from {
    transform: translateY(4px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .reading-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .reading-note {
    width: 100%;
    max-width: 690px;
    margin-inline: auto;
  }
}

@media (max-width: 1160px) {
  .story-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-wide {
    grid-column: auto;
  }
}

@media (max-width: 950px) {
  body {
    font-size: 18px;
  }

  .navigation-button {
    display: inline-flex;
  }

  .masthead-note,
  .site-panel {
    display: none;
  }

  .page-frame {
    grid-template-columns: minmax(0, 1fr);
  }

  #intro-heading {
    font-size: 36px;
  }

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

  .slide-media {
    grid-row: 1;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    padding: 0;
    border: 0;
  }

  .slide-copy {
    grid-row: 2;
    padding: 22px 0 0;
  }

  .slide-copy h2 {
    margin-block-start: 14px;
    font-size: 32px;
  }

  .slide-description {
    max-width: 48ch;
    font-size: 18px;
  }

  .story-list {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .story-picture {
    margin-inline: auto;
  }

  .story-details {
    min-height: 0;
  }

  .reading {
    font-size: 18px;
  }

  .reading table {
    font-size: 18px;
  }
}

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

  .masthead {
    gap: 10px;
  }

  .site-link {
    gap: 8px;
  }

  .site-link img {
    width: 34px;
    height: 34px;
  }

  .site-title {
    font-size: 28px;
  }

  .navigation-button {
    gap: 6px;
    padding: 8px 10px;
    font-size: 16px;
  }

  #intro-heading {
    font-size: 32px;
  }

  .story {
    padding: 20px;
  }

  .topic-band {
    padding: 20px;
  }

  .colophon {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .slide:not([hidden]) .slide-copy {
    animation: none;
    transform: none;
  }

  .site-link,
  .navigation-button,
  .dialog-close,
  .action,
  .nav-button span,
  .play-button,
  .story,
  .nav-tab,
  .nav-group summary,
  .nav-list a,
  .text-link,
  .story-links a {
    transition: none;
  }
}
