/* ==========================================================================
   Blog (blog/*.html, generated by scripts/build_blog.py)
   White and silver, ink text, navy only for small accents.
   ========================================================================== */

:root {
  --bl-white: #ffffff;
  --bl-silver-1: #f3f5f8;
  --bl-silver-2: #e4e8ee;
  --bl-silver-3: #c5ccd6;
  --bl-silver-4: #8d97a5;
  --bl-ink: #0e1b2e;
  --bl-muted: #5b6676;
  --bl-line: rgba(14, 27, 46, 0.12);
  --inner-x: calc(var(--gutter) + clamp(0rem, 4vw, 5rem));
}

body.page-blog { background: var(--bl-white); color: var(--bl-ink); }
.bl-inner { padding-inline: var(--inner-x); }
.bl-inner--narrow { max-width: calc(46rem + 2 * var(--inner-x)); margin-inline: auto; }

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.08s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Breadcrumb */
.page-blog .xp-crumbs { margin-bottom: 1.75rem; }
.page-blog .xp-crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; color: var(--bl-muted); }
.page-blog .xp-crumbs li + li::before { content: "/"; margin: 0 0.6rem; opacity: 0.5; }
.page-blog .xp-crumbs a:hover { color: var(--bl-ink); text-decoration: underline; text-underline-offset: 3px; }
.page-blog .xp-crumbs [aria-current] { color: var(--bl-ink); }

.bl-eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bl-silver-4);
}

/* Hub hero -------------------------------------------------------------- */
.bl-hero {
  padding: calc(152px + clamp(2.5rem, 5vw, 4rem)) 0 clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, var(--bl-white) 0%, var(--bl-silver-1) 100%);
  border-bottom: 1px solid var(--bl-line);
}
.bl-hero__title {
  max-width: 14ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.4vw, 6.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.bl-hero__title em { font-style: italic; font-weight: 500; color: var(--bl-silver-4); }
.bl-hero__lead { max-width: 52ch; margin: 1.5rem 0 0; font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.7; color: var(--bl-muted); }

/* Cards ----------------------------------------------------------------- */
.bl-list { padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(4rem, 8vw, 7rem); }
.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.bl-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bl-white);
  border: 1px solid var(--bl-line);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.3s ease;
}
.bl-card a:hover,
.bl-card a:focus-visible {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: 0 28px 50px -22px rgba(14, 27, 46, 0.32), 0 8px 18px -10px rgba(14, 27, 46, 0.18);
}
.bl-card a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.bl-card__media { overflow: hidden; aspect-ratio: 16 / 10; background: var(--bl-silver-2); }
.bl-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.bl-card a:hover .bl-card__media img { transform: scale(1.04); }
.bl-card__body { display: flex; flex: 1; flex-direction: column; padding: clamp(1.25rem, 2vw, 1.75rem); }
.bl-card__title {
  margin: 0.9rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.bl-card a:hover .bl-card__title { color: var(--navy); }
.bl-card__excerpt { margin: 0.8rem 0 0; font-size: 0.9375rem; line-height: 1.65; color: var(--bl-muted); }
.bl-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bl-card__more svg { transition: transform 0.4s var(--ease-out); }
.bl-card a:hover .bl-card__more svg { transform: translateX(6px); }

/* Featured (newest) article spans the row, image beside the text */
.bl-card--featured { grid-column: 1 / -1; }
.bl-card--featured a { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.bl-card--featured .bl-card__media { aspect-ratio: auto; min-height: 100%; }
.bl-card--featured .bl-card__body { justify-content: center; padding: clamp(1.75rem, 4vw, 3.5rem); }
.bl-card--featured .bl-card__title { font-size: clamp(1.75rem, 3vw, 2.75rem); line-height: 1.08; }
.bl-card--featured .bl-card__excerpt { font-size: 1rem; }
.bl-card--featured .bl-card__more { margin-top: 0; padding-top: 2rem; }

.bl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-muted);
}
.bl-meta > :first-child { flex-basis: 100%; color: var(--navy); }
.bl-meta > * + * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; margin-right: 0.9rem; vertical-align: middle; border-radius: 50%; background: var(--bl-silver-3); }
.bl-empty { padding: 3rem 0; color: var(--bl-muted); }

