:root {
  --black: #090b0c;
  --black-soft: #101416;
  --panel: #14191b;
  --panel-2: #1a2022;
  --paper: #e8e7df;
  --muted: #9ca5a4;
  --red: #d8193f;
  --red-bright: #ff3158;
  --green: #67e58c;
  --cyan: #6dd5df;
  --amber: #f4c64e;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  --panel-glass: rgba(13, 17, 18, 0.88);
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --sans: Inter, "Aptos", "Helvetica Neue", Arial, sans-serif;
  --condensed: "Arial Narrow", "Aptos Narrow", Impact, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: dark;
  background: var(--black);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 85% 0%, rgba(216, 25, 63, 0.12), transparent 28rem),
    var(--black);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 1000;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  content: "";
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.35) 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255, 255, 255, 0.18) 6px);
  mix-blend-mode: soft-light;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.7rem 1rem;
  color: var(--black);
  background: var(--green);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.intro {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow: auto;
  background: #080a0b;
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease;
}

.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.intro-photo,
.intro-grid,
.intro-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-photo {
  background:
    linear-gradient(90deg, rgba(8, 10, 11, 0.96) 0%, rgba(8, 10, 11, 0.74) 42%, rgba(8, 10, 11, 0.36) 100%),
    url("media/outbreak-one-health-hero.png") center / cover no-repeat;
  filter: saturate(0.65) contrast(1.25);
  transform: scale(1.05);
}

.intro-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(109, 213, 223, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 213, 223, 0.11) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, #000, transparent 74%);
}

.intro-vignette {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 34%),
    radial-gradient(circle at 76% 43%, transparent 0 8rem, rgba(216, 25, 63, 0.1) 8.1rem 8.4rem, transparent 8.5rem),
    radial-gradient(circle at 76% 43%, transparent 0 15rem, rgba(216, 25, 63, 0.07) 15.1rem 15.3rem, transparent 15.4rem);
}

.intro-header,
.course-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
  padding: 0.85rem clamp(1rem, 3.4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 10, 0.72);
  backdrop-filter: blur(20px);
}

.intro-header a,
.course-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.intro-header a > span:last-child,
.course-brand > span:last-child {
  display: grid;
  gap: 0.12rem;
}

.intro-header strong,
.course-brand strong {
  font-size: 0.83rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-header small,
.course-brand small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-header > span {
  color: #c2c7c5;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bio-mark {
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 9px rgba(240, 42, 73, 0.38));
  transform-origin: 50% 50%;
  animation: bio-rotate 3.2s linear infinite;
}

.bio-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.bio-mark--small {
  width: 44px;
  height: 44px;
}

@keyframes bio-rotate {
  to {
    transform: rotate(360deg);
  }
}

.intro-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(760px, calc(100% - 2rem));
  margin: 2rem clamp(1rem, 7vw, 8rem) 4rem;
}

.signal-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(103, 229, 140, 0.7);
  animation: signal-pulse 2s infinite;
}

@keyframes signal-pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(103, 229, 140, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(103, 229, 140, 0);
  }
}

.intro h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--condensed);
  font-size: clamp(4.2rem, 11vw, 9.5rem);
  font-stretch: condensed;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.72;
  text-transform: uppercase;
  text-shadow: 0 8px 45px rgba(0, 0, 0, 0.45);
}

.intro h1 em {
  color: transparent;
  -webkit-text-stroke: 1.7px rgba(232, 231, 223, 0.82);
  font-style: normal;
}

.intro-deck {
  max-width: 610px;
  margin: 2rem 0 0;
  color: #d6d8d3;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  line-height: 1.58;
}

