/* ============================================================
   blog.css — Blog index (bento) + Blog post (editorial)
   Reuses tokens from styles.css and chrome from policy.css
   ============================================================ */

/* ----- Hero strip on the index ----- */
.blog-hero {
  padding: 88px 0 36px;
  position: relative;
  overflow: hidden;
}
.blog-hero-inner { max-width: 880px; }
.blog-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-soft); color: var(--primary);
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 22px;
}
.blog-hero-eyebrow .glyph {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  animation: pulse 1.8s ease-in-out infinite;
}
.blog-hero h1 {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}
.blog-hero h1 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--primary);
}
.blog-hero p.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
  line-height: 1.55;
}

/* ----- Category filter ----- */
.blog-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 36px 0 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.blog-chip {
  appearance: none; border: 1px solid var(--line); background: white;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s;
}
.blog-chip:hover { border-color: var(--ink); color: var(--ink); }
.blog-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.blog-chip-dot { width: 8px; height: 8px; border-radius: 50%; }
.blog-chip-count {
  font-size: 12px; padding: 2px 7px; border-radius: 999px;
  background: var(--bg-warm); color: var(--ink-mute); font-weight: 600;
}
.blog-chip[aria-pressed="true"] .blog-chip-count {
  background: rgba(251, 246, 238, 0.18); color: var(--bg);
}

/* ----- Bento grid ----- */
.blog-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
  margin-bottom: 80px;
}
.blog-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
  text-decoration: none; color: inherit;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.blog-card-media {
  aspect-ratio: 16 / 10;
  background-size: cover; background-position: center;
  position: relative;
}
.blog-card-cat {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.blog-card-cat-dot { width: 8px; height: 8px; border-radius: 50%; }
.blog-card-body {
  padding: 22px 24px 26px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.blog-card-title {
  font-size: 21px; font-weight: 700; line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.blog-card-excerpt {
  font-size: 15px; line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.blog-card-meta {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-mute);
  padding-top: 6px;
}
.blog-card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* Bento sizing — first post is big, second is wide, rest are normal */
.blog-card.size-hero    { grid-column: span 4; grid-row: span 2; }
.blog-card.size-hero .blog-card-media { aspect-ratio: 16 / 9; }
.blog-card.size-hero .blog-card-title { font-size: clamp(28px, 2.8vw, 38px); line-height: 1.12; }
.blog-card.size-hero .blog-card-excerpt { font-size: 16px; }
.blog-card.size-tall    { grid-column: span 2; grid-row: span 2; }
.blog-card.size-tall .blog-card-media { aspect-ratio: 4 / 5; }
.blog-card.size-wide    { grid-column: span 4; }
.blog-card.size-wide .blog-card-media { aspect-ratio: 21 / 9; }
.blog-card.size-square  { grid-column: span 2; }
.blog-card.size-square .blog-card-media { aspect-ratio: 1 / 1; }
.blog-card.size-third   { grid-column: span 2; }

@media (max-width: 980px) {
  .blog-bento { grid-template-columns: repeat(4, 1fr); }
  .blog-card.size-hero { grid-column: span 4; grid-row: auto; }
  .blog-card.size-tall { grid-column: span 2; grid-row: auto; }
  .blog-card.size-wide { grid-column: span 4; }
  .blog-card.size-square, .blog-card.size-third { grid-column: span 2; }
}
@media (max-width: 640px) {
  .blog-bento { grid-template-columns: 1fr; gap: 16px; }
  .blog-card.size-hero,
  .blog-card.size-tall,
  .blog-card.size-wide,
  .blog-card.size-square,
  .blog-card.size-third { grid-column: span 1; }
}

.blog-empty {
  text-align: center; padding: 80px 20px;
  color: var(--ink-mute); font-size: 16px;
}

/* ============================================================
   POST PAGE — editorial layout
   ============================================================ */

.post-hero {
  padding: 28px 0 40px;
}
.post-breadcrumb {
  display: flex; gap: 8px; align-items: center;
  font-size: 13px; color: var(--ink-mute);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.post-breadcrumb a { color: var(--ink-mute); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.post-breadcrumb [aria-current] { color: var(--ink-soft); font-weight: 500; }

.post-cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-soft); color: var(--primary);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.post-cat-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.post-hero h1 {
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 22px;
  text-wrap: balance;
  max-width: 22ch;
}
.post-hero h1 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--primary);
}

.post-meta {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  font-size: 14px; color: var(--ink-soft);
  margin-bottom: 36px;
}
.post-meta .author {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--ink);
}
.post-meta .author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: white;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-size: 18px;
  font-weight: 400;
}
.post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-mute); opacity: 0.5; }

.post-hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 56px;
}

/* Layout: TOC sidebar + body */
.post-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 980px) {
  .post-layout { grid-template-columns: 1fr; gap: 32px; }
}

.post-toc {
  position: sticky; top: 100px;
  font-size: 14px;
}
@media (max-width: 980px) {
  .post-toc { position: static; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
}
.post-toc-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.post-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  border-left: 2px solid var(--line);
}
.post-toc li { padding-left: 14px; line-height: 1.4; }
.post-toc a {
  color: var(--ink-soft); text-decoration: none;
  transition: color 0.15s;
}
.post-toc a:hover { color: var(--primary); }

