:root {
  color-scheme: dark;
  --bg: #02060a;
  --panel: rgba(5, 12, 19, .94);
  --panel-raised: rgba(9, 20, 30, .92);
  --line: #80acd4;
  --line-dim: rgba(128, 172, 212, .34);
  --white: #f5f8fb;
  --muted: #a7b7c7;
  --muted-dim: #718395;
  --lime: #d7ff35;
  --cyan: #8edcff;
  --red: #ff8276;
  --shadow: rgba(0, 0, 0, .48);
  --pixel: "Lucida Console", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #020509;
  color: var(--white);
  font-family: var(--pixel);
  font-size: 14px;
  letter-spacing: .025em;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}
::selection { background: var(--lime); color: #071009; }

.app {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 13% 23%, rgba(82, 35, 91, .21), transparent 33%),
    radial-gradient(ellipse at 84% 65%, rgba(23, 55, 91, .21), transparent 38%),
    radial-gradient(rgba(152, 184, 211, .16) .7px, transparent .9px),
    #020509;
  background-size: auto, auto, 13px 13px, auto;
}
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .42;
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(255,255,255,.018) 29%, transparent 30% 70%, rgba(255,255,255,.012) 71%, transparent 72%),
    radial-gradient(ellipse at 50% 110%, rgba(28, 52, 75, .2), transparent 55%);
}
#stars { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: .035;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.15) 4px);
}

.wrap {
  position: relative;
  z-index: 2;
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 30px 34px 44px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 25px;
}
.brand-mark {
  position: relative;
  display: flex;
  flex: 0 1 410px;
  align-items: center;
  min-width: 0;
  max-width: 46%;
  min-height: 76px;
}
.brand-logo {
  display: block;
  width: 100%;
  max-height: 104px;
  object-fit: contain;
  object-position: left center;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 13px rgba(48, 122, 210, .17));
}
.brand-fallback {
  display: inline-flex;
  align-items: center;
  min-height: 62px;
  padding: 9px 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--white);
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 900;
  letter-spacing: .1em;
}
.brand-fallback[hidden] { display: none; }
.brand-sub {
  max-width: 390px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: .2em;
  text-align: right;
  text-transform: uppercase;
}
.brand-sub::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 9px 1px 0;
  background: var(--lime);
  box-shadow: 0 0 9px rgba(215,255,53,.6);
}

.panel, .card {
  position: relative;
  border: 1px solid var(--line-dim);
  background: linear-gradient(145deg, rgba(8, 18, 28, .96), rgba(3, 8, 13, .96));
  box-shadow: 0 5px 0 var(--shadow), inset 0 1px 0 rgba(255,255,255,.025), 0 12px 32px rgba(0,0,0,.16);
}
.panel { padding: clamp(20px, 3vw, 30px); border-radius: 7px; }
.card { padding: 21px; border-radius: 5px; }
.card p, .hero p, .muted { color: var(--muted); line-height: 1.75; }
.card h3, .dept-name, .name { color: var(--white); }
.card h3 {
  margin: 0 0 11px;
  font-size: 13px;
  letter-spacing: .15em;
  line-height: 1.5;
}
.card p { margin: 0; font-size: 12px; }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.hero.compact { grid-template-columns: .9fr 1.1fr; }
.hero-copy {
  min-height: 485px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  padding: clamp(27px, 4vw, 48px);
  border-left: 3px solid var(--line);
  background:
    linear-gradient(135deg, rgba(13, 26, 39, .88), rgba(4, 10, 16, .95)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.012) 23px 24px);
}
.hero-copy::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -45px;
  width: 170px;
  height: 170px;
  opacity: .25;
  background: repeating-conic-gradient(from 45deg, var(--line) 0 8deg, transparent 8deg 16deg);
  clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: .24em;
  line-height: 1.7;
  text-transform: uppercase;
}
.hero h1, .section-title, .result h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--pixel);
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 rgba(128,172,212,.11);
}
.hero h1 {
  max-width: 700px;
  margin: 3px 0 19px;
  font-size: clamp(38px, 5.2vw, 67px);
  line-height: 1.02;
  letter-spacing: .055em;
}
.hero-copy p { max-width: 560px; margin: 0; font-size: 12px; }
.section-title { font-size: clamp(23px, 3.5vw, 39px); line-height: 1.2; letter-spacing: .07em; }
.mission-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0 3px;
  padding: 9px 13px;
  border: 1px solid rgba(128,172,212,.5);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(11, 24, 36, .6);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.5;
}
.mission-tag::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; background: var(--lime); box-shadow: 0 0 8px rgba(215,255,53,.5); }

