:root {
  --bg: #f5eee4;
  --panel: rgba(255, 250, 243, 0.92);
  --panel-strong: #fffaf3;
  --line: rgba(31, 44, 43, 0.12);
  --ink: #132524;
  --muted: #5d6662;
  --deep: #1c4c4b;
  --deep-2: #295e59;
  --accent: #d9864d;
  --accent-soft: rgba(217, 134, 77, 0.18);
  --ok: #2f7a63;
  --warning: #916437;
  --shadow: 0 28px 60px rgba(33, 41, 39, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 134, 77, 0.16), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(28, 76, 75, 0.13), transparent 24%),
    linear-gradient(180deg, #f8f2e9 0%, var(--bg) 44%, #efe7da 100%);
  min-height: 100vh;
}

.success-page {
  display: grid;
  place-items: center;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

.hero {
  display: grid;
  gap: 22px;
  padding: 26px;
  border-radius: calc(var(--radius-xl) + 8px);
  background:
    linear-gradient(140deg, rgba(19, 37, 36, 0.96), rgba(25, 77, 75, 0.9) 54%, rgba(217, 134, 77, 0.82)),
    #183634;
  color: #fff6ec;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -40% auto;
  width: 360px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 246, 236, 0.06);
  filter: blur(8px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.77rem;
  opacity: 0.78;
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 56ch;
  margin: 18px 0 0;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 246, 236, 0.88);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 246, 236, 0.11);
  border: 1px solid rgba(255, 246, 236, 0.18);
  font-size: 0.94rem;
}

.hero-side {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.mini-card {
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.11);
  border: 1px solid rgba(255, 246, 236, 0.14);
  backdrop-filter: blur(16px);
}

.mini-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 246, 236, 0.82);
}

.mini-card p:last-child {
  margin-bottom: 0;
}

.app-layout {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.panel-card {
  background: var(--panel);
  border: 1px solid rgba(31, 44, 43, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.map-panel .panel-card {
  padding: 22px;
}

.form-panel .panel-card {
  padding: 22px;
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 14px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-index {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--deep), #2b6c66);
  color: #fff7ec;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.body-map-card {
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 238, 228, 0.85)),
    var(--panel-strong);
  border: 1px solid rgba(31, 44, 43, 0.08);
}

.body-map-stage {
  position: relative;
  aspect-ratio: 360 / 410;
  width: 100%;
  overflow: visible;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 10%, rgba(217, 134, 77, 0.08), transparent 32%),
    linear-gradient(180deg, #fffcf7 0%, #f0e8db 100%);
  box-shadow: inset 0 0 0 1px rgba(31, 44, 43, 0.05);
  isolation: isolate;
}

.body-map-illustration {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.body-map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: contrast(1.05);
}

.zone-button {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 0;
  border-radius: 999px;
  background: rgba(19, 37, 36, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 250, 243, 0.96), 0 0 0 6px rgba(217, 134, 77, 0.1);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  z-index: 2;
}

.zone-button::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px);
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.77rem;
  color: #fff7ec;
  background: rgba(19, 37, 36, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 3;
}

.zone-button:hover::after,
.zone-button:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.zone-button:hover,
.zone-button:focus-visible {
  transform: scale(1.14);
  outline: none;
}

.zone-button.is-selected {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 250, 243, 0.96), 0 0 0 7px rgba(217, 134, 77, 0.26);
}

.body-map-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 134, 77, 0.2);
}

.selected-zones {
  margin-top: 20px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(31, 44, 43, 0.08);
}

.selected-zones-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.selected-zones-head h3 {
  margin: 0;
  font-size: 1rem;
}

.clear-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--deep);
  font-weight: 600;
  cursor: pointer;
}

.selected-zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-selection {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(28, 76, 75, 0.09);
  color: var(--deep);
  border: 1px solid rgba(28, 76, 75, 0.12);
  font-size: 0.9rem;
  line-height: 1;
}

