:root {
  --ink: #101827;
  --muted: #64748b;
  --page: #f5f7fb;
  --paper: #ffffff;
  --line: #dbe5f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #11966e;
  --amber: #b7791f;
  --red: #c24141;
  --dark: #0f172a;
  --shadow: 0 18px 46px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(17, 150, 110, .10), transparent 30%),
    var(--page);
  font-family: Rubik, Arial, sans-serif;
  line-height: 1.55;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.lab-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.lab-header,
.mission-brief article,
.station-map,
.student-nav-panel,
.station-stage,
.lab-console > section,
.big-card,
.tool-card,
.phone-card,
.url-card,
.chat-phone,
.scanner-preview,
.sort-card,
.code-panel,
.badge-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.lab-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 24px;
  margin-bottom: 14px;
}

.lesson-video-card {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.lesson-video-copy h2 {
  margin-bottom: 8px;
}

.lesson-video-copy p {
  margin-bottom: 0;
  font-weight: 650;
}

.lesson-video-card video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
  object-fit: contain;
}

.command-card-video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  margin: 10px 0 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  background: #07111f;
  object-fit: contain;
}

.eyebrow,
.card-kicker,
.station-time,
.mission-brief span,
.assistant-head span,
.scanner-card span,
.case-card span,
.map-title span,
.tool-card > span,
.badge-card > span {
  display: block;
  color: var(--green);
  font-size: .85rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

p {
  color: var(--muted);
}

.lab-header p {
  max-width: 820px;
  margin-bottom: 0;
  font-weight: 650;
}

.header-actions,
.station-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background: var(--blue-dark);
  outline: 3px solid rgba(37, 99, 235, .18);
}

.button.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.mission-brief {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mission-brief article {
  padding: 14px;
}

.mission-brief strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.student-nav-panel {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
}

.student-nav-body {
  min-width: 0;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

.station-map,
.lab-console {
  position: sticky;
  top: 14px;
}

.station-map {
  padding: 16px;
}

.map-title {
  margin-bottom: 12px;
}

.map-title strong {
  display: block;
  font-size: 1.1rem;
}

#stationNav {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.station-tab {
  min-height: 74px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  gap: 3px;
  text-align: center;
  background: #fff;
}

.station-tab em {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #1d4ed8;
  background: #dbeafe;
  font-style: normal;
  font-weight: 900;
}

.station-tab span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.station-tab strong {
  display: block;
  font-size: .9rem;
  line-height: 1.15;
}

.station-tab.active {
  color: #fff;
  border-color: var(--dark);
  background: var(--dark);
}

.station-tab.active span {
  color: #cbd5e1;
}

.station-tab.active em {
  color: var(--dark);
  background: #fff;
}

.station-tab.done:not(.active) {
  border-color: rgba(17, 150, 110, .35);
  background: #eefbf6;
}

.station-tab.done:not(.active) em {
  color: #0f766e;
  background: #d1fae5;
}

.station-stage {
  min-width: 0;
  padding: 18px;
}

.station-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.xp-meter {
  min-width: 92px;
  padding: 12px;
  border-radius: 8px;
  background: #eff6ff;
  text-align: center;
}

.xp-meter span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.xp-meter strong {
  display: block;
  font-size: 1.6rem;
  color: var(--blue);
}

.station-footer {
  justify-content: space-between;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .10);
}

.lab-console {
  display: grid;
  gap: 12px;
}

.lab-console > section {
  padding: 14px;
}

.assistant-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.assistant-head span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
}

.risk-track {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 8px 0;
}

.risk-track div {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--green);
  transition: width .2s ease;
}

.risk-track .medium { background: var(--amber); }
.risk-track .high { background: var(--red); }

.scanner-card strong {
  display: block;
  margin-top: 2px;
  font-size: 2rem;
}

#caseFile {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

#caseFile span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #0f513d;
  background: #dcfce7;
  font-size: .83rem;
  font-weight: 800;
}

#caseFile em {
  color: var(--muted);
}

