:root {
  --bg: #050807;
  --bg-2: #0e120f;
  --panel: rgba(7, 10, 8, 0.48);
  --panel-2: rgba(20, 24, 18, 0.3);
  --line: rgba(128, 255, 171, 0.2);
  --line-strong: rgba(255, 201, 95, 0.26);
  --text: #d6f5cf;
  --muted: #8aa284;
  --green: #8cff74;
  --amber: #ffc95f;
  --red: #ff7e67;
  --cyan: #7ce7bc;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

@font-face {
  font-family: "Spectrascope BigBlue";
  src: url("./fonts/bigblue-terminal-nerd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Space Mono";
  src: url("./fonts/space-mono-nerd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Hack";
  src: url("./fonts/hack-nerd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Cascadia";
  src: url("./fonts/cascadia-nerd.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Fantasque";
  src: url("./fonts/fantasque-nerd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Monofur";
  src: url("./fonts/monofur-nerd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Monoid";
  src: url("./fonts/monoid-nerd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Spectrascope Mononoki";
  src: url("./fonts/mononoki-nerd.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(140, 255, 116, 0.12), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 201, 95, 0.1), transparent 18%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

html[data-terminal-font="bigblue"] body {
  font-family: "Spectrascope BigBlue", "IBM Plex Mono", monospace;
}

html[data-terminal-font="space-mono"] body {
  font-family: "Spectrascope Space Mono", "IBM Plex Mono", monospace;
}

html[data-terminal-font="hack"] body {
  font-family: "Spectrascope Hack", "IBM Plex Mono", monospace;
}

html[data-terminal-font="cascadia"] body { font-family: "Spectrascope Cascadia", "IBM Plex Mono", monospace; }
html[data-terminal-font="fantasque"] body { font-family: "Spectrascope Fantasque", "IBM Plex Mono", monospace; }
html[data-terminal-font="monofur"] body { font-family: "Spectrascope Monofur", "IBM Plex Mono", monospace; }
html[data-terminal-font="monoid"] body { font-family: "Spectrascope Monoid", "IBM Plex Mono", monospace; }
html[data-terminal-font="mononoki"] body { font-family: "Spectrascope Mononoki", "IBM Plex Mono", monospace; }

.video-stage,
.ambient-grid,
.scanlines {
  position: fixed;
  inset: 0;
}

.video-stage {
  overflow: hidden;
  z-index: 0;
}

.video-stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(0.9) contrast(1.08) brightness(0.7);
}

.video-stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(0, 0, 0, 0.02), rgba(2, 5, 3, 0.28)),
    linear-gradient(180deg, rgba(4, 8, 5, 0.03), rgba(4, 8, 5, 0.16));
}

.ambient-grid,
.scanlines {
  pointer-events: none;
}

.ambient-grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(140, 255, 116, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 255, 116, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

.scanlines {
  z-index: 2;
  opacity: 0.16;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.05) 51%,
    transparent 51%,
    transparent 100%
  );
  background-size: 100% 5px;
}

@keyframes logoPulse {
  0%,
  100% {
    opacity: 0.78;
    filter:
      drop-shadow(0 0 14px rgba(140, 255, 116, 0.1))
      drop-shadow(0 0 28px rgba(124, 231, 188, 0.05))
      saturate(1.01)
      brightness(0.98);
  }

  17% {
    opacity: 0.82;
    filter:
      drop-shadow(0 0 18px rgba(140, 255, 116, 0.14))
      drop-shadow(0 0 34px rgba(255, 201, 95, 0.06))
      saturate(1.05)
      brightness(1.02);
  }

  18% {
    opacity: 0.76;
    filter:
      drop-shadow(0 0 11px rgba(140, 255, 116, 0.08))
      drop-shadow(0 0 22px rgba(124, 231, 188, 0.03))
      saturate(0.98)
      brightness(0.96);
  }

  44% {
    opacity: 0.81;
    filter:
      drop-shadow(0 0 20px rgba(140, 255, 116, 0.16))
      drop-shadow(0 0 40px rgba(124, 231, 188, 0.06))
      saturate(1.06)
      brightness(1.03);
  }

  46% {
    opacity: 0.77;
    filter:
      drop-shadow(0 0 10px rgba(140, 255, 116, 0.08))
      drop-shadow(0 0 16px rgba(255, 201, 95, 0.03))
      saturate(0.97)
      brightness(0.95);
  }

  73% {
    opacity: 0.83;
    filter:
      drop-shadow(0 0 22px rgba(140, 255, 116, 0.16))
      drop-shadow(0 0 44px rgba(124, 231, 188, 0.06))
      saturate(1.08)
      brightness(1.05);
  }
}

@keyframes heroLineDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) skewX(0deg);
    text-shadow:
      0 0 18px rgba(255, 201, 95, 0.16),
      0 0 34px rgba(124, 231, 188, 0.05);
    opacity: 0.98;
  }

  19% {
    transform: translate3d(0.08ch, -0.01em, 0) skewX(-0.6deg);
    text-shadow:
      0 0 21px rgba(255, 201, 95, 0.2),
      0 0 38px rgba(124, 231, 188, 0.07);
    opacity: 1;
  }

  20% {
    transform: translate3d(-0.03ch, 0.02em, 0) skewX(0.35deg);
    text-shadow:
      0 0 14px rgba(255, 201, 95, 0.13),
      0 0 26px rgba(124, 231, 188, 0.04);
    opacity: 0.96;
  }

  47% {
    transform: translate3d(0.12ch, 0, 0) skewX(-0.85deg);
    text-shadow:
      0 0 24px rgba(255, 201, 95, 0.22),
      0 0 42px rgba(124, 231, 188, 0.07);
    opacity: 1;
  }

  51% {
    transform: translate3d(-0.08ch, 0.01em, 0) skewX(0.6deg);
    text-shadow:
      0 0 12px rgba(255, 201, 95, 0.12),
      0 0 22px rgba(124, 231, 188, 0.03);
    opacity: 0.95;
  }

  76% {
    transform: translate3d(0.05ch, -0.015em, 0) skewX(-0.35deg);
    text-shadow:
      0 0 20px rgba(255, 201, 95, 0.18),
      0 0 36px rgba(124, 231, 188, 0.06);
    opacity: 0.99;
  }
}

.shell {
  position: relative;
  z-index: 3;
  width: min(1160px, calc(100% - 28px));
  margin: 14px auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 201, 95, 0.07), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(124, 231, 188, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(8, 12, 9, 0.3), rgba(5, 8, 6, 0.44));
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.shell::before {
  content: "automajik operations console // explicit changes // evidence attached";
  display: block;
  padding: 7px 18px;
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 201, 95, 0.035);
}

.shell__header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.shell__lights {
  display: flex;
  gap: 8px;
}

.shell__lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.shell__lights span:nth-child(1) { background: var(--red); }
.shell__lights span:nth-child(2) { background: var(--amber); }
.shell__lights span:nth-child(3) { background: var(--green); }

.shell__logo {
  width: clamp(108px, 18vw, 164px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.8;
  filter:
    drop-shadow(0 0 16px rgba(140, 255, 116, 0.12))
    drop-shadow(0 0 32px rgba(124, 231, 188, 0.05))
    saturate(1.04);
  mix-blend-mode: screen;
  animation: logoPulse 8.9s steps(17, end) infinite;
  transform: translateZ(0);
  will-change: opacity, filter;
}

.shell__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.shell__scene {
  margin: 0 0 0 auto;
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  opacity: 0.8;
}

.hero,
.columns,
.terminal-wrap,
.footer,
.panel {
  padding: 24px 20px;
}

.confirmation-notice {
  margin: 16px 20px 0;
  padding: 14px 16px;
  border: 1px solid rgba(140, 255, 116, 0.72);
  background: rgba(16, 47, 22, 0.74);
  color: #d9ffd3;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(140, 255, 116, 0.08), 0 0 22px rgba(140, 255, 116, 0.11);
}

.confirmation-notice--error {
  border-color: rgba(255, 126, 103, 0.72);
  background: rgba(61, 20, 14, 0.76);
  color: #ffd2c8;
}

.hero {
  display: grid;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 201, 95, 0.028), rgba(140, 255, 116, 0.012));
}

.hero__prompt {
  color: var(--green);
  font-size: 0.9rem;
}

.prompt { color: var(--cyan); }
.caret { margin: 0 8px; color: var(--amber); }

.hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__access {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  color: #e8d8a7;
  background: rgba(255, 201, 95, 0.055);
  font-size: 0.82rem;
  line-height: 1.55;
  letter-spacing: 0.045em;
  text-transform: lowercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(255, 201, 95, 0.07);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill--live {
  color: var(--green);
  border-color: rgba(140, 255, 116, 0.26);
  background: rgba(140, 255, 116, 0.08);
}

h1,
h2 {
  margin: 0;
  font-family: inherit;
  letter-spacing: 0.02em;
}

h1 {
  max-width: 16ch;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.88;
  color: #f5f0bf;
  text-shadow: 0 0 18px rgba(255, 201, 95, 0.16);
}

html[data-banner-font="bigblue"] h1 {
  font-family: "Spectrascope BigBlue", "IBM Plex Mono", monospace;
}

html[data-banner-font="space-mono"] h1 {
  font-family: "Spectrascope Space Mono", "IBM Plex Mono", monospace;
}

html[data-banner-font="hack"] h1 {
  font-family: "Spectrascope Hack", "IBM Plex Mono", monospace;
}

html[data-banner-font="cascadia"] h1 { font-family: "Spectrascope Cascadia", "IBM Plex Mono", monospace; }
html[data-banner-font="fantasque"] h1 { font-family: "Spectrascope Fantasque", "IBM Plex Mono", monospace; }
html[data-banner-font="monofur"] h1 { font-family: "Spectrascope Monofur", "IBM Plex Mono", monospace; }
html[data-banner-font="monoid"] h1 { font-family: "Spectrascope Monoid", "IBM Plex Mono", monospace; }
html[data-banner-font="mononoki"] h1 { font-family: "Spectrascope Mononoki", "IBM Plex Mono", monospace; }

html[data-text-effect="phosphor"] #hero-title {
  color: #d7ffbd;
  letter-spacing: -0.03em;
  text-shadow: 0 0 7px rgba(140, 255, 116, 0.68), 0 0 26px rgba(124, 231, 188, 0.2);
}

html[data-text-effect="teletext"] #hero-title {
  color: #ffce73;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(75, 37, 5, 0.7), 0 0 18px rgba(255, 201, 95, 0.2);
}

