/* ============================================================
   DataAlchemist — Insights component library (SHARED, LOCKED)
   One source of truth for: blog.html (index) + every Insight
   article + the blog generator. Fill components; do not redesign
   per post. Global tokens/typography live in site.css.
   ============================================================ */

/* ===== Hero — editorial framing (index + article) ===== */
.page-insights .hero.hero-img { min-height: clamp(420px, 56vh, 560px); }
.page-insights .hero::before { content: ""; position: absolute; inset: 0; background: rgba(11,14,20,0.40); z-index: 1; pointer-events: none; }
.page-insights .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(180deg, rgba(16,19,24,0) 0%, rgba(251,250,247,0) 45%, var(--paper) 100%); z-index: 1; pointer-events: none; }
.page-insights .hero-inner { z-index: 2; }
.page-insights .hero h1 { margin-bottom: 20px; line-height: 1.05; letter-spacing: -0.035em; max-width: 15ch; }
.page-insights .hero-eyebrow { letter-spacing: 0.18em; margin-bottom: 20px; color: var(--brass); }
.page-insights .hero p.lead { font-family: "Newsreader", serif; font-size: clamp(18px, 1.55vw, 21px); line-height: 1.5; font-weight: 400; color: rgba(251,250,247,0.86); font-style: italic; }
.ins-kicker { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(251,250,247,0.62); margin: 0 0 16px; }
.ins-kicker::before { content: ""; display: inline-block; width: 22px; height: 1px; background: var(--brass); vertical-align: middle; margin-right: 11px; transform: translateY(-2px); }

/* ===== Article: two-column note layout ===== */
.note-layout { display: grid; grid-template-columns: minmax(0, 700px) 296px; justify-content: start; align-items: start; column-gap: 92px; padding-top: clamp(36px, 5vh, 56px); }
.article { max-width: none; margin: 0; }

/* ---- Meta strip (publication record) ---- */
.article-meta { display: flex; flex-wrap: wrap; gap: 36px; padding: 16px 0 18px; border-top: 1px solid rgba(16,19,24,0.14); border-bottom: 1px solid rgba(16,19,24,0.14); margin: 0 0 38px; }
.article-meta .m-cell { display: flex; flex-direction: column; gap: 5px; }
.article-meta .m-k { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); }
.article-meta .m-v { font-family: "Inter", sans-serif; font-size: 13.5px; color: var(--ink); }

/* ---- Body typography ---- */
.article p { font-family: "Inter", sans-serif; font-size: 17px; line-height: 1.74; color: #232a33; margin: 0 0 22px; }
.article p .lead-in { font-weight: 600; color: var(--ink); }
.article strong { font-weight: 600; color: var(--ink); }

/* ---- Section heads with mono index ---- */
.sec-index { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 60px 0 0; }
.article > p:first-of-type + .sec-index, .article-key-point + .sec-index { margin-top: 38px; }
.article h2 { font-family: "Newsreader", serif; font-weight: 600; font-size: 26px; line-height: 1.26; color: var(--ink); margin: 9px 0 14px; letter-spacing: -0.012em; }

/* ---- Premium list ---- */
.article ul { list-style: none; margin: 0 0 22px; padding: 0; }
.article li { position: relative; font-family: "Inter", sans-serif; font-size: 17px; line-height: 1.74; color: #232a33; padding-left: 24px; margin: 0 0 13px; }
.article li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 1.5px; background: var(--brass); }

/* ---- Key point (filled thesis box) ---- */
.article-key-point { background: var(--paper-2); border-left: 2px solid var(--brass); padding: 18px 24px 19px; margin: 6px 0 38px; }
.article-key-point .kp-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); margin: 0 0 10px; }
.article-key-point p { font-family: "Newsreader", serif; font-size: 19px; line-height: 1.5; color: var(--ink); margin: 0; font-weight: 400; }

