:root {
  color-scheme: dark;
  --ground: #092013;
  --text: #d2ead5;
  --primary: #4ad65f;
  --accent: #e6b133;
  --surface: #143422;
  --surface-deep: #102b1c;
  --muted: #adceb5;
  --rule: #52795c;
  --shadow: 0 6px 20px #020d0860;
  --shadow-hover: 0 8px 24px #020d08a0, 0 0 14px #4ad65f24;
}

html {
  box-sizing: border-box;
}

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

[hidden] {
  display: none !important;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

h1, h2, h3 {
  line-height: 1.2;
}

h1 {
  font-size: 50px;
  font-weight: 700;
}

a {
  color: var(--primary);
  text-underline-offset: 0.2em;
}

button {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

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

main.content-frame {
  flex: 1 0 auto;
  min-width: 0;
  padding-block: 38px 82px;
}

.masthead {
  position: static;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 24px;
  min-height: 102px;
  padding-block: 10px;
  border-block-end: 1px dotted var(--rule);
}

.jump,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.jump {
  z-index: 3;
  inset-block-start: 8px;
  inset-inline-start: max(28px, calc((100% - 988px) / 2));
}

.jump:focus {
  width: auto;
  height: auto;
  clip-path: none;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--ground);
}

.site-title {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--ground);
  box-shadow: 3px 3px 0 #745d28;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.site-nav {
  justify-self: end;
  min-width: 0;
}

.site-nav ul,
.foot-nav ul,
.topics ul,
.stories {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}

.site-nav a,
.foot-nav a {
  display: block;
  padding: 5px 12px;
  border-radius: 6px 6px 2px 2px;
  background: var(--surface-deep);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.site-nav a[aria-current='page'],
.foot-nav a[aria-current='page'] {
  color: var(--accent);
}

.nav-button,
.action,
.control,
.panel-button {
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: var(--ground);
  font-weight: 700;
  cursor: pointer;
}

.nav-button {
  display: none;
  justify-self: end;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 12px;
}

.mark {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
}

.home {
  display: grid;
  align-content: start;
  gap: 82px;
}

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 294px);
  grid-template-areas:
    'title art'
    'note art';
  align-items: center;
  gap: 14px 30px;
  padding: 42px;
  border-radius: 8px;
  background: radial-gradient(ellipse at 88% 50%, #285031, transparent 58%), linear-gradient(120deg, #183b25, var(--surface-deep));
  box-shadow: var(--shadow);
}

.lead h1 {
  grid-area: title;
  align-self: end;
  max-width: 16ch;
}

.lead p {
  grid-area: note;
  align-self: start;
  max-width: 39ch;
  color: var(--muted);
}

.lead-art {
  grid-area: art;
  justify-self: end;
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}

