:root {
  --bg: #05060a;
  --fg: #c8d0c4;
  --dim: #5c6b5a;
  --accent: #7fffb0;
  --err: #ff6b6b;
  --mono: "SFMono-Regular", "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

/* Player-facing pages: dark terminal. Scoped to .crt so the /ops Bootstrap
   page (also inside .crt) still reads fine — Bootstrap's own dark theme wins
   there because .ops overrides the surface. */
html, body { margin: 0; padding: 0; background: var(--bg); }

.crt {
  min-height: 100vh;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  display: flex;
  justify-content: center;
}

.term {
  width: 100%;
  max-width: 680px;
  padding: 8vh 24px 14vh;
}

.front {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* typed intro */
.typed { white-space: pre-wrap; min-height: 12em; }
.typed .line { display: block; min-height: 1.7em; }
.cursor::after {
  content: "▋";
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.status { color: var(--dim); letter-spacing: 0.04em; margin: 0 0 2em; }

.dossier-title {
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--fg);
  border-bottom: 1px solid var(--dim);
  padding-bottom: 0.6em;
  margin: 0 0 1.4em;
}
.dossier p { margin: 0 0 1.1em; }
.dossier em { color: var(--accent); font-style: normal; }
.dossier strong { color: #fff; font-weight: 600; }

.cipher {
  color: var(--accent);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  margin: 1.4em 0 !important;
}
.hint { color: var(--dim); }
.todo { color: var(--dim); font-size: 0.85rem; opacity: 0.7; }

/* the five plates (placeholder art until real photos exist) */
.plates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  margin: 1.6em 0;
}
.plate { margin: 0; }
.plate-img {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  background: repeating-linear-gradient(45deg, #0b0e14, #0b0e14 6px, #0a0c11 6px, #0a0c11 12px);
  border: 1px solid #1b2230;
}
.plate figcaption { color: var(--dim); font-size: 0.78rem; margin-top: 0.5em; }

/* answer / join form */
.answer { display: flex; gap: 10px; margin-top: 2.4em; }
.answer input {
  flex: 1;
  background: #0a0c11;
  border: 1px solid #1b2230;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 1rem;
  padding: 12px 14px;
  outline: none;
}
.answer input:focus { border-color: var(--accent); }

.ghost {
  background: transparent;
  border: 1px solid var(--dim);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 1rem;
  padding: 12px 20px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }

.banner { letter-spacing: 0.04em; margin: 0 0 1.2em; }
.banner.ok { color: var(--accent); }
.banner.err { color: var(--err); }

.actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 2.6em;
  opacity: 1;
  transition: opacity 0.6s ease;
}
/* the front door hides its actions until the intro finishes typing */
.actions.pending { opacity: 0; }
.inline { margin: 0; }
.frequency { color: var(--dim); text-decoration: none; }
.frequency:hover { color: var(--accent); }

/* /ops password gate — a single bare box, no prompting */
.ops-login {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ops-pass {
  width: min(440px, 80vw);
  background: #0a0c11;
  border: 1px solid #1b2230;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
  padding: 18px 20px;
  outline: none;
}
.ops-pass:focus { border-color: var(--accent); }

/* /ops dashboard uses Bootstrap; just give it a comfortable surface */
.ops { color: #e8e8e8; }
.ops code { color: var(--accent); }
/* solved rows: a DARK green highlight (override Bootstrap's light table-* vars)
   so the mint guess text stays high-contrast and on-theme */
.ops tr.solved {
  --bs-table-bg: #0d2018;
  --bs-table-color: #d8f5e4;
}
.ops tr.solved code { color: var(--accent); }
