/* Generated from templates/blog.css by build_post.py - edit the template, then rebuild. */
/* Blog stylesheet - static mirror of the site's Fieldbook identity,
 * tuned for LONG-FORM READING and LIGHT-ONLY by decision (2026-08-22).
 * TOKENS ARE MIRRORED from src/app/globals.css (which mirrors the iOS
 * app's Fieldbook.swift). If globals.css tokens change, change them here
 * in the same commit. The blog cannot share the Next-compiled stylesheet
 * because its filename is content-hashed per build.
 *
 * Readability principles this file encodes: article text sits on a SOLID
 * near-white surface (translucent glass is for chrome, never for prose);
 * body copy is 17px near-black ink, not muted grey; the measure stays
 * near 65ch; headings earn their hierarchy through size AND space. */

:root {
  color-scheme: light;

  --canvas-1: #faf7eb;
  --canvas-2: #f4f5e7;
  --canvas-3: #e9f4e8;
  --canvas-4: #e1f0e5;
  --ink: #1c231e;
  --ink-muted: #55605a;
  --ink-soft: #646c5e;
  --accent: #2e8b5f;
  --accent-strong: #1f5c3d;
  --surface: #fffefa;
  --surface-tint: #e7efe3;
  --hairline: rgba(28, 35, 30, 0.12);
  --on-accent: #f7fbf8;
  --glass: rgba(255, 255, 255, 0.4);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-pill-shadow: 0 8px 24px rgba(46, 139, 95, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --card-shadow: 0 6px 20px rgba(46, 139, 95, 0.08);
  --cta-shadow: 0 4px 16px rgba(46, 139, 95, 0.25);
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(175deg, var(--canvas-1) 0%, var(--canvas-2) 30%,
    var(--canvas-3) 65%, var(--canvas-4) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ── glass pill nav (chrome only - mirror of the site header) ── */
.pill-wrap { position: sticky; top: 14px; z-index: 50; display: flex; justify-content: center; padding: 0 20px; }
.pill {
  display: flex; align-items: center; gap: 12px; height: 56px; width: 100%;
  max-width: 72rem; padding: 6px 8px 6px 16px; border-radius: 9999px;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-pill-shadow);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { border-radius: 7px; box-shadow: 0 2px 6px rgba(31, 92, 61, 0.28); }
.pill-spacer { flex: 1; }
.pill-links { display: none; align-items: center; gap: 4px; }
@media (min-width: 640px) { .pill-links { display: flex; } }
.pill-links a {
  border-radius: 9999px; padding: 8px 12px; font-size: 13px; font-weight: 600;
  color: var(--ink-muted); text-decoration: none; transition: color 0.15s;
}
.pill-links a:hover { color: var(--ink); }
.cta-pill {
  display: inline-flex; align-items: center; border-radius: 9999px;
  background: var(--accent-strong); color: var(--on-accent); padding: 10px 18px;
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: var(--cta-shadow);
}
.cta-pill:hover { filter: brightness(1.1); }

/* ── reading progress (from the Field Notes design) ── */
.progress-track { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress-bar { height: 100%; width: 0%; background: var(--accent-strong); transition: width 80ms linear; }

/* ── article: the Field Notes layout - 680px measure straight on the
   canvas, no card wrapper ── */
main { display: flex; justify-content: center; padding: 0 20px; }
article.post { width: 100%; max-width: 680px; padding-top: 48px; }
.post-head {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 18px; margin-bottom: 34px; padding: 0 4px;
}
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
a.pill-tag { text-decoration: none; }
a.pill-tag:hover { color: var(--ink); }
.post-date { font-size: 13px; color: var(--ink-soft); }
h1 {
  margin: 0; font-size: 42px; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.12; text-wrap: balance;
}
@media (max-width: 560px) { h1 { font-size: 33px; } }
.standfirst {
  margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-muted);
  max-width: 560px; text-wrap: pretty;
}
.standfirst strong { color: var(--accent-strong); }
.author-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--accent-strong); color: var(--on-accent);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.author-name { font-weight: 600; color: var(--ink); }
.author-name a { color: var(--ink); text-decoration: none; }
.author-name a:hover { color: var(--accent-strong); }
.author-role { color: var(--ink-soft); }

/* Solid surface card - still used by hub empty state. */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
  padding: 30px 26px;
  margin: 0 0 22px;
}

.prose { font-size: 17px; line-height: 1.75; color: var(--ink); }
.prose h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; color: var(--ink); margin: 44px 0 14px; text-wrap: pretty; }
.prose h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 30px 0 10px; }
.prose p { margin: 0 0 22px; }
.prose a { color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; font-size: 16.5px; line-height: 1.8; }
.prose li { margin-bottom: 8px; }
/* Pull-quote treatment for markdown blockquotes (design's pattern). */
.prose blockquote { margin: 8px 0 22px; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent-strong); }
.prose blockquote p { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.prose code { background: var(--surface-tint); border-radius: 6px; padding: 2px 7px; font-size: 0.9em; }
.prose pre { background: var(--surface-tint); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 15px; }
.prose pre code { background: none; padding: 0; }

/* Drop cap on the opening paragraph (the design's dropCap default). */
.prose > .hero-stat + p::first-letter {
  float: left; font-size: 58px; line-height: 0.85; font-weight: 800;
  color: var(--accent-strong); padding: 6px 10px 0 0;
}

.hero-stat {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 18px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16.5px;
  margin: 0 0 26px;
}

.table-scroll { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--hairline); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 36rem; font-size: 15px; line-height: 1.5; }
th { text-align: left; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface-tint); padding: 12px 16px; }
td { border-top: 1px solid var(--hairline); padding: 12px 16px; vertical-align: top; color: var(--ink); }
td:first-child { font-weight: 600; }
tbody tr:nth-child(even) td { background: rgba(231, 239, 227, 0.35); }

