/* Toate scrierile lumii / Every script on Earth
   Palette from the materials of writing: lampblack and gesso, bone and carbon ink,
   cinnabar rubric, bronze verdigris, lapis, unfired clay. */
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:300;font-display:swap;src:url(fonts/source-serif-4-latin-300-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:300;font-display:swap;src:url(fonts/source-serif-4-latin-ext-300-normal.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/source-serif-4-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/source-serif-4-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Source Serif 4";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/source-serif-4-latin-400-italic.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/source-serif-4-latin-ext-400-italic.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/source-serif-4-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/source-serif-4-latin-ext-600-normal.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Noto Sans";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/noto-sans-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Noto Sans";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/noto-sans-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root{
  --ground:#0F1113; --ground-2:#16191C; --ink:#ECE8DF; --ink-2:#C9C4BA; --muted:#A7ACB1;
  --rubric:#F28B78; --verdigris:#6FB8A5; --lapis:#9AB0EA; --clay:#8A8F94; --rule:#2A2F34;
  --glyph:#ECE8DF; --glyph-dead:#8A8F94; --focus:#9AB0EA;
  --serif:"Source Serif 4",Georgia,"Times New Roman",serif;
  --sans:"Noto Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  color-scheme:dark;
}
:root[data-theme="light"]{
  --ground:#F0F2EE; --ground-2:#E4E7E2; --ink:#14171A; --ink-2:#2B3035; --muted:#4A5056;
  --rubric:#8A1E12; --verdigris:#1B5549; --lapis:#243C85; --clay:#5C6166; --rule:#C9CEC8;
  --glyph:#14171A; --glyph-dead:#5C6166; --focus:#243C85;
  color-scheme:light;
}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]){
    --ground:#F0F2EE; --ground-2:#E4E7E2; --ink:#14171A; --ink-2:#2B3035; --muted:#4A5056;
    --rubric:#8A1E12; --verdigris:#1B5549; --lapis:#243C85; --clay:#5C6166; --rule:#C9CEC8;
    --glyph:#14171A; --glyph-dead:#5C6166; --focus:#243C85; color-scheme:light;
  }
}
[hidden]{display:none!important} svg[hidden]{display:none!important}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:auto}
body{margin:0;overflow-x:clip;background:var(--ground);color:var(--ink);font-family:var(--serif);font-size:clamp(18px,1.05vw + 12px,20px);line-height:1.6;font-feature-settings:"onum" 0}
a{color:var(--ink);text-decoration-color:var(--rubric);text-decoration-thickness:1px;text-underline-offset:.18em}
a:hover{text-decoration-thickness:2px}
:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:0}.skip:focus{left:1rem;top:1rem;z-index:20;background:var(--ground);padding:.4rem .7rem}

/* top bar: quiet, on the line */
.bar{position:fixed;inset:0 0 auto 0;z-index:10;display:flex;align-items:center;gap:1rem;padding:calc(.55rem + env(safe-area-inset-top,0px)) 1rem .55rem;font-family:var(--sans);font-size:.78rem;color:var(--muted);background:linear-gradient(var(--ground) 60%,transparent)}
.bar a{color:var(--muted);text-decoration:none}.bar a:hover{color:var(--ink)}
.bar .home{margin-right:auto;letter-spacing:.01em}
.bar button{font:inherit;color:var(--muted);background:none;border:0;padding:.3rem .2rem;cursor:pointer;min-height:44px;min-width:44px}
.bar button:hover{color:var(--ink)}
.progress{position:fixed;left:0;top:0;height:2px;width:100%;transform-origin:0 50%;transform:scaleX(0);background:var(--rubric);z-index:11}

/* hero */
.hero{min-height:calc(var(--vh,1svh)*100);display:grid;place-items:end start;padding:0 clamp(1.2rem,6vw,6rem) calc(var(--vh,1svh)*9);position:relative}
.hero-copy{max-width:40rem;position:relative;z-index:2}
.kicker{font-family:var(--sans);font-size:.8rem;color:var(--rubric);margin:0 0 .6rem}
h1{font-weight:300;font-size:clamp(2.3rem,5.2vw,4.6rem);line-height:1.04;margin:0 0 1rem;letter-spacing:-.01em}
.deck{font-size:1.12em;color:var(--ink-2);max-width:36rem;margin:0}
.hint{font-family:var(--sans);font-size:.78rem;color:var(--muted);margin-top:1.6rem}