.event-packet {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.event-packet strong {
  display: block;
  margin-bottom: 6px;
}

.event-packet code {
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline-block;
  padding: 2px 5px;
  border-radius: 6px;
  background: #eef2ff;
  color: #253b78;
  font-size: .9em;
}

.brief-grid,
.sim-grid,
.chat-lab,
.builder-grid,
.packet-investigation,
.ctf-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.big-card,
.tool-card,
.phone-card,
.chat-phone,
.scanner-preview,
.code-panel,
.badge-card {
  padding: 18px;
}

.lab-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.console-lab {
  align-items: stretch;
}

.stage-video-card {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(280px, 1.25fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.stage-video-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.stage-video-copy span {
  color: var(--blue);
  font-weight: 900;
}

.stage-video-copy h3,
.stage-video-copy p {
  margin: 0;
}

.stage-video-copy h3 {
  font-size: 1.25rem;
}

.stage-video-copy p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.stage-video-card video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #0f172a;
}

.console-run-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.console-run-card label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.console-steps {
  display: grid;
  gap: 8px;
}

.console-steps div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.console-steps b {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
}

.console-steps span,
.console-hint {
  color: var(--muted);
  font-weight: 800;
}

.run-console-button {
  min-height: 52px;
  font-size: 1.05rem;
}

.console-hint {
  margin: 0;
  text-align: center;
}

.code-panel {
  background: #0f172a;
  color: #e2e8f0;
}

.site-preview {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  color: #0f172a;
  text-align: left;
  direction: ltr;
}

.site-preview small {
  color: #2563eb;
  font-weight: 900;
}

.site-preview strong {
  font-size: 1.5rem;
  font-weight: 900;
}

.site-preview p {
  margin: 0;
  color: #475569;
  font-weight: 800;
}

.site-preview button {
  justify-self: start;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
}

.mail-inline-body {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #0f172a;
  line-height: 1.55;
}

.mail-inline-body span {
  color: #2563eb;
  font-size: .82rem;
  font-weight: 900;
}

.mail-inline-body p {
  margin: 0;
  color: #334155;
  font-weight: 800;
}

.code-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.code-panel-toolbar > span {
  color: #93c5fd;
  font-size: .85rem;
  font-weight: 900;
}

.code-run-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 0;
  border-left: 11px solid currentColor;
}

.code-panel pre,
.badge-card pre,
.url-card pre,
.scanner-preview pre {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
  white-space: pre-wrap;
  overflow: auto;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 10px;
  background: #111827;
  color: #dbeafe;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.badge-card pre code {
  direction: ltr;
  unicode-bidi: plaintext;
}

.url-card pre,
.scanner-preview pre {
  background: #f8fafc;
  color: #0f172a;
}

.terminal-output {
  padding: 12px;
  border: 1px solid rgba(147, 197, 253, .35);
  border-radius: 10px;
  background: rgba(37, 99, 235, .14);
}

.terminal-output strong {
  display: block;
  color: #bfdbfe;
  margin-bottom: 4px;
}

.terminal-output p {
  margin: 0;
  color: #fff;
}

.console-output {
  margin-top: 12px;
  border-width: 2px;
}

.console-output strong {
  font-size: 1.1rem;
}

.console-output p {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .45);
  color: #dbeafe;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.console-output.has-output {
  border-color: rgba(34, 197, 94, .75);
  background: rgba(22, 163, 74, .18);
}

.console-output.has-output p {
  color: #fff;
  background: rgba(20, 83, 45, .65);
}

