/* =================================================================
   Willow — Blog article layout
   Used by individual blog-*.html files
   ================================================================= */

.blog-article {
  padding: 120px 0 80px;
}

.blog-bread {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
}
.blog-bread a { color: var(--ink-3); }
.blog-bread a:hover { color: var(--ink); }
.blog-bread .sep { color: var(--ink-4); }
.blog-bread .cur { color: var(--blue); }

.blog-topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 28px;
}
.blog-topic-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

.blog-title {
  font-size: clamp(40px, 5.6vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 22ch;
  margin-top: 22px;
  font-weight: 600;
}
.blog-lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-2);
  letter-spacing: -0.008em;
  margin-top: 24px;
  max-width: 62ch;
  text-wrap: pretty;
}

.blog-byline {
  margin-top: 36px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.blog-byline .author { display: flex; gap: 12px; align-items: center; }
.blog-byline .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}
/* ===== Author photos =====
   The avatar defaults to initials on a tinted circle. Where we have a real
   headshot, the markup carries data-photo="<slug>" and the rules below swap
   in the photo and hide the initials behind it.

   There are 21 distinct authors and only a few photos, which is why this is
   opt-in per person rather than one blanket rule — a blanket rule would put
   one face on everybody's byline.

   To add an author: drop the image in assets/, then add a single rule here.
   `color: transparent` lives in the per-person rule, never the shared one,
   so an author tagged with a slug that has no rule yet still shows their
   initials instead of an empty circle. */
.blog-byline .av[data-photo],
.blog-end .end-author .av[data-photo] {
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.blog-byline .av[data-photo="ludwig"],
.blog-end .end-author .av[data-photo="ludwig"] {
  background-image: url("team-ludwig.jpg");
  color: transparent;
}
.blog-byline .av[data-photo="kjell"],
.blog-end .end-author .av[data-photo="kjell"] {
  background-image: url("team-kjell.jpg");
  color: transparent;
}

.blog-byline .nm { font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.2; }
.blog-byline .rl { font-size: 12px; color: var(--ink-3); font-family: var(--mono); letter-spacing: 0.02em; }
.blog-byline .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  display: flex;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
}
.blog-byline .meta .dot { color: var(--ink-4); }

/* Standalone read-time (course chapters) */
.read-meta {
  margin-top: 32px;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.read-meta .clock { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.read-meta b { color: var(--ink); font-weight: 600; }

/* Hero illustration */
.blog-hero {
  margin-top: 56px;
  aspect-ratio: 21 / 9;
  border-radius: var(--r-xl);
  background: var(--cream-2);
  border: 1px solid var(--rule);
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.blog-hero.dark { background: var(--ink); color: var(--cream); border: 0; }
.blog-hero.blue { background: var(--blue); color: var(--white); border: 0; }
.blog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--ink-4) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: 0.4;
  pointer-events: none;
}
.blog-hero.dark::after,
.blog-hero.blue::after {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.22) 1px, transparent 0);
  opacity: 1;
}
.blog-hero > * { position: relative; z-index: 1; }
.blog-hero .top, .blog-hero .bot {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.blog-hero.dark .top, .blog-hero.dark .bot,
.blog-hero.blue .top, .blog-hero.blue .bot { color: #d3d7e3; }
.blog-hero .big {
  font-size: clamp(56px, 9vw, 132px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
  color: var(--ink);
  text-wrap: balance;
  max-width: 16ch;
  align-self: flex-start;
}
.blog-hero.dark .big, .blog-hero.blue .big { color: var(--white); }
.blog-hero .big .em { color: var(--blue); font-style: italic; font-weight: 500; }
.blog-hero.dark .big .em { color: var(--blue-mid); }
/* Hero card doubles as the article title (full title, semantic h1) */
h1.blog-hero-title, .blog-hero h1.big {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  max-width: 20ch;
  margin: 0;
}

/* Article body grid */
.blog-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}

.blog-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
}
body.has-announce .blog-toc { top: calc(var(--nav-h) + 24px + 32px); }
.blog-toc .toc-label {
  font-family: var(--mono);
  font-size: var(--t-micro);
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: block;
}
.blog-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
  counter-reset: bsec;
}
.blog-toc ol li { counter-increment: bsec; }
.blog-toc ol li a {
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
  transition: background 0.12s, color 0.12s;
}
.blog-toc ol li a::before {
  content: counter(bsec, decimal-leading-zero);
  font-family: var(--mono);
  font-size: var(--t-micro);
  color: var(--ink-4);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 22px;
}
.blog-toc ol li a:hover { background: var(--cream-2); color: var(--ink); }
.blog-toc ol li a.active { color: var(--blue); background: var(--blue-soft); }
.blog-toc ol li a.active::before { color: var(--blue); }

