/* ════════════════════════════════════════════════════════════════════
   NexFlow · Article + Blog styles
   Editorial pages: blog index, individual articles, prose, TOC
   ════════════════════════════════════════════════════════════════════ */

/* ── Blog index ──────────────────────────────────────────────────── */
.blog-head {
  padding-top: calc(120px + 4vw);
  padding-bottom: clamp(48px, 6vw, 96px);
  position: relative;
}
.blog-head h1 { max-width: 14ch; }
.blog-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 28px;
}
.blog-filter {
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--fg-1);
  background: var(--bg-1);
  transition: all var(--d-fast) var(--ease-out);
}
.blog-filter:hover { color: var(--fg-0); border-color: var(--fg-0); }
.blog-filter[aria-pressed="true"] {
  background: var(--fg-0); color: var(--fg-inv); border-color: var(--fg-0);
}
.blog-filter .ct { opacity: .55; margin-left: 4px; }

/* Featured article card */
.blog-feat {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background:
    linear-gradient(135deg, var(--brand-soft) 0%, transparent 38%),
    var(--bg-1);
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--d-base) var(--ease-out), transform var(--d-base), border-color var(--d-fast);
}
/* Top accent rule — same gradient signature as the featured pricing card,
   so the design vocabulary of "this is the headline thing" stays consistent
   across pricing and editorial. */
.blog-feat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 30%, var(--cyan) 70%, transparent);
  opacity: .85;
}
.blog-feat:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  border-color: var(--rule-strong);
}
@media (max-width: 880px) { .blog-feat { grid-template-columns: 1fr; } }

.blog-feat-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--fg-2);
}
.blog-feat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  display: inline-block;
}

/* Cluster headers */
.blog-cluster { margin-bottom: clamp(40px, 6vw, 72px); }
.blog-cluster-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 22px;
}
.blog-cluster-head a {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-2); letter-spacing: .06em;
}
.blog-cluster-head a:hover { color: var(--fg-0); }

/* Blog cards */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
@media (max-width: 880px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform var(--d-base) var(--ease-out),
              box-shadow var(--d-base) var(--ease-out),
              border-color var(--d-fast);
  text-decoration: none;
  color: inherit;
  position: relative;
}
/* Tiny indigo seam at the top of every card on hover — the editorial
   equivalent of a hover state pulling a card forward in a deck. */
.blog-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-base) var(--ease-out);
}
.blog-card:hover::after { transform: scaleX(1); }
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--rule-strong);
}
.blog-thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.blog-thumb svg { width: 100%; height: 100%; display: block; }
.blog-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-2); letter-spacing: .06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.blog-card-meta > :first-child { color: var(--brand); font-weight: 600; }
.blog-card-meta .sep::before { content: "·"; margin: 0 4px; }
.blog-card h3 {
  font-family: var(--font-serif);
  font-size: 21px; line-height: 1.16;
  letter-spacing: -.012em;
  margin-bottom: 10px;
  text-wrap: pretty;
}
.blog-card p { font-size: 13.5px; color: var(--fg-1); line-height: 1.55; margin-bottom: 14px; }
.blog-card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-2);
}
.blog-card-foot .av {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-3);
  display: inline-block;
}
.blog-card-foot strong { color: var(--fg-0); font-weight: 500; }

/* Dense list (alt view) */
.blog-list { font-size: 14px; }
.blog-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 16px 0; border-bottom: 1px dashed var(--rule);
  text-decoration: none; color: var(--fg-0);
  transition: background var(--d-fast);
}
.blog-list a:hover { background: var(--bg-2); padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
.blog-list .title { display: block; font-weight: 500; }
.blog-list .meta { display: block; font-size: 12px; color: var(--fg-2); margin-top: 4px; }
.blog-list .when {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-2);
  white-space: nowrap;
}

/* ── Article page ────────────────────────────────────────────────── */
.art-wrap { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.art-head {
  padding-top: calc(110px + 3vw);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.art-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--fg-2);
  margin-bottom: 24px;
  transition: color var(--d-fast);
}
.art-back:hover { color: var(--fg-0); }

.art-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 18px 0 18px;
  text-wrap: pretty;
}
.art-title em { font-style: italic; color: var(--fg-1); }

