/* ============================================================
   MortgageCalcHub — Complete Stylesheet (2026)
   Mobile-first, responsive, AdSense-optimized layout
   ============================================================ */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --accent: #93c5fd;
    --accent-light: #dbeafe;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e5e7eb;
    --border-light: #f1f5f9;
    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --error: #dc2626;
    --error-bg: #fee2e2;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --max-width: 1200px;
    --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================ HEADER */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
    background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--border);
    z-index: 1000; backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.25rem; }
.logo svg { flex-shrink: 0; }
.main-nav { display: flex; gap: 0.5rem; }
.nav-link { padding: 0.5rem 1rem; text-decoration: none; color: var(--text-light); font-weight: 500; font-size: 0.875rem; border-radius: var(--radius-sm); transition: all 0.2s; }
.nav-link:hover { color: var(--primary); background: var(--accent-light); }
.mobile-menu-btn { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text); transition: all 0.3s; border-radius: 1px; }
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================ HERO */
.hero { padding: calc(var(--header-height) + 3rem) 0 3rem; text-align: center; background: linear-gradient(135deg, var(--bg-alt) 0%, var(--accent-light) 100%); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: var(--text); margin-bottom: 1rem; line-height: 1.2; }
.hero-subtitle { font-size: 1.125rem; color: var(--text-light); max-width: 700px; margin: 0 auto 1.5rem; }
.hero-badges { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.5rem 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 100px; font-size: 0.875rem; font-weight: 500; color: var(--primary); }

/* ============================================================ AD UNITS */
.ad-unit { margin: 2rem auto; text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center; background: var(--bg-alt); border-radius: var(--radius); border: 1px dashed var(--border); }
.ad-banner { max-width: 728px; min-height: 90px; }
.ad-inline { max-width: 100%; min-height: 250px; }
.ad-unit::before { content: 'Advertisement'; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================ HUB GRID */
.hub-grid { padding: 3rem 0; }
.hub-grid h2 { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.calc-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: all 0.3s; cursor: default; }
.calc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--accent); }
.calc-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.calc-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.calc-card p { font-size: 0.875rem; color: var(--text-light); margin-bottom: 1rem; }

/* ============================================================ CALCULATOR SECTIONS */
.calculator-section { padding: 3rem 0; scroll-margin-top: calc(var(--header-height) + 1rem); }
.calculator-section.alt-bg { background: var(--bg-alt); }
.calc-header { text-align: center; margin-bottom: 2rem; }
.calc-header h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.calc-description { color: var(--text-light); max-width: 600px; margin: 0 auto; }

.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.compare-layout { grid-template-columns: 1fr 1fr; }

@media (max-width: 900px) {
    .calc-layout, .compare-layout { grid-template-columns: 1fr; }
}

/* Inputs */
.calc-inputs { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.input-group { margin-bottom: 1.25rem; }
.input-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.input-group input, .input-group select { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s; }
.input-group input:focus, .input-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1); }
.input-group small { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.section-subtitle { font-size: 1rem; font-weight: 600; color: var(--primary); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent-light); }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Compare columns */
.compare-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 600px) { .compare-columns { grid-template-columns: 1fr; } }
.compare-column { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 1rem; }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.5rem; background: var(--primary); color: white; border: none; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; width: 100%; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-reset { display: inline-flex; align-items: center; justify-content: center; padding: 0.625rem 1rem; background: transparent; color: var(--text-light); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; cursor: pointer; transition: all 0.2s; width: 100%; margin-top: 0.75rem; }
.btn-reset:hover { background: var(--border-light); color: var(--text); }

/* Results */
.calc-results { position: sticky; top: calc(var(--header-height) + 1rem); }
.results-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; background: var(--bg); border: 2px dashed var(--border); border-radius: var(--radius); text-align: center; color: var(--text-muted); min-height: 300px; }
.placeholder-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

.results-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.results-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.results-header h3 { font-size: 1.125rem; font-weight: 600; }
.filing-badge { padding: 0.375rem 0.75rem; background: var(--accent-light); color: var(--primary); border-radius: 100px; font-size: 0.75rem; font-weight: 600; }

.results-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.summary-item { display: flex; flex-direction: column; gap: 0.25rem; }
.summary-item .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.summary-item .value { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.summary-item.highlight .value { font-size: 1.5rem; color: var(--primary); }
.summary-item.highlight.success .value { color: var(--success); }
.summary-item.highlight.warning .value { color: var(--warning); }
.summary-item .value.primary { color: var(--primary); }
.summary-item .value.credit { color: var(--success); }
.summary-item .value.owed { color: var(--error); }
.summary-item .value.refund { color: var(--success); }

.results-detail { padding: 1.5rem; }
.results-detail h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }

