@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #f7f4ec;
  --surface:     #ffffff;
  --border:      #111111;
  --border-mid:  #bdb5a8;
  --border-soft: #ddd7cc;
  --border-pale: #ece7de;
  --text-main:   #111111;
  --text-muted:  #4a4540;
  --text-light:  #7a7268;
  --accent:      #9b0000;
  --link:        #1a2e55;
  --link-hover:  #9b0000;
}

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
  color: var(--text-main);
  background: var(--bg);
}

/* ── Shared page wrapper ──────────────────────────── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Back link ────────────────────────────────────── */
.back-link {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════
   MASTHEAD
══════════════════════════════════════════════════ */

.masthead {
  border-top: 5px solid var(--border);
  padding-top: 18px;
  margin-bottom: 0;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.masthead-seal {
  width: 66px;
  height: 66px;
  border-radius: 6px;
  border: 1px solid var(--border-mid);
  object-fit: cover;
  flex-shrink: 0;
}

.masthead h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-main);
  line-height: 1;
}

.tagline-bar {
  border-top: 1px solid var(--border);
  border-bottom: 3px solid var(--border);
  padding: 5px 0;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Issue dateline bar ───────────────────────────── */
.issue-dateline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

.issue-link {
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  font-size: 0.7rem;
}
.issue-link:hover { color: var(--link-hover); }

.dateline-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.font-size-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.font-btn {
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  cursor: pointer;
  border-radius: 2px;
  line-height: 1.6;
  transition: color 0.12s, border-color 0.12s;
}
.font-btn:hover { color: var(--text-main); border-color: var(--border); }

/* ── Post page controls bar ───────────────────────── */
.post-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

/* ── Section headings ─────────────────────────────── */
.section-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-light);
  border-top: 3px solid var(--border);
  padding-top: 7px;
  margin-bottom: 0;
}

.section-heading-spaced {
  margin-top: 36px;
}

/* ══════════════════════════════════════════════════
   INDEX — TODAY'S STORIES GRID
══════════════════════════════════════════════════ */

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 0;
}

.story-cell {
  background: var(--surface);
  padding: 22px 20px 20px;
  font-size: 21px;
}

.story-headline {
  font-family: 'Playfair Display', serif;
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.32;
  margin-bottom: 5px;
}

.story-headline a {
  color: var(--link);
  text-decoration: none;
}
.story-headline a:hover { color: var(--link-hover); text-decoration: underline; }

.story-source {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 10px;
}

.story-summary {
  font-size: 0.865em;
  line-height: 1.68;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-pale);
}

.story-questions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.story-questions li {
  font-family: 'Inter', sans-serif;
  font-size: 0.78em;
  line-height: 1.52;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  font-style: italic;
}

.story-questions li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-style: normal;
  font-size: 0.7rem;
  top: 2px;
}

/* ══════════════════════════════════════════════════
   INDEX — PREVIOUS ISSUES
══════════════════════════════════════════════════ */

.prev-issues-list {
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 0;
}

.prev-issue {
  border-top: 1px solid var(--border-soft);
  padding: 14px 0;
}

.prev-issue-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.prev-issue-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-transform: uppercase;
  white-space: nowrap;
}

.prev-issue-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.prev-issue-link:hover { color: var(--link-hover); text-decoration: underline; }

.prev-issue-titles {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prev-issue-titles li {
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
  padding-left: 14px;
  position: relative;
}

.prev-issue-titles li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--border-mid);
  font-size: 1.1rem;
  line-height: 1.1;
}

.archives-link {
  display: inline-block;
  margin-top: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.archives-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Featured link (when latest issue is not today) ── */
.featured-issue {
  border: 1px solid var(--border-soft);
  background: var(--surface);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.featured-issue:hover { background: #f0ece3; }
.featured-issue-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.featured-issue-cta {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--link);
  white-space: nowrap;
}

/* ── Loading / error state ──────────────────────────── */
.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 20px 0;
  font-style: italic;
}

/* ══════════════════════════════════════════════════
   POST PAGE
══════════════════════════════════════════════════ */

.container > header {
  margin-bottom: 32px;
  text-align: center;
  border-top: 5px solid var(--border);
  border-bottom: 3px solid var(--border);
  padding: 20px 0 16px;
}

.container > header .back-link {
  display: block;
  text-align: left;
  margin-bottom: 20px;
}

.container > header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 8px;
}

.post-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.container > main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Article cards */
.article-card {
  background: var(--surface);
  border-top: 3px solid var(--border);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--border);
  padding: 22px 24px;
  font-size: 21px;
}

.article-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 5px;
}

.article-card h2 a {
  color: var(--link);
  text-decoration: none;
}
.article-card h2 a:hover { text-decoration: underline; color: var(--link-hover); }

.article-source {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.article-card > p {
  font-size: 0.875em;
  line-height: 1.72;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.questions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-pale);
  padding-top: 14px;
}

.questions-list li {
  font-family: 'Inter', sans-serif;
  font-size: 0.875em;
  color: var(--text-muted);
  line-height: 1.56;
  padding-left: 18px;
  position: relative;
  font-style: italic;
}

.questions-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-style: normal;
  font-size: 0.8rem;
  top: 2px;
}

/* ── Footer ──────────────────────────────────────── */
footer {
  margin-top: 52px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   ARCHIVES PAGE
══════════════════════════════════════════════════ */

.masthead-compact h1 {
  font-size: 2.2rem;
}

.archive-entry {
  border-top: 1px solid var(--border-soft);
  padding: 12px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.archive-entry:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.archive-entry-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.archive-entry-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.archive-entry-link:hover { color: var(--link-hover); text-decoration: underline; }

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 640px) {
  .page,
  .container { padding: 24px 16px 60px; }

  .masthead h1 { font-size: 2.4rem; }
  .masthead-compact h1 { font-size: 1.8rem; }

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

  .story-cell {
    border-bottom: 1px solid var(--border-soft);
  }

  .issue-dateline { flex-direction: column; align-items: flex-start; gap: 2px; }

  .container > header h1 { font-size: 1.7rem; }
  .article-card { padding: 18px 16px; }

  .prev-issue-header { flex-direction: column; gap: 4px; }
}
