/* ── Scroll Audio — experiment-specific styles ── */
/* Base tokens loaded from ../lab.css (theme-aware) */

:root {
  --panel-w: 28rem;
}

body {
  padding-right: var(--panel-w);
}

/* ── Content ──────────────────────────────── */

.content {
  max-width: 68ch;
  padding: var(--spacing-big) var(--spacing-sm) var(--spacing-lg);
  line-height: var(--lineHeight-taller);
}

.content h1 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: var(--fontWeight-medium);
  letter-spacing: var(--letterSpacing-tight);
  margin-bottom: var(--spacing-xxxs);
}

.content .eyebrow {
  margin-bottom: var(--spacing-sm);
}

.content h2 {
  font-size: var(--font-3xs);
  letter-spacing: var(--letterSpacing-loose);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--spacing-md) 0 var(--spacing-xxs);
  font-weight: var(--fontWeight-medium);
}

.content p {
  font-size: var(--font-2xs);
  margin-bottom: var(--spacing-xs);
}

.content .lede {
  font-size: var(--font-xs);
  font-weight: var(--fontWeight-normal);
  margin-bottom: var(--spacing-sm);
}

/* ── Panel ──────────────────────────────── */

.panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-w);
  height: 100vh;
  background: var(--background-darker);
  border-left: var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-sm);
  gap: var(--spacing-xs);
  overflow: hidden;
}

.panel-title {
  font-size: var(--font-3xs);
  font-weight: var(--fontWeight-medium);
  letter-spacing: var(--letterSpacing-loose);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Drop zone ──────────────────────────── */

.drop-zone {
  border: 1px dashed var(--color-medium);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xs);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: var(--font-3xs);
  color: var(--text-muted);
  line-height: var(--lineHeight-tall);
}

.drop-zone:hover, .drop-zone.over {
  border-color: var(--foreground);
  background: var(--background-darker);
  color: var(--foreground);
}

.drop-zone button {
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.4rem;
  padding: 0;
}

/* ── Track info ─────────────────────────── */

.track-info {
  font-size: var(--font-3xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Mode toggle ────────────────────────── */

.mode-toggle {
  display: flex;
  border: var(--border);
  border-radius: var(--radius-sm);
}

.mode-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--fontFamily-primary);
  font-size: var(--font-3xs);
  font-weight: var(--fontWeight-medium);
  letter-spacing: var(--letterSpacing-loose);
  padding: var(--spacing-xxs) 0;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
}

.mode-btn.active {
  background: var(--background-darker);
  color: var(--foreground);
}

.mode-btn:not(:last-child) {
  border-right: var(--border);
}

/* ── Genre toggle ──────────────────────── */

.genre-toggle {
  display: flex;
  border: var(--border);
  border-radius: var(--radius-sm);
}

.genre-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--fontFamily-primary);
  font-size: var(--font-3xs);
  font-weight: var(--fontWeight-medium);
  letter-spacing: var(--letterSpacing-loose);
  padding: var(--spacing-xxxs) 0;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
}

.genre-btn.active {
  background: var(--background-darker);
  color: var(--foreground);
}

.genre-btn:not(:last-child) {
  border-right: var(--border);
}

/* ── Waveform ───────────────────────────── */

#waveform {
  width: 100%;
  height: 72px;
  display: block;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
}

/* ── Stats ──────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-xxs);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxxs);
}

.stat .label {
  font-size: var(--font-3xs);
  font-weight: var(--fontWeight-medium);
  letter-spacing: var(--letterSpacing-loose);
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat .value {
  font-size: var(--font-2xs);
}

/* ── Progress bar ───────────────────────── */

.progress-bar {
  height: 2px;
  background: var(--background-darker);
  position: relative;
  border-radius: 1px;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--foreground);
  width: 0%;
  transition: none;
  border-radius: 1px;
}

/* ── Mode description ───────────────────── */

.mode-desc {
  font-size: var(--font-3xs);
  color: var(--text-muted);
  line-height: var(--lineHeight-tall);
  flex: 1;
}

.mode-desc p { margin-bottom: 0; }

/* ── Source hint ────────────────────────── */

.source-hint {
  font-size: var(--font-3xs);
  color: var(--text-muted);
  border-top: var(--border);
  padding-top: var(--spacing-xs);
}

.source-hint a { color: var(--foreground); }
.source-hint p { margin-bottom: var(--spacing-xxxs); }

/* ── Layers indicator ───────────────────── */

.layers-indicator {
  display: flex;
  gap: var(--spacing-xxxs);
  align-items: center;
}

.layer-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: var(--border);
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
  display: block;
}

.layer-pip.active {
  background: var(--foreground);
  border-color: var(--foreground);
}

/* ── Scroll filler ──────────────────────── */

pre.scroll-filler {
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--font-3xs);
  color: var(--text-muted);
  line-height: var(--lineHeight-tall);
  margin: var(--spacing-big) 0 0;
  white-space: pre;
  user-select: none;
}
