/* AVD-Zentrum subpage structural + highlight normalization, 2026-09-07 */

/* 1) Structural repair: avd-sub-layout was historically fixed to TOC / article / sidebar.
   Newer pages often omit one or both rails. Adapt the grid to the children actually present. */
@media (min-width:821px){
  .avd-sub-layout:not(:has(> .avd-sub-toc-col)):not(:has(> .avd-sub-sidebar)){
    grid-template-columns:minmax(0,880px)!important;
    justify-content:center!important;
  }
  .avd-sub-layout:has(> .avd-sub-toc-col):not(:has(> .avd-sub-sidebar)){
    grid-template-columns:210px minmax(0,820px)!important;
    justify-content:center!important;
  }
  .avd-sub-layout:not(:has(> .avd-sub-toc-col)):has(> .avd-sub-sidebar){
    grid-template-columns:minmax(0,820px) 270px!important;
    justify-content:center!important;
  }
  .avd-sub-layout:not(:has(> .avd-sub-toc-col)):not(:has(> .avd-sub-sidebar)) > .avd-sub-article,
  .avd-sub-layout:has(> .avd-sub-toc-col):not(:has(> .avd-sub-sidebar)) > .avd-sub-article,
  .avd-sub-layout:not(:has(> .avd-sub-toc-col)):has(> .avd-sub-sidebar) > .avd-sub-article{
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
  }
}
@media (min-width:821px) and (max-width:1100px){
  .avd-sub-layout:not(:has(> .avd-sub-toc-col)):not(:has(> .avd-sub-sidebar)){
    grid-template-columns:minmax(0,820px)!important;
  }
  .avd-sub-layout:has(> .avd-sub-toc-col):not(:has(> .avd-sub-sidebar)){
    grid-template-columns:190px minmax(0,1fr)!important;
  }
  .avd-sub-layout:not(:has(> .avd-sub-toc-col)):has(> .avd-sub-sidebar){
    grid-template-columns:minmax(0,1fr) 250px!important;
  }
}

/* 2) Generic analysis/highlight hero card. Numerous newer editorial pages use the compact
   >span + >div>small+strong structure, while the legacy base stylesheet only styled h2/p cards. */
.avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card) > span:first-child{
  display:block;
  margin:0 0 12px;
  color:#f58220;
  font-size:10px;
  line-height:1.3;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card) > div{
  min-width:0;
  padding:12px 0;
  border-top:1px solid #e3ebf1;
}
.avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card) > div:first-of-type{
  border-top:0;
  padding-top:2px;
}
.avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card) > div small{
  display:block;
  margin:0 0 4px;
  color:#71869a;
  font-size:9px;
  line-height:1.35;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card) > div strong{
  display:block;
  min-width:0;
  color:#073b6f;
  font-size:15px;
  line-height:1.38;
  font-weight:850;
  overflow-wrap:anywhere;
  word-break:normal;
}

/* 3) Editorial highlight / alert normalization */
.avdz-alert,
.avdz-sourcebox,
.avd-sub-callout{
  box-sizing:border-box;
  max-width:100%;
  overflow-wrap:anywhere;
}
.avdz-alert{
  border-left-width:4px!important;
  padding:18px 20px!important;
  line-height:1.62;
  box-shadow:0 6px 20px rgba(7,59,111,.045);
}
.avdz-alert > b:first-child,
.avdz-sourcebox > b:first-child{
  color:#073b6f;
}

/* 4) Checklist/card hygiene */
.avdz-checklist20 > div,
.avdz-consumer-card,
.avdz-risk,
.avdz-step,
.avdz-upgrade-card{
  min-width:0;
  overflow-wrap:anywhere;
}
.avdz-checklist20 > div{
  padding:18px!important;
  border-radius:16px!important;
  box-shadow:0 7px 22px rgba(5,45,87,.045);
}
.avdz-checklist20 > div > p:last-child{margin-bottom:0!important;}

/* 5) Smartphone/tablet polish for shared editorial boxes */
@media (max-width:820px){
  .avd-sub-layout{width:100%;}
  .avd-sub-article{min-width:0;width:100%;}
  .avd-sub-hero-card{min-width:0;width:100%;max-width:100%;}
  .avdz-alert,.avdz-sourcebox,.avd-sub-callout{width:100%;}
}
@media (max-width:560px){
  .avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card){
    padding:20px!important;
    border-radius:16px!important;
  }
  .avd-sub-hero-card:not(.avdz-provider-hero):not(.avdz-zg-hero-card):not(.avdf-hero-card):not(.avdp-hero-card):not(.ri-hero-card):not(.contact-hero-card):not(.beratung-hero-card):not(.glossary-hero-card) > div strong{
    font-size:14px;
  }
  .avdz-alert{padding:16px 17px!important;border-radius:12px!important;}
  .avdz-checklist20{gap:10px!important;}
  .avdz-checklist20 > div{padding:16px!important;}
}

/* Explicit server-side layout markers: compatibility fallback and deterministic rendering. */
@media (min-width:821px){
  .avd-sub-layout.avd-sub-layout--article-only{grid-template-columns:minmax(0,880px)!important;justify-content:center!important;}
  .avd-sub-layout.avd-sub-layout--toc-article{grid-template-columns:210px minmax(0,820px)!important;justify-content:center!important;}
  .avd-sub-layout.avd-sub-layout--article-sidebar{grid-template-columns:minmax(0,820px) 270px!important;justify-content:center!important;}
  .avd-sub-layout.avd-sub-layout--article-only>.avd-sub-article,
  .avd-sub-layout.avd-sub-layout--toc-article>.avd-sub-article,
  .avd-sub-layout.avd-sub-layout--article-sidebar>.avd-sub-article{min-width:0!important;width:100%!important;max-width:none!important;}
}
@media (min-width:821px) and (max-width:1100px){
  .avd-sub-layout.avd-sub-layout--article-only{grid-template-columns:minmax(0,820px)!important;}
  .avd-sub-layout.avd-sub-layout--toc-article{grid-template-columns:190px minmax(0,1fr)!important;}
  .avd-sub-layout.avd-sub-layout--article-sidebar{grid-template-columns:minmax(0,1fr) 250px!important;}
}
