/* ===========================
   Typography
=========================== */

/* Fluid root font-size: scales all rem values with viewport (min 12px for a11y) */
html {
    font-size: clamp(12px, 0.5vw + 11px, 16px);
}

/* Global Typography */
body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
    background-size: var(--grid-size-x) var(--grid-size-y);
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Page Headers - consistent with toolbar title */
.page-header {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: var(--line-height-tight);
}

[data-theme="dark"] .page-header {
    color: var(--text-secondary);
}

/* Transaction Date Display */
.last-transaction-date {
    color: var(--text-slate);
    padding: 3px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    margin: 10px 0;
    font-weight: 400;
}

/* Section labels (chart headers, small-caps) - aligned with card-section-label */
.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
}

/* Unified card header styles (canonical: Simulation Live Preview) */
.card-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.card-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Sidebar / nav typography - tighter line-height, medium weight */
.sidebar .nav-subitem,
.sidebar .nav-section-label,
.nav-subitem {
    line-height: var(--line-height-nav);
    font-weight: var(--font-weight-medium);
}

.sidebar .nav-section-label {
    font-size: 10px;
    letter-spacing: 0.06em;
}

/* Card Titles */
.metric-card .card-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 5px;
    text-align: left;
}

/* Form Elements Typography */
.dropdown {
    font-size: 1.2rem;
    background-color: var(--bg-primary);
    padding: 5px;
    min-width: 200px;
    text-align: center;
}

/* Date Range Typography */
.date-range-green {
    color: var(--success-green);
    font-weight: bold;
}

.date-range-error {
    color: var(--error-red);
    font-weight: bold;
}

/* Metric Labels */
.metric-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.metric-label-small {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* Transaction Typography */
.transaction-date {
    font-size: var(--font-size-sm);
    font-weight: 500;
    min-width: 65px;
}

.transaction-amount {
    font-size: var(--font-size-base);
    min-width: 80px;
}

.transaction-desc {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
}

.transaction-category {
    font-size: var(--font-size-xs);
    font-weight: bold;
}

/* Stacked Cards Typography */
.year-text {
    flex: 1;
    text-align: left;
}

.age-text {
    flex: 1;
    text-align: center;
}

.calendar-text {
    flex: 1;
    text-align: right;
}

.net-worth-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.savings-value {
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--text-primary);
}

.return-value {
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--success-green);
}

.withdrawal-value {
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--warning-yellow);
}

.income-boost-value {
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--success-green);
}

.expense-value {
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--error-red);
}

.amount-needed-value {
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--text-primary);
}

.afford-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.afford-icon {
    font-size: 16px;
    font-weight: bold;
}

.no-data-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

/* ===========================
   Mobile Typography Overrides
=========================== */
@media (max-width: 768px) {
    body {
        line-height: 1.4;
    }
    
    .page-header {
        font-size: 1.5rem !important;
    }
    
    /* Enforce minimum 12px font size on mobile */
    .metric-label-small {
        font-size: 12px;
    }
    
    .metric-label {
        font-size: 12px;
    }
} 