/* zerosofzeta.com: the shared base for every page.
   Fonts, colour tokens, type, and the few parts every page reuses: glyphs, buttons,
   tabs, bands, tables, the footer tessellation and the link home.
   A page links this first, then its own stylesheet. The design language behind
   these rules is written down in /AGENTS.md: read that before changing anything here. */

/* ---- fonts: served from ./fonts (SIL Open Font License; see fonts/OFL-*.txt) ---- */
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/jetbrains-mono-greek.woff2) format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/jetbrains-mono-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Jost';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/jost-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Jost';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/jost-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---- colour: three primaries, ink and paper. Nothing else. ----
   blue  = known, learned, positive, "the thing that works"
   red   = the thing to look at: loss, error, negative, the surprise
   yellow= happening now: the current step, the highlighted cell */
:root{
  color-scheme:light dark;
  --bg:light-dark(#ffffff,#121212);
  --ink:light-dark(#111111,#f2f0ea);
  --mute:light-dark(#585858,#a9a69f);
  --rule:light-dark(#d6d3cc,#383838);
  --soft:light-dark(#f2f0ea,#1f1f1f);
  --blue:light-dark(#1f4fa8,#5f93ea);
  --red:light-dark(#e1261c,#ff5b4f);
  --yellow:light-dark(#f6c200,#ffd21f);
  --pos:var(--blue);--neg:var(--red);--yel:var(--yellow);
  --plate:color-mix(in srgb,var(--blue) 9%,var(--bg));
  --sans:Jost,"Futura","Century Gothic",system-ui,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,monospace;
}
:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark}

/* ---- type: Jost for words, JetBrains Mono for code and numbers; headings in lowercase ---- */
*{box-sizing:border-box;min-width:0}
html{scroll-padding-top:80px}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.55 var(--sans);overflow-x:clip}
h1,h2,h3{font-weight:700;letter-spacing:-.02em;line-height:1.02;margin:0}
h1{font-size:clamp(38px,5vw,62px);text-wrap:balance}
h2{font-size:clamp(28px,3vw,40px);text-wrap:balance;margin-bottom:18px;display:flex;gap:14px;align-items:center}
h3{font-size:19px;letter-spacing:-.01em;line-height:1.2}
p{margin:0 0 12px}
b{font-weight:600}
a{color:inherit;text-decoration-thickness:2px;text-underline-offset:3px}
a:hover{color:var(--red)}
code,.mono{font-family:var(--mono);font-size:.88em}
.wrap{max-width:1420px;margin:0 auto;padding-inline:max(16px,3vw)}
.note{font-size:14px;color:var(--mute);line-height:1.4}
.kicker{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0 0 8px;font-size:14px;font-weight:500;color:var(--mute)}
.scroll{overflow-x:auto}
.num{font-variant-numeric:tabular-nums}

/* ---- glyphs: the only ornaments are circle, square, triangle (and halves of them) ---- */
.g{display:inline-block;width:18px;height:18px;flex:none;background:var(--ink)}
.g.ci{border-radius:50%}
.g.tr{clip-path:polygon(50% 0,100% 100%,0 100%)}
.g.hc{height:9px;border-radius:9px 9px 0 0;align-self:center}
.g.hf{border-radius:50%;background:linear-gradient(90deg,var(--ink) 50%,transparent 50%);box-shadow:inset 0 0 0 2.5px var(--ink)}
.g.ob{background:transparent;box-shadow:inset 0 0 0 3px var(--ink)}
.g.blu{background:var(--blue)}.g.red{background:var(--red)}.g.yel{background:var(--yellow)}
.g.dash{background:transparent;border:2px dashed var(--mute)}
h2 .g{width:28px;height:28px}

/* ---- buttons and tabs ---- */
.b{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border:2px solid var(--ink);background:var(--bg);color:var(--ink);border-radius:0;font:500 16px/1 var(--sans);cursor:pointer;white-space:nowrap;text-decoration:none}
.b:hover{background:var(--soft);color:var(--ink)}
.b.pri{background:var(--ink);color:var(--bg)}
.b.pri:hover{opacity:.86;color:var(--bg)}
.b.red{background:var(--red);border-color:var(--red);color:#fff}
.b.round{width:84px;height:84px;border-radius:50%;padding:0;font-size:17px;font-weight:600;white-space:normal;line-height:1.05}
.b:disabled{opacity:.3;cursor:default}
.b.sm{min-height:40px;padding:0 12px;font-size:15px}
.b.on{background:var(--yellow);color:#111;border-color:var(--ink)}
a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.btns{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.seg{display:inline-flex;flex-wrap:wrap;border:2px solid var(--ink)}
.seg button{flex:1 1 auto;min-height:42px;border:0;padding:0 16px;background:none;color:var(--ink);font:500 16px var(--sans);cursor:pointer}
.seg button+button{border-left:2px solid var(--ink)}
.seg button[aria-selected=true]{background:var(--ink);color:var(--bg)}
input[type=range]{width:180px;accent-color:var(--red);height:28px}

/* ---- big structure: 3px rules between bands, prose at a readable measure ---- */
.top{border-bottom:3px solid var(--ink)}
.band{padding-block:clamp(32px,4vw,64px);border-top:3px solid var(--ink)}
.cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:26px 52px;align-items:start}
.prose{max-width:38em}
.prose a{color:var(--blue)}
.prose a:hover{color:var(--red)}
.tbl{border-collapse:collapse;width:100%;font-size:16px}
.tbl th{text-align:left;font-weight:600;padding:8px 10px 6px 0;border-bottom:2px solid var(--ink);vertical-align:bottom}
.tbl td{padding:8px 10px 8px 0;border-bottom:1px solid var(--rule);vertical-align:top}
.tbl td.n,.tbl th.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}

/* ---- the way home: every page links back to the map ---- */
.home{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:var(--mute);text-decoration:none}
.home:hover{color:var(--ink)}
.home i{display:inline-block;width:10px;height:10px;background:var(--ink)}
.home i:nth-child(1){border-radius:50%;background:var(--blue)}
.home i:nth-child(2){background:var(--red)}
.home i:nth-child(3){clip-path:polygon(50% 0,100% 100%,0 100%);background:var(--yellow)}

/* ---- footer: a regular division of the plane, then one line of small print ---- */
footer.site{padding-block:0 28px}
.tess{display:block;width:100%;height:52px;border-top:3px solid var(--ink);border-bottom:3px solid var(--ink);margin-bottom:20px}
.foot{display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;justify-content:space-between}

@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