.cta, .back, .choice, .specialist-card { font-family: var(--pixel); }
.cta {
  position: relative;
  min-height: 49px;
  margin-top: 20px;
  padding: 13px 19px;
  border: 1px solid #efffb1;
  border-radius: 2px;
  background: var(--lime);
  box-shadow: 4px 4px 0 #6e851e, 0 0 17px rgba(215,255,53,.12);
  color: #071006;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.4;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.cta:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 #6e851e, 0 0 22px rgba(215,255,53,.2); filter: brightness(1.04); }
.cta:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 1px 1px 0 #6e851e; }
.cta:disabled { opacity: .36; cursor: not-allowed; filter: grayscale(.3); }
.back {
  min-height: 39px;
  padding: 9px 13px;
  border: 1px solid rgba(128,172,212,.55);
  border-radius: 3px;
  background: rgba(5, 13, 21, .78);
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  letter-spacing: .1em;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.back:hover { border-color: var(--cyan); color: var(--white); background: rgba(24, 48, 68, .48); }

.ref-card {
  position: relative;
  min-height: 485px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 12px;
  border-color: rgba(128,172,212,.55);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(25,43,58,.38), transparent 65%),
    #020508;
}
.ref-card::before {
  content: "MISSION ARCHIVE · VISUAL REFERENCE";
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 17px;
  color: rgba(174,201,222,.63);
  font-size: 8px;
  letter-spacing: .16em;
  pointer-events: none;
}
.ref-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 455px;
  object-fit: contain;
  image-rendering: pixelated;
  opacity: .94;
  filter: contrast(1.04) saturate(.94);
}
.ref-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 48px 18px 15px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  color: var(--white);
  font-size: 9px;
  letter-spacing: .2em;
  line-height: 1.6;
  pointer-events: none;
}

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 17px; }
.grid.three { margin-top: 17px; }
.grid .card { min-height: 148px; }
.grid .card p { margin-bottom: 15px; }
.card.active { border-color: rgba(215,255,53,.7); box-shadow: 0 5px 0 var(--shadow), inset 0 0 22px rgba(215,255,53,.035); }
.card.locked { opacity: .66; }
.card.active::before, .specialist-card.selected::before {
  content: "AVAILABLE";
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--lime);
  font-size: 8px;
  letter-spacing: .12em;
}
.card.active h3 { padding-right: 72px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.topbar .eyebrow { margin-bottom: 9px; }
.topbar .back { flex: 0 0 auto; margin-top: 3px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0 17px;
}
.fact {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(128,172,212,.2);
  border-left: 2px solid var(--lime);
  background: rgba(11, 23, 33, .55);
  color: #d5e0e9;
  font-size: 10px;
  line-height: 1.6;
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 19px 0 15px; }
.stat {
  position: relative;
  min-height: 92px;
  padding: 14px 15px 12px;
  border: 1px solid rgba(128,172,212,.33);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(10,24,36,.88), rgba(2,8,13,.9));
}
.stat::after { content: ""; position: absolute; top: 0; right: 0; width: 17px; height: 17px; border-top: 2px solid rgba(128,172,212,.65); border-right: 2px solid rgba(128,172,212,.65); }
.stat span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.stat strong { display: block; margin-top: 8px; color: var(--white); font-size: clamp(19px, 2.5vw, 26px); letter-spacing: .05em; }
.stat:nth-child(4) strong { color: var(--lime); }

