/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  --bg:      #050505;
  --bg2:     #101010;
  --bg3:     #1A1A1A;
  --bg4:     #222222;
  --border:  rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text:    #F5F5F5;
  --text2:   #A3A3A3;
  --text3:   #606060;
  --yellow:  #DFFF00;
  --yellow-dim: rgba(223,255,0,0.10);
  --yellow-border: rgba(223,255,0,0.25);
  --red:     #FF3B3B;
  --red-dim: rgba(255,59,59,0.12);
  --green:   #00E56B;
  --green-dim: rgba(0,229,107,0.10);
  --font:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', monospace;
  --radius:  12px;
  --radius-sm: 7px;
  --radius-xs: 4px;
  --shadow:  0 1px 3px rgba(0,0,0,0.4);
  --transition: 0.15s ease;
}

/* ── Base ── */
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* ── Header ── */
.header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(5,5,5,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 26px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-active { color: var(--yellow) !important; }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: var(--yellow);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform 0.1s;
  white-space: nowrap;
}
.nav-cta:hover { background: #cbeb00; }
.nav-cta:active { transform: scale(0.97); }

/* ── ON AIR badge ── */
.on-air {
  display: none;
  align-items: center;
  gap: 7px;
  background: var(--red-dim);
  border: 1px solid rgba(255,59,59,0.3);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 20px;
}
.on-air.visible { display: flex; }
.on-air-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.15} }

/* ── Layout ── */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Hero ── */
.hero { padding: 16px 0 8px; }
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 640px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.hero-trust {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-trust span::before { content: '✓ '; color: var(--yellow); }

/* ── Mode cards ── */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) { .mode-cards { grid-template-columns: 1fr; } }

.mode-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition);
}
.mode-card:hover { border-color: var(--border-strong); }
.mode-card-featured {
  border-color: var(--yellow-border);
  background: linear-gradient(135deg, rgba(223,255,0,0.04) 0%, var(--bg2) 100%);
}
.mode-card-icon { font-size: 28px; line-height: 1; }
.mode-card-title { font-size: 16px; font-weight: 600; color: var(--text); }
.mode-card-desc { font-size: 13px; color: var(--text2); line-height: 1.6; flex: 1; }
.mode-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: var(--font);
  transition: background var(--transition), transform 0.1s;
  margin-top: 4px;
  width: 100%;
}
.mode-card-btn:active { transform: scale(0.97); }
.mode-card-btn-primary { background: var(--yellow); color: #000; }
.mode-card-btn-primary:hover { background: #cbeb00; }
.mode-card-btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border-strong); }
.mode-card-btn-secondary:hover { background: var(--bg4); }

/* ── Divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}

/* ── Cards ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 18px;
}
.card-label-hint {
  font-size: 10px;
  color: var(--text3);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Collapsible advanced ── */
.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  padding: 10px 0;
  width: 100%;
  text-align: left;
  transition: color var(--transition);
}
.advanced-toggle:hover { color: var(--text2); }
.advanced-toggle-chevron { transition: transform 0.2s; font-size: 10px; }
.advanced-toggle.open .advanced-toggle-chevron { transform: rotate(180deg); }
.advanced-section { display: none; }
.advanced-section.open { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Form controls ── */
.control-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.control-row:last-child { margin-bottom: 0; }
.field-label { font-size: 14px; color: var(--text2); min-width: 56px; flex-shrink: 0; }

.select {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 36px 10px 14px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23606060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color var(--transition);
}
.select:focus { border-color: var(--yellow); }
.select option { background: var(--bg3); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform 0.1s, opacity var(--transition);
  outline: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.28; cursor: not-allowed; pointer-events: none; }

.btn-record { background: var(--yellow); color: #000; font-weight: 700; font-size: 15px; padding: 13px 28px; }
.btn-record:hover:not(:disabled) { background: #cbeb00; }
.btn-record.recording { background: var(--red); color: #fff; }
.btn-record.recording:hover:not(:disabled) { background: #e02e2e; }

.btn-ghost {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg4); }

.btn-sm { font-size: 12px; padding: 7px 13px; font-weight: 500; }
.btn-xs { font-size: 11px; padding: 5px 10px; font-weight: 500; }

.rec-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #000;
  flex-shrink: 0;
}
.btn-record.recording .rec-dot {
  background: #fff;
  animation: blink 1s infinite;
}

/* ── Notice / alert bars ── */
.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--yellow-dim);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(223,255,0,0.85);
  line-height: 1.5;
}
.notice-bar svg { flex-shrink: 0; margin-top: 1px; }

.browser-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(223,255,0,0.05);
  border: 1px solid rgba(223,255,0,0.12);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
}
.browser-warning strong { color: var(--text2); }

