:root {
  --bg0: #0b0d10;
  --bg1: #12161c;
  --ink: #e8ecf2;
  --muted: #8b93a1;
  --line: rgba(232, 236, 242, 0.12);
  --signal: #b8f34d;
  --signal-dim: #7aa62f;
  --warn: #ffb020;
  --danger: #ff6b4a;
  --card: rgba(255, 255, 255, 0.03);
  --font-display: "Unbounded", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(184, 243, 77, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(80, 120, 255, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, #0a0c0f);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

.shell {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.25rem;
}
.brand span { color: var(--signal); }

.nav {
  display: flex;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav a.active { color: var(--signal); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--signal); color: #10140a; }
.btn-voice {
  background: linear-gradient(135deg, #c8ff52 0%, #9adf2a 100%);
  color: #0c1206;
  gap: 0.75rem;
  padding: 0.95rem 1.4rem 0.95rem 1.15rem;
  box-shadow: 0 0 0 1px rgba(184, 243, 77, 0.25), 0 10px 30px rgba(184, 243, 77, 0.12);
}
.btn-voice:hover {
  background: linear-gradient(135deg, #d6ff7a 0%, #b8f34d 100%);
}
.btn-voice-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(184, 243, 77, 0.45);
  gap: 0.75rem;
  padding: 0.9rem 1.3rem 0.9rem 1.1rem;
}
.btn-voice-ghost:hover {
  border-color: var(--signal);
  background: rgba(184, 243, 77, 0.08);
  transform: translateY(-1px);
}
.btn-voice-ghost .btn-wave i { background: var(--signal); }
.btn-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.btn-wave i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: #1a2208;
  animation: btnPulse 1.1s ease-in-out infinite;
  transform-origin: bottom;
}
.btn-wave i:nth-child(1) { height: 6px; animation-delay: 0s; }
.btn-wave i:nth-child(2) { height: 12px; animation-delay: 0.12s; }
.btn-wave i:nth-child(3) { height: 16px; animation-delay: 0.24s; }
.btn-wave i:nth-child(4) { height: 9px; animation-delay: 0.36s; }
.btn-wave i:nth-child(5) { height: 13px; animation-delay: 0.48s; }
@keyframes btnPulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-danger { background: var(--danger); color: #1a0905; }
.btn-block { width: 100%; }

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  align-items: end;
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero-copy {
  max-width: 34rem;
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  line-height: 1.12;
  margin: 0 0 1.15rem;
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--signal);
}
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 28rem;
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.wave {
  position: absolute;
  inset: auto 0 8% auto;
  width: min(58vw, 640px);
  height: 280px;
  opacity: 0.9;
  z-index: 1;
  pointer-events: none;
}
.wave i {
  position: absolute;
  bottom: 0;
  width: 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--signal), transparent);
  animation: pulse 1.4s ease-in-out infinite;
  transform-origin: bottom;
}
@keyframes pulse {
  0%, 100% { transform: scaleY(0.35); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}
.section.compact { padding: 2rem 0 3rem; border-top: 0; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}
.section .lead {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 36rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.step {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.step p { margin: 0; color: var(--muted); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
}
.panel-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

label, .field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field { margin-bottom: 1rem; }
.hint { color: var(--muted); font-size: 0.84rem; margin-top: 0.35rem; }

input, select {
  width: 100%;
  background: #0a0c0f;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  outline: none;
}
input:focus, select:focus { border-color: var(--signal-dim); }

.status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.3rem;
}
.status.ok { color: var(--signal); }
.status.err { color: var(--danger); }

.voice-list {
  display: grid;
  gap: 0.5rem;
  max-height: 280px;
  overflow: auto;
  padding-right: 0.25rem;
}
.voice-item {
  text-align: left;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  cursor: pointer;
}
.voice-item.active {
  border-color: var(--signal);
  background: rgba(184, 243, 77, 0.08);
}
.voice-item small { color: var(--muted); }

.meter {
  height: 8px;
  border-radius: 999px;
  background: #1a1f27;
  overflow: hidden;
  margin: 0.75rem 0 1rem;
}
.meter > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--signal);
  transition: width 0.08s linear;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
}
.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.tab.active {
  color: #10140a;
  background: var(--signal);
  border-color: var(--signal);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
}
.card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.slider-row { margin-bottom: 1rem; }
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.slider-val {
  font-family: var(--font-mono);
  color: var(--signal);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--signal);
  padding: 0;
  background: transparent;
  border: 0;
}

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  color: var(--ink);
}
.check input {
  width: auto;
  margin-top: 0.2rem;
  accent-color: var(--signal);
}
.check strong { display: block; font-weight: 600; }
.check span { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }

.warn-box {
  margin-top: 0.9rem;
  border: 1px solid rgba(255, 176, 32, 0.4);
  background: rgba(255, 176, 32, 0.08);
  color: #ffd789;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font-size: 0.86rem;
}
.warn-box p { margin: 0 0 0.55rem; }
.warn-box p:last-child { margin: 0; }

.account-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.account-row:last-child { border-bottom: 0; }
.account-row span { color: var(--muted); }

.settings-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  position: sticky;
  bottom: 1rem;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .steps, .panel-grid, .settings-grid { grid-template-columns: 1fr; }
  .nav { width: 100%; order: 3; }
  .wave { opacity: 0.35; width: 90vw; right: -10vw; }
}