.specialist-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 19px 0 4px; }
.specialist-card {
  position: relative;
  min-height: 175px;
  padding: 17px 14px;
  border: 1px solid rgba(128,172,212,.34);
  border-radius: 4px;
  background: linear-gradient(155deg, rgba(8,19,29,.96), rgba(2,7,12,.96));
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.specialist-card:hover { transform: translateY(-2px); border-color: rgba(142,220,255,.85); }
.specialist-card.selected { border-color: var(--lime); box-shadow: inset 0 0 22px rgba(215,255,53,.055), 0 0 18px rgba(215,255,53,.07); }
.specialist-card.selected::before { content: "SELECTED"; top: 10px; right: 10px; }
.specialist-card .name { display: block; padding-top: 9px; font-size: 12px; font-weight: 900; line-height: 1.55; }
.role { margin-top: 7px; color: var(--cyan); font-size: 9px; letter-spacing: .11em; line-height: 1.5; text-transform: uppercase; }
.ability { margin-top: 22px; color: var(--lime); font-size: 8px; letter-spacing: .12em; line-height: 1.5; }
.small { color: var(--muted); font-size: 9px; line-height: 1.65; }

.mission-objective { display: flex; align-items: center; gap: 15px; padding: 16px 18px; }
.mission-objective .objective-mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: var(--lime);
  clip-path: polygon(40% 0,60% 0,60% 40%,100% 40%,100% 60%,60% 60%,60% 100%,40% 100%,40% 60%,0 60%,0 40%,40% 40%);
  filter: drop-shadow(0 0 7px rgba(215,255,53,.25));
}
.mission-objective h3 { margin: 0 0 5px; color: var(--lime); font-size: 10px; letter-spacing: .17em; }
.mission-objective p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.depts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.dept {
  padding: 17px;
  border: 1px solid rgba(128,172,212,.3);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(8,20,30,.9), rgba(3,8,13,.94));
}
.dept-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dept-name { font-size: 12px; font-weight: 900; letter-spacing: .13em; }
.dept-value { color: var(--lime); font-size: 14px; font-weight: 900; }
.bar { position: relative; height: 7px; margin-top: 11px; overflow: hidden; background: #14212c; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.fill { height: 100%; background: linear-gradient(90deg, #91b51e, var(--lime)); box-shadow: 0 0 11px rgba(215,255,53,.3); transition: width .18s ease; }
.dept .small { display: block; min-height: 30px; margin-top: 9px; }
.alloc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(128,172,212,.16); }
.alloc label { display: block; grid-column: 1 / -1; color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.alloc output { color: var(--lime); font-size: 9px; }
input[type="range"] { width: 100%; height: 18px; margin: 0; background: transparent; accent-color: var(--lime); cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border: 1px solid rgba(128,172,212,.28); background: #1a2935; }
input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -6px; border: 2px solid #f3ffb6; border-radius: 1px; background: var(--lime); box-shadow: 0 0 8px rgba(215,255,53,.3); -webkit-appearance: none; appearance: none; }
input[type="range"]::-moz-range-track { height: 4px; border: 1px solid rgba(128,172,212,.28); background: #1a2935; }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #f3ffb6; border-radius: 1px; background: var(--lime); }
.alloc-hint { display: flex; justify-content: space-between; gap: 10px; grid-column: 1 / -1; color: var(--muted-dim); font-size: 8px; }
.alloc-hint strong { color: var(--cyan); font-weight: 700; }
.action-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 17px; padding-top: 15px; border-top: 1px solid rgba(128,172,212,.2); }
.allocation-note { max-width: 630px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.allocation-summary { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 13px; padding: 11px 13px; border: 1px solid rgba(128,172,212,.22); background: rgba(2,8,13,.62); color: var(--muted); font-size: 9px; }
.allocation-summary strong { color: var(--lime); }
.action-row .cta { flex: 0 0 auto; margin-top: 0; }

.event {
  margin-top: 19px;
  padding: 21px;
  border: 1px solid rgba(215,255,53,.7);
  border-left: 4px solid var(--lime);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(22,30,14,.62), rgba(4,10,14,.96));
  box-shadow: 0 0 24px rgba(215,255,53,.045);
}
.event-kicker { margin-bottom: 9px; color: var(--lime); font-size: 8px; letter-spacing: .16em; line-height: 1.6; }
.event h3 { margin: 0 0 9px; color: var(--white); font-size: clamp(17px, 2vw, 22px); letter-spacing: .08em; line-height: 1.35; }
.event p { max-width: 850px; margin: 0 0 15px; color: #d6e1e9; font-size: 11px; line-height: 1.8; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice {
  min-height: 105px;
  padding: 15px;
  border: 1px solid rgba(128,172,212,.5);
  border-radius: 3px;
  background: rgba(4,13,21,.9);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.choice:hover { transform: translateY(-1px); border-color: var(--lime); background: rgba(22,35,28,.72); }
.choice strong { display: block; color: var(--cyan); font-size: 10px; letter-spacing: .12em; line-height: 1.6; }
.choice span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.effect-line { margin: 14px 0 0; color: var(--lime); font-size: 9px; letter-spacing: .06em; line-height: 1.7; }

.result h2 { margin: 9px 0 10px; color: var(--lime); font-size: clamp(36px, 6vw, 67px); line-height: 1.1; }
.result > .muted { font-size: 11px; }
.report { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 19px; }
.report .card { min-height: 130px; }
.report .card h3 { color: var(--cyan); }
.history { margin-top: 15px; padding: 18px; border: 1px solid rgba(128,172,212,.35); border-left: 3px solid var(--line); background: rgba(6,15,23,.75); color: var(--muted); font-size: 10px; line-height: 1.8; }
.history strong { color: var(--lime); font-size: 9px; letter-spacing: .16em; }
.sources { display: flex; flex-wrap: wrap; gap: 10px 15px; margin-top: 14px; }
.sources a { color: var(--cyan); font-size: 9px; line-height: 1.7; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sources a:hover { color: var(--lime); }
.footer { margin-top: 25px; color: #647687; font-size: 8px; letter-spacing: .18em; line-height: 1.8; text-align: center; }

@media (max-width: 1050px) {
  .specialist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero, .hero.compact { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 20px 15px 34px; }
  .brand { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 19px; }
  .brand-mark { flex: 0 1 auto; width: min(390px, 100%); max-width: 100%; min-height: 0; }
  .brand-logo { max-height: 90px; }
  .brand-fallback { min-height: 48px; padding: 7px 16px; font-size: clamp(20px, 7vw, 31px); }
  .brand-sub { text-align: left; font-size: 8px; }
  .hero, .hero.compact, .grid, .depts, .report { grid-template-columns: 1fr; }
  .hero-copy { min-height: auto; padding: 28px 23px; }
  .hero h1 { font-size: clamp(35px, 10vw, 54px); }
  .ref-card { min-height: 300px; }
  .ref-card img { max-height: 330px; }
  .topbar { align-items: flex-start; }
  .section-title { font-size: clamp(20px, 6vw, 30px); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specialist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .action-row { align-items: stretch; flex-direction: column; }
  .action-row .cta { width: 100%; }
}
@media (max-width: 420px) {
  .panel { padding: 17px; }
  .specialist-grid { grid-template-columns: 1fr; }
  .specialist-card { min-height: 145px; }
  .stat { min-height: 82px; padding: 12px; }
  .stat span { font-size: 8px; }
  .stat strong { font-size: 20px; }
  .topbar { flex-direction: column; }
  .topbar .back { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Campaign art and turn timeline: compact, high-contrast pixel-interface details. */
.campaign-art {
  display: grid;
  place-items: center;
  height: 132px;
  margin: -8px -8px 17px;
  overflow: hidden;
  border: 1px solid rgba(128,172,212,.2);
  background: radial-gradient(ellipse at center, rgba(20,39,56,.45), transparent 70%), #020508;
}
.campaign-art img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.campaign-planned { background: linear-gradient(145deg, rgba(9,20,30,.88), rgba(3,8,13,.96)); }
.campaign-signal {
  display: grid;
  place-items: center;
  height: 132px;
  margin: -8px -8px 17px;
  border: 1px solid rgba(128,172,212,.2);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(128,172,212,.18) 50%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(128,172,212,.18) 50%, transparent 50.5%),
    radial-gradient(circle, rgba(128,172,212,.11), transparent 68%), #020508;
  color: var(--cyan);
  font-size: 33px;
  letter-spacing: .13em;
  text-shadow: 3px 3px 0 rgba(128,172,212,.16);
}
.week-track {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 15px;
  padding: 11px 13px;
  border: 1px solid rgba(128,172,212,.23);
  background: rgba(2,8,13,.58);
}
.week-track > span { color: var(--muted); font-size: 8px; letter-spacing: .16em; white-space: nowrap; }
.week-track-steps { display: grid; flex: 1; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.week-step {
  display: grid;
  place-items: center;
  min-height: 24px;
  border: 1px solid rgba(128,172,212,.24);
  background: rgba(128,172,212,.05);
  color: var(--muted-dim);
  font-size: 8px;
}
.week-step.current { border-color: var(--lime); background: rgba(215,255,53,.12); color: var(--lime); box-shadow: 0 0 10px rgba(215,255,53,.08); }
.week-step.passed { border-color: rgba(128,172,212,.45); background: rgba(128,172,212,.13); color: var(--cyan); }
@media (max-width: 500px) {
  .week-track { align-items: stretch; flex-direction: column; gap: 9px; }
  .campaign-art, .campaign-signal { height: 118px; }
}
