/* ============================================================
   Article / long-form reading experience
   ============================================================ */

/* Reading progress bar */
.progress-track { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 100; }
.progress-track .bar { height: 100%; width: 0; background: var(--accent); transition: width 0.1s linear; }

/* Breadcrumb */
.crumb { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-block: 1.2rem; }
.crumb a:hover { color: var(--accent); }
.crumb span { color: var(--rule); margin: 0 0.5rem; }

/* Article header */
.article-head { padding-block: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2.6rem); border-bottom: 1px solid var(--rule); }
.article-head .cat { margin-bottom: 1.3rem; }
.article-title { font-family: var(--display); font-weight: 500; font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.02em; max-width: 20ch; }
.article-dek { font-family: var(--serif); font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 60ch; margin-top: 1.4rem; }
.article-byline { display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; flex-wrap: wrap; }
.article-byline .who { display: flex; align-items: center; gap: 0.8rem; }
.article-byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.article-byline .name { font-family: var(--sans); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; }
.article-byline .name a:hover { color: var(--accent); }
.article-byline .sub { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em; }
.article-byline .divider { width: 1px; height: 34px; background: var(--rule); }

/* Lead image */
.article-lead-fig { margin-block: clamp(1.5rem, 4vw, 2.5rem); }
.article-lead-fig img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-lead-fig figcaption { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--muted); margin-top: 0.8rem; }

/* Article grid: TOC | body | share */
.article-grid { display: grid; grid-template-columns: 200px minmax(0, 680px) 60px; gap: clamp(1.5rem, 4vw, 3.5rem); justify-content: center; padding-bottom: 4rem; }

/* Table of contents */
.toc { position: sticky; top: 90px; align-self: start; font-family: var(--sans); }
.toc h4 { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 0.7rem; margin-bottom: 0.9rem; }
.toc a { display: block; font-size: 0.82rem; line-height: 1.3; color: var(--muted); padding: 0.42rem 0 0.42rem 0.9rem; border-left: 2px solid var(--rule); transition: 0.2s var(--ease); }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }

/* Share rail */
.share-rail { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 0.6rem; }
.share-rail button, .share-rail a { width: 42px; height: 42px; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; transition: 0.2s var(--ease); color: var(--ink); position: relative; }
.share-rail button:hover, .share-rail a:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.share-rail svg { width: 16px; height: 16px; }
.share-rail [data-copy-link].copied::after { content: "Copied"; position: absolute; left: 52px; top: 50%; transform: translateY(-50%); background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3em 0.6em; border-radius: 2px; white-space: nowrap; }

/* Body typography */
.article-body { font-family: var(--serif); font-size: 1.19rem; line-height: 1.72; }
.article-body > p, .article-body > h2, .article-body > h3, .article-body > ul, .article-body > ol, .article-body > figure, .article-body > blockquote, .article-body > .pullquote, .article-body > .stat-callout { margin-bottom: 1.5rem; }
.article-body p a { color: var(--accent-ink); background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%; }
.article-body p a:hover { background-size: 100% 2px; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--display); font-weight: 600; float: left; font-size: 4.6rem; line-height: 0.72;
  padding: 0.06em 0.12em 0 0; color: var(--accent);
}
.article-body h2 { font-family: var(--display); font-weight: 500; font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.01em; margin-top: 2.6rem; scroll-margin-top: 90px; }
.article-body h3 { font-family: var(--display); font-weight: 500; font-size: var(--step-1); margin-top: 1.8rem; scroll-margin-top: 90px; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.6rem; }
.article-body ul li { list-style: none; position: relative; }
.article-body ul li::before { content: ""; position: absolute; left: -1.1rem; top: 0.62em; width: 8px; height: 2px; background: var(--accent); }
.article-body ol { list-style: none; counter-reset: n; }
.article-body ol li { counter-increment: n; position: relative; }
.article-body ol li::before { content: counter(n); position: absolute; left: -1.5rem; font-family: var(--sans); font-weight: 600; font-size: 0.8rem; color: var(--accent); top: 0.35em; }
.article-body figure img { width: 100%; }
.article-body figcaption { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--muted); margin-top: 0.7rem; }

/* Pull quote */
.pullquote { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 1.6rem 0; margin-block: 2.4rem; }
.pullquote p { font-family: var(--display); font-weight: 460; font-size: var(--step-2); line-height: 1.14; letter-spacing: -0.015em; }
.pullquote cite { display: block; font-family: var(--sans); font-style: normal; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 1rem; }

/* Statistics callout */
.stat-callout { background: var(--dark); color: var(--paper); padding: 2rem; display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; }
.stat-callout .big { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 0.9; color: #f0b6ae; }
.stat-callout p { font-family: var(--sans); font-size: 0.92rem; line-height: 1.5; color: var(--dark-muted); }

/* Inline subscribe */
.inline-sub { background: var(--paper-2); border-left: 3px solid var(--accent); padding: 1.6rem 1.8rem; margin-block: 2.4rem; }
.inline-sub h4 { font-family: var(--display); font-weight: 500; font-size: var(--step-1); margin-bottom: 0.4rem; }
.inline-sub p { font-size: 1rem; color: var(--muted); margin-bottom: 1rem; }
.inline-sub form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inline-sub input { flex: 1 1 200px; padding: 0.85em 1em; border: 1px solid var(--rule); background: var(--paper); font-family: var(--sans); font-size: 0.9rem; border-radius: 2px; }
.inline-sub button { padding: 0.85em 1.4em; background: var(--ink); color: var(--paper); font-family: var(--sans); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px; }
.inline-sub button:hover { background: var(--accent); }

/* Article footer / tags / author card */
.article-tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2.5rem; }
.tag { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--rule); padding: 0.5em 0.9em; border-radius: 2px; color: var(--muted); }
.tag:hover { border-color: var(--ink); color: var(--ink); }

.author-card { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; padding: 2rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin-top: 2.5rem; }
.author-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.author-card .name { font-family: var(--display); font-weight: 500; font-size: var(--step-1); }
.author-card .role { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0.3rem 0 0.7rem; }
.author-card p { font-size: 1rem; color: var(--muted); }

/* Prev / next */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 2.5rem; }
.article-nav a { background: var(--paper); padding: 1.5rem; transition: background 0.2s var(--ease); }
.article-nav a:hover { background: var(--paper-2); }
.article-nav .dir { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.article-nav .t { font-family: var(--display); font-weight: 500; font-size: var(--step-1); line-height: 1.15; margin-top: 0.5rem; }
.article-nav a:hover .t { color: var(--accent); }
.article-nav .next { text-align: right; }

/* Related */
.related { padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); }

@media (max-width: 1080px) {
  .article-grid { grid-template-columns: minmax(0, 720px) 60px; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  .article-grid { grid-template-columns: 1fr; }
  .share-rail { flex-direction: row; position: static; margin-bottom: 1.5rem; }
  .article-body { font-size: 1.12rem; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }
  .article-body > p:first-of-type::first-letter { font-size: 3.6rem; }
}