/* scrolly layout: text column + sticky stage */
.scrolly{position:relative;display:grid;grid-template-columns:minmax(18rem,34rem) 1fr;gap:0 2rem;padding:0 clamp(1rem,4vw,4rem)}
.stage-wrap{grid-column:2;grid-row:1;position:sticky;top:0;height:calc(var(--vh,1svh)*100);display:flex;align-items:center;justify-content:center;pointer-events:none}
.stage-wrap.interactive{pointer-events:auto}
.stage{width:100%;height:calc(var(--vh,1svh)*86);overflow:visible}
.steps{grid-column:1;grid-row:1;position:relative;z-index:2}
.step{min-height:calc(var(--vh,1svh)*92);display:flex;flex-direction:column;justify-content:center;padding:4rem 0}
.step:first-child{padding-top:calc(var(--vh,1svh)*30)}
.step>.in{transition:opacity .35s}
.step:not(.on)>.in{opacity:.38}
.step h2{font-weight:300;font-size:clamp(1.7rem,3vw,2.5rem);line-height:1.1;margin:0 0 .9rem}
.step h3{font-family:var(--sans);font-weight:400;font-size:.82rem;color:var(--rubric);margin:0 0 .5rem}
.step p{margin:0 0 .9rem}
.step .note{font-size:.88em;color:var(--muted)}
.chap{font-family:var(--sans);font-size:.78rem;color:var(--muted);margin:0 0 .4rem}
.disputed{color:var(--ink-2);border-left:2px dashed var(--rubric);padding-left:.7rem}
.native{font-family:var(--sans)}

/* stage marks */
.stage .base{stroke:var(--rubric);stroke-width:2;fill:none;vector-effect:non-scaling-stroke}
.stage .base.thin{stroke-width:1;opacity:.7}
.stage .branch{fill:none;vector-effect:non-scaling-stroke}
.stage .branch.disp{stroke-dasharray:5 5}
.stage .g{fill:var(--glyph)}
.stage .g.living{fill:var(--verdigris)}
.stage .g.invented{fill:var(--lapis)}
.stage .g.dead{fill:none;stroke:var(--glyph-dead);stroke-width:1.2;vector-effect:non-scaling-stroke}
.stage .g.draw{fill-opacity:0;stroke:var(--glyph);stroke-width:1.2;vector-effect:non-scaling-stroke}
.stage text{font-family:var(--sans);fill:var(--muted);font-size:34px}
.stage text.big{fill:var(--ink-2);font-size:46px}
.stage text.small{font-size:26px}
.stage .g.clayfill{fill:var(--clay)}
.stage text.date{fill:var(--rubric)}
.stage .slot,.chain .slot{stroke:var(--clay);stroke-width:1;vector-effect:non-scaling-stroke;stroke-dasharray:none}
.hatchline{stroke:var(--clay);stroke-width:1.5;opacity:.55}
.stage text.slotcap,.chain text.slotcap{fill:var(--ink-2)}
.stage text.brk{fill:var(--clay)}
.stage .branch{stroke:var(--ink);opacity:.5;stroke-width:1}
.stage .branch.main{stroke:var(--rubric);opacity:1;stroke-width:2.2}
.stage .branch.sem{stroke:var(--lapis);opacity:.9;stroke-width:1.3}
.stage .branch.ind{stroke:var(--verdigris);opacity:.9;stroke-width:1.3}
.stage .tip{fill:var(--ink)} .stage .tip.main{fill:var(--rubric)} .stage .tip.sem{fill:var(--lapis)} .stage .tip.ind{fill:var(--verdigris)}
.stage .cursor{stroke:var(--ink);stroke-width:1;opacity:.35;vector-effect:non-scaling-stroke}
.stage .tick{stroke:var(--rule);stroke-width:1;vector-effect:non-scaling-stroke}

/* prose sections */
.prose{max-width:38rem;margin:0 auto;padding:calc(var(--vh,1svh)*12) 1.2rem}
.census h2,.letter h2{font-weight:300;font-size:clamp(1.8rem,3.4vw,2.8rem);line-height:1.1;margin:0 0 1rem}
.prose h2{font-weight:300;font-size:clamp(1.8rem,3.4vw,2.8rem);line-height:1.1;margin:0 0 1rem}
.wide{max-width:76rem;margin:0 auto;padding:0 1.2rem}

