:root{
  --bg:#f5f1e6; --surface:#fffdf7; --text:#1a1a17; --muted:#6a6357;
  --primary:#1f3a5f; --accent:#a8342a;
  --line:rgb(26 26 23 / .12);
  --radius:6px;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:24px; --space-6:32px; --space-7:48px; --space-8:72px;
  --fs-xs:12px; --fs-sm:14px; --fs-base:17px; --fs-md:22px; --fs-lg:28px;
  --fs-xl:36px; --fs-2xl:48px;
  --shadow-1:0 1px 2px rgb(26 26 23 / .06);
  --shadow-2:0 8px 24px rgb(26 26 23 / .08);
  --font-head:'Fraunces',Georgia,serif;
  --font-body:'Inter',system-ui,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--font-body); font-size:var(--fs-base); line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--font-head); line-height:1.15; letter-spacing:-.01em;
  text-wrap:balance; margin:0 0 var(--space-4); font-weight:600}
h1{font-size:var(--fs-2xl)}
h2{font-size:var(--fs-lg); margin-top:var(--space-7); padding-top:var(--space-5); border-top:1px solid var(--line)}
h3{font-size:var(--fs-md); margin-top:var(--space-6)}
p{margin:0 0 var(--space-4); max-width:68ch; text-wrap:pretty}
blockquote{margin:var(--space-5) 0; padding:var(--space-5); background:var(--surface); border-left:3px solid var(--primary); border-radius:0 var(--radius) var(--radius) 0; font-family:var(--font-head); font-size:var(--fs-md); line-height:1.45; max-width:68ch; box-shadow:var(--shadow-1)}
blockquote p{margin:0; max-width:none; font-size:inherit}
ul,ol{margin:0 0 var(--space-4); padding-left:1.2em; max-width:68ch}
li{margin-bottom:var(--space-2)}
a{color:var(--primary); text-decoration:none; border-bottom:1px solid rgb(31 58 95 / .3);
  transition:border-color 160ms ease, color 160ms ease}
a:hover{border-bottom-color:var(--primary)}
strong{font-weight:600}
small{font-size:var(--fs-sm)}
:focus-visible{outline:2px solid var(--primary); outline-offset:2px}
::selection{background:rgb(31 58 95 / .14)}
img{max-width:100%; height:auto}
.container{max-width:1120px; margin-inline:auto; padding-inline:20px}
.eyebrow{font-size:var(--fs-xs); letter-spacing:.08em; text-transform:uppercase;
  color:var(--primary); font-weight:600; margin-bottom:var(--space-3); display:block}
.num{font-variant-numeric:tabular-nums}
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important}}


