:root {
  color-scheme: light;
  --paper: #f0eee6;
  --ink: #20281f;
  --muted: #656d60;
  --line: #bfc3b4;
  --night: #101712;
  --amber: #e9b765;
  --rust: #a66140;
  --grey: #92a695;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main,
footer {
  width: min(1440px, 94%);
  margin: auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 19px 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
header nav {
  display: flex;
  gap: 24px;
  font-size: 12px;
}
.lab {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 1.8px;
  text-decoration: none;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 0 24px;
}
.eyebrow {
  font: 10px/1.5 monospace;
  letter-spacing: 1.4px;
  margin: 0 0 10px;
}
.intro h1 {
  font:
    normal clamp(32px, 4vw, 58px) / 1.04 Georgia,
    serif;
  letter-spacing: -1.8px;
  margin: 0;
}
.intro > p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}
.intro > p span {
  font-size: 12px;
  color: var(--muted);
}
.encounter {
  background: var(--night);
  color: #dce1d2;
  border: 1px solid #2d382e;
}
.condition-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3c473c;
  gap: 10px;
  padding-right: 18px;
}
.reader-buttons {
  display: flex;
}
.reader-buttons button {
  border: 0;
  border-right: 1px solid #3c473c;
  padding: 17px 21px;
  font-size: 11px;
}
.condition-mark {
  margin-right: 9px;
  opacity: 0.7;
  font-size: 11px;
}
.reader-buttons button[aria-pressed="true"] {
  background: #e2e5d8;
  color: #202b23;
}
.reader-buttons button[data-condition="visitor"] {
  color: var(--amber);
}
.reader-buttons button[data-condition="visitor"][aria-pressed="true"] {
  color: #252d22;
  background: var(--amber);
}
#condition-note {
  font: 10px/1.4 monospace;
  color: #a6b5a3;
}
.listening-room {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 1fr);
  height: clamp(340px, 44vh, 490px);
}
.stage-wrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #48574a;
}
#stage,
#stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.stage-caption,
.stage-foot {
  position: absolute;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  left: 20px;
  right: 20px;
  font: 10px/1.5 monospace;
  letter-spacing: 0.7px;
  pointer-events: none;
}
.arena-locator {
  position: absolute;
  right: 18px;
  top: 55px;
  width: 86px;
  padding: 9px;
  background: #15251ddb;
  color: #c6d0ba;
  border: 1px solid #81907766;
  pointer-events: none;
}
#fly-closeup {
  position: absolute;
  left: 20px;
  bottom: 44px;
  width: 112px;
  padding: 8px;
  border: 1px solid #81907788;
  background: transparent;
  box-shadow:
    inset 0 0 0 7px #1b281f,
    inset 0 24px #1b281f;
  color: #e1e5d1;
  text-align: left;
}
#fly-closeup > span:first-child {
  display: block;
  height: 16px;
  font: 8px/12px monospace;
  letter-spacing: 0.6px;
}
#fly-closeup-view {
  display: block;
  height: 78px;
  border: 1px solid #74806866;
}
.stage-wrap[data-view="table"] .arena-locator,
.stage-wrap[data-view="table"] .body-state,
.stage-wrap[data-view="table"] .stage-foot {
  display: none;
}
.stage-wrap[data-body="loading"] #fly-closeup {
  visibility: hidden;
}
.stage-wrap[data-view="fly"] #fly-closeup,
.stage-wrap[data-view="fixed"] #fly-closeup,
.arena-fallback #fly-closeup {
  display: none;
}
.stage-wrap[data-view="fly"] .arena-locator,
.stage-wrap[data-view="fixed"] .arena-locator {
  left: 18px;
  right: auto;
  top: auto;
  bottom: 46px;
}
.arena-fallback #stage canvas {
  display: none;
}
.arena-locator > span {
  display: block;
  font: 8px monospace;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}
