/* ═══ BusinessLoanCalculator.net — Shared Styles ═══ */
:root {
  --primary: #1a3a6b;
  --primary-light: #2155a3;
  --accent: #e8a020;
  --accent-dark: #c47d00;
  --success: #1e7e34;
  --danger: #c82333;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #dde3ed;
  --text: #1c2638;
  --muted: #6b7a99;
  --shadow: 0 2px 12px rgba(26,58,107,0.09);
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sticky Nav ── */
.site-nav { background: var(--primary); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 10px rgba(0,0,0,.28); }
.nav-inner { max-width: 1260px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; height: 52px; }
.nav-logo { color: #fff; font-size: .98rem; font-weight: 800; letter-spacing: -.2px; flex: 0 0 auto; text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { color: rgba(255,255,255,.82); font-size: .78rem; font-weight: 600; padding: 6px 9px; border-radius: 6px; text-decoration: none; transition: background .13s, color .13s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.35rem; cursor: pointer; margin-left: auto; padding: 4px 8px; line-height: 1; }

@media (max-width: 840px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: fixed; top: 52px; left: 0; right: 0; background: var(--primary); flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 14px; box-shadow: 0 6px 16px rgba(0,0,0,.32); }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: 0; padding: 12px 22px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: .88rem; }
}

