/* ===================================================
   FinCalcs — Shared Stylesheet
   =================================================== */

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

:root {
  --navy:        #0f2137;
  --teal:        #1a7f74;
  --teal-light:  #e8f5f3;
  --teal-mid:    #c2e8e3;
  --gold:        #c9963a;
  --gold-light:  #fff8ec;
  --gold-border: #f0d9a8;
  --text:        #1e2a35;
  --muted:       #5a6a78;
  --border:      #dce4ea;
  --bg:          #f7f9fb;
  --white:       #ffffff;
  --radius:      12px;
  --shadow:      0 2px 16px rgba(15,33,55,0.07);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  background: var(--navy);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--gold); }
.nav-tagline {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  display: none;
}
@media (min-width: 600px) { .nav-tagline { display: block; } }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 20px 0 0;
}
.breadcrumb a { color: var(--teal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── LAYOUT ── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ── HERO ── */
.hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.hero h1 {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero h1 em { font-style: italic; color: var(--teal); }
.hero p { color: var(--muted); font-size: 1rem; max-width: 560px; }

/* ── INTRO CONTENT BLOCK ── */
.intro-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.intro-content h2 {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.intro-content p { color: var(--muted); font-size: 0.95rem; line-height: 1.75; }

/* ── CALCULATOR CARD ── */
.calc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}
.calc-header { background: var(--navy); padding: 20px 28px; }
.calc-header h2 {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 600;
}
.calc-body { padding: 28px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field input, .field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}

.calc-btn {
  width: 100%;
  padding: 14px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.calc-btn:hover { background: #157066; }
.calc-btn:active { transform: scale(0.99); }

/* ── RESULTS ── */
.results {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.results-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) { .results-grid { grid-template-columns: 1fr; } }

.result-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}
.result-item.highlight {
  background: var(--teal-light);
  border-color: var(--teal);
}
.result-item.full-width { grid-column: span 2; }
.result-item .r-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.result-item .r-value {
  font-family: 'Lora', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
}
.result-item.highlight .r-value { color: var(--teal); }

/* ── CONTENT SECTIONS ── */
.content-section { margin-bottom: 40px; }
.content-section h2 {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--teal-light);
}
.content-section h3 {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 22px 0 8px;
}
.content-section p { color: var(--muted); margin-bottom: 14px; font-size: 0.97rem; }
.content-section strong { color: var(--text); }

/* ── EXAMPLE BOX ── */
.example-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 20px 0;
}
.example-box .ex-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}
.example-box p { color: rgba(255,255,255,0.82); font-size: 0.95rem; margin-bottom: 0; }
.example-box strong { color: var(--white); }

/* ── TIPS LIST ── */
.tips-list { list-style: none; padding: 0; margin: 0 0 14px; }
.tips-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
  color: var(--muted);
}
.tips-list li:last-child { border-bottom: none; }
.tips-list li::before { content: '→'; color: var(--teal); font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.tips-list li strong { color: var(--text); }

/* ── NOTE BOX ── */
.note-box {
  background: var(--gold-light);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
  font-size: 0.93rem;
  color: #6b5020;
}
.note-box strong { color: #4a3510; }

/* ── RELATED CALCULATORS ── */
.related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related h3 {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 480px) { .related-grid { grid-column: 1fr; } }

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.related-card:hover { border-color: var(--teal); box-shadow: 0 2px 10px rgba(26,127,116,0.1); }
.related-card .rc-icon { font-size: 1.4rem; flex-shrink: 0; }
.related-card .rc-text { font-size: 0.88rem; color: var(--text); font-weight: 500; }
.related-card .rc-sub { font-size: 0.78rem; color: var(--muted); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 28px 24px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer a { color: var(--teal); text-decoration: none; }
footer a:hover { text-decoration: underline; }
