/* DNSite loader styles -- shared by index.html (the loader) and make.html (the builder) */
:root{
  --bg:#f6f3ec; --ink:#1d1a16; --muted:#6b6459; --rule:#e2dccf; --card:#fffdf8;
  --accent:#1f6feb; --accent-ink:#fff;
  --c1:#1f6feb; --c2:#d9480f; --c3:#2b8a3e; --c4:#862e9c; --c5:#e67700; --c6:#0b7285; --c7:#c2255c; --c8:#5c7cfa;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --measure:46rem;
}
[data-theme="ink"]{--bg:#14120f;--ink:#efe9dd;--muted:#a39b8c;--rule:#2b2721;--card:#1c1915;}
[data-theme="slate"]{--bg:#eef2f6;--ink:#14202e;--muted:#5b6b7d;--rule:#d4dde8;--card:#fff;}
[data-theme="paper"]{--bg:#f6f3ec;--ink:#1d1a16;--muted:#6b6459;--rule:#e2dccf;--card:#fffdf8;}
@media (prefers-color-scheme: dark){
  :root:not([data-theme]){--bg:#14120f;--ink:#efe9dd;--muted:#a39b8c;--rule:#2b2721;--card:#1c1915;}
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.6 var(--serif);}
.dnsite-root{background:var(--bg);color:var(--ink);font:17px/1.6 var(--serif)}
a{color:var(--accent)}
main{max-width:var(--measure);margin:0 auto;padding:0 16px 6rem}
header.site{padding:4rem 0 2rem;border-bottom:1px solid var(--rule);margin-bottom:2rem}
header.site h1{font-size:clamp(2.2rem,6vw,3.6rem);line-height:1.05;margin:0 0 .6rem;letter-spacing:-.01em}
header.site .tagline{font-size:1.25rem;color:var(--muted);margin:0}
header.site .byline{font:14px/1.5 var(--sans);color:var(--muted);margin-top:1rem}
section{margin:0 0 3rem}
h2{font-size:1.7rem;line-height:1.2;margin:2.5rem 0 1rem;letter-spacing:-.01em}
h3{font-size:1.2rem;margin:1.8rem 0 .6rem}
p{margin:0 0 1rem}
hr{border:0;border-top:1px solid var(--rule);margin:2.5rem 0}
figure{margin:1.6rem 0 2rem;padding:1rem 1rem .6rem;background:var(--card);border:1px solid var(--rule);border-radius:12px;font-family:var(--sans)}
figure figcaption{font-weight:600;font-size:1.02rem;margin:0 0 .6rem;line-height:1.3}
figure .note{color:var(--muted);font-size:.85rem;margin:.5rem 0 0}
figure svg{display:block;width:100%;height:auto;overflow:visible}
figure .bar{fill:var(--accent)}
figure .axis text,figure .lbl{font-size:11px;fill:var(--muted)}
figure .axis line,figure .axis path{stroke:var(--rule);stroke-width:1}
figure .grid line{stroke:var(--rule)}
figure .val{font-size:11px;fill:var(--ink);font-weight:600}
figure .series{fill:none;stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
figure .dot{stroke:var(--card);stroke-width:1}
figure .legend{display:flex;flex-wrap:wrap;gap:.3rem 1rem;font-size:.82rem;color:var(--muted);margin:.5rem 0 0}
figure .legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:.35rem;vertical-align:-1px}
figure .tools{display:flex;gap:.6rem;align-items:center;margin-top:.5rem;font-size:.8rem}
figure button{font:inherit;color:var(--muted);background:none;border:1px solid var(--rule);border-radius:999px;padding:.15rem .7rem;cursor:pointer;min-height:32px}
figure button:hover{color:var(--ink)}
figure table{border-collapse:collapse;width:100%;font-size:.86rem;margin-top:.4rem}
figure th,figure td{text-align:left;padding:.35rem .5rem;border-bottom:1px solid var(--rule);vertical-align:top}
figure td.num,figure th.num{text-align:right;font-variant-numeric:tabular-nums}
figure .tbl{max-height:22rem;overflow:auto}
figure .slider{display:flex;align-items:center;gap:.8rem;margin:.4rem 0 .6rem;font-size:.9rem}
figure .slider input{flex:1;accent-color:var(--accent);min-height:32px}
figure .slider output{font-weight:700;font-variant-numeric:tabular-nums;min-width:3.2em;text-align:right}
figure svg.map{overflow:hidden}
figure .map path.land{fill:var(--rule);stroke:var(--card);stroke-width:.4}
figure .map path.graticule{fill:none;stroke:var(--rule);stroke-width:.3;opacity:.7}
figure .map .arc{fill:none;stroke:var(--accent);opacity:.5;stroke-linecap:round;transition:opacity .15s}
figure .map .arc:hover{opacity:1}
figure .map .maplbl{font-family:var(--sans);font-weight:600;pointer-events:none}
figure .map .node{fill:var(--accent);stroke:var(--card);stroke-width:.8;opacity:.85}
figure .map .origin{fill:var(--c2)}
figure .map .ramp rect{stroke:none}
.bignumber{display:flex;gap:2rem;flex-wrap:wrap;align-items:baseline}
.bignumber .n{font-size:clamp(2.4rem,8vw,4rem);font-weight:700;letter-spacing:-.02em;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums}
.bignumber .l{font-size:1rem;color:var(--muted);max-width:20rem}
.waffle{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;max-width:260px}
.waffle i{aspect-ratio:1;border-radius:2px;background:var(--rule)}
.timeline{list-style:none;padding:0;margin:0;border-left:2px solid var(--rule)}
.timeline li{position:relative;padding:0 0 1.2rem 1.4rem}
.timeline li::before{content:"";position:absolute;left:-7px;top:.45rem;width:12px;height:12px;border-radius:50%;background:var(--accent);border:2px solid var(--card)}
.timeline b{display:block;font-size:.8rem;color:var(--muted);font-family:var(--sans);text-transform:uppercase;letter-spacing:.06em}
.svgimg{margin:1.6rem 0}
.svgimg svg{max-width:100%;height:auto}
footer.site{margin-top:4rem;padding-top:1.5rem;border-top:1px solid var(--rule);font:13px/1.6 var(--sans);color:var(--muted)}
footer.site code{font-family:var(--mono);background:var(--card);border:1px solid var(--rule);padding:.1em .4em;border-radius:4px;word-break:break-all}
.status{font:15px/1.5 var(--sans);color:var(--muted);padding:6rem 0;text-align:center}
.status .bar{height:4px;background:var(--rule);border-radius:2px;max-width:20rem;margin:1rem auto 0;overflow:hidden}
.status .bar i{display:block;height:100%;background:var(--accent);width:0;transition:width .2s}
.status.err{color:var(--ink);text-align:left;padding:3rem 0}
.status.err code{display:block;font-family:var(--mono);font-size:13px;background:var(--card);border:1px solid var(--rule);padding:.6rem .8rem;border-radius:8px;margin-top:.6rem;white-space:pre-wrap}
.reveal{opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .5s ease}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){.reveal{opacity:1;transform:none;transition:none}}

/* posts (blog) */
section.post{margin-top:3.5rem}
section.post header h2{margin:0 0 .2rem}
section.post header h2 a{color:inherit;text-decoration:none}
section.post header h2 a:hover{text-decoration:underline}
section.post header time,.posts time{display:block;font:13px/1.5 var(--sans);color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
section.post header{margin-bottom:1rem}
ol.posts{list-style:none;padding:0;margin:0 0 2rem}
ol.posts li{padding:.9rem 0;border-bottom:1px solid var(--rule)}
ol.posts li a{font-size:1.25rem;font-weight:600;text-decoration:none}
ol.posts li a:hover{text-decoration:underline}
ol.posts li p{margin:.25rem 0 0;color:var(--muted);font-size:.95rem}
/* images, inline or from anywhere */
figure.img{margin:1.6rem 0;padding:0;background:none;border:0;border-radius:0;font-family:var(--sans)}
figure.img img,figure.img svg{display:block;max-width:100%;height:auto;border-radius:6px}
figure.img.align-center{margin-left:auto;margin-right:auto}
figure.img.align-full{width:100%!important}
figure.img.align-left{float:left;max-width:50%;margin:.3rem 1.4rem .8rem 0}
figure.img.align-right{float:right;max-width:50%;margin:.3rem 0 .8rem 1.4rem}
figure.img figcaption{font-weight:400;font-size:.85rem;color:var(--muted);margin:.5rem 0 0;line-height:1.4}
section::after{content:"";display:block;clear:both}
/* embeds */
figure.embed{padding:0;border:0;background:none;border-radius:0}
figure.embed iframe{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:10px;background:var(--rule)}
figure.embed.square iframe{aspect-ratio:1}
figure.embed.tall iframe{aspect-ratio:9/16;max-width:360px;margin:0 auto}
figure.embed.music iframe{aspect-ratio:auto;height:450px}
figure.embed.track iframe{aspect-ratio:auto;height:175px}
figure.embed figcaption{font-weight:400;font-size:.85rem;color:var(--muted);margin:.5rem 0 0}
/* pull quotes */
blockquote.pull{margin:2rem 0;padding:0 0 0 1.2rem;border-left:4px solid var(--accent)}
blockquote.pull p{font-size:1.45rem;line-height:1.35;letter-spacing:-.01em;margin:0}
blockquote.pull cite{display:block;margin-top:.6rem;font:13px/1.5 var(--sans);color:var(--muted);font-style:normal}
@media (max-width:600px){figure.img.align-left,figure.img.align-right{float:none;max-width:100%;margin:1.6rem 0}}

/* ---------- themes: journal (papers), newsroom (journalism), fieldnotes (kraft + Futura) ---------- */
[data-theme="journal"]{--bg:#fbfaf7;--ink:#111;--muted:#555;--rule:#d8d6d0;--card:#fff;--accent:#1a4b8c;--serif:"Charter","Bitstream Charter","Source Serif Pro","Iowan Old Style",Georgia,serif;--measure:42rem}
[data-theme="journal"] body,[data-theme="journal"].dnsite-root{font-size:16.5px;line-height:1.55}
[data-theme="journal"] header.site h1{font-size:clamp(1.8rem,4.5vw,2.5rem);font-weight:700;line-height:1.15}
[data-theme="journal"] header.site .tagline{font-size:1.05rem}
[data-theme="journal"] h2{font-size:1.25rem;margin-top:2.2rem}
[data-theme="journal"] h3{font-size:1.05rem;font-style:italic;font-weight:600}
[data-theme="journal"] figure{border-radius:2px;background:var(--bg)}
[data-theme="journal"] figure figcaption{font-family:var(--serif);font-weight:400;font-size:.92rem}
[data-theme="journal"] .figno{font-weight:700}

[data-theme="newsroom"]{--bg:#fff;--ink:#121212;--muted:#5a5a5a;--rule:#e2e2e2;--card:#fafafa;--accent:#c00;--serif:"Georgia","Iowan Old Style","Times New Roman",serif;--measure:40rem}
[data-theme="newsroom"] header.site h1{font-family:var(--sans);font-weight:800;letter-spacing:-.03em;font-size:clamp(2.4rem,7vw,4rem);line-height:1}
[data-theme="newsroom"] header.site .tagline{font-family:var(--sans);font-weight:400;font-size:1.2rem;color:var(--ink)}
[data-theme="newsroom"] header.site .byline{text-transform:uppercase;letter-spacing:.08em;font-size:12px}
[data-theme="newsroom"] h2{font-family:var(--sans);font-weight:800;letter-spacing:-.02em;font-size:1.6rem}
[data-theme="newsroom"] h3{font-family:var(--sans);font-weight:700}
[data-theme="newsroom"] section>h2+p::first-letter,[data-theme="newsroom"] header.site+section>p:first-of-type::first-letter{float:left;font-family:var(--sans);font-weight:800;font-size:3.6em;line-height:.8;padding:.08em .12em 0 0}
[data-theme="newsroom"] blockquote.pull{border-left:0;border-top:3px solid var(--ink);border-bottom:1px solid var(--rule);padding:1rem 0;text-align:center}
[data-theme="newsroom"] blockquote.pull p{font-family:var(--sans);font-weight:700;font-size:1.6rem}
[data-theme="newsroom"] figure{border:0;border-top:1px solid var(--ink);border-radius:0;padding-left:0;padding-right:0;background:none}
[data-theme="newsroom"] figure.img{border:0}

[data-theme="fieldnotes"]{--bg:#d9c29a;--ink:#2a1d12;--muted:#6a553d;--rule:#b99c6e;--card:#e7d5b3;--accent:#b83a1e;--accent-ink:#fff;
  --c1:#b83a1e;--c2:#2a5d8a;--c3:#4f6b2f;--c4:#6b3f8a;--c5:#c77d12;--c6:#1f6f73;--c7:#8a2a4a;--c8:#3f4f8a;
  --serif:"Futura","Futura PT","Jost","Avenir Next","Century Gothic","Trebuchet MS",sans-serif;--sans:"Futura","Futura PT","Jost","Avenir Next","Century Gothic",sans-serif;--measure:44rem}
[data-theme="fieldnotes"] body,[data-theme="fieldnotes"].dnsite-root{font-size:16px;line-height:1.6;
  background-color:var(--bg);background-image:radial-gradient(rgba(255,255,255,.14) 1px,transparent 1px),radial-gradient(rgba(60,35,10,.12) 1px,transparent 1px);background-size:7px 7px,11px 11px;background-position:0 0,3px 5px}
[data-theme="fieldnotes"] header.site{border-bottom:3px double var(--ink);padding-top:3rem}
[data-theme="fieldnotes"] header.site h1{text-transform:uppercase;letter-spacing:.06em;font-weight:700;font-size:clamp(1.9rem,5vw,2.9rem);line-height:1.05}
[data-theme="fieldnotes"] header.site .tagline{text-transform:uppercase;letter-spacing:.14em;font-size:.85rem;font-weight:600;color:var(--muted)}
[data-theme="fieldnotes"] header.site .byline{display:inline-block;border:2px solid var(--accent);color:var(--accent);padding:.15rem .5rem;text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:700;transform:rotate(-1.5deg);border-radius:3px}
[data-theme="fieldnotes"] h2{text-transform:uppercase;letter-spacing:.1em;font-size:1.05rem;font-weight:700;border-bottom:1.5px solid var(--ink);padding-bottom:.3rem;margin-top:2.6rem}
[data-theme="fieldnotes"] h3{text-transform:uppercase;letter-spacing:.08em;font-size:.85rem;font-weight:700;color:var(--muted)}
[data-theme="fieldnotes"] p{background-image:linear-gradient(transparent calc(1.6em - 1px),rgba(42,29,18,.12) 0);background-size:100% 1.6em;background-attachment:local}
[data-theme="fieldnotes"] figure,[data-theme="fieldnotes"] .abstract,[data-theme="fieldnotes"] .result{--card:#fbf8f1;background:#fbf8f1;border:1.5px solid var(--ink);border-radius:4px;box-shadow:3px 3px 0 var(--rule);
  background-image:linear-gradient(rgba(42,29,18,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(42,29,18,.08) 1px,transparent 1px);background-size:12px 12px}
[data-theme="fieldnotes"] figure p,[data-theme="fieldnotes"] blockquote.pull p,[data-theme="fieldnotes"] .abstract p{background-image:none}
[data-theme="fieldnotes"] figure .bar{fill:var(--accent)}
[data-theme="fieldnotes"] figure .grid line{stroke:rgba(42,29,18,.25)}
[data-theme="fieldnotes"] figure .axis text,[data-theme="fieldnotes"] figure .lbl{fill:#4a3a28}
[data-theme="fieldnotes"] figure th,[data-theme="fieldnotes"] figure td{border-bottom-color:rgba(42,29,18,.25)}
[data-theme="fieldnotes"] figure .map path.land{fill:#e4d7bd;stroke:#fbf8f1}
[data-theme="fieldnotes"] .bignumber{background:#fbf8f1;border:1.5px solid var(--ink);border-radius:4px;box-shadow:3px 3px 0 var(--rule);padding:1rem 1.2rem}
[data-theme="fieldnotes"] figure figcaption{text-transform:uppercase;letter-spacing:.08em;font-size:.8rem}
[data-theme="fieldnotes"] figure button{border-color:var(--ink);color:var(--ink);text-transform:uppercase;font-size:.7rem;letter-spacing:.08em}
[data-theme="fieldnotes"] section.post header time,[data-theme="fieldnotes"] .posts time{font-weight:700;color:var(--accent)}
[data-theme="fieldnotes"] ol.posts li a{text-transform:uppercase;letter-spacing:.06em;font-size:1rem}
[data-theme="fieldnotes"] hr{border-top:3px double var(--ink)}
[data-theme="fieldnotes"] blockquote.pull{border-left:0;border:1.5px dashed var(--ink);padding:1rem 1.2rem;background:#fbf8f1;transform:rotate(-.6deg)}
[data-theme="fieldnotes"] blockquote.pull p{font-size:1.15rem;text-transform:uppercase;letter-spacing:.04em;font-weight:700}
[data-theme="fieldnotes"] footer.site{border-top:3px double var(--ink);text-transform:uppercase;letter-spacing:.06em;font-size:11px}
[data-theme="fieldnotes"] .bignumber .n{font-weight:700}

/* ---------- paper blocks ---------- */
.abstract{margin:1.5rem 0 2rem;padding:1rem 1.2rem;border-left:3px solid var(--accent);background:var(--card)}
.abstract h3{margin:0 0 .4rem;font:700 12px/1.4 var(--sans);text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}
.abstract p{margin:0;font-size:.97rem}
.abstract .keywords{margin-top:.6rem;font-size:.88rem;color:var(--muted)}
.authors{margin:-.6rem 0 1.5rem;font-family:var(--sans)}
.authors .names{font-size:1.05rem;margin:0 0 .25rem}
.authors .names sup,.authors .affs sup{font-size:.7em;color:var(--accent);margin-left:1px}
.authors .affs{font-size:.85rem;color:var(--muted);margin:0 0 .25rem;display:flex;flex-wrap:wrap;gap:.2rem 1rem}
.authors .doi{font-size:.85rem;color:var(--muted);margin:0}
.math{margin:1.2rem 0;overflow-x:auto;font-size:1.15em;text-align:center;position:relative;padding:.3rem 2.5rem}
.math .eqno{position:absolute;right:0;top:50%;transform:translateY(-50%);font:14px/1 var(--sans);color:var(--muted)}
code.math{font-family:var(--mono);background:var(--card);border:1px solid var(--rule);border-radius:4px;padding:.1em .3em}
.figno{color:var(--accent);font-weight:700}
a.cite,a.figref{text-decoration:none;font-weight:600}
sup.fn a{text-decoration:none;font-weight:600;padding:0 .1em}
ol.references{padding-left:1.6rem;font-size:.92rem;line-height:1.5}
ol.references li{margin:0 0 .5rem;padding-left:.2rem}
ol.references li:target,ol.footnotes li:target{background:var(--card);outline:2px solid var(--accent);outline-offset:4px;border-radius:3px}
ol.footnotes{margin:2.5rem 0 0;padding:1rem 0 0 1.4rem;border-top:1px solid var(--rule);font-size:.88rem;color:var(--muted)}
ol.footnotes li{margin:0 0 .35rem}
.fnback{text-decoration:none}
figure.img figcaption .credit{display:block;text-align:right;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;margin-top:.2rem}
figure .annot text{font-size:10px}