/* ── Page header ── */
.page-header { background: var(--primary); color: #fff; padding: 20px 24px 16px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.3px; }
.page-header p { font-size: .87rem; opacity: .82; margin-top: 4px; max-width: 650px; }

/* ── Wrapper ── */
.wrapper { max-width: 1260px; margin: 0 auto; padding: 22px 16px 44px; }

/* ── Footer ── */
.site-footer { background: var(--primary); color: rgba(255,255,255,.72); padding: 34px 16px 22px; margin-top: 44px; }
.footer-inner { max-width: 1260px; margin: 0 auto; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-cols > div { display: flex; flex-direction: column; gap: 7px; }
.footer-cols strong { color: #fff; font-size: .76rem; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
.footer-cols a { color: rgba(255,255,255,.72); font-size: .8rem; text-decoration: none; }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.footer-disclaimer { font-size: .74rem; line-height: 1.65; border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; }
.footer-copy { font-size: .74rem; margin-top: 8px; opacity: .6; }

/* ── Breadcrumb ── */
.breadcrumb { padding: 10px 0 2px; font-size: .79rem; color: var(--muted); }
.breadcrumb a { color: var(--primary-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 5px; }

/* ── Cards ── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-header { padding: 13px 18px 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.card-header h2 { font-size: 1rem; font-weight: 700; color: var(--primary); }
.card-body { padding: 18px; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; font-size: .93rem; font-weight: 700; cursor: pointer; transition: background .14s, transform .08s; text-decoration: none; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); text-decoration: none; color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn:active { transform: scale(.97); }
.btn-sm { padding: 6px 14px; font-size: .82rem; }

/* ── Form elements ── */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: .79rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 7px;
  font-size: .94rem; color: var(--text); background: #f8fafd; transition: border .14s;
  -moz-appearance: textfield;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-light); outline: none; background: #fff; }
.field input::-webkit-inner-spin-button, .field input::-webkit-outer-spin-button { -webkit-appearance: none; }
.prefix-wrap { position: relative; }
.prefix-wrap .pfx { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .93rem; pointer-events: none; }
.prefix-wrap input { padding-left: 22px; }
.suffix-wrap { position: relative; }
.suffix-wrap .sfx { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .88rem; pointer-events: none; }
.suffix-wrap input { padding-right: 28px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; margin-bottom: 0; }

/* ── KPI grid ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border-radius: 9px; border: 1px solid var(--border); padding: 13px 15px; box-shadow: var(--shadow); }
.kpi label { font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: block; margin-bottom: 4px; }
.kpi .val { font-size: 1.18rem; font-weight: 800; color: var(--primary); }
.kpi .sub { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.kpi.accent .val { color: var(--accent-dark); }
.kpi.success .val { color: var(--success); }
.kpi.danger .val { color: var(--danger); }

/* ── Badges ── */
.badge { display: inline-block; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; vertical-align: middle; letter-spacing: .4px; }
.badge.blue { background: var(--primary-light); }
.badge.green { background: var(--success); }
.badge.gray { background: var(--muted); }

/* ── Notice ── */
.notice { background: #fff8e1; border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 5px; font-size: .83rem; color: #5a4000; }
.notice.info { background: #e8f0fe; border-color: var(--primary-light); color: var(--primary); }
.notice.success { background: #e8f5e9; border-color: var(--success); color: #1b5e20; }
.notice.danger { background: #fce8ea; border-color: var(--danger); color: #7f0010; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th { background: #eef1f8; color: var(--primary); font-size: .73rem; text-transform: uppercase; letter-spacing: .5px; padding: 9px 11px; text-align: left; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { background: #e4e9f5; }
.data-table td { padding: 9px 11px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f5f7fc; }
.data-table .total-row td { font-weight: 700; background: #eef1f8; }
.table-wrap { overflow-x: auto; }

/* ── Layout helpers ── */
.layout-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.layout-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 880px) { .layout-sidebar, .layout-two { grid-template-columns: 1fr; } }

/* ── Ad units ── */
.ad-unit { background: #f0f3f9; border: 1px dashed #b4c0d6; border-radius: 8px; text-align: center; color: var(--muted); font-size: .78rem; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; overflow: hidden; }
.ad-unit strong { font-size: .67rem; text-transform: uppercase; letter-spacing: .5px; }
.ad-leaderboard { min-height: 90px; margin: 16px 0; }
.ad-rectangle { min-height: 250px; margin: 12px 0; }
.ad-inline { min-height: 90px; margin: 22px 0; }

/* ── Prose (SEO content) ── */
.prose h2 { font-size: 1.18rem; font-weight: 700; color: var(--primary); margin: 26px 0 8px; }
.prose h3 { font-size: .98rem; font-weight: 700; color: var(--primary); margin: 18px 0 6px; }
.prose p { font-size: .9rem; color: #3a4a65; line-height: 1.77; margin-bottom: 10px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 12px; }
.prose li { font-size: .9rem; color: #3a4a65; line-height: 1.72; margin-bottom: 4px; }
.prose details { border: 1px solid var(--border); border-radius: 7px; margin: 8px 0; }
.prose details summary { padding: 12px 16px; font-weight: 600; cursor: pointer; font-size: .91rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.prose details summary::after { content: '+'; font-size: 1.1rem; color: var(--muted); }
.prose details[open] summary::after { content: '−'; }
.prose details p { padding: 0 16px 14px; margin: 0; }
.prose strong { color: var(--text); }

/* ── CTA box ── */
.cta-box { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; border-radius: var(--radius); padding: 24px; text-align: center; }
.cta-box h3 { font-size: 1.08rem; margin-bottom: 8px; }
.cta-box p { font-size: .86rem; opacity: .88; margin-bottom: 16px; line-height: 1.6; }

/* ── Email bar ── */
.email-bar { display: flex; gap: 8px; }
.email-bar input { flex: 1; padding: 10px 12px; border: none; border-radius: 7px; font-size: .9rem; }
.email-bar button { background: var(--accent); color: #fff; border: none; border-radius: 7px; padding: 10px 16px; font-weight: 700; cursor: pointer; white-space: nowrap; font-size: .88rem; }
.email-bar button:hover { background: var(--accent-dark); }
@media (max-width: 480px) { .email-bar { flex-direction: column; } }

/* ── Related tools bar ── */
.tools-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 20px 0; }
.tools-bar a { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: .8rem; font-weight: 600; color: var(--primary); text-decoration: none; transition: border-color .13s, background .13s; }
.tools-bar a:hover { border-color: var(--primary); background: #eef1f8; text-decoration: none; }

/* ── Section label ── */
.section-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--primary); padding: 10px 0 6px; border-top: 1px solid var(--border); margin-top: 6px; }

/* ── Tip tooltip ── */
.tip { display: inline-block; width: 15px; height: 15px; background: var(--muted); color: #fff; border-radius: 50%; font-size: .67rem; font-weight: 700; text-align: center; line-height: 15px; cursor: help; margin-left: 4px; vertical-align: middle; }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.tab { padding: 9px 16px; font-size: .86rem; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--muted); transition: color .13s; white-space: nowrap; }
.tab.active { color: var(--primary); border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.green { color: var(--success); }
.red { color: var(--danger); }

/* ── Print ── */
@media print {
  .site-nav, .site-footer, .ad-unit, .btn, .no-print { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .wrapper { padding: 0; }
}
