/* Layout repairs for real study states, including both independent resume slots. */
html[data-theme] .app-body .bank-page{--bank-ink:var(--ink);--bank-muted:var(--muted);--bank-blue:var(--accent);--bank-line:var(--line)}
html[data-theme] .app-body .bank-resume{background-color:var(--accent-soft);border-color:var(--line);color:var(--ink)}
html[data-theme] .app-body :is(.bank-entry,.bank-course,.bank-recent){background-color:var(--surface);border-color:var(--line);color:var(--ink)}
.discussion-post{min-width:0;overflow-wrap:anywhere}
.discussion-author{max-width:100%;flex-wrap:wrap}
html[data-theme] .app-body :is(.answer-feedback,.feedback-disclosure,.feedback-disclosure-body,.explanation-shell,.structured-explanation,.explanation-section,.explanation-copy){min-width:0;max-width:100%;box-sizing:border-box}
html[data-theme] .app-body :is(.feedback-disclosure-body,.structured-explanation){grid-template-columns:minmax(0,1fr)}
html[data-theme] .app-body .explanation-table-wrap{min-width:0;max-width:100%;width:100%;overflow-x:auto;box-sizing:border-box}
.bank-start>.study-alternate-resume{grid-column:1/-1;grid-row:2;margin:0;min-width:0}
.bank-start>.study-alternate-resume>div{flex:1;min-width:0}
.bank-start>.study-alternate-resume .button{white-space:normal;overflow-wrap:anywhere}
.bank-start>.bank-resume,.bank-start>.bank-entry{min-width:0}
.anatomy-entry{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;padding:12px 16px;margin-bottom:16px;text-decoration:none;line-height:1.6}
.anatomy-entry small{color:var(--muted);font-size:12px}

@media(max-width:760px){
 html[data-theme] .app-body .bank-start{align-items:start;gap:12px}
 html[data-theme] .app-body .bank-resume{grid-template-columns:36px minmax(0,1fr);padding:16px;gap:8px 12px}
 html[data-theme] .app-body .bank-resume>.button{grid-column:2;grid-row:auto;min-height:44px;max-width:100%;margin-top:4px;white-space:normal}
 html[data-theme] .app-body .bank-resume h2{font-size:17px;line-height:1.5}
 html[data-theme] .app-body .bank-start>.study-alternate-resume{display:flex;flex-direction:row;align-items:center;gap:12px;padding:16px}
 html[data-theme] .app-body .study-alternate-resume strong{font-size:14px;line-height:1.6}
 html[data-theme] .app-body .study-alternate-resume p{font-size:13px;line-height:1.7}
 html[data-theme] .app-body .study-alternate-resume .button{width:auto;max-width:36%;padding:10px 12px;font-size:13px;line-height:1.5;min-height:44px}
 html[data-theme] .app-body .bank-entry{align-self:stretch;padding:14px 10px}
 html[data-theme] .app-body .bank-entry h2{white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
 html[data-theme] .app-body .bank-entry p{font-size:12px;line-height:1.7}
 html[data-theme] .app-body .bank-entry-icon{margin-bottom:10px}

 html[data-theme] .app-body :is(.answer-feedback,.feedback-disclosure,.feedback-disclosure-body,.explanation-shell,.structured-explanation,.explanation-section,.explanation-copy,.community-card,.discussion-panel,.discussion-list,.discussion-post,.discussion-field){min-width:0;max-width:100%;box-sizing:border-box}
 html[data-theme] .app-body .feedback-disclosure-body{padding:12px;gap:16px}
 html[data-theme] .app-body .feedback-disclosure-label{min-width:0}
 html[data-theme] .app-body .feedback-disclosure-label strong{white-space:normal;overflow-wrap:anywhere;line-height:1.6;font-size:14px}
 html[data-theme] .app-body :is(.explanation-copy,.brief-explanation,.discussion-post p,.reply-reference){overflow-wrap:anywhere;word-break:normal;line-height:1.8}
 html[data-theme] .app-body .explanation-table-wrap{display:block;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 html[data-theme] .app-body .explanation-table td{grid-template-columns:minmax(0,34%) minmax(0,1fr);overflow-wrap:anywhere;min-width:0}
 html[data-theme] .app-body .textbook-citation{grid-template-columns:minmax(0,1fr);min-width:0}
 html[data-theme] .app-body .source-evidence-row{grid-template-columns:minmax(0,1fr)}
 html[data-theme] .app-body :is(.citation-detail,.citation-detail p,.textbook-source-heading){min-width:0;overflow-wrap:anywhere}
 html[data-theme] .app-body .discussion-list{max-height:none;overflow:visible}
 html[data-theme] .app-body .discussion-post header{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
 html[data-theme] .app-body .discussion-author{flex-wrap:wrap;min-width:0;max-width:100%;gap:6px}
 html[data-theme] .app-body .discussion-author strong{min-width:0;overflow-wrap:anywhere;line-height:1.6}
 html[data-theme] .app-body .discussion-post time{width:100%;margin-left:0;white-space:normal}
 html[data-theme] .app-body .discussion-post p,html[data-theme] .app-body .reply-reference{padding-left:0}
 html[data-theme] .app-body .discussion-form{grid-template-columns:minmax(0,1fr);margin:16px 0 0;padding-top:16px;min-width:0;width:100%}
 html[data-theme] .app-body .discussion-field{grid-template-columns:minmax(0,1fr)}
 html[data-theme] .app-body .discussion-form textarea{box-sizing:border-box;min-width:0;max-width:100%;width:100%;min-height:112px;font-size:16px;line-height:1.7}
 html[data-theme] .app-body .discussion-actions{flex-wrap:wrap;gap:12px;min-width:0}
 html[data-theme] .app-body :is(.discussion-submit,.discussion-login){min-height:44px;max-width:100%;white-space:normal}
 html[data-theme] .app-body .discussion-submit{width:100%}
 html[data-theme] .app-body .discussion-reply{min-height:44px;margin-left:0!important;padding:8px 0}
 html[data-theme] .app-body .community-section-head{flex-wrap:wrap;gap:8px}
 html[data-theme] .app-body .reaction-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-theme] .app-body .reaction-chip{min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:359px){
 html[data-theme] .app-body .bank-start>.study-alternate-resume{flex-direction:column;align-items:stretch}
 html[data-theme] .app-body .study-alternate-resume .button{align-self:flex-start;max-width:100%}
}