.blog-share {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-share .lbl {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  width: 100%;
  margin-bottom: 8px;
}
.blog-share a {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  transition: border-color 0.15s, color 0.15s;
}
.blog-share a:hover { border-color: var(--ink); color: var(--ink); }

.blog-body { min-width: 0; max-width: 720px; }
.blog-body h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 56px 0 18px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.blog-body h2:first-child { margin-top: 0; }
.blog-body h3 {
  font-size: 22px;
  letter-spacing: -0.014em;
  line-height: 1.25;
  margin: 36px 0 14px;
}
.blog-body p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 18px;
  text-wrap: pretty;
}
.blog-body p.lead-para {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.008em;
}
.blog-body strong { color: var(--ink); font-weight: 600; }
.blog-body a { color: var(--blue); border-bottom: 1px solid var(--blue); }

.blog-body ul, .blog-body ol {
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-body ul li, .blog-body ol li {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  padding-left: 28px;
  position: relative;
}
.blog-body ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  width: 10px;
  height: 1px;
  background: var(--blue);
}
.blog-body ol { counter-reset: blogol; }
.blog-body ol li { counter-increment: blogol; }
.blog-body ol li::before {
  content: counter(blogol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
}

.blog-body blockquote {
  margin: 28px 0;
  padding: 24px 28px;
  background: var(--paper);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-style: italic;
}
.blog-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-style: normal;
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Stat callouts inside articles */
.blog-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 28px 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.blog-stat-row .cell {
  padding: 20px 22px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px;
}
.blog-stat-row .cell:last-child { border-right: 0; }
.blog-stat-row .cell .lbl {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.blog-stat-row .cell .big {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--blue);
  line-height: 1;
  margin-top: 6px;
}
.blog-stat-row .cell .big small {
  font-size: 14px; color: var(--ink-3); margin-left: 2px;
}
.blog-stat-row .cell .det {
  font-size: 12px; color: var(--ink-3); line-height: 1.4; margin-top: 6px;
}

/* TODO callout — same yellow as cookie policy */
.blog-body .todo {
  display: block;
  margin: 28px 0;
  padding: 22px 26px;
  background: rgba(245,163,33,0.10);
  border-left: 3px solid var(--punch-yellow);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.blog-body .todo strong {
  display: block;
  margin-bottom: 8px;
  font-size: var(--t-micro);
  color: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.blog-body .todo a { color: var(--blue); border-bottom: 1px solid var(--blue); }

/* Article footer — author + share + CTAs */
.blog-end {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.blog-end .end-author { display: flex; gap: 14px; align-items: center; }
.blog-end .end-author .av {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}
.blog-end .end-author .nm { font-size: 15px; color: var(--ink); font-weight: 600; line-height: 1.3; }
.blog-end .end-author .rl { font-size: 12px; color: var(--ink-3); font-family: var(--mono); letter-spacing: 0.02em; }
.blog-end .end-actions { display: flex; gap: 10px; }

/* Related posts */
.blog-related {
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid var(--rule);
}
/* Space the closing CTA card off the related-posts row above it */
.blog-related + .cta-card { margin-top: 88px; }
.blog-related h2 {
  font-size: 36px;
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin-bottom: 32px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-related-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}
.blog-related-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.blog-related-card .topic {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.blog-related-card h4 {
  font-size: 19px;
  letter-spacing: -0.012em;
  line-height: 1.2;
}
.blog-related-card p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1;
}
.blog-related-card .meta {
  font-family: var(--mono);
  font-size: var(--t-micro);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
}

/* Bottom CTA */
.blog-cta {
  margin: 96px 0 0;
  padding: 56px 48px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.blog-cta h3 {
  font-size: 36px;
  letter-spacing: -0.022em;
  line-height: 1.08;
  color: var(--cream);
  max-width: 18ch;
}
.blog-cta p {
  color: rgba(244,239,231,0.75);
  font-size: 15px;
  line-height: 1.55;
  margin-top: 12px;
  max-width: 48ch;
}
.blog-cta .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-self: end; }

@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: 1fr; gap: 32px; }
  .blog-toc { position: static; }
  .blog-toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .blog-related-grid { grid-template-columns: 1fr; }
  .blog-cta { grid-template-columns: 1fr; padding: 36px 28px; }
  .blog-cta .cta-actions { justify-self: start; }
  .blog-hero { aspect-ratio: 16/10; padding: 28px; }
}
@media (max-width: 720px) {
  .blog-toc ol { grid-template-columns: 1fr; }
  .blog-byline .meta { margin-left: 0; }
}

/* =================================================================
   Success-story snippet — embedded proof inside article bodies
   ================================================================= */
.story-card {
  margin: 44px 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
a.story-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -22px rgba(16,51,213,0.5);
}
.story-card .sc-stat {
  background: var(--blue);
  color: var(--white);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.story-card .sc-stat::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.16), transparent 70%);
}
.story-card .sc-kicker {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.story-card .sc-kicker::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-mid);
}
.story-card .sc-big {
  font-size: 50px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.9;
  margin-top: auto;
}
.story-card .sc-big small { font-size: 22px; font-weight: 500; margin-left: 2px; vertical-align: baseline; opacity: 0.85; }
.story-card .sc-lab {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.03em;
  color: #d8dae3;
  text-transform: uppercase;
}
.story-card .sc-second {
  font-family: var(--mono);
  font-size: var(--t-micro);
  color: #cdd0db;
  border-top: 1px solid rgba(255,255,255,0.22);
  padding-top: 12px;
  letter-spacing: 0.02em;
}
.story-card .sc-second b { color: var(--white); font-weight: 600; }
.story-card .sc-body {
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
.story-card .sc-body .sc-label {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.story-card .sc-body .sc-take {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-weight: 500;
}
.story-card .sc-body .sc-who {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.story-card .sc-body .sc-more {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
a.story-card:hover .sc-more { gap: 11px; }

@media (max-width: 720px) {
  .story-card { grid-template-columns: 1fr; }
  .story-card .sc-stat { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }
  .story-card .sc-stat::after { display: none; }
  .story-card .sc-big { margin-top: 0; }
  .story-card .sc-second { border-top: none; border-left: 1px solid rgba(255,255,255,0.22); padding-top: 0; padding-left: 14px; }
}

/* Migrated article media */
.blog-body figure { margin: 32px 0; }
.blog-body figure div { max-width: 100%; }
.blog-body img { max-width: 100%; height: auto; display: block; margin: 0 auto; border: 1px solid var(--line); }
.blog-body figcaption { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-top: 10px; text-align: center; letter-spacing: 0.02em; }
.blog-body iframe { max-width: 100%; border: 1px solid var(--line); }
.blog-body h3 { font-size: 22px; letter-spacing: -0.015em; margin: 36px 0 12px; }
.blog-body h4 { font-size: 18px; letter-spacing: -0.01em; margin: 28px 0 10px; }
.blog-body h5, .blog-body h6 { font-size: 15px; margin: 24px 0 8px; }
.wv-bot .who { color: var(--ink); font-weight: 500; text-transform: none; letter-spacing: 0.02em; }
.wv-row .val { font-family: var(--mono); font-size: 18px; font-weight: 500; color: #fff; white-space: nowrap; }
.wv-row .val .up { color: #7c9bf2; }