/* ---------- header ---------- */
.site-head{border-bottom:1px solid var(--line); background:var(--bg); position:sticky; top:0; z-index:20}
.site-head .container{display:flex; align-items:center; gap:var(--space-5); min-height:64px}
.brand{font-family:var(--font-head); font-size:var(--fs-md); font-weight:600; color:var(--text); border:none; letter-spacing:-.01em}
.brand span{color:var(--accent)}
.nav{display:flex; gap:var(--space-5); margin-left:auto; flex-wrap:wrap}
.nav a{font-size:var(--fs-sm); color:var(--muted); border:none}
.nav a:hover{color:var(--primary); text-decoration:underline; text-underline-offset:3px}
/* ---------- hero ---------- */
.hero{padding:var(--space-8) 0 var(--space-7); border-bottom:1px solid var(--line)}
.hero .container{max-width:900px}
.hero h1{max-width:20ch; font-size:clamp(30px,5vw,56px)}
.hero .lead{font-size:var(--fs-md); color:var(--muted); max-width:56ch; line-height:1.5}
.hero-pts{display:flex; gap:var(--space-5); flex-wrap:wrap; margin-top:var(--space-6); font-size:var(--fs-sm); color:var(--muted)}
.hero-pts b{display:block; font-family:var(--font-head); font-size:var(--fs-lg); color:var(--text); line-height:1.2}
/* ---------- buttons ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; height:46px; padding:0 var(--space-5); border-radius:var(--radius); font-weight:600; font-size:var(--fs-sm); background:var(--primary); color:#fff; border:1px solid var(--primary); transition:background 160ms ease, transform 160ms ease; cursor:pointer}
.btn:hover{background:#162946; transform:translateY(-1px)}
.btn-ghost{background:transparent; color:var(--primary); border:1px solid var(--line)}
.btn-ghost:hover{background:var(--surface); border-color:var(--primary)}
.btn-row{display:flex; gap:var(--space-3); flex-wrap:wrap; margin-top:var(--space-5)}
/* ---------- sections ---------- */
.section{padding:var(--space-8) 0; border-bottom:1px solid var(--line)}
.section:last-of-type{border-bottom:none}
.section-head{max-width:62ch; margin-bottom:var(--space-6)}
.section-head p{color:var(--muted); margin:0}
/* ---------- numbered stair (E) ---------- */
.stair{display:grid; gap:var(--space-6); max-width:72ch}
.stair-item{display:grid; grid-template-columns:64px 1fr; gap:var(--space-4); align-items:start}
.stair-item .big{font-family:var(--font-head); font-size:var(--fs-lg); color:var(--muted); opacity:.5; font-variant-numeric:tabular-nums; line-height:1}
.stair-item h3{margin:0 0 var(--space-2); font-size:var(--fs-md); margin-top:0}
.stair-item p{margin:0; color:var(--muted); font-size:var(--fs-sm)}
/* ---------- split (F) ---------- */
.split{display:grid; grid-template-columns:280px 1fr; gap:var(--space-7); align-items:start}
.split .aside{position:sticky; top:88px}
.split .aside h2{margin-top:0; font-size:var(--fs-md)}
.split .aside p{font-size:var(--fs-sm); color:var(--muted)}
@media (max-width:820px){.split{grid-template-columns:1fr; gap:var(--space-4)} .split .aside{position:static}}


