/* GIGAWATT shared base: tokens, header, buttons, footer and the big-screen zoom rule. Used by the home page (home.css) and the wiki (wiki/wiki.css). */
@font-face{font-family:"Chakra Petch";src:url("assets/ChakraPetch-Medium.ttf") format("truetype");font-weight:400 600;font-display:swap}
@font-face{font-family:"Chakra Petch";src:url("assets/ChakraPetch-Bold.ttf") format("truetype");font-weight:700 900;font-display:swap}
:root{
  /* graphite and amber: one accent, hairline rules, no glow */
  --bg:#0c0d10;--bg2:#111317;--panel:#15181d;--panel2:#1a1e24;--line:#272c35;--ink:#ecebe6;--dim:#a2a39c;
  --amber:#f5a524;--cyan:#8cc8ff;--green:#4fd69a;--red:#ff6652;--violet:#b39bff;--pink:#ff7aa8;
  --head:"Chakra Petch",ui-sans-serif,system-ui,sans-serif;
  --font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
  --r:8px;
  --cut:0px;
  --nav:60px; /* header height */
  --z2:1;--gut:max(18px,calc(4vw / var(--z2))); /* --z2 is the page zoom on big screens; vh and vw are not zoom-corrected, so divide by it */
  color-scheme:dark;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--nav) + 4px)}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.6 var(--font);-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:var(--cyan);text-underline-offset:3px}
:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
.skip{position:absolute;left:-999px;top:8px;background:var(--amber);color:#000;padding:8px 12px;z-index:100}
.skip:focus{left:8px}
h1,h2,h3{margin:0;line-height:1.1;text-wrap:balance;font-family:var(--head)}
p{margin:0 0 14px}
.fine{font-size:13px;color:var(--dim)}
.wrap{max-width:1180px;margin:0 auto;padding:0 var(--gut)}
.sr{position:absolute;left:-999px;width:1px;height:1px;overflow:hidden}

.cham{border-radius:var(--r)}
.kicker{font:600 13px var(--mono);letter-spacing:.04em;text-transform:uppercase;color:var(--amber);margin-bottom:10px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;font:700 15px var(--head);letter-spacing:.02em;color:var(--ink);text-decoration:none;padding:12px 22px;background:var(--panel2);border:1px solid #3a414d;border-radius:var(--r);cursor:pointer;transition:background .15s,border-color .15s}
.btn:hover{background:#232830;border-color:#566070}
.btn:disabled{opacity:.35;cursor:default}
.btn.go{background:var(--amber);border-color:var(--amber);color:#1b1200}
.btn.go:hover{background:#ffbb4d;border-color:#ffbb4d}
.btn.big{font-size:17px;padding:15px 28px}
.btn.mini{padding:8px 16px;font-size:14px;min-height:40px}

/* header */
.nav{position:fixed;inset:0 0 auto 0;z-index:50;display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:var(--nav);padding:8px max(var(--gut),calc((100% - 1180px)/2 + var(--gut)));background:rgba(12,13,16,.72);backdrop-filter:blur(10px);border-bottom:1px solid transparent;transition:background .2s,border-color .2s}
.nav.solid,.nav.always{background:rgba(12,13,16,.96);border-color:var(--line)}
.logo{font:700 19px var(--head);letter-spacing:.12em;color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:10px;min-height:44px}
.logo i{width:10px;height:10px;background:var(--amber);border-radius:2px}
.nav nav{display:flex;gap:6px 22px;align-items:center}
.nav .links{display:flex;gap:6px 22px;align-items:center}
.nav .links a{color:var(--ink);text-decoration:none;font-size:15px;opacity:.78;padding:10px 0;border-bottom:2px solid transparent}
.nav .links a:hover,.nav .links a[aria-current]{opacity:1;border-color:var(--amber)}
.menubtn{display:none;font:600 14px var(--font);color:var(--ink);background:none;border:1px solid var(--line);border-radius:var(--r);min-height:44px;min-width:44px;padding:0 14px;cursor:pointer}
.menubtn[aria-expanded=true]{border-color:var(--amber);color:var(--amber)}

footer{padding:36px var(--gut);border-top:1px solid var(--line);display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;background:#090a0c;font-size:15px}
footer a{color:var(--cyan);display:inline-block;padding:12px 6px}

@media (max-width:900px){
  :root{--nav:56px}
  .nav{gap:10px}
  .nav nav{gap:8px}
  .nav,.nav.solid,.nav.always{background:#0c0d10;backdrop-filter:none}
  .logo{font-size:18px}
  .btn{min-height:48px;justify-content:center}
  .btn.mini{min-height:44px}
  /* with JS the links collapse into a Menu dropdown; without it they wrap onto a second row */
  .js .menubtn{display:inline-flex;align-items:center}
  .js .nav .links{display:none;position:absolute;left:0;right:0;top:100%;flex-direction:column;align-items:stretch;gap:0;background:#0c0d10;border-bottom:1px solid var(--line);padding:6px var(--gut) 12px}
  .js .nav .links.open{display:flex}
  .js .nav .links a{padding:14px 0;border-bottom:1px solid var(--line);font-size:14px;opacity:1}
  html:not(.js) .nav{flex-wrap:wrap}
  html:not(.js) .nav nav{flex-wrap:wrap}
  .nav.solid:has(.links.open),.nav:has(.links.open){background:#0c0d10}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn{transition:none}}
/* Big and high-density screens: zoom the whole page in ~0.1 steps so the effective viewport stays about 1820 CSS px wide (a 4K monitor at 100% looks like the 1080p design). Fine steps keep each jump small. The height guard stops short-and-wide monitors from zooming into a letterbox. --z2 lets vh-based sizes undo the zoom. */
@media (min-width:2000px) and (min-height:770px){html:root{zoom:1.1;--z2:1.1}}
@media (min-width:2180px) and (min-height:840px){html:root{zoom:1.2;--z2:1.2}}
@media (min-width:2370px) and (min-height:910px){html:root{zoom:1.3;--z2:1.3}}
@media (min-width:2550px) and (min-height:980px){html:root{zoom:1.4;--z2:1.4}}
@media (min-width:2730px) and (min-height:1050px){html:root{zoom:1.5;--z2:1.5}}
@media (min-width:2910px) and (min-height:1120px){html:root{zoom:1.6;--z2:1.6}}
@media (min-width:3090px) and (min-height:1190px){html:root{zoom:1.7;--z2:1.7}}
@media (min-width:3280px) and (min-height:1260px){html:root{zoom:1.8;--z2:1.8}}
@media (min-width:3460px) and (min-height:1330px){html:root{zoom:1.9;--z2:1.9}}
@media (min-width:3640px) and (min-height:1400px){html:root{zoom:2.0;--z2:2.0}}
@media (min-width:3820px) and (min-height:1470px){html:root{zoom:2.1;--z2:2.1}}
@media (min-width:4000px) and (min-height:1540px){html:root{zoom:2.2;--z2:2.2}}
@media (min-width:4190px) and (min-height:1610px){html:root{zoom:2.3;--z2:2.3}}
@media (min-width:4370px) and (min-height:1680px){html:root{zoom:2.4;--z2:2.4}}
@media (min-width:4550px) and (min-height:1750px){html:root{zoom:2.5;--z2:2.5}}
@media (min-width:4730px) and (min-height:1820px){html:root{zoom:2.6;--z2:2.6}}
@media (min-width:4910px) and (min-height:1890px){html:root{zoom:2.7;--z2:2.7}}
@media (min-width:5100px) and (min-height:1960px){html:root{zoom:2.8;--z2:2.8}}
@media (min-width:5280px) and (min-height:2030px){html:root{zoom:2.9;--z2:2.9}}
@media (min-width:5460px) and (min-height:2100px){html:root{zoom:3.0;--z2:3.0}}
