:root{
  --blue:#1727D9; --marker:#FFE94A; --ink:#12163A;
  --ground:#EDF0F7; --surface:#FFFFFF; --text:#12163A; --muted:#4A5072; --line:#C6CCE0; --pen:#D42B21; --link:#1727D9;
  --sans:"Bricolage Grotesque","Segoe UI",system-ui,sans-serif;
  --mono:"Martian Mono","Cascadia Mono",Consolas,monospace;
  --saw:conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) bottom/14px 100%;
  box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){color-scheme:dark;--ground:#0D1030;--surface:#171B45;--text:#EEF0FA;--muted:#AAB1D8;--line:#30377A;--pen:#FF7468;--link:#9FB0FF}
}
:root[data-theme="dark"]{color-scheme:dark;--ground:#0D1030;--surface:#171B45;--text:#EEF0FA;--muted:#AAB1D8;--line:#30377A;--pen:#FF7468;--link:#9FB0FF}
*,*::before,*::after{box-sizing:inherit}
html{scroll-behavior:smooth;scroll-padding-top:calc(env(safe-area-inset-top,0px) + 1rem)}
body{margin:0;background:var(--ground);color:var(--text);font:400 1.0625rem/1.55 var(--sans);-webkit-font-smoothing:antialiased}
a{color:var(--link);text-underline-offset:.18em}
:focus-visible{outline:3px solid #12163A;outline-offset:2px;box-shadow:0 0 0 6px var(--marker)}
.wrap{max-width:1180px;margin-inline:auto;padding-inline:clamp(20px,4vw,44px)}
h1,h2,h3{font-family:var(--sans);font-variation-settings:"wdth" 82;font-weight:800;letter-spacing:-.02em;line-height:1.08;margin:0;text-wrap:balance}
p{margin:0}

/* hero */
.hero{background:var(--blue);color:#fff;position:relative;overflow:hidden}
.hero a{color:#fff}
.guilloche{position:absolute;right:-380px;top:-420px;width:1000px;height:1000px;max-width:none;opacity:.45;animation:spin 320s linear infinite;pointer-events:none}
@keyframes spin{to{transform:rotate(360deg)}}
.top{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1.5rem;padding-block:1.4rem;position:relative}
.mark{display:inline-flex;align-items:center;min-height:44px}
.mark img{display:block;height:auto}
.top nav{margin-left:auto;display:flex;gap:1.5rem;font-weight:500}
.top nav a{text-decoration:none;padding-block:.35rem}
.top nav a:hover,.top nav a[aria-current]{text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:var(--marker)}
.crumbs{position:relative;font-size:.92rem}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.2rem .55rem;color:#DCE1FF}
.crumbs li+li::before{content:"/";margin-right:.55rem;opacity:.6}
.crumbs a{color:#DCE1FF}
.band{position:relative;padding-block:clamp(1.2rem,3vw,2.2rem) clamp(2.2rem,5vw,3.6rem)}
.band h1{font-size:clamp(2.1rem,5.2vw,4rem);line-height:.98;font-variation-settings:"wdth" 76;max-width:20ch}
.band .lede{font-size:1.25rem;max-width:54ch;color:#DCE1FF;margin-top:1rem}
.meta{display:flex;flex-wrap:wrap;gap:.5rem 1.6rem;margin-top:1.3rem;font:400 .8rem/1.4 var(--mono);color:#DCE1FF}

/* reading layout */
.read{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:clamp(2rem,5vw,4.5rem);align-items:start;padding-block:clamp(2rem,5vw,4rem) clamp(2rem,5vw,3.5rem)}
.body{max-width:68ch;font-size:1.14rem;line-height:1.62;min-width:0}
.body>*+*{margin-top:.85rem}
.body h2{font-size:clamp(1.5rem,2.6vw,1.9rem);margin-top:2.6rem;scroll-margin-top:1rem}
.body h2:first-child{margin-top:0}
.body h3{font-size:1.28rem;margin-top:1.9rem}
.body ul{margin-block:.85rem 0;padding-left:1.25rem}
.body li+li{margin-top:.3rem}
.body li::marker{color:var(--link)}
.body .key{font-weight:700;font-size:1.26rem;line-height:1.35;font-variation-settings:"wdth" 88}
.body .key strong{font-weight:inherit}
.body .note{font-size:.95rem;color:var(--muted);font-style:normal}
.body .note em{font-style:normal}

/* tables */
.scroll{overflow-x:auto;border:1px solid var(--line);border-radius:6px;background:var(--surface);margin-top:1.2rem}
table{border-collapse:collapse;width:100%;font-size:.98rem;line-height:1.4}
th,td{text-align:left;padding:.7rem .9rem;border-bottom:1px solid var(--line);vertical-align:top}
caption{caption-side:top;text-align:left;padding:.7rem .9rem;font-size:.9rem;color:var(--muted);border-bottom:1px solid var(--line)}
thead th{font-weight:700;font-size:.9rem;background:var(--ground)}
tbody th{font-weight:500}
tbody tr:last-child>*{border-bottom:0}
td.n{font-family:var(--mono);font-size:.84rem;white-space:nowrap}
table.sheet td{min-width:6.5rem;background:repeating-linear-gradient(90deg,var(--line) 0 4px,transparent 4px 8px) left .9rem bottom .6rem/calc(100% - 1.8rem) 1px no-repeat}
table.sheet td:not(:empty){background:none}

/* calc slip and letter */
.calc{background:#fff;color:#12163A;font:400 .86rem/1.5 var(--mono);padding:1.2rem 1.1rem 1.9rem;width:min(460px,100%);margin-top:1.3rem;-webkit-mask:var(--saw);mask:var(--saw)}
.calc p{display:grid;grid-template-columns:1.2rem 1fr;gap:.3rem;padding:.18rem 0}
.calc .op{font-weight:600}
.calc .eq{border-top:1.5px dashed #12163A;margin-top:.5rem;padding-top:.6rem;font-weight:600}
.calc .eq span:last-child{background:var(--marker);padding:0 .3em;border-radius:2px 5px 2px 4px;justify-self:start}
.letter{background:var(--surface);border:1px solid var(--line);border-radius:6px;margin-top:1.3rem;overflow:hidden}
.letter-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.6rem .6rem .6rem 1rem;border-bottom:1px dashed var(--line);font-size:.9rem;font-weight:600;color:var(--muted)}
.copy{font:600 .9rem/1 var(--sans);background:var(--marker);color:#12163A;border:0;border-radius:4px;padding:.7rem .9rem;min-height:44px;cursor:pointer}
.letter-body{padding:1rem 1.1rem 1.2rem;font:400 .86rem/1.65 var(--mono)}
.letter-body>*+*{margin-top:.75rem}
.letter-body ul{padding-left:1.1rem;margin:0}
.letter-body .key{font:600 .86rem/1.65 var(--mono)}
.letter-body strong{font-weight:600;background:rgba(255,233,74,.45);padding:0 .15em;border-radius:2px}

/* sources */
.sources{margin-top:3rem;padding-top:1.4rem;border-top:2px solid var(--text)}
.sources h2{font-size:1.2rem;margin:0}
.sources ul{list-style:none;padding:0;font-size:.95rem}
.sources li{padding:.4rem 0;border-bottom:1px solid var(--line)}
.sources a{color:var(--text);overflow-wrap:anywhere}

/* side column */
.read>.side{grid-column:2;grid-row:1}
.read>.body{grid-column:1;grid-row:1}
.side{position:sticky;top:1rem;display:grid;gap:1.4rem;max-height:calc(100vh - 2rem);overflow:auto;scrollbar-width:thin}
.slip{background:#fff;color:#12163A;font:400 .78rem/1.55 var(--mono);padding:1.3rem 1.1rem 2.1rem;-webkit-mask:var(--saw);mask:var(--saw)}
.slip h2{font-size:1.3rem;text-align:center}
.toc summary{cursor:pointer;list-style:none}
.toc summary::-webkit-details-marker{display:none}
.toc ol{list-style:none;margin:.9rem 0 0;padding:0;counter-reset:t}
.toc li{counter-increment:t;display:grid;grid-template-columns:1.7rem 1fr;border-top:1.5px dashed #12163A;padding:.5rem 0}
.toc li::before{content:counter(t,decimal-leading-zero);color:#4A5072}
.toc a{color:#12163A;text-decoration:none}
.toc a:hover{text-decoration:underline}
.brief .sub{text-align:center;font-size:.7rem;margin-top:.2rem}
.brief p+p{border-top:1.5px dashed #12163A;margin-top:.8rem;padding-top:.8rem}
.brief mark{background:var(--marker);color:#12163A;padding:0 .2em;border-radius:2px 5px 2px 4px}
.cta{display:grid;gap:.6rem}
.cta h2{font-size:1.15rem}
.btn{display:block;font:700 1rem/1.2 var(--sans);background:var(--marker);color:#12163A;border-radius:4px;padding:.9rem 1rem;text-decoration:none}
.btn:hover{filter:brightness(.95)}

/* link lists */
.related{padding-block:0 clamp(3rem,7vw,5rem)}
.related h2,.listing h2{font-size:1.5rem;margin:0 0 1rem}
.listing{padding-block:clamp(2rem,5vw,4rem) clamp(3rem,7vw,5rem)}
.listing h2{margin-top:2.6rem}
.listing h2:first-child{margin-top:0}
.index{list-style:none;margin:0;padding:0;border-top:2px solid var(--text);max-width:900px}
.index li{border-bottom:1px solid var(--line)}
.index a{display:block;padding:1rem 0;color:var(--text);text-decoration:none}
.index a:hover b{text-decoration:underline}
.index b{font-size:1.25rem;font-variation-settings:"wdth" 82;letter-spacing:-.01em;display:block}
.index span{color:var(--muted)}

/* footer */
.foot{background:var(--ink);color:#C9CFEE;padding-block:2.6rem 3rem;font-size:.95rem}
.foot a{color:#fff}
.foot-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem}
.foot h2{font-size:1rem;color:#fff;margin-bottom:.6rem}
.foot ul{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.foot ul a{text-decoration:none}
.foot ul a:hover{text-decoration:underline}
.foot-legal{margin-top:2rem;padding-top:1.4rem;border-top:1px solid #30377A;max-width:80ch}
.foot-legal{display:grid;gap:.8rem}

@media (max-width:900px){
  .read{grid-template-columns:minmax(0,1fr)}
  .read>.side,.read>.body{grid-column:1;grid-row:auto}
  .side{position:static;max-height:none}
  .toc[open] ol{max-height:none}
  .toc summary h2{text-align:left;font-size:1.1rem}
  .toc summary h2::after{content:" +";color:#4A5072}
  .toc[open] summary h2::after{content:" −"}
  .top nav{margin-left:0;width:100%;gap:1.3rem;overflow-x:auto;white-space:nowrap}
  .guilloche{right:-520px;top:-360px;opacity:.2}
  .foot-cols{grid-template-columns:1fr 1fr}
}
@media (max-width:520px){.foot-cols{grid-template-columns:1fr}.body{font-size:1.08rem}}
@media (prefers-reduced-motion:reduce){.guilloche{animation:none}html{scroll-behavior:auto}}
@media print{.hero{background:none;color:#000}.hero a,.crumbs,.crumbs a,.meta,.band .lede{color:#000}.guilloche,.top nav,.side,.related,.foot,.copy{display:none}.read{display:block}.calc,.slip{-webkit-mask:none;mask:none;border:1px solid #000}body{background:#fff}}
