/* ==========================================================================
   PORTFOLIO ENTRY — Premium Glass Terminal (terminal-gate.css)
   Replaces the legacy name-input card with a transparent macOS/security
   terminal window. Scoped under .terminal-gate so only the entry screen
   changes. Companion: terminal-gate.js
   ========================================================================== */

.terminal-gate {
  --tg-green: #00ff66;
  --tg-green-dim: #1fd483;
  --tg-cyan: #4df3d0;
  --tg-text: #e9fff4;
  --tg-muted: #8fbfa9;
  --tg-dim: #4c6b5c;
  --tg-monospace: 'JetBrains Mono', 'Fira Code', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Strongly blur the Liquid Chrome / background behind the terminal.
   Overrides the legacy darker .splash-screen gradient so the animated
   background stays visible through the glass. */
.terminal-gate.splash-screen {
  background: linear-gradient(180deg, rgba(2, 8, 11, .34) 0%, rgba(1, 14, 20, .22) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(122%);
  backdrop-filter: blur(28px) saturate(122%);
  padding: 1.25rem;
}

/* Layout stage: keep existing centering, cap the glass window width. */
.terminal-gate .splash-container {
  width: min(100%, 1120px);
  max-height: min(860px, calc(100vh - 2.5rem));
}

/* The glass card envelope. Overrides .splash-card-.single grid/size. */
.terminal-gate .splash-card.splash-card--single {
  display: block;
  width: min(100%, 1080px) !important;
  min-height: 0;
  max-width: none;
  padding: clamp(1rem, 2vw, 1.4rem);
  margin: 0 auto;
  border: 1px solid rgba(0, 255, 102, .4);
  border-radius: clamp(1rem, 2.2vw, 1.5rem);
  background:
    linear-gradient(180deg, rgba(6, 18, 18, .55), rgba(3, 12, 16, .48));
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  backdrop-filter: blur(22px) saturate(125%);
  box-shadow:
    0 2.4rem 6rem rgba(0, 0, 0, .55),
    0 0 3rem rgba(0, 255, 102, .10),
    0 0 1rem rgba(0, 255, 102, .06),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 -1px 0 rgba(0, 0, 0, .35);
  transform: none;
  animation: none;
  text-align: left;
}

/* Soft breathing green halo behind the glass (ambient depth). */
.terminal-gate__glass-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(0, 255, 102, .10), transparent 55%),
    radial-gradient(90% 60% at 50% 120%, rgba(0, 217, 165, .06), transparent 60%);
  opacity: .9;
  animation: tg-glow-breathe 6s ease-in-out infinite;
  mix-blend-mode: screen;
}

/* ---- Terminal window frame ---- */
.terminal-gate__window {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 102, .30);
  border-radius: clamp(0.85rem, 1.8vw, 1.2rem);
  background: rgba(3, 10, 13, .62);
  -webkit-backdrop-filter: blur(22px) saturate(122%);
  backdrop-filter: blur(22px) saturate(122%);
  box-shadow:
    inset 0 0 2.2rem rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 0 1.6rem rgba(0, 255, 102, .05);
}

.terminal-gate__window::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 24%),
    linear-gradient(180deg, transparent 70%, rgba(255, 255, 255, .025));
}

/* ---- Window title bar ---- */
.terminal-gate__titlebar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: clamp(2.4rem, 4.4vw, 3rem);
  padding: 0 clamp(0.9rem, 2vw, 1.25rem);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(4, 12, 15, .45);
  -webkit-user-select: none;
  user-select: none;
}

