/* Sternbahn beta page. Colours mirror the app's colour systems (Sources/Nebula/Palettes.swift):
   NEPTUNE to start with (also in dark mode); script.js swaps the whole set when a colour system is picked. */

:root {
  --bg: #e9eff4;
  --grid: rgba(204, 219, 229, 0.55);
  --panel: rgba(255, 255, 255, 0.55);
  --card: rgba(255, 255, 255, 0.82);
  --surface: #ffffff;
  --border: #b8ccdb;
  --ink: #1c2b3b;
  --muted: #617587;
  --faint: #9eb0bf;
  --track: #d9e3eb;
  --signal: #0fa8e0;
  --selection: #f7a321;
  --modulation: #f7a321;
  --source: #0fa8e0;
  --filter: #2f86d9;
  --modulator: #11a3a6;
  --effect: #5b78d6;
  --utility: #5f7684;
  --glow: 1;
  --shadow: rgba(28, 43, 59, 0.1);

  --label: "IBM Plex Sans Condensed", "SF Pro Text", -apple-system, "Arial Narrow", sans-serif;
  --text: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: min(1280px, calc(100vw - 32px));
  --radius: 6px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* The canvas's "+" marks every six grid squares */
.canvas-marks {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--faint);
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144'%3E%3Cpath d='M138 144h12M144 138v12' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 144px 144px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144'%3E%3Cpath d='M138 144h12M144 138v12' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 0 0 / 144px 144px;
}

main,
.strip,
.status {
  position: relative;
  z-index: 1;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--selection);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- The app's vocabulary ---------- */

