/* =========================================================
   article.css — post header, prose, table of contents, extras
   ========================================================= */

.post-head h1{font-size:clamp(2.5rem,6.4vw,4.6rem); letter-spacing:-.045em; line-height:1.02; margin:1rem 0 1.1rem; text-wrap:balance}
.post-deck{font-size:clamp(1.1rem,2vw,1.35rem); color:var(--dim); line-height:1.5; max-width:62ch}
.byline{display:flex; align-items:center; gap:.9rem; margin-top:1.8rem}
.avatar{width:46px; height:46px; border-radius:50%; display:grid; place-items:center; flex:none; font-family:var(--f-display); font-weight:700; font-size:1.1rem; color:var(--accent-ink); background:linear-gradient(135deg,var(--accent),var(--amber))}
.byline p{line-height:1.35}
.byline .name{font-weight:600}
.post-hero{margin:clamp(28px,4vw,44px) auto 0; width:min(100% - 2*var(--pad),1100px)}
.post-hero img{width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; border-radius:30px; border:1px solid var(--line); box-shadow:var(--shadow); background:var(--bg-2)}
@supports (animation-timeline:view()){
  .post-hero img{animation:hero-settle linear both; animation-timeline:view(); animation-range:exit 0% exit 100%}
  @keyframes hero-settle{to{scale:.94; border-radius:44px; opacity:.6}}
}

/* ---------- table of contents ---------- */
.toc{padding:1.2rem 1.2rem 1rem; border-radius:24px; background:var(--card); border:1px solid var(--line)}
.toc summary{display:flex; align-items:center; justify-content:space-between; min-height:44px; cursor:pointer; list-style:none; font-family:var(--f-display); font-size:1.1rem; font-weight:600; letter-spacing:-.02em}
.toc summary::-webkit-details-marker{display:none}
.toc summary::after{content:"+"; font-size:1.4rem; color:var(--dim); transition:rotate .4s var(--ease)}
.toc[open] summary::after{rotate:45deg}
@media (min-width:1001px){ .toc summary{pointer-events:none} .toc summary::after{display:none} }
.toc ol{list-style:none; display:grid; gap:2px; margin-top:.4rem; border-left:1px solid var(--line)}
.toc a{display:flex; align-items:center; min-height:40px; padding:.2rem .9rem; margin-left:-1px; border-left:2px solid transparent; color:var(--dim); font-size:.94rem; line-height:1.3; transition:color .25s,border-color .25s}
.toc a:hover{color:var(--text)}
.toc a[aria-current="location"]{color:var(--text); border-left-color:var(--accent); font-weight:600}
.toc .toc-sub a{padding-left:1.8rem; font-size:.88rem}
.toc-meta{margin-top:1rem; padding-top:1rem; border-top:1px solid var(--line); display:grid; gap:.3rem; font-size:.88rem; color:var(--dim)}