.code-choice {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  direction: ltr;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.code-choice code,
.mini-options code {
  direction: ltr;
  unicode-bidi: plaintext;
}

.inbox-simulator {
  display: grid;
  gap: 12px;
}

.mail-window {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.mail-window-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.mail-window-head span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.inspect-row {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--ink);
  text-align: right;
  background: #fff;
}

.inspect-row span,
.url-breakdown span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.inspect-row strong {
  overflow-wrap: anywhere;
}

.inspect-row.selected {
  border-color: rgba(17, 150, 110, .45);
  background: #ecfdf5;
}

.tap-hints {
  padding: 8px 10px;
  border-radius: 10px;
  color: #075985;
  background: #e0f2fe;
  font-size: .88rem;
  font-weight: 800;
}

.attacker-map,
.attacker-note {
  display: grid;
  gap: 10px;
}

.attacker-map div,
.attacker-note {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff7ed;
}

.attacker-map strong,
.attacker-note strong {
  display: block;
  color: #9a3412;
}

.attacker-map span,
.attacker-note span {
  display: block;
  color: #c2410c;
  font-size: .78rem;
  font-weight: 900;
}

.attacker-note p {
  margin-bottom: 8px;
}

.big-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lab-visual,
.station-visual {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.lab-visual {
  margin-bottom: 16px;
}

.station-visual {
  margin: 8px 0 12px;
}

.big-card h3 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.tool-card ol {
  margin: 10px 0 0;
  padding-right: 20px;
  color: var(--muted);
  font-weight: 650;
}

.task-steps {
  margin: 12px 0;
  padding: 10px 26px 10px 10px;
  border-radius: 8px;
  color: #1f2937;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.inbox-list,
.url-lab,
.block-list,
.mini-options,
.evidence-actions,
.chat-options,
.sort-grid {
  display: grid;
  gap: 10px;
}

.url-lab {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.debug-instructions {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  color: #1e3a8a;
  background: #eff6ff;
}

.mini-options button.answer-correct {
  color: #fff !important;
  border-color: #15803d !important;
  background: #15803d !important;
}

.mini-options button.answer-incorrect {
  color: #fff !important;
  border-color: #dc2626 !important;
  background: #dc2626 !important;
}

.answer-feedback {
  margin: 8px 0 0;
  font-weight: 900;
}

.answer-feedback.correct { color: #15803d; }
.answer-feedback.incorrect { color: #b91c1c; }

.mail-item,
.evidence-pill,
.url-parts button,
.chat-options button,
.rule-block,
.sort-card button,
.mini-options button,
.evidence-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.mail-item {
  text-align: right;
}

.mini-options button {
  display: grid;
  gap: 4px;
  text-align: right;
}

.mini-options button small {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.mini-options button.selected small,
.rule-block.selected small {
  color: #eff6ff;
}

/* Keep code answers readable when the selected button turns blue. */
.mini-options button.selected code {
  color: #0f172a;
  background: #f8fafc;
  border-color: #bfdbfe;
}

.mail-item span,
.mail-item small {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.mail-item strong {
  display: block;
}

.mail-item.active,
.selected {
  color: #fff !important;
  border-color: var(--blue) !important;
  background: var(--blue) !important;
}

.mail-item.active span,
.mail-item.active small {
  color: #dbeafe;
}

.sender {
  color: var(--green);
  font-weight: 900;
}

.evidence-actions {
  margin-top: 12px;
}

.url-card {
  padding: 14px;
}

.url-card code {
  display: block;
  direction: ltr;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.url-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.url-breakdown div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.url-breakdown strong {
  direction: ltr;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
  text-align: left;
}

.url-parts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0;
  direction: ltr;
}

.chat-phone {
  background: linear-gradient(180deg, #111827, #1f2937);
  color: #fff;
}

.chat-line {
  max-width: 86%;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #334155;
  font-weight: 700;
}

.chat-line.danger {
  background: #7f1d1d;
}

.chat-options {
  margin-top: 16px;
}

.chat-options button {
  text-align: right;
}

.rule-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.builder-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.rule-block span {
  display: grid;
  gap: 4px;
}

.rule-block small {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
  font-weight: 700;
}

.rule-block em {
  min-width: 82px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-style: normal;
  font-size: .82rem;
  text-align: center;
}

.route-game {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(260px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.concept-gate {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.concept-gate-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.concept-gate-intro h3,
.concept-gate-intro p {
  margin-bottom: 0;
}

.concept-gate-intro strong {
  display: block;
  min-width: 84px;
  border-radius: 8px;
  padding: 10px 14px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 1.8rem;
  text-align: center;
}

.concept-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.concept-video-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.concept-video-card.done {
  border-color: var(--green);
  background: #ecfdf5;
}

.concept-video-card.needs-fix {
  border-color: #f59e0b;
  background: #fffbeb;
}

.concept-video-card span {
  display: inline-block;
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: .75rem;
  font-weight: 900;
}

.concept-video-card.done span {
  background: #dcfce7;
  color: #166534;
}

.concept-video-card.needs-fix span {
  background: #fef3c7;
  color: #92400e;
}

.concept-video-card h4 {
  margin: 7px 0 3px;
  font-size: 1.02rem;
}

.concept-video-card p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
}

.concept-video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #020617;
}

.concept-done-button {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font-size: .9rem;
  line-height: 1.25;
}

.concept-done-button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.concept-mini-task {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.concept-mini-task b,
.concept-mini-task p,
.concept-mini-task small {
  margin: 0;
}

.concept-mini-task b {
  color: var(--ink);
  font-size: .9rem;
}

.concept-mini-task p {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
}

.concept-mini-task div {
  display: grid;
  gap: 6px;
}

.concept-mini-task button {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  text-align: right;
  cursor: pointer;
}

.concept-mini-task button.selected {
  border-color: var(--blue);
  background: #eff6ff;
  color: #1d4ed8;
}

.concept-mini-task.correct {
  border-color: #86efac;
  background: #f0fdf4;
}

.concept-mini-task.wrong {
  border-color: #fbbf24;
  background: #fffbeb;
}

.concept-mini-task small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

.concept-mini-task.correct small {
  color: #166534;
}

.concept-mini-task.wrong small {
  color: #92400e;
}

.route-game-board {
  grid-row: span 2;
}

.route-slots {
  display: grid;
  grid-template-columns: minmax(220px, 420px);
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.route-slot {
  min-height: 88px;
  border: 2px dashed #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  text-align: right;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.route-slot:disabled,
.route-pieces button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.route-slot small,
.route-slot strong,
.route-slot em {
  display: block;
}

.route-slot small {
  min-height: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
}

.route-slot strong {
  margin: 0;
  font-size: 1rem;
}

.route-slot strong span {
  display: inline-block;
  margin: 0 0 0 8px;
  font-size: 1.55rem;
  vertical-align: middle;
}

.route-slot em {
  direction: ltr;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
  color: #1d4ed8;
  font-size: .8rem;
  font-style: normal;
  font-weight: 900;
  grid-column: 1 / -1;
  text-align: left;
}

.route-slot.filled {
  border-style: solid;
  background: #eff6ff;
}

.route-slot.correct {
  border-color: var(--green);
  background: #ecfdf5;
}

.route-pieces {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.route-pieces button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  color: var(--ink);
  cursor: grab;
  text-align: right;
  touch-action: none;
  user-select: none;
}

.route-pieces button:active {
  cursor: grabbing;
}

.route-pieces button b {
  font-size: 1.35rem;
  text-align: center;
}

.route-pieces button span {
  display: grid;
  gap: 2px;
}

.route-pieces button small {
  color: var(--muted);
  font-weight: 750;
}

.route-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-1deg);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
  opacity: .94;
}

.route-feedback-card strong {
  font-size: 2.5rem;
}

.scanner-preview strong {
  display: block;
  margin: 8px 0;
  font-size: 3rem;
}

.run-result-panel p {
  margin: 12px 0;
  font-weight: 900;
}

.run-summary {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
}

.run-summary b,
.run-summary small {
  display: block;
}

.run-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.run-signal-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0;
  list-style: none;
}

.run-signal-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
}

.run-signal-list li.active {
  border-color: rgba(194, 65, 65, .28);
  background: #fef2f2;
  color: var(--red);
}

.packet-investigation {
  grid-template-columns: minmax(300px, .9fr) minmax(340px, 1.1fr);
  align-items: start;
}

.packet-brief-card {
  grid-column: 1 / -1;
}

.packet-brief-card h3,
.packet-log-card h3 {
  margin-bottom: 8px;
}

.packet-case-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.packet-case-tabs button {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.packet-case-tabs button.selected {
  border-color: rgba(37, 99, 235, .5);
  background: #2563eb;
  color: #fff;
}

.packet-case-tabs strong,
.packet-case-tabs small {
  display: block;
}

.packet-case-tabs small {
  margin-top: 5px;
  color: #64748b;
  font-weight: 900;
}

.packet-case-tabs button.selected small {
  color: rgba(255, 255, 255, .88);
}

.mini-options.compact {
  grid-template-columns: 1fr;
  margin: 12px 0;
}

.packet-log-card {
  display: grid;
  gap: 12px;
}

.packet-log-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.packet-log-pills b,
.packet-log-pills small {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
}

.packet-log-pills b {
  background: #0f172a;
  color: #fff;
}

.packet-log-pills small {
  background: #eff6ff;
  color: #1d4ed8;
}

.packet-log-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.packet-log-facts div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.packet-log-facts dt {
  color: #64748b;
  font-weight: 900;
}

.packet-log-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 900;
}

.packet-log-card details {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.packet-log-card summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.packet-log-card pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
}

.packet-question-card {
  display: grid;
  gap: 12px;
}

.packet-question-card h3 {
  margin: 0;
  color: var(--blue);
}

.packet-progress-dots {
  display: flex;
  gap: 8px;
}

.packet-progress-dots i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #cbd5e1;
}

.packet-progress-dots i.active {
  background: #2563eb;
}

.packet-progress-dots i.done {
  background: #16a34a;
}

.packet-question {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.packet-question.correct {
  border-color: rgba(22, 163, 74, .35);
  background: #f0fdf4;
}

.packet-question.wrong {
  border-color: rgba(194, 65, 65, .35);
  background: #fef2f2;
}

.packet-question b,
.packet-question small {
  display: block;
}

.packet-question small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.packet-question div {
  display: grid;
  gap: 8px;
}

.packet-question button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  text-align: right;
  font-weight: 900;
  cursor: pointer;
}

.packet-question button.selected {
  border-color: rgba(37, 99, 235, .45);
  background: #eff6ff;
  color: #1d4ed8;
}

.scanner-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.scanner-flow div {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 8px;
  color: var(--muted);
  text-align: center;
  font-size: .85rem;
  font-weight: 900;
  background: #f8fafc;
}

.scanner-flow div.active {
  border-style: solid;
  border-color: rgba(37, 99, 235, .35);
  color: #1d4ed8;
  background: #eff6ff;
}

.scanner-flow div.danger {
  border-color: rgba(194, 65, 65, .35);
  color: var(--red);
  background: #fef2f2;
}

.hacker-visual {
  display: grid;
  gap: 10px;
  margin: 10px 0 18px;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(30, 64, 175, .88)),
    #0f172a;
  color: #f8fafc;
}

.hacker-visual b,
.hacker-visual span,
.hacker-visual strong {
  display: block;
}

.hacker-visual b {
  color: #67e8f9;
}

.hacker-visual span {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(254, 240, 138, .14);
  color: #fef3c7;
  font-weight: 900;
}

.hacker-visual strong {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(34, 197, 94, .5);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(20, 83, 45, .55);
  color: #bbf7d0;
  font-size: 1.4rem;
  direction: ltr;
}

.hacker-concepts .concept-video-card h4 {
  direction: ltr;
  unicode-bidi: plaintext;
}

.hacker-lab-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.linux-lab {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr);
  gap: 14px;
  align-items: start;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toy-login-box {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.toy-login-box label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 900;
}

.toy-login-box input {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  direction: ltr;
}

.toy-login-box small {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 900;
  direction: ltr;
}

.lab-feedback {
  min-height: 52px;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 850;
}

.fix-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.fix-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  font-weight: 900;
}

.fix-list label.selected {
  border-color: rgba(17, 150, 110, .4);
  background: #ecfdf5;
}

.fix-list input {
  width: 18px;
  height: 18px;
}

.fix-list b {
  color: var(--green);
}

.terminal-mission-card {
  display: grid;
  gap: 12px;
}

.terminal-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(17, 150, 110, .28);
  border-radius: 8px;
  padding: 11px 12px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 900;
}

.terminal-progress strong {
  direction: ltr;
  font-size: 1.5rem;
}

.terminal-mini-demo {
  display: grid;
  gap: 8px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f0f9ff;
  color: #075985;
}

.terminal-mini-demo strong {
  color: #0369a1;
}

.terminal-mini-demo div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 9px 10px;
  background: #020617;
  color: #d1fae5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.terminal-mini-demo div b {
  color: #67e8f9;
}

.terminal-mini-demo code {
  color: #bbf7d0;
}

.terminal-mini-demo p {
  margin: 0;
  color: #075985;
  font-weight: 850;
}

.terminal-task-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.terminal-task-list li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.terminal-task-list li.active {
  border-color: rgba(37, 99, 235, .35);
  background: #eff6ff;
}

.terminal-task-list li.done {
  border-color: rgba(17, 150, 110, .36);
  background: #ecfdf5;
}

.terminal-task-list b {
  color: var(--ink);
}

.terminal-task-list span,
.terminal-task-list small {
  color: var(--muted);
  font-weight: 800;
}

.terminal-task-list small {
  direction: ltr;
  unicode-bidi: plaintext;
}

.terminal-command-bank {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
}

.terminal-command-bank strong {
  color: var(--ink);
}

.terminal-command-bank p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.terminal-command-bank div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.terminal-command-chip {
  display: grid;
  gap: 3px;
  min-height: 56px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
  color: var(--ink);
  text-align: start;
  cursor: pointer;
}

.terminal-command-chip:hover,
.terminal-command-chip:focus-visible {
  border-color: rgba(37, 99, 235, .38);
  background: #eff6ff;
}

.terminal-command-chip b {
  color: #0f172a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.terminal-command-chip span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
}

.linux-terminal-panel {
  gap: 12px;
}

.terminal-live-feedback {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 11px 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 900;
}

.terminal-live-feedback strong {
  color: #1d4ed8;
}

.terminal-live-feedback span {
  line-height: 1.45;
}

.terminal-live-feedback.has-evidence {
  border-color: rgba(17, 150, 110, .35);
  background: #ecfdf5;
  color: #065f46;
}

.terminal-live-feedback.has-evidence strong {
  color: #047857;
}

.code-panel-toolbar small {
  color: #94a3b8;
  font-weight: 800;
  direction: ltr;
  unicode-bidi: plaintext;
}

.terminal-screen {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 320px;
  max-height: 480px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  padding: 14px;
  background: #020617;
  color: #d1fae5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .92rem;
  line-height: 1.45;
}

.terminal-history-item {
  display: grid;
  gap: 4px;
  border-inline-start: 3px solid rgba(103, 232, 249, .3);
  padding-inline-start: 10px;
}

.terminal-history-item b {
  color: #67e8f9;
  overflow-wrap: anywhere;
}

.terminal-history-item.error {
  border-inline-start-color: #fb7185;
}

.terminal-history-item.error b {
  color: #fda4af;
}

.terminal-history-item pre {
  margin: 0;
  white-space: pre-wrap;
  color: #d1fae5;
}

.terminal-history-item small {
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(30, 41, 59, .92);
  color: #bfdbfe;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 850;
  line-height: 1.45;
}

.terminal-found-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: "Rubik", system-ui, sans-serif;
}

.terminal-found-badges span {
  border: 1px solid rgba(52, 211, 153, .5);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(6, 95, 70, .72);
  color: #bbf7d0;
  font-weight: 900;
}

.terminal-command-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.terminal-command-row span {
  color: #475569;
  font-weight: 900;
  white-space: nowrap;
}

.terminal-command-row .lab-input {
  min-height: 44px;
  direction: ltr;
}

.terminal-evidence {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.terminal-evidence span {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 900;
}

.terminal-evidence span b {
  min-width: 58px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e2e8f0;
  color: #475569;
  text-align: center;
  font-size: .82rem;
}

.terminal-evidence span.found {
  border-color: rgba(17, 150, 110, .4);
  background: #ecfdf5;
  color: #047857;
}

.terminal-evidence span.found b {
  background: #047857;
  color: #fff;
}

.terminal-victory {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(17, 150, 110, .42);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  color: #065f46;
  font-weight: 900;
}

.terminal-victory strong {
  color: #047857;
  font-size: 1.08rem;
}

.terminal-victory p,
.terminal-victory small {
  margin: 0;
  color: #065f46;
  line-height: 1.45;
}

.terminal-victory small {
  color: #0f766e;
}

.sort-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sort-card {
  padding: 14px;
}

.sort-card div {
  display: flex;
  gap: 8px;
}

.ctf-grid .tool-card,
.report-grid .tool-card {
  min-height: 260px;
}

.report-case {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.defender-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.defender-summary b {
  display: block;
  margin-bottom: 8px;
}

.defender-summary ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 18px 0 0;
  color: #334155;
  font-weight: 800;
  line-height: 1.45;
}

.network-defender-badge {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
}

.network-defender-badge span,
.network-defender-badge small {
  color: rgba(255, 255, 255, .78);
  font-weight: 900;
}

.network-defender-badge strong {
  font-size: 1.55rem;
}

.mystery-case-visual {
  background:
    radial-gradient(circle at 20% 18%, rgba(34, 211, 238, .16), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(16, 185, 129, .16), transparent 30%),
    #f8fafc;
}

.mystery-case-visual ol {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0 20px 0 0;
  color: #334155;
  font-weight: 850;
}

.mystery-grid {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr);
  gap: 14px;
  align-items: start;
}

.mystery-stage-video {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: #fff;
}

.mystery-stage-video > * {
  min-width: 0;
}

.mystery-stage-video video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  background: #07111f;
  object-fit: contain;
}

.mystery-concepts .concept-video-card h4 {
  direction: ltr;
  unicode-bidi: plaintext;
}

.evidence-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.evidence-card {
  display: grid;
  gap: 10px;
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.evidence-card.open {
  border-color: rgba(37, 99, 235, .3);
  background: #eff6ff;
}

.evidence-card.solved {
  border-color: rgba(17, 150, 110, .4);
  background: #ecfdf5;
}

.evidence-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.evidence-card div:first-child span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: .78rem;
  font-weight: 900;
}

.evidence-card strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.evidence-card p {
  margin: 0;
  color: #334155;
  font-weight: 850;
  line-height: 1.45;
  direction: ltr;
  unicode-bidi: plaintext;
}

.evidence-question {
  display: grid;
  gap: 7px;
}

.evidence-question b,
.evidence-question small {
  color: #334155;
  font-weight: 900;
}

.evidence-question button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  text-align: right;
  cursor: pointer;
}

.evidence-question button.selected {
  border-color: rgba(17, 150, 110, .45);
  background: #dcfce7;
  color: #166534;
}

.timeline-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.timeline-pool,
.timeline-slots {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.timeline-pool > strong,
.timeline-slots > strong {
  color: var(--ink);
}

.timeline-pool button,
.timeline-slots button {
  display: grid;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
}

.timeline-pool button:hover,
.timeline-slots button:hover {
  border-color: rgba(37, 99, 235, .38);
  background: #eff6ff;
}

.timeline-pool button span,
.timeline-slots button span,
.timeline-pool em,
.timeline-slots em {
  color: var(--muted);
  font-weight: 820;
}

.timeline-slots button.correct {
  border-color: rgba(17, 150, 110, .42);
  background: #ecfdf5;
}

.timeline-slots button.wrong {
  border-color: rgba(251, 146, 60, .48);
  background: #fff7ed;
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-list span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .88rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 900;
}

textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.badge-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #ecfeff, #f0fdf4);
}

.badge-card strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

@media (max-width: 980px) {
  .lab-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .station-map,
  .lab-console {
    position: static;
  }

  #stationNav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .station-tab {
    min-width: 104px;
  }

  .concept-gate {
    grid-template-columns: 1fr;
  }

  .concept-video-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .lab-console {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .lab-shell {
    width: min(100% - 14px, 1240px);
    padding-top: 8px;
  }

  .lab-header {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .lesson-video-card,
  .stage-video-card,
  .mystery-stage-video {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .mission-brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-nav-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .station-tab {
    min-width: 96px;
    min-height: 70px;
  }

  .lab-console,
  .brief-grid,
  .sim-grid,
  .chat-lab,
  .builder-grid,
  .packet-investigation,
  .hacker-lab-grid,
  .linux-lab,
  .mystery-grid,
  .timeline-builder,
  .ctf-grid,
  .report-grid,
  .route-game,
  .url-lab,
  .sort-grid,
  .url-breakdown,
  .scanner-flow {
    grid-template-columns: 1fr;
  }

  .terminal-command-row {
    grid-template-columns: 1fr;
  }

  .terminal-command-row span {
    white-space: normal;
  }

  .terminal-command-bank div {
    grid-template-columns: 1fr;
  }

  .evidence-board {
    grid-template-columns: 1fr;
  }

  .route-game-board {
    grid-row: auto;
  }

  .route-slots {
    grid-template-columns: 1fr;
  }

  .concept-video-grid {
    grid-template-columns: 1fr;
  }

  .packet-case-tabs {
    grid-template-columns: 1fr;
  }

  .packet-log-facts div {
    grid-template-columns: 54px 1fr;
  }

  .station-stage {
    padding: 14px;
  }

  .station-head {
    grid-template-columns: 1fr;
  }

  .xp-meter {
    text-align: right;
  }
}
