/* My account custom page: supplied account reference. */
.custom-account { --account-paper: var(--secondary); --account-ink: var(--text); --account-button: #921A1D; --account-button-text: #F3EFE6; margin: 1rem auto 0; max-width: 680px; }
[data-account-page], [data-account-render] { margin-top: 0; }
.custom-account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .5rem; }
.custom-account-tabs button { min-height: 54px; padding: .6rem; border: 0; background: transparent; color: var(--account-ink); font: 400 1.25rem/1.4 var(--site-font-family); }
.custom-account-tabs button[aria-selected="true"] { background: var(--account-paper); color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
.custom-account-card { max-width: 440px; margin-inline: auto; padding: 24px 30px 28px; border-radius: 44px; background: var(--account-paper); color: var(--account-ink); }
.custom-account-emblem { display: flex; justify-content: center; margin-bottom: 40px; }
.custom-account-emblem .icon { width: 78px; height: 78px; fill: currentColor; stroke: none; }
.custom-account-form { display: grid; gap: 12px; }
.custom-account-field { display: flex; align-items: center; gap: 16px; min-height: 52px; padding: .5rem 16px; border: 1px solid var(--muted); border-radius: 999px; }
.custom-account-field > .icon { width: 20px; height: 24px; flex: none; color: var(--accent); }
.custom-account-field input { width: 100%; min-width: 0; padding: .2rem 0; background: transparent; border: 0; color: var(--text); font-size: .9rem; }
.custom-account-field input::placeholder { color: var(--muted); opacity: 1; }
.custom-account-field:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.custom-account-field input:focus-visible { outline: none; }
.custom-account-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 44px;
  margin-top: 16px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}
.custom-account-submit .login-artwork img { width: 108px; height: auto; }
.custom-account-submit:hover { box-shadow: inset 0 0 0 2px currentColor; }
.custom-account-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: 28px; font-size: .9rem; }
.custom-account-options label { display: inline-flex; align-items: center; gap: .5rem; }
.custom-account-options a { color: inherit; font-style: italic; }
.custom-account-help { font-size: .9rem; line-height: 1.6; }
@media (max-width: 440px) { .custom-account-card { padding: 24px 18px; border-radius: 32px; } .custom-account-tabs button { font-size: 1.05rem; } }
.custom-account-simple { display: flex; flex-direction: column; align-items: center; padding-block: 28px 40px; }
.custom-account-simple .custom-account-emblem { margin-bottom: 32px; }
.custom-account-simple .custom-account-submit { margin-top: 0; }
[data-theme="dark"] .custom-account { --account-button: #FFB300; --account-button-text: #111827; }
.custom-account-details { padding: 28px; border-radius: 32px; background: var(--account-paper); }
.custom-account-details .custom-account-emblem { margin-bottom: 20px; }
.custom-account-details dl { margin: 0; }
.custom-account-details dl > div { padding: 1rem 0; border-top: 1px solid var(--line); }
.custom-account-details dt { color: var(--muted); font-size: .9rem; }
.custom-account-details dd { margin: .4rem 0 0; overflow-wrap: anywhere; }
.account-diagnostics-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: 0 24px; font-size: 16px; line-height: 1.6; color: var(--text); }
.account-diagnostics-table caption { text-align: start; font-size: 20px; font-weight: 600; margin-bottom: 12px; color: var(--accent); }
.account-diagnostics-table th, .account-diagnostics-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.account-diagnostics-table thead th { background: var(--background); font-weight: 600; }
.account-diagnostics-table tbody th { font-weight: 500; }
[data-account-page] .custom-account-card, [data-account-page] .custom-account-details,
[data-account-render] .custom-account-card, [data-account-render] .custom-account-details { border-radius: 0; }
@media (max-width: 440px) { .account-diagnostics-table th, .account-diagnostics-table td { padding: 8px 6px; } }

