/* Enhanced Typography System for Multi-Screen Readability */

/* Import better fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* Typography Classes */
.typography-primary {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  line-height: 1.4;
}

.typography-secondary {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  line-height: 1.5;
}

.typography-financial {
  font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.typography-code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-weight: 500;
  line-height: 1.5;
}

/* Responsive Typography Scaling */
@media (max-width: 576px) {
  .typography-primary {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  .typography-secondary {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .typography-financial {
    font-size: 0.8rem;
    letter-spacing: 0.2px;
  }
  
  .typography-code {
    font-size: 0.8rem;
  }
  
  /* Table typography adjustments */
  .table th {
    font-size: 0.75rem !important;
    padding: 0.75rem 0.5rem !important;
  }
  
  .table td {
    font-size: 0.85rem !important;
    padding: 0.75rem 0.5rem !important;
  }
  
  /* Header adjustments */
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.3rem !important; }
  h3 { font-size: 1.1rem !important; }
  h4 { font-size: 1rem !important; }
  h5 { font-size: 0.9rem !important; }
  h6 { font-size: 0.85rem !important; }
}

@media (min-width: 577px) and (max-width: 768px) {
  .typography-primary {
    font-size: 0.95rem;
    line-height: 1.35;
  }
  
  .typography-secondary {
    font-size: 0.9rem;
  }
  
  .typography-financial {
    font-size: 0.85rem;
  }
  
  .typography-code {
    font-size: 0.85rem;
  }
  
  .table th {
    font-size: 0.8rem !important;
    padding: 1rem 0.75rem !important;
  }
  
  .table td {
    font-size: 0.9rem !important;
    padding: 1rem 0.75rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .typography-primary {
    font-size: 1rem;
  }
  
  .typography-secondary {
    font-size: 0.95rem;
  }
  
  .typography-financial {
    font-size: 0.9rem;
  }
  
  .typography-code {
    font-size: 0.9rem;
  }
}

@media (min-width: 1025px) {
  .typography-primary {
    font-size: 1.1rem;
  }
  
  .typography-secondary {
    font-size: 1rem;
  }
  
  .typography-financial {
    font-size: 0.95rem;
  }
  
  .typography-code {
    font-size: 0.95rem;
  }
}

/* Enhanced readability improvements */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Better contrast for financial data */
.financial-positive {
  color: var(--profit);
  font-weight: 700;
}

.financial-negative {
  color: var(--loss);
  font-weight: 700;
}

.financial-neutral {
  color: var(--neutral);
  font-weight: 600;
}

/* Confidence indicators with better visual hierarchy */
.confidence-high {
  color: var(--ai-confidence);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(249, 115, 22, 0.2);
}

.confidence-medium {
  color: var(--ai-prediction);
  font-weight: 600;
}

.confidence-low {
  color: var(--text-muted);
  font-weight: 500;
}
