/* ============================================================
   #PreMarriageTalk — Self-to-Spouse Mapping Toolkit Styles
   High-Contrast, Modern & Structured UI Design
   ============================================================ */

/* ---------- Local Fonts (TT Wellingtons) ---------- */
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial DemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TT Wellingtons';
  src: url('../../assets/fonts/TT Wellingtons Trial Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after,
body, button, input, select, textarea, optgroup, option,
h1, h2, h3, h4, h5, h6, p, span, a, label, div {
  font-family: 'TT Wellingtons', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
  --primary-teal: #0d8f8f;
  --teal-dark: #004d4d;
  --teal-light: #e6f7f7;
  --teal-glow: rgba(13, 143, 143, 0.22);
  --coral-accent: #d96a6c;
  --coral-light: #fdf0f0;
  --gold-accent: #f7b731;
  --bg-page: #edf2f7;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --border-focus: #0d8f8f;
}

body {
  background-color: var(--bg-page);
  background-image: radial-gradient(#d1dbe5 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-main);
  font-family: 'TT Wellingtons', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TOP APP HEADER
   ============================================================ */
.app-header {
  background: #ffffff;
  border-bottom: 1.5px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 30, 40, 0.05);
}

.app-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-wrap img {
  height: 34px;
  width: auto;
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #003333;
}

.brand-badge {
  background: var(--teal-light);
  color: var(--primary-teal);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 143, 143, 0.25);
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-header-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-header-outline:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #94a3b0;
}

/* ============================================================
   STEPPER PROGRESS BAR
   ============================================================ */
.stepper-section {
  background: transparent;
  border-bottom: none;
  padding: 1.25rem 0 0;
  box-shadow: none;
}

.stepper-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.stepper-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  cursor: default;
}

.step-item.active {
  background: var(--teal-light);
  border-color: var(--primary-teal);
  box-shadow: 0 4px 14px var(--teal-glow);
}

.step-item.completed {
  background: #f0fdfa;
  border-color: rgba(13, 143, 143, 0.35);
  box-shadow: 0 2px 8px rgba(13, 143, 143, 0.06);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #94a3b0;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.step-item.active .step-number {
  background: var(--primary-teal);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 143, 143, 0.25);
}

.step-item.completed .step-number {
  background: #003333;
  color: #ffffff;
}

.step-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.step-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.step-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.step-item.active .step-title {
  color: var(--primary-teal);
}

/* ============================================================
   MAIN CONTAINER & STEP VIEWS
   ============================================================ */
.app-main {
  max-width: 880px;
  margin: 1.15rem auto 4rem;
  padding: 0 1rem;
}

.step-view {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-view.active {
  display: block;
}

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

/* Header for View */
.view-header {
  margin-bottom: 1.25rem;
  text-align: center;
  background: linear-gradient(135deg, #f0fdfa 0%, #e6f7f7 100%);
  padding: 1.5rem 1.25rem;
  border-radius: 16px;
  border: 1.5px solid rgba(13, 143, 143, 0.25);
  box-shadow: 0 4px 16px rgba(13, 143, 143, 0.05);
}

.view-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--teal-light);
  color: var(--primary-teal);
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(13, 143, 143, 0.2);
}

.view-title {
  font-family: 'TT Wellingtons', 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem;
}

