/* news-post.css — shared chrome for /news/<slug> posts.
 *
 * Loaded on every post under /news/. Holds the page-shell, article
 * shell, byline, body typography, post-nav, and footer styles that
 * would otherwise be duplicated across each post HTML.
 *
 * Inheritance:
 *   - assets/css/news.css (parent identity tokens — --ch-*)
 *   - assets/css/motion.css (single easing token --gh-ease)
 *
 * Last Updated: 2026-04-30 (rebuild)
 */

body.ch-page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ---- Nav ---- */
.ch-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 243, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ch-rule);
}
.ch-nav-row {
  max-width: 78rem; margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 768px) { .ch-nav-row { padding: 1.25rem 2.5rem; } }
.ch-wordmark {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600; font-size: 1.25rem; letter-spacing: -0.012em;
  color: var(--ch-ink); text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 0.45rem;
}
.ch-wordmark::after {
  content: ""; width: 6px; height: 6px;
  background: var(--ch-accent);
  display: inline-block; transform: translateY(-2px);
}
.ch-nav-links { display: none; align-items: center; gap: 1.85rem; }
@media (min-width: 768px) { .ch-nav-links { display: flex; } }
.ch-nav-link {
  color: var(--ch-ink-mute);
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  letter-spacing: 0.005em;
  transition: color 200ms var(--gh-ease);
}
.ch-nav-link:hover, .ch-nav-link:active, .ch-nav-link:focus-visible { color: var(--ch-accent); }
.ch-nav-cta {
  padding: 0.55rem 1.15rem; font-size: 0.82rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--ch-surface); background: var(--ch-accent);
  font-weight: 600; text-decoration: none;
  font-family: "Inter Tight", system-ui, sans-serif;
  border: 1px solid var(--ch-accent);
  transition: background 180ms var(--gh-ease), color 180ms var(--gh-ease);
}
.ch-nav-cta:hover, .ch-nav-cta:active, .ch-nav-cta:focus-visible { background: transparent; color: var(--ch-accent); }
.ch-cta-arrow { transition: transform 180ms var(--gh-ease); }
.ch-nav-cta:hover .ch-cta-arrow, .ch-nav-cta:active .ch-cta-arrow, .ch-nav-cta:focus-visible .ch-cta-arrow { transform: translateX(3px); }

/* ---- Article shell ---- */
.ch-post {
  max-width: 42rem; margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}
@media (min-width: 768px) { .ch-post { padding: 7rem 2.5rem 5rem; max-width: 44rem; } }

.ch-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.78rem; color: var(--ch-ink-mute);
  text-decoration: none; margin-bottom: 2rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0;
  transition: color 180ms var(--gh-ease);
}
.ch-back:hover, .ch-back:active, .ch-back:focus-visible { color: var(--ch-accent); }

.ch-post-meta {
  display: flex; gap: 1rem; align-items: baseline;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.ch-post-date {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ch-ink-faint);
  font-variant-numeric: tabular-nums;
}
.ch-post-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.07; letter-spacing: -0.022em;
  color: var(--ch-ink); margin: 0 0 1.5rem;
}
.ch-post-lede {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ch-ink-mute);
  line-height: 1.55; margin: 0 0 3rem;
  font-weight: 400;
}
.ch-post-byline {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.78rem; color: var(--ch-ink-faint);
  letter-spacing: 0.04em;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ch-rule);
  margin-bottom: 3rem;
}
.ch-post-byline strong { color: var(--ch-ink-mute); font-weight: 500; }

/* ---- Post hero — bold visual between lede and body ---- */
.ch-post-hero {
  margin: 0 0 3rem;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.ch-post-hero svg { display: block; width: 100%; height: auto; }
.ch-post-hero-cap {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ch-ink-faint);
  padding: 0.65rem 0 0;
  display: block;
}

.ch-post-body {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.075rem; line-height: 1.7;
  color: var(--ch-ink);
}
.ch-post-body > * + * { margin-top: 1.5rem; }
.ch-post-body h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem; font-weight: 600;
  letter-spacing: -0.012em;
  margin-top: 3rem !important; margin-bottom: 1rem;
  color: var(--ch-ink);
}
.ch-post-body p { margin: 0; }
.ch-post-body code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--ch-surface-dim);
  padding: 0.08em 0.4em;
  color: var(--ch-ink);
}
.ch-post-body a {
  color: var(--ch-accent);
  text-decoration: underline;
  text-decoration-color: var(--ch-accent-rule);
  text-underline-offset: 3px;
  transition: color 180ms var(--gh-ease);
}
.ch-post-body a:hover, .ch-post-body a:active, .ch-post-body a:focus-visible { color: var(--ch-accent-deep); }
.ch-post-body blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--ch-accent-rule);
  font-style: italic; color: var(--ch-ink-mute);
  font-size: 1.15rem; line-height: 1.5;
}
.ch-post-body ul {
  list-style: none; padding-left: 0;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.ch-post-body ul li {
  padding-left: 1.5rem; position: relative;
}
.ch-post-body ul li::before {
  content: "—"; position: absolute; left: 0;
  color: var(--ch-accent);
}

/* ---- Post nav ---- */
.ch-post-nav {
  max-width: 44rem; margin: 4rem auto 0;
  padding: 2.5rem 1.5rem 0;
  border-top: 1px solid var(--ch-rule);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
@media (min-width: 768px) { .ch-post-nav { padding: 2.5rem 2.5rem 0; } }
.ch-post-nav-cell { display: flex; flex-direction: column; gap: 0.5rem; }
.ch-post-nav-cell.is-next { text-align: right; align-items: flex-end; }
.ch-post-nav-label {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ch-ink-faint);
}
.ch-post-nav-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem; color: var(--ch-ink-mute);
  text-decoration: none; line-height: 1.3;
  transition: color 180ms var(--gh-ease);
}
.ch-post-nav-title:hover, .ch-post-nav-title:active, .ch-post-nav-title:focus-visible { color: var(--ch-accent); }

/* ---- Footer ---- */
.ch-footer {
  border-top: 1px solid var(--ch-rule);
  padding: 3rem 1.5rem 4rem;
  max-width: 78rem; margin: 4rem auto 0;
}
@media (min-width: 768px) { .ch-footer { padding: 4rem 2.5rem 5rem; margin-top: 5rem; } }
.ch-footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 700px) { .ch-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.ch-footer-attr {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.92rem; color: var(--ch-ink-mute);
  max-width: 32ch; line-height: 1.55;
}
.ch-footer-attr strong { color: var(--ch-ink); font-weight: 600; }
.ch-footer-col h3 {
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ch-ink-faint); margin-bottom: 1rem;
  font-family: "Inter Tight", system-ui, sans-serif; font-weight: 500;
}
.ch-footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.ch-footer-col a {
  color: var(--ch-ink-mute);
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 0.875rem; text-decoration: none;
  transition: color 180ms var(--gh-ease);
}
.ch-footer-col a:hover, .ch-footer-col a:active, .ch-footer-col a:focus-visible { color: var(--ch-accent); }

/* ---- Mobile post-nav stacking ---- */
@media (max-width: 639px) {
  .ch-post-nav { grid-template-columns: 1fr; }
  .ch-post-nav-cell.is-next { text-align: left; align-items: flex-start; }
}

/* ---- Skip + a11y ---- */
.ch-skip {
  position: absolute; top: -40px; left: 0;
  background: var(--ch-accent); color: var(--ch-surface);
  padding: 0.5rem 1rem; font-weight: 600; z-index: 100; text-decoration: none;
}
.ch-skip:focus { top: 0; }
