/* Blog: the index (/blog/) and every post. Loaded after landing.css (tokens,
   header, footer, buttons) and breadcrumb.css; the pages are generated by
   scripts/build-blog.js. */

.blog-page {
  background: #ffffff;
}

/* ---- Post header ---------------------------------------------------------- */
.post-header,
.post-body {
  max-width: 780px;
}

.post-header {
  padding-top: 64px;
  padding-bottom: 8px;
}

.post-kicker {
  margin: 18px 0 12px;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-header h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.post-dek {
  margin: 0 0 20px;
  color: #42464d;
  font-size: 20px;
  line-height: 1.5;
}

.post-meta {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.post-origin {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
}

.post-origin a {
  color: var(--accent-deep);
}

/* ---- Body text ------------------------------------------------------------ */
.post-body {
  padding-top: 32px;
  padding-bottom: 32px;
  color: #2b2e33;
  font-size: 18px;
  line-height: 1.75;
}

.post-body > p,
.post-body > ul,
.post-body > ol {
  margin: 0 0 22px;
}

.post-body h2 {
  margin: 48px 0 16px;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  scroll-margin-top: 96px;
}

.post-body a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-body li + li {
  margin-top: 8px;
}

.post-lede {
  color: var(--text);
  font-size: 20px;
  line-height: 1.7;
}

.post-chain,
.post-formula {
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Blocks --------------------------------------------------------------- */
.post-takeaways {
  margin: 8px 0 28px;
  padding: 22px 24px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 16px;
  background: rgba(0, 113, 227, 0.04);
}

.post-takeaways h2,
.post-sources h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-takeaways ul {
  margin: 0;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.6;
}

.post-toc {
  margin: 0 0 12px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.post-toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-toc ol {
  margin: 0;
  padding-left: 20px;
}

.post-toc li + li {
  margin-top: 4px;
}

.post-toc a {
  color: var(--text);
  text-decoration: none;
}

.post-toc a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.post-figure {
  margin: 32px 0;
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.post-figure figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.55;
}

.post-table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.post-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.post-table caption {
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.post-table th,
.post-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.post-table th {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-table tr:last-child td {
  border-bottom: 0;
}

.post-table td:nth-child(n + 3) {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.post-compare > div {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 16px;
  line-height: 1.6;
}

.post-compare p {
  margin: 6px 0 0;
}

.post-steps > li {
  padding-left: 4px;
}

.post-sources {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
}

.post-sources ul {
  margin: 0;
  padding-left: 18px;
}

.post-disclaimer {
  margin-top: 32px !important;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
}

.post-series {
  margin-top: 40px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  font-size: 16px;
}

.post-series strong {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-series ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-series li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.post-series li span {
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-series li[aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* ---- Call to action after a post ------------------------------------------ */
.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  max-width: 1180px;
  margin-top: 24px;
  margin-bottom: 80px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
}

.post-cta > div:first-child {
  max-width: 620px;
}

.post-cta-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-cta h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
}

.post-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Index ---------------------------------------------------------------- */
.blog-hero {
  padding-top: 64px;
  padding-bottom: 32px;
}

.blog-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.blog-hero p {
  max-width: 640px;
  margin: 0 0 14px;
  color: #42464d;
  font-size: 18px;
  line-height: 1.6;
}

.blog-feed-link {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 96px;
}

.blog-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.blog-card-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.blog-card .post-kicker {
  margin: 0 0 8px;
}

/* .blog-card p sets the card's body text; the kicker and date keep their
   own small mono type. */
.blog-card .post-kicker,
.blog-card .post-meta {
  font-size: 12px;
}

.blog-card .post-meta {
  color: var(--faint);
}

.blog-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.2;
}

.blog-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--accent-deep);
}

.blog-card p {
  margin: 0 0 10px;
  color: #42464d;
  font-size: 16px;
  line-height: 1.6;
}

/* ---- Narrow screens ------------------------------------------------------- */
@media (max-width: 760px) {
  .post-header,
  .blog-hero {
    padding-top: 40px;
  }

  .post-dek {
    font-size: 18px;
  }

  .post-body {
    font-size: 17px;
    line-height: 1.7;
  }

  .post-lede {
    font-size: 18px;
  }

  .post-body h2 {
    margin-top: 40px;
    font-size: 24px;
  }

  .post-compare,
  .blog-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-cta {
    padding: 22px;
  }

  .post-cta-actions,
  .post-cta-actions .button {
    width: 100%;
  }

  /* The adoption table becomes one card per stage, each value under its
     label, instead of five columns to swipe. */
  .post-table-wrap {
    overflow: visible;
  }

  .post-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .post-table tbody,
  .post-table tr,
  .post-table td {
    display: block;
  }

  .post-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .post-table tr:last-child {
    border-bottom: 0;
  }

  .post-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 2px 0;
    border: 0;
    white-space: normal;
  }

  .post-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .post-table td:first-child {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
  }

  .post-table td:first-child::before {
    content: none;
  }
}
