/* ============================================================
   USAFinCalc — fincalc.css
   Structural styles for "content page" templates (about, contact,
   terms, privacy, disclaimer, pricing, data-sources, blog, and
   similar prose/article pages). Loaded alongside design-system.css,
   which supplies the shared color tokens (--bg, --accent, etc.),
   base nav, and footer.
   ============================================================ */

/* ── Variable aliases ────────────────────────────────────────
   Some inner pages' inline <style> blocks reference an older
   color-token naming scheme (--blue, --red, --green, --text2,
   --text3, --cyan, --orange, --yellow, --bdim, --bglow) that was
   never defined alongside design-system.css's tokens. Alias them
   here so those pages render with sensible, on-brand colors
   instead of falling back to transparent/invalid values. */
:root {
  --blue: var(--accent);
  --cyan: var(--accent);
  --green: var(--accent);
  --red: #ff4d6d;
  --orange: #ff7043;
  --yellow: #ffd740;
  --text2: var(--muted);
  --text3: #62698099;
  --bdim: rgba(16,185,129,0.10);
  --bglow: rgba(16,185,129,0.22);
}

/* ── Base body styling ───────────────────────────────────────
   design-system.css never sets this on <body> itself — every
   calculator page happens to set it via its own inline <style>,
   but content pages (about/contact/terms/etc.) don't have one,
   so they were rendering on the browser's default WHITE
   background instead of the site's dark theme. This is the fix. */
html {
  background: var(--bg);
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Skip link ───────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 9999;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

/* ── Top announcement bar ───────────────────────────────────── */
.fc-topbar {
  background: linear-gradient(90deg, rgba(16,185,129,0.10), rgba(16,185,129,0.04));
  border-bottom: 1px solid rgba(16,185,129,0.16);
  padding: 9px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.fc-topbar strong { color: var(--accent); }
.fc-topbar-x {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: color .15s;
}
.fc-topbar-x:hover { color: var(--text); }

/* ── Mobile menu (fullscreen overlay) ───────────────────────── */
.fc-mm {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 500;
  padding: 80px 24px 24px;
  overflow-y: auto;
}
.fc-mm-x {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
  transition: color .15s;
}
.fc-mm-x:hover { color: var(--accent); }
.fc-mm a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 500;
  transition: color .15s;
}
.fc-mm a:hover { color: var(--accent); }
.fc-mm-sec {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 22px 0 8px;
}
.fc-mm-search {
  position: relative;
  margin-bottom: 8px;
}
.fc-mm-search input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 9px;
  padding: 10px 16px 10px 34px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.fc-si {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}
@media (min-width: 901px) {
  .fc-mm { display: none !important; }
}

/* ── Search results panel (desktop #sr, mobile #sr-m) ───────── */
#sr, #sr-m {
  max-width: var(--content-max, 980px);
  margin: 0 auto 24px;
  padding: 0 var(--content-pad, 24px);
  display: none;
}
.sr-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sr-lb { font-size: 13px; color: var(--muted); }
.sr-cl {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: opacity .15s;
}
.sr-cl:hover { opacity: .7; }
.sr-g {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.fc-breadcrumb {
  max-width: var(--content-max, 980px);
  margin: 0 auto;
  padding: 16px var(--content-pad, 24px) 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fc-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.fc-breadcrumb a:hover { color: var(--accent); }
.fc-breadcrumb-sep { color: var(--border3); }
.fc-breadcrumb-cur { color: var(--text); }

/* ── Page hero (icon + h1 + intro paragraph) ────────────────── */
.fc-page-hero {
  max-width: var(--content-max, 980px);
  margin: 0 auto;
  padding: 24px var(--content-pad, 24px) 8px;
  text-align: center;
}
.fc-page-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 14px;
}
.fc-page-hero p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto;
}
.fc-page-hero time { color: var(--text); }
.fc-page-hero a { color: var(--accent); text-decoration: none; }
.fc-page-hero a:hover { text-decoration: underline; }

