/* ===== Blog post — long-form article (dark theme) ===== */
/* Built on the design tokens from styles.css. Signature colors come from
   --page-c1 / --page-c2 set per-post on <body> by layouts/blog/single.html. */

/* ----- Hero header ----- */
.post-hero h1 {
  /* Toned down from the giant page-hero size for readable article titles */
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.04;
  max-width: 20ch;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.post-meta .post-tag { color: var(--page-c1); }

.post-dek {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 24px 0 0;
  text-wrap: balance;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
}

.post-byline .mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--page-c1), var(--page-c2));
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

/* ----- Article body — reading column ----- */
.post-body.container {
  max-width: 820px;
  padding-top: 64px;
  padding-bottom: 120px;
}

.post-body > p,
.post-body > ul,
.post-body > ol {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 68ch;
}

.post-body > ul,
.post-body > ol { padding-left: 22px; }
.post-body li { margin-bottom: 8px; }

.post-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 56px 0 20px;
  text-wrap: balance;
}

.post-body h2 .num {
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--page-c1);
  margin-right: 12px;
  vertical-align: 0.12em;
}

.post-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 36px 0 12px;
}

.post-body strong { color: var(--ink); font-weight: 600; }

.post-body a {
  color: var(--page-c1);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.post-body a:hover { color: var(--ink); }

/* ----- Inline code ----- */
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: var(--radius);
  color: var(--ink-2);
}

/* ----- Code blocks ----- */
.post-body pre {
  margin: 24px 0;
  padding: 20px 22px;
  background: #050505;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.post-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ----- Comparison table ----- */
.post-body .table-wrap {
  overflow-x: auto;
  margin: 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}

.post-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  min-width: 520px;
}

.post-body th,
.post-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}

.post-body thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-3);
}

.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.post-body .cap {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin: 12px 2px 0;
}

.post-body hr.div {
  border: none;
  border-top: 1px solid var(--line);
  margin: 56px 0;
}

/* ----- Pull quote ----- */
.post-body .pull {
  margin: 34px 0;
  padding: 22px 26px;
  background: var(--bg-2);
  border-left: 3px solid var(--page-c1);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: balance;
}

/* ----- Stat row ----- */
.post-body .stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 36px 0 40px;
}

.post-body .stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
}

.post-body .stat .n {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  color: var(--page-c1);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.post-body .stat .l {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
}

/* ----- Closing CTA ----- */
.post-closer {
  margin-top: 48px;
  padding: 36px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 120% at 100% 0%, color-mix(in srgb, var(--page-c1) 16%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 120% at 0% 100%, color-mix(in srgb, var(--page-c2) 12%, transparent), transparent 60%),
    var(--bg-2);
}

.post-closer h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 10px;
}

.post-closer p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 56ch;
  margin: 0 0 22px;
}

@media (max-width: 640px) {
  .post-body.container { padding-top: 48px; }
  .post-body pre { font-size: 12px; }
  .post-body .stat-row { grid-template-columns: 1fr 1fr; }
}
