/* The Flood Compliance Manual for Lenders (flood-compliance-manual.html) and the page that hands over a copy
   (flood-compliance-manual/download-li.html). Loaded after site-2026.css, page-legal.css (the opening, .ph-read)
   and page-guides.css (the note, the index rows, the closing band). This file holds the request form, what's
   inside the manual and the chapter list. */
.mf-card [hidden], .mf-card[hidden] { display: none !important; }

/* The form card */
.mf-card { padding: 28px 28px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); scroll-margin-top: 96px; }
.mf-form { display: grid; }
.mf-form-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 22px; line-height: 1.2; color: var(--navy); }
.mf-form-title span { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.mf-form-lede { margin-top: 6px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.mf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.mf-grid label { display: grid; gap: 6px; font-size: 17px; line-height: 1.4; font-weight: 500; color: var(--navy); }
.mf-wide { grid-column: 1 / -1; }
.mf-form input:not([type="checkbox"]) {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #CFC9BF; border-radius: 10px; background: var(--white);
  font: 400 17px/1.4 'Outfit', Arial, sans-serif; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.mf-form input:not([type="checkbox"]):hover { border-color: var(--ink-3); }
.mf-form input:not([type="checkbox"]):focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(74, 144, 194,.45); }
.mf-form input:user-invalid { border-color: var(--alert); box-shadow: 0 0 0 3px rgba(180,83,42,.15); }

/* Consent to be contacted: its own box, never checked for the visitor, and required to submit */
.mf-consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--warm); cursor: pointer; font-size: 17px; line-height: 1.45; color: var(--navy); }
.mf-consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.mf-consent small { display: block; margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.mf-consent:focus-within { outline: 3px solid var(--sky-mid); outline-offset: 2px; }

.mf-check { margin-top: 18px; min-height: 65px; }
.mf-bypass { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--sky-mid); border-radius: 10px; background: var(--warm); font-size: 16px; line-height: 1.45; color: var(--navy); }