/* HUD panel: hairline border, rounded 6, corner brackets just outside */
.hud {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hud::after,
.module::after {
  --c: color-mix(in srgb, var(--muted) 70%, transparent);
  --l: 10px;
  --w: 1.2px;
  position: absolute;
  inset: -4px;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}

.muted-label,
.hud-title,
.field-label,
.seg-label,
.port-label,
.chip,
.link-label {
  font-family: var(--label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted-label,
.port-label,
.seg-label {
  color: var(--muted);
}

.hud-title {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.dots {
  color: var(--muted);
  font-family: var(--label);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 calc(4px * var(--glow)) var(--signal);
  animation: blink 1.94s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

/* Segmented buttons (LP · HP · BP · NOTCH); selected is amber */
.segmented {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}

.segmented .seg-label {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--border);
}

.segmented button,
.seg-button {
  padding: 7px 14px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button + button {
  border-left: 1px solid var(--border);
}

.seg-button {
  border: 1px solid var(--border);
  border-radius: 4px;
}

.segmented button:hover,
.seg-button:hover {
  background: color-mix(in srgb, var(--selection) 14%, var(--surface));
}

.segmented button.selected,
.segmented button[aria-checked="true"],
.seg-button.selected {
  color: #1c1405;
  background: var(--selection);
  border-color: var(--selection);
  box-shadow: 0 0 calc(6px * var(--glow)) color-mix(in srgb, var(--selection) 45%, transparent);
}

.segmented.wide {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 28px 0 22px;
}

.segmented.wide button {
  flex: 1 1 120px;
  padding: 11px 10px;
}

/* Knob: a 270° arc gauge, drawn by script.js into <span data-knob> */
.knob {
  display: inline-block;
  flex: none;
  width: 52px;
  height: 52px;
  cursor: ns-resize;
  touch-action: none;
}

.knob.big {
  width: 76px;
  height: 76px;
}

.knob svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ---------- Top strip ---------- */

.strip {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  width: var(--page);
  margin: 10px auto 0;
  padding: 10px 12px 10px 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--label);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.32em;
  white-space: nowrap;
}

.brand img {
  border-radius: 6px;
}

.readouts {
  display: flex;
  margin: 0;
}

.readouts div {
  display: flex;
  gap: 8px;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.readouts dt {
  color: var(--muted);
}

.readouts dd {
  margin: 0;
  font-weight: 600;
}

.slots {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.slots-label {
  margin-right: 6px;
  color: var(--muted);
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.slots a {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all 0.15s ease;
}

.slots a:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.slots a.active {
  color: #1c1405;
  background: var(--selection);
  border-color: var(--selection);
  box-shadow: 0 0 calc(6px * var(--glow)) color-mix(in srgb, var(--selection) 50%, transparent);
}

/* The transport's play button: signal-tinted, lit */
.play-button,
.t-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--signal);
  background: color-mix(in srgb, var(--signal) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--signal) 60%, var(--border));
  border-radius: 5px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.play-button {
  padding: 8px 14px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.play-button span {
  color: var(--ink);
}

.play-button:hover,
.t-button:hover {
  box-shadow: 0 0 calc(8px * var(--glow)) color-mix(in srgb, var(--signal) 45%, transparent);
}

.play-button svg,
.t-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 56px;
  width: var(--page);
  margin: 0 auto;
  padding: 72px 0 0;
}

.hero h1 {
  margin: 22px 0 22px;
  font-family: var(--label);
  font-size: clamp(40px, 4.9vw, 70px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--signal);
  text-shadow: 0 0 calc(10px * (var(--glow) - 1)) color-mix(in srgb, var(--signal) 50%, transparent);
}

.lede {
  max-width: 34em;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 18px;
}

.signup {
  max-width: 540px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.signup-row {
  display: flex;
  gap: 8px;
}

.signup input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-family: var(--label);
  font-size: 15px;
  letter-spacing: 0.04em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.signup input::placeholder {
  color: var(--faint);
}

.signup input:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 20%, transparent);
}

.signup .seg-button {
  padding: 11px 16px;
  white-space: nowrap;
}

.signup-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.privacy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.turnstile:not(:empty) {
  margin-top: 10px;
}

.form-status {
  color: var(--signal);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.signup.is-error input {
  border-color: #e5484d;
}

.signup.is-error .form-status {
  color: #e5484d;
}

.hero-visual {
  position: relative;
  margin: 0;
}

.frame {
  padding: 6px;
  box-shadow: 0 18px 50px var(--shadow);
}

.frame img,
.frame video {
  width: 100%;
  border-radius: 3px;
}

/* Reserve the space before the media loads, so jumps to #beta etc. land in the right place */
.frame img {
  height: auto;
}

.frame video {
  aspect-ratio: 1920 / 1222;
}

.notice {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 12px 12px 16px;
  background: var(--card);
  box-shadow: 0 12px 40px var(--shadow);
  font-family: var(--label);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  transform: translateX(-50%);
}

.notice[hidden] {
  display: none;
}

.notice.error .led {
  background: #e5484d;
  box-shadow: 0 0 calc(4px * var(--glow)) #e5484d;
}

.notice .seg-button {
  padding: 5px 12px;
  font-size: 11px;
}

.transport {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
}

.transport .hud-title {
  margin-right: auto;
}

.t-button {
  width: 40px;
  height: 36px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border);
}

.t-button.play.is-on {
  color: var(--signal);
  background: color-mix(in srgb, var(--signal) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--signal) 60%, var(--border));
}

.bpm {
  display: grid;
  padding: 2px 12px;
  line-height: 1.1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.bpm span {
  color: var(--muted);
  font-family: var(--label);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.bpm strong {
  font-family: var(--label);
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.port-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.port-label i {
  width: 7px;
  height: 7px;
  background: var(--family, var(--source));
}

.hero-visual .port-label.out {
  right: 6%;
  bottom: -30px;
}

/* ---------- Cables between the modules ---------- */

.cable {
  position: relative;
  z-index: 2;
  width: var(--page);
  height: 200px;
  margin: 0 auto;
  pointer-events: none;
}

.cable svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cable .wire {
  fill: none;
  stroke: var(--family);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 calc(2px * var(--glow)) color-mix(in srgb, var(--family) 60%, transparent));
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: var(--len, 2000);
  transition: stroke-dashoffset 1.1s cubic-bezier(0.5, 0, 0.2, 1);
}

.cable.on .wire {
  stroke-dashoffset: 0;
}

.cable .halo {
  fill: none;
  stroke: var(--family);
  stroke-opacity: 0.16;
  stroke-width: 9;
  stroke-linecap: round;
}

.cable .pulse {
  fill: var(--family);
  opacity: 0;
  filter: drop-shadow(0 0 calc(3px * var(--glow)) var(--family));
}

.cable.on .pulse {
  opacity: 0.9;
  transition: opacity 0.4s ease 1s;
}

.cable .mid {
  fill: var(--family);
  opacity: 0.8;
}

.cable[data-family="source"] { --family: var(--source); }
.cable[data-family="filter"] { --family: var(--filter); }
.cable[data-family="effect"] { --family: var(--effect); }
.cable[data-family="modulator"] { --family: var(--modulator); }
.cable[data-family="utility"] { --family: var(--utility); }

/* ---------- Module sections (big cards) ---------- */

.module {
  --family: var(--source);
  position: relative;
  width: var(--page);
  margin: 0 auto;
  padding: 0 44px 56px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px var(--shadow);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.module[data-family="filter"] { --family: var(--filter); }
.module[data-family="effect"] { --family: var(--effect); }
.module[data-family="modulator"] { --family: var(--modulator); }
.module[data-family="utility"] { --family: var(--utility); }

.module-head,
.faq-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 -44px 40px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.module-name {
  margin: 0;
  font-family: var(--label);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.module-name span {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.14em;
}

.module-head .dots {
  margin-left: auto;
  font-size: 20px;
}

.slot-chip {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #1c1405;
  background: var(--selection);
  border-radius: 3px;
  font-family: var(--label);
  font-size: 14px;
  font-weight: 600;
}

/* Ports: hollow input on the top edge, filled output on the bottom edge */
.port {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.port.in {
  top: -9px;
  left: calc(22% - 9px);
  background: var(--bg);
  border: 2px solid var(--family-in, var(--family));
}

.port.out {
  bottom: -9px;
  left: calc(78% - 9px);
  background: var(--family);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--family) 22%, transparent),
    0 0 calc(6px * var(--glow)) var(--family);
}

.module .port-label.in {
  top: 14px;
  left: calc(22% + 16px);
  display: none;
}

.module .port-label.out {
  right: 22px;
  bottom: 14px;
}

.headline {
  margin: 0;
  font-family: var(--label);
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.body {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 36px;
}

.shot {
  margin: 0;
}

.shot-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 6px 4px;
  color: var(--muted);
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.shot-caption span:first-child {
  color: var(--ink);
  font-weight: 500;
}

/* Mini cards: header, knob, body, IN/OUT footer, like a module card */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
}

.mini-card header {
  display: flex;
  align-items: center;
  margin: 0 14px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--border);
}

.mini-card h4 {
  margin: 0;
  font-family: var(--label);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.mini-card header .dots {
  margin-left: auto;
}

.mini-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex: 1;
  padding: 16px 14px;
}

.mini-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.mini-card footer {
  display: flex;
  justify-content: space-between;
  padding: 0 14px 10px;
  color: var(--muted);
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.mini-card footer i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  background: var(--family);
}

/* Readout bar, like the app's header readouts */
.readout-bar {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 0;
  background: var(--surface);
}

.readout-bar div {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-right: 1px solid var(--border);
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.readout-bar div:last-child {
  border-right: 0;
}

.readout-bar dt {
  color: var(--muted);
}

.readout-bar dd {
  margin: 0;
  font-weight: 600;
  color: var(--family);
}

/* Step rows: two tracks of different length, playheads drifting apart */
.stepper {
  margin-bottom: 28px;
  padding: 14px 18px 16px;
  background: var(--card);
}

.stepper-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.slot-row {
  display: flex;
  gap: 3px;
}

.slot-row i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--label);
  font-size: 10px;
  font-style: normal;
}

.slot-row i.on {
  color: #1c1405;
  background: var(--selection);
  border-color: var(--selection);
}

.stepper-head .seg-button {
  margin-left: auto;
  padding: 5px 12px;
  font-size: 11px;
}

.track-row {
  display: grid;
  grid-template-columns: 96px 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.track-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.track-name i {
  width: 3px;
  height: 22px;
  background: var(--selection);
}

.track-len {
  color: var(--muted);
  font-family: var(--label);
  font-size: 13px;
  text-align: center;
}

.cells {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 5px;
  max-width: 900px;
}

.cells i {
  position: relative;
  display: grid;
  place-items: center;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.cells i::before {
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: var(--faint);
}

.cells i.note::before {
  width: 12px;
  height: 12px;
  background: var(--signal);
  box-shadow: 0 0 calc(3px * var(--glow)) color-mix(in srgb, var(--signal) 60%, transparent);
}

.cells i.head {
  border-color: var(--selection);
  background: color-mix(in srgb, var(--selection) 22%, var(--surface));
  box-shadow: 0 0 calc(6px * var(--glow)) color-mix(in srgb, var(--selection) 40%, transparent);
}

.cells i.head.note::before {
  background: var(--selection);
}

.cells i.off {
  visibility: hidden;
}

.stepper-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Editors */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.panel-crop {
  background: var(--surface);
}

.param-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.param-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.param-list span {
  font-weight: 500;
}

.param-list strong {
  color: var(--family);
  font-weight: 500;
  text-align: right;
}

/* SunVox */
.engine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.engine-grid .param-list {
  grid-template-columns: 1fr;
  margin: 0;
}

.credit {
  display: block;
  padding: 22px 24px;
  background: var(--card);
  transition: border-color 0.15s ease;
}

.credit:hover {
  border-color: var(--signal);
}

.credit strong {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--label);
  font-size: 26px;
  font-weight: 500;
}

.credit p {
  margin: 0 0 14px;
  color: var(--muted);
}

.link-label {
  color: var(--signal);
}

/* OUTPUT */
.output .module-head {
  margin-bottom: 36px;
}

.output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 44px;
  align-items: center;
}

.output-grid .body {
  margin-top: 16px;
}

.level {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.meter {
  display: flex;
  gap: 4px;
  height: 64px;
}

.meter i {
  position: relative;
  width: 8px;
  background: var(--track);
  border-radius: 1px;
  overflow: hidden;
}

.meter i::after {
  position: absolute;
  inset: auto 0 0;
  height: calc(var(--m, 0.1) * 100%);
  content: "";
  background: var(--signal);
  box-shadow: 0 0 calc(4px * var(--glow)) var(--signal);
  transition: height 0.12s ease-out;
}

/* FAQ: the inspector's disclosure rows */
.faq {
  width: var(--page);
  margin: 72px auto 0;
  padding: 0 24px 16px;
  background: var(--card);
}

.faq-head {
  margin: 0 -24px 6px;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-family: var(--label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  width: 7px;
  height: 7px;
  content: "";
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.faq details[open] summary::before {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 46em;
  margin: -4px 0 18px 20px;
  color: var(--muted);
}

/* Status bar */
.status {
  width: var(--page);
  margin: 72px auto 16px;
  padding: 10px 16px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.status-row b {
  margin-right: 6px;
  color: var(--muted);
  font-weight: 500;
}

.status-row .grow {
  flex: 1;
}

.attribution {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.attribution a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1180px) {
  .readouts {
    display: none;
  }
}

@media (max-width: 980px) {
  .hero,
  .split,
  .editor-grid,
  .engine-grid,
  .output-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 40px;
    padding-top: 48px;
  }

  .split {
    gap: 16px;
  }

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

  .panel-crop {
    max-width: 380px;
  }

  .level {
    display: none;
  }
}

@media (max-width: 720px) {
  .slots-label,
  .play-button span {
    display: none;
  }

  .strip {
    gap: 12px;
  }

  .brand {
    font-size: 15px;
    letter-spacing: 0.24em;
  }

  .slots a {
    width: 22px;
    height: 22px;
  }

  .module {
    padding: 0 18px 44px;
  }

  .module-head,
  .faq-head {
    margin-left: -18px;
    margin-right: -18px;
    padding: 14px 16px;
  }

  .module-name {
    font-size: 18px;
  }

  .module-name span {
    display: none;
  }

  .param-list {
    grid-template-columns: 1fr;
  }

  .signup-row {
    flex-direction: column;
  }

  .track-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .track-len {
    display: none;
  }

  .cells {
    gap: 3px;
  }

  .cable {
    height: 130px;
  }

  .readout-bar div {
    flex: 1 1 45%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 520px) {
  .slots {
    display: none;
  }

  .play-button {
    margin-left: auto;
  }
}

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

  .led {
    animation: none;
  }

  .cable .wire {
    transition: none;
    stroke-dashoffset: 0;
  }
}
