/* DEVLESS World + DNN | base.css: verbatim copy of the devless.fun kit (css/app.css sections 1 to 4, plus the .demo bar), font paths moved to /assets/fonts/. Owner atlas, frozen. New tokens go in tokens.css. */
/* ---------- 1 tokens ---------- */
:root {
  --bg: #080B16; --sf: #0E1324; --sf2: #141B30; --sf3: #1B2440; --ln: #1F2842; --ln2: #2E3A5E;
  --fg: #EEF1F8; --fgl: #C3CADF; --mu: #8E99BC; --mu2: #6B769A;
  --ac: #FFF3D6; --ac-h: #FFFFFF; --ac-fg: #1A1508; --ac2: #F1E6C8;
  --ok: #4ADE80; --warn: #F5B84A; --vote: #8FB4FF; --bad: #FF6B81;
  --code: #05070F; --code2: #0C1120;
  --r: 16px; --r2: 10px; --step: 3px;
  --elev: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -20px rgba(0,0,0,.85);
  --grid: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  --head: "Archivo", system-ui, sans-serif; --sans: "Inter", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 3vw, 28px); --maxw: 1220px;
  /* pixel art */
  --px-body: #DDE3F2; --px-hi: #FFFFFF; --px-lo: #98A3C4; --px-screen: #0A0F24; --px-glass: #141C3C; --px-eye: #FFE9C4; --px-fill: #CFD6EA; --px-ground: #070A14; --px-dark: #182040;
  --glow: rgba(255,233,196,.55); --glow2: rgba(255,233,196,.32);
  /* sky: night is the default */
  --sky0: #04060E; --sky1: #0B1128; --sky2: #16224A; --horizon: #8FB4FF;
  color-scheme: dark;
}
/* the class sits on <html>; the states board also puts it on a single .band to show all four */
.sky-dawn { --sky0: #0B1020; --sky1: #1E2A52; --sky2: #4A4E78; --horizon: #FFD1A0; --moon: 1; --stars: .55; }
.sky-day { --sky0: #16223F; --sky1: #2A3F6E; --sky2: #5B7AA8; --horizon: #DCE8FF; --moon: 0; --stars: .25; }
.sky-dusk { --sky0: #0A0E22; --sky1: #1A1A3E; --sky2: #3A2A48; --horizon: #FF9E8A; --moon: 1; --stars: 1; }
.sky-night { --sky0: #04060E; --sky1: #0B1128; --sky2: #16224A; --horizon: #8FB4FF; --moon: 1; --stars: 1; }

/* ---------- 2 fonts (self-hosted, latin) ---------- */
@font-face { font-family: "Archivo"; font-weight: 700; font-style: normal; font-display: swap; src: url("/w/assets/fonts/archivo-700.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-style: normal; font-display: swap; src: url("/w/assets/fonts/archivo-800.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/w/assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/w/assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/w/assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/w/assets/fonts/jetbrains-mono-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/w/assets/fonts/jetbrains-mono-500.woff2") format("woff2"); }

/* ---------- 3 base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea { background: transparent; border: 0; outline: 0; min-width: 0; }
img, svg { display: block; }
code, kbd { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ac); color: var(--ac-fg); padding: 8px 12px; font-weight: 600; }
.skip:focus { left: 8px; }
.ic { width: 15px; height: 15px; fill: currentColor; flex: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.note { font-family: var(--mono); font-size: 11.5px; color: var(--mu); line-height: 1.6; }
.mono { font-family: var(--mono); }
.spot { display: block; flex: none; }
.spot svg, .spr svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 3px var(--glow2)); }
.spr { display: block; flex: none; width: 64px; height: 56px; }
.spr.xs { width: 32px; height: 28px; } .spr.sm { width: 48px; height: 42px; } .spr.md { width: 96px; height: 84px; } .spr.lg { width: 192px; height: 168px; }
.pxi { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--sf2); border: 1px solid var(--ln); color: var(--ac2); flex: none; }
.pxi svg { width: 16px; height: 13px; }

/* ---------- 4 buttons: stepped pixel corners, a key-like bottom edge ---------- */
.btn {
  --cut: polygon(var(--step) 0, calc(100% - var(--step)) 0, calc(100% - var(--step)) calc(var(--step) / 1.5), calc(100% - var(--step) / 1.5) calc(var(--step) / 1.5), calc(100% - var(--step) / 1.5) var(--step), 100% var(--step), 100% calc(100% - var(--step)), calc(100% - var(--step) / 1.5) calc(100% - var(--step)), calc(100% - var(--step) / 1.5) calc(100% - var(--step) / 1.5), calc(100% - var(--step)) calc(100% - var(--step) / 1.5), calc(100% - var(--step)) 100%, var(--step) 100%, var(--step) calc(100% - var(--step) / 1.5), calc(var(--step) / 1.5) calc(100% - var(--step) / 1.5), calc(var(--step) / 1.5) calc(100% - var(--step)), 0 calc(100% - var(--step)), 0 var(--step), calc(var(--step) / 1.5) var(--step), calc(var(--step) / 1.5) calc(var(--step) / 1.5), var(--step) calc(var(--step) / 1.5));
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px 14px; font-family: var(--sans); font-weight: 600; font-size: 14px; line-height: 1; letter-spacing: .005em; white-space: nowrap;
  clip-path: var(--cut); box-shadow: inset 0 -3px 0 rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.35); transition: background-color .15s ease, color .15s ease, transform .08s ease; user-select: none;
}
.btn .ic { width: 15px; height: 15px; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.2); }
.btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--ac); }
.btn.pri { background: var(--ac); color: var(--ac-fg); }
.btn.pri:hover { background: var(--ac-h); }
.btn.sec { background: var(--sf3); color: var(--fg); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.07); }
.btn.sec:hover { background: #24305A; }
.btn.ghost { background: transparent; color: var(--ac2); box-shadow: inset 0 0 0 1px var(--ln2); }
.btn.ghost:hover { background: var(--sf2); color: var(--fg); }
.btn.yes { background: color-mix(in srgb, var(--ok) 16%, var(--sf2)); color: var(--ok); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); }
.btn.no { background: color-mix(in srgb, var(--bad) 14%, var(--sf2)); color: var(--bad); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); }
.btn.yes:hover { background: color-mix(in srgb, var(--ok) 24%, var(--sf2)); } .btn.no:hover { background: color-mix(in srgb, var(--bad) 22%, var(--sf2)); }
.btn.sm { padding: 10px 14px 11px; font-size: 13px; --step: 2px; }
.btn.lg { padding: 16px 24px 17px; font-size: 15px; --step: 4px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { color: transparent !important; position: relative; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -10px; background: currentColor; color: var(--ac-fg); box-shadow: 8px 0 0 var(--ac-fg), 16px 0 0 var(--ac-fg); animation: busy 1s steps(3) infinite; }
.btn.sec[aria-busy="true"]::after, .btn.ghost[aria-busy="true"]::after { color: var(--fg); box-shadow: 8px 0 0 var(--fg), 16px 0 0 var(--fg); }
@keyframes busy { 0% { opacity: .3; } 50% { opacity: 1; } 100% { opacity: .3; } }
.lnk { display: inline-flex; align-items: center; gap: 6px; color: var(--ac2); font-weight: 600; font-size: 14px; }
.lnk:hover { color: var(--fg); }
.cp { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--mu); }
.cp:hover { background: var(--sf2); color: var(--fg); }
.cp .ic { width: 13px; height: 13px; }


/* kit section 5: demo bar, reused for the "Preview, simulated data" badge */
.demo { background: var(--sf); border-bottom: 1px solid var(--ln); }
.demo .wrap { display: flex; gap: 10px; align-items: baseline; padding-block: 7px; font-family: var(--mono); font-size: 11.5px; color: var(--mu); flex-wrap: wrap; }
.demo b { color: var(--warn); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }

/* kit reduced motion for the shared pieces */
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::after { animation: none; } }