/* census */
.census{padding:calc(var(--vh,1svh)*10) 0 calc(var(--vh,1svh)*6)}
.census-head{max-width:76rem;margin:0 auto 2rem;padding:0 1.2rem}
.census-head>p,.census-head>h2{max-width:38rem}
.figures span{display:block;max-width:12rem}
.figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.2rem 2rem;margin:1.6rem 0 0;padding:0;list-style:none}
.figures b{display:block;font-weight:300;font-size:2.4rem;line-height:1;font-variant-numeric:tabular-nums}
.figures span{font-family:var(--sans);font-size:.78rem;color:var(--muted)}
.figures .liv b{color:var(--verdigris)} .figures .dead b{color:var(--clay)} .figures .none b{color:var(--rubric)}
.filter{display:flex;flex-wrap:wrap;gap:.2rem 1.2rem;font-family:var(--sans);font-size:.85rem;margin:1.4rem 0 1rem;align-items:center}
.filter button{font:inherit;background:none;border:0;border-bottom:1px solid transparent;color:var(--muted);padding:.5rem 0;cursor:pointer;min-height:44px}
.filter button[aria-pressed="true"]{color:var(--ink);border-bottom-color:var(--rubric)}
.filter input{font:inherit;background:transparent;color:var(--ink);border:0;border-bottom:1px solid var(--rule);padding:.5rem 0;min-width:12rem;min-height:44px}
.filter input::placeholder{color:var(--muted)}
.wall{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.15rem .1rem;line-height:1;border-bottom:1px solid var(--rubric);padding-bottom:.2rem}
.wall button{background:none;border:0;padding:.25rem;cursor:pointer;display:flex;flex-direction:column;align-items:center;border-radius:2px;min-width:44px;min-height:44px;justify-content:flex-end}
.wall button:hover,.wall button[aria-pressed="true"]{background:var(--ground-2)}
.wall svg{display:block;overflow:visible}
.wall .g{fill:var(--glyph)} .wall .living .g{fill:var(--verdigris)} .wall .dead .g{fill:none;stroke:var(--glyph-dead);stroke-width:18}
.wall .nofont{display:block;font-family:var(--sans);font-size:.7rem;letter-spacing:.06em;color:var(--muted);border-bottom:1px dashed var(--clay);padding:0 .1rem .15rem;margin-bottom:.2rem}
.wall button.dim{opacity:.16}
.wall.oxmode .ox2 .g{fill:var(--rubric)} .wall.oxmode .dead.ox2 .g{fill:none;stroke:var(--rubric)}
.wall.oxmode .ox1 .g{fill:var(--rubric);opacity:.55} .wall.oxmode .dead.ox1 .g{fill:none;stroke:var(--rubric)}
.wall.oxmode .ox0 .g{fill:var(--ink)} .wall.oxmode .dead.ox0 .g{fill:none;stroke:var(--ink)}
.oxline{font-family:var(--sans);font-size:.95rem;color:var(--ink);margin:.2rem 0 1rem;max-width:44rem}
.oxline b{color:var(--rubric);font-weight:400}
.detail{min-height:7.5rem;margin:1.2rem 0 0;display:grid;grid-template-columns:auto 1fr;gap:0 1.4rem;align-items:center}
.detail svg{width:6rem;height:6rem;overflow:visible}
.detail h3{font-weight:400;font-size:1.5rem;margin:0}
.detail p{margin:.2rem 0;font-family:var(--sans);font-size:.85rem;color:var(--muted)}
.bars{margin:2.4rem 0 0;padding:0;list-style:none;font-family:var(--sans);font-size:.85rem}
.bars li{display:grid;grid-template-columns:9rem 1fr 5.2rem;gap:.8rem;align-items:center;margin:.35rem 0}
.bars .b{height:.5rem;background:var(--verdigris);transform-origin:0 50%}
.bars .v{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink-2)}

/* letter tool */
.letter{padding:calc(var(--vh,1svh)*8) 1.2rem calc(var(--vh,1svh)*10)}
.keys{display:flex;flex-wrap:wrap;gap:0 .1rem;margin:1.4rem 0 1rem;border-bottom:2px solid var(--rubric);padding-bottom:.1rem;max-width:62rem}
.keys button{font-family:var(--serif);font-weight:300;font-size:1.9rem;line-height:1;min-width:44px;min-height:52px;background:none;border:0;color:var(--muted);cursor:pointer;padding:.3rem .25rem 0;transition:transform .2s,color .2s}
.keys button:hover{color:var(--ink)}
.keys button[aria-pressed="true"]{color:var(--rubric);transform:translateY(-6px)}
.chain{width:100%;height:auto;max-height:calc(var(--vh,1svh)*46);overflow:visible;display:block;margin:1rem 0}
.chain .g{fill:var(--glyph)} .chain .g.model{fill:var(--clay)}
.chain text{font-family:var(--sans);font-size:20px;fill:var(--muted)} .chain text.date{fill:var(--rubric)}
.chain .base{stroke:var(--rubric);stroke-width:2;fill:none}
.chain-text{max-width:38rem}
.share{display:flex;flex-wrap:wrap;gap:.4rem 1.2rem;font-family:var(--sans);font-size:.85rem;margin:.6rem 0 0}
.share button,.share a{font:inherit;background:none;border:0;border-bottom:1px solid var(--rule);color:var(--ink);padding:.5rem 0;cursor:pointer;min-height:44px;text-decoration:none;display:inline-flex;align-items:center}
.share button:hover,.share a:hover{border-bottom-color:var(--rubric)}

