/* Shared styles for RoundFlow's blog (listing + article pages). Extends the same design tokens/components as formats.css so the whole site reads as one system. */

:root {
  --paper: #eef1ee;
  --surface: #ffffff;
  --surface-2: #e4e8e3;
  --ink: #1a2420;
  --ink-dim: #5b6960;
  --ink-faint: #8b978f;
  --rule: #c7d0c5;
  --rule-strong: #a9b6a5;
  --accent: #2b6e63;
  --accent-ink: #ffffff;
  --accent-soft: #dcece7;
  --pro: #b8631e;
  --con: #35578c;
  --shadow: 0 20px 50px -20px rgba(20, 32, 27, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131c17;
    --surface: #1a251f;
    --surface-2: #212e26;
    --ink: #e8ede6;
    --ink-dim: #a3b0a8;
    --ink-faint: #6e7c73;
    --rule: #33443a;
    --rule-strong: #435649;
    --accent: #5fbfa9;
    --accent-ink: #0f2420;
    --accent-soft: #223b34;
    --pro: #e0904a;
    --con: #7fa2d6;
    --shadow: 0 22px 55px -18px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --paper: #131c17;
  --surface: #1a251f;
  --surface-2: #212e26;
  --ink: #e8ede6;
  --ink-dim: #a3b0a8;
  --ink-faint: #6e7c73;
  --rule: #33443a;
  --rule-strong: #435649;
  --accent: #5fbfa9;
  --accent-ink: #0f2420;
  --accent-soft: #223b34;
  --pro: #e0904a;
  --con: #7fa2d6;
  --shadow: 0 22px 55px -18px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Newsreader", Georgia, serif; font-weight: 600; margin: 0; text-wrap: balance; }
em { font-style: italic; color: var(--accent); }
p { margin: 0; line-height: 1.6; }
a { color: inherit; }
.mono { font-family: "IBM Plex Mono", monospace; }
::selection { background: var(--accent-soft); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 740px; margin: 0 auto; padding: 0 28px; }

/* ---------- Top bar (shared with format pages) ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; flex-wrap: wrap; gap: 12px; }
.topbar .wordmark { font-family: "Newsreader", serif; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.topbar .actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar a.nav-link { font-size: 14px; color: var(--ink-dim); text-decoration: none; }
.topbar a.nav-link:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--rule-strong);
  color: var(--ink); background: var(--surface); white-space: nowrap;
  transition: border-color 120ms ease, transform 120ms ease;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { transform: translateY(-1px); }

.crumb { font-size: 12.5px; color: var(--ink-faint); padding: 0 0 10px; }
.crumb a { color: var(--ink-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

/* ---------- Blog index ---------- */
.blog-hero { padding: 20px 0 48px; }
.blog-hero .hero-eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.blog-hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.01em; max-width: 22ch; }
.blog-hero p { margin-top: 18px; font-size: 16.5px; line-height: 1.65; color: var(--ink-dim); max-width: 62ch; }

.post-list { padding: 0 0 56px; display: flex; flex-direction: column; gap: 4px; }
.post-card {
  display: block; text-decoration: none; color: inherit;
  padding: 26px 0; border-top: 1px solid var(--rule);
  transition: opacity 120ms ease;
}
.post-list .post-card:last-child { border-bottom: 1px solid var(--rule); }
.post-card:hover { opacity: 0.82; }
.post-card .post-eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.post-card h2 { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.3; max-width: 40ch; }
.post-card .post-dek { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: var(--ink-dim); max-width: 58ch; }
.post-card .post-meta { margin-top: 12px; font-size: 12.5px; color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; }

/* ---------- Article page ---------- */
.article-head { padding: 8px 0 36px; }
.article-head .post-eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.article-head h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.15; letter-spacing: -0.01em; max-width: 24ch; }
.article-head .post-dek { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--ink-dim); max-width: 60ch; }
.article-head .post-meta { margin-top: 20px; font-size: 12.5px; color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; }

.prose { padding: 8px 0 8px; }
.prose h2 { font-size: clamp(21px, 2.6vw, 26px); line-height: 1.25; margin: 40px 0 14px; max-width: 30ch; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17.5px; font-family: "IBM Plex Sans", sans-serif; font-weight: 600; margin: 26px 0 8px; }
.prose p { font-size: 16px; line-height: 1.75; color: var(--ink); margin: 0 0 16px; }
.prose p.lede { font-size: 18px; color: var(--ink-dim); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { font-size: 16px; line-height: 1.7; color: var(--ink); margin-bottom: 8px; }
.prose li strong { color: var(--ink); }
.prose strong { font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { opacity: 0.8; }
.prose blockquote {
  margin: 22px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  font-size: 16px; color: var(--ink-dim); font-style: italic;
}
.prose .callout {
  margin: 26px 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 10px; font-size: 14.5px; line-height: 1.6; color: var(--ink-dim);
}
.prose .callout strong { color: var(--ink); }
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 36px 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.tag-row a {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink-dim);
  background: var(--surface); text-decoration: none; transition: border-color 120ms ease, color 120ms ease;
}
.tag-row a:hover { color: var(--accent); border-color: var(--accent); }

.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.related a {
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink-dim);
  background: var(--surface); text-decoration: none; transition: border-color 120ms ease, color 120ms ease;
}
.related a:hover { color: var(--accent); border-color: var(--accent); }

.cta { padding: 56px 0 40px; text-align: center; border-top: 1px solid var(--rule); margin-top: 24px; }
.cta h2 { font-size: clamp(24px, 3.2vw, 32px); max-width: 24ch; margin: 0 auto; }
.cta p { margin: 16px auto 0; color: var(--ink-dim); font-size: 15.5px; max-width: 50ch; }
.cta .hero-actions { justify-content: center; margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

footer { padding: 32px 0 48px; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer .wordmark { font-family: "Newsreader", serif; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); }
footer .fine { font-size: 12.5px; color: var(--ink-faint); }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
footer nav a { font-size: 12.5px; color: var(--ink-faint); text-decoration: none; }
footer nav a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .blog-hero, .article-head, .prose, .cta { animation: rise 560ms ease both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
