@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,300;6..72,400;6..72,500;6..72,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

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

:root {
  --cream: #FFF8E8;
  --warm-cream: #FDF5E6;
  --sage: #6F835E;
  --deep-sage: #5A6D4D;
  --light-sage: #E8EFE0;
  --sage-dim: #8A9E7A;
  --charcoal: #2F2A22;
  --warm-white: #FDF6EE;
  --stone: #E8DFD3;
  --clay: #C4B5A5;
  --deep-clay: #A89888;
  --error: #C2543F;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --step-transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-card: 0 1px 3px rgba(47, 42, 34, 0.06);
  --shadow-hover: 0 4px 16px rgba(47, 42, 34, 0.1);
  --shadow-tooltip: 0 8px 24px rgba(47, 42, 34, 0.12);
}

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Steps ────────────────────────────────── */
.step { display: none; }
.step.active { display: block; animation: stepIn 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Steps indicator ──────────────────────── */
.steps-indicator {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-top: 0.5rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stone);
  transition: all 0.3s ease;
  position: relative;
}

.step-dot.active { background: var(--sage); transform: scale(1.3); box-shadow: 0 0 0 3px var(--light-sage); }
.step-dot.done { background: var(--deep-sage); }

.step-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step-dot.active .step-label,
.step-dot.done .step-label { opacity: 1; }

/* ── Step context (replaces right column) ──────── */
.step-context {
  margin-bottom: 2rem;
}

.step-context h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--sage);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.step-context p {
  font-size: 0.95rem;
  color: #5C564A;
  line-height: 1.6;
  max-width: 54ch;
}

/* ── Typography ─────────────────────────────── */
h1 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dim);
  margin-bottom: 0.5rem;
}

h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

p {
  color: #5C564A;
  line-height: 1.7;
  font-size: 1rem;
}

/* ── Step 1: Landing ─────────────────────── */
.hero-text { margin-bottom: 2.5rem; }
.hero-text h2 { font-size: 2.5rem; margin-bottom: 1rem; line-height: 1.15; }
.hero-text p { font-size: 1rem; margin-bottom: 0.85rem; max-width: 50ch; }

/* ── Step 2: Email ───────────────────────── */
.email-wrap {
  max-width: 100%;
}

.email-wrap input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--cream);
  font-size: 1.1rem;
  font-family: var(--font-body);
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-wrap input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(111, 131, 94, 0.15);
}

/* ── Toggle ──────────────────────────────────── */
.toggle-group {
  display: inline-flex;
  background: var(--stone);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 2rem;
}

.toggle-btn {
  padding: 0.7rem 1.75rem;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--charcoal);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.toggle-btn.active {
  background: var(--cream);
  color: var(--deep-sage);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.toggle-btn:hover:not(.active) { color: var(--deep-sage); }

/* ── Step 3: Guided Birth Capture ────────────── */
.guided-birth {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guided-progress {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--clay);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.guided-field {
  position: relative;
  animation: stepIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.guided-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--charcoal);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.guided-field input,
.guided-field select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--cream);
  font-size: 1.1rem;
  font-family: var(--font-body);
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.guided-field input:focus,
.guided-field select:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(111, 131, 94, 0.15);
}

.guided-field input::placeholder { color: var(--clay); }

.guided-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236F835E' d='M7 9.5L2 4.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.guided-hint {
  font-size: 0.85rem;
  color: var(--clay);
  margin-top: 0.5rem;
  max-width: 40ch;
  line-height: 1.5;
}

.guided-unknown {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  background: var(--light-sage);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--deep-sage);
  transition: background 0.2s ease;
}

.guided-unknown:hover { background: #dce5d4; }

.guided-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.guided-actions .btn { flex: 0 1 auto; width: auto; margin-top: 0; }

.guided-field .location-dropdown {
  display: none;
  position: absolute;
  z-index: 10;
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: var(--shadow-tooltip);
}

.guided-field .location-dropdown.active { display: block; }

.location-option {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--light-sage);
  transition: background 0.15s ease;
}
.location-option:hover { background: var(--light-sage); }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--sage);
  color: #FFF;
  margin-top: 1rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--deep-sage);
  box-shadow: 0 2px 8px rgba(111, 131, 94, 0.3);
  transform: translateY(-1px);
}

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

