/* Refactoring UI · shared interface contract (the existing palette remains in theme-init).
   Rendered audit, 1280 / 375:
   P1 §2.1/2.8: captions and actions compete → three text ranks, one primary action.
   P1 §3.3/4.3: wide reading sheets → constrain prose, retain compact exam chrome.
   P1 §3.6/8.5: nested filter/card borders → group with space and one surface.
   P1 §4.1/5.6: 10–11px control labels → 12/14/16 scale and opaque theme text.
   P1 §6.2: static cards glow like overlays → reserve shadow for floating surfaces.
   P1 §5.3/5.5: neutral twilight and diluted feedback → opaque day/night palettes.
   Reading font, lime companion, answer motion, safe areas and dense exam bars are
   deliberate Nuance conventions. They take precedence over generic defaults. */
:root{
 --ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;--ui-space-4:16px;
 --ui-space-6:24px;--ui-space-8:32px;--ui-space-12:48px;
 --ui-caption:12px;--ui-label:14px;--ui-body:16px;--ui-heading:20px;--ui-title:24px;
 --ui-radius-small:8px;--ui-radius:12px;--ui-radius-sheet:20px;
 --ui-shadow-popover:0 8px 24px #00000028;--ui-shadow-dialog:0 16px 48px #00000038;
 --ui-reading-width:840px;--ui-prose-width:36rem;
}

/* §2.1 §4.1: stable typography ranks; never fade a whole content group. */
html[data-color-theme] :is(.sheet-head>strong,.menu-review-head>strong,.section-heading>span,.study-system h3,.map-group h3){font-size:var(--ui-label);font-weight:600;color:var(--text);line-height:1.6}
html[data-color-theme] :is(.fineprint,.map-caption,.map-foot,.theme-status,.theme-options small,.module-chip small,.study-theme span,.memory-subtitle,.vocabulary-time-result,.auth-field label){font-size:var(--ui-caption);line-height:1.8;color:var(--muted);opacity:1}
html[data-color-theme] :is(.secondary,.subtle,.module-chip,.menu-tabs button,.memory-filter button,.memory-queue button,.map-statuses button,.study-library-link,.course-related>.study-library-link,.settings-action){font-size:var(--ui-label);line-height:1.6}
html[data-color-theme] :is(input,select,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-color-theme] :is(.primary,.secondary,.question-continue,.memory-continue,.auth-submit,.module-chip,.memory-filter button,.map-statuses button,.study-theme,.course-exam-entry){border-radius:var(--ui-radius)}
html[data-color-theme] :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--purple);outline-offset:3px}
html[data-color-theme] :is(.primary,.secondary,.subtle,.settings-action,.memory-filter button,.map-statuses button,.course-related>.study-library-link){min-height:44px}
html[data-color-theme] :is(.primary,.secondary,.auth-submit):active:enabled{transform:translateY(1px)}
html[data-color-theme] :is(.primary,.auth-submit):hover:enabled{filter:brightness(1.06)}

