:root {
  --bg: #101820;
  --panel: #ffffff;
  --ink: #16232e;
  --muted: #657684;
  --line: #d8e1e8;
  --blue: #1f6fd1;
  --green: #147a45;
  --yellow: #b76a00;
  --red: #b42318;
  --gray: #667085;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef3f7;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .82fr) minmax(520px, 1fr);
  gap: 22px;
  padding: 24px;
}
.hero, .result, .report section, .report header {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: 0 18px 45px rgba(16, 24, 32, .08);
}
.hero {
  align-self: start;
}
.eyebrow {
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 13px;
}
h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: .96;
  margin: 10px 0;
  letter-spacing: 0;
}
h2, h3 { letter-spacing: 0; }
.lead {
  color: var(--muted);
  line-height: 1.55;
  font-size: 18px;
}
.notice {
  background: #fff7e8;
  border: 1px solid #ffd89a;
  color: #5d3b00;
  padding: 14px;
  line-height: 1.45;
  margin: 18px 0;
}
.form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: #354857;
}
input, select {
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
.check {
  grid-template-columns: 18px 1fr;
  align-items: center;
  font-weight: 700;
}
.check input {
  min-height: auto;
}
button, .report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 14px;
  background: var(--blue);
  color: #fff;
  border: 0;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.result.empty {
  color: var(--muted);
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.green { background: #e9f7ef; color: var(--green); }
.yellow { background: #fff4df; color: var(--yellow); }
.red { background: #ffe8e6; color: var(--red); }
.gray { background: #eef1f4; color: var(--gray); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.scenario-engine {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #b9cad6;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(242,247,250,.94)),
    repeating-linear-gradient(90deg, transparent 0, transparent 36px, rgba(31,111,209,.06) 37px);
}
.engine-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.engine-head h3 {
  margin: 2px 0 0;
  font-size: 22px;
}
.engine-score {
  min-width: 74px;
  text-align: center;
  padding: 9px 10px;
  background: #16232e;
  color: #fff;
  font-weight: 900;
}
.signal-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.signal-tile {
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.signal-tile b {
  display: block;
  margin-bottom: 8px;
}
.signal-tile.site { border-top: 5px solid #1f6fd1; }
.signal-tile.role { border-top: 5px solid #147a45; }
.signal-tile.process { border-top: 5px solid #b76a00; }
.signal-tile.data { border-top: 5px solid #7a3db8; }
.mission-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.scene-node {
  position: relative;
  min-height: 330px;
  padding: 14px;
  background: #fff;
  border: 1px solid #c8d5df;
  box-shadow: 0 12px 26px rgba(22, 35, 46, .08);
}
.scene-node::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -13px;
  width: 13px;
  height: 2px;
  background: #8ba2b3;
}
.scene-node:last-child::after {
  display: none;
}
.scene-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.scene-top span {
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}
.scene-top strong {
  padding: 5px 8px;
  background: #fff4df;
  color: var(--yellow);
  font-size: 12px;
}
.scene-node h4 {
  margin: 12px 0 10px;
  font-size: 19px;
}
.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.scene-meta span,
.debrief-strip span {
  padding: 6px 8px;
  background: #eef3f7;
  border: 1px solid #d8e1e8;
  font-size: 12px;
  font-weight: 800;
}
.scene-node p {
  color: #405463;
  line-height: 1.45;
}
.decision,
.correct-action {
  margin-top: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border-left: 4px solid #b76a00;
  background: #fff8ec;
}
.correct-action {
  border-left-color: #147a45;
  background: #effaf3;
}
.decision b,
.correct-action b {
  font-size: 12px;
  text-transform: uppercase;
}
.debrief-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.awareness-seed {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #b8d8c4;
  background: #f0fbf4;
}
.awareness-seed div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.awareness-seed b {
  width: 100%;
}
.awareness-seed span {
  padding: 7px 9px;
  background: white;
  border: 1px solid #c9ddd2;
  color: #244234;
  font-weight: 800;
}
.awareness-seed p {
  margin: 0;
  color: #315a43;
}
.category-card {
  border: 1px solid var(--line);
  padding: 14px;
}
.category-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.finding-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.finding-row p {
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.4;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 5px;
}
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.gray { background: var(--gray); }
.report {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px;
}
.report section, .report header {
  margin-bottom: 16px;
}
pre {
  white-space: pre-wrap;
  background: #f5f8fb;
  border: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
}
@media (max-width: 980px) {
  .shell, .category-grid, .signal-board { grid-template-columns: 1fr; }
  .shell { padding: 12px; }
  .mission-map { grid-template-columns: repeat(4, minmax(245px, 1fr)); }
}
