/* ==========================================================================
   Guide article (New Design). Loaded after ui.css on the guide_new template.
   Frame sizes from Paper: rail 296, gap 104, article 720, page gutter 80.
   The article column holds each guide's stored HTML (App\Libraries\GuideArticle),
   so the plain tags are styled here as well as the components.
   ========================================================================== */

.mfs-guide__grid {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 640px) {
  .mfs-guide__grid { padding-inline: 32px; }
}
@media (min-width: 1024px) {
  .mfs-guide__grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 720px);
    column-gap: 40px;
    padding-inline: 40px;
  }
}
@media (min-width: 1280px) {
  .mfs-guide__grid {
    grid-template-columns: 296px minmax(0, 720px);
    column-gap: 104px;
    padding-inline: 80px;
  }
}

/* Hero ------------------------------------------------------------------- */
.mfs-guide__hero { padding-block: 32px 24px; }
@media (min-width: 1024px) {
  .mfs-guide__hero { padding-block: 80px 40px; }
  .mfs-guide__hero-copy { grid-column: 2; }
}
.mfs-guide__crumbs {
  display: flex;
  flex-wrap: wrap;
  column-gap: 8px;
  font-size: 15px;
  line-height: 23px;
  color: var(--mfs-body);
}
.mfs-ui .mfs-guide__crumbs a {
  font-weight: 600;
  color: var(--mfs-navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.mfs-guide__title {
  margin-top: 24px;
  font-family: var(--mfs-font-heading);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.005em;
  color: var(--mfs-navy);
}
@media (min-width: 1024px) {
  .mfs-guide__title { font-size: 60px; }
}
.mfs-guide__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 23px;
  color: var(--mfs-body);
}
.mfs-guide__avatar,
.mfs-guide__author-photo {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--mfs-navy);
}
.mfs-guide__avatar { width: 32px; height: 32px; margin-right: 4px; }
.mfs-guide__author-photo { width: 88px; height: 88px; }
.mfs-guide__avatar img,
.mfs-guide__author-photo img {
  display: block;
  width: 100%;
  height: 125%;
  object-fit: cover;
  object-position: 50% 15%;
  mix-blend-mode: lighten;
}
.mfs-guide__lead {
  margin-top: 20px;
  font-size: 17px;
  line-height: 28px;
  color: var(--mfs-body);
}
@media (min-width: 1024px) {
  .mfs-guide__lead { font-size: 19px; }
}

/* On this page ------------------------------------------------------------ */
.mfs-guide__toc-title,
.mfs-guide__toc-mobile summary {
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(0 47 106 / 0.7);
}
.mfs-guide__toc { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--mfs-line); }
.mfs-guide__toc li { border-top: 1px solid var(--mfs-line); }
.mfs-ui .mfs-guide__toc a {
  display: block;
  padding-block: 14px;
  font-size: 16px;
  line-height: 24px;
  color: var(--mfs-navy);
  text-decoration: none;
}
.mfs-ui .mfs-guide__toc a:hover { color: var(--mfs-action); }
.mfs-ui .mfs-guide__toc a.is-current { font-weight: 600; color: var(--mfs-action); }

.mfs-guide__toc-mobile { margin-top: 20px; }
.mfs-guide__toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding-inline: 16px;
  border: 1px solid var(--mfs-line);
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}
.mfs-guide__toc-mobile summary::-webkit-details-marker { display: none; }
.mfs-guide__toc-mobile summary .mfs-icon { color: var(--mfs-navy); transition: transform 0.2s var(--mfs-ease); }
.mfs-guide__toc-mobile[open] summary .mfs-icon { transform: rotate(180deg); }
@media (min-width: 1024px) {
  .mfs-guide__toc-mobile { display: none; }
}

/* Body layout ------------------------------------------------------------- */
.mfs-guide__body { padding-block: 24px 56px; }
@media (min-width: 1024px) {
  .mfs-guide__body { padding-block: 40px 96px; }
}
.mfs-guide__rail { display: none; }
@media (min-width: 1024px) {
  .mfs-guide__rail { display: flex; flex-direction: column; min-width: 0; }
}
.mfs-guide__rail-toc .mfs-guide__toc { margin-top: 16px; }

