:root {
  --cream: #f0ebe0;
  --paper: #fbf7ee;
  --dark: #1a1208;
  --orange: #c94e1e;
  --green: #1a5c2e;
  --muted: #6b6256;
  --border: #c8bfa8;
  --ink-soft: #3a2b1c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--cream);
  color: var(--dark);
  font-family: "DM Sans", sans-serif;
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--cream);
  min-height: 100vh;
  overflow-x: clip;
}

a,
button,
input,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(201, 78, 30, 0.38);
  outline-offset: 3px;
}

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

.hidden {
  display: none !important;
}

.ticker-wrap {
  background: var(--dark);
  border-bottom: 2px solid var(--orange);
  color: var(--orange);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  height: 38px;
  letter-spacing: 2px;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.ticker-track {
  animation: ticker 35s linear infinite;
  display: inline-block;
  left: 0;
  position: absolute;
  top: 10px;
}

.ticker-track span {
  margin: 0 24px;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.site-nav {
  align-items: center;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 24px;
  height: 72px;
  justify-content: space-between;
  padding: 0 48px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-logo {
  align-items: center;
  color: var(--dark);
  display: flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.logo-icon {
  align-items: center;
  background: var(--cream);
  border: 2px solid var(--dark);
  border-radius: 50%;
  display: flex;
  flex: 0 0 auto;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.logo-text,
.logo-sub,
.nav-links a,
.nav-cta,
.panel-kicker,
.article-kicker,
.article-meta,
.filter-button,
.sidebar-box span,
.source-domain,
.more-item span,
.footer-title,
.footer-bottom {
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
}

.logo-text {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.25;
}

.logo-sub {
  color: var(--orange);
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  line-height: 1.4;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--orange);
}

.nav-cta,
.button-link {
  background: var(--dark);
  color: var(--cream);
  display: inline-flex;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 2px;
  min-height: 44px;
  padding: 14px 22px;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-cta:hover,
.button-link:hover {
  background: var(--orange);
}

.blog-shell,
.article-shell {
  margin: 0 auto;
  max-width: 1300px;
  padding: 0 48px;
  width: 100%;
}

.blog-hero {
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) 320px;
  padding: 78px 0 54px;
}

.blog-hero h1,
.article-hero h1,
.not-found h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(54px, 9vw, 118px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
}

.blog-hero h1 span,
.article-hero h1 span,
.more-posts h2,
.article-panel h2 {
  color: var(--green);
  font-style: italic;
}

.blog-hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  margin-top: 28px;
  max-width: 620px;
  overflow-wrap: anywhere;
}

.issue-box {
  align-self: start;
  background: var(--dark);
  color: var(--cream);
  padding: 26px;
}

.issue-box strong {
  color: var(--orange);
  display: block;
  font-family: "Fraunces", serif;
  font-size: 42px;
  line-height: 1;
  margin: 10px 0;
}

.issue-box span {
  color: #9d9488;
  display: block;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.panel-kicker {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 18px;
}

.archive-controls {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 1fr) auto;
  padding: 24px 0;
}

.search-input {
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--dark);
  min-height: 52px;
  padding: 14px 16px;
  width: 100%;
}

.search-input:focus {
  border-color: var(--orange);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  min-height: 38px;
  padding: 10px 12px;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--cream);
}

.featured-dispatch {
  border-bottom: 1px solid var(--border);
  padding: 42px 0;
}

.featured-card {
  color: var(--dark);
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  text-decoration: none;
}

.featured-card:hover h2,
.dispatch-row:hover h2,
.more-item:hover strong {
  color: var(--orange);
}

.featured-card h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 20px;
}

