/* Result filters: scoped source delta; existing live search styles preserved. */
:is(.library-nav,.library-result-filters) .filter-select>button,.edition-select>button{border-radius:18px;border-color:#d6cec1;min-height:50px;background:var(--white);font-size:15px;transition:border-color .16s,background .16s;box-shadow:none}
:is(.library-nav,.library-result-filters) .filter-select>button:hover,.edition-select>button:hover{border-color:#b5b3a5;background:#fcfcf8}
:is(.library-nav,.library-result-filters) .filter-select>button.has-value,:is(.library-nav,.library-result-filters) .filter-select>button[aria-expanded=true],.edition-select>button.has-value,.edition-select>button[aria-expanded=true]{border-color:#d6cec1;box-shadow:none;font-weight:500}
:is(.library-nav,.library-result-filters) .filter-select>button>.icon,.edition-select>button>.icon{width:16px;height:16px;transition:transform .18s ease;stroke-width:1.7;flex:none}
:is(.library-nav,.library-result-filters) .filter-options,.edition-select .filter-options{border-radius:20px;padding:8px;border-color:#e1d9cc;box-shadow:0 12px 30px #332d211c;animation:library-menu-in .16s ease-out;transform-origin:top;min-width:100%;z-index:20}
:is(.library-nav,.library-result-filters) .filter-options[data-direction=up],.edition-select .filter-options[data-direction=up]{transform-origin:bottom;animation-name:library-menu-up}
:is(.library-nav,.library-result-filters) .filter-options [role=option],.edition-select .filter-options [role=option],:is(.library-nav,.library-result-filters) .task-choice{border-radius:13px;min-height:46px;padding:10px 12px;font-size:14px;line-height:1.4;white-space:normal}
:is(.library-nav,.library-result-filters) .filter-value,.edition-select .filter-value{display:inline-flex;align-items:center;gap:9px;min-width:0;text-align:left;white-space:normal}
:is(.library-nav,.library-result-filters) .filter-value>span,:is(.library-nav,.library-result-filters) .option-name>span:last-child{min-width:0;overflow-wrap:anywhere}
:is(.library-nav,.library-result-filters) .option-name{min-width:0;gap:10px}
:is(.library-nav,.library-result-filters) .option-check,.edition-select .option-check{flex:0 0 18px;display:flex;align-items:center;justify-content:center}
:is(.library-nav,.library-result-filters) .filter-options [aria-selected=true],.edition-select .filter-options [aria-selected=true]{background:transparent;color:var(--ink);font-weight:500}
:is(.library-nav,.library-result-filters) .filter-options [role=option]:hover,.edition-select .filter-options [role=option]:hover{background:#f5f2ed}
:is(.library-nav,.library-result-filters) :is(button,a,input):focus:not(:focus-visible),.edition-select button:focus:not(:focus-visible){outline:none;box-shadow:none}
:is(.library-nav,.library-result-filters) .filter-options [role=option]:focus-visible,.edition-select .filter-options [role=option]:focus-visible{outline:none;background:#f0ece6;box-shadow:none;text-decoration:none}
:is(.library-nav,.library-result-filters) .task-menu-head,:is(.library-nav,.library-result-filters) .task-menu-foot{flex:none}
:is(.library-nav,.library-result-filters) .task-menu-foot button{border-radius:12px}
@media(max-width:800px){
 .library-nav-row{gap:12px;flex-wrap:wrap}.library-nav-home{width:100%;min-height:27px;font-size:14px}.library-nav .search-form{flex:1}.library-filter-toggle{padding-inline:13px}
 #library-filter-panel .filters{gap:12px}:is(.library-nav,.library-result-filters) .filter-caption{font-size:13px}:is(.library-nav,.library-result-filters) .filter-caption>.icon{display:none}
 :is(.library-nav,.library-result-filters) .filter-select>button{font-size:14px;padding:10px 12px}
 #library{scroll-margin-top:185px}
}
@media(max-width:560px){
 .library-nav{position:relative;padding:13px 0 11px}.library-nav-row{gap:10px}.library-nav .search-form{flex-basis:calc(100% - 76px);padding-left:11px;gap:8px}.library-nav .search-form input{font-size:14px}.library-nav .search-form .button{padding:6px 13px}.library-filter-toggle{padding:10px;gap:5px;min-width:57px}.library-filter-toggle>span:not(.filter-count){display:none}.library-filter-toggle>.icon:last-child{width:12px}
 #library-filter-panel .filters{grid-template-columns:1fr;gap:14px}:is(.library-nav,.library-result-filters) .filter-caption{margin-bottom:6px}:is(.library-nav,.library-result-filters) .filter-select>button{min-height:48px}:is(.library-nav,.library-result-filters) .filter-options{max-width:100%;font-size:14px}
 :is(.library-nav,.library-result-filters) .filter-value>span{white-space:normal}.library-scope{gap:6px;font-size:12px}.library-scope>button{font-size:12px;min-height:34px}.library-scope .scope-description{font-size:12px}
 .edition-select{min-width:0;width:100%}.edition-select>button{max-width:none;min-width:0;flex:1;font-size:14px}.edition-select .filter-options{width:calc(100% - 58px)}
 .library-breadcrumb{font-size:12px;gap:7px;margin-bottom:18px}.provider-view{padding-top:20px}.provider-view #results-heading{font-size:30px}
 .lesson-series-page .lesson-intro h1{font-size:30px}#library{scroll-margin-top:20px}
}
.has-result-filters .library-hero .search-form{flex:0 1 540px;width:540px;max-width:100%;border-radius:12px}
.has-result-filters .library-hero .library-nav-row{gap:0}
.has-result-filters .library-filter-toggle[hidden],.library-result-filters[hidden]{display:none!important}
.has-result-filters #library:not(.provider-view) .library-heading{margin-bottom:20px}
#library-filter-panel.library-result-filters{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 24px;padding:0 0 20px;border:0;border-bottom:1px solid #d7dfd0;border-radius:0;background:none;box-shadow:none;animation:none;position:relative;isolation:isolate}
.library-result-filters:has(#task-button[aria-expanded=true]){z-index:45}
#library-filter-panel.library-result-filters .filters{display:block;width:275px;max-width:100%;margin:0;flex:0 1 275px}
.library-result-filters .filter-caption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#library-filter-panel.library-result-filters #task-button{min-height:48px;border-radius:12px;border:1px solid #d6cec1;background:var(--white);color:var(--green-dark);padding:8px 13px;gap:10px;font:inherit;font-size:14px;font-weight:400;text-align:start}
.library-result-filters #task-button>.icon:first-child{width:23px;height:23px;flex:none}
.library-result-filters #task-button>.filter-value{flex:1;text-align:start}
.library-result-filters #task-button>.icon:last-child{width:14px;height:14px}
#library-filter-panel.library-result-filters .free-tools-control{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;margin:0;padding:8px 13px;border:1px solid #d6cec1;border-radius:12px;background:var(--white);font-size:14px;font-weight:400;line-height:1.4;color:var(--green-dark);cursor:pointer}
.library-result-filters .free-tools-control input{height:18px;width:18px;margin:0;accent-color:#496c57;flex:none}
#library-filter-panel.library-result-filters :is(#task-button.has-value,.free-tools-control:has(:checked)){background:var(--cream);border-color:#bac7b7}
#library-filter-panel.library-result-filters :is(#task-button,.free-tools-control):hover{background:var(--cream);border-color:#879b80}
#library-filter-panel.library-result-filters :is(#task-button:focus-visible,.free-tools-control:focus-within){outline:none;box-shadow:none;border-color:#425b4d;text-decoration:underline;text-underline-offset:3px}
.library-result-filters .filter-options{width:360px;max-width:calc(100vw - 60px);min-width:100%;inset-inline-start:0;inset-inline-end:auto;text-align:start}
.library-result-filters .filter-options[hidden]{display:none!important}
.library-result-filters .task-choice{cursor:pointer}
.library-result-filters .task-choice input{accent-color:#496c57}
.library-result-filters .library-scope{flex-basis:100%;margin:0;min-height:0}
.library-result-filters .library-scope:not(.has-chips){display:none}
.library-result-filters .search-status{flex-basis:100%;margin:0}
.library-result-filters .search-status.sr-only{position:absolute;flex-basis:auto}
html[dir=rtl] .library-result-filters .filter-options{left:auto;right:0}
@media(max-width:560px){
 .has-result-filters .library-hero .search-form{width:100%;flex-basis:100%;padding-inline:10px}
 .has-result-filters .library-hero .search-form input{font-size:14px}
 .has-result-filters .library-hero .search-mic{width:36px;min-width:36px}
 #library-filter-panel.library-result-filters{gap:8px;margin-bottom:20px;padding-bottom:18px}
 #library-filter-panel.library-result-filters .filters{width:auto;flex:1 1 150px;min-width:0}
 #library-filter-panel.library-result-filters #task-button{padding:8px 10px;gap:8px}
 .library-result-filters #task-button>.icon:first-child{width:20px;height:20px}
 #library-filter-panel.library-result-filters .free-tools-control{padding:8px 10px;gap:8px;flex:0 1 auto}
 .library-result-filters .filter-options{max-width:calc(100vw - 60px)}
}
@media(forced-colors:active){#library-filter-panel.library-result-filters :is(#task-button,.free-tools-control){border-color:ButtonText}#library-filter-panel.library-result-filters :is(#task-button.has-value,.free-tools-control:has(:checked)){border-color:Highlight}}

/* Stack overview controls in reading order; program galleries retain their layout. */
.has-result-filters #library:not(.provider-view) .library-heading.edition-heading{flex-direction:column;align-items:stretch;gap:20px}
.has-result-filters #library:not(.provider-view) .library-heading.edition-heading>div:first-child,.has-result-filters #library:not(.provider-view) .library-heading.edition-heading #edition-switch{flex:0 1 auto}
.has-result-filters #library:not(.provider-view) .library-heading .edition-selector{justify-content:flex-start}

/* Let task names use the whole row, including narrow mobile menus. */
.library-result-filters .task-choice .option-name{flex:1;min-width:0}
.library-result-filters .task-choice .option-name>span:last-child{flex:1}

/* Approved compact landing controls: heading, then platforms | task and price. */
.has-result-filters #library:not(.provider-view)>.container{container:library-controls / inline-size}
.has-result-filters #library:not(.provider-view) .program-intro{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:18px;align-items:start;padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid #d7dfd0}
.has-result-filters #library:not(.provider-view) .program-intro>.library-heading.edition-heading{display:contents}
.has-result-filters #library:not(.provider-view) .library-heading>div:first-child{grid-column:1/-1;margin-bottom:18px;min-width:0}
.has-result-filters #library:not(.provider-view) .library-heading #edition-switch{grid-column:1;grid-row:2;margin:0;min-width:0}
.has-result-filters #library:not(.provider-view) .edition-selector{flex-wrap:nowrap;gap:8px}
.has-result-filters #library:not(.provider-view) #library-filter-panel.library-result-filters{grid-column:2;grid-row:2;align-self:start;align-items:center;justify-content:flex-start;min-width:0;margin:0;padding:0 0 0 19px;border:0;gap:10px}
.has-result-filters #library:not(.provider-view) #library-filter-panel::before{content:'';position:absolute;inset-inline-start:0;top:10px;width:1px;height:28px;background:#cbd4c5;pointer-events:none}
.has-result-filters #library:not(.provider-view) #library-filter-panel .filters{width:184px;flex:0 1 184px;min-width:0}
.has-result-filters #library:not(.provider-view) #task-button{padding-inline:11px;gap:8px;font-size:14px}
.has-result-filters #library:not(.provider-view) #task-button>.icon:first-child{width:20px;height:20px}
.has-result-filters #library:not(.provider-view) .free-tools-control{padding-inline:11px;white-space:nowrap}
.has-result-filters #library:not(.provider-view) .program-intro>:not(.library-heading):not(#library-filter-panel){grid-column:1/-1}
html[dir=rtl] .has-result-filters #library:not(.provider-view) #library-filter-panel.library-result-filters{padding-inline:19px 0}
@container library-controls (max-width:820px){
 .has-result-filters #library:not(.provider-view) .program-intro{grid-template-columns:minmax(0,1fr);column-gap:0}
 .has-result-filters #library:not(.provider-view) #library-filter-panel.library-result-filters{grid-column:1;grid-row:3;padding:0;margin-top:14px}
 .has-result-filters #library:not(.provider-view) #library-filter-panel::before{display:none}
}
@media(max-width:560px){
 .has-result-filters #library:not(.provider-view) .program-intro{padding-bottom:20px;margin-bottom:20px}
 .has-result-filters #library:not(.provider-view) .edition-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .has-result-filters #library:not(.provider-view) .edition-icon-button{width:100%;justify-content:flex-start}
 .has-result-filters #library:not(.provider-view) #library-filter-panel.library-result-filters{gap:8px;margin-top:12px}
 .has-result-filters #library:not(.provider-view) #library-filter-panel .filters{flex:1 1 140px;width:auto}
 .has-result-filters #library:not(.provider-view) .free-tools-control{flex:0 1 auto;padding-inline:9px}
}