html[data-text-effect="raster"] #hero-title {
  animation: heroLineDrift 7.6s steps(9, end) infinite;
  letter-spacing: -0.035em;
  text-shadow: 1px 0 rgba(124, 231, 188, 0.35), -1px 0 rgba(255, 126, 103, 0.22), 0 0 20px rgba(255, 201, 95, 0.16);
}

html[data-text-effect="ghost"] #hero-title {
  color: #c5fff0;
  letter-spacing: 0.055em;
  transform: translateX(0.03ch) skewX(-1.2deg);
  text-shadow: 3px 0 rgba(124, 231, 188, 0.16), -3px 0 rgba(255, 201, 95, 0.12), 0 0 27px rgba(124, 231, 188, 0.18);
}

html[data-text-effect="hardcopy"] #hero-title {
  color: #f6edca;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 201, 95, 0.12);
}

html[data-text-effect="teletext"] .terminal__line { text-shadow: 1px 0 rgba(255, 201, 95, 0.15); }
html[data-text-effect="raster"] .terminal__line { text-shadow: 1px 0 rgba(124, 231, 188, 0.16), -1px 0 rgba(255, 126, 103, 0.1); }
html[data-text-effect="ghost"] .terminal__line { opacity: 0.94; text-shadow: 2px 0 rgba(124, 231, 188, 0.12); }
html[data-text-effect="hardcopy"] .terminal__line { text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55); }

