/* a*side - articles (/articles and /articles/<slug>). Built by build_articles.py. */
body { background-color: var(--paper); }
::selection { background: var(--ink); color: var(--paper); }

.crumbs { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.art { max-width: 46rem; }
.art h1 { margin-top: 1rem; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.25; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.art .sub { margin-top: .6rem; font-size: 15px; color: var(--body); }
.art .meta { margin-top: .8rem; font-size: 12px; color: var(--mute); }

/* expert cards */
.experts { margin-top: 1.8rem; display: grid; gap: .8rem; }
.experts .lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.expert { display: flex; gap: .9rem; align-items: center; padding: .8rem .9rem; border: 1px solid var(--ink); background: var(--paper); box-shadow: 4px 4px 0 var(--ink); max-width: 34rem; }
.expert img, .expert .ini { width: 60px; height: 60px; flex: none; object-fit: cover; background: var(--wash); border: 1px solid var(--line); filter: grayscale(1) contrast(1.05); }
.expert .ini { display: grid; place-items: center; font-weight: 700; color: var(--faint); filter: none; }
.expert .t { display: flex; flex-direction: column; font-size: 12px; line-height: 1.45; min-width: 0; }
.expert .t b { font-size: 14px; color: var(--ink); }
.expert .t .sp { color: var(--accent); }
.expert .links { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.expert .links a { color: var(--mute); text-decoration: underline dotted; text-underline-offset: 3px; }
.expert .links a:hover { color: var(--accent); }

/* body + table of contents */
.layout { margin-top: 2.6rem; display: grid; gap: 2rem; }
@media (min-width: 1024px) { .art { max-width: none; } .layout { grid-template-columns: 13rem minmax(0, 44rem); gap: 3.5rem; } .toc { position: sticky; top: 1.5rem; align-self: start; } }
.toc p { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.toc ol { margin-top: .5rem; padding-left: 0; list-style: none; font-size: 12px; line-height: 1.5; color: var(--mute); }
.toc li { margin-top: .35rem; }
.toc a { color: var(--body); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* reading: a proportional font for long text (headings and labels stay monospace, like the rest of the site) */
.prose { font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 17px; line-height: 1.75; letter-spacing: -.003em;
  color: color-mix(in srgb, var(--ink) 84%, var(--paper)); max-width: 40rem; font-feature-settings: "kern", "liga"; text-rendering: optimizeLegibility; }
.prose > * + * { margin-top: 1.15rem; }
.prose > p:first-child { font-size: 19px; line-height: 1.6; color: var(--ink); }
.prose h2, .prose h3 { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.01em; color: var(--ink); scroll-margin-top: 1.25rem; }
.prose h2 { margin-top: 3.2rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); font-size: 19px; line-height: 1.35; font-weight: 700; display: flex; gap: .8rem; align-items: baseline; }
.prose h2 .n { flex: none; font-size: 13px; color: var(--accent); background: var(--tint, rgba(36, 64, 238, .08)); padding: .1rem .45rem; border-radius: 2px; transform: translateY(-2px); }
.prose h2:not(:has(.n))::before { content: "//"; color: var(--accent); font-size: 15px; }
.prose h3 { margin-top: 2rem; font-size: 15px; font-weight: 700; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose em { font-style: italic; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
/* ==highlight== : a soft marker stroke in the brand blue */
.prose mark { color: var(--ink); background: linear-gradient(transparent 52%, color-mix(in srgb, var(--accent) 30%, transparent) 50%, color-mix(in srgb, var(--accent) 30%, transparent) 94%, transparent 92%); padding: 0 .1em; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose ul { list-style: none; }
.prose ul li { position: relative; }
.prose ul li::before { content: "*"; position: absolute; left: -1.2rem; top: .05rem; color: var(--accent); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.prose ol { list-style: none; counter-reset: n; }
.prose ol li { position: relative; counter-increment: n; }
.prose ol li::before { content: counter(n, decimal-leading-zero); position: absolute; left: -1.5rem; top: .2rem; font: 700 11px 'JetBrains Mono', monospace; color: var(--accent); }
.prose li + li { margin-top: .5rem; }
/* checklist: '- [ ] item' */
.prose ul.check { padding-left: 0; }
.prose ul.check li::before { content: none; }
.prose ul.check label { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.prose ul.check input { margin-top: .4rem; width: 15px; height: 15px; accent-color: var(--accent); flex: none; }
.prose ul.check input:checked + span { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--faint); }
/* pull quote with who said it */
.prose blockquote { margin: 2.2rem 0; padding: .2rem 0 .2rem 1.3rem; border-left: 3px solid var(--accent); font-size: 20px; line-height: 1.55; color: var(--ink); font-weight: 500; }
.prose blockquote p + p { margin-top: .6rem; }
.prose blockquote cite { display: block; margin-top: .8rem; font: 400 11px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.prose blockquote cite::before { content: "— "; }
/* callouts: '!! ' key point, '!? ' watch out */
.callout { padding: 1rem 1.1rem; border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: var(--paper); }
.callout b { display: block; font: 700 11px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem; }
.callout p { margin: 0; color: var(--ink); }
.callout.warn { border-color: var(--danger, #c0392b); box-shadow: 4px 4px 0 var(--danger, #c0392b); }
.callout.warn b { color: var(--danger, #c0392b); }
.prose code { font: 14px 'JetBrains Mono', monospace; background: var(--wash); padding: .05rem .3rem; }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 2.6rem 0; }

/* summary at the top */
.tldr { margin-top: 2rem; max-width: 44rem; padding: 1rem 1.2rem; background: color-mix(in srgb, var(--accent) 7%, var(--paper)); border-left: 3px solid var(--accent); }
.tldr b { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.tldr ul { margin-top: .5rem; list-style: none; padding: 0; font-size: 14px; color: var(--ink); }
.tldr li { position: relative; padding-left: 1.1rem; }
.tldr li + li { margin-top: .35rem; }
.tldr li::before { content: "*"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* reading progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 50; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .1s linear; }
.toc a.on { color: var(--accent); font-weight: 700; }

/* closing call to action */
.cta { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); max-width: 44rem; }
.cta .btn { display: inline-block; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: .55rem 1rem; font-weight: 700; text-decoration: none; }
.cta .btn:hover { background: var(--paper); color: var(--ink); }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--mute); text-decoration: underline dotted; text-underline-offset: 4px; cursor: pointer; }
.linkbtn:hover { color: var(--accent); }

/* index */
.alist { margin-top: 2rem; list-style: none; padding: 0; max-width: 46rem; }
.alist li { border-top: 1px dashed var(--line); }
.alist a { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .2rem 1.2rem; padding: .9rem 0; text-decoration: none; color: var(--body); }
.alist a:hover .tt { color: var(--accent); }
.alist .d { font-size: 12px; color: var(--mute); }
.alist .tt { font-weight: 700; color: var(--ink); }
.alist .w { grid-column: 2; font-size: 12px; color: var(--mute); }
@media (max-width: 560px) { .alist a { grid-template-columns: 1fr; } .alist .w { grid-column: 1; } }

/* header details shared with the other pages */
.egg { position: relative; cursor: default; }
.egg .pop { position: absolute; left: 0; top: calc(100% + 10px); z-index: 30; white-space: nowrap; padding: .5rem .7rem; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); text-transform: none; letter-spacing: 0; font-size: 12px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.egg:hover .pop { opacity: 1; transform: none; }
.egg .pop b { color: var(--accent); }
@media (max-width: 639px) { header { flex-wrap: wrap; row-gap: .5rem; } header nav { flex-wrap: wrap; gap: .4rem 1rem; } }
