:root {
  --crt-green: #8df0b4;
  --crt-green-dim: #4f9a76;
  --crt-amber: #ffba5e;
  --crt-dark: #03100a;
}

.contact-terminal-page {
  min-height: 100svh;
  overflow-x: clip;
  color: var(--crt-green);
  background: var(--crt-dark);
}

.contact-terminal-page .shell {
  position: relative;
  z-index: 1;
  width: min(100% - 72px, 1440px);
  min-height: 100svh;
  margin: 0 auto;
}

.contact-terminal-page [data-crt-background] {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.contact-terminal-page [data-crt-background]::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(3, 16, 10, .12), transparent 34%, rgba(3, 16, 10, .28));
}

.contact-terminal-page header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(141, 240, 180, .35);
  background: rgba(3, 16, 10, .52);
  box-shadow: 0 16px 40px rgba(3, 16, 10, .22);
}

.contact-terminal-page .brand img {
  filter: grayscale(1) brightness(0) invert(1);
}

.contact-terminal-page .nav a {
  color: rgba(220, 255, 232, .72);
}

.contact-terminal-page .nav {
  background: transparent;
}

.contact-terminal-page .nav a:hover,
.contact-terminal-page .nav a.active {
  color: var(--crt-green);
}

.contact-terminal-page .nav a.active::after {
  background: var(--crt-green);
}

.contact-terminal-page main {
  position: relative;
  z-index: 2;
  display: block;
  min-height: calc(100svh - 116px);
  padding: clamp(54px, 9vh, 120px) 0 70px;
}

.contact-terminal {
  width: min(100%, 1080px);
  margin: 0 auto;
  border: 1px solid rgba(141, 240, 180, .64);
  background: rgba(3, 16, 10, .78);
  box-shadow: 0 0 0 1px rgba(3, 16, 10, .8), 0 24px 100px rgba(0, 0, 0, .32), inset 0 0 70px rgba(28, 236, 132, .06);
}

.contact-terminal__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(141, 240, 180, .44);
  color: var(--crt-green-dim);
  font: 11px/1.4 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.contact-terminal__lights {
  display: inline-flex;
  gap: 7px;
}