.mfs-guide__article { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
@media (min-width: 1024px) {
  .mfs-guide__article { gap: 56px; }
}

/* Fixed call-to-action card: sticks inside the rail, which is as tall as the
   article, so it stops there and never reaches the closing band. Short windows
   can't fit it, so it scrolls normally. */
.mfs-guide__cta-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--mfs-line);
  border-radius: var(--mfs-radius);
  box-shadow: 0 8px 24px rgb(0 47 106 / 0.08);
}
.mfs-guide__rail-toc + .mfs-guide__cta-card { margin-top: 56px; }
.mfs-guide__rail > .mfs-guide__cta-card:first-child { margin-top: 0; }
@media (min-height: 520px) {
  .mfs-guide__cta-card { position: sticky; top: calc(var(--mfs-header-h) + 24px); }
}
.mfs-guide__card-title {
  font-family: var(--mfs-font-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  color: var(--mfs-navy);
}
.mfs-guide__card-actions { display: flex; flex-direction: column; gap: 10px; }
.mfs-guide__card-actions .mfs-btn { justify-content: center; width: 100%; min-height: 52px; padding-inline: 12px; }
.mfs-guide__card-call {
  padding-top: 2px;
  font-size: 15px;
  line-height: 24px;
  text-align: center;
  color: var(--mfs-navy);
}
.mfs-ui .mfs-guide__card-call a,
.mfs-ui .mfs-guide__card-fee a {
  font-weight: 600;
  color: var(--mfs-navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.mfs-guide__card-fee {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  color: var(--mfs-navy);
  border-top: 1px solid var(--mfs-line);
}
.mfs-guide__card-rating {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 21px;
  color: var(--mfs-navy);
}
.mfs-guide__card-rating .mfs-stars { flex-shrink: 0; margin-top: 3px; }
.mfs-guide__card-rating strong { font-weight: 600; }

/* The card replaces the desktop floating bar on these pages; phones keep it. */
@media (min-width: 1024px) {
  .mfs-actionbar { display: none; }
}

/* Article prose ------------------------------------------------------------ */
.mfs-guide__section { font-size: 17px; line-height: 27px; color: var(--mfs-navy); overflow-wrap: anywhere; }
.mfs-guide__section > * + * { margin-top: 16px; }
.mfs-guide__section h2,
.mfs-guide__section h3,
.mfs-guide__section h4,
.mfs-guide__section h5,
.mfs-guide__section h6,
.mfs-guide__bold-head {
  font-family: var(--mfs-font-heading);
  font-weight: 700;
  color: var(--mfs-navy);
}
.mfs-guide__section h2,
.mfs-guide__section .mfs-guide__section-head {
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--mfs-header-h) + 16px);
}
.mfs-guide__section .mfs-guide__section-head + * { margin-top: 20px; }
.mfs-guide__section h3 { font-size: 25px; line-height: 32px; }
.mfs-guide__section h4 { font-size: 22px; line-height: 30px; }
.mfs-guide__section h5 { font-size: 20px; line-height: 28px; }
.mfs-guide__section h6 { font-size: 18px; line-height: 26px; }
.mfs-guide__section > :is(h2, h3, h4, h5, h6):not(.mfs-guide__section-head) { margin-top: 24px; }
.mfs-guide__section > :is(h2, h3, h4, h5, h6):not(.mfs-guide__section-head) + * { margin-top: 8px; }
.mfs-guide__section ul { padding-left: 22px; list-style: disc; }
.mfs-guide__section ol { padding-left: 22px; list-style: decimal; }
.mfs-guide__section li + li { margin-top: 6px; }
.mfs-guide__section li > p { margin: 0; }
.mfs-guide__section strong,
.mfs-guide__section b { font-weight: 600; }
.mfs-ui .mfs-guide__section a {
  font-weight: 600;
  color: var(--mfs-navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.mfs-ui .mfs-guide__section a:hover { color: var(--mfs-action); }
.mfs-guide__section img { display: block; max-width: 100%; height: auto; border-radius: var(--mfs-radius-sm); }
.mfs-guide__section img.aligncenter { margin-inline: auto; }
@media (min-width: 640px) {
  .mfs-guide__section img.alignleft { float: left; margin: 4px 24px 12px 0; max-width: 50%; }
  .mfs-guide__section img.alignright { float: right; margin: 4px 0 12px 24px; max-width: 50%; }
}
.mfs-guide__section::after { content: ""; display: block; clear: both; }
.mfs-guide__table { overflow-x: auto; }
.mfs-guide__table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 25px; }
.mfs-guide__table th,
.mfs-guide__table td { padding: 12px 16px; text-align: left; vertical-align: top; border: 1px solid var(--mfs-line); }
.mfs-guide__table th { font-weight: 600; background: var(--mfs-band); }
.mfs-guide__embed { aspect-ratio: 16 / 9; max-width: 100%; }
.mfs-guide__embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Checklist ---------------------------------------------------------------- */
.mfs-guide__section ul.mfs-guide__checklist {
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--mfs-line);
  border-radius: var(--mfs-radius);
}
.mfs-guide__section li.mfs-guide__check {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 20px 24px;
  font-size: 16px;
  line-height: 25px;
  color: var(--mfs-body);
}
.mfs-guide__check + .mfs-guide__check { border-top: 1px solid var(--mfs-line); }
.mfs-guide__check svg { flex-shrink: 0; color: var(--mfs-navy); }
.mfs-guide__check-title { margin-bottom: 4px; font-size: 17px; font-weight: 600; line-height: 27px; color: var(--mfs-navy); }

/* Numbered steps and cards --------------------------------------------------- */
.mfs-guide__steps,
.mfs-guide__cards { display: grid; grid-template-columns: minmax(0, 1fr); }
.mfs-guide__steps { gap: 32px; }
.mfs-guide__cards { gap: 16px; }
@media (min-width: 768px) {
  .mfs-guide__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .mfs-guide__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
.mfs-guide__step { padding-top: 20px; border-top: 2px solid var(--mfs-navy); font-size: 16px; line-height: 26px; color: var(--mfs-body); }
.mfs-guide__step-num {
  margin-bottom: 16px;
  font-family: var(--mfs-font-heading);
  font-size: 40px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.02em;
  color: rgb(0 47 106 / 0.8);
}
.mfs-guide__card {
  padding: 24px;
  font-size: 16px;
  line-height: 25px;
  color: var(--mfs-body);
  background: #fff;
  border: 1px solid var(--mfs-line);
  border-radius: var(--mfs-radius);
}
.mfs-guide__section .mfs-guide__item-title { margin-bottom: 8px; font-size: 25px; line-height: 32px; }
.mfs-guide__step > * + p:not(.mfs-guide__step-num),
.mfs-guide__card > * + p { margin-top: 0; }
.mfs-guide__step p + p { margin-top: 12px; }

/* FAQ accordion -------------------------------------------------------------- */
.mfs-guide__faq { border-top: 1px solid var(--mfs-line); }
.mfs-guide__faq-item { border-bottom: 1px solid var(--mfs-line); }
.mfs-guide__faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  cursor: pointer;
  list-style: none;
}
.mfs-guide__faq-item summary::-webkit-details-marker { display: none; }
.mfs-guide__section .mfs-guide__faq-q {
  font-family: var(--mfs-font-body);
  font-size: 19px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: 0;
}
.mfs-guide__faq-icon { flex-shrink: 0; width: 24px; font-size: 20px; font-weight: 500; line-height: 24px; text-align: center; color: var(--mfs-action); }
.mfs-guide__faq-icon::before { content: "+"; }
.mfs-guide__faq-item[open] .mfs-guide__faq-icon::before { content: "−"; }
.mfs-guide__faq-a { max-width: 640px; padding-bottom: 24px; color: var(--mfs-body); }
.mfs-guide__faq-a > * + * { margin-top: 12px; }

/* Fee line ------------------------------------------------------------------- */
.mfs-guide__fee { font-size: 16px; line-height: 25px; color: var(--mfs-body); scroll-margin-top: calc(var(--mfs-header-h) + 24px); }

/* Button row in the closing band --------------------------------------------- */
.mfs-guide__contact-actions { display: flex; flex-direction: column; gap: 12px; }
.mfs-guide__contact-actions .mfs-btn { justify-content: center; }
@media (min-width: 640px) {
  .mfs-guide__contact-actions { flex-direction: row; flex-wrap: wrap; }
}

/* Author box ----------------------------------------------------------------- */
.mfs-guide__author {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--mfs-line);
  border-radius: var(--mfs-radius);
}
@media (min-width: 640px) {
  .mfs-guide__author { flex-direction: row; align-items: center; }
}
.mfs-ui .mfs-guide__author-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--mfs-navy);
  text-decoration: none;
}

