:root {
  --bg: #05070a;
  --panel: #0b1016;
  --deep: #05080b;
  --line: #17212b;
  --fg: #e6f1ec;
  --muted: #7d8a92;
  --green: #39ff88;
  --cyan: #00e5ff;
  --red: #ff3b5c;
  --purple: #a06bff;
  --yellow: #ffd23f;
  --orange: #ff8a3d;
  --pink: #ff5fa2;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "SFMono-Regular", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  cursor: none;
}
a, button { color: inherit; text-decoration: none; cursor: none; font: inherit; }
button { background: none; border: none; }
input, textarea { cursor: text; font-family: var(--mono); }
code { font-family: var(--mono); font-size: .9em; color: var(--cyan); }
::selection { background: var(--green); color: #000; }
@media (hover: none) { body, a, button { cursor: auto; } .cursor, .cursor-dot { display: none; } }

/* ---------- global overlays ---------- */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
}
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--purple));
  transform-origin: 0 50%; transform: scaleX(0); z-index: 120;
  box-shadow: 0 0 12px var(--green);
}
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 300; border-radius: 50%; }
.cursor {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid var(--green); box-shadow: 0 0 12px rgba(57,255,136,.4);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
}
.cursor.hover { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(57,255,136,.12); border-color: var(--cyan); }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--green); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 5vw;
  background: linear-gradient(to bottom, rgba(5,7,10,.9), rgba(5,7,10,0));
}
.logo { font-family: var(--mono); font-weight: 700; letter-spacing: .12em; font-size: 1rem; }
.logo b { color: var(--green); }
.logo .br { color: var(--muted); }
.blink { color: var(--green); font-style: normal; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 2rem; align-items: center; font-size: .88rem; font-family: var(--mono); }
.nav-links a { position: relative; }
.nav-links a:not(.pill)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--green); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav-links a:not(.pill):hover::after { transform: scaleX(1); transform-origin: left; }
.pill { border: 1px solid var(--green); color: var(--green); padding: .55rem 1.1rem; border-radius: 99px; display: inline-block; }

/* ---------- shared type ---------- */
.eyebrow { font-family: var(--mono); letter-spacing: .12em; font-size: .8rem; color: var(--green); margin-bottom: 1.2rem; }
.section-title { font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.section-title em, .intro-panel h2 span {
  font-style: normal;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--purple), var(--green));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
