:root {
  --void: #030408;
  --surface: #080b12;
  --glass: rgba(12, 16, 26, 0.72);
  --border: rgba(120, 140, 180, 0.14);
  --border-bright: rgba(94, 184, 255, 0.35);
  --text: #e8ecf4;
  --muted: #5c6478;
  --dim: #3a4050;
  --cyan: #5eb8ff;
  --ice: #a8d4ff;
  --violet: #8b7cf6;
  --gold: #c9a227;
  --pulse: rgba(94, 184, 255, 0.45);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Syne", system-ui, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--void);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.008) 2px,
    rgba(255, 255, 255, 0.008) 4px
  );
  opacity: 0.6;
}

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.veil {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  gap: 32px;
}

/* ── Header ── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sigil {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  display: grid;
  place-items: center;
}

.sigil::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--cyan);
  animation: orbit 8s linear infinite;
  opacity: 0.5;
}

.sigil-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--pulse), 0 0 24px var(--pulse);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pill {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}

.pill.live {
  border-color: rgba(74, 222, 154, 0.35);
  color: #4ade9a;
}

.pill.observed {
  border-color: rgba(139, 124, 246, 0.35);
  color: var(--violet);
}

/* ── Main monolith ── */
.monolith {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 48px 28px 40px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 120px rgba(94, 184, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.monolith::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}

.title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.2rem, 12vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
  background: linear-gradient(180deg, var(--text) 0%, var(--ice) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.subtitle {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -8px;
}

.whisper {
  max-width: 420px;
  font-size: 14px;
  color: var(--ice);
  opacity: 0.85;
  min-height: 2.8em;
  transition: opacity 0.6s ease;
}

.whisper.fade { opacity: 0; }

.telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.telemetry .cell {
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.telemetry .label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}

.telemetry .value {
  font-size: 15px;
  font-weight: 500;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

/* ── Signal input ── */
.signal-wrap {
  width: 100%;
  max-width: 440px;
}

.signal-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  margin-bottom: 8px;
}

.signal-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.signal-row:focus-within {
  border-color: var(--border-bright);
  box-shadow: 0 0 24px rgba(94, 184, 255, 0.08);
}

.signal-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--gold);
  font-size: 11px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.signal-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
}

.signal-input::placeholder { color: var(--dim); }

.signal-btn {
  border: none;
  background: rgba(94, 184, 255, 0.08);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.signal-btn:hover {
  background: rgba(94, 184, 255, 0.16);
  color: var(--ice);
}

.response {
  margin-top: 12px;
  min-height: 1.4em;
  font-size: 11px;
  color: var(--violet);
  text-align: left;
  opacity: 0;
  transition: opacity 0.4s;
}

.response.visible { opacity: 1; }

/* ── Footer ── */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.foot strong { color: var(--muted); font-weight: 500; }

.foot-clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

@media (max-width: 560px) {
  .telemetry { grid-template-columns: 1fr; }
  .status-row { justify-content: flex-start; }
  .top { flex-direction: column; align-items: flex-start; }
}