/* SpeedPro journal post typography.
   Shared by the blog editor preview and every exported post, so the two cannot drift.
   Coral is a fill only: rules, dots, avatar, underlines. Text accents are Ink. */

.post-page { background: var(--bg); color: var(--fg); }

.post { max-width: var(--wrap-narrow); margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--gutter) clamp(64px, 9vw, 104px); }
.post .crumbs { margin-bottom: clamp(28px, 4vw, 40px); }
.post__rule { display: block; width: 56px; height: 4px; background: var(--accent); margin-bottom: 18px; }
.post__cat {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 14px;
}
.post__title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(32px, 5.4vw, 56px); line-height: 1.02; letter-spacing: -.03em;
  margin: 0 0 20px; color: var(--fg); text-wrap: balance;
}
.post__title .dot { color: var(--accent); }
.post__summary {
  font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; font-weight: 500;
  color: var(--fg-2); margin: 0 0 28px; text-wrap: pretty;
}
.post__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--fg-muted);
}
.post__author { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; }
.post__author-role { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.post__avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.post__meta-sep { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.post__hero {
  margin: 32px 0 8px; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--surface-2);
}
.post__hero image-slot, .post__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Header image still to be supplied. Flagged, never ships: swap for the real <img> before release. */
.post__hero--placeholder { display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px dashed var(--border-strong); background: var(--surface-2); text-align: center; padding: 16px; }
.post__hero--placeholder span { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); }
.post__hero--placeholder code { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--fg-muted); }
.post__credit { font-size: 13px; color: var(--fg-muted); margin: 10px 0 0; }

/* Body prose */
.post__body { font-family: var(--font-body); font-size: 17px; line-height: 1.75; color: var(--fg-2); margin-top: 36px; }
.post__body > *:first-child { margin-top: 0; }
.post__body h2 {
  font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 32px); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.15; color: var(--fg); margin: 48px 0 16px; text-wrap: balance;
}
.post__body h2::before { content: ""; display: block; width: 32px; height: 3px; background: var(--accent); margin-bottom: 14px; }
.post__body h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em;
  color: var(--fg); margin: 32px 0 12px;
}
.post__body p { margin: 0 0 20px; }
.post__body a {
  color: var(--accent-text); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-underline-offset: 3px; text-decoration-thickness: 2px;
}
.post__body a:hover { text-decoration-thickness: 3px; }
.post__body ul, .post__body ol { margin: 0 0 22px; padding-left: 0; list-style: none; }
.post__body ol { counter-reset: post-ol; }
.post__body li { position: relative; margin: 0 0 10px; padding-left: 24px; }
.post__body ul > li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.post__body ol > li { counter-increment: post-ol; }
.post__body ol > li::before { content: counter(post-ol); position: absolute; left: 0; font-family: var(--font-display); font-weight: 800; color: var(--fg); }
.post__body strong { font-weight: 700; color: var(--fg); }
.post__body blockquote {
  margin: 32px 0; padding: 0 0 0 22px; border-left: 4px solid var(--accent);
  font-family: var(--font-display); font-size: clamp(19px, 2.4vw, 23px); line-height: 1.45; font-weight: 700; color: var(--fg);
}
.post__body blockquote p { margin: 0; }
.post__inline-img { margin: 36px 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.post__inline-img image-slot, .post__inline-img img, .post__body .post__inline-img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.post__inline-img--todo { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; border: 2px dashed var(--border-strong); }
.post__inline-img--todo > span { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); }
.post__inline-img--todo code { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 0; text-transform: none; }
.post__body .video { margin: 32px 0; }
.post__body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 28px 0; }
.post__body figure { margin: 32px 0; }
.post__body figcaption { font-size: 14px; color: var(--fg-muted); margin-top: 8px; }

