/* ─── article-flair.css (iter73) ─────────────────────────────────────
 * Magazine-grade article reading shell. Drop cap, sticky scroll-spy
 * TOC, citation-superscript chips, pull-quote pattern, refined
 * related-reading cards, share row, refined article header with
 * subtle paper texture.
 *
 * Plays nicely with the existing /styles/blog.css article rules —
 * this stylesheet only ADDS, never restyles core typography.
 * ────────────────────────────────────────────────────────────────── */

/* ── Two-column layout: sticky TOC sidebar + content ──────────── */
@media (min-width: 1080px) {
  .article-shell {
    --toc-width: 220px;
    --toc-gap: 56px;
  }
  .article-header > .container-narrow,
  .article-body,
  .article-related > .container-narrow,
  .article-footer > .container-narrow {
    position: relative;
  }
  /* Sticky TOC is injected into .article-body by article-flair.js */
  .article-body { position: relative; }
  .article-body .article-toc {
    position: absolute;
    left: calc(50% - 460px - var(--toc-gap) - var(--toc-width));
    top: 0;
    width: var(--toc-width);
    height: 100%;
  }
  .article-body .article-toc-inner {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 4px 0 4px 4px;
    font-family: var(--display);
    font-size: 13px;
  }
}
@media (max-width: 1079px) {
  .article-toc { display: none; }
}

.article-toc h4 {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute, #6E707A);
  margin: 0 0 12px;
}
.article-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.article-toc a {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 500;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.article-toc a:hover {
  background: rgba(15, 148, 139, 0.06);
  color: var(--teal-deep, #086E66);
}
.article-toc a.is-active {
  background: rgba(15, 148, 139, 0.10);
  color: var(--teal-deep, #086E66);
  border-left-color: var(--teal-deep, #086E66);
  font-weight: 600;
}
.article-toc a .num {
  font-family: var(--serif, "Domine", Georgia, serif);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-mute, #6E707A);
  font-weight: 400;
}
.article-toc a.is-active .num {
  color: var(--teal-deep, #086E66);
}

/* ── Article header — eyebrow chip variant ─────────────────────── */
.article-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(15, 148, 139, 0.10);
  color: var(--teal-deep, #086E66);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.article-header .eyebrow::before { display: none; }
.article-header .eyebrow a {
  color: inherit;
  text-decoration: none;
}
.article-header .eyebrow a:hover {
  color: var(--teal-deep, #086E66);
  text-decoration: underline;
  text-decoration-color: rgba(15, 148, 139, 0.4);
}

.article-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw + 0.2rem, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink, #15161A);
  margin: 0 0 22px;
  text-wrap: balance;
}

/* The italic-serif lead deck — long subhead beneath the title */
.article-deck {
  font-family: var(--serif, "Domine", Georgia, serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-2, #2A2C33);
  margin: 0 0 28px;
  max-width: 56ch;
}

.article-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #FFFFFF;
  border: 1px solid rgba(14, 30, 30, 0.10);
  border-radius: 999px;
  color: var(--ink-3, #4A5757);
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 500;
}
.article-meta::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--teal-deep, #086E66);
  border-radius: 999px;
}

/* ── Drop cap on the first paragraph ──────────────────────────── */
.article-body .has-drop-cap::first-letter {
  float: left;
  font-family: var(--serif, "Domine", Georgia, serif);
  font-size: 4.2em;
  line-height: 0.92;
  font-weight: 600;
  color: var(--teal-deep, #086E66);
  padding: 0.08em 0.10em 0 0;
  margin: 0.05em 0.08em 0 0;
  shape-outside: margin-box;
}

/* ── Citation chips — auto-converted [N] refs into superscripts ── */
.article-body sup.ref {
  font-family: var(--display);
  font-size: 0.62em;
  font-weight: 700;
  vertical-align: super;
  line-height: 0;
  margin: 0 1px;
}
.article-body sup.ref a {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: rgba(15, 148, 139, 0.12);
  color: var(--teal-deep, #086E66);
  border-radius: 4px;
  text-decoration: none;
  text-underline-offset: 0;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.article-body sup.ref a:hover {
  background: var(--teal-deep, #086E66);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* ── Pull quote (manual marker: <aside class="pull-quote">) ───── */
.article-body .pull-quote {
  margin: 36px -36px;
  padding: 22px 32px;
  border-left: 3px solid var(--teal-deep, #086E66);
  font-family: var(--serif, "Domine", Georgia, serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.35;
  color: var(--ink, #15161A);
  letter-spacing: -0.012em;
  background: linear-gradient(180deg, rgba(15, 148, 139, 0.05) 0%, transparent 100%);
}
@media (max-width: 720px) {
  .article-body .pull-quote { margin: 28px 0; padding: 18px 22px; }
}

/* ── Refined existing h2 / h3 inside articles ─────────────────── */
.article-body h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink, #15161A);
  margin: 56px 0 16px;
  scroll-margin-top: 110px;
  text-wrap: balance;
}
.article-body h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--teal-deep, #086E66);
  margin: 0 0 14px;
  opacity: 0.6;
}

/* ── Share row — sits just below the article body ─────────────── */
.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
}
.article-share-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute, #6E707A);
  margin-right: 6px;
}
.article-share a,
.article-share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink-3, #4A5757);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
  font: inherit;
  padding: 0;
  text-decoration: none;
}
.article-share a:hover,
.article-share button:hover {
  background: var(--teal-deep, #086E66);
  color: #FFFFFF;
  border-color: var(--teal-deep, #086E66);
  transform: translateY(-1px);
}
.article-share svg { width: 16px; height: 16px; }
.article-share button[data-copied] {
  background: var(--teal-deep, #086E66);
  color: #FFFFFF;
  border-color: var(--teal-deep, #086E66);
}

/* ── Refined related-reading — actual cards instead of bullet list ── */
.article-related {
  padding: clamp(48px, 6vw, 80px) 0;
  background: linear-gradient(180deg, var(--bg, #FAFAF6) 0%, #F3F1EA 100%);
  border-top: 1px solid var(--line);
}
.article-related h3 {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep, #086E66);
  margin: 0 0 24px;
}
.article-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.article-related li { margin: 0; }
.article-related a {
  display: block;
  padding: 22px 24px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink, #15161A);
  text-decoration: none;
  transition: transform 220ms cubic-bezier(.2,.9,.3,1),
              border-color 220ms ease,
              box-shadow 220ms ease;
}
.article-related a::after {
  content: "→";
  display: inline-block;
  margin-left: 8px;
  color: var(--teal-deep, #086E66);
  transition: transform 220ms ease;
}
.article-related a:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 148, 139, 0.32);
  box-shadow: 0 12px 28px -10px rgba(15, 148, 139, 0.18);
}
.article-related a:hover::after { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .article-related a, .article-share a, .article-share button { transition: none; }
  .article-related a:hover::after { transform: none; }
}
