/*
 * Ideals core tokens
 * Canonical source: ~/.codex/skills/ideals-html/brand-tokens.css
 * Game-specific styles use only the approved core and supporting palette.
 */

:root {
  --ideals-deep-green: #022e34;
  --ideals-emerald: #70eb94;
  --ideals-dark-green: #002325;
  --ideals-jade: #12695c;
  --ideals-light-green: #ddffda;
  --ideals-white: #ffffff;

  --ideals-grey-dark: #6d6d6d;
  --ideals-grey-md: #9e9e9e;
  --ideals-grey: #b1b1b1;
  --ideals-grey-lm: #c9c9c9;
  --ideals-grey-light: #e2e2e2;
  --ideals-grey-bg: #f7f7f7;

  --support-yellow-1: #c6a115;
  --support-yellow-2: #e7c441;
  --support-yellow-3: #f6e397;
  --support-yellow-4: #fff2d6;
  --support-purple-1: #747fec;
  --support-purple-2: #9fa6f4;
  --support-purple-3: #c4c8f7;
  --support-purple-4: #f0f0ff;
  --support-green-1: #084d4b;
  --support-green-2: #1c8269;
  --support-green-3: #2c9c74;
  --support-green-4: #3fb67d;

  --bg-primary: var(--ideals-deep-green);
  --bg-alt: var(--ideals-dark-green);
  --bg-soft: var(--ideals-light-green);
  --bg-canvas: var(--ideals-white);
  --bg-section: var(--ideals-grey-bg);
  --text-on-dark: var(--ideals-white);
  --text-on-light: var(--ideals-deep-green);
  --text-muted: var(--ideals-grey-dark);
  --accent: var(--ideals-emerald);
  --accent-hover: var(--support-green-4);
  --border-soft: var(--ideals-grey-light);

  --font-display: "Ivy Presto Headline", "Times New Roman", Times, serif;
  --font-body: Montserrat, Verdana, Geneva, sans-serif;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --fs-display-xl: clamp(2.8rem, 6vw, 5.3rem);
  --fs-display-l: clamp(2.15rem, 4.5vw, 3.35rem);
  --fs-display-m: clamp(1.9rem, 3vw, 2.55rem);
  --fs-heading: clamp(1.25rem, 2vw, 1.5rem);
  --fs-subheading: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.75rem;

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.04em;
  --tracking-eyebrow: 0.12em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(2, 46, 52, 0.06);
  --shadow-md: 0 4px 12px rgba(2, 46, 52, 0.08);
  --shadow-lg: 0 18px 42px rgba(2, 46, 52, 0.12);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 450ms;

  --container-max: 2120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-on-light);
  background: var(--bg-section);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 2.5vw, var(--space-7));
}

.surface-dark {
  color: var(--text-on-dark);
  background: var(--bg-primary);
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--ideals-deep-green);
  background: var(--ideals-emerald);
  border-radius: var(--r-md);
  font-weight: var(--weight-semibold);
  transform: translateY(-160%);
  transition: transform var(--duration-fast) var(--ease-out);
}

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

:focus-visible {
  outline: 3px solid var(--support-purple-1);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.topbar__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand-lockup__logo {
  width: auto;
  height: 28px;
}

.brand-lockup__divider {
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.24);
}

