@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root { --primary: #0f172a; --accent: #2563eb; --bg: #f8fafc; --text: #334155; --white: #ffffff; --border: #e2e8f0; --pi: #3b82f6; --tax: #10b981; --ins: #8b5cf6; --hoa: #f59e0b; --pmi: #ef4444; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg); color: var(--text); margin: 0; padding: 0; line-height: 1.8; }

nav { background: var(--primary); color: white; padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.15); flex-wrap: wrap; gap: 15px;}
.logo { font-size: 1.6rem; font-weight: 800; color: white; text-decoration: none; cursor: pointer; display: flex; align-items: center; gap: 5px; letter-spacing: -0.5px;}
.logo span { color: #60a5fa; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.nav-links a { color: #cbd5e1; text-decoration: none; font-size: 0.95rem; font-weight: 600; cursor: pointer; padding: 8px 15px; border-radius: 6px; transition: 0.3s; background: rgba(255,255,255,0.05); }
.nav-links a:hover, .nav-links a.active-nav { background: var(--accent); color: white; }

.wrapper { max-width: 1200px; margin: 40px auto; padding: 0 20px; min-height: 80vh; }

.calc-card { background: var(--white); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.08); display: grid; grid-template-columns: 1.2fr 0.8fr; overflow: hidden; border: 1px solid var(--border); margin-bottom: 20px; }
@media (max-width: 992px) { .calc-card { grid-template-columns: 1fr; } }

.calc-inputs { padding: 45px; }
.calc-inputs h2 { color: var(--primary); font-weight: 800; margin-top: 0; margin-bottom: 25px; font-size: 1.8rem;}

