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

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

body{font-family:'Inter',system-ui,sans-serif;background:#0f0f13;color:#e4e4e7;line-height:1.6;min-height:100vh}

.container{max-width:900px;margin:0 auto;padding:0 1.25rem}

/* Header */
.site-header{border-bottom:1px solid rgba(255,255,255,0.06);padding:1rem 0}
.site-header .container{display:flex;align-items:center;justify-content:space-between}
.logo{display:flex;align-items:center;gap:0.5rem;text-decoration:none;color:#e4e4e7;font-weight:700;font-size:1.15rem}
.logo-icon{font-size:1.4rem;background:linear-gradient(135deg,#6366f1,#4f46e5,#4338ca);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-weight:800}
.site-header nav{display:flex;gap:1.5rem}
.site-header nav a{color:#a1a1aa;text-decoration:none;font-size:0.9rem;font-weight:500;transition:color 0.2s}
.site-header nav a:hover{color:#e4e4e7}

/* Hero */
.hero{text-align:center;padding:3rem 1.25rem 1.5rem}
.hero h1{font-size:2.5rem;font-weight:800;background:linear-gradient(135deg,#6366f1,#4f46e5,#4338ca);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:0.5rem}
.hero p{color:#a1a1aa;font-size:1.05rem;max-width:550px;margin:0 auto}

/* Card */
.card{background:#1a1a2e;border:1px solid rgba(255,255,255,0.06);border-radius:1.25rem;padding:1.75rem;margin-bottom:1.5rem}

/* Form */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-group{display:flex;flex-direction:column;gap:0.35rem}
.form-group label{font-weight:600;font-size:0.85rem;color:#a1a1aa}
.form-group input,.form-group select{background:#0f0f13;border:1px solid rgba(255,255,255,0.1);border-radius:0.75rem;padding:0.75rem 1rem;color:#e4e4e7;font-family:'Inter',sans-serif;font-size:0.95rem;transition:border-color 0.2s}
.form-group input:focus,.form-group select:focus{outline:none;border-color:#6366f1}
.form-group select{cursor:pointer}
.form-group.full-width{grid-column:1/-1}

.input-row{display:flex;gap:0.5rem}
.input-row input{flex:1}
.input-row select{width:80px;padding:0.75rem 0.5rem}

/* Buttons */
.btn-primary{background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;border:none;padding:0.75rem 2rem;border-radius:0.75rem;font-weight:600;font-size:0.95rem;cursor:pointer;transition:opacity 0.2s;font-family:'Inter',sans-serif;width:100%;margin-top:0.5rem}
.btn-primary:hover{opacity:0.9}
.btn-secondary{background:rgba(255,255,255,0.06);color:#e4e4e7;border:1px solid rgba(255,255,255,0.1);padding:0.7rem 1.25rem;border-radius:0.75rem;font-weight:500;font-size:0.9rem;cursor:pointer;transition:all 0.2s;font-family:'Inter',sans-serif}
.btn-secondary:hover{background:rgba(255,255,255,0.1)}

/* Results */
.results-section{margin-top:1.75rem}
.results-title{font-weight:700;font-size:1.15rem;margin-bottom:1rem;color:#f4f4f5}

.summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0.75rem;margin-bottom:1.5rem}
.summary-card{background:rgba(99,102,241,0.06);border:1px solid rgba(99,102,241,0.15);border-radius:1rem;padding:1.25rem;text-align:center}
.summary-card.highlight{grid-column:1/-1;background:rgba(99,102,241,0.1);border-color:rgba(99,102,241,0.25)}
.summary-card .value{font-size:1.75rem;font-weight:800;color:#a5b4fc;font-family:'JetBrains Mono',monospace}
.summary-card.highlight .value{font-size:2.25rem;color:#818cf8}
.summary-card .label{font-size:0.8rem;color:#a1a1aa;margin-top:0.25rem;font-weight:500}

/* Breakdown */
.breakdown{margin-bottom:1.5rem}
.breakdown-title{font-weight:600;font-size:0.95rem;margin-bottom:0.75rem;color:#d4d4d8}
.breakdown-item{display:flex;justify-content:space-between;align-items:center;padding:0.6rem 0;border-bottom:1px solid rgba(255,255,255,0.04)}
.breakdown-item:last-child{border-bottom:none}
.breakdown-item .name{color:#a1a1aa;font-size:0.9rem}
.breakdown-item .amount{font-family:'JetBrains Mono',monospace;font-weight:600;color:#e4e4e7;font-size:0.9rem}
.breakdown-bar{height:8px;background:rgba(255,255,255,0.06);border-radius:4px;margin-top:0.75rem;overflow:hidden;display:flex}
.breakdown-bar .seg{height:100%;transition:width 0.3s}
.seg-pi{background:#6366f1}
.seg-tax{background:#f59e0b}
.seg-ins{background:#14b8a6}

.breakdown-legend{display:flex;gap:1rem;margin-top:0.5rem;flex-wrap:wrap}
.legend-item{display:flex;align-items:center;gap:0.35rem;font-size:0.8rem;color:#a1a1aa}
.legend-dot{width:10px;height:10px;border-radius:50%;display:inline-block}

/* Amortization Table */
.amort-section{margin-top:1.5rem}
.amort-title{font-weight:600;font-size:0.95rem;margin-bottom:0.75rem;color:#d4d4d8;display:flex;justify-content:space-between;align-items:center}
.table-wrap{overflow-x:auto;border-radius:0.75rem;border:1px solid rgba(255,255,255,0.06)}
table{width:100%;border-collapse:collapse;font-size:0.85rem}
thead{background:rgba(99,102,241,0.08)}
th{padding:0.75rem 1rem;text-align:left;font-weight:600;color:#a1a1aa;font-size:0.8rem;text-transform:uppercase;letter-spacing:0.05em}
td{padding:0.6rem 1rem;border-top:1px solid rgba(255,255,255,0.04);font-family:'JetBrains Mono',monospace;font-size:0.83rem;color:#d4d4d8}
tr:hover td{background:rgba(255,255,255,0.02)}
.btn-show-more{background:rgba(99,102,241,0.1);border:1px solid rgba(99,102,241,0.2);color:#a5b4fc;padding:0.5rem 1.25rem;border-radius:0.6rem;font-weight:600;font-size:0.85rem;cursor:pointer;font-family:'Inter',sans-serif;transition:all 0.2s;margin-top:0.75rem}
.btn-show-more:hover{background:rgba(99,102,241,0.2)}

/* Content sections */
.content-section h2{font-size:1.5rem;font-weight:700;margin-bottom:1rem;color:#f4f4f5}
.content-section h3{font-size:1.1rem;font-weight:600;margin:1.25rem 0 0.5rem;color:#d4d4d8}
.content-section p{color:#a1a1aa;margin-bottom:0.75rem;font-size:0.95rem}
.content-section ul{list-style:disc;padding-left:1.5rem;color:#a1a1aa;margin-bottom:1rem}
.content-section ul li{margin-bottom:0.35rem;font-size:0.95rem}
.content-section details{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:0.75rem;padding:1rem;margin-bottom:0.5rem}
.content-section summary{font-weight:600;cursor:pointer;color:#d4d4d8}
.content-section details p{margin-top:0.5rem;margin-bottom:0}

/* Ad slots */
.ad-slot{min-height:90px;margin:1.5rem auto;text-align:center;max-width:728px}

/* Footer */
.site-footer{border-top:1px solid rgba(255,255,255,0.06);padding:2rem 0;margin-top:3rem}
.site-footer .container{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem}
.site-footer p{color:#71717a;font-size:0.85rem}
.site-footer nav{display:flex;gap:1.5rem}
.site-footer nav a{color:#71717a;text-decoration:none;font-size:0.85rem;transition:color 0.2s}
.site-footer nav a:hover{color:#a1a1aa}

.hidden{display:none !important}

@media(max-width:640px){
    .hero h1{font-size:1.75rem}
    .site-header nav{display:none}
    .form-grid{grid-template-columns:1fr}
    .summary-grid{grid-template-columns:1fr}
    .card{padding:1.25rem}
    .site-footer .container{flex-direction:column;text-align:center}
}
