/* Production Quality Repair. Load after the current page stylesheet. */

.dq-compact-disclosure {
  margin: 0;
  padding: clamp(16px, 3vw, 28px) 16px;
  background: #f7fafc;
  border-block: 1px solid #dce5ec;
  color: #16324a;
}

.dq-compact-disclosure__inner {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.dq-compact-disclosure__eyebrow {
  margin: 0 0 4px;
  color: #52697c;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dq-compact-disclosure h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3.5vw, 1.65rem);
  line-height: 1.35;
}

.dq-compact-disclosure__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dq-compact-disclosure__facts p {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dce5ec;
  border-radius: 10px;
  line-height: 1.45;
}

.dq-compact-disclosure__facts strong {
  color: #344f64;
  font-size: 0.8125rem;
}

.dq-compact-disclosure__facts span {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dq-compact-disclosure__role {
  margin: 12px 0 0;
  color: #344f64;
  font-size: 0.9375rem;
  line-height: 1.65;
}

@media (max-width: 767px) {
  .dq-compact-disclosure__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Homepage: height only; destinations and tracking attributes are untouched. */
  #home-ad-grid .homepage-featured-card .ai-fill-contact-action,
  #home-ad-grid .homepage-featured-card a[data-track-url*="event=line_click"],
  #home-ad-grid .homepage-featured-card a[href*="event=ad_click"] {
    min-height: 44px;
  }

  /* Small-loan: preserve existing actions and destinations; height only. */
  #compliant-providers .intent-provider-actions a,
  #compliant-providers .intent-provider-actions button {
    min-height: 44px;
  }
}

@media (max-width: 359px) {
  .dq-compact-disclosure__facts {
    grid-template-columns: 1fr;
  }
}

/* Keep the existing PHP execution order intact while presenting the approved
   small-loan hierarchy: Hero → compact disclosure → providers → education →
   full disclosure. */
.loan-info-page {
  display: flex;
  flex-direction: column;
}

.loan-info-page > .loan-info-breadcrumb,
.loan-info-page > .loan-info-hero { order: 0; }
.loan-info-page > #loan-cost-comparison { order: 1; }
.loan-info-page > .dq-compact-disclosure { order: 2; }
.loan-info-page > #compliant-providers { order: 3; }
.loan-info-page > #loan-cost-checklist { order: 4; }
.loan-info-page > .loan-info-section-soft { order: 5; }
.loan-info-page > .platform-financial-disclosure { order: 6; }
.loan-info-page > .loan-info-platform-note { order: 7; }
.loan-info-page > .loan-info-return { order: 8; }

/* Core Quality Safe Action: mobile entry priority and touch height only. */
@media (max-width: 767px) {
  .loan-info-intent-grid .loan-info-intent-card[href="#compliant-providers"] {
    order: -1;
  }

  .loan-info-intent-grid .loan-info-intent-card,
  .loan-info-next-step a {
    min-height: 44px;
  }
}
