/* Blog: index and article pages. Loaded after /styles.css and only by /blog/*.
   Uses the tokens defined there (--bg, --line, --acc, --mono ...). */

/* ---------- Shared top ---------- */
.post-top { padding-top: clamp(8rem, 17vh, 11rem); }
.post-top h1 { max-width: 21ch; font-size: clamp(2.15rem, 4.7vw, 3.7rem); line-height: 1.05; letter-spacing: -.04em; }
.post-top .lede { max-width: 43rem; color: #c3c3c9; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1.6rem; font: 500 .8rem/1 var(--mono); letter-spacing: .02em; color: var(--dim); animation: up .8s var(--ease) both; }
.crumbs a { color: var(--mute); text-decoration: none; transition: color .2s; }
.crumbs a:hover { color: var(--acc-2); }
.crumbs i { width: 1.1rem; height: 1px; background: var(--line-2); }
.crumbs b { font-weight: 500; color: var(--acc-2); }
.post-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: 43rem; font: 400 .82rem/1.4 var(--mono); color: var(--dim); animation: up .9s var(--ease) .22s both; }
.post-meta span b { font-weight: 500; color: var(--mute); }

/* ---------- Article layout ---------- */
.post { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(4.5rem, 9vw, 7rem); }
.post-grid { display: grid; grid-template-columns: 13.5rem minmax(0, 43rem); gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.toc { position: sticky; top: 5.75rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.toc h2 { max-width: none; margin-bottom: .9rem; font: 500 .74rem/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); padding: .38rem 0; color: var(--mute); font-size: .88rem; line-height: 1.35; text-decoration: none; transition: color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 400 .72rem/1.7 var(--mono); color: var(--dim); transition: color .2s; }
.toc a:hover { color: var(--text); }
.toc a:hover::before { color: var(--acc); }

/* ---------- Article typography ---------- */
.post-body { font-size: 1.075rem; line-height: 1.75; color: #c8c8ce; }
.post-body > * + * { margin-top: 1.25rem; }
.post-body h2 { max-width: none; margin-top: 3.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); font-size: clamp(1.55rem, 2.6vw, 1.95rem); line-height: 1.15; letter-spacing: -.03em; color: var(--text); scroll-margin-top: 5.5rem; }
.post-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.post-body h3 { margin-top: 2.25rem; font-size: 1.16rem; color: var(--text); }
.post-body h3 + p { margin-top: .5rem; }
.post-body strong { color: var(--text); font-weight: 500; }
.post-body a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 122, 26, .65); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.post-body a:hover { color: var(--acc-2); text-decoration-color: var(--acc-2); }
.post-body ul { padding-left: 1.2rem; list-style: disc; }
.post-body ul li { margin-top: .55rem; padding-left: .2rem; }
.post-body ul li::marker { color: var(--acc); }
.post-body blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.4rem; border-left: 2px solid var(--acc); }
.post-body blockquote p { font-size: 1.28rem; line-height: 1.45; letter-spacing: -.015em; color: var(--text); text-wrap: balance; }
.post-body blockquote cite { display: block; margin-top: .8rem; font: 400 .8rem/1.4 var(--mono); color: var(--dim); }

/* The one-paragraph answer at the top of the article. */
.answer { padding: 1.3rem 1.5rem; border: 1px solid var(--line-2); border-radius: 14px; background: radial-gradient(120% 140% at 0 0, rgba(255, 110, 20, .1), transparent 60%), var(--bg-1); color: #d6d6da; }
.answer b { display: block; margin-bottom: .45rem; font: 500 .74rem/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--acc-2); }

/* Figures taken from a cited study. */
.figs { margin: 2.25rem 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-1); overflow: hidden; }
.figs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figs-row div { padding: 1.5rem 1.4rem 1.4rem; border-left: 1px solid var(--line); }
.figs-row div:first-child { border-left: 0; background: radial-gradient(110% 120% at 0 0, rgba(255, 110, 20, .14), transparent 65%); }
.figs-row b { display: block; font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; line-height: 1; letter-spacing: -.045em; color: var(--text); }
.figs-row div:first-child b { color: var(--acc-2); }
.figs-row span { display: block; margin-top: .7rem; font-size: .88rem; line-height: 1.4; color: var(--mute); }
.figs figcaption { padding: .85rem 1.4rem; border-top: 1px solid var(--line); font: 400 .76rem/1.5 var(--mono); color: var(--dim); }
.figs figcaption a { color: var(--mute); }