.arena-locator svg {
  display: block;
  width: 100%;
  height: auto;
}
.body-state {
  position: absolute;
  right: 20px;
  bottom: 48px;
  padding: 6px 9px;
  background: #19291edd;
  color: #e5d2a0;
  font: 10px monospace;
  letter-spacing: 0.7px;
}
.body-explanation {
  margin: 0;
  padding: 11px 20px;
  border-top: 1px solid #3c473c;
  font-size: 11px;
  line-height: 1.5;
  color: #b3bfa8;
}
.arena-fallback .arena-locator {
  display: flex;
  flex-direction: column;
  width: min(60%, 240px);
  left: 50%;
  right: auto;
  top: 60px;
  bottom: 85px;
  transform: translateX(-50%);
}
.arena-fallback .arena-locator svg {
  flex: 1;
  min-height: 0;
  height: 100%;
}
.arena-fallback #camera {
  display: none;
}
.arena-fallback .body-state {
  top: 17px;
  bottom: auto;
}
.arena-fallback #scene-fallback {
  font:
    11px/1.5 Arial,
    sans-serif;
  left: 20px;
  right: 20px;
  bottom: 39px;
  top: auto;
  margin: 0;
  text-align: center;
}
.movement-measurements {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 20px 0;
}
.movement-measurements strong {
  display: block;
  font:
    24px Georgia,
    serif;
  margin: 5px 0;
  color: var(--ink);
}
.movement-measurements span {
  font-size: 10px;
  line-height: 1.5;
  display: block;
  color: var(--muted);
}
.stage-caption {
  top: 17px;
  align-items: start;
}
.stage-caption > span {
  background: #1a251bdd;
  padding: 7px 10px;
}
.stage-caption button {
  pointer-events: auto;
  background: #1a251bdd;
  border: 0;
  padding: 7px 10px;
  font-size: 10px;
}
.stage-caption button:hover,
.stage-caption button:focus-visible {
  background: #243b2ff5;
}
.stage-foot {
  bottom: 14px;
  color: #ebe9d4;
}
.neural-deck {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 21px 12px;
  border-left: 1px solid #3c473c;
  background: #080e0b;
}
.neural-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 10px monospace;
  letter-spacing: 1.5px;
  color: #d6dbca;
}
#flashes {
  padding: 3px 5px;
  font-size: 9px;
  color: #bdc8b5;
  border-color: #435442;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
