:root {
  --teal: #00897B;
  --teal-light: #E0F2F1;
  --teal-dark: #00695C;
  --red: #E53935;
  --red-light: #FFEBEE;
  --orange: #FB8C00;
  --orange-light: #FFF3E0;
  --green: #43A047;
  --green-light: #E8F5E9;
  --blue: #1E88E5;
  --blue-light: #E3F2FD;
  --purple: #7E57C2;
  --purple-light: #EDE7F6;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 16px;
  --sidebar-width: 220px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F8F9FA;
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: transparent;
  padding: 28px 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  padding: 0 20px 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sidebar-section {
  padding: 0;
  margin-bottom: 4px;
}

.sidebar-section-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-600);
  padding: 16px 20px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  font-size: 12px;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.15s;
  border-left: 2px solid transparent;
}
.sidebar-link:hover {
  color: var(--gray-800);
}
.sidebar-link.active {
  color: var(--gray-900);
  font-weight: 600;
  border-left-color: var(--gray-400);
}

.sidebar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.6;
}
.sidebar-link.active .sidebar-dot {
  opacity: 1;
}

.sidebar-link .sidebar-emoji {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  opacity: 0.5;
}
.sidebar-link.active .sidebar-emoji {
  opacity: 0.8;
}

/* ===== MAIN CONTENT WITH SIDEBAR OFFSET ===== */
.main-content {
  margin-left: var(--sidebar-width);
}

/* ===== JOURNEY CARD ===== */
.journey {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
}

.journey-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  color: white;
}

.journey-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.journey-name { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.journey-archetype { font-size: 14px; opacity: 0.85; margin-top: 2px; }

.journey-priority {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.2);
}

.journey-quote {
  font-size: 17px;
  font-style: italic;
  color: var(--gray-600);
  padding: 0 0 24px 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 32px;
  line-height: 1.7;
}
.journey-quote::before { content: '\201C'; font-size: 28px; color: var(--gray-300); margin-right: 4px; vertical-align: -4px; }
.journey-quote::after { content: '\201D'; font-size: 28px; color: var(--gray-300); margin-left: 2px; vertical-align: -4px; }

/* ===== OVERVIEW TABLE ===== */
.journey-overview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.overview-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

.overview-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600); margin-bottom: 4px; }
.overview-value { font-size: 14px; font-weight: 600; }

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 48px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.step {
  position: relative;
  margin-bottom: 0;
  padding-bottom: 40px;
}
.step:last-child { padding-bottom: 0; }

.step-dot {
  position: absolute;
  left: -48px;
  top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 2;
  box-shadow: 0 0 0 4px #F8F9FA;
}
.dot-default { background: var(--gray-200); color: var(--gray-600); font-size: 12px; font-weight: 700; }
.dot-action { background: var(--teal-light); color: var(--teal-dark); }
.dot-cta { background: var(--blue-light); color: var(--blue); }
.dot-success { background: var(--green-light); color: var(--green); }
.dot-friction { background: var(--red-light); color: var(--red); }
.dot-exit { background: var(--gray-100); color: var(--gray-500); }
.dot-open-banking { background: var(--purple-light); color: var(--purple); }

.step-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.step-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
}

.step-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-screen { background: var(--gray-100); color: var(--gray-600); }
.badge-qualification { background: #E8EAF6; color: #3949AB; }
.badge-simulation { background: var(--teal-light); color: var(--teal-dark); }
.badge-cta { background: var(--blue-light); color: var(--blue); }
.badge-conversion { background: var(--green-light); color: var(--green); }
.badge-friction { background: var(--red-light); color: var(--red); }
.badge-open-banking { background: var(--purple-light); color: var(--purple); }
.badge-exit { background: var(--gray-100); color: var(--gray-500); }

.step-body {
  padding: 0 24px 20px;
}

.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.step-box {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.step-box-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.step-box-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
}

.step-emotion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray-600);
}
.step-emotion-icon { font-size: 18px; }

.step-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 12px;
  margin-right: 8px;
}

/* ===== OUTCOME ===== */
.journey-outcome {
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.outcome-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.outcome-text {
  font-size: 15px;
  line-height: 1.7;
}

/* ===== DIVIDER ===== */
.journey-divider {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.journey-divider hr {
  border: none;
  border-top: 2px solid var(--gray-200);
}

/* ===== PAGE TITLE ===== */
.page-header {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--gray-900);
}
.page-header p {
  font-size: 15px;
  color: var(--gray-600);
  margin-top: 8px;
  max-width: 600px;
  line-height: 1.6;
}

/* ===== CONTEXT BOX ===== */
.context-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.7;
}

/* ===== CALLOUT ===== */
.callout-info {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 13px;
}

.callout-blue {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.callout-warning {
  background: var(--red-light);
  color: var(--red);
}

/* ===== STEP HIGHLIGHT ===== */
.step-content.highlighted {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-md);
}
.step-content.highlighted-purple {
  border: 2px solid var(--purple);
}
.step-content.highlighted-new {
  border: 2px solid #3949AB;
}
.step-content.faded {
  background: var(--gray-50);
}

.header-blue { background: var(--blue-light); }
.header-purple { background: var(--purple-light); }
.header-indigo { background: #E8EAF6; }
.header-friction { border-left: 3px solid var(--red); }

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.section-subtitle {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ===== PERSONA TABLE (RÉCAP) ===== */
.persona-table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.persona-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.6;
}

.persona-table thead th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  text-align: left;
  padding: 14px 20px;
  border-bottom: 2px solid var(--gray-200);
  background: var(--gray-50);
}

.persona-table tbody td {
  padding: 20px 20px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: top;
}
.persona-table tbody tr:last-child td {
  border-bottom: none;
}

.persona-row-clickable {
  cursor: pointer;
  transition: background 0.12s;
}
.persona-row-clickable:hover {
  background: var(--gray-50);
}

.persona-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.persona-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.persona-table-archetype {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 400;
  margin-top: 1px;
}

.persona-table-quote {
  font-size: 12px;
  font-style: italic;
  color: var(--gray-600);
  margin-top: 6px;
  line-height: 1.5;
}

.persona-badge {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.persona-badge.primary {
  background: var(--blue-light);
  color: var(--blue);
}
.persona-badge.secondary {
  background: var(--gray-100);
  color: var(--gray-600);
}

@media (max-width: 900px) {
  .persona-table-wrapper { overflow-x: auto; }
  .persona-table { min-width: 700px; }
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(248,249,250,0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--gray-200);
    padding: 6px 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .sidebar-title,
  .sidebar-section-label { display: none; }
  .sidebar-section { display: flex; gap: 0; margin: 0; }
  .sidebar-link {
    padding: 8px 14px;
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-size: 11px;
  }
  .sidebar-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--gray-500);
  }
  .main-content {
    margin-left: 0;
    padding-bottom: 60px;
  }
  .journey-overview { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .journey-header { flex-direction: column; text-align: center; }
  .journey-priority { margin-left: 0; }
}
