:root {
  --red: #c8102e;
  --deep-red: #8a0e1f;
  --black: #090909;
  --charcoal: #252525;
  --grey: #e9e9e9;
  --light: #f7f7f7;
  --white: #ffffff;
  --muted: #666;
  --border: #d9d9d9;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top left, #fff 0, #f5f5f5 35%, #e9e9e9 100%);
  color: var(--black);
}

.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
}

.logo {
  width: 210px;
  max-height: 74px;
  object-fit: contain;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr);
  gap: 24px;
  padding: 0 28px 34px;
}

.builder-panel, .preview-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.builder-panel {
  padding: 28px;
  min-height: 700px;
}

.preview-panel {
  padding: 20px;
  position: sticky;
  top: 18px;
  height: fit-content;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.progress-track {
  height: 12px;
  background: var(--grey);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 11%;
  background: linear-gradient(90deg, var(--red), var(--deep-red));
  border-radius: 100px;
  transition: width .25s ease;
}

.screen {
  padding: 24px 0 18px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: .95;
  letter-spacing: -2px;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -1.2px;
  margin-bottom: 12px;
}

h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.lead {
  font-size: 19px;
  line-height: 1.45;
  color: #333;
  max-width: 760px;
}

.small-copy {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 6px;
}

.badge {
  display: inline-block;
  padding: 8px 12px;
  background: var(--black);
  color: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.hero-grid, .card-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.hero-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-feature, .choice-card {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
}

.mini-feature {
  font-weight: 800;
  text-align: center;
}

.choice-card {
  cursor: pointer;
  transition: transform .14s ease, border .14s ease, box-shadow .14s ease;
  min-height: 120px;
}

.choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.choice-card.selected {
  border: 3px solid var(--red);
  background: #fff6f8;
}

.choice-card .tagline {
  color: var(--muted);
  line-height: 1.35;
  font-size: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full { grid-column: 1 / -1; }

label {
  font-weight: 800;
  font-size: 14px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
  background: white;
}

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

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 900;
  cursor: pointer;
  font-size: 15px;
}

.primary-btn {
  background: var(--red);
  color: white;
}

.primary-btn:hover { background: var(--deep-red); }

.secondary-btn {
  background: var(--black);
  color: white;
}

.ghost-btn, .mini-btn {
  background: white;
  border: 1px solid var(--border);
  color: var(--black);
}

.mini-btn {
  padding: 8px 12px;
  font-size: 12px;
}

button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.dexter-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 14px;
}

.dexter {
  width: 160px;
  height: 140px;
  object-fit: contain;
  border-radius: 18px;
  object-position: center;
}

.live-preview {
  border: 1px solid var(--border);
  background: #111;
  color: white;
  border-radius: 22px;
  padding: 16px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

pre {
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  max-height: 460px;
  overflow: auto;
  margin: 0;
}

.note-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff6f8;
  border: 1px solid #ffd1da;
  color: #222;
  font-size: 13px;
  line-height: 1.45;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.output-box {
  background: #111;
  color: #fff;
  border-radius: 22px;
  padding: 18px;
  margin-top: 14px;
}

.output-box pre {
  max-height: none;
}

.helper {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.warning-box {
  border-left: 6px solid var(--red);
  background: #fff6f8;
  padding: 14px 16px;
  border-radius: 14px;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .hero-grid, .card-grid, .form-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; gap: 18px; }
  .logo { width: 170px; }
}
