/* ==========================================================================
   RIZE MORTGAGE - BLOG POST TEMPLATE
   Brand colors: #241C4F (Navy) · #F36C37 (Orange) · #FFBA00 (Gold) · #E8E0DC (Sand)
   ========================================================================== */

/* -- Reading Progress -------------------------------------------------- */
.readbar {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h, 76px);
  z-index: 99;
  height: 3px;
  pointer-events: none;
}
.readbar i {
  display: block;
  height: 100%;
  background: #F36C37;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
}

/* -- Article Header ---------------------------------------------------- */
.bp-head {
  position: relative;
  padding: 44px 0 0;
  background: linear-gradient(180deg, #F3EFEC 0%, #F3EFEC 62%, #fff 62%);
}
.bp-head-in {
  max-width: none;
}
.bp-head h1, .bp-meta {
  max-width: 1000px;
}
.bp-head .crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(36, 28, 79, 0.6);
  padding: 0;
  margin: 0;
  list-style: none;
}
.bp-head .crumbs a {
  color: #241C4F;
  text-decoration: none;
  transition: color 0.2s;
}
.bp-head .crumbs a:hover {
  color: #F36C37;
}
.bp-head .crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: rgba(36, 28, 79, 0.3);
}
.bp-head .crumbs [aria-current] {
  color: rgba(36, 28, 79, 0.7);
  font-weight: 500;
}
.bp-cat {
  display: inline-block;
  margin-top: 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F36C37;
  text-decoration: none;
}
.bp-cat:hover {
  color: #DE5620;
}
.bp-head h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #241C4F;
  text-wrap: balance;
}
.bp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  font-size: 14.5px;
  color: rgba(36, 28, 79, 0.7);
}
.bp-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bp-meta svg {
  width: 16px;
  height: 16px;
  color: #F36C37;
  display: inline-block;
  vertical-align: middle;
}
.bp-by {
  font-weight: 600;
  color: #241C4F;
}
.bp-hero {
  margin: 36px 0 0;
  aspect-ratio: 21/9;
  max-height: 520px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #E8E0DC;
}
.bp-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bp-hero.img-off img {
  visibility: hidden;
}

/* -- Grid Layout ------------------------------------------------------- */
.bp-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 360px;
  gap: clamp(28px, 3.4vw, 56px);
  align-items: start;
  padding-top: 56px;
  padding-bottom: clamp(60px, 7vw, 100px);
}

/* -- Table of Contents & Share ----------------------------------------- */
.toc {
  position: sticky;
  top: calc(var(--header-h, 76px) + 28px);
}
.toc details {
  border: 0;
}
.toc summary {
  list-style: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(36, 28, 79, 0.55);
  cursor: default;
  pointer-events: none;
}
.toc summary::-webkit-details-marker {
  display: none;
}
.toc ol {
  margin-top: 14px;
  border-left: 2px solid rgba(36, 28, 79, 0.1);
  list-style: none;
  padding: 0;
}
.toc li a {
  display: block;
  margin-left: -2px;
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(36, 28, 79, 0.72);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.toc li a:hover {
  color: #241C4F;
}
.toc li a.on {
  border-left-color: #F36C37;
  color: #241C4F;
  font-weight: 600;
}
.share {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(36, 28, 79, 0.1);
}
.share span {
  margin-right: 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(36, 28, 79, 0.55);
}
.sh {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(36, 28, 79, 0.16);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #241C4F;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
  padding: 0;
}
.sh svg {
  width: 15px;
  height: 15px;
  display: block;
}
.sh:hover, .sh.ok {
  background: #F36C37;
  border-color: #F36C37;
  color: #fff;
}

/* -- Prose Article Content --------------------------------------------- */
.prose {
  min-width: 0;
  max-width: 760px;
  font-size: 17.5px;
  line-height: 1.75;
  color: #3E3762;
}
.prose > * + * {
  margin-top: 20px;
}
.prose p {
  margin-top: 18px;
  margin-bottom: 0;
}
.prose h2 {
  margin-top: 56px;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: #241C4F;
  scroll-margin-top: 110px;
}
.prose h3 {
  margin-top: 36px;
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #241C4F;
  scroll-margin-top: 110px;
}
.prose h2 + p, .prose h3 + p {
  margin-top: 14px;
}
.prose .lede {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.65;
  color: #241C4F;
}
.prose b, .prose strong {
  font-weight: 600;
  color: #241C4F;
}
.prose a.ulink, .prose a:not(.btn):not(.tlink):not(.sh) {
  font-weight: 600;
  color: #241C4F;
  text-decoration: underline;
  text-decoration-color: #F36C37;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.prose a:hover {
  text-decoration-color: #241C4F;
}
.prose ul, .prose ol {
  padding-left: 0;
  margin: 18px 0;
}
.prose ul li {
  position: relative;
  padding-left: 26px;
  list-style: none;
}
.prose ul li + li, .prose ol li + li {
  margin-top: 10px;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #F36C37;
}
.prose ol:not(.steps) {
  padding-left: 20px;
}
.prose ol.steps {
  counter-reset: st;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(36, 28, 79, 0.1);
  list-style: none;
  padding-left: 0;
}
.prose ol.steps li {
  counter-increment: st;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid rgba(36, 28, 79, 0.1);
}
.prose ol.steps li::before {
  content: counter(st, decimal-leading-zero);
  font-size: 14px;
  font-weight: 600;
  color: #F36C37;
  padding-top: 3px;
}
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 24px 0;
}

