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

:root {
  --bg: #FEFEF9;
  --bg-warm: #F7F5EE;
  --text: #1A1918;
  --text-secondary: #6B6862;
  --text-tertiary: #9C9893;
  --accent: #B5451B;
  --rule: #E0DDD5;
  --max-width: 720px;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

/* ─── MASTHEAD ─── */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 32px 40px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.publication-name {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.masthead-tagline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.masthead-nav {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.masthead-nav-link {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.masthead-nav-link:hover {
  text-decoration: underline;
}

/* ─── HERO ─── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 40px 64px;
  text-align: center;
}

.hero-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-description {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* ─── EDITIONS ─── */

.editions-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 96px;
}

.section-rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
  margin-bottom: 56px;
}

.section-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

.edition-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edition-item {
  border-top: 1px solid var(--rule);
  padding: 36px 0;
}

.edition-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.edition-link {
  text-decoration: none;
  display: block;
}

.edition-link:hover .edition-question {
  color: var(--accent);
}

.edition-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.edition-number {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-tertiary);
}

.edition-date {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-tertiary);
}

.edition-moment {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  font-style: italic;
}

.edition-question {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  transition: color 0.15s ease;
}

/* ─── FOOTER ─── */

.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-name {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.footer-note {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-tertiary);
}

/* ─── STORYLINES ─── */

.storylines-meta-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-tertiary);
}

.storylines-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 96px;
}

.storyline-category {
  border-top: 1px solid var(--rule);
  padding: 20px 0 8px;
}

.storyline-category:last-child {
  border-bottom: 1px solid var(--rule);
}

.storyline-category-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.storyline-list {
  list-style: none;
}

.storyline-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.storyline-item:first-child {
  border-top: none;
}

.storyline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.storyline-main {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-secondary);
}

.storyline-moment {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.storyline-moment:hover {
  color: var(--accent);
}

.storyline-freshness {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.storyline-freshness[title] {
  border-bottom: 1px dotted var(--text-tertiary);
  cursor: help;
}

.storyline-potential {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 2px;
}

.potential-high {
  background: #FDF0EC;
  color: var(--accent);
}

.potential-medium {
  background: #F2F1EE;
  color: var(--text-secondary);
}

.potential-low {
  background: #F7F5EE;
  color: var(--text-tertiary);
}

.storyline-hidden-question {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── CABINET OF CURIOSITIES — STREAMS ─── */

.stream-summary {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 24px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.stream-section {
  border-top: 1px solid var(--rule);
  padding: 24px 0 12px;
}

.stream-section:last-child {
  border-bottom: 1px solid var(--rule);
}

.stream-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.stream-dormant .stream-label {
  color: var(--text-tertiary);
}

.stream-dormant-note {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

/* Within headlines stream, categories become sub-sections */
.stream-section .storyline-category {
  border-top: 1px solid var(--rule);
  padding: 12px 0 4px;
  margin-left: 0;
}

.stream-section .storyline-category:first-child {
  border-top: none;
}

.stream-section .storyline-category-label {
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

/* ─── CURIOSITY CARD FIELDS ─── */

.curiosity-observation {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  margin-top: 2px;
}

.curiosity-question {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
}

.curiosity-season {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.curiosity-location {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-tertiary);
  margin-left: 4px;
}

/* ─── STATUS CHIPS ─── */

.curiosity-status {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 4px;
}

.status-curious {
  background: #EEF3FD;
  color: #3B5BA8;
}

.status-investigating {
  background: #F0F8EE;
  color: #3A7A30;
}

.status-thread_found {
  background: #FDF5EC;
  color: #A06820;
}

.status-ready_to_shape {
  background: #FDF0EC;
  color: var(--accent);
}

.status-published {
  background: var(--bg-warm);
  color: var(--text-tertiary);
}

.status-dormant {
  background: var(--bg-warm);
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .masthead { padding: 20px 24px; flex-wrap: wrap; row-gap: 8px; }
  .masthead-tagline { display: none; }
  .hero { padding: 56px 24px 48px; }
  .hero-headline { font-size: 36px; }
  .editions-section { padding: 0 24px 72px; }
  .footer { padding: 28px 24px; flex-direction: column; text-align: center; }
  .storylines-meta-bar { padding: 0 24px 32px; }
  .storylines-section { padding: 0 24px 72px; }
  .storyline-row { flex-direction: column; gap: 2px; }
  .stream-summary { padding: 0 24px 16px; }
}