.view-desc {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hide-on-desktop {
  display: none !important;
}

/* Form Container Wrapper */
.form-card {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

/* ============================================================
   SECTION BLOCKS (STANDALONE QUESTION MODULE CARDS)
   ============================================================ */
.section-block {
  background: #ffffff;
  border: 1.5px solid #d8e2ec;
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  position: relative;
  transition: all 0.2s ease;
}

.section-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* Thematic Accents for Sections */
.section-block.section-theme-teal {
  border-top: 4px solid var(--primary-teal);
}

.section-block.section-theme-emerald {
  border-top: 4px solid #059669;
  background: linear-gradient(180deg, #f7fdfa 0%, #ffffff 60px);
}

.section-block.section-theme-rose {
  border-top: 4px solid #e11d48;
  background: linear-gradient(180deg, #fff5f6 0%, #ffffff 60px);
}

.section-block.section-theme-indigo {
  border-top: 4px solid #4f46e5;
  background: linear-gradient(180deg, #f7f6ff 0%, #ffffff 60px);
}

.section-block.section-theme-sky {
  border-top: 4px solid #0284c7;
  background: linear-gradient(180deg, #f3f9fe 0%, #ffffff 60px);
}

.section-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.block-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-progress-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
}

.section-theme-teal .section-progress-badge { background: var(--teal-light); color: var(--primary-teal); border-color: rgba(13, 143, 143, 0.25); }
.section-theme-emerald .section-progress-badge { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.section-theme-rose .section-progress-badge { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
.section-theme-indigo .section-progress-badge { background: #ede9fe; color: #4338ca; border-color: #ddd6fe; }
.section-theme-sky .section-progress-badge { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }

.block-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

/* ============================================================
   FORM INPUTS & SELECTS
   ============================================================ */
.input-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  margin-bottom: 1rem;
}

.input-grid-2 > * {
  min-width: 0;
  width: 100%;
}

.input-grid-2 > .form-group {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-select {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #94a3b0;
  opacity: 1;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
  background: #ffffff;
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

/* ============================================================
   HIGH-CONTRAST CHOICE CARDS (TO THE POINT)
   ============================================================ */
.choice-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

#grid-conflict-style,
#grid-future-vision {
  grid-template-columns: repeat(4, 1fr);
}

#grid-role-models {
  grid-template-columns: repeat(3, 1fr);
}

#grid-emotional-needs {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 860px) {
  #grid-conflict-style,
  #grid-future-vision,
  #grid-emotional-needs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.choice-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.choice-card-rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary-teal);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(13, 143, 143, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.choice-card.ranked {
  border-color: var(--primary-teal);
  background: var(--teal-light);
  box-shadow: 0 4px 12px var(--teal-glow);
}

.choice-card.ranked .choice-card-rank-badge {
  display: flex !important;
}

#grid-emotional-needs .choice-card.selected::after {
  display: none !important;
}

.choice-card:hover {
  border-color: var(--primary-teal);
  background: #f0fdfd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 143, 143, 0.12);
}

.choice-card.selected {
  border: 2px solid var(--primary-teal);
  background: #e6f7f7;
  box-shadow: 0 4px 14px var(--teal-glow);
}

.choice-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: var(--primary-teal);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.choice-card-icon {
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}

.choice-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.3;
  padding-right: 1.2rem;
}

.choice-card.selected .choice-card-title {
  color: var(--teal-dark);
}

.choice-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.25rem;
}

/* ============================================================
   TAGS & CHIPS MULTI-SELECTOR
   ============================================================ */
.tags-wrapper {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.chip-tag:hover {
  background: #f0fdfd;
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  transform: translateY(-1px);
}

.chip-tag.selected {
  background: var(--primary-teal);
  border-color: var(--primary-teal);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--teal-glow);
}

/* Weakness Chip Variant */
.chip-tag.weakness-tag {
  background: #ffffff;
  border-color: #fecdd3;
  color: #475569;
}

.chip-tag.weakness-tag:hover {
  border-color: #e11d48;
  background: #fff1f2;
  color: #e11d48;
}

.chip-tag.weakness-tag.selected {
  background: #e11d48;
  border-color: #e11d48;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

.add-custom-tag-wrap {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.btn-add-tag {
  padding: 0.5rem 0.9rem;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-add-tag:hover {
  background: #0f172a;
}

/* ============================================================
   ACTION BUTTONS
   ============================================================ */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--border-color);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-teal) 0%, #1aadad 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.65rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px var(--teal-glow);
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #007070 0%, var(--primary-teal) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 143, 143, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b0;
}

/* ============================================================
   STEP 2: RECOMMENDATION ENGINE VIEW
   ============================================================ */
.loading-container {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid var(--border-color);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--teal-light);
  border-top-color: var(--primary-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

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

.recommendation-hero-card {
  background: linear-gradient(135deg, #003333 0%, #0d8f8f 60%, #1aadad 100%);
  border-radius: 18px;
  color: #ffffff;
  padding: 2rem 2.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 51, 51, 0.18);
}

.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.archetype-title,
#dash-archetype-title,
#rec-archetype-title {
  font-family: 'TT Wellingtons', 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.85rem;
  margin: 0 0 0.35rem;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.archetype-tagline,
#dash-archetype-tagline,
#rec-archetype-tagline {
  font-size: 1.05rem;
  color: #fde047 !important;
  font-style: italic;
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.archetype-summary,
#dash-archetype-summary,
#rec-archetype-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #f8fafc !important;
  margin-bottom: 0;
}

.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.insight-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.insight-card.complementary {
  border-left: 4px solid var(--primary-teal);
  background: #f7fdfd;
}

.insight-card.compatibility {
  border-left: 4px solid #3b82f6;
  background: #f7faff;
}

.insight-card.redflag {
  border-left: 4px solid #e11d48;
  background: #fff8f8;
  border-color: #fecdd3;
  margin-bottom: 1.25rem;
}

.insight-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.insight-card-content {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.55;
}

.traits-checklist-wrap {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.35rem;
  border: 1.5px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.trait-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  color: #334155;
}

.trait-item span.icon {
  color: var(--primary-teal);
  font-weight: 800;
}

.secondary-archetype-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-left: 4px solid var(--primary-teal);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sec-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sec-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.2rem 0;
}

.sec-desc {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.45;
}

/* ============================================================
   STEP 3: CRITERIA MATRIX VIEW
   ============================================================ */
.criteria-legend-banner {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 1rem 1.35rem;
  margin-bottom: 1.5rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: block;
}

.criteria-guide-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 0.45rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px dashed #cbd5e1;
  width: 100%;
}

.criteria-guide-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.55;
}