/* Post body */
.post-body {
  max-width: 68ch;
  font-size: 18px; line-height: 1.72;
  color: var(--ink-soft);
}
.post-body > p:first-of-type {
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink);
}
.post-body p { margin: 0 0 1.4em; text-wrap: pretty; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body em { font-family: var(--font-serif); font-style: italic; }
.post-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body h2 {
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--ink);
  margin: 2em 0 0.7em;
  text-wrap: balance;
}
.post-body h3 {
  font-size: 22px; line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  margin: 1.6em 0 0.5em;
}
.post-body ul, .post-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.post-body li { margin-bottom: 0.5em; }
.post-body li::marker { color: var(--ink-mute); }
.post-body blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--primary);
  font-family: var(--font-serif); font-style: italic;
  font-size: 22px; line-height: 1.45;
  color: var(--ink);
}

/* Key takeaways box (top of post body) */
.post-takeaways {
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  margin-bottom: 40px;
  border: 1px solid var(--line);
}
.post-takeaways-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.post-takeaways ul {
  margin: 0; padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 12px;
}
.post-takeaways li {
  font-size: 16px; line-height: 1.5;
  color: var(--ink);
  padding-left: 28px;
  position: relative;
}
.post-takeaways li::before {
  content: ""; position: absolute;
  left: 0; top: 9px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* Inline offer card (embedded by {{offer:pX}}) */
.post-offer-card {
  display: flex; align-items: stretch;
  margin: 2em 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}
.post-offer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
  text-decoration: none;
}
.post-offer-media {
  flex: 0 0 38%;
  background-size: cover; background-position: center;
  min-height: 220px;
  position: relative;
}
.post-offer-media .badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.94);
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.post-offer-body {
  flex: 1;
  padding: 26px 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.post-offer-vendor {
  font-size: 13px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600;
}
.post-offer-title {
  font-size: 22px; font-weight: 700; line-height: 1.2;
  margin: 0; color: var(--ink);
  letter-spacing: -0.01em;
}
.post-offer-tagline {
  font-size: 15px; line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  font-family: var(--font-serif); font-style: italic;
}
.post-offer-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--ink-soft);
  margin-top: 4px;
}
.post-offer-meta .price { color: var(--ink); font-weight: 700; }
.post-offer-meta .star { color: var(--butter); }
.post-offer-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--primary);
  padding-top: 6px;
}
.post-offer-card:hover .post-offer-cta { gap: 12px; }
@media (max-width: 640px) {
  .post-offer-card { flex-direction: column; }
  .post-offer-media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
}

/* FAQ section */
.post-faq {
  margin-top: 64px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}
.post-faq-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 12px;
}
.post-faq h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 32px;
}
.post-faq h2 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--primary);
}
.post-faq details {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.post-faq details:last-of-type { border-bottom: 1px solid var(--line); }
.post-faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-size: 19px; font-weight: 600; color: var(--ink);
  line-height: 1.35;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: "+";
  font-size: 26px; font-weight: 300; line-height: 1;
  color: var(--ink-mute);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.post-faq details[open] summary::after { content: "−"; }
.post-faq-answer {
  margin-top: 14px;
  font-size: 16px; line-height: 1.7;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* Author bio */
.post-author {
  margin-top: 56px;
  background: var(--bg-warm);
  border-radius: var(--radius-lg);
  padding: 32px 34px;
  display: flex; align-items: flex-start; gap: 22px;
  border: 1px solid var(--line);
}
.post-author-avatar {
  flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary); color: white;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic;
  font-size: 30px;
}
.post-author-body { flex: 1; }
.post-author-name {
  font-size: 17px; font-weight: 700; margin: 0 0 4px;
}
.post-author-name small {
  font-weight: 500; color: var(--ink-mute); font-size: 13px; margin-left: 8px;
}
.post-author-bio {
  font-size: 15px; line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.post-author-meta {
  font-size: 13px; color: var(--ink-mute);
  margin-top: 10px;
}

/* "Mentioned in this post" rail */
.post-mentioned {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.post-mentioned-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 10px;
}
.post-mentioned h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 28px;
}
.post-mentioned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.post-mention {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-mention:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: transparent; }
.post-mention-media { aspect-ratio: 4 / 3; background-size: cover; background-position: center; }
.post-mention-body { padding: 14px 16px 18px; }
.post-mention-vendor { font-size: 11px; color: var(--ink-mute); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.post-mention-title { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 4px 0 6px; color: var(--ink); }
.post-mention-meta { font-size: 13px; color: var(--ink-soft); display: flex; gap: 10px; align-items: center; }
.post-mention-meta .star { color: var(--butter); }

/* Disclosure block */
.post-disclosure {
  margin-top: 56px;
  padding: 22px 24px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-size: 14px; line-height: 1.6;
  color: var(--ink-soft);
}
.post-disclosure strong { color: var(--ink); }
.post-disclosure a { color: var(--primary); }