/* ---------- timeline (H) ---------- */
.timeline{list-style:none; margin:0; padding:0; border-left:1px solid var(--line); max-width:72ch}
.timeline li{position:relative; padding:0 0 var(--space-5) var(--space-5); margin:0}
.timeline li::before{content:''; position:absolute; left:-4px; top:9px; width:7px; height:7px; border-radius:50%; background:var(--muted)}
.timeline li.mark::before{background:var(--accent); box-shadow:0 0 0 3px rgb(168 52 42 / .15)}
.timeline .when{font-family:var(--font-head); font-size:var(--fs-sm); color:var(--primary); display:block; font-variant-numeric:tabular-nums}
.timeline .what{font-size:var(--fs-sm); color:var(--muted)}
/* ---------- grid cards ---------- */
.grid{display:grid; gap:var(--space-5)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:var(--space-5); box-shadow:var(--shadow-1); display:flex; flex-direction:column}
.card h3{margin:0 0 var(--space-2); font-size:var(--fs-base); font-family:var(--font-body); font-weight:600}
.card p{margin:0; font-size:var(--fs-sm); color:var(--muted)}
.card .card-link{margin-top:var(--space-4); font-size:var(--fs-sm); font-weight:600; border:none}
/* ---------- figure ---------- */
.figure{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:var(--space-5); margin:var(--space-6) 0; box-shadow:var(--shadow-1)}
.figure canvas{width:100%; height:auto; display:block; border-radius:3px}
.figure figcaption{font-size:var(--fs-xs); color:var(--muted); margin-top:var(--space-3); max-width:64ch}
/* ---------- faq ---------- */
details{border-top:1px solid var(--line); padding:var(--space-4) 0; max-width:72ch}
details:last-of-type{border-bottom:1px solid var(--line)}
summary{font-weight:600; cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:var(--space-4)}
summary::-webkit-details-marker{display:none}
summary::after{content:'+'; color:var(--primary); font-weight:400}
details[open] summary::after{content:'-'}
details p{margin:var(--space-3) 0 0; font-size:var(--fs-sm); color:var(--muted); max-width:70ch}
/* ---------- callout ---------- */
.callout{border-left:3px solid var(--accent); background:rgb(168 52 42 / .05); padding:var(--space-4) var(--space-5); margin:var(--space-5) 0; border-radius:0 var(--radius) var(--radius) 0; max-width:72ch}
.callout p{margin:0; font-size:var(--fs-sm)}
.callout p+p{margin-top:var(--space-3)}
/* ---------- zeta lab tool ---------- */
.zeta-lab{display:grid; grid-template-columns:1fr 300px; gap:var(--space-5); align-items:start}
.zeta-controls{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:var(--space-5)}
.zeta-controls label{display:block; font-size:var(--fs-xs); letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-bottom:var(--space-2)}
.zeta-controls input[type=range]{width:100%; accent-color:var(--primary)}
.zeta-controls .val{font-family:var(--font-head); font-size:var(--fs-md); font-variant-numeric:tabular-nums; margin-bottom:var(--space-4)}
.zeta-readout{font-size:var(--fs-sm); color:var(--muted); margin-top:var(--space-4); line-height:1.7}
.zeta-readout b{color:var(--text)}
@media (max-width:820px){.zeta-lab{grid-template-columns:1fr}}
/* ---------- footer ---------- */
.site-foot{border-top:1px solid var(--line); padding:var(--space-7) 0 var(--space-6); margin-top:var(--space-8)}
.site-foot .cols{display:grid; grid-template-columns:2fr 1fr 1fr; gap:var(--space-6)}
.site-foot h3{font-size:var(--fs-xs); letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0 0 var(--space-3); font-family:var(--font-body); font-weight:600}
.site-foot ul{list-style:none; margin:0; padding:0}
.site-foot li{margin-bottom:var(--space-2)}
.site-foot a{font-size:var(--fs-sm); color:var(--muted); border:none}
.site-foot a:hover{color:var(--primary); border:none}
.site-foot .cols p{font-size:var(--fs-sm); color:var(--muted); max-width:34ch}
.copyright{font-size:var(--fs-xs); color:var(--muted); margin-top:var(--space-6); padding-top:var(--space-4); border-top:1px solid var(--line)}
@media (max-width:820px){.site-foot .cols{grid-template-columns:1fr 1fr} .site-foot .cols > div:first-child{grid-column:1 / -1}}
/* ---------- mobile ---------- */
@media (max-width:640px){
  body{font-size:16px}
  h1{font-size:30px} h2{font-size:24px}
  .hero{padding:var(--space-6) 0}
  .hero .lead{font-size:16px; line-height:1.6; max-width:92%}
  .hero-pts{gap:var(--space-4)}
  .grid-3,.grid-2{grid-template-columns:1fr}
  .section{padding:var(--space-6) 0}
  .stair-item{grid-template-columns:44px 1fr; gap:var(--space-3)}
  .btn{width:100%}
  .nav{gap:var(--space-4); font-size:13px; flex-wrap:nowrap; overflow-x:auto; width:100%; margin-left:0; padding-bottom:2px; -webkit-overflow-scrolling:touch}
  .site-head .container{min-height:auto; padding-block:var(--space-3); flex-wrap:wrap}
}