.inline-cta {
  border-radius: 14px;
  background: var(--surface-tint);
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

/* Footer-flow sections: hairline-separated, no cards (design pattern). */
.post-section { border-top: 1px solid var(--hairline); margin-top: 40px; padding-top: 26px; }
.post-section h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.01em; }
.related ul, .cluster-links ul { margin: 0; padding-left: 24px; }
.related li, .cluster-links li { margin-bottom: 10px; font-size: 15.5px; line-height: 1.5; }
.related a, .cluster-links a { color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.faq-block details { border-top: 1px solid var(--hairline); }
.faq-block details:first-of-type { border-top: none; }
.faq-block summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; line-height: 1.45; padding: 16px 0; color: var(--ink); }
.faq-block summary::-webkit-details-marker { display: none; }
.faq-block summary::before { content: "›"; display: inline-block; margin-right: 11px; color: var(--accent); font-weight: 700; transition: transform 0.2s; }
.faq-block details[open] summary::before { transform: rotate(90deg); }
.faq-block details p { margin: 0 0 18px 22px; font-size: 15.5px; line-height: 1.65; color: var(--ink-muted); }

/* Prev/next chronological neighbors. */
.post-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-nav a { font-size: 14px; font-weight: 700; color: var(--accent-strong); text-decoration: none; max-width: 46%; }
.post-nav a:hover { color: var(--ink); }
.post-nav .nav-next { margin-left: auto; text-align: right; }

/* The deep-green CTA band (design footer). */
.cta-band {
  margin-top: 44px; background: var(--accent-strong); border-radius: 20px;
  padding: 40px 32px; display: flex; flex-direction: column;
  align-items: center; gap: 18px; text-align: center;
}
.cta-band p { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: #f7f5eb; }
.cta-band-button {
  display: inline-flex; align-items: center; border-radius: 9999px;
  background: #f7f5eb; color: #1f5c3d;
  padding: 13px 24px; font-size: 15px; font-weight: 700; text-decoration: none;
  transition: filter 0.15s;
}
.cta-band-button:hover { filter: brightness(1.06); }
.store-strap { font-size: 12px; font-weight: 600; color: rgba(247, 245, 235, 0.65); }

/* (Author bio footer removed 2026-08-22 by request - the byline lives
   in the post header. The CTA band closes the article; give it bottom
   room.) */
.cta-band { margin-bottom: 40px; }

/* ── hub + topic pages ── */
.hub-head { text-align: center; max-width: 660px; margin: 0 auto 52px; padding: 84px 8px 16px; }
.hub-head .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-strong); margin-bottom: 14px; }
.hub-head h1 { margin-bottom: 0; }
.hub-head p.lede { color: var(--ink-muted); font-size: 16px; line-height: 1.65; max-width: 56ch; margin: 14px auto 0; }
/* Hub + topic listings: the "Field Notes" glass-card grid (from the
   Claude Design blog-list template, 2026-08-22). Cards are frosted
   glass over the canvas - the ONE place blog chrome uses glass for
   content, because these are short teasers, not long-form reading. */
.hub-list { width: 100%; max-width: 1120px; padding-top: 8px; }
.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.note-card {
  display: flex; flex-direction: column; gap: 18px;
  padding: 32px 30px; border-radius: 24px; text-decoration: none;
  background: var(--glass, rgba(255, 255, 255, 0.4));
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(46, 139, 95, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(46, 139, 95, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill-tag {
  display: inline-flex; align-items: center;
  background: var(--surface-tint); color: var(--accent-strong);
  border-radius: 999px; padding: 5px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.note-date { font-size: 12px; color: var(--ink-soft); }
.note-card h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); text-wrap: pretty; }
.note-card:hover h3 { color: var(--accent-strong); }
.note-excerpt { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.note-foot {
  margin-top: auto; border-top: 1px solid var(--hairline);
  padding-top: 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.note-author { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink); }
.note-avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent-strong); color: var(--on-accent);
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.note-read { font-size: 13px; font-weight: 700; color: var(--accent-strong); }
.empty-state { text-align: center; color: var(--ink-muted); font-size: 16px; line-height: 1.65; }

/* ── footer (full static mirror of src/app/layout.tsx's footer) ── */
.site-footer { margin-top: 44px; border-top: 1px solid var(--hairline); }
.foot-inner { max-width: 72rem; margin: 0 auto; padding: 44px 32px 36px; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 40px; }
.foot-brand-col { min-width: 16rem; flex: 1.4; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.foot-brand svg { border-radius: 6px; }
.foot-col { min-width: 9.5rem; flex: 1; }
.foot-col h4 { margin: 0 0 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-soft); }
.foot-col div { display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 13.5px; font-weight: 600; color: var(--ink-muted); text-decoration: none; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; border-top: 1px solid var(--hairline); margin-top: 36px; padding-top: 20px; font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); }

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