/* ---- FLOW SHELL ---- */
.flow-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(44, 24, 16, 0.07);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.flow-nav-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.flow-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 200px;
}

.flow-progress-label {
  font-size: 12px;
  color: var(--fg-light);
  font-weight: 500;
}

.flow-progress-track {
  width: 200px;
  height: 4px;
  background: rgba(44, 24, 16, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

.flow-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.4s ease;
  min-width: 4px;
}

/* ---- INTRO ---- */
.flow-intro-wrap {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.flow-intro-card {
  max-width: 960px;
  width: 100%;
  display: flex;
  gap: 80px;
  align-items: center;
}

.flow-intro-visual {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

.flow-intro-content {
  flex: 1;
}

.flow-intro-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 20px;
  margin-top: 16px;
}

.flow-intro-content h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.flow-intro-sub {
  color: var(--fg-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 36px;
}

.flow-intro-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}

.intro-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.intro-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.intro-step strong {
  display: block;
  font-weight: 600;
  color: var(--fg);
  font-size: 15px;
  margin-bottom: 2px;
}

.intro-step p {
  color: var(--fg-muted);
  font-size: 14px;
  margin: 0;
}

.flow-intro-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--fg-light);
}

/* ---- STEP CARDS ---- */
.flow-step-wrap {
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 24px;
}

.flow-step-wrap--wide {
  justify-content: flex-start;
  padding-top: 40px;
}

.flow-step-card {
  background: var(--cream);
  border: 1px solid rgba(44, 24, 16, 0.08);
  border-radius: var(--radius);
  padding: 52px 56px;
  max-width: 640px;
  width: 100%;
}

.flow-step-card--wide {
  max-width: 760px;
}

.flow-step-badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.flow-question {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--fg);
  margin-bottom: 16px;
}

.flow-hint {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ---- TEXTAREA ---- */
.flow-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid rgba(44, 24, 16, 0.12);
  border-radius: 14px;
  padding: 20px 24px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  min-height: 140px;
}

.flow-textarea:focus {
  border-color: var(--accent);
}

.flow-textarea--tall {
  min-height: 220px;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: #b35f3a; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--fg);
  border: 1.5px solid rgba(44, 24, 16, 0.2);
  border-radius: 100px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 16px 40px; font-size: 17px; }

.flow-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ---- DOTS ---- */
.flow-dots {
  display: flex;
  gap: 8px;
}

.flow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(44, 24, 16, 0.15);
  transition: background 0.2s;
}

.flow-dot.active {
  background: var(--accent);
}

/* ---- STORY ---- */
.flow-story-meta {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.flow-char-count {
  font-size: 13px;
  color: var(--fg-light);
}

.flow-ai-note {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--accent-glow);
  border-radius: 12px;
  font-size: 14px;
  color: var(--accent);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}

.flow-ai-icon {
  flex-shrink: 0;
  font-size: 16px;
}

/* ---- ERROR ---- */
.flow-error {
  background: #fce8e8;
  border: 1px solid #f5c6c6;
  color: #8b3333;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ---- JOURNAL ---- */
.flow-journal-header {
  max-width: 760px;
  width: 100%;
  margin-bottom: 32px;
  padding: 0 12px;
}

.journal-card {
  background: var(--cream);
  border: 1px solid rgba(44, 24, 16, 0.08);
  border-radius: var(--radius);
  max-width: 760px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 24px;
  animation: slideUp 0.4s ease both;
  animation-delay: var(--card-delay, 0s);
}

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

.journal-card-header {
  padding: 36px 44px 28px;
  background: var(--bg-warm);
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
}

.journal-value-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.journal-value-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 12px;
}

.journal-value-desc {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 540px;
}

.journal-card-body {
  padding: 28px 44px 36px;
}

.journal-prompt {
  background: var(--accent-glow);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.journal-prompt-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.journal-prompt p {
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
}

.flow-journal-footer {
  max-width: 760px;
  width: 100%;
  text-align: center;
  padding: 16px 12px 60px;
}

.flow-journal-footer .flow-hint {
  margin-bottom: 20px;
}

/* ---- STEP LABEL (in nav) ---- */
.flow-step-label {
  font-size: 13px;
  color: var(--fg-light);
  font-weight: 500;
}

/* ---- NAME STEP ---- */
.flow-field { margin-bottom: 4px; }

.flow-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
}