/* ---------- home: hero with live mini lab ---------- */
.hero-home{padding-top:var(--space-7)}
.hero-home .hero-grid{display:grid; grid-template-columns:minmax(0,1fr) 420px; gap:var(--space-7); align-items:start; max-width:1120px}
.hero-home h1{max-width:18ch; font-size:clamp(30px,4.2vw,50px)}
.hero-home .lead{font-size:var(--fs-base); max-width:52ch}
.hero-home .callout{margin-top:var(--space-6); margin-bottom:0}
.mini-lab{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:var(--space-4); box-shadow:var(--shadow-1)}
.mini-top{display:flex; justify-content:space-between; align-items:baseline; gap:var(--space-3); margin-bottom:var(--space-2)}
.mini-tag{font-size:var(--fs-xs); letter-spacing:.08em; text-transform:uppercase; color:var(--primary); font-weight:600}
.mini-count{font-family:var(--font-head); font-size:var(--fs-sm); color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap}
.mini-count b{color:var(--accent); font-size:var(--fs-base)}
.mini-lab canvas{display:block; width:100%; height:172px; border-radius:3px}
.mini-label{display:flex; justify-content:space-between; align-items:baseline; gap:var(--space-3); font-size:var(--fs-xs); letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin:var(--space-3) 0 0}
.mini-label span{letter-spacing:0; text-transform:none; font-family:var(--font-head); font-size:var(--fs-sm); color:var(--text); font-variant-numeric:tabular-nums}
.mini-lab input[type=range]{display:block; width:100%; height:44px; margin:0; accent-color:var(--primary)}
.mini-note{margin:var(--space-1) 0 0; font-size:var(--fs-xs); color:var(--muted); line-height:1.55; max-width:56ch}
.mini-note a{font-weight:600; border-bottom-color:rgb(31 58 95 / .3)}
@media (max-width:900px){
  .hero-home .hero-grid{grid-template-columns:1fr; gap:var(--space-5)}
  .hero-home h1{max-width:22ch}
  .mini-lab canvas{height:140px}
}
@media (max-width:640px){
  .mini-lab{padding:var(--space-3)}
  .mini-lab canvas{height:116px}
  .hero-home .callout{margin-top:var(--space-5)}
  .mini-note{font-size:var(--fs-xs); line-height:1.5}
}


/* ---------- fixes after design review (home first screen) ---------- */
.mini-lab canvas{border:1px solid var(--line); background:var(--surface)}
.mini-top{margin-bottom:var(--space-3)}
.mini-note a{display:inline-block; margin-top:6px; padding:4px 0}
@media (max-width:640px){
  .site-head .nav{flex-wrap:wrap; overflow:visible; gap:var(--space-2) var(--space-4); font-size:13px; line-height:1.4}
  .site-head .nav a{display:inline-flex; align-items:center; min-height:32px}
  .hero-home h1{font-size:28px}
  .mini-lab canvas{height:124px}
  .mini-note a{margin-top:4px}
}


/* ---------- round 3: canvas draw fix + mobile nav + CTA ---------- */
.mini-note{font-size:13px}
.mini-note a{display:inline-flex; align-items:center; min-height:40px; padding:0 14px; margin-top:var(--space-3); border:1px solid var(--primary); border-bottom-color:var(--primary); border-radius:var(--radius); font-weight:600; transition:background-color 160ms ease}
.mini-note a:hover{background:rgb(31 58 95 / .07)}
@media (max-width:640px){
  .site-head .nav{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px 12px; font-size:12.5px; line-height:1.4}
  .site-head .nav a{display:inline-flex; align-items:center; min-height:30px; white-space:nowrap}
  .hero-home h1{font-size:28px; margin-bottom:var(--space-3)}
  .hero-copy .lead{font-size:16px; line-height:1.5}
  .mini-note a{min-height:38px; padding:0 12px; margin-top:var(--space-2)}
}


/* ---------- round 4: note + CTA stack, nav size ---------- */
.mini-note{display:flex; flex-direction:column; align-items:flex-start; gap:6px; margin-top:var(--space-2); font-size:14px; line-height:1.55}
.mini-note a{margin-top:2px}
.mini-label{font-size:13px}
@media (max-width:640px){
  .site-head .nav{font-size:14px; gap:4px 12px}
  .site-head .nav a{padding:8px 4px; min-height:36px}
  .mini-note{font-size:13px}
  .mini-note a{width:100%; justify-content:center; margin-top:6px}
}


/* ---------- round 5: readability polish ---------- */
.section p{line-height:1.75; max-width:65ch}
.mini-note a{background:rgb(31 58 95 / .05); min-height:44px}
.mini-note a:hover{background:rgb(31 58 95 / .1); transform:translateY(-1px)}
@media (max-width:640px){
  .site-head .nav{gap:12px 12px}
  .mini-tag{font-size:12px}
}
