/* ============================================================
   News archive — base styles
   Signature element: the .credits spec-sheet (labeled rows that
   are simultaneously the visual identity AND the crawlable,
   entity-rich text that search engines read).
   Paper-white surround so photographs sit on neutral ground.
   ============================================================ */

:root {
  --ink:        #1b1b1a;
  --ink-soft:   #4a4a47;
  --label:      #7c7a74;
  --paper:      #ffffff;
  --panel:      #f6f4ef;   /* warm off-white for the spec sheet */
  --rule:       #e3e0d8;
  --accent:     #2f4753;   /* restrained slate — links only */
  --maxw:       44rem;
  --gap:        clamp(1.5rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 0.6rem + 1vw, 1.2rem);
  line-height: 1.65;
  font-optical-sizing: auto;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Masthead ---- */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0 1.25rem;
  margin-bottom: var(--gap);
}
.masthead a { text-decoration: none; color: var(--ink); }
.masthead .name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.masthead .tag {
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--label);
  margin-top: 0.35rem;
}

/* ---- Eyebrow / labels ---- */
.eyebrow {
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--label);
  margin: 0 0 0.75rem;
}

/* ---- Headings ---- */
h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 1rem + 3.5vw, 3rem);
  margin: 0 0 0.5rem;
}
h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  margin: 2.5rem 0 0.75rem;
}
.dateline {
  color: var(--label);
  font-size: 0.9rem;
  margin-bottom: var(--gap);
}

/* ---- Stories within an issue ----
   A newsletter is a container of separate stories, each with its own
   eyebrow + headline. The page h1 titles the issue; each story gets an
   h2. The rule between stories mirrors the email's section divider. */
.story { margin-top: var(--gap); }
.story + .story {
  border-top: 1px solid var(--rule);
  padding-top: var(--gap);
}
/* h2 carries a large top margin for standalone use; when an eyebrow
   labels it, that gap belongs above the eyebrow instead. */
.eyebrow + h2 { margin-top: 0; }

/* ---- Prose (this is the SEO payload — keep it real text) ---- */
.prose p { margin: 0 0 1.15rem; }
.prose a { color: var(--accent); text-underline-offset: 2px; }

/* ---- Figures ---- */
figure { margin: var(--gap) 0; }
/* Newsletters routinely link their images, and the conversion preserves that.
   An <a> is inline by default, which leaves a descender gap under the photo
   and gives the link a hit area taller than the image — so make it block. */
figure a { display: block; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
figure a:hover img { opacity: 0.92; }
figcaption {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--label);
  margin-top: 0.5rem;
}

/* ---- SIGNATURE: the credits spec sheet ---- */
.credits {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.5rem 0.5rem;
  margin: var(--gap) 0;
}
.credits .eyebrow { margin-bottom: 1rem; }
.credits dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) 1fr;
  column-gap: 1.25rem;
}
.credits dt {
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--label);
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  align-self: start;
}
.credits dd {
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.98rem;
}
.credits dt:first-of-type,
.credits dd:first-of-type { border-top: none; }
.credits dd a { color: var(--accent); text-underline-offset: 2px; }

/* ---- Archive index list ---- */
.index-list { list-style: none; padding: 0; margin: 0; }
.index-list li { border-top: 1px solid var(--rule); }
.index-list li:last-child { border-bottom: 1px solid var(--rule); }
.index-list a {
  display: block;
  padding: 1.4rem 0;
  text-decoration: none;
  color: var(--ink);
}
.index-list a:hover .entry-title { text-decoration: underline; text-underline-offset: 3px; }
.entry-meta {
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  color: var(--label);
  margin-bottom: 0.35rem;
}
.entry-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.entry-dek { color: var(--ink-soft); margin-top: 0.3rem; }

/* ---- Footer ---- */
footer {
  margin: calc(var(--gap) * 1.5) 0 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--label);
}
footer a { color: var(--label); }

/* ---- Back link ---- */
.back {
  display: inline-block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--label);
  text-decoration: none;
  margin-bottom: 2rem;
}
.back:hover { color: var(--ink); }

/* ---- Accessibility floors ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- Mobile: collapse the spec sheet to stacked rows ---- */
@media (max-width: 34rem) {
  .credits { padding: 1.25rem 1rem 0.25rem; }
  .credits dl { grid-template-columns: 1fr; }
  .credits dt {
    border-top: 1px solid var(--rule);
    padding-bottom: 0.1rem;
  }
  .credits dd {
    border-top: none;
    padding-top: 0.15rem;
    padding-bottom: 0.8rem;
  }
  .credits dd:first-of-type { padding-top: 0.15rem; }
}