/* Tables inside prose */
.prose .tbl, .prose table {
  margin-top: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(36, 28, 79, 0.12);
  border-radius: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose .tbl table {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.tbl table, .prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.5;
}
.tbl th, .tbl td, .prose table th, .prose table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
}
.tbl thead th, .prose table thead th {
  background: #241C4F;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tbl tbody tr + tr > *, .prose table tbody tr + tr > * {
  border-top: 1px solid rgba(36, 28, 79, 0.08);
}
.tbl tbody tr:nth-child(even), .prose table tbody tr:nth-child(even) {
  background: rgba(232, 224, 220, 0.25);
}
.tbl tbody th, .prose table tbody th {
  font-weight: 600;
  color: #241C4F;
  white-space: nowrap;
}
.tbl td, .prose table td {
  font-variant-numeric: tabular-nums;
  color: #241C4F;
}
.tbl .note {
  display: block;
  font-size: 13px;
  color: rgba(36, 28, 79, 0.6);
}

/* Key facts component */
.keyfacts {
  margin-top: 32px;
  padding: 24px 26px;
  border-radius: 20px;
  background: #241C4F;
  color: #fff;
}
.keyfacts h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFBA00;
}
.keyfacts dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  margin-bottom: 0;
  padding: 0;
}
.keyfacts dl > div {
  padding: 4px 18px;
}
.keyfacts dl > div:first-child {
  padding-left: 0;
}
.keyfacts dl > div + div {
  border-left: 1px solid rgba(232, 224, 220, 0.16);
}
.keyfacts dt {
  font-size: 12.5px;
  color: rgba(232, 224, 220, 0.7);
}
.keyfacts dd {
  margin: 4px 0 2px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.keyfacts small {
  font-size: 12.5px;
  color: rgba(232, 224, 220, 0.65);
}

/* Worked example callout */
.example {
  position: relative;
  padding: 20px 22px 20px 24px;
  border-radius: 14px;
  background: rgba(255, 186, 0, 0.12);
  border-left: 4px solid #FFBA00;
  margin: 24px 0;
}
.example .ex-k {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #241C4F;
}
.example p {
  margin-top: 6px;
  font-size: 16.5px;
  line-height: 1.65;
  color: #241C4F;
}

/* Inline CTA (both .incta and legacy .cta-box) */
.incta, .cta-box {
  margin-top: 36px !important;
  margin-bottom: 24px;
  padding: 26px 28px;
  border-radius: 20px;
  background: radial-gradient(80% 120% at 100% 0%, rgba(243, 108, 55, 0.24), transparent 60%), #241C4F;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}
.incta p, .cta-box p, .cta-box .cta-btn-text {
  max-width: 420px;
  margin: 0;
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
}
.incta-b, .cta-box .cta-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.incta .tlink, .cta-box .cta-link {
  color: #FFBA00;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  cursor: pointer;
}
.incta .tlink svg, .cta-box .cta-link svg {
  width: 10px;
  height: 10px;
  transition: transform 0.25s ease;
}
.incta .tlink:hover svg, .cta-box .cta-link:hover svg {
  transform: translateX(3px);
}
.cta-box .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  border-radius: 12px;
  background: #F36C37;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-box .cta-btn:hover {
  background: #DE5620;
}

/* FAQ & Disclaimer */
.bp-faq {
  margin-top: 56px;
}
.bp-faq h2 {
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #241C4F;
  margin-bottom: 18px;
}
.bp-faq .faq-list {
  margin-top: 18px;
}
.bp-disc {
  margin-top: 36px !important;
  padding-top: 20px;
  border-top: 1px solid rgba(36, 28, 79, 0.1);
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(36, 28, 79, 0.6);
}

/* -- Sidebar Lead Form ------------------------------------------------- */
.bp-side {
  position: sticky;
  top: calc(var(--header-h, 76px) + 24px);
}
.bp-side .lead-card {
  overflow: visible;
}
.lead-card {
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(36, 28, 79, 0.1);
  box-shadow: 0 30px 60px -44px rgba(36, 28, 79, 0.55);
}
.lead-card h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: #241C4F;
  margin: 0;
}
.lc-sub {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body, #4A436E);
}
.lf {
  margin-top: 14px;
}
.lf label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #241C4F;
}
.req {
  color: #F36C37;
}
.lf input, .lf textarea {
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(36, 28, 79, 0.18);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: #241C4F;
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lf input {
  height: 46px;
}
.lf textarea {
  padding: 10px 14px;
  resize: vertical;
  min-height: 64px;
}
.lf input::placeholder, .lf textarea::placeholder {
  color: rgba(36, 28, 79, 0.45);
}
.lf input:focus, .lf textarea:focus {
  border-color: #F36C37;
  box-shadow: 0 0 0 3px rgba(243, 108, 55, 0.16);
}
.lf.bad input {
  border-color: #F36C37;
}
.cf-err {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: #F36C37;
}
.cf-err:empty {
  display: none;
}
.cf-chk {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--body, #4A436E);
  cursor: pointer;
}
.cf-chk input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.cf-chk .box {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid rgba(36, 28, 79, 0.3);
  display: grid;
  place-items: center;
  background: #fff;
  transition: background 0.2s, border-color 0.2s;
}
.cf-chk .box svg {
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0;
}
.cf-chk input:checked + .box {
  background: #F36C37;
  border-color: #F36C37;
}
.cf-chk input:checked + .box svg {
  opacity: 1;
}
.cf-chk input:focus-visible + .box {
  outline: 2px solid #F36C37;
  outline-offset: 2px;
}
.cf-chk b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #241C4F;
}
.lc-legal {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(36, 28, 79, 0.6);
}
.lc-legal a {
  font-weight: 600;
  color: #241C4F;
  text-decoration: underline;
  text-decoration-color: rgba(243, 108, 55, 0.5);
  text-underline-offset: 3px;
}
.lead-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}
.lc-done {
  padding: 8px 0;
  outline: 0;
}
.cd-ic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #F36C37;
  color: #fff;
  box-shadow: 0 0 0 8px rgba(243, 108, 55, 0.12);
}
.cd-ic svg {
  width: 24px;
  height: 24px;
}
.lc-done h2 {
  margin-top: 22px;
}
.lc-done p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body, #4A436E);
}
.lc-done a {
  font-weight: 600;
  color: #F36C37;
  text-decoration: none;
}

