/* CalcVenture — shared stylesheet
   One stylesheet for the whole site. No external fonts or libraries. */

:root {
  --navy: #12324f;
  --navy-deep: #0c2237;
  --navy-soft: #eef2f7;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --ink: #1f2937;
  --muted: #4b5563;
  --faint: #6b7280;
  --line: #d1d5db;
  --line-soft: #e5e7eb;
  --bg-soft: #f3f4f6;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(18, 50, 79, 0.08);
  --shadow-md: 0 4px 14px rgba(18, 50, 79, 0.12);
  --shadow-lg: 0 10px 24px rgba(18, 50, 79, 0.14);
  --radius: 10px;
  --radius-lg: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--amber);
}

a:hover {
  color: var(--amber-dark);
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

main {
  padding-bottom: 32px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(12, 34, 55, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.site-logo:hover {
  color: var(--white);
  text-decoration: none;
}

.site-logo img {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
}

.site-nav a {
  color: var(--white);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--amber);
  color: var(--white);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner p {
  margin: 0 0 12px;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
  margin: 0 8px;
  white-space: nowrap;
}

.site-footer a:hover {
  text-decoration: underline;
  color: var(--white);
}

.site-footer nav {
  line-height: 2;
}

/* ---------- Hero & search ---------- */

.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, #1b4a73 100%);
  color: var(--white);
  padding: 48px 0 44px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fcd34d;
  border: 1px solid rgba(252, 211, 77, 0.5);
  border-radius: 999px;
}

.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto 20px;
  max-width: 640px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero .hero-badge {
  color: #fcd34d;
}

.search-box {
  width: 100%;
  max-width: 560px;
  padding: 13px 18px;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.search-box:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.35);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 22px auto 0;
  max-width: 640px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-stats strong {
  color: var(--white);
  font-size: 1.15rem;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--navy-soft);
  color: var(--navy);
  transition: background 0.18s ease, color 0.18s ease;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.card:hover .card-icon {
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.calc-category {
  margin-top: 36px;
}

.calc-category > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  margin-bottom: 16px;
  font-size: 1.45rem;
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--navy);
  color: var(--white);
}

.cat-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* ---------- Calculator ---------- */

.calculator {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.calculator > h2 {
  margin-top: 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}

/* ---------- Buttons ---------- */

.btn,
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--white);
  font-weight: 700;
  padding: 12px 26px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:focus-visible,
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.4);
}

/* ---------- Results ---------- */

.results {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.result-main {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span {
  color: var(--muted);
}

.result-row strong {
  text-align: right;
  color: var(--navy);
}

/* Visual split bar under the main result (two segments share one bar;
   the .single variant shows one fill segment on a grey track). */
.result-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line-soft);
  margin: 16px 0 8px;
}

.result-bar-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.result-bar .seg-a {
  background: var(--navy);
}

.result-bar .seg-b {
  background: var(--amber);
}

.result-bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.result-bar-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: baseline;
}

.dot-a {
  background: var(--navy);
}

.dot-b {
  background: var(--amber);
}

.dot-track {
  background: #cbd5e1;
}

/* ---------- Content ---------- */

.content h1 {
  color: var(--navy);
  line-height: 1.2;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

.content h2 {
  color: var(--navy);
  margin-top: 2rem;
  font-size: 1.5rem;
}

.content h3 {
  color: var(--navy);
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.content p {
  margin: 0 0 1rem;
}

.content ul {
  margin: 0 0 1rem;
  padding-left: 24px;
}

.content li {
  margin-bottom: 6px;
}

.formula-box {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--navy-soft);
  padding: 14px 18px;
  border-radius: 8px;
  margin-top: 16px;
  overflow-x: auto;
}

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item:hover {
  border-color: var(--amber);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--navy);
}

.faq-item p {
  margin: 10px 0 0;
}

/* ---------- Related ---------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.related a:hover {
  transform: translateY(-3px);
  border-color: var(--amber);
  box-shadow: var(--shadow-lg);
}

/* ---------- Ad placeholder ---------- */

.ad-slot {
  border: 1px dashed #9ca3af;
  background: #f9fafb;
  color: var(--faint);
  text-align: center;
  padding: 20px;
  margin: 24px 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}

/* ---------- Tables & code ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

th {
  background: var(--bg-soft);
  color: var(--navy);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 5px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero {
    padding: 36px 0 32px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 6px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    margin-left: 0;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
  }

  .card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .result-main {
    font-size: 1.6rem;
  }

  .calculator {
    padding: 18px;
  }

  .content h1 {
    font-size: 1.7rem;
  }
}

/* Intro paragraph under each calculator H1 */
.calc-intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* FAQ section spacing */
.faq {
  margin: 2rem 0;
}

/* Small note box inside calculators (e.g. rate disclaimers) */
.calc-note {
  font-size: 0.9rem;
  color: var(--muted);
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 14px;
}

/* ---------- Excel bundle CTA ---------- */

.excel-cta {
  background: var(--navy-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.excel-cta h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.35rem;
}

.excel-cta p {
  margin: 0 0 16px;
  color: var(--muted);
}

.btn-excel {
  background: var(--navy);
}

.btn-excel:hover {
  background: var(--navy-deep);
}

/* ---------- Audit quick wins (2026-11-20) ---------- */

/* Hide empty ad slots until AdSense approval. After approval, remove this
   rule, paste the ad code into the .ad-slot divs, and add a min-height to
   reserve space and avoid layout shift. */
.ad-slot {
  display: none;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--faint);
  margin: 18px 0 0;
}

.breadcrumbs a {
  color: var(--amber);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--amber-dark);
  text-decoration: underline;
}

.breadcrumbs .sep {
  margin: 0 6px;
  color: var(--line);
}

/* Footer calculator links */
.footer-calcs {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 2;
}

.footer-calcs a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 14px;
  white-space: nowrap;
}

.footer-calcs a:hover {
  color: var(--amber-dark);
  text-decoration: underline;
}
