
/* APG Social + Footer Polish v93.1 */
.apg-social-v56,
.apg-mobile-social-v56,
.apg-social-about-v56{
  --apg-social-border:rgba(148,163,184,.30);
  --apg-social-border-hover:rgba(96,165,250,.72);
  --apg-social-surface:rgba(255,255,255,.035);
  --apg-social-surface-hover:rgba(37,99,235,.10);
}

.apg-social-v56{
  padding-bottom:24px!important;
}

.apg-social-v56-list,
.apg-mobile-social-v56-list{
  align-items:stretch!important;
  gap:10px!important;
}

.apg-social-v56-link,
.apg-mobile-social-v56-link{
  box-sizing:border-box!important;
  border-color:var(--apg-social-border)!important;
  border-radius:12px!important;
  background:var(--apg-social-surface)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
  gap:10px!important;
  transform:none!important;
}

.apg-social-v56-link:hover,
.apg-social-v56-link:focus-visible,
.apg-mobile-social-v56-link:hover,
.apg-mobile-social-v56-link:focus-visible{
  border-color:var(--apg-social-border-hover)!important;
  background:var(--apg-social-surface-hover)!important;
  transform:none!important;
}

.apg-social-v56-glyph{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  flex:0 0 28px!important;
  border-radius:7px!important;
  box-shadow:none!important;
}

.apg-social-v56-glyph svg{
  width:18px!important;
  height:18px!important;
}

.apg-social-v56-glyph.is-facebook{
  background:#0866FF!important;
  color:#fff!important;
  border-radius:50%!important;
}

.apg-social-v56-glyph.is-instagram{
  background:radial-gradient(circle at 31% 107%,#fdf497 0 5%,#fdf497 5% 9%,#fd5949 40%,#d6249f 60%,#285AEB 90%)!important;
  color:#fff!important;
  border-radius:8px!important;
}

.apg-social-v56-glyph.is-threads{
  background:#000!important;
  color:#fff!important;
  border-radius:8px!important;
}

.apg-social-v56-glyph.is-x{
  background:#000!important;
  color:#fff!important;
  border-radius:7px!important;
}

.apg-social-v56-glyph.is-pinterest{
  background:#E60023!important;
  color:#fff!important;
  border-radius:50%!important;
}

.apg-social-v56-glyph.is-linkedin{
  background:#0A66C2!important;
  color:#fff!important;
  border-radius:6px!important;
}

.apg-mobile-social-v56{
  padding-bottom:16px!important;
}

@media (max-width:760px){
  .apg-social-v56{
    margin-bottom:0!important;
    padding-bottom:26px!important;
  }

  .apg-social-v56-list{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }

  .apg-social-v56-link{
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    padding:9px 12px!important;
    justify-content:flex-start!important;
  }

  .apg-social-v56-link>span:last-child,
  .apg-mobile-social-v56-link>span:last-child{
    min-width:0!important;
    font-size:15px!important;
    line-height:1.15!important;
    font-weight:700!important;
    letter-spacing:-.01em!important;
  }

  .apg-social-v56 + .footer-v11-rulebar{
    margin-top:0!important;
  }

  .apg-mobile-social-v56-list{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .apg-mobile-social-v56-link{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    padding:8px 11px!important;
    justify-content:flex-start!important;
  }

  /* Match the same 18px mobile content edge used by the footer itself. */
  .apg-footer-v11 .apg-cookie-footer-wrap,
  .apg-footer-v11 + .apg-cookie-footer-wrap,
  .apg-cookie-footer-wrap{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:20px 18px calc(24px + env(safe-area-inset-bottom,0px))!important;
  }

  .apg-cookie-footer-button{
    position:static!important;
    left:auto!important;
    right:auto!important;
    align-self:flex-start!important;
    margin:0!important;
    transform:none!important;
  }

  /* My APG optional account sync: isolate mobile sizing from legacy grid/flex rules. */
  body[data-platform-page="/my-apg/"] .apg-account-shell{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-head{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    text-align:left!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-body{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    padding:20px!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    gap:16px!important;
    margin:0!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-form > label:not(.apg-account-consent){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-column:1!important;
    gap:7px!important;
    align-items:start!important;
    justify-items:stretch!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    position:static!important;
    text-align:left!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-form input[type="email"],
  body[data-platform-page="/my-apg/"] .apg-account-form input[type="password"],
  body[data-platform-page="/my-apg/"] .apg-account-form input[type="text"]{
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    margin:0!important;
    position:static!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-actions{
    grid-column:1!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:10px!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-actions .button,
  body[data-platform-page="/my-apg/"] .apg-account-actions button{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    text-align:center!important;
    white-space:normal!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-small,
  body[data-platform-page="/my-apg/"] .apg-account-form > p{
    grid-column:1!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    text-align:left!important;
  }

  /* Workspace cards: titles and eyebrow labels align to the content edge. */
  body[data-platform-page="/my-apg/"] .workspace-panel,
  body[data-platform-page="/my-apg/"] .research-shelf{
    text-align:left!important;
  }

  body[data-platform-page="/my-apg/"] .workspace-panel .section-head,
  body[data-platform-page="/my-apg/"] .workspace-panel .section-head.compact-head,
  body[data-platform-page="/my-apg/"] .research-shelf .section-head,
  body[data-platform-page="/my-apg/"] .research-shelf .section-head.compact-head{
    display:block!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    text-align:left!important;
  }

  body[data-platform-page="/my-apg/"] .workspace-panel .section-head > div,
  body[data-platform-page="/my-apg/"] .research-shelf .section-head > div,
  body[data-platform-page="/my-apg/"] .workspace-panel .section-head .kicker,
  body[data-platform-page="/my-apg/"] .research-shelf .section-head .kicker,
  body[data-platform-page="/my-apg/"] .workspace-panel .section-head h2,
  body[data-platform-page="/my-apg/"] .research-shelf .section-head h2{
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    text-align:left!important;
    align-self:flex-start!important;
  }

  /* Prevent the two history-level actions becoming an uneven wrapped mobile pair. */
  body[data-platform-page="/my-apg/"] .workspace-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:10px!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
  }

  body[data-platform-page="/my-apg/"] .workspace-actions .button,
  body[data-platform-page="/my-apg/"] .workspace-actions button,
  body[data-platform-page="/my-apg/"] .workspace-actions a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    text-align:center!important;
    white-space:normal!important;
  }
}

@media (max-width:380px){
  .apg-social-v56-link,
  .apg-mobile-social-v56-link{
    padding-left:10px!important;
    padding-right:10px!important;
    gap:8px!important;
  }

  .apg-social-v56-link>span:last-child,
  .apg-mobile-social-v56-link>span:last-child{
    font-size:14px!important;
  }
}

@media (max-width:360px){
  body[data-platform-page="/my-apg/"] .apg-account-actions{
    grid-template-columns:minmax(0,1fr)!important;
  }
}
