/* ==========================================================
   Sienna Fashion — editorial atelier
   Paper + ink + one strike of tomato.
   ========================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --paper:        #F2EDE4;
  --paper-deep:   #E8DFD1;
  --paper-bright: #FBF8F2;
  --ink:          #18140F;
  --ink-soft:     #4A4138;
  --ink-ghost:    rgba(24, 20, 15, 0.55);
  --tomato:       #D94A2B;
  --tomato-deep:  #A8321C;
  --tomato-ghost: rgba(217, 74, 43, 0.12);
  --thread:       #8A7F73;
  --stitch:       #C4B8A8;

  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:    'General Sans', 'Inter', system-ui, sans-serif;
  --font-hand:    'Instrument Serif', 'Fraunces', serif;

  --ease-spring:  cubic-bezier(0.34, 1.2, 0.64, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);

  --maxw:         1280px;
  --gutter:       clamp(20px, 5vw, 56px);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- 3. Base ---------- */
html { font-size: 16px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 1200px 600px at 10% 0%, rgba(217,74,43,0.04), transparent 60%),
    radial-gradient(ellipse 900px 700px at 100% 100%, rgba(24,20,15,0.05), transparent 55%);
}

/* Paper grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.09 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 4. Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.hand {
  font-family: var(--font-hand);
  font-style: italic;
  letter-spacing: 0;
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.num-tag {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ---------- 5. Shell / Header ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter) 14px;
  border-bottom: 1px solid var(--stitch);
  position: relative;
}
.masthead::after {
  content: "";
  position: absolute; left: var(--gutter); right: var(--gutter);
  bottom: -1px; height: 1px;
  background-image: linear-gradient(90deg, var(--stitch) 50%, transparent 50%);
  background-size: 8px 1px;
}
.masthead .brand {
  display: flex; align-items: baseline; gap: 14px;
}
.masthead .brand .mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.masthead .brand .sub {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 16px;
  color: var(--tomato);
}
.masthead .meta {
  display: flex; gap: 24px; align-items: center;
}
.masthead .meta .issue { letter-spacing: 0.15em; text-transform: uppercase; font-size: 10px; color: var(--ink-soft); }
.masthead .meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tomato); }

.test-tag {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--paper-bright);
  background: var(--tomato);
  padding: 3px 8px 3px 9px;
  border-radius: 2px;
  margin-left: 12px;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .4s var(--ease-spring), background .3s, color .3s, box-shadow .3s;
  will-change: transform;
  position: relative;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--tomato);
  outline-offset: 3px;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--ink);
  color: var(--paper-bright);
  box-shadow: 0 8px 24px -12px rgba(24,20,15,0.35);
}
.btn-primary:hover {
  background: var(--tomato);
  color: var(--paper-bright);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -14px rgba(217,74,43,0.55);
}
.btn-primary .arrow { transition: transform .4s var(--ease-spring); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  color: var(--ink-soft);
  padding: 16px 18px;
  letter-spacing: 0.1em;
}
.btn-ghost:hover { color: var(--tomato); }

/* ---------- 7. Login / Gate ---------- */
.gate {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  min-height: calc(100vh - 80px);
}
.gate-card {
  text-align: center;
  max-width: 460px;
  width: 100%;
}
.gate-card .eyebrow { margin-bottom: 28px; display: inline-flex; align-items: center; gap: 10px; }
.gate-card .eyebrow::before,
.gate-card .eyebrow::after {
  content: ""; display: block;
  width: 28px; height: 1px; background: var(--thread);
}
.gate-card h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: clamp(88px, 18vw, 220px);
  letter-spacing: -0.06em;
  line-height: 0.85;
  margin: 0 0 18px;
  text-transform: lowercase;
}
.gate-card h1 .italic {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--tomato);
  letter-spacing: -0.03em;
  font-weight: 400;
}
.gate-card .kicker {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 24px;
  color: var(--ink-soft);
  margin-bottom: 54px;
  letter-spacing: 0;
}
.pin-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}
.pin-row input {
  width: 56px;
  height: 72px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  background: var(--paper-bright);
  border: 1px solid var(--stitch);
  border-radius: 4px;
  color: var(--ink);
  letter-spacing: 0;
  transition: border-color .2s, background .2s, transform .2s var(--ease-spring);
}
.pin-row input:focus {
  outline: none;
  border-color: var(--tomato);
  background: #fff;
}
.pin-row input.filled { border-color: var(--ink); }
.pin-error {
  color: var(--tomato-deep);
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 15px;
  min-height: 22px;
  transition: opacity .2s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.pin-row.shake input { animation: shake .4s var(--ease-out); }

/* ---------- 8. Landing / Welcome ---------- */
.welcome {
  flex: 1;
  padding: 60px var(--gutter) 100px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 80px;
  align-items: start;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}
.welcome .lead h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: clamp(56px, 9vw, 132px);
  letter-spacing: -0.045em;
  line-height: 0.88;
  margin: 0 0 28px;
}
.welcome .lead h1 .italic {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--tomato);
}
.welcome .lead h1 .block { display: block; }
.welcome .lead p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 38px;
}
.welcome .lead .btn-primary { font-size: 13px; }