@keyframes signalTear {
  0%, 84%, 100% { transform: translate3d(0, 0, 0); filter: none; }
  85% { transform: translate3d(0.06ch, 0, 0) skewX(-1deg); filter: contrast(1.12); }
  87% { transform: translate3d(-0.1ch, 0.01em, 0) skewX(1.3deg); filter: contrast(1.24) saturate(1.2); }
  89% { transform: translate3d(0, 0, 0); filter: none; }
}

html[data-text-effect="misregister"] #hero-title {
  color: #f2ffd7;
  letter-spacing: 0.04em;
  transform: translateX(0.08ch) skewX(-0.9deg);
  text-shadow: 3px 0 rgba(255, 72, 118, 0.42), -3px 0 rgba(71, 244, 255, 0.38), 0 0 20px rgba(140, 255, 116, 0.25);
}

html[data-text-effect="misregister"] .terminal__line {
  text-shadow: 1px 0 rgba(255, 72, 118, 0.2), -1px 0 rgba(71, 244, 255, 0.18);
}

html[data-text-effect="sync-loss"] #hero-title {
  animation: heroLineDrift 8.5s steps(12, end) infinite, signalTear 5.7s steps(1, end) infinite;
  color: #dfffe5;
  text-shadow: 0 0 4px rgba(140, 255, 116, 0.8), 0 0 23px rgba(140, 255, 116, 0.2);
}

