:root {
  --cream: #f6f1e7;
  --cream-deep: #efe8d9;
  --moss: #2f5d4f;
  --moss-mid: #4a7a66;
  --ochre: #b9862f;
  --ink: #23231f;
  --ink-soft: #55534c;
  --rule: rgb(35 35 31 / 16%);
  --error: #9c3d2e;
  --serif: "Fraunces", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  min-height: 100%;
  background: var(--cream);
}

body {
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  color: white;
  background: var(--moss);
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 28px 20px 80px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.brand-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.site-tag {
  color: var(--moss);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.progress {
  height: 4px;
  margin: 18px 0 12px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--cream-deep);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--moss);
  transition: width 0.35s ease;
}

.step-meta {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mode-toggle {
  min-height: 36px;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid rgb(185 134 47 / 42%);
  border-radius: 999px;
  color: #755513;
  background: rgb(185 134 47 / 8%);
  font: inherit;
  letter-spacing: 0.07em;
}

.mode-toggle {
  border-color: rgb(47 93 79 / 30%);
  color: var(--moss);
  background: rgb(47 93 79 / 7%);
  cursor: pointer;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

h1,
h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.1;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.18;
}

h1.question-title {
  margin-bottom: 8px;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.18;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--moss);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.lede strong {
  color: var(--ink);
}

.lede.small {
  font-size: 14px;
}

.fine {
  padding-top: 14px;
  margin-top: 22px;
  border-top: 1px dotted var(--rule);
  color: var(--ink-soft);
  font-size: 13.5px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.consent-note {
  padding: 14px 16px;
  margin-top: 18px;
  border: 1px solid rgb(47 93 79 / 22%);
  border-radius: 8px;
  background: rgb(47 93 79 / 6%);
}

.voice-instructions {
  padding-left: 14px;
  border-left: 3px solid var(--ochre);
}

a {
  color: var(--moss);
}

.voice-pill {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  margin-bottom: 18px;
  border: 1px solid rgb(47 93 79 / 35%);
  border-radius: 999px;
  color: var(--moss);
  background: rgb(47 93 79 / 6%);
  font: 600 13.5px var(--sans);
  cursor: pointer;
}

.intro-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-voice-actions .voice-pill {
  margin-bottom: 18px;
}

.voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentcolor;
}

.voice-pill.recording {
  border-color: var(--error);
  color: white;
  background: var(--error);
}

.voice-pill.recording .voice-dot {
  animation: pulse 1.1s infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.intro-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--rule);
}

.question-help {
  max-width: 62ch;
  margin: 10px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.question-context {
  max-width: 66ch;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-left: 3px solid var(--moss-mid);
  color: var(--ink-soft);
  background: rgb(47 93 79 / 6%);
  font-size: 14.5px;
  line-height: 1.55;
}

.optional-label {
  display: inline-block;
  margin-left: 6px;
  color: var(--ink-soft);
  font: 500 12px var(--sans);
  letter-spacing: 0;
  vertical-align: middle;
}

fieldset {
  border: 0;
}

legend {
  width: 100%;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option {
  display: flex;
  min-height: 44px;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: rgb(255 255 255 / 50%);
  cursor: pointer;
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}

.option:hover,
.option:focus-within {
  border-color: var(--moss-mid);
}

.option.selected {
  border-color: var(--moss);
  background: rgb(47 93 79 / 7%);
}

.option input {
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: var(--moss);
}

textarea,
input[type="text"],
input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
  background: rgb(255 255 255 / 60%);
  font: 15px/1.5 var(--sans);
}

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

textarea:focus,
input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(47 93 79 / 20%);
  outline-offset: 2px;
  border-color: var(--moss);
}

.input-row {
  margin-top: 12px;
}

.dictation-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.question-note {
  max-width: 62ch;
  padding: 10px 12px;
  margin-top: 12px;
  border-left: 3px solid var(--ochre);
  color: var(--ink-soft);
  background: rgb(185 134 47 / 6%);
  font-size: 13.5px;
}

