/* V11 visual polish: one brand blue, animated catalogue links and clean footer. */
body.mgn-design-preview {
  --mgn-blue: #1976d2;
  --mgn-blue-dark: #1976d2;
  --mgn-blue-soft: #eaf4ff;
  --bs-primary: #1976d2;
  --bs-link-color: #1976d2;
}

body.mgn-mfo-preview {
  --mgn-mfo-blue: #1976d2;
  --mgn-mfo-blue-dark: #135fae;
}

.mgn-design-preview .mgn-site-header .navbar-brand,
.mgn-design-preview .mgn-v2-nav a,
.mgn-design-preview .mgn-v2-more-toggle,
.mgn-design-preview .mgn-v2-more-toggle .mgn-v2-more-burger,
.mgn-design-preview .mgn-v2-more-toggle .mgn-v2-more-chevron {
  color: #1976d2 !important;
}

.mgn-design-preview .mgn-v2-nav a:hover,
.mgn-design-preview .mgn-v2-nav a:focus-visible,
.mgn-design-preview .mgn-v2-nav a.is-current,
.mgn-design-preview .mgn-v2-more-toggle:hover,
.mgn-design-preview .mgn-v2-more-toggle:focus-visible,
.mgn-design-preview .mgn-v2-more.has-current .mgn-v2-more-toggle,
.mgn-design-preview .mgn-v2-more.is-open .mgn-v2-more-toggle {
  color: #1976d2;
  background: #eaf4ff;
}

.mgn-design-preview .mgn-section-reviews-arrow,
.mgn-mfo-preview .mgn-mfo-review-arrow {
  color: #1976d2;
}

/* V12: every generic icon on section pages is an external SVG image. */
.mgn-section-v2 .mgn-ui-asset-icon {
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

/* External SVG files cannot inherit currentColor, so each background gets a
   deliberate high-contrast icon treatment. */
.mgn-section-v2 .mgn-hero-actions li .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-secondary-action .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-catalogue-tools button .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-source-notice-icon .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-filter-close .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-mobile-filter-trigger .mgn-ui-asset-icon {
  filter: brightness(0) invert(1);
  opacity: .96;
}

.mgn-section-v2 .mgn-primary-action .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-footer-warning-icon .mgn-ui-asset-icon,
.mgn-section-v2 .mgn-v2-top-cta .mgn-ui-asset-icon {
  filter: brightness(0) saturate(100%) invert(12%) sepia(19%) saturate(1623%) hue-rotate(178deg) brightness(92%) contrast(96%);
}

.mgn-section-v2 .mgn-updated .mgn-ui-asset-icon {
  filter: brightness(0) saturate(100%) invert(50%) sepia(42%) saturate(796%) hue-rotate(108deg) brightness(91%) contrast(93%);
}

.mgn-section-v2 .mgn-breadcrumb-separator .mgn-ui-asset-icon {
  filter: grayscale(1);
  opacity: .58;
}

.mgn-section-v2 #footer .mgn-footer-disclosure-grid .mgn-ui-asset-icon {
  filter: brightness(0) saturate(100%) invert(84%) sepia(91%) saturate(1134%) hue-rotate(337deg) brightness(105%) contrast(102%);
}

/* Linked company names and supporting links must read as interactive. */
.mgn-section-v2 .mgn-v2-offer-copy h3 a,
.mgn-section-v2 .mgn-v2-reviews-link,
.mgn-section-v2 .mgn-v2-conditions-link {
  color: #1976d2 !important;
  text-decoration-line: underline;
  text-decoration-color: rgba(25, 118, 210, .38);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease,
    text-underline-offset .2s ease, transform .2s ease;
}

.mgn-section-v2 .mgn-v2-offer-copy h3 a {
  display: inline-block;
}

.mgn-section-v2 .mgn-v2-offer-copy h3 a:hover,
.mgn-section-v2 .mgn-v2-offer-copy h3 a:focus-visible,
.mgn-section-v2 .mgn-v2-reviews-link:hover,
.mgn-section-v2 .mgn-v2-reviews-link:focus-visible,
.mgn-section-v2 .mgn-v2-conditions-link:hover,
.mgn-section-v2 .mgn-v2-conditions-link:focus-visible {
  color: #0d5cab !important;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transform: translateY(-2px);
}

.mgn-design-preview .mgn-quick-links a,
.mgn-design-preview .mgn-quick-links button {
  position: relative;
  color: #31516f;
  transition: transform .22s ease, border-color .22s ease, color .22s ease,
    background-color .22s ease, box-shadow .22s ease;
}

.mgn-design-preview .mgn-quick-links a:hover,
.mgn-design-preview .mgn-quick-links a:focus-visible {
  border-color: #1976d2;
  color: #1976d2;
  background: #f7fbff;
  box-shadow: 0 9px 22px rgba(25, 118, 210, .17);
  transform: translateY(-3px);
}

.mgn-design-preview .mgn-quick-links button {
  border-color: #1976d2;
  color: #1976d2;
}

.mgn-design-preview .mgn-quick-links button .mgn-ui-asset-icon {
  transition: filter .22s ease;
}

.mgn-design-preview .mgn-quick-links button:hover,
.mgn-design-preview .mgn-quick-links button:focus-visible {
  border-color: #1976d2;
  color: #fff;
  background: #1976d2;
  box-shadow: 0 10px 24px rgba(25, 118, 210, .24);
  transform: translateY(-3px);
}

.mgn-design-preview .mgn-quick-links button:hover .mgn-ui-asset-icon,
.mgn-design-preview .mgn-quick-links button:focus-visible .mgn-ui-asset-icon {
  filter: brightness(0) invert(1);
}