.dispatch-meta {
  color: var(--orange);
  display: flex;
  flex-wrap: wrap;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.featured-card p,
.dispatch-row p,
.more-item em {
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
  line-height: 1.7;
}

.featured-image,
.dispatch-thumb,
.article-image {
  background: var(--dark);
  overflow: hidden;
}

.featured-image {
  aspect-ratio: 4 / 3;
}

.featured-image img,
.dispatch-thumb img,
.article-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.fallback-art {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(201, 78, 30, 0.2), rgba(26, 92, 46, 0.18)),
    var(--dark);
  color: var(--orange);
  display: flex;
  font-family: "Fraunces", serif;
  font-size: 56px;
  font-weight: 900;
  height: 100%;
  justify-content: center;
  min-height: 220px;
}

.dispatch-list {
  border-bottom: 1px solid var(--border);
  margin-bottom: 72px;
}

.dispatch-row {
  color: var(--dark);
  display: grid;
  gap: 26px;
  grid-template-columns: 96px minmax(0, 1fr) 190px;
  padding: 34px 0;
  text-decoration: none;
}

.dispatch-row + .dispatch-row {
  border-top: 1px solid var(--border);
}

.dispatch-number {
  color: var(--orange);
  font-family: "Fraunces", serif;
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
}

.dispatch-row h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin-bottom: 12px;
}

.dispatch-thumb {
  aspect-ratio: 4 / 3;
}

.empty-state,
.not-found {
  margin: 0 auto;
  max-width: 900px;
  padding: 96px 24px;
}

