/* =========================================================
   Best Finance Calculator — Legal pages (Privacy / Terms / Disclaimer)
   ---------------------------------------------------------
   Loaded ONLY by the three legal pages. Every rule is scoped
   under .legal-body, so no existing page can be affected and
   the site's design and structure stay exactly as they were.
   Colours, radii and fonts all reuse the existing variables.
   ========================================================= */

/* Legal pages use the SAME two-column grid as the rest of the site
   (main column + 315px sidebar), so the layout matches the homepage and
   the sidebar ad slots sit exactly where visitors expect them.
   The grid itself comes from style.css — nothing is overridden here. */

/* ---------- Last-updated stamp ---------- */
.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 12px;
}
.legal-updated i { color: var(--blue); font-size: 11px; }

/* ---------- Table of contents ---------- */
.legal-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 16px;
  margin-top: 4px;
}
@media (max-width: 620px) { .legal-toc { grid-template-columns: 1fr; } }

.legal-toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--blue);
  padding: 5px 0;
  line-height: 1.45;
}
.legal-toc a:hover { text-decoration: underline; }
.legal-toc a i { font-size: 10px; color: var(--gray-400); flex-shrink: 0; }

/* ---------- Prose inside a .content-card ---------- */
/* The global reset removes list bullets and paragraph spacing, so the
   legal prose restores just what it needs — scoped, so nothing else
   on the site changes. */
.legal-section { scroll-margin-top: 86px; }   /* clears the sticky header */
.legal-section + .legal-section { margin-top: 26px; }

.legal-section h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 9px;
}
.legal-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 16px 0 6px;
}
.legal-section p {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 11px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--blue); font-weight: 500; }
.legal-section a:hover { text-decoration: underline; }
.legal-section strong { color: var(--gray-700); font-weight: 600; }

.legal-section ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 12px;
}
.legal-section ul li {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-section ul li::marker { color: var(--gray-400); }

/* ---------- Highlighted callout ---------- */
.legal-callout {
  display: flex;
  gap: 11px;
  background: #eaf4fd;
  border: 1px solid #d3e7f7;
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 13px 15px;
  margin: 14px 0;
}
.legal-callout i { color: var(--blue); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.legal-callout p { font-size: 13px; line-height: 1.7; margin: 0; color: var(--gray-600); }

/* Amber variant for the strongest warnings on the Disclaimer page. */
.legal-callout.callout-warn { background: #fff8e8; border-color: #f2dfae; border-left-color: #e0a80f; }
.legal-callout.callout-warn i { color: #c88a05; }

/* ---------- Definition-style rows (data table) ---------- */
.legal-rows { display: grid; gap: 9px; margin-bottom: 12px; }
.legal-row {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 11px 13px;
}
@media (max-width: 620px) { .legal-row { grid-template-columns: 1fr; gap: 3px; } }
.legal-row dt { font-size: 13px; font-weight: 600; color: var(--navy); }
.legal-row dd { font-size: 13px; color: var(--gray-600); line-height: 1.65; margin: 0; }

/* ---------- Contact strip at the end of each page ---------- */
.legal-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px 18px;
}
.legal-contact h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.legal-contact p { font-size: 13px; color: var(--gray-600); margin: 0; }
.legal-contact .legal-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: normal;
  border-radius: 8px;
  padding: 10px 18px;
  flex-shrink: 0;
}
.legal-contact .legal-contact-btn:hover { background: var(--blue-dark); }

/* ---------- Cross-links between the three legal pages ---------- */
.legal-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
@media (max-width: 700px) { .legal-more { grid-template-columns: 1fr; } }

.legal-more-card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 9px;
  padding: 13px;
}
.legal-more-card:hover { border-color: #c5d6e8; background: var(--gray-50); }
.legal-more-card .lm-ico {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.legal-more-card strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.legal-more-card span { font-size: 12px; color: var(--gray-500); line-height: 1.5; }