.terminal-gate__traffic {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
}
.terminal-gate__traffic .t-tl {
  width: clamp(9px, 1.4vw, 12px);
  height: clamp(9px, 1.4vw, 12px);
  border-radius: 50%;
}
.t-tl--red { background: #ff5f57; box-shadow: 0 0 6px rgba(255, 95, 87, .5); }
.t-tl--yellow { background: #febc2e; box-shadow: 0 0 6px rgba(254, 188, 46, .45); }
.t-tl--green { background: #28c840; box-shadow: 0 0 6px rgba(40, 200, 64, .5); }

.terminal-gate__title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tg-muted);
  font-family: var(--tg-monospace);
  font-size: clamp(0.7rem, 1.3vw, 0.82rem);
  letter-spacing: .02em;
}

.terminal-gate__meta {
  flex: 0 0 auto;
  color: var(--tg-green-dim);
  font-family: var(--tg-monospace);
  font-size: clamp(0.58rem, 1.05vw, 0.68rem);
  letter-spacing: .14em;
}
.terminal-gate__meta::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--tg-green);
  box-shadow: 0 0 8px rgba(0, 255, 102, .9);
  vertical-align: 1px;
  animation: tg-pulse 2.4s ease-in-out infinite;
}

/* ---- Terminal body ---- */
.terminal-gate__body {
  position: relative;
  z-index: 2;
  padding: clamp(1.6rem, 3.4vw, 2.7rem) clamp(1.2rem, 3vw, 2.4rem) clamp(1.8rem, 3.4vw, 2.9rem);
}

/* boot + command logs */
.terminal-gate__logs {
  font-family: var(--tg-monospace);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  line-height: 1.75;
  color: var(--tg-muted);
}
.tg-log { margin: 0; }
.tg-log--spacer { height: .6rem; }
.tg-log__tag { display: inline-block; min-width: 2.6rem; }
.tg-log__tag--boot { color: var(--tg-cyan); }
.tg-log__tag--ok { color: var(--tg-green); }
.tg-log__txt:empty { display: none; }

.tg-log__command {
  margin: 0;
  font-family: var(--tg-monospace);
  font-size: clamp(1.3rem, 4.2vw, 1.9rem);
  line-height: 1.3;
  color: var(--tg-text);
  font-weight: 500;
}
.tg-log__prompt {
  color: var(--tg-green);
  text-shadow: 0 0 14px rgba(0, 255, 102, .6);
}
.tg-accent {
  color: var(--tg-green);
  text-shadow: 0 0 16px rgba(0, 255, 102, .55);
}
.tg-caret {
  display: inline-block;
  width: clamp(9px, 1.3vw, 13px);
  height: 1.1em;
  margin-left: .15em;
  vertical-align: text-bottom;
  background: var(--tg-green);
  box-shadow: 0 0 10px rgba(0, 255, 102, .7);
  animation: tg-blink 1.05s steps(2, jump-none) infinite;
}

/* ---- Input form ---- */
.terminal-gate__form {
  margin-top: 1.1rem;
  text-align: left;
}

.terminal-gate__label {
  display: block;
  margin-bottom: .5rem;
  color: var(--tg-dim);
  font-family: var(--tg-monospace);
  font-size: clamp(0.62rem, 1.2vw, 0.75rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.terminal-gate__inputline {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .05rem .1rem .05rem .55rem;
  border: 1px solid rgba(0, 255, 102, .25);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(0, 255, 102, .035), rgba(0, 255, 102, .02));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 1.4rem rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.terminal-gate__tilde {
  flex: 0 0 auto;
  color: var(--tg-green-dim);
  font-family: var(--tg-monospace);
  font-size: clamp(0.8rem, 1.7vw, 1rem);
  white-space: nowrap;
}

.terminal-gate__inputline input#visitorName {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: clamp(0.8rem, 1.8vw, 1.05rem) 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--tg-text);
  font-family: var(--tg-monospace);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.1;
  text-align: left;
  letter-spacing: .02em;
  caret-color: var(--tg-green);
  box-shadow: none;
  outline: none;
}
.terminal-gate__inputline input#visitorName::placeholder {
  color: rgba(143, 191, 169, .45);
  font-family: var(--tg-monospace);
  opacity: 1;
  text-align: left;
}
.terminal-gate__inputline:focus-within {
  border-color: rgba(0, 255, 102, .55);
  box-shadow: inset 0 0 1.6rem rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 1.4rem rgba(0, 255, 102, .12);
}