/* -- Read More Section ------------------------------------------------- */
.bp-more {
  background: rgba(232, 224, 220, 0.45);
  padding: clamp(60px, 7vw, 96px) 0;
}
.bm-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.bm-head .h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: #241C4F;
  margin: 0;
}

/* -- Responsive Rules -------------------------------------------------- */
@media (max-width: 1200px) {
  .bp-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .toc {
    grid-column: 1 / -1;
    position: relative;
    top: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .toc details {
    flex: 1;
    min-width: 260px;
    border: 1px solid rgba(36, 28, 79, 0.12);
    border-radius: 14px;
    background: #fff;
  }
  .toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    pointer-events: auto;
    cursor: pointer;
  }
  .toc summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #241C4F;
    border-bottom: 2px solid #241C4F;
    transform: rotate(45deg);
    transition: transform 0.2s;
  }
  .toc details[open] summary::after {
    transform: rotate(-135deg);
  }
  .toc ol {
    margin: 0 18px 14px;
  }
  .share {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    align-self: center;
  }
}

@media (max-width: 1024px) {
  .bp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .prose {
    max-width: none;
  }
  .bp-side {
    position: relative;
    top: auto;
    max-width: 560px;
  }
  .bp-side .lead-card {
    max-height: none;
    overflow: visible;
  }
  .bp-hero {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 640px) {
  .bp-head {
    padding-top: 28px;
  }
  .bp-hero {
    margin-top: 26px;
    border-radius: 16px;
  }
  .bp-grid {
    padding-top: 32px;
  }
  .prose {
    font-size: 16.5px;
  }
  .keyfacts dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 0;
  }
  .keyfacts dd {
    font-size: 19px;
  }
  .keyfacts dl > div {
    padding: 4px 12px;
  }
  .keyfacts dl > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .keyfacts dl > div:nth-child(3) {
    border-left: 0;
  }
  .incta, .cta-box {
    padding: 22px;
  }
  .incta-b .btn, .cta-box .cta-btn {
    width: 100%;
    justify-content: center;
  }
  .lead-card {
    padding: 22px;
  }
  .share {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .keyfacts dd {
    font-size: 17px;
  }
  .keyfacts {
    padding: 20px;
  }
}
