/* QSR Pricing Elasticity Studio - Main Stylesheet */

/* QSR brand colors and variables */
:root {
  --dplus-blue: #0066FF;
  --dplus-dark: #1a1a2e;
  --dplus-purple: #6366f1;
  --dplus-green: #10b981;
  --dplus-red: #ef4444;
  --dplus-orange: #f59e0b;
}

/* Font Family */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Dark Theme Gradient Background */
[data-bs-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 24%),
    linear-gradient(180deg, #090d16 0%, #0f1626 48%, #10172b 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #e2e8f0;
}

/* Light Theme - Keep clean */
[data-bs-theme="light"] body {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Step Navigation */
.step-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .step-nav {
  background: rgba(6, 10, 19, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.32);
}

[data-bs-theme="light"] .step-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.step-nav .brand {
  font-weight: 700;
  font-size: 1.25rem;
}

.step-nav .brand span {
  color: var(--dplus-blue);
}

.step-indicator {
  display: flex;
  gap: var(--step-gap);
  align-items: center;
}

.step-dot {
  width: var(--step-dot-size, 32px);
  height: var(--step-dot-size, 32px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .step-dot {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: #e5e5e5;
}

[data-bs-theme="light"] .step-dot {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.1);
  color: #212529;
}

.step-dot.active {
  background: var(--dplus-blue);
  border-color: var(--dplus-blue);
  color: #fff;
}

.step-dot.completed {
  background: var(--dplus-green);
  border-color: var(--dplus-green);
  color: #fff;
}

.step-dot:hover {
  transform: scale(1.1);
}

/* Module color coding */
.step-dot.module-data-foundation {
  border-color: #17a2b8 !important;
}

.step-dot.module-data-foundation.active,
.step-dot.module-data-foundation.completed {
  background: #17a2b8 !important;
  border-color: #17a2b8 !important;
}

.step-dot.module-elasticity {
  border-color: #fd7e14 !important;
}

.step-dot.module-elasticity.active,
.step-dot.module-elasticity.completed {
  background: #fd7e14 !important;
  border-color: #fd7e14 !important;
}

.step-dot.module-simulation {
  border-color: #6f42c1 !important;
}

.step-dot.module-simulation.active,
.step-dot.module-simulation.completed {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.step-dot.module-segmentation {
  border-color: #6f42c1 !important;
}

.step-dot.module-segmentation.active,
.step-dot.module-segmentation.completed {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.step-dot.module-analytics {
  border-color: #20c997 !important;
}

.step-dot.module-analytics.active,
.step-dot.module-analytics.completed {
  background: #20c997 !important;
  border-color: #20c997 !important;
}

/* Step legend */
.steps-stack {
  --step-dot-size: 32px;
  --step-line-width: 24px;
  --step-gap: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: max-content;
  margin-right: 2rem;
}

.step-legend {
  display: grid;
  grid-template-columns:
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size);
  column-gap: var(--step-gap);
  align-items: center;
  margin-top: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
  justify-content: center;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-sizing: border-box;
  flex: 0 0 12px;
  aspect-ratio: 1 / 1;
}

.legend-color.data-foundation {
  color: #17a2b8;
}

.legend-color.elasticity {
  color: #fd7e14;
}

.legend-color.simulation {
  color: #6f42c1;
}

.legend-color.segmentation {
  color: #6f42c1;
}

.legend-color.analytics {
  color: #20c997;
}

.legend-data-foundation {
  grid-column: 1 / span 5;
}

.legend-segmentation {
  grid-column: 7 / span 3;
}

.legend-elasticity {
  grid-column: 11 / span 5;
}

.legend-analytics {
  grid-column: 17 / span 1;
}

@media (max-width: 992px) {
  .steps-stack {
    align-items: center;
    width: 100%;
  }

  .step-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .legend-data-foundation,
  .legend-segmentation,
  .legend-elasticity,
  .legend-analytics {
    grid-column: auto;
  }
}

.step-line {
  width: var(--step-line-width, 24px);
  height: 2px;
}

[data-bs-theme="dark"] .step-line {
  background: rgba(255,255,255,0.2);
}

[data-bs-theme="light"] .step-line {
  background: rgba(0,0,0,0.1);
}

/* Steps Overview Modal */
.steps-overview-trigger {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.steps-modal .modal-content {
  border-radius: 0;
  border: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.steps-modal .modal-dialog {
  transform-origin: top right;
  transform: translateY(-18px) scale(0.98);
  opacity: 0;
  transition: transform 0.7s ease, opacity 0.5s ease;
}

.steps-modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.steps-modal .modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
}

.yum-studio-header {
  background: linear-gradient(135deg, #7c2d12 0%, #dc2626 45%, #f59e0b 100%);
  color: #fff;
  border-bottom: none;
}

.yum-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.yum-kpi-tile,
.yum-result-card,
.yum-insight-card,
.yum-improvements-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem;
}

[data-bs-theme="dark"] .yum-kpi-tile,
[data-bs-theme="dark"] .yum-result-card,
[data-bs-theme="dark"] .yum-insight-card,
[data-bs-theme="dark"] .yum-improvements-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

.yum-result-card {
  height: 100%;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.78);
}

[data-bs-theme="dark"] .yum-result-card {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 42%),
    rgba(15, 23, 42, 0.82);
}

.yum-kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.yum-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.yum-kpi-value-sm {
  font-size: 1rem;
}

.yum-delta {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f766e;
}

.yum-delta.muted {
  color: #64748b;
}

.yum-improvements-card ul {
  padding-left: 1rem;
}

.yum-improvements-card li + li {
  margin-top: 0.4rem;
}

@media (max-width: 768px) {
  .yum-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.steps-modal .modal-body {
  padding: 0.75rem 1.5rem 1.25rem;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Avoid forcing full-height layout inside the steps modal */
.steps-modal .modal-body .container-fluid,
.steps-modal .modal-body .row {
  height: auto !important;
}

[data-bs-theme="dark"] .steps-modal .modal-content {
  background: linear-gradient(160deg, rgba(20, 24, 45, 0.98), rgba(10, 12, 26, 0.98));
  color: #e5e5e5;
}

[data-bs-theme="light"] .steps-modal .modal-content {
  background: linear-gradient(160deg, #ffffff, #f3f6ff);
  color: #1a1a2e;
}

.steps-table {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.steps-table-header,
.steps-table-row {
  display: grid;
  grid-template-columns: minmax(90px, 110px) minmax(220px, 1.4fr);
  gap: 1rem;
  align-items: start;
}

.steps-table-header span:last-child,
.steps-table-rfp,
.section-header-citation {
  display: none !important;
}

.steps-table-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 1rem;
}

[data-bs-theme="light"] .steps-table-header {
  color: rgba(26, 26, 46, 0.7);
}

.steps-table-row {
  border-radius: 16px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.55s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-align: left;
  opacity: 0;
  transform: translateY(-16px) translateX(calc((var(--step-index, 1) - 1) * 26px)) scale(0.96);
  transition-delay: calc(var(--step-index, 1) * 0.05s);
  will-change: transform, opacity;
}

.steps-modal.show .steps-table-row {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

[data-bs-theme="light"] .steps-table-row {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .steps-table-row {
  background: rgba(17, 20, 38, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

.steps-table-row:hover,
.steps-table-row:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 102, 255, 0.6);
}

.steps-table-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dplus-blue);
}

.steps-table-step-label {
  font-size: 0.75rem;
}

.steps-table-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.97rem;
  line-height: 1.25;
}

.steps-table-body strong {
  font-size: 1rem;
}

.steps-table-rfp {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="light"] .steps-table-rfp {
  color: rgba(26, 26, 46, 0.7);
}

.steps-modal-dot {
  cursor: default;
  pointer-events: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .steps-modal .modal-dialog,
  .steps-table-row,
  .steps-modal.show .steps-table-row {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 991px) {
  .steps-table-header {
    display: none;
  }

  .steps-table-row {
    grid-template-columns: 1fr;
  }

  .steps-table-rfp {
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
  }

  [data-bs-theme="dark"] .steps-table-rfp {
    border-top-color: rgba(255, 255, 255, 0.12);
  }
}

/* Main content - account for fixed nav */
.main-content {
  padding-top: 96px;
  min-height: 100vh;
}

/* Sections */
.section {
  display: none;
  padding: 2rem 0;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

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

/* Glassmorphism Cards */
.glass-card {
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.2s, box-shadow 0.2s;
}

[data-bs-theme="dark"] .glass-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.glass-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .glass-card:hover {
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.15);
}

[data-bs-theme="light"] .glass-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Section Headers */
.section-header {
  margin-bottom: 2rem;
}

.section-header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-header-main {
  min-width: 260px;
}

.section-header-citation {
  flex: 0 0 auto;
  max-width: 360px;
  margin-top: 1.3rem;
}

.section-citation-card {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(13, 110, 253, 0.06);
}

.section-citation-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--dplus-blue);
  margin-bottom: 0.35rem;
}

.section-citation-text {
  font-size: 0.9rem;
  color: #1f2937;
}

[data-bs-theme="dark"] .section-citation-card {
  border-color: rgba(255,255,255,0.1);
  background: rgba(59, 130, 246, 0.12);
}

[data-bs-theme="dark"] .section-citation-text {
  color: rgba(255,255,255,0.85);
}

.section-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dplus-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.65;
  color: #64748b;
  text-wrap: balance;
}

[data-bs-theme="dark"] .section-title {
  color: #fff;
}

[data-bs-theme="dark"] .section-subtitle {
  color: rgba(255,255,255,0.6);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .hero h1 {
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

[data-bs-theme="dark"] .hero p {
  color: rgba(255,255,255,0.7);
}

/* Custom Buttons */
.btn-primary-custom {
  background: var(--dplus-blue);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background: #0052cc;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}

.btn-primary-custom:focus-visible {
  color: #fff;
}

.btn-secondary-custom {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .btn-secondary-custom {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

[data-bs-theme="light"] .btn-secondary-custom {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
  color: #212529;
}

.btn-secondary-custom:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .btn-secondary-custom:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

[data-bs-theme="light"] .btn-secondary-custom:hover {
  background: rgba(0,0,0,0.1);
  color: #212529;
}

/* Section Footer Navigation */
.section-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
}

[data-bs-theme="dark"] .section-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .section-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* Loading Section - align with pricingstudio shell */
#load-data-section {
  display: block !important;
  visibility: visible !important;
  position: relative;
  z-index: 10;
}

#loading-progress {
  display: block !important;
  visibility: visible !important;
}

#loading-progress .progress {
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

#loading-progress-bar {
  min-width: 5% !important;
  transition: width 0.3s ease;
}

/* Section Header Navigation (at top) */
.section-header-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

/* Simulate Loading Bar */
.simulate-loading {
  max-width: 420px;
  margin: 1rem auto 0;
  text-align: left;
}

.simulate-loading-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--dplus-blue);
}

.simulate-loading .progress {
  height: 16px;
  background-color: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

[data-bs-theme="dark"] .simulate-loading-label {
  color: #93c5fd;
}

[data-bs-theme="dark"] .simulate-loading .progress {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-bs-theme="dark"] .section-header-nav {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .section-header-nav {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Insight Box */
.insight-box {
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  margin-top: 1.5rem;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .insight-box {
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.08)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 40%);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

[data-bs-theme="light"] .insight-box {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,255,0.96)),
    radial-gradient(circle at top right, rgba(59,130,246,0.1), transparent 42%);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

#section-1 .insight-box .icon {
  font-size: 0;
}

#section-1 .insight-box .icon::before {
  content: '\1F4A1';
  font-size: 1.5rem;
}

.insight-box h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#section-1 #kpi-insight-text {
  line-height: 1.7;
}

