/* Shared layout for blog posts, matching the FIN4801 valuations post (which carries its own copy inline). */
.prose:has(> .vd){max-width:880px}
.post-body .vd{--mono:ui-monospace,"Cascadia Mono",Consolas,monospace;--rust-tint:color-mix(in srgb,var(--rust) 11%,var(--surface));--gold-tint:color-mix(in srgb,var(--gold) 16%,var(--surface))}
.post-body .vd p,.post-body .vd li{max-width:68ch}
.post-body .vd .lede{font-size:19px;margin:0 0 6px}
.post-body .vd .lede b{color:var(--rust-ink)}
.post-body .vd nav.index{display:flex;flex-wrap:wrap;gap:8px;padding-block:14px;border-bottom:1px solid var(--line)}
@media (min-width:760px){.post-body .vd nav.index{position:sticky;top:0;background:var(--ground);z-index:5}}
.post-body .vd nav.index a{font-family:var(--sans);font-size:13px;text-decoration:none;color:var(--doc-head);border:1px solid var(--line);background:var(--surface);padding:4px 10px;border-radius:999px;white-space:nowrap}
.post-body .vd nav.index a:hover,.post-body .vd nav.index a:focus-visible{border-color:var(--rust);color:var(--rust-ink);outline:none}
.post-body .vd section{padding-block:40px 0;scroll-margin-top:72px}
.post-body .vd h2{display:flex;gap:.45em;align-items:baseline;margin:0 0 .5em}
.post-body .vd h2 .n{color:var(--rust-ink);font-family:var(--mono);font-size:.62em;font-weight:500}
.post-body .vd h3{margin:1.4em 0 .4em}
.post-body .vd .m{font-family:var(--mono);font-size:.9em}
.post-body .vd .formula{font-family:var(--mono);background:var(--surface-2);border:1px solid var(--line);border-radius:4px;padding:12px 16px;margin:12px 0;overflow-x:auto;font-size:14px;line-height:1.7;white-space:pre-wrap}
.post-body .vd .formula .lbl{display:block;font-family:var(--sans);font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-bottom:2px;white-space:normal}
.post-body .vd .rule,.post-body .vd .trap{border-radius:4px;padding:12px 16px;margin:16px 0;font-size:16px}
.post-body .vd .rule{background:var(--gold-tint);border-left:4px solid var(--gold)}
.post-body .vd .trap{background:var(--rust-tint);border-left:4px solid var(--rust)}
.post-body .vd .rule b:first-child,.post-body .vd .trap b:first-child{display:block;font-family:var(--sans);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:2px}
.post-body .vd .rule b:first-child{color:var(--work)}
.post-body .vd .trap b:first-child{color:var(--rust-ink)}
.post-body .vd .tbl{overflow-x:auto;margin:14px 0;border:1px solid var(--line);border-radius:4px;background:var(--surface)}
.post-body .vd .tbl table{display:table;width:100%;margin:0}
.post-body .vd td{vertical-align:top}
.post-body .vd td.num,.post-body .vd th.num{text-align:right;font-family:var(--mono);font-size:13px;white-space:nowrap}
.post-body .vd tr:last-child td{border-bottom:none}
.post-body .vd tr.total td{font-weight:700;border-top:2px solid var(--ink)}
.post-body .vd tr.sub td{color:var(--muted)}
.post-body .vd .pill{display:inline-block;font-family:var(--sans);font-size:12px;font-weight:700;text-transform:none;letter-spacing:0;background:none;padding:1px 8px;border-radius:999px;border:1px solid currentColor;white-space:nowrap}
.post-body .vd .pill.add{color:var(--ok)}
.post-body .vd .pill.less{color:var(--rust-ink)}
.post-body .vd .pill.keep{color:var(--muted)}
.post-body .vd .grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin:14px 0}
.post-body .vd .card{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:14px 16px;min-width:0}
.post-body .vd .card h4{margin:0 0 6px;font-family:var(--sans);font-size:15px;color:var(--doc-head)}
.post-body .vd .card p{margin:.3em 0;font-size:15px}
.post-body .vd .card p.m{font-size:13px;white-space:pre-wrap}
.post-body .vd .card .use{font-family:var(--sans);font-size:13px;color:var(--muted)}
.post-body .vd .steps{counter-reset:s;list-style:none;padding:0;display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0}
.post-body .vd .steps li{counter-increment:s;display:grid;grid-template-columns:30px 1fr;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:10px 12px;max-width:none;margin:0}
.post-body .vd .steps li::before{content:counter(s);font-family:var(--mono);color:var(--rust-ink);font-size:17px}
.post-body .vd .steps li span{min-width:0}
.post-body .vd .diagram{overflow-x:auto;margin:14px 0;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:10px}
.post-body .vd .diagram svg{display:block;min-width:620px;width:100%;height:auto;font-family:var(--sans);font-size:13px}
.post-body .vd details{background:var(--surface);border:1px solid var(--line);border-radius:6px;margin:10px 0;padding:0 16px}
.post-body .vd details[open]{padding-bottom:12px}
.post-body .vd summary{cursor:pointer;padding:12px 0;font-family:var(--sans);font-weight:700;color:var(--doc-head);list-style:none;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.post-body .vd summary::-webkit-details-marker{display:none}
.post-body .vd summary::before{content:"+";font-family:var(--mono);color:var(--rust-ink);width:12px}
.post-body .vd details[open] summary::before{content:"\2212"}
.post-body .vd summary .meta{font-weight:400;color:var(--muted);font-size:13px}
.post-body .vd summary:focus-visible{outline:2px solid var(--rust);outline-offset:2px}

/* Additions for posts restyled to match: markdown-generated elements inside .vd, kicker, gold rule, question cards. */
.post-body .vd .kicker{font-family:var(--sans);font-size:11.5px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:0 0 10px}
.post-body .vd .lede{line-height:1.6}
.post-body .vd .lede+p{margin-top:12px}
.post-body .vd hr.goldrule{border:0;height:2px;background:var(--gold);opacity:.85;margin:18px 0 0;max-width:none}
.post-body .vd hr.goldrule+nav.index{padding-top:14px}
.post-body .vd h2{flex-wrap:wrap;row-gap:.15em}
.post-body .vd h2 .meta{font-family:var(--sans);font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);flex-basis:100%;order:3}
.post-body .vd h2+h3,.post-body .vd h2+.ask{margin-top:.6em}
.post-body .vd h4{font-size:16px;margin:1.2em 0 .4em}
.post-body .vd .rule>p,.post-body .vd .trap>p,.post-body .vd .card>p{max-width:none}
.post-body .vd .rule>p:last-child,.post-body .vd .trap>p:last-child,.post-body .vd .card>p:last-child,.post-body .vd .formula>p:last-child,.post-body .vd .ask>p:last-child{margin-bottom:0}
.post-body .vd .rule>p:first-child>strong:first-child,.post-body .vd .trap>p:first-child>strong:first-child{display:block;font-family:var(--sans);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:2px}
.post-body .vd .rule>p:first-child>strong:first-child{color:var(--work)}
.post-body .vd .trap>p:first-child>strong:first-child{color:var(--rust-ink)}
.post-body .vd .rule>.lbl,.post-body .vd .trap>.lbl{display:block;font-family:var(--sans);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;margin-bottom:2px;color:var(--work)}
.post-body .vd .trap>.lbl{color:var(--rust-ink)}
.post-body .vd .card>p:first-child>strong:first-child{display:block;font-family:var(--sans);font-size:15px;color:var(--doc-head);margin-bottom:4px}
.post-body .vd .card ul,.post-body .vd .card ol{margin:.4em 0 0;padding-left:20px;font-size:15px}
.post-body .vd .card li{max-width:none}
.post-body .vd .grid2.wide{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}
.post-body .vd .grid1{display:grid;grid-template-columns:1fr;gap:12px;margin:14px 0}
.post-body .vd a.card{display:block;text-decoration:none;color:inherit}
.post-body .vd a.card:hover,.post-body .vd a.card:focus-visible{border-color:var(--rust);outline:none}
.post-body .vd a.card h4{color:var(--rust-ink);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.post-body .vd a.card p{color:var(--ink)}
.post-body .vd .ask{background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--navy);border-radius:4px;padding:12px 16px;margin:12px 0;font-size:16px}
.post-body .vd .ask::before{content:"The question";display:block;font-family:var(--sans);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}
.post-body .vd .ask>p{max-width:none}
.post-body .vd .formula>p{margin:0;max-width:none}
.post-body .vd .msteps>ol{counter-reset:s;list-style:none;padding:0;display:grid;gap:8px;margin:12px 0}
.post-body .vd .msteps>ol>li{counter-increment:s;position:relative;display:block;background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:10px 12px 10px 52px;max-width:none;margin:0}
.post-body .vd .msteps>ol>li::before{content:counter(s);position:absolute;left:12px;top:9px;width:30px;font-family:var(--mono);color:var(--rust-ink);font-size:17px}
.post-body .vd .msteps>ol>li>p{margin:0 0 .4em}
.post-body .vd .msteps>ol>li>p:last-child{margin-bottom:0}
.post-body .vd pre{border:1px solid var(--line);border-radius:4px;padding:12px 16px;max-width:none}
.post-body .vd .tbl table{max-width:none}
.post-body .vd .tbl td,.post-body .vd .tbl th{vertical-align:top}
@media (max-width:600px){.post-body .vd .lede{font-size:18px}.post-body .vd .grid2.wide{grid-template-columns:1fr}.post-body .vd section{padding-block:30px 0}}
.post-body .vd .formula:has(>p){white-space:normal}
.post-body .vd .formula>p{white-space:pre-wrap}
.post-body .vd p.ans{margin:10px 0 6px}
.post-body .vd p.ans .pill{font-size:13px;padding:2px 10px}
