body.cmx-account-modal-open { overflow: hidden; }
.cmx-account-modal[hidden] { display: none !important; }
.cmx-account-modal { position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center; padding: 24px; }
.cmx-account-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0,31,69,.72); cursor: default; }
.cmx-account-dialog { position: relative; z-index: 1; width: min(920px,100%); max-height: calc(100vh - 48px); overflow: auto; padding: 32px; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(0,31,69,.3); color: #052e5c; }
.cmx-account-dialog>h2 { margin: 0 52px 22px 0; color: #052e5c; font-size: clamp(28px,4vw,38px); }
.cmx-account-close { position: absolute; top: 16px; right: 16px; display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid #cfdfeb; border-radius: 50%; background: #fff; color: #052e5c; font: 700 30px/1 Arial,sans-serif; cursor: pointer; }
.cmx-account-close:hover { border-color: #e53935; color: #e53935; }
.cmx-account-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.cmx-account-choice { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 26px; border: 1px solid #cfdfeb; border-radius: 16px; background: #f8fbfe; }
.cmx-account-choice-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 16px; border-radius: 14px; background: #ffd500; font-size: 25px; }
.cmx-account-choice h3 { margin: 0 0 9px; color: #052e5c; font-size: 22px; line-height: 1.25; }
.cmx-account-choice p { flex: 1; margin: 0 0 20px; color: #3d5870; font-size: 16px; line-height: 1.6; }
.cmx-account-choice small { display: block; margin-top: 11px; color: #66788a; font-size: 12px; line-height: 1.45; }
body.cmx-pwa-bottom-nav-page .cmx-pwa-bottom-nav { z-index: 100001; }
body.cmx-pwa-bottom-nav-page .cmx-account-modal { padding-bottom: calc(var(--cmx-pwa-bottom-nav-height,66px) + env(safe-area-inset-bottom) + 16px); }
body.cmx-pwa-bottom-nav-page .cmx-account-dialog { max-height: calc(100dvh - var(--cmx-pwa-bottom-nav-height,66px) - env(safe-area-inset-bottom) - 40px); }

.cmx-personal-auth { display: grid; gap: 18px; }
.cmx-favorite-auth-intro { padding: 15px 17px; border-left: 4px solid var(--cmx-action-yellow,#ffd500); border-radius: 9px; background: #fff9d6; color: #294763; }
.cmx-favorite-auth-intro[hidden] { display: none !important; }
.cmx-favorite-auth-intro p { margin: 0; font-size: 15px; line-height: 1.55; }
.cmx-account-dialog.cmx-account-dialog-auth { width: min(720px,100%); }
.cmx-personal-back { width: fit-content; }
.cmx-personal-tabs { display: flex; gap: 8px; padding: 5px; border-radius: 12px; background: #eef4f8; }
.cmx-personal-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: #052e5c; font-weight: 800; cursor: pointer; }
.cmx-personal-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 3px 12px rgba(5,46,92,.12); }
.cmx-personal-form { display: grid; gap: 16px; }
.cmx-personal-form h3 { margin: 0; color: #052e5c; }
.cmx-personal-form p { margin: 0; }
.cmx-personal-form label:not(.cmx-personal-consent) { display: grid; gap: 7px; color: #052e5c; font-weight: 800; }
.cmx-personal-form input:not([type="checkbox"]):not([type="hidden"]) { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #aebdca; border-radius: 9px; background: #fff; color: #102b46; font: inherit; }
.cmx-personal-form input:focus-visible { outline: 3px solid rgba(0,93,179,.24); outline-offset: 2px; border-color: #005db3; }
.cmx-personal-password-field { display: grid; gap: 7px; color: #052e5c; font-weight: 800; }
.cmx-personal-password-control { position: relative; }
.cmx-personal-password-control input { padding-right: 94px !important; }
.cmx-password-toggle { position: absolute; top: 50%; right: 8px; min-width: 76px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: #005db3; font: 800 13px/1.2 Arial,sans-serif; cursor: pointer; transform: translateY(-50%); }
.cmx-password-toggle:hover { background: #eef7ff; }
.cmx-password-toggle:focus-visible { outline: 3px solid rgba(0,93,179,.28); outline-offset: 1px; }
.cmx-personal-field-hint { color: #526476; font-size: 12px; font-weight: 600; }
.cmx-account-auth-heading { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #cfdfeb; border-radius: 14px; background: #f8fbfe; }
.cmx-account-auth-heading .cmx-account-choice-icon { flex: 0 0 48px; margin: 0; }
.cmx-account-auth-heading h3 { margin: 0 0 4px; color: #052e5c; font-size: 21px; }
.cmx-account-auth-heading p { margin: 0; color: #526476; font-size: 14px; line-height: 1.45; }
.cmx-auth-secondary-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; }
.cmx-personal-consent { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 10px; color: #3d5870; font-size: 14px; line-height: 1.55; }
.cmx-personal-consent input { width: 18px; height: 18px; margin-top: 2px; }
.cmx-personal-consent a { color: #005db3; font-weight: 800; }
body.cmx-site .cmx-personal-submit { width: fit-content; min-height: 46px; padding: 12px 20px; border: 1px solid var(--cmx-action-yellow,#ffd500) !important; border-radius: 9px; background: var(--cmx-action-yellow,#ffd500) !important; color: var(--cmx-action-ink,#052e5c) !important; font-weight: 900; cursor: pointer; }
body.cmx-site .cmx-personal-submit:hover,body.cmx-site .cmx-personal-submit:focus-visible { border-color: var(--cmx-action-yellow-hover,#e6bf00) !important; background: var(--cmx-action-yellow-hover,#e6bf00) !important; color: var(--cmx-action-ink,#052e5c) !important; }
body.cmx-site .cmx-personal-submit:focus-visible,.cmx-account-text-action:focus-visible { outline: 3px solid var(--cmx-action-ink,#052e5c) !important; outline-offset: 3px; }
body.cmx-site .cmx-personal-submit:disabled { border-color: #c8d0da !important; background: #e6eaf0 !important; color: #647386 !important; cursor: not-allowed; }
.cmx-account-text-action { padding: 0; border: 0; background: transparent; color: #005db3; font: 800 14px/1.4 Arial,sans-serif; text-decoration: underline; cursor: pointer; }
.cmx-account-session-actions { display: grid; justify-items: center; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #dce6e3; }
.cmx-account-logout-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border: 2px solid #052e5c; border-radius: 9px; background: #fff; color: #052e5c; font: 900 14px/1.3 Arial,sans-serif; cursor: pointer; transition: background-color .18s ease,border-color .18s ease,transform .18s ease; }
.cmx-account-logout-action:hover { border-color: var(--cmx-action-yellow,#ffd500); background: #fff9d6; color: #052e5c; transform: translateY(-1px); }
.cmx-account-logout-action:focus-visible { outline: 3px solid rgba(5,46,92,.28); outline-offset: 3px; }
.cmx-account-logout-action:disabled { border-color: #c8d0da; background: #e6eaf0; color: #647386; cursor: wait; transform: none; }
.cmx-personal-status { min-height: 1.4em; margin: 0; color: #3d5870; font-size: 14px; font-weight: 700; }
.cmx-personal-status.is-error { color: #b32d2e; }
.cmx-personal-status.is-success { color: #087f23; }
.cmx-personal-summary { display: grid; gap: 18px; }
.cmx-personal-summary p { margin: 0; color: #3d5870; line-height: 1.6; }
.cmx-personal-summary-actions,.cmx-personal-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cmx-account-choice-action { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 12px 18px; border: 1px solid #052e5c; border-radius: 9px; background: #052e5c; color: #fff !important; font: 800 14px/1.35 Arial,sans-serif; text-align: center; text-decoration: none !important; cursor: pointer; }
.cmx-account-choice-action:hover,.cmx-account-choice-action:focus-visible { background: #075a9b; border-color: #075a9b; color: #fff !important; }
.cmx-account-choice-action.is-disabled { border-color: #cdd6de; background: #e8edf1; color: #607080 !important; cursor: not-allowed; }

.cmx-personal-account-page { min-height: 65vh; padding: 56px 20px 80px; background: #f3faf7; }
.cmx-personal-account-shell { width: min(760px,100%); margin: 0 auto; padding: clamp(24px,5vw,48px); border: 1px solid #dce6e3; border-radius: 20px; background: #fff; box-shadow: 0 14px 40px rgba(11,49,89,.08); }
.cmx-personal-account-shell h1 { margin: 8px 0 28px; color: #052e5c; font-size: clamp(34px,6vw,50px); }
.cmx-personal-account-shell .cmx-eyebrow { color: #087454; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.cmx-personal-details { display: grid; gap: 12px; margin: 0 0 26px; }
.cmx-personal-details div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid #dce6e3; }
.cmx-personal-details dt { color: #526476; font-weight: 800; }
.cmx-personal-details dd { margin: 0; color: #052e5c; overflow-wrap: anywhere; }
.cmx-personal-password-request { margin-top: 24px; }
.cmx-personal-notice { margin-bottom: 22px; padding: 16px 18px; border-left: 4px solid #005db3; border-radius: 8px; background: #eef7ff; color: #173b5e; }
.cmx-personal-notice.is-error { border-color: #b32d2e; background: #fff4f4; color: #7a2425; }

@media(max-width:680px){
  .cmx-account-modal { align-items: start; padding: 12px 12px calc(var(--cmx-pwa-bottom-nav-height,66px) + env(safe-area-inset-bottom) + 12px); }
  .cmx-account-dialog { max-height: calc(100dvh - var(--cmx-pwa-bottom-nav-height,66px) - env(safe-area-inset-bottom) - 24px); padding: 24px 18px; border-radius: 16px; }
  .cmx-account-choice-grid { grid-template-columns: 1fr; }
  .cmx-account-dialog>h2 { font-size: 28px; }
  .cmx-account-close { top: 10px; right: 10px; }
  .cmx-account-choice { padding: 20px; }
  .cmx-personal-tabs { flex-direction: column; }
  .cmx-personal-submit,.cmx-personal-summary-actions .cmx-account-choice-action,.cmx-personal-account-actions .cmx-account-choice-action,.cmx-personal-summary-actions .cmx-account-logout-action,.cmx-account-session-actions .cmx-account-logout-action { width: 100%; }
  .cmx-personal-summary-actions,.cmx-personal-account-actions { align-items: stretch; flex-direction: column; }
  .cmx-personal-details div { grid-template-columns: 1fr; gap: 6px; }
  .cmx-personal-account-page { padding: 28px 12px 56px; }
}