.zone-pill button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(28, 76, 75, 0.1);
  color: var(--deep);
  cursor: pointer;
}

.form-section + .form-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(31, 44, 43, 0.08);
}

.field-grid {
  display: grid;
  gap: 16px;
}

.two-columns {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.field legend {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(31, 44, 43, 0.14);
  background: rgba(255, 253, 249, 0.92);
  padding: 14px 16px;
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 108px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(28, 76, 75, 0.5);
  box-shadow: 0 0 0 4px rgba(28, 76, 75, 0.12);
}

.range-field {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 44, 43, 0.08);
  background: rgba(255, 253, 249, 0.9);
}

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

.range-head output {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep);
}

input[type="range"] {
  width: 100%;
  margin-top: 14px;
  accent-color: var(--accent);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.option-fieldset {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 44, 43, 0.08);
  background: rgba(255, 253, 249, 0.9);
}

.option-fieldset legend {
  padding: 0 8px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-chip span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31, 44, 43, 0.04);
  border: 1px solid rgba(31, 44, 43, 0.12);
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 500;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.choice-chip input:checked + span {
  background: rgba(28, 76, 75, 0.12);
  border-color: rgba(28, 76, 75, 0.34);
  color: var(--deep);
  transform: translateY(-1px);
}

.radio-stack {
  display: grid;
  gap: 10px;
}

.radio-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  line-height: 1.55;
}

.radio-row span {
  font-weight: 500;
}

.alert-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(217, 134, 77, 0.14);
  border: 1px solid rgba(145, 100, 55, 0.18);
  color: #744b1f;
  line-height: 1.6;
}

.consent-section {
  position: relative;
}

.legal-details {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(28, 76, 75, 0.06);
  border: 1px solid rgba(28, 76, 75, 0.1);
}

.legal-details summary {
  cursor: pointer;
  font-weight: 700;
}

.legal-copy {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.72;
}

.consent-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(31, 44, 43, 0.08);
  cursor: pointer;
  line-height: 1.6;
}

.submit-row {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(31, 44, 43, 0.08);
}

.form-status {
  min-height: 1.5rem;
  color: var(--muted);
  line-height: 1.55;
}

.form-status.is-error {
  color: #8d3f2a;
}

.form-status.is-success {
  color: var(--ok);
}

.submit-button {
  justify-self: start;
  padding: 15px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #cf7440);
  color: #fff9f1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(207, 116, 64, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(207, 116, 64, 0.28);
  outline: none;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.success-shell {
  width: min(760px, calc(100% - 24px));
  padding: 28px 0 56px;
}

.success-card {
  padding: 28px;
  border-radius: calc(var(--radius-xl) + 8px);
  background:
    linear-gradient(155deg, rgba(255, 252, 246, 0.98), rgba(245, 237, 227, 0.96)),
    #fffaf3;
  border: 1px solid rgba(31, 44, 43, 0.08);
  box-shadow: var(--shadow);
}

.success-eyebrow {
  color: var(--deep);
  opacity: 1;
}

.success-card h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.success-lead {
  margin: 18px 0 0;
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.75;
}

.success-receipt {
  margin-top: 26px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 44, 43, 0.08);
}

.success-receipt h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.receipt-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.receipt-list div {
  display: grid;
  gap: 5px;
}

.receipt-list dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.receipt-list dd {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.success-note {
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.72;
}

.trap-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
    align-items: end;
    padding: 34px;
  }

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

@media (min-width: 1080px) {
  .app-layout {
    grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
    align-items: start;
  }
}

@media (max-width: 859px) {
  .page-shell {
    width: min(100% - 22px, 1200px);
    padding-top: 12px;
  }

  .hero,
  .map-panel .panel-card,
  .form-panel .panel-card,
  .success-card {
    padding: 18px;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .section-index {
    width: 44px;
    height: 44px;
  }

  .submit-button {
    width: 100%;
    justify-self: stretch;
  }
}
