:root {
  color-scheme: dark;
  --ink: #d9f2e4;
  --muted: #728e7d;
  --green: #8ef0ad;
  --bright: #c4ffd4;
  --amber: #e1b76f;
  --red: #df7774;
  --line: #1c3a2b;
  --base: #050a08;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(139 255 173 / 1.5%) 3px 4px), radial-gradient(ellipse at 50% 0%, #102319 0, var(--base) 68%);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.65;
}
body::after { position: fixed; inset: 0; z-index: 3; pointer-events: none; content: ""; background: linear-gradient(90deg, rgb(0 0 0 / 12%), transparent 10%, transparent 90%, rgb(0 0 0 / 12%)); }
.frame { width: min(1120px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; padding: 42px 0 22px; }
.masthead, .footerline, .terminal-topline { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.masthead { padding: 0 2px 18px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.identity, .system-state { display: flex; align-items: center; gap: 10px; }
.identity { color: var(--bright); font-weight: 700; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px var(--green); }
.divider { color: #385342; }
.terminal-shell { flex: 1; min-height: min(740px, calc(100vh - 150px)); display: flex; flex-direction: column; padding: 18px 22px 20px; border: 1px solid var(--line); background: linear-gradient(145deg, rgb(9 20 14 / 97%), rgb(4 9 7 / 98%)); box-shadow: 0 0 0 1px rgb(142 240 173 / 3%), 0 24px 100px rgb(0 0 0 / 45%), inset 0 1px rgb(255 255 255 / 2%); animation: terminal-arrive 480ms ease-out both; }
.terminal-topline { min-height: 26px; padding-bottom: 13px; border-bottom: 1px solid #183224; color: #688574; font-size: 10px; letter-spacing: .8px; }
.terminal-output { flex: 1; overflow: auto; padding: 20px 2px 12px; scrollbar-color: #254633 transparent; scrollbar-width: thin; }
.output-line { min-height: 1.65em; white-space: pre-wrap; overflow-wrap: anywhere; animation: line-in 120ms ease-out both; }
.accent { color: var(--bright); font-weight: 700; }
.success { color: var(--green); }
.warning { color: var(--amber); }
.error { color: var(--red); }
.muted { color: var(--muted); }
.command { color: #a8c5b1; }
.prompt { color: var(--green); }
.terminal-form { display: flex; align-items: baseline; gap: 10px; min-height: 30px; color: var(--green); }
.terminal-form[hidden] { display: none; }
.terminal-form label { flex: 0 0 auto; white-space: nowrap; }
.terminal-form input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; caret-color: transparent; }
.terminal-form input:disabled { opacity: .6; }
.cursor { width: 8px; height: 1.1em; flex: 0 0 8px; margin-left: -10px; background: var(--green); animation: blink 1.05s steps(2, start) infinite; }
.unlock-screen { position: relative; display: grid; flex: 1; min-height: 0; overflow: hidden; place-items: center; isolation: isolate; background: #020805; }
.unlock-screen[hidden] { display: none; }
.unlock-screen canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .78; }
.unlock-content { width: min(560px, calc(100% - 32px)); padding: 24px 0; color: var(--green); text-shadow: 0 0 12px rgb(84 220 126 / 35%); }
.unlock-title { margin-bottom: 22px; color: var(--bright); font-size: 12px; font-weight: 700; }
.unlock-message { min-height: 3.4em; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.unlock-progress { height: 3px; margin-top: 22px; overflow: hidden; background: #183224; }
.unlock-progress span { display: block; width: 0; height: 100%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: decrypt-progress var(--decrypt-duration, 4200ms) linear forwards; }
.final-screen { display: grid; align-content: start; flex: 1; min-height: 0; overflow: auto; padding: 22px 2px; color: var(--green); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; animation: reveal 800ms ease-out both; }
.final-screen[hidden] { display: none; }
.final-screen::first-line { color: var(--bright); font-weight: 700; }
.footerline { padding: 14px 2px 0; color: #526b5c; font-size: 9px; letter-spacing: .7px; }
#footer-user { color: #8aa695; }
@keyframes blink { to { visibility: hidden; } }
@keyframes terminal-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes line-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: 0; filter: brightness(2); } to { opacity: 1; filter: brightness(1); } }
@keyframes decrypt-progress { to { width: 100%; } }
@media (max-width: 620px) {
  .frame { width: min(100% - 24px, 1120px); padding: 18px 0 12px; }
  .masthead { align-items: flex-start; font-size: 9px; }
  .system-state { gap: 6px; }
  .terminal-shell { min-height: calc(100vh - 95px); padding: 14px 12px 16px; }
  .terminal-topline { font-size: 8px; }
  .terminal-output { padding-top: 16px; }
  .terminal-form { gap: 7px; font-size: 12px; }
  .footerline { align-items: flex-start; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}