/* Layout: arcade "level select" — dark neon ground with a glowing grid floor; each grade is a neon color */
:root {
  --paper: #07061a;
  --grid: rgba(80, 230, 255, .07);
  --card: #110e2b;
  --ink: #eef2ff;
  --muted: #9aa0d0;
  --line: #2b2763;
  --soft: #1a1640;
  --k7: #2bffc6;
  --k8: #ffa51f;
  --k9: #ff4fd8;
  --mark: #fff35c;
  --cyan: #3ee8ff;
  --ok: #4dff9a;
  --ok-bg: #0f2e22;
  --bad: #ff5a76;
  --bad-bg: #351426;
  --on-c: #07061a;
  --shadow: 0 0 0 1px rgba(120, 110, 255, .08), 0 10px 30px rgba(0, 0, 0, .45);
  --f-display: "Bungee", "Arial Black", Impact, system-ui, sans-serif;
  --f-pixel: "Silkscreen", "Courier New", ui-monospace, monospace;
  --f-body: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --c: var(--k9);
  --r: 14px;
  color-scheme: dark;
}
.glow { box-shadow: 0 0 0 1px var(--c), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
}
.k7 { --c: var(--k7); } .k8 { --c: var(--k8); } .k9 { --c: var(--k9); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0 0 .8em; }
a { color: var(--c); }
code { font-family: var(--f-mono); font-size: .88em; background: var(--soft); padding: .1em .35em; border-radius: 5px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; line-height: 1; margin-right: auto; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--f-mono); font-size: .8rem; font-weight: 700; letter-spacing: -.5px; }
.logo small { display: block; font-family: var(--f-body); font-weight: 400; font-size: .7rem; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; padding: 7px 12px; border-radius: 999px; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.on { background: var(--ink); color: var(--paper); }
.theme-btn { border: 1px solid var(--line); background: var(--card); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; z-index: 30; }
  .nav a { font-size: .82rem; padding: 8px 10px; }
  body { padding-bottom: 64px; }
}

