.model-stage {
  display: grid;
  place-items: center;
  width: 100%;
  background: #fff;
  position: relative;
}
.model-figure[data-model-state="live"] .model-stage,
.model-figure[data-model-state="loading"] .model-stage {
  aspect-ratio: 3 / 2;
}
.model-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
}
.model-canvas:active { cursor: grabbing; }
.model-landmark {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  border-radius: 50%;
  background: var(--teal-dark);
  box-shadow: 0 0 0 1px var(--teal-dark);
  --leader: clamp(15px, 2.3vw, 36px);
}
.model-landmark::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: var(--leader);
  border-top: 1px solid var(--teal-dark);
}
.model-landmark > span {
  position: absolute;
  left: calc(100% + var(--leader));
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  max-width: min(27vw, 9.5rem);
  padding: .28em .52em;
  background: rgba(255,255,255,.95);
  border: 1px solid #b4cac5;
  border-radius: .2rem;
  color: var(--teal-dark);
  font: 600 .75rem/1.24 var(--sans, sans-serif);
}
.model-landmark[data-side="left"]::before { left: auto; right: 100%; }
.model-landmark[data-side="left"] > span { left: auto; right: calc(100% + var(--leader)); }
.model-pending, .model-instructions {
  color: var(--muted, #48605e);
  font-size: .82rem;
  line-height: 1.45;
}
.model-tools { padding: .25rem 0 1rem; }
.model-chapter, .model-chapter-heading, .model-transport { display: flex; align-items: center; }
.model-chapter {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--rule, #c8d2c9);
}
.model-chapter-heading { flex: 1 1 12rem; gap: .7rem; }
.model-chapter-count {
  color: var(--teal, #115d58);
  font: 600 .72rem/1 var(--sans, Arial, sans-serif);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.model-chapter-title {
  margin: 0;
  color: var(--ink, #112e31);
  font: 400 clamp(1.2rem, 1.65vw, 1.55rem)/1.12 var(--serif, Georgia, serif);
  letter-spacing: -.025em;
}
.model-chapter-copy {
  max-width: 68ch;
  min-height: 2.8em;
  margin: .4rem 0 0;
  color: var(--body, #30494c);
  font: 400 .88rem/1.4 var(--sans, Arial, sans-serif);
}
.model-transport { flex: none; gap: .15rem; }
.model-tools .model-transport button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 2px;
}
.model-transport button:disabled { cursor: default; opacity: .42; }
.model-tools .model-transport [data-tour="play"] {
  display: inline-flex;
  gap: .5em;
  align-items: center;
  justify-content: center;
  min-width: 4.6rem;
  padding: .35rem .65rem;
  border-color: var(--rule, #c8d2c9);
  color: var(--teal-dark, #0c4845);
}
.model-transport [data-tour="play"] span:first-child { font: 700 .78em/1 Arial, sans-serif; }
.model-tools .model-transport [data-tour="previous"], .model-tools .model-transport [data-tour="next"] {
  padding: 0 .43rem .08rem;
  font: 400 1.55rem/1 var(--sans, Arial, sans-serif);
}
.model-timeline { margin: .5rem 0 .55rem; border-bottom: 1px solid var(--rule, #c8d2c9); }
.model-scrubber {
  --track-fill: 0%;
  display: block;
  appearance: none;
  width: calc(75% + 16px);
  height: 28px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  accent-color: var(--teal, #115d58);
  touch-action: pan-y;
}
.model-scrubber::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(to right, var(--teal, #115d58) var(--track-fill), var(--rule, #c8d2c9) var(--track-fill));
}
.model-scrubber::-moz-range-track { height: 3px; background: var(--rule, #c8d2c9); }
.model-scrubber::-moz-range-progress { height: 3px; background: var(--teal, #115d58); }
.model-scrubber::-webkit-slider-thumb {
  appearance: none;
  width: 16px; height: 16px;
  margin-top: -6.5px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--teal, #115d58);
  box-shadow: 0 0 0 1px var(--teal, #115d58);
}
.model-scrubber::-moz-range-thumb {
  box-sizing: border-box;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--teal, #115d58);
  box-shadow: 0 0 0 1px var(--teal, #115d58);
}
.model-stops { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.model-tools .model-stops button {
  border: 0;
  min-width: 0;
  min-height: 30px;
  padding: .1rem .12rem .4rem;
  color: var(--muted, #48605e);
  font-size: .78rem;
  overflow-wrap: anywhere;
}
.model-tools .model-stops [aria-current="step"] {
  color: var(--teal-dark, #0c4845);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.model-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem 1rem;
}
.model-navigation, .model-features {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.model-features { margin-top: .6rem; gap: .35rem .4rem; }
.model-tools button {
  appearance: none;
  cursor: pointer;
  background: white;
  color: var(--ink, #112e31);
  font: 500 .82rem/1.2 var(--sans, Arial, sans-serif);
}
.model-navigation button {
  min-width: 30px;
  min-height: 32px;
  padding: .3rem .4rem;
  border: 0;
  border-radius: 5px;
  font-size: 1rem;
}
.model-navigation button[data-view="reset"] { font-size: .8rem; }
.model-features button {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  min-height: 34px;
  padding: .4rem .72rem;
  border: 1px solid var(--rule, #c8d2c9);
  border-radius: 999px;
}
.model-tools button:hover { background: var(--sage, #e2ede7); }
.model-features [aria-pressed="true"] {
  color: var(--teal-dark, #0c4845);
  border-color: var(--teal, #115d58);
  background: var(--sage, #e2ede7);
}
.model-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: .7rem;
  height: .7rem;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 50%;
}
.model-dot-tumor { background: #db847f; }
.model-dot-immune { background: #39968d; }
.model-dot-matrix { background: #d5b577; }
.model-dot-chromosome { background: #787abc; }
.model-dot-ecdna { background: #dfa944; }
.model-description:not(:empty) { max-width: 62ch; margin: .6rem 0 0; font-size: .93rem; }
.model-fallback { width: 100%; max-width: 52ch; padding-block: 1rem; }
.model-fallback-title { font-weight: 600; }
.model-steps-text { margin: .5rem 0 1rem; padding-left: 1.4rem; }
.model-steps-text li { padding-left: .16rem; margin: .4rem 0; font-size: .9rem; }
.model-steps-text p { margin: .12rem 0 0; }
.model-fallback dl { margin: .75rem 0; }
.model-fallback dt { font-weight: 600; }
.model-fallback dt .model-dot { margin-right: .45rem; }
.model-fallback dd { margin: .08rem 0 .8rem 1.15rem; font-size: .9rem; }
.model-tools button:focus-visible, .model-canvas:focus-visible, .model-scrubber:focus-visible {
  outline: 2px solid var(--teal-dark, #0c4845);
  outline-offset: 2px;
}
@media (pointer: coarse) {
  .model-navigation button { min-width: 40px; }
  .model-tools button { min-height: 44px; }
  .model-tools .model-stops button, .model-tools .model-transport button { min-height: 44px; }
  .model-tools .model-transport button { min-width: 36px; }
  .model-scrubber { height: 36px; }
}