.brand-lockup__program {
  color: var(--ideals-emerald);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.brand-lockup__title {
  margin-top: 2px;
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.track-credit {
  display: grid;
  gap: 2px;
  margin-left: auto;
  padding: var(--space-2) var(--space-4);
  color: var(--ideals-white);
  background: var(--ideals-dark-green);
  border-left: 3px solid var(--ideals-emerald);
}

.track-credit__label {
  color: var(--ideals-emerald);
  font-family: var(--font-system, "SFMono-Regular", Consolas, monospace);
  font-size: 0.625rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.track-credit__title {
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-snug);
}

.track-credit__byline {
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-system, "SFMono-Regular", Consolas, monospace);
  font-size: 0.625rem;
  line-height: var(--lh-snug);
}

.utility-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  color: var(--ideals-white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.utility-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.utility-button__status {
  width: 8px;
  height: 8px;
  background: var(--ideals-grey);
  border-radius: 50%;
}

.utility-button[aria-pressed="true"] .utility-button__status {
  background: var(--ideals-emerald);
  box-shadow: 0 0 0 4px rgba(112, 235, 148, 0.14);
}

.mission-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.mission-bar__inner {
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(320px, 1.25fr);
  align-items: center;
  gap: var(--space-7);
}

.mission-bar__eyebrow,
.eyebrow {
  color: var(--ideals-jade);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.mission-bar__title {
  margin-top: 2px;
  color: var(--ideals-deep-green);
  font-weight: var(--weight-semibold);
}

.mission-bar__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.progress-track {
  height: 8px;
  margin-top: var(--space-2);
  overflow: hidden;
  background: var(--ideals-grey-light);
  border-radius: var(--r-pill);
}

.progress-track__fill {
  width: 0;
  height: 100%;
  background: var(--ideals-jade);
  border-radius: inherit;
  transition: width var(--duration-slow) var(--ease-out);
}

#gameRoot {
  min-height: calc(100vh - 210px);
  padding-block: clamp(var(--space-5), 2.5vw, var(--space-7));
}

.screen {
  animation: screen-enter 240ms steps(3, end) both;
}

@keyframes screen-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-screen {
  display: grid;
  gap: var(--space-5);
}

.welcome-hero {
  min-height: min(700px, calc(100vh - 160px));
  display: grid;
  grid-template-columns: minmax(420px, 0.78fr) minmax(560px, 1.22fr);
  align-items: center;
  gap: clamp(var(--space-6), 3vw, var(--space-8));
  overflow: hidden;
  padding: clamp(var(--space-6), 3.5vw, var(--space-8));
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.welcome-hero__copy {
  position: relative;
  z-index: 1;
}

.welcome-hero__title {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-display-xl);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: 0.96;
}

.welcome-hero__versus {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  color: var(--ideals-emerald);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: var(--weight-semibold);
}

.welcome-hero__versus span {
  color: rgba(255, 255, 255, 0.52);
  font-size: var(--fs-caption);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.welcome-hero__intro {
  max-width: 650px;
  margin-top: var(--space-5);
  color: rgba(255, 255, 255, 0.84);
  font-size: var(--fs-subheading);
  line-height: var(--lh-relaxed);
}

.welcome-hero__taunt {
  max-width: 650px;
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  color: var(--ideals-white);
  background: rgba(231, 196, 65, 0.12);
  border-left: 3px solid var(--support-yellow-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.welcome-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.primary-button--battle {
  min-height: 54px;
  padding-inline: var(--space-6);
}

.welcome-arena {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--ideals-dark-green);
  border: 1px solid rgba(112, 235, 148, 0.34);
  border-radius: var(--r-lg);
}

.welcome-arena__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
}

.welcome-arena__caption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  padding: var(--space-4);
  color: rgba(255, 255, 255, 0.72);
  background: var(--ideals-dark-green);
  font-size: var(--fs-caption);
  line-height: var(--lh-normal);
}

.welcome-arena__caption span {
  display: grid;
  gap: var(--space-1);
}

.welcome-arena__caption strong {
  color: var(--ideals-emerald);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.welcome-objective {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--ideals-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.welcome-objective__title {
  max-width: 900px;
  margin-top: var(--space-2);
  font-size: var(--fs-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-snug);
}

.welcome-objective__signals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.welcome-objective__signals span {
  padding: var(--space-2) var(--space-3);
  color: var(--ideals-jade);
  background: var(--ideals-light-green);
  border: 1px solid rgba(18, 105, 92, 0.22);
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.battle-transition {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-content: center;
  padding: var(--space-6);
  overflow: hidden;
  color: var(--ideals-white);
  text-align: center;
  background: var(--ideals-deep-green);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-in-out);
}

.battle-transition::before {
  position: absolute;
  inset: -4%;
  content: "";
  background:
    var(--ideals-deep-green)
    url("assets/illustrations/quality_battle_arena.webp") center / cover no-repeat;
  background-blend-mode: multiply;
  opacity: 0.5;
  transform: scale(1.04);
  transition: transform 760ms var(--ease-out);
}

.battle-transition.is-active {
  opacity: 1;
}

.battle-transition.is-active::before {
  transform: scale(1);
}

.battle-transition__eyebrow,
.battle-transition__title {
  position: relative;
  z-index: 1;
}

.battle-transition__eyebrow {
  color: var(--ideals-emerald);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.battle-transition__title {
  max-width: 900px;
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  line-height: var(--lh-tight);
}

.intro-hero {
  overflow: hidden;
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.intro-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(var(--space-6), 5vw, var(--space-9));
  padding: clamp(var(--space-6), 6vw, var(--space-9));
}

.intro-hero__title,
.completion__title {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-display-xl);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
}

.intro-hero__copy {
  max-width: 680px;
  margin-top: var(--space-5);
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-subheading);
  line-height: var(--lh-relaxed);
}

.intro-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.time-note {
  color: rgba(255, 255, 255, 0.66);
  font-size: var(--fs-small);
}

.time-note--track {
  display: grid;
  gap: var(--space-1);
}

.time-note--track strong {
  color: var(--ideals-white);
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-pill);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition:
    transform var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.primary-button {
  color: var(--ideals-deep-green);
  background: var(--ideals-emerald);
  border: 1px solid transparent;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.primary-button:disabled {
  color: var(--ideals-grey-dark);
  background: var(--ideals-grey-light);
}

.secondary-button {
  color: var(--ideals-deep-green);
  background: var(--ideals-white);
  border: 1px solid var(--ideals-deep-green);
}

.secondary-button:hover {
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
}

.text-button {
  min-height: 40px;
  padding-inline: var(--space-3);
  color: var(--ideals-jade);
  background: transparent;
  border: 0;
}

.text-button:hover {
  color: var(--ideals-deep-green);
  background: var(--ideals-light-green);
}

.workflow-card {
  align-self: center;
  padding: var(--space-6);
  color: var(--ideals-deep-green);
  background: var(--ideals-white);
  border-radius: var(--r-lg);
}

.workflow-card__title {
  margin-top: var(--space-2);
  font-size: var(--fs-heading);
  font-weight: var(--weight-semibold);
}

.workflow-card__copy {
  margin-top: var(--space-3);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}

.hitl-flow {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  list-style: none;
  counter-reset: hitl;
}

.hitl-flow__item {
  position: relative;
  min-height: 56px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--ideals-grey-bg);
  border-radius: var(--r-md);
  counter-increment: hitl;
}

.hitl-flow__item::before {
  content: counter(hitl);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ideals-deep-green);
  background: var(--ideals-emerald);
  border-radius: 50%;
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.journey-panel {
  margin-top: var(--space-6);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  background: var(--ideals-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
}

.journey-panel__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
}

.journey-panel__title {
  margin-top: var(--space-2);
  font-size: var(--fs-heading);
  font-weight: var(--weight-semibold);
}

.journey-panel__note {
  max-width: 460px;
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  text-align: right;
}

.journey {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-6);
  list-style: none;
}

.journey__step {
  position: relative;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-3);
  overflow: hidden;
  background: var(--ideals-grey-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  opacity: 0;
  transform: translateY(12px);
  animation: journey-enter var(--duration-slow) var(--ease-out) forwards;
  animation-delay: calc(var(--step-index) * 90ms);
}

.journey__step::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--ideals-grey-light);
}

.journey__step.is-complete::after {
  background: var(--ideals-jade);
}

.journey__step.is-current {
  background: var(--ideals-light-green);
  border-color: var(--ideals-emerald);
}

.journey__step.is-current::after {
  background: var(--ideals-emerald);
  animation: current-pulse 1.8s var(--ease-in-out) infinite;
}

@keyframes journey-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes current-pulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

.journey__number {
  color: var(--ideals-jade);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
}

.journey__label {
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-snug);
}

.journey__status {
  margin-top: var(--space-2);
  color: var(--ideals-jade);
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
}

.round-shell {
  display: grid;
  gap: var(--space-5);
}

.round-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
}