/* Closing band --------------------------------------------------------------- */
.mfs-guide__next {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 640px) {
  .mfs-guide__next { padding-inline: 32px; }
}
@media (min-width: 1024px) {
  .mfs-guide__next { flex-direction: row; gap: 40px; padding-inline: 40px; }
  .mfs-guide__next-copy { flex: 1 1 57%; min-width: 0; }
  .mfs-guide__next-actions { flex: 1 1 40%; min-width: 0; align-self: center; }
}
@media (min-width: 1280px) {
  .mfs-guide__next { padding-inline: 80px; }
}
.mfs-guide__roofs { display: block; width: 165px; height: 40px; }
.mfs-guide__next-title {
  margin-top: 24px;
  font-family: var(--mfs-font-heading);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.005em;
  color: #fff;
}
@media (min-width: 1024px) {
  .mfs-guide__next-title { font-size: 52px; }
}
.mfs-guide__next-body {
  max-width: 560px;
  margin-top: 16px;
  font-size: 18px;
  line-height: 28px;
  color: rgb(255 255 255 / 0.85);
}
.mfs-guide__next-body p + p { margin-top: 12px; }
.mfs-ui .mfs-guide__next-body a { color: #fff; text-decoration: underline; }
.mfs-guide__next-call { margin-top: 16px; font-size: 15px; line-height: 22.5px; color: rgb(255 255 255 / 0.85); }
.mfs-ui .mfs-guide__next-call a { font-weight: 600; color: #fff; text-decoration: underline; text-decoration-thickness: 1px; }

/* Related guides ------------------------------------------------------------- */
.mfs-guide__related { border-top: 1px solid var(--mfs-line); background: #fff; }
.mfs-guide__related-inner {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 56px 20px;
}
@media (min-width: 640px) {
  .mfs-guide__related-inner { padding-inline: 32px; }
}
@media (min-width: 1024px) {
  .mfs-guide__related-inner { padding: 80px 40px; }
}
@media (min-width: 1280px) {
  .mfs-guide__related-inner { padding-inline: 80px; }
}
.mfs-guide__related-title {
  font-family: var(--mfs-font-heading);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.005em;
  color: var(--mfs-navy);
}
@media (min-width: 1024px) {
  .mfs-guide__related-title { font-size: 44px; }
}
.mfs-guide__related-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 40px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .mfs-guide__related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .mfs-guide__related-list { margin-top: 40px; }
}
.mfs-guide__related-list li { border-bottom: 1px solid var(--mfs-line); }
.mfs-ui .mfs-guide__related-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--mfs-navy);
  text-decoration: none;
}
.mfs-ui .mfs-guide__related-list a:hover { color: var(--mfs-action); }
.mfs-guide__related-list .mfs-icon { flex-shrink: 0; }
.mfs-guide__related-text { display: block; padding-block: 10px; font-size: 16px; font-weight: 500; line-height: 24px; color: var(--mfs-navy); }