.topics,
.stories-section,
.featured {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

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

.section-bar::after {
  flex: 1 0 16px;
  border-block-end: 1px dotted var(--rule);
  content: '';
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 26px;
  font-weight: 700;
}

.topics ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-label {
  display: inline-block;
  max-width: 100%;
  padding: 3px 12px;
  border-radius: 6px;
  background: #203c27;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

.stories {
  display: grid;
  gap: 24px;
}

.story {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  grid-template-areas: 'preview copy';
  align-items: center;
  gap: 24px;
  min-width: 0;
  padding: 32px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) 188px;
  grid-template-areas: 'copy preview';
  background: #173825;
}

.story-preview {
  grid-area: preview;
  display: block;
  width: 100%;
  max-width: 188px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: var(--surface-deep);
  object-fit: cover;
}

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

.story h3 {
  display: grid;
  align-content: center;
  min-block-size: 2.4em;
  font-size: 32px;
  font-weight: 600;
}

.story-meta,
.duration {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

.action {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 7px 16px;
  font-size: 16px;
  text-decoration: none;
}

.featured {
  width: 75%;
}

.panels {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.panel {
  display: flex;
  flex: 0 0 44px;
  gap: 5px;
  min-width: 0;
}

.panel.is-current {
  flex: 1 1 0;
}

.panel-heading {
  display: flex;
  flex: none;
  width: 44px;
  font-size: 14px;
}

.panel-button {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 11px 4px;
  background: #24452e;
  color: var(--text);
}

.panel-button[aria-expanded='true'] {
  background: var(--accent);
  color: var(--ground);
}

.panel-content {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.slide-link {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  background: var(--surface-deep);
  color: var(--text);
  text-decoration: none;
}

.slide-link img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.slide-title {
  z-index: 1;
  grid-area: 1 / 1;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 0 0 6px 6px;
  background: #092013f2;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.25;
}

.slider-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.control {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
}

.playback {
  background: var(--accent);
}

.position {
  padding-inline: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.story-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  align-items: start;
  gap: 36px;
}

.story-page {
  width: 100%;
  max-width: 634px;
  min-width: 0;
  margin-left: auto;
  margin-right: 0;
}

.trail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  margin-block: 14px 10px;
  color: var(--muted);
  font-size: 15px;
}

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

.reading {
  min-width: 0;
  margin-block-start: 26px;
  padding-block-start: 24px;
  border-block-start: 1px dotted var(--rule);
}

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

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

.reading p,
.reading ul,
.reading ol {
  margin-block: 0 1em;
}

.reading h2 {
  margin-block: 1.35em 0.55em;
  color: var(--primary);
  font-size: 30px;
  font-weight: 700;
}

.reading h3 {
  margin-block: 1.25em 0.55em;
  font-size: 23px;
  font-weight: 600;
}

.reading blockquote {
  margin: 1.45em 0;
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface-deep);
}

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

.reading cite {
  color: var(--accent);
  font-size: 15px;
  font-style: normal;
  font-weight: 500;
}

.reading em {
  font-style: normal;
  font-weight: 600;
}

.reading ul,
.reading ol {
  padding-inline-start: 1.5em;
}

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

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

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

.reading table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

.reading caption {
  padding-block: 8px;
  color: var(--accent);
  font-weight: 600;
  text-align: start;
}

.reading th,
.reading td {
  padding: 10px 12px;
  border-block-end: 1px dotted var(--rule);
  vertical-align: top;
  text-align: start;
}

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

.reading img {
  max-width: 100%;
  height: auto;
}

.reading pre {
  max-width: 100%;
  overflow: auto;
}

.side-note {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-note h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.side-note p {
  color: var(--muted);
  font-size: 16px;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
  padding-block: 21px 26px;
  border-block-start: 1px dotted var(--rule);
}

.colophon p {
  color: var(--muted);
  font-size: 15px;
}

.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.site-title,
.site-nav a,
.foot-nav a,
.story,
.action,
.nav-button,
.control,
.panel-button,
.slide-link {
  transition: box-shadow 150ms ease;
}

.site-title:hover,
.site-nav a:hover,
.foot-nav a:hover,
.story:hover,
.story:focus-within,
.action:hover,
.nav-button:hover,
.control:hover,
.panel-button:hover,
.slide-link:hover {
  box-shadow: var(--shadow-hover);
}

@keyframes enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes reveal-menu {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(0);
  }
}

.in-view {
  animation: enter 150ms ease-out 100ms both;
}

.panel.is-current .panel-content {
  animation: enter 150ms ease-out both;
}

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

  .side-note {
    justify-self: end;
    width: 100%;
    max-width: 634px;
  }
}

@media (max-width: 960px) {
  .lead {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'title'
      'note'
      'art';
  }

  .lead-art {
    justify-self: start;
    max-width: 240px;
  }

  .story,
  .story:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'preview'
      'copy';
  }

  .story-preview {
    justify-self: center;
    max-width: 340px;
  }

  .featured {
    width: 100%;
  }

  .panels,
  .panel {
    flex-direction: column;
  }

  .panel,
  .panel.is-current {
    flex: 0 0 auto;
  }

  .panel-heading {
    width: 100%;
  }

  .panel-button {
    justify-content: flex-start;
    align-items: center;
    padding-inline: 14px;
  }
}

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

  h1 {
    font-size: clamp(28px, 5vw, 40px);
  }

  main.content-frame {
    padding-block: 24px 42px;
  }

  .masthead {
    min-height: 64px;
    padding-block: 8px;
  }

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

  .site-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    padding-block-end: 4px;
  }

  .site-nav.is-open {
    animation: reveal-menu 150ms ease-out both;
  }

  .site-nav a {
    padding-block: 9px;
  }

  .home {
    gap: 42px;
  }

  .lead,
  .story {
    padding: 24px;
  }

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

  .reading h2 {
    font-size: 26px;
  }
}

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

  .jump {
    inset-inline-start: 22px;
  }

  .lead,
  .story,
  .side-note {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .in-view,
  .site-nav.is-open,
  .panel.is-current .panel-content {
    animation: none;
  }

  .site-title,
  .site-nav a,
  .foot-nav a,
  .story,
  .action,
  .nav-button,
  .control,
  .panel-button,
  .slide-link {
    transition: none;
  }
}

.article-cover { display:block; width:100%; height:auto; aspect-ratio:3/2; border-radius:6px; margin-block:20px; object-fit:cover; }
.story-preview { aspect-ratio:3/2; }
.slide-meta { display:block; color:var(--accent); font-size:14px; }
.related-links { padding-inline-start:20px; }
.related-links li+li { margin-top:10px; }
.story h3 a { color:inherit; text-decoration:none; }
.story h3 a:hover { text-decoration:underline; }

/* Keep the long introductory word intact instead of breaking at arbitrary letters. */
.lead h1 {
  min-width:0;
  max-width:none;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}
@media(max-width:480px) {
  .lead h1 {font-size:clamp(22px,6.8vw,28px);}
}
