/* ============================================================
   COMPONENTS
   Navigation + KPI Cards + Shared UI building blocks
   ============================================================ */

/* ============================================================
   KPI GRID
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 880px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* ============================================================
   KPI CARD
   ============================================================ */
.kpi-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-md);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.kpi-card:hover::after {
  transform: scaleX(1);
}

.kpi-number {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.kpi-unit {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary);
  line-height: 1.4;
  margin-top: 4px;
}

/* ============================================================
   CARD (generic)
   ============================================================ */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.card-icon--primary {
  background: var(--primary-light);
  color: var(--primary);
}

.card-icon--accent {
  background: var(--accent-light);
  color: var(--accent);
}

.card-icon--warning {
  background: var(--warning-light);
  color: var(--warning);
}

.card-icon--danger {
  background: var(--danger-light);
  color: var(--danger);
}

/* ============================================================
   BADGE / TAG
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge--primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge--accent {
  background: var(--accent-light);
  color: var(--accent);
}

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

.badge--danger {
  background: var(--danger-light);
  color: var(--danger);
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn--primary:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn--ghost {
  background: transparent;
  color: var(--secondary);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* ============================================================
   STAT HIGHLIGHT (inline in text)
   ============================================================ */
.stat-highlight {
  color: var(--primary);
  font-weight: 700;
}

.stat-warning {
  color: var(--warning);
  font-weight: 700;
}

.stat-danger {
  color: var(--danger);
  font-weight: 700;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 32px;
}

/* ============================================================
   TABLE (generic)
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--bg-alt);
}

th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--secondary);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--bg-alt);
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  background: var(--border);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   CALLOUT BOX
   ============================================================ */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.callout--info {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #1e40af;
}

.callout--success {
  background: var(--accent-light);
  border-color: var(--accent);
  color: #065f46;
}

.callout--warning {
  background: var(--warning-light);
  border-color: var(--warning);
  color: #92400e;
}

.callout--danger {
  background: var(--danger-light);
  border-color: var(--danger);
  color: #991b1b;
}

/* ============================================================
   PAIN CARDS  (#problem)
   ============================================================ */
.pain-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .pain-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pain-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.pain-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.pain-card__icon {
  font-size: 2rem;
  line-height: 1;
}

.pain-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.pain-card__desc {
  font-size: 0.9375rem;
  color: var(--secondary);
  line-height: 1.65;
  flex-grow: 1;
}

/* Pain bar */
.pain-bar-wrap {
  margin-top: auto;
  padding-top: 4px;
}

.pain-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pain-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pain-bar-score {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--danger);
}

.pain-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pain-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   TAM/SAM/SOM BARS  (#market)
   ============================================================ */
.tam-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin-inline: auto;
}

.tam-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 16px;
}

@media (max-width: 600px) {
  .tam-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.tam-bar-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .tam-bar-label {
    text-align: left;
  }
}

.tam-bar-track {
  background: var(--border);
  border-radius: var(--radius-full);
  height: 40px;
  overflow: hidden;
}

.tam-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  padding-inline: 16px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.tam-bar-value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.tam-bar-fill--1 {
  background: #1e40af;
}

.tam-bar-fill--2 {
  background: #2563eb;
}

.tam-bar-fill--3 {
  background: #3b82f6;
}

/* ============================================================
   COMPETITIVE GAP MATRIX  (#market)
   ============================================================ */
.gap-matrix-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.gap-matrix {
  display: grid;
  grid-template-columns: 100px repeat(3, 1fr);
  gap: 2px;
  min-width: 480px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gap-matrix__header {
  background: var(--bg-alt);
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--secondary);
  text-align: center;
  letter-spacing: 0.02em;
}

.gap-matrix__header--highlight {
  background: var(--primary-light);
  color: var(--primary);
}

.gap-matrix__corner {
  background: var(--bg-alt);
}

.gap-matrix__row-header {
  background: var(--bg-alt);
  padding: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  writing-mode: horizontal-tb;
}

.gap-matrix__cell {
  background: var(--bg);
  padding: 14px;
  font-size: 0.875rem;
  color: var(--secondary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-matrix__cell--occupied {
  background: #f3f4f6;
  color: #9ca3af;
}

.gap-matrix__cell--opportunity {
  background: var(--primary-light);
  border: 2px dashed var(--primary);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  gap: 6px;
  flex-direction: column;
}

.opportunity-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--primary);
  flex-shrink: 0;
}

/* ============================================================
   PRODUCT CARDS  (#solution)
   ============================================================ */
