/* Coalfire DivisionHex brand palette — derived from coalfire.com/services/security.
   Landing and login pages use these directly. Console pages override them in the
   .console-theme block further down. */
:root {
  --ink: #333f48;
  --ink-soft: #3e4850;
  --ink-deep: #141f20;
  --paper: #ffffff;
  --paper-alt: #f4f6f9;
  --line: #d9dfe7;
  --text: #333f48;
  --muted: #6b7a87;
  --accent: #c8552d;
  --accent-gold: #f0b323;
  --accent-soft: #fff2ec;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #a16207;
  --warn-soft: #fefce8;
  --bad: #b42318;
  --bad-soft: #fef3f2;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(51, 63, 72, 0.06), 0 4px 12px rgba(51, 63, 72, 0.05);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hex: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper-alt);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 620px; margin: 0 auto; padding: 0 24px; }

/* ── Chrome ─────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--ink);
  color: #fff;
  padding: 14px 0;
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; }
.topbar a { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 14px; }
.topbar a:hover, .topbar a.active { color: #fff; }
/* .topbar a has specificity (0,1,1) and would otherwise beat .btn (0,1,0), so a
   button in the top bar inherits the near-white link color and its label
   disappears against the white background. Re-assert the button's own colours
   here with matching specificity. */
.topbar a.btn { color: var(--text); }
.topbar a.btn:hover { color: var(--text); background: var(--paper-alt); }
.topbar a.btn-primary,
.topbar a.btn-primary:hover { color: #fff; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  font-size: 14px;
  text-transform: uppercase;
  color: #fff !important;
}
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: rgba(255, 255, 255, 0.6); }

main { padding: 32px 0 64px; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
  background: var(--paper);
}
/* Landing page gets a dark footer matching the DivisionHex style */
.landing-page footer.site {
  background: var(--ink-deep);
  border-top-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
}

/* ── Type ───────────────────────────────────────────────────────────────── */