.round-heading__week {
  color: var(--ideals-jade);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.round-heading__title {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
}

.round-heading__signal {
  max-width: 560px;
  padding-left: var(--space-4);
  color: var(--text-muted);
  border-left: 3px solid var(--support-yellow-2);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.round-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.96fr) minmax(460px, 1.04fr);
  gap: clamp(var(--space-5), 2.25vw, var(--space-7));
  align-items: start;
}

.evidence-board,
.decision-card,
.retest-card,
.summary-card {
  background: var(--ideals-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

.evidence-board {
  padding: clamp(var(--space-5), 2vw, var(--space-6));
}

.board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.board-heading__title {
  font-size: var(--fs-subheading);
  font-weight: var(--weight-semibold);
}

.sheet-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.sheet-chip {
  color: var(--ideals-jade);
  background: var(--ideals-light-green);
}

.evidence-stack {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.evidence-card {
  padding: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.evidence-card--input {
  background: var(--ideals-light-green);
  border-color: rgba(18, 105, 92, 0.28);
}

.evidence-card--expected {
  background: var(--support-yellow-4);
  border-color: rgba(198, 161, 21, 0.32);
}

.evidence-card--actual {
  background: var(--support-purple-4);
  border-color: rgba(116, 127, 236, 0.34);
}

.evidence-card--human {
  background: var(--ideals-grey-bg);
  border-color: var(--border-soft);
}

.evidence-card.is-focused {
  border-color: var(--support-purple-1);
  box-shadow: 0 0 0 4px rgba(116, 127, 236, 0.12);
  transform: translateY(-2px);
}

.evidence-card__label {
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.evidence-card--input .evidence-card__label {
  color: var(--ideals-jade);
}

.evidence-card--expected .evidence-card__label {
  color: var(--ideals-deep-green);
}

.evidence-card--actual .evidence-card__label {
  color: var(--ideals-deep-green);
}

.evidence-card__copy {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.expected-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  list-style: none;
}

.expected-list__item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-2);
  align-items: start;
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.expected-list__item::before {
  content: "✓";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--ideals-deep-green);
  background: var(--support-yellow-3);
  border-radius: 50%;
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.decision-card {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  padding: clamp(var(--space-5), 4vw, var(--space-7));
}

.checkpoint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.checkpoint-header__count,
.checkpoint-header__field {
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.checkpoint-header__field {
  color: var(--ideals-jade);
}

.checkpoint-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.checkpoint-track__segment {
  height: 5px;
  background: var(--ideals-grey-light);
  border-radius: var(--r-pill);
}

.checkpoint-track__segment.is-complete {
  background: var(--ideals-jade);
}

.checkpoint-track__segment.is-current {
  background: var(--ideals-emerald);
}

.decision-card__question {
  max-width: 720px;
  margin-top: var(--space-6);
  color: var(--ideals-deep-green);
  font-size: var(--fs-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-snug);
}

.decision-card__helper {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.option-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.option-button {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--ideals-deep-green);
  background: var(--ideals-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-align: left;
  transition:
    transform var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.option-button:hover:not(:disabled) {
  background: var(--ideals-grey-bg);
  border-color: var(--ideals-grey-lm);
  transform: translateY(-1px);
}

.option-button.is-selected {
  background: var(--ideals-light-green);
  border-color: var(--ideals-jade);
  box-shadow: 0 0 0 3px rgba(18, 105, 92, 0.1);
}

.option-button.is-correct {
  background: var(--ideals-light-green);
  border-color: var(--ideals-jade);
}

.option-button.is-wrong {
  background: var(--support-purple-4);
  border-color: var(--support-purple-1);
}

.option-button__marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--ideals-jade);
  background: var(--ideals-grey-bg);
  border-radius: 50%;
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
}

.option-button.is-selected .option-button__marker,
.option-button.is-correct .option-button__marker {
  color: var(--ideals-white);
  background: var(--ideals-jade);
}

.option-button.is-wrong .option-button__marker {
  color: var(--ideals-white);
  background: var(--support-purple-1);
}

.option-button__label {
  display: block;
  font-weight: var(--weight-semibold);
  line-height: var(--lh-snug);
}

.option-button__copy {
  display: grid;
  gap: var(--space-1);
}

.option-button__sheet-value {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-caption);
  line-height: var(--lh-normal);
}

.option-button.is-selected .option-button__sheet-value,
.option-button.is-correct .option-button__sheet-value,
.option-button.is-wrong .option-button__sheet-value {
  color: var(--ideals-deep-green);
}

.feedback-panel {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--ideals-light-green);
  border-left: 4px solid var(--ideals-jade);
  border-radius: var(--r-md);
  animation: feedback-enter var(--duration-base) var(--ease-out) both;
}

.feedback-panel--rewind {
  background: var(--support-purple-4);
  border-left-color: var(--support-purple-1);
}

@keyframes feedback-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-panel__eyebrow {
  color: var(--ideals-jade);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.feedback-panel--rewind .feedback-panel__eyebrow {
  color: var(--ideals-deep-green);
}

.feedback-panel__title {
  margin-top: var(--space-1);
  font-size: var(--fs-subheading);
  font-weight: var(--weight-semibold);
}

.feedback-panel__copy {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.decision-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: auto;
  padding-top: var(--space-6);
}

.decision-actions__status {
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.loop-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.loop-strip__item {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
}

.loop-strip__item.is-active {
  color: var(--ideals-deep-green);
  background: var(--ideals-white);
  border-color: var(--ideals-jade);
}

.loop-strip__item.is-complete {
  color: var(--ideals-deep-green);
  background: var(--ideals-light-green);
  border-color: var(--ideals-emerald);
}

.loop-strip__week {
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
}

.loop-strip__label {
  margin-top: 2px;
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
}

.retest-card {
  overflow: hidden;
}

.retest-card__header {
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
}

.retest-card__title {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
}

.retest-card__copy {
  max-width: 760px;
  margin-top: var(--space-3);
  color: rgba(255, 255, 255, 0.76);
  line-height: var(--lh-relaxed);
}

.retest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
}

.retest-column {
  padding: var(--space-5);
  background: var(--ideals-grey-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
}

.retest-column--after {
  background: var(--ideals-light-green);
  border-color: var(--ideals-emerald);
}

.retest-column__label {
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.retest-column--after .retest-column__label {
  color: var(--ideals-jade);
}

.retest-column__title {
  margin-top: var(--space-2);
  font-size: var(--fs-subheading);
  font-weight: var(--weight-semibold);
}

.retest-column__copy {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.retest-result {
  margin: 0 clamp(var(--space-5), 4vw, var(--space-7)) clamp(var(--space-5), 4vw, var(--space-7));
  padding: var(--space-4) var(--space-5);
  background: var(--support-yellow-4);
  border-left: 4px solid var(--support-yellow-2);
  border-radius: var(--r-md);
}

.retest-result__title {
  color: var(--ideals-deep-green);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.retest-result__copy {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.retest-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 clamp(var(--space-5), 4vw, var(--space-7)) clamp(var(--space-5), 4vw, var(--space-7));
}

.status-chip--ready {
  color: var(--ideals-deep-green);
  background: var(--support-yellow-4);
}

.status-chip--retested {
  color: var(--ideals-jade);
  background: var(--ideals-light-green);
  animation: stamp-in var(--duration-slow) var(--ease-out) both;
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: scale(1.3) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.completion {
  overflow: hidden;
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.completion__hero {
  position: relative;
  padding: clamp(var(--space-7), 7vw, var(--space-9));
  isolation: isolate;
}

.completion__hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -210px;
  border: 64px solid rgba(112, 235, 148, 0.08);
  border-radius: 50%;
  animation: celebration-ring 1.4s var(--ease-out) both;
}

@keyframes celebration-ring {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.completion__title {
  max-width: 1100px;
}

.completion__copy {
  max-width: 980px;
  margin-top: var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-subheading);
  line-height: var(--lh-relaxed);
}

.summary-area {
  display: grid;
  gap: var(--space-5);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  color: var(--ideals-deep-green);
  background: var(--ideals-white);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.capability-card {
  min-height: 148px;
  padding: var(--space-4);
  background: var(--ideals-grey-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
}

.capability-card__status {
  color: var(--ideals-jade);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.capability-card__name {
  margin-top: var(--space-3);
  font-weight: var(--weight-semibold);
}

.capability-card__copy {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.summary-card {
  overflow: hidden;
  box-shadow: none;
}

.summary-card__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-soft);
}

.summary-card__title {
  margin-top: var(--space-2);
  font-size: var(--fs-heading);
  font-weight: var(--weight-semibold);
}

.summary-card__copy {
  max-width: 760px;
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.table-wrap {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.result-table th,
.result-table td {
  padding: var(--space-4);
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.result-table th {
  position: sticky;
  top: 0;
  color: var(--text-muted);
  background: var(--ideals-grey-bg);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.result-table td {
  line-height: var(--lh-relaxed);
}

.correction-note {
  display: block;
  margin-top: var(--space-2);
  color: var(--ideals-deep-green);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-5);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.roadmap-card {
  padding: var(--space-5);
  background: var(--ideals-grey-bg);
  border-top: 4px solid var(--ideals-jade);
  border-radius: var(--r-lg);
}

.roadmap-card:nth-child(2) {
  border-top-color: var(--support-yellow-2);
}

.roadmap-card:nth-child(3) {
  border-top-color: var(--support-purple-1);
}

.roadmap-card__step {
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.roadmap-card__title {
  margin-top: var(--space-3);
  font-size: var(--fs-subheading);
  font-weight: var(--weight-semibold);
}

.roadmap-card__copy {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

.why-card {
  padding: var(--space-5);
  background: var(--ideals-light-green);
  border-left: 4px solid var(--ideals-emerald);
  border-radius: var(--r-lg);
}

.why-card__title {
  color: var(--ideals-jade);
  font-size: var(--fs-subheading);
  font-weight: var(--weight-semibold);
}

.why-card__copy {
  margin-top: var(--space-2);
  line-height: var(--lh-relaxed);
}

.footer {
  color: var(--text-muted);
  background: var(--ideals-white);
  border-top: 1px solid var(--border-soft);
}

.footer__inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  font-size: var(--fs-small);
}

.footer__logo {
  width: auto;
  height: 20px;
}

.footer__copy {
  display: grid;
  gap: var(--space-1);
  text-align: right;
}

.footer__credit {
  color: var(--ideals-deep-green);
  font-family: var(--font-system, "SFMono-Regular", Consolas, monospace);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
}

.victory-screen {
  display: grid;
  align-items: center;
  min-height: min(780px, calc(100vh - 250px));
}

.victory-panel {
  display: grid;
  grid-template-columns: minmax(350px, 0.82fr) minmax(540px, 1.18fr);
  overflow: hidden;
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border: 2px solid var(--ideals-deep-green);
  border-radius: var(--r-md);
  box-shadow: 9px 9px 0 rgba(0, 35, 37, 0.22);
}

.victory-panel__copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  border-right: 2px solid var(--ideals-emerald);
}

.victory-panel__title {
  margin-top: var(--space-4);
  color: var(--ideals-white);
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5.4rem);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: 0.98;
}

.victory-panel__intro {
  max-width: 40rem;
  margin-top: var(--space-5);
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-subheading);
  line-height: var(--lh-relaxed);
}

.vigilance-card {
  width: 100%;
  margin-top: var(--space-6);
  padding: var(--space-5);
  color: var(--ideals-deep-green);
  background: var(--support-purple-4);
  border: 2px solid var(--support-purple-1);
  border-left-width: 6px;
  box-shadow: 5px 5px 0 rgba(116, 127, 236, 0.24);
}

.vigilance-card__eyebrow {
  color: var(--support-purple-1);
  font-family: var(--font-system);
  font-size: var(--fs-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.vigilance-card__title {
  margin-top: var(--space-2);
  font-size: var(--fs-heading);
  line-height: var(--lh-snug);
}

.vigilance-card__copy {
  margin-top: var(--space-3);
  line-height: var(--lh-relaxed);
}

.vigilance-card__command {
  margin-top: var(--space-4);
  color: var(--ideals-jade);
  font-family: var(--font-system);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-normal);
  text-transform: uppercase;
}

.victory-panel__copy .primary-button {
  margin-top: var(--space-6);
}

.victory-tableau {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(460px, 1fr) auto;
  margin: 0;
  background: var(--ideals-dark-green);
}

.victory-tableau__image {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
}

.victory-tableau__caption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  padding: var(--space-4);
  color: rgba(255, 255, 255, 0.78);
  background: var(--ideals-dark-green);
  border-top: 2px solid var(--ideals-emerald);
  font-family: var(--font-system);
  font-size: var(--fs-caption);
}

.victory-tableau__caption span:last-child {
  text-align: right;
}

.victory-tableau__caption strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ideals-emerald);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/*
 * Retro battle treatment
 * Keeps Ideals' canonical palette and editorial type while using compact
 * system labels, hard-edged panels, and tactile game-state feedback.
 */
:root {
  --font-system: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
  --retro-shadow-dark: 7px 7px 0 rgba(0, 35, 37, 0.2);
  --retro-shadow-green: 5px 5px 0 var(--ideals-jade);
  --retro-shadow-emerald: 5px 5px 0 var(--ideals-emerald);
  --retro-step-ease: steps(2, end);
  --retro-border: 2px solid var(--ideals-deep-green);
}

.topbar {
  border-bottom: 3px solid var(--ideals-emerald);
}

.brand-lockup__program,
.brand-lockup__title,
.utility-button,
.mission-bar__eyebrow,
.mission-bar__title,
.mission-bar__meta,
.eyebrow,
.time-note,
.sheet-chip,
.status-chip,
.checkpoint-header__count,
.checkpoint-header__field,
.option-button__marker,
.option-button__sheet-value,
.feedback-panel__eyebrow,
.journey__number,
.journey__status,
.round-heading__week,
.evidence-card__label,
.board-heading__title,
.retest-column__label,
.retest-result__title,
.capability-card__status,
.capability-card__name,
.roadmap-card__step,
.result-table th {
  font-family: var(--font-system);
}

.utility-button {
  min-height: 40px;
  background: var(--ideals-dark-green);
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--r-sm);
  box-shadow: 3px 3px 0 rgba(112, 235, 148, 0.22);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.utility-button:hover {
  background: var(--ideals-jade);
  border-color: var(--ideals-emerald);
}

.utility-button:active {
  box-shadow: 1px 1px 0 rgba(112, 235, 148, 0.22);
  transform: translate(2px, 2px);
}

.utility-button__status {
  border-radius: var(--r-sm);
}

.mission-bar {
  background: var(--ideals-grey-bg);
  border-bottom: 2px solid var(--ideals-deep-green);
  box-shadow: 0 4px 0 rgba(2, 46, 52, 0.08);
  backdrop-filter: none;
}

.mission-bar__title {
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.progress-track {
  height: 12px;
  background: var(--ideals-white);
  border: 2px solid var(--ideals-deep-green);
  border-radius: var(--r-sm);
}

.progress-track__fill {
  background: var(--ideals-emerald);
  border-radius: 0;
  transition-timing-function: var(--retro-step-ease);
}

.intro-hero,
.welcome-hero,
.completion {
  border: 2px solid var(--ideals-deep-green);
  border-radius: var(--r-md);
  box-shadow: 9px 9px 0 rgba(0, 35, 37, 0.22);
}

.workflow-card,
.welcome-arena {
  border: 2px solid var(--ideals-emerald);
  border-radius: var(--r-sm);
  box-shadow: 5px 5px 0 rgba(112, 235, 148, 0.18);
}

.hitl-flow__item {
  border: 1px solid var(--ideals-grey-lm);
  border-radius: var(--r-sm);
}

.hitl-flow__item::before,
.expected-list__item::before {
  border-radius: var(--r-sm);
}

.primary-button,
.secondary-button {
  border-width: 2px;
  border-radius: var(--r-sm);
  box-shadow: 4px 4px 0 var(--ideals-jade);
  font-family: var(--font-system);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition-timing-function: var(--retro-step-ease);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ideals-jade);
}

.primary-button:active:not(:disabled),
.secondary-button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ideals-jade);
}

.journey-panel,
.evidence-board,
.decision-card,
.retest-card,
.summary-card {
  border: var(--retro-border);
  border-radius: var(--r-md);
  box-shadow: var(--retro-shadow-dark);
}

.journey__step {
  border: 2px solid var(--ideals-grey-lm);
  border-radius: var(--r-sm);
  box-shadow: 3px 3px 0 rgba(2, 46, 52, 0.08);
}

.journey__step.is-current {
  border-color: var(--ideals-jade);
  box-shadow: 4px 4px 0 var(--ideals-emerald);
}

.round-heading__signal {
  padding: var(--space-3) var(--space-4);
  background: var(--support-yellow-4);
  border: 1px solid var(--support-yellow-2);
  border-left-width: 5px;
}

.sheet-chip,
.status-chip {
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.evidence-card {
  border-width: 2px;
  border-radius: var(--r-sm);
  box-shadow: 3px 3px 0 rgba(2, 46, 52, 0.08);
}

.evidence-card.is-focused {
  box-shadow: 5px 5px 0 rgba(116, 127, 236, 0.24);
  transform: translate(-2px, -2px);
}

.checkpoint-track {
  gap: var(--space-1);
}

.checkpoint-track__segment {
  height: 9px;
  border: 1px solid var(--ideals-deep-green);
  border-radius: 0;
}

.option-button {
  border: 2px solid var(--ideals-grey-lm);
  border-radius: var(--r-sm);
  box-shadow: 4px 4px 0 rgba(2, 46, 52, 0.1);
}

.option-button:hover:not(:disabled) {
  border-color: var(--ideals-jade);
  box-shadow: 6px 6px 0 rgba(18, 105, 92, 0.2);
  transform: translate(-1px, -1px);
}

.option-button.is-selected,
.option-button.is-correct {
  border-color: var(--ideals-jade);
  box-shadow: var(--retro-shadow-green);
}

.option-button.is-wrong {
  border-color: var(--support-purple-1);
  box-shadow: 5px 5px 0 var(--support-purple-2);
}

.option-button__marker {
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
}

.feedback-panel,
.retest-result,
.why-card {
  border: 2px solid var(--ideals-jade);
  border-left-width: 6px;
  border-radius: var(--r-sm);
  box-shadow: 4px 4px 0 rgba(18, 105, 92, 0.16);
}

.feedback-panel--rewind {
  border-color: var(--support-purple-1);
  box-shadow: 4px 4px 0 var(--support-purple-3);
}

.loop-strip__item,
.retest-column,
.capability-card,
.roadmap-card {
  border: 2px solid var(--ideals-grey-lm);
  border-radius: var(--r-sm);
  box-shadow: 3px 3px 0 rgba(2, 46, 52, 0.08);
}

.loop-strip__item.is-active,
.loop-strip__item.is-complete {
  box-shadow: 4px 4px 0 var(--ideals-emerald);
}

.retest-card__header {
  border-bottom: 3px solid var(--ideals-emerald);
}

.retest-column--after {
  border-color: var(--ideals-jade);
  box-shadow: 4px 4px 0 var(--ideals-emerald);
}

.completion__hero {
  overflow: hidden;
}

.completion__hero::before {
  width: 52%;
  height: 100%;
  inset: 0 0 0 auto;
  background: url("assets/illustrations/quality_battle_arena.webp") center / cover no-repeat;
  border: 0;
  border-radius: 0;
  opacity: 0.13;
  animation: none;
}

.summary-area {
  border-top: 3px solid var(--ideals-emerald);
}

.capability-card {
  background: var(--ideals-light-green);
  border-color: var(--ideals-jade);
}

.summary-card__header {
  background: var(--ideals-grey-bg);
  border-bottom: 2px solid var(--ideals-deep-green);
}

.result-table th,
.result-table td {
  border-right: 1px solid var(--ideals-grey-light);
  border-bottom: 1px solid var(--ideals-grey-lm);
}

.result-table th {
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
}

.roadmap-card {
  border-top-width: 6px;
}

/* Carry the welcome screen's battle-console language through every phase. */
.journey-panel {
  padding: 0;
  overflow: hidden;
}

.journey-panel__header {
  padding: var(--space-5) var(--space-6);
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-bottom: 3px solid var(--ideals-emerald);
}

.journey-panel__header .eyebrow,
.journey-panel__header .journey-panel__note {
  color: var(--ideals-emerald);
}

.journey {
  margin: 0;
  padding: var(--space-5) var(--space-6) var(--space-6);
  background: var(--ideals-grey-bg);
}

.journey__step {
  animation-duration: 220ms;
  animation-timing-function: var(--retro-step-ease);
  animation-delay: calc(var(--step-index) * 55ms);
}

.journey__step.is-complete {
  background: var(--ideals-light-green);
  border-color: var(--ideals-jade);
}

.journey__step.is-current::after {
  animation-timing-function: var(--retro-step-ease);
}

.round-heading {
  align-items: center;
  padding: var(--space-5) var(--space-6);
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border: var(--retro-border);
  border-bottom: 4px solid var(--ideals-emerald);
  border-radius: var(--r-sm);
  box-shadow: var(--retro-shadow-dark);
}

.round-heading__week {
  color: var(--ideals-emerald);
}

.round-heading__title {
  color: var(--ideals-white);
}

.round-heading__signal {
  max-width: 620px;
  color: var(--ideals-deep-green);
  border: 2px solid var(--support-yellow-2);
  border-left-width: 6px;
  border-radius: var(--r-sm);
  box-shadow: 4px 4px 0 rgba(231, 196, 65, 0.22);
}

.evidence-board {
  padding: 0;
  overflow: hidden;
}

.board-heading {
  padding: var(--space-4) var(--space-5);
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-bottom: 3px solid var(--ideals-emerald);
}

.board-heading__title {
  color: var(--ideals-white);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.board-heading .sheet-chip {
  color: var(--ideals-deep-green);
  background: var(--ideals-emerald);
  border-color: var(--ideals-emerald);
}

.evidence-stack {
  margin-top: 0;
  padding: var(--space-5);
  background: var(--ideals-grey-bg);
}

.evidence-card {
  transition-duration: 90ms;
  transition-timing-function: var(--retro-step-ease);
}

.evidence-card__label {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid currentColor;
}

.expected-list__item::before {
  border: 1px solid var(--support-yellow-1);
  box-shadow: 2px 2px 0 rgba(198, 161, 21, 0.22);
}

.decision-card {
  min-height: 620px;
  padding: 0;
  overflow: hidden;
}

.checkpoint-header {
  padding: var(--space-4) var(--space-5) var(--space-2);
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
}

.checkpoint-header__count {
  color: rgba(255, 255, 255, 0.72);
}

.checkpoint-header__field {
  color: var(--ideals-emerald);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.checkpoint-track {
  margin: 0;
  padding: 0 var(--space-5) var(--space-4);
  background: var(--ideals-deep-green);
  border-bottom: 3px solid var(--ideals-emerald);
}

.checkpoint-track__segment {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
}

.checkpoint-track__segment.is-complete {
  background: var(--ideals-jade);
  border-color: var(--ideals-emerald);
}

.checkpoint-track__segment.is-current {
  background: var(--ideals-emerald);
  border-color: var(--ideals-white);
}

.decision-card__question,
.decision-card__helper,
.option-list,
.feedback-panel {
  margin-right: var(--space-6);
  margin-left: var(--space-6);
}

.decision-card__question {
  margin-top: var(--space-6);
}

.option-button {
  transition-duration: 90ms;
  transition-timing-function: var(--retro-step-ease);
}

.option-button__marker {
  font-family: var(--font-system);
  box-shadow: 2px 2px 0 rgba(2, 46, 52, 0.1);
}

.option-button:active:not(:disabled) {
  box-shadow: 1px 1px 0 rgba(2, 46, 52, 0.1);
  transform: translate(3px, 3px);
}

.feedback-panel {
  animation: feedback-enter 180ms var(--retro-step-ease) both;
}

.feedback-panel__title {
  font-family: var(--font-system);
}

.decision-actions {
  margin-top: auto;
  padding: var(--space-5) var(--space-6);
  background: var(--ideals-grey-bg);
  border-top: 2px solid var(--ideals-deep-green);
}

.decision-actions__status {
  font-family: var(--font-system);
  font-size: var(--fs-caption);
  letter-spacing: var(--tracking-wide);
}

.loop-strip {
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--ideals-deep-green);
  border: var(--retro-border);
  border-bottom: 4px solid var(--ideals-emerald);
  border-radius: var(--r-sm);
  box-shadow: var(--retro-shadow-dark);
}

.loop-strip__item {
  min-height: 68px;
  background: var(--ideals-grey-bg);
}

.loop-strip__item.is-active {
  border-color: var(--ideals-emerald);
}

.loop-strip__week {
  font-family: var(--font-system);
  letter-spacing: var(--tracking-wide);
}

.retest-card__header .eyebrow {
  font-family: var(--font-system);
}

.retest-grid {
  background: var(--ideals-grey-bg);
}

.retest-column__title {
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--ideals-deep-green);
}

.retest-actions {
  padding-top: var(--space-5);
  background: var(--ideals-grey-bg);
  border-top: 2px solid var(--ideals-deep-green);
}

.status-chip--retested {
  animation-timing-function: var(--retro-step-ease);
}

.completion__hero {
  border-bottom: 3px solid var(--ideals-emerald);
}

.summary-area {
  background: var(--ideals-grey-bg);
}

.capability-card__status {
  display: inline-flex;
  padding: var(--space-1) var(--space-2);
  color: var(--ideals-deep-green);
  background: var(--ideals-emerald);
  border: 1px solid var(--ideals-jade);
  border-radius: var(--r-sm);
}

.capability-card__name {
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--ideals-jade);
}

.summary-card__header {
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-bottom: 3px solid var(--ideals-emerald);
}

.summary-card__header .eyebrow {
  color: var(--ideals-emerald);
}

.summary-card__header .summary-card__title {
  color: var(--ideals-white);
}

.summary-card__copy {
  color: rgba(255, 255, 255, 0.76);
}

.result-table tbody tr:nth-child(even) {
  background: var(--ideals-grey-bg);
}

.summary-actions {
  background: var(--ideals-grey-bg);
  border-top: 2px solid var(--ideals-deep-green);
}

.roadmap-card__step {
  display: inline-flex;
  padding: var(--space-1) var(--space-2);
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border-radius: var(--r-sm);
}

.roadmap-card__title {
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--ideals-deep-green);
}

.why-card__title {
  font-family: var(--font-system);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.footer {
  border-top: 3px solid var(--ideals-deep-green);
}

@media (min-width: 1700px) {
  .round-grid {
    grid-template-columns: minmax(680px, 1.08fr) minmax(620px, 0.92fr);
  }

  .evidence-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .evidence-card--input {
    grid-column: 1;
    grid-row: 1;
  }

  .evidence-card--actual {
    grid-column: 2;
    grid-row: 1;
  }

  .evidence-card--expected,
  .evidence-card--human {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1040px) {
  .welcome-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .welcome-objective {
    grid-template-columns: 1fr;
  }

  .welcome-objective__signals {
    justify-content: flex-start;
  }

  .intro-hero__inner,
  .round-grid,
  .victory-panel {
    grid-template-columns: 1fr;
  }

  .victory-panel__copy {
    border-right: 0;
    border-bottom: 2px solid var(--ideals-emerald);
  }

  .victory-tableau {
    grid-template-rows: auto auto;
  }

  .victory-tableau__image {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }

  .workflow-card {
    align-self: stretch;
  }

  .round-heading {
    align-items: start;
    flex-direction: column;
  }

  .round-heading__signal {
    max-width: none;
  }

  .decision-card {
    min-height: 0;
  }

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

@media (max-width: 820px) {
  .welcome-arena__caption {
    grid-template-columns: 1fr;
  }

  .mission-bar__inner {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding-block: var(--space-3);
  }

  .journey {
    grid-template-columns: repeat(4, 1fr);
  }

  .journey__step {
    min-height: 90px;
  }

  .loop-strip,
  .roadmap-grid,
  .retest-grid {
    grid-template-columns: 1fr;
  }

  .summary-card__header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .welcome-hero {
    padding: var(--space-5);
  }

  .victory-screen {
    min-height: 0;
  }

  .victory-panel__copy {
    padding: var(--space-5);
  }

  .victory-panel__title {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
  }

  .victory-panel__intro {
    font-size: var(--fs-body);
  }

  .vigilance-card {
    padding: var(--space-4);
  }

  .victory-tableau__caption {
    grid-template-columns: 1fr;
  }

  .victory-tableau__caption span:last-child {
    text-align: left;
  }

  .welcome-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .welcome-hero__actions .time-note {
    text-align: left;
  }

  .welcome-objective {
    padding: var(--space-5);
  }

  .topbar__inner,
  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: var(--space-4);
  }

  .utility-controls {
    width: 100%;
  }

  .track-credit {
    width: 100%;
    margin-left: 0;
  }

  .footer__copy {
    text-align: left;
  }

  .utility-button {
    flex: 1;
  }

  .brand-lockup__divider,
  .brand-lockup__title {
    display: none;
  }

  .journey-panel__header,
  .decision-actions,
  .retest-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .journey-panel__note {
    text-align: left;
  }

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

  .intro-hero__inner {
    padding: var(--space-5);
  }

  .journey-panel,
  .decision-card,
  .evidence-board {
    padding: 0;
  }

  .journey-panel__header,
  .journey {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  .round-heading {
    padding: var(--space-4);
  }

  .checkpoint-header,
  .checkpoint-track {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  .decision-card__question,
  .decision-card__helper,
  .option-list,
  .feedback-panel {
    margin-right: var(--space-4);
    margin-left: var(--space-4);
  }

  .decision-actions {
    padding: var(--space-4);
  }

  .intro-hero__actions,
  .summary-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .mission-bar__meta {
    flex-direction: column;
    gap: var(--space-1);
  }
}

/*
 * Live battle actors
 * Real generated raster sprites extend the welcome-screen battle language into
 * evaluation, feedback, retest, and case-to-case progression.
 */
.battle-stage {
  position: fixed;
  z-index: 14;
  inset: 0;
  pointer-events: none;
}

.battle-actor {
  position: fixed;
  top: clamp(280px, 47vh, 520px);
  width: clamp(104px, 9vw, 150px);
  margin: 0;
  filter: drop-shadow(6px 7px 0 rgba(0, 35, 37, 0.22));
  transform-origin: 50% 82%;
}

.battle-actor--champion {
  left: clamp(8px, 1.2vw, 26px);
}

.battle-actor--reality {
  right: clamp(8px, 1.2vw, 26px);
  width: clamp(118px, 10vw, 168px);
}

.battle-actor__sprite {
  width: 100%;
  height: clamp(158px, 17vh, 220px);
  object-fit: contain;
  image-rendering: pixelated;
}

.battle-actor__label {
  width: fit-content;
  margin: var(--space-2) auto 0;
  padding: 5px 8px;
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border: 2px solid var(--ideals-emerald);
  box-shadow: 3px 3px 0 var(--ideals-jade);
  font-family: var(--font-system);
  font-size: 0.625rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.case-path {
  --case-progress: 0%;
  grid-column: 1 / -1;
  position: relative;
  width: 100%;
  padding: 8px 12px 10px;
  background: var(--ideals-white);
  border-top: 2px solid var(--ideals-emerald);
}

.case-path__label {
  color: var(--ideals-jade);
  font-family: var(--font-system);
  font-size: 0.625rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.case-path__track {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 22px 0;
}

.case-path__track::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: 9px;
  left: 9px;
  height: 6px;
  background: var(--ideals-grey-light);
  border: 2px solid var(--ideals-deep-green);
}

.case-path__checkpoint {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--ideals-deep-green);
  background: var(--ideals-white);
  border: 2px solid var(--ideals-deep-green);
  font-family: var(--font-system);
  font-size: 0.625rem;
  font-weight: var(--weight-semibold);
}

.case-path__checkpoint.is-reached {
  background: var(--ideals-emerald);
}

.case-path__runner {
  position: absolute;
  z-index: 2;
  bottom: 1px;
  left: var(--case-progress);
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(3px 3px 0 rgba(0, 35, 37, 0.2));
  image-rendering: pixelated;
  transform: translateX(-50%);
  transition: left 860ms steps(8, end);
}

.case-path.is-advancing .case-path__runner {
  animation: case-run-bob 180ms steps(2, end) infinite;
}

.battle-actor--champion.is-celebrating {
  animation: champion-victory 720ms steps(4, end);
}

.battle-actor--champion.is-bracing {
  animation: champion-brace 540ms steps(3, end);
}

.battle-actor--champion.is-advancing {
  animation: champion-run 180ms steps(2, end) infinite;
}

.battle-actor--reality.is-attacking {
  animation: reality-attack 700ms steps(5, end);
}

.battle-actor--reality.is-stunned {
  animation: reality-stunned 720ms steps(4, end);
}

.battle-feedback-flash {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.battle-feedback-flash__message {
  padding: 10px 14px;
  color: var(--ideals-white);
  background: var(--ideals-deep-green);
  border: 3px solid currentColor;
  box-shadow: 7px 7px 0 rgba(0, 35, 37, 0.34);
  font-family: var(--font-system);
  font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.battle-feedback-flash.is-success {
  background: rgba(112, 235, 148, 0.13);
  box-shadow: inset 0 0 0 8px var(--ideals-emerald);
  animation: success-screen 700ms steps(4, end);
}

.battle-feedback-flash.is-success .battle-feedback-flash__message {
  color: var(--ideals-emerald);
}

.battle-feedback-flash.is-warning {
  background: rgba(116, 127, 236, 0.14);
  box-shadow: inset 0 0 0 8px var(--support-purple-1);
  animation: warning-screen 620ms steps(4, end);
}

.battle-feedback-flash.is-warning .battle-feedback-flash__message {
  color: var(--support-purple-2);
}

@keyframes champion-victory {
  0%,
  100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-22px) scale(1.08); }
  70% { transform: translateY(-8px) scale(1.04); }
}

@keyframes champion-brace {
  0%,
  100% { transform: translateX(0); }
  35% { transform: translateX(-8px) rotate(-2deg); }
  60% { transform: translateX(3px) rotate(1deg); }
}

@keyframes champion-run {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes case-run-bob {
  0%,
  100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}

@keyframes reality-attack {
  0%,
  100% { transform: translateX(0) scale(1); }
  35% { transform: translateX(-28px) scale(1.08); }
  60% { transform: translateX(-12px) scale(1.04); }
}

@keyframes reality-stunned {
  0%,
  100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(8px, -6px) rotate(3deg); }
  50% { transform: translate(-5px, 3px) rotate(-2deg); }
  75% { transform: translate(4px, -2px) rotate(1deg); }
}

@keyframes success-screen {
  0% { opacity: 0; }
  20%,
  70% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes warning-screen {
  0% { opacity: 0; transform: translateX(0); }
  20% { opacity: 1; transform: translateX(-5px); }
  35% { transform: translateX(5px); }
  50% { transform: translateX(-3px); }
  70% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; }
}

@media (min-width: 1160px) {
  body.battle-space-active #gameRoot > .container {
    padding-right: clamp(138px, 11vw, 190px);
    padding-left: clamp(138px, 11vw, 190px);
  }

}

@media (max-width: 1159px) {
  .battle-stage {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .battle-feedback-flash.is-success,
  .battle-feedback-flash.is-warning {
    opacity: 1;
  }
}

@media (forced-colors: active) {
  .welcome-hero,
  .welcome-arena,
  .welcome-objective,
  .evidence-card,
  .option-button,
  .journey__step,
  .capability-card,
  .roadmap-card {
    border: 1px solid CanvasText;
  }

  .progress-track__fill,
  .journey__step::after {
    background: Highlight;
  }

  .battle-actor__label,
  .case-path,
  .case-path__checkpoint,
  .battle-feedback-flash__message {
    border: 1px solid CanvasText;
  }
}