.btn-secondary {
  width: auto;
  background: transparent;
  color: var(--sage);
  border: 1px solid var(--stone);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--sage);
  background: var(--light-sage);
}

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

.btn-back {
  background: transparent;
  color: var(--clay);
  border: none;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.btn-back:hover { color: var(--charcoal); }

.btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn-row .btn { flex: 1; margin-top: 0; }

/* ── Spinner ─────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading .spinner { display: inline-block; }
.loading .btn-text { display: none; }

/* ── Loading ─────────────────────────────────── */
.loading-msg { display: none; margin-top: 1rem; }
.loading .loading-msg { display: block; }

.loading-stage {
  display: none;
  font-size: 0.9rem;
  color: var(--sage);
  text-align: center;
  padding: 0.4rem 0;
  position: relative;
}

.loading-stage.active { display: block; animation: fadeIn 0.3s ease; }

.loading-stage::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  margin-right: 0.5rem;
  vertical-align: middle;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Step 4: Questionnaire ───────────────── */
.question-progress {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--clay);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.question-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  line-height: 1.35;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-card {
  display: block;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  font-size: 1.05rem;
  font-family: var(--font-body);
  color: var(--charcoal);
  transition: all 0.2s ease;
  line-height: 1.5;
}

.option-card:hover {
  border-color: var(--sage);
  background: var(--light-sage);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.option-card.selected {
  border-color: var(--deep-sage);
  background: var(--light-sage);
  color: var(--deep-sage);
  font-weight: 500;
  box-shadow: 0 0 0 2px var(--deep-sage), var(--shadow-hover);
}

.question-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  background: var(--warm-white);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--charcoal);
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s ease;
}

.question-textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(111, 131, 94, 0.15);
}

/* ── Rotation carousel (during load) ──────── */
.rotation { display: none; }
.rotation.active { display: block; }

.rotation-item {
  display: none;
  animation: fadeSlide 0.5s ease;
}
.rotation-item.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.rotation-item h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.rotation-item p {
  font-size: 0.95rem;
  color: #5C564A;
  max-width: 50ch;
}

/* ── Step 6: Preview — Two-Panel Layout ──────── */
.preview-two-panel {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

/* ── Solarpunk Powers Card ────────────────────── */
.powers-card {
  flex: 0 0 380px;
  max-width: 380px;
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #FCF6EC 0%, #F5F0E4 100%);
  border: 1px solid rgba(111, 131, 94, 0.25);
  box-shadow: 0 4px 24px rgba(111, 131, 94, 0.1), inset 0 0 60px rgba(212, 168, 83, 0.04);
  overflow: hidden;
}

.powers-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sage-dim), var(--sage), var(--deep-sage), var(--sage), var(--sage-dim));
  opacity: 0.6;
}

.powers-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(111, 131, 94, 0.15), transparent);
}

.powers-card-inner {
  padding: 2rem 1.75rem 1.75rem;
  position: relative;
  z-index: 1;
}

.powers-badge {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage-dim);
  text-align: center;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.powers-name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.1;
  text-align: center;
  margin-bottom: 1rem;
}

.powers-type-badge {
  display: inline-block;
  margin: 0 auto 1.5rem;
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, var(--sage), var(--deep-sage));
  color: #FFF;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  text-align: center;
  width: fit-content;
}

.powers-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(111, 131, 94, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.powers-stat {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(111, 131, 94, 0.08);
  border-right: 1px solid rgba(111, 131, 94, 0.08);
  background: rgba(255, 255, 255, 0.4);
}

.powers-stat:nth-child(even) { border-right: none; }
.powers-stat:nth-last-child(-n+2) { border-bottom: none; }

.powers-stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-dim);
  margin-bottom: 0.15rem;
}

.powers-stat-value {
  font-size: 0.95rem;
  color: var(--charcoal);
  font-weight: 450;
  line-height: 1.4;
}

