:root {
  --emerald: #0b6651;
  --gold: #d4af37;
  --cream: #f6efe1;
  --ink: #1a2c26;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: Montserrat, "Segoe UI", sans-serif;
  --touch: 48px;
  --p: 0%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  transition: background 1.2s;
  overflow-x: hidden;
}

body[data-theme="dawn"] {
  background: linear-gradient(165deg, #f6efe1 0%, #e4f2eb 48%, #c5e0d4 100%);
  color: var(--ink);
}

body[data-theme="mist"] {
  background: linear-gradient(165deg, #6e9086 0%, #3f6258 46%, #1c3932 100%);
  color: var(--cream);
}

body[data-theme="ember"] {
  background: linear-gradient(165deg, #1a4036 0%, #0b6651 42%, #3a301c 100%);
  color: var(--cream);
}

body[data-theme="gold"] {
  background: linear-gradient(160deg, #0b6651 0%, #0c332b 55%, #2c2618 100%);
  color: var(--cream);
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.42;
  animation: drift 28s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  background: var(--gold);
  top: -70px;
  right: -50px;
}

.orb-b {
  width: 360px;
  height: 360px;
  background: var(--emerald);
  bottom: -120px;
  left: -90px;
  animation-delay: -9s;
}

.orb-c {
  width: 180px;
  height: 180px;
  background: var(--cream);
  top: 42%;
  left: 58%;
  animation-delay: -16s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(28px, -34px, 0) scale(1.08);
  }
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 16px 20px 12px;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: var(--p) 3px;
}

.progress[hidden] {
  display: none;
}

#stage {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 84px 16px 48px;
}

.screen-enter {
  animation: screen-in 0.45s ease;
}

.screen-leave {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 84px;
  pointer-events: none;
  animation: screen-out 0.32s ease forwards;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes screen-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
.slider-value {
  font-family: var(--font-display);
  font-weight: 560;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.lede,
.prompt {
  margin: 0 0 22px;
  max-width: 38rem;
}

.panel {
  background: rgba(246, 239, 225, 0.94);
  color: var(--ink);
  border-radius: 22px;
  padding: 18px 16px;
  box-shadow: 0 18px 50px rgba(12, 40, 32, 0.12);
}

.side-label {
  margin: 16px 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
}

.slider {
  display: block;
  margin: 0 0 14px;
}

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.slider-label {
  flex: 1;
}

.slider-value {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--emerald);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 48px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(11, 102, 81, 0.28);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -12px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--emerald);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(11, 102, 81, 0.28);
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--emerald);
}

.choices {
  display: grid;
  gap: 10px;
}

.option {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(11, 102, 81, 0.28);
  background: rgba(246, 239, 225, 0.94);
  color: var(--ink);
  font: inherit;
  text-align: left;
  line-height: 1.45;
  cursor: pointer;
}

.option[aria-pressed="true"] {
  border-color: var(--emerald);
  box-shadow: inset 4px 0 0 var(--gold);
  background: #fffaf1;
}

.field {
  display: block;
  margin-top: 16px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
}

.field-input,
textarea.field-input {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(11, 102, 81, 0.28);
  background: #fffaf1;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

textarea.field-input {
  min-height: 96px;
}

.note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.16);
  border-radius: 0 12px 12px 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  min-height: var(--touch);
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  margin-left: auto;
  background: var(--gold);
  color: #17241f;
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:focus-visible,
.option:focus-visible,
.field-input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.disclaimer {
  margin: 18px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 38rem;
  opacity: 0.85;
}

.welcome h1 {
  max-width: 16ch;
}

.welcome .btn-primary {
  margin-left: 0;
}

h1:focus {
  outline: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  min-height: var(--touch);
}

.check input {
  width: var(--touch);
  height: var(--touch);
  margin-top: 0;
  flex: none;
  accent-color: var(--emerald);
}

.lead h1 {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  max-width: 22ch;
}

.field-error {
  margin: 6px 0 0;
  color: #8a2a1a;
  font-size: 0.85rem;
}

.check span {
  line-height: 1.45;
}

.field-input.is-invalid {
  border-color: #8a2a1a;
}

@media (min-width: 720px) {
  #stage {
    padding: 96px 24px 64px;
  }

  .panel {
    padding: 22px 22px;
  }
}

.sheet {
  background: rgba(246, 239, 225, 0.96);
  color: var(--ink);
  border-radius: 24px;
  padding: 28px 18px 32px;
  box-shadow: 0 18px 50px rgba(12, 40, 32, 0.12);
}

.sheet-title {
  overflow-wrap: anywhere;
  font-size: clamp(1.8rem, 4.4vw, 2.7rem);
  max-width: none;
}

.sheet-title:focus {
  outline: none;
}

.sheet-title:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.sheet h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 560;
  line-height: 1.2;
}

.sheet-block + .sheet-block,
.sheet .invite,
.sheet .not-yet,
.sheet .cta,
.sheet .retry,
.sheet-footer {
  margin-top: 22px;
}

.sheet p,
.sheet li {
  overflow-wrap: anywhere;
}

.sheet ul {
  margin: 0 0 8px;
  padding-left: 1.2rem;
}

.carry,
.support-note {
  padding-left: 12px;
  border-left: 3px solid var(--emerald);
}

.radar {
  width: min(100%, 560px);
  margin: 0 auto 8px;
}

.radar svg {
  display: block;
  width: 100%;
  height: auto;
}

.cta {
  display: grid;
  gap: 12px;
}

.cta-considering {
  grid-template-columns: 1fr;
}

.btn-xl,
.cta-considering .btn-even,
.cta a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.btn-xl {
  min-height: 56px;
}

.cta-considering .btn-even {
  min-height: 52px;
  background: var(--gold);
  color: #17241f;
}

.retry {
  min-height: var(--touch);
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--emerald);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--emerald);
  font-weight: 600;
}

.text-link-quiet {
  min-height: var(--touch);
  font-size: 0.85rem;
  font-weight: 500;
}

.print-pages {
  display: none;
}

.sheet-footer {
  font-size: 0.82rem;
  opacity: 0.9;
}

@media (min-width: 720px) {
  .sheet {
    padding: 36px 32px 40px;
  }

  .cta-considering {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }

  .screen-enter,
  .screen-leave {
    animation: none;
  }

  body {
    transition: none;
  }
}
