/* ==========================================================================
   The Engineering Dispatch — Layout & Editorial Composition
   Asymmetric cover, open TOC rail, tactile rules, disciplined grid.
   ========================================================================== */

/* Shared Site Geometry */
.site-container,
.site-header-inner,
.site-footer-inner {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.site-main {
  min-height: 65vh;
}

/* ==========================================================================
   1. Publication Masthead Bar (Sticky Slim Header)
   ========================================================================== */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: var(--page);
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand-code {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-name strong {
  color: var(--accent);
  font-weight: 800;
}

.brand-edition {
  display: inline-block;
  padding: 1px 6px;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.preview-badge {
  display: inline-block;
  padding: 1px 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xs);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline: auto;
}

.primary-nav a {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding-block: 6px;
  transition: color 120ms ease;
}

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

.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  transition: color 120ms ease, border-color 120ms ease;
}

.production-link:hover {
  color: var(--text);
  border-color: var(--rule-strong);
}

/* ==========================================================================
   2. Home Page: Editorial Cover & Asymmetric Spread
   ========================================================================== */

.home-publication {
  padding-top: 12px;
  padding-bottom: 84px;
}

.cover-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  align-items: start;
  padding-block: 44px 40px;
  border-bottom: 2px solid var(--rule-strong);
}

.cover-main {
  min-width: 0;
}

.cover-folio-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.folio-tag {
  color: var(--accent);
  font-weight: 750;
}

.folio-dot {
  color: var(--rule-strong);
}

.cover-headline {
  margin: 0;
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.14;
  color: var(--text);
  word-break: break-word;
}

.cover-dek {
  max-width: 660px;
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
}

.cover-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.cover-action-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--rule-strong);
  padding-bottom: 2px;
  transition: color 120ms ease, border-color 120ms ease;
}

.cover-action-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Right Side: Issue Index Rail */
.cover-index-rail {
  padding-left: 36px;
  border-left: 1px solid var(--rule);
}

.rail-masthead {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  margin-bottom: 14px;
  letter-spacing: 0.06em;
}

.rail-flag {
  color: var(--accent);
}

.rail-topics-list {
  display: flex;
  flex-direction: column;
}

.rail-topic-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: color 120ms ease, padding-left 120ms ease;
}

.rail-topic-link:hover {
  color: var(--accent);
  padding-left: 4px;
}

.rail-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.rail-name {
  flex: 1;
}

.rail-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
}

.rail-separator {
  height: 1px;
  margin: 18px 0;
}

.rail-colophon-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
}

.stat-k {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
}

.stat-v {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.rail-syndication-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.rail-syndication-row a {
  color: var(--text-muted);
  transition: color 120ms ease;
}

.rail-syndication-row a:hover {
  color: var(--accent);
}

.rail-dot {
  color: var(--rule-strong);
}

/* ==========================================================================
   3. Featured Lead Story Row
   ========================================================================== */

.featured-story {
  padding-block: 40px;
  border-bottom: 1px solid var(--rule);
}

.featured-top-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.featured-eyebrow {
  color: var(--accent);
}

.featured-dateline {
  color: var(--text-subtle);
}

.featured-story-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.featured-story.with-media .featured-story-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
}

.featured-category-stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cat-cue);
  margin-bottom: 8px;
}

.featured-title {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.24;
}

.featured-title a {
  color: var(--text);
  transition: color 120ms ease;
}

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

.featured-summary {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
}

.featured-story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-subtle);
}

.story-meta-time,
.story-meta-words {
  font-family: var(--mono);
  font-size: 12px;
}

.story-meta-sep {
  color: var(--rule);
}

.story-meta-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-tag {
  color: var(--text-subtle);
  font-size: 12px;
}

.featured-cta {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  transition: transform 120ms ease;
}

.featured-cta:hover {
  transform: translateX(3px);
}

.featured-story-media {
  min-width: 0;
}

.featured-media-frame {
  display: block;
  border: 1px solid var(--rule);
  background: var(--surface-raised);
  overflow: hidden;
  max-height: 340px;
}

