:root {
  --bg-canvas: #f3f0fa;
  --bg-surface: #ffffff;
  --bg-subtle: #eae4f5;
  --text-primary: #343038;
  --text-muted: #625c68;
  --accent-plum: #6b2155;
  --accent-plum-deep: #471138;
  --accent-plum-light: #8e2f72;
  --border-line: #d9d0e6;
  --shadow-block: 4px 4px 0 #343038;
  --font-editorial: "Charter", Cambria, Georgia, serif;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-editorial);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

/* Header & Inset Navigation */
.site-header {
  position: relative;
  max-width: 1180px;
  margin: 1.25rem auto;
  padding: 0.75rem 1.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(71, 17, 56, 0.05);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--accent-plum-deep);
}

.brand-glyph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-plum);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-variant: all-small-caps;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: color 0.15s ease;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--accent-plum);
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-primary);
  line-height: 1;
  padding: 0.2rem 0.5rem;
}

.mobile-nav-tray {
  display: none;
  position: absolute;
  top: 110%;
  right: 1.5rem;
  width: 220px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-block);
  padding: 1rem;
  z-index: 100;
}

.mobile-nav-tray.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-tray a {
  text-decoration: none;
  color: var(--text-primary);
  font-variant: all-small-caps;
  font-size: 1rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-line);
}

/* Plum Dot Background for Hero & Customs */
.dot-matrix-bg {
  background-color: var(--bg-canvas);
  background-image: radial-gradient(var(--accent-plum) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 0 0;
}

/* Page Containers */
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.reading-flow {
  max-width: 70ch;
  margin: 0 auto;
}

/* Typography Standards */
h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--accent-plum-deep);
  margin-bottom: 1.75rem;
}

.badge-tag {
  display: inline-block;
  font-variant: all-small-caps;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-plum);
  background-color: #ffffff;
  border: 1px solid var(--border-line);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

/* Buttons */
.plum-btn {
  display: inline-block;
  background-color: var(--accent-plum);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-variant: all-small-caps;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--accent-plum-deep);
  box-shadow: var(--shadow-block);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plum-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #343038;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-plum);
  text-decoration: underline;
  font-weight: 600;
}

/* Overlapping Square Photo Cluster */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 1.5rem;
}

.hero-photo-stack {
  position: relative;
  min-height: 380px;
}

.stack-img {
  position: absolute;
  object-fit: cover;
  border: 1px solid var(--border-line);
  box-shadow: 6px 6px 0 rgba(52, 48, 56, 0.18);
  background-color: #ffffff;
}

.stack-img-1 {
  width: 270px;
  height: 230px;
  top: 0;
  left: 0;
  z-index: 1;
}

.stack-img-2 {
  width: 250px;
  height: 250px;
  top: 70px;
  right: 10px;
  z-index: 2;
}

.stack-img-3 {
  width: 290px;
  height: 180px;
  bottom: 0;
  left: 60px;
  z-index: 3;
}

/* Timeline Station Node Layout */
.station-timeline {
  position: relative;
  padding-left: 2.75rem;
  margin: 2.5rem 0;
}

.station-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 14px;
  width: 2px;
  background-color: var(--accent-plum);
}

.timeline-station {
  position: relative;
  margin-bottom: 3.5rem;
}

.station-marker {
  position: absolute;
  left: -2.75rem;
  top: 2px;
  width: 30px;
  height: 30px;
  background-color: #ffffff;
  border: 3px solid var(--accent-plum);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-plum-deep);
}

.station-content {
  background-color: #ffffff;
  padding: 1.75rem;
  border: 1px solid var(--border-line);
}

/* Story Rows (No rounded cards, separated by fine rules) */
.story-row-stack {
  display: flex;
  flex-direction: column;
}

.story-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-line);
}

.story-row:first-child {
  border-top: 1px solid var(--border-line);
}

.story-index-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-plum);
}

.story-row-text h3 {
  margin-bottom: 0.35rem;
}

.evidence-tag {
  font-size: 0.8rem;
  font-variant: all-small-caps;
  color: #471138;
  background: var(--bg-subtle);
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
  border-left: 2px solid var(--accent-plum);
}

/* Myth vs Evidence Comparison Panel */
.myth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.myth-box {
  background-color: #ffffff;
  border: 1px solid var(--border-line);
  padding: 1.5rem;
}

.myth-box.verdict-myth {
  border-left: 4px solid #a32244;
}

.myth-box.verdict-paper {
  border-left: 4px solid var(--accent-plum);
}

.verdict-badge {
  font-variant: all-small-caps;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Interactive Dispatch Form */
.dispatch-form {
  background-color: #ffffff;
  border: 1px solid var(--border-line);
  padding: 2rem;
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-variant: all-small-caps;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: var(--accent-plum-deep);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-line);
  background-color: var(--bg-canvas);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--accent-plum-deep);
  border: 1px solid var(--border-line);
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-variant: all-small-caps;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.dispatch-preview {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-canvas);
  border: 1px dashed var(--border-line);
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
}

/* Data Table Wrapper */
.table-scroll {
  overflow-x: auto;
  margin: 2rem 0;
}

table.railway-ledger {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border: 1px solid var(--border-line);
  font-size: 0.95rem;
}

table.railway-ledger th,
table.railway-ledger td {
  padding: 0.85rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--border-line);
}

table.railway-ledger th {
  background-color: var(--bg-subtle);
  font-variant: all-small-caps;
  letter-spacing: 0.06em;
  color: var(--accent-plum-deep);
}

/* Footer (Strict Compliance) */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-line);
  margin-top: 5rem;
  padding: 3rem 1.5rem 2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-line);
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-plum-deep);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-variant: all-small-caps;
  letter-spacing: 0.05em;
}

.footer-links a:hover {
  color: var(--accent-plum);
}

.footer-legal-notice {
  max-width: 1180px;
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  gap: 1rem;
}

/* Responsive Rules */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-photo-stack {
    min-height: 280px;
  }
  .stack-img-1 { width: 200px; height: 180px; }
  .stack-img-2 { width: 190px; height: 190px; right: 0; }
  .stack-img-3 { width: 220px; height: 140px; left: 20px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .myth-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .primary-nav {
    display: none;
  }
  .nav-toggle-btn {
    display: block;
  }
  .story-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .story-index-icon {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

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