/* Shared readability and accessible information/account controls. */
body.v41.shelf-home .footer-links h4 {
  margin:0 0 12px; color:#243c59; font-size:14px; font-weight:650; line-height:1.5;
}
body.v41.shelf-home .footer-links a,
body.v41.shelf-home .footer-links button {
  display:flex; align-items:center; width:fit-content; max-width:100%;
  min-height:36px; padding:4px 0; border:0; border-radius:4px;
  background:transparent; color:#53677f; font:inherit; font-size:13px;
  line-height:1.65; text-align:left; text-decoration:none; opacity:1;
}
body.v41.shelf-home .footer-brand p,
body.v41.shelf-home .footer-cert p {
  color:#53677f; font-size:13px; line-height:1.8;
}
body.v41.shelf-home .footer-bottom-inner span {
  color:#63748b; font-size:12px!important; line-height:1.7;
}
body.v41.shelf-home .footer-links a:focus-visible,
body.v41.shelf-home .footer-links button:focus-visible {
  outline:2px solid #8bb5eb; outline-offset:4px;
}

/* Match the quiet, 44px dismiss control used in the member header. */
body.v41 #modalClose,
body.v41 #infoModalClose {
  display:inline-flex!important; align-items:center; justify-content:center;
  width:44px!important; height:44px!important; min-width:44px; min-height:44px;
  padding:0!important; border:0!important; border-radius:12px!important;
  background:transparent!important; color:#344b66!important; box-shadow:none!important;
  font-size:0!important; line-height:1!important; cursor:pointer;
  touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  transition:background-color 160ms ease,color 160ms ease;
}
body.v41 #modalClose::before,
body.v41 #infoModalClose::before {content:none!important;display:none!important}
body.v41 #modalClose::after,
body.v41 #infoModalClose::after {
  content:""; display:block; width:20px; height:20px; pointer-events:none;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
body.v41 #modalClose:focus-visible,
body.v41 #infoModalClose:focus-visible {
  outline:2px solid #8bb5eb; outline-offset:2px; background:#edf3fb!important;
}
body.v41 #modalClose:active,
body.v41 #infoModalClose:active {background:#e5eef9!important;color:#185eae!important}

/* Long information stays in an internal scroller; its title and dismiss remain visible. */
html:has(#infoModalMask.open) {overflow:hidden;scrollbar-gutter:stable}
body.v41:has(#infoModalMask.open) {overflow:hidden;overscroll-behavior:none}
body.v41 #infoModalMask {padding:20px}
body.v41 #infoModalMask .info-modal {
  position:relative; display:flex; flex-direction:column; gap:0;
  box-sizing:border-box; width:560px; max-width:100%; max-height:calc(100vh - 40px);
  max-height:calc(100dvh - 40px); margin:0; padding:28px;
  overflow:hidden; border:1px solid #dde5ef; border-radius:16px!important;
  background:#fff!important; box-shadow:0 20px 64px #142e4b29!important;
}
body.v41 #infoModalClose {position:absolute;top:12px;right:12px;z-index:2}
body.v41 #infoModalTitle {
  flex:0 0 auto; min-width:0; min-height:32px; margin:0 0 20px;
  padding:0 48px 0 0; color:#1d334f; font-size:24px!important;
  font-weight:650; line-height:1.4; letter-spacing:-.02em; overflow-wrap:anywhere;
}
body.v41 #infoModalBody {
  flex:1 1 auto; min-height:0; min-width:0; overflow:auto;
  padding:0 4px 0 0; color:#4f647d; font-size:14px; line-height:1.85;
  overscroll-behavior:contain; overflow-wrap:anywhere;
}
body.v41 #infoModalBody .info-copy-list {display:grid;gap:12px}
body.v41 #infoModalBody .info-copy-list p,
body.v41 #infoModalBody li {
  margin:0; padding:14px 16px; border:1px solid #e8edf4;
  border-radius:12px; background:#f5f7fb; color:#4f647d;
  font-size:14px; line-height:1.85;
}
body.v41 #infoModalBody li {padding-left:36px}
body.v41 #infoModalBody li::before {left:16px;top:23px}
body.v41 #infoModalActions {
  flex:0 0 auto; margin:20px 0 0; padding:16px 0 0;
  border-top:1px solid #e8edf4; gap:12px;
}
body.v41 #infoModalActions button {
  min-height:44px; padding:10px 20px; border-radius:10px; font-size:14px; line-height:1.5;
}