.featured-media-frame img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.featured-media-frame:hover img {
  transform: scale(1.02);
}

/* ==========================================================================
   4. Dispatch Stream (Numbered Rows, Tactile Separators)
   ========================================================================== */

.dispatch-index-section {
  padding-top: 48px;
}

.section-masthead-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--rule-strong);
}

.masthead-pre {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.masthead-heading {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text);
}

.masthead-view-all {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-muted);
  transition: color 120ms ease;
}

.masthead-view-all:hover {
  color: var(--accent);
}

.dispatch-stream {
  display: flex;
  flex-direction: column;
}

.dispatch-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 10px;
  border-bottom: 1px solid var(--rule);
  transition: background-color 140ms ease;
}

.dispatch-row.has-media {
  grid-template-columns: 100px minmax(0, 1fr) 180px;
}

.dispatch-row:hover {
  background-color: var(--surface-raised);
}

.dispatch-rail-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dispatch-num {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.dispatch-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-subtle);
}

.dispatch-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-subtle);
}

.dispatch-main-col {
  min-width: 0;
}

.dispatch-cat-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cat-cue);
  margin-bottom: 5px;
}

.dispatch-cat-tag:hover {
  color: var(--accent);
}

.dispatch-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.dispatch-title a {
  color: var(--text);
  transition: color 120ms ease;
}

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

.dispatch-lede {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.dispatch-colophon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
}

.dispatch-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dispatch-tag {
  color: var(--text-subtle);
  transition: color 120ms ease;
}

.dispatch-tag:hover {
  color: var(--accent);
}

.dispatch-read-more {
  margin-left: auto;
  font-weight: 700;
  color: var(--accent);
  transition: transform 120ms ease;
}

.dispatch-read-more:hover {
  transform: translateX(3px);
}

.dispatch-media-col {
  min-width: 0;
}

.dispatch-media-frame {
  display: block;
  width: 100%;
  height: 105px;
  border: 1px solid var(--rule);
  background: var(--surface-raised);
  overflow: hidden;
}

.dispatch-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.dispatch-media-frame:hover img {
  transform: scale(1.03);
}

.stream-footer-action {
  padding-top: 24px;
  text-align: center;
}

.btn-more-stream {
  display: inline-block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-xs);
  transition: background-color 120ms ease, color 120ms ease;
}

.btn-more-stream:hover {
  background-color: var(--rule-strong);
  color: var(--page);
}

/* ==========================================================================
   5. Closing Topic Band
   ========================================================================== */

.closing-topics-band {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 2px solid var(--rule-strong);
}

.closing-band-masthead {
  margin-bottom: 24px;
}

.band-tag {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.band-title {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 750;
  color: var(--text);
}

.closing-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.closing-topic-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.closing-topic-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}

.closing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.closing-topic-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.closing-topic-count {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.closing-card-blurb {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.closing-card-arrow {
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* ==========================================================================
   6. Article Spread (Full-Width Masthead + Open Rail)
   ========================================================================== */

.article-spread {
  padding-bottom: 96px;
}

.article-masthead-band {
  background: var(--surface-tint);
  border-bottom: 1px solid var(--rule);
  padding: 44px 0 36px;
}

.masthead-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.crumb-sep {
  color: var(--rule-strong);
}

.masthead-breadcrumbs a {
  color: var(--text-subtle);
  transition: color 120ms ease;
}

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

.masthead-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
}

.article-category-badge {
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cat-cue);
}

.article-category-badge:hover {
  color: var(--accent);
}

.article-masthead-date {
  color: var(--text-subtle);
}

.article-main-title {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.18;
  color: var(--text);
  word-break: break-word;
}

.article-lead-deck {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

.article-byline-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.byline-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.byline-avatar {
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  object-fit: cover;
}

.byline-names {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.author-label {
  font-size: 11px;
  color: var(--text-subtle);
}

.byline-specs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-subtle);
}

.spec-k {
  font-family: var(--mono);
  font-size: 11px;
}

.spec-dot {
  color: var(--rule);
}

.byline-ai-trigger {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xs);
  transition: background-color 120ms ease;
}