#section-1 .insight-question-line {
  display: block;
  margin-top: 0.95rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241,245,255,0.98));
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

#section-1 .insight-question-kicker {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

#section-1 .insight-question-copy {
  display: block;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.45;
  color: #0f172a;
}

.segment-framework-banner,
.segment-filter-summary,
.segment-viz-guide,
.segment-detail-card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .segment-framework-banner,
[data-bs-theme="dark"] .segment-filter-summary,
[data-bs-theme="dark"] .segment-viz-guide,
[data-bs-theme="dark"] .segment-detail-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.92));
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 22px 46px rgba(2, 6, 23, 0.34);
}

.segment-framework-banner {
  padding: 1.2rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.segment-framework-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 0.35rem;
}

.segment-framework-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
}

.segment-framework-note {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #64748b;
}

.segment-framework-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.segment-framework-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.segment-framework-pill.is-acquisition {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.segment-framework-pill.is-engagement {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.segment-framework-pill.is-monetization {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.segment-filter-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
}

.segment-filter-summary-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.segment-filter-summary-value {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #0f172a;
}

.segment-viz-guide {
  padding: 1rem 1.05rem;
}

.segment-viz-guide-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.6rem;
}

.segment-viz-guide-copy {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #64748b;
  margin-bottom: 0.8rem;
}

.segment-viz-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.segment-viz-guide-item {
  border-radius: 16px;
  padding: 0.75rem 0.85rem;
  background: rgba(241, 245, 249, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.segment-viz-guide-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.segment-viz-guide-value {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #0f172a;
}

.segment-viz-guide-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.segment-viz-guide-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.segment-viz-guide-chip::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
}

.segment-viz-guide-chip.is-positive {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.segment-viz-guide-chip.is-neutral {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.segment-viz-guide-chip.is-negative {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.segment-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.segment-chart-surface {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.9));
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

[data-bs-theme="dark"] .segment-chart-surface {
  background: linear-gradient(180deg, rgba(8,17,31,0.98), rgba(15,23,42,0.94));
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 34px rgba(2, 6, 23, 0.24);
}

.segment-detail-card .card-body {
  padding: 1rem 1.05rem;
}

.segment-detail-card #segment-detail-title {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b !important;
}

.segment-detail-card #segment-detail-body {
  color: #0f172a;
  line-height: 1.55;
}

.segment-detail-panel-summary {
  font-size: 0.9rem;
  color: #334155;
}

.segment-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.segment-detail-metric {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.segment-detail-metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.22rem;
}

.segment-detail-metric-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.segment-detail-metric-value.is-positive {
  color: #15803d;
}

.segment-detail-metric-value.is-negative {
  color: #b91c1c;
}

[data-bs-theme="dark"] .segment-framework-kicker,
[data-bs-theme="dark"] .segment-framework-title,
[data-bs-theme="dark"] .segment-filter-summary-value,
[data-bs-theme="dark"] .segment-viz-guide-title,
[data-bs-theme="dark"] .segment-viz-guide-value,
[data-bs-theme="dark"] .segment-detail-card #segment-detail-body,
[data-bs-theme="dark"] .segment-detail-metric-value {
  color: #f8fafc;
}

[data-bs-theme="dark"] .segment-framework-note,
[data-bs-theme="dark"] .segment-filter-summary-label,
[data-bs-theme="dark"] .segment-viz-guide-copy,
[data-bs-theme="dark"] .segment-viz-guide-label,
[data-bs-theme="dark"] .segment-detail-card #segment-detail-title,
[data-bs-theme="dark"] .segment-detail-panel-summary,
[data-bs-theme="dark"] .segment-detail-metric-label {
  color: rgba(226, 232, 240, 0.72) !important;
}

[data-bs-theme="dark"] .segment-viz-guide-item,
[data-bs-theme="dark"] .segment-detail-metric {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.16);
}

@media (max-width: 991.98px) {
  .segment-framework-banner {
    grid-template-columns: 1fr;
  }

  .segment-framework-pills {
    justify-content: flex-start;
  }

  .segment-viz-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* Pricing Tier Cards */
.tier-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tier-card:hover {
  transform: translateY(-4px);
}

[data-bs-theme="dark"] .tier-card:hover {
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .tier-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.tier-card.ad-lite {
  border-left: 4px solid var(--dplus-orange);
}

.tier-card.ad-free {
  border-left: 4px solid var(--dplus-blue);
}

.tier-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .tier-name {
  color: #fff;
}

.tier-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dplus-blue);
  margin-bottom: 0.5rem;
}

.tier-price span {
  font-size: 1rem;
  font-weight: 400;
}

.channel-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.35rem;
  overflow: hidden;
  border-radius: 22px;
}

