/* =========================================================
   Article pages (notes/*.html) — loaded after styles.css
   ========================================================= */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
}

.article-hero {
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: calc(var(--header-h) + 64px) 0 64px;
}
.article-hero-inner > * { max-width: 880px; }
.back-link {
  display: flex; width: fit-content; align-items: center; gap: 8px; margin-bottom: 40px;
  font-size: 15px; font-weight: 500; color: var(--muted); transition: color .2s ease;
}
.back-link:hover { color: var(--navy); }
.back-link .lucide { transition: transform .2s ease; }
.back-link:hover .lucide { transform: translateX(-3px); }
.article-hero h1 {
  font-size: clamp(36px, 5vw, 62px); line-height: 1.04; letter-spacing: -0.04em;
  color: var(--navy-900); margin-bottom: 24px;
}
.article-deck { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); line-height: 1.55; max-width: 720px; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-strong);
  font-size: 15px; color: var(--muted);
}
.article-meta .author { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.article-meta .author img { width: 32px; height: 32px; }
.article-meta span { display: inline-flex; align-items: center; gap: 8px; }

.article-layout {
  display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 80px;
  padding: 80px 0 40px;
}
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc .mono-sm { margin-bottom: 16px; display: block; }
.toc ol { border-left: 1.5px solid var(--line); }
.toc a {
  display: block; padding: 8px 0 8px 16px; margin-left: -1.5px; border-left: 1.5px solid transparent;
  font-size: 14.5px; line-height: 1.4; color: var(--muted); transition: color .2s ease, border-color .2s ease;
}
.toc a:hover { color: var(--navy); }
.toc a.active { color: var(--navy-900); font-weight: 700; border-left-color: var(--orange); }

/* Long-form text */
.prose { font-size: 19px; line-height: 1.72; color: var(--ink-2); }
.prose > * + * { margin-top: 24px; }
.prose h2 {
  font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.03em; color: var(--navy-900);
  margin-top: 64px; scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 22px; letter-spacing: -0.02em; color: var(--navy-900); margin-top: 40px; }
.prose h2 + p, .prose h3 + p { margin-top: 14px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a:not(.btn) { color: var(--navy); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.prose ul, .prose ol { display: grid; gap: 12px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--orange);
}
.prose ol { counter-reset: item; }
.prose ol li { position: relative; padding-left: 40px; counter-increment: item; }
.prose ol li::before {
  content: counter(item); position: absolute; left: 0; top: .2em;
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  font: 500 13px/1 var(--mono); color: var(--navy); background: var(--navy-100);
}
.prose blockquote {
  margin: 48px 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--orange);
  font-size: clamp(22px, 2.2vw, 27px); line-height: 1.35; letter-spacing: -0.02em; font-weight: 700; color: var(--navy-900);
}

.callout {
  padding: 28px 30px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line);
  font-size: 17px; line-height: 1.6;
}
.callout-title {
  display: block; margin-bottom: 14px;
  font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--orange-600);
}
.callout > * + * { margin-top: 12px; }
.callout ul { gap: 8px; }

.question {
  padding: 28px 30px; border-radius: var(--radius); background: var(--navy); color: rgba(255,255,255,.82);
  font-size: 17.5px;
}
.prose .question h3 { color: #fff; margin-top: 0; font-size: 23px; }
.q-no {
  display: block; margin-bottom: 12px;
  font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--orange);
}
.question p { margin-top: 12px; }
.prose .question strong { color: #fff; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line); }
.data-table th {
  font: 500 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  border-bottom: 1.5px solid var(--navy-900);
}
.data-table td:first-child { font-weight: 700; color: var(--navy-900); }

.article-cta {
  margin-top: 72px; padding: 40px; border-radius: 18px; background: var(--navy); color: #fff;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.article-cta h2 { font-size: 28px; color: #fff; margin: 0 0 8px; }
.article-cta p { color: rgba(255,255,255,.78); font-size: 17px; margin: 0; }

.more-notes { padding: 80px 0 120px; border-top: 1px solid var(--line); margin-top: 40px; }
.more-notes h2 { font-size: 28px; letter-spacing: -0.03em; color: var(--navy-900); margin-bottom: 32px; }
.more-notes .notes { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 720px); justify-content: center; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .more-notes .notes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .article-hero { padding: calc(var(--header-h) + 40px) 0 48px; }
  .back-link { margin-bottom: 28px; }
  .article-layout { padding-top: 56px; }
  .prose { font-size: 17.5px; }
  .prose blockquote { padding-left: 20px; margin: 36px 0; }
  .callout, .question { padding: 22px; }
  .article-cta { grid-template-columns: 1fr; padding: 28px; }
  .more-notes { padding: 64px 0 88px; }
}
