/* Loan discovery — smart form (vamgard-smart-loan-form) */
.ld-page {
  --ld-navy: #123b70;
  --ld-blue: #1769d2;
  --ld-blue2: #2588e8;
  --ld-teal: #22c2c1;
  --ld-ink: #172b49;
  --ld-muted: #71829b;
  --ld-line: #e2eaf4;
  --ld-pale: #f1f6fd;
  --ld-white: #fff;
  --ld-shadow: 0 24px 70px rgba(24, 65, 118, .12);
  --ld-radius: 24px;
  margin: 0;
  padding: 20px 10px 36px;
  overflow-x: hidden;
  max-width: 100%;
  background:
    radial-gradient(ellipse at 12% 12%, #e1f3fb 0, transparent 34%),
    radial-gradient(ellipse at 90% 85%, #e4edff 0, transparent 36%),
    #f5f8fd;
  color: var(--ld-ink);
  min-height: 70vh;
}
.ld-page * { box-sizing: border-box; }
.ld-shell { max-width: 1160px; margin: auto; }
.ld-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  max-width: 1080px;
  padding: 0 6px;
}
.ld-top-note {
  font-size: 13px;
  font-weight: 700;
  color: #5b6f8a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
.ld-top-note::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #21bfae;
  border-radius: 50%;
  flex: 0 0 auto;
}
.ld-app {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #fff;
  border-radius: 30px;
  box-shadow: var(--ld-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(270px, .78fr) minmax(0, 1.45fr);
  min-height: 650px;
  direction: ltr;
}
.ld-visual {
  direction: rtl;
  background: linear-gradient(150deg, #f0f6ff 0%, #e8f6fb 58%, #e8f0ff 100%);
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.ld-visual::before,
.ld-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.ld-visual::before {
  width: 290px;
  height: 290px;
  background: linear-gradient(135deg, #d6efff, #c8e9f3);
  top: 15%;
  right: -145px;
}
.ld-visual::after {
  width: 230px;
  height: 230px;
  background: linear-gradient(135deg, #dce8ff, #c5d8ff);
  bottom: -120px;
  left: -100px;
}
.ld-visual img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  mix-blend-mode: multiply;
  border-radius: 18px;
}
.ld-visual-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 10px;
}
.ld-visual-copy h2 {
  font-size: 24px;
  line-height: 1.65;
  margin: 0 0 8px;
  color: var(--ld-navy);
  font-weight: 800;
}
.ld-visual-copy p {
  font-size: 13px;
  line-height: 2;
  color: #7186a5;
  margin: 0 auto;
  max-width: 290px;
}
.ld-visual-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff9;
  border: 1px solid #fff;
  border-radius: 99px;
  padding: 7px 12px;
  color: #4b709f;
  font-size: 11px;
  margin-top: 15px;
}
.ld-visual-tag svg {
  width: 15px;
  height: 15px;
  color: #20aaa9;
}
.ld-main {
  direction: rtl;
  padding: 34px clamp(22px, 4vw, 52px) 26px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ld-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.ld-main-head h1 {
  font-size: 25px;
  color: var(--ld-navy);
  margin: 0 0 5px;
  font-weight: 800;
}
.ld-main-head p {
  font-size: 13px;
  color: var(--ld-muted);
  margin: 0;
  line-height: 1.9;
}
.ld-step-count {
  white-space: nowrap;
  background: #f0f6ff;
  color: #386da9;
  border: 1px solid #e0ebfa;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}
.ld-progress-area { margin-bottom: 28px; }
.ld-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8191a7;
  margin-bottom: 9px;
}
.ld-progress-track {
  height: 7px;
  background: #eaf0f8;
  border-radius: 20px;
  overflow: hidden;
  direction: rtl;
}
.ld-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ld-teal), var(--ld-blue));
  border-radius: 20px;
  transition: width .35s ease;
}
.ld-step { display: none; animation: ld-appear .28s ease; }
.ld-step.active { display: block; }
@keyframes ld-appear {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.ld-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #1b3558;
  margin: 0 0 6px;
}
.ld-section-hint {
  font-size: 12px;
  color: #8795a9;
  margin: 0 0 18px;
  line-height: 1.9;
}
.ld-q-group { margin: 0 0 24px; }
.ld-q-group:last-child { margin-bottom: 0; }
.ld-q-title {
  font-size: 14px;
  font-weight: 700;
  color: #243c5d;
  display: block;
  margin-bottom: 7px;
}
.ld-q-hint {
  display: block;
  font-size: 11px;
  color: #8a98aa;
  margin-bottom: 12px;
  line-height: 1.8;
}
.ld-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ld-opt {
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}
.ld-opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}
.ld-opt-content {
  min-height: 62px;
  border: 1.5px solid var(--ld-line);
  background: #fff;
  border-radius: 15px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #526781;
  font-size: 13px;
  font-weight: 600;
  transition: .18s ease;
  position: relative;
}
.ld-opt:hover .ld-opt-content {
  border-color: #9dbfe8;
  background: #fafdff;
  transform: translateY(-1px);
}
.ld-opt-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 11px;
  background: #f0f5fc;
  color: #4d83c7;
  display: grid;
  place-items: center;
}
.ld-opt-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ld-opt-check {
  margin-right: auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid #d4deeb;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 18px;
}
.ld-opt-check svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  stroke: currentColor;
  fill: none;
}
.ld-opt input:checked + .ld-opt-content {
  border-color: #2776d6;
  background: linear-gradient(100deg, #f1f7ff, #eaf4ff);
  color: #1458a8;
  box-shadow: 0 4px 14px #1d70c80d;
}
.ld-opt input:checked + .ld-opt-content .ld-opt-icon {
  background: #dcecff;
  color: #1769d2;
}
.ld-opt input:checked + .ld-opt-content .ld-opt-check {
  background: #1769d2;
  border-color: #1769d2;
}
.ld-opt input:checked + .ld-opt-content .ld-opt-check svg { opacity: 1; }
.ld-sub {
  background: #f7faff;
  border: 1px solid #e8eff8;
  border-radius: 17px;
  padding: 17px;
  margin-bottom: 15px;
}
.ld-sub .ld-q-title { font-size: 13px; }
.ld-sub .ld-opt-content { background: #fff; }
.ld-error {
  display: none;
  color: #c24156;
  font-size: 11px;
  margin-top: 8px;
}
.ld-q-group.has-error .ld-error { display: block; }
.ld-q-group.has-error .ld-opt-content { border-color: #e8a6b0; }
.ld-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 25px;
  border-top: 1px solid #edf1f7;
}
.ld-btn {
  border: 0;
  border-radius: 13px;
  min-height: 49px;
  padding: 0 23px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: .18s;
}
.ld-btn-primary {
  color: #fff;
  background: linear-gradient(100deg, #1769d2, #2188d9 65%, #20b9b7);
  box-shadow: 0 8px 18px #1769d229;
  min-width: 160px;
}
.ld-btn-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  color: #fff;
}
.ld-btn-secondary {
  background: #f3f6fa;
  color: #526781;
  border: 1px solid #e4ebf3;
}
.ld-btn-secondary:hover { background: #eaf0f7; }
.ld-btn:disabled { opacity: .5; cursor: not-allowed; }
.ld-privacy {
  font-size: 10px;
  color: #97a3b3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ld-privacy svg { width: 14px; height: 14px; }
.ld-hidden { display: none !important; }
.ld-done {
  text-align: center;
  padding: 26px 10px 20px;
}
.ld-done-icon {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: linear-gradient(145deg, #e4fbf7, #dcecff);
  color: #159c9c;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
}
.ld-done-icon svg {
  width: 38px;
  height: 38px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}
.ld-done h2 {
  font-size: 22px;
  color: var(--ld-navy);
  margin: 0 0 8px;
}
.ld-done p {
  color: #71829b;
  font-size: 13px;
  line-height: 2;
  max-width: 480px;
  margin: 0 auto 16px;
}
.ld-summary {
  background: #f7faff;
  border: 1px solid #e6eef8;
  border-radius: 16px;
  padding: 15px;
  text-align: right;
  max-width: 520px;
  margin: 0 auto 16px;
  font-size: 12px;
  color: #526781;
  line-height: 2;
}
.ld-summary strong { color: #1c4778; }
.ld-price-box {
  max-width: 520px;
  margin: 0 auto 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(100deg, #f0f7ff, #eafbf8);
  border: 1px solid #d7e8f8;
  font-size: 14px;
  font-weight: 700;
  color: var(--ld-navy);
}
.ld-price-box strong { color: #1769d2; font-size: 1.15em; }
.ld-mobile-field {
  max-width: 520px;
  margin: 0 auto 18px;
  text-align: right;
}
.ld-mobile-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #1c4778;
  margin-bottom: 8px;
}
.ld-mobile-purpose {
  display: inline-block;
  margin-right: 6px;
  font-weight: 600;
  color: #5f7593;
}
.ld-mobile-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #16375f;
  background: #fff;
  letter-spacing: .04em;
  transition: border-color .15s, box-shadow .15s;
}
.ld-mobile-input:focus {
  outline: none;
  border-color: #2188d9;
  box-shadow: 0 0 0 3px #2188d922;
}
.ld-mobile-field .ld-error {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  color: #d13a3a;
  text-align: right;
}
.ld-mobile-field.has-error .ld-mobile-input {
  border-color: #e35a5a;
  box-shadow: 0 0 0 3px #e35a5a1f;
}
.ld-mobile-field.has-error .ld-error { display: block; }
@media (max-width: 800px) {
  .ld-page {
    margin: 0;
    padding: 8px 6px 18px;
  }
  .ld-shell { max-width: 100%; }
  .ld-topbar { margin-bottom: 8px; padding: 0; }
  .ld-top-note { font-size: 12px; }
  .ld-app {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(24, 65, 118, .08);
  }
  .ld-visual { display: none; }
  .ld-main { padding: 14px 12px 12px; }
  .ld-main-head {
    gap: 10px;
    margin-bottom: 14px;
  }
  .ld-main-head h1 { font-size: 18px; margin-bottom: 2px; }
  .ld-main-head p { font-size: 12px; line-height: 1.7; }
  .ld-step-count {
    padding: 6px 9px;
    font-size: 11px;
    border-radius: 10px;
  }
  .ld-progress-area { margin-bottom: 14px; }
  .ld-section-title { font-size: 15px; }
  .ld-section-hint { font-size: 11px; margin-bottom: 12px; }
  .ld-q-group { margin-bottom: 14px; }
  .ld-q-title { font-size: 13px; margin-bottom: 6px; }
  .ld-q-hint { font-size: 10px; margin-bottom: 8px; }
  .ld-grid { grid-template-columns: 1fr; gap: 8px; }
  .ld-opt-content {
    min-height: 48px;
    padding: 10px 11px;
    border-radius: 12px;
    font-size: 12.5px;
    gap: 9px;
  }
  .ld-opt-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
  }
  .ld-opt-icon svg { width: 16px; height: 16px; }
  .ld-sub { padding: 12px; border-radius: 14px; margin-bottom: 10px; }
  .ld-actions {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, .97);
    padding: 10px 0 2px;
    margin-top: 12px;
    z-index: 3;
  }
  .ld-btn {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 12.5px;
  }
  .ld-btn-primary { flex: 1; min-width: 0; }
  .ld-privacy { display: none; }
  .ld-done { padding: 16px 4px 12px; }
  .ld-done h2 { font-size: 18px; }
  .ld-done p { font-size: 12px; margin-bottom: 12px; }
  .ld-summary, .ld-price-box { padding: 12px; margin-bottom: 12px; font-size: 12px; }
}

/* Keep questionnaire free of sticky site CTAs */
body.layout--loan-discovery.has-cc-mobile-bar { padding-bottom: 0 !important; }
body.layout--loan-discovery .cc-mobile-bar,
body.layout--loan-discovery .ai-promo-banner { display: none !important; }
@media (min-width: 801px) and (max-width: 1020px) {
  .ld-app { grid-template-columns: minmax(230px, .65fr) minmax(0, 1.4fr); }
  .ld-visual { padding: 20px; }
  .ld-main { padding: 28px 28px 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-page *, .ld-page *::before, .ld-page *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Result page keeps compact cards (legacy class kept for dark-theme hooks) */
.ld-result-wrap { max-width: 860px; margin: 1.5rem auto 3rem; padding: 0 1rem; }
.ld-result-card {
  background: #fff;
  border: 1px solid #e6eef8;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: .85rem;
  box-shadow: 0 8px 24px rgba(24, 65, 118, .06);
}
.ld-result-card h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .25rem; color: #1b3558; }
.ld-reasons { margin: .55rem 0 0; padding-right: 1.1rem; color: #526781; font-size: .86rem; }

/* ── Paid discovery report ── */
.ld-report-page {
  padding-top: 12px;
  padding-bottom: 48px;
}
.ld-report {
  --ld-navy: #123b70;
  --ld-blue: #1769d2;
  --ld-ink: #172b49;
  --ld-muted: #71829b;
  --ld-line: #e2eaf4;
  --ld-pale: #f1f6fd;
  --ld-ok: #1f7a52;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 6px 8px;
}
.ld-report-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(24, 65, 118, .08);
  padding: 1.25rem 1.35rem 1.15rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid #1769d2;
}
.ld-report-brand {
  font-size: .78rem;
  font-weight: 800;
  color: #8a6d2f;
  letter-spacing: .02em;
  margin-bottom: .25rem;
}
.ld-report-title {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 900;
  color: var(--ld-navy);
  line-height: 1.35;
}
.ld-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .65rem;
}
.ld-report-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ld-muted);
  background: var(--ld-pale);
  border: 1px solid var(--ld-line);
  border-radius: 999px;
  padding: .22rem .7rem;
}
.ld-report-chip strong { color: var(--ld-ink); font-weight: 800; }
.ld-report-saved {
  margin: .75rem 0 0;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ld-ok);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ld-report-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #fff;
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(24, 65, 118, .06);
  padding: 1.15rem 1.25rem 1.2rem;
  margin-bottom: 1rem;
}
.ld-report-section-title {
  margin: 0 0 .9rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--ld-navy);
}
.ld-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem .85rem;
  margin: 0;
}
.ld-summary-item {
  background: linear-gradient(165deg, #fff 0%, var(--ld-pale) 100%);
  border: 1px solid var(--ld-line);
  border-radius: 14px;
  padding: .7rem .85rem;
  min-width: 0;
}
.ld-summary-item dt {
  margin: 0 0 .2rem;
  font-size: .72rem;
  font-weight: 800;
  color: var(--ld-muted);
}
.ld-summary-item dd {
  margin: 0;
  font-size: .9rem;
  font-weight: 800;
  color: var(--ld-ink);
  line-height: 1.55;
  word-break: break-word;
}
.ld-report-loans { margin-top: .25rem; }
.ld-report-loans-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
  padding: 0 .15rem;
}
.ld-report-count {
  font-size: .8rem;
  font-weight: 800;
  color: var(--ld-blue);
  background: #e8f1fc;
  border-radius: 999px;
  padding: .2rem .65rem;
}
.ld-match-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e6eef8;
  border-radius: 18px;
  padding: 1.05rem 1.15rem 1rem;
  margin-bottom: .85rem;
  box-shadow: 0 12px 30px rgba(24, 65, 118, .06);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.ld-match-card__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1rem;
  align-items: flex-start;
}
.ld-match-card__identity {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  min-width: 0;
  flex: 1;
}
.ld-match-rank {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(145deg, #1769d2, #2588e8);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .15rem;
}
.ld-match-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--ld-line);
  flex: 0 0 auto;
}
.ld-match-titles { min-width: 0; }
.ld-match-titles h3 {
  margin: 0 0 .2rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--ld-navy);
  line-height: 1.45;
}
.ld-match-bank {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ld-muted);
  line-height: 1.5;
}
.ld-match-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}
.ld-match-pill {
  font-size: .75rem;
  font-weight: 800;
  color: var(--ld-navy);
  background: #eaf3ff;
  border: 1px solid #d5e6fb;
  border-radius: 999px;
  padding: .28rem .7rem;
  white-space: nowrap;
}
.ld-match-pill--soft {
  color: #3d5a7a;
  background: var(--ld-pale);
  border-color: var(--ld-line);
}
.ld-match-reasons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.ld-match-reasons li {
  font-size: .78rem;
  font-weight: 700;
  color: #3d5a7a;
  background: #f4f8fd;
  border: 1px solid var(--ld-line);
  border-radius: 999px;
  padding: .28rem .7rem;
  line-height: 1.45;
  max-width: 100%;
}
.ld-match-card__foot {
  display: flex;
  justify-content: flex-start;
  padding-top: .15rem;
}
.ld-report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: 12px;
  font-size: .86rem;
  font-weight: 800;
  padding: .55rem 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.3;
}
.ld-report-btn--primary {
  background: linear-gradient(135deg, #1769d2, #2588e8);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(23, 105, 210, .22);
}
.ld-report-btn--primary:hover { filter: brightness(1.04); color: #fff !important; }
.ld-report-btn--ghost {
  background: #fff;
  color: var(--ld-blue) !important;
  border-color: #c9dcf5;
}
.ld-report-btn--link {
  background: transparent;
  color: var(--ld-muted) !important;
  padding-inline: .4rem;
}
.ld-report-empty {
  background: #fff8e8;
  border: 1px solid #f0dfb0;
  color: #7a5a12;
  border-radius: 14px;
  padding: .95rem 1rem;
  font-size: .9rem;
  font-weight: 700;
}
.ld-print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.15rem;
  align-items: center;
}
@media (max-width: 640px) {
  .ld-summary-grid { grid-template-columns: 1fr; }
  .ld-report-hero { padding: 1rem 1rem .95rem; border-radius: 18px; }
  .ld-report-card, .ld-match-card { border-radius: 16px; padding: .95rem 1rem; }
  .ld-match-pills { justify-content: flex-start; width: 100%; }
  .ld-match-reasons li { font-size: .74rem; }
}
/* v2 questionnaire extras */
.ld-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ld-grid-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ld-grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ld-opt-desc .ld-opt-content {
  flex-direction: row;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  gap: 14px;
}
.ld-opt-desc-text { display: flex; flex-direction: column; flex: 1; text-align: right; }
.ld-opt-desc-head { font-size: 13px; font-weight: 700; color: var(--ld-navy); }
.ld-opt-desc-sub { font-size: 10.5px; color: #7b8ba2; font-weight: 400; line-height: 1.6; margin-top: 4px; }
.ld-auth-box {
  max-width: 420px;
  margin: 0 auto;
  background: #f7faff;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #e8eff8;
}
.ld-review-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.ld-review-item {
  background: #f8fbff;
  border: 1px solid #e4edf7;
  border-radius: 15px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: .2s;
  text-align: right;
}
.ld-review-item:hover { background: #f0f6ff; border-color: #d0dff1; }
.ld-review-item.has-error { border-color: #e8a6b0; background: #fff5f7; }
.ld-review-q { font-size: 11.5px; font-weight: 700; color: #8795a9; margin-bottom: 5px; }
.ld-review-a { font-size: 13px; font-weight: 800; color: var(--ld-navy); line-height: 1.7; }
.ld-review-edit-icon {
  width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--ld-blue);
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(23,105,210,.08); flex-shrink: 0;
}
.ld-review-edit-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.ld-modal-overlay {
  position: fixed; inset: 0; background: rgba(18,43,73,.5); backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none;
  transition: .3s; padding: 20px; direction: rtl;
}
.ld-modal-overlay.open { opacity: 1; pointer-events: auto; }
.ld-modal-content {
  background: #fff; width: 100%; max-width: 650px; border-radius: 24px; padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.15); max-height: 90vh; overflow-y: auto;
  transform: translateY(15px); transition: .3s; display: flex; flex-direction: column;
}
.ld-modal-overlay.open .ld-modal-content { transform: none; }
.ld-modal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--ld-line);
}
.ld-modal-title { font-size: 17px; font-weight: 800; color: var(--ld-navy); margin: 0; }
.ld-modal-close {
  background: none; border: none; color: #8795a9; cursor: pointer; padding: 5px;
  display: grid; place-items: center; border-radius: 8px;
}
.ld-modal-close:hover { background: #f0f5fc; color: #cf4c60; }
.ld-modal-actions {
  display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ld-line);
}
.icon-text {
  font-family: system-ui, -apple-system, sans-serif; font-size: 13px; font-weight: bold;
  stroke: none; fill: currentColor; text-anchor: middle;
}
.ld-top-note {
  font-size: 16px;
  font-weight: 800;
  color: var(--ld-navy);
}
@media (max-width: 850px) {
  .ld-grid-3, .ld-grid-4, .ld-grid-auto { grid-template-columns: 1fr; }
  .ld-modal-content { padding: 18px; max-height: 85vh; }
}

@media print {
  body.layout--loan-discovery .site-header,
  body.layout--loan-discovery .site-footer,
  body.layout--loan-discovery .support-fab,
  body.layout--loan-discovery .ld-print-hide,
  .ld-print-hide { display: none !important; }
  .ld-page, .ld-report-page {
    background: #fff !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  .ld-report { max-width: none; padding: 0; }
  .ld-report-hero,
  .ld-report-card,
  .ld-match-card {
    box-shadow: none !important;
    break-inside: avoid;
  }
}
