:root {
  --bg: #0c111b;
  --panel: rgba(13, 19, 31, 0.8);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 177, 122, 0.16);
  --text: #fff7ed;
  --muted: #d0a58b;
  --accent: #ff914d;
  --accent-2: #ffb84d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 145, 77, 0.17), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 184, 77, 0.14), transparent 24%),
    linear-gradient(180deg, #0c111b 0%, #111827 55%, #0a0f18 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

body { overflow: hidden; }

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 100%);
}

.app-shell {
  width: min(1180px, calc(100vw - 24px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.topbar,
.wizard-shell,
.glass-card,
.stage-panel,
.step-card,
.entry-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 18px;
}

.brand,
.topbar-status,
.cta-row,
.tick-actions,
.chip-row {
  display: flex;
  gap: 10px;
}

.brand { align-items: center; }

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px rgba(255, 145, 77, 0.5);
}

.brand strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.05;
}

.brand span,
.helper-text,
.helper-copy,
.cta-hint,
.stage-note,
.input-block span,
.input-inline span,
.tick-card small {
  color: var(--muted);
}

.brand span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
}

.topbar-status {
  align-items: center;
  font-size: 0.72rem;
}

.status-pill,
.eyebrow,
.steps-kicker {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 145, 77, 0.14);
  color: var(--accent);
  font-size: 0.66rem;
}

.wizard-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
}

.wizard-steps {
  display: grid;
  align-content: start;
  gap: 8px;
}

.steps-kicker,
.eyebrow {
  font-size: 0.64rem;
  color: var(--accent);
}

.step-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.step-card span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 145, 77, 0.12);
  font-size: 0.74rem;
  color: var(--accent);
}

.step-card strong {
  display: block;
  font-size: 0.82rem;
}

.step-card small {
  display: block;
  margin-top: 2px;
  font-size: 0.67rem;
  color: var(--muted);
}

.step-card.is-active {
  border-color: rgba(255, 145, 77, 0.35);
  background: linear-gradient(180deg, rgba(255, 145, 77, 0.12), rgba(255, 255, 255, 0.02));
}

.wizard-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.stage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: end;
}

h1,
h2,
p { margin: 0; }

h1 {
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 0.95rem;
  line-height: 1.1;
}

.stage-note {
  justify-self: end;
  max-width: 34ch;
  font-size: 0.77rem;
  line-height: 1.35;
}

.stage-panel {
  min-height: 0;
  border-radius: 20px;
  padding: 14px;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

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

.entry-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.entry-card--accent {
  background: linear-gradient(180deg, rgba(255, 145, 77, 0.12), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 145, 77, 0.24);
}

.entry-card h2 {
  margin-top: 4px;
}

.entry-card .helper-copy {
  margin: 8px 0 12px;
}

.glass-card {
  border-radius: 18px;
  padding: 12px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.input-block,
.input-inline {
  display: grid;
  gap: 5px;
}

.input-block span,
.input-inline span,
.helper-text,
.helper-copy,
.cta-hint {
  font-size: 0.72rem;
  line-height: 1.25;
}

textarea,
input,
button {
  font: inherit;
}

textarea,
input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(5, 11, 21, 0.72);
  color: var(--text);
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.35;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: none;
}

textarea:focus,
input:focus {
  border-color: rgba(255, 145, 77, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 145, 77, 0.12);
}

button {
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

button:hover { transform: translateY(-1px); }

.primary-button,
.secondary-button,
.ghost-button,
.chip {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 500;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff7ed;
}

.secondary-button,
.ghost-button,
.chip {
  background: var(--panel-soft);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.22);
}

.chip-row {
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip {
  padding: 6px 10px;
  font-size: 0.68rem;
}

.cta-row {
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
}

.cta-row--split {
  grid-column: 1 / -1;
  margin-top: 0;
}

.tick-actions {
  margin-top: 8px;
  flex-wrap: wrap;
}

.tick-card {
  margin-top: 8px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 145, 77, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 145, 77, 0.2);
}

.tick-card span {
  display: block;
  margin-bottom: 2px;
  font-size: 0.63rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tick-card strong {
  display: block;
  font-size: 1.1rem;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.list-item {
  padding: 8px 9px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.list-item strong,
.list-item span {
  display: block;
}

.list-item strong { font-size: 0.72rem; }

.list-item span {
  margin-top: 3px;
  font-size: 0.66rem;
  color: var(--muted);
}

.code-panel {
  margin: 8px 0 0;
  padding: 10px 11px;
  min-height: 180px;
  max-height: 180px;
  overflow: auto;
  border-radius: 16px;
  background: rgba(4, 9, 17, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #ffe7d6;
  font: 0.7rem/1.35 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 500ms cubic-bezier(.22,1,.36,1) forwards;
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  body { overflow: auto; }

  .app-shell {
    min-height: auto;
    padding-bottom: 18px;
  }

  .wizard-shell,
  .stage-head,
  .stage-grid,
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .mini-stats,
  .list-grid {
    grid-template-columns: 1fr;
  }
}