.section-sub { color: var(--muted); max-width: 60ch; margin: 1.2rem 0 3.5rem; line-height: 1.6; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; padding: 130px 5vw 120px;
  display: grid; place-items: center; text-align: center; overflow: hidden;
}
#net { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(5,7,10,.55) 0%, transparent 45%, var(--bg) 92%);
}
.hero-content { position: relative; z-index: 2; width: 100%; }
h1 { font-size: clamp(3rem, 9vw, 8rem); line-height: .95; font-weight: 900; letter-spacing: -.04em; max-width: 11ch; margin: 0 auto; }
.sub { max-width: 52ch; margin: 1.8rem auto 2.2rem; color: #a9b6bd; font-size: 1.05rem; line-height: 1.6; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.split .word { display: inline-block; white-space: nowrap; }
.split .char {
  display: inline-block; opacity: 0; transform: translateY(110%) rotate(12deg);
  transition: transform 1s var(--ease), opacity 1s var(--ease), color .3s;
  transition-delay: calc(var(--i) * 35ms);
}
.split.in .char { opacity: 1; transform: none; }
.split .char:hover { color: var(--green); transition-delay: 0s; transform: translateY(-8%) rotate(-6deg); }

.glitch.in { animation: glitch 5s infinite steps(1); }
@keyframes glitch {
  0%, 86%, 100% { text-shadow: none; transform: none; }
  87% { text-shadow: 3px 0 var(--red), -3px 0 var(--cyan); transform: translateX(2px) skewX(-4deg); }
  89% { text-shadow: -4px 0 var(--red), 4px 0 var(--cyan); transform: translateX(-3px); }
  91% { text-shadow: 2px 2px var(--green), -2px -2px var(--red); transform: skewX(6deg); }
  93% { text-shadow: -2px 0 var(--cyan); transform: translateX(1px); }
}

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2.2rem; border-radius: 99px; overflow: hidden;
  background: var(--green); color: #031008; font-weight: 700; letter-spacing: .04em; font-family: var(--mono);
}
.btn span { position: relative; z-index: 1; transition: color .4s; }
.btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, var(--cyan), var(--purple));
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: none; }
.btn:hover span { color: #fff; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px #2c3a46; }
.btn.big { padding: 1.4rem 3.2rem; font-size: 1.1rem; margin-top: 2.5rem; }

.terminal {
  max-width: 600px; margin: 3rem auto 0; text-align: left;
  background: rgba(8,12,16,.85); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(8px); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3640; }
.term-bar i:nth-child(1) { background: var(--red); }
.term-bar i:nth-child(2) { background: var(--yellow); }
.term-bar i:nth-child(3) { background: var(--green); }
.term-bar span { margin-left: .6rem; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
#typer { font-family: var(--mono); font-size: .82rem; line-height: 1.7; padding: 1rem 1.2rem; min-height: 9.6em; color: var(--fg); white-space: pre-wrap; }
#typer .ok { color: var(--green); }
#typer .warn { color: var(--yellow); }
#typer .dim { color: var(--muted); }
#typer .caret { display: inline-block; width: .6em; height: 1.1em; background: var(--green); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 1.5px solid var(--muted); border-radius: 20px; z-index: 2; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--green); border-radius: 4px; animation: wheel 1.8s infinite var(--ease); }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; padding: 2rem 0; transform: rotate(-2deg) scale(1.05); background: var(--green); color: #031008; }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-family: var(--mono); font-size: clamp(1.6rem, 4.5vw, 3.6rem); font-weight: 800; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- vuln cards ---------- */
.vulns { padding: 12rem 5vw 8rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; perspective: 1200px; }
.card {
  position: relative; min-height: 380px; padding: 2rem; border-radius: 24px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  transform-style: preserve-3d; will-change: transform; outline: none;
}
.card.settled { transition: opacity 1.1s var(--ease), transform .25s ease-out, border-color .3s; transition-delay: 0s; }
.card:hover, .card:focus-visible { border-color: color-mix(in srgb, var(--h1) 60%, transparent); }
.card-glow {
  position: absolute; inset: -40%; z-index: 0; opacity: .28;
  background: radial-gradient(circle at var(--mx, 70%) var(--my, 20%), var(--h1), transparent 38%),
              radial-gradient(circle at calc(100% - var(--mx, 70%)) 85%, var(--h2), transparent 42%);
  filter: blur(34px); transition: opacity .5s;
}
.card:hover .card-glow { opacity: .75; }
.card > *:not(.card-glow) { position: relative; z-index: 1; transform: translateZ(40px); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.num { font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: var(--muted); }
.sev { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 99px; border: 1px solid; }
.sev-critical { color: var(--red); border-color: var(--red); background: rgba(255,59,92,.08); }
.sev-high { color: var(--orange); border-color: var(--orange); background: rgba(255,138,61,.08); }
.sev-medium { color: var(--yellow); border-color: var(--yellow); background: rgba(255,210,63,.08); }
.sig {
  display: block; font-size: 1.25rem; color: var(--h1); text-shadow: 0 0 18px color-mix(in srgb, var(--h1) 60%, transparent);
  margin: 1.5rem 0; word-break: break-all;
}
.cwe { font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .1em; }
.card h3 { font-size: 1.7rem; font-weight: 800; margin: .3rem 0 .6rem; letter-spacing: -.01em; }
.card p { color: #b9c6cc; line-height: 1.5; font-size: .95rem; }
.card-cta { display: inline-block; margin-top: 1.2rem; font-family: var(--mono); font-size: .8rem; color: var(--h1); transition: transform .4s var(--ease); }
.card:hover .card-cta { transform: translateX(8px); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; pointer-events: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,4,6,.75); backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s; }
.modal-panel {
  position: relative; width: min(1000px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 3rem;
  opacity: 0; transform: translateY(40px) scale(.97); transition: opacity .45s var(--ease), transform .6s var(--ease);
  scrollbar-width: thin; scrollbar-color: #26323d transparent;
}
.modal.open { pointer-events: auto; }
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-panel { opacity: 1; transform: none; }
.modal-close { position: absolute; top: 1.4rem; right: 1.4rem; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); font-size: 1rem; transition: transform .4s var(--ease), border-color .3s; }
.modal-close:hover { transform: rotate(90deg); border-color: var(--red); color: var(--red); }
.m-head { border-left: 3px solid var(--h1); padding-left: 1.4rem; margin-bottom: 2.5rem; }
.m-head h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.03em; margin: .4rem 0 .6rem; }
.m-head p { color: #b9c6cc; font-size: 1.1rem; line-height: 1.5; max-width: 60ch; }
.modal h4 { font-family: var(--mono); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 2.4rem 0 1.2rem; display: flex; align-items: center; gap: 1rem; }
.replay { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; color: var(--cyan); border: 1px solid #23303b; padding: .3rem .7rem; border-radius: 99px; text-transform: none; }

.flow { list-style: none; position: relative; padding-left: 0; }
.flow li {
  position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 1.2rem; align-items: start;
  padding: 1rem 0 1rem 2rem; opacity: 0; transform: translateX(-24px);
}
.flow li::before { content: ""; position: absolute; left: 6px; top: 1.35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 12px var(--c, var(--cyan)); }
.flow li::after { content: ""; position: absolute; left: 10px; top: 2.2rem; bottom: -1rem; width: 2px; background: linear-gradient(var(--c, var(--cyan)), transparent); transform: scaleY(0); transform-origin: top; }
.flow li:last-child::after { display: none; }
.flow.play li { animation: stepIn .7s var(--ease) forwards; animation-delay: calc(var(--i) * .55s); }
.flow.play li::after { animation: grow .5s var(--ease) forwards; animation-delay: calc(var(--i) * .55s + .35s); }
@keyframes stepIn { to { opacity: 1; transform: none; } }
@keyframes grow { to { transform: scaleY(1); } }
.actor { font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); padding-top: .15rem; }
.flow p { line-height: 1.55; color: #d4dfe4; }
.a-attacker { --c: var(--red); }
.a-victim { --c: var(--purple); }
.a-result { --c: var(--yellow); }
.a-system { --c: var(--cyan); }

.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.code-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--deep); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; font-family: var(--mono); font-size: .78rem; border-bottom: 1px solid var(--line); }
.code-head small { color: var(--muted); }
.code-card.bad .code-head span { color: var(--red); }
.code-card.good .code-head span { color: var(--green); }
.code-card pre.code { border: none; border-radius: 0; margin: 0; }
.defenses { list-style: none; display: grid; gap: .7rem; }
.defenses li { position: relative; padding: .9rem 1rem .9rem 2.6rem; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; line-height: 1.5; color: #d4dfe4; }
.defenses li::before { content: "✓"; position: absolute; left: 1rem; top: .9rem; color: var(--green); font-weight: 700; }
.real { margin-top: 2rem; padding: 1rem 1.2rem; border-radius: 12px; background: rgba(255,210,63,.06); border: 1px dashed rgba(255,210,63,.4); color: #e8dcae; line-height: 1.5; }
.real b { color: var(--yellow); font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-right: .4rem; }
.lab-link { margin-top: 2rem; }

/* ---------- code / tokens ---------- */
pre.code {
  font-family: var(--mono); font-size: .82rem; line-height: 1.65; background: var(--deep);
  border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem;
  white-space: pre-wrap; word-break: break-word; color: #cfd8dc; overflow-x: auto;
}
pre.code.small { font-size: .78rem; margin-top: 1rem; }
.k { color: var(--pink); font-weight: 600; }
.s { color: var(--green); }
.n { color: var(--yellow); }
.o { color: var(--cyan); }
.c { color: #5b6a74; font-style: italic; }
.c.strike { text-decoration: line-through; text-decoration-color: var(--red); }
.bad-tok { text-decoration: wavy underline var(--red); }
.t { color: var(--pink); }
.danger { color: var(--red); background: rgba(255,59,92,.14); border-radius: 3px; }

/* ---------- kill chain ---------- */
.hscroll { height: 550vh; position: relative; }
.hscroll-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.hscroll-track { display: flex; gap: 3vw; padding-left: 5vw; will-change: transform; }
.panel {
  position: relative; flex: 0 0 min(70vw, 560px); height: 68vh; min-height: 420px; border-radius: 28px;
  background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 2.6rem;
}
.panel > *:not(.blob) { position: relative; }
.phase { font-family: var(--mono); color: var(--muted); font-size: .8rem; letter-spacing: .2em; }
.panel h3 { font-size: clamp(2rem, 4.2vw, 3.6rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; margin: .5rem 0 1.4rem; }
.panel p { line-height: 1.5; margin-top: .6rem; color: #c3cfd4; }
.panel p b { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; display: inline-block; width: 6.5rem; }
.panel .atk b { color: var(--red); }
.panel .def b { color: var(--green); }
.intro-panel { background: transparent; border: none; justify-content: center; flex-basis: min(60vw, 560px); }
.intro-panel h2 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 900; line-height: .95; letter-spacing: -.04em; }
.intro-panel h2 span { display: inline-block; margin-left: .2em; animation: shimmer 6s linear infinite, nudge 1.4s infinite var(--ease); }
.intro-note { color: var(--muted); max-width: 36ch; margin-top: 1.5rem; line-height: 1.6; }
@keyframes nudge { 50% { transform: translateX(20px); } }
.blob {
  position: absolute; width: 65%; aspect-ratio: 1; top: -12%; right: -14%;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  filter: blur(8px); opacity: .7; animation: morph 9s ease-in-out infinite alternate;
}
@keyframes morph {
  0% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0) scale(1); }
  50% { border-radius: 70% 30% 35% 65% / 60% 30% 70% 40%; transform: rotate(120deg) scale(1.1); }
  100% { border-radius: 30% 70% 60% 40% / 50% 60% 40% 50%; transform: rotate(240deg) scale(.95); }
}

/* ---------- labs ---------- */
.labs { padding: 10rem 5vw 8rem; }
.lab-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tab { font-family: var(--mono); font-size: .85rem; padding: .7rem 1.2rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); transition: all .3s var(--ease); }
.tab:hover { color: var(--fg); border-color: #2c3a46; }
.tab.active { background: var(--green); border-color: var(--green); color: #031008; font-weight: 700; }
.lab-window { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); padding: 2.2rem; position: relative; overflow: hidden; }
.lab-window::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(57,255,136,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(57,255,136,.03) 1px, transparent 1px); background-size: 32px 32px; }
.lab-panel { display: none; position: relative; }
.lab-panel.active { display: block; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 2.5rem; }
.lab-controls h3 { font-size: 1.6rem; font-weight: 800; }
.lab-desc { color: #a9b6bd; line-height: 1.55; margin-top: .5rem; }
.lab-controls label { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-top: 1.1rem; }
.lab-controls input:not([type=checkbox]), .lab-controls textarea {
  display: block; width: 100%; margin-top: .45rem; background: var(--deep); border: 1px solid var(--line);
  border-radius: 10px; padding: .8rem 1rem; color: var(--fg); font-size: .95rem; letter-spacing: 0; text-transform: none;
  outline: none; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.lab-controls input:focus, .lab-controls textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,255,136,.14); }
.lab-controls label.check { display: flex; align-items: center; gap: .6rem; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--fg); margin-top: 1.3rem; }
.lab-controls label.check small { color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; align-items: center; }
.presets > span { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-right: .2rem; }
.presets button, .presets select {
  font-family: var(--mono); font-size: .76rem; padding: .42rem .7rem; border-radius: 8px;
  border: 1px dashed #2a3642; color: var(--cyan); background: transparent; transition: all .25s;
}
.presets select { color: var(--fg); background: var(--deep); border-style: solid; }
.presets button:hover { border-color: var(--cyan); background: rgba(0,229,255,.08); }
.toggle { display: inline-flex; margin-top: 1.3rem; border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.toggle button { padding: .5rem 1.05rem; border-radius: 99px; font-size: .8rem; font-family: var(--mono); color: var(--muted); transition: all .3s; }
.toggle button.active[data-mode=vuln] { background: var(--red); color: #1a0006; font-weight: 700; }
.toggle button.active[data-mode=safe] { background: var(--green); color: #031008; font-weight: 700; }

.out-block { margin-bottom: 1.2rem; }
.out-label { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.verdict { padding: .95rem 1.2rem; border-radius: 12px; font-family: var(--mono); font-weight: 700; font-size: .92rem; border: 1px solid var(--line); line-height: 1.45; }
.verdict.ok { border-color: rgba(57,255,136,.5); color: var(--green); background: rgba(57,255,136,.07); }
.verdict.bad { border-color: rgba(255,59,92,.6); color: var(--red); background: rgba(255,59,92,.08); animation: alarm 1.2s ease-out; }
.verdict.warn { border-color: rgba(255,210,63,.5); color: var(--yellow); background: rgba(255,210,63,.07); }
.verdict.info { border-color: rgba(0,229,255,.4); color: var(--cyan); background: rgba(0,229,255,.06); }
.verdict.neutral { color: var(--muted); }
@keyframes alarm { 0%, 30%, 60% { box-shadow: 0 0 0 0 rgba(255,59,92,.6); } 15%, 45% { box-shadow: 0 0 30px 2px rgba(255,59,92,.5); } 100% { box-shadow: none; } }
.explain { list-style: none; margin-top: 1rem; display: grid; gap: .55rem; }
.explain li { position: relative; padding-left: 1.4rem; color: #b9c6cc; line-height: 1.55; font-size: .93rem; }
.explain li::before { content: "▸"; position: absolute; left: 0; color: var(--green); }
.explain.static { margin-top: 1.6rem; }

table.rows { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .8rem; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rows th { text-align: left; color: var(--muted); font-weight: 400; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.rows td { padding: .55rem .8rem; border-bottom: 1px solid #10171e; }
.rows tr.used td { color: var(--yellow); background: rgba(255,210,63,.06); }
.rows tr.used td:last-child::after { content: "  ← app logs in as this"; color: var(--muted); }
.empty { font-family: var(--mono); font-size: .82rem; color: var(--muted); padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: 12px; }

.dom-tree { font-family: var(--mono); font-size: .8rem; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; line-height: 1.8; max-height: 260px; overflow: auto; }
.dom-tree .node .node { padding-left: 1.2rem; border-left: 1px dashed #23303b; margin-left: .3rem; }
.dom-tree .tag { color: var(--pink); }
.dom-tree .tag.danger { padding: 0 .2rem; }
.dom-tree .attr { color: var(--cyan); margin-left: .4rem; }
.dom-tree .txt { color: #9fb0b8; }
.dom-tree em { color: #4d5b64; font-size: .7rem; margin-left: .4rem; }

.hex { font-family: var(--mono); font-size: .85rem; line-height: 1.7; word-break: break-all; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; color: #cfd8dc; }
.hex .d { color: #1a1300; background: var(--yellow); border-radius: 2px; }
.bitgrid { display: grid; grid-template-columns: repeat(32, 1fr); gap: 2px; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; }
.bitgrid i { aspect-ratio: 1; background: #121b23; border-radius: 2px; transition: background .35s, box-shadow .35s; transition-delay: calc(var(--i) * 2ms); }
.bitgrid i.on { background: var(--red); box-shadow: 0 0 6px var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
.chips span { font-family: var(--mono); font-size: .75rem; padding: .35rem .7rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); transition: all .3s; }
.chips span.on { border-color: var(--green); color: var(--green); background: rgba(57,255,136,.07); }
.pw-time small, .pw-stats small { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.pw-time strong { display: block; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; letter-spacing: -.02em; margin: .3rem 0 1rem; line-height: 1.1; }
.meter { height: 12px; border-radius: 99px; background: #121b23; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .6s var(--ease), background .6s; }
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0; }
.pw-stats strong { display: block; font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.stack { display: grid; grid-template-columns: 96px repeat(8, 1fr); gap: 4px; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; }
.row-label { font-family: var(--mono); font-size: .68rem; color: var(--muted); display: flex; align-items: center; line-height: 1.2; }
.byte { font-family: var(--mono); font-size: .76rem; text-align: center; padding: .4rem 0 .3rem; border-radius: 6px; border: 1px solid transparent; transition: background .25s, border-color .25s, color .25s; }
.byte small { display: block; font-size: .62rem; opacity: .65; min-height: 1em; }
.byte.r-buf { background: rgba(0,229,255,.06); color: #7fdfee; }
.byte.r-can { background: rgba(255,210,63,.08); color: #ecd27e; }
.byte.r-rbp { background: rgba(160,107,255,.09); color: #c3a6ff; }
.byte.r-ret { background: rgba(57,255,136,.08); color: #8cf5b7; }
.byte.w.r-buf { background: rgba(0,229,255,.2); border-color: rgba(0,229,255,.5); color: #fff; }
.byte.over { background: rgba(255,59,92,.28) !important; border-color: var(--red) !important; color: #fff !important; animation: hit .5s ease-out; }
@keyframes hit { from { transform: scale(1.25); box-shadow: 0 0 16px var(--red); } }
.legend { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .6rem; font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.legend .r-buf::before { background: var(--cyan); }
.legend .r-can::before { background: var(--yellow); }
.legend .r-rbp::before { background: var(--purple); }
.legend .r-ret::before { background: var(--green); }
.legend .r-over::before { background: var(--red); }
.rip { font-family: var(--mono); font-size: .85rem; margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--deep); }
.rip b { color: var(--muted); font-weight: 400; margin-right: .5rem; }
.rip .addr { color: var(--green); }
.rip .addr.hijacked { color: var(--red); text-shadow: 0 0 10px var(--red); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; padding: 8rem 5vw; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { text-align: center; }
.count { display: block; font-family: var(--mono); font-size: clamp(2rem, 4.6vw, 4rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--green); text-shadow: 0 0 24px rgba(57,255,136,.35); }
.stat small { color: var(--muted); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-family: var(--mono); }

/* ---------- learn ---------- */
.learn { padding: 9rem 5vw; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 3rem; }
.learn-card { padding: 1.8rem; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); transition: border-color .4s, transform .5s var(--ease), opacity 1.1s var(--ease); }
.learn-card:nth-child(2) { --d: .08s; }
.learn-card:nth-child(3) { --d: .16s; }
.learn-card:nth-child(4) { --d: .24s; }
.learn-card:hover { border-color: var(--green); transform: translateY(-6px); }
.learn-card span { font-weight: 800; font-size: 1.2rem; }
.learn-card p { color: var(--muted); margin-top: .6rem; line-height: 1.5; font-size: .93rem; }

/* ---------- footer ---------- */
.footer {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 5vw;
  background: radial-gradient(ellipse at 50% 120%, rgba(57,255,136,.16) 0%, var(--bg) 60%);
}
.giant { font-size: clamp(3.5rem, 13vw, 12rem); font-weight: 900; letter-spacing: -.05em; line-height: .9; }
.ethics { max-width: 52ch; color: #a9b6bd; margin-top: 2rem; line-height: 1.6; }
.tiny { margin-top: 4rem; color: var(--muted); font-size: .75rem; letter-spacing: .15em; font-family: var(--mono); }

@media (max-width: 900px) {
  .lab-grid, .code-grid { grid-template-columns: 1fr; }
  .flow li { grid-template-columns: 1fr; gap: .3rem; }
  .modal-panel { padding: 2rem 1.4rem; }
  .stack { grid-template-columns: 70px repeat(8, 1fr); }
  .byte { font-size: .66rem; }
}
@media (max-width: 700px) {
  .nav-links a:not(.pill) { display: none; }
  .panel { flex-basis: 84vw; padding: 1.8rem; }
  .stats { grid-template-columns: 1fr; }
  .lab-window { padding: 1.3rem; }
  .bitgrid { grid-template-columns: repeat(16, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split .char, .flow li { opacity: 1; transform: none; }
}