.error-card {
  background: var(--red-dim);
  border: 1px solid rgba(255,59,59,0.25);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.error-title { font-size: 15px; font-weight: 600; color: var(--red); margin-bottom: 6px; }
.error-text { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ── Knobs ── */
.knobs-row { display: flex; align-items: center; gap: 16px; }
.knob-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 88px;
}
.knob-label { font-size: 11px; color: var(--text2); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.knob-canvas { display: block; cursor: ns-resize; user-select: none; }
.knob-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
}
.knob-input {
  background: transparent;
  border: none;
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  width: 44px;
  text-align: right;
  outline: none;
}
.knob-input::-webkit-inner-spin-button,
.knob-input::-webkit-outer-spin-button { opacity: 0; }
.knob-unit { font-family: var(--mono); font-size: 10px; color: var(--text3); }
.knob-hint { font-size: 10px; color: var(--text3); text-align: center; max-width: 88px; line-height: 1.4; }

/* ── Meter ── */
.meter-center { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.meter-wrap { width: 100%; }
.meter-bar {
  height: 10px;
  background: var(--bg3);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  margin-bottom: 5px;
}
.meter-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--level, 0%);
  background: linear-gradient(to right, var(--green) 0%, #a8ff00 65%, var(--yellow) 80%, var(--red) 93%);
  border-radius: 5px;
  transition: width 0.04s linear;
}
.meter-peaks {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text3);
}

.clip-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--red-dim);
  border: 1px solid rgba(255,59,59,0.3);
  color: var(--red);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
@keyframes fadeIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

/* ── Waveform ── */
.waveform-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.wave-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wave-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text3); }
.wave-hint { font-size: 10px; color: rgba(255,59,59,0.5); font-family: var(--mono); }
.wave-canvas { width: 100%; display: block; border-radius: 4px; min-height: 100px; }

/* ── Recorder ── */
.recorder-card { }
.duration-display { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.duration {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.duration-status { font-size: 13px; color: var(--text3); }

.controls { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }

/* ── Markers ── */
.markers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.markers-label { font-size: 11px; color: var(--text3); margin-right: 4px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.btn-marker {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 4px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  font-weight: 500;
}
.btn-marker:hover:not(:disabled) { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-dim); }
.btn-marker:disabled { opacity: 0.25; cursor: not-allowed; }

.marker-log { margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--text2); min-height: 18px; line-height: 2; }
.size-display { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text3); min-height: 16px; }

/* ── Setup footer ── */
.setup-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Downloads ── */
.downloads { display: none; }
.downloads.visible { display: block; }
.dl-grid { display: flex; flex-direction: column; gap: 10px; }
.dl-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dl-info { flex: 1; min-width: 0; }
.dl-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.dl-meta { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: #000;
  text-decoration: none;
  flex-shrink: 0;
  transition: background var(--transition);
  letter-spacing: 0.02em;
}
.dl-btn:hover { background: #cbeb00; }

/* ── How it works ── */
.how-it-works {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.hiw-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.06em; }
.hiw-steps { display: flex; flex-direction: column; gap: 14px; }
.hiw-step { display: flex; align-items: flex-start; gap: 14px; }
.hiw-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.hiw-text { font-size: 14px; color: var(--text2); line-height: 1.55; }

/* ── Tips ── */
.tips-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.tips-title { font-size: 10px; font-weight: 700; color: var(--text3); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.1em; }
.tips-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tips-list li { font-size: 13px; color: var(--text2); padding-left: 18px; position: relative; line-height: 1.55; }
.tips-list li::before { content: '—'; position: absolute; left: 0; color: var(--text3); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  font-family: var(--mono);
}
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-privacy-note { font-size: 11px; color: var(--text3); text-align: center; max-width: 480px; line-height: 1.6; }

/* ── Status chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.chip-ready { background: rgba(163,163,163,0.1); color: var(--text2); border: 1px solid rgba(163,163,163,0.2); }
.chip-recording { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,59,59,0.3); }
.chip-recording .chip-dot { background: var(--red); animation: blink 1s infinite; }
.chip-consented { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,229,107,0.2); }
.chip-observer { background: rgba(120,120,255,0.08); color: #9999ff; border: 1px solid rgba(120,120,255,0.2); }
.chip-sending { background: rgba(223,255,0,0.08); color: var(--yellow); border: 1px solid var(--yellow-border); }
.chip-done { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,229,107,0.2); }
.chip-clipping { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,59,59,0.3); }

/* ── Mobile ── */
@media (max-width: 600px) {
  .header-inner { padding: 0 16px; }
  .main { padding: 32px 16px 80px; gap: 14px; }
  .hero-title { font-size: 26px; }
  .hero-sub { font-size: 15px; }
  .duration { font-size: 36px; }
  .btn-record { font-size: 14px; padding: 12px 22px; }
  .knobs-row { gap: 10px; }
  .knob-group { min-width: 76px; }
  .knob-canvas { width: 68px !important; height: 68px !important; }
  .card { padding: 18px; }
  .nav-cta { display: none; }
}

/* ── Level sliders ── */
.level-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.level-slider-label {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
  min-width: 80px;
  flex-shrink: 0;
}
.level-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--bg3);
  border: 1px solid var(--border);
  outline: none;
  cursor: pointer;
}
.level-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 3px rgba(223,255,0,0.15);
}
.level-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
  border: none;
}
.level-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(223,255,0,0.3);
}
.level-slider-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--yellow);
  min-width: 48px;
  text-align: right;
  font-weight: 600;
}

/* ── Share panel buttons ── */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: #fff;
  font-family: var(--font);
  transition: opacity 0.15s, transform 0.1s;
}
.share-btn:hover { opacity: 0.88; }
.share-btn:active { transform: scale(0.97); }

/* ── Guest join box ── */
.guest-join-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.join-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.join-input:focus { border-color: var(--yellow); }
.join-input::placeholder { color: var(--text3); }