.terminal-gate__secure {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .6rem;
  border: 1px solid rgba(0, 255, 102, .22);
  border-radius: 8px;
  color: var(--tg-green);
  background: rgba(0, 255, 102, .05);
  font-family: var(--tg-monospace);
  font-size: clamp(0.55rem, 1vw, 0.66rem);
  letter-spacing: .14em;
  white-space: nowrap;
}
.terminal-gate__secure i { font-size: clamp(0.7rem, 1.4vw, 0.9rem); filter: drop-shadow(0 0 6px rgba(0, 255, 102, .6)); }
.terminal-gate__inputline:focus-within .terminal-gate__secure {
  box-shadow: 0 0 1rem rgba(0, 255, 102, .18);
}

/* execute action row */
.terminal-gate__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
}
.terminal-gate__actions button#enterSite {
  width: auto;
  margin: 0;
  padding: .6rem 1rem;
  background: transparent;
  border: 1px solid rgba(0, 255, 102, .32);
  border-radius: 9px;
  color: var(--tg-green);
  font-family: var(--tg-monospace);
  font-size: clamp(0.68rem, 1.2vw, 0.8rem);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 0 1rem rgba(0, 255, 102, .05);
  filter: none;
  opacity: 1;
  transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, color .22s ease;
}
.terminal-gate__actions button#enterSite:hover:enabled,
.terminal-gate__actions button#enterSite:focus-visible {
  background: rgba(0, 255, 102, .08);
  border-color: rgba(0, 255, 102, .55);
  box-shadow: 0 0 1.4rem rgba(0, 255, 102, .18);
  color: var(--tg-text);
}
.terminal-gate__actions button#enterSite:disabled {
  opacity: .45;
  cursor: wait;
}
.terminal-gate__hint {
  color: var(--tg-dim);
  font-family: var(--tg-monospace);
  font-size: clamp(0.6rem, 1.1vw, 0.72rem);
  letter-spacing: .04em;
}
.terminal-gate__hint kbd {
  display: inline-block;
  padding: .05rem .4rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--tg-muted);
  background: rgba(255, 255, 255, .04);
  font-family: inherit;
  font-size: .95em;
}

/* error line */
.terminal-gate__error {
  display: none;
  margin-top: .8rem;
  padding: .55rem .8rem;
  border-left: 2px solid #ff5f57;
  background: rgba(255, 95, 87, .08);
  color: #ff9d98;
  font-family: var(--tg-monospace);
  font-size: clamp(0.66rem, 1.2vw, 0.8rem);
  border-radius: 4px;
}
.terminal-gate__error i { margin-right: .45rem; color: #ff5f57; }

/* ---- Status bar footer ---- */
.terminal-gate__statusbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.4rem;
  padding: clamp(0.7rem, 1.5vw, 0.95rem) clamp(1.1rem, 2.6vw, 2.2rem);
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(3, 10, 13, .45);
}
.tg-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--tg-dim);
  font-family: var(--tg-monospace);
  font-size: clamp(0.56rem, 1.05vw, 0.68rem);
  letter-spacing: .1em;
}
.tg-status__ok {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tg-green);
  box-shadow: 0 0 6px rgba(0, 255, 102, .7);
}
.tg-status--await { color: var(--tg-muted); }
.tg-status__arrow {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--tg-cyan);
  filter: drop-shadow(0 0 4px rgba(77, 243, 208, .5));
}

/* ---- Animations / reduced motion ---- */
@keyframes tg-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes tg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@keyframes tg-glow-breathe {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}
@keyframes tg-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.terminal-gate .splash-card.splash-card--single {
  opacity: 0;
  animation: tg-fade-up .7s cubic-bezier(0.22, 1, 0.36, 1) .05s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .terminal-gate .splash-card.splash-card--single {
    opacity: 1 !important;
    transform: none !important;
    animation: none;
  }
  .terminal-gate *,
  .terminal-gate *::before,
  .terminal-gate *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .terminal-gate .splash-card.splash-card--single { padding: .8rem; }
  .terminal-gate__secure span { display: none; }
  .terminal-gate__secure { padding: .35rem .5rem; }
  .terminal-gate__meta { display: none; }
}
@media (max-width: 480px) {
  .terminal-gate.splash-screen { padding: .5rem; }
  .terminal-gate .splash-card.splash-card--single { padding: .6rem; }
  .terminal-gate__tilde { font-size: .72rem; }
  .terminal-gate__actions { flex-wrap: wrap; }
  .terminal-gate__window { max-height: none; }
}