.channel-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--channel-accent), transparent 85%);
}

.channel-card--delivery,
.channel-card--drive-thru {
  --channel-accent: #f97316;
  --channel-soft: rgba(249, 115, 22, 0.16);
}

.channel-card--dine-in,
.channel-card--in-store {
  --channel-accent: #0f766e;
  --channel-soft: rgba(15, 118, 110, 0.14);
}

.channel-card--carryout {
  --channel-accent: #2563eb;
  --channel-soft: rgba(37, 99, 235, 0.14);
}

.channel-card--pickup-app,
.channel-card--pickup {
  --channel-accent: #7c3aed;
  --channel-soft: rgba(124, 58, 237, 0.14);
}

[data-bs-theme="dark"] .channel-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    radial-gradient(circle at top right, var(--channel-soft), transparent 42%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .channel-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,251,255,0.94)),
    radial-gradient(circle at top right, var(--channel-soft), transparent 44%);
  border: 1px solid rgba(17, 24, 39, 0.07);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.channel-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.channel-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.channel-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--channel-accent);
  background: var(--channel-soft);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  flex: 0 0 auto;
}

[data-bs-theme="light"] .channel-icon {
  box-shadow: inset 0 0 0 1px rgba(17,24,39,0.05);
}

.channel-subtitle {
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.68);
}

