/*
 * Blueprint To Progress — Cash Flow article page-specific CSS
 * Global BTP stylesheet remains authoritative for site header, footer,
 * global typography variables, background, navigation and back-to-top.
 * This file is intentionally scoped to the article.
 */

.btp-cash-flow-page {
  --btp-article-max-width: 1180px;
  --btp-article-mobile-gutter: 16px;
  --btp-article-tablet-gutter: 46px;
  --btp-h1-size-desktop: 56px;
  --btp-h1-size-tablet: 36px;
  --btp-h1-size-mobile: 38px;
  --btp-h2-size-desktop: 38px;
  --btp-h2-size-tablet: 32px;
  --btp-h2-size-mobile: 30px;
  --btp-h3-size-desktop: 30px;
  --btp-h3-size-tablet: 27px;
  --btp-h3-size-mobile: 24px;
  --btp-body-size-desktop: 18px;
  --btp-body-size-tablet: 17px;
  --btp-body-size-mobile: 17px;
  --btp-body-line-height: 1.55;
  --btp-mobile-line-height: 1.6;
  --btp-blue: #2563eb;
  --btp-light-blue: #e8f3ff;
  --btp-heading: #111827;
  --btp-text: #334155;
  --btp-border: #d7dce2;
  --btp-white: #ffffff;
}

/* Master article container: 1180px desktop / 46px tablet / 16px mobile */
.btp-cash-flow-page .article-container {
  width: 100%;
  max-width: var(--btp-article-max-width);
  margin-left: auto;
  margin-right: auto;
}

/* Approximately 40px of breathing room above the eyebrow pill */
.btp-cash-flow-page .article-header {
  padding-top: 40px;
}

.btp-cash-flow-page .article-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--btp-light-blue);
  color: var(--btp-blue);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btp-cash-flow-page h1 {
  margin: 0 0 28px;
  font-size: var(--btp-h1-size-desktop);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -1.5px;
}

.btp-cash-flow-page .lead {
  margin: 0 0 30px;
  font-size: 20px;
  line-height: 1.55;
}

.btp-cash-flow-page p,
.btp-cash-flow-page li {
  font-size: var(--btp-body-size-desktop);
  line-height: var(--btp-body-line-height);
}

.btp-cash-flow-page p {
  margin: 0 0 24px;
}

.btp-cash-flow-page h2 {
  margin-top: 56px;
  margin-bottom: 12px;
  font-size: var(--btp-h2-size-desktop);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.btp-cash-flow-page h3 {
  margin-top: 32px;
  margin-bottom: 4px;
  font-size: var(--btp-h3-size-desktop);
  line-height: 1.2;
  font-weight: 700;
}

.btp-cash-flow-page ul,
.btp-cash-flow-page ol {
  margin-top: 0;
  margin-bottom: 24px;
  padding-left: 32px;
}

.btp-cash-flow-page li {
  margin-bottom: 4px;
}

.btp-cash-flow-page a {
  color: inherit;
  text-decoration: none;
}

.btp-cash-flow-page a:hover {
  text-decoration: underline;
}

/* Images follow the article container */
.btp-cash-flow-page figure {
  margin: 0;
}

.btp-cash-flow-page .article-hero {
  margin: 0 0 30px;
}

.btp-cash-flow-page .article-image {
  margin: 32px 0 8px;
}

.btp-cash-flow-page img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* Standardized IN THIS GUIDE box */
.btp-cash-flow-page .article-toc {
  margin: 0 0 30px;
  padding: 24px 28px;
  border: 1px solid var(--btp-border);
  border-radius: 14px;
  background: var(--btp-white);
}

.btp-cash-flow-page .article-toc h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.btp-cash-flow-page .article-toc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
  row-gap: 2px;
  margin: 0;
  padding-left: 20px;
}

.btp-cash-flow-page .article-toc-list li {
  margin: 0;
  padding-left: 2px;
}

.btp-cash-flow-page .article-toc a {
  color: var(--btp-blue);
  font-size: 17px;
  line-height: 1.6;
}

/* Formula emphasis */
.btp-cash-flow-page .cash-flow-formula {
  margin: 20px 0 28px;
  padding: 18px 22px;
  border-left: 4px solid var(--btp-blue);
  border-radius: 0 10px 10px 0;
  background: var(--btp-light-blue);
}

/* Responsive table wrapper; horizontal scroll on mobile */
.btp-cash-flow-page .article-table-wrap {
  width: 100%;
  margin: 20px 0 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--btp-white);
  border: 1px solid var(--btp-border);
  border-radius: 12px;
}

.btp-cash-flow-page .article-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--btp-white);
}

.btp-cash-flow-page .article-table th,
.btp-cash-flow-page .article-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--btp-border);
  text-align: left;
  vertical-align: top;
}

.btp-cash-flow-page .article-table th {
  color: var(--btp-white);
  background: var(--btp-blue);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
}