/* Accessible focus ring for the input */
.terminal-gate__inputline input#visitorName:focus-visible {
  outline: 2px solid transparent;
}

/* Visually-hidden (screen-reader only) helper */
.terminal-gate__sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Reference entry HUD: compact, angular, and transparent over the page field. */
.terminal-gate.splash-screen {
  padding: 1rem;
  background: rgba(0, 4, 6, .18);
  -webkit-backdrop-filter: blur(12px) saturate(108%);
  backdrop-filter: blur(12px) saturate(108%);
}

.terminal-gate .splash-container {
  width: min(100%, 760px);
  max-height: min(520px, calc(100vh - 2rem));
}

.terminal-gate .splash-card.splash-card--single {
  position: relative;
  width: min(100%, 760px) !important;
  padding: 0;
  border: 1px solid rgba(0, 255, 160, .72);
  border-radius: 0;
  background: rgba(3, 16, 18, .12);
  box-shadow: 0 0 1.5rem rgba(0, 255, 145, .10), inset 0 0 2rem rgba(0, 255, 145, .025);
  clip-path: polygon(2.5% 0, 97.5% 0, 100% 7%, 100% 93%, 97.5% 100%, 2.5% 100%, 0 93%, 0 7%);
}

.terminal-gate__glass-glow {
  background: radial-gradient(70% 90% at 50% 35%, rgba(0, 255, 145, .08), transparent 68%);
  opacity: .7;
}

.terminal-gate__window {
  border: 0;
  border-radius: 0;
  background: rgba(2, 10, 13, .16);
  box-shadow: inset 0 0 2.5rem rgba(0, 0, 0, .24);
  clip-path: inherit;
}

.terminal-gate__window::after {
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(113, 255, 213, .018) 4px, transparent 5px), linear-gradient(135deg, rgba(255, 255, 255, .035), transparent 25%);
}

.terminal-gate__titlebar {
  height: 3.45rem;
  padding: 0 2.25rem;
  gap: .8rem;
  border-bottom: 1px solid rgba(0, 255, 160, .28);
  background: rgba(2, 13, 16, .18);
}

