#pj-optin-slot{display:none}
.pj-optin-eligible #pj-optin-slot{display:block;height:64px}
#pj-optin{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;gap:24px;height:64px;padding:10px 48px 10px 20px;background:#173c36;color:#fff;font:16px/1.3 Arial,sans-serif}
#pj-optin[hidden],#pj-optin [hidden]{display:none!important}
#pj-optin p{margin:0;color:inherit}
#pj-optin-form{display:flex;align-items:center;gap:8px;margin:0;min-width:0}
#pj-optin input[type=email]{box-sizing:border-box;width:240px;min-width:0;height:44px;margin:0;padding:10px 12px;border:1px solid #fff;border-radius:4px;background:#fff;color:#173c36;font:16px/1.3 Arial,sans-serif}
#pj-optin button{box-sizing:border-box;min-height:44px;margin:0;padding:8px 20px;border:0;border-radius:4px;background:#f59b78;color:#172f2a;font:700 16px/1.3 Arial,sans-serif;cursor:pointer}
#pj-optin button:disabled{opacity:.7;cursor:wait}
#pj-optin #pj-optin-close{position:absolute;right:4px;top:10px;width:36px;padding:0;background:transparent;color:#fff;font-size:25px}
#pj-optin :focus-visible{outline:3px solid #ffdf75;outline-offset:2px}
#pj-optin-message{font-size:16px}
#pj-optin.pj-optin-error .pj-optin-pitch{display:none}
#pj-optin .pj-optin-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:1023px){
  html.pj-optin-eligible:has(#pj-optin .pj-course-choice) #pj-optin-slot{height:0}
  html.pj-optin-eligible body::after{content:"";display:block;height:calc(64px + env(safe-area-inset-bottom,0px))}
  #pj-optin{position:fixed;z-index:5;bottom:0;left:0;right:0;gap:0;height:calc(64px + env(safe-area-inset-bottom,0px));padding:10px 42px 10px 12px;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  #pj-optin .pj-optin-pitch{display:none}
  #pj-optin-form{width:100%;gap:8px}
  #pj-optin input[type=email]{flex:1;width:0}
  #pj-optin button[type=submit]{padding:8px 18px}
  #pj-optin.pj-optin-error #pj-optin-message{position:absolute;bottom:calc(100% + 4px);left:12px;right:12px;padding:10px;background:#173c36;border:1px solid #fff;border-radius:4px}
  #pj-optin.pj-optin-obstructed{visibility:hidden;pointer-events:none}
}
/* Course consent remains visible at every width; reserve its full height before hydration. */
.pj-course-choice{font:13px/1.35 Arial,sans-serif;max-width:420px;text-align:left}
.pj-course-choice label{display:block!important;white-space:normal}
.pj-course-choice small{display:block;font-size:11px;margin-top:3px}
#pj-optin-form{flex-wrap:wrap;max-width:650px}
#pj-optin .pj-course-choice{flex-basis:100%;max-width:none}
html.pj-optin-eligible:has(#pj-optin .pj-course-choice) #pj-optin-slot{height:144px}
#pj-optin:has(.pj-course-choice){height:144px}
@media(max-width:1023px){
 html.pj-optin-eligible:has(#pj-optin .pj-course-choice) #pj-optin-slot{height:0}
 html.pj-optin-eligible:has(#pj-optin .pj-course-choice) body::after{height:calc(176px + env(safe-area-inset-bottom,0px))}
 #pj-optin:has(.pj-course-choice){height:calc(176px + env(safe-area-inset-bottom,0px))}
 #pj-optin-form{align-content:center}
 #pj-optin .pj-course-choice{font-size:12px}
}

/* F139: optional preferences can expand without clipping mandatory consent. */
#pj-optin:has(.pj-alert-preferences){height:auto;min-height:144px;max-height:80vh;overflow:auto}
#pj-optin .pj-alert-preferences{flex-basis:100%;min-width:0;font-size:12px}
.pj-alert-preferences fieldset{min-width:0;max-width:100%;margin:6px 0;padding:8px}
.pj-alert-preferences summary{cursor:pointer}
.pj-alert-preferences input[type=text]{box-sizing:border-box;max-width:100%;min-width:0}
.pj-alert-preferences input[type=checkbox]{width:auto;min-height:20px;height:20px}
@media(max-width:1023px){#pj-optin:has(.pj-alert-preferences){min-height:176px}}
