/* Site chrome for /newsletter/ pages: header, footer, edition navigation, archive list.
   Colors and type match the home page (index.html). Edition content styles live in brief.css. */
:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: var(--blue-600);
  --accent-soft: #eff6ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(37, 99, 235, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.1);
    --shadow: none;
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; width: 100%; }

.site-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ---------- Edition navigation (Previous / All editions / Next) ---------- */
.ed-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 16px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.ed-nav.bottom { padding: 0 16px 32px; }
.ed-nav a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  display: inline-grid;
  line-height: 1.3;
}
.ed-nav a:hover .ed-label { text-decoration: underline; }
.ed-nav .ed-date { font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.ed-prev { justify-self: start; }
.ed-all { justify-self: center; }
.ed-next { justify-self: end; text-align: right; }

/* ---------- Archive & latest pages ---------- */
.page-intro { padding: 40px 0 8px; }
.page-intro .eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-intro h1 {
  margin: 4px 0 0;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.page-intro p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }

.archive-list {
  list-style: none;
  margin: 24px 0 64px;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 760px;
}
.archive-item {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.archive-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.archive-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.archive-badge {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}
.archive-headline { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.status { margin: 24px 0 64px; color: var(--muted); }
.status a { color: var(--accent); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 16px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
