/* ================================================================
   THE LOVE LANGUAGES WORKBOOK - style.css
   Complete Redesign: One-Session Print-to-PDF Experience
   Design System: Warm White / Blush / Mauve / Deep Plum / Sage
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  --warm-white:   #FDF8F5;
  --cream:        #F7EFE8;
  --cream2:       #EEE0D3;
  --blush:        #E8B4B8;
  --blush-light:  #F5DDE0;
  --blush-bg:     #FDF0F1;
  --blush-fill:   rgba(232,180,184,0.12);
  --mauve:        #A0607A;
  --mauve-dark:   #7A3D5A;
  --mauve-light:  #C8849E;
  --mauve-pale:   #F2E0E8;
  --plum:         #3D1C3A;
  --plum-mid:     #6B3560;
  --plum-85:      rgba(61,28,58,0.85);
  --sage:         #7A9E84;
  --sage-light:   #C4DBC9;
  --sage-bg:      #EEF5F0;
  --gold:         #C89A4A;
  --gold-light:   #F5E8C8;
  --ll-words:     #A0607A;
  --ll-time:      #7A9E84;
  --ll-touch:     #8B6BA8;
  --ll-service:   #C89A4A;
  --ll-gifts:     #5B8FB8;
  --shadow-xs:    0 1px 4px rgba(61,28,58,0.06);
  --shadow-sm:    0 2px 12px rgba(61,28,58,0.08);
  --shadow-md:    0 6px 24px rgba(61,28,58,0.12);
  --shadow-lg:    0 16px 48px rgba(61,28,58,0.18);
  --r-sm:  8px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  36px;
  --ease:  cubic-bezier(0.22,1,0.36,1);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
}

/* ── BASE ────────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: var(--warm-white);
  color: var(--plum-85);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--plum);
  line-height: 1.2;
  font-weight: 700;
}
p { color: var(--plum-85); }
strong { color: var(--plum); font-weight: 600; }
em { font-style: italic; }
a { color: var(--mauve); }
img { max-width: 100%; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--blush); border-radius: 2px; }

/* ── APP SHELL ───────────────────────────────────────────────── */
#app { min-height: 100vh; }

/* ── STEP INDICATOR ──────────────────────────────────────────── */
.step-indicator {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: rgba(253,248,245,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--blush-light);
  padding: 0.7rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.step-logo {
  font-family: var(--font-serif);
  font-size: 1rem; font-weight: 700; font-style: italic;
  color: var(--mauve); white-space: nowrap; flex-shrink: 0;
}
.step-logo small {
  display: block; font-family: var(--font-sans);
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blush); font-style: normal; font-weight: 600;
}
.step-track {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 0; position: relative;
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; font-family: var(--font-sans);
  background: var(--cream2); color: var(--plum-mid);
  border: 2px solid var(--cream2);
  transition: all 0.35s var(--ease); position: relative; z-index: 2;
}
.step-dot.active { background: var(--mauve); color: white; border-color: var(--mauve); }
.step-dot.done { background: var(--sage); color: white; border-color: var(--sage); }
.step-dot.done::after { content: "✓"; font-size: 0.75rem; }
.step-dot.done .step-num { display: none; }
.step-line {
  flex: 1; height: 2px;
  background: var(--cream2);
  transition: background 0.35s var(--ease);
}
.step-line.done { background: var(--sage); }
.step-print-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem; border-radius: 999px;
  border: 2px solid var(--mauve); background: transparent;
  cursor: pointer; font-family: var(--font-sans);
  font-size: 0.75rem; font-weight: 700; color: var(--mauve);
  letter-spacing: 0.04em; transition: all 0.22s; white-space: nowrap;
  flex-shrink: 0;
}
.step-print-btn:hover { background: var(--mauve); color: white; }
.step-label-row {
  display: flex; justify-content: space-between;
  margin-top: 0.25rem; padding: 0 2px;
}
.step-label {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blush); text-align: center;
  width: 28px;
}
.step-label.active { color: var(--mauve); }
.step-label.done { color: var(--sage); }

