/* =========================================================
   Best Finance Calculator — Article pages (/guides/…)
   ---------------------------------------------------------
   Loaded ONLY by individual article pages. Every rule is scoped
   under .article-body, so no existing page can be affected and
   the site's design and structure stay exactly as they were.
   Colours, radii, spacing and fonts all reuse existing tokens —
   this file introduces no new design language, only the prose
   typography that long-form articles need.
   ========================================================= */

/* Article pages use the SAME two-column grid as the rest of the site
   (main column + 315px sidebar). The grid comes from style.css —
   nothing is overridden here. */

/* ---------- Byline / meta stamp under the title ---------- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.article-stamp {
  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;
}
.article-stamp i { color: var(--blue); font-size: 11px; }

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

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

/* ---------- Prose ----------
   The global reset (* { margin: 0 } and ul { list-style: none }) strips
   paragraph spacing and list bullets, so long-form prose has to restore
   them. Scoped here, so nothing else on the site changes. */
.article-section { scroll-margin-top: 86px; }   /* clears the sticky header */
.article-section + .article-section { margin-top: 26px; }

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

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

/* ---------- Highlighted callout ---------- */
.article-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;
}
.article-callout i { color: var(--blue); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.article-callout p { font-size: 13px; line-height: 1.7; margin: 0; color: var(--gray-600); }

/* Amber variant for warnings / common mistakes. */
.article-callout.callout-warn { background: #fff8e8; border-color: #f2dfae; border-left-color: #e0a80f; }
.article-callout.callout-warn i { color: #c88a05; }

/* Green variant for key takeaways. */
.article-callout.callout-tip { background: #edf9f3; border-color: #cfead9; border-left-color: var(--lime); }
.article-callout.callout-tip i { color: var(--lime-dark); }

/* ---------- Worked example / comparison table ---------- */
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 14px;
  font-size: 13px;
}
.article-table th,
.article-table td {
  border: 1px solid var(--gray-200);
  padding: 9px 11px;
  text-align: left;
  line-height: 1.6;
  vertical-align: top;
}
.article-table th {
  background: var(--gray-50);
  color: var(--navy);
  font-weight: 600;
}
.article-table td { color: var(--gray-600); }
/* Tables are the one element that cannot reflow on a narrow phone, so
   let the container scroll rather than forcing a horizontal page scroll. */
.article-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Key-takeaways list ---------- */
.article-takeaways {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 15px 17px;
}
.article-takeaways ul { list-style: none; padding-left: 0; margin: 0; }
.article-takeaways li {
  display: flex;
  gap: 9px;
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 8px;
}
.article-takeaways li:last-child { margin-bottom: 0; }
.article-takeaways li i { color: var(--lime); font-size: 12px; margin-top: 4px; flex-shrink: 0; }

/* ---------- Inline call-to-action to a calculator ---------- */
.article-cta {
  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;
  margin: 16px 0;
}
.article-cta h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.article-cta p { font-size: 13px; color: var(--gray-600); margin: 0; }
.article-cta .article-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  /* An <a> inherits the body's 1.58 line-height, which would make this
     taller than the site's other buttons. */
  line-height: normal;
  border-radius: 8px;
  padding: 10px 18px;
  flex-shrink: 0;
}
.article-cta .article-cta-btn:hover { background: var(--blue-dark); }

/* ---------- "Read next" cards at the end ---------- */
.article-more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
@media (max-width: 760px) { .article-more { grid-template-columns: 1fr; } }

.article-more-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 9px;
  padding: 13px 14px;
  transition: border-color 0.2s, background 0.2s;
}
.article-more-card:hover { background: #fff; border-color: var(--blue); }
.article-more-card .am-ico {
  width: 33px;
  height: 33px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}
.article-more-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
  line-height: 1.4;
}
.article-more-card span span {
  display: block;
  font-size: 11.5px;
  color: var(--gray-500);
  line-height: 1.55;
}

/* ---------- Mid-article 728x90 slot ----------
   The second leaderboard sits INSIDE the prose .content-card, between two
   .article-section blocks. Those sections are spaced by
   `.article-section + .article-section { margin-top: 26px }`, but that
   adjacent-sibling rule no longer matches once an ad element separates
   them — so the ad supplies the breathing room itself, and a hairline
   rule above it makes clear the advert is not part of the article text.
   Scoped to .article-body, so no other page is affected. */
.mid-article-ad {
  margin: 28px 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}