.channel-card .tier-name {
  margin-bottom: 0.2rem;
  font-size: 1.08rem;
  line-height: 1.25;
}

[data-bs-theme="light"] .channel-subtitle {
  color: rgba(17,24,39,0.6);
}

.channel-mix-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--channel-accent);
  background: var(--channel-soft);
  white-space: nowrap;
}

.channel-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.channel-metric {
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  backdrop-filter: blur(8px);
}

[data-bs-theme="dark"] .channel-metric {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

[data-bs-theme="light"] .channel-metric {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(17,24,39,0.06);
}

.channel-metric-label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
  color: rgba(255,255,255,0.58);
}

[data-bs-theme="light"] .channel-metric-label {
  color: rgba(17,24,39,0.5);
}

.channel-metric-value {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
  color: inherit;
}

.channel-items-section {
  margin-top: auto;
  padding-top: 0.15rem;
}

.channel-items-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: rgba(255,255,255,0.55);
}

[data-bs-theme="light"] .channel-items-label {
  color: rgba(17,24,39,0.5);
}

.channel-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1.25;
}

[data-bs-theme="dark"] .channel-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.84);
}

[data-bs-theme="light"] .channel-chip {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(17,24,39,0.06);
  color: rgba(17,24,39,0.82);
}

@media (max-width: 767px) {
  .channel-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .channel-mix-pill {
    align-self: flex-start;
  }

  .channel-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Hide tabs when showing individual elasticity model steps */
.hide-elasticity-tabs #elasticityTabs {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card > .card-header {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card > .card-body > .alert.alert-info {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card {
  border: none !important;
  background: transparent !important;
}

/* Keep existing custom styles with theme support */
.kpi-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 12px;
  padding: 1.5rem;
}

[data-bs-theme="dark"] .kpi-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .kpi-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.kpi-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .kpi-card:hover {
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.15);
}

[data-bs-theme="light"] .kpi-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.metric-card {
  text-align: center;
  padding: 1.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
}

[data-bs-theme="dark"] .metric-value {
  color: #fff;
}

.metric-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-bs-theme="dark"] .metric-label {
  color: rgba(255,255,255,0.6);
}

[data-bs-theme="light"] .metric-label {
  color: #6c757d;
}

.metric-change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.metric-change.positive { color: var(--dplus-green); }
.metric-change.negative { color: var(--dplus-red); }
.scenario-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 16px;
  padding: 1.5rem;
}

[data-bs-theme="dark"] .scenario-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .scenario-card {
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.scenario-card:hover {
  transform: translateY(-2px);
  border-color: var(--dplus-blue);
}

.scenario-card.selected {
  border-color: var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card.selected {
  background: rgba(0, 102, 255, 0.05);
}

[data-bs-theme="light"] .scenario-card.selected {
  background: rgba(0, 102, 255, 0.05);
}

.scenario-card.recommended {
  border-color: var(--dplus-green);
}

[data-bs-theme="dark"] .scenario-card.recommended {
  background: rgba(16, 185, 129, 0.05);
}

[data-bs-theme="light"] .scenario-card.recommended {
  background: rgba(16, 185, 129, 0.05);
}

.badge-recommended {
  background: var(--dplus-green);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
}
/* Chat message styles */
.screen-assistant-card {
  margin-top: 3rem;
  border-radius: 24px;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.screen-assistant-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.screen-assistant-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.screen-assistant-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 0.3rem;
}

.screen-assistant-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.screen-assistant-card__copy {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748b;
  max-width: 760px;
}

.screen-assistant-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.screen-assistant-card .input-group .assistant-chat-send-btn {
  min-width: 78px;
}

.assistant-chat-feed {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem;
  overflow-y: auto;
}

.assistant-chat-feed--compact {
  min-height: 210px;
  max-height: 260px;
}

.assistant-chat-feed--full {
  background: var(--bs-body-bg);
}

.assistant-chat-shell {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.08);
}

.assistant-chat-shell__header {
  padding: 1.4rem 1.5rem 1.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.assistant-chat-shell__body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.assistant-chat-shell__eyebrow {
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.assistant-chat-shell__title {
  font-weight: 800;
  color: #0f172a;
}

.assistant-chat-shell__subtitle {
  max-width: 760px;
  font-size: 0.96rem;
  line-height: 1.55;
  color: #64748b;
}

.assistant-chat-shell__reset {
  flex-shrink: 0;
}

.assistant-chat-shell__composer .form-control {
  min-height: 52px;
  border-radius: 16px 0 0 16px;
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: none;
}

.assistant-chat-shell__composer .assistant-chat-send-btn {
  min-width: 118px;
  border-radius: 0 16px 16px 0;
}

.assistant-chat-shell__suggestions {
  padding-top: 0.35rem;
}

.assistant-chat-shell__suggestions-label {
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 600;
}

.assistant-chat-shell__chips .suggested-query {
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
}

#section-9 > .container {
  max-width: min(1680px, calc(100vw - 2rem));
}

#chat-section > .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.assistant-chart-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
  padding: 1rem;
}

.assistant-chart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.assistant-chart-card__title {
  font-weight: 700;
  color: #0f172a;
}

.assistant-chart-card__subtitle,
.assistant-chart-card__source,
.assistant-chart-card__summary {
  color: #64748b;
  font-size: 0.85rem;
}

.assistant-chart-card__summary {
  margin-bottom: 0.8rem;
}

.assistant-chart-card__canvas-wrap {
  position: relative;
  height: 280px;
}

.assistant-chart-message .message-content {
  width: 100%;
}

.assistant-chat-empty--full {
  min-height: 220px;
}

.assistant-chat-empty {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
}

.assistant-chat-empty__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 0.8rem;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 1.2rem;
}