/* ── SCREEN SYSTEM ───────────────────────────────────────────── */
.screen {
  display: none; min-height: 100vh;
  padding-top: 70px;
  animation: screenIn 0.45s var(--ease) forwards;
}
.screen.active { display: block; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen-inner {
  max-width: 680px; width: 100%;
  margin: 0 auto; padding: 3rem 1.5rem 6rem;
}
.screen-inner-wide {
  max-width: 920px; width: 100%;
  margin: 0 auto; padding: 3rem 1.5rem 6rem;
}

/* ── SCREEN 1: WELCOME ───────────────────────────────────────── */
.welcome-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--warm-white) 0%, var(--cream) 55%, #EDD5C8 100%);
  position: relative; overflow: hidden;
}
.welcome-screen::before {
  content: ''; position: absolute; top: -120px; right: -120px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(160,96,122,0.09) 0%, transparent 68%);
  pointer-events: none;
}
.welcome-screen::after {
  content: ''; position: absolute; bottom: -80px; left: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122,158,132,0.08) 0%, transparent 68%);
  pointer-events: none;
}
.welcome-center {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 5rem 1.5rem 4rem;
  max-width: 560px; margin: 0 auto;
}
.welcome-badge {
  font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 700; color: var(--mauve);
  background: var(--mauve-pale); border: 1px solid var(--blush-light);
  padding: 0.3rem 1rem; border-radius: 999px; margin-bottom: 1.8rem;
  font-family: var(--font-sans);
}
.welcome-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  font-weight: 700; color: var(--plum); line-height: 1.1;
  margin-bottom: 0.4rem;
}
.welcome-title em { color: var(--mauve); display: block; font-style: italic; }
.welcome-tagline {
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  color: var(--plum-mid); max-width: 400px;
  line-height: 1.75; margin-bottom: 3rem;
}
.welcome-card {
  background: white; border-radius: var(--r-xl);
  padding: 2.5rem; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
}
.welcome-card-title {
  font-size: 1.4rem; color: var(--plum); margin-bottom: 0.3rem;
}
.welcome-card-sub {
  font-size: 0.87rem; color: var(--plum-mid); margin-bottom: 1.8rem;
}
.name-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 1.5rem;
}
.name-field label {
  display: block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mauve); margin-bottom: 0.45rem;
  font-family: var(--font-sans);
}
.name-field input {
  width: 100%; padding: 0.85rem 1.1rem;
  border: 2px solid var(--blush-light); border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 1rem; color: var(--plum);
  background: var(--warm-white); outline: none;
  transition: border-color 0.22s, background 0.22s;
}
.name-field input:focus { border-color: var(--mauve); background: white; }
.name-field input::placeholder { color: var(--blush); }
.start-over-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; margin-top: 1.2rem;
}
.start-over-row p { font-size: 0.8rem; color: var(--plum-mid); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; border: none; cursor: pointer;
  font-family: var(--font-sans); font-weight: 600;
  transition: all 0.22s var(--ease); line-height: 1;
  text-decoration: none; white-space: nowrap;
  min-height: 44px; /* accessibility */
}
.btn-plum {
  background: var(--plum); color: white; border-radius: 999px;
  padding: 0.95rem 2.2rem; font-size: 1rem;
  box-shadow: 0 4px 18px rgba(61,28,58,0.28);
}
.btn-plum:hover { background: var(--mauve-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(61,28,58,0.32); }
.btn-mauve {
  background: var(--mauve); color: white; border-radius: 999px;
  padding: 0.95rem 2.2rem; font-size: 1rem;
  box-shadow: 0 4px 18px rgba(160,96,122,0.30);
}
.btn-mauve:hover { background: var(--mauve-dark); transform: translateY(-2px); }
.btn-sage {
  background: var(--sage); color: white; border-radius: 999px;
  padding: 0.95rem 2.2rem; font-size: 1rem;
  box-shadow: 0 4px 14px rgba(122,158,132,0.28);
}
.btn-sage:hover { filter: brightness(0.9); transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--mauve); border-radius: 999px;
  padding: 0.85rem 1.8rem; font-size: 0.9rem;
  border: 2px solid var(--blush);
}
.btn-ghost:hover { background: var(--blush-bg); }
.btn-ghost-plum {
  background: transparent; color: var(--plum); border-radius: 999px;
  padding: 0.55rem 1.2rem; font-size: 0.8rem;
  border: 1.5px solid var(--cream2);
}
.btn-ghost-plum:hover { background: var(--cream); }
.btn-full { width: 100%; }
.btn-lg { padding: 1.1rem 2.6rem; font-size: 1.05rem; }
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.82rem; min-height: 36px; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none !important; }

/* ── QUIZ SCREENS ────────────────────────────────────────────── */
.quiz-header {
  text-align: center; margin-bottom: 2.5rem;
}
.quiz-partner-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.3rem 0.9rem;
  border-radius: 999px; margin-bottom: 1rem;
  font-family: var(--font-sans);
}
.badge-a { background: var(--mauve-pale); color: var(--mauve); }
.badge-b { background: var(--sage-bg); color: var(--sage); }
.quiz-title {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  color: var(--plum); margin-bottom: 0.5rem;
}
.quiz-subtitle {
  font-size: 0.88rem; color: var(--plum-mid);
  font-style: italic; max-width: 380px; margin: 0 auto;
}
.quiz-progress-wrap { margin-bottom: 2rem; }
.quiz-progress-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.quiz-progress-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mauve);
  font-family: var(--font-sans);
}
.quiz-progress-count {
  font-size: 0.75rem; color: var(--plum-mid);
  font-family: var(--font-sans);
}
.quiz-pbar {
  height: 5px; background: var(--blush-light); border-radius: 999px; overflow: hidden;
}
.quiz-pbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mauve), var(--blush));
  border-radius: 999px; transition: width 0.4s var(--ease);
}
.quiz-q-wrap {
  background: white; border-radius: var(--r-lg);
  padding: 2.4rem 2rem; box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}
