:root {
  --bg: #f6f2ea;
  --panel: #fffaf2;
  --ink: #181818;
  --muted: #60645f;
  --line: rgba(24, 24, 24, 0.12);
  --yellow: #ffe500;
  --green: #277064;
  --shadow: 0 26px 70px rgba(47, 40, 31, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 229, 0, 0.18), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(39, 112, 100, 0.14), transparent 28%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
}

.page-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.panel,
.privacy-card,
.progress-card {
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero > div,
.privacy-card {
  padding: 28px;
}

.eyebrow,
.panel-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  font-family: "Baskerville", "Georgia", serif;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.lede,
.section-note,
.privacy-card p,
.question-intro {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.lede {
  max-width: 58ch;
  font-size: 1.1rem;
}

.setup-panel,
.question-panel,
.output-panel {
  padding: 26px;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(255, 229, 0, 0.38);
  border-color: rgba(24, 24, 24, 0.32);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.primary-button {
  background: var(--yellow);
  color: #111;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #222;
}

.setup-status {
  margin: 14px 0 0;
  color: var(--muted);
}

.questionnaire-header,
.output-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 24px 0 14px;
}

.progress-card {
  min-width: 130px;
  padding: 14px 16px;
}

.progress-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.progress-track {
  height: 10px;
  background: rgba(24, 24, 24, 0.08);
  border-radius: 999px;
  margin-bottom: 14px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 180ms ease;
}

.question-panel {
  display: grid;
  gap: 18px;
}

.question span {
  font-size: 1.05rem;
}

.actions,
.output-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 520px;
  margin: 20px 0 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #161616;
  color: #f6f2ea;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .hero,
  .email-row,
  .questionnaire-header,
  .output-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .actions,
  .output-actions {
    display: grid;
  }

  h1 {
    max-width: 100%;
  }
}
