:root {
  --bg: #010302;
  --panel: rgba(1, 8, 4, 0.91);
  --panel-2: rgba(2, 17, 8, 0.9);
  --green: #5dff8b;
  --green-strong: #21ff63;
  --green-dim: #1bb34a;
  --green-dark: #0a5525;
  --white: #dfffe8;
  --muted: #7eab8a;
  --red: #ff5f57;
  --amber: #febc2e;
  --border: rgba(75, 255, 130, 0.28);
  --glow: 0 0 8px rgba(33,255,99,.45), 0 0 24px rgba(33,255,99,.12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 20%, #07170c 0%, #020603 45%, #000 100%);
  color: var(--green);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-x: hidden;
}

button, input { font: inherit; }

#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .27;
  filter: blur(.1px);
}

.noise, .scanlines, .vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 3;
}
.noise {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
.scanlines {
  opacity: .16;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(100,255,130,.08) 3px, transparent 4px);
  mix-blend-mode: screen;
}
.vignette { box-shadow: inset 0 0 180px rgba(0,0,0,.94); }

.shell {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  min-height: min(780px, calc(100vh - 56px));
  margin: 28px auto;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,9,4,.96), rgba(0,4,2,.95));
  box-shadow: 0 0 0 1px rgba(33,255,99,.05), 0 0 46px rgba(0,255,80,.12), inset 0 0 50px rgba(0,255,80,.025);
  border-radius: 10px;
  overflow: hidden;
}

.topbar {
  height: 46px;
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(9,27,15,.95), rgba(2,12,6,.95));
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.window-controls { display: flex; gap: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
.dot.red { background: var(--red); color: var(--red); }
.dot.amber { background: var(--amber); color: var(--amber); }
.dot.green { background: var(--green-strong); color: var(--green-strong); }
.topbar-title { text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status { justify-self: end; display: inline-flex; gap: 7px; align-items: center; color: var(--green); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-strong); box-shadow: 0 0 10px var(--green-strong); }

.terminal { min-height: calc(100% - 80px); padding: 20px 24px 16px; }

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.hud > div {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(64,255,120,.16);
  background: linear-gradient(180deg, rgba(8,35,17,.28), rgba(3,16,8,.22));
}
.hud-label { display:block; color: var(--muted); font-size: 9px; letter-spacing: .14em; margin-bottom: 4px; }
.hud strong { display:block; font-size: 12px; letter-spacing: .04em; color: var(--white); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.hud .online { color: var(--green-strong); text-shadow: var(--glow); }

.terminal-output {
  min-height: 470px;
  max-height: 59vh;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--green-dark) transparent;
}
.terminal-output::-webkit-scrollbar { width: 7px; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--green-dark); }

.line { margin: 0 0 8px; line-height: 1.58; font-size: 14px; color: var(--green); text-shadow: 0 0 5px rgba(73,255,125,.12); }
.line.dim { color: var(--muted); }
.line.white { color: var(--white); }
.line.error { color: #ff7b72; }
.line.warn { color: #f7d774; }
.line.success { color: var(--green-strong); }
.line.command { color: var(--white); margin-top: 13px; }
.line.command .cmd-prompt { color: var(--green-dim); }

.ascii {
  margin: 4px 0 16px;
  color: var(--green-strong);
  font-weight: 700;
  line-height: 1.08;
  font-size: clamp(9px, 1.25vw, 14px);
  white-space: pre;
  text-shadow: var(--glow);
}

.section-title {
  margin: 13px 0 7px;
  color: var(--white);
  font-weight: 700;
  letter-spacing: .08em;
}
.kv { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 8px 18px; margin: 8px 0 14px; }
.kv .key { color: var(--muted); }
.kv .value { color: var(--green); }

.skill-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 18px; margin: 8px 0 15px; }
.skill { display:flex; justify-content:space-between; gap:16px; border-bottom:1px dotted rgba(90,255,130,.18); padding: 6px 0; }
.skill span:first-child { color: var(--white); }
.skill span:last-child { color: var(--green-dim); white-space: nowrap; }

.tag { display:inline-block; padding: 2px 7px; margin: 2px 4px 2px 0; border:1px solid rgba(70,255,120,.27); color:var(--green); background:rgba(30,255,80,.04); }

.prompt-row {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  border-top: 1px solid rgba(77,255,130,.12);
  margin-top: 12px;
  padding-top: 12px;
}
.prompt { white-space: nowrap; font-size: 14px; }
.prompt .user { color: var(--white); font-weight:600; }
.prompt .at { color: var(--muted); }
.prompt .host { color: var(--green-strong); font-weight:600; }
.prompt .path { color: var(--green-dim); }
#command-input {
  flex: 1;
  min-width: 0;
  color: var(--green-strong);
  background: transparent;
  border: 0;
  outline: 0;
  caret-color: var(--green-strong);
  text-shadow: var(--glow);
}
.fake-cursor { display:none; }

