/* Simple Calculator Tools — rebuild stylesheet.
   Written fresh for the rebuild. Brand colors match the original site;
   structure and rules do not — no inherited override chains. */

:root {
  --navy: #10213f;
  --blue: #2463eb;
  --green: #20b486;
  --border: #dbe3ee;
  --bg: #f4f7fb;
  --text: #334155;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 22px; height: 22px; }
.brand-mark i { display: block; border-radius: 3px; }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(4) { background: var(--blue); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--green); }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-size: .92rem; font-weight: 600; color: var(--navy); }
.nav-links a:hover { color: var(--blue); }
.menu-btn { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* ---------- Hero / breadcrumb ---------- */
.page-hero { padding: 32px 0 22px; background: #f5f8fd; }
.breadcrumb { font-size: .85rem; margin-bottom: 10px; }
.breadcrumb a { color: var(--blue); font-weight: 600; }
.breadcrumb span { color: #8a96a8; }
.page-hero h1 { font-size: 2.6rem; margin: 4px 0 10px; color: var(--navy); }
.page-hero p { color: #5b6b82; max-width: 700px; margin: 0; }

/* ---------- 3-column calculator layout: 250 / 600 / 250 ---------- */
.calculator-section-template { padding: 28px 0 50px; }
.calculator-layout-template {
  display: grid;
  grid-template-columns: 250px 600px 250px;
  gap: 24px;
  align-items: start;
  justify-content: center;
}
.template-sidebar-stack { display: flex; flex-direction: column; gap: 16px; }
.template-side-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(16,33,63,.05);
}
.template-side-card h3 { margin: 0 0 12px; font-size: 1rem; color: var(--navy); }
.template-fact-grid { display: grid; gap: 8px; }
.template-fact { display: flex; justify-content: space-between; font-size: .88rem; }
.template-fact span { color: #8a96a8; }
.template-tip-list, .template-side-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.template-tip-list li { padding-left: 16px; position: relative; }
.template-tip-list li::before { content: "•"; position: absolute; left: 0; color: var(--blue); }
.template-side-list a { color: var(--blue); font-size: .88rem; font-weight: 600; }
.template-side-list a:hover { text-decoration: underline; }

.sponsored-card { background: #fffaf0; border: 1px solid #f5d99b; position: relative; }
.sponsored-tag { display: inline-block; font-size: .68rem; font-weight: 700; color: #a16207; background: #fef3c7; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.template-side-card .sponsored-tag { position: absolute; top: 10px; right: 12px; margin-bottom: 0; }
.sponsored-header { font-size: .95rem; margin-bottom: 8px; padding-right: 60px; }
.sponsored-card p { font-size: .85rem; color: #78716c; }
.btn.btn-sponsored { display: block; text-align: center; background: #d97706; color: #fff; border: none; margin-top: 10px; }
.btn.btn-sponsored:hover { background: #b45309; }
.sponsored-disclosure { font-size: .72rem; color: #a8a29e; margin-top: 10px; margin-bottom: 0; }
.sct-helpful-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 600; }
.sct-helpful-btn:hover { border-color: var(--blue); }
.sct-helpful-status { font-size: .82rem; color: var(--green); margin: 8px 0 0; min-height: 1em; }

/* ---------- Calculator card (light, per explicit preference) ---------- */
.template-calculator-main { display: flex; flex-direction: column; gap: 20px; }
.calc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(16,33,63,.06);
}
.calc-instructions { margin: 0 0 16px; color: #5b6b82; font-size: .92rem; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 20px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--border);
  font-size: .95rem; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,99,235,.12); }
.btn { padding: 11px 22px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; margin-right: 10px; font-weight: 600; }
.btn-primary { background: var(--blue); color: #fff; border: none; }
.btn-primary:hover { background: #1d54c9; }
.result-panel { margin-top: 22px; padding: 18px; background: var(--bg); border-radius: 10px; }
.result-panel h3 { margin: 0 0 6px; font-size: .85rem; color: #5b6b82; text-transform: uppercase; letter-spacing: .04em; }
.result-value { font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.mode-select { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mode-btn { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 600; font-size: .88rem; }
.mode-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Content cards ---------- */
.content-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.content-card h2 { color: var(--navy); font-size: 1.2rem; margin-top: 0; }
.content-card details { border-top: 1px solid var(--border); padding: 12px 0; }
.content-card summary { cursor: pointer; font-weight: 600; color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 40px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { color: #fff; font-size: .9rem; margin: 0 0 12px; }
.footer-grid a { display: block; color: #cbd5e1; font-size: .88rem; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { color: #8ea0bb; font-size: .85rem; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 28px; padding-top: 18px; border-top: 1px solid #23324d; font-size: .8rem; color: #8ea0bb; }

/* ---------- Listing pages (categories, all-calculators, category index) ---------- */
.listing-section { padding: 30px 0 60px; }
.listing-count { color: #5b6b82; font-size: .9rem; margin-bottom: 16px; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.listing-card {
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; transition: box-shadow .15s, border-color .15s;
}
.listing-card:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(16,33,63,.08); }
.listing-card strong { color: var(--navy); font-size: 1rem; }
.listing-card span { color: #5b6b82; font-size: .85rem; }
.category-card { display: block; }
.category-card > a { display: block; text-decoration: none; color: inherit; }
.subcat-links { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; }
.subcat-links a { font-size: .78rem; color: var(--blue); background: #eff4ff; padding: 3px 9px; border-radius: 12px; text-decoration: none; }
.subcat-links a:hover { background: var(--blue); color: #fff; }
.search-input {
  width: 100%; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 1rem; background: #fff;
}
.search-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,99,235,.12); }
@media (max-width: 1100px) {
  .calculator-layout-template { grid-template-columns: 220px 1fr; }
  .template-sidebar-right { grid-column: 2; grid-row: 2; }
}
@media (max-width: 760px) {
  .calculator-layout-template { grid-template-columns: 1fr; }
  .template-sidebar-right { grid-column: 1; grid-row: auto; }
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .page-hero h1 { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Homepage hero ---------- */
.home-hero { display: grid; grid-template-columns: 1fr 280px; gap: 32px; padding: 50px 0; align-items: start; }
.home-hero-main h1 { font-size: 2.6rem; color: var(--navy); margin: 0 0 14px; line-height: 1.15; }
.home-hero-main p { color: #5b6b82; margin: 0 0 22px; }
.home-search { display: flex; gap: 10px; }
.home-search .search-input { flex: 1; }
.home-hero-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.home-hero-panel h3 { margin: 0 0 12px; color: var(--navy); font-size: 1rem; }
.home-hero-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .88rem; color: #475569; }
@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; }
}

.home-banner { display: flex; align-items: center; gap: 20px; background: #fffaf0; border: 1px solid #f5d99b; border-radius: 12px; padding: 16px 22px; position: relative; margin-bottom: 10px; }
.home-banner .sponsored-tag { position: static; margin-right: 6px; }
.home-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.home-banner-text strong { color: var(--navy); font-size: .95rem; }
.home-banner-text span { color: #78716c; font-size: .85rem; }
.home-banner .btn-sponsored { white-space: nowrap; margin: 0; }
