:root {
  --page: #08090b;
  --bg: #0e1013;
  --panel: #161a20;
  --panel-2: #1c2129;
  --line: #262d38;
  --text: #e6e9ef;
  --muted: #8993a2;
  --accent: #5b8cff;
  --peak: #b06bff;
  --shelf: #2ec4b6;
  --cut: #ff9f43;
  --good: #43d39e;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

h1 {
  font-size: 26px;
  margin: 0 0 8px;
}

.intro p {
  color: var(--muted);
  max-width: 760px;
}

.rules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 8px 24px;
  padding-left: 18px;
}

.design {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.design-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.design-head h2 {
  margin: 0;
  font-size: 20px;
}

.pitch {
  margin: 2px 0 0;
  color: var(--muted);
}

.letter {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), var(--peak));
  font-weight: 700;
}

.badge {
  font-size: 11px;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--good);
  color: var(--good);
}

.design-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
}

.notes {
  flex: 1;
  min-width: 300px;
}

.notes h3 {
  margin-top: 0;
}

.notes li {
  margin-bottom: 8px;
}

/* The mock panel */
.frame,
.wide-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
}

.frame {
  width: 360px;
  min-height: 560px;
}

.wide-frame {
  width: 100%;
}

.columns {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 12px;
  align-items: start;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.column-title {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.card summary {
  cursor: pointer;
  color: var(--muted);
}

button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  padding: 5px 10px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

button.primary,
button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wide-button {
  width: 100%;
  padding: 8px;
}

input[type="text"],
input[type="search"] {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  padding: 6px 8px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
}

.hint {
  color: var(--muted);
  margin: 2px 0;
}

/* Header */
.head-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  font-weight: 700;
  flex: 1;
}

.hold {
  padding: 3px 9px;
  font-weight: 600;
  user-select: none;
}

.hold.on {
  background: var(--cut);
  border-color: var(--cut);
}

.switch {
  width: 30px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(91, 140, 255, 0.3);
  position: relative;
  padding: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 15px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
}

.switch.off {
  border-color: var(--line);
  background: var(--panel-2);
}

.switch.off::after {
  left: 2px;
  background: var(--muted);
}

.source {
  flex: 1;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  margin-right: 5px;
}

.dot.red {
  background: var(--danger);
}

.level {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Profile and library */
.profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile div {
  flex: 1;
}

.profile small {
  display: block;
  color: var(--muted);
}

.profile b {
  font-size: 14px;
}

.results h4 {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.item {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 4px;
  text-align: left;
}

.item small {
  color: var(--muted);
}

.item.on {
  background: rgba(91, 140, 255, 0.18);
  color: var(--text);
}

.library-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.library-actions button {
  padding: 5px 2px;
}

/* Sliders */
.macro {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.macro small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.macro input {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
}

.macro output {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.safety {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 6px;
  color: var(--muted);
}

/* Graph */
.graph {
  position: relative;
  touch-action: none;
  user-select: none;
}

.graph svg {
  display: block;
  width: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 8px;
  border-radius: 2px;
}

.pills {
  display: flex;
  gap: 4px;
}

.pills button {
  flex: 1;
  padding: 4px 0;
  border-radius: 999px;
}

/* Bands */
.chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
}

.chip i {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #0e1013;
}

.chip.muted {
  opacity: 0.45;
}

.chip.add {
  padding-left: 9px;
}

.inspector-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.inspector-top b {
  flex: 1;
}

.segments {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

.segments button {
  flex: 1;
  padding: 4px 0;
}

.steppers {
  display: grid;
  gap: 5px;
}

.steppers.compact {
  grid-template-columns: repeat(3, 1fr);
}

.stepper {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.stepper button {
  border: none;
  background: none;
  padding: 6px 0;
  font-size: 14px;
}

.stepper span {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stepper small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

/* Table */
.band-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.band-table th,
.band-table td {
  text-align: right;
  padding: 3px 4px;
  border-bottom: 1px solid var(--line);
}

.band-table th:first-child,
.band-table td:first-child {
  text-align: left;
}

.band-table tr.on td {
  background: rgba(91, 140, 255, 0.15);
}

/* Tabs, toolbar and sheet */
.tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--panel);
  border-radius: 9px;
}

.tabs button {
  flex: 1;
  border: none;
}

.pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.toolbar > div {
  flex: 1;
}

.preamp small {
  display: block;
  color: var(--muted);
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 75%;
  overflow-y: auto;
  padding: 10px;
  background: var(--panel);
  border-top: 1px solid var(--accent);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Text sections */
.text-section {
  margin-top: 56px;
  max-width: 820px;
}

.compare {
  width: 100%;
  border-collapse: collapse;
}

.compare th,
.compare td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}

.compare th {
  color: var(--muted);
  font-weight: 600;
}

/* Combine */
.frame textarea {
  width: 100%;
  min-height: 84px;
  margin: 6px 0;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 6px 8px;
  white-space: pre;
  resize: vertical;
}

.button-row {
  display: flex;
  gap: 6px;
}

.button-row button {
  flex: 1;
}

.target {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.target span {
  color: var(--muted);
}

.target button {
  flex: 1;
}

.layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.layer-row + .layer-row {
  border-top: 1px solid var(--line);
}

.layer-row .grow {
  flex: 1;
  min-width: 0;
}

.layer-row small {
  display: block;
  color: var(--muted);
}

.layer-row.off b {
  color: var(--muted);
}

.layer-mark {
  display: inline-block;
  width: 10px;
  height: 0;
  margin-right: 5px;
  border-top: 2px dashed;
  vertical-align: middle;
}

.chip-label {
  flex: none;
  align-self: center;
  color: #ffd166;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 2px 0 6px;
}

.preamp-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 54px auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 6px;
}

.preamp-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.preamp-row input {
  width: 100%;
  accent-color: var(--accent);
}

details.earlier {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

details.earlier > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}
