/* output.css — final optimized CSS for calculracine.com */

/* Reset & base */
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; background:#f7fafc;color:#111827;line-height:1.6}

/* Container */
.container{max-width:920px;margin:28px auto;padding:22px}

/* Header / Branding */
.header-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.brand .site-name{font-size:20px;font-weight:700;color:#0f172a}
.brand .site-name .brand-link{text-decoration:none;color:inherit}
.tagline{font-size:13px;color:#6b7280;margin-top:2px}
.bookmark-tip{background:#eef2ff;color:#3730a3;padding:8px 12px;border-radius:8px;border:1px solid #e0e7ff;font-size:13px}

/* Card */
.card{background:#fff;border-radius:12px;padding:18px;box-shadow:0 1px 2px rgba(15,23,42,0.04);margin-bottom:14px}
.label{display:block;font-size:13px;color:#374151;margin-bottom:8px}

/* Row */
.row{display:flex;gap:12px;align-items:center}
.row.small .btn-ghost{padding:8px 10px}

/* Input */
.input{flex:1;padding:12px 14px;border-radius:8px;border:1px solid #e6e9ee;font-size:16px;outline:none}
.input:focus{box-shadow:0 0 0 4px rgba(99,102,241,0.08);border-color:#6366f1}

/* Buttons */
.btn-group{display:flex;flex-direction:column;gap:8px}
.btn-primary{background:#4f46e5;color:#fff;padding:10px 14px;border-radius:8px;border:0;font-weight:600;cursor:pointer}
.btn-primary:hover{filter:brightness(.98)}
.btn-ghost{background:#fff;border:1px solid #e6e9ee;padding:10px 12px;border-radius:8px;cursor:pointer}
.btn-outline{background:#fff;border:1px solid #d1d5db;padding:8px 10px;border-radius:8px;cursor:pointer}

/* Numpad */
.numpad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.nbtn{padding:10px;border-radius:8px;border:1px solid #edf2f7;background:#fbfdff;cursor:pointer; font-weight:600}

/* Result */
.result-box{margin-top:14px;background:#f8fafc;padding:12px;border-radius:8px}
.result-title{font-size:14px;margin:0;color:#374151}
.result-value{margin-top:8px;font-size:26px;font-weight:700;color:#0f172a}
.result-source{margin-top:6px;color:#6b7280;font-size:13px}
.result-actions{margin-top:8px;display:flex;gap:8px}

/* History */
.card-title{margin:0 0 10px 0;font-size:15px;font-weight:600}
.history-list{list-style:none;padding:0;margin:0}
.history-item{display:flex;justify-content:space-between;padding:10px;border-radius:8px;border:1px solid #f1f5f9;background:#fff;cursor:pointer;margin-bottom:8px}
.history-item:hover{background:#f8fafc}
.h-input{font-weight:600;color:#0f172a}
.h-result{font-size:12px;color:#6b7280;margin-top:4px}

/* FAQ */
.faq-item{margin-top:12px}
.faq-item h4{margin:0;font-size:16px;color:#0f172a}
.faq-item p{margin-top:6px;color:#374151;font-size:14px;line-height:1.6}

/* Footer */
.footer{margin-top:8px;text-align:center;color:#6b7280;font-size:13px}
.footer .link{margin-right:12px;color:#4f46e5;text-decoration:none}

/* Modal */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.45);display:flex;align-items:center;justify-content:center;padding:18px;z-index:60}
.modal-overlay.hidden{display:none}
.modal{background:#fff;width:100%;max-width:720px;border-radius:12px;padding:18px;box-shadow:0 10px 30px rgba(2,6,23,0.2);max-height:82vh;overflow:auto}
.modal-header{margin-bottom:8px}
.modal-title{font-size:18px;margin:0}
.modal-body{color:#334155;font-size:14px;line-height:1.6}
.modal-footer{text-align:right;margin-top:12px}

/* Responsive */
@media (max-width:700px){
  .row{flex-direction:column;align-items:stretch}
  .btn-group{flex-direction:row;justify-content:space-between}
  .numpad{grid-template-columns:repeat(4,1fr)}
  .container{padding:14px}
  .bookmark-tip{display:none}
}