/* §3.3 §4.3: reading measure is independent from viewport width. */
html[data-color-theme] #feed{max-width:var(--ui-reading-width)}
html[data-color-theme] :is(#knowledge-review,#memory,#question-map){width:100%;max-width:var(--ui-reading-width);margin-inline:auto}
html[data-color-theme] #knowledge-review-content{max-width:none}
html[data-color-theme] #feed .reading{padding-top:var(--ui-space-6);padding-bottom:var(--ui-space-8);scrollbar-gutter:stable both-edges}
html[data-color-theme] #feed .study-layout{padding:var(--ui-space-8);border:0;border-radius:var(--ui-radius-sheet)}
/* The centered study layout owns the whole question's width, including options. */
html[data-color-theme] :is(.memory-prompt,.memory-answer,.course-point-body,.knowledge-concept-note){max-width:var(--ui-prose-width)}
html[data-color-theme] #feed .question-title{margin-bottom:var(--ui-space-6);font-size:var(--ui-caption);color:var(--muted)}
html[data-color-theme] #feed .options{gap:var(--ui-space-3);margin-top:var(--ui-space-6)}
html[data-color-theme] #feed .option{padding:var(--ui-space-4);border-radius:var(--ui-radius)}
html[data-color-theme] #feed .outcome{padding-block:var(--ui-space-4)}
html[data-color-theme] #feed .response-detail{color:var(--muted);font-size:var(--ui-label)}
html[data-color-theme] :is(.option.right,.option.wrong){opacity:1}
html[data-color-theme] .option.right .letter{background:var(--primary-fill);color:var(--on-primary)}
html[data-color-theme] .option.right .option-status{color:var(--success)}
html[data-color-theme] #feed .review-navigation{margin-top:var(--ui-space-6);padding-top:var(--ui-space-6)}

/* §2.8 §3.6: navigation is subordinate; the current location is explicit. */
html[data-color-theme] .home-picker-menu{width:272px;max-width:calc(100vw - 32px);padding:var(--ui-space-3);border-radius:var(--ui-radius-sheet);background:var(--paper);box-shadow:var(--ui-shadow-popover)}
html[data-color-theme] .picker-subjects{gap:var(--ui-space-2);padding-bottom:var(--ui-space-3);margin-bottom:var(--ui-space-3);border-color:var(--line)}
html[data-color-theme] .picker-subjects>button{min-height:48px;font-size:var(--ui-label)}
html[data-color-theme] .picker-subjects>button span{font-size:var(--ui-label)}
html[data-color-theme] .picker-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--ui-space-2)}
html[data-color-theme] .picker-modes>a{min-height:64px;padding:var(--ui-space-2);border-radius:var(--ui-radius)}
html[data-color-theme] .picker-modes>a span{font-size:var(--ui-caption)}
html[data-color-theme] :is(.picker-modes>a[aria-current=page],.picker-subjects>button[aria-pressed=true]){background:var(--select-fill);color:var(--purple);box-shadow:inset 0 -2px var(--purple)}
html[data-color-theme] :is(#memory,#knowledge-review,#question-map)>.sheet-head{background:var(--bg);border-bottom:1px solid var(--line);padding-block:var(--ui-space-3);margin-bottom:var(--ui-space-4)}
html[data-color-theme] .practice-navigation>div{border:0;padding:0;gap:var(--ui-space-6);border-radius:0}
html[data-color-theme] .practice-navigation button{min-height:44px;padding:var(--ui-space-2) 0;border-radius:0;border-bottom:2px solid transparent;font-size:var(--ui-label)}
html[data-color-theme] .practice-navigation button[aria-pressed=true]{background:none;color:var(--text);border-bottom-color:var(--purple)}
html[data-color-theme] .exam-hub-tabs{gap:var(--ui-space-6);border-bottom:1px solid var(--line);margin-bottom:var(--ui-space-6)}
html[data-color-theme] .exam-hub-tabs button{min-height:48px;padding:var(--ui-space-2) 0;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--muted);font-size:var(--ui-label)}
html[data-color-theme] .exam-hub-tabs button[aria-current=true]{background:none;border-bottom-color:var(--purple);color:var(--text)}