.assistant-chat-empty__title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.assistant-chat-empty__copy {
  max-width: 420px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-message.system {
  opacity: 0.7;
  font-size: 0.875rem;
}
.chat-message.tool {
  color: #0d6efd;
}
.chat-message.tool-error {
  color: #dc3545;
}
.chat-message.error {
  color: #dc3545;
}

[data-bs-theme="dark"] .screen-assistant-card {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.92));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 22px 46px rgba(2, 6, 23, 0.34);
}

[data-bs-theme="dark"] .screen-assistant-card__title,
[data-bs-theme="dark"] .assistant-chat-empty__title {
  color: #f8fafc;
}

[data-bs-theme="dark"] .screen-assistant-card__copy,
[data-bs-theme="dark"] .assistant-chat-empty {
  color: rgba(226, 232, 240, 0.74);
}

[data-bs-theme="dark"] .step-nav .btn,
[data-bs-theme="dark"] .step-nav .dark-theme-toggle {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.38);
}

[data-bs-theme="dark"] .step-nav .btn:hover,
[data-bs-theme="dark"] .step-nav .dark-theme-toggle:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(96, 165, 250, 0.3);
}

[data-bs-theme="dark"] .dropdown-menu {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.4);
}

[data-bs-theme="dark"] .dropdown-item {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background: rgba(37, 99, 235, 0.16);
  color: #f8fafc;
}

[data-bs-theme="dark"] .assistant-chat-shell {
  background: rgba(10, 15, 26, 0.9);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.42);
}

[data-bs-theme="dark"] .assistant-chat-shell__header {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9));
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

[data-bs-theme="dark"] .assistant-chat-shell__title {
  color: #f8fafc;
}

[data-bs-theme="dark"] .assistant-chat-shell__subtitle,
[data-bs-theme="dark"] .assistant-chat-shell__suggestions-label {
  color: rgba(226, 232, 240, 0.74);
}

[data-bs-theme="dark"] .assistant-chat-shell__composer .form-control {
  background: rgba(51, 65, 85, 0.55);
  border-color: rgba(148, 163, 184, 0.18);
  color: #f8fafc;
}

[data-bs-theme="dark"] .assistant-chat-shell__composer .form-control::placeholder {
  color: rgba(226, 232, 240, 0.66);
}

[data-bs-theme="dark"] .assistant-chat-shell__chips .suggested-query {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.26);
  color: rgba(226, 232, 240, 0.82);
}

[data-bs-theme="dark"] .assistant-chat-shell__chips .suggested-query:hover {
  background: rgba(30, 41, 59, 0.84);
  border-color: rgba(96, 165, 250, 0.34);
  color: #f8fafc;
}

[data-bs-theme="dark"] #section-1 .insight-question-line {
  background: linear-gradient(180deg, rgba(15,23,42,0.72), rgba(30,41,59,0.88));
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-bs-theme="dark"] #section-1 .insight-question-copy {
  color: #f8fafc;
}

[data-bs-theme="dark"] .assistant-chat-feed {
  background: rgba(2, 6, 23, 0.42);
  border-color: rgba(148, 163, 184, 0.18);
}

[data-bs-theme="dark"] .assistant-chart-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.94), rgba(15,23,42,0.9));
  border-color: rgba(148, 163, 184, 0.22);
}

[data-bs-theme="dark"] .assistant-chart-card__title {
  color: #f8fafc;
}

[data-bs-theme="dark"] .assistant-chat-empty__icon {
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}

@media (max-width: 767px) {
  .assistant-chat-shell__header {
    padding: 1.2rem 1.05rem 1rem;
  }

  .assistant-chat-shell__body {
    padding: 1.05rem;
  }

  .assistant-chat-shell__title {
    font-size: 1.2rem;
  }

  .screen-assistant-card__header {
    flex-direction: column;
  }

  .screen-assistant-card__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Markdown content styling */
.message-content {
  line-height: 1.6;
}
.message-content p {
  margin-bottom: 0.75rem;
}
.message-content p:last-child {
  margin-bottom: 0;
}
.message-content ul, .message-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.message-content li {
  margin-bottom: 0.25rem;
}
.message-content code {
  background-color: #f8f9fa;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #d63384;
}
.message-content pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.message-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}
.message-content strong {
  font-weight: 600;
}
.message-content em {
  font-style: italic;
}
.message-content blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 0.75rem;
  color: #6c757d;
}
.message-content h1, .message-content h2, .message-content h3,
.message-content h4, .message-content h5, .message-content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.message-content h1 { font-size: 1.5rem; }
.message-content h2 { font-size: 1.35rem; }
.message-content h3 { font-size: 1.2rem; }
.message-content h4 { font-size: 1.1rem; }
.message-content h5 { font-size: 1rem; }
.message-content h6 { font-size: 0.95rem; }
.message-content table {
  width: 100%;
  margin-bottom: 0.75rem;
  border-collapse: collapse;
}
.message-content table th,
.message-content table td {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
}
.message-content table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Data viewer styles */
#data-table-container {
  max-height: 600px;
  overflow-y: auto;
  border-radius: 8px;
}

#data-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}

[data-bs-theme="dark"] #data-table thead th {
  background-color: #212529;
}

[data-bs-theme="light"] #data-table thead th {
  background-color: #f8f9fa;
}

#data-table tbody tr:hover {
  background-color: rgba(0, 102, 255, 0.1);
}

/* Dataset accordion styles */
#datasets-accordion .accordion-button {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

#datasets-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

#datasets-accordion .accordion-body {
  padding: 0;
}

.dataset-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.dataset-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
  border-left-color: #0d6efd;
}

.dataset-item.active {
  background-color: rgba(13, 110, 253, 0.1);
  border-left-color: #0d6efd;
  font-weight: 500;
}

.dataset-item i {
  width: 20px;
}

.promo-summary-card {
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(255, 255, 255, 0)),
    var(--bs-body-bg);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.promo-summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.45rem;
}

