/* =========================================================
   Insights (blog listing + article) — builds on styles.css tokens
   ========================================================= */
body.sub { overflow-x: hidden; }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fog); margin-bottom: 1.75rem; }
.crumbs a { color: rgba(243, 244, 236, .75); transition: color .3s; }
.crumbs a:hover { color: var(--lime); }
.crumbs span:not(:last-child) { opacity: .5; }
.nav__links a[aria-current="page"] { color: var(--paper); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Listing hero ---------- */
.blog-hero { position: relative; overflow: hidden; padding: clamp(8rem, 16vw, 11rem) 0 clamp(3rem, 6vw, 4.5rem); }
.blog-hero .hero__grid { position: absolute; inset: 0; color: var(--paper); opacity: .1; mask-image: radial-gradient(circle at 30% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 20%, transparent 75%); }
.blog-hero__glow { position: absolute; right: -10%; top: -20%; width: 55vw; height: 55vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 240, 45, .14), transparent); filter: blur(30px); pointer-events: none; }
.blog-hero .container { position: relative; }
.blog-hero__title { font-size: clamp(2.9rem, 8vw, 7rem); margin-top: 1.25rem; }
.blog-hero__lead { max-width: 38rem; margin-top: 1.5rem; font-size: 1.125rem; color: rgba(243, 244, 236, .72); }

/* ---------- Filters ---------- */
.blog-list { padding-top: 0; }
.filters { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 2rem; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex-shrink: 0; padding: .55rem 1.05rem; border-radius: 999px; border: 1px solid var(--line); font-size: .88rem; color: rgba(243, 244, 236, .75); transition: color .3s, border-color .3s, background-color .3s; }
.filter:hover { color: var(--paper); border-color: rgba(243, 244, 236, .3); }
.filter.is-active { background: var(--lime); border-color: var(--lime); color: var(--ink); }

