/* Dropdown headers are complete controls with room for their outer glow. */
html body.duck-airy.duck-redesign #libraryScreen .studio-collection{
 overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important;
}
html body.duck-airy.duck-redesign #libraryScreen .studio-collection>summary{
 border:1px solid var(--du-line)!important;border-radius:24px!important;
}
html body.duck-airy.duck-redesign #libraryScreen .collection-content{border-top:0!important;}

/* The journal disclosure's hit area includes the whole padded header. */
html body.duck-airy.duck-redesign :is(#modernReviewScreen,#studyScreen) details.study-panel{padding:0!important;overflow:visible;}
html body.duck-airy.duck-redesign :is(#modernReviewScreen,#studyScreen) details.study-panel>summary{
 padding:20px 24px;cursor:pointer;border-radius:inherit;list-style-position:inside;
}
html body.duck-airy.duck-redesign :is(#modernReviewScreen,#studyScreen) details.study-panel[open]{padding-bottom:20px!important;}
html body.duck-airy.duck-redesign :is(#modernReviewScreen,#studyScreen) details.study-panel>:not(summary){margin-left:24px;margin-right:24px;}
html body.duck-airy.duck-redesign :is(#modernReviewScreen,#studyScreen) details.study-panel>label{display:block;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign
:is(#modernReviewScreen,#studyScreen) details.study-panel:has(>summary:is(:hover,:focus-visible)){
 box-shadow:0 0 0 1px rgba(255,220,90,.88),0 0 14px rgba(255,210,60,.26)!important;
}

/* Reserve separate bottom-left and bottom-right spaces for action and artwork. */
html body.duck-airy.duck-redesign #dashboardScreen .du-next-list>.du-next-item:first-child{
 height:auto!important;min-height:352px!important;padding-bottom:178px!important;
}
html body.duck-airy.duck-redesign #dashboardScreen .du-next-item>.airy-continue-arrow{
 left:24px;right:auto;top:auto;bottom:26px;
}
html body.duck-airy.duck-redesign #dashboardScreen .du-next-item>.airy-card-duck{
 width:min(48%,160px);height:146px;right:14px;bottom:14px;transform:none;
}

/* Dark home-page cards have permanent yellow borders, not gold fills. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen :is(.dash-stat,.mastery-card,.du-next-item),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen .du-next-list>.du-next-item:first-child{
 --du-ink:#f4f5fb;--du-muted:#b5bac8;--du-gradient-ink:#f4f5fb;
 background:var(--du-bg)!important;color:#f4f5fb!important;
 border:1px solid #d8bd52!important;
 box-shadow:0 0 12px rgba(255,210,60,.18),inset 0 0 0 1px rgba(255,220,90,.08)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen :is(.dash-stat,.mastery-card,.du-next-item) :is(h2,h3,p,b,strong,small,span,div,label,a),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen .du-next-list>.du-next-item:first-child>:is(b,p,small){color:#f4f5fb!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen :is(.dash-stat,.mastery-card,.du-next-item) :is(.airy-stat-icon,.airy-paper-icon){background:#292d37!important;color:#ffdc5a!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen .du-next-item :is(button,.bigbtn){background:var(--du-bg)!important;color:#f4f5fb!important;border-color:#d8bd52!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen .studio-heading::after,
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen .studio-heading>.duck-mascot::before{display:none!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen #dashboardTiming :is(.study-list-row,.study-clickable-row,th){background:var(--du-bg)!important;color:var(--du-ink)!important;border-color:var(--du-line)!important;}

/* A selected option remains visibly selected after the pointer moves away. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #studyScreen .study-answer.selected:not(.correct):not(.incorrect){
 background:#343a46!important;color:#fff!important;border:2px solid #ffdc5a!important;
 box-shadow:inset 5px 0 0 #ffdc5a!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #studyScreen .study-answer.selected:not(.correct):not(.incorrect)>b{
 background:#ffdc5a!important;color:#191b23!important;border-radius:5px;padding:0 7px;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #studyScreen .study-answer.correct{background:#203d2c!important;border:2px solid #72c58a!important;color:#c7f4d1!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #studyScreen .study-answer.incorrect{background:#482b28!important;border:2px solid #e08781!important;color:#ffd0cb!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #testMain .opt.sel:not(.correct):not(.wrong){
 background:rgba(255,220,90,.13)!important;box-shadow:inset 4px 0 0 #d1a719!important;
}

/* Extend the dark home-card treatment to review, mistakes and results. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #mentalScreen.modern-ui{
 background:var(--du-bg)!important;color:var(--du-ink)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen,#resultScreen) :is(.review-paper-head,.scorehead),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen #wrongBuilder{
 --du-ink:#f4f5fb;--du-muted:#b5bac8;--du-gradient-ink:#f4f5fb;
 background:var(--du-bg)!important;color:var(--du-ink)!important;
 border:1px solid #d8bd52!important;
 box-shadow:0 0 12px rgba(255,210,60,.18),inset 0 0 0 1px rgba(255,220,90,.08)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen,#resultScreen) :is(.review-paper-head,.scorehead) :is(h2,h3,p,b,strong,small,span,div,label,a,button),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen #wrongBuilder :is(h2,h3,p,b,strong,small,span,div,label,a,button){color:var(--du-ink)!important;}
/* Keep the header's outer glow visible along its straight edges. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen) .review-paper{
 overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen) .review-paper-head{border-radius:18px!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #reviewHubScreen .review-attempt{border-radius:12px;margin-top:8px;}
/* Filled actions use the same black-and-gold treatment as their panels. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen,#resultScreen) :is(.bigbtn,.study-btn,.review-go,a.official-solution-link),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen #wrongBuilder :is(.bigbtn,.study-btn,.review-go){
 background:var(--du-bg)!important;color:#f4f5fb!important;border:1px solid #d8bd52!important;
 box-shadow:0 0 12px rgba(255,210,60,.18),inset 0 0 0 1px rgba(255,220,90,.08)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen,#resultScreen) :is(.bigbtn,.study-btn,.review-go):disabled,
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen #wrongBuilder button:disabled{box-shadow:none!important;}
/* Neutral backgrounds for both populated and empty mistake-history boxes. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen :is(.wrong-empty,.review-attempt,.resolved-error-list,.wrong-row,.random-row,.resolved-row){
 background:var(--du-bg)!important;color:var(--du-ink)!important;border-color:var(--du-line)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen #wrongBuilder :is(select,option){
 --du-ink:#f4f5fb;background:var(--du-bg)!important;color:var(--du-ink)!important;border-color:var(--du-line)!important;
}

/* Bright, softly glowing performance line in dark mode only. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen #dashMasteryChart path[stroke]{
 stroke:#ffdc5a!important;stroke-width:2.5;
 filter:drop-shadow(0 0 2px rgba(255,220,90,.8)) drop-shadow(0 0 6px rgba(255,210,60,.4));
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen #dashMasteryChart circle{
 fill:#ffdc5a!important;stroke:var(--du-surface)!important;
 filter:drop-shadow(0 0 3px rgba(255,210,60,.5));
}

/* Shared black-and-gold content panels throughout the dark workspace. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign
:is(#dashboardScreen,#libraryScreen,#reviewHubScreen,#wrongHubScreen,#bankScreen,#bookmarksScreen,#journalScreen,#plannerScreen,#studyScreen,#modernReviewScreen,#mentalScreen,#startScreen,#resultScreen)
:is(.dash-panel,.studio-chart,.studio-benchmarks,.dash-split-card,.airy-recent,.airy-analysis,.study-panel,.study-list-row:not(.bank-question-row),.study-plan,.study-solution,.modern-review-card,.modern-review-sidebar,.mm-panel,.mm-stats>div,.du-paper-filters,.wrong-empty,.resolved-error-list,.spec,.pinbox,.leaderboard):not(.airy-recent>.dash-panel),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#startScreen,#resultScreen,#loginScreen)>.card,
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#profileSettings,#duckQuickFind){
 background:var(--du-bg)!important;color:var(--du-ink)!important;
 border:1px solid #d8bd52!important;
 box-shadow:0 0 12px rgba(255,210,60,.18),inset 0 0 0 1px rgba(255,220,90,.08)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #libraryScreen .studio-collection>summary{
 background:var(--du-bg)!important;border:1px solid #d8bd52!important;
 box-shadow:0 0 12px rgba(255,210,60,.18),inset 0 0 0 1px rgba(255,220,90,.08)!important;
}
/* Clickable column headings retain keyboard focus and announce sort direction. */
html body.duck-airy.duck-redesign #dashboardScreen #dashTopics .topic-sort{
 appearance:none;display:inline-flex;align-items:center;gap:5px;padding:6px 2px;
 border:0;background:transparent;color:inherit;font:inherit;text-transform:inherit;
 letter-spacing:inherit;cursor:pointer;white-space:nowrap;border-radius:5px;
}
html body.duck-airy.duck-redesign #dashboardScreen #dashTopics .topic-sort:focus-visible{outline:2px solid #d8b638;outline-offset:3px;}
html body.duck-airy.duck-redesign #dashboardScreen #dashTopics [role="columnheader"]:nth-child(n+3){text-align:right;}
html body.duck-airy.duck-redesign #dashboardScreen #dashTopics [role="columnheader"][aria-sort]:not([aria-sort="none"]) .topic-sort{font-weight:800;}
/* A luminous accuracy line, with its endpoint centred on the exact percentage. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen #dashTopics .topic-bar{
 height:3px!important;background:#333943!important;overflow:visible!important;position:relative;border-radius:99px!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen #dashTopics .topic-fill{
 height:3px!important;position:relative;background:#ffdc5a!important;
 box-shadow:0 0 5px rgba(255,220,90,.75),0 0 11px rgba(255,210,60,.35);
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #dashboardScreen #dashTopics .topic-fill::after{
 content:"";position:absolute;right:0;top:50%;transform:translate(50%,-50%);
 width:10px;height:10px;box-sizing:border-box;border-radius:50%;
 background:var(--du-bg);border:2px solid #ffdc5a;
 box-shadow:0 0 5px rgba(255,220,90,.85),0 0 11px rgba(255,210,60,.4);
}
@media(max-width:900px){
 html body.duck-airy.duck-redesign #dashboardScreen .airy-topics>.dash-panel{overflow-x:auto!important;}
 html body.duck-airy.duck-redesign #dashboardScreen #dashTopics{min-width:720px!important;}
 html body.duck-airy.duck-redesign #dashboardScreen #dashTopics .topic-row{grid-template-columns:minmax(145px,1.3fr) minmax(150px,2fr) 70px 100px 100px!important;}
 html body.duck-airy.duck-redesign #dashboardScreen #dashTopics :is(.topic-attempts,.topic-time){display:block!important;}
}

/* Individual rows and paper controls glow only on interaction. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign
:is(#libraryScreen,#bankScreen,#reviewHubScreen,#wrongHubScreen)
:is(.paper,.airy-library-row,.studio-collection>summary,.bank-question-row,.review-paper-head,.review-attempt,.review-go,.resolved-error-list){
 background:var(--du-bg)!important;border:1px solid var(--du-line)!important;
 box-shadow:none!important;border-radius:16px!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign
:is(#libraryScreen,#bankScreen,#reviewHubScreen,#wrongHubScreen)
:is(.paper,.airy-library-row,.studio-collection>summary,.bank-question-row,.review-attempt,.review-go):not(:disabled):not(.locked):is(:hover,:focus-visible,:has(:focus-visible)){
 border-color:#d8bd52!important;
 box-shadow:0 0 0 1px rgba(255,220,90,.88),0 0 14px rgba(255,210,60,.26)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign :is(#reviewHubScreen,#wrongHubScreen) .review-go{
 padding:9px 15px!important;border-radius:10px!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #wrongHubScreen .resolved-error-list{padding:8px;}

/* Paper preview: unboxed instructions and black history/leaderboard panels. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen :is(#stdInstructions,#companionInstructions){
 background:transparent!important;border:0!important;box-shadow:none!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen :is(#attemptHist,#lbCard){
 background:var(--du-bg)!important;color:var(--du-ink)!important;
 border:1px solid var(--du-line)!important;border-radius:16px!important;overflow:hidden;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen :is(#attemptHist,#lbCard) :is(.ahead,.arow,.arow.me,.md){
 background:var(--du-bg)!important;color:var(--du-ink)!important;border-color:var(--du-line)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #attemptHist,
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #attemptHist .arow{
 box-shadow:none!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #lbCard{
 border-color:#d8bd52!important;
 box-shadow:0 0 12px rgba(255,210,60,.18),inset 0 0 0 1px rgba(255,220,90,.08)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #attemptHist:is(:hover,:focus-within){
 border-color:#d8bd52!important;
 box-shadow:0 0 0 1px rgba(255,220,90,.88),0 0 14px rgba(255,210,60,.26)!important;
}

/* Results detail: readable instructions, luminous history grid and quiet rows. */
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen :is(#stdInstructions,#companionInstructions),
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen :is(#stdInstructions,#companionInstructions) *{
 color:#fff!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #qGrid{
 background:var(--du-bg)!important;border:1px solid #d8bd52!important;border-radius:12px!important;
 box-shadow:0 0 12px rgba(255,210,60,.22),inset 0 0 0 1px rgba(255,220,90,.08)!important;
 scrollbar-color:#d8bd52 var(--du-bg);
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #qGrid :is(table,th,td){
 background:var(--du-bg)!important;color:#fff!important;border-color:rgba(255,220,90,.22)!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #qGrid th{
 border-bottom:1px solid #d8bd52!important;box-shadow:inset 0 -1px 5px rgba(255,210,60,.10);
}
html body.duck-airy.duck-redesign #startScreen #lbCard .arow{
 border-top:1px solid var(--du-line)!important;border-bottom:0!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #startScreen #lbCard .arow{
 border-top-color:rgba(255,220,90,.20)!important;
}
/* The extra difficulty field wraps naturally for narrow and combined results. */
html body.duck-airy.duck-redesign #resultScreen .brow{flex-wrap:wrap;}
html body.duck-airy.duck-redesign #resultScreen .brow .qdifficulty{
 width:105px;flex-shrink:0;font-size:12.5px;white-space:nowrap;color:var(--du-ink);
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #resultScreen #breakdown{
 background:var(--du-bg)!important;border:0!important;box-shadow:none!important;
 padding:12px;margin:10px -12px;border-radius:0!important;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #resultScreen #breakdown .brow{
 background:var(--du-bg)!important;color:#fff!important;
 border:1px solid var(--du-line)!important;border-radius:12px!important;margin:8px 0!important;
 box-shadow:none!important;transition:border-color .16s ease,box-shadow .16s ease;
}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #resultScreen #breakdown .brow :is(.qn,.ans,.topic,.qtime,.qdifficulty,.paperref){color:#fff!important;}
html[data-duck-theme="dark"] body.duck-airy.duck-redesign #resultScreen #breakdown .brow:is(:hover,:focus-visible){
 border-color:#d8bd52!important;
 box-shadow:0 0 0 1px rgba(255,220,90,.88),0 0 12px rgba(255,210,60,.26)!important;
}
@media(prefers-reduced-motion:reduce){
 html[data-duck-theme="dark"] body.duck-airy.duck-redesign #resultScreen #breakdown .brow{transition:none;}
}