.quiz-q-num {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blush);
  font-family: var(--font-sans); margin-bottom: 1.5rem;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.85rem; }
.quiz-opt {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.2rem 1.3rem; border-radius: var(--r-md);
  border: 2px solid var(--blush-light);
  background: var(--blush-fill); cursor: pointer;
  transition: all 0.22s var(--ease);
  min-height: 44px;
}
.quiz-opt:hover { border-color: var(--blush); background: rgba(232,180,184,0.18); }
.quiz-opt.selected { border-color: var(--mauve); background: var(--mauve); }
.quiz-opt-letter {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  background: white; border: 2px solid var(--blush);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: var(--plum-mid);
  transition: all 0.22s; font-family: var(--font-sans);
}
.quiz-opt.selected .quiz-opt-letter {
  background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5);
  color: white;
}
.quiz-opt-text {
  font-size: 0.97rem; color: var(--plum); line-height: 1.65;
  padding-top: 0.1rem; transition: color 0.22s;
}
.quiz-opt.selected .quiz-opt-text { color: white; }
.quiz-nav {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.quiz-nav-center { font-size: 0.83rem; color: var(--plum-mid); }

/* ── TRANSITION SCREENS ──────────────────────────────────────── */
.transition-screen {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  max-width: 560px; margin: 0 auto;
}
.transition-icon { font-size: 3.5rem; margin-bottom: 1.5rem; }
.transition-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--plum); margin-bottom: 0.6rem;
}
.transition-sub {
  font-size: 1rem; color: var(--plum-mid);
  line-height: 1.75; max-width: 420px; margin: 0 auto 2rem;
}
.result-reveal-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem; margin: 2rem 0; text-align: left;
}
.result-lang-card {
  background: white; border-radius: var(--r-md);
  padding: 1.4rem 1.6rem; box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--mauve);
}
.result-lang-card.secondary { border-color: var(--cream2); }
.result-lang-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mauve);
  font-family: var(--font-sans); margin-bottom: 0.5rem;
}
.result-lang-label.sec-label { color: var(--plum-mid); }
.result-lang-name {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-serif); font-size: 1.4rem; color: var(--plum);
  margin-bottom: 0.4rem;
}
.result-lang-desc {
  font-size: 0.88rem; color: var(--plum-mid); line-height: 1.6;
}
.handoff-box {
  background: var(--cream); border: 2px dashed var(--blush);
  border-radius: var(--r-md); padding: 1.4rem 1.8rem;
  margin: 1.8rem 0; text-align: center;
}
.handoff-box p {
  font-family: var(--font-serif); font-size: 1.05rem;
  color: var(--plum); font-style: italic;
}

/* ── SCREEN 4: RESULTS DASHBOARD ─────────────────────────────── */
.results-hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; margin-bottom: 2rem;
}
.results-partner-card {
  background: white; border-radius: var(--r-lg);
  padding: 1.8rem; box-shadow: var(--shadow-md);
  border-top: 5px solid var(--mauve);
  text-align: center;
}
.results-partner-card.card-b { border-color: var(--sage); }
.results-partner-name {
  font-family: var(--font-serif); font-size: 1.25rem;
  color: var(--plum); margin-bottom: 0.25rem;
}
.results-primary-icon { font-size: 2.4rem; margin: 0.6rem 0; }
.results-primary-name {
  font-family: var(--font-serif); font-size: 1.1rem;
  color: var(--mauve); margin-bottom: 0.2rem;
}
.results-primary-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--plum-mid);
  font-family: var(--font-sans);
}
.results-sec-lang {
  font-size: 0.8rem; color: var(--plum-mid); margin-top: 0.5rem;
}
.results-sec-lang strong { color: var(--plum); }

