.account-banner{display:flex;align-items:center;justify-content:space-between;gap:22px;background:#fff;border:1px solid #c9dedf;border-radius:16px;padding:22px 24px;margin:0 0 30px}.account-banner p{margin:5px 0 0;font-size:16px}.account-banner strong{font-size:21px}.account-banner .button{flex-shrink:0}.account-form{max-width:580px;margin:0 auto}.account-form label{display:block;margin:18px 0 7px}.account-form input[type=email]{width:100%;font:inherit;min-height:54px;border:1px solid #9bb8bf;border-radius:8px;padding:10px 14px}.account-form .account-check{display:flex;align-items:flex-start;gap:12px;font-size:16px;line-height:1.65}.account-check input{flex:0 0 auto;width:20px;height:20px;margin-top:5px;accent-color:var(--theme-ui-accent,#176959)}.account-form .account-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.account-status{font-size:16px;line-height:1.6;min-height:26px}.account-note{padding:18px;background:var(--theme-ui-soft,#eff7f6);border-radius:10px;font-size:16px;line-height:1.7}.account-status[data-error=true]{color:#993729}.account-warning{border-left:4px solid #ba7a24;padding:12px 16px;background:#fff7e9}.account-details{margin-top:24px}.account-details>summary{cursor:pointer;font-weight:600}.account-details .button{margin:10px 8px 0 0}.account-modal{max-width:720px;margin:auto;padding:20px 10px}.account-modal h2{font-size:32px}.account-banner button:focus-visible,.account-form input:focus-visible{outline:3px solid #c5812a;outline-offset:3px}.account-manage-email{overflow-wrap:anywhere}.account-danger{border-color:#a24b3f;color:#8a3429}.account-form button:disabled{opacity:.65;cursor:wait}@media(max-width:640px){.account-banner{align-items:stretch;flex-direction:column;padding:20px}.account-banner .button{align-self:flex-start}.account-modal{padding:12px 0}.account-modal h2{font-size:27px}}
/* Give form focus rings breathing room inside the narrow dialog. */
@media(max-width:640px){
 .account-modal{padding:20px 16px}
 .account-modal h2{padding-right:48px;margin-top:0}
}

.account-save-welcome{max-width:580px}
.account-save-intro{margin:8px 0 24px;color:var(--muted)}
.account-save-welcome .account-check{font-weight:650;margin-bottom:12px}
.account-save-note{font-size:16px;line-height:1.65;color:var(--muted);margin:0 0 12px}
.account-save-details{font-size:15px;line-height:1.65;margin:12px 0 22px}
.account-save-details summary{cursor:pointer;width:fit-content;padding:6px 0;color:var(--teal,var(--theme-ui-accent,#176959));font-weight:650}
.account-save-details p{margin:12px 0}
.account-options-link{display:block;font-size:14px;margin-top:24px;padding:8px 0;color:var(--muted)}
@media(max-width:480px){.account-save-welcome .account-actions{flex-direction:column}.account-save-welcome .account-actions button{width:100%}}
dialog:has(.account-save-welcome){width:min(680px,calc(100% - 16px))}
.account-modal:has(.account-save-welcome){padding:28px}
.account-modal:has(.account-save-welcome) h2{padding-right:44px;margin:0}
.account-modal h2:focus{outline:none}
@media(max-width:480px){.account-modal:has(.account-save-welcome){padding:24px 16px}}

/* Compact account settings with clear separation between everyday and permanent actions. */
dialog:has(.account-options-modal){width:min(660px,calc(100% - 16px))}
.account-options-modal{padding:28px 32px 22px}
.account-options-modal h2{margin:8px 0 24px;font-size:1.65rem;line-height:1.2;padding-right:36px}
.account-back-link{font-size:.8rem;min-height:44px;padding:0 8px 0 0;text-align:left}
.account-identity{display:flex;align-items:center;gap:14px;background:var(--theme-ui-soft,#eef6f3);border:1px solid var(--theme-ui-border,#dbe9e3);border-radius:12px;padding:18px;margin-bottom:8px}
.account-identity>div{min-width:0}
.account-identity-icon{display:grid;place-items:center;flex:0 0 42px;height:42px;background:var(--theme-ui-tint,#dbeee5);color:var(--theme-ui-accent,#176959);border-radius:50%}
.account-identity-icon svg{width:24px;height:24px}
.account-identity-label{display:block;font-size:.72rem;color:var(--muted)}
.account-identity .account-manage-email{font-size:.9rem;font-weight:650;margin:2px 0 0;line-height:1.5}
.account-option-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 0}
.account-option-row>div{min-width:0}
.account-option-row h3{font-size:.88rem;line-height:1.4;margin:0 0 5px}
.account-option-row p{font-size:.76rem;line-height:1.6;color:var(--muted);margin:0;max-width:34ch}
.account-option-row .button{flex-shrink:0;font-size:.78rem;padding:10px 16px;min-height:44px}
.account-options-modal .account-display-settings{margin:0;padding:0;border-block:1px solid var(--line)}
.account-options-modal [data-display-settings]{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;min-height:64px;text-align:left;font-size:.85rem;padding:16px 0}
.account-options-modal [data-display-settings]::after{content:'→';font-size:1.1rem;font-weight:400}
.account-removal-row{margin-top:8px}
.account-removal-row .account-danger{background:#fff;border-color:#dfbfb8;color:#963f32}
.account-removal-row .account-danger:hover{background:#fff4f1;border-color:#a24b3f}
.account-policy-links{border-top:1px solid var(--line);padding-top:16px;font-size:.7rem;color:var(--muted);line-height:1.9}
.account-policy-links p{margin:0}
.account-policy-links a{color:inherit;text-underline-offset:3px}
.account-options-modal .account-status:empty{min-height:0;margin:0}
@media(max-width:480px){
 .account-options-modal{padding:16px 20px 22px}
 .account-options-modal h2{font-size:1.45rem}
 .account-option-row{align-items:flex-start;flex-wrap:wrap;gap:12px}
 .account-option-row .button{width:100%}
 .account-identity{padding:14px 12px;gap:10px}
}

/* A dedicated confirmation makes the next step unmistakable after requesting a link. */
dialog:has(.account-inbox-modal){width:min(600px,calc(100% - 16px))}
.account-inbox-modal{padding:32px}
.account-inbox-modal h2{font-size:1.65rem;line-height:1.2;margin:0 0 24px;padding-right:36px}
.account-inbox-card{background:var(--theme-ui-soft,#eef7f2);border:1px solid var(--theme-ui-border,#d5e8df);border-radius:14px;padding:24px;color:var(--theme-ui-accent,#244b40)}
.account-inbox-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--theme-ui-tint,#d7ede1);color:var(--theme-ui-accent,#176959);margin-bottom:18px}
.account-inbox-icon svg{width:30px;height:30px}
.account-inbox-card p{margin:0;font-size:.9rem;line-height:1.65}
.account-inbox-email{display:block;color:var(--theme-body,#173f50);overflow-wrap:anywhere;margin-top:3px}
.account-inbox-card .account-inbox-instructions{margin-top:18px}
.account-inbox-help{font-size:.8rem;color:var(--muted);line-height:1.65;margin:20px 0}
.account-inbox-actions{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.account-inbox-actions .textlink{font-size:.8rem;min-height:44px}
.account-inbox-modal .account-status:empty{min-height:0;margin:0}
@media(max-width:480px){.account-inbox-modal{padding:24px 20px}.account-inbox-modal h2{font-size:1.4rem}.account-inbox-card{padding:20px 16px}.account-inbox-actions{align-items:stretch;flex-direction:column;gap:10px}.account-inbox-actions .button{width:100%}}

/* Everyday account view: saved status and a clear return to learning. */
dialog:has(.account-home-modal){width:min(620px,calc(100% - 16px))}
.account-home-modal{padding:32px}
.account-home-modal h2{margin:0 0 24px;font-size:1.65rem;line-height:1.2;padding-right:40px}
.account-home-modal .account-identity{margin:0;background:var(--theme-ui-soft,#f3f8f6)}
.account-progress-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:20px 0 22px;font-size:.85rem;color:var(--muted)}
.account-progress-status p{margin:0;flex:1;min-width:0;line-height:1.6}
.account-save-dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#7b9098}
.account-progress-status[data-state=saved] .account-save-dot{background:#27836f}
.account-progress-status[data-state=offline] .account-save-dot{background:#ae762d}
.account-progress-status .textlink{font-size:.8rem;min-height:44px}
.account-progress-status [hidden]{display:none!important}
.account-continue{width:100%;justify-content:space-between;font-size:.9rem}
.account-import-choice{margin-top:24px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:.82rem}
.account-import-choice summary,.account-more-options summary{cursor:pointer;font-weight:700;color:var(--ink);line-height:1.5;padding:4px 0}
.account-import-choice p{margin:14px 0;color:var(--muted);line-height:1.7}
.account-import-choice .account-actions,.account-data-actions{display:flex;flex-wrap:wrap;gap:10px}
.account-import-choice .button,.account-data-actions .button{font-size:.78rem;min-height:44px;padding:10px 14px;margin:0}
.account-home-links{display:grid;gap:0;padding:12px 0}
.account-home-links .textlink{width:100%;min-height:50px;justify-content:space-between;text-align:left;font-size:.83rem}
.account-home-links [data-display-settings]::after{content:'→';font-weight:400}
.account-home-modal .account-status:empty{min-height:0;margin:0}
.account-more-options{font-size:.8rem;margin:18px 0 20px}
.account-data-actions{padding-top:18px}
@media(max-width:480px){.account-home-modal{padding:24px 20px}.account-home-modal h2{font-size:1.45rem}.account-import-choice .account-actions{flex-direction:column}.account-import-choice .button,.account-data-actions .button{width:100%}}

/* Align the sign-in title, fields, and footer in one comfortably padded column. */
dialog:has(#accountEmailForm){width:min(680px,calc(100% - 24px))}
.account-modal:has(#accountEmailForm){max-width:none;padding:44px 36px 32px}
.account-modal:has(#accountEmailForm) h2{margin:0 0 20px;padding-right:48px;line-height:1.25}
#accountEmailForm{max-width:none;margin:0}
#accountEmailForm>p:first-child{margin-top:0}
.account-modal:has(#accountEmailForm) .account-status:empty{min-height:0;margin:0}
@media(max-width:480px){
 .account-modal:has(#accountEmailForm){padding:40px 24px 24px}
 .account-modal:has(#accountEmailForm) h2{font-size:1.5rem;margin-bottom:18px}
 #accountEmailForm>.button{width:100%;gap:10px;padding-inline:12px}
}

/* Keep sign-in problems beside the form heading, including expired email links. */
.account-modal:has(#accountEmailForm) .account-status[data-error=true]{margin:0 0 22px;padding:14px 16px;background:#fff4f1;border:1px solid #e7c2b8;border-left:4px solid #a33a28;border-radius:8px;color:#822d20;overflow-wrap:anywhere}
