/* FinanceHub — shared stylesheet. Mobile-first, professional finance theme. */
:root{
  --blue-900:#0b2242;
  --blue-700:#123a6d;
  --blue-600:#1a4f96;
  --blue-100:#e3ecf9;
  --teal-600:#0e9f6e;
  --teal-700:#0b7a55;
  --bg:#f3f6fb;
  --card:#ffffff;
  --text:#1d2b3a;
  --muted:#5d6f84;
  --border:#e1e8f2;
  --radius:14px;
  --shadow:0 6px 24px rgba(11,34,66,.08);
  --shadow-lg:0 12px 40px rgba(11,34,66,.14);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;
  background:var(--bg);color:var(--text);line-height:1.6;font-size:16px;
}
.container{max-width:1080px;margin:0 auto;padding:0 18px}
a{color:var(--blue-600);text-decoration:none}
a:hover{text-decoration:underline}

/* ---------- header ---------- */
.site-header{background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.header-inner{display:flex;align-items:center;gap:14px;padding:12px 18px;max-width:1080px;margin:0 auto}
.logo{display:flex;align-items:center;gap:9px;font-weight:800;font-size:1.25rem;color:var(--blue-900);white-space:nowrap}
.logo:hover{text-decoration:none}
.logo-mark{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--blue-700),var(--blue-600));color:#fff;font-weight:800}
.main-nav{display:flex;gap:4px;margin-left:auto;overflow-x:auto;scrollbar-width:none}
.main-nav::-webkit-scrollbar{display:none}
.main-nav a{padding:8px 12px;border-radius:8px;color:var(--text);font-weight:600;font-size:.92rem;white-space:nowrap}
.main-nav a:hover{background:var(--blue-100);text-decoration:none}
.lang-btn{margin-left:6px;border:2px solid var(--blue-700);background:#fff;color:var(--blue-700);font-weight:700;border-radius:999px;padding:7px 16px;cursor:pointer;font-size:.9rem;white-space:nowrap}
.lang-btn:hover{background:var(--blue-700);color:#fff}

/* ---------- hero ---------- */
.hero{background:linear-gradient(135deg,var(--blue-900) 0%,var(--blue-700) 60%,var(--blue-600) 100%);color:#fff;padding:56px 0 48px}
.hero h1{font-size:2rem;line-height:1.25;margin-bottom:12px}
.hero p{color:#cdd9ec;max-width:640px;font-size:1.05rem}
.hero .hero-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.hero .badge{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);padding:6px 14px;border-radius:999px;font-size:.85rem;font-weight:600}

/* ---------- cards & grids ---------- */
.section{padding:44px 0}
.section h2{font-size:1.5rem;margin-bottom:6px;color:var(--blue-900)}
.section .sub{color:var(--muted);margin-bottom:22px}
.card-grid{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:640px){.card-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:960px){.card-grid{grid-template-columns:repeat(3,1fr)}}
.calc-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:8px;transition:transform .15s,box-shadow .15s}
.calc-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);text-decoration:none}
.calc-card .icon{width:46px;height:46px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.35rem;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--blue-600),var(--teal-600))}
.calc-card h3{color:var(--blue-900);font-size:1.08rem}
.calc-card p{color:var(--muted);font-size:.92rem;flex:1}
.calc-card .go{color:var(--teal-700);font-weight:700;font-size:.92rem}

/* ---------- calculator layout ---------- */
.calc-layout{display:grid;grid-template-columns:1fr;gap:18px;margin-top:22px}
@media(min-width:900px){.calc-layout{grid-template-columns:1.05fr .95fr;align-items:start}}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}
.card h2{font-size:1.2rem;color:var(--blue-900);margin-bottom:16px}
.field{margin-bottom:18px}
.field label{display:block;font-weight:700;margin-bottom:8px;font-size:.95rem}
.field .row{display:flex;gap:10px;align-items:center}
input[type=number],input[type=text],select{
  width:100%;padding:13px 14px;font-size:1.05rem;border:2px solid var(--border);border-radius:10px;background:#fbfcfe;color:var(--text);
}
input[type=number]:focus,input[type=text]:focus,select:focus{outline:none;border-color:var(--blue-600);background:#fff}
.input-wrap{position:relative;flex:1}
.input-wrap .prefix{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--muted);font-weight:700}
.input-wrap input{padding-left:34px}
input[type=range]{width:100%;accent-color:var(--blue-600);height:32px;cursor:pointer}
.range-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:.8rem;margin-top:2px}