.promo-summary-value {
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.promo-summary-note {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}

.promo-dependency-banner,
.promo-decision-box {
  border-radius: 22px;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.promo-dependency-banner {
  background:
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.98), rgba(153, 27, 27, 0.94));
  color: #fff;
}

.promo-dependency-banner.is-medium {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(120, 53, 15, 0.96), rgba(180, 83, 9, 0.92));
}

.promo-dependency-banner.is-low {
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(22, 101, 52, 0.96), rgba(21, 128, 61, 0.92));
}

.promo-dependency-banner__kicker,
.promo-decision-box__kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.promo-dependency-banner__kicker {
  color: rgba(254, 226, 226, 0.88);
}

.promo-dependency-banner__title,
.promo-decision-box__title {
  font-size: 1.18rem;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.promo-dependency-banner__copy,
.promo-dependency-banner__note {
  font-size: 0.92rem;
  line-height: 1.6;
}

.promo-dependency-banner__copy {
  color: rgba(255, 255, 255, 0.92);
}

.promo-dependency-banner__note {
  color: rgba(254, 226, 226, 0.84);
  margin-top: 0.35rem;
}

.promo-decision-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.promo-decision-box__kicker {
  color: #2563eb;
}

.promo-decision-box__title {
  color: #0f172a;
}

.promo-decision-box__actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.95rem;
}

.promo-decision-action {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #334155;
  line-height: 1.55;
}

.promo-decision-action__icon {
  width: 1.2rem;
  color: #2563eb;
  flex: 0 0 auto;
  margin-top: 0.05rem;
}

.promo-decision-box__risk {
  margin-top: 0.95rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(254, 242, 242, 0.92);
  border: 1px solid rgba(248, 113, 113, 0.18);
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.55;
}

[data-bs-theme="dark"] .promo-decision-box {
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.92));
  border-color: rgba(148, 163, 184, 0.18);
}

[data-bs-theme="dark"] .promo-decision-box__title {
  color: #f8fafc;
}

[data-bs-theme="dark"] .promo-decision-action {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.9);
}

[data-bs-theme="dark"] .promo-decision-box__risk {
  background: rgba(127, 29, 29, 0.32);
  border-color: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.official-campaign-card {
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bs-body-bg);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.official-campaign-card__top {
  padding: 1rem 1rem 0.75rem;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(13, 110, 253, 0.03));
}

.official-campaign-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.official-campaign-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.official-campaign-card__body {
  padding: 1rem;
}

.official-campaign-card__list {
  margin-bottom: 0.85rem;
}

.official-campaign-card__list li {
  margin-bottom: 0.3rem;
}

.official-campaign-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.modeled-promo-card {
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 18px;
  background: var(--bs-body-bg);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.modeled-promo-card__header {
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(14, 165, 233, 0.05));
  border-bottom: 1px solid rgba(13, 110, 253, 0.08);
}

.modeled-promo-card__body {
  padding: 1rem;
}

.campaign-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.campaign-chip-row .badge {
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.yum-brand-picker {
  width: 100%;
}

.yum-brand-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1199px) {
  .yum-brand-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .yum-brand-card-grid {
    grid-template-columns: 1fr;
  }
}

.yum-brand-select-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1.05rem 1.05rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.98), rgba(255,255,255,0.84) 40%, rgba(248,250,252,0.98) 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  text-align: left;
}

[data-bs-theme="dark"] .yum-brand-select-card {
  background:
    radial-gradient(circle at top right, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96) 44%, rgba(2, 6, 23, 0.98) 100%);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.4);
}

.yum-brand-select-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.yum-brand-select-card.is-active {
  border-color: var(--brand-accent, var(--dplus-blue));
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
}

.yum-brand-select-card.is-active::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 999px;
  background: var(--brand-accent, var(--dplus-blue));
}

.yum-brand-select-card.is-loading {
  cursor: default;
}

.yum-brand-select-card__glow {
  position: absolute;
  inset: -25% -10% auto auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-accent, #2563eb) 18%, transparent);
  filter: blur(18px);
  opacity: 0.85;
  pointer-events: none;
}

.yum-brand-select-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}

.yum-brand-select-card__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.yum-brand-select-card__logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 10px 18px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

[data-bs-theme="dark"] .yum-brand-select-card__logo-wrap {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 18px rgba(2, 6, 23, 0.3);
}

.yum-brand-select-card__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.yum-brand-select-card__title-block {
  min-width: 0;
}

.yum-brand-select-card__name {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  color: var(--bs-body-color);
}

.yum-brand-select-card__descriptor {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--bs-secondary-color);
  margin-top: 0.18rem;
}

.yum-brand-select-card__state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 30px;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-accent, #2563eb) 88%, #0f172a);
  background: color-mix(in srgb, var(--brand-accent, #2563eb) 12%, white);
  border: 1px solid color-mix(in srgb, var(--brand-accent, #2563eb) 26%, transparent);
  flex-shrink: 0;
}

[data-bs-theme="dark"] .yum-brand-select-card__state {
  color: #f8fafc;
  background: color-mix(in srgb, var(--brand-accent, #2563eb) 26%, transparent);
  border-color: color-mix(in srgb, var(--brand-accent, #2563eb) 40%, transparent);
}

.yum-brand-select-card__meta {
  position: relative;
  z-index: 1;
}

.yum-brand-select-card__eyebrow {
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--bs-body-color);
  margin-bottom: 0.22rem;
}

.yum-brand-select-card__supporting {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--bs-secondary-color);
}

.yum-brand-select-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
  position: relative;
  z-index: 1;
}

.yum-brand-select-card__chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: var(--bs-secondary-color);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

[data-bs-theme="dark"] .yum-brand-select-card__chip {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.82);
}

#yum-data-grain {
  white-space: normal;
  overflow-wrap: anywhere;
}

.segment-analysis-insight-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 1.35rem 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(135deg, rgba(10, 37, 64, 0.96), rgba(8, 95, 126, 0.9));
  color: #f8fafc;
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.16);
}