.quick-commands { display:block; margin-top:12px; }
.quick-command-row { display:flex; flex-wrap:wrap; gap:7px; }
.quick-sequence-label {
  margin: 2px 0 7px;
  color: rgba(91, 190, 117, .72);
  font-size: 9px;
  letter-spacing: .12em;
}
.quick-sequence-label.utility-label { margin-top:10px; opacity:.72; }
.quick-commands button {
  appearance:none;
  border:1px solid rgba(70,255,120,.22);
  background:rgba(13,48,22,.26);
  color:var(--muted);
  padding:6px 9px;
  border-radius:4px;
  cursor:pointer;
  transition:.15s ease;
}
.quick-commands button span {
  color: var(--green-strong);
  opacity:.82;
  margin-right:4px;
  font-size:.88em;
}
.primary-path button { border-color:rgba(70,255,120,.3); }
.utility-path button { opacity:.82; }
.quick-commands button:hover, .quick-commands button:focus-visible {
  color:var(--green-strong);
  border-color:rgba(70,255,120,.7);
  box-shadow:0 0 12px rgba(33,255,99,.12);
  outline:none;
}

.footer {
  height: 34px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 16px;
  border-top:1px solid rgba(67,255,120,.14);
  color:rgba(100,183,123,.7);
  font-size:10px;
  letter-spacing:.08em;
}

a { color: var(--green-strong); text-decoration: none; border-bottom: 1px dotted var(--green-dark); }
a:hover { color: var(--white); border-bottom-color: var(--green-strong); }

.glitch { animation: glitch .28s linear 1; }
@keyframes glitch {
  0% { transform:translateX(0); filter:none; }
  20% { transform:translateX(2px); filter:hue-rotate(45deg); }
  40% { transform:translateX(-3px); }
  60% { transform:translateX(1px); filter:brightness(1.5); }
  100% { transform:translateX(0); filter:none; }
}
@keyframes pulse { 50% { opacity:.45; } }

