/* Round 4: shared catalog and tool chrome. Lessons and topic bodies remain unchanged. */
/* Topics: one selector row, then the existing resource row. */
html body #ll2-app .lab-secondary[data-route^="#atlas/"]{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px 12px!important;padding:6px!important}
html body #ll2-app .lab-secondary[data-route^="#atlas/"]>nav{display:flex!important;align-items:center;gap:6px;flex:1 1 350px;min-width:0}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .lab-topic-picker{flex:1;min-width:140px;max-width:400px;margin:0!important}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .lab-topic-picker select{width:100%!important;min-width:0!important}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .lab-route-context{flex:1 1 300px!important;min-width:0!important;width:auto!important;margin:0!important;padding:0!important}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .section-compass{margin:0!important;padding:0!important;max-width:none!important}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .compass-controls{display:flex!important;gap:6px;align-items:center;justify-content:flex-end}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .compass-controls label{flex:1;min-width:0;margin:0!important}
html body #ll2-app .lab-secondary[data-route^="#atlas/"] .compass-controls select{width:100%!important;max-width:none!important}
html body #ll2-app .lab-secondary .ll-quest-topic{margin:0!important;padding:0!important;display:flex;flex:none}
html body #ll2-app .ll-topic-resources{padding:6px!important;margin:6px 0 10px!important;gap:6px!important}
html body #ll2-app .ll-topic-resources>details>summary,html body #ll2-app .ll-topic-resources>button{padding:7px 10px!important;min-height:38px!important;font-size:16px!important}
/* Readings: one compact catalog toolbar; retain existing filter and list/card handlers. */
html body #ll2-app .ll-reading-filters{display:flex!important;flex-wrap:wrap!important;align-items:end!important;gap:8px!important;padding:0!important;margin:0 0 10px!important}
html body #ll2-app .ll-reading-filters>label{flex:1 1 160px!important;min-width:0!important;margin:0!important;font-size:13px!important}
html body #ll2-app .ll-reading-filters>label:first-child{flex:2 1 230px!important}
html body #ll2-app .ll-reading-filters :is(input,select){min-height:38px!important;padding:7px 10px!important;font-size:16px!important;margin-top:3px!important}
html body #ll2-app .ll-reading-filters .reading-view-bar{flex:0 0 auto!important;width:auto!important;margin:0!important;padding:0!important;gap:6px!important}
html body #ll2-app .reading-view-bar>span{display:none}
html body #ll2-app .reading-view-bar button{min-height:38px!important;padding:7px 10px!important;font-size:16px!important}
html body #ll2-app .stacks-grid.stacks-list .stack-card,html body #ll2-app .stacks-grid[data-view="list"] .stack-card,html body #ll2-app .stacks-grid.list-view .stack-card{padding:10px 12px!important;min-height:0!important;gap:4px 12px!important}
html body #ll2-app .stack-card h2{font-size:20px!important;margin:3px 0!important;line-height:1.25}
html body #ll2-app .stack-card .reading-byline{margin:0!important;font-size:14px!important}
html body #ll2-app .stack-card .stack-meta{font-size:11px!important;line-height:1.25}
/* Assessments: same compact search + segmented view grammar as Lessons. */
html body .ll-ar{font-family:inherit;max-width:none;width:100%;margin:0 auto;padding:12px 24px 60px;box-sizing:border-box}
html body .ll-ar-head{margin:0 0 8px;padding:0 0 6px;gap:8px}
html body .ll-ar h1{font-size:24px;margin:0}
html body .ll-ar h2{font-size:19px;margin:0}
html body .ll-ar-catalog-tools{display:flex;align-items:center;gap:8px;margin:0 0 10px;flex-wrap:wrap}
html body .ll-ar-catalog-tools>label{flex:1 1 240px;max-width:560px}
html body .ll-ar-catalog-tools input{width:100%;min-height:38px;padding:7px 10px;font:inherit;border:1px solid #c8d7ce;border-radius:8px;background:var(--panel,#fff);color:inherit}
html body .ll-ar-view{display:inline-flex;gap:0;border:1px solid #c8d7ce;border-radius:8px;overflow:hidden}
html body .ll-ar-view button{border:0;border-radius:0;min-height:38px}
html body .ll-ar-view button[aria-pressed=true]{background:var(--lab-green,#174e45);color:#fff}
html body .ll-ar-grid{gap:8px}
html body .ll-ar-grid>section{padding:10px;margin:0;min-width:0}
html body .ll-ar-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
html body .ll-ar-bank-help{margin:4px 0;font-size:14px}
html body .ll-ar-list{margin:8px 0 0;gap:6px}
html body .ll-ar[data-view=list] .ll-ar-list{display:grid;grid-template-columns:minmax(0,1fr)!important}
html body .ll-ar[data-view=list] .ll-ar-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,220px);align-items:center;min-height:56px;padding:9px 12px;gap:8px}
html body .ll-ar[data-view=cards] .ll-ar-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))!important}
html body .ll-ar[data-view=cards] .ll-ar-row{min-height:116px;padding:12px;border-radius:10px}
html body .ll-ar .ll-ar-row strong{font-size:16px;line-height:1.3}
html body .ll-ar .ll-ar-row em{font-size:13px}
html body .ll-ar .ll-ar-row[hidden]{display:none!important}
html body #ll-ar-detail:empty{display:none}
/* Lab tools: consistent control heights, spacing and typography, scoped away from diagrams. */
html body #ll2-app.ll-r4-lab :is(.bench-title-row,.bench-text-actions,.bench-editbar,.ll-analyzer-input-row,.ll-analyzer-heading,.ss-explorer-head){display:flex!important;align-items:center!important;flex-wrap:wrap;gap:6px 8px!important;padding:0!important;margin:0 0 8px!important}
html body #ll2-app.ll-r4-lab :is(.bench-title-row,.bench-text-actions,.bench-editbar,.ll-analyzer-input-row,.ll-analyzer-heading,.ss-explorer-head) :is(button,input,select,summary){min-height:38px!important;padding:7px 10px!important;border-radius:8px!important;font-size:16px!important;box-sizing:border-box}
html body #ll2-app.ll-r4-lab :is(.bench-title-row,.ll-analyzer-input-row)>label{margin:0!important;min-width:0;flex:1 1 210px}
html body #ll2-app.ll-r4-lab :is(.bench-workspace,.ss-explorer,.ll-analyzer-input){padding:12px!important;border-radius:12px!important;margin:0 0 8px!important;min-width:0;box-sizing:border-box}
html body #ll2-app.ll-r4-lab .bench-tutorial{padding:8px 12px!important;margin:0 0 8px!important}
html body #ll2-app.ll-r4-lab .bench-title-row label input{width:100%!important;margin:3px 0 0!important}
html body #ll2-app.ll-r4-lab .ll-analyzer-heading h1{font-size:24px!important;margin:0!important}
html body #ll2-app .weekly-progress-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:8px!important}
html body #ll2-app .weekly-progress-list>article{padding:12px!important}
html body #ll2-app .weekly-progress-list>article>p{font-size:15px;margin:6px 0}
@media(max-width:600px){html body .ll-ar{padding:10px 12px 50px}html body .ll-ar[data-view=list] .ll-ar-row{grid-template-columns:1fr}html body #ll2-app .lab-secondary[data-route^="#atlas/"]>nav{flex-basis:100%}html body #ll2-app .lab-secondary[data-route^="#atlas/"] .lab-route-context{flex-basis:100%}}
/* Draftlab uses the same search/filter/view rhythm as the reading catalog. */
html body #ll2-app.ll-r4-lab .draft-library-tools{display:flex!important;align-items:end!important;gap:8px!important;flex-wrap:wrap;padding:0!important;margin:0 0 10px!important}
html body #ll2-app.ll-r4-lab .draft-library-tools>label{flex:1 1 180px;min-width:0;margin:0!important;font-size:13px}
html body #ll2-app.ll-r4-lab .draft-library-tools>label:first-child{flex:2 1 230px}
html body #ll2-app.ll-r4-lab .draft-library-tools :is(input,select,button){min-height:38px!important;padding:7px 10px!important;font-size:16px!important;border-radius:8px!important;box-sizing:border-box}
html body #ll2-app.ll-r4-lab .draft-library-grid[data-view=list] .draft-library-card{padding:10px 12px!important;min-height:0!important;gap:4px 12px!important}
html body #ll2-app.ll-r4-lab .draft-library-card h2{font-size:20px!important;margin:3px 0!important}
html body #ll2-app.ll-r4-lab .draft-task-toolbar{display:flex!important;align-items:center;flex-wrap:wrap;gap:8px!important;padding:0!important;margin:8px 0!important}
html body #ll2-app.ll-r4-lab .draft-task-toolbar :is(button,select){min-height:38px!important;padding:7px 10px!important;font-size:16px!important}
html body #ll2-app.ll-r4-lab :is(.word-filters,.wordlab-inline,.page-title.compact-page-tools){display:flex!important;align-items:center;gap:8px!important;flex-wrap:wrap;padding:0!important;margin:0 0 8px!important}
html body #ll2-app.ll-r4-lab .word-filters>label{flex:1 1 160px;margin:0!important;min-width:0;font-size:13px}
html body #ll2-app.ll-r4-lab :is(.word-filters,.wordlab-inline,.page-title.compact-page-tools) :is(input,select,button){min-height:38px!important;padding:7px 10px!important;font-size:16px!important;border-radius:8px!important;box-sizing:border-box}
html body #ll2-app.ll-r4-lab .word-filters input,html body #ll2-app.ll-r4-lab .word-filters select{width:100%!important}
/* Spellinglab keeps its learning activities, with familiar compact tool navigation. */
html body .sl-root .sl-head{display:flex!important;align-items:center!important;flex-wrap:wrap;gap:8px!important;padding:6px 10px!important;margin:0 0 8px!important}
html body .sl-root .sl-homebtn small,html body .sl-root .sl-hero-text>p{display:none!important}
html body .sl-root .sl-nav{display:flex!important;gap:6px!important;overflow-x:auto;flex-wrap:nowrap;max-width:100%}
html body .sl-root .sl-nav button{min-height:38px!important;padding:7px 10px!important;font-size:16px!important;border-radius:8px!important;white-space:nowrap;flex-shrink:0}
html body .sl-root .sl-hero{padding:8px 10px!important;margin:0 0 8px!important;min-height:0!important}
html body .sl-root .sl-hero h1{font-size:24px!important;margin:0!important}
html body .sl-root .ll-spell-listbar{display:flex;align-items:center;gap:8px;justify-content:space-between;margin:8px 0}
html body .sl-root .ll-spell-view button{min-height:38px!important;padding:7px 10px!important;font-size:16px!important}
html body .pl-head{display:flex!important;align-items:center!important;flex-wrap:wrap;gap:8px!important;padding:6px 10px!important;margin:0 0 8px!important}
html body .pl-nav{display:flex!important;gap:6px!important;overflow-x:auto!important;flex-wrap:nowrap!important;max-width:100%;min-width:0;flex:1 1 600px}
html body .pl-nav button{min-height:38px!important;padding:7px 10px!important;font-size:16px!important;border-radius:8px!important;white-space:nowrap;flex-shrink:0}
html body #ll2-app .stacks-grid.stacks-list .stack-card{grid-template-columns:minmax(0,1fr) auto auto!important;grid-template-rows:auto auto auto!important}
html body #ll2-app .stacks-grid.stacks-list .stack-card>.ll-reading-about{grid-column:2!important;grid-row:1/4!important;align-self:center!important}
html body #ll2-app .stacks-grid.stacks-list .stack-card>button{grid-column:3!important;grid-row:1/4!important;align-self:center!important;margin:0!important}
html body #ll2-app .stacks-grid.stacks-list .stack-card>h2{margin:0!important}
@media(max-width:540px){html body #ll2-app .stacks-grid.stacks-list .stack-card{grid-template-columns:minmax(0,1fr) auto!important}html body #ll2-app .stacks-grid.stacks-list .stack-card>.ll-reading-about{grid-column:2!important;grid-row:1!important}html body #ll2-app .stacks-grid.stacks-list .stack-card>button{grid-column:2!important;grid-row:2/4!important}}
