/* =============================================================
   article.css — reading layout for /articles/** pages
   Pairs with base.css. Optimised for long-form, paper-like text.
   ============================================================= */

.prose {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding: calc(3.6rem + clamp(1.5rem, 5vh, 3rem)) var(--pad) 6rem;
}

.prose > * + * { margin-top: 1.15em; }

.article-head { margin-bottom: 2.5rem; }
.article-head__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-harvest);
  margin-bottom: 0.6rem;
}
.article-head__meta {
  color: var(--ink-faint);
  font-size: 0.92rem;
  font-variant-numeric: oldstyle-nums;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin-top: 1.9em;
}
.prose h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); margin-top: 0; }
.prose h2 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.1rem); }
.prose h3 { font-size: 1.3rem; }
.prose :is(h2, h3) { color: var(--ink); }

.prose p, .prose li { hyphens: auto; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.prose blockquote {
  border-inline-start: 3px solid color-mix(in srgb, var(--gold-harvest) 70%, transparent);
  padding-inline-start: 1.2rem;
  color: var(--ink-dim);
  font-style: italic;
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin-block: 2.4rem;
}

.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 0.12em 0.4em;
}
.prose pre {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
}
.prose pre code { all: unset; white-space: pre; }

.prose img, .prose video { border-radius: 10px; }
.prose figure { margin-block: 1.8rem; }
.prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink-faint);
  text-align: center;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.prose th, .prose td {
  text-align: start;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--hairline);
}
.prose thead th { color: var(--ink-dim); border-bottom-color: color-mix(in srgb, var(--gold-mystic) 50%, transparent); }

/* Sticky footer: pin .site-footer to the viewport bottom on short pages
   (.topbar is position:fixed, so it is not a flex item). */
body { min-height: 100svh; display: flex; flex-direction: column; }
.prose { flex: 1 0 auto; }

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem var(--pad);
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

/* Articles index listing. These rules are the authoring template: the index
   currently shows .post-empty instead, so nothing references .post-list__* yet
   and a dead-class scan will flag them. Keep them — they are what each new
   <li> in articles/index.html is styled by. */
.post-list { list-style: none; padding: 0; }
.post-list li + li { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--hairline); }
.post-list a { text-decoration: none; color: var(--ink); display: block; }
@media (pointer: coarse) { .post-list a { padding-block: 0.4rem; } }
.post-list a:hover .post-list__title { color: var(--gold-harvest); }
.post-list__title, .post-list__meta, .post-list__excerpt { display: block; }
.post-list__title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.post-list__meta { color: var(--ink-faint); font-size: 0.9rem; margin-top: 0.25rem; }
.post-list__excerpt { color: var(--ink-dim); margin-top: 0.4rem; }

/* Empty state — the index is linked from every page's nav, so it must offer a
   way onward instead of dead-ending on "coming soon". Remove with the
   .post-empty block in articles/index.html once the first article ships. */
.post-empty {
  padding: 1.6rem 1.7rem;
  border: 1px solid var(--hairline);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
}
.post-empty p { color: var(--ink-dim); }
.post-empty p:first-child { color: var(--ink); font-weight: 700; }
.post-empty p + p { margin-top: 0.7rem; }
.post-empty .btn { margin-top: 1.2rem; }