/* sources & footer */
.sources{font-size:.9rem;color:var(--ink-2)}
.sources li{margin:.4rem 0}
footer{padding:4rem 1.2rem 6rem;max-width:38rem;margin:0 auto;font-family:var(--sans);font-size:.8rem;color:var(--muted)}
footer a{color:var(--muted)}

.scrolly.full{display:block;padding:0}
.scrolly.full .stage-wrap{position:sticky;top:0;height:calc(var(--vh,1svh)*76);background:var(--ground);z-index:1;padding:calc(2.6rem + env(safe-area-inset-top,0px)) 1rem 0;border-bottom:1px solid var(--rule)}
.scrolly.full .stage{height:100%;width:100%}
.scrolly.full .steps{max-width:46rem;margin:0 auto;padding:0 1.2rem;z-index:0}
.scrolly.full .step{min-height:calc(var(--vh,1svh)*22);padding:calc(var(--vh,1svh)*2) 0 calc(var(--vh,1svh)*4);justify-content:flex-start}
.scrolly.full .step:first-child{padding-top:calc(var(--vh,1svh)*3)}
@media (max-width:820px){
  .stage text{font-size:46px} .stage text.big{font-size:56px} .stage text.small{font-size:40px}
  .scrolly.full .stage text.small{font-size:28px}
  .scrolly.full .stage-wrap{height:calc(var(--vh,1svh)*40)}
  .scrolly.full .step{min-height:auto;padding:calc(var(--vh,1svh)*5) 0 calc(var(--vh,1svh)*12)}
  body{font-size:18px}
  .scrolly{display:block;padding:0}
  .stage-wrap{position:sticky;top:0;height:calc(var(--vh,1svh)*40);z-index:1;background:var(--ground);border-bottom:1px solid var(--rule);padding-top:calc(2.6rem + env(safe-area-inset-top,0px))}
  .stage{height:100%}
  .steps{padding:0 1.1rem;z-index:0}
  .step{min-height:auto;padding:calc(var(--vh,1svh)*16) 0 calc(var(--vh,1svh)*22)}
  .step:first-child{padding-top:calc(var(--vh,1svh)*8)}
  .step:not(.on)>.in{opacity:.5}
  .hero{padding-bottom:calc(var(--vh,1svh)*7)}
  .deck{font-size:1em}
  .stage-wrap{border-bottom:0}
  .figures{grid-template-columns:repeat(2,minmax(0,1fr))}
  .keys button{font-size:1.5rem}
  .chain{max-height:none}
  .chain text{font-size:30px} .chain text.small{font-size:26px}
  .bars li{grid-template-columns:6.5rem 1fr 4.6rem}
  .detail svg{width:4.5rem;height:4.5rem}
}
@media (prefers-reduced-motion:reduce){
  .step>.in{transition:none}
}
@media print{.bar,.stage-wrap,.progress{display:none}.scrolly{display:block}.step{min-height:0}}

.stage .g.trace,.chain .g.trace{fill:none;stroke:var(--clay);stroke-linecap:round;stroke-linejoin:round}
.stage .handline,.chain .handline{stroke:var(--clay);stroke-width:2;stroke-dasharray:6 8;vector-effect:non-scaling-stroke}
.stage .ring{fill:none;stroke:var(--clay);stroke-width:1.5;vector-effect:non-scaling-stroke}
.stage .simg{opacity:.92}
:root[data-theme="dark"] .stage .simg{opacity:.85}
figure.hand{margin:1.2rem 0 0}
figure.hand img{display:block;width:100%;max-width:26rem;height:auto}
figure.hand figcaption{font-family:var(--sans);font-size:.78rem;color:var(--muted);margin-top:.4rem}
.ink-dark{display:none!important}
:root[data-theme="dark"] .ink-light{display:none!important} :root[data-theme="dark"] .ink-dark{display:block!important}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .ink-light{display:none!important} :root:not([data-theme="light"]) .ink-dark{display:block!important}}

.stage text.small{paint-order:stroke;stroke:var(--ground);stroke-width:8px;stroke-linejoin:round}
.scrolly.full .stage text.small{stroke-width:7px}
.stage .leader{stroke:var(--clay);opacity:.6}
.oxline .sw{display:inline-block;width:.8em;height:.8em;border-radius:2px;margin:0 .25em 0 .6em;vertical-align:-.05em}
.oxline .sw.s2{background:var(--rubric)} .oxline .sw.s1{background:var(--rubric);opacity:.55} .oxline .sw.s0{background:var(--ink)}
@media (max-width:820px){ .stage text{font-size:54px} .stage text.big{font-size:64px} .stage text.small{font-size:50px} .scrolly.full .stage text.small{font-size:34px} }

figure.hand.photo img{max-width:100%;filter:grayscale(1)}