.welcome .aside {
  padding-top: 12px;
  border-left: 1px dashed var(--stitch);
  padding-left: 40px;
}
.welcome .aside h3 {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 24px;
}
.welcome .aside ol {
  counter-reset: step;
}
.welcome .aside ol li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 22px 0;
  border-bottom: 1px solid var(--stitch);
  gap: 16px;
}
.welcome .aside ol li:last-child { border-bottom: 0; }
.welcome .aside ol li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 300;
  font-size: 28px;
  color: var(--tomato);
  line-height: 1;
}
.welcome .aside ol li h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  line-height: 1.1;
}
.welcome .aside ol li p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .welcome { grid-template-columns: 1fr; gap: 40px; }
  .welcome .aside { border-left: 0; padding-left: 0; border-top: 1px dashed var(--stitch); padding-top: 32px; }
}

/* ---------- 9. Interview: tape measure & layout ---------- */
.interview {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.tape {
  position: relative;
  padding: 24px 0 28px;
  margin-bottom: 8px;
}
.tape-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tape-meta .section-name {
  font-family: var(--font-hand);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  color: var(--tomato);
}
.tape-bar {
  position: relative;
  height: 20px;
  background: var(--paper-deep);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--stitch);
}
.tape-marks {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  pointer-events: none;
}
.tape-marks span {
  position: relative;
}
.tape-marks span::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--thread);
  opacity: 0.5;
}
.tape-marks span:nth-child(5n)::after {
  background: var(--ink);
  opacity: 0.7;
  top: -4px;
  bottom: -4px;
  width: 1.5px;
}
.tape-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--tomato), var(--tomato-deep));
  transition: width .6s var(--ease-spring);
  mix-blend-mode: multiply;
  border-radius: 1px;
}

/* ---------- 10. Question stage ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 64px;
  padding: 32px 0 40px;
  min-height: min(68vh, 720px);
  align-items: start;
}
@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; gap: 24px; min-height: 0; }
}

.stage-number {
  position: sticky;
  top: 32px;
}
.stage-number .qno {
  font-family: var(--font-display);
  font-weight: 200;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: clamp(120px, 18vw, 240px);
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: var(--ink);
}
.stage-number .qno .slash {
  color: var(--tomato);
  font-family: var(--font-hand);
  font-style: italic;
  font-weight: 400;
  font-size: 0.45em;
  vertical-align: 0.55em;
  margin: 0 0.1em;
}
.stage-number .sec-label {
  margin-top: 10px;
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 20px;
}

.stage-prompt h2 {
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 72, "SOFT" 50;
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin: 0 0 16px;
}
.stage-prompt .sub {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 36px;
  max-width: 54ch;
  line-height: 1.55;
}
.stage-prompt .hand-note {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--tomato);
  font-size: 20px;
  margin: 0 0 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 11. Input: short text / long text ---------- */