.neural-map {
  position: relative;
  flex: 1;
  min-height: 180px;
}
#neural-scene {
  height: 100%;
  position: absolute;
  inset: 0;
}
#neural-scene canvas {
  display: block;
  max-width: 100%;
}
.anatomy-labels {
  position: absolute;
  left: 0;
  top: 26%;
  height: 48%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font: 8px/1.4 monospace;
  letter-spacing: 1px;
  color: #91a28e;
  pointer-events: none;
}
#spatial-count {
  font: 10px monospace;
  margin: 0 0 7px;
  color: var(--amber);
}
.neural-key {
  font-size: 11px;
  line-height: 1.5;
  color: #b4c0ae;
  margin: 0;
}
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid #3c473c;
}
.controls #play {
  min-width: 110px;
}
.controls #replay {
  font-size: 19px;
  padding: 5px 13px;
}
#clock {
  font: 11px monospace;
  min-width: 86px;
}
#seek {
  flex: 1;
  min-width: 80px;
  accent-color: var(--amber);
}
#status,
#error {
  margin: 0;
  padding: 0 18px 12px;
  font: 10px/1.6 monospace;
  color: #b7c1ad;
}
#error {
  color: #ffc0a3;
}
button,
.file-button {
  font: 11px/1.3 monospace;
  letter-spacing: 0.2px;
  padding: 10px 13px;
  color: inherit;
  background: none;
  border: 1px solid #6a7964;
  border-radius: 0;
  cursor: pointer;
}
button:hover,
.file-button:hover {
  background: #869a7724;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: var(--amber);
  color: #1c251c;
  border-color: var(--amber);
  font-weight: bold;
}
.primary:hover {
  background: #f3c887;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.file-button:focus-within {
  outline: 3px solid #b76b39;
  outline-offset: 3px;
}
.encounter :focus-visible {
  outline-color: var(--amber);
}
.instruments {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  border-top: 1px solid #3c473c;
  background: #151e17;
}
.instruments > section {
  min-width: 0;
  padding: 12px 18px;
}
.input-instrument {
  border-left: 1px solid #3c473c;
}
.instrument-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font: 9px monospace;
  letter-spacing: 0.7px;
}
.instrument-heading select {
  font:
    11px Arial,
    sans-serif;
  border: 0;
  border-bottom: 1px solid #566c55;
  background: #151e17;
  color: #e1e6d9;
  padding: 5px 3px;
  max-width: 65%;
}
.instruments svg {
  width: 100%;
  height: 85px;
  display: block;
  overflow: visible;
}
.trace-key {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 9px/1.4 monospace;
  color: #bdc8b5;
  flex-wrap: wrap;
}
.trace-key > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.trace-key i {
  display: inline-block;
  width: 15px;
  height: 2px;
}
.amber {
  background: var(--amber);
}
.grey {
  background: var(--grey);
}
.rust {
  background: #c87951;
}
#rate {
  margin-left: auto;
  color: var(--amber);
}
#input-level {
  color: #c6d2bd;
  letter-spacing: 0;
  font-size: 9px;
}
.reading-desk {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8%;
  padding: 39px 4% 42px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.section-heading h2 {
  font:
    normal 30px Georgia,
    serif;
  margin: 0;
}
.section-heading > span {
  font: 9px/1.6 monospace;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.poem > p {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 18px;
}
#poem {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 22px;
}
.stanza {
  display: block;
  text-align: left;
  white-space: pre-line;
  font:
    18px/1.5 Georgia,
    serif;
  letter-spacing: 0;
  border: 0;
  border-left: 2px solid transparent;
  padding: 10px 0 10px 12px;
  margin: 0;
  color: #5a6456;
}
.stanza small {
  display: block;
  font: 9px monospace;
  letter-spacing: 1px;
  margin-bottom: 6px;
  color: #7e826f;
}
.stanza.active {
  color: #16261c;
  border-left-color: #a66140;
  background: #dfdfcf77;
}
.stanza[aria-disabled="true"] {
  cursor: default;
}
.poem-foot {
  margin-top: 18px;
}
#whole {
  border: 0;
  border-bottom: 1px solid #6a7964;
  padding: 8px 0;
}
#credit {
  font: 10px/1.6 monospace;
  color: var(--muted);
  margin-top: 18px;
}
.response-note {
  padding: 0 0 25px;
  border-bottom: 1px solid var(--line);
}
.response-note h2 {
  font:
    normal 27px/1.2 Georgia,
    serif;
  margin: 8px 0 13px;
}
.response-note p {
  font-size: 14px;
  line-height: 1.65;
  max-width: 520px;
}
.response-note .eyebrow {
  font: 10px monospace;
}
.response-note #population-description {
  font-size: 12px;
  color: var(--muted);
}
summary {
  cursor: pointer;
  font: 11px/1.5 monospace;
  text-underline-offset: 3px;
}
.measurement-detail {
  margin-top: 20px;
}
.measurement-detail a,
.measurement-detail p {
  font: 10px/1.6 monospace;
}
.measurement-detail table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font: 11px/1.5 monospace;
}
.measurement-detail th,
.measurement-detail td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px 0;
}
.measurement-detail th {
  font-weight: normal;
  color: var(--muted);
}
.measurement-detail td {
  text-align: right;
}
.voice-panel {
  padding-top: 27px;
}
.voice-panel p {
  font-size: 13px;
  line-height: 1.65;
}
.voice-panel .small-note {
  font: 10px/1.5 monospace;
  color: var(--muted);
}
.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.file-button {
  position: relative;
  overflow: hidden;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.recording-info {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 11px monospace;
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.recording-info strong {
  font-weight: normal;
  max-width: 70%;
}
.download-note {
  padding-left: 12px;
  border-left: 2px solid #a2ad94;
  color: #4f5f4b;
}
#voice-preview {
  margin: 15px 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
#record-status {
  font: 11px/1.65 monospace;
}
#record-error {
  border-left: 3px solid #a66140;
  padding: 10px 13px;
  color: #813f2a;
}
#processing-progress {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 17px 0;
  font: 11px monospace;
}
progress {
  flex: 1;
  accent-color: #4a6243;
  height: 6px;
}
#voice-downloads {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
#voice-downloads button {
  font-size: 10px;
  padding: 8px;
  margin: 0 4px 5px 0;
}
#method {
  border-top: 1px solid var(--line);
  padding: 25px 0 30px;
}
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7%;
  padding: 25px 0 5px;
}
.method-grid h2 {
  font:
    normal 27px Georgia,
    serif;
}
.method-grid h3 {
  font: 11px monospace;
  margin-top: 24px;
}
.method-grid p {
  font-size: 13px;
  line-height: 1.75;
  max-width: 620px;
}
.method-grid nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font: 11px monospace;
  margin-top: 20px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  font: 10px monospace;
}
#scene-fallback {
  position: absolute;
  left: 10%;
  top: 35%;
  font:
    23px/1.5 Georgia,
    serif;
  color: #f0f0dd;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 20;
  background: var(--paper);
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  .listening-room {
    height: 490px;
  }
}
@media (max-width: 1000px) {
  .condition-mark {
    display: none;
  }
  #condition-note {
    max-width: 190px;
  }
  .reader-buttons button {
    padding: 16px;
  }
  .neural-deck {
    padding: 16px;
  }
  .reading-desk {
    gap: 5%;
    padding: 30px 1%;
  }
  .intro > p {
    font-size: 12px;
  }
  .intro > p span {
    font-size: 11px;
  }
  .intro h1 {
    font-size: 38px;
  }
}
@media (max-width: 700px) {
  header,
  main,
  footer {
    width: 94%;
  }
  header {
    padding: 16px 0;
  }
  header nav {
    gap: 15px;
    font-size: 10px;
  }
  .intro {
    display: block;
    padding: 22px 0 19px;
  }
  .intro h1 {
    font-size: 37px;
    letter-spacing: -1px;
  }
  .intro > p {
    margin-top: 12px;
    font-size: 13px;
  }
  .intro > p span {
    font-size: 12px;
  }
  .intro .eyebrow {
    font-size: 8px;
  }
  .condition-bar {
    display: block;
    padding: 0;
  }
  .reader-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .reader-buttons button {
    font-size: 9px;
    padding: 15px 6px;
  }
  #condition-note {
    display: block;
    max-width: none;
    padding: 8px 12px;
    font-size: 9px;
  }
  .listening-room {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .stage-wrap {
    height: 290px;
  }
  #fly-closeup {
    left: 12px;
    width: 96px;
    bottom: 16px;
    padding: 6px;
  }
  #fly-closeup-view {
    height: 64px;
  }
  .arena-locator {
    right: 12px;
    width: 68px;
  }
  .stage-wrap[data-view="fly"] .arena-locator,
  .stage-wrap[data-view="fixed"] .arena-locator {
    left: 12px;
  }

  .stage-caption,
  .stage-foot {
    left: 12px;
    right: 12px;
    font-size: 8px;
  }
  .stage-caption button {
    font-size: 8px;
  }
  .neural-deck {
    height: 280px;
    border-left: 0;
    border-top: 1px solid #3c473c;
    padding: 14px 18px;
    position: relative;
  }
  .neural-map {
    min-height: 175px;
  }
  .neural-key {
    position: absolute;
    right: 18px;
    bottom: 18px;
    font-size: 9px;
  }
  .anatomy-labels {
    left: 12%;
    top: 24%;
    font-size: 8px;
  }
  #spatial-count {
    font-size: 9px;
    max-width: 45%;
    line-height: 1.5;
  }
  .controls {
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: var(--night);
    box-shadow: 0 -5px 18px #0003;
  }
  .controls #play {
    min-width: 94px;
    font-size: 10px;
  }
  .controls #share {
    font-size: 9px;
    padding: 10px 8px;
    margin-left: auto;
  }
  #seek {
    order: 5;
    flex-basis: 100%;
    margin: 7px 0 0;
  }
  #clock {
    font-size: 10px;
    min-width: 74px;
  }
  #status,
  #error {
    font-size: 9px;
    padding: 0 12px 10px;
  }
  .instruments {
    grid-template-columns: 1fr;
  }
  .input-instrument {
    border-left: 0;
    border-top: 1px solid #3c473c;
  }
  .instruments > section {
    padding: 12px;
  }
  .instruments svg {
    height: 80px;
  }
  .reading-desk {
    grid-template-columns: 1fr;
    padding: 28px 2%;
    gap: 28px;
  }
  #poem {
    gap: 6px 10px;
  }
  .stanza {
    font-size: 17px;
  }
  .desk-side {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }
  .voice-panel {
    order: -1;
    padding: 0 0 25px;
    border-bottom: 1px solid var(--line);
  }
  .response-note {
    padding-bottom: 10px;
    border: 0;
  }
  .section-heading > span {
    font-size: 8px;
  }
  .method-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  footer {
    font-size: 9px;
    flex-wrap: wrap;
  }
  #input-level {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 640px) {
  .movement-measurements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .arena-locator {
    width: 68px;
    padding: 6px;
    right: 12px;
  }
  .arena-locator > span {
    font-size: 6px;
  }
  .body-state {
    right: 12px;
    font-size: 8px;
  }
}