.state-predictor { background: #eff6ff; border: 1px solid #bfdbfe; padding: 20px; border-radius: 12px; margin-bottom: 30px; }
.state-predictor label { color: #1d4ed8; font-weight: 700; margin-bottom: 10px; display:block; }
.state-predictor select { border-color: #93c5fd; background-color: white; color: #1e3a8a; font-weight: 600; }

.calc-results { padding: 45px; background: var(--primary); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.calc-results h3 { color: #94a3b8; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 15px; font-weight: 600;}

.input-group { margin-bottom: 22px; position: relative; }
label { display: block; font-weight: 600; color: #1e293b; margin-bottom: 8px; font-size: 0.95rem; }
.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #64748b; font-weight: 700; }

input[type="number"], select { width: 100%; padding: 15px 15px 15px 40px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1.05rem; font-weight: 500; box-sizing: border-box; transition: all 0.3s ease; color: var(--primary); background-color: #f8fafc;}
select { padding-left: 15px; cursor: pointer; }
input:focus, select:focus { border-color: var(--accent); outline: none; background-color: white; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }

.result-value { font-size: 4rem; font-weight: 800; color: #60a5fa; line-height: 1; margin-bottom: 30px; letter-spacing: -1px;}
@media (max-width: 576px) { .result-value { font-size: 3rem; } }

.result-breakdown { width: 100%; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 25px; }
.breakdown-item { display: flex; justify-content: space-between; align-items: center; color: #cbd5e1; margin-bottom: 12px; font-size: 0.95rem; }
.breakdown-item span.b-val { color: white; font-weight: 700; font-size: 1.05rem;}

.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle;}
.dot-pi { background: var(--pi); } .dot-tax { background: var(--tax); } .dot-ins { background: var(--ins); } .dot-hoa { background: var(--hoa); } .dot-pmi { background: var(--pmi); }

.insight-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 20px; width: 100%; margin-top: 20px; text-align: left; box-sizing: border-box; }
.insight-box div { margin-bottom: 8px; font-size: 0.95rem; color: #94a3b8; display: flex; justify-content: space-between;}
.insight-box div span { font-weight: 700; color: white; }

.pmi-alert { background: rgba(239, 68, 68, 0.15); color: #fca5a5; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #ef4444; margin-top: 25px; font-size: 0.9rem; font-weight: 500; display: none; text-align: left; line-height: 1.5;}

.premium-data-section { display: none; margin-bottom: 50px; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 768px) { .charts-grid { grid-template-columns: 1fr; } }
.chart-container { background: white; padding: 25px; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.chart-container h4 { text-align: center; color: var(--primary); margin-top: 0; margin-bottom: 10px; font-size: 1.2rem; font-weight: 800; }

.amortization-wrapper { background: white; padding: 30px; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 5px 20px rgba(0,0,0,0.03); overflow-x: auto; }
.amortization-wrapper h4 { color: var(--primary); margin-top: 0; margin-bottom: 20px; font-size: 1.4rem; font-weight: 800; border-left: 5px solid var(--accent); padding-left: 15px;}
.amortization-table { width: 100%; border-collapse: collapse; text-align: right; min-width: 600px; }
.amortization-table th { background: #f8fafc; color: var(--primary); padding: 15px; font-weight: 700; border-bottom: 2px solid var(--border); }
.amortization-table th:first-child { text-align: left; }
.amortization-table td { padding: 15px; border-bottom: 1px solid #f1f5f9; color: #475569; font-size: 0.95rem; }
.amortization-table td:first-child { text-align: left; font-weight: 600; color: var(--primary); }
.amortization-table tr:hover { background: #eff6ff; }

.home-hero { text-align: center; padding: 60px 20px; background: white; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 5px 20px rgba(0,0,0,0.02); margin-bottom: 40px;}
.home-hero h1 { color: var(--primary); font-size: 3rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -1px;}
.home-hero p { color: #64748b; font-size: 1.2rem; max-width: 800px; margin: 0 auto 40px auto; line-height: 1.6;}
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; text-align: left;}
.tool-card { background: #f8fafc; padding: 30px; border-radius: 15px; border: 1px solid #e2e8f0; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; justify-content: space-between;}
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1); border-color: #93c5fd;}
.tool-card h3 { color: var(--accent); margin-top: 0; font-size: 1.3rem; margin-bottom: 10px;}
.tool-card p { color: #475569; font-size: 0.95rem; margin: 0;}

.seo-article { background: white; padding: 60px; border-radius: 20px; border: 1px solid var(--border); margin-top: 40px; box-shadow: 0 5px 20px rgba(0,0,0,0.02); }
@media (max-width: 768px) { .seo-article { padding: 30px; } }

.article-header { border-bottom: 2px solid var(--border); padding-bottom: 20px; margin-bottom: 40px; }
.article-header h1 { color: var(--primary); font-size: 2.6rem; font-weight: 800; margin-bottom: 15px; line-height: 1.2; letter-spacing: -0.5px;}
.author-meta { font-size: 0.95rem; color: #64748b; font-weight: 500; display: flex; align-items: center; gap: 10px;}

.seo-article h2 { color: var(--primary); font-size: 1.8rem; margin-top: 50px; margin-bottom: 25px; font-weight: 800; }
.seo-article h3 { color: #1e293b; margin-top: 40px; margin-bottom: 20px; font-size: 1.4rem; font-weight: 700; border-left: 4px solid var(--accent); padding-left: 15px;}
.seo-article p { color: #334155; margin-bottom: 25px; text-align: left; font-size: 1.1rem; line-height: 1.85; }

.content-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; margin: 30px 0; border-left: 5px solid var(--accent);}
.content-box h4 { margin-top: 0; color: var(--accent); font-size: 1.3rem; margin-bottom: 15px; font-weight: 800;}

.seo-article ul { margin-bottom: 30px; padding-left: 25px; }
.seo-article li { color: #334155; font-size: 1.1rem; margin-bottom: 15px; line-height: 1.7; padding-left: 5px;}
.seo-article strong { color: var(--primary); font-weight: 700; }

footer { background: var(--primary); color: white; padding: 60px 20px; text-align: center; margin-top: 80px; }
.footer-logo { font-size: 2rem; font-weight: 800; color: white; text-decoration: none; margin-bottom: 20px; display: inline-block; letter-spacing: -0.5px;}
.footer-logo span { color: #60a5fa; }
.legal-text { max-width: 900px; margin: 0 auto; font-size: 0.9rem; color: #94a3b8; line-height: 1.6; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px;}
