:root {
  --void: #050806;
  --panel: #080d09;
  --green: #b8f6c4;
  --bright: #dcffe2;
  --dim: #65916d;
  --line: rgba(142, 222, 155, 0.24);
  --amber: #f1c77a;
  --red: #ff9188;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--green);
  font-family: "Courier New", Courier, monospace;
}
button, input { font: inherit; }

.site-shell {
  min-height: 100svh;
  padding: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(27, 71, 36, 0.16), transparent 54%),
    linear-gradient(135deg, #030503 0%, #070b08 54%, #030503 100%);
}

.terminal {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  width: min(1180px, 100%);
  height: min(860px, calc(100svh - 36px));
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(151, 237, 166, 0.38);
  border-radius: 5px;
  background: rgba(7, 12, 8, 0.96);
  box-shadow: 0 0 48px rgba(76, 186, 95, 0.08), inset 0 0 70px rgba(11, 29, 14, 0.42);
}

.terminal::before {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.015) 0, rgba(255,255,255,.015) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: screen;
}

.terminal-bar, .system-strip, .quick-commands, .command-line, .command-hint {
  position: relative;
  z-index: 6;
}

.terminal-bar {
  min-height: 46px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 19, 14, .94);
  color: var(--dim);
  font-size: .72rem;
  letter-spacing: .1em;
}
.terminal-bar p { margin: 0; color: var(--green); font-weight: 700; }
.terminal-bar nav { display: flex; gap: 14px; }
.terminal-bar a { color: var(--dim); text-decoration: none; }
.terminal-bar a:hover, .terminal-bar a:focus-visible { color: var(--bright); outline: none; }
.terminal-mark { display: flex; gap: 5px; }
.terminal-mark span { width: 7px; height: 7px; border: 1px solid var(--dim); border-radius: 50%; }
.terminal-mark span:first-child { background: var(--dim); }

.system-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 38px;
  padding: 7px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(142, 222, 155, .16);
  background: rgba(8, 14, 10, .74);
  color: var(--dim);
  font-size: .66rem;
  letter-spacing: .08em;
  scrollbar-width: none;
  white-space: nowrap;
}
.system-strip b { color: var(--green); }
.system-strip .link-state { margin-left: auto; color: #78d88a; }
.system-strip .link-error { color: var(--red); }

.output {
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: 24px 24px 40px;
  overflow-y: auto;
  scrollbar-color: var(--dim) transparent;
  scrollbar-width: thin;
}
.output-entry {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  max-width: 960px;
  margin-bottom: 18px;
  color: var(--green);
  font-size: clamp(.79rem, 1vw, .91rem);
  line-height: 1.72;
  text-shadow: 0 0 9px rgba(133, 245, 152, .14);
}
.output-entry p { margin: 0 0 3px; white-space: pre-wrap; }
.output-glyph { color: var(--dim); user-select: none; }
.output-entry.system { color: var(--dim); font-size: clamp(.73rem, .9vw, .82rem); }
.output-entry.command { margin-top: 24px; margin-bottom: 8px; color: var(--bright); font-weight: 700; letter-spacing: .04em; }
.output-entry.success, .output-entry.warning, .output-entry.warning .output-glyph { color: var(--amber); }
.output-entry.error, .output-entry.error .output-glyph { color: var(--red); }

.quick-commands {
  display: flex;
  gap: 12px;
  padding: 10px 18px;
  overflow-x: auto;
  border-top: 1px solid rgba(142, 222, 155, .16);
  background: rgba(8, 14, 10, .86);
  scrollbar-width: none;
}
.quick-commands button, .command-line button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: .7rem;
  letter-spacing: .05em;
  white-space: nowrap;
}
.quick-commands button:hover, .quick-commands button:focus-visible,
.command-line button:hover, .command-line button:focus-visible { color: var(--bright); outline: none; }
button:disabled { cursor: wait; opacity: .35; }

.command-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #0b130d;
}
.command-line label { color: var(--dim); font-size: .78rem; white-space: nowrap; }
.command-line input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--bright); caret-color: var(--amber); font-size: .9rem; }
.command-line input[type="password"] { letter-spacing: .18em; }
.command-line button { padding: 5px 0 5px 10px; font-size: .68rem; }
.command-line.auth-prompt { border-top-color: rgba(241, 199, 122, .58); }
.command-line.auth-prompt label,
.command-line.auth-prompt input { color: var(--amber); }
.command-hint { min-height: 22px; margin: 0; padding: 4px 18px 7px; background: #0b130d; color: #46634c; font-size: .58rem; letter-spacing: .09em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .site-shell { padding: 0; }
  .terminal { width: 100%; height: 100svh; min-height: 520px; border: 0; border-radius: 0; }
  .terminal-bar { grid-template-columns: auto 1fr; padding: 0 13px; }
  .terminal-bar nav { display: none; }
  .terminal-bar p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .system-strip, .quick-commands, .command-line, .command-hint { padding-left: 13px; padding-right: 13px; }
  .output { padding: 18px 13px 28px; }
  .command-line { grid-template-columns: auto minmax(0, 1fr); }
  .command-line label span[aria-hidden="true"] { display: none; }
  .command-line label::after { content: ">"; color: var(--bright); }
  .command-line button { display: none; }
}
