/* Morning intro-config preview — the preset input kit in a 390-wide phone
 * frame. PROVISIONAL / designer-pending: these are functional forms on the
 * app's locked Foundation tokens, not designed content. Palette + type are
 * MIRRORED from console.css / preview.css (canonical values live in Figma
 * and the Flutter app's resource system); this file follows, never leads.
 *
 * Type mapping (same families as the flow preview):
 *   overline   Source Sans 3, caps, Text/Tertiary
 *   question   Source Serif 4 22 semibold (Title role)
 *   sentence   Source Serif 4 20 (reader-facing conditional sentence)
 *   blanks     Brand/Secondary (orange) — reserved for reader words
 *   CTA        Brand/Secondary (orange), same as the flow preview CTA
 */

:root {
  /* Mirror of the Foundation palette also declared in console/preview CSS;
   * kept here so the intro preview renders even if load order changes. */
  --i-brand-purple: #6E4C9C;
  --i-brand-purple-pressed: #573C7E;
  --i-brand-orange: #E0603A;
  --i-ui-0: #FFFFFF;
  --i-ui-50: #FFFDFA;
  --i-ui-100: #FAF4EA;
  --i-ui-150: #F3EBDD;
  --i-ui-200: #ECE1D2;
  --i-ui-300: #DDD0BD;
  --i-text-primary: #2A1E14;
  --i-text-secondary: #6B5A4A;
  --i-text-tertiary: #9A8E86;
}

.intro-preview-app {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro-empty {
  color: var(--i-text-tertiary);
  font-size: 14px;
}

.intro-hint {
  color: var(--i-text-tertiary);
  font-size: 13px;
  text-align: center;
  margin: 14px auto 0;
}

/* ---- phone frame ---- */

.intro-phone {
  width: 390px;
  height: 720px;
  background: var(--i-ui-100);
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--i-ui-200);
}

.intro-head {
  padding: 22px 24px 0;
}

.intro-overline {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--i-text-tertiary);
  text-align: center;
}

.intro-bar {
  height: 2px;
  background: var(--i-ui-200);
  border-radius: 2px;
  margin: 12px auto 0;
  width: 174px;
}

.intro-fill {
  height: 2px;
  width: 0;
  background: var(--i-text-tertiary);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.intro-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 30px;
  overflow-y: auto;
}

.intro-content > * {
  margin: 10px 0;
}

.intro-foot {
  padding: 0 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* When only the CTA is present, keep it centered. */
.intro-foot:not(:has(.intro-back)) {
  justify-content: center;
}

/* ---- question copy ---- */

.intro-question {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 29px;
  color: var(--i-text-primary);
}

.intro-note {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 14px;
  color: var(--i-text-secondary);
  background: var(--i-ui-150);
  border-radius: 12px;
  padding: 12px 14px;
}

/* ---- single-select chips ---- */

.intro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.intro-chip {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--i-text-secondary);
  background: var(--i-ui-50);
  border: 1px solid var(--i-ui-300);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  user-select: none;
}

.intro-chip:hover {
  background: var(--i-ui-150);
}

.intro-chip.selected {
  background: var(--i-brand-purple);
  border-color: var(--i-brand-purple);
  color: var(--i-ui-0);
}

/* ---- multi-select (toggle chips + selection-bound hint) ---- */
/* Chips reuse .intro-chips / .intro-chip; .intro-multi only tags the group. */

.intro-minmax {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--i-text-tertiary);
  text-align: center;
}

/* ---- scale (ordered row of points, one selectable) ---- */

.intro-scale {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.intro-scale-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 54px;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--i-text-secondary);
  background: var(--i-ui-50);
  border: 1px solid var(--i-ui-300);
  border-radius: 14px;
  padding: 10px 10px 8px;
  cursor: pointer;
  user-select: none;
}

.intro-scale-point:hover {
  background: var(--i-ui-150);
}

.intro-scale-point.selected {
  background: var(--i-brand-purple);
  border-color: var(--i-brand-purple);
  color: var(--i-ui-0);
}

.intro-scale-num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.intro-scale-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
}

/* ---- yes-no (two buttons) ---- */

.intro-yesno {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.intro-yn-btn {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--i-text-secondary);
  background: var(--i-ui-50);
  border: 1px solid var(--i-ui-300);
  border-radius: 14px;
  padding: 12px 30px;
  cursor: pointer;
  user-select: none;
}

.intro-yn-btn:hover {
  background: var(--i-ui-150);
}

.intro-yn-btn.selected {
  background: var(--i-brand-purple);
  border-color: var(--i-brand-purple);
  color: var(--i-ui-0);
}

/* ---- conditional-text: sentence interleaved with input bars ---- */
/* Owner-directed restructure (mirrors the phone app): the variant sentence
 * is split at each blank and stacked vertically in reading order — text
 * segment, input bar, next segment, next bar, trailing text last. One
 * layout for 1..N blanks; no "Blank N" labels. */

.intro-sentence {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.intro-seg {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 20px;
  line-height: 28px;
  color: var(--i-text-primary);
  white-space: pre-wrap;
}

.intro-blank {
  width: 100%;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 20px;
  color: var(--i-brand-orange);
  background: var(--i-ui-50);
  border: 1px solid var(--i-ui-300);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

.intro-blank:focus {
  border-color: var(--i-brand-orange);
}

.intro-blank::placeholder {
  color: var(--i-ui-400, #BCAB92);
}

/* ---- free-text inputs ---- */

.intro-textinput {
  width: 100%;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  color: var(--i-text-primary);
  background: var(--i-ui-50);
  border: 1px solid var(--i-ui-300);
  border-radius: 12px;
  padding: 14px;
  outline: none;
  resize: none;
}

.intro-textinput:focus {
  border-color: var(--i-brand-orange);
}

/* ---- CTA + back ---- */

.intro-cta {
  background: none;
  border: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  text-decoration: underline;
  color: var(--i-brand-orange);
  cursor: pointer;
  user-select: none;
}

.intro-back {
  background: none;
  border: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--i-text-tertiary);
  cursor: pointer;
  user-select: none;
}

/* ---- review panel ---- */

.intro-review {
  width: 100%;
  text-align: left;
}

.intro-review-title {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--i-text-tertiary);
  margin: 18px 0 8px;
}

.intro-vars {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.intro-vars td {
  border-bottom: 1px solid var(--i-ui-200);
  padding: 8px 6px;
  vertical-align: top;
}

.intro-var-name {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  color: var(--i-text-secondary);
  white-space: nowrap;
  width: 1%;
  padding-right: 16px !important;
}

.intro-var-value {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--i-text-primary);
}

.intro-assembled {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 17px;
  line-height: 25px;
  color: var(--i-text-primary);
  background: var(--i-ui-150);
  border: 1px solid var(--i-ui-300);
  border-radius: 12px;
  padding: 14px 16px;
}