.score-bars { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.sbar-row { display: flex; align-items: center; gap: 0.7rem; }
.sbar-label { font-size: 0.78rem; color: var(--plum-mid); width: 140px; flex-shrink: 0; }
.sbar-track { flex: 1; height: 9px; background: var(--cream2); border-radius: 999px; overflow: hidden; }
.sbar-fill { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }
.sbar-num { font-size: 0.78rem; font-weight: 700; color: var(--plum); width: 16px; text-align: right; }

.chart-section {
  background: white; border-radius: var(--r-md);
  padding: 1.8rem; box-shadow: var(--shadow-sm); margin-bottom: 2rem;
}
.chart-section h3 {
  font-size: 1.2rem; color: var(--plum); margin-bottom: 0.5rem;
}
.chart-legend {
  display: flex; gap: 1.5rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.legend-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.83rem; color: var(--plum-mid); }

.insights-section { margin-bottom: 2rem; }
.insights-section h2 {
  font-size: 1.6rem; color: var(--plum); margin-bottom: 1.2rem;
}
.insight-card {
  background: white; border-radius: var(--r-md);
  padding: 1.5rem 1.8rem; box-shadow: var(--shadow-sm);
  margin-bottom: 1rem; border-left: 4px solid var(--blush);
}
.insight-card.strength { border-color: var(--sage); }
.insight-card.difference { border-color: var(--mauve); }
.insight-card.growth { border-color: var(--gold); }
.insight-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--plum-mid);
  font-family: var(--font-sans); margin-bottom: 0.5rem;
  display: block;
}
.insight-tag.s-tag { color: var(--sage); }
.insight-tag.d-tag { color: var(--mauve); }
.insight-tag.g-tag { color: var(--gold); }
.insight-text {
  font-size: 0.95rem; color: var(--plum-mid); line-height: 1.75;
}

.pdf-preview-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin: 2rem 0;
}
.pdf-preview-card {
  background: var(--cream); border-radius: var(--r-md);
  padding: 1.3rem; cursor: pointer;
  transition: all 0.22s var(--ease);
  border: 1.5px solid var(--cream2);
}
.pdf-preview-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.pdf-preview-icon { font-size: 1.6rem; margin-bottom: 0.5rem; }
.pdf-preview-title {
  font-size: 0.95rem; font-weight: 700; color: var(--plum);
  font-family: var(--font-sans); margin-bottom: 0.3rem;
}
.pdf-preview-desc { font-size: 0.82rem; color: var(--plum-mid); line-height: 1.5; }

.generate-cta {
  background: linear-gradient(135deg, var(--cream), var(--blush-bg));
  border: 2px solid var(--blush); border-radius: var(--r-lg);
  padding: 2.5rem; text-align: center; margin-top: 2rem;
}
.generate-cta h2 { font-size: 1.6rem; color: var(--plum); margin-bottom: 0.5rem; }
.generate-cta p { font-size: 0.92rem; color: var(--plum-mid); margin-bottom: 1.5rem; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── SCREEN 5: PERSONALIZATION ───────────────────────────────── */
.personal-section { margin-bottom: 2rem; }
.personal-section h2 { font-size: 1.4rem; color: var(--plum); margin-bottom: 0.4rem; }
.personal-section p { font-size: 0.9rem; color: var(--plum-mid); margin-bottom: 1.2rem; }
.personal-card {
  background: white; border-radius: var(--r-md);
  padding: 1.8rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.personal-card h3 { font-size: 1.05rem; color: var(--plum); margin-bottom: 0.3rem; }
.personal-card .q-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mauve);
  font-family: var(--font-sans); margin-bottom: 0.5rem; display: block;
}
.personal-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.8rem;
}
.field-wrap { display: flex; flex-direction: column; gap: 0.35rem; }
.field-label-sm {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--plum-mid);
  font-family: var(--font-sans);
}
.text-inp {
  font-family: var(--font-sans); font-size: 0.95rem;
  padding: 0.8rem 1rem; border: 2px solid var(--cream2);
  border-radius: var(--r-sm); background: var(--warm-white);
  color: var(--plum); outline: none; transition: border-color 0.22s;
  width: 100%;
}
.text-inp:focus { border-color: var(--mauve); background: white; }
.text-inp::placeholder { color: var(--blush); }
textarea.text-inp { resize: vertical; min-height: 70px; }
.skip-row { display: flex; justify-content: flex-end; margin-top: 0.3rem; }

/* ── SCREEN 6: DOWNLOAD ──────────────────────────────────────── */
.download-screen-inner {
  text-align: center; max-width: 540px;
  margin: 0 auto; padding: 4rem 1.5rem 5rem;
}
.download-check {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--sage); display: flex; align-items: center;
  justify-content: center; font-size: 2rem; color: white;
  margin: 0 auto 2rem;
  animation: popIn 0.5s var(--ease) forwards;
}
@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.download-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--plum); margin-bottom: 0.5rem;
}
.download-names {
  font-family: var(--font-serif); font-size: 1.3rem;
  color: var(--mauve); font-style: italic; margin-bottom: 0.8rem;
}
.download-sub {
  font-size: 0.95rem; color: var(--plum-mid); margin-bottom: 2.5rem;
  line-height: 1.7;
}
.download-btns {
  display: flex; flex-direction: column; gap: 0.8rem;
  align-items: center; max-width: 320px; margin: 0 auto 2rem;
}
.download-note {
  font-size: 0.8rem; color: var(--plum-mid); font-style: italic;
}