/* ---------- Cards ---------- */
.post-grid { display: grid; gap: 1.25rem; }
@media (min-width: 680px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; border-radius: 1.25rem; border: 1px solid var(--line); background: #121413; overflow: hidden; transition: transform .6s var(--ease), border-color .4s, box-shadow .6s var(--ease); }
.post-card[hidden] { display: none; }
.post-card:hover { transform: translateY(-6px); border-color: rgba(200, 240, 45, .35); box-shadow: 0 30px 60px -30px rgba(200, 240, 45, .22); }
.post-card__body { display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem 1.25rem 1.4rem; flex: 1; }
.post-card__title { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; letter-spacing: -.02em; transition: color .3s; }
.post-card:hover .post-card__title { color: var(--lime); }
.post-card__excerpt { font-size: .93rem; color: rgba(243, 244, 236, .65); line-height: 1.55; }
.post-card__more { margin-top: auto; padding-top: .4rem; display: inline-flex; align-items: center; gap: .4rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.post-card__more svg { width: .9rem; height: .9rem; transition: transform .4s var(--ease); }
.post-card:hover .post-card__more svg { transform: translate(3px, -3px); }
.post-card__flag { align-self: flex-start; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; background: var(--lime); color: var(--ink); }
.post-card--feature { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .post-card--feature { display: grid; grid-template-columns: 1.25fr 1fr; }
  .post-card--feature .post-card__body { padding: 2.25rem; justify-content: center; gap: 1rem; }
  .post-card--feature .post-card__title { font-size: clamp(1.8rem, 2.8vw, 2.5rem); line-height: 1.05; letter-spacing: -.03em; }
  .post-card--feature .post-card__excerpt { font-size: 1.02rem; }
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; color: var(--fog); }
.cat-pill { padding: .25rem .65rem; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--cc) 45%, transparent); color: var(--cc); background: color-mix(in oklab, var(--cc) 8%, transparent); text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; }
.draft-pill { padding: .25rem .6rem; border-radius: 999px; background: #ef6f57; color: var(--ink); text-transform: uppercase; letter-spacing: .1em; font-size: .62rem; }
.post-empty { padding: 3rem 0; color: var(--fog); }
.post-empty--first { padding: 2rem; border: 1px dashed var(--line); border-radius: 1.25rem; display: grid; gap: .5rem; }

/* ---------- Generated covers (used when a post has no image) ---------- */
.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 85% 15%, color-mix(in oklab, var(--cc) 30%, transparent), transparent 60%), linear-gradient(160deg, #161917, #0d0f0e); isolation: isolate; }
.cover--feature { aspect-ratio: auto; min-height: 20rem; height: 100%; }
.cover--hero { aspect-ratio: 21 / 9; border-radius: 1.5rem; border: 1px solid var(--line); }
@media (max-width: 680px) { .cover--hero { aspect-ratio: 16 / 10; } }
.cover--img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post-card:hover .cover--img img { transform: scale(1.06); }
.cover__grid { position: absolute; inset: 0; background-image: radial-gradient(circle, color-mix(in oklab, var(--cc) 40%, transparent) 1.2px, transparent 1.6px); background-size: 18px 18px; mask-image: radial-gradient(circle at 75% 30%, #000 10%, transparent 65%); -webkit-mask-image: radial-gradient(circle at 75% 30%, #000 10%, transparent 65%); opacity: .7; transition: transform 1.2s var(--ease); }
.cover__glow { position: absolute; right: 12%; top: 18%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--cc); filter: blur(42px); opacity: .35; }
.cover__mark { position: absolute; right: -6%; bottom: -14%; width: 52%; height: auto; aspect-ratio: 1; color: color-mix(in oklab, var(--cc) 18%, transparent); transition: transform 1s var(--ease); }
.post-card:hover .cover__mark { transform: rotate(8deg) scale(1.04); }
.post-card:hover .cover__grid { transform: scale(1.08); }
.cover__label { position: absolute; left: 1.1rem; top: 1rem; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cc); }
.cover__title { position: absolute; left: 1.1rem; right: 35%; bottom: 1.1rem; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.05rem, 2.2vw, 1.5rem); line-height: 1.05; letter-spacing: -.03em; color: rgba(243, 244, 236, .92); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cover--feature .cover__title { font-size: clamp(1.6rem, 3.4vw, 2.6rem); left: 1.75rem; bottom: 1.75rem; }
.cover--hero .cover__title { font-size: clamp(1.6rem, 4vw, 3.4rem); left: clamp(1.25rem, 3vw, 2.5rem); bottom: clamp(1.25rem, 3vw, 2.5rem); right: 30%; }
.cover--hero .cover__label { left: clamp(1.25rem, 3vw, 2.5rem); top: clamp(1.1rem, 3vw, 2.25rem); }

/* ---------- CTA band ---------- */
.blog-cta { text-align: center; overflow: hidden; border-top: 1px solid var(--line); }
.blog-cta__inner { position: relative; }
.blog-cta .h2 { margin: 1rem auto 0; }
.blog-cta p:not(.eyebrow) { max-width: 34rem; margin: 1.25rem auto 0; color: rgba(243, 244, 236, .72); }
.blog-cta .hero__ctas { justify-content: center; }

/* ---------- Article header ---------- */
.article__head { padding: clamp(7.5rem, 14vw, 10rem) 0 clamp(2rem, 4vw, 3rem); }
.article__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.3rem, 5.4vw, 4.6rem); line-height: 1; letter-spacing: -.04em; max-width: 58rem; margin-top: 1.25rem; }
.article__dek { max-width: 44rem; margin-top: 1.25rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(243, 244, 236, .72); line-height: 1.55; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.byline__avatar { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #1a1a1a; border: 1px solid rgba(243, 244, 236, .14); color: var(--paper); overflow: hidden; }
.byline__avatar svg { width: 55%; height: 55%; }
.byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline__avatar--lg { width: 4rem; height: 4rem; }
.byline__text { display: grid; line-height: 1.3; font-size: .92rem; }
.byline__text span { color: var(--fog); font-size: .82rem; }
.share { margin-left: auto; display: flex; align-items: center; gap: .45rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fog); }
.share span { margin-right: .25rem; }
.share a, .share button { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--paper); font-family: var(--f-display); font-weight: 700; font-size: .9rem; letter-spacing: 0; text-transform: none; transition: color .3s, border-color .3s, background-color .3s; }
.share a:hover, .share button:hover { color: var(--lime); border-color: var(--lime); }
.share svg { width: 1rem; height: 1rem; }
.share button.is-done { background: var(--lime); color: var(--ink); border-color: var(--lime); }
@media (max-width: 560px) { .share { margin-left: 0; width: 100%; } }
.article__cover { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Article layout: contents + body ---------- */
.article__layout { display: grid; gap: 2rem; padding-bottom: clamp(4rem, 8vw, 6rem); }
@media (min-width: 1024px) { .article__layout { grid-template-columns: 15.5rem minmax(0, 46rem); gap: clamp(3rem, 6vw, 5.5rem); justify-content: center; } }
.article__main { min-width: 0; }
.toc { min-width: 0; }
@media (min-width: 1024px) { .toc { position: sticky; top: 6.5rem; align-self: start; max-height: calc(100vh - 8rem); overflow-y: auto; scrollbar-width: none; } .toc::-webkit-scrollbar { display: none; } }
.toc__box { border: 1px solid var(--line); border-radius: 1.1rem; background: #111312; }
.toc__box summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.1rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.toc__box summary::-webkit-details-marker { display: none; }
.toc__box summary::after { content: "+"; font-family: var(--f-body); font-size: 1.1rem; color: var(--fog); transition: transform .4s var(--ease); }
.toc__box[open] summary::after { transform: rotate(45deg); }
.toc ol { list-style: none; counter-reset: toc; padding: 0 .6rem .8rem; display: grid; gap: .1rem; }
.toc li { counter-increment: toc; }
.toc ol a { display: grid; grid-template-columns: 1.6rem 1fr; gap: .25rem; padding: .5rem .5rem; border-radius: .6rem; font-size: .88rem; line-height: 1.35; color: rgba(243, 244, 236, .65); transition: color .3s, background-color .3s; }
.toc ol a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: .7rem; color: var(--fog); padding-top: .12rem; }
.toc ol a:hover { color: var(--paper); background: rgba(255, 255, 255, .03); }
.toc ol a.is-active { color: var(--paper); background: rgba(200, 240, 45, .08); }
.toc ol a.is-active::before { color: var(--lime); }
.toc__cta { display: none; margin-top: 1rem; padding: 1.1rem; border-radius: 1.1rem; border: 1px solid rgba(200, 240, 45, .25); background: linear-gradient(160deg, rgba(200, 240, 45, .08), transparent 60%), #111312; }
.toc__cta p { font-size: .88rem; color: rgba(243, 244, 236, .75); margin: .4rem 0 .9rem; line-height: 1.45; }
.toc__cta .btn { width: 100%; justify-content: center; }
@media (min-width: 1024px) { .toc__cta { display: block; } }

/* Reading progress */
.read-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: var(--lime); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 12px rgba(200, 240, 45, .6); }

/* ---------- Key takeaways ---------- */
.takeaways { position: relative; padding: 1.6rem 1.6rem 1.5rem; margin-bottom: 2.5rem; border-radius: 1.25rem; border: 1px solid rgba(200, 240, 45, .3); background: linear-gradient(160deg, rgba(200, 240, 45, .09), transparent 55%), #111312; }
.takeaways__tag, .inline-cta__tag, .author-box__label { display: inline-block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--lime); }
.takeaways ul { list-style: none; display: grid; gap: .75rem; margin-top: 1rem; }
.takeaways li { position: relative; padding-left: 1.9rem; color: rgba(243, 244, 236, .9); line-height: 1.55; }
.takeaways li::before { content: ""; position: absolute; left: 0; top: .2rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0b0a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 62% no-repeat; }

/* ---------- Prose ---------- */
.prose { font-size: 1.075rem; line-height: 1.75; color: rgba(243, 244, 236, .82); }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -.03em; color: var(--paper); margin-top: 3.5rem; scroll-margin-top: 7rem; }
.prose h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -.02em; color: var(--paper); margin-top: 2.25rem; scroll-margin-top: 7rem; }
.prose h2 + *, .prose h3 + * { margin-top: .9rem; }
.prose strong { color: var(--paper); font-weight: 600; }
a.btn { text-decoration: none; }
.prose a:not(.btn) { color: var(--lime); text-decoration: underline; text-decoration-color: rgba(200, 240, 45, .4); text-underline-offset: 3px; transition: text-decoration-color .3s; }
.prose a:not(.btn):hover { text-decoration-color: var(--lime); }
.prose ul { list-style: none; display: grid; gap: .6rem; }
.prose ul li { position: relative; padding-left: 1.4rem; }
.prose ul li::before { content: ""; position: absolute; left: .2rem; top: .72em; width: .42rem; height: .42rem; border-radius: 50%; background: var(--lime); }
.prose ol { list-style: none; counter-reset: ol; display: grid; gap: .9rem; }
.prose ol > li { counter-increment: ol; position: relative; padding-left: 2.6rem; }
.prose ol > li::before { content: counter(ol); position: absolute; left: 0; top: .1em; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: .78rem; color: var(--ink); background: var(--lime); }
.prose ul.checklist li { padding-left: 2rem; }
.prose ul.checklist li::before { left: 0; top: .32em; width: 1.2rem; height: 1.2rem; border-radius: .35rem; background: transparent; border: 1.5px solid var(--lime); }
.prose ul.checklist li::after { content: ""; position: absolute; left: .38rem; top: .48em; width: .38rem; height: .68rem; border: solid var(--lime); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 1rem; background: #111312; }
.prose table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.prose th, .prose td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { font-family: var(--f-mono); font-weight: 400; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); background: rgba(200, 240, 45, .05); }
.prose tbody tr:last-child td, .prose tbody tr:last-child th { border-bottom: 0; }
.prose tbody tr:hover { background: rgba(255, 255, 255, .02); }
.prose td strong { color: var(--lime); }