/* ── Stat cards ──────────────────────────────────────────────── */
.fc-stat-g {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
@media (max-width: 540px) {
  .fc-stat-g { grid-template-columns: repeat(2, 1fr); }
}
.fc-stat-c {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r, 14px);
  padding: 18px;
  text-align: center;
  transition: border-color .2s;
}
.fc-stat-c:hover { border-color: var(--border2); }
.fc-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}
.fc-stat-lbl {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.fca {
  opacity: 0;
  transform: translateY(16px);
  animation: fcaFadeUp .5s ease forwards;
}
@keyframes fcaFadeUp { to { opacity: 1; transform: translateY(0); } }

/* ── Prose / article body ───────────────────────────────────── */
.fc-prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px var(--content-pad, 24px) 0;
}
.fc-prose h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--text);
}
.fc-prose h2:first-child { margin-top: 8px; }
.fc-prose h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--text);
}
.fc-prose p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
  line-height: 1.8;
}
.fc-prose ul, .fc-prose ol {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px 20px;
  line-height: 1.8;
}
.fc-prose li { margin-bottom: 8px; }
.fc-prose a { color: var(--accent); text-decoration: none; }
.fc-prose a:hover { text-decoration: underline; }
.fc-prose strong { color: var(--text); }

/* Callout / info box */
.fc-callout {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: var(--rs, 10px);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 18px 0;
}
.fc-callout strong { color: var(--text); }
.fc-callout a { color: var(--accent); text-decoration: none; }
.fc-callout a:hover { text-decoration: underline; }
.fc-callout ul { margin: 8px 0 0 20px; }

/* Warning box */
.fc-warn {
  background: rgba(255,193,7,0.06);
  border: 1px solid rgba(255,193,7,0.18);
  border-radius: var(--rs, 10px);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 18px 0;
}
.fc-warn strong { color: var(--text); }
.fc-warn a { color: var(--accent); text-decoration: none; }
.fc-warn a:hover { text-decoration: underline; }

/* Buttons */
.fc-btn-p {
  background: var(--accent);
  color: #06110c;
  border: none;
  border-radius: var(--rs, 8px);
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fc-btn-p:hover { background: #0da271; transform: translateY(-1px); }
.fc-btn-sm { padding: 9px 20px; font-size: 13px; }

/* ── FAQ list ────────────────────────────────────────────────── */
.fc-faq-list {
  max-width: var(--content-max, 980px);
  margin: 0 auto;
  padding: 0 var(--content-pad, 24px) 48px;
}
.fc-faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r, 14px);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.fc-faq-item h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.fc-faq-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}
.fc-faq-item a { color: var(--accent); text-decoration: none; }
.fc-faq-item a:hover { text-decoration: underline; }

/* ── Contact form ────────────────────────────────────────────── */
.fc-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .fc-form-row { grid-template-columns: 1fr; }
}
.fc-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.fc-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.fc-form-input,
.fc-form-select,
.fc-form-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--rs, 8px);
  color: var(--text);
  font-size: 14px;
  padding: 11px 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.fc-form-input:focus,
.fc-form-select:focus,
.fc-form-textarea:focus { border-color: var(--accent); }
.fc-form-input::placeholder,
.fc-form-textarea::placeholder { color: var(--muted); }
.fc-form-textarea { min-height: 120px; resize: vertical; }
.fc-form-select { appearance: none; cursor: pointer; }

/* Small extra typographic markers used on some pages */
.fc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.08);
  color: var(--accent);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.fc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
/* fc-seo-upgrade is a marker/modifier class combined with .fc-prose;
   no distinct visual treatment of its own is required. */
.fc-seo-upgrade { /* inherits .fc-prose styling; intentionally empty */ }

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
  .fc-page-hero { padding: 16px 16px 4px; }
  .fc-prose { padding-left: 16px; padding-right: 16px; }
  .fc-faq-list { padding-left: 16px; padding-right: 16px; }
  .fc-breadcrumb { padding-left: 16px; padding-right: 16px; }
}