@media (max-width: 760px) {
  .shell { width: calc(100% - 16px); margin: 8px auto; min-height: calc(100vh - 16px); border-radius: 6px; }
  .terminal { padding: 14px 14px 10px; }
  .topbar { grid-template-columns: 72px 1fr 54px; padding:0 10px; }
  .topbar-title { font-size:10px; }
  .hud { grid-template-columns: repeat(2, 1fr); }
  .hud > div { padding:9px; }
  .terminal-output { max-height: 58vh; min-height: 390px; }
  .line, .prompt { font-size: 12px; }
  .skill-grid { grid-template-columns:1fr; }
  .kv { grid-template-columns: 1fr; gap:2px; }
  .kv .key { margin-top:5px; }
  .quick-command-row { gap:5px; }
  .quick-sequence-label { font-size:8px; }
  .quick-commands button { font-size:10px; padding:5px 7px; }
  .footer span:first-child { display:none; }
  .footer { justify-content:flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  #matrix, .scanlines { display:none; }
  *, *::before, *::after { animation:none !important; scroll-behavior:auto !important; }
}

/* V2 project dossiers */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.project-card {
  width: 100%;
  border: 1px solid rgba(70,255,120,.2);
  background: linear-gradient(180deg, rgba(8,35,17,.24), rgba(2,14,7,.18));
  padding: 13px;
  box-shadow: inset 0 0 24px rgba(33,255,99,.015);
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.project-card:hover, .project-card:focus-visible {
  border-color: rgba(70,255,120,.55);
  background: linear-gradient(180deg, rgba(8,45,20,.34), rgba(2,18,8,.24));
  outline: none;
}
.project-card:active { transform: translateY(1px); }
.project-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.project-card-head strong { color: var(--white); font-size: 13px; }
.project-card-head span { color: var(--green-dim); font-size: 9px; text-align: right; letter-spacing: .06em; }
.project-card p { margin: 0 0 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.project-tags { margin: 6px 0 8px; }
.project-open { color: var(--green-dim); font-size: 10px; border-top: 1px dotted rgba(80,255,120,.14); padding-top: 8px; }
.case-file {
  border-left: 2px solid rgba(33,255,99,.38);
  padding-left: 14px;
  margin: 8px 0 16px;
}
.case-heading {
  color: var(--white);
  margin: 13px 0 7px;
  font-size: 11px;
  letter-spacing: .08em;
}
.terminal-list { margin: 6px 0 12px; padding-left: 18px; color: var(--green); }
.terminal-list li { margin: 5px 0; line-height: 1.45; }
.terminal-list li::marker { content: "> "; color: var(--green-dim); }
.tree { color: var(--white); line-height: 1.5; font-size: 12px; margin: 8px 0 12px; }
.decrypt-box { margin: 8px 0 14px; border: 1px solid rgba(70,255,120,.24); padding: 12px; background: rgba(2,18,8,.28); }
.decrypt-label { color: var(--white); margin-bottom: 8px; }
.progress-track { height: 9px; border: 1px solid rgba(70,255,120,.28); background: rgba(0,0,0,.35); overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, rgba(33,255,99,.4), rgba(93,255,139,.95)); box-shadow: 0 0 14px rgba(33,255,99,.3); transition: width .2s ease; }
.decrypt-status { color: var(--muted); font-size: 10px; margin-top: 7px; }

@media (max-width: 760px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card-head { display: block; }
  .project-card-head span { display: block; text-align: left; margin-top: 4px; }
  .tree { font-size: 10px; overflow-x: auto; }
}


/* V5 // classic terminal identity */
.exe-ascii {
  margin-top: 4px;
  margin-bottom: 8px;
  color: var(--green-strong);
  font-size: clamp(9px, 1.22vw, 14px);
  letter-spacing: 0;
  filter: drop-shadow(0 0 4px rgba(33,255,99,.22));
}

.manifest-panel {
  border: 1px solid rgba(70,255,120,.22);
  padding: 12px 14px 4px;
  margin: 8px 0 14px;
  background: linear-gradient(135deg, rgba(10,37,18,.29), rgba(1,10,4,.18));
}
.manifest-head { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.manifest-chip {
  display:inline-block;
  padding:3px 7px;
  border:1px solid rgba(70,255,120,.3);
  color:var(--green-strong);
  background:rgba(33,255,99,.04);
  font-size:9px;
  letter-spacing:.1em;
}

@media (max-width: 760px) {
}


/* V6 full-screen power-on / BIOS boot */
.power-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  color: #b9ffc9;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  cursor: default;
  transition: opacity .38s ease, visibility .38s ease;
}
.power-boot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(102,255,135,.10) 3px, transparent 4px);
  mix-blend-mode: screen;
}
.power-boot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 190px rgba(0,0,0,.92);
}
.boot-screen {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 42px));
  margin: 0 auto;
  padding-top: clamp(34px, 7vh, 84px);
}
.boot-bios-head {
  color: #e2ffe9;
  font-size: clamp(12px, 1.4vw, 16px);
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 22px;
  text-shadow: 0 0 8px rgba(60,255,105,.25);
}
.power-boot-output {
  margin: 0;
  white-space: pre-wrap;
  min-height: 62vh;
  font: inherit;
  font-size: clamp(11px, 1.25vw, 14px);
  line-height: 1.48;
  color: #90e9a5;
  text-shadow: 0 0 5px rgba(56,255,102,.18);
}
.power-boot-output .ok { color: #39ff70; }
.power-boot-output .bright { color: #e2ffe9; }
.power-boot-output .dim { color: #4e915f; }
.boot-hint {
  position: absolute;
  left: 0;
  bottom: 26px;
  color: rgba(111,190,130,.46);
  font-size: 9px;
  letter-spacing: .14em;
  animation: bootHintPulse 1.2s steps(2,end) infinite;
}
.boot-crt-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: #d9ffe2;
  opacity: 0;
}
.power-boot.powering-on .boot-crt-flash { animation: crtPowerOn .56s ease-out 1; }
.power-boot.boot-exit .boot-screen { animation: crtCollapse .32s ease-in forwards; }
.power-boot.boot-exit { opacity: 0; visibility: hidden; }
body.booting .shell,
body.booting #matrix,
body.booting .noise,
body.booting .scanlines,
body.booting .vignette { visibility: hidden; }
@keyframes crtPowerOn {
  0% { opacity: 0; transform: scaleY(.005) scaleX(.05); }
  18% { opacity: .95; transform: scaleY(.008) scaleX(.92); }
  45% { opacity: .36; transform: scaleY(.92) scaleX(1); }
  100% { opacity: 0; transform: scaleY(1) scaleX(1); }
}
@keyframes crtCollapse {
  0% { opacity:1; transform:scaleY(1) scaleX(1); filter:brightness(1); }
  72% { opacity:.9; transform:scaleY(.012) scaleX(1); filter:brightness(2.2); }
  100% { opacity:0; transform:scaleY(.002) scaleX(.16); filter:brightness(3); }
}
@keyframes bootHintPulse { 50% { opacity:.35; } }
@media (max-width: 600px) {
  .boot-screen { width: calc(100% - 24px); padding-top: 28px; }
  .power-boot-output { min-height: 72vh; line-height: 1.42; }
  .boot-hint { bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-crt-flash, .boot-hint, .power-boot.boot-exit .boot-screen { animation: none !important; }
  .power-boot { transition: none; }
}

/* Legacy manual-page styles */
.man-page {
  margin: 10px 0 14px;
  padding: 14px 16px;
  overflow-x: auto;
  border-left: 2px solid rgba(85,255,136,.45);
  background: rgba(2,14,7,.24);
  color: rgba(221,255,232,.92);
  font: inherit;
  line-height: 1.58;
  white-space: pre;
  text-shadow: 0 0 7px rgba(64,255,111,.08);
}


/* Exploration-aware intrusion finale */
.intrusion-screen {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  overflow: hidden;
  background: #000;
  color: #ff4d4d;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.intrusion-screen.active { display: block; }
.intrusion-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(255, 30, 30, .075) 3px, transparent 4px);
  opacity: .7;
}
.intrusion-screen.warning-phase {
  background: radial-gradient(circle at center, rgba(28,0,0,.94), #020000 64%, #000 100%);
  animation: intrusionBackgroundPulse .34s steps(2,end) infinite;
}
.intrusion-grid {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(255,50,50,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,50,50,.12) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(700px) rotateX(58deg) scale(1.45) translateY(18%);
  transform-origin: center bottom;
}
.intrusion-crt {
  position: relative;
  z-index: 2;
  width: min(940px, calc(100% - 44px));
  margin: 0 auto;
  padding-top: clamp(42px, 9vh, 110px);
  transform-origin: center;
}
.intrusion-classification {
  margin-bottom: 22px;
  color: rgba(255,128,128,.65);
  letter-spacing: .15em;
  font-size: 10px;
}
.intrusion-output {
  min-height: 60vh;
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: clamp(12px, 1.32vw, 16px);
  line-height: 1.62;
  color: #ff5e5e;
  text-shadow: 0 0 10px rgba(255, 30, 30, .45);
}
.intrusion-output .bright { color: #ffd4d4; }
.intrusion-output .warn { color: #ff8e4d; }
.intrusion-output .critical { color: #ff3434; font-weight: 700; }
.intrusion-output .ok { color: #59ff87; }
.intrusion-output .intrusion-title {
  display: block;
  margin: 7px 0;
  color: #fff;
  font-size: clamp(22px, 4vw, 50px);
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 2px 0 #ff0000, -2px 0 #6b0000, 0 0 28px rgba(255,0,0,.9);
  animation: intrusionTextGlitch .13s steps(2,end) infinite;
}
body.intrusion-detected .shell {
  animation: shellIntrusionGlitch .12s steps(2,end) infinite;
  filter: hue-rotate(295deg) contrast(1.35) brightness(.78);
}
body.intrusion-detected #matrix {
  filter: hue-rotate(295deg) saturate(2.2) contrast(1.45);
}
.intrusion-screen.crt-kill .intrusion-crt {
  animation: intrusionCrtKill .48s cubic-bezier(.77,0,.18,1) forwards;
}
.intrusion-screen.crt-kill::after {
  content: "";
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 24px #ff3030, 0 0 70px #fff;
  animation: killLine .48s ease-out forwards;
}
.intrusion-screen.blackout { background: #000; }
.terminated-state {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  background: #000;
}
.terminated-state[hidden] { display: none; }
.terminated-code {
  color: #d8d8d8;
  font-size: clamp(17px, 2.6vw, 31px);
  letter-spacing: .16em;
  text-shadow: 0 0 10px rgba(255,255,255,.12);
}
.terminated-reason {
  color: #6b6b6b;
  font-size: 10px;
  letter-spacing: .13em;
}
.reconnect-button {
  margin-top: 14px;
  min-width: 160px;
  min-height: 44px;
  border: 1px solid rgba(90,255,130,.5);
  background: rgba(10,38,17,.28);
  color: #54ff85;
  font: inherit;
  font-size: 12px;
  letter-spacing: .1em;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(33,255,99,.08);
}
.reconnect-button:hover,
.reconnect-button:focus-visible {
  outline: none;
  background: rgba(33,255,99,.09);
  border-color: #54ff85;
  box-shadow: 0 0 24px rgba(33,255,99,.18);
}
.intrusion-screen.reconnecting {
  background: #000;
  color: #69ff91;
}
.intrusion-screen.reconnecting .intrusion-grid { opacity: .06; }
.intrusion-screen.reconnecting .intrusion-classification { color: rgba(90,255,130,.45); }
.intrusion-screen.reconnecting .intrusion-output {
  color: #79da91;
  text-shadow: 0 0 8px rgba(33,255,99,.14);
}
.intrusion-screen.reconnecting .intrusion-output .critical { color: #ff5e5e; }
.intrusion-screen.reconnecting .intrusion-output .warn { color: #ffae64; }
.intrusion-screen.reconnecting .intrusion-output .bright { color: #e4ffe9; }
.intrusion-screen.reconnecting .intrusion-output .ok { color: #46ff78; }
.intrusion-screen.reconnect-exit { opacity: 0; transition: opacity .35s ease; }

@keyframes intrusionBackgroundPulse {
  0%,100% { filter: brightness(.92); }
  50% { filter: brightness(1.18); }
}
@keyframes intrusionTextGlitch {
  0% { transform: translate(0); clip-path: inset(0 0 0 0); }
  33% { transform: translate(2px,-1px); clip-path: inset(8% 0 58% 0); }
  66% { transform: translate(-2px,1px); clip-path: inset(52% 0 9% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); }
}
@keyframes shellIntrusionGlitch {
  0% { transform: translate(0); }
  25% { transform: translate(2px,-1px); }
  50% { transform: translate(-1px,1px); }
  75% { transform: translate(1px,0); }
  100% { transform: translate(0); }
}
@keyframes intrusionCrtKill {
  0% { opacity: 1; transform: scaleX(1) scaleY(1); filter: brightness(1); }
  58% { opacity: .96; transform: scaleX(1) scaleY(.018); filter: brightness(3); }
  82% { opacity: 1; transform: scaleX(.18) scaleY(.006); filter: brightness(7); }
  100% { opacity: 0; transform: scaleX(.02) scaleY(.002); filter: brightness(10); }
}
@keyframes killLine {
  0% { opacity: 0; transform: scaleX(.05); }
  40% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(.02); }
}
@media (max-width: 600px) {
  .intrusion-crt { width: calc(100% - 24px); padding-top: 38px; }
  .intrusion-output { min-height: 68vh; line-height: 1.5; }
  .intrusion-output .intrusion-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  body.intrusion-detected .shell,
  .intrusion-screen.warning-phase,
  .intrusion-output .intrusion-title,
  .intrusion-screen.crt-kill .intrusion-crt,
  .intrusion-screen.crt-kill::after { animation: none !important; }
  .intrusion-screen.crt-kill .intrusion-crt { opacity: 0; }
}

/* CV artifact handoff ------------------------------------------------------ */
.cv-loader-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 255, 89, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 89, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 50% 46%, rgba(0, 255, 89, 0.07), transparent 33%),
    #010402;
  background-size: 28px 28px, 28px 28px, auto, auto;
  color: #8cffad;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.cv-loader-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0,
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 4px
  );
}

.cv-loader-shell {
  width: min(640px, calc(100% - 52px));
  border: 1px solid rgba(0, 255, 89, 0.28);
  background: rgba(1, 10, 4, 0.84);
  box-shadow: 0 0 32px rgba(0, 255, 89, 0.07), inset 0 0 28px rgba(0, 255, 89, 0.02);
  padding: 28px 30px 24px;
}

.cv-loader-eyebrow,
.cv-loader-meta {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.13em;
}

.cv-loader-title {
  display: inline-flex;
  align-items: center;
  gap: 0.16em;
  margin-top: 10px;
  padding: 3px 10px 5px;
  border: 1px solid rgba(64,255,120,.16);
  background: linear-gradient(180deg, rgba(8,35,17,.24), rgba(3,16,8,.20));
  color: var(--white);
  font-size: clamp(22px, 4.4vw, 38px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow: 0 0 6px rgba(73,255,125,.16);
}

.cv-loader-title::before,
.cv-loader-title::after {
  color: var(--green-strong);
  text-shadow: 0 0 6px rgba(33,255,99,.22);
}

.cv-loader-title::before { content: "["; }
.cv-loader-title::after { content: "]"; }

.cv-loader-rule {
  height: 1px;
  margin: 18px 0 16px;
  background: linear-gradient(90deg, rgba(0,255,89,.54), rgba(0,255,89,.03));
}

.cv-loader-status {
  min-height: 24px;
  color: var(--green);
  font-size: 14px;
  line-height: 1.58;
  letter-spacing: 0.01em;
  text-shadow: 0 0 4px rgba(73,255,125,.10);
}

.cv-loader-prompt { color: var(--green-strong); text-shadow: 0 0 6px rgba(33,255,99,.22); }

.cv-loader-dots {
  display: inline-block;
  width: 3ch;
  overflow: hidden;
  vertical-align: bottom;
  animation: cv-loader-dots 1.25s steps(4, end) infinite;
}

.cv-loader-track {
  position: relative;
  height: 2px;
  margin: 18px 0 16px;
  overflow: hidden;
  background: rgba(0, 255, 89, 0.09);
}

.cv-loader-scan {
  position: absolute;
  inset-block: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, #00ff59, transparent);
  filter: drop-shadow(0 0 4px rgba(0,255,89,.55));
  animation: cv-loader-scan 1.45s ease-in-out infinite;
}

@keyframes cv-loader-scan {
  from { transform: translateX(-120%); }
  to { transform: translateX(390%); }
}

@keyframes cv-loader-dots {
  0% { width: 0; }
  100% { width: 3ch; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-loader-scan, .cv-loader-dots { animation: none; }
  .cv-loader-dots { width: 3ch; }
}
