/* Predict Six Blog + Resolution Follow-ups — page styles.
 * Loaded by every page served by `serveBlogPost` (functions/src/blogPage.ts).
 * Dark / gold aesthetic matching the Index (web/the-index/index.css) so the
 * three content surfaces — Blog, Resolutions, Index — read as siblings of
 * the same brand.
 */

:root {
  --bg: #0D0D0D;
  --card: #1F1F1F;
  --card-light: #252525;
  --border: #2E2E2E;
  --accent: #D4A84B;
  --accent-bright: #F2C94C;
  --accent-dim: #9A7A32;
  --text: #F5F5F5;
  --text-secondary: #9A9A9A;
  --text-tertiary: #6E6E6E;
  --green: #4FC178;
  --red: #E85D5D;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

/* ─── Header ──────────────────────────────────────────── */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.site-brand { font-weight: 800; font-size: 17px; color: var(--text); }
.site-brand:hover { color: var(--accent); }
.site-nav { display: flex; gap: 18px; font-size: 14px; flex-wrap: wrap; }
.site-nav a { color: var(--text-secondary); font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.site-nav-out { color: var(--accent) !important; font-weight: 600 !important; }

/* Mobile-header stack — mirrors the pattern on /the-index/ so the
   Blog and Index headers respond identically on narrow viewports.
   Brand stacks on top, nav row centers underneath. Without this,
   the 540px-only padding adjustment below kept the header in its
   horizontal `space-between` layout, which forced the brand text
   to wrap onto two lines and pushed "Predict Six →" onto its own
   row beneath the other nav links. */
@media (max-width: 600px) {
  .site-header { flex-direction: column; gap: 12px; padding: 16px; }
  .site-nav { gap: 16px; justify-content: center; }
}

/* ─── Footer ──────────────────────────────────────────── */

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}
.site-footer p { margin-bottom: 8px; }
.site-footer a { color: var(--text-secondary); }
.site-disclosure { font-style: italic; line-height: 1.6; }

/* ─── Blog index ──────────────────────────────────────── */

.blog-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.blog-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
}

.post-list { display: flex; flex-direction: column; gap: 18px; }

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.post-card-link {
  display: block;
  padding: 22px 22px 18px;
  color: inherit;
}
.post-card-link:hover { color: inherit; }

.post-card-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-bright);
  margin-bottom: 10px;
}
.post-card-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.post-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.55;
}
.post-card-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}
.post-card-sep { padding: 0 6px; }

/* ─── Single blog post ────────────────────────────────── */

.post-article { max-width: 680px; margin: 0 auto; }

.post-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.post-type {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent-bright);
  margin-bottom: 10px;
  display: inline-block;
}
.post-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
}
.post-meta { font-size: 13px; color: var(--text-tertiary); }
.post-sep { padding: 0 6px; }

.post-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}
.post-body p { margin-bottom: 1.2em; }
.post-body h2 { font-size: 22px; font-weight: 800; margin: 1.6em 0 0.6em; color: var(--text); }
.post-body h3 { font-size: 18px; font-weight: 700; margin: 1.4em 0 0.5em; color: var(--text); }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body a:hover { color: var(--accent-bright); }
.post-body ul, .post-body ol { margin: 0 0 1.2em 1.4em; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  border-left: 3px solid var(--accent-dim);
  padding-left: 16px;
  margin: 1.2em 0;
  color: var(--text-secondary);
  font-style: italic;
}
.post-body code {
  background: var(--card-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.post-body pre {
  background: var(--card-light);
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.2em 0;
  font-size: 14px;
}
.post-body pre code { background: transparent; padding: 0; }

/* Section breaks. The Wrong Newsletter uses Markdown `---` between
   misses + before the resolutions appendix; the browser default hr
   margin is too tight (~0.5em) and lets the next bold paragraph
   crowd the line. Generous symmetric vertical margin so each break
   reads as a real "new section" beat, and a single 1px rule (no
   3D bevel) for editorial restraint. */
.post-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
  width: 100%;
  height: 0;
}

.post-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-tertiary);
}
.post-disclosure { font-style: italic; margin-bottom: 14px; line-height: 1.6; }
.post-archive-link a { font-weight: 600; }

/* ─── About Phil ──────────────────────────────────────── */