.criteria-guide-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.criteria-guide-bullet {
  color: var(--primary-teal);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.criteria-guide-sub {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.25rem;
}

.matrix-dimension-block {
  background: #ffffff;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.dim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1.5px solid #f1f5f9;
}

.dim-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dim-icon {
  font-size: 1.3rem;
}

.dim-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.dim-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid #cbd5e1;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.criteria-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.15s ease;
  gap: 0.75rem;
}

.criteria-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.criteria-row.criteria-recommended {
  background: #fefce8;
  border-color: #fde68a;
}

.criteria-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-grow: 1;
}

.criteria-text {
  font-size: 0.9rem;
  color: #1e293b;
  line-height: 1.4;
}

.rec-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  width: fit-content;
}

.criteria-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.toggle-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  user-select: none;
}

.toggle-btn.btn-wajib {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.toggle-btn.btn-wajib.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.toggle-btn.btn-toleransi {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.toggle-btn.btn-toleransi.active {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.btn-remove-criteria {
  background: transparent;
  border: none;
  color: #94a3b0;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-remove-criteria:hover {
  color: #dc2626;
  background: #fee2e2;
}

.add-custom-criteria-row {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

/* ============================================================
   STEP 4: SUMMARY & ROADMAP DASHBOARD
   ============================================================ */
.dashboard-printable-area {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid var(--border-color);
  padding: 2.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.doc-header {
  border-bottom: 2px solid #0d8f8f;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.doc-brand h2 {
  font-size: 1.3rem;
  color: #003333;
  margin: 0 0 0.2rem;
}

.doc-brand p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
}

.doc-meta {
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.summary-profile-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1.5px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.summary-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.sum-item-label {
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-teal, #0d8f8f);
  margin-bottom: 0.2rem;
}

.sum-item-val {
  font-size: 0.92rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.45;
}

.criteria-dual-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.matrix-col {
  border-radius: 14px;
  padding: 1.25rem;
  border: 1.5px solid var(--border-color);
}

.matrix-col.col-wajib {
  background: #fef2f2;
  border-color: #fecaca;
}

.matrix-col.col-toleransi {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.matrix-col-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.matrix-col-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.matrix-col.col-wajib .matrix-col-title { color: #991b1b; }
.matrix-col.col-toleransi .matrix-col-title { color: #166534; }

.matrix-col-desc {
  font-size: 0.76rem;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
}

.matrix-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.matrix-item-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.88rem;
  background: #ffffff;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.closing-message-block {
  background: linear-gradient(135deg, #fdf4f4 0%, #fff7f7 100%);
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0 0;
}

.closing-quote-text {
  font-size: 0.92rem;
  color: #0f172a;
  line-height: 1.5;
  margin: 0 0 0.75rem;
  font-style: italic;
}

.closing-dua {
  font-size: 1.15rem;
  color: var(--primary-teal);
  line-height: 1.6;
  margin: 0;
}

.closing-dua em {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  color: #64748b;
  margin-top: 0.15rem;
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ============================================================
   WELCOME OVERLAY SCREEN (COMPACT & SLEEK)
   ============================================================ */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.welcome-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.25rem 2.5rem 2.25rem;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
  border: 1.5px solid #e2e8f0;
  margin: auto;
}

.welcome-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto 0.85rem;
  width: 100%;
}

.welcome-logo img {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.welcome-eyebrow {
  display: block;
  text-align: center;
  color: var(--primary-teal);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.45rem;
}

.welcome-title {
  font-family: 'TT Wellingtons', 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.welcome-highlight {
  color: var(--primary-teal);
}

.welcome-body {
  text-align: center;
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 auto 1.35rem;
  max-width: 500px;
  text-wrap: balance;
}

.welcome-question-block {
  margin-bottom: 1rem;
}

.welcome-q-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
  padding-top: 0.45rem;
}

.welcome-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.welcome-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.welcome-choice:hover {
  border-color: var(--primary-teal);
  background: var(--teal-light);
}

.welcome-choice.selected {
  border: 2px solid var(--primary-teal);
  background: var(--teal-light);
  box-shadow: 0 2px 8px var(--teal-glow);
}

.wc-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.wc-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}

.welcome-choice.selected .wc-text {
  color: var(--teal-dark);
}

.wc-input-inline {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  width: 100%;
  padding: 0;
}

.wc-input-inline::placeholder {
  color: #94a3b0;
  font-weight: 500;
}

.welcome-choice.selected .wc-input-inline {
  color: var(--teal-dark);
}

.readiness-slider-wrap {
  margin-bottom: 0.35rem;
}

.readiness-slider {
  width: 100%;
  accent-color: var(--primary-teal);
  height: 6px;
  cursor: pointer;
  margin-bottom: 0.25rem;
}

.readiness-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

#readiness-display {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-teal);
}

.readiness-desc {
  font-size: 0.8rem;
  color: #334155;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.35;
}

.welcome-cta {
  width: 100%;
  background: linear-gradient(135deg, var(--teal-600) 0%, var(--primary-teal) 100%);
  color: #ffffff;
  border: none;
  padding: 0.95rem 1.75rem;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(13, 143, 143, 0.3);
  margin-top: 1rem;
}

.welcome-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 143, 143, 0.4);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body { background: #ffffff !important; color: #000000 !important; }
  .app-header, .stepper-section, .dashboard-toolbar, .form-actions, .btn-remove-criteria, .toggle-btn, .add-custom-criteria-row, .welcome-overlay {
    display: none !important;
  }
  .app-main { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .dashboard-printable-area { border: none !important; box-shadow: none !important; padding: 0 !important; }
  .recommendation-hero-card { background: #f1f5f9 !important; color: #000000 !important; border: 1px solid #cbd5e1 !important; }
  .archetype-title { color: #003333 !important; }
  .archetype-tagline { color: #b45309 !important; }
  .archetype-summary { color: #334155 !important; }
  .criteria-dual-matrix { grid-template-columns: 1fr 1fr !important; page-break-inside: avoid; }
}

/* ============================================================
   MOBILE RESPONSIVENESS (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Welcome Overlay Mobile */
  .welcome-card {
    padding: 1.5rem 1.15rem;
    max-width: 94%;
    width: 100%;
  }
  .welcome-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto 0.5rem;
    width: 100%;
  }
  .welcome-logo img {
    height: 42px;
    width: auto;
    display: block;
    margin: 0 auto;
  }
  .welcome-title {
    font-size: 1.45rem;
    line-height: 1.25;
  }
  .welcome-body {
    font-size: 0.88rem;
    line-height: 1.45;
    max-width: 320px;
    margin: 0 auto 1.15rem;
    text-wrap: balance;
  }
  .welcome-disclaimer-block {
    padding: 1rem 0.95rem !important;
  }
  .welcome-cta {
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    margin-top: 0.85rem;
  }

  /* Header */
  .app-header-inner {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }
  .brand-wrap {
    gap: 0.45rem;
    min-width: 0;
  }
  .brand-wrap img {
    height: 26px;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
  }
  .brand-badge {
    display: none !important;
  }
  .hide-on-mobile {
    display: none !important;
  }
  .hide-on-desktop {
    display: inline !important;
  }
  .header-right-actions {
    gap: 0.35rem;
    flex-shrink: 0;
  }
  .btn-header-outline {
    padding: 0.32rem 0.55rem;
    font-size: 0.74rem;
    white-space: nowrap;
    border-radius: 7px;
  }

  /* Floating Stepper Bar */
  .stepper-section {
    padding: 0.85rem 0 0;
  }
  .stepper-container {
    padding: 0 0.65rem;
  }
  .stepper-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    width: 100%;
  }
  .step-item {
    padding: 0.45rem 0.35rem;
    gap: 0.35rem;
    border-radius: 10px;
    justify-content: center;
    min-width: 0;
  }
  .step-number {
    width: 19px;
    height: 19px;
    font-size: 0.65rem;
    flex-shrink: 0;
  }
  .step-info {
    min-width: 0;
    overflow: hidden;
  }
  .step-title {
    font-size: 0.72rem;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  /* App Main & Form Card */
  .app-main {
    padding: 0 0.65rem;
    margin: 0.85rem auto 3rem;
  }
  .form-card {
    border-radius: 16px;
  }

  /* View Header */
  .view-header {
    padding: 1.15rem 1rem;
    border-radius: 14px;
    margin-bottom: 0.85rem;
  }
  .view-title {
    font-size: 1.35rem;
  }
  .view-desc {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  /* Section Blocks */
  .section-block {
    padding: 1rem 0.85rem;
    border-radius: 14px;
    margin-bottom: 0.85rem;
  }
  .section-progress-row {
    margin-bottom: 0.35rem;
  }
  .block-title {
    font-size: 1.02rem;
  }
  .section-progress-badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
  }
  .block-subtitle {
    font-size: 0.78rem;
    margin-bottom: 0.85rem;
  }

  /* Form Inputs & Grids (Fix for mobile row & spacing) */
  .input-grid-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .input-grid-2 > .form-group {
    margin-bottom: 0;
  }
  .form-group {
    margin-bottom: 0.75rem;
  }
  .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
  }
  .form-input, .form-select, .form-textarea {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  /* Conflict & Future Vision Grids */
  #grid-conflict-style,
  #grid-future-vision,
  #grid-emotional-needs {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
  }
  .choice-card {
    padding: 0.55rem 0.55rem;
    border-radius: 10px;
  }
  .choice-card-icon {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  .choice-card-title {
    font-size: 0.78rem;
  }
  .choice-card-desc {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* Tag Chips */
  .tags-wrapper {
    padding: 0.55rem;
    gap: 0.35rem;
  }
  .chip-tag {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
  }

  /* Step 2: Criteria Matrix */
  .criteria-legend-banner {
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    margin-bottom: 0.85rem;
  }
  .criteria-guide-header {
    font-size: 0.88rem;
  }
  .criteria-guide-list {
    font-size: 0.82rem;
    gap: 0.4rem;
  }
  .matrix-dimension-block {
    padding: 0.95rem 0.85rem;
    border-radius: 12px;
    margin-bottom: 0.85rem;
  }
  .dim-title {
    font-size: 0.92rem;
  }
  .criteria-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }
  .criteria-text-wrap {
    min-width: 0;
    flex: 1 1 auto;
  }
  .criteria-text {
    font-size: 0.84rem;
    line-height: 1.35;
  }
  .criteria-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
  }
  .toggle-btn {
    padding: 0.35rem 0.45rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    min-width: 32px;
    height: 32px;
  }
  .toggle-btn .btn-text {
    display: none !important;
  }
  .toggle-btn .btn-bullet {
    font-size: 0.85rem;
    line-height: 1;
  }
  .btn-remove-criteria {
    padding: 0.25rem;
    font-size: 0.8rem;
  }
  .add-custom-criteria-row {
    flex-direction: column;
    gap: 0.45rem;
  }
  .add-custom-criteria-row .btn-add-tag {
    width: 100%;
  }

  /* Step 3: Roadmap Dashboard */
  .dashboard-printable-area {
    padding: 1.15rem 0.85rem;
    border-radius: 14px;
  }
  .doc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .doc-brand h2 {
    font-size: 1.15rem;
  }
  .doc-meta {
    text-align: left;
    font-size: 0.8rem;
  }
  .summary-profile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.65rem;
  }
  .sum-item-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--primary-teal, #0d8f8f);
    letter-spacing: 0.3px;
  }
  .sum-item-val {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.4;
  }
  .criteria-dual-matrix {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .dashboard-toolbar {
    flex-direction: column;
    gap: 0.6rem;
  }
  .dashboard-toolbar .btn-primary,
  .dashboard-toolbar .btn-secondary,
  .dashboard-toolbar a {
    width: 100%;
    justify-content: center;
  }

  /* Form Actions Bottom Buttons */
  .form-actions {
    flex-direction: column-reverse;
    gap: 0.65rem;
  }
  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Mobile Footer */
  .footer-simple {
    padding: 1.4rem 1rem;
  }
  .footer-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.4;
  }
  .footer-brand {
    white-space: nowrap;
    display: block;
  }
  .footer-dash {
    display: none;
  }
  .footer-tagline {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
  }
  .footer-links {
    margin-top: 0.45rem;
    font-size: 0.82rem;
  }
}

/* ---------- Simple Footer ---------- */
.footer-simple {
  background: #ffffff;
  border-top: 1.5px solid var(--border-color, #e2e8f0);
  padding: 1.75rem 1.25rem;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 950px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.footer-content p {
  margin: 0;
}

.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--primary-teal, #0d8f8f);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}