.mgn-design-preview .mgn-quick-links a:active,
.mgn-design-preview .mgn-quick-links button:active {
  transform: translateY(0) scale(.98);
}

.mgn-design-preview #footer.mgn-v2-footer .mgn-footer-bottom {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(220px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 20px 30px;
  width: 100%;
}

.mgn-design-preview #footer.mgn-v2-footer .mgn-footer-copyright {
  margin: 0;
  white-space: nowrap;
}

.mgn-design-preview #footer.mgn-v2-footer .social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.mgn-design-preview #footer.mgn-v2-footer .social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 8px 4px 4px;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}

.mgn-design-preview #footer.mgn-v2-footer .social a:hover,
.mgn-design-preview #footer.mgn-v2-footer .social a:focus-visible {
  background: rgba(255, 255, 255, .1);
  transform: translateY(-2px);
}

.mgn-design-preview #footer.mgn-v2-footer .social img {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.mgn-design-preview #footer.mgn-v2-footer .mgn-footer-nav .menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px 24px;
  margin: 0;
  padding: 0;
}

.mgn-design-preview #footer.mgn-v2-footer .mgn-footer-nav .menu > li {
  margin: 0;
}

.mgn-design-preview #footer.mgn-v2-footer .mgn-footer-nav .nav-link {
  display: block;
  padding: 8px 0;
  white-space: nowrap;
}

/* External SVG images in all requested MFO blocks. */
.mgn-mfo-preview .mgn-mfo-asset-icon {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.mgn-mfo-preview .mgn-mfo-kicker-image,
.mgn-mfo-preview .mgn-mfo-section-image {
  width: 27px;
  height: 27px;
}

.mgn-mfo-preview .mgn-mfo-lead-image {
  width: 38px;
  height: 38px;
}

.mgn-mfo-preview .mgn-mfo-title-image {
  width: 29px;
  height: 29px;
}

.mgn-mfo-preview .mgn-mfo-metric-image {
  width: 30px;
  height: 30px;
}

.mgn-mfo-preview .mgn-mfo-details-title,
.mgn-mfo-preview .mgn-mfo-contacts-panel > h2,
.mgn-mfo-preview .mgn-mfo-document-card > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mgn-mfo-preview .mgn-mfo-details-image,
.mgn-mfo-preview .mgn-mfo-contact-title-image,
.mgn-mfo-preview .mgn-mfo-card-title-image {
  width: 33px;
  height: 33px;
}

.mgn-mfo-preview .mgn-mfo-field-image,
.mgn-mfo-preview .mgn-mfo-row-image {
  width: 30px;
  height: 30px;
}

/* Compact row icons only inside MFO loan details and contacts. */
.mgn-mfo-preview .mgn-mfo-details-panel .mgn-mfo-field-image,
.mgn-mfo-preview .mgn-mfo-contacts-panel .mgn-mfo-field-image {
  width: 24px;
  height: 24px;
}

.mgn-mfo-preview .mgn-mfo-documents-image {
  width: 33px;
  height: 33px;
}

.mgn-mfo-preview .mgn-review-top .mgn-review-date {
  margin-left: auto;
}

/* Native carousel for recommendations embedded in article and news details. */
.mgn-editorial-week { margin: 34px 0; }

.mgn-editorial-week-carousel {
  position: relative;
  padding: 0 48px;
}

.mgn-editorial-week .mgn-section-week-grid {
  display: grid;
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 18px) / 2);
  grid-auto-flow: column;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 2px 0 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.mgn-editorial-week .mgn-section-week-grid::-webkit-scrollbar { display: none; }

.mgn-editorial-week .mgn-v2-week-card {
  width: 100%;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
}

.mgn-editorial-week .mgn-v2-week-shell { height: 100%; }

.mgn-editorial-week-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbdced;
  border-radius: 50%;
  color: #0b6de0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 50, 93, .12);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.mgn-editorial-week-arrow:hover:not(:disabled) {
  color: #fff;
  border-color: #0877ef;
  background: #0877ef;
  box-shadow: 0 10px 24px rgba(8, 119, 239, .24);
}

.mgn-editorial-week-arrow .mgn-icon { width: 18px; height: 18px; }
.mgn-editorial-week-arrow.is-prev { left: 0; transform: translateY(-50%) rotate(90deg); }
.mgn-editorial-week-arrow.is-next { right: 0; transform: translateY(-50%) rotate(-90deg); }
.mgn-editorial-week-arrow:disabled { cursor: default; opacity: .35; }

@media (max-width: 991px) {
  .mgn-design-preview #footer.mgn-v2-footer .mgn-footer-bottom {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }

  .mgn-design-preview #footer.mgn-v2-footer .mgn-footer-nav .menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 4px 18px;
  }
}

@media (max-width: 480px) {
  .mgn-design-preview #footer.mgn-v2-footer .social a span {
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .mgn-editorial-week-carousel { padding: 0; }
  .mgn-editorial-week .mgn-section-week-grid { grid-auto-columns: 100%; }
  .mgn-editorial-week-arrow { width: 34px; height: 34px; }
  .mgn-editorial-week-arrow.is-prev { left: -10px; }
  .mgn-editorial-week-arrow.is-next { right: -10px; }
}

@media (prefers-reduced-motion: reduce) {
  .mgn-design-preview .mgn-quick-links a,
  .mgn-design-preview .mgn-quick-links button,
  .mgn-design-preview #footer.mgn-v2-footer .social a,
  .mgn-section-v2 .mgn-v2-offer-copy h3 a,
  .mgn-section-v2 .mgn-v2-reviews-link,
  .mgn-section-v2 .mgn-v2-conditions-link {
    transition: none;
  }
}
