/* Basic site style matching your other tools */
* { box-sizing: border-box; }
body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  margin: 0;
  line-height: 1.6;
}

/* Header */
header {
  text-align: center;
  background: #007bff;
  color: #fff;
  padding: 2rem 1rem;
}
header h1 { margin: 0; font-size: 2.2rem; }
header p.intro { margin: 0.5rem 0 0; font-size: 1rem; opacity: 0.95; }

/* Layout */
main { max-width: 1200px; margin: auto; padding: 2rem 1rem; }
section { background: #fff; padding: 2rem; margin-bottom: 2rem; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.08); }
.section-title { text-align:center; margin-bottom:1.5rem; font-size:1.6rem; color:#007bff; position:relative; }
.section-title::after { content:""; position:absolute; bottom:-10px; left:50%; transform:translateX(-50%); width:80px; height:3px; background:#007bff; border-radius:2px; opacity:0.8; }

.calc-grid { display:grid; grid-template-columns: 1fr 420px; gap:1.5rem; align-items:start; }
.calc-left, .calc-right { padding: 0; }

/* Controls */
.control-row { display:flex; flex-wrap:wrap; gap:1rem; margin-bottom:1rem; }
.control-group { flex:1 1 180px; display:flex; flex-direction:column; }
.control-group.full-width { flex-basis:100%; }
.control-group label { font-size:0.9rem; font-weight:600; margin-bottom:0.25rem; color:#0056b3; }
.control-group input[type="number"], .control-group select, .control-group input[type="text"] {
  padding:0.6rem 0.75rem; border-radius:6px; border:1px solid #ced4da; font-size:1rem; outline:none;
}
.control-group input:focus, .control-group select:focus { border-color:#007bff; }

.btn-primary, .btn-secondary {
  padding:0.75rem 1.25rem; border:none; border-radius:6px; cursor:pointer; font-size:1rem; font-weight:500; margin-right:0.5rem; transition:0.15s;
}
.btn-primary { background:#007bff; color:#fff; }
.btn-primary:hover:not(:disabled){ background:#0056b3; transform:translateY(-2px); }
.btn-secondary { background:#6c757d; color:#fff; }
.btn-secondary:hover:not(:disabled){ background:#545b62; }
button:disabled { opacity:0.65; cursor:not-allowed; }

/* Results */
.result-card { background:#f8f9ff; border-radius:8px; padding:1rem; border:1px solid #e1e8ef; margin-bottom:1rem; }
.result-card .label { font-size:0.9rem; color:#666; margin-bottom:0.4rem; font-weight:600; color:#0056b3; }
.result-card .value { font-size:1.25rem; font-weight:700; color:#222; word-break:break-word; }

/* Amortization */
.amortization h3 { margin-top:0; color:#007bff; }
#amortTableWrapper { max-height:260px; overflow:auto; border:1px solid #e9eef6; border-radius:8px; margin-top:0.75rem; background:#fff; }
#amortTable { width:100%; border-collapse:collapse; font-size:0.95rem; min-width:600px; }
#amortTable thead th { position:sticky; top:0; background:#f8f9ff; font-weight:700; padding:8px; border-bottom:1px solid #e9eef6; color:#0056b3; }
#amortTable tbody td { padding:8px; border-bottom:1px solid #f1f5f9; text-align:right; }
#amortTable tbody td:first-child, #amortTable thead th:first-child { text-align:center; }

/* Help & messages */
.help-text { font-size:0.85rem; color:#666; margin-top:0.25rem; }
.error-message { margin-top:0.25rem; font-size:0.95rem; color:#dc3545; }
.note-box { text-align:center; margin-top:1rem; padding:1rem 1.5rem; border:2px solid #007bff; border-radius:8px; background:#e9f5ff; font-weight:500; color:#0056b3; box-shadow:0 2px 8px rgba(0,123,255,0.08); }

/* Steps & benefits & FAQ reuse */
.steps { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap:1rem; margin-top:1rem; }
.step { background:#fff; border:1px solid #e1e8ef; border-radius:12px; padding:1rem; text-align:center; box-shadow:0 3px 10px rgba(0,0,0,0.04); }
.step-number { width:50px; height:50px; background:linear-gradient(145deg,#007bff,#0056b3); color:#fff; font-size:1.2rem; display:flex; align-items:center; justify-content:center; margin:0 auto 1rem; border-radius:50%; }

.benefits-grid ul { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:1rem; }
.benefits-grid li { background:#f8f9fa; padding:1rem; border-left:4px solid #007bff; border-radius:6px; font-size:1rem; }

#faq { margin-top:1rem; }
.faq-question { width:100%; background:#f8f9fa; border:1px solid #e9ecef; border-radius:6px; padding:1rem; font-weight:bold; text-align:left; cursor:pointer; color:#007bff; margin-bottom:0.5rem; }
.faq-answer { display:none; padding:1rem; border-left:3px solid #007bff; background:#fff; border-radius:4px; margin-bottom:0.75rem; }
.faq-item.active .faq-answer { display:block; }

/* Print friendly */
@media print {
  body { background: #fff; color: #000; }
  header, footer, .control-row, .btn-primary, .btn-secondary, .steps, .note-box, #faq { display: none !important; }
  main { max-width: 100%; padding: 0; box-shadow: none; }
  #amortTable thead th, #amortTable tbody td { color: #000; background: transparent; }
}
@media (max-width:980px){ .calc-grid { grid-template-columns:1fr; } .result-card { margin-right:0; } #amortTable { min-width:540px; } }
/* Footer */
footer {
  background: #f1f1f1;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}