.segment-analysis-insight-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
  margin-bottom: 0.45rem;
}

.segment-analysis-insight-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
}

.segment-analysis-insight-text {
  max-width: 900px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(241, 245, 249, 0.9);
}

.segment-analysis-live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segment-analysis-mini-card,
.segment-analysis-highlight-card,
.segment-analysis-decision-box {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.segment-analysis-mini-card,
.segment-analysis-highlight-card {
  padding: 1.15rem 1.2rem;
}

.segment-analysis-decision-box {
  padding: 1.2rem 1.25rem;
}

.segment-analysis-mini-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.segment-analysis-mini-note {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #64748b;
}

.segment-analysis-guide-grid {
  display: grid;
  gap: 0.7rem;
}

.segment-analysis-guide-chip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.segment-analysis-guide-chip strong {
  color: #0f172a;
  font-size: 0.8rem;
}

.segment-analysis-guide-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.segment-analysis-guide-note {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}

.segment-analysis-highlight-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.7rem;
}

.segment-analysis-highlight-name {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

.segment-analysis-highlight-metric {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.segment-analysis-highlight-detail {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #64748b;
}

.segment-analysis-highlight-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segment-analysis-highlight-tag.is-risk {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.segment-analysis-highlight-tag.is-opportunity {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}

.segment-analysis-summary-line {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
}

.segment-analysis-summary-line:last-child {
  margin-bottom: 0;
}

.segment-analysis-summary-line.is-active {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.98);
}

.segment-analysis-summary-axis {
  min-width: 110px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
}

[data-bs-theme="dark"] .segment-analysis-mini-card,
[data-bs-theme="dark"] .segment-analysis-highlight-card,
[data-bs-theme="dark"] .segment-analysis-decision-box {
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(8,15,30,0.94));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 22px 44px rgba(2, 6, 23, 0.32);
}

[data-bs-theme="dark"] .segment-analysis-mini-title,
[data-bs-theme="dark"] .segment-analysis-highlight-name,
[data-bs-theme="dark"] .segment-analysis-highlight-metric {
  color: #f8fafc;
}

[data-bs-theme="dark"] .segment-analysis-mini-note,
[data-bs-theme="dark"] .segment-analysis-guide-label,
[data-bs-theme="dark"] .segment-analysis-guide-note,
[data-bs-theme="dark"] .segment-analysis-highlight-label,
[data-bs-theme="dark"] .segment-analysis-highlight-detail {
  color: rgba(226, 232, 240, 0.72);
}

[data-bs-theme="dark"] .segment-analysis-guide-chip,
[data-bs-theme="dark"] .segment-analysis-summary-line {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.92);
}

[data-bs-theme="dark"] .segment-analysis-guide-chip strong {
  color: #f8fafc;
}

[data-bs-theme="dark"] .segment-analysis-highlight-tag.is-risk {
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca;
}

[data-bs-theme="dark"] .segment-analysis-highlight-tag.is-opportunity {
  background: rgba(6, 95, 70, 0.42);
  color: #a7f3d0;
}

[data-bs-theme="dark"] .segment-analysis-summary-line.is-active {
  background: rgba(15, 118, 110, 0.22);
  border-color: rgba(45, 212, 191, 0.3);
}

[data-bs-theme="dark"] .segment-analysis-summary-axis {
  color: #93c5fd;
}

.segment-comparison-table-wrap {
  border-radius: 20px;
  overflow: hidden;
}

.segment-comparison-table {
  margin-bottom: 0;
}

[data-bs-theme="dark"] .segment-comparison-table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(15, 23, 42, 0.72);
  --bs-table-hover-bg: rgba(30, 41, 59, 0.72);
  --bs-table-color: #e2e8f0;
  --bs-table-border-color: rgba(148, 163, 184, 0.16);
}

[data-bs-theme="dark"] .segment-comparison-table thead th {
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] .segment-comparison-table tbody td {
  color: rgba(226, 232, 240, 0.92);
  background: rgba(8, 15, 30, 0.78);
}

[data-bs-theme="dark"] .segment-comparison-table tbody tr:hover td {
  background: rgba(30, 41, 59, 0.82);
}

@media (max-width: 767.98px) {
  .segment-analysis-insight-banner,
  .segment-analysis-mini-card,
  .segment-analysis-highlight-card,
  .segment-analysis-decision-box {
    border-radius: 18px;
  }

  .segment-analysis-summary-line {
    flex-direction: column;
    gap: 0.35rem;
  }

  .segment-analysis-summary-axis {
    min-width: 0;
  }
}