/* ── SAVED INDICATOR ─────────────────────────────────────────── */
.auto-save {
  position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 600;
  background: white; border: 1.5px solid var(--sage-light);
  border-radius: 999px; padding: 0.4rem 1rem;
  font-size: 0.78rem; color: var(--sage); box-shadow: var(--shadow-xs);
  display: flex; align-items: center; gap: 0.35rem;
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.auto-save.show { opacity: 1; }

/* ── ORNAMENTS & UTILITIES ───────────────────────────────────── */
.ornament { text-align: center; color: var(--blush); letter-spacing: 0.5rem; font-size: 0.9rem; margin: 2rem 0; }
.divider { height: 1px; background: var(--cream2); margin: 2rem 0; }
.text-center { text-align: center; }
.text-muted { color: var(--plum-mid); font-size: 0.9rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.flex-end { display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 640px) {
  .screen { padding-top: 65px; }
  .step-indicator { padding: 0.6rem 1rem; }
  .step-logo small { display: none; }
  .step-track { max-width: 220px; }
  .step-dot { width: 24px; height: 24px; font-size: 0.6rem; }
  .results-hero-grid { grid-template-columns: 1fr; }
  .pdf-preview-grid { grid-template-columns: 1fr 1fr; }
  .personal-two-col { grid-template-columns: 1fr; }
  .name-row { grid-template-columns: 1fr; }
  .quiz-options { gap: 0.65rem; }
  .quiz-q-wrap { padding: 1.6rem 1.2rem; }
  .welcome-card { padding: 1.8rem 1.5rem; border-radius: var(--r-lg); }
  .screen-inner, .screen-inner-wide { padding: 2rem 1rem 5rem; }
}
@media (max-width: 400px) {
  .pdf-preview-grid { grid-template-columns: 1fr; }
  .quiz-opt { padding: 1rem 1rem; }
  .step-print-btn { display: none; }
}

/* ================================================================
   WORKBOOK PREVIEW SCREEN (screen-download)
   ================================================================ */

/* Full-screen layout: header + banner + scroll area + sticky footer */
#screen-download {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 64px; /* step-indicator height */
  background: #F5EFE8;
}
/* Override .screen.active display:block for download screen */
#screen-download.active {
  display: flex !important;
}

/* Top header bar */
.wb-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1.5px solid var(--cream2);
  flex-wrap: wrap;
}
.wb-preview-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.wb-preview-check {
  width: 2.2rem; height: 2.2rem;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}