.answer-actions {
  margin-top: 12px;
}

.answer-actions[hidden] {
  display: none;
}

.delete-answer {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  color: var(--error);
  background: transparent;
  font: 600 13.5px var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.transition-card {
  padding: 22px;
  border: 1px solid rgb(47 93 79 / 22%);
  border-radius: 8px;
  background: rgb(255 255 255 / 40%);
}

.transition-copy {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.dictation-row .voice-pill {
  margin-bottom: 0;
}

.voice-pill-secondary {
  border-color: rgb(35 35 31 / 20%);
  color: var(--ink-soft);
  background: rgb(255 255 255 / 38%);
}

.question-voice-reminder {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.dictation-hint,
.voice-api-status,
.save-status {
  color: var(--ink-soft);
  font-size: 12px;
}

.dictation-hint {
  min-height: 19px;
  margin-top: 6px;
}

.voice-decision {
  padding: 12px 14px;
  margin-top: 10px;
  border: 1px solid rgb(47 93 79 / 22%);
  border-radius: 6px;
  color: var(--ink-soft);
  background: rgb(47 93 79 / 6%);
  font-size: 13.5px;
}

.voice-decision[hidden] {
  display: none;
}

.voice-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.voice-decision-button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgb(47 93 79 / 35%);
  border-radius: 999px;
  color: var(--moss);
  background: var(--cream);
  font: 600 13px var(--sans);
  cursor: pointer;
}

.voice-api-status {
  min-height: 18px;
  margin: -10px 0 14px;
  color: var(--error);
}

.voice-api-status.neutral {
  color: var(--ink-soft);
}

.error {
  min-height: 22px;
  margin-top: 14px;
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
}

.save-status {
  min-height: 18px;
  margin-top: 10px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  margin-top: 28px;
  border-top: 1px solid var(--rule);
}

button.primary {
  min-height: 48px;
  padding: 13px 28px;
  border: 0;
  border-radius: 3px;
  color: var(--cream);
  background: var(--moss);
  font: 600 15.5px var(--sans);
  cursor: pointer;
}

button.primary:hover {
  background: #264d41;
}

button.primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

button.ghost {
  min-height: 44px;
  padding: 12px 6px;
  border: 0;
  color: var(--ink-soft);
  background: none;
  font: 14.5px var(--sans);
  cursor: pointer;
}

button.ghost:hover {
  color: var(--ink);
}

.thanks-actions {
  margin: 24px 0 18px;
}

.button-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 13px 22px;
  border-radius: 3px;
  color: var(--cream);
  background: var(--moss);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.button-link:hover {
  background: #264d41;
}

.delete-dialog {
  width: min(calc(100% - 32px), 480px);
  padding: 24px;
  margin: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 18px 60px rgb(35 35 31 / 24%);
}

.delete-dialog::backdrop {
  background: rgb(35 35 31 / 55%);
}

.delete-dialog h2 {
  margin-bottom: 10px;
  font-size: 25px;
}

.delete-dialog p {
  color: var(--ink-soft);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

button.danger,
button.ghost-dialog {
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 3px;
  font: 600 14px var(--sans);
  cursor: pointer;
}

button.danger {
  border: 0;
  color: white;
  background: #812f24;
}

button.ghost-dialog {
  border: 1px solid var(--rule);
  color: var(--ink);
  background: transparent;
}

footer.site {
  padding-top: 16px;
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 12.5px;
}

footer.site a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (forced-colors: active) {
  .progress-fill,
  .voice-dot {
    background: CanvasText;
  }

  .option.selected,
  .voice-pill.recording,
  .delete-dialog {
    outline: 2px solid Highlight;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 20px 16px 56px;
  }

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

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .step-meta {
    flex-wrap: wrap;
  }

  .environment-badge {
    margin-left: 0;
  }

  .mode-toggle {
    margin-left: auto;
  }

  textarea {
    min-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
