:root {
  --bg: #f6efe5;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --card: rgba(255, 253, 250, 0.86);
  --card-strong: #fffaf2;
  --text: #2f241d;
  --muted: #706056;
  --line: rgba(74, 53, 40, 0.14);
  --accent: #c66745;
  --accent-deep: #944224;
  --sage: #73866c;
  --gold: #d7ad64;
  --danger: #b33e35;
  --shadow: 0 28px 70px rgba(72, 44, 23, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-sans: "Space Grotesk", sans-serif;
  --font-serif: "Instrument Serif", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 173, 100, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(115, 134, 108, 0.16), transparent 25%),
    linear-gradient(145deg, #f7f1e7 0%, #efe7db 45%, #edf1ea 100%);
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.65;
}

body::before {
  width: 280px;
  height: 280px;
  background: rgba(198, 103, 69, 0.12);
  top: 64px;
  right: -72px;
}

body::after {
  width: 360px;
  height: 360px;
  background: rgba(115, 134, 108, 0.1);
  bottom: -120px;
  left: -60px;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero__copy,
.hero-card,
.panel,
.results-panel {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero__copy {
  background: linear-gradient(135deg, rgba(255, 252, 247, 0.88), rgba(255, 244, 233, 0.8));
  border: 1px solid rgba(148, 66, 36, 0.12);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
}

.hero__copy h1,
.panel h2,
.results-panel h2,
.step-head h3,
.routine-section-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero__copy h1 {
  font-size: clamp(2.8rem, 4.8vw, 5rem);
  line-height: 0.94;
  max-width: 16ch;
}

.hero__lede {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow,
.step-kicker,
.hero-card__label,
.routine-card__eyebrow,
.source-box__title,
.summary-note__title {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-deep);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero__badges span,
.tier-pill,
.step-pill,
.focus-pill {
  border: 1px solid rgba(148, 66, 36, 0.14);
  background: rgba(255, 249, 242, 0.88);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.hero__note {
  display: flex;
}

.hero-card {
  background: linear-gradient(180deg, rgba(245, 236, 224, 0.95), rgba(255, 250, 243, 0.9));
  border: 1px solid rgba(148, 66, 36, 0.14);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
  width: 100%;
}

.hero-card__title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-card__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.panel,
.results-panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.panel__header--stacked {
  align-items: stretch;
  flex-direction: column;
}

.panel__hint {
  margin: 0;
  max-width: 30ch;
  color: var(--muted);
  line-height: 1.5;
}

.progress-trail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.progress-step {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  padding: 13px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 180ms ease;
}

.progress-step.is-active,
.progress-step:hover {
  color: var(--accent-deep);
  border-color: rgba(148, 66, 36, 0.22);
  transform: translateY(-1px);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.feedback {
  min-height: 1.4rem;
  margin: 0 0 18px;
  color: var(--danger);
  font-weight: 500;
}

.step-head {
  margin-bottom: 22px;
}

.step-head p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.9fr);
  gap: 18px;
  background: rgba(255, 250, 244, 0.7);
  border: 1px solid rgba(148, 66, 36, 0.12);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 22px;
}

.upload-card__copy h4 {
  margin: 0;
  font-size: 1.45rem;
}

.upload-card__copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1.5px dashed rgba(148, 66, 36, 0.26);
  border-radius: var(--radius-lg);
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.92), rgba(247, 238, 226, 0.78)),
    repeating-linear-gradient(
      -45deg,
      rgba(198, 103, 69, 0.04) 0 12px,
      rgba(198, 103, 69, 0.01) 12px 24px
    );
  padding: 20px;
  cursor: pointer;
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone__title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.upload-dropzone__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.photo-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.photo-grid.is-empty::before {
  content: "No photos selected yet.";
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #efe6da;
  min-height: 160px;
  border: 1px solid var(--line);
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card__meta {
  position: absolute;
  inset: auto 10px 10px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(45, 33, 27, 0.66);
  color: #fff;
  font-size: 0.82rem;
  backdrop-filter: blur(8px);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field-grid--stacked {
  grid-template-columns: 1fr;
}

.field-group {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 0 0 18px;
}

.field-group legend {
  padding: 0 8px;
  font-weight: 700;
}

.field-group legend span {
  color: var(--danger);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: block;
  cursor: pointer;
}

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

.choice-card span {
  display: block;
  height: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(74, 53, 40, 0.1);
  background: rgba(255, 252, 248, 0.8);
  transition: 160ms ease;
  min-height: 100%;
}

.choice-card strong {
  display: block;
  font-size: 0.98rem;
}

.choice-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.choice-card input:checked + span {
  background: linear-gradient(135deg, rgba(198, 103, 69, 0.13), rgba(255, 246, 236, 0.95));
  border-color: rgba(148, 66, 36, 0.28);
  box-shadow: inset 0 0 0 1px rgba(148, 66, 36, 0.12);
  transform: translateY(-1px);
}

.choice-card:hover span {
  border-color: rgba(148, 66, 36, 0.22);
}

.text-field {
  display: block;
}

.text-field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.text-field textarea {
  width: 100%;
  border: 1px solid rgba(74, 53, 40, 0.14);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text);
  resize: vertical;
  min-height: 118px;
}

.text-field textarea:focus {
  outline: 2px solid rgba(198, 103, 69, 0.28);
  outline-offset: 1px;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  transition: 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), #d8845d);
  color: #fffaf4;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(198, 103, 69, 0.22);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  border: 1px solid var(--line);
}

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

.progress-meter {
  width: 100%;
  height: 10px;
  background: rgba(74, 53, 40, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-meter span {
  display: block;
  width: 25%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), #dca763);
  border-radius: inherit;
  transition: width 220ms ease;
}

.snapshot-list {
  display: grid;
  gap: 12px;
}

.snapshot-card {
  background: rgba(255, 252, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.snapshot-card__label {
  margin: 0 0 8px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.73rem;
}

.snapshot-card__value {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.summary-note {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(115, 134, 108, 0.16);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(238, 244, 236, 0.9), rgba(252, 250, 245, 0.84));
}

.summary-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.results-panel {
  margin-top: 24px;
}

.results-panel.is-hidden {
  display: none;
}

.results-head,
.results-head__actions,
.routine-layout,
.extras-layout,
.result-summary__pills,
.source-links {
  display: flex;
}

.results-head {
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.results-head__actions {
  align-items: center;
  gap: 12px;
}

.copy-status {
  min-width: 96px;
  color: var(--muted);
  font-size: 0.92rem;
}


.result-summary {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.result-summary__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.result-summary__pills {
  flex-wrap: wrap;
  gap: 10px;
}

.warning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.warning-card {
  background: rgba(255, 244, 239, 0.94);
  border: 1px solid rgba(179, 62, 53, 0.16);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.warning-card__title {
  margin: 0 0 8px;
  color: var(--danger);
  font-weight: 700;
}

.warning-card__text {
  margin: 0;
  color: #6e4b45;
  line-height: 1.55;
}

.routine-layout,
.extras-layout {
  gap: 20px;
  align-items: flex-start;
}

.routine-layout > section,
.extras-layout > section {
  flex: 1 1 0;
}

.routine-section-head {
  margin-bottom: 12px;
}

.routine-stack,
.note-stack {
  display: grid;
  gap: 14px;
}

.routine-card {
  background: rgba(255, 254, 251, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.routine-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.routine-card__top h4 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.routine-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.routine-card__link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.routine-card__link:hover {
  text-decoration: underline;
}

.note-card {
  background: rgba(247, 243, 236, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  line-height: 1.65;
  color: var(--muted);
}

.note-card strong {
  color: var(--text);
}

.body-section.is-hidden {
  display: none;
}

.source-box {
  margin-top: 24px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(115, 134, 108, 0.16);
  background: linear-gradient(135deg, rgba(246, 250, 243, 0.84), rgba(255, 252, 248, 0.9));
}

.source-box__text {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.source-links {
  flex-wrap: wrap;
  gap: 10px 14px;
}

.source-links a {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.93rem;
}

.source-links a:hover {
  text-decoration: underline;
}

@media (max-width: 1120px) {
  .hero,
  .app-layout,
  .routine-layout,
  .extras-layout,
  .upload-card,
  .field-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .summary-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px 14px 40px;
  }

  .hero__copy,
  .hero-card,
  .panel,
  .results-panel {
    padding: 22px;
  }

  .hero__copy h1 {
    font-size: clamp(2.3rem, 14vw, 3.5rem);
    max-width: 11ch;
  }

  .progress-trail,
  .choice-grid,
  .choice-grid--compact {
    grid-template-columns: 1fr;
  }

  .results-head,
  .step-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}
