/* Blog — index + post prose. Uses the brand tokens from base.css (--ink, --ground,
   --red, --grey-*, --mono). Square corners, Inter body, mono for data labels,
   red only where the system sanctions it (dark moment, CTA hover, link hover).

   Post anatomy ("survey document"): brand-hero header (cadastral grid + dot from
   brand.css) with mono metadata + standfirst → 680px prose measure with 880px
   breakout moments (pull-stats, tables) → dark underwrite moment close. */

/* ---- Post body ---- */
.blog-post-body { font-size: 1.02rem; line-height: 1.75; color: var(--grey-900); }
/* One left rail: the 680px reading measure shares the hero's left axis;
   evidence (pull-stats, tables, code) breaks out rightward to 880px. */
.blog-post-body > * { max-width: 680px; }
.blog-post-body > blockquote,
.blog-post-body > table,
.blog-post-body > pre { max-width: 880px; }
.blog-post-body > *:first-child { margin-top: 0; }
.blog-post-body p { margin-bottom: 1.4rem; text-wrap: pretty; }
.blog-post-body h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--ink);
  margin-top: 3.4rem;
  margin-bottom: 1.1rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--grey-200);
}
.blog-post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 2.2rem;
  margin-bottom: 0.75rem;
}
.blog-post-body ul,
.blog-post-body ol { margin-bottom: 1.4rem; padding-left: 1.3rem; }
.blog-post-body li { margin: 0 0 0.6rem; padding-left: 0.2rem; }
.blog-post-body a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--grey-300);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.blog-post-body a:hover { color: var(--red); border-color: var(--red); }
.blog-post-body strong { font-weight: 700; color: var(--ink); }
.blog-post-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  padding: 0.05em 0.35em;
  color: var(--grey-900);
}
.blog-post-body pre {
  background: var(--ink);
  color: #fff;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  line-height: 1.6;
}
.blog-post-body pre code { background: none; border: none; padding: 0; color: inherit; }

/* Pull-stat: the cream evidence band. Authored in markdown as a blockquote;
   numbers in <strong> render in mono — the brand's data-label voice. */
.blog-post-body blockquote {
  margin-top: 2.8rem;
  margin-bottom: 2.8rem;
  padding: 2.1rem 2.4rem;
  background: var(--ground);
}
.blog-post-body blockquote p {
  margin: 0;
  font-size: clamp(1.12rem, 2.1vw, 1.4rem);
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  max-width: none;
}
.blog-post-body blockquote p + p { margin-top: 0.8rem; }
.blog-post-body blockquote strong {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.02em;
  letter-spacing: -0.02em;
}
.blog-post-body hr { border: none; border-top: 1px solid var(--grey-200); margin: 2.5rem 0; }
.blog-post-body table {
  display: block;
  overflow-x: auto;
  margin-bottom: 1.6rem;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}
.blog-post-body th {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
  text-align: left;
  padding: 0.5rem 1rem 0.5rem 0;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.blog-post-body td {
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: top;
}
.blog-post-body tbody tr:nth-child(even) td { background: var(--grey-100); }
.blog-post-foot {
  max-width: 680px;
  margin: 3.5rem 0 0;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  border-top: 1px solid var(--grey-200);
}
.blog-post-foot a {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-500);
  text-decoration: none;
}
.blog-post-foot a:hover { color: var(--ink); }

/* ---- Dark underwrite moment (post close) — the sanctioned red beat ---- */
.post-moment {
  background: var(--ink);
  color: #fff;
  border-top: 4px solid var(--red);
  padding: 90px 0;
}
.post-moment-eyebrow {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #AEB4BE;
  margin: 0 0 1.3rem;
}
.post-moment h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
  color: #fff;
  max-width: 22ch;
  margin: 0;
}
.post-moment h2 .red { color: var(--red); }
.post-moment p {
  color: #AEB4BE;
  max-width: 54ch;
  line-height: 1.75;
  margin: 1.4rem 0 0;
}
.post-moment-cta {
  display: inline-block;
  margin-top: 2.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: #fff;
  padding: 0.95rem 1.7rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.post-moment-cta:hover { background: var(--red); color: #fff; }
.post-moment-links { margin: 1.5rem 0 0; }
.post-moment-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #AEB4BE;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.post-moment-links a:hover { color: #fff; border-color: #fff; }

/* =====================================================================
   Blog redesign 2026-07-26 — "Front Page" index + "Standard" post template
   ===================================================================== */

/* ---- Post header ---- */
.post-head { padding: 52px 0 30px; }
.post-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
  color: var(--ink);
  margin: 0.8rem 0 1.1rem;
  max-width: 26ch;
}
.post-crumbs {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  margin: 0;
}
.post-crumbs a { color: var(--grey-500); text-decoration: none; }
.post-crumbs a:hover { color: var(--ink); }
.post-crumbs span { margin: 0 0.4rem; color: var(--grey-300); }
.post-byline { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.post-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; flex: none;
}
.post-who { font-size: 0.8rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.post-who span {
  display: block;
  font-family: var(--mono); font-weight: 400;
  font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--grey-400);
}
.post-tagchip {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-500); border: 1px solid var(--grey-300);
  padding: 0.18rem 0.5rem; border-radius: 3px;
}
.post-read {
  font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey-400);
}

/* ---- Featured image ---- */
.post-figure { margin: 0; padding: 6px 0 0; }
.post-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--grey-200);
}
.post-figure figcaption {
  font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--grey-400); padding-top: 0.6rem;
}

