@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap");
:root {
  --gold: #ffa300;
  --bg: #000;
  --surface: #111;
  --raised: #1a1a1a;
  --line: #262626;
  --text: #f4f4f5;
  --muted: #9ca3af;
  --font: "Lato", system-ui, sans-serif;
  --head: "Gotham", var(--font);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.3;
}
button:hover {
  border-color: var(--muted);
  background: var(--raised);
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
  background: #1a1a1a;
}
button.primary {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
  padding: 12px 20px;
}
button.quiet {
  border-color: #6b7280;
}
button.icon {
  padding: 9px;
  white-space: nowrap;
}
select {
  background: var(--surface);
  border: 1px solid #6b7280;
  border-radius: 6px;
  color: var(--text);
  padding: 9px 28px 9px 10px;
  max-width: 100%;
}
input {
  accent-color: var(--gold);
}
a {
  color: var(--gold);
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  font-family: var(--head);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;
}
h1 {
  font-size: clamp(36px, 4.5vw, 64px);
}
h2 {
  font-size: clamp(24px, 2.7vw, 34px);
}
h3 {
  font-size: 18px;
}
p {
  margin: 12px 0;
  color: var(--muted);
}
.eyebrow,
.small-label {
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.eyebrow {
  color: var(--gold);
  margin: 0 0 16px;
}
.small-label {
  color: var(--muted);
}
.divider {
  color: #6b7280;
  margin: 0 14px;
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 20;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.masthead {
  max-width: 1600px;
  margin: auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.masthead img {
  display: block;
  width: 125px;
  height: auto;
}
.masthead > span {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
}
.masthead button {
  font-size: 12px;
}
main {
  max-width: 1520px;
  padding: 0 40px;
  margin: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 64px 0 56px;
}
.intro .lede {
  font-size: 20px;
  line-height: 1.55;
  margin-bottom: 0;
}
.intro-actions {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
  max-width: 290px;
}
.intro-actions p {
  font-size: 12px;
  margin: 2px 0 0;
  text-align: center;
}
.exhibit {
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.exhibit-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 24px 0 20px;
}
.exhibit-heading p {
  margin: 0;
}
.exhibit-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.phases {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  gap: 8px;
  padding-bottom: 20px;
}
.phases button {
  border: 0;
  border-top: 2px solid var(--line);
  border-radius: 0;
  text-align: left;
  padding: 12px 4px 0;
  font-size: 13px;
}
.phases button[data-kind="phase"] {
  border-top-style: dashed;
}
.phases button[aria-current="step"] {
  border-color: var(--gold);
  color: var(--gold);
}
.phases button::after {
  content: attr(data-kind);
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
  letter-spacing: 0.08em;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  padding-top: 24px;
}
.stage-column {
  min-width: 0;
}
.stage {
  position: relative;
  background: radial-gradient(ellipse at 48% 42%, #111 0%, #000 70%);
  height: clamp(440px, 52vw, 620px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#canvas,
#overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
#canvas {
  touch-action: none;
  cursor: grab;
}
#canvas:active {
  cursor: grabbing;
}
#overlay {
  pointer-events: none;
}
.stage-top {
  position: absolute;
  top: 16px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.scene-help {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  pointer-events: none;
}
.landmarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.landmark {
  position: absolute;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: var(--surface);
  pointer-events: auto;
  transform: translate(-50%, -50%);
  font-size: 10px;
}
.landmark:hover,
.landmark[aria-pressed="true"] {
  background: var(--gold);
  color: #000;
}
.transport {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.transport input[type="range"] {
  flex: 1;
  min-width: 110px;
  height: 30px;
}
.transport output {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 72px;
  text-align: right;
}
.transport .primary {
  padding: 10px 16px;
}
.select-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.transport select {
  font-size: 12px;
  padding: 6px;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  white-space: nowrap;
}
.check input {
  width: 16px;
  height: 16px;
}
.view-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}
.camera-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.camera-controls button {
  font-size: 11px;
  padding: 8px 10px;
}
.display {
  font-size: 12px;
  min-width: 126px;
}
.display summary {
  padding: 7px 0;
  color: var(--muted);
}
#layers {
  display: grid;
  gap: 8px;
  padding: 8px 0;
}
#layers label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.teaching {
  border-left: 1px solid var(--line);
  padding: 8px 0 16px 28px;
}
.teaching-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.teaching-heading .eyebrow {
  margin: 0;
  font-size: 10px;
}
.teaching-heading > span:last-child {
  font-size: 11px;
  color: var(--muted);
}
.teaching h2 {
  font-size: 27px;
}
.teaching > p {
  font-size: 14px;
  line-height: 1.7;
}
.teaching #lesson-kind {
  font-size: 10px;
  margin-bottom: 10px;
}
.teaching ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0;
}
.teaching li {
  padding-left: 3px;
  margin: 8px 0;
}
.teaching li::marker {
  color: #6b7280;
}
.lesson-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 22px 0 28px;
}
.lesson-nav button {
  font-size: 12px;
}
.measurement {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.measurement select {
  width: 100%;
  font-size: 14px;
}
.measurement .eyebrow {
  font-size: 10px;
  margin-bottom: 10px;
}
.metric-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 0 10px;
}
.metric-value strong {
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric-value small {
  font-size: 12px;
  color: var(--muted);
}
.metric-source {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.measurement p {
  font-size: 13px;
  line-height: 1.65;
}
.measurement .method {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.measurement .read-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 18px 0 0;
}
.region-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.region-row > span {
  font-size: 10px;
}
.region-row > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.region-row button {
  font-size: 12px;
}
.signals-section {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 40px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.section-heading p:last-child {
  font-size: 14px;
}
.signal-options {
  display: flex;
  gap: 16px;
  flex-direction: column;
  padding-bottom: 16px;
}
.signal-picker {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.signal-picker > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#signal-groups {
  margin-bottom: 16px;
}
#signal-groups button {
  min-width: 75px;
}
#signal-choices button {
  font-size: 12px;
}
#selection-note {
  font-size: 12px;
  min-height: 19px;
  margin: 10px 0 0;
}
.chart-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  padding: 0 0 16px;
}
.chart-row {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  align-items: center;
}
.chart-heading button {
  text-align: left;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-family: var(--head);
  font-size: 15px;
  line-height: 1.4;
}
.chart-heading button[aria-pressed="true"] {
  background: none;
  color: var(--gold);
}
.chart-heading .chart-value {
  display: block;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  margin: 6px 0;
}
.chart-heading .chart-value small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
}
.chart-heading .chart-count {
  font-size: 11px;
  color: var(--muted);
}
.plot {
  display: block;
  width: 100%;
  height: 168px;
  cursor: crosshair;
  touch-action: pan-y;
  overflow: visible;
}
.plot text,
#overview text {
  font: 11px var(--font);
  fill: var(--muted);
}
.plot .signal-line {
  stroke: var(--text);
  stroke-width: 1.8;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.chart-row.is-selected .signal-line {
  stroke: var(--gold);
}
.plot .cursor {
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.plot .event-line {
  stroke: #6b7280;
  stroke-dasharray: 2 5;
  stroke-width: 1;
}
.plot .axis {
  stroke: var(--line);
  stroke-width: 1;
}
.plot .band {
  fill: var(--gold);
  opacity: 0.12;
}
.plot .phase-highlight {
  fill: var(--raised);
}
.plot .sample {
  fill: var(--bg);
  stroke: var(--gold);
  stroke-width: 1.5;
  cursor: pointer;
}
.plot .point {
  fill: var(--gold);
}
.chart-empty {
  color: var(--muted);
  padding: 30px 0;
  font-size: 14px;
}
#overview {
  display: block;
  width: 100%;
  height: 70px;
  cursor: crosshair;
}
.method-section {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  margin-top: 70px;
}
.method-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 42px;
}
.method-grid h2 {
  font-size: 27px;
}
.method-grid p {
  font-size: 14px;
}
.source {
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 28px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--gold);
  background: var(--surface);
  padding: 12px 20px;
  border-radius: 6px;
  max-width: 90vw;
  z-index: 30;
  font-size: 13px;
}
#status {
  padding: 30px 0;
}
#scene-error {
  position: absolute;
  inset: 40px 20px;
  background: var(--surface);
  padding: 32px;
  display: grid;
  align-content: center;
  font-size: 14px;
}
@media (min-width: 1400px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 44px;
  }
  .teaching {
    padding-left: 36px;
  }
  .stage {
    height: 650px;
  }
}
@media (max-width: 1000px) {
  main {
    padding: 0 24px;
  }
  .masthead {
    padding: 20px 24px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
  }
  .teaching {
    padding-left: 20px;
  }
  .stage {
    height: 500px;
  }
  .transport .check {
    margin-left: auto;
  }
  .intro {
    padding: 48px 0;
  }
  .chart-row {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  main {
    padding: 0 18px;
  }
  .masthead {
    padding: 18px;
    gap: 14px;
  }
  .masthead > span {
    display: none;
  }
  .masthead button {
    margin-left: auto;
  }
  .masthead img {
    width: 110px;
  }
  .intro {
    display: block;
    padding: 36px 0;
  }
  .intro .lede {
    font-size: 18px;
  }
  .intro-actions {
    margin-top: 24px;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .intro-actions p {
    grid-column: 1/-1;
    text-align: left;
  }
  .intro-actions button {
    padding: 12px;
    font-size: 12px;
  }
  .exhibit-heading {
    display: block;
  }
  .exhibit-heading > span {
    font-size: 11px;
  }
  .exhibit-heading .eyebrow {
    margin-bottom: 8px;
  }
  .phases {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 16px;
  }
  .phases button {
    font-size: 12px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }
  .stage {
    height: 440px;
  }
  .transport {
    gap: 7px;
  }
  .transport input[type="range"] {
    min-width: 100px;
  }
  .transport output {
    min-width: 60px;
  }
  .transport .select-label {
    margin-left: auto;
  }
  .teaching {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 12px;
  }
  .teaching-heading {
    margin-bottom: 20px;
  }
  .teaching h2 {
    font-size: 26px;
  }
  .measurement {
    margin-top: 24px;
  }
  .region-row {
    gap: 12px;
  }
  .region-row button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .section-heading {
    display: block;
  }
  .signal-options {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 24px;
  }
  .signals-section {
    margin-top: 28px;
    padding-top: 32px;
  }
  .chart-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .chart-heading {
    display: flex;
    gap: 16px;
    align-items: baseline;
    flex-wrap: wrap;
  }
  .chart-heading button {
    max-width: 65%;
    font-size: 14px;
  }
  .chart-heading .chart-value {
    font-size: 23px;
    margin: 0;
  }
  .chart-count {
    display: none;
  }
  .plot {
    height: 185px;
  }
  .chart-legend {
    gap: 12px;
    font-size: 10px;
  }
  .method-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .method-section {
    margin-top: 40px;
    padding: 32px 0;
  }
  footer {
    gap: 16px;
    flex-wrap: wrap;
  }
  .view-controls {
    gap: 8px;
  }
  .camera-controls {
    gap: 4px;
  }
  .camera-controls button {
    padding: 8px;
    font-size: 10px;
  }
  .display {
    min-width: 110px;
  }
}
@media (max-width: 380px) {
  .stage {
    height: 370px;
  }
  .transport input[type="range"] {
    order: 5;
    flex-basis: 100%;
  }
  .transport .check {
    margin-left: 0;
  }
  .view-controls {
    flex-wrap: wrap;
  }
  .intro-actions {
    grid-template-columns: 1fr;
  }
  .intro-actions p {
    grid-column: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.context-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 26px;
}
.context-tabs button {
  flex: 1;
  font-size: 12px;
}
.teaching-heading {
  margin-bottom: 16px;
}
.teaching[data-context="metric"] .measurement {
  border-top: 0;
  padding-top: 0;
}
.lesson-measurements {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.lesson-measurements button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  color: var(--muted);
}
.lesson-measurements button:hover {
  color: var(--gold);
  background: none;
}
.teaching[data-context="metric"] .metric-source {
  margin-top: 20px;
}
/* Single-screen measurement exhibit */
html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
.masthead {
  height: 62px;
  min-height: 62px;
  padding: 10px 24px;
  max-width: none;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.masthead img {
  width: 126px;
  max-height: 35px;
  object-fit: contain;
}
.masthead > span {
  flex: 1;
}
.masthead button {
  font-size: 11px;
}
main {
  width: 100%;
  max-width: none;
  padding: 0 24px;
  flex: 1;
  min-height: 0;
  display: flex;
}
.intro,
.exhibit-heading,
.teaching-heading,
.context-tabs,
.lesson-nav,
.lesson-measurements,
#lesson-kind,
#lesson-title,
#lesson-text,
#prompts,
.region-row,
.signal-picker,
footer {
  display: none !important;
}
.exhibit {
  width: 100%;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 122px;
  min-height: 0;
}
.exhibit[hidden] {
  display: none;
}
.phases {
  margin: 0;
  padding: 10px 0;
  gap: 8px;
  align-items: stretch;
}
.phases button {
  padding: 7px 4px;
  font-size: 12px;
}
.phases button::after {
  font-size: 9px;
  margin-top: 3px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(300px, 1.8fr) minmax(
      280px,
      0.9fr
    );
  gap: 0;
  min-height: 0;
  border-bottom: 1px solid var(--line);
}
.stage-column {
  min-width: 0;
  min-height: 0;
}
.stage {
  height: 100%;
  min-height: 0;
  width: 100%;
}
.stage-top {
  top: 12px;
  left: 18px;
  right: 18px;
  font-size: 11px;
}
.scene-help {
  bottom: 8px;
  font-size: 10px;
}
.teaching {
  border-left: 1px solid var(--line);
  padding: 16px 0 12px 24px;
  min-width: 0;
  overflow: auto;
}
.measurement {
  border: 0;
  padding: 0;
  margin: 0;
}
.measurement > .eyebrow {
  margin: 0 0 12px;
}
#metric-select {
  width: 100%;
  font-size: 13px;
  height: 40px;
}
#metric-detail {
  font-size: 13px;
  line-height: 1.65;
}
#metric-detail p {
  margin: 12px 0;
}
#metric-detail .metric-source {
  margin: 16px 0 10px;
  color: var(--gold);
  font-size: 12px;
}
#metric-detail .metric-value {
  margin: 10px 0 0;
}
#metric-detail .metric-value strong {
  font-size: 36px;
}
#metric-detail .detail-time {
  font-size: 11px;
  margin: 2px 0 18px;
}
#metric-detail .method {
  font-size: 11px;
}
#metric-detail .read-label {
  font-size: 10px;
  margin: 18px 0 4px;
}
.signals-section {
  padding: 16px 20px 10px 0;
  margin: 0;
  border: 0;
  min-width: 0;
  overflow: auto;
}
.signals-section .section-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 0;
}
.signals-section .section-heading p {
  font-size: 11px;
  margin: 0 0 8px;
}
.signals-section .section-heading .eyebrow {
  font-size: 10px;
}
.signal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
.signal-options label {
  font-size: 10px;
}
.signal-options select {
  font-size: 11px;
  padding: 6px;
  max-width: 170px;
}
#band-note {
  font-size: 10px;
  line-height: 1.5;
  margin: 12px 0;
}
.chart-legend {
  font-size: 9px;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.chart-row {
  padding: 8px 0;
  border: 0;
}
.chart-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.chart-heading button {
  font-size: 14px;
  padding: 0;
  border: 0;
  max-width: 100%;
}
.chart-value {
  font-size: 20px;
  margin-left: auto;
}
.chart-count {
  flex-basis: 100%;
  font-size: 10px;
  margin: 0;
}
.plot {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
}
.plot .sample {
  fill: var(--gold);
  stroke: #000;
  stroke-width: 1;
  cursor: pointer;
}
#measurement-moments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#measurement-moments button {
  font-size: 11px;
  color: var(--gold);
  padding: 7px 10px;
}
#sampling-note {
  font-size: 11px;
  line-height: 1.6;
  margin: 12px 0;
}
.exhibit-controls {
  min-width: 0;
}
.transport {
  border: 0;
  padding: 10px 0;
  gap: 10px;
  min-height: 50px;
}
.transport button {
  padding: 8px 12px;
  font-size: 12px;
}
.view-controls {
  padding: 0 0 8px;
  margin: 0;
  position: relative;
}
.camera-controls button {
  font-size: 10px;
  padding: 6px 10px;
}
.display {
  position: relative;
  font-size: 11px;
}
.display #layers {
  position: absolute;
  bottom: 30px;
  right: 0;
  background: #151515;
  border: 1px solid var(--line);
  padding: 16px;
  z-index: 10;
  min-width: 200px;
}
dialog {
  background: #101010;
  color: #eee;
  border: 1px solid #444;
  max-width: 800px;
  width: 90vw;
  max-height: 85vh;
  padding: 24px;
}
dialog::backdrop {
  background: #000b;
}
dialog .method-section {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}
dialog .method-grid {
  display: block;
}
dialog .method-grid > div {
  margin: 20px 0;
}
@media (max-height: 760px) and (min-width: 1000px) {
  .masthead {
    height: 50px;
    min-height: 50px;
  }
  .exhibit {
    grid-template-rows: 56px minmax(0, 1fr) 112px;
  }
  #metric-detail {
    font-size: 12px;
    line-height: 1.5;
  }
  #metric-detail p {
    margin: 9px 0;
  }
  #metric-detail .detail-time {
    margin-bottom: 10px;
  }
  #metric-detail .metric-value strong {
    font-size: 30px;
  }
  .signals-section {
    padding-top: 10px;
  }
}
@media (max-width: 1000px) {
  main {
    padding: 0 12px;
  }
  .workspace {
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.2fr) minmax(
        220px,
        1fr
      );
  }
  .teaching {
    padding-left: 12px;
  }
  .signals-section {
    padding-right: 12px;
  }
  .masthead > span {
    font-size: 11px;
  }
}
@media (max-width: 1000px) {
  html,
  body {
    overflow: auto;
    height: auto;
    min-height: 100%;
  }
  .masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #080808;
    padding: 8px 12px;
    gap: 8px;
  }
  .masthead > span {
    display: none;
  }
  .masthead img {
    width: 90px;
    margin-right: auto;
  }
  .masthead button {
    font-size: 10px;
    padding: 7px;
  }
  main {
    display: block;
  }
  .exhibit {
    display: flex;
    flex-direction: column;
  }
  .phases {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    min-height: 54px;
  }
  .phases button {
    font-size: 9px;
    min-width: 0;
    padding: 5px 0;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    border: 0;
  }
  .stage-column {
    order: 0;
    height: 44vh;
    min-height: 280px;
  }
  .signals-section {
    order: 2;
    padding: 16px 0;
    overflow: visible;
  }
  .teaching {
    order: 1;
    padding: 16px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }
  .exhibit-controls {
    position: sticky;
    bottom: 0;
    z-index: 15;
    background: #080808;
    border-top: 1px solid var(--line);
    order: 3;
  }
  .transport {
    flex-wrap: wrap;
    gap: 7px;
    padding: 7px 0;
  }
  .transport input[type="range"] {
    flex: 1;
    min-width: 80px;
    order: 0;
  }
  .transport .select-label,
  .transport .check {
    display: none;
  }
  .view-controls {
    padding-bottom: 6px;
  }
  .plot {
    max-height: 240px;
  }
}
.chart-row {
  display: block;
}
.chart-row > div {
  min-width: 0;
  width: 100%;
}
.chart-heading {
  margin-bottom: 8px;
}
.masthead {
  width: 100%;
  margin: 0;
}
.signals-section .section-heading > div > p:not(.eyebrow) {
  display: none;
}
.signal-options {
  align-items: center;
  gap: 8px;
}
.signal-options .select-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.signal-options .check {
  margin: 0;
}
.chart-legend {
  padding: 0;
  border: 0;
  line-height: 1.4;
  gap: 6px;
}
.chart-legend span {
  white-space: normal;
}
.chart-heading .chart-value {
  display: inline;
  font-size: 22px;
  margin: 0 0 0 auto;
}
.chart-heading .chart-count {
  display: block;
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
}
.chart-heading button {
  line-height: 1.4;
}
#band-note {
  margin: 8px 0;
  font-size: 10px;
}
#sampling-note {
  font-size: 10px;
  margin: 8px 0;
}
.signals-section .section-heading {
  gap: 6px;
}
.signal-options {
  padding: 0;
  align-items: flex-start;
}
.chart-heading .chart-count {
  display: none;
}
.chart-heading .chart-value {
  display: none;
}
.chart-legend {
  margin: 8px 0;
}
.chart-row {
  padding: 4px 0;
}
@media (min-width: 1001px) {
  .signals-section {
    padding-top: 12px;
  }
}
.series-legend {
  display: grid;
  gap: 5px;
  margin: 8px 0 12px;
  font-size: 11px;
}
.series-legend > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.series-legend small {
  margin-left: 4px;
  font-size: 9px;
}
.path-key {
  position: absolute;
  bottom: 32px;
  left: 16px;
  right: 16px;
  text-align: center;
  font-size: 10px;
  color: #c5cbd3;
  pointer-events: none;
}
.signals-section .plot-scale-note {
  font-size: 10px;
  line-height: 1.5;
  margin: 8px 0;
  color: #aeb5bf;
}
#charts {
  margin: 12px 0 0;
}
@media (min-width: 1001px) and (max-height: 800px) {
  .signals-section { padding-top: 4px; }
  .signals-section .section-heading { gap: 0; }
  .signals-section .eyebrow { margin-bottom: 4px; }
  .signal-options { gap: 4px; }
  #band-note, .chart-legend { margin: 4px 0; }
  .chart-legend span:last-child { display: none; }
  #charts { margin-top: 4px; }
  .series-legend { gap: 3px; margin: 4px 0; line-height: 1.3; }
  .signals-section .plot-scale-note { margin: 4px 0; }
  #sampling-note { line-height: 1.4; margin: 4px 0; }
  #measurement-moments { gap: 4px; margin: 4px 0; }
  #measurement-moments button { padding: 5px 7px; font-size: 10px; }
}
@media (min-width: 1001px) and (max-width: 1100px) {
  #metric-detail {
    font-size: 12px;
    line-height: 1.45;
  }
  #metric-detail p {
    margin: 9px 0;
  }
  #metric-detail .metric-source {
    margin: 12px 0 8px;
  }
  #metric-detail .detail-time {
    margin-bottom: 10px;
  }
  #metric-detail .read-label {
    margin-top: 12px;
  }
  .signals-section .section-heading {
    gap: 2px;
  }
  #sampling-note {
    line-height: 1.4;
  }
  #measurement-moments {
    gap: 4px;
  }
  #measurement-moments button {
    padding: 5px 7px;
    font-size: 10px;
  }
}
#overview-wrap > p {
  display: none;
}
#overview {
  display: block;
  height: 32px;
  width: 100%;
  margin-top: 4px;
}
.path-key::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #3288ff, #36ce75, #ff4040);
  vertical-align: middle;
  margin-right: 7px;
}