/* ---------- page wrapper ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; padding: 24px 0 36px; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; margin: 8px 0 14px; }
.hero h1 .hl { background: linear-gradient(transparent 62%, var(--mark) 62%, var(--mark) 92%, transparent 92%); padding: 0 .1em; }
.hero p.lead { font-size: 1.08rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 11px 18px; border-radius: 12px; background: var(--c); color: var(--on-c); line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--c); filter: none; }
.btn.sm { padding: 8px 13px; font-size: .86rem; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

.bits-hero { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.bits-hero .row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.bits-hero button { aspect-ratio: 1; max-width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: var(--soft); font-family: var(--f-mono); font-weight: 700; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.bits-hero button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bits-hero .vals { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; text-align: center; font-family: var(--f-mono); font-size: .68rem; color: var(--muted); margin-top: 6px; }
.bits-hero .out { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bits-hero .out b { font-family: var(--f-mono); font-size: 2rem; }
.bits-hero .cap { font-size: .85rem; color: var(--muted); margin: 0 0 12px; }

.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; flex-wrap: wrap; }
.section-h h2 { font-size: 1.6rem; }
.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grade-card { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; overflow: hidden; }
.grade-card:hover { transform: translateY(-3px); border-color: var(--c); }
.grade-card .num { font-family: var(--f-display); font-weight: 800; font-size: 3.6rem; line-height: .9; color: var(--c); }
.grade-card h3 { font-size: 1.3rem; }
.grade-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.grade-card ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.grade-card li { display: flex; gap: 8px; align-items: center; }
.grade-card li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex: none; }
.meter { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .4s; }
.meter-row { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.meter-row .meter { flex: 1; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.step b { display: block; font-family: var(--f-display); font-size: 1.1rem; margin: 6px 0 2px; }
.step span { font-size: .87rem; color: var(--muted); }
.step .n { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.step .n::before { counter-increment: s; content: "Langkah " counter(s); }

/* ---------- grade page ---------- */
.crumbs { font-size: .85rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.page-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .big { font-family: var(--f-display); font-weight: 800; font-size: 4.2rem; line-height: .85; color: var(--c); }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.page-head p { color: var(--muted); margin: 4px 0 0; max-width: 40em; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.topic-card:hover { transform: translateY(-3px); border-color: var(--c); }
.topic-card .ic { width: 48px; height: 48px; border-radius: 13px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); display: grid; place-items: center; }
.topic-card .ic svg { width: 26px; height: 26px; }
.topic-card h3 { font-size: 1.25rem; }
.topic-card p { font-size: .9rem; color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.chip { font-size: .74rem; font-weight: 500; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.chip.done { background: var(--ok-bg); color: var(--ok); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }

/* ---------- topic page ---------- */
.topic-head { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.topic-head .ic { width: 64px; height: 64px; border-radius: 16px; background: var(--c); color: var(--on-c); display: grid; place-items: center; }
.topic-head .ic svg { width: 34px; height: 34px; }
.topic-head h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 2px 0 6px; }
.topic-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.tabs { display: flex; gap: 6px; margin: 18px 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 16px; border-radius: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.tabs a svg { width: 18px; height: 18px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--c); color: var(--on-c); border-color: var(--c); }
.tabs a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); min-width: 0; }
.panel h2 { font-size: 1.5rem; margin-bottom: 6px; }
.panel .sub { color: var(--muted); margin-bottom: 18px; }

/* materi */
.materi { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.toc { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.toc a { text-decoration: none; color: var(--muted); padding: 7px 10px; border-left: 3px solid var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--c); }
.toc .eyebrow { padding: 0 10px 8px; }
.materi article { min-width: 0; max-width: 68ch; }
.materi section { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px dashed var(--line); scroll-margin-top: 90px; }
.materi section:last-of-type { border-bottom: 0; }
.materi h3 { font-size: 1.3rem; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.materi h3 small { font-family: var(--f-mono); font-size: .75rem; color: var(--c); font-weight: 600; }
.materi ul, .materi ol { padding-left: 1.3em; margin: 0 0 .8em; }
.materi li { margin-bottom: .4em; }
ol.pilar { list-style: none; padding: 0; counter-reset: p; display: grid; gap: 10px; }
ol.pilar li { counter-increment: p; position: relative; padding: 12px 14px 12px 50px; background: var(--soft); border-radius: 12px; margin: 0; }
ol.pilar li::before { content: counter(p); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 8px; background: var(--c); color: var(--on-c); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.tahukah { border: 1.5px dashed var(--c); border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--c) 7%, transparent); font-size: .94rem; }
.tahukah b:first-child { color: var(--c); display: block; font-family: var(--f-display); font-size: 1.05rem; }
.tbl-wrap { overflow-x: auto; margin: 0 0 1em; }
.tabel { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 420px; }
.tabel th, .tabel td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabel th { background: var(--soft); font-weight: 600; }
.biner-tabel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 6px 0 12px; max-width: 420px; }
.biner-tabel span { text-align: center; font-family: var(--f-mono); font-weight: 600; font-size: .85rem; padding: 8px 0; background: var(--soft); border-radius: 8px; }
.done-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: var(--soft); border-radius: 14px; margin-top: 8px; }