/* ---- Case mini-blocks ---- */
.article-cases { display: flex; flex-direction: column; gap: 0; margin: 4px 0 26px; border-top: 1px solid rgba(16,19,24,0.10); }
.article-cases .case { padding: 17px 0 16px; border-bottom: 1px solid rgba(16,19,24,0.10); }
.case .case-tag { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.case .case-title { font-family: "Newsreader", serif; font-size: 18px; font-weight: 600; color: var(--ink); margin: 6px 0 7px; letter-spacing: -0.01em; }
.case p { margin: 0; font-size: 16px; }

/* ---- Exhibit (analytical evidence) ---- */
.article-exhibit { margin: 8px 0 30px; }
.exhibit-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin: 0 0 9px; }
.article-table-wrap { overflow-x: auto; border: 1px solid rgba(16,19,24,0.13); border-top: 2px solid rgba(16,19,24,0.30); background: var(--paper); }
.article-table { width: 100%; border-collapse: collapse; font-family: "Inter", sans-serif; }
.article-table th { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); text-align: left; padding: 13px 15px; border-bottom: 1px solid rgba(16,19,24,0.20); vertical-align: top; }
.article-table td { font-size: 14.5px; line-height: 1.55; color: var(--text-soft); padding: 13px 15px; border-bottom: 1px solid rgba(16,19,24,0.10); vertical-align: top; }
.article-table tr:last-child td { border-bottom: none; }
.article-table--keyed td:first-child { color: var(--ink); font-weight: 500; }
.article-table th:last-child, .article-table td:last-child { background: rgba(26,96,113,0.05); }
.article-table th:last-child { color: #1a6071; box-shadow: inset 0 -2px 0 rgba(26,96,113,0.30); }
.exhibit-cap { font-family: "Inter", sans-serif; font-size: 13px; line-height: 1.5; color: var(--text-soft); font-style: italic; margin: 11px 0 0; }

/* ---- Callout (audit / high-authority implication): open ruled band ---- */
.article-callout { border-top: 2px solid #1a6071; border-bottom: 1px solid rgba(16,19,24,0.16); padding: 18px 0 20px; margin: 16px 0 30px; }
.article-callout .co-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: #1a6071; margin: 0 0 10px; }
.article-callout p { font-family: "Newsreader", serif; font-size: 18px; line-height: 1.5; margin: 0; color: var(--ink); }

/* ---- Methodology conclusion ---- */
.article-conclusion { margin: 50px 0 0; padding: 28px 0 0; border-top: 1.5px solid rgba(16,19,24,0.30); }
.article-conclusion .conc-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 0 0 11px; }
.article-conclusion p { font-family: "Newsreader", serif; font-size: 18.5px; line-height: 1.55; color: var(--ink); margin: 0; }

/* ---- Related questions (FAQ; mirrors FAQPage JSON-LD for SEO) ---- */
.article-faq { margin: 44px 0 0; padding: 28px 0 0; border-top: 1.5px solid rgba(16,19,24,0.30); }
.article-faq .faq-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 0 0 16px; }
.faq-item { padding: 15px 0; border-top: 1px solid rgba(16,19,24,0.10); }
.faq-item:first-of-type { border-top: none; padding-top: 0; }
.faq-q { font-family: "Newsreader", serif; font-size: 18px; font-weight: 600; color: var(--ink); margin: 0 0 7px; letter-spacing: -0.01em; }
.faq-a { font-family: "Inter", sans-serif; font-size: 16px; line-height: 1.65; color: #232a33; margin: 0; }

/* ---- Filed under (tags) ---- */
.article-tags { margin: 34px 0 0; padding: 20px 0 0; border-top: 1px solid rgba(16,19,24,0.12); }
.article-tags .ft-label { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin-right: 12px; }
.article-tags .ft-list { font-family: "Inter", sans-serif; font-size: 13px; color: var(--text-soft); }

.article-back { display: inline-block; margin-top: 30px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--brass); padding-bottom: 3px; }
.article-back:hover { color: var(--brass); }

/* ---- Note rail ---- */
.note-rail { position: sticky; top: 104px; padding-top: 4px; border-top: 1.5px solid var(--ink); }
.rail-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); margin: 16px 0 16px; }
.rail-toc { border-left: 1px solid rgba(16,19,24,0.13); }
.rail-toc a { display: block; font-family: "Inter", sans-serif; font-size: 13px; line-height: 1.45; color: var(--text-soft); text-decoration: none; padding: 6px 0 6px 16px; box-shadow: inset 0 0 0 0 var(--brass); transition: color .15s ease, box-shadow .15s ease; }
.rail-toc a:hover { color: var(--ink); }
.rail-toc a.active { color: var(--ink); font-weight: 500; box-shadow: inset 2px 0 0 0 var(--brass); }
.rail-cta { display: block; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(16,19,24,0.14); font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.rail-cta:hover { color: var(--brass); }
.rail-note { font-family: "Inter", sans-serif; font-size: 12px; line-height: 1.5; color: var(--text-soft); margin: 10px 0 0; }

/* ===== Index (blog.html) ===== */
.snap-wrap { display: flex; flex-direction: column; }
.snap { position: relative; background: var(--paper); }
.snap-c > .panel-inner { max-width: 1400px; margin: 0 auto; padding: clamp(70px, 8vh, 100px) 0; }

.sof-figure { display: grid; grid-template-columns: minmax(420px, 560px) 1fr; gap: clamp(44px, 5vw, 100px); align-items: start; }
.sof-eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin: 0 0 10px; display: block; }
.sof-statement { font-family: "Newsreader", serif; font-size: clamp(28px, 2.8vw, 40px); font-weight: 500; line-height: 1.2; letter-spacing: -0.024em; color: var(--ink); margin: 0 0 14px; }
/* editorial-scope register: ruled, not a filled pale widget */
.fig-plate { background: transparent; border: none; border-top: 1.5px solid var(--ink); border-radius: 0; padding: 16px 0 2px; }

