/* Home layout: preserve the selected hierarchy and let real content determine height. */
body.lg-design #page-home .lg-hero h1 {
  font-size: clamp(3rem, 3.55vw, 4.375rem) !important;
  overflow-wrap: anywhere;
}

body.lg-design #page-home :is(.lg-process-images, .lg-process-steps) {
  min-width: 0;
  max-width: 100%;
}
body.lg-design #page-home .lg-process-steps > div {
  min-width: 0;
}
body.lg-design #page-home .lg-process-steps :is(h3, p) {
  overflow-wrap: anywhere;
}
body.lg-design #page-home .denis-cta > div > div {
  min-width: 0;
  max-width: 100%;
}
body.lg-design #page-home .denis-cta .whitespace-nowrap {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* Work cards have no series heading. The legacy enhancer still inserts an empty one. */
body.lg-design #page-home #works-track > a > .dpc-pc-card__top:empty {
  display: none !important;
}
body.lg-design #page-home #works-track .dpc-component-badge {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  min-height: 44px;
  gap: 7px;
  white-space: normal !important;
}
body.lg-design #page-home #works-track .dpc-component-badge strong {
  min-width: 0;
  max-width: 100%;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

@media (min-width: 1200px) {
  body.lg-design #page-home #home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1921px) {
  body.lg-design #page-home .lg-hero h1 { font-size: 4.75rem !important; }
}
@media (max-width: 979px) {
  /* Three warranty columns leave too little room for their headings on a tablet. */
  body.lg-design #page-home #warranty-section > div > .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.lg-design #page-home #warranty-section > div > .grid > div {
    border-left: 0 !important;
  }
  body.lg-design #page-home #warranty-section > div > .grid > div + div {
    border-top: 1px solid #d4f4fa1a;
  }
}
@media (max-width: 600px) {
  body.lg-design #page-home .lg-hero h1 {
    font-size: clamp(2.125rem, 8.9vw, 3rem) !important;
  }
  /* Keep the icon and step label together; give the actual explanation the full card width. */
  body.lg-design #page-home .lg-process-steps > div:has(> .flex-1) {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px !important;
  }
  body.lg-design #page-home .lg-process-steps > div > .flex-1 {
    display: contents;
  }
  body.lg-design #page-home .lg-process-steps > div > .flex-1 > div {
    grid-column: 2;
    grid-row: 1;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body.lg-design #page-home .lg-process-steps > div > .flex-1 > :is(h3, p) {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
  }
  body.lg-design #page-home .lg-process-steps > div:has(> .flex-1) > div:last-child {
    display: none;
  }
}

/* The rating is a single link, but its two visual groups may wrap with enlarged text. */
body.lg-design #page-home #contacts a.self-start {
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}
body.lg-design #page-home #contacts a.self-start > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* The first-screen proof strip keeps its content at a calmer, compact scale. */
body.lg-design #page-home .lg-proof {
  padding: 8px 10px !important;
  gap: 0 !important;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
body.lg-design #page-home .lg-proof > .dpc-plate {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 4px !important;
  font-size: 1rem !important;
  padding: 5px 12px !important;
}
body.lg-design #page-home .lg-proof .lg-proof-label,
body.lg-design #page-home .lg-proof .lg-proof-value {
  min-width: 0;
  max-width: 100%;
  padding: 0 !important;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.lg-design #page-home .lg-proof .lg-proof-value { color: var(--lg-muted); }
body.lg-design #page-home .lg-proof .lg-proof-rating { display: flex; align-items: center; gap: 5px; }
body.lg-design #page-home .lg-proof .text-lg { font-size: 1.125rem !important; }
@media (max-width: 760px) {
  body.lg-design #page-home .lg-proof { padding: 8px !important; }
  body.lg-design #page-home .lg-proof > .dpc-plate { font-size: .8125rem !important; padding: 12px 6px !important; }
  body.lg-design #page-home .lg-proof .text-lg { font-size: 1rem !important; }
}

/* Accessible names and readable mobile input are shared by the legacy home form. */
body.lg-design #page-home form :is(input:not([type=checkbox]),textarea) {font-size:max(1rem,16px)!important}

/* Legacy home sections retain their content when the user enlarges text. */
body.lg-design #page-home form :is(.dpc-inline-consent-v3,.consent-check) {min-width:0;max-width:100%}
body.lg-design #page-home form .consent-check > span {min-width:0;flex:1;overflow-wrap:anywhere}
body.lg-design #page-home form .dpc-inline-consent-v3 :is(p,a) {overflow-wrap:anywhere}
body.lg-design #page-home .lg-proof > .dpc-plate {flex-wrap:wrap}
body.lg-design #page-home .lg-proof > .dpc-plate > span {min-width:0;overflow-wrap:anywhere}
@media(max-width:760px) {
  body.lg-design #page-home .grid.grid-cols-2.gap-y-5 {
    display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr))!important;
  }
  body.lg-design #page-home .grid.grid-cols-2.gap-y-5 > div {min-width:0;overflow-wrap:anywhere}
  body.lg-design #page-home section:has(> div > .grid.grid-cols-2.gap-y-5) > div {padding-inline:20px!important}
  body.lg-design #page-home #warranty-section > div > div {padding-inline:24px!important}
  body.lg-design #page-home #warranty-section > div > .grid {padding:0!important}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:first-child {flex-wrap:wrap;gap:16px}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:first-child > div:first-child {width:56px;height:56px;flex-basis:56px}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:first-child > div:last-child {flex:1 1 10rem;min-width:0;overflow-wrap:anywhere}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:last-child {min-width:0;max-width:100%}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:last-child > div {max-width:100%;min-width:0;padding:10px 16px!important;gap:8px}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:last-child > div > span {min-width:0;overflow-wrap:anywhere}
  body.lg-design #page-home #warranty-section > div > div:first-child > div:last-child > div > svg {width:20px;height:20px;flex:0 0 20px}
  body.lg-design #page-home #warranty-section > div > .grid > div {padding:32px!important;min-width:0}
  body.lg-design #page-home #warranty-section > div > .grid > div > .flex:first-child {flex-wrap:wrap;gap:16px}
  body.lg-design #page-home #warranty-section > div > .grid > div > .flex:first-child > div {width:40px;height:40px;flex:0 0 40px}
  body.lg-design #page-home #warranty-section > div > .grid > div > .flex:first-child > h3 {flex:1 1 8rem;min-width:0;overflow-wrap:anywhere}
  body.lg-design #page-home #warranty-section > div > div:last-child > .flex:first-child {min-width:0;width:100%}
  body.lg-design #page-home #warranty-section > div > div:last-child > .flex:first-child > div {display:block;min-width:0;max-width:100%;overflow-wrap:anywhere;line-height:1.7}
  body.lg-design #page-home #warranty-section > div > div:last-child > .flex:first-child > div > svg {display:inline-block;vertical-align:middle;width:20px;height:20px;margin-inline-end:8px}
}

/* Long labels remain readable inside the available home column at larger text sizes. */
body.lg-design #page-home #brands .inline-block {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.lg-design #page-home section:has(> .grid > a[href^="/catalog?"]) :is(a, a > div) {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  body.lg-design #page-home section:has(> .grid > .dpc-home-faq-contact) { padding-inline: 16px !important; }
  body.lg-design #page-home .dpc-home-faq-contact { padding: 16px !important; }
  body.lg-design #page-home .dpc-home-faq-contact > .border-t > .flex {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body.lg-design #page-home .dpc-home-faq-contact > .border-t > .flex > svg {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    margin-inline-end: 8px;
  }
}
