:root {
  --paper: #f6f2ea;
  --paper-strong: #fffaf1;
  --ink: #1d2527;
  --muted: #68706d;
  --line: #d9d0c1;
  --panel: #fff8ed;
  --panel-alt: #edf5f1;
  --moss: #2f6f5e;
  --moss-dark: #204f43;
  --clay: #a2543c;
  --gold: #bd8c3a;
  --blue: #2e6288;
  --danger: #9c2f2f;
  --shadow: 0 18px 38px rgba(63, 50, 33, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffdf8 0%, var(--paper) 100%);
  font-family: "Sora", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.prep-shell {
  width: min(1060px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 14px 0 36px;
  display: grid;
  gap: 12px;
}

.prep-hero,
.prep-meta,
.prep-sidebar,
.questions-panel,
.packet-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.88);
  box-shadow: var(--shadow);
}

.prep-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--moss-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(1.75rem, 5vw, 3rem);
  letter-spacing: 0;
  line-height: 1.02;
}

h2 {
  font-size: 1.02rem;
  line-height: 1.25;
}

h3 {
  font-size: 0.98rem;
  line-height: 1.3;
}

.lead {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.hero-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  min-height: 38px;
  border: 1px solid #cbbfab;
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 11px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--moss);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--moss);
  border-color: var(--moss-dark);
  color: #fff;
}

.btn.danger {
  border-color: rgba(156, 47, 47, 0.45);
  color: var(--danger);
}

.btn.is-recording {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}

.prep-meta {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 170px;
  gap: 10px;
  padding: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbbfab;
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  outline: none;
  padding: 10px 11px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.15);
}

.prep-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.prep-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.private-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 12px;
}

.private-card strong {
  font-size: 0.95rem;
}

.private-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.private-pill {
  width: max-content;
  border: 1px solid rgba(47, 111, 94, 0.25);
  border-radius: 999px;
  background: rgba(47, 111, 94, 0.08);
  color: var(--moss-dark);
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[data-audience="christina"] {
  --panel-alt: #f4f2ed;
  --moss: #7c5d67;
  --moss-dark: #5c414a;
  --gold: #b8895d;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid #cbbfab;
  border-radius: 999px;
  background: #fffdf8;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--moss), var(--gold));
  transition: width 0.2s ease;
}

.stance-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
  padding: 12px;
}

.stance-box ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.export-actions .btn:first-child,
.export-actions .btn:last-child {
  grid-column: 1 / -1;
}

.status-line,
.privacy-note,
.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.status-line.is-error {
  color: var(--danger);
}

.questions-panel,
.packet-panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 245, 241, 0.58);
  padding: 13px 14px;
}

.count-pill {
  flex: 0 0 auto;
  border: 1px solid #cbbfab;
  border-radius: 999px;
  background: #fffdf8;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.question-list {
  display: grid;
  gap: 0;
  background: transparent;
}

.question {
  display: grid;
  gap: 13px;
  background: rgba(255, 250, 241, 0.97);
  padding: 18px;
}

.step-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--muted);
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 700;
}

.step-strip strong {
  color: var(--moss-dark);
}

.question-meta {
  display: grid;
  gap: 4px;
}

.question p {
  margin: 0;
}

.question .hint {
  max-width: 82ch;
}

.question textarea {
  min-height: 170px;
  font-size: 1rem;
}

.rating-row,
.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-chip,
.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbbfab;
  border-radius: 999px;
  background: #fffdf8;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.rating-chip input,
.check-chip input {
  width: auto;
  margin: 0;
}

.voice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.question-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgba(237, 245, 241, 0.58);
  padding: 12px 14px;
}

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

.packet-panel {
  display: grid;
}

.packet-panel summary {
  cursor: pointer;
  list-style: none;
}

.packet-panel summary::-webkit-details-marker {
  display: none;
}

#packet-output {
  min-height: 420px;
  border: 0;
  border-radius: 0;
  background: #fffdf8;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.privacy-note {
  border-top: 1px solid var(--line);
  padding: 11px 14px;
  background: rgba(237, 245, 241, 0.58);
}

@media (max-width: 980px) {
  .prep-shell {
    width: min(100vw - 18px, 760px);
    padding-top: 9px;
  }

  .prep-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .prep-meta,
  .prep-layout {
    grid-template-columns: 1fr;
  }

  .prep-sidebar {
    position: static;
    order: 2;
  }

  .questions-panel {
    order: 1;
  }
}

@media (max-width: 560px) {
  .prep-hero,
  .prep-meta,
  .prep-sidebar,
  .question,
  .panel-head {
    padding: 11px;
  }

  h1 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.08rem;
    line-height: 1.35;
  }

  .hero-actions,
  .export-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .export-actions .btn:first-child,
  .export-actions .btn:last-child {
    grid-column: auto;
  }

  .question textarea {
    min-height: 190px;
  }

  .question-nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
  }
}
