:root {
  --bg: #101214;
  --panel: #171b1f;
  --panel-2: #20262c;
  --text: #eef2f5;
  --muted: #9ba7b2;
  --line: #343d46;
  --left: #f2a06b;
  --right: #72b7ff;
  --accent: #63d297;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  padding: 24px;
}

main {
  max-width: 980px;
  margin: 0 auto;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
}

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

button,
.bucket-link {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

button.active {
  border-color: var(--accent);
  background: #1d3428;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.bucket-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.axis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}

.axis-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.axis-name {
  font-size: 20px;
  font-weight: 650;
}

.axis-subtitle,
.meta {
  color: var(--muted);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.labels span:first-child {
  color: var(--left);
  font-weight: 650;
}

.labels span:last-child {
  color: var(--right);
  font-weight: 650;
  text-align: right;
}

.midpoint {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

input[type="range"] {
  width: 100%;
  margin: 8px 0 16px;
  accent-color: var(--accent);
}

.readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
}

.metric span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.metric b {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

audio {
  width: 100%;
  margin-top: 4px;
}

.meta {
  margin-top: 14px;
}

@media (max-width: 720px) {
  body {
    padding: 14px;
  }

  .topbar,
  .axis-title {
    display: block;
  }

  .bucket-link {
    margin-top: 12px;
  }

  #playButton {
    margin-top: 12px;
  }

  .readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