.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 0.625rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; }
.detail-row:last-child { border-bottom: none; }
.detail-row.deduction { color: var(--success); }
.detail-row.credit { color: var(--success); font-weight: 600; }
.detail-row.owed { color: var(--error); }
.detail-row.subtotal { font-weight: 600; border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.detail-row.total { font-weight: 700; font-size: 1rem; border-top: 2px solid var(--border); margin-top: 0.5rem; padding-top: 1rem; }
.detail-row.total.refund { color: var(--success); }
.detail-row.total.owed { color: var(--error); }

/* Donut Chart */
.payment-breakdown-chart { padding: 1.5rem; border-top: 1px solid var(--border); }
.payment-breakdown-chart h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.donut-chart-container { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.donut-chart { position: relative; width: 200px; height: 200px; flex-shrink: 0; }
.donut-chart svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.donut-total { display: block; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.donut-label { font-size: 0.75rem; color: var(--text-muted); }
.donut-legend { flex: 1; min-width: 200px; }
.legend-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; font-size: 0.875rem; }
.legend-color { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.legend-item span:nth-child(2) { flex: 1; }
.legend-item span:last-child { font-weight: 600; color: var(--text); }

/* DTI Gauge */
.dti-analysis { padding: 1.5rem; border-top: 1px solid var(--border); }
.dti-analysis h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.dti-gauge { margin-bottom: 1.5rem; }
.dti-bar-container { margin-bottom: 0.5rem; }
.dti-bar-bg { height: 12px; background: var(--border-light); border-radius: 6px; overflow: hidden; position: relative; }
.dti-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.dti-bar-fill.success { background: linear-gradient(90deg, var(--success), #34d399); }
.dti-bar-fill.warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.dti-markers { display: flex; justify-content: space-between; font-size: 0.625rem; color: var(--text-muted); margin-top: 0.25rem; }
.dti-value { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.dti-label { font-size: 0.875rem; font-weight: 600; }
.dti-percent { font-size: 1.25rem; font-weight: 700; }
.dti-percent.success { color: var(--success); }
.dti-percent.warning { color: var(--warning); }
.dti-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }

/* First Year Breakdown */
.first-year-breakdown { padding: 1.5rem; border-top: 1px solid var(--border); }
.first-year-breakdown h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }

/* Compare Table */
.compare-table { padding: 1.5rem; border-top: 1px solid var(--border); }
.compare-table h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.compare-header { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 1rem; padding: 0.75rem 0; border-bottom: 2px solid var(--border); font-weight: 600; font-size: 0.875rem; }
.compare-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; align-items: center; }
.compare-col-title { text-align: center; }
.compare-col-title.winner { color: var(--success); font-weight: 700; }

.compare-table.full .compare-header,
.compare-table.full .compare-row { grid-template-columns: 1.5fr 1fr 1fr; }

/* Break-even Analysis */
.break-even-analysis { padding: 1.5rem; border-top: 1px solid var(--border); }
.break-even-analysis h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.break-even-chart { margin-top: 1rem; padding: 1rem; background: var(--bg-alt); border-radius: var(--radius-sm); }
.be-line { position: relative; height: 40px; background: linear-gradient(90deg, var(--error-bg) 0%, var(--error-bg) 50%, var(--success-bg) 50%, var(--success-bg) 100%); border-radius: var(--radius-sm); overflow: hidden; }
.be-point { position: absolute; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.be-label { display: inline-block; background: var(--bg); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.625rem; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.be-legend { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.75rem; }
.be-lose { color: var(--error); }
.be-gain { color: var(--success); }

/* Winner Banner */
.winner-banner { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.5rem; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.winner-banner.winner-a { background: var(--success-bg); border-color: var(--success); }
.winner-banner.winner-b { background: var(--success-bg); border-color: var(--success); }
.winner-banner.winner-buy { background: var(--success-bg); border-color: var(--success); }
.winner-banner.winner-rent { background: var(--accent-light); border-color: var(--accent); }
.winner-icon { font-size: 1.5rem; }
.winner-text { font-weight: 600; font-size: 1rem; }

/* Amortization Table */
.amortization-table-container { padding: 1.5rem; border-top: 1px solid var(--border); }
.amortization-table-container h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.amortization-table { overflow-x: auto; }
.amortization-header { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; padding: 0.75rem; background: var(--bg-alt); border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.amortization-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; align-items: center; }
.amortization-row.even { background: var(--bg-alt); }
.amortization-row.odd { background: var(--bg); }
.amortization-row span { text-align: right; }
.amortization-row span:first-child { text-align: left; }

/* Stacked Bar Chart */
.amortization-chart { padding: 1.5rem; border-top: 1px solid var(--border); }
.amortization-chart h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.stacked-bar-chart { display: flex; flex-direction: column; gap: 0.75rem; }
.stacked-bar { display: grid; grid-template-columns: 80px 1fr 200px; gap: 1rem; align-items: center; }
.bar-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.bar-visual { display: flex; height: 24px; border-radius: 4px; overflow: hidden; }
.bar-interest { background: var(--error); transition: width 0.5s; }
.bar-principal { background: var(--success); transition: width 0.5s; }
.bar-values { display: flex; flex-direction: column; font-size: 0.625rem; gap: 0.125rem; }
.interest-val { color: var(--error); }
.principal-val { color: var(--success); }

/* Yearly Comparison */
.yearly-comparison { padding: 1.5rem; border-top: 1px solid var(--border); }
.yearly-comparison h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.comparison-table { overflow-x: auto; }
.comparison-header { display: grid; grid-template-columns: 60px 1fr 1fr 1fr 1fr 80px; gap: 0.5rem; padding: 0.75rem; background: var(--bg-alt); border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.comparison-row { display: grid; grid-template-columns: 60px 1fr 1fr 1fr 1fr 80px; gap: 0.5rem; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; align-items: center; }
.comparison-row.even { background: var(--bg-alt); }
.comparison-row.odd { background: var(--bg); }
.winner-cell { font-weight: 700; }
.winner-cell.buy { color: var(--success); }
.winner-cell.rent { color: var(--primary); }

/* Info Boxes */
.info-box { padding: 1.25rem 1.5rem; background: var(--bg-alt); border-left: 4px solid var(--primary); margin: 1rem 1.5rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.info-box.success { border-left-color: var(--success); background: var(--success-bg); }
.info-box.warning { border-left-color: var(--warning); background: var(--warning-bg); }
.info-box h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.75rem; }
.info-box p { font-size: 0.875rem; color: var(--text-light); line-height: 1.6; }
.info-box small { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.75rem; }

/* Disclaimer */
.disclaimer { padding: 1rem 1.5rem; background: var(--warning-bg); border-top: 1px solid var(--border); }
.disclaimer p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

/* Error Message */
.error-message { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 2rem; background: var(--error-bg); border: 1px solid var(--error); border-radius: var(--radius); color: var(--error); }
.error-icon { font-size: 2rem; }

/* ============================================================ FAQ */
.faq-section { padding: 3rem 0; background: var(--bg-alt); }
.faq-section h2 { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1rem; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::after { content: '+'; font-size: 1.25rem; color: var(--primary); transition: transform 0.3s; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.25rem 1.25rem; font-size: 0.875rem; color: var(--text-light); line-height: 1.6; }

/* ============================================================ FOOTER */
.site-footer { background: var(--bg-dark); color: var(--text-muted); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { color: white; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; max-width: 300px; }
.footer-links h4 { color: white; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.875rem; padding: 0.375rem 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; }
.footer-bottom p { font-size: 0.75rem; margin-bottom: 0.5rem; }

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem; }
    .main-nav.active { display: flex; }
    .mobile-menu-btn { display: flex; }
    .hero { padding: calc(var(--header-height) + 2rem) 0 2rem; }
    .hero h1 { font-size: 1.75rem; }
    .grid { grid-template-columns: 1fr; }
    .calc-layout { grid-template-columns: 1fr; }
    .calc-results { position: static; }
    .results-summary { grid-template-columns: 1fr 1fr; }
    .compare-columns { grid-template-columns: 1fr; }
    .compare-header, .compare-row { grid-template-columns: 1fr 1fr 1fr 1fr; font-size: 0.75rem; gap: 0.25rem; }
    .compare-table.full .compare-header,
    .compare-table.full .compare-row { grid-template-columns: 1fr 1fr 1fr; }
    .stacked-bar { grid-template-columns: 60px 1fr; }
    .bar-values { display: none; }
    .comparison-header, .comparison-row { grid-template-columns: 50px 1fr 1fr 1fr 1fr 60px; font-size: 0.75rem; gap: 0.25rem; }
    .faq-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .donut-chart-container { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .results-summary { grid-template-columns: 1fr; }
    .compare-header, .compare-row { grid-template-columns: 1fr 1fr 1fr; }
    .compare-header span:first-child, .compare-row span:first-child { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .ad-banner { min-height: 50px; }
    .ad-inline { min-height: 150px; }
}

/* ============================================================ PRINT */
@media print {
    .site-header, .ad-unit, .btn-primary, .btn-reset, .mobile-menu-btn { display: none !important; }
    .calculator-section { page-break-inside: avoid; }
    .results-card { border: 1px solid #000; }
}

/* ============================================================ ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
input:focus, select:focus, button:focus, a:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-contrast: high) { :root { --border: #000; --text-light: #333; } }