.input-text {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 72;
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.01em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  padding: 12px 0 16px;
  outline: none;
  line-height: 1.25;
  transition: border-color .2s;
}
.input-text::placeholder {
  color: var(--thread);
  font-style: italic;
  font-family: var(--font-hand);
  font-weight: 400;
}
.input-text:focus { border-color: var(--tomato); }

.input-long {
  width: 100%;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--stitch);
  padding: 20px 22px;
  border-radius: 4px;
  min-height: 180px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  transition: border-color .2s, background .2s;
}
.input-long:focus { border-color: var(--tomato); background: #fff; }
.input-long::placeholder { color: var(--thread); font-style: italic; }

.char-count {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: var(--font-body);
}
.char-count.near { color: var(--tomato); }

/* ---------- 12. Input: slider ---------- */
.slider-wrap {
  padding: 10px 0 8px;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.slider-labels .lbl {
  flex: 0 1 46%;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.slider-labels .lbl.right { text-align: right; color: var(--ink); }

.slider-track {
  position: relative;
  height: 4px;
  background: var(--stitch);
  border-radius: 2px;
  margin: 32px 0 12px;
}
.slider-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px; bottom: -12px;
  width: 1px;
  background: var(--thread);
  opacity: 0.5;
}
.slider-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--tomato);
  border-radius: 2px;
  transition: none;
}
.slider-thumb {
  position: absolute;
  top: 50%;
  width: 32px; height: 32px;
  transform: translate(-50%, -50%);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 50%;
  cursor: grab;
  transition: transform .25s var(--ease-spring), box-shadow .25s;
  box-shadow: 0 6px 16px -8px rgba(24,20,15,0.4);
}
.slider-thumb:hover { transform: translate(-50%, -50%) scale(1.08); }
.slider-thumb:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.04); }
.slider-thumb::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--tomato);
}
.slider-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  position: absolute;
  inset: 0;
  margin: 0;
  cursor: grab;
  opacity: 0;
}
.slider-value {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 18px;
  color: var(--tomato);
  min-height: 24px;
}

/* ---------- 13. Input: multi-pill ---------- */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 450;
  background: var(--paper-bright);
  border: 1px solid var(--stitch);
  border-radius: 999px;
  transition: border-color .2s, background .2s, color .2s, transform .25s var(--ease-spring);
  position: relative;
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink); background: #fff; }
.pill.selected {
  background: var(--ink);
  color: var(--paper-bright);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.pill.selected::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--tomato);
  border-radius: 50%;
  margin-right: 10px;
}

.pill-limit-note {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 16px;
}

/* ---------- 14. Input: multi-image (mood boards) ---------- */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.mood-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s var(--ease-spring);
  background: var(--paper-deep);
  border: 1px solid transparent;
}
.mood-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(24,20,15,0.75) 100%);
  pointer-events: none;
}
.mood-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out), filter .4s;
  filter: saturate(0.85) contrast(1.02);
}
.mood-card:hover { transform: translateY(-3px); }
.mood-card:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }
.mood-card .meta {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  color: var(--paper-bright);
  z-index: 2;
}
.mood-card .meta .label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.mood-card .meta .caption {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 14px;
  opacity: 0.9;
}
.mood-card .pick {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: var(--paper-bright);
  border-radius: 50%;
  z-index: 3;
  transform: scale(0);
  transition: transform .3s var(--ease-spring);
  display: grid; place-items: center;
  color: var(--tomato);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
}
.mood-card.selected {
  border-color: var(--tomato);
}
.mood-card.selected::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tomato);
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
}
.mood-card.selected .pick { transform: scale(1); }

/* ---------- 15. Input: color swatches ---------- */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.swatch {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--ease-spring);
  border: 1px solid var(--stitch);
}
.swatch:hover { transform: translateY(-2px); }
.swatch .color-fill {
  position: absolute;
  inset: 0;
  transition: transform .4s var(--ease-out);
}
.swatch .swatch-label {
  position: absolute;
  left: 10px; bottom: 9px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--paper-bright);
  padding: 2px 8px;
  border-radius: 2px;
  z-index: 2;
}
.swatch.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--tomato), 0 0 0 4px var(--paper);
}
.swatch .check {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper-bright);
  display: grid; place-items: center;
  font-size: 12px;
  color: var(--tomato);
  font-family: var(--font-display);
  transform: scale(0);
  transition: transform .25s var(--ease-spring);
  z-index: 2;
}
.swatch.selected .check { transform: scale(1); }

