/* Shared UI repairs. Desktop branding and signature-line geometry are untouched. */
html body fieldset:has(#aiUsed) .consent-check{
  display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;
  align-items:start!important;gap:12px!important;margin:16px 0!important;
}
html body fieldset:has(#aiUsed) .consent-check input[type="checkbox"]{
  width:22px!important;height:22px!important;min-width:22px!important;
  margin:2px 0 0!important;padding:0!important;box-sizing:border-box!important;
}
html body fieldset:has(#aiUsed) .consent-check span{line-height:1.5!important;min-width:0}
html body .mono-site main:has(> .hero:first-child){padding-top:var(--home-nav-offset,110px)!important}
.footer > .footer-group{min-width:0}
.footer > .footer-group > summary{display:block;list-style:none}
.footer > .footer-group > summary::-webkit-details-marker{display:none}
.footer > .footer-group > summary::marker{content:''}
@media(max-width:768px){
  html body .footer{display:block!important;padding:32px 24px 28px!important}
  html body .footer > div:first-child{margin-bottom:30px!important}
  html body .footer > div:first-child h3{font-size:13px!important;margin:0 0 15px!important}
  html body .footer > div:first-child p{font-size:16px!important;line-height:1.45!important;margin:0!important;max-width:none!important}
  html body .footer > .footer-group{border-top:1px solid #000;margin:0!important}
  html body .footer > .footer-group:last-child{border-bottom:1px solid #000}
  html body .footer > .footer-group > summary{display:flex;align-items:center;justify-content:space-between;min-height:56px;cursor:pointer;gap:16px}
  html body .footer > .footer-group > summary h3{font-size:13px!important;line-height:1.2!important;margin:0!important}
  html body .footer > .footer-group > summary::after{content:'+';font-size:22px;font-weight:400}
  html body .footer > .footer-group[open] > summary::after{content:'−'}
  html body .footer > .footer-group > p{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;margin:0!important;padding:0 0 16px!important;max-width:none!important}
  html body .footer > .footer-group > p br{display:none}
  html body .footer > .footer-group a{display:flex;align-items:center;min-height:38px;font-size:16px!important;line-height:1.3!important;font-weight:400!important}
}
/* First-paint gate: no compressed line fragments on portrait/small screens.
   The same condition is used by both moving-line scripts. */
@media(max-width:899px),(max-height:599px),(orientation:portrait){
  html body :is(#line-canvas,.mono-bg-svg,#auth-line-canvas,.auth-line-canvas,.line-caption-fog){display:none!important;visibility:hidden!important}
  html.has-scroll-guide body main #jury-preview > :is(h2,p)::before,
  html body main .m-section > :is(h1,h2,.mono-title,p,.mono-copy)::before,
  html body main .line-fog::before{content:none!important;display:none!important;box-shadow:none!important;background:transparent!important}
}
@media (max-width:768px){
  /* Beat legacy account-state rules: a cell must never exceed its grid row. */
  html body .mono-site .mega-grid.mega-grid > a{
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    align-self:stretch!important;
  }
  html body main .ui-fit-heading :is(a,span){font-size:inherit!important}
  html body .mono-site .mega-menu{
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  html body .mono-site .mega-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:repeat(8,minmax(52px,1fr))!important;
    min-height:420px!important;
    overflow:visible!important;
  }
  html body .mono-site .mega-grid > a{
    align-items:flex-start!important;
    justify-content:center!important;
    text-align:left!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    padding:10px 14px!important;
    border:0!important;
    box-shadow:none!important;
  }
  html body .mono-site .mega-grid > :nth-child(odd){
    box-shadow:inset -2px 0 #000!important;
  }
  html body .mono-site .mega-grid > .menu-spacer--1{box-shadow:none!important}
  html body .mono-site .mega-grid > a strong{
    font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important;
    font-weight:400!important;
    font-size:16px!important;
    line-height:1.25!important;
    letter-spacing:0!important;
    overflow-wrap:break-word;
  }
  html body .mono-site .mega-grid.menu-links-even > .menu-spacer--1{display:none!important}
}