html[data-text-effect="sync-loss"] .terminal__line {
  animation: signalTear 9.4s steps(1, end) infinite;
}

html[data-text-effect="photocopy"] #hero-title {
  color: #e8e1b6;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 1px 0 #0b120b, -1px 0 rgba(255, 201, 95, 0.32), 0 3px rgba(0, 0, 0, 0.6);
  filter: contrast(1.36) grayscale(0.2);
}

html[data-text-effect="photocopy"] .hero__access,
html[data-text-effect="photocopy"] .terminal__line {
  filter: contrast(1.24) grayscale(0.16);
}

html[data-text-effect="stamp"] #hero-title {
  max-width: 20ch;
  padding: 0.12em 0.14em 0.16em;
  border: 2px solid rgba(255, 201, 95, 0.72);
  color: #ffdb8b;
  font-size: clamp(2.85rem, 6.4vw, 5rem);
  line-height: 0.94;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  background: rgba(31, 20, 4, 0.36);
  box-shadow: 4px 4px 0 rgba(6, 9, 6, 0.72), inset 0 0 24px rgba(255, 201, 95, 0.05);
}

html[data-text-effect="warning"] #hero-title {
  max-width: 18ch;
  color: #1a1a0c;
  padding: 0.08em 0.14em;
  background: repeating-linear-gradient(-45deg, #efb93d 0 13px, #181406 13px 26px);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  text-shadow: none;
}

html[data-text-effect="wide-signal"] #hero-title {
  max-width: 100%;
  color: #c9fff2;
  font-size: clamp(2.6rem, 6.1vw, 5.15rem);
  letter-spacing: 0.11em;
  line-height: 0.94;
  transform: scaleX(0.9) translateX(-4.7%);
  transform-origin: left center;
  text-shadow: 5px 0 rgba(71, 244, 255, 0.22), -5px 0 rgba(255, 72, 118, 0.15), 0 0 28px rgba(124, 231, 188, 0.26);
}

html[data-text-effect="stencil"] #hero-title {
  max-width: 17ch;
  color: #f1f0cf;
  font-size: clamp(3rem, 6.6vw, 5.35rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #142617, 5px 5px 0 rgba(0, 0, 0, 0.52);
}

