/* ============================================================================
   Fidelity Residential — RTL Loan Application wizard styles. Namespaced .rtl.
   Brand: navy #1B3A6B / gold #C8A84B. Montserrat headings, Inter body.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Inter:wght@400;500;600&display=swap');

.rtl{ --navy:#1B3A6B; --navy-dk:#16305a; --gold:#C8A84B; --gold-dk:#B8983F;
  --ink:#1F2328; --muted:#6B7280; --canvas:#F3F2EF; --white:#fff; --line:#E4E2DC; --soft:#F7F6F2;
  font-family:'Inter',system-ui,sans-serif; color:var(--ink); -webkit-font-smoothing:antialiased; }
.rtl *{box-sizing:border-box}
.rtl h1,.rtl h2,.rtl h3{font-family:'Montserrat',sans-serif;margin:0}
.rtl p{margin:0}

/* ---- page band ---- */
.rtl-band{ background:
  radial-gradient(1100px 460px at 12% -12%, rgba(200,168,75,.10), transparent 60%),
  linear-gradient(180deg, var(--canvas) 0%, #eceae5 100%);
  padding:38px 0 70px; }
.rtl-wrap{ max-width:820px; margin:0 auto; padding:0 20px; }

/* ---- intro header ---- */
.rtl-intro{ text-align:center; margin-bottom:22px; }
.rtl-kicker{ display:inline-block; background:rgba(200,168,75,.16); color:#8a6f1f; font-weight:700;
  font-size:12px; letter-spacing:1.5px; text-transform:uppercase; padding:7px 14px; border-radius:20px; }
.rtl-intro h1{ font-size:34px; line-height:1.1; color:var(--navy); font-weight:800; letter-spacing:-.4px; margin:14px 0 8px; }
.rtl-intro p{ color:var(--muted); font-size:16px; max-width:560px; margin:0 auto; }

/* ---- resume banner ---- */
.rtl-resume{ display:none; align-items:center; gap:12px; max-width:820px; margin:0 auto 14px; padding:11px 16px;
  background:#fff8e6; border:1px solid #e8d9a8; border-radius:10px; font-size:13.5px; color:#6b571f; }
.rtl-resume b{ color:#4a3d12; }
.rtl-resume .sp{ flex:1; }
.rtl-resume button{ background:none; border:0; color:var(--navy); font-weight:700; cursor:pointer; font-size:13px; padding:4px 6px; }
.rtl-resume button:hover{ text-decoration:underline; }

/* ---- card ---- */
.rtl-card{ background:var(--white); border:1px solid var(--line); border-radius:14px;
  box-shadow:0 18px 50px -28px rgba(27,58,107,.35); overflow:hidden; }
.rtl-top{ display:flex; align-items:center; gap:12px; padding:14px 22px; border-bottom:1px solid var(--line); background:var(--soft); }
.rtl-back{ background:none; border:0; cursor:pointer; color:var(--navy); font-size:22px; line-height:1; padding:2px 6px; border-radius:6px; }
.rtl-back:hover{ background:rgba(27,58,107,.08); }
.rtl-topmeta{ flex:1; }
.rtl-sec{ font-family:'Montserrat',sans-serif; font-weight:700; font-size:12px; letter-spacing:.6px; text-transform:uppercase; color:var(--navy); }
.rtl-stepnum{ font-size:12px; color:var(--muted); margin-top:1px; }
.rtl-progress{ height:5px; background:#ece9e2; }
.rtl-progress i{ display:block; height:100%; width:0; background:linear-gradient(90deg,var(--gold),var(--navy)); transition:width .35s ease; }

.rtl-body{ padding:30px 34px 34px; min-height:280px; }
.rtl-q{ font-size:23px; line-height:1.22; color:var(--navy); font-weight:800; letter-spacing:-.2px; }
.rtl-sub{ color:var(--muted); font-size:14.5px; margin-top:8px; line-height:1.5; }

/* ---- tiles ---- */
.rtl-tiles{ display:grid; grid-template-columns:1fr; gap:12px; margin-top:22px; }
.rtl-tiles.two{ grid-template-columns:1fr 1fr; }
.rtl-tile{ display:flex; align-items:center; gap:14px; text-align:left; background:var(--white);
  border:1.5px solid var(--line); border-radius:12px; padding:15px 16px; cursor:pointer; transition:.14s; width:100%; }
.rtl-tile:hover{ border-color:var(--gold); box-shadow:0 6px 18px -10px rgba(27,58,107,.4); transform:translateY(-1px); }
.rtl-tile.sel{ border-color:var(--navy); background:rgba(27,58,107,.04); }
.rtl-tile .ic{ flex:0 0 42px; height:42px; border-radius:10px; background:var(--soft); display:flex; align-items:center; justify-content:center; }
.rtl-tile .tw{ flex:1; display:flex; flex-direction:column; }
.rtl-tile .tt{ font-weight:700; font-size:15.5px; color:var(--ink); font-family:'Montserrat',sans-serif; }
.rtl-tile .td{ font-size:13px; color:var(--muted); margin-top:2px; }
.rtl-tile .go{ color:var(--gold); font-size:24px; font-weight:700; opacity:.7; }

/* ---- fields ---- */
.rtl-fields{ display:grid; grid-template-columns:1fr 1fr; gap:15px 18px; margin-top:22px; }
.rtl-field{ display:flex; flex-direction:column; }
.rtl-field.sm{ max-width:100%; }
.rtl-field.full{ grid-column:1 / -1; }
.rtl-field label{ font-size:12.5px; font-weight:600; color:var(--navy); margin-bottom:6px; }
.rtl-field label .hint{ color:var(--muted); font-weight:400; }
.rtl-in{ width:100%; border:1.5px solid var(--line); border-radius:9px; padding:11px 13px; font-size:15px; font-family:'Inter',sans-serif; color:var(--ink); background:#fff; transition:.14s; }
.rtl-in:focus{ outline:none; border-color:var(--navy); box-shadow:0 0 0 3px rgba(27,58,107,.12); }
.rtl-ta{ resize:vertical; min-height:78px; }
.rtl-inwrap{ position:relative; display:flex; align-items:center; }
.rtl-inwrap .cur{ position:absolute; left:12px; color:var(--muted); font-size:15px; font-weight:600; }
.rtl-inwrap .rtl-in{ padding-left:26px; }
.rtl-inwrap.read .rtl-in{ background:var(--soft); color:var(--navy); font-weight:700; border-style:dashed; }
select.rtl-in{ appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 12px center; padding-right:34px; }

/* choice pills */
.rtl-choice{ display:flex; flex-wrap:wrap; gap:8px; }
.rtl-pill{ border:1.5px solid var(--line); background:#fff; border-radius:20px; padding:9px 16px; font-size:14px; font-weight:600; color:var(--ink); cursor:pointer; transition:.14s; font-family:'Inter',sans-serif; }
.rtl-pill:hover{ border-color:var(--gold); }
.rtl-pill.sel{ border-color:var(--navy); background:var(--navy); color:#fff; }

/* stepper */
.rtl-step{ display:flex; align-items:center; gap:0; border:1.5px solid var(--line); border-radius:9px; overflow:hidden; width:150px; }
.rtl-step button{ width:42px; height:42px; border:0; background:var(--soft); color:var(--navy); font-size:20px; font-weight:700; cursor:pointer; }
.rtl-step button:hover{ background:rgba(200,168,75,.2); }
.rtl-step .sv{ flex:1; border:0; text-align:center; font-size:16px; font-weight:700; color:var(--ink); width:100%; }
.rtl-step .sv:focus{ outline:none; }

/* ---- toggles ---- */
.rtl-toggles{ margin-top:20px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.rtl-trow{ display:flex; align-items:center; gap:16px; padding:14px 16px; border-bottom:1px solid var(--line); }
.rtl-trow:last-child{ border-bottom:0; }
.rtl-trow:nth-child(odd){ background:var(--soft); }
.rtl-trow .tq{ flex:1; font-size:14px; line-height:1.4; color:var(--ink); }
.tsw{ display:flex; flex:0 0 auto; border:1.5px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.tsw .yn{ width:52px; height:38px; border:0; background:#fff; color:var(--muted); font-weight:700; font-size:13.5px; cursor:pointer; }
.tsw .yn.y.on{ background:var(--navy); color:#fff; }
.tsw .yn.n.on{ background:#9aa0a6; color:#fff; }
.tsw .yn+.yn{ border-left:1px solid var(--line); }

/* ---- repeater cards ---- */
.rtl-cards{ margin-top:20px; display:flex; flex-direction:column; gap:10px; }
.rtl-rcard{ display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-left:3px solid var(--gold); border-radius:10px; padding:12px 14px; background:#fff; }
.rc-main{ flex:1; }
.rc-t{ font-weight:700; color:var(--navy); font-size:14.5px; }
.rc-s{ font-size:12.5px; color:var(--muted); margin-top:2px; }
.rc-x{ background:none; border:0; color:#b1442f; font-size:12.5px; font-weight:600; cursor:pointer; }
.rc-x:hover{ text-decoration:underline; }

/* ---- demographics ---- */
.rtl-demo{ margin-top:18px; border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.rtl-demo+.rtl-demo{ margin-top:14px; }
.rtl-demo .dh{ font-family:'Montserrat',sans-serif; font-weight:700; color:var(--navy); font-size:14px; margin-bottom:10px; }
.rtl-demo .dl{ font-size:12.5px; font-weight:600; color:var(--ink); margin:12px 0 8px; }
.rtl-demo .dl span{ color:var(--muted); font-weight:400; }
.rtl-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.rtl-chip{ border:1.5px solid var(--line); background:#fff; border-radius:8px; padding:8px 13px; font-size:13px; font-weight:500; color:var(--ink); cursor:pointer; transition:.14s; }
.rtl-chip:hover{ border-color:var(--gold); }
.rtl-chip.sel{ border-color:var(--navy); background:rgba(27,58,107,.06); color:var(--navy); font-weight:600; }

/* ---- summary + sign ---- */
.rtl-summary{ margin-top:20px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.rtl-summary .sm{ display:flex; gap:14px; padding:10px 16px; border-bottom:1px solid var(--line); font-size:13.5px; }
.rtl-summary .sm:last-child{ border-bottom:0; }
.rtl-summary .sm:nth-child(odd){ background:var(--soft); }
.rtl-summary .k{ flex:0 0 130px; color:var(--muted); font-weight:600; }
.rtl-summary .v{ flex:1; color:var(--ink); font-weight:600; }
.rtl-sign{ margin-top:22px; border:1.5px solid var(--gold); border-radius:12px; padding:18px 20px; background:linear-gradient(180deg,#fffdf6,#fff); }
.rtl-sign .sh{ font-family:'Montserrat',sans-serif; font-weight:800; color:var(--navy); font-size:16px; }
.rtl-sign .sp{ font-size:13px; color:var(--muted); margin:6px 0 14px; }
.rtl-check{ display:flex; gap:11px; align-items:flex-start; padding:9px 0; font-size:13.5px; line-height:1.45; color:var(--ink); cursor:pointer; }
.rtl-check input{ margin-top:3px; width:17px; height:17px; accent-color:var(--navy); flex:0 0 auto; }

/* ---- buttons + CTA ---- */
.rtl-cta{ margin-top:26px; }
.rtl-cta.col{ display:flex; flex-direction:column; gap:10px; }
.rtl-btn{ display:inline-block; width:100%; text-align:center; font-family:'Montserrat',sans-serif; font-weight:700;
  font-size:15.5px; background:var(--navy); color:#fff; border:2px solid var(--gold); padding:14px 24px;
  border-radius:9px; cursor:pointer; transition:.15s; letter-spacing:.3px; }
.rtl-btn:hover{ background:var(--navy-dk); color:#fff; }
.rtl-btn[disabled]{ opacity:.6; cursor:default; }
.rtl-btn.ghost{ background:transparent; color:var(--navy); border-color:var(--navy); }
.rtl-btn.ghost:hover{ background:rgba(27,58,107,.06); }

.rtl-disc{ font-size:11.5px; color:#9aa0a6; margin-top:12px; line-height:1.5; }

/* ---- done ---- */
.rtl-donebox{ text-align:center; padding:26px 10px; }
.rtl-donebox .seal{ margin-bottom:8px; }
.rtl-donebox h2{ font-size:26px; color:var(--navy); font-weight:800; }
.rtl-donebox p{ color:var(--muted); font-size:15px; max-width:460px; margin:10px auto 0; line-height:1.55; }
.rtl-donebox .rtl-cta{ max-width:360px; margin:22px auto 0; }
.rtl-donebox .rtl-btn{ text-decoration:none; }
.rtl-donebox .phone{ margin-top:18px; font-size:14px; }
.rtl-donebox .phone a{ color:var(--navy); font-weight:700; }

/* ---- toast ---- */
.rtl-toast{ position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(20px); background:#2b2f36; color:#fff;
  padding:12px 20px; border-radius:10px; font-size:14px; font-family:'Inter',sans-serif; box-shadow:0 12px 40px -12px rgba(0,0,0,.5);
  opacity:0; pointer-events:none; transition:.25s; z-index:9999; max-width:90vw; text-align:center; }
.rtl-toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ---- responsive ---- */
@media (max-width:640px){
  .rtl-body{ padding:24px 18px 26px; }
  .rtl-fields{ grid-template-columns:1fr; }
  .rtl-tiles.two{ grid-template-columns:1fr; }
  .rtl-q{ font-size:20px; }
  .rtl-intro h1{ font-size:27px; }
  .rtl-summary .k{ flex-basis:104px; }
}