.terminal-gate__traffic { display: none; }
.terminal-gate__brand-mark {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid var(--tg-green);
  border-radius: 50%;
  color: var(--tg-green);
  font-size: .8rem;
  box-shadow: 0 0 .7rem rgba(0, 255, 102, .25);
}
.terminal-gate__brand {
  color: var(--tg-green);
  font-family: var(--tg-monospace);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.terminal-gate__divider { height: 1.35rem; border-left: 1px solid var(--tg-green); }
.terminal-gate__title { flex: 0 1 auto; color: #b9d7d9; font-size: .82rem; letter-spacing: .08em; }
.terminal-gate__slashes { margin-left: auto; color: var(--tg-green); font-size: 1.5rem; font-weight: 700; letter-spacing: -.18em; text-shadow: 0 0 .7rem rgba(0, 255, 102, .7); }
.terminal-gate__meta { display: none; }

.terminal-gate__body {
  padding: 2rem 2.8rem 1.65rem;
  background: rgba(0, 20, 20, .08);
}
.terminal-gate__logs { display: none; }
#visitorGate .terminal-gate__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  color: #f2fbf8;
  font-family: var(--tg-monospace) !important;
  font-size: clamp(2.15rem, 5vw, 3rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.04em;
  text-shadow: 0 0 .8rem rgba(210, 255, 242, .12);
}
.terminal-gate__heading strong { flex-basis: 100%; color: var(--tg-green); }
.terminal-gate__heading .tg-caret { width: .12em; height: .95em; margin-left: .12em; }
#visitorGate .terminal-gate__description {
  margin: .7rem 0 1.35rem;
  color: #b0cbd0 !important;
  font-family: var(--tg-monospace) !important;
  font-size: .82rem;
  letter-spacing: .01em;
}
.terminal-gate__form { margin-top: 0; }
.terminal-gate__inputline {
  min-height: 3.5rem;
  padding: .18rem .18rem .18rem .7rem;
  gap: .7rem;
  border: 1px solid rgba(0, 255, 160, .92);
  border-radius: 1.1rem;
  background: rgba(0, 40, 37, .13);
  box-shadow: inset 0 0 1.1rem rgba(0, 0, 0, .25), 0 0 .8rem rgba(0, 255, 145, .14);
  clip-path: polygon(2.8% 0, 96% 0, 100% 50%, 96% 100%, 2.8% 100%, 0 50%);
}
.terminal-gate__user-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  place-items: center;
  border-radius: 50%;
  color: var(--tg-green);
  background: rgba(0, 255, 145, .05);
  font-size: 1.3rem;
}
.terminal-gate__tilde { display: none; }
.terminal-gate__inputline input#visitorName { padding: .75rem 0; font-size: .9rem; font-family: var(--tg-monospace) !important; }
.terminal-gate__inputline input#visitorName::placeholder { color: rgba(185, 215, 217, .78); }
.terminal-gate__input-bars { flex: 0 0 auto; color: var(--tg-green); font-size: .9rem; font-weight: 700; letter-spacing: -.25em; }
.terminal-gate__inputline button#enterSite {
  display: grid;
  width: 3.35rem;
  height: 3rem;
  flex: 0 0 3.35rem;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(0, 255, 160, .9);
  border-radius: .85rem;
  color: #001b18;
  background: var(--tg-green);
  box-shadow: 0 0 .9rem rgba(0, 255, 145, .35);
  font-size: 1.35rem;
  cursor: pointer;
}
.terminal-gate__inputline button#enterSite:hover:enabled,
.terminal-gate__inputline button#enterSite:focus-visible { background: #a2ffe0; box-shadow: 0 0 1.2rem rgba(0, 255, 145, .58); }
.terminal-gate__actions { display: none; }
.terminal-gate__statusbar {
  min-height: 3rem;
  padding: .8rem 2.8rem;
  border-top: 1px solid rgba(0, 255, 160, .2);
  background: rgba(0, 12, 14, .12);
}
.tg-status { color: #b0cbd0; font-size: .64rem; }
.tg-status__ok { width: 8px; height: 8px; }
.terminal-gate__status-rule { width: 3rem; height: 2px; margin-left: .8rem; background: var(--tg-green); box-shadow: 0 0 .5rem rgba(0, 255, 102, .55); }

@media (max-width: 600px) {
  .terminal-gate__titlebar { padding: 0 1.25rem; }
  .terminal-gate__body { padding: 1.7rem 1.25rem 1.4rem; }
  .terminal-gate__statusbar { padding: .75rem 1.25rem; }
  .terminal-gate__title { font-size: .68rem; }
  .terminal-gate__input-bars { display: none; }
}

/* Dimensional treatment for the reference HUD. */
.terminal-gate.splash-screen {
  background: rgba(0, 3, 5, .42);
  -webkit-backdrop-filter: blur(20px) saturate(82%);
  backdrop-filter: blur(20px) saturate(82%);
}

.terminal-gate .splash-card.splash-card--single {
  opacity: 1;
  animation: none;
  transform: perspective(1200px) rotateX(1deg);
  transform-style: preserve-3d;
  box-shadow: 0 1.4rem 2.4rem rgba(0, 0, 0, .52), 0 0 1.5rem rgba(0, 255, 145, .10), inset 0 0 2rem rgba(0, 255, 145, .025);
}

.terminal-gate .splash-card.splash-card--single::before {
  content: '';
  position: absolute;
  inset: .45rem -.35rem -.55rem .35rem;
  z-index: -1;
  border: 1px solid rgba(0, 255, 145, .16);
  background: rgba(0, 24, 24, .26);
  box-shadow: 0 .8rem 1.5rem rgba(0, 0, 0, .45), 0 0 2rem rgba(0, 255, 145, .08);
  transform: translateZ(-18px);
  clip-path: inherit;
}

.terminal-gate__window {
  transform: translateZ(2px);
  transform-style: preserve-3d;
}

.terminal-gate__window::before {
  content: '';
  position: absolute;
  inset: .35rem;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(101, 255, 214, .10);
  box-shadow: inset 0 0 1.2rem rgba(0, 255, 145, .07), inset 0 1px 0 rgba(255, 255, 255, .06);
  clip-path: inherit;
}

#visitorGate .terminal-gate__heading strong {
  display: block;
  flex-basis: 100%;
}