/* Comparison table. Sits inside .table-wrap from styles.css. */
.post-body .table-wrap { margin-top: 2rem; }
.cmp { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: .92rem; line-height: 1.45; }
.cmp th, .cmp td { padding: .95rem 1.1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.cmp thead th { border-top: 0; padding-block: 1.15rem; font-weight: 600; color: var(--text); }
.cmp tbody th { width: 17%; font-weight: 400; color: var(--dim); font-family: var(--mono); font-size: .8rem; }
.cmp td { width: 27.6%; color: var(--mute); }
.cmp .top { background: linear-gradient(180deg, rgba(255, 122, 26, .09), rgba(255, 122, 26, .03)); border-left: 1px solid rgba(255, 122, 26, .25); color: #d6d6da; }
.cmp thead .top { color: var(--acc-2); }

/* The seven checks. */
.gates { margin-top: 2rem; padding: 0; list-style: none; counter-reset: check; border-top: 1px solid var(--line); }
.gates > li { counter-increment: check; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: start; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.gates > li::before { content: counter(check, decimal-leading-zero); font: 500 .85rem/1.9 var(--mono); color: var(--acc); }
.gates h3 { margin-top: 0; }
.post-body .gates p { margin-top: .45rem; font-size: 1.02rem; line-height: 1.7; color: #c8c8ce; }
.post-body .gates .ours { margin-top: .8rem; padding: .75rem .95rem; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: .95rem; line-height: 1.6; color: var(--mute); }
.gates .ours b { margin-right: .5rem; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--acc-2); }

.post-body .faq { margin-top: 1.5rem; }
.post-body .faq p { font-size: 1rem; }
.post-body .faq summary { color: var(--text); }

.sources { margin-top: 3.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.sources h2 { margin: 0 0 .75rem; padding: 0; border: 0; font: 500 .74rem/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.sources ol { margin: 0; padding-left: 1.3rem; font-size: .9rem; line-height: 1.6; color: var(--mute); }
.sources li { margin-top: .5rem; }
.sources li::marker { font-family: var(--mono); font-size: .78rem; color: var(--dim); }

/* ---------- Index ---------- */
.blog-list { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 8rem); }
.entry { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: end; padding: clamp(1.75rem, 4vw, 3rem); border: 1px solid var(--line-2); border-radius: 18px; background: radial-gradient(70% 120% at 100% 0, rgba(255, 110, 20, .15), transparent 62%), var(--bg-1); text-decoration: none; overflow: hidden; transition: border-color .3s, transform .4s var(--ease), box-shadow .4s; }
.entry:hover { border-color: rgba(255, 122, 26, .5); transform: translateY(-2px); box-shadow: 0 40px 90px -55px rgba(255, 110, 20, .6); }
.entry-kicker { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font: 400 .8rem/1.4 var(--mono); color: var(--dim); }
.entry-kicker b { font-weight: 500; color: var(--acc-2); }
.entry h2 { max-width: 20ch; margin-top: 1.1rem; font-size: clamp(1.7rem, 3.6vw, 2.75rem); }
.entry p { margin-top: 1rem; max-width: 40rem; color: var(--mute); font-size: 1.05rem; line-height: 1.6; }
.entry-go { display: inline-flex; align-items: center; gap: .6rem; font-weight: 500; font-size: .95rem; color: var(--text); white-space: nowrap; }
.entry-go svg { width: 1rem; height: 1rem; transition: transform .3s var(--ease); }
.entry:hover .entry-go svg { transform: translateX(4px); }
.blog-note { margin-top: 1.5rem; font: 400 .82rem/1.5 var(--mono); color: var(--dim); }

/* ---------- Responsive ---------- */
@media (max-width: 62rem) {
  .post-grid { grid-template-columns: minmax(0, 43rem); justify-content: center; gap: 2.5rem; }
  .toc { position: static; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); }
}
@media (max-width: 40rem) {
  .post-body { font-size: 1.03rem; }
  .figs-row { grid-template-columns: minmax(0, 1fr); }
  .figs-row div { border-left: 0; border-top: 1px solid var(--line); }
  .figs-row div:first-child { border-top: 0; }
  .gates > li { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .entry { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .crumbs, .post-meta { animation: none; }
  .entry, .entry-go svg { transition: none; }
  .entry:hover { transform: none; }
}
