:root {
  --ink: #1a1611;
  --paper: #faf7f2;
  --paper-panel: #ffffff;
  --rule: #d8d0c4;
  --muted: #6b6459;
  --accent: #b3121c;
  --accent-ink: #ffffff;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  /* Faint paper grain so the page reads as printed stock, not a flat template. */
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(26, 22, 17, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(26, 22, 17, 0.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 4px;
}

a { color: inherit; }

/* ---------- Masthead ---------- */

/* A classic finish-line checkerboard, CSS-only -- used as a thin divider strip
   wherever a section needs a racing beat rather than a plain rule. */
.checkered-strip {
  height: 10px;
  background-image: repeating-conic-gradient(var(--ink) 0% 25%, var(--paper) 0% 50%);
  background-size: 14px 14px;
}

/* Twin racing stripe, evoking a car's livery -- used as a slim accent bar. */
.racing-stripe {
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0, var(--accent) 6px,
    var(--ink) 6px, var(--ink) 9px,
    transparent 9px, transparent 14px
  );
}

header.masthead {
  background: var(--paper);
  border-bottom: 4px double var(--ink);
  padding: 1.75rem 1.5rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* A big soft speed-streak behind the wordmark -- pure CSS, suggests motion
   without needing an image. */
header.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    100deg,
    transparent 0 40px,
    rgba(179, 18, 28, 0.05) 40px 42px,
    transparent 42px 90px
  );
  pointer-events: none;
}

header.masthead .wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  position: relative;
}

header.masthead .wordmark .flag {
  display: inline-block;
  font-size: 0.55em;
  transform: translateY(-0.15em);
}

header.masthead .tagline {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}

header.masthead .issue-line {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}

header.masthead .issue-line a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
}

nav.section-nav {
  background: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
}

nav.section-nav .inner {
  display: inline-flex;
  gap: 0;
  padding: 0 0.5rem;
}

nav.section-nav a .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.3rem;
}

nav.section-nav a {
  display: inline-block;
  padding: 0.65rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-decoration: none;
  color: #e7e2d8;
  border-bottom: 3px solid transparent;
}

nav.section-nav a:hover { border-bottom-color: var(--accent); }

/* ---------- Layout ---------- */

.container { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.container-wide { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }

/* ---------- Issue / lead ---------- */

.issue-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.lead-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

h1.headline {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.byline {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
  margin-bottom: 1.5rem;
}
.byline strong { color: var(--ink); }

/* ---------- Table of contents ---------- */

.toc {
  background: var(--paper-panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.toc .toc-label {
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.toc .toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toc .toc-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

.toc .toc-links a .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Article body ---------- */

.article-body {
  font-size: 1.08rem;
  line-height: 1.75;
}

.article-body > p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.6;
  font-family: var(--serif);
  color: #2b241c;
}

.article-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.6em;
  line-height: 0.78;
  padding: 0.05em 0.08em 0 0;
  color: var(--accent);
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0.4rem 0 1rem;
  scroll-margin-top: 1rem;
}

.article-section {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

/* Section header styled like a car's number plate: a bold roundel with the series'
   color, sitting beside the heading rather than a plain rectangular chip above it. */
.section-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.section-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.05;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px currentColor, 0 3px 6px rgba(26, 22, 17, 0.25);
  transform: rotate(-4deg);
}

.article-body h2 { margin: 0; }

.article-body p { margin: 0 0 1.1rem; }

/* A pulled, graphic callout -- colored panel + oversized mark -- rather than a
   thin quiet sidebar rule, so it reads as a deliberate editorial device. */
.pull-quote {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper-panel);
  border-left: 6px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 1.1rem 1.4rem 1.1rem 1.6rem;
  margin: 1.5rem 0;
  box-shadow: 3px 3px 0 var(--rule);
}

.pull-quote::before {
  content: '\201C';
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 0;
  color: var(--accent);
  opacity: 0.35;
  position: absolute;
  top: 1.6rem;
  left: -0.15rem;
}

/* ---------- Sources ---------- */

.sources-box {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 3px double var(--ink);
}

.sources-box h3 {
  font-family: var(--serif);
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.sources-box .cat-group { margin-bottom: 1rem; }

.sources-box .cat-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.sources-box ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.sources-box a { color: var(--muted); }
.sources-box a:hover { color: var(--accent); }

/* ---------- Issue pager (prev/next day) ---------- */

.issue-pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.issue-pager-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.issue-pager-link span {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
}

.issue-pager-link:hover span { color: var(--accent); }
.issue-pager-link.next { text-align: right; align-items: flex-end; }

/* ---------- Back issues ---------- */

.back-issues-list { list-style: none; padding: 0; margin: 0; }
.back-issues-list li {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
}
.back-issues-list .date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.back-issues-list a.headline-link {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  display: block;
  margin: 0.25rem 0 0.35rem;
}
.back-issues-list a.headline-link:hover { color: var(--accent); }
.back-issues-list .summary { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Empty state ---------- */

.empty-state { text-align: center; color: var(--muted); padding: 4rem 0; font-family: var(--serif); font-size: 1.2rem; }

/* ---------- Footer ---------- */

footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 2rem 1.5rem 2.5rem;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .container, .container-wide { padding: 1.25rem 1rem 2rem; }
  header.masthead { padding: 1.25rem 1rem 0.75rem; }
  .toc .toc-links { gap: 0.4rem; }
}