/* Status: hidden when empty; errors get a tinted box and the email route */
.mf-status { margin-top: 16px; }
.mf-status:has(.mf-status-text:empty) { display: none; }
.mf-status-text { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.mf-status-text:focus { outline: none; }
.mf-fallback { display: none; margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.mf-status:has(.is-error) { padding: 12px 14px; border-radius: 10px; background: var(--alert-wash); }
.mf-status:has(.is-error) .mf-fallback { display: block; }
.mf-status-text.is-error { color: var(--alert); font-weight: 500; }
.mf-fallback a, .mf-small a, .mf-dry a { color: var(--navy); font-weight: 500; text-decoration-color: var(--sky-mid); text-underline-offset: 3px; }

.mf-submit { margin-top: 18px; justify-content: center; width: 100%; min-height: 52px; font-size: 17px; }
.mf-submit:disabled { cursor: not-allowed; opacity: .55; }
.mf-small { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* After a confirmed request */
.mf-done-title { display: flex; align-items: center; gap: 12px; font-size: 22px; line-height: 1.3; color: var(--navy); }
.mf-done-title:focus { outline: none; }
.mf-done-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sky-wash); }
.mf-done-ic svg { width: 18px; height: 18px; stroke: var(--sky); stroke-width: 2.6; fill: none; }
.mf-done-text { margin-top: 14px; font-size: 17px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.mf-done-text b { font-weight: 600; color: var(--navy); }
.mf-dry { padding: 12px 14px; border-radius: 10px; background: var(--warm); border: 1px solid var(--line); }
.mf-done-more { margin-top: 18px; font-size: 16px; }
.mf-again { min-height: 44px; padding: 10px 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mf-again:hover { color: var(--sky); }

/* ---------- v4: the form beside what's inside. On a phone the form comes first; the 15 chapters fold into one row. ---------- */
.mf-main { padding: 64px 0 88px; }
.mf-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 80px; align-items: start; }
/* The form sits beside what's inside, at its top; it doesn't follow the page as it scrolls. */
.mf-main-grid > .mf-card { grid-column: 2; grid-row: 1; }
.mf-about { grid-column: 1; grid-row: 1; min-width: 0; }
.mf-about h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; color: var(--navy); }
.mf-about h2 + p { margin-top: 14px; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.mf-about * + h2 { margin-top: 56px; }
.mf-about .gd-note { margin-top: 32px; max-width: none; }
.mf-nums { margin-top: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mf-fold { margin-top: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.mf-fold > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; min-height: 64px; padding: 14px 52px 14px 20px; position: relative; font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--navy); cursor: pointer; list-style: none; border-radius: 16px; }
.mf-fold > summary::-webkit-details-marker { display: none; }
.mf-fold > summary span { font-size: 15px; font-weight: 400; color: var(--ink-2); }
.mf-fold > summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border-right: 2px solid var(--sky); border-bottom: 2px solid var(--sky); transform: rotate(45deg); }
.mf-fold[open] > summary::after { margin-top: -2px; transform: rotate(225deg); }
.mf-fold > summary:hover { color: var(--sky); }
.mf-fold > summary:focus-visible { outline-offset: 2px; }

/* The chapters, numbered, each with its free guide */
.mf-chapters { list-style: none; margin: 0; padding: 0 14px 14px; counter-reset: mf-ch; display: grid; gap: 0; }
.mf-chapters > li { counter-increment: mf-ch; position: relative; padding: 16px 8px 16px 54px; border-top: 1px solid var(--line); }
.mf-chapters > li::before { content: counter(mf-ch); position: absolute; left: 6px; top: 16px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sky-wash); color: var(--sky); font-weight: 700; font-size: 15px; line-height: 1; }
.mf-chapters h3, .mf-appendix h3 { font-size: 19px; line-height: 1.3; color: var(--navy); }
.mf-chapters p, .mf-appendix p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.mf-guides a { display: inline-block; padding: 10px 0; margin: -8px 0; color: var(--navy); font-weight: 500; text-decoration: underline; text-decoration-color: var(--sky-mid); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.mf-guides a:hover { color: var(--sky); }
.mf-appendix { margin-top: 12px; padding: 18px 20px; border-radius: 16px; background: var(--warm); }

/* What FloodCaliber does with the rules: words beside a product screen. */
.mf-product .v4-head { margin-bottom: 20px; }
.mf-product .v4-head h2 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; }
.mf-product .v4-ticks b { color: var(--navy); font-weight: 600; }
.mf-product .v4-ticks .text-link { display: inline; padding-bottom: 1px; }
.mf-product .mf-fine { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-3); }

/* The page that hands over a copy: the guides to read online, as index rows; the note sits under the product screen. */
.mf-online .gx-list { margin-top: 0; border-top: 1px solid var(--line); }
.mf-product .gd-note { margin-top: 44px; max-width: none; }

@media (max-width: 1000px) {
  .mf-main { padding: 40px 0 56px; }
  .mf-main-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .mf-main-grid > .mf-card { grid-column: 1; grid-row: 1; position: static; max-width: 560px; }
  .mf-about { grid-row: 2; }
}
@media (max-width: 640px) {
  .mf-card { padding: 22px 18px 20px; border-radius: 16px; }
  .mf-grid { grid-template-columns: minmax(0, 1fr); }
  .mf-main { padding: 24px 0 40px; }
  .mf-main-grid { gap: 36px; }
  .mf-about * + h2 { margin-top: 40px; }
  .mf-about h2 + p { font-size: 17px; }
  .mf-nums { margin-top: 20px; gap: 16px 12px; }
  .mf-nums dd { font-size: 40px; }
  .mf-fold { margin-top: 24px; }
  .mf-fold > summary { padding: 12px 46px 12px 16px; font-size: 18px; }
  .mf-chapters { padding: 0 10px 10px; }
  .mf-chapters > li { padding: 14px 4px 14px 46px; }
  .mf-chapters > li::before { left: 2px; top: 14px; width: 30px; height: 30px; font-size: 14px; }
}
@media (forced-colors: active) { .mf-fold > summary::after { border-color: CanvasText; } .mf-fold, .mf-card { border-color: CanvasText; } .mf-chapters > li::before { border: 1px solid CanvasText; } }