h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* ── Surfaces ───────────────────────────────────────────────────────────── */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-tight { padding: 14px 16px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--paper-alt); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #a2360a; }
.btn-danger { color: var(--bad); border-color: #f0c4c0; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn[disabled], .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Forms ──────────────────────────────────────────────────────────────── */

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
label .required {
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  background: var(--paper);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
textarea { resize: vertical; }
.field { margin-bottom: 16px; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.field .err { font-size: 12.5px; color: var(--bad); margin-top: 4px; }
.checks label { font-weight: 400; font-size: 14px; }
.checks ul { list-style: none; padding: 0; margin: 0; }
.checks li { margin-bottom: 6px; }
.checks input { width: auto; margin-right: 8px; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */

.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs a {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Status pills ───────────────────────────────────────────────────────── */

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill-running { background: var(--ok-soft); color: var(--ok); border-color: #b7e4c7; }
.pill-paused { background: var(--paper-alt); color: var(--muted); border-color: var(--line); }
.pill-draft { background: var(--paper-alt); color: var(--muted); border-color: var(--line); }
.pill-deleted { background: var(--paper-alt); color: var(--muted); border-color: var(--line); }
.pill-creating, .pill-seeding, .pill-pausing, .pill-resuming, .pill-deleting {
  background: var(--warn-soft); color: var(--warn); border-color: #f5e3a3;
}
.pill-failed { background: var(--bad-soft); color: var(--bad); border-color: #f5c2bd; }

/* ── Tables ─────────────────────────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Collapsible lab-console cards ──────────────────────────────────────── */

details.card > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  list-style: none;
  margin: 0 0 12px;
  user-select: none;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: "";
  width: 0.42em;
  height: 0.42em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.5;
  flex-shrink: 0;
  margin-top: -2px;
}
details.card[open] > summary::before {
  transform: rotate(45deg);
  margin-top: -4px;
}
details.card:not([open]) > summary { margin-bottom: 0; }
details.card > summary .muted { font-weight: 500; font-size: 13px; }
details.destroy-box { margin-top: 4px; }
details.destroy-box > summary { cursor: pointer; }

#pending-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pending-answer {
  background: rgba(128, 128, 128, 0.08);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

/* ── Messages ───────────────────────────────────────────────────────────── */

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li {
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  margin-bottom: 8px;
}
.messages li.success { background: var(--ok-soft); border-color: #b7e4c7; color: #14532d; }
.messages li.error { background: var(--bad-soft); border-color: #f5c2bd; color: #7f1d1d; }
.messages li.warning { background: var(--warn-soft); border-color: #f5e3a3; color: #713f12; }
.messages li.info { background: var(--accent-soft); border-color: #f6cdb9; color: #7c2d12; }

.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ── Landing — DivisionHex style ───────────────────────────────────────── */

.hero {
  background: var(--ink-deep);
  color: #fff;
  padding: 96px 0 104px;
  position: relative;
  overflow: hidden;
}
/* Subtle diagonal texture reminiscent of the DivisionHex cracked-surface hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(240, 179, 35, 0.04) 0%, transparent 50%),
    linear-gradient(225deg, rgba(200, 85, 45, 0.03) 0%, transparent 50%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  max-width: 18ch;
  margin-bottom: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-gold);
}
.hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 56ch;
  margin: 0 0 32px;
  line-height: 1.65;
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 14px;
}
.hero .row { gap: 14px; }
.hero .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.45);
}
.hero .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}
.hero .btn-primary:hover { background: #b44a27; }

.section { padding: 64px 0; }
.section-alt {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* Dark DivisionHex-style section (charcoal bg, white text) */
.section-dark {
  background: var(--ink);
  color: #fff;
  border-top: none;
  border-bottom: none;
}
.section-dark h2 { color: #fff; }
.section-dark p { color: rgba(255, 255, 255, 0.74); }
.section-dark .step-num { background: var(--accent-gold); color: var(--ink-deep); }

.feature h3 { font-size: 16px; font-weight: 700; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* DivisionHex-style service cards — dark bg, amber left border */
.feature-card {
  background: var(--ink-deep);
  border: 1px solid rgba(200, 85, 45, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
}
.feature-card h3 { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { color: rgba(255, 255, 255, 0.7); margin: 0; font-size: 14.5px; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 34px;
  clip-path: var(--hex);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ── Projector card ─────────────────────────────────────────────────────── */

.projector {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 40px 48px 88px;
  position: relative;
}
.projector .label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}
.projector .value {
  font-family: var(--mono);
  font-size: clamp(28px, 6vw, 64px);
  font-weight: 600;
  margin-bottom: 40px;
  word-break: break-all;
}
.projector .value.accent { color: #fdba74; }

/* ── Login — DivisionHex dark style ────────────────────────────────────── */

.landing-page .brand-icon,
.login-page .brand-icon {
  background: var(--accent-gold);
  box-shadow: 0 0 10px rgba(240, 179, 35, 0.35);
}

.login-page {
  background: var(--ink-deep);
  color: #fff;
  min-height: 100vh;
}
.login-page .topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.login-page footer.site {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
}
.login-page .login-panel { padding-top: 24px; }
.login-page h1 {
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}
.login-page .lede {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}
.login-page .card {
  background: var(--ink);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  padding: 8px 28px 28px;
}
.login-page .tabs {
  margin: 0 -28px 24px;
  padding: 0 12px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.login-page .tabs a {
  flex: 1;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}
.login-page .tabs a.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.login-page .tabs a:hover { color: rgba(255, 255, 255, 0.8); }
.login-page label { color: rgba(255, 255, 255, 0.7); }
.login-page input[type="text"],
.login-page input[type="email"],
.login-page input[type="password"] {
  background: var(--ink-deep);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  min-height: 44px;
}
.login-page input:focus {
  border-color: var(--accent-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(240, 179, 35, 0.15);
}
.login-page input::placeholder { color: rgba(255, 255, 255, 0.3); }
.login-page .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  margin-top: 8px;
}
.login-page .btn-primary:hover { background: #b44a27; }
.login-page .field .help { color: rgba(255, 255, 255, 0.45); }
.login-page .field .err { color: #ff6b6b; }
.login-page .messages li {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}
.login-page .messages li.error {
  background: rgba(255, 23, 68, 0.1);
  border-color: rgba(255, 23, 68, 0.3);
  color: #ff6b6b;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */

.stack > * + * { margin-top: 14px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.log { font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.hide { display: none; }

/* ══════════════════════════════════════════════════════════════════════════
   Console theme — cyberpunk / runner glow
   Only active when <body class="console-theme">.
   Landing, login and public pages stay corporate/neutral.
   Neon is ember orange so the lab matches Coalfire without losing the HUD.
   Rust (#c8552d) stays on marketing fills; this neon is for glow, links, code.
   ══════════════════════════════════════════════════════════════════════════ */

body.console-theme {
  --ink: #0c0a09;
  --ink-soft: #161210;
  --paper: #1a1410;
  --paper-alt: #100c0a;
  --line: #3a2a22;
  --text: #e8dcd0;
  --muted: #8a7a6c;
  --accent: #ff7a2e;
  --accent-hot: #ffb070;
  --accent-soft: rgba(255, 122, 46, 0.10);
  --ok: #00e676;
  --ok-soft: rgba(0, 230, 118, 0.10);
  --warn: #ffab00;
  --warn-soft: rgba(255, 171, 0, 0.10);
  --bad: #ff1744;
  --bad-soft: rgba(255, 23, 68, 0.08);
  --neon: #ff7a2e;
  --neon-glow: rgba(255, 122, 46, 0.45);
  --display: "IBM Plex Sans Condensed", "IBM Plex Sans", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --glow: 0 0 12px rgba(255, 122, 46, 0.18);
  --glow-accent: 0 0 20px rgba(255, 122, 46, 0.30);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 122, 46, 0.08);

  font-family: "IBM Plex Sans", var(--sans);
  color: var(--text);
  background-color: var(--paper-alt);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -18%, rgba(255, 122, 46, 0.11), transparent 58%),
    radial-gradient(ellipse 50% 40% at 110% 115%, rgba(240, 179, 35, 0.05), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='42' height='48' viewBox='0 0 42 48'><g fill='none' stroke='rgba(255,122,46,0.075)' stroke-width='0.8'><path d='M21 1.2 L40 12 L40 36 L21 46.8 L2 36 L2 12 Z'/></g></svg>");
  background-size: auto, auto, 42px 48px;
  background-attachment: fixed;
}

/* ── Chrome ────────────────────────────────────────────────────────────── */

body.console-theme .topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 122, 46, 0.06);
}
body.console-theme .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent) !important;
  text-shadow: 0 0 14px rgba(255, 122, 46, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--display);
  font-size: 15px;
}
body.console-theme .topbar a { color: rgba(232, 220, 208, 0.7); }
body.console-theme .topbar a:hover,
body.console-theme .topbar a.active { color: var(--accent); text-shadow: 0 0 8px rgba(255, 122, 46, 0.3); }
body.console-theme .topbar a.btn { color: var(--text); background: var(--paper); border-color: var(--line); }
body.console-theme .topbar a.btn:hover { background: var(--ink-soft); border-color: var(--accent); }
body.console-theme .topbar .who { color: var(--muted); }

body.console-theme footer.site {
  background: var(--ink);
  border-top-color: var(--line);
  color: var(--muted);
}

/* ── Surfaces ──────────────────────────────────────────────────────────── */

body.console-theme .card {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
body.console-theme .card:hover {
  border-color: rgba(255, 122, 46, 0.16);
}

body.console-theme .notice {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

/* ── Type ──────────────────────────────────────────────────────────────── */

body.console-theme h1,
body.console-theme h2,
body.console-theme details.card > summary { color: #f3ebe3; font-family: var(--display); }
body.console-theme h1 { letter-spacing: 0.04em; text-transform: uppercase; }
body.console-theme h3 { color: #e4d6c8; }
body.console-theme .live-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 122, 46, 0.55);
}
body.console-theme a { color: var(--accent); }
body.console-theme a:hover { color: var(--accent-hot); text-shadow: 0 0 6px rgba(255, 122, 46, 0.3); }
body.console-theme code { color: var(--accent); background: rgba(255, 122, 46, 0.06); padding: 1px 5px; border-radius: 3px; }
body.console-theme .lede { color: var(--muted); }

/* ── Buttons ───────────────────────────────────────────────────────────── */

body.console-theme .btn {
  background: var(--paper);
  border-color: var(--line);
  color: var(--text);
}
body.console-theme .btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 122, 46, 0.15);
}
body.console-theme .btn-primary {
  background: rgba(255, 122, 46, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 122, 46, 0.3);
}
body.console-theme .btn-primary:hover {
  background: rgba(255, 122, 46, 0.22);
  box-shadow: var(--glow-accent);
}
body.console-theme .btn-danger {
  color: var(--bad);
  border-color: rgba(255, 23, 68, 0.3);
}
body.console-theme .btn-danger:hover {
  background: var(--bad-soft);
  border-color: var(--bad);
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.2);
}
body.console-theme .btn[disabled],
body.console-theme .btn:disabled { opacity: 0.3; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

body.console-theme input[type="text"],
body.console-theme input[type="email"],
body.console-theme input[type="password"],
body.console-theme input[type="number"],
body.console-theme select,
body.console-theme textarea {
  background: var(--ink);
  border-color: var(--line);
  color: var(--text);
}
body.console-theme input:focus,
body.console-theme select:focus,
body.console-theme textarea:focus {
  outline-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 122, 46, 0.15);
}
body.console-theme input::placeholder,
body.console-theme textarea::placeholder { color: var(--muted); opacity: 0.6; }

body.console-theme label { color: var(--muted); }
body.console-theme label .required { color: var(--accent); }

/* ── Tabs ──────────────────────────────────────────────────────────────── */

body.console-theme .tabs { border-bottom-color: var(--line); }
body.console-theme .tabs a { color: var(--muted); }
body.console-theme .tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
body.console-theme .tabs a:hover { color: var(--accent); }

/* ── Pills ─────────────────────────────────────────────────────────────── */

body.console-theme .pill-running {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(0, 230, 118, 0.3);
  text-shadow: 0 0 6px rgba(0, 230, 118, 0.3);
}
body.console-theme .pill-paused,
body.console-theme .pill-draft,
body.console-theme .pill-deleted {
  background: rgba(90, 115, 148, 0.1);
  color: var(--muted);
  border-color: var(--line);
}
body.console-theme .pill-creating,
body.console-theme .pill-seeding,
body.console-theme .pill-pausing,
body.console-theme .pill-resuming,
body.console-theme .pill-deleting {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(255, 171, 0, 0.3);
  text-shadow: 0 0 6px rgba(255, 171, 0, 0.3);
}
body.console-theme .pill-failed {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: rgba(255, 23, 68, 0.3);
  text-shadow: 0 0 6px rgba(255, 23, 68, 0.3);
}

/* ── Tables ────────────────────────────────────────────────────────────── */

body.console-theme th {
  color: var(--muted);
  border-bottom-color: var(--line);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.console-theme td { border-bottom-color: var(--line); }
body.console-theme tr:hover td { background: rgba(255, 122, 46, 0.03); }

/* ── Messages ──────────────────────────────────────────────────────────── */

body.console-theme .messages li {
  background: var(--paper);
  border-color: var(--line);
  color: var(--text);
}
body.console-theme .messages li.success {
  background: var(--ok-soft);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--ok);
}
body.console-theme .messages li.error {
  background: var(--bad-soft);
  border-color: rgba(255, 23, 68, 0.3);
  color: var(--bad);
}
body.console-theme .messages li.warning {
  background: var(--warn-soft);
  border-color: rgba(255, 171, 0, 0.3);
  color: var(--warn);
}
body.console-theme .messages li.info {
  background: var(--accent-soft);
  border-color: rgba(255, 122, 46, 0.2);
  color: var(--accent);
}

/* ── Utilities ─────────────────────────────────────────────────────────── */

body.console-theme .divider { background: var(--line); }
body.console-theme .kv dt { color: var(--muted); }
body.console-theme .log { color: var(--ok); }

/* ── Instructor notes ──────────────────────────────────────────────────── */

.instructor-notes {
  font-size: 14px;
  line-height: 1.6;
}
.notes-block {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line, #e0e0e0);
}
.notes-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.notes-block-label {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.notes-section {
  background: rgba(128,128,128,0.06);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 6px 0;
}
.notes-heading {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--fg, #222);
}
.notes-field {
  margin-bottom: 6px;
}
.notes-key {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}
.notes-list {
  margin: 2px 0 0 0;
  padding-left: 18px;
}
.notes-list li {
  margin-bottom: 3px;
}
.notes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 6px 0;
}
.notes-table td {
  padding: 4px 10px;
  border-bottom: 1px solid var(--line, #e0e0e0);
  vertical-align: top;
}
.notes-table tr:last-child td { border-bottom: none; }

/* Console-theme overrides for instructor notes */
body.console-theme .notes-heading { color: var(--accent); }
body.console-theme .notes-section { background: rgba(255, 122, 46,0.04); border: 1px solid rgba(255, 122, 46,0.08); }
body.console-theme .notes-table td { border-color: rgba(255, 122, 46,0.1); }

/* ── Projector override — keep the dark look but use glow accents ──── */

body.console-theme .projector {
  background: var(--ink);
  box-shadow: inset 0 0 120px rgba(255, 122, 46, 0.03);
}
body.console-theme .projector .value.accent {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255, 122, 46, 0.4);
}

/* ── Atmosphere: grain + scanlines (sit above the grid, below chrome) ── */

body.console-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.85'/></svg>");
}
body.console-theme::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 122, 46, 0.012) 2px,
    rgba(255, 122, 46, 0.012) 4px
  );
}

/* ══════════════════════════════════════════════════════════════════════════
   HUNT HUB — attendee mission control
   ══════════════════════════════════════════════════════════════════════════ */

body.hunt-hub {
  --neon: #ff7a2e;
  --neon-dim: rgba(255, 122, 46, 0.15);
  --neon-glow: rgba(255, 122, 46, 0.45);
  --gold: #FFD700;
  --green: #00FF88;
  --red: #FF4757;
  --surface: rgba(22, 12, 8, 0.62);
}
body.hunt-hub .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 11px;
  height: 12px;
  background: var(--neon, var(--accent));
  clip-path: var(--hex);
  box-shadow: 0 0 8px var(--neon-glow, rgba(255, 122, 46, 0.45)), 0 0 16px rgba(255, 122, 46, 0.35);
  flex-shrink: 0;
}

/* Layout: main + sidebar */
.hunt-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .hunt-layout { grid-template-columns: 1fr; }
}

body.hunt-hub main > .wrap { max-width: 1200px; }

.hunt-command {
  margin-bottom: 22px;
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 122, 46, 0.14);
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 18px 28px;
}
.hunt-command-lead { grid-column: 1; }
.hunt-command-stats {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 16px 20px;
}
.hunt-progress { grid-column: 1 / -1; margin: 0; }
@media (max-width: 800px) {
  .hunt-command { grid-template-columns: 1fr; }
  .hunt-command-stats { justify-content: flex-start; }
}
.hunt-eyebrow,
.ops-eyebrow,
.pj-event-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hunt-eyebrow::before,
.ops-eyebrow::before,
.pj-event-eyebrow::before {
  content: "";
  width: 8px;
  height: 9px;
  background: currentColor;
  clip-path: var(--hex);
  box-shadow: 0 0 8px var(--neon-glow, rgba(255, 122, 46, 0.4));
}
h1.hunt-title {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f6eee6;
  text-shadow: 0 0 24px var(--neon-glow);
  margin: 0;
  line-height: 0.95;
}
.hunt-command-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.hunt-stat-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.hunt-stat-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #f3ebe3;
  letter-spacing: -0.02em;
}
.hunt-discover { align-self: center; }
.btn-glow {
  box-shadow: 0 0 15px var(--neon-glow), inset 0 0 15px rgba(255, 122, 46,0.1);
  border: 1px solid var(--neon);
  text-shadow: 0 0 8px var(--neon-glow);
  transition: box-shadow 0.3s, transform 0.15s;
}
.btn-glow:hover {
  box-shadow: 0 0 25px var(--neon-glow), 0 0 50px rgba(255, 122, 46,0.2), inset 0 0 20px rgba(255, 122, 46,0.15);
  transform: translateY(-1px);
}

/* Scenario cards */
.hunt-scenario-card {
  background: var(--surface);
  border: 1px solid rgba(255, 122, 46,0.12);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.scenario-kicker {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.scenario-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0;
}
.hunt-start {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.scenario-brief {
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 16px;
}
.pill-difficulty { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.pill-easy { background: rgba(0,255,136,0.15); color: var(--green); }
.pill-medium { background: rgba(255,215,0,0.15); color: var(--gold); }
.pill-hard { background: rgba(255,71,87,0.15); color: var(--red); }

/* Objectives */
.objectives-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon);
  margin: 0 0 12px 0;
}
.objectives-grid {
  border-top: 1px solid rgba(255, 122, 46,0.1);
  padding-top: 16px;
}
.objective-card {
  background: rgba(24, 12, 8, 0.5);
  border: 1px solid rgba(255, 122, 46,0.08);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.objective-card:hover {
  border-color: rgba(255, 122, 46,0.25);
  box-shadow: 0 0 12px rgba(255, 122, 46,0.08);
}
.objective-found {
  border-color: rgba(0,255,136,0.3) !important;
  background: rgba(0,255,136,0.04);
}
.objective-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.obj-index {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 2.2ch;
  padding-top: 3px;
}
.objective-found .obj-index { color: var(--green); }
.objective-card.just-found {
  animation: found-pop 0.7s ease;
}
.objective-status-icon {
  flex-shrink: 0;
  margin-top: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-icon {
  display: block;
  width: 13px;
  height: 15px;
  position: relative;
  clip-path: var(--hex);
}
.status-icon.open {
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
}
.status-icon.open::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #161210;
  clip-path: var(--hex);
}
.status-icon.found {
  background: var(--green);
  box-shadow: 0 0 10px rgba(0,255,136,0.7), 0 0 18px rgba(0,255,136,0.35);
}
.objective-info { flex: 1; }
.objective-title {
  font-weight: 600;
  color: #fff;
  font-size: 15px;
  margin-bottom: 4px;
}
.objective-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}
.points-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
  border: 1px solid rgba(255,215,0,0.3);
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.points-badge small {
  font-size: 10px;
  font-weight: 400;
  margin-left: 2px;
  opacity: 0.7;
}

/* Answer form */
.submit-form-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 122, 46,0.06);
}
.answer-row {
  display: flex;
  gap: 8px;
}
.answer-input {
  flex: 1;
  background: rgba(24, 12, 8, 0.82) !important;
  border: 1px solid rgba(255, 122, 46,0.2) !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
}
.answer-input:focus {
  border-color: var(--neon) !important;
  box-shadow: 0 0 10px rgba(255, 122, 46,0.15);
  outline: none;
}
.answer-input::placeholder { color: rgba(255,255,255,0.3); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.submit-feedback {
  font-size: 13px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 4px;
}
.feedback-ok {
  color: var(--green);
  background: rgba(0,255,136,0.08);
}
.feedback-error {
  color: var(--red);
  background: rgba(255,71,87,0.08);
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */

.hunt-sidebar { position: sticky; top: 16px; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid rgba(255, 122, 46,0.12);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.sidebar-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Live dot */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 8px rgba(0,255,136,0.6);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(0,255,136,0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 4px rgba(0,255,136,0.3); }
}

/* Leaderboard */
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: background 0.2s;
}
.lb-row:hover { background: rgba(255, 122, 46,0.05); }
.lb-first {
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.2);
}
.lb-first:hover { background: rgba(255,215,0,0.12); }
.lb-rank {
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  min-width: 28px;
}
.lb-first .lb-rank { color: var(--gold); }
.lb-name {
  flex: 1;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-score {
  font-weight: 700;
  font-size: 14px;
  color: var(--neon);
  white-space: nowrap;
}
.lb-first .lb-score { color: var(--gold); text-shadow: 0 0 10px rgba(255,215,0,0.4); }
.lb-empty, .feed-empty {
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  padding: 16px 0;
}

/* Broadcast feed */
.feed-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 122, 46,0.06);
  font-size: 14px;
}
.feed-item.is-new {
  animation: toast-in 0.35s ease-out;
}
.feed-item:last-child { border-bottom: none; }
.feed-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 122, 46,0.08);
}
.feed-page {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
}
.feed-pager .btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}
.feed-time {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
  margin-right: 8px;
}
.feed-msg { color: rgba(255,255,255,0.8); }

/* My submissions */
.sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 13px;
}
.sub-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sub-pending .sub-status-dot { background: var(--gold); }
.sub-accepted .sub-status-dot { background: var(--green); box-shadow: 0 0 6px rgba(0,255,136,0.5); }
.sub-rejected .sub-status-dot { background: var(--red); }
.sub-obj { flex: 1; color: rgba(255,255,255,0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-status-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.sub-pending .sub-status-label { color: var(--gold); }
.sub-accepted .sub-status-label { color: var(--green); }
.sub-rejected .sub-status-label { color: var(--red); }

/* Progress, hints, debrief, toasts */
.hunt-progress {
  margin-bottom: 0;
  padding: 4px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.progress-row { display: flex; flex-direction: column; gap: 6px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.progress-track {
  height: 12px;
  background: rgba(255, 122, 46,0.1);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.35);
}
.progress-fill {
  height: 100%;
  width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 99px;
  background-size: 200% 100%;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: progress-sheen 2.4s ease-in-out infinite;
}
.progress-fill-you {
  background-image: linear-gradient(90deg, #ff7a2e, #f0b323, #ff7a2e);
  box-shadow: 0 0 12px rgba(255, 122, 46, 0.55), 0 0 22px rgba(240, 179, 35, 0.25);
  animation: progress-flow 3.2s linear infinite;
}
.progress-fill-room {
  background-image: linear-gradient(90deg, #8a7a6c, #f0b323, #8a7a6c);
  box-shadow: 0 0 12px rgba(138, 122, 108, 0.45), 0 0 22px rgba(240, 179, 35, 0.2);
  animation: progress-flow 3.8s linear infinite;
}
@keyframes progress-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes progress-sheen {
  0% { transform: translateX(-140%); }
  100% { transform: translateX(280%); }
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .progress-fill::after {
    animation: none;
  }
}
.display-name-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.display-name-form input {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}
.objective-locked {
  opacity: 0.55;
  border-style: dashed;
}
.obj-feedback {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.obj-feedback.sub-pending { background: rgba(255,215,0,0.08); color: var(--gold); }
.obj-feedback.sub-accepted { background: rgba(0,255,136,0.08); color: var(--green); }
.obj-feedback.sub-rejected { background: rgba(255,71,87,0.08); color: var(--red); }
.obj-hint {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  background: rgba(255,215,0,0.06);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}
.obj-query, .feed-query {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.obj-query code, .feed-query code {
  flex: 1;
  font-size: 12px;
  word-break: break-all;
  color: var(--neon);
}
.query-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-wrap: nowrap;
  margin-top: 10px;
  background: rgba(8, 4, 2, 0.55);
  border: 1px solid rgba(255, 122, 46, 0.16);
  border-radius: 8px;
  overflow: hidden;
}
.query-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 122, 46, 0.06);
  border-bottom: 1px solid rgba(255, 122, 46, 0.1);
}
.query-dots {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 10px 0 0 #f0b323, 20px 0 0 rgba(255, 255, 255, 0.25);
  margin-right: 22px;
  flex-shrink: 0;
}
.query-label {
  flex: 1;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.query-block code {
  display: block;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--accent-hot);
  background: transparent;
}
.obj-debrief {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--green);
  background: rgba(0,255,136,0.06);
  color: var(--green);
  font-size: 13px;
}
.debrief-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.08);
  color: var(--green);
  border-radius: 8px;
  font-weight: 600;
}
.debrief-notes {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 122, 46,0.12);
  border-radius: 12px;
}
.debrief-notes h3 { margin: 0 0 8px; font-size: 15px; color: #fff; }
.debrief-notes ul { margin: 0; padding-left: 18px; color: rgba(255,255,255,0.75); }
.hunt-toasts {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.hunt-toast {
  background: rgba(18, 10, 8, 0.92);
  border: 1px solid rgba(255, 122, 46,0.35);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 122, 46,0.15);
  font-size: 14px;
  animation: toast-in 0.35s ease-out;
}
.hunt-toast-blood {
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.25);
  color: #ffe082;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes found-pop {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
  100% { box-shadow: none; }
}

/* Admin review chips and hunt pacing */
.review-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.chip {
  background: transparent;
  border: 1px solid var(--line, rgba(255, 122, 46,0.2));
  color: inherit;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 99px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.pacing-switch { margin-bottom: 16px; }
.pacing-choices ul { list-style: none; padding: 0; margin: 0 0 12px; }
.pacing-choices li,
.pacing-choices label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 500;
}
.pacing-choices input { width: auto; margin: 0; }
.pacing-scenario {
  font-family: var(--mono, inherit);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 10px;
  border-bottom: none;
}
.pacing-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.pacing-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.06));
}
.inline-form { display: inline; margin: 0; }