/* ---------- 16. Input: rating-triplets ---------- */
.triplet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.triplet-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--stitch);
}
.triplet-row:first-child { border-top: 1px solid var(--stitch); }
.triplet-row .tlabel {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.triplet-buttons {
  display: flex;
  gap: 6px;
}
.triplet-buttons button {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--stitch);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  transition: all .2s;
}
.triplet-buttons button:hover { border-color: var(--ink); color: var(--ink); }
.triplet-buttons button.selected {
  background: var(--ink);
  color: var(--paper-bright);
  border-color: var(--ink);
}
.triplet-buttons button.selected[data-value="fun"]    { background: var(--tomato); border-color: var(--tomato); }
.triplet-buttons button.selected[data-value="nope"]   { background: var(--ink); }

/* ---------- 17. Input: single-card ---------- */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  background: var(--paper-bright);
  border: 1px solid var(--stitch);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .4s var(--ease-spring);
  text-align: left;
  width: 100%;
}
.card-option:hover { border-color: var(--ink); transform: translateX(2px); }
.card-option .label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.card-option .sub {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.card-option .arrow {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--thread);
  transition: color .25s, transform .3s var(--ease-spring);
}
.card-option:hover .arrow { color: var(--tomato); transform: translateX(4px); }
.card-option.selected {
  background: var(--ink);
  color: var(--paper-bright);
  border-color: var(--ink);
}
.card-option.selected .sub { color: var(--paper-deep); }
.card-option.selected .arrow { color: var(--tomato); }

/* ---------- 18. Nav bar ---------- */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 48px;
  border-top: 1px dashed var(--stitch);
}
.nav-bar .btn-ghost::before {
  content: "←";
  font-family: var(--font-display);
  margin-right: 8px;
  transition: transform .3s var(--ease-spring);
}
.nav-bar .btn-ghost:hover::before { transform: translateX(-3px); }

.nav-bar .arrow {
  font-family: var(--font-display);
  font-size: 16px;
}

/* ---------- 19. Generating state ---------- */
.generating {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
  min-height: calc(100vh - 80px);
}
.generating .inner { max-width: 560px; }
.generating h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: clamp(44px, 7vw, 84px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 24px;
}
.generating h2 .italic {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--tomato);
}
.generating .status {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  margin-bottom: 36px;
  min-height: 28px;
}
.stitch-loader {
  margin: 0 auto;
  width: 240px;
  height: 2px;
  background: var(--stitch);
  position: relative;
  overflow: hidden;
}
.stitch-loader::before {
  content: "";
  position: absolute;
  top: 0; left: -40%;
  height: 100%; width: 40%;
  background: var(--tomato);
  animation: thread 1.6s infinite var(--ease-out);
}
@keyframes thread {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* ---------- 20. Plan display ---------- */
.plan {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) 100px;
}
.plan-cover {
  padding: 48px 0 60px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}
.plan-cover .left .eyebrow { margin-bottom: 24px; }
.plan-cover h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: clamp(54px, 9vw, 128px);
  letter-spacing: -0.045em;
  line-height: 0.88;
  margin: 0 0 16px;
}
.plan-cover h1 .italic {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--tomato);
}
.plan-cover .persona {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  margin: 0;
}
.plan-cover .right {
  padding-bottom: 12px;
}
.plan-cover .right p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.plan-cover .right .progress-meta {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-cover .right .progress-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--tomato);
}

@media (max-width: 860px) {
  .plan-cover { grid-template-columns: 1fr; gap: 24px; }
}

.step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--stitch);
  position: relative;
}
.step:last-of-type { border-bottom: 0; }
.step-number {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: 72px;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--ink);
  position: sticky;
  top: 28px;
  align-self: start;
}
.step-number .slash {
  color: var(--tomato);
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 0.55em;
}
.step.done .step-number { color: var(--thread); }