.flow-label-opt {
  font-weight: 400;
  color: var(--fg-light);
}

.flow-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid rgba(44, 24, 16, 0.15);
  border-radius: 14px;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}

.flow-input:focus { border-color: var(--accent); }

/* ---- ROLE CHIPS ---- */
.flow-option-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-option-chip { cursor: pointer; display: inline-flex; }
.flow-option-chip input[type="radio"] { display: none; }

.flow-option-chip span {
  display: inline-block;
  padding: 10px 20px;
  border: 1.5px solid rgba(44, 24, 16, 0.15);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: all 0.15s;
  background: var(--cream);
}

.flow-option-chip input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ---- QUIZ OPTION CARDS ---- */
.flow-option-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.flow-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: var(--cream);
  border: 1.5px solid rgba(44, 24, 16, 0.1);
  border-radius: 16px;
  padding: 18px 22px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.flow-option-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.flow-option-card:active { transform: translateY(0); }

.flow-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-warm);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-muted);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.flow-option-card:hover .flow-option-letter {
  background: var(--accent);
  color: #fff;
}

.flow-option-text { line-height: 1.45; }

/* ---- STORY PROMPT CARDS ---- */
.flow-prompt-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 24px;
}

.flow-prompt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--cream);
  border: 2px solid rgba(44, 24, 16, 0.1);
  border-radius: 16px;
  padding: 18px 22px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  transition: border-color 0.15s, background 0.15s;
}

.flow-prompt-card:hover,
.flow-prompt-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.flow-prompt-icon { font-size: 22px; flex-shrink: 0; }
.flow-prompt-label { line-height: 1.3; }

.flow-story-textarea-wrap {
  margin-top: 4px;
  animation: slideDown 0.2s ease;
}

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

/* ---- VALUE CARDS (multi-select) ---- */
.flow-value-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0 4px;
}

.flow-value-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 2px solid rgba(44, 24, 16, 0.1);
  border-radius: 18px;
  padding: 22px 20px 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.flow-value-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.flow-value-card:hover {
  border-color: var(--accent);
  background: rgba(196, 112, 75, 0.04);
}

.flow-value-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.flow-value-card-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(44, 24, 16, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: transparent;
  transition: all 0.15s;
}

.flow-value-card.selected .flow-value-card-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.flow-value-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 8px;
  padding-right: 32px;
}

.flow-value-card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.flow-selection-count {
  font-size: 14px;
  color: var(--fg-light);
  font-weight: 500;
}

/* ---- REFLECTION STEP ---- */
.flow-value-header {
  background: var(--bg-warm);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 8px;
}

.flow-value-name-badge {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.flow-value-desc-small {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
}

.flow-reflection-prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 20px;
}

.flow-reflection-prompt-btn {
  display: block;
  width: 100%;
  background: var(--cream);
  border: 2px solid rgba(44, 24, 16, 0.1);
  border-radius: 14px;
  padding: 15px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg-muted);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.flow-reflection-prompt-btn:hover,
.flow-reflection-prompt-btn.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--fg);
}

/* ---- DOTS — done state ---- */
.flow-dot.done {
  background: var(--accent);
  opacity: 0.4;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .flow-nav { padding: 16px 20px; }
  .flow-progress { display: none; }
  .flow-intro-card { flex-direction: column; gap: 40px; text-align: center; }
  .flow-intro-visual { width: 180px; height: 180px; margin: 0 auto; }
  .flow-intro-steps { text-align: left; }
  .flow-step-card { padding: 28px 20px; }
  .journal-card-header { padding: 24px 24px 20px; }
  .journal-card-body { padding: 20px 24px 28px; }
  .flow-step-wrap { padding: 24px 14px; }
  .flow-value-cards { grid-template-columns: 1fr; }
  .flow-option-card, .flow-prompt-card, .flow-reflection-prompt-btn { font-size: 15px; }
}
