@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap");
:root {
  color-scheme: dark;
  --bg: #0b0f11;
  --panel: #14191c;
  --line: #2b3337;
  --text: #e9eeec;
  --muted: #9da9ac;
  --accent: #ffac72;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px "DM Sans",
    system-ui,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 40px;
  padding: 9px 13px;
}
button:hover {
  background: #ffffff09;
  border-color: #66777e;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible,
input:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.instrument {
  max-width: 1680px;
  margin: auto;
  padding: 0 32px;
}
.masthead {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.back {
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.edition,
.console-top,
.eyebrow,
.chamber-footer,
.serial {
  font: 9px/1.5 monospace;
  letter-spacing: 1.6px;
}
.edition {
  color: var(--muted);
}
.edition i {
  font-style: normal;
  color: #59676b;
  margin: 0 12px;
}
.subtle {
  font-size: 11px;
  border: 0;
  color: var(--muted);
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 740px;
  height: calc(100dvh - 142px);
  max-height: 1040px;
  border-bottom: 1px solid var(--line);
}
.chamber {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 53%, #1d292c65, transparent 65%), #0b1013;
}
.chamber-title {
  position: absolute;
  z-index: 1;
  top: 30px;
  left: 30px;
  pointer-events: none;
}
.eyebrow {
  color: var(--accent);
  margin: 0 0 22px;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
}
h1 {
  font-size: clamp(42px, 4.8vw, 74px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -3px;
  margin: 0;
}
h1 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  color: #c5d2d0;
}
.chamber-title > p:last-child {
  font-size: 11px;
  margin-top: 18px;
  color: var(--muted);
}
#field {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
.view-actions {
  position: absolute;
  right: 20px;
  top: 24px;
  display: flex;
  gap: 7px;
}
.view-actions button {
  font-size: 10px;
  background: #12191dcc;
}
.chamber-footer {
  position: absolute;
  bottom: 24px;
  left: 26px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 8px;
  pointer-events: none;
}
.axes {
  position: absolute;
  bottom: 64px;
  left: 27px;
  display: flex;
  flex-direction: column;
  color: #61747b;
  font: 10px monospace;
  pointer-events: none;
}
.axes span:nth-child(2) {
  margin-left: 18px;
}
.console {
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow: auto;
  padding: 0 25px;
  scrollbar-width: thin;
  scrollbar-color: #435055 transparent;
}
.console-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  padding: 23px 0 20px;
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 1px;
}
.serial {
  color: var(--accent);
  font-size: 8px;
}
.control-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
h2 {
  font: 9px monospace;
  color: var(--accent);
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
h2 span {
  font:
    12px "DM Sans",
    sans-serif;
  color: var(--text);
}
.text-button {
  border: 0;
  min-height: 28px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 10px;
}
.model-list {
  display: grid;
  gap: 7px;
}
.model-list button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 11px 12px;
  min-height: 62px;
  background: #111619;
}
.model-list button[aria-pressed="true"] {
  border-color: #b77b51;
  background: #2e251f;
}
.model-glyph {
  font: 29px Georgia;
  color: #829797;
  width: 27px;
  text-align: center;
}
.model-list button[aria-pressed="true"] .model-glyph {
  color: var(--accent);
}
.model-list small {
  display: block;
  font: 7px monospace;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-top: 5px;
}
.radio-dot {
  width: 7px;
  height: 7px;
  border: 1px solid #607072;
  border-radius: 50%;
  margin-left: auto;
}
.model-list [aria-pressed="true"] .radio-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.knob {
  display: flex;
  justify-content: space-between;
  color: #c0cbce;
  font-size: 11px;
  margin: 20px 0 4px;
}
.knob:first-of-type {
  margin-top: 0;
}
.knob output {
  font: 10px monospace;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  display: block;
  width: 100%;
  height: 26px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}
.micro {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 12px;
}
.palette-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #c0cbce;
  margin-top: 13px;
}
.palette-row > div {
  display: flex;
  gap: 6px;
}
.swatch {
  min-height: 26px;
  width: 26px;
  padding: 0;
  border-radius: 50%;
  border: 4px solid var(--panel);
}
.swatch[aria-pressed="true"] {
  outline: 1px solid #c8d4d4;
}
.ember {
  background: #ffac72;
}
.ice {
  background: #75dbe4;
}
.violet {
  background: #baa0f7;
}
.transport {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.transport button {
  font-size: 10px;
}
.primary {
  background: var(--accent);
  color: #241c15;
  border-color: var(--accent);
  font-weight: 600;
}
.primary:hover {
  background: #ffc092;
  color: #241c15;
}
.audio-row {
  display: flex;
  align-items: center;
  grid-column: 1/-1;
  gap: 16px;
  margin-top: 5px;
}
.audio-row button {
  white-space: nowrap;
  border: 0;
  padding-left: 0;
  color: var(--muted);
}
.audio-row button[aria-pressed="true"] {
  color: var(--accent);
}
.audio-row input {
  min-width: 30px;
}
.science {
  padding: 20px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.science summary {
  cursor: pointer;
  min-height: 28px;
  color: var(--text);
}
.science pre {
  font: 9px/1.9 monospace;
  background: #0c1215;
  padding: 12px;
  white-space: pre-wrap;
  color: #b7cdcb;
}
.science select {
  display: block;
  width: 100%;
  color: var(--text);
  background: #11181b;
  border: 1px solid var(--line);
  padding: 10px;
  margin: 8px 0 18px;
  border-radius: 5px;
}
.nudge {
  display: flex;
  gap: 8px;
}
.nudge button {
  flex: 1;
}
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  min-height: 65px;
  font-size: 10px;
  color: var(--muted);
}
.bottom-bar strong {
  font-weight: 500;
  color: var(--text);
  margin-right: 12px;
}
.bottom-bar output {
  color: var(--accent);
  text-align: right;
  max-width: 40%;
  line-height: 1.5;
}
.skip:not(:focus),
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  display: block;
  padding: 15px;
  background: var(--accent);
  color: #111;
}
.nudge button {
  min-height: 44px;
}
@media (min-width: 1500px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .console {
    padding: 0 30px;
  }
}
@media (max-width: 1000px) {
  .instrument {
    padding: 0 16px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 292px;
  }
  .console {
    padding: 0 18px;
  }
  .edition {
    display: none;
  }
  h1 {
    font-size: 48px;
  }
  .chamber-title {
    left: 22px;
  }
  .view-actions {
    top: auto;
    bottom: 60px;
    right: 16px;
  }
  .chamber-footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .instrument {
    padding: 0;
  }
  .masthead {
    height: 62px;
    padding: 0 18px;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .chamber {
    height: 540px;
    min-height: 540px;
    border-bottom: 1px solid var(--line);
  }
  .chamber-title {
    top: 24px;
    left: 22px;
  }
  h1 {
    font-size: 51px;
  }
  .eyebrow {
    font-size: 8px;
    margin-bottom: 15px;
  }
  .chamber-title > p:last-child {
    font-size: 10px;
  }
  .console {
    border-left: 0;
    padding: 0 24px;
    overflow: visible;
  }
  .console-top {
    padding-top: 20px;
  }
  .model-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .model-list button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
    padding: 12px 5px;
  }
  .model-list button small,
  .radio-dot {
    display: none;
  }
  .model-list button > span:nth-child(2) {
    font-size: 12px;
  }
  .model-glyph {
    font-size: 27px;
  }
  .control-section {
    padding: 20px 0;
  }
  .transport button {
    min-height: 44px;
    font-size: 12px;
  }
  .bottom-bar {
    padding: 15px 24px;
    display: block;
    line-height: 1.8;
  }
  .bottom-bar output {
    display: block;
    text-align: left;
    max-width: none;
  }
  .chamber-footer {
    font-size: 7px;
    left: 20px;
    right: 20px;
  }
  .science {
    font-size: 12px;
  }
  .view-actions button {
    min-height: 44px;
  }
  .subtle {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