.coaching-notes-button {
  display: block;
  text-align: left;
  color: var(--gold);
  font-size: 12px;
  margin-top: 16px;
  padding: 9px 12px;
}
.coaching-dialog {
  max-width: 740px;
  font-size: 15px;
  line-height: 1.7;
}
.coaching-dialog > button {
  float: right;
}
.coaching-dialog h2 {
  padding-right: 80px;
  margin: 12px 0 24px;
}
.coaching-dialog h3 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 24px 0 8px;
}
.coaching-dialog > a {
  display: block;
  color: #9bcaff;
  margin-top: 8px;
}
@media (min-width:1001px) and (max-height:800px) {
 #metric-detail .metric-value {margin:4px 0 0}
 #metric-detail .read-label {margin:12px 0 4px}
 .coaching-notes-button {margin-top:10px}
}
@media (min-width:1001px) and (max-height:800px) {
 .coaching-notes-button {margin-top:6px;padding:6px 12px}
}

.swing-timeline { flex: 1; min-width: 110px; position: relative; padding-bottom: 20px; }
.transport .swing-timeline input[type="range"] { display: block; width: 100%; min-width: 0; margin: 0; }
.timeline-positions { position: absolute; left: 8px; right: 8px; top: 25px; height: 24px; }
.timeline-positions .timeline-position { position: absolute; transform: translateX(-50%); width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #abb1ba; }
.timeline-position::before { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid #abb1ba; border-radius: 50%; background: #111; top: 1px; left: 8px; }
.timeline-position[aria-pressed="true"]::before, .timeline-position:hover::before, .timeline-position:focus-visible::before { background: #ffa300; border-color: #ffa300; }
.timeline-position[aria-pressed="true"] { color: #ffa300; }
.timeline-position span { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: 9px; white-space: nowrap; }
@media (max-width: 1000px) {
 .swing-timeline { flex-basis: 100%; order: 5; }
 .timeline-position span { font-size: 8px; }
 .timeline-position:nth-last-child(2) span { transform: translateX(-85%); }
 .timeline-position:last-child span { transform: translateX(-15%); }
}

/* Compact phones: shared selection and transport, one exhibit view at a time. */
.mobile-views { display: none; }
@media (max-width: 1000px) {
  html { height: 100%; overflow: hidden; }
  body { height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
  .masthead { position: static; height: 48px; min-height: 48px; padding: 4px 10px; }
  .masthead button { min-height: 40px; }
  main { display: flex; min-height: 0; padding: 0 10px; }
  .exhibit { display: grid; grid-template-rows: 48px 40px minmax(0, 1fr) 150px; min-height: 0; }
  .phases { min-height: 0; padding: 2px 0; gap: 2px; }
  .phases button { font-size: 10px; padding: 4px 0; }
  .phases button::after { font-size: 8px; }
  .mobile-views { display: flex; gap: 6px; padding: 0 0 2px; }
  .mobile-views button { flex: 1; min-height: 38px; padding: 4px; font-size: 13px; }
  .mobile-views button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
  .workspace { padding: 0; display: grid; grid-template: 48px minmax(0, 1fr) / minmax(0, 1fr); min-height: 0; }
  .teaching { grid-area: 1 / 1; padding: 2px 0; border: 0; overflow: visible; }
  .measurement { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .measurement > .eyebrow, #metric-detail > :not(.coaching-notes-button) { display: none; }
  #metric-select { height: 44px; font-size: 16px; margin: 0; }
  .coaching-notes-button { margin: 0; padding: 8px 10px; min-height: 44px; white-space: nowrap; }
  .stage-column, .signals-section { grid-area: 2 / 1; min-height: 0; height: 100%; }
  .stage-column { display: block; }
  .stage { height: 100%; min-height: 0; }
  .signals-section { display: none; padding: 4px 0; overflow: auto; }
  body[data-mobile-view="signals"] .stage-column { display: none; }
  body[data-mobile-view="signals"] .signals-section { display: block; }
  .signals-section .section-heading { display: block; margin: 0; }
  .signals-section .section-heading > div:first-child { display: none; }
  .signal-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .signal-options .select-label { font-size: 0; }
  .signal-options select { font-size: 14px; min-height: 40px; }
  .signal-options .check { font-size: 11px; min-height: 40px; }
  .chart-legend { margin: 2px 0; font-size: 9px; }
  .chart-legend span:last-child { display: none; }
  #charts { margin-top: 0; }
  .series-legend { gap: 2px; margin: 2px 0; font-size: 11px; }
  .signals-section .plot-scale-note { display: none; }
  #measurement-moments { margin: 2px 0; }
  #measurement-moments button { min-height: 32px; padding: 4px 8px; }
  #overview { height: 26px; margin: 0; }
  .exhibit-controls { position: relative; min-height: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .transport { padding: 4px 0 0; gap: 6px; min-height: 0; }
  .transport > button { min-height: 40px; }
  .transport #clock { margin-left: auto; }
  .swing-timeline { flex-basis: 100%; order: 5; padding-bottom: 20px; }
  .view-controls { padding: 4px 0 0; }
  .camera-controls { gap: 4px; }
  .camera-controls button { min-height: 36px; padding: 4px 8px; }
  .display summary { padding: 8px 0; }
  .stage-top { top: 8px; left: 8px; right: 8px; }
  .scene-help { display: none; }
  .path-key { bottom: 6px; left: 4px; right: 4px; font-size: 9px; }
  .coaching-dialog { max-height: 85dvh; width: calc(100% - 24px); padding: 16px; font-size: 15px; }
}

@media (max-width: 1000px) {
  .signal-options { flex-direction: row; flex-wrap: nowrap; }
  .signal-options .check { font-size: 0; gap: 4px; white-space: nowrap; }
  .signal-options .check::after { content: "Reference band"; font-size: 11px; }
  .signal-options .select-label { min-width: 0; flex: 1; }
  .signal-options select { width: 100%; min-width: 0; }
}
@media (max-width: 1000px) and (max-height: 620px) {
  #overview-wrap { display: none; }
  .signal-options .check::after { content: "Band"; }
  .series-legend { font-size: 10px; line-height: 1.2; }
  .stage-top { font-size: 10px; }
}

@media (max-width: 1000px) {
  .view-controls { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 4px; }
  .camera-controls { display: flex; flex-wrap: nowrap; gap: 3px; }
  .camera-controls button { font-size: 10px; padding: 4px 6px; }
  .display { min-width: 0; }
  .display summary { font-size: 10px; white-space: nowrap; }
}
@media (max-width: 1000px) and (max-height: 620px) {
  .chart-legend { display: none; }
}

@media (max-width: 1000px) and (max-height: 500px) {
  .masthead { height: 38px; min-height: 38px; }
  .masthead button { min-height: 32px; }
  .exhibit { grid-template-rows: 36px minmax(0, 1fr) 96px; }
  .phases { display: none; }
  .mobile-views button { min-height: 32px; }
  .transport { flex-wrap: nowrap; }
  .swing-timeline { flex-basis: auto; order: 0; }
  .transport #clock { margin-left: 0; }
  .signals-section { padding: 0; }
  .signal-options select, .signal-options .check { min-height: 32px; }
  .series-legend { grid-template-columns: 1fr 1fr; gap: 2px 16px; }
  #measurement-moments { display: none; }
}

/* The phase navigator and scrubber form one docked timeline. */
.exhibit { grid-template-rows: minmax(0, 1fr) 196px; }
.exhibit-controls { background: #080808; border-top: 1px solid var(--line); }
.exhibit-controls > .swing-timeline { padding: 4px 8px 0; margin: 0; }
.exhibit-controls > .swing-timeline > input { display: block; width: 100%; margin: 0; height: 26px; }
.timeline-positions { top: 19px; pointer-events: none; }
.timeline-position { pointer-events: auto; }
.timeline-position span { display: none; }
.phase-connectors { display: block; height: 22px; width: 100%; pointer-events: none; }
#phases { display: grid; min-height: 0; padding: 0; gap: 4px; border: 0; }
#phases button { position: relative; border-top: 2px solid #353535; padding: 5px 3px; }
#phases button::before { content: ""; position: absolute; left: 0; top: -2px; width: var(--phase-progress, 0%); height: 2px; background: var(--gold); }
#phases button[data-kind="phase"] { border-top-style: dashed; }
#phases button[aria-current="step"] { background: #171717; border-color: #353535; }
@media (max-width: 1000px) {
  .exhibit { grid-template-rows: minmax(0, 1fr) 178px; }
  .workspace { grid-template: auto minmax(100px, 1fr) 210px / minmax(0, 1fr); }
  .teaching { grid-area: 1 / 1; }
  .stage-column, body[data-mobile-view="signals"] .stage-column { display: block; grid-area: 2 / 1; }
  .signals-section, body[data-mobile-view="signals"] .signals-section { display: block; grid-area: 3 / 1; padding: 0; overflow: visible; }
  .measurement { grid-template-columns: minmax(0, 1fr) auto; }
  #metric-detail { display: contents; }
  #metric-detail > .metric-definition { display: block; grid-column: 1 / -1; grid-row: 2; margin: 3px 0; font-size: 11px; line-height: 1.35; }
  #metric-detail > .coaching-notes-button { grid-column: 2; grid-row: 1; }
  .signal-options select, .signal-options .check { min-height: 32px; }
  .series-legend { grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 10px; line-height: 1.25; }
  .series-legend > div:only-child { grid-column: 1 / -1; }
  #measurement-moments, .chart-legend, #overview-wrap { display: none; }
  .transport { flex-wrap: nowrap; min-height: 40px; padding: 3px 0 0; }
  .transport > button { min-height: 34px; padding: 6px 10px; }
  .transport .select-label { display: flex; margin-left: auto; font-size: 10px; }
  .transport .select-label select { min-height: 32px; }
  .transport #clock { display: none; }
  .view-controls { padding: 0; }
  .camera-controls button { min-height: 32px; }
  #phases button { font-size: 10px; }
  #phases button::after { font-size: 8px; letter-spacing: 0; margin-top: 2px; }
  .phase-connectors { height: 16px; }
}
@media (max-width: 1000px) and (max-height: 680px) {
  .workspace { grid-template-rows: auto minmax(90px, 1fr) 165px; }
  #metric-detail > .metric-definition { display: none; }
  .masthead { height: 40px; min-height: 40px; }
  .masthead button { min-height: 32px; }
}
@media (max-width: 1000px) and (orientation: landscape) {
  .exhibit { grid-template-rows: minmax(0, 1fr) 150px; }
  .workspace { grid-template: auto minmax(0, 1fr) / 1fr 1fr; column-gap: 12px; }
  .teaching { grid-area: 1 / 1 / 2 / 3; }
  .stage-column, body[data-mobile-view="signals"] .stage-column { grid-area: 2 / 2; }
  .signals-section, body[data-mobile-view="signals"] .signals-section { grid-area: 2 / 1; }
  .exhibit-controls { display: grid; grid-template: auto 36px / 1fr 1fr; align-items: center; }
  .exhibit-controls > .swing-timeline { grid-column: 1 / -1; }
  .transport { padding: 0; }
  #metric-detail > .metric-definition { display: none; }
}

@media (max-width: 1000px) {
  .signals-section { align-self: stretch; }
  .signal-options, .signal-options label { margin: 0; }
  .workspace { row-gap: 0; }
}

/* A single, quiet timeline dock; no crossing leader lines. */
.exhibit { grid-template-rows: minmax(0, 1fr) 138px; }
.exhibit-controls { display: grid; grid-template: auto 42px / auto 1fr; align-content: start; column-gap: 18px; padding: 6px 0; }
.exhibit-controls > .swing-timeline { grid-column: 1 / -1; padding: 0; }
#phases { gap: 6px; }
#phases button { padding: 4px 4px; font-size: 11px; }
#phases button::after { margin-top: 1px; font-size: 9px; }
.exhibit-controls > .swing-timeline > input { height: 24px; margin: 0; }
.timeline-positions { display: none; }
.transport { padding: 0; min-height: 40px; }
.view-controls { padding: 0; align-self: center; }
.view-controls .display { margin-left: auto; }
@media (max-width: 1000px) {
  .exhibit { grid-template-rows: minmax(0, 1fr) 130px; }
  .exhibit-controls { grid-template: auto 34px 30px / 1fr; gap: 0; padding: 3px 0; }
  .exhibit-controls > .swing-timeline { grid-column: 1; }
  #phases { gap: 3px; }
  #phases button { padding: 3px 0; font-size: 10px; }
  #phases button::after { font-size: 8px; }
  .transport { min-height: 34px; }
  .transport > button { min-height: 30px; padding: 4px 10px; }
  .camera-controls button { min-height: 30px; }
}
@media (max-width: 1000px) and (orientation: landscape) {
  .exhibit { grid-template-rows: minmax(0, 1fr) 100px; }
  .exhibit-controls { grid-template: auto 34px / 1fr 1fr; gap: 0 12px; }
  .exhibit-controls > .swing-timeline { grid-column: 1 / -1; }
}

.exhibit-controls > .swing-timeline { order: 0; grid-row: 1; }
@media (max-width: 1000px) {
  .exhibit-controls > .transport { grid-row: 2; }
  .exhibit-controls > .view-controls { grid-row: 3; }
}
@media (max-width: 1000px) and (orientation: landscape) {
  .exhibit-controls > .view-controls { grid-row: 2; }
}

/* Phones keep the phase scrubber; secondary controls stay on desktop. */
@media (max-width: 720px), (max-width: 1000px) and (max-height: 500px) {
  .masthead #about, .masthead #share,
  .exhibit-controls > .transport, .exhibit-controls > .view-controls { display: none; }
  .masthead { height: 34px; min-height: 34px; padding: 3px 10px; }
  .exhibit { grid-template-rows: minmax(0, 1fr) calc(66px + env(safe-area-inset-bottom, 0px)); }
  .exhibit-controls { display: block; padding: 3px 0 env(safe-area-inset-bottom, 0px); }
}

/* Keep the metric introduction visible and give phone curves more height. */
@media (max-width: 1000px) {
  #metric-detail > .metric-definition { display: block; font-size: 12px; line-height: 1.4; }
  .signals-section .plot { max-height: none; }
}
@media (max-width: 1000px) and (orientation: portrait) {
  .workspace { grid-template-rows: auto minmax(90px, 1fr) clamp(210px, 36dvh, 300px); }
}

.stage-brand { display: none; }
@media (max-width: 720px), (max-width: 1000px) and (max-height: 500px) {
  .masthead { display: none; }
  .stage-brand { display: block; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 78px; height: auto; z-index: 2; pointer-events: none; }
}
