/* LoanComputation — clean, mobile-first house style. No fixed widths, no horizontal overflow. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #1e293b; background: #f8fafc; line-height: 1.6; }
a { color: #1d4ed8; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 18px; }
.site-header { background: #0f172a; color: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.logo-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #2563eb; color: #fff; font-size: 0.95rem; }
.logo em { font-style: normal; color: #93c5fd; }
.nav-toggle { display: none; background: none; border: 1px solid #475569; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }
.main-nav { display: flex; gap: 18px; }
.main-nav a { color: #e2e8f0; text-decoration: none; font-weight: 600; }
.main-nav a:hover { color: #fff; text-decoration: underline; }
.hero { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 30px 0 24px; }
.hero h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 10px; }
.hero h1 .grad { color: #1d4ed8; }
.lede { font-size: 1.08rem; color: #475569; margin: 0 0 18px; }
.tool-card { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; margin-top: 18px; }
.tool-card h2 { margin-top: 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 11px 12px; font-size: 1rem; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn { display: inline-block; background: #1d4ed8; color: #fff; border: 0; border-radius: 9px; padding: 12px 22px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.btn:hover { background: #1e40af; }
.btn-secondary { background: #e2e8f0; color: #1e293b; margin-left: 8px; }
.btn-secondary:hover { background: #cbd5e1; }
.error { color: #b91c1c; font-weight: 600; margin: 10px 0 0; }
.results { display: none; margin-top: 20px; }
.results.show { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 18px; }
.stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; text-align: center; }
.stat .label { font-size: 0.85rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-size: 1.35rem; font-weight: 800; color: #0f172a; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e2e8f0; }
th { background: #0f172a; color: #fff; }
td.num, th.num { text-align: right; }
.content { background: #fff; padding: 26px 0 10px; }
.content h2 { margin-top: 28px; }
.formula { background: #f1f5f9; border-left: 4px solid #1d4ed8; padding: 12px 16px; border-radius: 0 10px 10px 0; overflow-x: auto; }
.faq details { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; }
.disclaimer { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; }
.site-footer { background: #0f172a; color: #cbd5e1; padding: 26px 0; margin-top: 30px; font-size: 0.95rem; }
.site-footer a { color: #e2e8f0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.footer-grid h3 { color: #fff; margin-top: 0; font-size: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
@media (max-width: 820px) {
  .hero h1 { font-size: 1.55rem; }
  .nav-toggle { display: block; }
  .main-nav { display: none; flex-direction: column; gap: 10px; width: 100%; padding: 10px 0 4px; }
  .main-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .field-row, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
  table { font-size: 0.9rem; }
}