#hero-title {
  display: inline-block;
  transform-origin: left center;
  animation: none;
  will-change: transform, text-shadow, opacity;
}

@keyframes orbitSignal {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); filter: hue-rotate(0deg); }
  25% { transform: translate3d(0.1ch, -0.05em, 0) rotate(-0.5deg); filter: hue-rotate(12deg); }
  50% { transform: translate3d(-0.05ch, 0.04em, 0) rotate(0.35deg); filter: hue-rotate(-8deg); }
  75% { transform: translate3d(0.04ch, 0, 0) rotate(-0.2deg); filter: hue-rotate(7deg); }
}

html[data-text-effect="orbit"] #hero-title {
  animation: orbitSignal 6.8s steps(12, end) infinite;
  color: #d7fff3;
  text-shadow: 2px 0 rgba(71, 244, 255, 0.18), -2px 0 rgba(255, 72, 118, 0.14), 0 0 24px rgba(124, 231, 188, 0.2);
}

html[data-banner-layout="split-log"] #hero-title,
html[data-banner-layout="stencil-log"] #hero-title {
  white-space: pre-line;
}

html[data-banner-layout="split-log"] #hero-title {
  max-width: 20ch;
  border-left: 4px solid var(--green);
  padding-left: 0.22em;
  font-size: clamp(2.7rem, 6.3vw, 5.15rem);
}

html[data-banner-layout="bracket"] #hero-title {
  max-width: 18ch;
  color: var(--amber);
  font-size: clamp(2.45rem, 5.3vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: 0.065em;
}

html[data-banner-layout="shred"] #hero-title {
  max-width: 19ch;
  color: #d9ffcd;
  font-size: clamp(2.3rem, 5vw, 4.35rem);
  line-height: 1.12;
  letter-spacing: 0.09em;
  word-spacing: 0.25em;
}

html[data-banner-layout="checksum"] #hero-title {
  max-width: 24ch;
  color: #bfffee;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: 0.035em;
}

html[data-banner-layout="stencil-log"] #hero-title {
  max-width: 17ch;
  border-top: 1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
  padding: 0.16em 0;
  color: #f7e4ac;
  font-size: clamp(2.35rem, 5.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0.035em;
}

h2 {
  font-size: 2rem;
  color: var(--amber);
}

.lede,
.panel p,
.footer {
  color: var(--muted);
  line-height: 1.72;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
}

.columns .panel,
.archive-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  position: relative;
  backdrop-filter: blur(14px) saturate(1.02);
  -webkit-backdrop-filter: blur(14px) saturate(1.02);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.columns .panel::before,
.archive-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(140, 255, 116, 0.1);
  pointer-events: none;
}

.panel__label {
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(140, 255, 116, 0.14);
}

.stack-list li:last-child {
  border-bottom: 0;
}

.terminal-wrap {
  border-top: 1px solid var(--line);
}

.terminal {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(140, 255, 116, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(140, 255, 116, 0.05), transparent 20%),
    radial-gradient(circle at 85% 12%, rgba(255, 201, 95, 0.04), transparent 22%),
    linear-gradient(180deg, rgba(7, 10, 7, 0.3), rgba(12, 16, 12, 0.38));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(1.03);
  -webkit-backdrop-filter: blur(14px) saturate(1.03);
  cursor: text;
  animation: terminalPhosphor 9s steps(1, end) infinite;
}

.terminal::before,
.terminal::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.terminal::before {
  z-index: 2;
  opacity: 0.2;
  background:
    repeating-linear-gradient(0deg, rgba(160, 255, 132, 0.055) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 201, 95, 0.018) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.26) 100%);
  mix-blend-mode: screen;
}

.terminal::after {
  z-index: 3;
  opacity: 0.28;
  background: linear-gradient(108deg, transparent 25%, rgba(220, 255, 209, 0.06) 47%, transparent 62%);
  transform: translateX(-130%);
  animation: terminalSweep 12s ease-in-out infinite;
}