.intro-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.primary-action,
.quiet-action,
.dialog-actions button,
.source-links a {
  min-height: 46px;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.primary-action {
  min-width: 210px;
  color: #fff;
  border-color: var(--red);
  background: var(--red);
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(216, 25, 63, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-action:hover {
  border-color: var(--red-bright);
  background: var(--red-bright);
  box-shadow: 0 17px 44px rgba(216, 25, 63, 0.38);
  transform: translateY(-2px);
}

.primary-action span {
  float: right;
  padding-left: 1rem;
}

.quiet-action,
.dialog-actions button:not(.primary-action) {
  border-color: rgba(255, 255, 255, 0.27);
  background: rgba(8, 11, 12, 0.48);
  backdrop-filter: blur(12px);
}

.quiet-action:hover,
.dialog-actions button:not(.primary-action):hover {
  border-color: var(--green);
}

.primary-action--dark {
  color: #fff;
  background: var(--red);
}

.course {
  display: none;
  min-height: 100svh;
}

.course.is-active {
  display: block;
}

.course-header {
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: 68px;
  padding-block: 0.58rem;
  background: rgba(9, 11, 12, 0.93);
}

.course-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.course-header nav button {
  padding: 0.55rem 0.7rem;
  color: #c8cecc;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.course-header nav button:hover {
  color: #fff;
  border-color: var(--red);
}

.containment-score {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.1rem 0.9rem;
  min-width: 240px;
}

.containment-score > span:first-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.containment-score strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-family: var(--mono);
  font-size: 1.06rem;
}

.containment-score strong b {
  color: var(--green);
  font-size: 1.4rem;
}

.score-track {
  position: relative;
  display: block;
  width: 170px;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.score-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--green));
  transition: width 0.45s ease;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(340px, 0.82fr);
  height: calc(100svh - 168px);
  min-height: 570px;
  border-bottom: 1px solid var(--line);
}

.viewer-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #030404;
}

.pano {
  position: absolute;
  inset: 0;
}

