html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

:root {
  --background: #bae3c8;
  --text: #263c25;
  --primary: #0c2d0c;
  --accent: #46083d;
  --surface: #f3f8ef;
  --line: #90b79a;
  --shadow: 0 12px 28px rgba(12, 45, 12, 0.09);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--primary);
}

h1 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}

h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
}

h3 {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
}

strong,
b {
  font-weight: 600;
}

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

button {
  color: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

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

svg {
  display: block;
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

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

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

.jump {
  position: absolute;
  top: 12px;
  left: 18px;
  z-index: 20;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--primary);
  color: var(--surface);
}

.jump:focus {
  width: auto;
  height: auto;
  padding: 10px 18px;
  overflow: visible;
  clip-path: none;
  border-radius: 8px;
}

.masthead {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 108px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}

.site-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: var(--primary);
  color: var(--surface);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  text-decoration: none;
}

#navigation {
  width: 100%;
  max-width: 840px;
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.menu-list li {
  min-width: 0;
  padding-inline: 12px;
}

.menu-list li:nth-child(even) {
  border-inline-start: 1px solid var(--line);
}

.menu-link {
  display: inline-block;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.menu-link[aria-current="page"],
.bottom-links a[aria-current="page"],
.story-links a[aria-current="page"] {
  border-color: var(--accent);
}

.nav-button {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary);
  color: var(--surface);
  font-size: 14px;
}

.nav-button svg {
  width: 26px;
  height: 26px;
}

main.content-frame {
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-block: 48px 72px;
}

main.content-frame > * {
  min-width: 0;
}

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

.reveal.is-waiting {
  opacity: 0;
  transform: translateX(6px);
}

.reveal.is-entering {
  animation: enter 150ms ease 0ms both;
}

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

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  align-items: center;
  gap: 10px 32px;
}

.lead p {
  grid-column: 1;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.lead h1 {
  grid-column: 1;
  max-width: 850px;
}

.lead-art {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 136px;
  height: 96px;
}

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

.slider-stage {
  position: relative;
}

.slider-window {
  position: relative;
  overflow: clip;
  padding-bottom: 16px;
  border-radius: 24px;
}

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

.slide-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--accent);
  border-radius: 24px;
  background: #a4c9ad;
  object-fit: cover;
}