.wb-preview-names {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--plum);
  font-style: italic;
}
.wb-preview-subtitle {
  font-size: 0.8rem;
  color: var(--plum-mid);
  margin-top: 0.1rem;
}
.wb-preview-header-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* How-to-save banner */
.wb-save-banner {
  background: linear-gradient(135deg, #3D1C3A 0%, #6B3560 100%);
  color: white;
  padding: 1.2rem 1.5rem 1rem;
}
.wb-save-banner-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
  color: #F5E8C8;
  font-family: var(--font-sans);
}
.wb-save-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.wb-save-step {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.wb-save-step-num {
  width: 1.35rem; height: 1.35rem;
  background: var(--mauve);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.wb-save-step-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
}
.wb-save-tips {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.wb-save-tip {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
}

/* Scrollable preview area */
.wb-preview-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1rem 160px; /* bottom pad for sticky CTA */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Stack of pages */
.wb-page-stack {
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Each print-page rendered on screen looks like a sheet of paper */
.wb-page-stack .print-page {
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(61,28,58,0.13), 0 1px 3px rgba(61,28,58,0.08);
  padding: 0.75in 0.75in 0.65in;
  min-height: unset; /* override print min-height */
  page-break-after: unset;
  break-after: unset;
  position: relative;
}

/* Page label in top-left of each preview page */
.wb-page-stack .print-page::before {
  content: attr(data-page-label);
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  font-size: 0.62rem;
  color: var(--blush);
  font-family: var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Sticky bottom CTA */
.wb-sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 2px solid var(--blush);
  padding: 0.8rem 1.5rem 0.65rem;
  z-index: 500;
  box-shadow: 0 -4px 20px rgba(61,28,58,0.12);
}
.wb-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.wb-sticky-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--plum-mid);
  font-family: var(--font-sans);
}
.wb-sticky-check {
  width: 1.5rem; height: 1.5rem;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.wb-print-btn {
  white-space: nowrap;
  min-width: 220px;
}
.wb-sticky-reminder {
  font-size: 0.72rem;
  color: var(--plum-mid);
  text-align: center;
  margin-top: 0.35rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Scale down on small screens */
@media (max-width: 860px) {
  .wb-page-stack .print-page {
    padding: 0.5in 0.5in 0.45in;
  }
}

/* ── Screen-mode styles for print-doc classes (used inside .wb-page-stack) ── */
/* These mirror the @media print rules so the preview looks like the real output */
.wb-page-stack .pt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25in; }
.wb-page-stack .pt-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.15in; }
.wb-page-stack .pt-flex   { display: flex; }
.wb-page-stack .pt-flex-center { display: flex; align-items: center; justify-content: center; }
.wb-page-stack .pt-text-center { text-align: center; }
.wb-page-stack .pt-mb-sm  { margin-bottom: 0.12in; }
.wb-page-stack .pt-mb-md  { margin-bottom: 0.2in; }
.wb-page-stack .pt-mb-lg  { margin-bottom: 0.35in; }
.wb-page-stack .pt-mt-sm  { margin-top: 0.1in; }
.wb-page-stack .pt-mt-md  { margin-top: 0.2in; }
.wb-page-stack .pt-label  {
  font-family: 'DM Sans', sans-serif;
  font-size: 7pt; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #A0607A;
}
.wb-page-stack .pt-bar-track {
  height: 6pt; background: #EEE0D3; border-radius: 999pt; overflow: hidden; flex: 1;
}
.wb-page-stack .pt-bar-fill { height: 100%; border-radius: 999pt; }
.wb-page-stack .pt-bar-words   { background: #A0607A; }
.wb-page-stack .pt-bar-time    { background: #7A9E84; }
.wb-page-stack .pt-bar-touch   { background: #8B6BA8; }
.wb-page-stack .pt-bar-service { background: #C89A4A; }
.wb-page-stack .pt-bar-gifts   { background: #5B8FB8; }
.wb-page-stack .pt-checkbox {
  width: 9pt; height: 9pt; border: 1.5pt solid #A0607A;
  border-radius: 2pt; display: inline-block; margin-top: 2pt; flex-shrink: 0;
}
.wb-page-stack .pt-day-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11pt; color: #A0607A; font-weight: 700;
}
.wb-page-stack .pt-chip {
  font-size: 7pt; padding: 2pt 5pt;
  border-radius: 4pt; font-family: 'DM Sans', sans-serif;
  font-weight: 700; white-space: nowrap; display: inline-block;
}
.wb-page-stack .pt-chip-words   { background: #FAE8EE; color: #A0607A; }
.wb-page-stack .pt-chip-time    { background: #EEF5F0; color: #7A9E84; }
.wb-page-stack .pt-chip-touch   { background: #F0EBF8; color: #8B6BA8; }
.wb-page-stack .pt-chip-service { background: #FBF3E0; color: #C89A4A; }
.wb-page-stack .pt-chip-gifts   { background: #E8F1FB; color: #5B8FB8; }
.wb-page-stack .pt-horsemen-table { width: 100%; border-collapse: collapse; }
.wb-page-stack .pt-horsemen-table th {
  font-size: 7.5pt; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 5pt 6pt;
  border-bottom: 1.5pt solid #EEE0D3;
  color: #6B3560; font-family: 'DM Sans', sans-serif; text-align: left;
}
.wb-page-stack .pt-horsemen-table td {
  font-size: 8.5pt; padding: 6pt; border-bottom: 0.5pt solid #F7EFE8;
  vertical-align: top; color: #3D1C3A; line-height: 1.5;
}
.wb-page-stack .pt-horsemen-table tr:last-child td { border-bottom: none; }
.wb-page-stack .pt-nvc-box {
  background: #FDF0F1; border: 1.5pt solid #E8B4B8;
  border-radius: 8pt; padding: 0.18in;
  font-family: 'Cormorant Garamond', serif;
  font-size: 11pt; font-style: italic;
  color: #3D1C3A; line-height: 2;
}
.wb-page-stack .pt-fill-line {
  border-bottom: 1pt solid #E8B4B8;
  min-height: 0.28in; display: block; margin-bottom: 0.12in;
}
.wb-page-stack .pt-fill-line-lg {
  border-bottom: 1pt solid #E8B4B8;
  min-height: 0.5in; display: block; margin-bottom: 0.12in;
}
.wb-page-stack .pt-botanical { display: block; }
.wb-page-stack .print-cover-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; min-height: 7in;
  background: #FDF8F5; position: relative;
}
.wb-page-stack .print-cover-border {
  position: absolute;
  top: 0.25in; left: 0.25in; right: 0.25in; bottom: 0.25in;
  border: 2pt solid #E8B4B8; border-radius: 12pt;
  pointer-events: none;
}
.wb-page-stack .print-avoid-break { break-inside: avoid; }
/* Hide the fixed footer inside preview */
.wb-page-stack .print-footer { display: none; }
/* Collapse print-page page-break rules in preview */
.wb-page-stack .print-page {
  page-break-after: unset !important;
  break-after: unset !important;
}

@media (max-width: 640px) {
  .wb-save-steps {
    grid-template-columns: 1fr 1fr;
  }
  .wb-page-stack .print-page {
    padding: 1.2rem 1rem;
    font-size: 8.5pt;
  }
  .wb-page-stack .pt-grid-2 { grid-template-columns: 1fr; }
  .wb-page-stack .pt-grid-3 { grid-template-columns: 1fr; }
  .wb-sticky-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .wb-print-btn {
    min-width: unset;
    width: 100%;
  }
}
@media (max-width: 400px) {
  .wb-save-steps {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   PRINT DOCUMENT (hidden in app, shown only when printing)
   ================================================================ */
#print-doc { display: none; }

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  @page {
    size: letter;
    margin: 0.7in 0.75in 0.65in 0.75in;
  }

  /* Force color rendering */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html, body {
    background: white !important;
    font-size: 10pt !important;
  }

  /* Hide everything except print doc */
  #app { display: none !important; }
  .auto-save { display: none !important; }

  /* Show print doc */
  #print-doc {
    display: block !important;
    font-family: 'DM Sans', sans-serif;
    color: #3D1C3A;
    background: white;
  }

  /* Page breaks */
  .print-page {
    page-break-after: always;
    break-after: page;
    padding: 0;
    margin: 0;
    position: relative;
    min-height: 9in;
  }
  .print-page:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }
  .print-page-break { page-break-before: always; break-before: page; }
  .print-avoid-break { page-break-inside: avoid; break-inside: avoid; }

  /* Print typography */
  .pt-h1 { font-family: 'Cormorant Garamond', serif !important; font-size: 32pt !important; color: #3D1C3A !important; line-height: 1.15 !important; }
  .pt-h2 { font-family: 'Cormorant Garamond', serif !important; font-size: 20pt !important; color: #3D1C3A !important; line-height: 1.2 !important; }
  .pt-h3 { font-family: 'Cormorant Garamond', serif !important; font-size: 14pt !important; color: #3D1C3A !important; line-height: 1.25 !important; }
  .pt-serif { font-family: 'Cormorant Garamond', serif !important; }
  .pt-label {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 7pt !important; font-weight: 700 !important;
    letter-spacing: 0.14em !important; text-transform: uppercase !important;
    color: #A0607A !important;
  }
  .pt-body { font-size: 10pt !important; color: rgba(61,28,58,0.85) !important; line-height: 1.65 !important; }
  .pt-small { font-size: 8.5pt !important; color: rgba(61,28,58,0.75) !important; line-height: 1.55 !important; }

  /* Print colors */
  .pt-bg-warm   { background: #FDF8F5 !important; }
  .pt-bg-cream  { background: #F7EFE8 !important; }
  .pt-bg-blush  { background: #FDF0F1 !important; }
  .pt-bg-sage   { background: #EEF5F0 !important; }
  .pt-bg-gold   { background: #F5E8C8 !important; }
  .pt-bg-white  { background: white !important; }
  .pt-border-blush { border: 1.5pt solid #E8B4B8 !important; }
  .pt-border-mauve { border: 2pt solid #A0607A !important; }
  .pt-border-sage  { border: 2pt solid #7A9E84 !important; }
  .pt-col-mauve { color: #A0607A !important; }
  .pt-col-sage  { color: #7A9E84 !important; }
  .pt-col-plum  { color: #3D1C3A !important; }
  .pt-col-plum-mid { color: #6B3560 !important; }
  .pt-col-gold  { color: #C89A4A !important; }
  .pt-col-touch { color: #8B6BA8 !important; }
  .pt-col-gifts { color: #5B8FB8 !important; }

  /* Print layout helpers */
  .pt-grid-2 { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.25in !important; }
  .pt-grid-3 { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 0.15in !important; }
  .pt-flex { display: flex !important; }
  .pt-flex-center { display: flex !important; align-items: center !important; justify-content: center !important; }
  .pt-text-center { text-align: center !important; }
  .pt-mb-sm { margin-bottom: 0.12in !important; }
  .pt-mb-md { margin-bottom: 0.2in !important; }
  .pt-mb-lg { margin-bottom: 0.35in !important; }
  .pt-mt-sm { margin-top: 0.1in !important; }
  .pt-mt-md { margin-top: 0.2in !important; }
  .pt-mt-lg { margin-top: 0.35in !important; }
  .pt-p-sm  { padding: 0.12in !important; }
  .pt-p-md  { padding: 0.2in !important; }
  .pt-p-lg  { padding: 0.3in !important; }
  .pt-r-sm  { border-radius: 6pt !important; }
  .pt-r-md  { border-radius: 10pt !important; }

  /* Bars in print */
  .pt-bar-track {
    height: 7pt; background: #EEE0D3 !important;
    border-radius: 999pt; overflow: hidden;
    display: block; width: 100%;
  }
  .pt-bar-fill {
    height: 7pt; border-radius: 999pt; display: block;
  }
  .pt-bar-words   { background: #A0607A !important; }
  .pt-bar-time    { background: #7A9E84 !important; }
  .pt-bar-touch   { background: #8B6BA8 !important; }
  .pt-bar-service { background: #C89A4A !important; }
  .pt-bar-gifts   { background: #5B8FB8 !important; }

  /* Chips */
  .pt-chip {
    display: inline-block !important;
    padding: 2pt 7pt !important; border-radius: 999pt !important;
    font-size: 7pt !important; font-weight: 700 !important;
    letter-spacing: 0.06em !important; text-transform: uppercase !important;
    font-family: 'DM Sans', sans-serif !important;
  }
  .pt-chip-words   { background: #FAE8EE !important; color: #A0607A !important; }
  .pt-chip-time    { background: #EEF5F0 !important; color: #7A9E84 !important; }
  .pt-chip-touch   { background: #EFE5F8 !important; color: #8B6BA8 !important; }
  .pt-chip-service { background: #F5E8C8 !important; color: #C89A4A !important; }
  .pt-chip-gifts   { background: #DFF0FA !important; color: #5B8FB8 !important; }

  /* Challenge day rows */
  .pt-day-row {
    display: grid !important;
    grid-template-columns: 0.4in 0.2in 1fr 0.8in 0.18in !important;
    gap: 6pt !important; align-items: start !important;
    padding: 5pt 0 !important;
    border-bottom: 0.5pt solid #EEE0D3 !important;
  }
  .pt-day-num {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 11pt !important; color: #A0607A !important; font-weight: 700 !important;
  }
  .pt-checkbox {
    width: 9pt; height: 9pt !important;
    border: 1.5pt solid #A0607A !important;
    border-radius: 2pt !important; display: inline-block !important;
    margin-top: 2pt !important;
  }
  .pt-day-action { font-size: 8.5pt !important; color: #3D1C3A !important; line-height: 1.4 !important; }
  .pt-day-note {
    font-size: 7.5pt !important; color: #6B3560 !important;
    border-bottom: 0.5pt solid #E8B4B8 !important;
    padding-bottom: 1pt !important; margin-top: 3pt !important;
  }

  /* Commitment / fill lines */
  .pt-fill-line {
    border-bottom: 1pt solid #E8B4B8 !important;
    min-height: 0.28in !important; display: block !important;
    margin-bottom: 0.12in !important;
  }
  .pt-fill-line-lg {
    border-bottom: 1pt solid #E8B4B8 !important;
    min-height: 0.5in !important; display: block !important;
    margin-bottom: 0.12in !important;
  }

  /* Horsemen table */
  .pt-horsemen-table { width: 100% !important; border-collapse: collapse !important; }
  .pt-horsemen-table th {
    font-size: 7.5pt !important; font-weight: 700 !important;
    letter-spacing: 0.08em !important; text-transform: uppercase !important;
    padding: 5pt 6pt !important; border-bottom: 1.5pt solid #EEE0D3 !important;
    color: #6B3560 !important; font-family: 'DM Sans', sans-serif !important;
    text-align: left !important;
  }
  .pt-horsemen-table td {
    font-size: 8.5pt !important; padding: 6pt !important;
    border-bottom: 0.5pt solid #F7EFE8 !important;
    vertical-align: top !important; color: #3D1C3A !important;
    line-height: 1.5 !important;
  }
  .pt-horsemen-table tr:last-child td { border-bottom: none !important; }

  /* Section headers in print */
  .pt-section-header {
    border-bottom: 2pt solid #E8B4B8 !important;
    padding-bottom: 0.1in !important; margin-bottom: 0.2in !important;
  }

  /* NVC template box */
  .pt-nvc-box {
    background: #FDF0F1 !important;
    border: 1.5pt solid #E8B4B8 !important;
    border-radius: 8pt !important; padding: 0.18in !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 11pt !important; font-style: italic !important;
    color: #3D1C3A !important; line-height: 2 !important;
  }

  /* Botanical SVG decorations */
  .pt-botanical { display: block !important; }

  /* Cover page specific */
  .print-cover-wrap {
    display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
    text-align: center !important; min-height: 9in !important;
    background: #FDF8F5 !important; position: relative !important;
  }
  .print-cover-border {
    position: absolute !important;
    top: 0.25in; left: 0.25in; right: 0.25in; bottom: 0.25in;
    border: 2pt solid #E8B4B8 !important; border-radius: 12pt !important;
    pointer-events: none !important;
  }
  .print-footer {
    position: fixed; bottom: 0.3in; left: 0; right: 0;
    text-align: center; font-size: 7.5pt;
    color: #A0607A; font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.06em;
  }
}