.about-article { max-width: 680px; margin: 0 auto; }
.about-header { text-align: center; margin-bottom: 28px; }
.about-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--accent-dim);
}
.about-header h1 { font-size: 28px; font-weight: 800; }
.about-body {
  font-size: 16px;
  line-height: 1.7;
}
.about-body p { margin-bottom: 1em; }
.about-empty h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.about-empty p { font-size: 15px; color: var(--text-secondary); }

/* ─── Resolutions index ───────────────────────────────── */

.resolutions-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.resolutions-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
}

.day-block {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.day-block h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.day-block h2 a { color: var(--accent-bright); }
.day-list {
  list-style: none;
  padding: 0;
}
.day-list li {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.day-list li:last-child { border-bottom: 0; }
.day-list a { color: var(--text); }
.day-list a:hover { color: var(--accent-bright); }
.followup-cat-mini {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.resolutions-empty h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.resolutions-empty p { font-size: 15px; color: var(--text-secondary); }

/* ─── Single resolution page ──────────────────────────── */

.resolution-page { max-width: 680px; margin: 0 auto; }
.resolution-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.resolution-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-bright);
  margin-bottom: 10px;
}
.resolution-question {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}
.resolution-outcome-banner {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--border);
}
.resolution-outcome-banner.outcome-yes { border-color: var(--green); }
.resolution-outcome-banner.outcome-no { border-color: var(--red); }
.resolution-community {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.resolution-community strong { color: var(--text); font-weight: 700; }

.resolution-body {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.resolution-body p { margin-bottom: 1.2em; }
.resolution-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.resolution-body a:hover { color: var(--accent-bright); }

.followup-sources-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.followup-sources-block h3 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.followup-sources {
  list-style: none;
  padding: 0;
}
.followup-sources li {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.followup-sources li:last-child { margin-bottom: 0; }
.source-date { color: var(--text-tertiary); font-size: 12px; }

.resolution-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.back-to-app-cta {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg) !important;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 18px;
  transition: background 0.15s;
}
.back-to-app-cta:hover { background: var(--accent-bright); }

/* ─── Day rollup ──────────────────────────────────────── */

.day-rollup-hero { margin-bottom: 28px; }
.day-rollup-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.day-rollup-hero p { font-size: 14px; color: var(--text-secondary); }
.day-archive-link { margin-top: 16px; }
.day-archive-link a { font-size: 13px; font-weight: 600; }

.day-rollup-cards { display: flex; flex-direction: column; gap: 18px; }

/* ─── Followup card (used in day rollup) ─────────────── */

.followup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.followup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.followup-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-bright);
}
.followup-outcome {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
}
.followup-outcome.outcome-yes { background: rgba(79, 193, 120, 0.15); color: var(--green); }
.followup-outcome.outcome-no { background: rgba(232, 93, 93, 0.15); color: var(--red); }

.followup-question {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}
.followup-question a { color: var(--text); }
.followup-question a:hover { color: var(--accent-bright); }

.followup-community {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.followup-community strong { color: var(--text); font-weight: 700; }

.followup-body {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 14px;
}
.followup-body p { margin-bottom: 0.9em; }
.followup-body p:last-child { margin-bottom: 0; }
.followup-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.followup-redacted, .followup-pending {
  font-style: italic;
  color: var(--text-tertiary);
  padding: 10px 14px;
  background: var(--card-light);
  border-radius: 8px;
  font-size: 14px;
}

.community-called { color: var(--green); }
.community-missed { color: var(--red); }

/* ─── 404 / empty / blog-empty ────────────────────────── */

.not-found, .blog-empty {
  text-align: center;
  padding: 60px 20px;
}
.not-found h1, .blog-empty h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 14px;
}
.not-found p, .blog-empty p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Mobile ──────────────────────────────────────────── */

@media (max-width: 540px) {
  main { padding: 20px 16px 40px; }
  .site-header { padding: 14px 16px; }
  .post-title { font-size: 26px; }
  .resolution-question { font-size: 22px; }
  .blog-hero h1, .resolutions-hero h1 { font-size: 26px; }
  .post-card-link { padding: 18px 18px 16px; }
  .post-card-title { font-size: 18px; }
  .followup-header { flex-wrap: wrap; gap: 6px; }
}
