:root {
  --bg: #07111f;
  --panel: rgba(10, 20, 36, 0.8);
  --panel-strong: rgba(8, 15, 29, 0.88);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(255, 255, 255, 0.12);
  --brand: #34d399;
  --brand-dark: #10b981;
  --accent: #7dd3fc;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(52, 211, 153, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 26%),
    linear-gradient(180deg, #07111f 0%, #0f172a 48%, #08111d 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.idea-page {
  min-height: 100vh;
  padding: 24px 16px;
}

.idea-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.idea-header,
.wizard-card,
.insight-card,
.mini-card,
.timeline-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.idea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius-xl);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.header-title,
#stepTitle,
.insight-card h3 {
  margin: 10px 0 0;
  font-family: "Space Grotesk", sans-serif;
}

.header-title {
  font-size: 32px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.header-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-link {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.header-link-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #5eead4);
  color: #04111d;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-wrap {
  margin-top: 24px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #cbd5e1;
}

.progress-bar {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.3s ease;
}

.wizard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  margin-top: 24px;
}

.step-copy {
  margin-bottom: 20px;
}

#stepTitle {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}

#stepDescription {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.wizard-card {
  padding: 24px;
  border-radius: var(--radius-xl);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.wizard-actions-right {
  display: flex;
  gap: 12px;
}

.btn {
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover,
.header-link:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.wizard-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insight-card,
.timeline-card {
  padding: 24px;
  border-radius: var(--radius-xl);
}

.insight-label,
.mini-label {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.insight-card h3 {
  font-size: 42px;
}

.insight-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.insight-grid {
  display: grid;
  gap: 16px;
}

.mini-card {
  padding: 20px;
  border-radius: var(--radius-lg);
}

.mini-value {
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.timeline-card {
  background: rgba(52, 211, 153, 0.1);
}

.field-grid {
  display: grid;
  gap: 16px;
}

.input,
.textarea,
.range {
  width: 100%;
}

.input,
.textarea {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(148, 163, 184, 0.82);
}

.input:focus,
.textarea:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.error {
  margin: 8px 0 0;
  color: #fda4af;
  font-size: 14px;
}

.card-grid,
.tone-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-card,
.chip,
.device-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.option-card {
  width: 100%;
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
}

.option-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
}

.option-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.option-card.active,
.chip.active,
.device-pill.active {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip,
.device-pill {
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.device-row,
.range-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.range-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.range-value {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.range {
  accent-color: var(--brand);
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.summary-item {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.summary-item h4 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.summary-item p {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.7;
}

.success-state {
  text-align: center;
  padding: 24px 8px;
}

.success-mark {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  color: #d1fae5;
  font-size: 34px;
}

.success-state h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 38px;
}

.success-state p {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.8;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(8, 15, 29, 0.92);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.35);
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.35);
}

label.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .wizard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .idea-header,
  .wizard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions,
  .wizard-actions-right {
    width: 100%;
  }

  .header-link,
  .btn {
    width: 100%;
  }

  .card-grid,
  .tone-grid {
    grid-template-columns: 1fr;
  }

  #stepTitle {
    font-size: 34px;
  }

  #stepDescription {
    font-size: 16px;
  }
}