.account-section h1 { margin-top: 0; }
.account-profile-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0 0 24px; font-size: 1rem; color: var(--text); background: var(--canvas); }
.account-profile-table caption { text-align: start; padding: 14px 16px; background: var(--secondary); border-bottom: 2px solid var(--accent); font-size: 1.1rem; font-weight: 600; color: var(--text); }
.account-profile-table th, .account-profile-table td { padding: 12px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.62; }
.account-profile-table th { width: 35%; font-weight: 600; }
.account-profile-table td { white-space: pre-line; }
.account-profile-table tr:nth-child(even) { background: var(--secondary); }
[data-account-server-rendered] { margin-top: 0; }
@media(max-width:480px) { .account-profile-table th, .account-profile-table td { padding: 10px 8px; } .account-profile-table th { width: 38%; } }
/* Sibling account sections become tabs once a section is open. */
.account-section-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.account-section-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1 1 auto; min-height: 48px; padding: 10px 12px; border-bottom: 4px solid transparent; text-decoration: none; color: var(--text); font-size: 14px; line-height: 1.4; }
.account-section-tabs a .icon { width: 20px; height: 20px; flex-shrink: 0; }
.account-section-tabs a:hover, .account-section-tabs a:focus-visible { background: var(--secondary); border-bottom-color: var(--accent); }
.account-section-tabs a[aria-current="page"] { background: var(--secondary); color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
@media(max-width:480px) { .account-section-tabs a { padding: 8px; flex-basis: calc(33.333% - 4px); flex-direction: column; text-align: center; font-size: 13px; box-sizing: border-box; } }
.profile-field-label { display: inline-flex; align-items: center; gap: 8px; }
.profile-field-label .icon { width: 21px; height: 21px; flex-shrink: 0; color: var(--accent); }
.account-profile-table td a { color: var(--accent); text-underline-offset: 3px; }
.account-profile-overview { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 20px; align-items: start; margin-bottom: 24px; }
.account-profile-overview .account-profile-table { margin: 0; }
.account-profile-photo { width: 140px; margin: 0; padding: 0; }
.account-profile-photo img, .account-profile-photo-placeholder { width: 140px; height: 160px; object-fit: cover; background: var(--secondary); border: 1px solid var(--line); box-sizing: border-box; }
.account-profile-photo-placeholder:not([hidden]) { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.account-profile-photo-placeholder .icon { width: 70px; height: 70px; }
@media(max-width:600px) { .account-profile-overview { grid-template-columns: 100px minmax(0,1fr); gap: 12px; } .account-profile-photo, .account-profile-photo img, .account-profile-photo-placeholder { width: 100px; } .account-profile-photo img, .account-profile-photo-placeholder { height: 120px; } }
@media(max-width:380px) { .account-profile-overview { grid-template-columns: minmax(0,1fr); } }
.account-profile-overview-heading { margin: 0 0 16px; padding: 14px 16px; background: var(--secondary); border-bottom: 2px solid var(--accent); font-size: 1.1rem; font-weight: 600; color: var(--text); line-height: 1.62; }
.account-profile-overview .account-profile-table caption.sr-only { padding: 0; border: 0; }

/* Narrow row headings while giving profile values the remaining width. */
.account-details-table .account-details-label-column { width: 170px; }
.account-details-table th[scope="row"] { width: 170px; box-sizing: border-box; padding-inline: 6px; }
.account-details-table td { padding-inline: 8px; }
.account-profile-table td { width: auto; }
/* One heading style for Account details and Personal profile. */
.profile-section-heading, .profile-section-static { padding: 14px 16px; background: var(--secondary); border-bottom: 2px solid var(--accent); }
.profile-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; font-size: 1.1rem; line-height: 1.62; font-weight: 600; color: var(--text); }
.profile-section-static, .account-profile-editor { margin-bottom: 16px; }
.profile-section-heading { list-style: none; cursor: pointer; }
.profile-section-heading::-webkit-details-marker { display: none; }
.profile-section-heading:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.profile-edit-action { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent); }
.profile-edit-action .icon { width: 20px; height: 20px; }
.account-profile-table caption.sr-only { padding: 0; border: 0; }
.account-profile-edit-form { display: grid; gap: 16px; padding: 20px 16px; border: 1px solid var(--line); }
.profile-edit-field { display: grid; gap: 6px; }
.profile-edit-field label { font-weight: 600; }
.profile-edit-field input, .profile-edit-field select { box-sizing: border-box; min-width: 0; width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--muted); background: var(--canvas); color: var(--text); font: inherit; }
.profile-edit-note { margin: 0; font-size: 14px; }
.profile-edit-note a { color: var(--accent); }
.profile-edit-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.profile-edit-error { margin: 0; color: var(--accent); }
.account-settings .profile-section-title { justify-content: flex-start; }
.account-settings .profile-section-title .icon { width: 24px; height: 24px; color: var(--accent); }
.account-setting-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.account-setting-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.account-setting-label .icon { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.account-setting-buttons { display: inline-flex; gap: 4px; }
.account-setting-buttons button { min-width: 60px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--accent); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.account-setting-buttons button[aria-pressed="true"] { background: var(--accent); color: var(--canvas); font-weight: 700; }
.account-setting-buttons button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.account-setting-buttons button:disabled { opacity: .6; cursor: wait; }
.account-setting-status { grid-column: 1 / -1; font-size: 14px; color: var(--text); }
.account-setting-status:empty { display: none; }
.account-settings-note { margin-block: 24px 0; font-size: 14px; }
@media(max-width:400px) { .account-setting-row { grid-template-columns: minmax(0,1fr); } .account-setting-buttons { justify-self: end; } }
.account-setting-switch { display: inline-flex; align-items: center; gap: 10px; justify-self: end; min-height: 44px; min-width: 96px; padding: 6px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.setting-switch-track { display: block; position: relative; width: 52px; height: 28px; border-radius: 999px; background: var(--muted); transition: background-color .25s ease; flex-shrink: 0; }
.setting-switch-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px #11182740; transition: transform .25s ease; }
.account-setting-switch[aria-checked="true"] .setting-switch-track { background: var(--accent); }
.account-setting-switch[aria-checked="true"] .setting-switch-thumb { transform: translateX(24px); }
.setting-switch-state { min-width: 2ch; font-size: 14px; font-weight: 600; }
.account-setting-switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.account-setting-switch:disabled { opacity: .6; cursor: wait; }
@media(prefers-reduced-motion:reduce) { .setting-switch-track, .setting-switch-thumb { transition: none; } }
.security-editor { margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.security-editor > .security-heading { display: grid; grid-template-columns: 130px minmax(0,1fr) auto; align-items: center; gap: 16px; list-style: none; padding: 16px; background: var(--secondary); }
.security-editor > .security-heading::-webkit-details-marker { display: none; }
.security-field-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.security-field-label .icon { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.security-field-value { overflow-wrap: anywhere; }
.security-editor > .security-heading:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.security-edit-form [hidden] { display: none; }
@media(max-width:480px) { .security-editor > .security-heading { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 12px; } .security-field-value { grid-row: 2; } .security-editor .profile-edit-action { grid-column: 2; grid-row: 1 / 3; } }
.security-edit-form [data-security-status][data-error="true"] { color: var(--accent); font-weight: 600; }

.custom-account { --account-error: #B91C1C; }
[data-theme="dark"] .custom-account { --account-error: #FCA5A5; }
.custom-account .profile-edit-action[data-account-edit-toggle] { border: 0; background: transparent; font: inherit; font-size: 14px; min-height: 44px; padding: 6px; cursor: pointer; flex-shrink: 0; }
.profile-section-heading { cursor: default; }
.profile-edit-action[data-account-edit-toggle]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.custom-account .account-profile-edit-form[hidden] { display: none; }
.custom-account .profile-edit-error, .custom-account .security-edit-form [data-security-status][data-error="true"] { color: var(--account-error); font-weight: 600; }
.custom-account .profile-edit-field input[aria-invalid="true"], .custom-account .profile-edit-field select[aria-invalid="true"] { border: 2px solid var(--account-error); outline: 2px solid var(--account-error); outline-offset: 2px; }
.custom-account .profile-edit-field:has([aria-invalid="true"]) > label { color: var(--account-error); }

.custom-account [data-account-edit-toggle][aria-expanded="true"] { display: none; }
.security-editor [data-security-result] { padding: 10px 16px; margin: 0; color: var(--text); }
.secondary-emails { margin: 0 0 24px; padding: 0 16px; }
.secondary-emails h2 { font-size: 1.1rem; margin: 0 0 12px; color: var(--text); }
.secondary-emails ul { margin: 0; padding: 0; list-style: none; }
.secondary-emails li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.secondary-email-value { display: block; overflow-wrap: anywhere; }
.secondary-email-state { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.secondary-email-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.secondary-email-actions .button { padding: 8px 12px; min-height: 44px; font-size: 14px; }
.secondary-emails [data-secondary-email-status][data-error="true"] { color: var(--account-error); font-weight: 600; }
/* Compact actions for secondary email addresses. */
.secondary-email-actions .button { min-height: 34px; padding: 6px 11px; border-radius: 999px; font-size: 12px; line-height: 1.3; font-weight: 600; transition: background-color .2s ease, box-shadow .2s ease; }
.secondary-email-actions [data-email-primary] { background: #ECFDF5; border: 1px solid #15803D; color: #166534; }
.secondary-email-actions [data-email-primary]:hover { background: #D1FAE5; box-shadow: 0 2px 6px #16653420; }
.secondary-email-actions [data-email-remove] { background: #FEF2F2; border: 1px solid #B91C1C; color: #B91C1C; }
.secondary-email-actions [data-email-remove]:hover { background: #FEE2E2; box-shadow: 0 2px 6px #B91C1C20; }
.secondary-email-actions [data-email-primary]:focus-visible { outline: 2px solid #15803D; outline-offset: 3px; }
.secondary-email-actions [data-email-remove]:focus-visible { outline: 2px solid #B91C1C; outline-offset: 3px; }
[data-theme="dark"] .secondary-email-actions [data-email-primary] { background: #153C2B; border-color: #86EFAC; color: #86EFAC; }
[data-theme="dark"] .secondary-email-actions [data-email-primary]:hover { background: #1B5038; }
[data-theme="dark"] .secondary-email-actions [data-email-remove] { background: #4A2027; border-color: #FCA5A5; color: #FCA5A5; }
[data-theme="dark"] .secondary-email-actions [data-email-remove]:hover { background: #622A33; }
[data-theme="dark"] .secondary-email-actions [data-email-primary]:focus-visible { outline-color: #86EFAC; }
[data-theme="dark"] .secondary-email-actions [data-email-remove]:focus-visible { outline-color: #FCA5A5; }
.secondary-email-actions .button:disabled { opacity: .6; cursor: wait; }
@media(pointer:coarse) { .secondary-email-actions .button { min-height: 44px; } }
.secondary-email-state[data-verified="true"] { color: #15803D; font-weight: 600; }
[data-theme="dark"] .secondary-email-state[data-verified="true"] { color: #86EFAC; }
.security-password-field { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.security-password-field input { flex: 1; min-width: 0; }
.security-password-toggle { flex-shrink: 0; padding: 6px 10px; min-height: 44px; max-width: 140px; background: var(--secondary); border: 1px solid var(--muted); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.security-password-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.security-password-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; padding: 8px; border: 0; background: transparent; }
.security-password-toggle .icon { width: 22px; height: 22px; }
.security-password-toggle [hidden] { display: none; }
.security-password-field { position: relative; display: block; }
.security-password-field input { padding-inline-end: 50px; }
.security-password-field .security-password-toggle { position: absolute; inset-inline-end: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; min-height: 40px; padding: 8px; }
.security-password-field .security-password-toggle[hidden] { display: none; }
.security-password-field input::-ms-reveal { display: none; }
.account-history-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.account-history-table th, .account-history-table td { padding: 12px 8px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.account-history-table th:first-child { width: 52%; }
.account-history-table th:nth-child(2) { width: 29%; }
.account-history-table a { overflow-wrap: anywhere; color: var(--accent); }
.account-history-table time { display: block; }
.account-history-note { font-size: 14px; color: var(--muted); }
@media(max-width:480px) { .account-history-table { font-size: 12px; } .account-history-table th, .account-history-table td { padding: 10px 4px; } }
.account-section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account-section-heading-row .profile-edit-actions { margin: 0 0 18px; }
.account-history-table th:first-child { width: 43%; }
.account-history-table th:nth-child(2) { width: 26%; }
.account-history-table th:nth-child(3) { width: 14%; }
.account-history-table th:nth-child(4) { width: 17%; }
.history-remove { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 6px; border: 1px solid #B91C1C; border-radius: 999px; background: transparent; color: #B91C1C; font: inherit; font-size: 12px; cursor: pointer; }
.history-remove .icon { width: 16px; height: 16px; flex-shrink: 0; }
.history-remove:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
[data-theme="dark"] .history-remove { color: #FCA5A5; border-color: #FCA5A5; }
@media(hover:hover) and (pointer:fine) { .history-remove { opacity: 0; pointer-events: none; } .account-history-table tr:hover .history-remove, .account-history-table tr:focus-within .history-remove { opacity: 1; pointer-events: auto; } }
@media(max-width:600px) { .history-remove { width: 36px; height: 36px; } .history-remove span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
@media(pointer:coarse) { .history-remove { min-width: 44px; min-height: 44px; } }
.account-history-table .history-sort-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: inherit; text-decoration: none; }
.account-history-table .history-sort-link:hover { color: var(--accent); text-decoration: underline; }
.account-history-table .history-sort-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-history-table th[aria-sort="ascending"], .account-history-table th[aria-sort="descending"] { color: var(--accent); }
.account-history-table th:first-child { width: auto; }
.account-history-table th:nth-child(2) { width: 29%; }
.account-history-table th:nth-child(3) { width: 18%; }
.account-history-table th:nth-child(4) { width: 44px; }
.history-remove { width: 28px; height: 28px; min-height: 28px; padding: 5px; }
.history-remove .icon { width: 14px; height: 14px; }
@media(pointer:coarse) { .history-remove { width: 44px; height: 44px; min-width: 44px; min-height: 44px; } .account-history-table th:nth-child(4) { width: 52px; } }
/* Show each section's edit form in place of its displayed details. */
[data-profile-section]:has(.account-profile-edit-form:not([hidden])) > .account-profile-table,
[data-profile-section]:has(.account-profile-edit-form:not([hidden])) > .account-profile-overview,
.security-editor:has(.security-edit-form:not([hidden])) .security-field-value { display: none; }
.profile-photo-controls { display: flex; align-items: start; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.profile-photo-action { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.profile-photo-action:hover { background: var(--secondary); }
.profile-photo-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-photo-action .icon { width: 16px; height: 16px; }
.profile-photo-confirm { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-photo-confirm[hidden], .profile-photo-action[hidden], .profile-photo-controls form[hidden] { display: none; }
.profile-photo-remove { color: var(--account-error); border-color: var(--account-error); padding: 6px; }
.profile-photo-help { font-size: 11px; line-height: 1.5; margin: 8px 0; }
.account-profile-photo [data-photo-status] { font-size: 12px; overflow-wrap: anywhere; }
.profile-photo-action:disabled { opacity: .6; cursor: wait; }
@media(pointer:coarse) { .profile-photo-action { min-height: 44px; } }
.profile-photo-image { position: relative; }
.profile-photo-controls { position: absolute; inset-inline: 0; bottom: 0; justify-content: center; align-items: center; margin: 0; padding: 7px 5px; box-sizing: border-box; background: linear-gradient(transparent, #111827b3); }
.profile-photo-controls .profile-photo-action { background: var(--canvas); }
.profile-photo-controls .profile-photo-action:hover { background: var(--secondary); }
@media(hover:hover) and (pointer:fine) {
 .profile-photo-controls { opacity: 0; pointer-events: none; transition: opacity .2s ease; }
 .profile-photo-image:hover .profile-photo-controls, .profile-photo-image:focus-within .profile-photo-controls, .profile-photo-image:has([data-photo-confirm]:not([hidden])) .profile-photo-controls, [data-photo-editor][aria-busy="true"] .profile-photo-controls { opacity: 1; pointer-events: auto; }
}
.profile-photo-action { box-sizing: border-box; }
.profile-photo-controls form { margin: 0; }