.slide-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: calc(100% - 160px);
  margin: -120px auto 0;
  padding: 40px;
  border: 1px solid var(--accent);
  border-top: 4px solid var(--accent);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.slide-copy h2 {
  font-size: clamp(38px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -1px;
}

.slide-summary {
  max-width: 800px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  gap: 12px;
  min-height: 48px;
  max-width: 100%;
  padding: 9px 24px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: var(--primary);
  color: var(--surface);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.slider-controls {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 20px;
  pointer-events: none;
}

.slide-arrow,
.playback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(12, 45, 12, 0.1);
  pointer-events: auto;
}

.slide-arrow {
  width: 52px;
  height: 52px;
}

.playback {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}

.slide-arrow svg,
.playback svg {
  width: 26px;
  height: 26px;
}

.slide-arrow:disabled {
  border-color: var(--line);
  background: #dcebdc;
  color: #687d68;
  box-shadow: none;
}

.slide.is-leaving {
  position: absolute;
  inset: 0 0 auto;
}

.slide.enter-next {
  animation: slide-next-in 150ms ease 0ms both;
}

.slide.leave-next {
  animation: slide-next-out 150ms ease 0ms both;
}

.slide.enter-previous {
  animation: slide-previous-in 150ms ease 0ms both;
}

.slide.leave-previous {
  animation: slide-previous-out 150ms ease 0ms both;
}

@keyframes slide-next-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slide-next-out {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

@keyframes slide-previous-in {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slide-previous-out {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

.topics {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
  border-top: 4px solid var(--accent);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--surface);
}

.section-mark svg {
  width: 26px;
  height: 26px;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.story-label {
  display: inline-block;
  max-width: 100%;
  padding: 4px 14px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.topic-list .story-label {
  padding: 8px 20px;
  background: rgba(243, 248, 239, 0.45);
  font-size: 16px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 24px;
  border-top: 4px solid var(--accent);
}

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

.story {
  min-width: 0;
  padding: 40px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.story:first-child {
  grid-column: 1 / -1;
  border-top: 4px solid var(--accent);
  background: #e8f3e3;
}

.story-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.story:first-child .story-text {
  max-width: 840px;
  margin-inline: auto;
}

.story h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 24px;
  font-weight: 400;
}

.summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.story-meta {
  color: var(--accent);
  font-size: 14px;
}

.story-page {
  display: flow-root;
  width: 100%;
  max-width: 626px;
  margin-left: 0;
  margin-right: auto;
}

.article-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.article-header .story-meta {
  margin: 0;
}

.article-header h1 {
  font-size: 32px;
  font-weight: 500;
}

.trail {
  font-size: 14px;
}

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

.trail li {
  min-width: 0;
}

.trail li:first-child {
  display: flex;
  gap: 12px;
}

.trail a {
  border-bottom: 1px solid transparent;
}

.trail [aria-current="page"] {
  color: var(--accent);
}

.story-page p {
  margin: 0 0 24px;
}

.story-page h2 {
  margin: 40px 0 16px;
  font-size: 28px;
  font-weight: 500;
}

.story-page h3 {
  margin: 32px 0 12px;
  font-size: 23px;
  font-weight: 500;
}

.story-page ul,
.story-page ol {
  margin-block: 0 24px;
  padding-inline-start: 24px;
}

.story-page ul {
  list-style-type: square;
}

.story-page li + li {
  margin-top: 8px;
}

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

.story-page li > ul,
.story-page li > ol {
  margin-block: 12px 0;
}

.story-page blockquote {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid var(--accent);
  border-inline-start: 4px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
}

.story-page blockquote p:last-child {
  margin-bottom: 0;
}

.story-page cite {
  display: block;
  margin-top: 16px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
}

.story-page table {
  width: 100%;
  margin-block: 24px;
  border-collapse: collapse;
  font-size: 16px;
  text-align: left;
}

.story-page caption {
  padding-bottom: 12px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  text-align: left;
}

.story-page th,
.story-page td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.story-page th {
  border-bottom: 2px solid var(--accent);
  color: var(--primary);
  font-weight: 600;
}

.story-page figure {
  max-width: 100%;
  margin: 32px 0;
}

.story-page img {
  height: auto;
  border-radius: 16px;
}

.story-page figcaption {
  margin-top: 12px;
  font-size: 14px;
}

.story-page pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.story-page .trail ol {
  margin: 0;
  padding: 0;
}

.story-page .trail li + li {
  margin-top: 0;
}

.story-page .article-header .story-meta {
  margin: 0;
}

.story-links {
  max-width: 626px;
  padding-top: 24px;
  border-top: 4px solid var(--accent);
}

.story-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.story-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}

.story-links a span {
  min-width: 0;
}

.story-links svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.colophon {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 2fr);
  align-items: start;
  gap: 24px;
  padding-block: 32px;
  border-top: 4px solid var(--accent);
}

.colophon p {
  font-size: 16px;
}

.bottom-links {
  min-width: 0;
}

.bottom-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-links li {
  flex: 1 1 160px;
  min-width: 0;
  padding-inline: 10px;
}

.bottom-links li + li {
  border-inline-start: 1px solid var(--line);
}

.bottom-links a {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
}

.button,
.site-title,
.menu-link,
.nav-button,
.slide-arrow,
.playback,
.story,
.bottom-links a,
.story-links a,
.trail a {
  transition: border-color 150ms ease;
}

@media (hover: hover) {
  .button:hover,
  .site-title:hover,
  .nav-button:hover {
    border-color: var(--accent);
  }

  .menu-link:hover,
  .bottom-links a:hover,
  .story-links a:hover,
  .trail a:hover {
    border-color: var(--accent);
  }

  .story:hover,
  .slide-arrow:not(:disabled):hover,
  .playback:hover {
    border-color: var(--primary);
  }
}

@media (max-width: 884px) {
  body {
    font-size: 16px;
  }

  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 4px 0;
    min-height: 64px;
    padding-block: 12px;
  }

  .site-title {
    grid-column: 2;
    grid-row: 1;
    width: 48px;
    height: 40px;
    justify-self: center;
  }

  .nav-button {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    justify-self: end;
  }

  #navigation {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-rows: 1fr;
    max-width: none;
  }

  .menu-panel {
    min-height: 0;
    overflow: hidden;
  }

  .masthead.menu-ready #navigation {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 150ms ease, visibility 150ms ease;
  }

  .masthead.menu-ready.is-open #navigation {
    grid-template-rows: 1fr;
    visibility: visible;
  }

  .menu-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-block: 12px;
  }

  .menu-list li {
    padding-inline: 0;
  }

  .menu-list li:nth-child(even) {
    border-inline-start: 0;
  }

  .menu-link {
    display: block;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
  }

  main.content-frame {
    gap: 40px;
    padding-block: 32px 48px;
  }

  .lead {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lead-art {
    display: none;
  }

  .lead h1 {
    font-size: 32px;
  }

  .lead p {
    font-size: 13px;
  }

  .slide-copy {
    width: calc(100% - 48px);
    gap: 20px;
    margin-top: -56px;
    padding: 24px;
    border-radius: 16px;
  }

  .slide-copy h2 {
    font-size: 36px;
    letter-spacing: 0;
  }

  .slider-controls {
    padding: 12px;
  }

  .slide-arrow {
    width: 44px;
    height: 44px;
  }

  .playback {
    top: 12px;
    right: 12px;
  }

  .section-head {
    gap: 12px;
  }

  .section-head h2,
  .story-links h2 {
    font-size: 26px;
  }

  .feed {
    gap: 24px;
  }

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

  .story {
    padding: 24px;
    border-radius: 16px;
  }

  .story:first-child {
    grid-column: auto;
  }

  .story h3 {
    font-size: 22px;
  }

  .story-text {
    gap: 16px;
  }

  .article-header {
    gap: 16px;
    margin-bottom: 32px;
  }

  .story-page h2 {
    margin-top: 32px;
    font-size: 26px;
  }

  .story-page h3 {
    font-size: 22px;
  }

  .story-page blockquote {
    padding: 20px;
  }

  .story-page th,
  .story-page td {
    padding: 12px;
  }

  .colophon {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 24px;
  }
}

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

  .slide-copy {
    width: calc(100% - 24px);
    margin-top: -32px;
    padding: 20px;
  }

  .slide-copy h2 {
    font-size: 30px;
  }

  .slider-controls {
    padding: 8px;
  }

  .playback {
    top: 8px;
    right: 8px;
  }

  .slide-image,
  .slider-window {
    border-radius: 16px;
  }

  .story {
    padding: 20px;
  }

  .bottom-links li {
    flex-basis: 50%;
    padding-inline: 4px;
  }

  .bottom-links li:nth-child(odd) {
    border-inline-start: 0;
  }
}

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

  .slider-window,
  .menu-panel,
  .story-page pre {
    scroll-behavior: auto;
  }

  .reveal.is-waiting,
  .reveal.is-entering {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .slide.enter-next,
  .slide.leave-next,
  .slide.enter-previous,
  .slide.leave-previous {
    transform: none;
    animation: none;
  }

  .button,
  .site-title,
  .menu-link,
  .nav-button,
  .slide-arrow,
  .playback,
  .story,
  .bottom-links a,
  .story-links a,
  .trail a,
  .masthead.menu-ready #navigation {
    transition: none;
  }
}