#visitorGate .terminal-gate__heading .tg-caret {
  width: .12em;
  height: .82em;
  margin-left: .12em;
  vertical-align: -.08em;
}

.terminal-gate__inputline {
  transform: perspective(700px) rotateX(2deg) translateZ(8px);
  transform-style: preserve-3d;
}

.terminal-gate__user-icon {
  box-shadow: inset 0 0 .8rem rgba(0, 255, 145, .12), 0 .3rem .7rem rgba(0, 0, 0, .32);
  transform: translateZ(7px);
}

.terminal-gate__inputline button#enterSite {
  box-shadow: 0 .35rem .65rem rgba(0, 0, 0, .38), 0 0 .9rem rgba(0, 255, 145, .35), inset 0 1px 0 rgba(255, 255, 255, .55);
  transform: translateZ(14px);
}

/* The entry gate owns the viewport until the visitor submits the form. */
html:has(body.visitor-gate-open) {
  overflow: hidden;
}

body.visitor-gate-open .terminal-gate {
  touch-action: none;
}

body.visitor-gate-open .terminal-gate input,
body.visitor-gate-open .terminal-gate button {
  touch-action: auto;
}

/* Final reference match: a compact 16:9 forensic HUD with crisp edge lighting. */
.terminal-gate {
  --tg-display: Arial, Helvetica, sans-serif;
}

.terminal-gate .splash-card.splash-card--single {
  width: min(72vw, 1040px) !important;
  height: min(57vh, 490px);
  min-height: 0;
  padding: 0;
  border: 0;
  background: rgba(2, 15, 17, .14);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .55), 0 0 2.5rem rgba(0, 255, 145, .16), inset 0 0 2.5rem rgba(0, 255, 145, .035);
}

.terminal-gate .splash-container {
  width: min(72vw, 1040px);
}

.terminal-gate .splash-card.splash-card--single::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  border: 1px solid rgba(0, 255, 177, .92);
  box-shadow: 0 0 .35rem rgba(0, 255, 177, .72), 0 0 1.4rem rgba(0, 255, 145, .26), inset 0 0 .55rem rgba(0, 255, 177, .12);
  clip-path: polygon(3% 0, 97% 0, 100% 7%, 100% 93%, 97% 100%, 3% 100%, 0 93%, 0 7%);
}

.terminal-gate__window {
  height: 100%;
  border: 1px solid rgba(0, 255, 160, .34);
  background: rgba(1, 10, 13, .22);
}

.terminal-gate__titlebar {
  height: 4.15rem;
  padding: 0 6.6%;
  border-bottom-color: rgba(0, 255, 160, .38);
  background: rgba(1, 13, 16, .22);
}

.terminal-gate__brand-mark {
  position: relative;
  width: 2.15rem;
  height: 2.45rem;
  border: 0;
  border-radius: 0;
  background: var(--tg-green);
  color: #001b18;
  clip-path: polygon(50% 0, 93% 16%, 88% 72%, 50% 100%, 12% 72%, 7% 16%);
  box-shadow: 0 0 .9rem rgba(0, 255, 145, .72);
}