.contact-terminal__lights i {
  display: block;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.contact-terminal__lights i:first-child {
  color: var(--crt-amber);
  background: var(--crt-amber);
  box-shadow: 0 0 10px rgba(255, 186, 94, .7);
}

.contact-terminal__body {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(28px, 5vw, 64px);
}

.contact-terminal__intro {
  align-self: end;
}

.contact-terminal__prompt,
.contact-terminal__meta,
.contact-terminal__status,
.contact-terminal__label {
  color: var(--crt-green-dim);
  font: 11px/1.7 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.contact-terminal__prompt {
  margin: 0 0 18px;
  color: var(--crt-amber);
}

.contact-terminal h1 {
  max-width: 8ch;
  margin: 0;
  color: #eafff3;
  font: 600 clamp(44px, 7vw, 92px)/.92 "Courier New", monospace;
  letter-spacing: -.08em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(141, 240, 180, .38);
}

.contact-terminal__lead {
  max-width: 31rem;
  margin: 28px 0 0;
  color: rgba(220, 255, 232, .76);
  font: 15px/1.7 "Courier New", monospace;
}

.contact-terminal__meta {
  margin: 38px 0 0;
}

.contact-terminal__meta strong {
  color: var(--crt-green);
  font-weight: 400;
}

.contact-terminal form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(141, 240, 180, .38);
  background: rgba(0, 0, 0, .16);
}

.contact-terminal__field {
  display: grid;
  gap: 7px;
}

.contact-terminal__label {
  font-size: 10px;
}

.contact-terminal input,
.contact-terminal textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(79, 154, 118, .7);
  border-radius: 0;
  outline: none;
  color: #eafff3;
  background: rgba(3, 16, 10, .82);
  font: 14px/1.5 "Courier New", monospace;
  caret-color: var(--crt-amber);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.contact-terminal textarea {
  min-height: 138px;
  resize: vertical;
}

.contact-terminal input::placeholder,
.contact-terminal textarea::placeholder {
  color: rgba(141, 240, 180, .42);
}

.contact-terminal input:focus,
.contact-terminal textarea:focus {
  border-color: var(--crt-green);
  background: rgba(3, 16, 10, .98);
  box-shadow: 0 0 0 2px rgba(141, 240, 180, .12), 0 0 20px rgba(28, 236, 132, .13);
}

.contact-terminal__submit {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--crt-amber);
  border-radius: 0;
  color: var(--crt-dark);
  background: var(--crt-amber);
  font: 700 12px/1 "Courier New", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.contact-terminal__submit:hover,
.contact-terminal__submit:focus-visible {
  color: var(--crt-amber);
  background: transparent;
  box-shadow: 0 0 18px rgba(255, 186, 94, .22);
}

.contact-terminal__status {
  min-height: 18px;
  margin: 0;
  color: var(--crt-green);
  font-size: 10px;
}

.contact-terminal-page .footer-line {
  position: relative;
  z-index: 2;
  border-top-color: rgba(141, 240, 180, .35);
  color: rgba(141, 240, 180, .64);
}

@media (max-width: 760px) {
  .contact-terminal-page .page-shell {
    width: min(100% - 36px, 560px);
  }

  .contact-terminal-page main {
    padding-top: 38px;
  }

  .contact-terminal__chrome {
    font-size: 9px;
  }

  .contact-terminal__body {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 22px;
  }

  .contact-terminal h1 {
    max-width: none;
    font-size: clamp(45px, 16vw, 80px);
  }

  .contact-terminal__meta {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-terminal input,
  .contact-terminal textarea,
  .contact-terminal__submit {
    transition: none;
  }
}

/* The contact action lives inside the terminal itself: one prompt, one caret,
   and a transcript that grows as the visitor answers each command. */
.contact-terminal__body {
  display: block;
  padding: clamp(30px, 5vw, 68px);
}

.terminal-console {
  min-height: clamp(400px, 52vh, 560px);
  color: var(--crt-green);
  font: 14px/1.75 "Courier New", monospace;
  text-shadow: 0 0 9px rgba(28, 236, 132, .28);
}

.terminal-console__history {
  min-height: 300px;
  white-space: pre-wrap;
}

.terminal-console__line {
  margin: 0;
  color: var(--crt-green);
}

.terminal-console__line--dim {
  color: var(--crt-green-dim);
}

.terminal-console__line--amber,
.terminal-console__prompt {
  color: var(--crt-amber);
}

.terminal-console__form {
  display: flex !important;
  align-items: baseline;
  gap: 0 !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.terminal-console__prompt {
  flex: none;
}

.contact-terminal .terminal-console__input,
.crt-monitor .terminal-console__input {
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  color: #eafff3;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  caret-color: var(--crt-amber);
  text-shadow: inherit;
}

.contact-terminal .terminal-console__input:focus,
.crt-monitor .terminal-console__input:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.terminal-console__hint {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--crt-green-dim);
  font: 10px/1.6 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-terminal-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .contact-terminal__body {
    padding: 24px;
  }

  .terminal-console {
    font-size: 12px;
  }

  .terminal-console__history {
    min-height: 330px;
  }
}

/* The CRT is an object in the editorial composition, not the page background. */
.contact-terminal-page {
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
}

.contact-terminal-page .shell {
  position: static;
  z-index: auto;
  width: min(1440px, calc(100% - 72px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0 38px;
}

.contact-terminal-page header {
  border-bottom: 0;
  background: var(--paper);
  box-shadow: none;
}

.contact-terminal-page .brand img {
  filter: none;
}

.contact-terminal-page .nav {
  background: transparent;
}

.contact-terminal-page .nav a {
  color: var(--ink);
}

.contact-terminal-page .nav a:hover,
.contact-terminal-page .nav a.active,
.contact-terminal-page .nav a:focus-visible {
  color: var(--ink);
}

.contact-terminal-page .nav a.active::after {
  background: linear-gradient(90deg, var(--blue), var(--magenta));
}

/* Keep the contact header structurally identical to the home/about header. */
.contact-terminal-page header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding-bottom: 10px;
  background: var(--paper);
  box-shadow: none;
}

.contact-terminal-page .nav {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 52px);
  padding: 0 4px 8px 18px;
  margin-bottom: -8px;
  background: transparent;
}

.contact-terminal-page .nav a {
  position: relative;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.contact-terminal-page .nav a::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--magenta));
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease;
  display: none;
}

.contact-terminal-page .nav a:hover::after,
.contact-terminal-page .nav a:focus-visible::after,
.contact-terminal-page .nav .active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-terminal-page .nav .active { font-weight: 700; }

.contact-terminal-page main {
  display: block;
  min-height: 0;
  padding: 0;
}