/* Account forms retain their existing behavior with a clearer reading hierarchy. */
body.v41 #memberCenterMask .account-intro p,
body.v41 #memberCenterMask .account-detail summary small,
body.v41 #memberCenterMask .account-help-note p,
body.v41 #memberCenterMask .account-detail-body p {
  color:#60738b; font-size:13px; line-height:1.8;
}
body.v41 #memberCenterMask .account-detail summary strong {font-size:14px;line-height:1.55}
body.v41 #memberCenterMask .account-tabs button {min-height:44px;font-size:14px}
body.v41 #memberCenterMask #accountHelp summary {min-height:48px;font-size:14px;line-height:1.65}
body.v41 #memberCenterMask #accountHelp details>p {font-size:14px;line-height:1.85;color:#52677f}
body.v41 #memberCenterMask .account-settings button[data-session],
body.v41 #memberCenterMask .account-settings #revokeOthers {
  min-height:40px; padding:8px 14px; border:1px solid #dce5ef!important;
  border-radius:9px; background:#fff!important; color:#4f647d!important;
  font-size:13px; line-height:1.5; box-shadow:none!important;
}

/* The account-recovery dialog uses the same typography and button geometry. */
body.v41 .workflow-dialog {
  box-sizing:border-box; width:560px; max-width:calc(100vw - 32px);
  max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px);
  margin:auto; padding:28px; border:1px solid #dde5ef; border-radius:16px;
  outline:0; background:#fff; color:#1d334f; font-size:14px; line-height:1.75;
  box-shadow:0 20px 64px #142e4b29; overflow:auto; overscroll-behavior:contain;
}
body.v41 .workflow-dialog::backdrop {background:#10253e66;backdrop-filter:blur(4px)}
body.v41 .workflow-dialog h2 {margin:0 0 12px;font-size:22px;line-height:1.45;font-weight:650}
body.v41 .workflow-dialog>p {margin:0 0 20px;color:#60738b;font-size:14px;line-height:1.8}
body.v41 .workflow-dialog #recoverMessage:empty {display:none}
body.v41 .workflow-dialog #recoverForm {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; align-items:start;
}
body.v41 .workflow-dialog #recoverForm label {
  display:grid; grid-column:1/-1; min-width:0; gap:8px; margin:0; color:#3e5570; font-size:14px;
}
body.v41 .workflow-dialog #recoverForm input {
  box-sizing:border-box; width:100%; min-width:0; height:48px; margin:0; padding:11px 12px;
  border:1px solid #cdd9e6; border-radius:10px; background:#fff;
  color:#1d334f; font:inherit; font-size:16px; line-height:1.5;
}
body.v41 .workflow-dialog #recoverForm button {
  grid-column:auto; align-self:start; height:46px; min-height:46px;
  margin:4px 0 0; padding:10px 14px; border:1px solid #1769e8;
  border-radius:10px; background:#1769e8; color:#fff; font:inherit; font-size:14px; line-height:1.5;
}
body.v41 .workflow-dialog #recoverForm [data-close] {background:#fff;color:#4f647d;border-color:#d8e2ee}
body.v41 .workflow-dialog :is(input,button):focus-visible {
  outline:2px solid #8bb5eb; outline-offset:2px;
}
@media(hover:hover) and (pointer:fine) {
  body.v41 #modalClose:hover,
  body.v41 #infoModalClose:hover {background:#edf3fb!important;color:#185eae!important}
  body.v41.shelf-home .footer-links :is(a,button):hover {color:#185eae}
}
@media(max-width:768px) {
  body.v41 #infoModalMask {padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  body.v41 #infoModalMask .info-modal {
    width:100%; padding:24px 20px 20px; border-radius:18px!important;
    max-height:calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  body.v41 #infoModalTitle {font-size:20px!important;line-height:1.45;margin-bottom:16px}
  body.v41 #infoModalClose {top:12px;right:8px}
  body.v41 #infoModalBody .info-copy-list p,
  body.v41 #infoModalBody li {padding:12px;line-height:1.85}
  body.v41 #infoModalBody li {padding-left:36px}
  body.v41 #infoModalBody li::before {top:21px}
  body.v41 #infoModalActions {margin-top:16px;padding-top:14px}
  body.v41 #infoModalActions button {width:100%}
  body.v41 .workflow-dialog {padding:24px 20px;border-radius:16px}
  body.v41 .workflow-dialog h2 {font-size:20px}
}
@media(prefers-reduced-motion:reduce) {
  body.v41 #modalClose,
  body.v41 #infoModalClose {transition:none}
}