/* ---------- prose ---------- */
.prose{font-size:clamp(1.05rem,1.4vw,1.15rem); line-height:1.8; color:var(--text)}
.prose>*+*{margin-top:1.3em}
.prose h2{font-size:clamp(1.7rem,3.2vw,2.3rem); letter-spacing:-.04em; margin-top:2.4em; padding-top:.2em}
.prose h3{font-size:clamp(1.3rem,2.2vw,1.6rem); letter-spacing:-.03em; margin-top:2em}
.prose h2+*,.prose h3+*{margin-top:.8em}
.prose a{color:var(--accent); text-decoration:underline; text-decoration-thickness:1.5px; text-underline-offset:4px; transition:text-decoration-color .25s,background .25s}
.prose a:hover{background:color-mix(in srgb,var(--accent) 14%,transparent); border-radius:4px}
.prose a[href^="http"]:not([href*="darkvoyagerlabs"])::after{content:"↗"; font-size:.8em; margin-left:.2em; text-decoration:none; display:inline-block}
.prose strong{font-weight:650}
.prose ul,.prose ol{padding-left:1.4em}
.prose li+li{margin-top:.5em}
.prose li::marker{color:var(--accent)}
.prose blockquote{margin-inline:0; padding:.4em 0 .4em 1.4em; border-left:3px solid var(--accent); color:var(--dim); font-family:var(--f-display); font-size:1.2em; letter-spacing:-.015em; line-height:1.5}
.prose hr{border:0; height:1px; background:var(--line-2); margin-block:2.4em}
.prose code{font-family:var(--f-code); font-size:.86em; padding:.15em .4em; border-radius:7px; background:var(--card-hi); border:1px solid var(--line)}
.prose pre{position:relative; margin-inline:0; padding:1.2rem 1.3rem; overflow-x:auto; border-radius:20px; background:var(--code-bg); color:var(--code-fg); border:1px solid var(--line); line-height:1.65; font-size:.92rem}
.prose pre code{padding:0; border:0; background:none; font-size:inherit; color:inherit}
.prose pre:focus-visible{outline-offset:2px}
.copy-btn{position:absolute; top:.6rem; right:.6rem; min-height:36px; padding:0 .8rem; border-radius:10px; font-size:.78rem; font-weight:600; background:rgba(255,255,255,.1); color:#e6edf6; border:1px solid rgba(255,255,255,.2)}
.copy-btn:hover{background:rgba(255,255,255,.2)}
.prose table{width:100%; border-collapse:collapse; font-size:.96em}
.prose th,.prose td{padding:.75em 1em; text-align:left; border-bottom:1px solid var(--line)}
.prose th{font-weight:650; color:var(--text); background:var(--card)}
.table-wrap{overflow-x:auto; border:1px solid var(--line); border-radius:18px}
.prose figure{margin-inline:0}
.prose figure img{width:100%; height:auto; border-radius:22px; border:1px solid var(--line); background:var(--bg-2)}
.prose figcaption{margin-top:.8rem; font-size:.9rem; color:var(--dim); line-height:1.5}
.prose :target,.prose h2:target,.prose h3:target{animation:target-flash 2s var(--ease)}
@keyframes target-flash{from{background:color-mix(in srgb,var(--accent) 22%,transparent)}}
.anchor{margin-left:.4em; font-size:.7em; font-weight:500; color:var(--faint)!important; text-decoration:none!important; opacity:0; transition:opacity .25s}
:is(h2,h3):hover .anchor,.anchor:focus-visible{opacity:1}
@media (hover:none){.anchor{opacity:.7}}

/* callouts: <aside class="callout callout--tip"> */
.callout{padding:1.1rem 1.3rem; border-radius:20px; border:1px solid var(--line); border-left:4px solid var(--accent); background:var(--card); font-size:.97em; line-height:1.65}
.callout--tip{border-left-color:var(--green)} .callout--warn{border-left-color:var(--amber)} .callout--danger{border-left-color:var(--red)}
.callout .callout-title{display:block; font-weight:650; margin-bottom:.2em}

/* ---------- below the article ---------- */
.after{display:grid; gap:clamp(36px,5vw,56px); margin-top:clamp(44px,6vw,72px)}
.after h2{font-size:clamp(1.5rem,3vw,2rem); letter-spacing:-.04em; margin-bottom:1rem}
.attachments ul{list-style:none; display:grid; gap:10px}
.attachments a{display:flex; align-items:center; gap:.9rem; min-height:56px; padding:.6rem 1rem; border-radius:18px; background:var(--card); border:1px solid var(--line); transition:border-color .3s,translate .5s var(--ease)}
.attachments a:hover{border-color:var(--line-2); translate:4px 0}
.attachments .file-icon{width:38px; height:38px; border-radius:12px; display:grid; place-items:center; flex:none; background:var(--card-hi); color:var(--accent)}
.attachments .file-name{font-weight:600; word-break:break-all}
.attachments .file-note{margin-left:auto; font-size:.84rem; color:var(--dim); white-space:nowrap}
.post-nav{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.post-nav a{display:grid; gap:.3rem; padding:1.1rem 1.3rem; border-radius:22px; background:var(--card); border:1px solid var(--line); min-height:88px; transition:border-color .3s,translate .6s var(--ease)}
.post-nav a:hover{border-color:var(--line-2); translate:0 -4px}
.post-nav .label{font-size:.84rem; color:var(--dim)}
.post-nav .title{font-family:var(--f-display); font-weight:600; font-size:1.15rem; letter-spacing:-.02em}
.post-nav .next{text-align:right; grid-column:2}
@media (max-width:640px){.post-nav{grid-template-columns:1fr} .post-nav .next{grid-column:auto}}
.related{padding-top:clamp(28px,4vw,44px); border-top:1px solid var(--line)}
.comments{padding:clamp(18px,3vw,30px); border-radius:28px; background:var(--card); border:1px solid var(--line)}
.comments .note{color:var(--dim); font-size:.95rem}