.acq-optimal-range {
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

[data-bs-theme="dark"] .acq-optimal-range {
  color: #f8fafc;
}

/* ML Methodology Popover Styles */
.ml-popover {
  max-width: 450px;
  font-size: 0.875rem;
}

.ml-popover .popover-header {
  background-color: #0d6efd;
  color: white;
  font-weight: 600;
  border-bottom: none;
}

.ml-popover .popover-body {
  padding: 1rem;
  line-height: 1.6;
}

.ml-popover .popover-body strong {
  color: #0d6efd;
  font-weight: 600;
}

.ml-popover .popover-arrow::after {
  border-right-color: #0d6efd;
}

/* Info icon hover effect */
[data-bs-toggle="popover"]:hover i {
  transform: scale(1.1);
  transition: transform 0.2s;
}

/* Interactive Demand Curve styles */
.demand-curve-controls {
  padding: 10px 15px;
  border-radius: 8px 8px 0 0;
}

[data-bs-theme="dark"] .demand-curve-controls {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .demand-curve-controls {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.demand-curve-controls .btn {
  transition: all 0.3s ease;
}

.demand-curve-controls .btn.active {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.demand-curve {
  transition: stroke-width 0.2s, opacity 0.2s;
}

.current-marker, .new-marker {
  transition: r 0.2s, transform 0.2s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.current-marker:hover, .new-marker:hover {
  transform: scale(1.1);
}

/* Customer Segmentation Section Styles */
.segment-filters {
  padding: 20px;
  border-radius: 8px;
}

[data-bs-theme="dark"] .segment-filters {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .segment-filters {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

.filter-pills {
  min-height: 38px;
}

.filter-pill {
  padding: 6px 14px;
  border: 2px solid var(--dplus-blue);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
}

[data-bs-theme="dark"] .filter-pill {
  background-color: rgba(255, 255, 255, 0.05);
  color: #e5e5e5;
}

[data-bs-theme="light"] .filter-pill {
  background-color: white;
  color: #212529;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.3);
}

[data-bs-theme="dark"] .filter-pill:hover {
  background-color: rgba(0, 102, 255, 0.1);
}

[data-bs-theme="light"] .filter-pill:hover {
  background-color: #e7f3ff;
}

.filter-pill.active {
  background-color: var(--dplus-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.3);
}

.filter-pill.active:hover {
  background-color: #0052cc;
}

/* Scenario card tabs styling */
.scenario-card-tab {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 1rem;
}

[data-bs-theme="dark"] .scenario-card-tab {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="light"] .scenario-card-tab {
  border: 1px solid #dee2e6;
  background: white;
}

.scenario-card-tab:hover {
  transform: translateY(-2px);
  border-color: var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card-tab:hover {
  box-shadow: 0 4px 8px rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .scenario-card-tab:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.scenario-card-tab.selected {
  border: 2px solid var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card-tab.selected {
  background-color: rgba(0, 102, 255, 0.1);
}

[data-bs-theme="light"] .scenario-card-tab.selected {
  background-color: rgba(0, 102, 255, 0.05);
}

.scenario-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.scenario-card-actions .badge {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.scenario-card-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0.25rem 0.45rem;
}

/* Event Timeline Slider Styles */
.timeline-slider-container {
  position: relative;
  padding: 2rem 1rem;
  margin: 2rem 0;
}

.timeline-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  margin: 3rem 0;
}

[data-bs-theme="dark"] .timeline-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .timeline-track {
  background: #e9ecef;
}

.timeline-event {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.timeline-event:hover {
  transform: translate(-50%, -50%) scale(1.5);
}

.timeline-event.event-official {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.timeline-event.event-price {
  background: var(--dplus-green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-event.event-promo {
  background: var(--dplus-blue);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.2);
}

.timeline-event.event-content {
  background: var(--dplus-orange);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.timeline-event.event-tentpole {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.timeline-event.event-seasonal {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.timeline-years {
  position: relative;
  height: 30px;
  margin-bottom: 1rem;
}

.timeline-year-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.875rem;
  font-weight: 600;
}

[data-bs-theme="dark"] .timeline-year-marker {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] .timeline-year-marker {
  color: #6c757d;
}

.timeline-details {
  animation: slideDown 0.3s ease;
}

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

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dplus-blue);
}

/* Price Slider Styles (for interactive elasticity models) */
.price-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  transition: opacity 0.2s;
}

[data-bs-theme="dark"] .price-slider {
  background: rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .price-slider {
  background: #e9ecef;
}

.price-slider:hover {
  opacity: 1;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dplus-blue);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.3);
  transition: all 0.2s ease;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.5);
}

.price-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dplus-blue);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.3);
  border: none;
  transition: all 0.2s ease;
}

.price-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.5);
}

/* Metric Display Cards */
.metric-display-card {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .metric-display-card {
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .metric-display-card {
  background: rgba(0, 102, 255, 0.05);
  border: 1px solid rgba(0, 102, 255, 0.15);
}

.decision-engine-controls > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.decision-engine-controls .decision-engine-action {
  margin-top: auto;
}

.decision-engine-spacer {
  visibility: hidden;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.metric-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Insight Box (for What is Elasticity? type sections) */
.insight-box {
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  margin-top: 1.5rem;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .insight-box {
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.08)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 40%);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

[data-bs-theme="light"] .insight-box {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,255,0.96)),
    radial-gradient(circle at top right, rgba(59,130,246,0.1), transparent 42%);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.insight-box h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  margin-bottom: 0.5rem;
  z-index: 10;
}

[data-bs-theme="dark"] .event-tooltip {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

[data-bs-theme="light"] .event-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #212529;
}

.timeline-event:hover .event-tooltip {
  opacity: 1;
}

/* Time Horizon Bars (for Churn Elasticity) */
.time-bar {
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.time-bar .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  opacity: 0.5;
  transition: width 0.3s ease;
  border-radius: 6px 0 0 6px;
}

.time-bar .time-bar-label {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
}

[data-bs-theme="dark"] .time-bar .time-bar-label {
  color: #e5e5e5;
}

[data-bs-theme="light"] .time-bar .time-bar-label {
  color: #212529;
}

/* Tier Button Group (for Churn) */
.tier-btn {
  flex: 1;
  transition: all 0.2s ease;
}

.tier-btn.active {
  background-color: var(--dplus-blue);
  color: white;
  border-color: var(--dplus-blue);
}

/* Migration Flow (for Tier Migration) */
.migration-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.flow-box {
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  min-width: 150px;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .flow-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .flow-box {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.1);
}

.flow-arrow {
  font-size: 2rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Event Details Table */
.event-details-table {
  max-height: 100vh;
  overflow-y: auto;
}

/* Cohort Watchlist */
.cohort-watchlist-card {
  border-radius: 10px;
}

.cohort-watchlist-body {
  font-size: 0.8125rem;
}

.cohort-rank {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.cohort-watchlist-item .progress {
  background-color: var(--bs-secondary-bg);
}

.cohort-watchlist-item .badge {
  font-weight: 500;
}

.cohort-watchlist-legend .cohort-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
