/* Classline blog — long-form reading layer on top of the Slate tokens
 * defined in app.css (loaded first — every rule below reads a var(--*)
 * token, never a literal colour, for the same light/dark-safety reason
 * app.css's own header documents).
 *
 * app.css's type scale and h1/h2/h3 sizing were tuned for the app's UI
 * chrome (a class roster, a login card) — small, dense, functional. A
 * blog post needs the opposite: a real measure (~65-70 characters),
 * generous line height, and headings that carry actual hierarchy. Rather
 * than fight app.css's rules with !important, everything here is scoped
 * under .blog-shell / .blog-article / .prose so the app's own pages are
 * completely unaffected — this file is only ever linked from blog pages.
 * Reused as-is from app.css: --color-*, --font-*, --space-*, --radius-*,
 * the .card, .callout, .chip and .topbar/.wordmark component classes. */

.blog-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-12);
}

.blog-topbar .blog-tracks {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.blog-topbar .chip.is-active {
  background: var(--color-ink);
  color: var(--color-canvas);
  border-color: var(--color-ink);
}

.blog-shell .kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: var(--space-8) 0 var(--space-3);
}

.blog-shell h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

.blog-shell .standfirst {
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 62ch;
  margin: 0 0 var(--space-2);
}

.blog-shell h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -.01em;
  margin: var(--space-12) 0 var(--space-3);
  text-wrap: balance;
}

.blog-shell h3 {
  font-size: 1.05rem;
  font-weight: 650;
  font-family: var(--font-sans);
  margin: var(--space-8) 0 var(--space-2);
}

.rule {
  height: 1px;
  background: var(--color-hairline);
  border: 0;
  margin: var(--space-8) 0;
}

/* ---------------------------------------------------------------------- */
/* Front-page track intro cards */

.track-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

@media (max-width: 640px) {
  .track-intro-grid { grid-template-columns: 1fr; }
}

.track-intro {
  display: block;
  text-decoration: none;
  color: inherit;
}

.track-intro .lbl {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}

.track-intro h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
}

.track-intro p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-base);
}

@media (prefers-reduced-motion: no-preference) {
  .track-intro { transition: border-color .15s ease, background-color .15s ease; }
}

.track-intro:hover {
  border-color: var(--color-muted);
}

/* ---------------------------------------------------------------------- */
/* Post listing */

.post-list {
  display: flex;
  flex-direction: column;
}

.post-card {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-hairline-soft);
}

.post-list .post-card:last-child {
  border-bottom: 0;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.post-card-meta .chip.track-pill {
  cursor: default;
}

.post-card-meta time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .08em;
  color: var(--color-muted);
}

.post-card-title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -.01em;
}

.post-card-title a {
  text-decoration: none;
  color: var(--color-ink);
}

.post-card-title a:hover {
  color: var(--color-positive);
}

.post-card-summary {
  margin: 0;
  color: var(--color-muted);
  max-width: 66ch;
}

/* ---------------------------------------------------------------------- */
/* Article body */

.blog-article .kicker {
  margin-top: var(--space-2);
}

.prose {
  margin-top: var(--space-6);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  max-width: 68ch;
  margin: 0 0 1.15em;
  line-height: 1.7;
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: .5em;
}

.prose li > p {
  margin-bottom: .3em;
}

.prose strong {
  font-weight: 650;
}

.prose a {
  color: var(--color-positive);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose blockquote {
  border-left: 3px solid var(--color-hairline);
  padding-left: var(--space-4);
  color: var(--color-muted);
}

.prose h2 {
  font-size: 1.5rem;
}

.prose h3 {
  font-size: 1.05rem;
}

.prose pre {
  background: var(--color-raised);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  overflow-x: auto;
  margin: 0 0 1.3em;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: .82em;
}

.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--color-raised);
  border: 1px solid var(--color-hairline-soft);
  padding: .1em .4em;
  border-radius: 4px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.3em;
  font-size: var(--text-base);
}

.prose th,
.prose td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-hairline-soft);
  vertical-align: top;
}

.prose th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 400;
  border-bottom-color: var(--color-hairline);
}

.prose img {
  max-width: 100%;
  border-radius: var(--radius-card);
}

/* ---------------------------------------------------------------------- */
/* Footer */

.blog-footer {
  max-width: 760px;
  margin: var(--space-12) auto 0;
  padding: var(--space-6) var(--space-6) var(--space-12);
  border-top: 1px solid var(--color-hairline);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.blog-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.blog-footer a {
  color: var(--color-ink);
}