/* Article --------------------------------------------------------------- */
.bl-article__head { padding-top: calc(152px + clamp(2rem, 4vw, 3.5rem)); }
.bl-article__title {
  margin: 1.1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.bl-article__lead { margin: 1.4rem 0 0; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--bl-muted); }
.bl-article__byline { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--bl-line); font-size: 0.8125rem; font-weight: 500; color: var(--bl-ink); }
.bl-article__cover { margin: clamp(2rem, 4vw, 3.5rem) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bl-silver-2); }
.bl-article__cover img { width: 100%; height: 100%; object-fit: cover; }

.bl-article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}
.bl-article__aside { grid-column: 1; align-self: start; position: sticky; top: 140px; justify-self: start; max-width: 15rem; }
.bl-prose { grid-column: 2; }

.bl-toc { margin-bottom: 1.75rem; }
.bl-toc p { margin: 0 0 0.9rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bl-muted); }
.bl-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--bl-line); }
.bl-toc a { display: block; padding: 0.4rem 0 0.4rem 1rem; margin-left: -1px; border-left: 1px solid transparent; font-size: 0.8125rem; line-height: 1.45; color: var(--bl-muted); transition: color 0.2s ease, border-color 0.2s ease; }
.bl-toc a:hover, .bl-toc a.is-active { color: var(--bl-ink); border-left-color: var(--navy); }

.bl-share {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--bl-silver-3);
  background: var(--bl-white);
  color: var(--bl-ink);
  font: 600 0.6875rem/1 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.bl-share:hover, .bl-share.is-copied { border-color: var(--navy); color: var(--navy); }

.bl-prose { font-size: 1.0625rem; line-height: 1.8; color: #2a3546; }
.bl-prose > :first-child { margin-top: 0; }
.bl-prose p, .bl-prose ul, .bl-prose ol { margin: 0 0 1.4rem; }
.bl-prose h2 {
  margin: 3rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--bl-ink);
  scroll-margin-top: 140px;
}
.bl-prose h3 { margin: 2.25rem 0 0.75rem; font-size: 1.125rem; font-weight: 600; color: var(--bl-ink); }
.bl-prose ul, .bl-prose ol { padding-left: 1.25rem; }
.bl-prose li { margin-bottom: 0.5rem; padding-left: 0.35rem; }
.bl-prose li::marker { color: var(--bl-silver-4); }
.bl-prose a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--bl-silver-3); text-underline-offset: 3px; transition: text-decoration-color 0.2s ease; }
.bl-prose a:hover { text-decoration-color: var(--navy); }
.bl-prose strong { color: var(--bl-ink); font-weight: 600; }
.bl-prose blockquote {
  margin: 2.5rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: var(--bl-ink);
}
.bl-prose blockquote p { margin: 0; }
.bl-figure { margin: 2.5rem 0; }
.bl-figure img { width: 100%; height: auto; }

.bl-article__foot { padding-bottom: clamp(3rem, 6vw, 5rem); }
.bl-back {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bl-back svg { transition: transform 0.4s var(--ease-out); }
.bl-back:hover svg { transform: translateX(-6px); }

.bl-more { padding: clamp(3.5rem, 7vw, 6rem) 0; background: var(--bl-silver-1); border-top: 1px solid var(--bl-line); }
.bl-more__title { margin: 0 0 2rem; font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .bl-article__layout { grid-template-columns: minmax(0, 46rem); justify-content: center; }
  .bl-article__aside { grid-column: 1; grid-row: 2; position: static; max-width: none; }
  .bl-prose { grid-column: 1; grid-row: 1; }
  .bl-toc { display: none; }
}
@media (max-width: 900px) {
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-card--featured a { grid-template-columns: 1fr; }
  .bl-card--featured .bl-card__media { aspect-ratio: 16 / 10; min-height: 0; }
}
@media (max-width: 1023px) {
  .bl-hero, .bl-article__head { padding-top: calc(76px + 2.5rem); }
}
@media (max-width: 600px) {
  .bl-grid { grid-template-columns: 1fr; }
  .bl-article__cover { aspect-ratio: 4 / 3; }
  .bl-prose { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .bl-card a, .bl-card__media img { transition: none; }
}