/* ---- Two-column body: sticky rail + prose ---- */
.post-cols { padding: 44px 0 0; }
.post-cols-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 3.2rem; }
.post-rail { position: sticky; top: 24px; align-self: start; }
.post-rail-h {
  font-family: var(--mono); font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-400); margin: 0 0 0.6rem;
}
.post-toc ul { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.post-toc a {
  display: block; font-size: 0.8rem; line-height: 1.45;
  color: var(--grey-500); text-decoration: none; padding: 0.28rem 0;
  transition: color 0.15s ease;
}
.post-toc a:hover { color: var(--ink); }
.post-share { margin-bottom: 1.6rem; }
.post-share-row { display: flex; gap: 0.5rem; }
.post-share-row a, .post-copy {
  width: 30px; height: 30px;
  border: 1px solid var(--grey-300); border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-500); font-family: var(--mono); font-size: 0.72rem;
  background: none; cursor: pointer; text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.post-share-row a:hover, .post-copy:hover { border-color: var(--ink); color: var(--ink); }
.post-prov { border-top: 1px solid var(--grey-200); padding-top: 1.2rem; }
.post-prov p {
  font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--grey-500); line-height: 2; margin: 0;
}
.post-prov b { color: var(--ink); font-weight: 500; }
.post-cols-grid .blog-post-body > blockquote,
.post-cols-grid .blog-post-body > table,
.post-cols-grid .blog-post-body > pre { max-width: 100%; }
.blog-post-body h2 { scroll-margin-top: 24px; }

/* ---- Author box + related ---- */
.post-author {
  border: 1px solid var(--grey-200);
  padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start;
  margin-top: 3rem; max-width: 680px;
}
.post-author b { font-size: 0.88rem; color: var(--ink); }
.post-author p { font-size: 0.8rem; color: var(--grey-500); line-height: 1.55; margin: 0.3rem 0 0; }
.post-related { border-top: 1px solid var(--grey-200); margin-top: 3rem; padding-top: 1.8rem; max-width: 680px; }
.post-related h4 {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-400); margin: 0 0 1.1rem;
}
.post-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.post-related-grid a { text-decoration: none; }
.post-related-grid b {
  display: block; font-size: 0.92rem; font-weight: 600;
  color: var(--ink); line-height: 1.35; margin-top: 0.25rem;
  transition: color 0.15s ease;
}
.post-related-grid a:hover b { color: var(--red); }
.post-related-meta {
  font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey-400);
}

/* ---- Index: Front Page ---- */
.bi-hero { padding-bottom: 46px; }
.bi-chips { display: flex; gap: 0.5rem; margin-top: 1.7rem; flex-wrap: wrap; }
.bi-chip {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-500); background: none;
  border: 1px solid var(--grey-300); border-radius: 3px;
  padding: 0.3rem 0.7rem; cursor: pointer;
  transition: all 0.15s ease;
}
.bi-chip:hover { border-color: var(--ink); color: var(--ink); }
.bi-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.bi-feature-card, .bi-cell { color: inherit; }
.bi-meta {
  font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey-400);
}
.bi-feature { background: var(--ground); padding: 52px 0; }
.bi-feature-card {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 2.6rem; align-items: center; text-decoration: none;
}
.bi-feature-text { min-width: 0; }
.bi-feature-card h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.16;
  text-wrap: balance; color: var(--ink); margin: 0.7rem 0;
  transition: color 0.15s ease;
}
.bi-feature-card:hover h2 { color: var(--red); }
.bi-feature-desc { font-size: 0.9rem; color: var(--grey-500); line-height: 1.65; margin: 0; }
.bi-statline { font-family: var(--mono); font-size: 0.78rem; color: var(--ink); margin: 1rem 0 0; }
.bi-feature-img img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--grey-200); background: #fff;
}
.bi-grid-sec { padding: 56px 0 70px; }
.bi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
.bi-cell {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.2rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--grey-200);
  align-items: start; text-decoration: none;
}
.bi-thumb { display: block; }
.bi-thumb img {
  display: block; width: 96px; height: 72px; object-fit: cover;
  border: 1px solid var(--grey-200);
}
.bi-cell-text h3 {
  font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.3; color: var(--ink); margin: 0.3rem 0;
  transition: color 0.15s ease;
}
.bi-cell:hover h3 { color: var(--red); }
.bi-cell-text p { font-size: 0.8rem; color: var(--grey-500); line-height: 1.55; margin: 0; }
.bi-empty {
  font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--grey-400); padding: 2rem 0;
}

/* ---- Mobile ---- */
@media (max-width: 820px) {
  .post-head { padding: 34px 0 22px; }
  .post-cols-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .post-cols-grid > * { min-width: 0; }
  /* rail becomes a compact block above the article */
  .post-rail {
    position: static; order: -1;
    background: var(--grey-100); padding: 1.1rem 1.25rem;
    max-width: 100%;
  }
  .post-toc ul {
    display: flex; gap: 0.35rem; overflow-x: auto;
    margin: 0 0 0.9rem; padding-bottom: 0.2rem;
  }
  .post-toc a {
    white-space: nowrap; border: 1px solid var(--grey-300);
    border-radius: 99px; padding: 0.3rem 0.8rem; font-size: 0.72rem;
  }
  .post-share { margin: 0; }
  .post-prov { display: none; }
  .bi-feature-card { grid-template-columns: 1fr; gap: 1.4rem; }
  .bi-feature-img { order: -1; }
  .bi-grid { grid-template-columns: 1fr; }
  .bi-cell { grid-template-columns: 84px minmax(0, 1fr); gap: 0.9rem; }
  .bi-thumb img { width: 84px; height: 63px; }
}