/* Closing call to action: ink band, coral rule, same voice as the site's closing band */
.post__cta {
  position: relative; margin: 64px 0 0; padding: clamp(36px, 5vw, 52px); padding-top: calc(clamp(36px, 5vw, 52px) + 24px);
  border-radius: var(--radius-lg); background: var(--ink); color: var(--paper);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.post__cta::before { content: ""; position: absolute; top: clamp(36px, 5vw, 52px); left: clamp(36px, 5vw, 52px); width: 40px; height: 4px; background: var(--accent); }
.post__cta-text { font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; margin: 0; max-width: 32ch; color: var(--paper); }
.post__cta-text .dot { color: var(--accent); }
.post__cta .btn { flex-shrink: 0; font-size: 16px; padding: 16px 32px; }
[data-theme="dark"] .post__cta { background: var(--surface-2); border: 1px solid var(--border); }

/* Inside Track signup: the only newsletter signup on the site (6 Oct 2026).
   A Slate panel above the ink trial band: copy on top, then one email field
   and the button on a single full-width row. The post column is never wider
   than about 760px, so the panel stays one column at every width. */
.post__signup {
  position: relative; margin: 64px 0 0;
  padding: clamp(28px, 4vw, 44px); padding-top: calc(clamp(28px, 4vw, 44px) + 20px);
  border-radius: var(--radius-lg); background: var(--bg-alt); border: 1px solid var(--border);
  display: grid; gap: clamp(18px, 2.4vw, 24px);
}
.post__signup::before { content: ""; position: absolute; top: clamp(28px, 4vw, 44px); left: clamp(28px, 4vw, 44px); width: 40px; height: 4px; background: var(--accent); }
.post__signup-h { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.04; letter-spacing: -.02em; margin: 10px 0 10px; }
.post__signup-h::before { content: none !important; }
.post__signup-p { font-size: 16px; line-height: 1.6; color: var(--fg-2); margin: 0; max-width: 52ch; text-wrap: pretty; }
.post__signup-row { display: flex; gap: 10px; align-items: flex-start; }
.post__signup-row .field { flex: 1; min-width: 0; margin: 0; }
.post__signup-row .input { width: 100%; min-height: 52px; background: var(--surface); }
.post__signup-row .form-actions { display: contents; }
.post__signup-row .btn { min-height: 52px; flex: none; }
@media (max-width: 479px) {
  .post__signup-row { flex-direction: column; align-items: stretch; }
  .post__signup-row .btn { width: 100%; }
}
.post__signup-form .form-status:not(:empty) { display: block; margin-top: 10px; }
/* One field: its own error says it all, so the summary line stays quiet. */
.post__signup-form:has(.is-invalid) .form-status { display: none; }
.post__signup-fine { font-size: 14px; color: var(--fg-muted); margin: 12px 0 0; }
.post__signup-done { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0; }
.post__signup-form:has([data-form-success]:not([hidden])) .post__signup-fine { display: none; }
.post__back { margin-top: 28px; }
.post__back::after { content: none; }
.post__back::before { content: "\2190"; color: var(--accent); margin-right: 8px; transition: transform var(--speed) var(--ease); display: inline-block; }
.post__back:hover::before { transform: translateX(-4px); }

/* Ad slots: reserved space up front so nothing shifts (CLS) when a unit loads late or not at all */
.ad-slot { margin: 36px 0; }
.ad-slot__label { display: block; font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 8px; text-align: center; }
.ad-slot__unit { display: block; width: 100%; min-height: 250px; }
.ad-slot--infeed .ad-slot__unit { min-height: 200px; }
.ad-slot--anchor { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px clamp(16px, 4vw, 24px); display: none; align-items: center; gap: 10px; }
.ad-slot--anchor .ad-slot__label { margin: 0; text-align: left; flex-shrink: 0; }
.ad-slot--anchor .ad-slot__unit { min-height: 50px; flex: 1; }
.ad-slot--anchor button { flex-shrink: 0; width: 32px; height: 32px; border: none; background: none; color: var(--fg-muted); font-size: 20px; line-height: 1; cursor: pointer; }
@media (max-width: 640px) { .ad-slot--anchor { display: flex; } body.post-page { padding-bottom: 62px; } }

@media (max-width: 640px) {
  .post__cta { flex-direction: column; align-items: flex-start; }
  .post__cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .post__back::before { transition: none; } }