.btp-cash-flow-page .article-table td {
  font-size: 17px;
  line-height: 1.5;
}

.btp-cash-flow-page .article-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Resources */
.btp-cash-flow-page .article-resources {
  margin-top: 56px;
}

/* CTA — blue button with white text */
.btp-cash-flow-page .article-cta {
  margin: 56px 0 40px;
  padding: 30px 32px 34px;
  border: 1px solid #b9ddff;
  border-radius: 14px;
  background: var(--btp-light-blue);
  text-align: center;
}

.btp-cash-flow-page .article-cta h2 {
  margin-top: 0;
}

.btp-cash-flow-page .article-cta p {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.btp-cash-flow-page .btp-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--btp-blue);
  color: #ffffff !important;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none !important;
}

.btp-cash-flow-page .btp-cta-button:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Tablet: 46px gutters */
@media (min-width: 768px) and (max-width: 1023px) {
  .btp-cash-flow-page .article-container {
    width: calc(100% - 92px);
    max-width: 1180px;
  }

  .btp-cash-flow-page .article-header {
    padding-top: 40px;
  }

  .btp-cash-flow-page h1 {
    font-size: var(--btp-h1-size-tablet);
    line-height: 1.08;
    letter-spacing: -0.8px;
  }

  .btp-cash-flow-page .lead {
    font-size: 20px;
    line-height: 1.55;
  }

  .btp-cash-flow-page p,
  .btp-cash-flow-page li {
    font-size: var(--btp-body-size-tablet);
    line-height: 1.6;
  }

  .btp-cash-flow-page h2 {
    margin-top: 48px;
    margin-bottom: 10px;
    font-size: var(--btp-h2-size-tablet);
    line-height: 1.15;
    letter-spacing: -0.5px;
  }

  .btp-cash-flow-page h3 {
    margin-top: 28px;
    font-size: var(--btp-h3-size-tablet);
    line-height: 1.2;
  }
}

/* Mobile: 16px gutters and one-column TOC */
@media (max-width: 767px) {
  .btp-cash-flow-page .article-container {
    width: calc(100% - 32px);
  }

  .btp-cash-flow-page .article-header {
    padding-top: 40px;
  }

  .btp-cash-flow-page .article-category {
    margin-bottom: 14px;
    padding: 6px 11px;
    font-size: 12px;
  }

  .btp-cash-flow-page h1 {
    font-size: var(--btp-h1-size-mobile);
    line-height: 1.08;
    letter-spacing: -0.7px;
  }

  .btp-cash-flow-page .lead {
    margin-bottom: 26px;
    font-size: 18px;
    line-height: 1.6;
  }

  .btp-cash-flow-page p,
  .btp-cash-flow-page li {
    font-size: var(--btp-body-size-mobile);
    line-height: var(--btp-mobile-line-height);
  }

  .btp-cash-flow-page p {
    margin-bottom: 22px;
  }

  .btp-cash-flow-page h2 {
    margin-top: 44px;
    margin-bottom: 10px;
    font-size: var(--btp-h2-size-mobile);
    line-height: 1.15;
    letter-spacing: -0.4px;
  }

  .btp-cash-flow-page h3 {
    margin-top: 28px;
    margin-bottom: 4px;
    font-size: var(--btp-h3-size-mobile);
    line-height: 1.2;
  }

  .btp-cash-flow-page ul,
  .btp-cash-flow-page ol {
    padding-left: 28px;
  }

  .btp-cash-flow-page .article-toc {
    padding: 22px 20px;
  }

  .btp-cash-flow-page .article-toc-list {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .btp-cash-flow-page .article-toc a {
    font-size: 16px;
  }

  .btp-cash-flow-page .article-table-wrap {
    border-radius: 10px;
  }

  .btp-cash-flow-page .article-table {
    min-width: 620px;
  }

  .btp-cash-flow-page .article-table th,
  .btp-cash-flow-page .article-table td {
    padding: 12px 14px;
  }

  .btp-cash-flow-page .article-table td {
    font-size: 16px;
  }

  .btp-cash-flow-page .article-cta {
    margin-top: 44px;
    padding: 26px 20px 34px;
  }

  .btp-cash-flow-page .article-cta p {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .btp-cash-flow-page .article-cta p:nth-of-type(2) {
    padding-bottom: 8px;
  }

  .btp-cash-flow-page .btp-cta-button {
    width: 100%;
    box-sizing: border-box;
  }


  /* Mobile CTA safe area for the fixed back-to-top control */
  .btp-cash-flow-page .article-cta {
    padding-bottom: 72px;
  }

  .btp-cash-flow-page .article-cta p {
    max-width: 285px;
  }

  .btp-cash-flow-page .article-cta p:last-of-type {
    padding-right: 44px;
  }
}

/* Standard BTP image captions */
.btp-cash-flow-page .article-image figcaption,
.btp-cash-flow-page .article-hero figcaption {
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  margin-top: 10px;
}