.empty-state {
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.article-hero {
  border-bottom: 1px solid var(--border);
  padding: 72px 0 38px;
}

.article-kicker,
.article-meta {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.article-hero h1 {
  max-width: 1040px;
}

.article-standfirst {
  color: var(--muted);
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.5;
  margin-top: 28px;
  max-width: 880px;
}

.article-meta {
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
  padding-top: 18px;
}

.preview-ribbon {
  background: var(--orange);
  color: white;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 22px;
  padding: 12px 16px;
  text-transform: uppercase;
}

.article-image {
  margin: 36px 0 0;
  max-height: 620px;
}

.article-image figcaption {
  background: var(--dark);
  color: #b7aa99;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 12px 16px;
  text-transform: uppercase;
}

.article-layout {
  align-items: start;
  display: grid;
  gap: 58px;
  grid-template-columns: 240px minmax(0, 760px);
  justify-content: center;
  padding: 58px 0;
}

.article-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 100px;
}

.sidebar-box {
  border: 1px solid var(--border);
  padding: 18px;
}

.sidebar-box span {
  color: var(--muted);
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.sidebar-box strong {
  color: var(--dark);
  display: block;
  font-family: "Fraunces", serif;
  font-size: 24px;
  line-height: 1.05;
}

.article-content {
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.86;
}

.article-content > * + * {
  margin-top: 1.15em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--dark);
  font-family: "Fraunces", serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  margin-top: 1.65em;
}

.article-content h1 { font-size: 48px; }
.article-content h2 { font-size: 38px; }
.article-content h3 { font-size: 30px; }
.article-content h4 { font-size: 24px; }

.article-content a {
  color: var(--orange);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.article-content blockquote {
  border-left: 5px solid var(--orange);
  color: var(--dark);
  font-family: "Fraunces", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  padding-left: 24px;
}

.article-content ul,
.article-content ol {
  padding-left: 26px;
}

.article-content li + li {
  margin-top: 8px;
}

.article-content table {
  border-collapse: collapse;
  display: block;
  font-size: 15px;
  overflow-x: auto;
  width: 100%;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: var(--dark);
  color: var(--cream);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.article-content img {
  margin: 24px 0;
}

.article-panel,
.more-posts {
  border-top: 1px solid var(--border);
  padding: 52px 0;
}

.article-panel h2,
.more-posts h2 {
  color: var(--dark);
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 26px;
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

.faq-list details {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.faq-list summary {
  color: var(--dark);
  cursor: pointer;
  font-family: "Fraunces", serif;
  font-size: 23px;
  font-weight: 700;
}

.faq-list p {
  color: var(--muted);
  line-height: 1.7;
  margin-top: 12px;
}

.source-list,
.related-files,
.more-grid {
  display: grid;
  gap: 12px;
}

.source-item,
.related-files a,
.more-item {
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--dark);
  display: grid;
  gap: 8px;
  padding: 20px;
  text-decoration: none;
}

.source-item:hover,
.related-files a:hover,
.more-item:hover {
  border-color: var(--orange);
}

.source-domain,
.related-files span,
.more-item span {
  color: var(--orange);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 2px;
}

.source-item strong,
.related-files strong,
.more-item strong {
  font-family: "Fraunces", serif;
  font-size: 25px;
  line-height: 1.1;
}

.source-item span:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.site-footer {
  background: var(--dark);
  color: var(--cream);
  margin-top: 24px;
  padding: 54px 48px 28px;
}

.footer-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 2fr 1fr 1fr;
  margin: 0 auto 38px;
  max-width: 1300px;
}

.footer-brand {
  color: white;
  font-family: "Space Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.25;
}

.footer-tagline {
  color: #81776d;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 440px;
}

.footer-title {
  color: var(--orange);
  font-size: 10px;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.site-footer a {
  color: #a99f94;
  display: block;
  margin-top: 10px;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #34261a;
  color: #6e6259;
  font-size: 10px;
  letter-spacing: 1px;
  margin: 0 auto;
  max-width: 1300px;
  padding-top: 22px;
}

.not-found p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin: 22px 0;
}

@media (max-width: 980px) {
  .site-nav {
    padding: 0 28px;
  }

  .nav-links {
    gap: 18px;
  }

  .blog-shell,
  .article-shell {
    padding: 0 28px;
  }

  .blog-hero,
  .featured-card,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }

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

@media (max-width: 760px) {
  .ticker-wrap {
    align-items: center;
    display: flex;
    font-size: 10px;
    height: 32px;
  }

  .ticker-track {
    animation: none;
    display: block;
    overflow: hidden;
    position: static;
    width: 100%;
  }

  .ticker-track span:nth-child(n+4) {
    display: none;
  }

  .site-nav {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    height: auto;
    padding: 12px 18px 14px;
  }

  .nav-logo {
    width: 100%;
  }

  .logo-icon {
    height: 40px;
    width: 40px;
  }

  .nav-links {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 2;
    width: 100%;
  }

  .nav-links a {
    border: 1px solid var(--border);
    font-size: 10px;
    padding: 9px 4px;
    text-align: center;
  }

  .nav-cta {
    display: none;
  }

  .blog-shell,
  .article-shell {
    max-width: 100vw;
    padding: 0 20px;
    width: 100vw;
  }

  .blog-hero {
    padding: 48px 0 36px;
  }

  .blog-hero p,
  .issue-box span,
  .empty-state p {
    max-width: calc(100vw - 72px);
  }

  .issue-box {
    width: 100%;
  }

  .blog-hero h1,
  .article-hero h1,
  .not-found h1 {
    font-size: 58px;
  }

  .archive-controls {
    grid-template-columns: 1fr;
  }

  .filter-row {
    justify-content: flex-start;
  }

  .dispatch-row {
    grid-template-columns: 1fr;
  }

  .dispatch-number {
    font-size: 42px;
  }

  .dispatch-thumb {
    max-width: 260px;
  }

  .article-hero {
    padding: 48px 0 32px;
  }

  .article-layout {
    gap: 30px;
    padding: 38px 0;
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }

  .article-content {
    font-size: 17px;
    line-height: 1.78;
  }

  .article-content h1 { font-size: 38px; }
  .article-content h2 { font-size: 32px; }
  .article-content h3 { font-size: 26px; }

  .article-content blockquote {
    font-size: 23px;
  }

  .site-footer {
    padding: 46px 20px 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 420px) {
  .blog-hero h1,
  .article-hero h1,
  .not-found h1 {
    font-size: 46px;
  }

  .blog-hero p,
  .issue-box span,
  .empty-state p {
    max-width: 300px;
  }

  .featured-card h2 {
    font-size: 36px;
  }

  .dispatch-row h2 {
    font-size: 30px;
  }

  .archive-controls {
    padding-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
