/* ==============================================
   CHARTS — Gauge, SWOT grid, donut, timeline, etc.
   ============================================== */

/* ── Viability Gauge ── */
.gauge {
  position: relative;
  width: 180px;
  height: 180px;
}

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

.gauge__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}

.gauge__fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease-out),
              stroke 0.6s var(--ease-out);
}

.gauge__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge__score {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1;
}

.gauge__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.gauge__max {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ── SWOT Grid ── */
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.swot-quadrant {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid;
}

.swot-quadrant--strengths {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.swot-quadrant--weaknesses {
  background: rgba(229, 72, 77, 0.06);
  border-color: rgba(229, 72, 77, 0.2);
}

.swot-quadrant--opportunities {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.2);
}

.swot-quadrant--threats {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
}

.swot-quadrant__title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.swot-quadrant--strengths .swot-quadrant__title     { color: var(--swot-strength); }
.swot-quadrant--weaknesses .swot-quadrant__title    { color: var(--swot-weakness); }
.swot-quadrant--opportunities .swot-quadrant__title { color: var(--swot-opportunity); }
.swot-quadrant--threats .swot-quadrant__title       { color: var(--swot-threat); }

.swot-quadrant__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  list-style: none;
  padding-left: 0;
}

.swot-quadrant__list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-left: var(--space-md);
  position: relative;
  line-height: 1.5;
}

.swot-quadrant__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.swot-quadrant--strengths .swot-quadrant__list li::before     { background: var(--swot-strength); }
.swot-quadrant--weaknesses .swot-quadrant__list li::before    { background: var(--swot-weakness); }
.swot-quadrant--opportunities .swot-quadrant__list li::before { background: var(--swot-opportunity); }
.swot-quadrant--threats .swot-quadrant__list li::before       { background: var(--swot-threat); }

/* ── Revenue Donut ── */
.donut-chart {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.donut {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut__hole {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.donut__hole-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
  min-width: 200px;
}

.donut-legend__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.donut-legend__color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 3px;
}

.donut-legend__info {
  display: flex;
  flex-direction: column;
}

.donut-legend__name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.donut-legend__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.donut-legend__pct {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* ── Dev Timeline ── */
.timeline {
  display: flex;
  gap: 0;
  position: relative;
  padding: var(--space-xl) 0;
  overflow-x: auto;
}

.timeline__phase {
  flex: 1;
  min-width: 200px;
  position: relative;
  padding: 0 var(--space-md);
}

.timeline__phase::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--glass-border);
}

.timeline__phase:first-child::before {
  left: 50%;
}

.timeline__phase:last-child::before {
  right: 50%;
}

.timeline__node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.timeline__phase-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-xs);
}

.timeline__duration {
  font-size: var(--text-xs);
  color: var(--accent-cyan);
  text-align: center;
  font-family: var(--font-mono);
  margin-bottom: var(--space-md);
}

.timeline__deliverables {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  padding-left: 0;
}

.timeline__deliverables li {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding-left: var(--space-md);
  position: relative;
  line-height: 1.4;
}

.timeline__deliverables li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* ── Competitor Cards ── */
.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.competitor-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.competitor-card:hover {
  border-color: var(--accent-primary-40);
}

.competitor-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.competitor-card__name {
  font-size: var(--text-lg);
  font-weight: 600;
}

.competitor-card__url {
  font-size: var(--text-xs);
  color: var(--accent-cyan);
  text-decoration: none;
}

.competitor-card__url:hover {
  text-decoration: underline;
}

.competitor-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.competitor-card__badges {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.competitor-card__badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.competitor-card__badge-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

/* ── Feature Matrix ── */
.feature-matrix {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.feature-group__title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.feature-group__count {
  font-size: var(--text-xs);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.feature-group--must-have .feature-group__title   { color: var(--accent-emerald); }
.feature-group--should-have .feature-group__title  { color: var(--accent-amber); }
.feature-group--nice-to-have .feature-group__title { color: var(--accent-cyan); }

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid;
}

.feature-card--must-have    { border-left-color: var(--accent-emerald); }
.feature-card--should-have  { border-left-color: var(--accent-amber); }
.feature-card--nice-to-have { border-left-color: var(--accent-cyan); }

.feature-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.feature-card__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .swot-grid {
    grid-template-columns: 1fr;
  }

  .donut-chart {
    flex-direction: column;
    align-items: center;
  }

  .timeline {
    flex-direction: column;
    gap: var(--space-md);
  }

  .timeline__phase::before {
    display: none;
  }

  .competitor-grid {
    grid-template-columns: 1fr;
  }
}