.byline-ai-trigger:hover {
  background: var(--accent-soft);
}

.article-hero-media {
  margin: 28px 0 0;
  border: 1px solid var(--rule);
  max-height: 440px;
  overflow: hidden;
}

.article-hero-media img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

/* Article Reading Spread Grid (Measure + Open TOC Rail) */
.article-spread-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--reading-width)) 260px;
  gap: 56px;
  padding-top: 48px;
  align-items: start;
}

.article-reading-body {
  min-width: 0;
  max-width: var(--reading-width);
}

/* Open Right Rail: Pure Typographic Hierarchy, No Card */
.article-open-rail {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}

.article-toc details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.article-toc details summary::-webkit-details-marker {
  display: none;
}

.rail-toc-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.rail-toc-progress {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

#toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#toc-nav ul ul {
  padding-left: 14px;
}

#toc-nav li {
  margin-block: 8px;
}

#toc-nav a {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 120ms ease;
  display: block;
}

#toc-nav a:hover {
  color: var(--text);
}

#toc-nav a.is-active {
  color: var(--accent);
  font-weight: 700;
}

.rail-assistant-box {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.rail-ai-action {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-align: left;
  transition: color 120ms ease;
}

.rail-ai-action:hover {
  color: var(--accent-hover);
}

/* Article Colophon & Signature */
.article-terminal-colophon {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 2px solid var(--rule-strong);
}

.colophon-tags-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.tags-flag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
}

.tags-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-tag {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 120ms ease;
}

.terminal-tag:hover {
  color: var(--accent);
}

.colophon-box {
  padding: 20px;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  margin-bottom: 32px;
}

.colophon-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.colophon-code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  color: var(--accent);
}

.colophon-title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
}

.colophon-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.colophon-desc a {
  color: var(--accent);
  text-decoration: underline;
}

.colophon-link {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-subtle);
  overflow-wrap: anywhere;
}

.colophon-link a {
  color: var(--text-muted);
  margin-left: 6px;
}

.article-chronology-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chronology-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--rule);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 140ms ease;
}

.chronology-link:hover {
  border-color: var(--rule-strong);
}

.chrono-dir {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.chrono-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.4;
}

.link-next {
  text-align: right;
}

/* Collection Single Source Banner */
.collection-source-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  font-size: 13px;
  color: var(--text-muted);
}

.source-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  color: var(--accent);
}

.source-name {
  font-weight: 700;
  color: var(--text);
}

.source-link {
  color: var(--accent);
  font-weight: 650;
  margin-left: auto;
}

/* ==========================================================================
   7. Publication Index Pages (Listings, Archives, Taxonomy)
   ========================================================================== */

.dispatch-index-page {
  padding-block: 28px 84px;
}

.dispatch-page-masthead {
  padding-bottom: 24px;
  border-bottom: 2px solid var(--rule-strong);
  margin-bottom: 28px;
}

.masthead-badge-row {
  margin-bottom: 8px;
}

.masthead-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.masthead-kicker-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.masthead-title {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
  word-break: break-word;
}

.masthead-desc {
  max-width: 680px;
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

.index-meta-strip {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-subtle);
}

/* Archive Timeline */
.archive-year-epoch {
  margin-bottom: 56px;
}

.epoch-masthead {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 16px;
}

.epoch-year-num {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}

.epoch-rule-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.epoch-hairline {
  flex: 1;
  height: 2px;
  background: var(--rule-strong);
}

.epoch-count-badge {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  white-space: nowrap;
}

/* Taxonomy Terms Grid */
.taxonomy-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.taxonomy-term-tile {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.taxonomy-term-tile:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}

.term-tile-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.term-tile-name {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}

.term-tile-tally {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  color: var(--accent);
}

.term-tile-note {
  margin: 10px 0 20px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.term-tile-arrow {
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* Search Page Zone */
.search-page-wrap {
  max-width: 860px;
}

.search-command-zone {
  margin-bottom: 28px;
}

.standalone-search-field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius-xs);
}

.search-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text-subtle);
  stroke-width: 2;
}