/* video */
.video-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.video-box { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; background: #0b1020; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-face { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; cursor: pointer; border: 0; width: 100%; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 70%, #0b1020), #0b1020 75%); padding: 16px; }
.video-face .play { width: 72px; height: 72px; border-radius: 50%; background: #fff; color: #0b1020; display: grid; place-items: center; margin: 0 auto 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.video-face .play svg { width: 30px; height: 30px; margin-left: 4px; }
.video-face span { font-weight: 600; max-width: 26em; display: block; }
.video-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 12px; font-size: .9rem; }
.fokus { background: var(--soft); border-radius: 14px; padding: 16px 18px; }
.fokus h3 { font-size: 1.15rem; margin-bottom: 8px; }
.fokus ol { padding-left: 1.2em; margin: 0; }
.fokus li { margin-bottom: 8px; }

/* quiz */
.quiz { max-width: 680px; }
.q-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.q-text { font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; line-height: 1.3; margin: 16px 0 16px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: .98rem; }
.opt:hover:not(:disabled) { border-color: var(--c); }
.opt .L { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .L { background: var(--ok); color: var(--card); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .L { background: var(--bad); color: var(--card); }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .94rem; }
.feedback.ok { background: var(--ok-bg); color: var(--ink); border-left: 4px solid var(--ok); }
.feedback.no { background: var(--bad-bg); color: var(--ink); border-left: 4px solid var(--bad); }
.q-nav { display: flex; justify-content: flex-end; margin-top: 16px; }
.result { text-align: center; padding: 10px 0; }
.result .score { font-family: var(--f-display); font-weight: 800; font-size: 4.5rem; line-height: 1; color: var(--c); }
.result .msg { font-size: 1.1rem; margin: 10px 0 4px; font-weight: 600; }
.result .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.review { text-align: left; margin-top: 24px; display: grid; gap: 8px; }
.review div { padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: .9rem; }
.review b { display: block; }

/* prev/next */
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.pager a { flex: 1 1 220px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.pager a:hover { border-color: var(--c); }
.pager a small { display: block; color: var(--muted); font-size: .78rem; }
.pager a.next { text-align: right; }

footer { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- simulations (shared) ---------- */
.sim { display: grid; gap: 16px; }
.sim-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sim-msg { padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: .94rem; }
.sim-msg.ok { background: var(--ok-bg); border-left: 4px solid var(--ok); }
.sim-msg.no { background: var(--bad-bg); border-left: 4px solid var(--bad); }
.stat { display: inline-flex; gap: 6px; align-items: baseline; font-size: .88rem; color: var(--muted); }
.stat b { font-family: var(--f-mono); font-size: 1.1rem; color: var(--ink); }
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; }
.field input, .field textarea, .field select { font: inherit; font-weight: 400; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--c); outline: none; }

/* sort */
.cards-row { display: flex; align-items: flex-end; justify-content: center; gap: 3px; min-height: 190px; padding: 10px 0; flex-wrap: nowrap; }
.scard { width: clamp(28px, 8vw, 58px); border-radius: 10px 10px 6px 6px; background: color-mix(in srgb, var(--c) 22%, var(--card)); border: 2px solid var(--c); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-family: var(--f-mono); font-weight: 700; font-size: 1.05rem; transition: height .25s, background .25s; }
.scard.hot { background: var(--mark); color: #15213b; }
.scard.fixed { background: var(--c); color: var(--on-c); }
.swap { align-self: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: .8rem; padding: 0; flex: none; }
.swap:hover { border-color: var(--c); color: var(--c); }

/* sortir perangkat */
.device { text-align: center; padding: 22px; border-radius: 16px; background: var(--soft); }
.device .name { font-family: var(--f-display); font-size: 1.8rem; font-weight: 700; }
.device small { color: var(--muted); }
.bins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bin { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; min-height: 110px; display: flex; flex-direction: column; gap: 6px; }
.bin:hover:not(:disabled) { border-color: var(--c); }
.bin b { font-family: var(--f-display); font-size: 1.1rem; }
.bin .items { display: flex; flex-wrap: wrap; gap: 4px; }
.bin .items span { font-size: .72rem; background: var(--soft); padding: 2px 7px; border-radius: 99px; }

/* network */
.netbox { position: relative; height: 240px; border-radius: 16px; background: var(--soft); overflow: hidden; }
.netbox svg.links { position: absolute; inset: 0; width: 100%; height: 100%; }
.netbox svg.links line { stroke: var(--line); stroke-width: 3; stroke-dasharray: 6 6; }
.node { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); z-index: 1; }
.node i { width: 44px; height: 44px; border-radius: 12px; background: var(--card); border: 2px solid var(--ink); display: grid; place-items: center; font-style: normal; color: var(--ink); }
.node i svg { width: 24px; height: 24px; }
.node.r i { border-radius: 50%; border-color: var(--c); color: var(--c); }
.pkt { position: absolute; transform: translate(-50%, -50%); z-index: 2; background: var(--mark); color: #15213b; font-family: var(--f-mono); font-size: .72rem; font-weight: 700; padding: 3px 7px; border-radius: 7px; white-space: pre; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: left .7s ease-in-out, top .7s ease-in-out; }
.inbox { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; padding: 10px; border-radius: 12px; border: 1.5px dashed var(--line); }
.inbox span { font-family: var(--f-mono); font-size: .82rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; white-space: pre; }
.inbox span b { color: var(--c); margin-right: 4px; }

/* data sheet */
.sheet-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
.sheet { border-collapse: collapse; width: 100%; font-size: .9rem; font-family: var(--f-mono); }
.sheet th, .sheet td { border: 1px solid var(--line); padding: 0; height: 36px; }
.sheet th { background: var(--soft); font-weight: 600; font-size: .78rem; color: var(--muted); width: 34px; }
.sheet td.lbl { padding: 0 10px; font-family: var(--f-body); }
.sheet input { width: 100%; height: 100%; border: 0; background: transparent; font: inherit; color: var(--ink); padding: 0 10px; text-align: right; }
.sheet input:focus { outline: 2px solid var(--c); outline-offset: -2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.stats div { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.stats b { display: block; font-family: var(--f-mono); font-size: 1.2rem; }
.stats code { font-size: .72rem; background: none; padding: 0; color: var(--muted); }
.chart { position: relative; height: 240px; display: flex; align-items: flex-end; gap: 8px; padding: 10px 6px 28px 34px; border-left: 0; }
.chart .ax { position: absolute; left: 0; right: 0; font-size: .68rem; color: var(--muted); font-family: var(--f-mono); border-top: 1px solid var(--line); }
.chart .ax span { position: absolute; left: 0; top: -.7em; background: var(--card); padding-right: 4px; }
.chart .bar { flex: 1; position: relative; background: var(--c); border-radius: 6px 6px 0 0; transition: height .3s; min-height: 2px; z-index: 1; }
.chart .bar small { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; }
.chart .bar em { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .7rem; font-style: normal; font-family: var(--f-mono); font-weight: 600; }
.chart .mean { position: absolute; left: 34px; right: 6px; border-top: 2px dashed var(--ink); z-index: 2; transition: bottom .3s; }
.chart .mean span { position: absolute; right: 0; top: -20px; font-size: .7rem; font-family: var(--f-mono); background: var(--ink); color: var(--paper); padding: 1px 6px; border-radius: 5px; }

/* robot */
.robot-wrap { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 20px; align-items: start; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--soft); padding: 6px; border-radius: 14px; max-width: 340px; width: 100%; }
.grid5 div { aspect-ratio: 1; border-radius: 8px; background: var(--card); display: grid; place-items: center; position: relative; }
.grid5 div.wall { background: repeating-linear-gradient(45deg, var(--muted) 0 6px, var(--line) 6px 12px); }
.grid5 div.trail { background: color-mix(in srgb, var(--c) 18%, var(--card)); }
.grid5 svg { width: 70%; height: 70%; }
.robot { color: var(--c); transition: transform .25s; }
.star { color: #e8a400; }
.prog { display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; padding: 10px; border: 1.5px dashed var(--line); border-radius: 12px; align-content: flex-start; }
.prog button { border: 0; background: var(--c); color: var(--on-c); font-size: .8rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; cursor: pointer; }
.prog button.cur { background: var(--mark); color: #15213b; }
.prog .empty { font-size: .85rem; color: var(--muted); }
.cmds { display: flex; flex-wrap: wrap; gap: 8px; }

/* password */
.pw-meter { height: 12px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: center; font-size: .9rem; padding: 8px 10px; border-radius: 10px; background: var(--soft); color: var(--muted); }
.checks li.ok { background: var(--ok-bg); color: var(--ink); }
.checks li::before { content: "○"; font-weight: 700; color: var(--muted); }
.checks li.ok::before { content: "✓"; color: var(--ok); }

/* stack queue */
.sq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sq-col { background: var(--soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sq-col h3 { font-size: 1.15rem; }
.sq-col h3 small { font-family: var(--f-mono); font-size: .75rem; color: var(--c); margin-left: 6px; }
.stackbox { height: 250px; display: flex; flex-direction: column-reverse; gap: 4px; padding: 8px; border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 12px 12px; background: var(--card); }
.queuebox { height: 70px; display: flex; gap: 4px; align-items: center; padding: 8px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--card); overflow-x: auto; }
.book { flex: none; padding: 6px 10px; border-radius: 8px; color: var(--on-c); font-size: .8rem; font-weight: 600; text-align: center; animation: pop .25s; }
.stackbox .book { height: 32px; display: grid; place-items: center; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.q-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-weight: 600; }
.log { font-size: .85rem; color: var(--muted); min-height: 1.5em; }

/* binary */
.bits { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 560px; }
.bits button { aspect-ratio: 3 / 4; max-width: 100%; border-radius: 12px; border: 2px solid var(--line); background: var(--soft); cursor: pointer; display: grid; place-items: center; font-family: var(--f-mono); font-size: clamp(1.1rem, 4vw, 1.8rem); font-weight: 700; color: var(--muted); transition: background .15s; }
.bits button.on { background: var(--c); color: var(--on-c); border-color: var(--c); }
.bits-v { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 560px; text-align: center; font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }
.bin-out { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.bin-out .dec { font-family: var(--f-mono); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.target { display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 2px dashed var(--c); }
.target b { font-family: var(--f-mono); font-size: 1.6rem; }

/* caesar */
.alpha { overflow-x: auto; }
.alpha table { border-collapse: collapse; font-family: var(--f-mono); font-size: .8rem; }
.alpha td { width: 26px; text-align: center; padding: 4px 0; border: 1px solid var(--line); }
.alpha tr:first-child td { background: var(--soft); }
.alpha tr:last-child td { color: var(--c); font-weight: 700; }
.cipher-out { font-family: var(--f-mono); font-size: 1.1rem; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); min-height: 48px; word-break: break-word; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--card); padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.seg button.on { background: var(--c); color: var(--on-c); }
.range { display: flex; gap: 12px; align-items: center; }
.range input { flex: 1; accent-color: var(--c); }
.range b { font-family: var(--f-mono); font-size: 1.3rem; min-width: 2ch; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .grades { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .materi { grid-template-columns: 1fr; }
  .toc { display: none; }
  .video-wrap, .sheet-wrap, .robot-wrap, .two { grid-template-columns: 1fr; }
  .bins { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .sq { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .topic-head { grid-template-columns: 1fr; }
  .topic-head .ic { width: 52px; height: 52px; }
  .netbox { height: 200px; }
  .node i { width: 36px; height: 36px; }
  .logo small { display: none; }
}
@media (max-width: 520px) {
  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .tabs a { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 4px; font-size: .78rem; position: relative; }
  .tabs a .dot { position: absolute; top: 6px; right: 6px; }
}
.pager a.next { margin-left: auto; }

/* =========================================================
   GAYA NEON — bagian 1: dasar dan beranda
   ========================================================= */
h1, h2, h3 { font-weight: 400; letter-spacing: .01em; }
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(140, 60, 255, .35), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(255, 79, 216, .12), transparent 70%);
  background-size: auto;
  background-attachment: fixed;
}
/* lantai grid ala synthwave */
body::before {
  content: ""; position: fixed; left: -50%; right: -50%; bottom: 0; height: 55vh; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 79, 216, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(62, 232, 255, .3) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(420px) rotateX(62deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
  animation: floor 3s linear infinite;
}
@keyframes floor { to { background-position: 0 48px; } }
.px { font-family: var(--f-pixel); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.px.dim, .dim { color: var(--muted); }

/* header */
.top { background: rgba(7, 6, 26, .78); border-bottom-color: var(--line); }
.logo { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; }
.logo-mark { background: transparent; color: var(--cyan); border: 2px solid var(--cyan); box-shadow: 0 0 14px rgba(62, 232, 255, .5), inset 0 0 10px rgba(62, 232, 255, .25); font-size: .78rem; }
.nav a { font-family: var(--f-pixel); font-size: .78rem; text-transform: uppercase; }
.nav a.on { background: transparent; color: var(--cyan); box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 14px rgba(62, 232, 255, .35); }
.nav a:hover { background: var(--soft); }
@media (max-width: 640px) { .nav { background: rgba(10, 8, 34, .95); backdrop-filter: blur(8px); } .nav a { font-size: .7rem; } }

/* tombol */
.btn { font-weight: 600; border-radius: 10px; }
.btn.glow { box-shadow: 0 0 0 1px var(--c), 0 0 24px color-mix(in srgb, var(--c) 55%, transparent); }
.btn.ghost { background: rgba(17, 14, 43, .7); }
.btn.ghost:hover { box-shadow: 0 0 16px color-mix(in srgb, var(--c) 35%, transparent); }

/* hero arcade */
.arcade { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; padding: 28px 0 40px; }
.arcade h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1.05; margin: 14px 0 16px; }
.neon { display: block; color: var(--cyan); text-shadow: 0 0 6px rgba(62, 232, 255, .9), 0 0 22px rgba(62, 232, 255, .6), 0 0 48px rgba(62, 232, 255, .35); }
.arcade .lead { font-size: 1.05rem; color: var(--muted); max-width: 34em; }
.blink-dot { color: var(--k7); display: inline-flex; align-items: center; gap: 8px; }
.blink-dot::before { content: ""; width: 8px; height: 8px; background: var(--k7); box-shadow: 0 0 10px var(--k7); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hud { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hud div { display: grid; gap: 2px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(17, 14, 43, .7); min-width: 92px; }
.hud b { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1; color: var(--mark); text-shadow: 0 0 12px rgba(255, 243, 92, .45); }
.hud .px { color: var(--muted); font-size: .66rem; }

.cabinet { --c: var(--k9); position: relative; background: linear-gradient(180deg, #16113a, #0c0a24); border: 2px solid var(--k9); border-radius: 18px; padding: 18px; box-shadow: 0 0 0 1px rgba(255, 79, 216, .3), 0 0 40px rgba(255, 79, 216, .3), inset 0 0 40px rgba(255, 79, 216, .08); overflow: hidden; }
.cabinet::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 3px, rgba(0, 0, 0, .18) 3px 4px); }
.cab-head { display: flex; justify-content: space-between; align-items: center; }
.cab-head b { color: var(--mark); font-size: .9rem; }
.cab-goal { margin: 10px 0 14px; font-size: .95rem; color: var(--ink); }
.cab-goal b { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; color: var(--mark); text-shadow: 0 0 12px rgba(255, 243, 92, .5); }
.cabinet .row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.cabinet .row button { position: relative; z-index: 1; aspect-ratio: 1; max-width: 100%; border: 1.5px solid var(--line); border-radius: 8px; background: #0a0820; font-family: var(--f-mono); font-weight: 700; font-size: 1.05rem; cursor: pointer; color: var(--muted); transition: all .15s; }
.cabinet .row button:hover { border-color: var(--k9); }
.cabinet .row button.on { background: var(--k9); color: var(--on-c); border-color: var(--k9); box-shadow: 0 0 16px rgba(255, 79, 216, .8); }
.cabinet .vals { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; text-align: center; font-family: var(--f-mono); font-size: .66rem; color: var(--muted); margin-top: 6px; }
.cab-out { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.cab-out b { font-family: var(--f-display); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--cyan); text-shadow: 0 0 14px rgba(62, 232, 255, .6); }
.cab-msg { margin: 10px 0 0; color: var(--muted); min-height: 1.4em; }
.cab-msg.win { color: var(--ok); text-shadow: 0 0 10px rgba(77, 255, 154, .6); }

.section-h h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }

/* kartu level */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lv-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 16px; text-decoration: none; color: var(--ink); background: linear-gradient(180deg, rgba(26, 22, 64, .9), rgba(12, 10, 36, .9)); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.lv-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.lv-card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 0 28px color-mix(in srgb, var(--c) 40%, transparent); }
.lv-top { display: flex; justify-content: space-between; }
.lv-num { font-family: var(--f-display); font-size: 4.6rem; line-height: .95; color: var(--c); text-shadow: 0 0 8px color-mix(in srgb, var(--c) 80%, transparent), 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); }
.lv-card h3 { font-size: 1.2rem; }
.lv-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.lv-card ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; font-size: .88rem; }
.lv-card li { display: flex; gap: 8px; }
.lv-card li::before { content: "▸"; color: var(--c); }
.xp { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.xp-bar { flex: 1; height: 10px; border: 1px solid var(--line); border-radius: 3px; background: #0a0820; overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 8px); box-shadow: 0 0 10px var(--c); }
.lv-go { align-self: flex-end; opacity: .6; transition: opacity .18s; }
.lv-card:hover .lv-go { opacity: 1; }

/* stage cara main */
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stage { display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(17, 14, 43, .75); }
.stage .px { color: var(--cyan); }
.stage:last-child .px { color: var(--bad); }
.stage b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; }
.stage span:last-child { font-size: .86rem; color: var(--muted); }

footer { border-top-color: var(--line); }

@media (max-width: 900px) {
  .arcade { grid-template-columns: 1fr; gap: 24px; }
  .levels { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .stages { grid-template-columns: 1fr; } .hud div { flex: 1; min-width: 0; } }