/* §3.6 §8.5: a dialog has one frame; its sections use rhythm, not nested boxes. */
html[data-color-theme] :is(#menu,#profile,#memory-editor,#daily-rewards,dialog.fenbi-comment-sheet){border-radius:var(--ui-radius-sheet);box-shadow:var(--ui-shadow-dialog)}
html[data-color-theme] #menu>.sheet-head{padding:var(--ui-space-4) var(--ui-space-6);border-bottom:0}
html[data-color-theme] #menu>.sheet-head>strong{font-size:var(--ui-heading)}
html[data-color-theme] .menu-body{padding:var(--ui-space-6)}
html[data-color-theme] .menu-tabs{gap:var(--ui-space-6);padding-inline:var(--ui-space-6)}
html[data-color-theme] .menu-footer{padding:var(--ui-space-4) var(--ui-space-6);padding-bottom:max(16px,var(--nuance-safe-area-bottom,env(safe-area-inset-bottom)))}
html[data-color-theme] .menu-footer>button{min-height:48px}
html[data-color-theme] #question-banks .module-grid{gap:var(--ui-space-2)}
html[data-color-theme] #question-banks .module-chip{border:1px solid transparent;padding:var(--ui-space-4);min-height:72px;background:var(--header);box-shadow:none;color:var(--text)}
html[data-color-theme] #question-banks .module-chip[aria-pressed=true]{background:var(--select-fill);border-color:var(--purple)}
html[data-color-theme] #question-banks .module-chip small{margin:var(--ui-space-1) 0 0}
html[data-color-theme] .preference-content fieldset{margin:var(--ui-space-6) 0}
html[data-color-theme] #system-settings legend{font-size:var(--ui-label);font-weight:600;margin-bottom:var(--ui-space-3)}
html[data-color-theme] #system-settings .preference-options:not(.theme-options){background:var(--soft);border-radius:var(--ui-radius);padding:var(--ui-space-1)}
html[data-color-theme] #system-settings .preference-options:not(.theme-options) button{font-size:var(--ui-label);border-radius:var(--ui-radius-small)}
html[data-color-theme] #system-settings .preference-options:not(.theme-options) button[aria-pressed=true]{background:var(--paper);color:var(--text);box-shadow:inset 0 -2px var(--purple)}
html[data-color-theme] #system-settings .theme-options{gap:var(--ui-space-3)}
html[data-color-theme] #system-settings .theme-options button{padding:var(--ui-space-3);gap:var(--ui-space-3);border-radius:var(--ui-radius)}
html[data-color-theme] #system-settings .theme-options small{font-size:var(--ui-caption)}
html[data-color-theme] #system-settings .preference-preview{margin-block:var(--ui-space-6);border:0;border-left:3px solid var(--purple);border-radius:0;background:var(--paper);padding:var(--ui-space-4)}
html[data-color-theme] :is(.menu-review-metrics,.overview-metrics){gap:var(--ui-space-6)}

/* §8.5 §6.2: memory and knowledge are reading surfaces, not a stack of floating cards. */
html[data-color-theme] :is(.memory-card,#memory.vocabulary-flow .vocabulary-card,.auth-panel,.map-preview){border-radius:var(--ui-radius-sheet);box-shadow:none}
html[data-color-theme] .memory-card::before{display:none}
html[data-color-theme] .memory-ribbon{border:0;border-radius:0;padding:var(--ui-space-3) 0;background:none;color:var(--muted)}
html[data-color-theme] .memory-card .memory-answer{margin-top:var(--ui-space-6);padding:var(--ui-space-6) 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
html[data-color-theme] .memory-queue{gap:var(--ui-space-6);border-bottom:1px solid var(--line)}
html[data-color-theme] .memory-queue button{border:0;border-radius:0;min-height:48px;background:transparent;box-shadow:none}
html[data-color-theme] .memory-queue button[aria-pressed=true]{background:transparent;color:var(--text);box-shadow:inset 0 -2px var(--purple)}
html[data-color-theme] .memory-filter{border:0;background:none;padding:0;gap:var(--ui-space-2);margin-block:var(--ui-space-4)}
html[data-color-theme] .memory-filter button{padding:var(--ui-space-2) var(--ui-space-4);border-color:transparent;background:none}
html[data-color-theme] .memory-filter button[aria-pressed=true]{background:var(--select-fill);color:var(--purple)}
html[data-color-theme] :is(.memory-empty,.knowledge-empty,.map-empty){padding:var(--ui-space-8) 0;background:transparent;border:0;max-width:var(--ui-prose-width);line-height:1.8}
html[data-color-theme] :is(.study-overview,.course-learning-head){background:var(--paper);border:0;border-radius:var(--ui-radius);box-shadow:none}
html[data-color-theme] :is(.study-overview h2,.memory-empty h2){font-size:var(--ui-title);font-weight:600;line-height:1.5}
html[data-color-theme] :is(.study-theme,.study-branch,.study-original,.study-gap,.study-boundaries,.knowledge-group,.course-contrasts,.course-method){border-color:var(--line);border-radius:var(--ui-radius);box-shadow:none}
html[data-color-theme] :is(.study-note,.study-context,.knowledge-node){background:transparent;border:0;border-radius:0;box-shadow:none}
html[data-color-theme] :is(.course-contrasts,.course-method,.course-exam-entry){background:var(--soft);color:var(--text);border-color:transparent}
html[data-color-theme] :is(.study-theme strong,.course-chapter strong){font-size:var(--ui-body);font-weight:600;color:var(--text)}
html[data-color-theme] :is(.study-branch>summary,.study-original>summary,.study-gap>summary,.study-boundaries>summary,.course-part>summary,.course-family>summary,.course-point>summary){min-height:48px;color:var(--text)}
html[data-color-theme] :is(.course-part,.course-family,.course-point,.course-chapter,.course-context-flow,.course-contrast){border-color:var(--line)}
html[data-color-theme] :is(.study-search input,#memory-form textarea,.map-controls input,.map-controls select){border-radius:var(--ui-radius);min-height:48px;font-size:var(--ui-body)}
html[data-color-theme] #memory-form label{gap:var(--ui-space-2)}
html[data-color-theme] #memory-form label>span{margin-bottom:var(--ui-space-2)}
html[data-color-theme] #memory-form label b{font-size:var(--ui-label);font-weight:600}
html[data-color-theme] #memory-form label small{font-size:var(--ui-caption);color:var(--muted)}

/* §2.5 §4.4: results lead with the value; details use the same numeric rhythm. */
html[data-color-theme] :is(.exam-score strong,.overview-metric strong,.authored-report-metric>strong){font-variant-numeric:tabular-nums;letter-spacing:-.025em}
html[data-color-theme] :is(.exam-score,.exam-metrics,.profile-overview,.insight-section){box-shadow:none;border-color:var(--line)}
html[data-color-theme] .exam-score strong{color:var(--success)}
html[data-color-theme] .exam-priority .primary{background:var(--soft);color:var(--text);border:1px solid var(--line)}
html[data-color-theme] .exam-metrics>div>span{font-size:var(--ui-caption);color:var(--muted)}
html[data-color-theme] .exam-result-row{min-height:64px;padding-block:var(--ui-space-4)}
html[data-color-theme] .map-statuses{gap:var(--ui-space-2);margin-bottom:var(--ui-space-6)}
html[data-color-theme] .map-statuses button{background:transparent;border-color:transparent;padding:var(--ui-space-2) var(--ui-space-3)}
html[data-color-theme] .map-statuses button[aria-pressed=true]{background:var(--select-fill);color:var(--text);border-color:var(--purple)}
html[data-color-theme] .map-controls{gap:var(--ui-space-3)}
html[data-color-theme] .map-group{margin-block:var(--ui-space-6) var(--ui-space-8)}
html[data-color-theme] .map-cell{border-radius:var(--ui-radius-small);box-shadow:none}
html[data-color-theme] .map-cell[data-status=correct]{color:var(--success)}

/* §3.6: account and tool shells share the system; the training canvas keeps its own cues. */
html[data-color-theme] .auth-panel{background:var(--paper);padding:var(--ui-space-8);border-color:var(--line)}
html[data-color-theme] .auth-panel h1{font-size:32px;font-weight:600;margin-bottom:var(--ui-space-8)}
html[data-color-theme] #login{gap:var(--ui-space-6)}
html[data-color-theme] .auth-field{gap:var(--ui-space-2)}
html[data-color-theme] :is(.auth-field input,.auth-submit){border-radius:var(--ui-radius);min-height:56px}
html[data-color-theme] .auth-tile{background:var(--soft);box-shadow:none}
html[data-color-theme] #tools .tool-tabs{padding:var(--ui-space-1);gap:var(--ui-space-1);border-radius:var(--ui-radius)}
html[data-color-theme] #tools .tool-tabs>button{min-height:44px;font-size:var(--ui-label);border-radius:var(--ui-radius-small)}

@media(max-width:760px){
 html[data-color-theme] #feed .reading{padding:var(--ui-space-4) var(--ui-space-4) var(--ui-space-8)}
 html[data-color-theme] #feed .study-layout{padding:0;border-radius:0}
 html[data-color-theme] #feed .option{padding:var(--ui-space-3)}
 html[data-color-theme] :is(#memory.vocabulary-flow .vocabulary-card,.memory-card){padding:var(--ui-space-6);border-radius:var(--ui-radius)}
 html[data-color-theme] :is(#menu>.sheet-head,.menu-body,.menu-footer){padding-inline:var(--ui-space-4)}
 html[data-color-theme] .menu-tabs{padding-inline:var(--ui-space-4)}
 html[data-color-theme] .auth-panel{padding:var(--ui-space-6)}
 html[data-color-theme] .auth-panel h1{font-size:var(--ui-title);margin-bottom:var(--ui-space-6)}
 html[data-color-theme] .map-statuses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ui-space-2)}
 html[data-color-theme] .map-statuses button{text-align:left}
}
@media(prefers-reduced-motion:reduce){html[data-color-theme] :is(.primary,.secondary,.auth-submit):active:enabled{transform:none}}
html[data-motion=reduced] :is(.primary,.secondary,.auth-submit):active:enabled{transform:none}

/* §2.8 §6.1: the completed answer keeps its tactile next-step action. */
html[data-color-theme=dark] #feed :is(.desktop-continue,#review-next){box-shadow:0 4px 0 #6c8648}
@media(prefers-reduced-motion:no-preference){html[data-color-theme=dark]:not([data-motion=reduced]) #feed :is(.desktop-continue,#review-next):active:enabled{box-shadow:0 1px 0 #6c8648;transform:translateY(3px)}}

/* §3.6: one 44px row for practice; secondary progress belongs in the picker.
   Keep only the daily count; preserve approved answer colors. */
html:not([data-cutout-header]) #app>#home-navigation[data-flow=true]{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"picker context controls";gap:0 8px;min-height:calc(45px + var(--nuance-safe-area-top,env(safe-area-inset-top)));padding:var(--nuance-safe-area-top,env(safe-area-inset-top)) 12px 0}
html:not([data-cutout-header]) body:has(#app>#home-navigation:not([hidden])) #home-navigation[data-flow=true] .session-strip{flex-wrap:nowrap;min-height:44px;padding:0;gap:8px}
html:not([data-cutout-header]) #home-navigation[data-flow=true] .question-nav{flex:none}
html:not([data-cutout-header]) body:has(#app>#home-navigation:not([hidden])) #home-navigation[data-flow=true] .session-strip #topic{display:none}
html:not([data-cutout-header]) #home-navigation[data-flow=true] .home-picker{min-height:44px;padding:0 4px;border:0;box-shadow:none;background:transparent;gap:8px}
html:not([data-cutout-header]) #home-navigation[data-flow=true] .home-picker-wrap{justify-self:start}
html:not([data-cutout-header]) #home-navigation[data-flow=true]~#exam-page #feed .reading{padding-top:12px}
#home-picker-menu .authored-practice-status{width:100%;flex-wrap:wrap;gap:4px;margin-top:8px;padding:8px 4px 0;border-top:1px solid var(--line)}
#home-picker-menu .authored-practice-status .fineprint{margin:0;font-size:12px;line-height:1.8}
#picker-previous{display:none}
@media(max-width:760px){
 html:not([data-cutout-header]) #app>#home-navigation[data-flow=true]{padding-inline:8px;column-gap:4px}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] .question-nav{display:none}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] .home-picker>:is(#home-subject-icon,#home-mode-icon,i){display:none}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] #home-mode-label{font-size:14px;white-space:nowrap}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] .question-clock>span{display:none}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] .question-clock b{font-size:18px;letter-spacing:0}
 html:not([data-cutout-header]) #home-navigation[data-flow=true]>.momentum{gap:0}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] .daily-progress{min-width:44px;padding:0 2px;gap:2px}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] .daily-emblem.compact{width:32px;height:32px}
 html:not([data-cutout-header]) #home-navigation[data-flow=true] #picker-previous{display:block;width:100%;margin-top:8px;border-top:1px solid var(--line);border-radius:0;text-align:left;background:transparent}
}
#home-navigation:not([data-flow=true]) .authored-practice-status{display:none}

/* §6.2/3.6: one paper surface, without the nested light shadow that created
   a pasted-in rectangle. Keep the approved paper and answer-fill tokens. */
html[data-color-theme] #exam-page #feed #card{background:transparent;box-shadow:none;border:0;border-radius:0}
html[data-color-theme] #feed .exercise-heading:has(.question-title:not(.visually-hidden)){margin-bottom:16px}
html[data-color-theme] #feed .exercise-heading .question-title{margin:0}
#feed .question-title.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#feed .continue-dock{display:flex;gap:12px;align-items:center;justify-content:flex-end;padding:12px 24px 16px;background:var(--bg);border-top:1px solid var(--line)}
#feed .continue-dock[hidden]{display:none}
#feed .continue-dock .desktop-continue{display:flex;align-items:center;justify-content:center;gap:12px;min-width:160px;min-height:48px;margin:0}
#feed .continue-dock small{color:var(--muted);font-size:12px}
#feed .continue-dock svg{width:18px;height:18px}
@media(hover:none) and (pointer:coarse){#feed .continue-dock small{display:none}}
#feed:before{display:none}
@media(max-width:760px){
 #feed .continue-dock{padding:8px 16px max(12px,var(--nuance-safe-area-bottom,env(safe-area-inset-bottom)));background:var(--paper)}
 #feed .continue-dock .desktop-continue{width:100%}
 #feed .continue-dock small{display:none}
}
/* One question, two reading surfaces. The central task owns the bottom action. */
#feed .flow-columns{display:flex;flex:1;min-height:0;min-width:0}
#feed .answer-column{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}
#feed .answer-column>.reading{flex:1;min-height:0}
#feed .context-pane[hidden],#feed .context-panel[hidden],#feed .context-entry[hidden]{display:none}
#feed .context-pane{min-width:0;min-height:0;flex-direction:column;background:var(--paper);border-radius:var(--ui-radius-sheet)}
#feed .context-head{flex:none;display:flex;align-items:center;gap:8px;padding:4px 12px;border-bottom:1px solid var(--line)}
#feed #context-tabs{display:flex;flex:1;gap:4px;min-width:0;flex-wrap:wrap}
#feed .context-head button{font:inherit;font-size:14px;min-height:44px;border:0;border-radius:8px;padding:8px 10px;background:transparent;color:var(--muted)}
#feed .context-head [aria-selected=true]{color:var(--text);background:var(--select-fill)}
#feed .context-reading{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:24px;scrollbar-gutter:stable both-edges}
#feed .context-panel{min-width:0}
#feed .context-entry{display:flex;align-items:center;min-height:48px;width:100%;padding:12px 0;text-align:left;background:transparent;border:0;color:var(--text);font:inherit}
#feed .context-entry::before{content:'›';margin-right:12px;color:var(--muted)}
#feed .context-panel>.solution,#feed .context-panel>.material,#feed .context-panel>.fenbi-media{border:0;margin:0;padding:0;background:transparent}
#feed .context-panel>.solution>summary,#feed .context-panel>.material>summary,#feed .context-panel>.fenbi-media>summary{display:none}
#feed .fenbi-comment-sheet[data-inline=true]{position:static;inset:auto;transform:none!important;margin:0;padding:0;border:0;border-radius:0;width:100%;max-width:none;height:100%;max-height:none;box-shadow:none;background:transparent;color:var(--text)}
#feed .fenbi-comment-sheet[data-inline=true][open]{display:flex;flex-direction:column}
#feed .fenbi-comment-sheet[data-inline=true] .fenbi-comment-sheet-head{padding:0 0 12px}
#feed .fenbi-comment-sheet[data-inline=true] .fenbi-sheet-handle{display:none}
#feed .fenbi-comment-sheet[data-inline=true] .fenbi-comment-scroll{padding:0;min-height:0;flex:1;overscroll-behavior:contain}
#feed .context-panel[data-context=comments]{height:100%}
#feed[data-answered=true] .reading{touch-action:pinch-zoom}
#feed[data-answered=false] .reading{touch-action:pan-y pinch-zoom}
@media(min-width:1280px){
 html[data-color-theme] #exam-page #feed{width:calc(100% - 48px);max-width:1440px}
 html[data-color-theme] #exam-page #feed[data-split=true]{max-width:1440px}
 #feed[data-split=true] .flow-columns{gap:24px}
 #feed[data-split=true] .context-pane{display:flex;flex:45;margin-top:12px;margin-bottom:16px}
 #feed[data-split=true] .answer-column{flex:55}
 html[data-color-theme] #feed[data-split=true] .reading{padding-left:0;padding-right:0}
 html[data-color-theme] #feed[data-split=true] .study-layout{padding:28px 24px}
 html[data-color-theme] #feed[data-split=true] #card{padding:0;margin-bottom:0}
 #feed[data-split=true] .controls{grid-template-columns:1fr}
}
@media(max-width:1279px){
 #feed .context-pane{display:none}
}
#feed .fenbi-comment-sheet[data-inline=true] .fenbi-comment-close{display:none}

#feed .context-pane{font-family:var(--reading-font)}
html[data-text-size]:not([data-text-size=standard]) #feed .context-pane .rich{font-size:calc(20px * var(--personal-size))}
html[data-spacing=airy] #feed .context-pane .rich{line-height:2.05}
html[data-spacing=compact] #feed .context-pane .rich{line-height:1.65}

/* Keep the task on a fixed central axis; peripheral feedback never owns reading. */
#feed .flow-peripheral{display:none}
#feed .option .mark:not(:empty){display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;margin-left:auto;line-height:1;background:none}
#feed .option .mark svg{display:block;width:24px;height:24px}
#feed .labels-only .option{padding-right:32px}
#feed .labels-only .mark:not(:empty){right:6px;top:50%;transform:translateY(-50%)}
#feed .rhythm-emblem{display:none}
#feed .rhythm-details{font-size:12px;min-height:44px;padding:8px 0;color:var(--muted)}
@media(min-width:1280px){
 #feed:not([data-split=true]) .flow-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,920px) minmax(0,1fr);gap:16px}
 #feed:not([data-split=true]) .answer-column{grid-column:2;grid-row:1}
 #feed:not([data-split=true]) .flow-peripheral{display:block;min-width:0;align-self:start;margin-top:clamp(72px,16vh,180px);padding:0 8px;font-family:var(--reading-font)}
 #feed:not([data-split=true]) .flow-momentum{grid-column:1;grid-row:1}
 #feed:not([data-split=true]) .flow-progress{grid-column:3;grid-row:1}
 #feed .flow-peripheral p{overflow-wrap:anywhere}
 #feed .peripheral-label{font-size:12px;color:var(--muted);margin:0 0 18px}
 #feed .flow-momentum>strong{display:block;font-size:16px;font-weight:500;line-height:1.65;margin-top:24px;color:var(--text)}
 #feed .peripheral-detail{font-size:12px;line-height:1.8;color:var(--muted);margin-top:8px}
 #feed .answer-trail{display:grid;grid-template-columns:repeat(4,24px);gap:10px 6px}
 #feed .answer-step{display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--line);border-radius:50%;color:var(--muted)}
 #feed .answer-step .mark{display:block;width:16px;height:16px}
 #feed .answer-step svg{display:block;width:16px;height:16px}
 #feed .answer-step[data-kind=correct]{border-color:var(--success);background:var(--success-fill);color:var(--success)}
 #feed .answer-step[data-kind=reflect]{border-color:var(--warm);color:var(--warm)}
 #feed .answer-step[data-kind=supported]{border-color:var(--purple);color:var(--purple)}
 #feed .flow-progress .daily-rhythm{padding:0;margin:0;border:0}
 #feed .flow-progress .rhythm-emblem{display:grid;width:80px;height:80px;margin:0 auto 18px}
 #feed .flow-progress .daily-rhythm-line{display:flex;flex-direction:column;align-items:flex-start;gap:5px;line-height:1.6}
 #feed .flow-progress .daily-round-track{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:16px 0}
 #feed .flow-progress .daily-round-track i{height:6px;min-width:0}
 #feed .flow-progress .daily-next-cue{font-size:12px;line-height:1.9}
 #feed .flow-progress .daily-celebration.inline{display:block;padding:0 0 18px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none}
 #feed .flow-progress .daily-celebration strong{font-size:16px}
 #feed .flow-progress .daily-celebration p{font-size:12px}
}
@media(prefers-reduced-motion:reduce){#feed .flow-momentum.advance .answer-step{animation:none}}
html[data-motion=reduced] #feed .flow-momentum.advance .answer-step{animation:none}


.question-source{font-size:calc(13px * var(--personal-size,1));line-height:1.65;color:var(--muted);margin:0 0 18px;letter-spacing:.015em;overflow-wrap:anywhere}.exercise-heading+.question-source{margin-top:-6px}.exam-review>.question-source{margin-bottom:24px}