/* segmented control */
.segmented{display:flex;background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:4px;gap:4px}
.segmented button{flex:1;border:0;background:transparent;padding:11px 8px;border-radius:9px;font-weight:700;font-size:.92rem;color:var(--muted);cursor:pointer}
.segmented button.active{background:#fff;color:var(--blue-900);box-shadow:0 2px 8px rgba(11,34,66,.12)}

/* results */
.result-hero{background:linear-gradient(135deg,var(--blue-900),var(--blue-600));color:#fff;border-radius:var(--radius);padding:26px;margin-bottom:16px}
.result-hero .lbl{font-size:.9rem;color:#cdd9ec;font-weight:600}
.result-hero .val{font-size:2.1rem;font-weight:800;letter-spacing:-.5px}
.result-hero .val small{font-size:1rem;font-weight:600;color:#cdd9ec}
.result-row{display:flex;justify-content:space-between;align-items:center;padding:12px 2px;border-bottom:1px dashed var(--border);font-size:.98rem}
.result-row:last-child{border-bottom:0}
.result-row .k{color:var(--muted);font-weight:600}
.result-row .v{font-weight:800;color:var(--blue-900)}
.result-row .v.green{color:var(--teal-700)}
.compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.compare .opt{border:2px solid var(--border);border-radius:12px;padding:16px;text-align:center}
.compare .opt.winner{border-color:var(--teal-600);background:#f0fbf6}
.compare .opt .t{font-weight:800;color:var(--blue-900);margin-bottom:6px}
.compare .opt .a{font-size:1.35rem;font-weight:800}
.verdict{margin-top:14px;background:#f0fbf6;border:1px solid var(--teal-600);color:var(--teal-700);font-weight:700;border-radius:12px;padding:14px 16px}

/* principal vs interest bar */
.splitbar{display:flex;height:26px;border-radius:999px;overflow:hidden;margin:14px 0 8px;background:var(--bg)}
.splitbar .p{background:linear-gradient(90deg,var(--blue-600),var(--blue-700))}
.splitbar .i{background:linear-gradient(90deg,#f0a63c,#e08300)}
.legend{display:flex;gap:18px;font-size:.88rem;color:var(--muted)}
.legend .dot{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:6px;vertical-align:baseline}

/* tables */
table.sched{width:100%;border-collapse:collapse;font-size:.88rem;margin-top:12px}
table.sched th,table.sched td{padding:9px 8px;text-align:right;border-bottom:1px solid var(--border)}
table.sched th{background:var(--bg);color:var(--blue-900);font-weight:700;position:sticky;top:0}
table.sched td:first-child,table.sched th:first-child{text-align:left}
.table-wrap{overflow-x:auto;max-height:420px;overflow-y:auto;border:1px solid var(--border);border-radius:10px}

/* chart */
canvas.chart{width:100%;height:260px;display:block}
.chart-legend{display:flex;gap:18px;justify-content:center;font-size:.88rem;color:var(--muted);margin-top:8px}

/* info / faq */
.info-block{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin-top:26px}
.info-block h2{font-size:1.2rem;color:var(--blue-900);margin-bottom:10px}
.info-block p,.info-block li{color:#33465c;font-size:.96rem}
.info-block ul{padding-left:20px;margin:8px 0}
.info-block code{background:var(--bg);padding:2px 8px;border-radius:6px;font-size:.9rem}
.faq{margin-top:8px}
.faq details{border:1px solid var(--border);border-radius:10px;margin-bottom:10px;background:#fff}
.faq summary{padding:14px 16px;font-weight:700;cursor:pointer;color:var(--blue-900);list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";float:right;color:var(--teal-700);font-size:1.2rem}
.faq details[open] summary::after{content:"–"}
.faq .a{padding:0 16px 16px;color:#33465c;font-size:.95rem}

/* footer */
footer{background:var(--blue-900);color:#c6d4e8;margin-top:56px}
.footer-grid{display:grid;grid-template-columns:1fr;gap:22px;padding:40px 0 10px}
@media(min-width:720px){.footer-grid{grid-template-columns:1.2fr 1fr 1fr}}
footer h4{color:#fff;margin-bottom:10px;font-size:1rem}
footer a{color:#c6d4e8;font-size:.92rem}
footer ul{list-style:none}
footer li{margin-bottom:7px}
.disclaimer{font-size:.82rem;color:#93a7c4;border-top:1px solid rgba(255,255,255,.14);margin-top:18px;padding:16px 0}
.copy{font-size:.82rem;color:#7e93b3;padding-bottom:26px}

/* misc */
.page-head{padding:36px 0 6px}
.page-head h1{font-size:1.7rem;color:var(--blue-900)}
.page-head p{color:var(--muted);max-width:680px}
.breadcrumb{font-size:.85rem;color:var(--muted);margin-bottom:10px}
.checkbox-row{display:flex;align-items:center;gap:10px;font-weight:600}
.checkbox-row input{width:20px;height:20px;accent-color:var(--teal-600)}
.note{background:#fff8e6;border:1px solid #f0d48a;border-radius:10px;padding:12px 14px;font-size:.9rem;color:#7a5b16;margin-top:14px}
@media(max-width:640px){
  .hero h1{font-size:1.55rem}
  .result-hero .val{font-size:1.7rem}
  .card{padding:18px}
  .compare{grid-template-columns:1fr}
}
