/* TrainAtlas - blog.css
   Blog index + article styles. Loads after site.css and reuses its
   tokens (--accent, --surface, --card, --hairline, --ink, --muted,
   --font-serif, --font-mono, --radius*) plus the .page / .page article,
   .card, .eyebrow and .btn-primary patterns already defined there.
   No new colors, no new fonts - the blog is the same design system. */

/* ─── Shared chips ─── */
.post-cat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .28rem .62rem;
  border-radius: 999px;
}
.post-cat.accent { background: var(--accent); color: #06262c; }
.post-cat.ghost  { border: 1px solid var(--hairline); color: var(--muted); }

/* ─── Blog index ─── */
.blog-head { max-width: var(--max-w-text); margin-bottom: 2.4rem; }
.blog-head .eyebrow { margin-bottom: 1rem; }
.blog-head h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin-bottom: 1rem; }
.blog-lede { color: var(--muted); font-size: 1.1875rem; max-width: 46ch; }

.blog-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.4rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
a.post-card:hover { border-color: rgba(6, 182, 212, .45); transform: translateY(-3px); }
.post-card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-deep);
  border-bottom: 1px solid var(--hairline);
}
.post-card .thumb svg { width: 100%; height: 100%; display: block; }
.post-card .pc-body { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--ink);
}
.post-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.post-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: auto;
  padding-top: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted-deep);
}

/* Featured card spans the row, two columns once there's room */
.post-card.featured { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .post-card.featured { flex-direction: row; }
  .post-card.featured .thumb {
    flex: 1 1 50%;
    aspect-ratio: auto;
    min-height: 250px;
    border-bottom: none;
    border-right: 1px solid var(--hairline);
  }
  .post-card.featured .pc-body { flex: 1 1 50%; justify-content: center; padding: 1.8rem 2rem; }
  .post-card.featured h3 { font-size: 1.65rem; }
}

/* ─── Article ─── */
.post-page { padding: 9rem 24px 5rem; max-width: var(--max-w); margin: 0 auto; }
.post-breadcrumb {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--muted-deep);
  margin-bottom: 1.1rem;
}
.post-breadcrumb a { color: var(--muted); }
.post-breadcrumb a:hover { color: var(--accent); }
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.1;
  color: var(--ink);
  max-width: 20ch;
  margin: .9rem 0 1.1rem;
}
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .05em;
  color: var(--muted-deep);
}
.post-hero-map {
  margin: 2rem 0 2.6rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-deep);
  aspect-ratio: 24 / 9;
}
.post-hero-map svg,
.post-hero-map img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-layout { display: grid; grid-template-columns: 200px 1fr; gap: 3rem; align-items: start; }
.post-layout article { max-width: var(--max-w-text); }
/* Offset jump-links so a heading clears the fixed site header */
.post-layout article h2 { scroll-margin-top: 100px; }
@media (max-width: 860px) {
  .post-layout { grid-template-columns: 1fr; gap: 1rem; }
  .post-toc { display: none; }
}

/* Sticky station-dot table of contents */
.post-toc { position: sticky; top: 96px; }
.post-toc .toc-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-deep);
  margin-bottom: 1rem;
}
.post-toc ul { display: grid; gap: .75rem; }
.post-toc a { display: flex; gap: .6rem; font-size: .9rem; color: var(--muted); transition: color .15s ease; }
.post-toc a::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hairline);
  flex: none;
  margin-top: .5rem;
  transition: background .15s ease;
}
.post-toc a:hover,
.post-toc a.active { color: var(--ink); }
.post-toc a:hover::before,
.post-toc a.active::before { background: var(--accent); }

/* Comparison table */
.cmp-wrap { overflow-x: auto; margin: 1.6rem 0; }
.cmp { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.cmp th, .cmp td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--hairline); }
.cmp thead th {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-deep);
}
.cmp tbody td { color: var(--ink); }
.cmp td.row-label { color: var(--muted); }
.cmp td.win { color: var(--accent-glow); font-weight: 600; }
.cmp tbody tr:last-child td { border-bottom: none; }

/* Article body lists - the global `.page article ul li` rule makes each <li> a
   flex row, so a "<strong>lead-in.</strong> description" item splits into
   separate flex items and the bold term gets squeezed until it wraps. In the
   blog, render list items as normal blocks with a hanging dot so the term and
   its description flow inline on one run of text. */
.post-page article ul { display: block; margin: 0 0 1.2rem; }
.post-page article ul li {
  display: block;
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: .55rem;
  line-height: 1.6;
}
.post-page article ul li:last-child { margin-bottom: 0; }
.post-page article ul li::before {
  position: absolute;
  left: .25rem;
  top: .62rem;
  margin-top: 0;
}

/* Route-line divider */
.route-divider { display: flex; align-items: center; gap: .7rem; margin: 2.4rem 0; }
.route-divider .ln { flex: 1; height: 0; border-top: 1px dashed var(--hairline); }
.route-divider .st { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); flex: none; }

/* Pull quote */
.pull {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 1.1rem;
  margin: 2rem 0;
}

/* In-article CTA */
.post-cta {
  background: var(--card);
  border: 1px solid rgba(6, 182, 212, .4);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 2.2rem 0;
}
.post-cta h4 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: var(--ink); margin: 0 0 .2rem; }
.post-cta p { color: var(--muted); font-size: .95rem; margin: 0; }
.post-cta .btn-primary { border-bottom: none; color: #06262c; flex: none; }

/* Related */
.post-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--hairline); }
.post-related .toc-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-deep);
  margin-bottom: 1.1rem;
}
.post-related .post-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.post-related .post-card { color: inherit; border-bottom: none; }