.viewer-hud {
  position: absolute;
  z-index: 10;
  right: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.viewer-hud button {
  pointer-events: auto;
}

.viewer-hud--top {
  top: 1rem;
}

.viewer-hud--top > div {
  display: grid;
  max-width: min(75%, 640px);
  gap: 0.18rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--red);
  background: rgba(8, 11, 12, 0.78);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.viewer-hud--top span {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.viewer-hud--top strong {
  font-size: clamp(0.76rem, 1.3vw, 1rem);
}

.viewer-hud--top small {
  color: #b7bfbc;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.045em;
}

.viewer-hud--top button,
.open-console {
  min-height: 38px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(8, 11, 12, 0.72);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.viewer-hud--top button:hover,
.open-console:hover {
  border-color: var(--green);
}

.viewer-hud--bottom {
  bottom: 1rem;
  justify-content: flex-start;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.62rem 0.8rem;
  color: #d2d6d3;
  background: rgba(8, 11, 12, 0.78);
  backdrop-filter: blur(14px);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.viewer-hud--bottom > span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bio-dot,
.pathogen-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.pathogen-dot {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ff5b8a 0 42%, transparent 44%),
    conic-gradient(from 0deg, #ff1e62 0 8%, transparent 8% 16%, #ff1e62 16% 24%, transparent 24% 32%, #ff1e62 32% 40%, transparent 40% 48%, #ff1e62 48% 56%, transparent 56% 64%, #ff1e62 64% 72%, transparent 72% 80%, #ff1e62 80% 88%, transparent 88% 100%);
  box-shadow: 0 0 9px rgba(255, 30, 98, 0.72);
  animation: pathogen-key 1.9s ease-in-out infinite;
}

@keyframes pathogen-key {
  0%, 100% { transform: scale(0.88) rotate(-3deg); opacity: 0.74; }
  42% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  58% { transform: scale(0.96) rotate(-1deg); opacity: 0.84; }
}

.open-console {
  position: absolute;
  z-index: 14;
  right: 1rem;
  bottom: 1rem;
  display: none;
}

.mission-console {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--panel-glass);
  background-size: 100% 31px;
  box-shadow: -26px 0 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(1.15);
}

.console-head {
  position: relative;
  padding: 1.15rem 1.2rem 0.95rem;
  border-bottom: 1px solid var(--line);
}

.console-head p {
  margin: 0 2rem 0.45rem 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.05;
}

.console-head > button {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.6rem;
}

.console-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.console-tabs button {
  min-height: 42px;
  padding: 0.55rem 0.35rem;
  color: var(--muted);
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.59rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.console-tabs button:last-child {
  border-right: 0;
}

.console-tabs button[aria-selected="true"] {
  color: #fff;
  border-bottom-color: var(--red);
  background: rgba(216, 25, 63, 0.08);
}

.console-content {
  min-height: 0;
  overflow: auto;
  padding: 1.2rem;
  scrollbar-color: var(--red) #222;
}

.objective-label,
.layer-label,
.evidence-type {
  margin: 0 0 0.55rem;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.objective {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.45;
}

.dispatch {
  margin: 0;
  color: #c8cecb;
  line-height: 1.62;
}

.systems-box {
  margin: 1rem 0 0;
  padding: 0.9rem;
  border: 1px solid rgba(109, 213, 223, 0.18);
  border-left: 3px solid var(--cyan);
  background: rgba(109, 213, 223, 0.04);
}

.systems-box h3 {
  margin: 0 0 0.4rem;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.systems-box p {
  margin: 0;
  color: #b9c3c2;
  font-size: 0.86rem;
  line-height: 1.55;
}

.evidence-list {
  display: grid;
  gap: 0.55rem;
}

.evidence-card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.72rem;
  color: inherit;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
  text-align: left;
}

.evidence-card:hover {
  border-color: rgba(216, 25, 63, 0.72);
  background: rgba(216, 25, 63, 0.06);
}

.evidence-card.is-found {
  border-color: rgba(103, 229, 140, 0.38);
}

.evidence-card .mini-bio {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #f02a49;
  border: 1px solid rgba(240, 42, 73, 0.55);
  border-radius: 50%;
  background: rgba(216, 25, 63, 0.07);
  font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 0 13px rgba(216, 25, 63, 0.2);
  opacity: 0.52;
  filter: drop-shadow(0 0 0 rgba(240, 42, 73, 0));
  transform-origin: 50% 50%;
  animation: evidence-breathe 2.1s linear infinite;
  transition: opacity 180ms ease-out, filter 180ms ease-out;
}

.evidence-card .mini-bio::before {
  content: "☣";
}

.evidence-card .mini-bio.has-pathogen {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.evidence-card .mini-bio.has-pathogen::before {
  content: none;
}

.evidence-card .mini-bio img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(216, 25, 63, 0.24));
}

.evidence-card:hover .mini-bio,
.evidence-card:focus-visible .mini-bio {
  opacity: 1;
  filter: drop-shadow(0 0 9px rgba(240, 42, 73, 0.82));
}

.evidence-card:nth-child(3n + 2) .mini-bio {
  animation-delay: -0.7s;
}

.evidence-card:nth-child(3n) .mini-bio {
  animation-delay: -1.35s;
}

@keyframes evidence-breathe {
  0%,
  100% {
    transform: scale(0.86);
  }
  22% {
    transform: scale(0.96);
  }
  34% {
    transform: scale(0.92);
  }
  69% {
    transform: scale(1.04);
  }
  79% {
    transform: scale(1);
  }
}

.evidence-card strong {
  display: block;
  font-size: 0.83rem;
  line-height: 1.25;
}

.evidence-card small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.evidence-card > i {
  color: transparent;
  font-style: normal;
}

.evidence-card.is-found > i {
  color: var(--green);
}

.evidence-file h3 {
  margin: 0.2rem 0 0.75rem;
  font-size: 1.28rem;
  line-height: 1.1;
}

.evidence-file .lead {
  margin: 0 0 0.9rem;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.5;
}

.evidence-file p:not(.lead):not(.evidence-type) {
  color: #bdc5c3;
  font-size: 0.88rem;
  line-height: 1.58;
}

.takeaways {
  display: grid;
  gap: 0.4rem;
  margin: 0.9rem 0;
  padding: 0;
  list-style: none;
}

.takeaways li {
  position: relative;
  padding-left: 1.2rem;
  color: #dce0dd;
  font-size: 0.82rem;
}

.takeaways li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.source-link,
.media-source {
  display: inline-flex;
  margin-top: 0.5rem;
  padding: 0.6rem 0.7rem;
  color: var(--cyan);
  border: 1px solid rgba(109, 213, 223, 0.28);
  text-decoration: none;
  font-size: 0.75rem;
}

.source-link:hover,
.media-source:hover {
  border-color: var(--cyan);
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at center, rgba(216, 25, 63, 0.16), transparent 48%),
    #050606;
}

.video-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.media-copy h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
}

.media-copy p {
  color: #bdc5c3;
  font-size: 0.84rem;
  line-height: 1.55;
}

.media-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.media-selector button {
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.55rem;
}

.media-selector button:hover,
.media-selector button.is-active {
  color: #fff;
  border-color: var(--red);
}

.room-check {
  display: grid;
  gap: 0.8rem;
}

.room-check > p {
  margin: 0;
  color: #fff;
  font-weight: 700;
  line-height: 1.48;
}

.check-options {
  display: grid;
  gap: 0.45rem;
}

.check-options button {
  width: 100%;
  padding: 0.7rem;
  color: #d4d9d6;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  text-align: left;
}

.check-options button:hover {
  border-color: var(--cyan);
}

.check-options button.is-correct {
  color: #fff;
  border-color: var(--green);
  background: rgba(103, 229, 140, 0.09);
}

.check-options button.is-incorrect {
  border-color: var(--red);
  background: rgba(216, 25, 63, 0.1);
}

.check-feedback {
  min-height: 2.5rem;
  margin: 0;
  padding: 0.7rem;
  color: #c4cdca;
  border-left: 3px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  line-height: 1.5;
}

.check-feedback.is-correct {
  border-left-color: var(--green);
}

.check-feedback.is-incorrect {
  border-left-color: var(--red);
}

.console-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.console-nav button {
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.console-nav button:hover {
  border-color: var(--red);
}

.console-nav span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.mission-meter {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 100px;
  padding: 0.85rem clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 50%, rgba(103, 229, 140, 0.08), transparent 20rem),
    #0e1213;
}

.mission-meter > div:not(.mission-progress) {
  display: grid;
  gap: 0.2rem;
}

.mission-meter span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mission-meter strong {
  font-family: var(--mono);
  font-size: 1rem;
}

.mission-meter strong b {
  color: var(--green);
  font-size: 1.2rem;
}

.mission-progress {
  position: relative;
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.mission-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
  transition: width 0.45s ease;
}

.mission-meter > button {
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  color: #fff;
  border: 1px solid var(--red);
  background: var(--red);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mission-meter > button:hover {
  box-shadow: 0 12px 32px rgba(216, 25, 63, 0.28);
  transform: translateY(-2px);
}

.mission-toast {
  position: fixed;
  z-index: 400;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  display: grid;
  width: min(360px, calc(100vw - 2rem));
  gap: 0.25rem;
  padding: 0.9rem 1rem 0.95rem 1.15rem;
  border: 1px solid rgba(103, 229, 140, 0.35);
  border-left: 4px solid var(--green);
  background: rgba(8, 12, 12, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(18px);
}

.mission-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mission-toast strong {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mission-toast span {
  color: #dce2de;
  font-size: 0.8rem;
  line-height: 1.35;
}

.route-rail {
  padding: 1rem clamp(1rem, 3vw, 3rem) 1.2rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0a0d0e;
}

.route-track {
  display: grid;
  grid-auto-columns: minmax(190px, 1fr);
  grid-auto-flow: column;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-color: var(--red) #222;
}

.route-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 0.65rem;
  min-height: 70px;
  padding: 0.48rem;
  color: inherit;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
}

.route-card:hover,
.route-card.is-active {
  border-color: var(--red);
  background: rgba(216, 25, 63, 0.06);
}

.route-card img {
  width: 58px;
  height: 52px;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.1);
}

.route-card small {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-card strong {
  display: block;
  font-size: 0.75rem;
  line-height: 1.2;
}

.route-card.is-passed::after {
  align-self: start;
  grid-column: 2;
  color: var(--green);
  content: "✓ field check passed";
  font-family: var(--mono);
  font-size: 0.48rem;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1rem, 3vw, 3rem) 2rem;
  color: #77817e;
  background: #080a0b;
  font-size: 0.66rem;
  line-height: 1.5;
}

.course-footer p {
  max-width: 700px;
  margin: 0;
}

.course-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1rem;
}

.course-footer a {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.course-footer a:hover {
  color: var(--paper);
}

dialog {
  width: min(860px, calc(100% - 1.5rem));
  max-height: calc(100svh - 1.5rem);
  padding: 0;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #111516;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.dialog-shell {
  position: relative;
  padding: clamp(1.2rem, 4vw, 3rem);
  overflow: auto;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 38px;
  height: 38px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
}

.dialog-close:hover {
  color: #fff;
  border-color: var(--red);
}

.dialog-shell h2 {
  max-width: 760px;
  margin: 0 3rem 0.8rem 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.02;
}

.dialog-shell > p:not(.signal-label) {
  max-width: 760px;
  color: #bdc5c3;
  line-height: 1.65;
}

.dialog-shell textarea {
  width: 100%;
  padding: 1rem;
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  resize: vertical;
}

.route-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.route-list button {
  display: grid;
  grid-template-columns: 42px 1fr;
  width: 100%;
  min-height: 66px;
  padding: 0.65rem;
  color: inherit;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
}

.route-list button:hover {
  border-color: var(--red);
}

.route-list span {
  grid-row: 1 / span 2;
  color: var(--red);
  font-family: var(--mono);
  font-size: 1.15rem;
}

.route-list strong {
  font-size: 0.82rem;
}

.route-list small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.54rem;
  text-transform: uppercase;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.3rem;
}

.source-links a {
  color: var(--cyan);
  border-color: rgba(109, 213, 223, 0.28);
}

.quiz-question {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.quiz-question legend {
  padding: 0 0.3rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
}

.quiz-question label {
  display: flex;
  gap: 0.6rem;
  margin: 0.48rem 0;
  color: #bdc5c3;
  font-size: 0.84rem;
  line-height: 1.45;
}

.quiz-question input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  accent-color: var(--red);
}

.quiz-result {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--green);
  background: rgba(103, 229, 140, 0.08);
  line-height: 1.5;
}

.quiz-result.is-visible {
  display: block;
}

.print-record {
  display: none;
}

@media (max-width: 1080px) {
  .course-header {
    grid-template-columns: 1fr auto;
    flex-wrap: wrap;
  }

  .containment-score {
    order: 3;
    width: 100%;
  }

  .score-track {
    width: 100%;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: calc(100svh - 164px);
  }

  .mission-console {
    position: fixed;
    z-index: 170;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(460px, 94vw);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 90px rgba(0, 0, 0, 0.55);
    transform: translateX(105%);
    transition: transform 0.3s ease;
  }

  .mission-console.is-open {
    transform: translateX(0);
  }

  .console-head > button,
  .open-console {
    display: block;
  }

  .viewer-hud--bottom {
    right: auto;
    max-width: calc(100% - 150px);
    flex-wrap: wrap;
  }

  .mission-meter {
    grid-template-columns: auto 1fr auto;
  }

  .mission-meter > button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .intro-header > span {
    display: none;
  }

  .intro-copy {
    margin-block: 3rem;
  }

  .intro h1 {
    font-size: clamp(3.4rem, 18vw, 6.5rem);
  }

  .intro-deck {
    font-size: 0.96rem;
  }

  .course-header nav {
    width: 100%;
    overflow-x: auto;
  }

  .workspace {
    height: 68svh;
    min-height: 480px;
  }

  .viewer-hud--bottom {
    display: none;
  }

  .mission-toast {
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(100vw - 1.5rem);
  }

  .viewer-hud--top {
    right: 0.65rem;
    left: 0.65rem;
  }

  .viewer-hud--top > div {
    max-width: calc(100% - 90px);
  }

  .mission-meter {
    grid-template-columns: 1fr 1fr;
  }

  .mission-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mission-meter > button {
    grid-row: 3;
  }

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

  .course-footer {
    display: grid;
  }
}

@media (max-width: 460px) {
  .intro-header,
  .course-header {
    padding-inline: 0.75rem;
  }

  .intro-actions {
    display: grid;
  }

  .intro-actions button {
    width: 100%;
  }

  .course-brand strong {
    font-size: 0.7rem;
  }

  .course-header nav button {
    flex: 0 0 auto;
  }

  .containment-score {
    min-width: 0;
  }

  .mission-meter {
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .bio-mark,
  .evidence-card .mini-bio,
  .signal-label i {
    animation: none !important;
  }
}

@media print {
  body::before {
    display: none;
  }

  body {
    color: #111;
    background: #fff;
  }

  .intro,
  .course,
  dialog {
    display: none !important;
  }

  .print-record {
    display: block;
    padding: 0.75in;
    color: #111;
    font-family: Arial, sans-serif;
  }

  .print-record > p:first-child {
    color: #555;
    font-size: 10pt;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .print-record h1 {
    margin: 0.25in 0 0;
    font-size: 34pt;
  }

  .print-record h2 {
    margin: 0 0 0.35in;
    color: #a4122f;
    font-size: 18pt;
  }

  .print-record dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15in;
  }

  .print-record dl div {
    padding: 0.18in;
    border: 1px solid #ccc;
  }

  .print-record dt {
    color: #555;
    font-size: 9pt;
    text-transform: uppercase;
  }

  .print-record dd {
    margin: 0.08in 0 0;
    font-size: 18pt;
    font-weight: bold;
  }

  .print-statement {
    margin-top: 0.4in;
    padding-top: 0.2in;
    border-top: 1px solid #999;
    font-size: 10pt;
    line-height: 1.5;
  }
}