.art-byline {
  display: flex; align-items: center; gap: 14px;
  margin-top: 24px; margin-bottom: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--fg-2);
}
.art-byline .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  flex-shrink: 0;
}
.art-byline .who strong { color: var(--fg-0); font-weight: 600; font-size: 14px; }
.art-byline .who { line-height: 1.4; }

/* TL;DR — the GEO bait box */
.art-tldr {
  border-left: 3px solid var(--brand);
  background: var(--bg-2);
  padding: 18px 22px;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  margin: 32px 0 40px;
}
.art-tldr .eyebrow { color: var(--brand); margin-bottom: 8px; }
.art-tldr p { font-size: 15px; color: var(--fg-0); line-height: 1.6; }
.art-tldr strong { font-weight: 600; }

/* Prose */
.art-prose h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1; letter-spacing: -.018em;
  margin: 56px 0 14px;
}
.art-prose h2 em { font-style: italic; color: var(--fg-1); }
.art-prose h3 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.15; letter-spacing: -.012em;
  margin: 40px 0 12px;
}
.art-prose p, .art-prose ul, .art-prose ol {
  font-size: 16px; color: var(--fg-1); line-height: 1.7;
  margin-bottom: 18px;
}
.art-prose strong { color: var(--fg-0); font-weight: 600; }
.art-prose a {
  color: var(--fg-0);
  background-image: linear-gradient(var(--brand), var(--brand));
  background-position: 0% 100%; background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size var(--d-base) var(--ease-out);
}
.art-prose a:hover { background-size: 100% 2px; }
.art-prose ul, .art-prose ol { padding-left: 22px; }
.art-prose li { margin-bottom: 8px; }
.art-prose code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--fg-0);
}
.art-prose blockquote {
  margin: 24px 0;
  padding: 14px 22px;
  border-left: 3px solid var(--rule-strong);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--fg-1);
  line-height: 1.5;
}

/* Article comparison / data table */
.art-table {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  margin: 28px 0;
  font-size: 13.5px;
  border-collapse: collapse;
}
.art-table thead th {
  background: var(--bg-2);
  font-family: var(--font-sans);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-strong);
}
.art-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--font-mono);
  vertical-align: top;
}
.art-table tbody tr:last-child td { border-bottom: 0; }
.art-table .win { color: var(--emerald); font-weight: 600; }

/* Pull-quote sidebar callouts */
.art-callout {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r);
  padding: 18px 22px;
  margin: 28px 0;
  background: var(--bg-1);
}
.art-callout .eyebrow { margin-bottom: 10px; }
.art-callout p { margin: 0; font-size: 15px; line-height: 1.65; }

/* Key takeaways · the second GEO bait box (often crawled separately) */
.art-takeaways {
  border: 1px dashed var(--rule-strong);
  padding: 20px 24px;
  border-radius: var(--r);
  margin: 40px 0;
  background: var(--bg-1);
}
.art-takeaways .eyebrow { color: var(--brand); margin-bottom: 12px; }
.art-takeaways ul { list-style: none; padding: 0; margin: 0; }
.art-takeaways li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px; color: var(--fg-1); line-height: 1.6;
}
.art-takeaways li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--brand);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Footnotes / sources */
.art-sources {
  margin-top: 64px; padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.art-sources h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 14px;
}
.art-sources ol { padding-left: 22px; font-size: 13px; color: var(--fg-1); }
.art-sources li { margin-bottom: 6px; }

/* Article CTA strip (bottom) */
.art-cta {
  margin-top: 80px;
  padding: 48px clamp(24px, 4vw, 48px);
  background: var(--bg-ink);
  color: var(--fg-inv);
  border-radius: var(--r);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.art-cta h3 { color: #fff; margin-bottom: 12px; }
.art-cta p { color: var(--fg-inv-1); font-size: 15px; line-height: 1.6; }
.art-cta-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 780px) {
  .art-cta { grid-template-columns: 1fr; }
  .art-cta-row { justify-content: flex-start; }
}

/* Related articles strip */
.art-related {
  margin-top: 64px; padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.art-related h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 18px;
}
.art-related-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
}
@media (max-width: 780px) { .art-related-grid { grid-template-columns: 1fr; } }

/* Reading progress bar (per-article) */
.art-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  z-index: var(--z-overlay);
  transition: width 80ms linear;
}