.terminal > * {
  position: relative;
  z-index: 1;
}

.terminal__ghost-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  resize: none;
  opacity: 0.01;
  color: transparent;
  caret-color: transparent;
  pointer-events: none;
}

.terminal:focus {
  outline: 2px solid rgba(140, 255, 116, 0.3);
  outline-offset: 2px;
}

.terminal__output {
  min-height: 380px;
  max-height: 52vh;
  overflow: auto;
  padding-bottom: 12px;
}

.terminal__line {
  margin: 0 0 9px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.58;
  text-shadow: 0 0 7px rgba(140, 255, 116, 0.075);
}

.terminal__line--ascii {
  white-space: pre;
  word-break: normal;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: clamp(0.5rem, 1vw, 0.82rem);
  line-height: 1.18;
  letter-spacing: 0;
  font-variant-ligatures: none;
  text-shadow: 0 0 10px rgba(140, 255, 116, 0.08);
}

.terminal__line--muted {
  color: var(--muted);
}

.terminal__line--success {
  color: var(--green);
}

.terminal__line--warn {
  color: var(--amber);
}

.terminal__line--error {
  color: #ffb09a;
}

.terminal__line--prompt {
  color: var(--text);
}

.terminal__line--movie-burst {
  text-shadow: 0 0 10px rgba(115, 219, 255, 0.16);
}

.terminal__line--movie-scan {
  letter-spacing: 0.012em;
  text-shadow: 0 0 9px rgba(231, 213, 144, 0.12);
}

.terminal__line--movie-packet {
  border-left: 2px solid rgba(244, 165, 212, 0.48);
  padding-left: 0.7ch;
  animation: packet-arrival 240ms steps(2, end);
}

.terminal__line--loader {
  color: #d9edf4;
  text-shadow: 0 0 12px rgba(115, 219, 255, 0.2);
}

.terminal__line--progress {
  margin-left: 1.2ch;
  font-variant-ligatures: none;
  text-shadow: 0 0 10px rgba(140, 255, 116, 0.13);
}

@keyframes packet-arrival {
  from { opacity: 0.25; transform: translateX(-0.45ch); }
  to { opacity: 1; transform: translateX(0); }
}

.terminal__widget {
  margin: 0.7rem 0 0.95rem;
  border: 1px solid rgba(115, 219, 255, 0.4);
  background: rgba(3, 15, 18, 0.82);
  box-shadow: inset 0 0 26px rgba(115, 219, 255, 0.06), 0 0 16px rgba(0, 0, 0, 0.22);
  font-variant-ligatures: none;
}

.terminal__widget-header {
  padding: 0.34rem 0.55rem;
  color: #071017;
  background: #73dbff;
  font-weight: 700;
}

.terminal__widget-query {
  padding: 0.42rem 0.55rem;
  color: #f4a5d4;
  border-bottom: 1px solid rgba(115, 219, 255, 0.22);
}

.terminal__widget-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(11rem, 0.75fr);
  min-height: 8.1rem;
}

.terminal__widget-list {
  padding: 0.32rem 0;
  border-right: 1px solid rgba(115, 219, 255, 0.22);
}