.step-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0 0 12px;
  padding-right: 70px;
  transition: color .25s;
}
.step.done .step-body h3 { color: var(--thread); text-decoration: line-through; text-decoration-color: var(--tomato); text-decoration-thickness: 1.5px; }

.step-body .est {
  font-family: var(--font-hand);
  font-style: italic;
  color: var(--tomato);
  font-size: 17px;
  margin-bottom: 16px;
}
.step-body .desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 60ch;
}
.step-body .why {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  border-left: 2px solid var(--tomato);
  padding: 2px 0 2px 16px;
  margin: 0 0 28px;
  max-width: 60ch;
}

.resources h4 {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin: 0 0 14px;
}
.resources-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.resource {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper-bright);
  border: 1px solid var(--stitch);
  border-radius: 3px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s, transform .35s var(--ease-spring), background .2s;
}
.resource:hover { border-color: var(--ink); transform: translateY(-1px); background: #fff; }
.resource .pin {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--tomato);
  color: var(--paper-bright);
  font-family: var(--font-display);
  font-size: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}
.resource .rlabel {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 2px;
}
.resource .rnote {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.check {
  position: absolute;
  top: 40px; right: 0;
  width: 46px; height: 46px;
  border: 1.5px solid var(--ink);
  background: var(--paper-bright);
  border-radius: 3px;
  cursor: pointer;
  transition: background .25s, transform .3s var(--ease-spring);
  display: grid; place-items: center;
}
.check:hover { transform: scale(1.06); }
.check svg { width: 28px; height: 28px; opacity: 0; transition: opacity .3s; }
.step.done .check svg { opacity: 1; }
.step.done .check { background: var(--tomato); border-color: var(--tomato); }

@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; gap: 14px; }
  .step-number { position: static; font-size: 52px; }
  .step-body h3 { padding-right: 60px; }
}

/* ---------- 20b. Plan foot (start over) ---------- */
.plan-foot {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px dashed var(--stitch);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--stitch);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color .2s, color .2s, background .2s, transform .3s var(--ease-spring);
}
.btn-reset:hover {
  border-color: var(--tomato);
  color: var(--tomato);
  background: var(--paper-bright);
  transform: translateY(-1px);
}
.btn-reset .reset-x {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
  color: var(--tomato);
}
.reset-note {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 48ch;
}

/* ---------- 20c. Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(24, 20, 15, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.modal-overlay.open { opacity: 1; }
.modal-card {
  background: var(--paper);
  border: 1px solid var(--stitch);
  border-radius: 4px;
  padding: 40px 42px 30px;
  max-width: 460px;
  width: 100%;
  transform: translateY(12px) scale(0.98);
  transition: transform .35s var(--ease-spring);
  box-shadow: 0 30px 60px -20px rgba(24,20,15,0.35);
}
.modal-overlay.open .modal-card { transform: translateY(0) scale(1); }
.modal-card .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--tomato);
}
.modal-card .eyebrow::before,
.modal-card .eyebrow::after {
  content: ""; display: block;
  width: 18px; height: 1px; background: var(--tomato);
  opacity: 0.5;
}
.modal-card h3 {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
}
.modal-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}
.modal-actions .btn { font-size: 12px; padding: 12px 22px; }

/* ---------- 21. Footer ---------- */
.footer {
  padding: 30px var(--gutter) 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--stitch);
  margin-top: auto;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.footer .sig {
  font-family: var(--font-hand);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tomato);
}

/* ---------- 22. Transitions between views ---------- */
.view-enter { opacity: 0; transform: translateY(14px); }
.view-in { opacity: 1; transform: translateY(0); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }

.q-enter { opacity: 0; transform: translateY(10px); }
.q-in { opacity: 1; transform: translateY(0); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }

/* ---------- 23. Utility ---------- */
.hidden { display: none !important; }
.spacer { flex: 1; }

/* ---------- 24. Focus visible for accessibility ---------- */
button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--tomato);
  outline-offset: 3px;
  border-radius: 4px;
}