.taxonomy-k { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin-bottom: 4px; display: block; padding-bottom: 0; }
.taxonomy-list { display: block; }
.taxonomy-list span { display: block; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); padding: 10px 0; border-bottom: 1px solid rgba(16,19,24,0.10); }
.taxonomy-list span:last-child { border-bottom: none; }

.idx-head { padding-bottom: 14px; margin-bottom: 2px; border-bottom: 1.5px solid var(--ink); display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.idx-label { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 0; }
.idx-count { color: var(--stone-2); }
.idx-sub { font-family: "Inter", sans-serif; font-size: 13px; color: var(--text-soft); margin: 0; }
.idx-empty { padding: 40px 0 8px; }
.idx-empty-h { font-family: "Newsreader", serif; font-size: 20px; font-weight: 500; color: var(--ink); margin: 0 0 6px; }
.idx-empty-sub { font-family: "Inter", sans-serif; font-size: 14px; color: var(--text-soft); margin: 0; }
.hpw-stack:has(.idx-empty) .hpw-spine { display: none; }

.hpw-stack { position: relative; margin-top: 0; }
.hpw-spine { position: absolute; left: 16px; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, var(--brass), transparent); opacity: 0; transform: scaleY(0); transform-origin: top; transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.2s ease; }
.snap-c.in .hpw-spine { transform: scaleY(1); opacity: 0.6; }
.hpw-row { position: relative; display: grid; grid-template-columns: minmax(70px, 120px) 1fr; gap: clamp(24px, 4vw, 64px); padding: clamp(30px, 4.5vh, 44px) 0; border-top: 1px solid rgba(16,19,24,0.12); opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.hpw-row:first-child { border-top: none; padding-top: 22px; }
/* latest-note cue on the newest row */
.hpw-stack .hpw-row:first-child .hpw-content::before { content: "Latest note"; display: block; font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 0 0 9px; }
.snap-c.in .hpw-row { opacity: 1; transform: none; }
.snap-c.in .hpw-row:nth-child(2) { transition-delay: 0.1s; }
.snap-c.in .hpw-row:nth-child(3) { transition-delay: 0.2s; }
.snap-c.in .hpw-row:nth-child(4) { transition-delay: 0.3s; }
.snap-c.in .hpw-row:nth-child(5) { transition-delay: 0.4s; }
.hpw-num { font-family: "IBM Plex Mono", monospace; font-size: clamp(44px, 3.6vw, 58px); font-weight: 300; color: #B8AF9E; line-height: 0.8; letter-spacing: -0.04em; text-align: right; user-select: none; }
.hpw-content { display: flex; flex-direction: column; max-width: 800px; }
.hpw-eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); margin: 0 0 10px; display: block; }
.hpw-content h3 { font-family: "Newsreader", serif; font-size: clamp(24px, 2.2vw, 32px); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 16px; }
.hpw-content h3 a { color: inherit; text-decoration: none; }
.hpw-content h3 a:hover { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hpw-content p { font-family: "Inter", sans-serif; font-size: 16px; line-height: 1.6; color: #232a33; margin: 0 0 20px; }

.btn-ghost { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--brass); border: none; border-bottom: 1px solid var(--brass); padding: 0 0 3px; transition: color 0.2s ease; width: fit-content; }
.btn-ghost:hover { color: var(--ink); }
/* tighter, connected CTA on insights pages */
.page-insights .cta { padding: 64px 32px; }

/* ===== Responsive ===== */
@media (max-width: 992px) { .note-layout { display: block; } .note-rail { display: none; } }
@media (max-width: 980px) {
  .sof-figure { grid-template-columns: 1fr; }
  .hpw-row { grid-template-columns: 70px 1fr; gap: 24px; padding: 40px 0; }
}
@media (max-width: 600px) {
  .hpw-spine { display: none; }
  .hpw-row { grid-template-columns: 1fr; gap: 16px; }
  .hpw-num { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .hpw-spine, .hpw-row { opacity: 1 !important; transform: none !important; transition: none !important; }
}