.terminal__widget-row,
.terminal__widget-detail {
  padding: 0.14rem 0.55rem;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal__widget-row {
  color: #d8f4e0;
}

.terminal__widget-row--selected {
  color: #071017;
  background: #e7d590;
  font-weight: 700;
  text-shadow: none;
  animation: widget-selection 180ms steps(2, end);
}

.terminal__table {
  width: max-content;
  min-width: 100%;
  margin: 0.4rem 0 0.72rem;
  overflow-x: auto;
  font-variant-ligatures: none;
}

.terminal__table-row {
  display: grid;
  grid-template-columns: var(--terminal-table-columns);
  gap: 1ch;
  min-width: max-content;
  padding: 0.13rem 0.45rem;
  white-space: pre;
}

.terminal__table-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal__table-row--header {
  color: #071017;
  background: rgba(115, 219, 255, 0.88);
  font-weight: 700;
  text-shadow: none;
}

.terminal__widget-detail {
  color: #a6bac2;
}

.terminal__widget--k9s .terminal__widget-header {
  background: #85f0a3;
}

.terminal__widget--lazygit .terminal__widget-header {
  background: #f4a5d4;
}

@keyframes widget-selection {
  from { filter: brightness(1.75); transform: translateX(-0.25ch); }
  to { filter: brightness(1); transform: translateX(0); }
}

@media (max-width: 640px) {
  .terminal__widget-body {
    grid-template-columns: 1fr;
  }

  .terminal__widget-list {
    border-right: 0;
    border-bottom: 1px solid rgba(115, 219, 255, 0.22);
  }
}

.terminal__token--key { color: var(--cyan); }
.terminal__token--value { color: #e7d590; }
.terminal__token--pass { color: var(--green); font-weight: 700; }
.terminal__token--warn { color: var(--amber); font-weight: 700; }
.terminal__token--accent { color: #f4a5d4; }
.terminal__token--label { color: #d8f4e0; }
.terminal__token--muted { color: var(--muted); }
.terminal__token--plain { color: var(--text); }

.terminal__prompt {
  color: var(--green);
  display: inline-block;
  white-space: nowrap;
}

.terminal__input-row {
  position: relative;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 1ch;
  padding-top: 8px;
  border-top: 1px dashed rgba(140, 255, 116, 0.14);
  font-size: 1rem;
  line-height: 1.58;
}

.terminal__input {
  display: inline;
  min-height: 1.58em;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.58;
}

.terminal__cursor {
  display: inline-block;
  width: 10px;
  height: 1.12em;
  vertical-align: text-bottom;
  background: var(--green);
  box-shadow: 0 0 14px rgba(140, 255, 116, 0.45);
  animation: blink 1s steps(1, end) infinite, cursorBloom 2.8s steps(1, end) infinite;
}

@keyframes terminalPhosphor {
  0%, 100% { filter: brightness(1) contrast(1); }
  8% { filter: brightness(1.025) contrast(1.01); }
  9% { filter: brightness(0.96) contrast(1.025); }
  41% { filter: brightness(1.02) contrast(1.005); }
  42% { filter: brightness(0.985) contrast(1.02); }
  72% { filter: brightness(1.035) contrast(1.015); }
  73% { filter: brightness(0.975) contrast(1.03); }
}

@keyframes terminalSweep {
  0%, 66%, 100% { transform: translateX(-130%); }
  82% { transform: translateX(130%); }
}

@keyframes cursorBloom {
  0%, 100% { box-shadow: 0 0 12px rgba(140, 255, 116, 0.38); }
  47% { box-shadow: 0 0 20px rgba(140, 255, 116, 0.68), 0 0 4px rgba(255, 201, 95, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .terminal,
  .terminal::after,
  .terminal__cursor {
    animation: none;
  }
}

.terminal__hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.terminal__dock-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding-bottom: 4px;
}

.terminal__dock-chip {
  border: 1px solid rgba(124, 231, 188, 0.24);
  background:
    linear-gradient(180deg, rgba(16, 28, 17, 0.96), rgba(7, 12, 8, 0.96));
  color: #dbffd4;
  border-radius: 3px;
  padding: 9px 12px 8px;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  text-transform: lowercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 4px 10px rgba(0, 0, 0, 0.18);
}

.terminal__dock-chip--journey {
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  max-width: min(100%, 18rem);
  text-transform: none;
  letter-spacing: 0.03em;
}

.terminal__dock-chip--signal {
  color: #ffd994;
  border-color: rgba(255, 201, 95, 0.3);
  background:
    linear-gradient(180deg, rgba(58, 42, 16, 0.96), rgba(28, 18, 7, 0.96));
}

.help-menu {
  display: none !important;
}

.help-menu__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  background: rgba(255, 201, 95, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.help-menu__body {
  margin: 0;
  padding: 8px;
  list-style: none;
}

.help-menu__item {
  width: 100%;
  display: grid;
  grid-template-columns: 13ch minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.help-menu__item:hover,
.help-menu__item--active {
  background: rgba(140, 255, 116, 0.1);
}

.help-menu__cmd {
  color: var(--green);
}

.help-menu__detail {
  color: var(--muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.archive-card {
  padding: 18px;
}

.archive-card__tag {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-card p:last-child {
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer a,
.terminal__line a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dotted rgba(124, 231, 188, 0.5);
}

.footer a:hover,
.footer a:focus-visible,
.terminal__line a:hover,
.terminal__line a:focus-visible {
  color: #f7ffd1;
  border-bottom-color: #f7ffd1;
}

code {
  color: var(--amber);
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 860px) {
  .columns,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    display: grid;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 10px, 1160px);
    margin: 6px auto;
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(8, 11, 9, 0.24), rgba(5, 7, 5, 0.34));
    backdrop-filter: blur(2px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  }

  .shell::before {
    background: rgba(255, 201, 95, 0.02);
  }

  .shell__header {
    background: rgba(255, 255, 255, 0.005);
    flex-wrap: wrap;
  }

  .shell__scene {
    width: 100%;
    margin-left: 0;
  }

  .shell__logo {
    width: min(42vw, 148px);
  }

  /* Use a native visible input on phones so iOS keeps the caret in view. */
  .terminal__input {
    display: none;
  }

  .terminal__ghost-input {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-height: 1.58em;
    height: 1.8em;
    padding: 0;
    border: 0;
    outline: 0;
    overflow: hidden;
    background: transparent;
    color: var(--text);
    caret-color: var(--green);
    opacity: 1;
    pointer-events: auto;
    font: inherit;
    line-height: 1.58;
    white-space: nowrap;
    text-shadow: 0 0 7px rgba(140, 255, 116, 0.13);
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(255, 201, 95, 0.015), rgba(140, 255, 116, 0.008));
  }

  .hero,
  .columns,
  .terminal-wrap,
  .footer,
  .panel {
    padding: 18px 14px;
  }

  .confirmation-notice {
    margin: 12px 14px 0;
    padding: 13px 12px;
    font-size: 0.9rem;
  }

  .terminal {
    min-height: 0;
    height: min(620px, 76dvh);
    padding: 14px;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(circle at top left, rgba(140, 255, 116, 0.03), transparent 20%),
      linear-gradient(180deg, rgba(7, 10, 7, 0.28), rgba(12, 16, 12, 0.36));
  }

  .terminal__prompt {
    width: auto;
    flex-basis: auto;
  }

  .terminal__input-row {
    grid-template-columns: max-content minmax(0, 1fr);
    order: 2;
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 10px 0;
    background: rgba(5, 8, 7, 0.72);
  }

  .terminal__output {
    order: 1;
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    margin-top: 10px;
    overscroll-behavior: contain;
  }

  .terminal__mobile-dock {
    order: 3;
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(140, 255, 116, 0.14);
  }

  .terminal__hint {
    display: none;
  }

  .help-menu {
    inset: 14px;
    width: auto;
  }

  .help-menu__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .columns .panel,
  .archive-card {
    background: linear-gradient(180deg, rgba(7, 10, 8, 0.34), rgba(16, 20, 15, 0.26));
  }

  .video-stage__video {
    opacity: 0.88;
    filter: saturate(0.92) contrast(1.06) brightness(0.76);
  }

  .video-stage__veil {
    background:
      radial-gradient(circle at top, rgba(0, 0, 0, 0.02), rgba(2, 5, 3, 0.2)),
      linear-gradient(180deg, rgba(4, 8, 5, 0.02), rgba(4, 8, 5, 0.1));
  }

  h1 {
    max-width: none;
  }
}