.terminal-gate__brand-mark::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: #03221f;
  clip-path: inherit;
}

.terminal-gate__brand-mark i {
  position: relative;
  z-index: 1;
  color: var(--tg-green);
}

.terminal-gate__brand { font-family: var(--tg-display); font-size: 1.1rem; }
.terminal-gate__title { font-family: var(--tg-monospace); font-size: .8rem; letter-spacing: .04em; }
.terminal-gate__divider { height: 1.65rem; border-color: rgba(0, 255, 160, .78); }
.terminal-gate__slashes { font-family: var(--tg-display); font-size: 1.45rem; }

.terminal-gate__body {
  height: calc(100% - 7.2rem);
  box-sizing: border-box;
  padding: 3.15rem 6.6% 1.7rem;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(111, 255, 215, .018) 4px, transparent 5px), rgba(0, 19, 20, .06);
}

#visitorGate .terminal-gate__heading {
  font-family: var(--tg-display) !important;
  font-size: clamp(2.3rem, 4.3vw, 3.2rem);
  font-weight: 700;
  letter-spacing: .01em;
  text-shadow: 0 0 .65rem rgba(241, 255, 250, .18);
}

#visitorGate .terminal-gate__description {
  margin-top: .85rem;
  font-family: var(--tg-monospace) !important;
  font-size: .8rem;
}

.terminal-gate__inputline {
  width: 100%;
  min-height: 4rem;
  border-radius: 0;
  background: rgba(0, 27, 27, .17);
  box-shadow: inset 0 0 1.5rem rgba(0, 0, 0, .3), 0 0 .75rem rgba(0, 255, 145, .18), 0 0 2rem rgba(0, 255, 145, .08);
  clip-path: polygon(3.2% 0, 96% 0, 100% 50%, 96% 100%, 3.2% 100%, 0 50%);
}

.terminal-gate__user-icon {
  width: 3rem;
  height: 3rem;
  flex-basis: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 160, .5);
  background: rgba(0, 42, 39, .42);
  font-size: 1.25rem;
}

.terminal-gate__inputline input#visitorName {
  font-family: var(--tg-monospace) !important;
  font-size: .92rem;
}

.terminal-gate__input-bars {
  font-family: var(--tg-display);
  font-size: .75rem;
}

.terminal-gate__inputline button#enterSite {
  width: 4rem;
  height: 3.35rem;
  flex-basis: 4rem;
  border-radius: 0;
  clip-path: polygon(18% 0, 82% 0, 100% 50%, 82% 100%, 18% 100%, 0 50%);
  background: linear-gradient(135deg, #31ffc2, #00d98f);
  box-shadow: 0 .35rem .65rem rgba(0, 0, 0, .38), 0 0 1rem rgba(0, 255, 145, .5), inset 0 1px 0 rgba(255, 255, 255, .62);
}

.terminal-gate__statusbar {
  height: 3.05rem;
  box-sizing: border-box;
  padding: .8rem 6.6%;
  border-top-color: rgba(0, 255, 160, .3);
  background: rgba(0, 12, 14, .16);
}

.tg-status { font-family: var(--tg-monospace); font-size: .62rem; letter-spacing: .06em; }
.terminal-gate__status-rule { width: 3.2rem; margin-left: .75rem; }

@media (max-width: 600px) {
  .terminal-gate .splash-card.splash-card--single { width: min(92vw, 560px) !important; height: auto; min-height: 360px; }
  .terminal-gate__titlebar { height: 3.5rem; padding: 0 6%; }
  .terminal-gate__body { height: auto; padding: 2rem 6% 1.5rem; }
  .terminal-gate__statusbar { height: 2.8rem; padding: .7rem 6%; }
  .terminal-gate__brand-mark { width: 1.7rem; height: 2rem; }
  .terminal-gate__title { font-size: .62rem; }
}

#visitorGate .terminal-gate__form {
  width: 100%;
  max-width: none;
}