
/* APG Mobile Account + Footer Polish v94.0 */
@media (max-width:760px){
  /* Cookie preferences must start on the same 18px edge as the mobile footer wrap. */
  .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;
    text-align:left!important;
  }

  .apg-footer-v11 .apg-cookie-footer-button,
  .apg-cookie-footer-button{
    position:static!important;
    inset:auto!important;
    float:none!important;
    align-self:flex-start!important;
    margin:0!important;
    transform:none!important;
  }

  /* Optional account sync: one field per row, full usable card width. */
  body[data-platform-page="/my-apg/"] .apg-account-shell,
  body[data-platform-page="/my-apg/"] .apg-account-head,
  body[data-platform-page="/my-apg/"] .apg-account-body,
  body[data-platform-page="/my-apg/"] [data-account-signed-out]{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    text-align:left!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-body{
    padding:20px!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-tabs{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!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;
    justify-items:stretch!important;
    box-sizing:border-box!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 / -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;
    inset:auto!important;
    float:none!important;
    transform:none!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;
    min-height:46px!important;
    height:auto!important;
    margin:0!important;
    position:static!important;
    inset:auto!important;
    float:none!important;
    transform:none!important;
  }

  body[data-platform-page="/my-apg/"] .apg-account-form .full,
  body[data-platform-page="/my-apg/"] .apg-account-consent,
  body[data-platform-page="/my-apg/"] .apg-account-note{
    grid-column:1 / -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;
  }

  body[data-platform-page="/my-apg/"] .apg-account-form-actions{
    grid-column:1 / -1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    gap:10px!important;
    margin:0!important;
    flex-wrap:wrap!important;
  }

  /* Every My APG card title reads from the left edge, including direct headings and
     headings wrapped in the shared section-head component. */
  body[data-platform-page="/my-apg/"] .workspace-panel,
  body[data-platform-page="/my-apg/"] .research-shelf,
  body[data-platform-page="/my-apg/"] [data-workspace-comparisons],
  body[data-platform-page="/my-apg/"] [data-workspace-guides]{
    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;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    text-align:left!important;
  }

  body[data-platform-page="/my-apg/"] .workspace-panel .section-head > div,
  body[data-platform-page="/my-apg/"] .workspace-panel .section-head .kicker,
  body[data-platform-page="/my-apg/"] .workspace-panel .section-head h2,
  body[data-platform-page="/my-apg/"] .workspace-panel > .kicker,
  body[data-platform-page="/my-apg/"] .workspace-panel > h2,
  body[data-platform-page="/my-apg/"] [data-workspace-comparisons] > .kicker,
  body[data-platform-page="/my-apg/"] [data-workspace-comparisons] > h2,
  body[data-platform-page="/my-apg/"] [data-workspace-guides] > .kicker,
  body[data-platform-page="/my-apg/"] [data-workspace-guides] > 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;
    align-self:flex-start!important;
    text-align:left!important;
  }

  /* The history controls are workspace-level mobile actions, not a two-column CTA pair. */
  body[data-platform-page="/my-apg/"] .workspace-controls{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    gap:10px!important;
    margin-top:24px!important;
  }

  body[data-platform-page="/my-apg/"] .workspace-controls > .button,
  body[data-platform-page="/my-apg/"] .workspace-controls > a,
  body[data-platform-page="/my-apg/"] .workspace-controls > 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/"] .workspace-controls > [data-workspace-status]{
    grid-column:1!important;
    width:100%!important;
    margin:0!important;
    text-align:left!important;
  }
}
