:root {
  --ink: #142d39;
  --ink-soft: #35515c;
  --muted: #526971;
  --paper: #f4f7f5;
  --white: #ffffff;
  --line: #d8e1df;
  --line-dark: #809597;
  --purple: #7652c7;
  --purple-dark: #52339e;
  --purple-soft: #eee9fa;
  --teal: #07988f;
  --teal-dark: #08726d;
  --teal-soft: #e3f5f2;
  --gold: #9b6910;
  --gold-soft: #fff3d6;
  --orange: #bd5b13;
  --orange-soft: #fff0df;
  --green: #15734d;
  --green-soft: #e5f6ed;
  --red: #d9414b;
  --red-dark: #a92331;
  --red-soft: #fde8ea;
  --shadow: 0 22px 60px rgba(19, 45, 57, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 89% 8%, rgba(118, 82, 199, 0.09), transparent 29rem),
    linear-gradient(180deg, #f9fbfa 0, var(--paper) 30rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
}

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

.site-header {
  width: min(1240px, calc(100% - 3rem));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.noscript-message {
  width: min(1240px, calc(100% - 3rem));
  margin: 1rem auto;
  padding: 0.85rem 1rem;
  border: 1px solid var(--red);
  border-radius: 10px;
  color: var(--red-dark);
  background: var(--red-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 820;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  transform: rotate(-17deg);
  border: 3px solid var(--purple);
  border-radius: 50%;
}

.brand-mark i {
  width: 7px;
  height: 17px;
  border-radius: 99px;
  background: var(--teal);
}

.draft-pill {
  padding: 0.42rem 0.7rem;
  border: 1px solid #d8d0ee;
  border-radius: 999px;
  color: var(--purple-dark);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

main {
  width: min(1240px, calc(100% - 3rem));
  margin: 0 auto;
}

.intro {
  min-height: 160px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.84fr);
  align-items: center;
  gap: 4rem;
  padding: 2rem 2.1rem 1.8rem;
}

.eyebrow,
.phase-name {
  margin: 0 0 0.48rem;
  color: var(--teal-dark);
  font-size: 0.66rem;
  font-weight: 880;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4.1vw, 4.3rem);
  line-height: 0.97;
  letter-spacing: -0.065em;
}

h1 span {
  color: var(--teal);
}

.intro-copy {
  max-width: 520px;
  margin: 1.2rem 0 0 auto;
  color: var(--ink-soft);
  font-size: clamp(0.94rem, 1.25vw, 1.08rem);
  line-height: 1.62;
}

.intro-copy strong {
  color: var(--ink);
}

.simulation-card {
  overflow: hidden;
  border: 1px solid rgba(174, 191, 189, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.simulation-header {
  min-height: 122px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 1.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.status-copy {
  min-width: 0;
  block-size: 8.5rem;
  display: grid;
  grid-template-rows: 1rem 4.35rem 2.75rem;
  align-content: center;
  row-gap: 0.2rem;
  overflow: clip;
}

.status-copy .phase-name {
  align-self: end;
  margin: 0;
}

.status-copy h2 {
  min-width: 0;
  margin: 0;
  align-self: center;
  font-size: clamp(1.38rem, 2.1vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.status-copy > p:last-child {
  min-width: 0;
  max-width: 720px;
  margin: 0;
  align-self: start;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf9;
}

.simulation-readouts {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.playback-controls {
  position: absolute;
  z-index: 4;
  top: 9%;
  left: 5%;
  width: 20.833333%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.26rem;
}

.playback-controls[hidden] {
  display: none;
}

.playback-caption {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 880;
  letter-spacing: 0.11em;
  line-height: 1;
  text-align: center;
}

.transport-buttons {
  display: grid;
  grid-template-columns: 1.16fr 0.92fr 0.72fr;
  gap: 0.22rem;
}

.playback-toggle,
.replay-button,
.new-run-button {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  padding: 0 0.35rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 850;
}

.playback-toggle {
  border: 1px solid var(--purple-dark);
  color: #fff;
  background: var(--purple-dark);
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.replay-button,
.new-run-button {
  border: 1px solid var(--line-dark);
  color: var(--ink-soft);
  background: #fff;
  font-size: 0.62rem;
}

.replay-button:hover,
.new-run-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.replay-button:focus-visible,
.new-run-button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.playback-toggle[data-playing="false"] {
  color: var(--purple-dark);
  background: var(--purple-soft);
}

.playback-toggle[data-complete="true"] {
  cursor: default;
  opacity: 0.72;
}

.playback-toggle:hover {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.playback-toggle:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.speed-control {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.speed-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: #fff;
}

.speed-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.speed-options input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.speed-options label > span:first-of-type {
  min-height: 27px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.speed-options label + label > span:first-of-type {
  border-left: 1px solid var(--line);
}

.speed-options input:hover + span {
  color: var(--purple-dark);
  background: var(--purple-soft);
}

.speed-options input:focus-visible + span {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--purple);
  outline-offset: -2px;
}

.speed-options input:checked + span {
  color: #fff;
  background: var(--purple-dark);
}

.scrubber-control {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.scrubber-control span {
  white-space: nowrap;
}

.scrubber-control input {
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: var(--purple-dark);
  cursor: ew-resize;
}

.scrubber-control input:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.metrics div {
  min-width: 0;
  padding: 0.78rem 0.7rem 0.72rem;
  text-align: center;
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics span {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 860;
  line-height: 1;
}

.metrics small {
  display: block;
  margin-top: 0.3rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 790;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.simulation-stage {
  position: relative;
  padding: 0.7rem 1.45rem 0.55rem;
  background:
    linear-gradient(180deg, rgba(118, 82, 199, 0.018), rgba(7, 152, 143, 0.03)),
    #fcfdfd;
}

.simulation-canvas {
  position: relative;
  width: 100%;
}

.simulation-canvas svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.stage-label {
  position: absolute;
  z-index: 3;
  top: 1.15rem;
  left: 1.65rem;
  display: flex;
  flex-direction: column;
  color: var(--ink-soft);
  pointer-events: none;
}

.stage-label span {
  font-size: 0.6rem;
  font-weight: 880;
  letter-spacing: 0.12em;
}

.stage-label small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.58rem;
}

.simulation-note {
  position: absolute;
  right: 1.7rem;
  bottom: 0.75rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 710;
  letter-spacing: 0.025em;
}

.simulation-note > span:first-child {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(7, 152, 143, 0.1);
}

#simulation-note-copy {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  border-top: 1px solid var(--line);
  background: #fff;
}

.answer-revealing.is-concealed,
.answer-revealing[hidden] {
  display: none;
}

.legend > div {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
}

.legend > div + div {
  border-left: 1px solid var(--line);
}

.legend span {
  min-width: 0;
}

.legend strong,
.legend small {
  display: block;
}

.legend strong {
  font-size: 0.75rem;
}

.legend small {
  margin-top: 0.13rem;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.25;
}

.legend i {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 26px;
  display: block;
  font-style: normal;
}

.legend-mcm b {
  position: absolute;
  top: 5px;
  width: 17px;
  height: 17px;
  border: 4px double var(--purple);
  border-radius: 50%;
  background: var(--white);
}

.legend-mcm b:first-child { left: 3px; }
.legend-mcm b:last-child { right: 3px; }

.legend-cmg::before,
.legend-stall::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 17px;
  height: 17px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: var(--white);
}

.legend-cmg::after,
.legend-stall::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 23px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 12px solid var(--gold);
}

.legend-copy b {
  position: absolute;
  right: 1px;
  left: 1px;
  height: 4px;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--purple), var(--teal));
}

.legend-copy b:first-child { top: 7px; }
.legend-copy b:last-child { top: 17px; }

.legend-passive {
  display: grid !important;
  place-items: center;
  color: var(--ink-soft);
  font-size: 1.65rem;
  font-weight: 400;
}

.legend-stall::before {
  border: 3px solid var(--red);
}

.legend-stall::after {
  border-left-color: var(--red);
}

.legend-fire::before,
.legend-termination::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 11px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.legend-termination::before {
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.detective-challenge {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid #d8d0ee;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(238, 233, 250, 0.78), rgba(255, 255, 255, 0.94));
}

.detective-challenge[hidden] {
  display: none;
}

.detective-challenge h2 {
  margin-bottom: 0.45rem;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.detective-intro > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.consent-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d8d0ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.consent-gate[hidden] {
  display: none;
}

.consent-copy h3 {
  margin: 0 0 0.28rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.consent-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.consent-copy p + p {
  margin-top: 0.28rem;
  color: var(--muted);
  font-weight: 700;
}

.consent-gate button {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--purple-dark);
  border-radius: 9px;
  color: #fff;
  background: var(--purple-dark);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 840;
  white-space: nowrap;
}

.consent-gate button:hover {
  border-color: var(--purple);
  background: var(--purple);
}

.consent-gate button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.detective-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.65rem;
}

.detective-grid[hidden] {
  display: none;
}

.detective-question {
  position: relative;
  display: grid;
  grid-template-rows: minmax(3.9rem, auto) auto 6rem 6.5rem auto;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(20, 45, 57, 0.04);
  transition: border-color 140ms linear, background-color 140ms linear, box-shadow 140ms linear;
}

.question-heading {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  padding-right: 4.3rem;
}

.question-heading h3 {
  margin: 0.38rem 0 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.question-state {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.22rem 0.38rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.question-prompt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 820;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.detective-question textarea {
  width: 100%;
  height: 6rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 0.74rem;
  line-height: 1.35;
  resize: none;
}

.detective-question textarea:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.detective-question textarea[readonly] {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
}

.question-feedback {
  height: 6.5rem;
  margin: 0;
  overflow: auto;
  color: var(--ink-soft);
  font-size: 0.71rem;
  font-weight: 590;
  line-height: 1.42;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}

.detective-question button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--purple-dark);
  border-radius: 9px;
  color: #fff;
  background: var(--purple-dark);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 840;
}

.detective-question button:hover:not([aria-disabled="true"]) {
  border-color: var(--purple);
  background: var(--purple);
}

.detective-question button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.detective-question[data-state="loading"] button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.82;
}

.detective-question[data-state="partial"] {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 0 0 1px rgba(189, 91, 19, 0.12);
}

.detective-question[data-state="partial"] .question-state,
.detective-question[data-state="partial"] .question-feedback {
  color: var(--orange);
}

.detective-question[data-state="supported"] {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 1px rgba(21, 115, 77, 0.12);
}

.detective-question[data-state="supported"] .question-state,
.detective-question[data-state="supported"] .question-feedback {
  color: var(--green);
}

.detective-question[data-state="supported"] button {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  cursor: default;
}

.detective-question[data-state="revise"] {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.detective-question[data-state="revise"] .question-state,
.detective-question[data-state="revise"] .question-feedback {
  color: var(--purple-dark);
}

.detective-question[data-state="unavailable"] {
  border-color: #d6b15e;
  background: var(--gold-soft);
}

.detective-question[data-state="unavailable"] .question-state,
.detective-question[data-state="unavailable"] .question-feedback {
  color: var(--gold);
}

.computing-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.computing-indicator i {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: feedback-spin 0.72s linear infinite;
}

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

.mystery-symbol {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
}

.mystery-symbol.passive {
  color: #70868c;
  font-size: 1.8rem;
  font-weight: 430;
}

.mystery-symbol.stall {
  position: relative;
}

.mystery-symbol.stall::before {
  content: "";
  position: absolute;
  left: 2px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--red);
  border-radius: 50%;
  background: #fff;
}

.mystery-symbol.stall::after {
  content: "";
  position: absolute;
  left: 19px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 11px solid var(--red);
}

.mystery-symbol.stall i {
  position: absolute;
  right: -4px;
  width: 7px;
  height: 20px;
  border-right: 3px solid var(--red-dark);
  border-left: 3px solid var(--red-dark);
  display: none;
}

.detective-question[data-state="supported"] .mystery-symbol.stall i {
  display: block;
}

.mystery-symbol.initiation i,
.mystery-symbol.termination i {
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.mystery-symbol.termination i {
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.mechanism-strip {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-mode="replication-detective"] .mechanism-strip {
  display: none;
}

.mechanism-strip h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.mechanism-strip ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
}

.mechanism-strip li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.9rem;
  border-left: 1px solid var(--line);
  opacity: 0.45;
  transition: opacity 160ms linear, transform 160ms linear;
}

.mechanism-strip li.is-current {
  transform: translateY(-2px);
  opacity: 1;
}

.mechanism-strip li.is-past {
  opacity: 0.72;
}

.mechanism-strip li b {
  color: var(--purple);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.mechanism-strip li span,
.mechanism-strip li strong {
  display: block;
}

.mechanism-strip li strong {
  margin-bottom: 0.14rem;
  font-size: 0.72rem;
}

.mechanism-strip li span {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
}

footer {
  padding: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.67rem;
}

footer p {
  margin-bottom: 0;
}

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

/* SVG */
#replication-svg * {
  vector-effect: non-scaling-stroke;
}

.svg-panel {
  fill: #fff;
  stroke: var(--line);
  stroke-width: 1;
}

.activity-plot-bg {
  fill: #fbfafe;
  stroke: #e1dcef;
  stroke-width: 1;
}

.kymograph-bg {
  fill: #fbfdfc;
  stroke: #e0e8e6;
  stroke-width: 1;
}

.column-divider {
  stroke: #d8e1df;
  stroke-width: 1;
}

.control-bay-divider {
  stroke: #dfe7e5;
  stroke-dasharray: 3 5;
  stroke-width: 1;
}

.svg-section-label {
  fill: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.7px;
}

.svg-axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.activity-axis {
  stroke: #8da0a6;
  stroke-width: 1.25;
}

.activity-axis-number,
.activity-time-number {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.activity-axis-title {
  fill: var(--muted);
  font-size: 9.5px;
  font-weight: 820;
  letter-spacing: 0.75px;
}

.activity-time-label {
  fill: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 1.3px;
}

.activity-time-grid,
.molecule-time-grid {
  stroke: #dfe7e5;
  stroke-width: 1;
}

.activity-time-grid {
  stroke: #ddd7ec;
}

.molecule-time-grid {
  opacity: 0.58;
}

.activity-key {
  stroke-linecap: round;
  stroke-width: 3;
}

.activity-key.licensing,
.activity-curve.activity-licensing,
.activity-value-guide.licensing {
  stroke: var(--purple);
}

.activity-key.initiation,
.activity-curve.activity-initiation,
.activity-value-guide.initiation {
  stroke: var(--gold);
}

.activity-key-label {
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.55px;
}

.activity-key-label.licensing {
  fill: var(--purple-dark);
}

.activity-key-label.initiation {
  fill: #9b6910;
}

.activity-curve {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-curve.is-future {
  opacity: 0.22;
  stroke-width: 3;
}

.activity-curve.is-past {
  stroke-width: 4;
}

.activity-value-guide {
  opacity: 0.24;
  stroke-dasharray: 2 3;
  stroke-width: 1.5;
}

.activity-dot {
  fill: #fff;
  stroke-width: 2.5;
}

.activity-dot.licensing {
  stroke: var(--purple);
}

.activity-dot.initiation {
  stroke: var(--gold);
}

.dna-template {
  fill: none;
  stroke: #49616a;
  stroke-linecap: round;
  stroke-width: 5;
}

.dna-template-highlight {
  fill: none;
  stroke: #d8e2e1;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.origin-guide {
  stroke: #dce5e3;
  stroke-dasharray: 2 6;
  stroke-width: 1;
}

.origin-tick {
  fill: #fff;
  stroke: #90a3a8;
  stroke-width: 1.5;
}

.origin-tick.unlicensed,
.origin-tick.replicated-unlicensed,
.origin-tick.not-licensed {
  fill: #fff;
  stroke: #aebfbd;
  stroke-dasharray: 2 2;
  opacity: 0.58;
}

.origin-tick.loaded {
  fill: var(--purple-soft);
  stroke: var(--purple);
}

.origin-tick.fired {
  fill: var(--gold-soft);
  stroke: var(--gold);
}

.origin-tick.passive {
  fill: #eef2f2;
  stroke: #809399;
}

.origin-id {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 790;
  text-anchor: middle;
}

.bubble-fill {
  fill: rgba(7, 152, 143, 0.12);
  stroke: none;
}

.daughter-track {
  fill: none;
  stroke: url(#daughter-gradient);
  stroke-linecap: round;
  stroke-width: 5;
}

.mcm-ring {
  fill: #fff;
  stroke: var(--purple);
  stroke-width: 4;
}

.mcm-core {
  fill: var(--purple-soft);
  stroke: var(--purple-dark);
  stroke-width: 1;
}

.mcm-label {
  fill: var(--purple-dark);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-anchor: middle;
}

.cmg-body {
  fill: #fff8e7;
  stroke: var(--gold);
  stroke-width: 3;
}

.cmg-arrow {
  fill: var(--gold);
}

.cmg-body.stalled {
  fill: var(--red-soft);
  stroke: var(--red);
}

.cmg-arrow.stalled {
  fill: var(--red);
}

.stall-bars {
  stroke: var(--red-dark);
  stroke-linecap: round;
  stroke-width: 3;
}

.event-pulse {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
}

.passive-cross {
  fill: var(--white);
  stroke: #70868c;
  stroke-width: 2;
}

.passive-cross-line {
  stroke: #70868c;
  stroke-width: 2;
}

.passive-capture-pulse {
  fill: none;
  stroke: #70868c;
  stroke-width: 2;
}

@media (prefers-reduced-motion: reduce) {
  .computing-indicator i {
    animation: none;
  }
}

.kymo-fill {
  fill: rgba(7, 152, 143, 0.1);
  stroke: none;
}

.mcm-trace {
  fill: none;
  stroke: var(--purple);
  stroke-linecap: round;
  stroke-width: 5;
}

.mcm-load-dot {
  fill: #fff;
  stroke: var(--purple);
  stroke-width: 2;
}

.fork-trace {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-width: 3.5;
}

.fork-trace.stalled,
.stall-trace {
  stroke: var(--red);
  stroke-width: 4;
}

.stall-dot {
  fill: var(--red);
  stroke: #fff;
  stroke-width: 2;
}

.fire-dot {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 2;
}

.termination-dot {
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 2;
}

.time-cursor {
  stroke: var(--ink);
  stroke-width: 1.5;
}

.time-cursor-pill {
  fill: var(--ink);
}

.time-cursor-text {
  fill: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-anchor: middle;
}

@media (max-width: 1100px) {
  .detective-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-inline: 0.5rem;
  }

  .intro-copy {
    margin-left: 0;
  }

  .simulation-header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mechanism-strip,
  .detective-challenge {
    grid-template-columns: 1fr;
  }

  .mechanism-strip ol {
    border-top: 1px solid var(--line);
    padding-top: 0.8rem;
  }

  .legend {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header,
  main {
    width: min(100% - 1.2rem, 1240px);
  }

  .draft-pill {
    display: none;
  }

  .intro {
    min-height: 190px;
    padding-block: 1.4rem;
  }

  .simulation-header {
    padding: 1rem;
  }

  .status-copy {
    block-size: 11.25rem;
    grid-template-rows: 1rem 4.3rem 5.55rem;
  }

  .status-copy h2 {
    font-size: clamp(1.28rem, 6.2vw, 1.55rem);
  }

  .metrics small {
    font-size: 0.56rem;
  }

  .simulation-stage {
    padding-inline: 0.25rem;
    overflow-x: auto;
  }

  .simulation-canvas {
    width: 820px;
    max-width: none;
  }

  .stage-label {
    left: 0.8rem;
  }

  .simulation-note {
    display: none;
  }

  .mechanism-strip ol {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.8rem;
  }

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

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

  .consent-gate button {
    width: 100%;
  }

  .mechanism-strip li:nth-child(3) {
    border-left: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
