:root{
  --blue-fill:#DAE8FC;  --blue-line:#6C8EBF;
  --yellow-fill:#FFF2CC; --yellow-line:#D6B656;
  --green-fill:#D5E8D4;  --green-line:#82B366;
  --purple-fill:#E1D5E7; --purple-line:#9673A6;
  --orange-fill:#FFE6CC; --orange-line:#D79B00;
  --gray-fill:#F5F5F5;   --gray-line:#999999;
  --ink:#1a1a2e; --paper:#fffffe; --muted:#6a6a80;
  --rule:#eaeaf0;
  --measure:42rem;   /* distill-style reading column */
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{margin:0;background:var(--paper);color:#222232;
  font-family:'Georgia','Times New Roman',serif;line-height:1.7;-webkit-font-smoothing:antialiased;
  font-size:18px;}
a{color:#2f4b86;text-decoration:none;border-bottom:1px solid rgba(47,75,134,0.25);}
a:hover{border-bottom-color:#2f4b86;}

/* reading column, distill-like */
.col{max-width:var(--measure);margin:0 auto;padding:0 1.5rem;}
.wide{max-width:64rem;margin:0 auto;padding:0 1.5rem;}

/* ---------- hero ---------- */
#page{display:flex;flex-direction:column;min-height:100vh;}
header.hero{padding:7vh 1.5rem 3vh;flex:0 0 auto;text-align:center;}
header.hero .htop{max-width:50rem;margin:0 auto;}
header.hero h1{font-size:clamp(1.8rem,4vw,3.1rem);line-height:1.08;margin:0 0 .7em;font-weight:700;letter-spacing:-.015em;}
.authors{font-size:1rem;color:#3a3a52;margin:0 auto .35em;line-height:1.5;max-width:44rem;}
.affil{font-size:.85rem;color:var(--muted);font-style:italic;margin:0 auto 1.4em;max-width:40rem;}
.btns{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center;}
.btns a{font-family:'Courier New',monospace;font-size:.82rem;color:var(--ink);border:1px solid var(--ink);
  border-radius:6px;padding:.45rem 1rem;transition:all .15s;background:none;}
.btns a:hover{background:var(--ink);color:#fff;border-bottom-color:var(--ink);}
#grid{flex:1 1 auto;position:relative;min-height:420px;}
#cv{position:absolute;inset:0;width:100%;height:100%;display:block;}
.hot{position:absolute;cursor:pointer;}
.cap{position:absolute;left:50%;bottom:13%;transform:translateX(-50%);width:80%;max-width:340px;text-align:center;
  font-family:'Georgia',serif;font-size:clamp(.85rem,1.3vw,1.02rem);line-height:1.35;color:var(--ink);
  background:rgba(255,255,254,0.93);border-radius:8px;padding:.6rem .8rem;opacity:0;transition:opacity .25s;
  pointer-events:none;box-shadow:0 4px 20px rgba(26,26,46,.10);}
#err{position:fixed;left:0;right:0;bottom:0;z-index:9999;font-family:'Courier New',monospace;font-size:12px;
  color:#fff;background:#9b2226;padding:10px 14px;white-space:pre-wrap;display:none;}

/* ---------- prose sections ---------- */
section{padding:3.2rem 0;}
section + section{border-top:1px solid var(--rule);}
h2{font-size:1.6rem;line-height:1.2;margin:0 0 1.1rem;font-weight:700;letter-spacing:-.01em;}
h3{font-size:1.1rem;margin:2rem 0 .4rem;font-weight:700;}
p{margin:0 0 1.1rem;}
.col p, .col li{font-size:1.02rem;}
em.term{font-style:normal;font-weight:700;}
figure{margin:2rem 0 .5rem;}
figcaption{font-size:.82rem;color:var(--muted);margin-top:.7rem;line-height:1.5;text-align:center;}
.fignote{font-size:.8rem;color:var(--muted);font-style:italic;}

/* widgets */
.widget{width:100%;border:1px solid var(--rule);border-radius:10px;background:#fff;}
.widget--interactive{position:relative;}
canvas.w{display:block;width:100%;}

/* samples */
.tabs{display:flex;gap:.35rem;flex-wrap:wrap;margin:1.4rem 0 0;}
.tab{font-family:'Courier New',monospace;font-size:.76rem;padding:.34rem .7rem;border:1px solid var(--rule);
  border-radius:6px;background:#fff;cursor:pointer;color:var(--muted);}
.tab.on{background:var(--ink);color:#fff;border-color:var(--ink);}
.sample{margin-top:1rem;border:1px solid var(--rule);border-radius:10px;padding:1.4rem 1.5rem;background:#fff;}
.sample .topic{font-family:'Courier New',monospace;font-size:.72rem;color:var(--orange-line);text-transform:uppercase;letter-spacing:.07em;}
.sample h3{margin:.4rem 0 .7rem;font-size:1.05rem;}
.sample .q{font-size:.97rem;color:#33334a;line-height:1.65;}

/* scatter tooltip */
.tip{position:absolute;pointer-events:none;background:var(--ink);color:#fff;font-family:'Courier New',monospace;
  font-size:.72rem;padding:.3rem .5rem;border-radius:5px;opacity:0;transform:translate(-50%,-130%);white-space:nowrap;transition:opacity .1s;}

pre.bib{background:#1a1a2e;color:#e8e8f4;border-radius:10px;padding:1.2rem 1.4rem;overflow-x:auto;
  font-family:'Courier New',monospace;font-size:.8rem;line-height:1.5;margin:0;}
.venue{font-family:'Courier New',monospace;font-size:.86rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--orange-line);margin:0 0 .9em;}
.bibwrap{position:relative;}
.copybtn{position:absolute;top:.7rem;right:.7rem;width:32px;height:32px;display:inline-flex;
  align-items:center;justify-content:center;border:none;border-radius:7px;cursor:pointer;
  background:rgba(255,255,255,0.10);color:#e8e8f4;opacity:0;transition:opacity .15s,background .15s;}
.bibwrap:hover .copybtn{opacity:1;}
.copybtn:hover{background:rgba(255,255,255,0.20);}
.copybtn.copied{color:var(--green-line);background:rgba(130,179,102,0.18);opacity:1;}
/* keep the button reachable on touch devices that have no hover */
@media(hover:none){ .copybtn{opacity:.7;} }

/* acknowledgments */
.acklogos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.4rem;margin:1.4rem 0 .2rem;align-items:center;}
.acklogo{min-height:70px;display:flex;align-items:center;justify-content:center;border:0;padding:0;}
.acklogo:hover{border-bottom-color:transparent;}
.acklogo img{display:block;max-width:100%;max-height:48px;width:auto;height:auto;}
.acklogo--idai img{max-height:62px;}
.acklogo--epsrc img{max-height:58px;}
.acklogo--microsoft img{max-height:44px;}

/* float-right data table that prose wraps around */
figure.float-tbl{float:right;width:300px;max-width:46%;margin:.3rem 0 1rem 1.8rem;}
#validation .col p{text-align:justify;}
table.data{width:100%;border-collapse:collapse;font-family:Georgia,serif;font-size:.9rem;}
table.data caption{caption-side:top;text-align:left;font-size:.82rem;color:var(--muted);font-style:italic;padding-bottom:.5rem;}
table.data thead th{font-weight:400;font-size:.74rem;letter-spacing:.02em;color:var(--muted);
  text-align:right;padding:.3rem .5rem;border-bottom:1.5px solid var(--ink);}
table.data thead th:first-child{text-align:left;}
table.data tbody td{padding:.34rem .5rem;text-align:right;border-bottom:1px solid var(--rule);
  font-variant-numeric:tabular-nums;}
table.data tbody td:first-child{text-align:left;}
table.data tbody tr:last-child td{border-bottom:1.5px solid var(--ink);}
figure.float-tbl figcaption{text-align:left;margin-top:.6rem;}
@media(max-width:620px){
  figure.float-tbl{float:none;width:100%;max-width:none;margin:1rem 0 1.4rem;}
  #validation .col p{text-align:left;}
}

/* ---------- responsive ---------- */
/* tablet and below */
@media(max-width:820px){
  body{font-size:17px;}
  header.hero{padding:5vh 1.2rem 2.4vh;}
  section{padding:2.6rem 0;}
  h2{font-size:1.4rem;}
}
/* phone */
@media(max-width:620px){
  body{font-size:16px;}
  header.hero{padding:4vh 1rem 2vh;}
  header.hero h1{font-size:clamp(1.5rem,7vw,2rem);}
  .authors{font-size:.86rem;}
  .affil{font-size:.76rem;}
  .btns{gap:.45rem;}
  .btns a{font-size:.76rem;padding:.4rem .8rem;}
  /* four stacked panels need height; canvas fills a taller grid */
  #page{min-height:auto;display:block;}
  #grid{flex:none;min-height:0;height:128vw;max-height:680px;}
  .col,.wide{padding:0 1.15rem;}
  h2{font-size:1.28rem;}
  .col p,.col li{font-size:1rem;}
  .cap{font-size:.9rem;width:86%;bottom:8%;}
  /* the asymmetry/idea split, samples, etc. already use the reading column */
  .tabs{gap:.3rem;}
  .tab{font-size:.72rem;padding:.32rem .6rem;}
  .sample{padding:1.1rem 1.1rem;}
  .acklogos{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;}
  .acklogo{min-height:64px;}
  .acklogo img{max-height:42px;}
  .acklogo--idai img{max-height:54px;}
  .acklogo--epsrc img{max-height:50px;}
  pre.bib{font-size:.72rem;padding:1rem 1.1rem;}
  figcaption{font-size:.78rem;}
}
/* very small */
@media(max-width:380px){
  header.hero h1{font-size:1.4rem;}
  #grid{height:140vw;}
}
/* respect reduced-motion: the hero/widgets still render a frame, just don't autoplay-cycle aggressively */
@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto;}
}

@supports (content-visibility:auto){
  section{
    content-visibility:auto;
    contain-intrinsic-size:620px;
  }
}