.powers-stat-value .powers-arrow {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 0.25rem;
  vertical-align: middle;
  font-size: 0.5rem;
  line-height: 12px;
  text-align: center;
}

.powers-arrow.left { background: var(--sage-dim); color: #FFF; }
.powers-arrow.right { background: var(--deep-clay); color: #FFF; }

.powers-section {
  margin-bottom: 1rem;
}

.powers-section-title {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-dim);
  margin-bottom: 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(111, 131, 94, 0.1);
}

.powers-center-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  margin: 0.15rem 0.2rem;
  font-size: 0.75rem;
  color: var(--deep-sage);
  background: rgba(111, 131, 94, 0.08);
  border-radius: 4px;
  white-space: nowrap;
}

.powers-center-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}

.powers-channel-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  margin: 0.15rem 0.2rem;
  font-size: 0.72rem;
  color: var(--charcoal);
  background: rgba(47, 42, 34, 0.04);
  border-radius: 4px;
  white-space: nowrap;
  font-family: var(--font-display);
}

.powers-channel-item::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--clay);
  flex-shrink: 0;
}

.powers-open-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  margin: 0.15rem 0.2rem;
  font-size: 0.7rem;
  color: var(--clay);
  white-space: nowrap;
}

.powers-open-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  background: transparent;
  flex-shrink: 0;
}

.powers-footer {
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clay);
  text-align: center;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(196, 181, 165, 0.3);
  font-weight: 500;
}

/* ── SVG Panel ─────────────────────────────────── */
.svg-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.svg-preview-wrap {
  width: 100%;
  min-height: 30rem;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: var(--radius-xl);
  background: var(--stone);
  overflow: hidden;
  position: relative;
}

.svg-preview-wrap svg {
  width: 100%;
  height: auto;
  max-height: calc(72vh - 2rem);
  display: block;
}

.svg-preview-wrap.has-relationship svg {
  max-height: calc(60vh - 2rem);
}

.svg-preview-wrap .svg-hover-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.svg-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--clay);
  background: rgba(232, 223, 211, 0.85);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.svg-preview-wrap:hover .svg-hint { opacity: 1; }

/* Tooltip panel below SVG */
.tooltip-panel {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  min-height: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tooltip-panel-empty {
  text-align: center;
  color: var(--clay);
  font-size: 0.85rem;
  line-height: 1.6;
}

.tooltip-panel-content { display: none; }
.tooltip-panel-content.active { display: block; animation: fadeIn 0.25s ease; }

.tooltip-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.3rem;
}

.tooltip-subtitle {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.3rem;
}

.tooltip-body {
  font-size: 0.82rem;
  color: #5C564A;
  line-height: 1.55;
}

/* Hover highlight on SVG center elements */
.svg-preview-wrap .center-highlight { opacity: 0; transition: opacity 0.2s ease; }
.svg-preview-wrap .center-shape { fill: inherit; transition: fill 0.2s ease; }

.center-hoverable {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.center-hoverable:hover { opacity: 0.8; }

.channel-hoverable path,
.channel-hoverable polygon {
  cursor: pointer;
  transition: stroke-width 0.2s ease, filter 0.2s ease;
}

.channel-hoverable:hover path,
.channel-hoverable:hover polygon {
  stroke-width: 2 !important;
}

.center-glow {
  transition: filter 0.25s ease;
}

/* Preview guidance message */
.preview-guidance {
  padding: 0.75rem 1rem;
  background: var(--light-sage);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--deep-sage);
  line-height: 1.5;
}

.preview-guidance strong {
  font-weight: 600;
  color: var(--charcoal);
}

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0;
}

.preview-actions .btn { margin-top: 0; }
.preview-actions .btn-back { align-self: flex-start; }

/* Report progress indicator in preview */
.report-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--warm-white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--clay);
  margin-bottom: 0.75rem;
}

.report-progress.active {
  border-color: var(--sage);
  color: var(--sage);
}

