:root {
  color-scheme: light;
  --content-max: 1460px;
  --ink: #24271f;
  --ink-soft: #5d6255;
  --paper: #e9dfc6;
  --paper-bright: #f7f0dc;
  --paper-deep: #cdb079;
  --olive-950: #252d25;
  --olive-900: #30382e;
  --olive-800: #3c4737;
  --red: #9c3c2d;
  --gold: #d9a94a;
  --gold-hot: #f0c46a;
  --line: rgba(54, 56, 44, 0.19);
  --dark-line: #3a3527;
  --shadow: 0 22px 55px rgba(25, 28, 22, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  background: #080806;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(217, 169, 74, .08), transparent 32rem),
    linear-gradient(135deg, #080806, #11100b 58%, #070705);
}
a { color: inherit; }
button, input, select { font: inherit; }
a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(185, 106, 44, 0.55);
  outline-offset: 3px;
}
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: #fff; padding: .8rem 1rem; }
.skip:focus { top: 1rem; }

/* The public Dispatches retain the landing page's product navigation and CTA. */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 12, 8, 0.96);
  border-bottom: 1px solid var(--dark-line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100%, var(--content-max));
  min-height: 132px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.site-mark-link { display: inline-flex; flex: 0 0 auto; }
.site-mark { display: block; width: clamp(240px, 26vw, 340px); height: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(.5rem, 1.7vw, 1.35rem); margin-left: auto; }
.site-nav a {
  color: #a99d78;
  font: 700 .9rem/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav a.current { color: var(--gold); }
.site-nav a.play-cta {
  border-radius: 4px;
  background: var(--gold);
  color: #1a1408;
  font-weight: 800;
  padding: .65rem 1rem;
  white-space: nowrap;
}
.site-nav a.play-cta:hover { background: var(--gold-hot); color: #1a1408; }

.dispatch-main { min-height: 70vh; }
.dispatch-library { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.dispatch-masthead { padding: clamp(2.5rem, 5vw, 4.5rem) 0 .35rem; }
.dispatch-wrap { width: min(100%, var(--content-max)); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid rgba(217, 169, 74, .2);
  margin-bottom: 1.4rem;
  padding-bottom: 1.35rem;
}
.library-heading h1 {
  margin: 0;
  max-width: none;
  color: var(--red);
  font: 600 clamp(1.9rem, 3.4vw, 3rem)/1.04 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}
@media (min-width: 821px) {
  .library-heading h1 { white-space: nowrap; }
}
.library-heading h2 {
  margin: .65rem 0 0;
  color: #f3ead1;
  font: 700 clamp(1.05rem, 1.55vw, 1.5rem)/1.16 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: -.01em;
  line-height: 1.12;
}
.library-heading p.library-deck { max-width: 900px; margin: .8rem 0 0; color: #b9ad86; font-size: 1.02rem; line-height: 1.55; }
.archive-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem); gap: 1rem; margin-bottom: 1rem; }
.article-archive-tools { margin-bottom: 0; }
.archive-tools label {
  display: grid;
  gap: .45rem;
  color: #b9ad86;
  font: 800 .72rem/1.3 system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.archive-tools input, .archive-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-bright);
  color: var(--ink);
  font: 1rem/1.2 system-ui, sans-serif;
  padding: .72rem;
}
.active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-left: 4px solid var(--red);
  background: rgba(251, 247, 234, .72);
  color: var(--ink-soft);
  margin: .75rem 0;
  padding: .7rem .85rem;
  font: 700 .8rem/1.4 system-ui, sans-serif;
}
.active-filter[hidden] { display: none; }
.active-filter a { color: var(--red); }
.result-count { margin: 1rem 0; color: #b9ad86; font: 700 .84rem/1.4 system-ui, sans-serif; }

.dispatch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dispatch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid var(--paper-deep);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(33, 36, 29, .07);
}
.dispatch-card::before { position: absolute; z-index: 1; inset: 0 0 auto; height: 4px; background: var(--red); content: ""; }
.dispatch-card[hidden] { display: none; }
.card-image-link { display: block; flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #1d201a; }
.dispatch-card-image { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 180ms ease; }
.card-image-link:hover .dispatch-card-image { transform: scale(1.015); }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.dispatch-number {
  color: var(--red);
  font: 800 .7rem/1.3 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.dispatch-card h2 { margin: .62rem 0; font-size: 1.45rem; font-weight: 500; line-height: 1.12; }
.dispatch-card h2 a { text-decoration: none; }
.dispatch-card h2 a:hover { color: var(--red); }
.article-meta-line { margin-bottom: .7rem; color: #7a705b; font: .72rem/1.4 system-ui, sans-serif; }
.taxonomy-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.taxonomy-pills a {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--olive-800);
  color: #fff8e8;
  font: 750 .65rem/1.2 system-ui, sans-serif;
  padding: .36rem .5rem;
  text-decoration: none;
}
.taxonomy-pills a:hover { border-color: var(--red); background: var(--red); }
.card-excerpt { margin: .8rem 0 0; color: var(--ink-soft); line-height: 1.55; }
.article-tag-line { margin-top: .8rem; color: #7a705b; font: .68rem/1.55 system-ui, sans-serif; }
.article-tag-line a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article-tag-line a:hover { color: var(--red); }
.card-copy footer { margin-top: auto; padding-top: 1rem; }
.open-dispatch {
  display: inline-block;
  border-radius: 9px;
  background: var(--olive-800);
  color: #fff8e8;
  font: 800 .78rem/1.2 system-ui, sans-serif;
  padding: .72rem .82rem;
  text-decoration: none;
}
.open-dispatch:hover { background: var(--red); }
.empty { border: 1px dashed var(--line); border-radius: 14px; background: rgba(251, 247, 234, .75); color: var(--ink-soft); padding: 2rem; text-align: center; }

/* Article reader: the editorial page remains part of the same site and funnel. */
.article-shell { width: min(100%, var(--content-max)); margin: 0 auto; padding: 0 clamp(.75rem, 3vw, 2rem); }
.article-paper {
  border: 1px solid var(--paper-deep);
  background: var(--paper);
  box-shadow: var(--shadow);
  line-height: 1.75;
  padding: clamp(1.5rem, 6vw, 5.5rem);
}
.article-kicker { color: var(--red); font: 800 .76rem/1.3 system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.article-paper h1 { width: 100%; max-width: none; margin: .6rem 0 2rem; font-size: clamp(2.45rem, 7vw, 5rem); line-height: .98; text-wrap: balance; }
.article-paper h2 { margin: 2.8rem 0 .8rem; color: var(--red); font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.15; }
.article-paper h3 { margin: 2rem 0 .7rem; font-size: 1.3rem; }
.article-paper p { margin: 0 0 1.15rem; }
.article-paper blockquote { border-left: 5px solid var(--red); color: var(--ink-soft); font-style: italic; margin: 2rem 0; padding: .5rem 0 .5rem 1.25rem; }
.article-paper figure { margin: 2rem 0; }
.article-paper img { display: block; width: 100%; height: auto; border-radius: 5px; background: #d8ceb7; }
.article-paper figcaption { margin-top: .55rem; color: var(--ink-soft); font-size: .88rem; font-style: italic; line-height: 1.5; }
.article-taxonomy { display: grid; gap: 1.2rem; border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 1.7rem; }
.article-taxonomy h2 { margin: 0 0 .6rem; color: var(--ink); font: 800 .72rem/1.3 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.article-taxonomy .keyword-pills a { border-color: #7f2f24; background: var(--red); color: #fff8e8; }
.article-taxonomy .keyword-pills a:hover { border-color: #6e271e; background: #7f2f24; color: #fff8e8; }
.article-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(100%, var(--content-max));
  margin: 1.4rem auto 3rem;
  padding: 0 clamp(.75rem, 3vw, 2rem);
  color: #b9ad86;
  font: 800 .82rem/1.35 system-ui, sans-serif;
}
.article-nav-top { margin-top: 1.4rem; margin-bottom: 1.4rem; }
.article-nav a { text-decoration: none; }
.article-nav a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article-nav .all { border-radius: 999px; background: var(--olive-800); color: #fff8e8; padding: .62rem .8rem; text-align: center; }
.article-nav .all:hover { background: var(--red); color: #fff8e8; }
.article-nav .next { text-align: right; }
.site-foot { border-top: 1px solid var(--dark-line); background: #0d0c08; color: #a99d78; padding: 2.4rem 1rem; text-align: center; font: 700 .78rem/1.5 system-ui, sans-serif; }
.site-foot a { color: var(--gold); }
.site-foot-links { margin-bottom: 1.15rem; }
.site-foot-rights { color: #a99d78; }
#to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  color: #1a1408;
  cursor: pointer;
  font: 800 22px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, background .15s ease, transform .15s ease;
}
#to-top:hover { background: var(--gold-hot); transform: translateY(-2px); }
#to-top:focus-visible { outline: 3px solid #fff3cf; outline-offset: 3px; }
#to-top.is-visible { opacity: 1; pointer-events: auto; }

@media (max-width: 1080px) {
  .dispatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .site-wrap { min-height: 84px; }
  .site-mark { width: min(52vw, 220px); }
  .site-nav a.hide-sm { display: none; }
  .library-heading { align-items: start; flex-direction: column; }
  .article-nav { grid-template-columns: 1fr 1fr; }
  .article-nav .all { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 620px) {
  .site-nav a.play-cta { font-size: .68rem; padding: .55rem .65rem; }
  .archive-tools, .dispatch-grid { grid-template-columns: 1fr; }
  .dispatch-card { min-height: 0; }
  .article-paper { padding: 1.5rem 1.1rem; }
  .article-paper h1 { font-size: 2.45rem; }
  .article-nav { font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dispatch-card-image { transition: none; }
  #to-top { transition: none; }
}
