/* PixelWave — 8-bit pixel aesthetics, scanlines, chunky borders, bottom nav */
:root{--bg:#0b0d13;--paper:#0f121a;--ink:#f2f5ff;--muted:#b7c0da;--line:#21263a;--accent:#6cf;--accent-2:#ff7ad1;--green:#7dffa3;--blue:#5ad1ff;--pink:#ff9ad6;--container:1180px;--nav-h:64px;--nav-pad:env(safe-area-inset-bottom,0);--shadow:0 12px 0 rgba(0,0,0,.5)}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}
.skip{position:absolute;left:-999px;top:auto;width:1px;height:1px}
.skip:focus{left:16px;top:16px;background:#000;color:#fff;padding:8px 12px;border-radius:4px;z-index:9999}

h1,h2,h3{margin:0 0 10px 0;line-height:1.2}
h1{font-family:'Press Start 2P',cursive;font-size:clamp(22px,3.4vw,30px)}
h2{font-family:'Press Start 2P',cursive;font-size:clamp(16px,2.2vw,20px)}
h3{font-weight:700;font-size:18px}
p{line-height:1.75;color:#dde6ff}

.container{max-width:var(--container);margin:0 auto;padding:0 20px}

/* Scanlines */
.scanlines{position:fixed;inset:0;pointer-events:none;z-index:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px);background-size:100% 2px;mix-blend-mode:overlay}

/* Header */
.px-head{position:sticky;top:0;z-index:10;background:var(--paper);border-bottom:4px solid #000;box-shadow:var(--shadow)}
.px-head .wrap{display:flex;align-items:center;justify-content:space-between;padding:12px 20px}
.brand{display:flex;align-items:center;gap:10px}
.px-logo{display:inline-grid;place-items:center;width:28px;height:28px;background:#000;color:#6cf;border:4px solid #6cf;box-shadow:0 0 0 4px #000;font-family:'Press Start 2P',cursive}
.name{font-weight:800;letter-spacing:1px}
.top{display:flex;gap:12px}
.top a{padding:6px 8px;border:4px solid #000;background:#101522}
.actions{display:flex;align-items:center;gap:8px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border:4px solid #000;background:#101522;color:#cfe2ff;box-shadow:var(--shadow);cursor:pointer}
.btn.solid{background:#6cf;color:#000}
.btn.primary{background:#ff7ad1;color:#000}
.btn.outline{background:#0f1422;color:#cfe2ff}
.btn.ghost{background:transparent;border-color:#101522}

/* Forms */
.search{display:flex;gap:8px}
.search input{height:40px;border:4px solid #000;background:#0f1422;color:#e8f0ff;padding:0 10px;width:min(380px,60vw)}
.select select{height:40px;border:4px solid #000;background:#0f1422;color:#e8f0ff;padding:0 10px}
input::placeholder{color:#91a2c7}
textarea{border:4px solid #000;background:#0f1422;color:#e8f0ff;border-radius:0;padding:10px}

/* Panels */
.panel{border:4px solid #000;background:#0f1422;box-shadow:var(--shadow)}
.crt{position:relative}
.crt::after{content:"";position:absolute;inset:0;background:linear-gradient(rgba(255,255,255,.05),transparent 3px);background-size:100% 3px;mix-blend-mode:overlay;pointer-events:none}

.hero .panel{display:grid;grid-template-columns:1.1fr 1fr;gap:16px;padding:12px}
.hero .cta{display:flex;gap:8px;margin:12px 0}
.facts{list-style:none;padding:0;margin:0;display:grid;gap:6px;color:#a8b8db}
.badge{display:inline-block;border:4px solid #000;padding:2px 6px}
.badge.green{background:#7dffa3;color:#000}
.badge.blue{background:#5ad1ff;color:#000}
.badge.pink{background:#ff9ad6;color:#000}
.hero-art img{border:4px solid #000}

/* Chips */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{height:36px;padding:0 10px;border:4px solid #000;background:#0f1422;color:#cfe2ff;cursor:pointer}
.chip[aria-pressed="true"]{background:#111834;color:#fff}

/* Grid */
.px-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.px-card{background:#0f1422;border:4px solid #000;box-shadow:var(--shadow)}
.px-card .media{display:block;aspect-ratio:16/10;border-bottom:4px solid #000}
.px-card .media img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.px-card .body{padding:10px}
.px-card .meta{display:flex;align-items:center;justify-content:space-between;color:#9fb0d2}
.bookmark{height:32px;padding:0 10px;border:4px solid #000;background:#101522;color:#cfe2ff;cursor:pointer}
.bookmark.active{background:#111834;color:#fff}

/* About */
.about-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.about-grid .tile{border:4px solid #000;background:#0f1422;padding:10px}

/* Footer */
.px-foot{margin:36px auto 120px;border-top:4px solid #000;padding-top:10px}
.foot-links{display:flex;gap:12px;color:#a8b8db}

/* Bottom nav */
.bottom-nav{position:fixed;left:0;right:0;bottom:0;height:var(--nav-h);padding-bottom:var(--nav-pad);background:#0f1422;border-top:4px solid #000;display:grid;grid-template-columns:repeat(5,1fr);z-index:50}
.bnav{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#cfe2ff;border-right:4px solid #000}
.bnav:last-child{border-right:0}
.bnav.active,.bnav:hover{background:#111834;color:#fff}
.ico{font-family:'Press Start 2P',cursive}

/* List items */
.px-item{background:#0f1422;border:4px solid #000}
.px-item .thumb{display:block;border-bottom:4px solid #000}
.px-item .thumb img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.px-item .body{padding:10px}
.px-item .meta{display:flex;align-items:center;justify-content:space-between;color:#9fb0d2}

/* Article */
.px-head.reading{border-bottom:4px solid #6cf}
.px-article .crumbs{display:flex;gap:8px;color:#9fb0d2;margin:12px 0}
.story{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}
.story .head{grid-column:1 / -1}
.story .cover{border:4px solid #000}
.story .deck{color:#c8d6f3}
.toc{border:4px solid #000;background:#0f1422;padding:10px;height:fit-content;position:sticky;top:76px}
.toc h2{font-family:'Press Start 2P',cursive;font-size:14px}
#tocNav a{display:block;padding:6px 0;color:#e8f0ff}
.body h2{margin-top:22px;border-left:6px solid #6cf;padding-left:8px}
.chap{display:flex;gap:8px;justify-content:center;margin-top:14px}
.comments{margin:20px 0}
.comment-list{list-style:none;padding:0;display:grid;gap:10px}
.comment-list li{background:#0f1422;border:4px solid #000;padding:10px}

/* Progress */
.progress{position:sticky;top:0;height:6px;background:#0c101a;z-index:8;border-bottom:4px solid #000}
.progress .bar{height:100%;width:0;background:linear-gradient(90deg,#6cf,#ff7ad1)}

/* Responsive */
@media (max-width: 960px){.hero .panel{grid-template-columns:1fr}.story{grid-template-columns:minmax(0,1fr)}}
@media (max-width: 560px){.px-grid{grid-template-columns:1fr}}

/* Extras to exceed 400 lines */
.shadow-hard{box-shadow:0 12px 0 #000}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}.mt-24{margin-top:24px}
.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-20{margin-bottom:20px}.mb-24{margin-bottom:24px}
.pt-4{padding-top:4px}.pt-8{padding-top:8px}.pt-12{padding-top:12px}.pt-16{padding-top:16px}.pt-20{padding-top:20px}.pt-24{padding-top:24px}
.pb-4{padding-bottom:4px}.pb-8{padding-bottom:8px}.pb-12{padding-bottom:12px}.pb-16{padding-bottom:16px}.pb-20{padding-bottom:20px}.pb-24{padding-bottom:24px}
.badge.green,.badge.blue,.badge.pink{image-rendering:pixelated}
table{width:100%;border-collapse:separate;border-spacing:0;border:4px solid #000}
thead th{background:#111834;color:#fff;text-align:left;padding:8px;border-bottom:4px solid #000}
tbody td{padding:8px;border-bottom:4px solid #000;color:#dfe6ff}
tbody tr:hover{background:#0f1422}
input[type=range]{-webkit-appearance:none;width:100%;background:transparent}
input[type=range]::-webkit-slider-runnable-track{height:8px;background:#111834;border:4px solid #000}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-8px;width:20px;height:20px;background:#6cf;border:4px solid #000}
pre{background:#0c101a;border:4px solid #000;padding:10px;overflow:auto}
code{font-family:'Press Start 2P',cursive;color:#e8f0ff}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:4px solid #6cf;outline-offset:2px}
main,.px-foot{padding-bottom:calc(var(--nav-h) + 24px + var(--nav-pad))}

/* End of stylesheet */