.report-progress .spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: rgba(111, 131, 94, 0.2);
  border-top-color: var(--sage);
}

/* ── Results carousel ────────────────────────── */
.results { display: none; margin-top: 2rem; }
.results.active { display: block; }

.results h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}

.slides {
  position: relative;
  background: var(--stone);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1.414;
  max-height: 70vh;
}

.slide { display: none; width: 100%; height: 100%; }
.slide.active { display: flex; align-items: center; justify-content: center; }

.slide-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--cream); color: var(--clay);
  padding: 2rem; text-align: center;
}

.slide-placeholder .slide-num {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 300;
  color: var(--sage); opacity: 0.4; margin-bottom: 0.5rem;
}

.slide-placeholder .slide-name {
  font-size: 0.9rem; color: var(--charcoal); margin-bottom: 0.25rem;
}

.slide-placeholder .slide-cap {
  font-size: 0.75rem; color: var(--clay); max-width: 24ch;
}

.carousel-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 0.75rem;
}

.carousel-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--stone); border-radius: 50%;
  background: var(--cream); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--sage); transition: all 0.2s ease; font-size: 1rem;
}

.carousel-btn:hover:not(:disabled) { border-color: var(--sage); background: var(--light-sage); }
.carousel-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.slide-counter {
  font-size: 0.75rem; color: var(--clay); letter-spacing: 0.04em;
  font-family: var(--font-display);
}

.slide-caption {
  text-align: center; margin-top: 0.5rem;
  font-size: 0.85rem; color: #5C564A; min-height: 1.2em;
}

.report-stats {
  display: flex; gap: 1.5rem; justify-content: center;
  margin-top: 0.75rem; font-size: 0.75rem; color: var(--sage); opacity: 0.7;
}

.report-actions { display: flex; justify-content: center; margin-top: 0.9rem; }
.report-actions .btn { width: 100%; }
.slide-img-wrap { width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--stone); }
.slide-img { width: 100%; display: block; }

/* ── Alert ───────────────────────────────── */
.alert-error {
  background: #FDE8E8; border: 1px solid var(--error); color: var(--error);
  padding: 0.85rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.9rem;
  display: none;
}
.alert-error.active { display: block; }

/* ── AI Guide Section ─────────────────────────── */
.guide-section { display: none; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--stone); }
.guide-section.active { display: block; }

.guide-section h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

.guide-section p { font-size: 0.85rem; color: #5C564A; margin-bottom: 1rem; max-width: none; }

.guide-textarea {
  width: 100%; height: 180px;
  padding: 0.85rem; font-size: 0.8rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  line-height: 1.6;
  border: 1px solid var(--stone); border-radius: var(--radius);
  background: var(--cream); color: var(--charcoal);
  resize: vertical; white-space: pre-wrap; overflow-wrap: break-word;
}

.guide-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.guide-actions .btn { flex: 1; font-size: 0.85rem; padding: 0.6rem 1rem; margin-top: 0; }

.copy-feedback {
  font-size: 0.8rem; color: var(--sage);
  opacity: 0; transition: opacity 0.3s ease; align-self: center; white-space: nowrap;
}
.copy-feedback.visible { opacity: 1; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 900px) {
  .main-content { max-width: 100%; }
  .page { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  .page { padding: 1rem 0.85rem; }
  html { font-size: 15px; }
  h2 { font-size: 1.5rem; }
  .hero-text h2 { font-size: 1.8rem; }
  .guided-field label { font-size: 1.3rem; }
  .question-text { font-size: 1.3rem; }
  .option-card { padding: 1rem 1.25rem; font-size: 0.95rem; }
  .preview-artifact { flex-direction: column; }
  .tooltip-panel { flex: none; max-width: none; width: 100%; min-height: auto; }
  .preview-basics-grid { grid-template-columns: 1fr; }
  .basics-card-desc { left: auto; right: 0; max-width: 18rem; }
  .step-label { display: none; }
  .step-dot.active .step-label, .step-dot.done .step-label { display: block; font-size: 0.5rem; }
  .svg-preview-wrap { min-height: 12rem; }
}