.product-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .product-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition-md), box-shadow var(--transition-md);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.product-card--blue::before  { background: var(--primary); }
.product-card--green::before { background: var(--accent); }
.product-card--purple::before { background: #8b5cf6; }

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-card__timeline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary);
}

.product-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.product-card__desc {
  font-size: 0.9375rem;
  color: var(--secondary);
  line-height: 1.65;
}

.product-card__ai {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ai-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.ai-points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-points li {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--secondary);
  border: 1px solid var(--border);
}

/* Phase badges */
.phase-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.phase-badge--blue {
  background: var(--primary-light);
  color: var(--primary);
}

.phase-badge--green {
  background: var(--accent-light);
  color: #065f46;
}

.phase-badge--purple {
  background: #ede9fe;
  color: #5b21b6;
}

/* ============================================================
   EVOLUTION PATH  (#solution)
   ============================================================ */
.evolution-path {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.evolution-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 2px solid;
  font-weight: 600;
  font-size: 0.9375rem;
}

.evolution-step--blue {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.evolution-step--green {
  border-color: var(--accent);
  background: var(--accent-light);
  color: #065f46;
}

.evolution-step--purple {
  border-color: #8b5cf6;
  background: #ede9fe;
  color: #5b21b6;
}

.evolution-step__label {
  font-size: 1rem;
  font-weight: 800;
}

.evolution-step__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

.evolution-arrow {
  font-size: 1.5rem;
  color: var(--secondary);
  line-height: 1;
  user-select: none;
}

@media (max-width: 640px) {
  .evolution-path {
    flex-direction: column;
  }

  .evolution-arrow {
    transform: rotate(90deg);
  }
}

/* ============================================================
   PRICING SECTION  (#pricing)
   ============================================================ */
.pricing-subsection-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.pricing-note {
  font-size: 0.8125rem;
  color: var(--secondary);
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

/* SaaS Pricing Cards */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .pricing-cards {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.pricing-card--recommended {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-lg);
  transform: scale(1.03);
  z-index: 1;
}

.pricing-card--recommended:hover {
  transform: scale(1.03) translateY(-3px);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-xl);
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.pricing-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

.pricing-card__price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  text-align: center;
}

.pricing-card__period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0;
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-card__features li {
  font-size: 0.9375rem;
  color: var(--secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.pricing-card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
}

/* ============================================================
   FUNNEL SECTION  (#funnel)
   ============================================================ */
.funnel-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 680px;
  margin-inline: auto;
}

.funnel-level {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.funnel-bar {
  width: var(--funnel-width, 100%);
  min-height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.funnel-bar:hover {
  transform: scaleX(1.02);
  box-shadow: var(--shadow-md);
}

.funnel-bar__label {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.funnel-bar__value {
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.funnel-bar__value em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 4px;
}

/* Funnel bar color variants */
.funnel-bar--gray {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  color: var(--secondary);
}

.funnel-bar--blue-light {
  background: #DBEAFE;
  border: 1px solid #BFDBFE;
  color: #1e40af;
}

.funnel-bar--blue {
  background: #93C5FD;
  border: 1px solid #60A5FA;
  color: #1e3a8a;
}

.funnel-bar--blue-dark {
  background: var(--primary);
  border: 1px solid #1D4ED8;
  color: #fff;
}

.funnel-bar--accent {
  background: var(--accent);
  border: 1px solid #059669;
  color: #fff;
}

/* Funnel badge (right side label) */
.funnel-badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  width: 36px;
  text-align: center;
  white-space: nowrap;
}

.funnel-badge--accent {
  color: var(--accent);
}

/* Lead Magnet Cards */
.magnet-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.magnet-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.magnet-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.magnet-rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
}

.magnet-rank--1 { background: var(--accent); }
.magnet-rank--2 { background: var(--primary); }
.magnet-rank--3 { background: var(--secondary); }

.magnet-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.magnet-body {
  flex-grow: 1;
  min-width: 0;
}

.magnet-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.magnet-desc {
  font-size: 0.875rem;
  color: var(--secondary);
  line-height: 1.5;
  margin: 0;
}

.magnet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.magnet-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.magnet-tag--green  { background: var(--accent-light);   color: #065f46; }
.magnet-tag--blue   { background: var(--primary-light);  color: var(--primary); }
.magnet-tag--warning{ background: var(--warning-light);  color: #92400e; }
.magnet-tag--gray   { background: var(--bg-alt);         color: var(--secondary); border: 1px solid var(--border); }

@media (max-width: 600px) {
  .magnet-card {
    flex-wrap: wrap;
  }

  .magnet-tags {
    width: 100%;
    padding-left: 48px;
  }
}

/* ============================================================
   FINANCIAL SECTION  (#financial)
   ============================================================ */

/* Scenario header colors in revenue table */
.scenario-header {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.scenario-header--gray {
  background: #F3F4F6;
  color: #4B5563;
}

.scenario-header--blue {
  background: var(--primary-light);
  color: var(--primary);
}

.scenario-header--green {
  background: var(--accent-light);
  color: #065f46;
}

/* Scenario cells */
.scenario-cell {
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
}

.scenario-cell--gray  { color: #4B5563; }
.scenario-cell--blue  { color: var(--primary); }
.scenario-cell--green { color: #059669; }

/* Period note (磨合期, 起飛期...) */
.period-note {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--secondary);
  margin-top: 2px;
}

/* Unit Economics 2×2 grid */
.unit-economics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
  margin-inline: auto;
}

@media (min-width: 600px) {
  .unit-economics {
    grid-template-columns: repeat(4, 1fr);
  }
}

.unit-card {
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.unit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.unit-card--blue {
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
}

.unit-card--green {
  background: var(--accent-light);
  border: 1px solid #A7F3D0;
}

.unit-card--neutral {
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.unit-card__number {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--text);
}

.unit-card--blue  .unit-card__number { color: var(--primary); }
.unit-card--green .unit-card__number { color: #059669; }

.unit-card__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.unit-card__note {
  font-size: 0.75rem;
  color: var(--secondary);
  line-height: 1.4;
}

/* ============================================================
   COMPETITORS SECTION  (#competitors)
   ============================================================ */
.competitor-table-wrap {
  /* inherits .table-wrapper */
}

.competitor-table {
  min-width: 700px;
}

.competitor-table td,
.competitor-table th {
  text-align: center;
  vertical-align: middle;
}

.competitor-table td:first-child,
.competitor-table th:first-child {
  text-align: left;
}

/* Zebra striping */
.competitor-table tbody tr:nth-child(odd) td {
  background: var(--bg);
}

.competitor-table tbody tr:nth-child(even) td {
  background: var(--bg-alt);
}

.competitor-table tbody tr:hover td {
  background: #EFF6FF;
}

/* Our row highlight */
.competitor-row--us td {
  background: var(--primary-light) !important;
  color: var(--primary);
  font-weight: 600;
}

/* Check marks */
.check {
  font-size: 1.0625rem;
  font-weight: 700;
}

.check--yes { color: var(--accent); }
.check--no  { color: var(--danger); }
.check--mid { color: var(--warning); }

/* ============================================================
   TECH SECTION  (#tech)
   ============================================================ */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 560px;
  margin-inline: auto;
}

.arch-layer {
  width: 100%;
  display: flex;
  justify-content: center;
}

.arch-layer--split {
  gap: 12px;
  align-items: stretch;
}

.arch-box {
  border-radius: var(--radius);
  border: 1.5px solid;
  background: var(--bg);
  padding: 16px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
  flex: 1;
}

.arch-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.arch-box__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  opacity: 0.7;
}

.arch-box__content {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
}

/* Color variants */
.arch-box--client {
  border-color: #C4B5FD;
  background: #F5F3FF;
}
.arch-box--client .arch-box__label { color: #7C3AED; }

.arch-box--app {
  border-color: #93C5FD;
  background: var(--primary-light);
}
.arch-box--app .arch-box__label { color: var(--primary); }

.arch-box--data {
  border-color: #A7F3D0;
  background: var(--accent-light);
}
.arch-box--data .arch-box__label { color: #059669; }

.arch-box--ai {
  border-color: #FDE68A;
  background: var(--warning-light);
}
.arch-box--ai .arch-box__label { color: #B45309; }

.arch-box--external {
  border-color: #E5E7EB;
  background: var(--bg-alt);
  width: 100%;
}
.arch-box--external .arch-box__label { color: var(--secondary); }

/* Connecting arrows */
.arch-arrow {
  font-size: 1.5rem;
  color: var(--secondary);
  line-height: 1;
  padding: 4px 0;
  user-select: none;
  text-align: center;
  width: 100%;
}

/* Connector between split boxes */
.arch-connector {
  display: none;
}

@media (max-width: 540px) {
  .arch-layer--split {
    flex-direction: column;
  }

  .arch-box--client,
  .arch-box--app,
  .arch-box--external {
    width: 100%;
  }
}

/* ============================================================
   RISK GRID  (#risk)
   ============================================================ */
.risk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .risk-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .risk-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.risk-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.risk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Border-left color by impact level */
.risk-card--fatal {
  border-left-color: var(--danger);
}

.risk-card--high {
  border-left-color: var(--warning);
}

.risk-card--mid {
  border-left-color: #eab308; /* yellow-500 */
}

.risk-card__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.risk-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.risk-badge--fatal {
  background: var(--danger-light);
  color: #991b1b;
}

.risk-badge--high {
  background: var(--warning-light);
  color: #92400e;
}

.risk-badge--mid-impact {
  background: #fef9c3;
  color: #854d0e;
}

.risk-badge--mid {
  background: var(--bg-alt);
  color: var(--secondary);
  border: 1px solid var(--border);
}

.risk-badge--low {
  background: var(--accent-light);
  color: #065f46;
}

.risk-card__mitigation {
  font-size: 0.875rem;
  color: var(--secondary);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   DEBATE CARDS  (#debate)
   ============================================================ */
.debate-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.debate-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.debate-card__topic {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  padding: 12px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.debate-card__columns {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .debate-card__columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.debate-col {
  padding: 20px 18px;
  border-top: 3px solid transparent;
  text-align: center;
}

@media (min-width: 640px) {
  .debate-col + .debate-col {
    border-left: 1px solid var(--border);
    border-top: 3px solid transparent;
  }
}

@media (max-width: 639px) {
  .debate-col + .debate-col {
    border-top: 1px solid var(--border);
  }
}

.debate-col--pro {
  border-top-color: #3b82f6;
  background: #eff6ff;
}

.debate-col--con {
  border-top-color: #ef4444;
  background: #fef2f2;
}

.debate-col--verdict {
  border-top-color: #22c55e;
  background: #f0fdf4;
}

.debate-col__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.debate-col--pro .debate-col__label   { color: #1d4ed8; }
.debate-col--con .debate-col__label   { color: #b91c1c; }
.debate-col--verdict .debate-col__label { color: #15803d; }

.debate-col__content {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}

.debate-col__note {
  font-size: 0.8125rem;
  color: var(--secondary);
  line-height: 1.5;
}

/* ============================================================
   INSIGHT LIST  (#debate)
   ============================================================ */
.insight-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: transform var(--transition-md);
}

.insight-item:hover {
  transform: translateX(4px);
}

.insight-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.insight-body {
  font-size: 0.9375rem;
  color: var(--secondary);
  line-height: 1.65;
}

.insight-body strong {
  color: var(--text);
  font-weight: 700;
}

/* ============================================================
   TIMELINE  (#roadmap)
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

@media (min-width: 860px) {
  .timeline {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }
}

/* Vertical connector (mobile) */
.timeline-connector {
  width: 2px;
  height: 32px;
  background: var(--border);
  margin-left: 16px;
}

.timeline-connector--dashed {
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0,
    var(--border) 6px,
    transparent 6px,
    transparent 12px
  );
}

/* Horizontal connector (desktop) */
@media (min-width: 860px) {
  .timeline-connector {
    width: 32px;
    height: 2px;
    background: var(--border);
    margin-left: 0;
    margin-top: 40px;
    flex-shrink: 0;
  }

  .timeline-connector--dashed {
    background: repeating-linear-gradient(
      to right,
      var(--border) 0,
      var(--border) 6px,
      transparent 6px,
      transparent 12px
    );
    height: 2px;
    width: 32px;
  }
}

.timeline-item {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform var(--transition-md), box-shadow var(--transition-md);
  border-top: 3px solid transparent;
}

.timeline-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.timeline-item--blue   { border-top-color: #3b82f6; }
.timeline-item--green  { border-top-color: #22c55e; }
.timeline-item--purple { border-top-color: #a855f7; }
.timeline-item--gray   {
  border-top-color: #9ca3af;
  border-style: dashed;
  opacity: 0.8;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 2px solid;
}

.timeline-item--blue   .timeline-dot { background: #3b82f6; border-color: #3b82f6; }
.timeline-item--green  .timeline-dot { background: #22c55e; border-color: #22c55e; }
.timeline-item--purple .timeline-dot { background: #a855f7; border-color: #a855f7; }
.timeline-item--gray   .timeline-dot { background: transparent; border-color: #9ca3af; }

.timeline-phase {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 2px;
}

.timeline-period {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.timeline-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-details li {
  font-size: 0.8375rem;
  color: var(--secondary);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}

.timeline-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}

/* ============================================================
   DECISION TREE  (#roadmap)
   ============================================================ */
.decision-tree {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}

.decision-top {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.decision-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  border: 2px solid var(--border);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

.decision-branches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  position: relative;
  padding-top: 24px;
}

@media (min-width: 640px) {
  .decision-branches {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.decision-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.decision-condition {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
}

.decision-arrow-down {
  font-size: 1.25rem;
  color: var(--secondary);
  line-height: 1;
}

.decision-outcome {
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid;
  width: 100%;
  text-align: center;
  line-height: 1.4;
}

.decision-outcome span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.8;
}

.decision-outcome--green {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #15803d;
}

.decision-outcome--blue {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.decision-outcome--orange {
  background: var(--warning-light);
  border-color: var(--warning);
  color: #92400e;
}

.decision-outcome--red {
  background: var(--danger-light);
  border-color: var(--danger);
  color: #991b1b;
}

/* ============================================================
   DON'T-DO LIST  (#roadmap)
   ============================================================ */
.dont-do-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dont-do-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 20px;
  background: var(--bg);
  border-left: 4px solid var(--danger);
  font-size: 0.9375rem;
  color: var(--secondary);
  line-height: 1.6;
}

.dont-do-item + .dont-do-item {
  border-top: 1px solid var(--border);
}

.dont-do-item:hover {
  background: var(--danger-light);
}

.dont-do-x {
  color: var(--danger);
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}

.dont-do-item strong {
  color: var(--text);
}

/* ============================================================
   ABOUT GRID  (#about)
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
  }
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-block__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.about-block__text {
  font-size: 0.9375rem;
  color: var(--secondary);
  line-height: 1.75;
  margin: 0;
}

.team-composition {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-group {
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.team-group__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 4px;
}

.team-group__members {
  font-size: 0.875rem;
  color: var(--secondary);
  line-height: 1.55;
}

/* Quality Badge */
.about-score {
  display: flex;
  justify-content: center;
}

.quality-badge {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.quality-badge__circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3);
  position: relative;
}

.quality-badge__circle::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.quality-badge__number {
  font-size: 2.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
}

.quality-badge__denom {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.quality-badge__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quality-badge__sub {
  font-size: 0.8125rem;
  color: var(--secondary);
  text-align: center;
  max-width: 180px;
  line-height: 1.4;
}

/* ============================================================
   FOOTER  (updated layout)
   ============================================================ */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--secondary);
  margin: 0;
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--secondary);
  margin: 0;
  opacity: 0.75;
}

/* ============================================================
   RESPONSIVE POLISH  (Part E)
   ============================================================ */

/* Funnel: prevent overflow on very narrow screens */
@media (max-width: 480px) {
  .funnel-bar {
    min-height: 44px;
    padding: 8px 12px;
  }

  .funnel-bar__label {
    font-size: 0.8125rem;
  }

  .funnel-bar__value {
    font-size: 0.8125rem;
  }

  .funnel-badge {
    width: 28px;
    font-size: 0.625rem;
  }
}

/* Decision tree: 1 column on smallest screens */
@media (max-width: 479px) {
  .decision-branches {
    grid-template-columns: 1fr;
  }
}

/* KPI grid: 2x2 on mobile (already set), 4x1 on desktop (already set) */
/* Confirm: already grid-template-columns: repeat(2, 1fr) mobile,
   repeat(4, 1fr) at 768px — no change needed */

/* Pricing card: reset scale on mobile (recommended card shouldn't overflow) */
@media (max-width: 767px) {
  .pricing-card--recommended {
    transform: none;
    order: -1; /* Show recommended first on mobile */
  }

  .pricing-card--recommended:hover {
    transform: translateY(-3px);
  }
}

/* Revenue table: ensure horizontal scroll on mobile */
.revenue-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Competitor table: already has min-width: 700px on .competitor-table
   The .table-wrapper handles overflow-x: auto — confirmed */

/* Debate cards: already stack vertically on mobile via grid-template-columns: 1fr */

/* Section header: reduce bottom margin on mobile */
@media (max-width: 640px) {
  .section-header {
    margin-bottom: 36px;
  }

  main > section {
    padding-block: 56px;
  }
}

/* Insight items: ensure readable on mobile */
@media (max-width: 480px) {
  .insight-item {
    flex-direction: column;
    gap: 10px;
  }

  .insight-num {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

/* Architecture: already stacks via arch-layer--split at 540px */

/* Timeline: already vertical on mobile, horizontal at 860px */
