:root {
  --bg: #05080d;
  --panel: #0e1422;
  --panel-h: #131a2c;
  --line: #1f2740;
  --text: #e6ecf5;
  --muted: #8a96b0;
  --accent: #d4b46a;
  --accent-dim: #6f5a2c;
  --ok: #56c47a;
  --warn: #d4b46a;
  --bad: #e66a6a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: "Cinzel", Georgia, serif; letter-spacing: 4px; font-weight: 700; }
.brand span { margin-left: 12px; color: var(--muted); letter-spacing: 2px; font-weight: 500; font-size: 12px; }
.user { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.user img { width: 24px; height: 24px; border-radius: 50%; }

main { padding: 18px 22px 40px; max-width: 920px; margin: 0 auto; }

button, .login {
  background: var(--panel-h);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
  font: inherit;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 11px;
}
button:hover, .login:hover { background: var(--accent-dim); border-color: var(--accent); }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button.primary { background: var(--accent); color: #1a1a1a; border-color: var(--accent); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.ghost { background: transparent; }

/* Login gate */
.anon {
  max-width: 440px; margin: 13vh auto 0; padding: 32px 28px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; text-align: center;
}
.anon h1 { font-family: "Cinzel", Georgia, serif; letter-spacing: 4px; font-size: 22px; margin: 0 0 6px; }
.anon p { color: var(--muted); }
.login { display: inline-block; margin-top: 14px; padding: 11px 26px; text-decoration: none; }
.anon .err { color: var(--bad); margin-top: 12px; font-size: 13px; }

/* Survey list */
.intro { color: var(--muted); margin: 4px 0 18px; }
.cat-head {
  font-family: "Cinzel", Georgia, serif; letter-spacing: 2px; font-size: 13px;
  text-transform: uppercase; color: var(--accent); margin: 22px 0 10px;
}
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.card h3 { margin: 0; font-size: 15px; color: var(--text); }
.card .desc { color: var(--muted); font-size: 13px; flex: 1; }
.card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.card .meta { font-size: 11.5px; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  border-radius: 12px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--muted);
}
.pill.done { color: var(--ok); border-color: var(--ok); }
.pill.cat { border-color: var(--accent-dim); color: var(--accent); }

.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Survey form */
.survey-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.survey-head h2 { margin: 0; font-family: "Cinzel", Georgia, serif; letter-spacing: 1px; font-size: 20px; }
.back { background: transparent; border: none; color: var(--muted); padding: 4px 0; }
.back:hover { color: var(--accent); background: transparent; }
.survey-desc { color: var(--muted); margin: 0 0 18px; }

.q {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 16px 18px; margin-bottom: 12px;
}
.q .prompt { font-size: 14px; margin-bottom: 12px; }
.q .prompt .req { color: var(--bad); margin-left: 4px; }
.q .opts { display: flex; flex-direction: column; gap: 8px; }
.q label.opt { display: flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text); font-size: 13.5px; }
.q label.opt input { accent-color: var(--accent); width: 16px; height: 16px; }
.q textarea {
  width: 100%; min-height: 90px; resize: vertical;
  background: #04060a; color: var(--text); border: 1px solid var(--line);
  border-radius: 4px; padding: 9px 11px; font: inherit;
}
.rating { display: flex; gap: 8px; }
.rating button {
  width: 42px; height: 42px; font-size: 15px; border-radius: 5px; padding: 0;
}
.rating button.sel { background: var(--accent); color: #1a1a1a; border-color: var(--accent); font-weight: 700; }
.rating-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; max-width: 250px; }

.submit-bar { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.submit-bar .status { color: var(--ok); font-size: 13px; }
.submit-bar .status.err { color: var(--bad); }

/* Section nav */
.nav { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.navbtn {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 8px 16px; color: var(--muted); font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
}
.navbtn:hover { color: var(--text); background: transparent; }
.navbtn.on { color: var(--accent); border-bottom-color: var(--accent); }

.card.tut { cursor: pointer; }
.card.tut:hover { border-color: var(--accent-dim); }

/* Tutorial detail */
.tut-section { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; margin-bottom: 12px; }
.tut-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tut-heading { font-size: 14px; color: var(--text); font-weight: 600; }
.tut-body { color: var(--muted); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.keycap {
  display: inline-block; min-width: 22px; text-align: center;
  padding: 3px 9px; font-size: 12px; font-weight: 700;
  font-family: "Cascadia Code", Consolas, monospace;
  color: #1a1a1a; background: var(--accent);
  border: 1px solid #b9963f; border-bottom-width: 3px; border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

/* Role guides — UI mock + numbered callouts */
.rg-stage {
  position: relative; width: 100%; max-width: 1000px; margin: 6px auto 0;
}
.rg-stage.img { aspect-ratio: auto; }  /* a screenshot defines its own height */
.rg-img { display: block; width: 100%; height: auto; border-radius: 8px; }
/* embedded authorised dashboard mock — fixed 820px (its design width) so the
   badges, placed by % of the stage, line up with the dashboard 1:1 */
.rg-stage.mock { width: 820px; max-width: 100%; min-height: 420px; }
.rg-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; border-radius: 8px; background: transparent;
  pointer-events: none;  /* badges + page own the clicks, not the mock */
}
.rg-badge {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #1a1206;
  border: 2px solid #fff6e0; box-shadow: 0 0 0 2px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  font: 700 13px "Cascadia Code", Consolas, monospace;
}
.rg-legend { max-width: 1000px; margin: 18px auto 0; }
.rg-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rg-item:last-child { border-bottom: none; }
.rg-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #1a1206; font: 700 12px "Cascadia Code", Consolas, monospace;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.rg-text { color: var(--text); font-size: 13.5px; line-height: 1.5; }

footer { text-align: center; color: var(--muted); font-size: 11px; padding: 24px 0; }

/* Launcher download CTA in the topbar — gold, stands out from sign-out */
.dl-launcher {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  color: #1a1a1a;
  border: 1px solid var(--accent);
  cursor: pointer;
}
.dl-launcher:hover { background: #e6c878; border-color: #e6c878; }

/* ===== Server-status pill (nav) ===== */
.status-pill { margin-left: auto; font-size: 12px; padding: 5px 12px; border-radius: 14px;
  background: var(--panel-h); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.status-pill.on { color: var(--ok); border-color: rgba(86,196,122,0.4); }
.status-pill.off { color: var(--bad); border-color: rgba(230,106,106,0.4); }

/* ===== Report form ===== */
.card.form { max-width: 720px; }
.form h2 { margin: 0 0 4px; font-family: "Cinzel", Georgia, serif; }
.frow { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.frow > label { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.frow input, .frow textarea, .frow select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 9px 11px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box; }
.frow textarea { resize: vertical; }
.frow input:focus, .frow textarea:focus, .frow select:focus { outline: none; border-color: var(--accent); }
.form-msg { min-height: 18px; font-size: 13px; margin-top: 4px; }
.form-msg.ok { color: var(--ok); }
.form-msg.bad { color: var(--bad); }

/* ===== My Reports rows ===== */
.report-row { margin-bottom: 10px; }
.rr-head { display: flex; align-items: center; gap: 10px; }
.rr-head strong { font-size: 15px; flex: 1; }
.rr-kind { font-size: 16px; }
.rr-status { font-size: 11px; padding: 2px 9px; border-radius: 10px; letter-spacing: .5px;
  background: var(--panel-h); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.rr-status.s-new { color: var(--accent); border-color: var(--accent-dim); }
.rr-status.s-ack, .rr-status.s-in-progress { color: #6fb3e8; border-color: rgba(111,179,232,0.4); }
.rr-status.s-fixed { color: var(--ok); border-color: rgba(86,196,122,0.4); }
.rr-status.s-wontfix, .rr-status.s-duplicate { color: var(--muted); }
.rr-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rr-desc { font-size: 13px; margin-top: 8px; white-space: pre-wrap; }
.rr-note { font-size: 13px; margin-top: 8px; padding: 8px 10px; border-left: 2px solid var(--accent-dim);
  background: rgba(212,180,106,0.06); color: var(--text); white-space: pre-wrap; }

/* ===== What's New / Known Issues ===== */
.notices-head { margin: 18px 2px 8px; }
.notices-head h2 { font-family: "Cinzel", Georgia, serif; font-size: 18px; margin: 0; color: var(--accent); }
.notice { margin-bottom: 10px; }
.notice.pinned { border-left: 3px solid var(--accent); }
.notice-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice-head strong { font-size: 15px; flex: 1; }
.notice-ver { font-family: "Cinzel", serif; font-size: 11px; font-weight: 700; color: #1a1a1a;
  background: var(--accent); padding: 2px 9px; border-radius: 10px; }
.notice-date { font-size: 12px; color: var(--muted); }
.notice-body { font-size: 13.5px; margin-top: 8px; white-space: pre-wrap; line-height: 1.5; }
.ki.resolved { opacity: 0.62; }
.ki-sev { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border-radius: 9px;
  border: 1px solid var(--line); }
.ki-sev.sev-low { color: var(--muted); }
.ki-sev.sev-medium { color: var(--accent); border-color: var(--accent-dim); }
.ki-sev.sev-high { color: var(--bad); border-color: rgba(230,106,106,0.4); }
.ki-status { font-size: 11px; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.ki-status.st-open { color: var(--warn); border: 1px solid var(--accent-dim); }
.ki-status.st-resolved { color: var(--ok); border: 1px solid rgba(86,196,122,0.4); }

/* ===== Playtest: schedule / coverage / leaderboard ===== */
.session.past, .cov.done { opacity: 0.6; }
.rsvp-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.rsvp-tally { font-size: 12px; color: var(--muted); }
.rsvp-row { display: flex; gap: 6px; }
.rsvp-btn { background: var(--panel-h); border: 1px solid var(--line); color: var(--text);
  padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.rsvp-btn:hover { border-color: var(--accent); }
.rsvp-btn.on { background: var(--accent); color: #1a1a1a; border-color: var(--accent); font-weight: 600; }
.cov-area { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent);
  border: 1px solid var(--accent-dim); padding: 2px 8px; border-radius: 9px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-family: "Cinzel", serif; font-weight: 700; color: var(--accent); width: 36px; }
.lb-name { flex: 1; font-size: 14px; }
.lb-stats { font-size: 12px; color: var(--muted); }

/* ===== Help: troubleshooter + checklist ===== */
.ts { margin-bottom: 6px; }
.ts-q { width: 100%; text-align: left; background: none; border: none; color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; font-family: inherit; }
.ts-a { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; cursor: pointer; }
.chk-row input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ===== Recommended-setup callout (Help tab) ===== */
.rec-note { border-left: 4px solid var(--accent); background: rgba(212,180,106,0.08); }
.rec-note strong { display: block; font-family: "Cinzel", Georgia, serif; color: var(--accent); font-size: 15px; margin-bottom: 6px; }
.rec-note p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text); }