/* Quote */
.prose blockquote { position: relative; margin: 2.5rem 0; padding: .25rem 0 .25rem 1.75rem; border-left: 3px solid var(--lime); font-family: var(--f-display); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.3; letter-spacing: -.02em; color: var(--paper); }
.prose blockquote cite { display: block; margin-top: .9rem; font-family: var(--f-mono); font-style: normal; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); }

/* Callouts */
.callout { padding: 1.25rem 1.4rem; border-radius: 1rem; border: 1px solid var(--line); background: #111312; }
.callout > :first-child { margin-top: 0; }
.callout__title { display: flex; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .5rem; }
.callout p { margin: 0; }
.callout--tip { border-color: rgba(200, 240, 45, .3); }
.callout--tip .callout__title { color: var(--lime); }
.callout--warn { border-color: rgba(239, 111, 87, .4); background: linear-gradient(160deg, rgba(239, 111, 87, .08), transparent 60%), #111312; }
.callout--warn .callout__title { color: #ef6f57; }
.callout--data { border-color: rgba(34, 211, 238, .35); }
.callout--data .callout__title { color: #22d3ee; }

/* Stat row */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 1.1rem; overflow: hidden; margin: 2rem 0; }
.stat-row > div { background: #111312; padding: 1.2rem 1.1rem; display: grid; gap: .3rem; }
.stat-row b { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1; letter-spacing: -.03em; color: var(--lime); }
.stat-row span { font-size: .82rem; color: var(--fog); line-height: 1.35; }
@media (max-width: 520px) { .stat-row { grid-template-columns: 1fr; } .stat-row > div { grid-template-columns: auto 1fr; align-items: center; gap: 1rem; } .stat-row b { font-size: 1.7rem; } }

/* Figures */
.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; border-radius: 1rem; border: 1px solid var(--line); }
.prose figcaption { margin-top: .6rem; font-size: .85rem; color: var(--fog); }

/* Inline CTA */
.inline-cta { display: grid; gap: 1rem; align-items: center; margin: 2.75rem 0; padding: 1.4rem 1.5rem; border-radius: 1.25rem; border: 1px solid rgba(200, 240, 45, .3); background: radial-gradient(120% 140% at 100% 0%, rgba(200, 240, 45, .12), transparent 55%), #111312; }
@media (min-width: 640px) { .inline-cta { grid-template-columns: 1fr auto; } }
.inline-cta p { margin: 0; font-size: .95rem; color: rgba(243, 244, 236, .7); line-height: 1.5; }
.inline-cta .inline-cta__title { font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -.02em; color: var(--paper); margin: .35rem 0 .3rem; }

/* FAQ + author */
.faq-block { margin-top: 3.5rem; border-top: 1px solid var(--line); }
.faq-block h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.03em; margin: 2.5rem 0 .75rem; scroll-margin-top: 7rem; }
.faq-block .qa summary { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.author-box { display: flex; gap: 1.1rem; align-items: flex-start; margin-top: 3rem; padding: 1.5rem; border-radius: 1.25rem; border: 1px solid var(--line); background: #111312; }
.author-box strong { display: block; font-family: var(--f-display); font-size: 1.2rem; margin-top: .25rem; }
.author-box__role { display: block; font-size: .85rem; color: var(--fog); }
.author-box p { margin-top: .6rem; font-size: .93rem; color: rgba(243, 244, 236, .72); line-height: 1.55; }
.related { border-top: 1px solid var(--line); }
