:root{
  --paper:#f6f7f9; --surface:#fff; --ink:#16181d; --muted:#5b6170; --rule:#dcdfe5;
  --accent:#1d3fc4; --accent-soft:#e7ebfb;
  --f-display:"Marcellus","Optima","Segoe UI",serif;
  --f-body:"IBM Plex Sans","Segoe UI","Helvetica Neue",Arial,sans-serif;
  --f-mono:"IBM Plex Mono",Consolas,monospace;
  --wide:1080px; --measure:40rem;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --paper:#101217; --surface:#171a21; --ink:#e7e9ee; --muted:#9aa1b0; --rule:#2a2f3a;
  --accent:#93a6ff; --accent-soft:#1d2440; color-scheme:dark}}
*{box-sizing:border-box}
html{scroll-padding-top:16px}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--f-body);font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:var(--accent);text-underline-offset:2px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
h1,h2,h3,h4{font-family:var(--f-display);font-weight:400;line-height:1.15;margin:0;text-wrap:balance}
p{margin:0}
img{max-width:100%;height:auto}
.wrap{max-width:var(--wide);margin:0 auto;padding-inline:max(16px,4vw)}
.label{font-family:var(--f-mono);font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* masthead stays white: the logo's own ground */
.mast{background:#fff;color:#16181d}
.mast .wrap{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;padding-block:16px;flex-wrap:wrap}
.mast img{height:52px;width:auto;display:block}
.mast nav{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:.95rem}
.mast nav a{color:#16181d;text-decoration:none}
.mast nav a:hover,.mast nav a[aria-current]{color:#1d3fc4}
.bars{display:grid;grid-template-columns:repeat(6,1fr) 1.2fr;height:6px}
.bars i:nth-child(1){background:#00f}.bars i:nth-child(2){background:#f00}.bars i:nth-child(3){background:#f0f}
.bars i:nth-child(4){background:#0f0}.bars i:nth-child(5){background:#0ff}.bars i:nth-child(6){background:#ff0}.bars i:nth-child(7){background:#16181d}

.btn{display:inline-block;font-weight:600;text-decoration:none;padding:11px 20px;border-radius:4px;border:1px solid var(--ink);color:var(--ink)}
.btn.primary{background:var(--ink);color:var(--paper)}
.btn:hover{border-color:var(--accent)}
.cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}

/* home */
.hero{padding-block:72px 64px;display:grid;gap:20px}
.hero h1{font-size:clamp(2.4rem,1.4rem + 3.4vw,4rem)}
.hero p{font-size:1.2rem;color:var(--muted);max-width:var(--measure)}
section{padding-block:56px;border-top:1px solid var(--rule)}
section h2{font-size:clamp(1.7rem,1.2rem + 1.5vw,2.3rem);margin:6px 0 18px}
.lede{max-width:var(--measure);font-size:1.08rem}
.lede+.lede{margin-top:14px}
.services{list-style:none;margin:28px 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--rule);border:1px solid var(--rule)}
@media (max-width:640px){.services{grid-template-columns:1fr}}
.services li{background:var(--surface);padding:22px 22px 24px;display:grid;gap:8px;align-content:start}
.services h3{font-size:1.3rem}
.services p{color:var(--muted);font-size:.98rem}
.services a{font-size:.95rem;font-weight:600}
.feature{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px 40px;align-items:center;background:var(--accent-soft);padding:28px;border-radius:6px}
@media (max-width:700px){.feature{grid-template-columns:1fr}}
.feature h3{font-size:1.5rem;margin:4px 0 8px}
.feature p{max-width:56ch}
.contact dl{display:grid;grid-template-columns:auto 1fr;gap:6px 18px;margin:8px 0 0}
.contact dt{color:var(--muted)}
.contact dd{margin:0}

/* article lists */
.postlist{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}
.postlist li{border-bottom:1px solid var(--rule)}
.postlist a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 24px;padding:16px 0;text-decoration:none;color:var(--ink)}
.postlist a:hover .t{color:var(--accent)}
.postlist .t{font-family:var(--f-display);font-size:1.3rem;line-height:1.25}
.postlist .d{font-family:var(--f-mono);font-size:.78rem;color:var(--muted);white-space:nowrap;padding-top:4px}
.postlist .x{grid-column:1/-1;color:var(--muted);font-size:.95rem;max-width:var(--measure)}
@media (max-width:560px){.postlist a{grid-template-columns:1fr}.postlist .d{padding-top:0}}
.more{margin-top:20px;font-weight:600}
.page-head{padding-block:56px 32px;display:grid;gap:14px}
.page-head h1{font-size:clamp(2.2rem,1.4rem + 3vw,3.4rem)}
.page-head p{color:var(--muted);max-width:var(--measure);font-size:1.1rem}
.group{padding-block:0 48px}
.group h2{font-size:1.6rem;margin:0 0 6px}
.group > p{color:var(--muted);max-width:var(--measure);margin-bottom:18px}

/* article */
.article{padding-block:48px 24px}
.article header{max-width:var(--measure);margin:0 auto 32px;display:grid;gap:12px}
.article header h1{font-size:clamp(2rem,1.3rem + 2.6vw,3rem)}
.article .series-tag a{color:inherit}
.prose{max-width:var(--measure);margin:0 auto}
.prose > * + *{margin-top:1.1em}
.prose h2,.prose h3,.prose h4{margin-top:1.8em}
.prose h2{font-size:1.75rem}.prose h3{font-size:1.45rem}.prose h4{font-size:1.25rem}
.prose ul,.prose ol{padding-left:1.4em}
.prose li + li{margin-top:.4em}
.prose li > ul,.prose li > ol{margin-top:.4em}
.prose blockquote{margin-left:0;padding-left:18px;border-left:3px solid var(--rule);color:var(--muted)}
.prose figure{margin:1.6em 0}
.prose figure img{display:block;margin:0 auto;border-radius:3px;background:#fff}
.prose figure.shot img{border:1px solid var(--rule);background:#fff}
.prose figcaption{margin-top:8px;font-size:.86rem;color:var(--muted);text-align:center;overflow-wrap:anywhere}
.prose strong{font-weight:600}
.origin{max-width:var(--measure);margin:40px auto 0;padding-top:16px;border-top:1px solid var(--rule);font-size:.88rem;color:var(--muted)}
.series{max-width:var(--measure);margin:32px auto 0;background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:20px 22px}
.series ol{margin:10px 0 0;padding-left:1.4em}
.series li + li{margin-top:4px}
.series li[aria-current] {font-weight:600}
.pager{max-width:var(--measure);margin:24px auto 0;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-weight:600}

footer{border-top:1px solid var(--rule);margin-top:56px;padding-block:28px 48px;font-size:.85rem;color:var(--muted)}
footer p+p{margin-top:4px}