.standalone-search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.standalone-search-field input::placeholder {
  color: var(--text-subtle);
  font-weight: 400;
}

.search-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-subtle);
}

.search-status {
  margin: 0;
}

.search-privacy-note {
  font-family: var(--mono);
}

/* 404 Editorial Container */
.not-found-page-wrap {
  padding-block: 64px 96px;
}

.not-found-dispatch {
  max-width: 640px;
}

.not-found-kicker {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.not-found-headline {
  margin: 0;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.not-found-desc {
  margin: 18px 0 32px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-muted);
}

.not-found-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ==========================================================================
   8. Publication Footer
   ========================================================================== */

.site-footer {
  border-top: 2px solid var(--rule-strong);
  background: var(--surface-tint);
  padding-block: 48px 36px;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.footer-code {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.footer-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.footer-title strong {
  color: var(--accent);
}

.footer-sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-left: 6px;
}

.footer-note {
  margin: 12px 0 0;
  max-width: 440px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.footer-col-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-group-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.footer-link-group a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 120ms ease;
}

.footer-link-group a:hover {
  color: var(--accent);
}

.footer-bottom-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  margin-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-subtle);
}

/* ==========================================================================
   9. Reading Progress & Back To Top
   ========================================================================== */

.reading-progress {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 80ms linear;
}

.back-to-top {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 24px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ==========================================================================
   10. Responsive Media Queries
   ========================================================================== */

@media (max-width: 980px) {
  .site-header-inner {
    gap: 16px;
  }

  .primary-nav {
    gap: 16px;
  }

  .cover-spread {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .cover-index-rail {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
  }

  .featured-story.with-media .featured-story-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-spread-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .article-open-rail {
    position: static;
    max-height: none;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 20px;
    order: -1;
  }

  .search-shortcut {
    display: none;
  }
}

@media (max-width: 768px) {
  .site-container,
  .site-header-inner,
  .site-footer-inner {
    width: calc(100% - 28px);
  }

  .site-header-inner {
    min-height: 52px;
    gap: 8px;
    justify-content: space-between;
  }

  .brand {
    gap: 6px;
    flex-shrink: 1;
    overflow: hidden;
  }

  .brand-code {
    font-size: 14px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-edition,
  .preview-badge,
  .production-link,
  .search-shortcut {
    display: none !important;
  }

  .header-actions {
    gap: 3px;
    flex-shrink: 0;
  }

  .icon-button {
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .assistant-trigger {
    padding: 4px 7px;
    font-size: 11.5px;
    gap: 4px;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--page);
    border-bottom: 2px solid var(--rule-strong);
    padding: 8px 16px 16px;
    box-shadow: var(--shadow-overlay);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 11px 4px;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
  }

  .primary-nav a[aria-current="page"]::after {
    display: none;
  }

  .cover-spread {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 32px 28px;
  }

  .cover-folio-strip {
    flex-wrap: wrap;
    gap: 6px;
  }

  .cover-headline {
    font-size: 32px;
    line-height: 1.2;
  }

  .cover-dek {
    font-size: 15.5px;
  }

  .cover-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cover-action-link {
    text-align: center;
  }

  .cover-index-rail {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
  }

  .featured-top-banner {
    flex-wrap: wrap;
    gap: 6px;
  }

  .featured-story-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .featured-title {
    font-size: 24px;
  }

  .featured-story-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .dispatch-row,
  .dispatch-row.has-media {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px 0;
  }

  .dispatch-rail-col {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .dispatch-title {
    font-size: 18px;
  }

  .dispatch-media-col {
    order: 3;
  }

  .dispatch-media-frame {
    height: 150px;
  }

  .article-masthead-band {
    padding: 32px 0 24px;
  }

  .article-main-title {
    font-size: 28px;
    line-height: 1.25;
  }

  .article-lead-deck {
    font-size: 16px;
  }

  .article-byline-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .byline-specs {
    flex-wrap: wrap;
    gap: 6px;
  }

  .article-spread-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }

  .article-open-rail {
    position: static;
    max-height: none;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 20px;
    order: -1;
  }

  .article-chronology-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .link-next {
    text-align: left;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-col-links {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