/* Projector: full-bleed tab, no site chrome */
body.projector-page {
  background: var(--ink);
}
body.projector-page main { padding: 0; }
body.projector-page footer.site { display: none; }
body.projector-page .projector-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.projector {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 40px 48px 88px;
  position: relative;
  overflow: hidden;
}
.projector::before {
  content: "";
  position: absolute;
  width: min(46vw, 460px);
  height: min(52vw, 520px);
  right: -8vw;
  top: -10vw;
  clip-path: var(--hex);
  background: rgba(255, 122, 46, 0.07);
  pointer-events: none;
}
.projector::after {
  content: "";
  position: absolute;
  width: min(22vw, 220px);
  height: min(25vw, 250px);
  left: -4vw;
  bottom: 8vh;
  clip-path: var(--hex);
  background: rgba(240, 179, 35, 0.05);
  pointer-events: none;
}
.projector.projector-live {
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  padding: 28px 40px 80px;
  gap: 20px;
}
.projector-view { width: 100%; }
.projector-view[hidden] { display: none !important; }
.projector-board-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.projector-meta {
  color: rgba(255,255,255,0.55);
  font-size: 15px;
  max-width: 52ch;
  margin: 0 auto;
}
.projector-meta strong { color: #fdba74; }

.pj-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.pj-title { min-width: 200px; }
.pj-room-name {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
.pj-progress-block { flex: 1; min-width: 280px; max-width: 640px; }
.pj-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.pj-progress-count {
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
}
.pj-progress-track {
  height: 14px;
  background: rgba(255, 122, 46,0.12);
  border-radius: 99px;
  overflow: hidden;
}
.pj-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff7a2e, #f0b323);
  box-shadow: 0 0 18px rgba(255, 122, 46,0.45);
  transition: width 0.4s ease;
}

.pj-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .pj-grid { grid-template-columns: 1fr; }
}
.pj-pane {
  background: rgba(22, 12, 8, 0.45);
  border: 1px solid rgba(255, 122, 46,0.12);
  border-radius: 16px;
  padding: 20px 24px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pj-leaderboard, .pj-solves {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 8px;
}
.pj-empty {
  color: rgba(255,255,255,0.4);
  font-size: clamp(18px, 2.2vw, 26px);
  padding: 24px 0;
}
.pj-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto auto;
  align-items: baseline;
  gap: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: clamp(22px, 2.6vw, 34px);
}
.pj-row-first {
  background: rgba(255, 215, 0, 0.08);
  border-radius: 10px;
  border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.22);
}
.pj-rank {
  font-family: var(--mono);
  color: rgba(255,255,255,0.45);
  font-weight: 700;
}
.pj-row-first .pj-rank { color: var(--gold, #ffd700); }
.pj-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-solves-count {
  font-size: 0.55em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pj-score {
  font-family: var(--mono);
  font-weight: 700;
  color: #ffd54a;
  white-space: nowrap;
}
.pj-score small { font-size: 0.5em; font-weight: 500; color: rgba(255,213,74,0.7); }

.pj-solve {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: clamp(18px, 2vw, 26px);
}
.pj-solve-name { font-weight: 650; }
.pj-solve-title { color: rgba(255,255,255,0.7); }
.pj-first {
  display: inline-block;
  font-size: 0.55em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.pj-note {
  border: 1px solid rgba(255, 122, 46,0.2);
  background: rgba(255, 122, 46,0.08);
  border-radius: 12px;
  padding: 14px 20px;
}
.pj-broadcast {
  font-size: clamp(20px, 2.4vw, 30px);
  color: #fff;
  line-height: 1.3;
  margin-top: 4px;
}

.projector-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.projector-controls a {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}
.projector-switch {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 99px;
  overflow: hidden;
}
.pj-tab {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
}
.pj-tab.is-active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ── Instructor live ops ───────────────────────────────────────────────── */

.ops-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
@media (max-width: 800px) {
  .ops-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ops-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.ops-stat-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.ops-stat-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #f3ebe3;
  line-height: 1;
}
.ops-stat-status {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ops-stat-hot {
  border-color: rgba(255, 122, 46, 0.35);
  box-shadow: var(--glow);
}
.ops-stat-hot .ops-stat-value { color: var(--accent); }

.pending-queue {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pending-card {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  border-left: 3px solid var(--line);
}
.pending-card:first-child {
  border-left-color: var(--accent);
  box-shadow: var(--glow);
  animation: pending-hot 2.6s ease-in-out infinite;
}
.pending-card.is-new {
  animation: pending-in 0.8s ease;
}
.pending-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.pending-hunter {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f3ebe3;
}
.pending-path {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.pending-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.pending-pts {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold, #f0b323);
}
.pending-when {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.pending-card .pending-answer {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.4;
  color: #f6eee6;
  background: rgba(255, 122, 46, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  word-break: break-word;
}
.pending-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
@keyframes pending-hot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 46, 0); }
  50% { box-shadow: 0 0 18px rgba(255, 122, 46, 0.18); }
}
@keyframes pending-in {
  from { background: rgba(255, 122, 46, 0.12); }
  to { background: var(--ink); }
}

/* ── Projector event poster ────────────────────────────────────────────── */

.pj-event-eyebrow {
  color: var(--accent-gold, #f0b323);
}
.pj-event-title {
  font-family: var(--display);
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 0 40px rgba(255, 122, 46, 0.28);
}
.pj-event-sub {
  margin: 0 0 36px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}
.pj-rank, .pj-score, .pj-progress-count, .projector .value {
  font-family: var(--mono);
}
.projector.pj-blood-flash {
  animation: blood-wash 1.4s ease;
}
.pj-solve-flash {
  animation: found-pop 0.9s ease;
}
.pj-first {
  color: var(--gold, #ffd700);
}
@keyframes blood-wash {
  0% { box-shadow: inset 0 0 180px rgba(255, 215, 0, 0.22); }
  100% { box-shadow: inset 0 0 120px rgba(255, 122, 46, 0.03); }
}

@media (prefers-reduced-motion: reduce) {
  .hunt-toast,
  .feed-item.is-new,
  .objective-card.just-found,
  .pending-card:first-child,
  .pending-card.is-new,
  .projector.pj-blood-flash,
  .pj-solve-flash,
  .live-dot {
    animation: none;
  }
}
