:root {
  color-scheme: light;
  --paper: #fffdf8;
  --surface: #ffffff;
  --surface-warm: #fff4e9;
  --ink: #1f2926;
  --muted: #66706c;
  --line: #e7ded3;
  --accent: #d94f0b;
  --accent-strong: #a93500;
  --accent-soft: #ffe2c6;
  --green: #285f4b;
  --focus: #075cca;
  --shadow: 0 14px 38px rgb(72 47 26 / 9%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-width: 18rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 95% 0, rgb(255 221 188 / 52%), transparent 25rem),
    var(--paper);
  font-size: 1rem;
  line-height: 1.65;
}

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

a:hover {
  color: var(--accent);
}

a:focus-visible {
  border-radius: 0.2rem;
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.2rem;
}

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

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

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  color: white;
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid rgb(231 222 211 / 80%);
  background: rgb(255 253 248 / 92%);
}

.header-inner {
  display: flex;
  width: min(100% - 2rem, 64rem);
  min-height: 5rem;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav a {
  min-height: 2.75rem;
  padding: 0.62rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.page-shell {
  width: min(100% - 2rem, 64rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 8vw, 6rem);
}

.hero,
.archive-heading,
.edition-heading {
  max-width: 50rem;
  margin-bottom: clamp(2.5rem, 7vw, 5rem);
}

.hero h1,
.archive-heading h1,
.edition-heading h1 {
  max-width: 17ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.35rem, 9vw, 5.4rem);
  letter-spacing: -0.055em;
}

.archive-heading h1,
.edition-heading h1 {
  font-size: clamp(2.25rem, 8vw, 4.6rem);
}

.hero p,
.archive-heading > p:last-child,
.hero-intro {
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
}

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  margin-bottom: 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 5vw, 2.2rem);
  letter-spacing: -0.035em;
}

.section-heading > a {
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 700;
}

.latest-edition,
.recent-editions {
  margin-top: clamp(3rem, 8vw, 6rem);
}

.story-list,
.edition-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 1rem;
}

.story-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story-card article {
  display: grid;
  min-height: 100%;
  padding: clamp(1.25rem, 5vw, 2rem);
  align-content: start;
}

.story-number {
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-warm);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.story-title {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.story-title a {
  color: var(--ink);
  text-decoration-color: var(--accent-soft);
  text-decoration-thickness: 0.14em;
}

.story-title a:hover {
  text-decoration-color: var(--accent);
}

.story-summary {
  margin-bottom: 1.4rem;
  color: #414b47;
  overflow-wrap: anywhere;
}

.story-source {
  display: inline-flex;
  width: fit-content;
  min-height: 2.75rem;
  margin-top: auto;
  padding-top: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

a.story-source {
  text-decoration-color: rgb(40 95 75 / 35%);
}

.source-name {
  color: var(--ink);
}

.source-host {
  font-variant-numeric: tabular-nums;
}

.source-arrow {
  margin-left: 0.35rem;
}

.edition-list {
  gap: 0.75rem;
}

.edition-card a {
  display: grid;
  min-height: 7rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgb(255 255 255 / 78%);
  color: var(--ink);
  text-decoration: none;
  gap: 0.22rem;
}

.edition-card a:hover {
  border-color: #efb98c;
  background: var(--surface);
}

.edition-card time {
  font-size: 1.05rem;
  font-weight: 800;
}

.edition-count,
.edition-intro {
  color: var(--muted);
  font-size: 0.88rem;
}

.edition-intro {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}

.edition-action {
  margin-top: 0.65rem;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.back-link {
  display: inline-flex;
  min-height: 2.75rem;
  margin-bottom: 2rem;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.empty-state {
  padding: 1.25rem;
  border: 1px dashed #d8c9b8;
  border-radius: 0.85rem;
  background: rgb(255 255 255 / 55%);
  color: var(--muted);
}

.pagination {
  display: grid;
  margin-top: 2rem;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  font-size: 0.82rem;
  text-align: center;
}

.pagination a,
.pagination-disabled {
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
}

.pagination a:last-child,
.pagination-disabled:last-child {
  justify-self: end;
}

.pagination-disabled {
  color: #9aa19e;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 44rem) {
  .header-inner,
  .page-shell {
    width: min(100% - 3rem, 64rem);
  }

  .site-nav {
    gap: 0.5rem;
  }

  .site-nav a {
    padding-inline: 1rem;
  }

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

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

@media (max-width: 31rem) {
  .brand small {
    display: none;
  }

  .brand img {
    width: 2.35rem;
    height: 2.35rem;
  }

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

  .pagination {
    grid-template-columns: 1fr 1fr;
  }

  .pagination > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

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

@media print {
  body {
    background: white;
  }

  .site-nav,
  .skip-link,
  .back-link,
  .section-heading > a,
  .pagination {
    display: none;
  }

  .story-card,
  .edition-card a {
    break-inside: avoid;
    box-shadow: none;
  }
}