.contact-terminal-page .editorial-hero {
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(500px, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: calc(100vh - 78px);
  padding: 10px 0 38px;
}

.contact-terminal-page .copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-cassette {
  width: min(100%, 420px);
  height: 360px;
  grid-column: 1;
  grid-row: 1;
  margin: 0 auto;
  overflow: visible;
  transform: translateX(-36px);
}

.contact-cassette__prompt {
  margin: 0 0 9px;
  color: var(--ink, #141414);
  font: 700 13px/1.2 "Courier New", monospace;
  letter-spacing: .2em;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.contact-cassette__prompt span {
  display: block;
}

.contact-cassette iframe {
  display: block;
  width: 100%;
  height: 292px;
  margin-top: 20px;
  border: 0;
}

.contact-terminal-page .contact-monitor-stage {
  grid-column: 2;
  grid-row: 1;
  min-height: min(620px, calc(100vh - 110px));
  display: flex;
  align-items: center;
  justify-content: center;
}

.crt-monitor {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 0 auto;
  transform: translateX(-24px);
}

.crt-monitor__case {
  position: relative;
  padding: clamp(11px, 1.6vw, 19px) clamp(11px, 1.8vw, 22px) clamp(30px, 4vw, 48px);
  border: 1px solid #777b76;
  border-radius: clamp(17px, 2.8vw, 34px) clamp(17px, 2.8vw, 34px) clamp(28px, 4vw, 48px) clamp(28px, 4vw, 48px);
  background: linear-gradient(145deg, #d7d8cf, #a7aba3 70%, #8f948e);
  box-shadow: 18px 22px 0 rgba(17, 24, 32, .12), inset 4px 4px 12px rgba(255, 255, 255, .68), inset -7px -10px 18px rgba(34, 39, 36, .26);
}

.crt-monitor__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: clamp(7px, 1.2vw, 13px) solid #262b27;
  border-radius: 15% / 12%;
  background: #03100a;
  box-shadow: inset 0 0 0 2px rgba(141, 240, 180, .28), inset 0 0 30px #000, 0 2px 4px rgba(0, 0, 0, .35);
}

.contact-terminal-page .crt-monitor [data-crt-background] {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

.crt-monitor__screen::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(180deg, rgba(141, 240, 180, .045) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 45%, rgba(22, 104, 64, .15), transparent 72%),
    #03100a;
}

.crt-monitor__screen::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  box-shadow: inset 0 0 45px rgba(0, 0, 0, .66), inset 0 0 0 1px rgba(219, 255, 230, .15);
}

.crt-monitor .terminal-console {
  position: absolute;
  inset: 9% 8% 9%;
  z-index: 2;
  min-height: 0;
  overflow: hidden;
  color: var(--crt-green);
  font-size: clamp(9px, 1.25vw, 15px);
  line-height: 1.5;
}

.crt-monitor .terminal-console__history {
  min-height: 76%;
  overflow: hidden;
}

.crt-monitor .terminal-console__form {
  white-space: nowrap;
}

.crt-monitor .terminal-console__input {
  width: 100%;
}

.crt-monitor .terminal-console__hint {
  margin-top: 4px;
  font-size: clamp(7px, .85vw, 11px);
}

.crt-monitor__controls {
  position: absolute;
  right: 8%;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.crt-monitor__controls span {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid #525851;
  border-radius: 50%;
  background: #858b83;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .65);
}

.crt-monitor__controls i {
  display: block;
  width: 22px;
  height: 9px;
  border: 1px solid #515650;
  border-radius: 8px;
  background: #8b9089;
}

.crt-monitor__caption {
  margin: 15px 0 0;
  color: var(--muted);
  font: 10px "Courier New", monospace;
  letter-spacing: .15em;
  text-align: right;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .contact-terminal-page .shell {
    width: min(100% - 36px, 560px);
    padding-top: 20px;
  }

  .contact-terminal-page header {
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 17px;
  }

  .contact-terminal-page .brand {
    flex: 0 0 auto;
    width: clamp(112px, 37vw, 148px);
  }

  .contact-terminal-page .nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(6px, 1.8vw, 9px);
    max-width: none;
    padding: 0 0 7px;
    margin-bottom: 0;
  }

  .contact-terminal-page .nav a {
    display: block;
    flex: 0 0 auto;
    font-size: clamp(9px, 2.8vw, 11px);
    white-space: nowrap;
  }

  .contact-terminal-page .contact-monitor-stage {
    min-height: 420px;
  }

  .contact-terminal-page .editorial-hero {
    display: block;
  }

  .crt-monitor {
    width: 100%;
    transform: none;
  }

  .contact-cassette {
    width: min(100%, 420px);
    height: 360px;
    margin-top: -8px;
    transform: none;
  }

  .contact-cassette iframe {
    height: 292px;
  }

  .crt-monitor__caption {
    font-size: 8px;
  }
}

@media (max-width: 400px) {
  .contact-terminal-page .nav {
    gap: 6px;
}
}

@media (max-width: 1050px) and (min-width: 761px) {
  .contact-terminal-page .editorial-hero {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
    gap: clamp(14px, 2.5vw, 28px);
  }

  .crt-monitor {
    width: 100%;
    transform: translateX(-8px);
  }

  .contact-cassette {
    width: min(100%, 360px);
    transform: translateX(-8px);
  }

  .contact-cassette iframe {
    width: 100%;
    transform: none;
  }
}
