/* ============================================
   Graphs & Visualization Styles
   ============================================ */

/* --- Git Evolution Charts --- */
.chart-section {
  margin-bottom: 64px;
}
.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.chart-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Animated bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 250px;
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.bar {
  width: 80%;
  max-width: 50px;
  border-radius: 4px 4px 0 0;
  transition: height 1s ease;
  position: relative;
  cursor: pointer;
}
.bar:hover {
  filter: brightness(1.3);
}
.bar-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.bar:hover .bar-tooltip { opacity: 1; }
.bar-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 10px;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Stacked area chart (simulated with bars) */
.area-chart {
  position: relative;
  height: 300px;
  overflow: hidden;
}

/* Growth line */
.growth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.growth-card {
  padding: 24px;
}
.growth-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.growth-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.growth-card-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.growth-card-bar {
  width: 100%;
  height: 6px;
  background: var(--glass);
  border-radius: 3px;
  overflow: hidden;
}
.growth-card-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.5s ease;
}

/* Service timeline chart */
.service-timeline-chart {
  position: relative;
  padding: 20px 0;
}
.service-timeline-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  gap: 16px;
}
.service-timeline-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  width: 140px;
  flex-shrink: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.service-timeline-bar-bg {
  flex: 1;
  height: 24px;
  background: var(--glass);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.service-timeline-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 3px;
  transition: all 1s ease;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.service-timeline-bar span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

/* Jurisdiction evolution */
.jurisdiction-evolution {
  position: relative;
  padding: 40px 0;
}
.jurisdiction-step {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
}
.jurisdiction-step::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 60px;
  bottom: -40px;
  width: 2px;
  background: rgba(139,92,246,0.2);
}
.jurisdiction-step:last-child::before { display: none; }
.jurisdiction-step-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--accent-primary);
  background: var(--bg-primary);
  color: var(--accent-tertiary);
  z-index: 2;
}
.jurisdiction-step-content {
  flex: 1;
}
.jurisdiction-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.jurisdiction-step-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.jurisdiction-step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Jurisdiction cards */
.jurisdiction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.jurisdiction-card {
  position: relative;
  overflow: hidden;
}
.jurisdiction-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.jurisdiction-card-flag {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--glass);
}
.jurisdiction-card-name {
  font-size: 1.1rem;
  font-weight: 700;
}
.jurisdiction-card-type {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.jurisdiction-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}
.jurisdiction-card-components {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Number counter animation */
.counter {
  display: inline-block;
}
