/* One compact toolbar leaves the remaining viewport for reading and exploring. */
.workspace{container-type:inline-size}
.workspace-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex:none;min-width:0;padding:10px 18px;border-bottom:1px solid var(--border)}
.workspace-header .workspace-heading{display:flex;align-items:center;gap:12px;flex:0 0 auto;min-height:40px;padding:0;order:0}
.workspace-header h1{margin:0;font-size:18px;line-height:26px;font-weight:550;letter-spacing:-.4px;white-space:nowrap}
.workspace-header .result-count{margin:0;padding:0;border:0;font-size:11px;line-height:18px;color:#a5b379;font-variant-numeric:tabular-nums;white-space:nowrap}
.workspace-header .workspace-controls{order:2;display:flex;flex:1 1 210px;max-width:380px;min-width:0;gap:8px;margin-left:auto;padding:0}
.workspace-header .workspace-controls[hidden],.workspace-header .view-tools[hidden]{display:none}
.workspace-header .workspace-controls .search{min-width:0;max-width:none;width:auto;flex:1}
.workspace-header .workspace-controls .toolbar-trigger{width:auto;min-width:40px}
.workspace-header .trigger-label{display:inline}
.workspace-header .view-tools{order:1;min-width:0;margin-left:auto}
.workspace-header .word-view-toolbar{margin:0;gap:10px;flex-wrap:nowrap}
.workspace-header .word-view-switch{padding:3px;gap:2px;flex-wrap:nowrap;border-radius:10px}
.workspace-header .word-view-switch button{min-height:40px;padding:7px 11px;gap:6px;white-space:nowrap;font-size:12px;border-radius:7px}
.workspace-header .word-map-limit{gap:0}
.workspace-header .word-map-limit select{max-width:130px;font-size:12px}
.word-info-button{min-width:40px;min-height:40px;padding:7px;border-color:transparent;font-size:19px;color:var(--muted)}
.word-info-dialog{max-width:480px}
.word-info-dialog .dialog-heading h2{font-size:20px;margin:0}
.word-info-dialog .dialog-heading button{min-width:40px;min-height:40px;padding:0}
.word-info-dialog .analysis-intro{margin:20px 0 12px;font-size:13px}
.word-info-dialog p{font-size:13px}
.workspace:has(.word-frequency) .workspace-header .result-count{display:none}
.word-frequency.has-header-tools{padding:20px 18px}
.content.has-bubble-map{overflow:hidden}
.word-frequency.has-header-tools.is-bubble-view{height:100%;min-height:0;padding:10px}
.word-frequency.has-header-tools.is-bubble-view .word-frequency-panel{min-height:0}
.word-frequency.has-header-tools.is-bubble-view .word-map-card{position:relative;height:100%;min-height:0;padding:0;border-radius:12px;overflow:hidden}
.word-frequency.has-header-tools.is-bubble-view .word-bubble-map{flex:1;min-height:0;border-radius:12px}
.word-frequency.has-header-tools.is-bubble-view .word-map-navigation{position:absolute;z-index:3;bottom:12px;left:14px;right:14px;margin:0;pointer-events:none}
.word-frequency.has-header-tools .word-map-zoom{pointer-events:auto;background:#141a04ef;box-shadow:0 2px 14px #00000055,inset 0 0 0 1px #e6edcd0b}
.workspace:has(.has-bubble-map)>.workspace-footer{display:none}
/* Filtering stays visible while the results scroll, in every archive view. */
.workspace .active-filters{display:flex;align-items:center;gap:16px;flex:none;min-width:0;padding:14px 18px;background:#081b0d;border-bottom:1px solid #285b32;box-shadow:inset 3px 0 var(--punk-green,#28b143)}
.workspace .active-filters[hidden]{display:none}
.filter-summary{display:flex;align-items:center;gap:10px;flex:none}
.filter-summary-icon{color:#5cd576;flex:none}
.filter-summary strong{display:block;color:#dcf6de;font-size:12px;font-weight:600;line-height:20px}
.filter-summary #filter-result-summary{display:block;margin-top:2px;color:#92b79b;font-size:10px;line-height:18px;font-variant-numeric:tabular-nums}
.active-filter-chips{display:flex;align-items:center;flex:1;gap:8px;flex-wrap:wrap;min-width:0}
.active-filters .active-filter-chip{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;min-height:40px;padding:8px 10px;border:1px solid #31543a;border-radius:6px;background:#07140b;color:#e1edda;font-size:11px;line-height:20px;transition:background-color .15s,border-color .15s,scale .15s}
.active-filter-chip .filter-chip-label{color:#89c497;font-size:10px;flex:none}
.active-filter-chip .filter-chip-value{max-width:260px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.active-filter-chip .filter-chip-remove{color:#91bb9c;font-size:19px;line-height:18px;flex:none}
.active-filters .active-filter-chip:hover{background:#14361d;border-color:#4c9c60}
.active-filters .clear-view-filters{display:flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:40px;margin-left:auto;padding:10px 14px;border:1px solid var(--lime,#c3ff00);border-radius:6px;background:var(--lime,#c3ff00);color:#152000;font-size:11px;font-weight:600;white-space:nowrap;transition:background-color .15s,border-color .15s,scale .15s}
.active-filters .clear-view-filters:hover{background:#d4ff4d;border-color:#d4ff4d}
.workspace-header .workspace-controls .search.has-query{border-color:#398b4b;background:#0b2111;box-shadow:inset 0 0 0 1px #28b14322}
.workspace-header .workspace-controls .search.has-query input{color:#e6f7d9}
.workspace-header .workspace-controls .toolbar-trigger.has-filters{border-color:#398b4b;color:#b3eac0;background:#0b2111}
.workspace-header .result-count.is-filtered{display:inline-flex;align-items:center;flex-basis:auto;min-height:24px;padding:2px 7px;border-radius:4px;background:#112e19;color:#93dda3}
.filtered-empty{display:grid;place-items:center;min-height:100%;padding:40px 24px;background:radial-gradient(ellipse at 50% 30%,#0b1c10 0,transparent 65%)}
.filtered-empty-card{width:min(100%,520px);padding:36px 24px;text-align:center}
.filtered-empty-icon{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 24px;color:#6ace7f;background:#0e2716;border:1px solid #244b2e;border-radius:16px}
.filtered-empty-card .filtered-empty-eyebrow{margin:0 0 12px;color:#78bb86;font-size:10px;letter-spacing:1.5px}
.filtered-empty-card h2{margin:0;color:#e1edda;font-size:22px;line-height:1.5;letter-spacing:-.6px;text-wrap:balance}
.filtered-empty-card p{margin:14px auto 24px;color:#97ad91;font-size:12px;line-height:1.9;text-wrap:pretty}
.filtered-empty-card button{min-height:40px;padding:10px 16px;border:1px solid #3c774b;border-radius:6px;background:#102b18;color:#c6efd0;font-size:12px;transition:background-color .15s,border-color .15s,scale .15s}
.filtered-empty-card button:hover{background:#1a4225;border-color:#5fb570}
.filtered-empty-card button span{margin-left:10px}
.active-filters button:focus-visible,.filtered-empty-card button:focus-visible{outline:2px solid var(--lime,#c3ff00);outline-offset:3px}
.active-filters button:active,.filtered-empty-card button:active{scale:.96}
@container (max-width:760px){
 .workspace .active-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px}
 .active-filter-chips{grid-column:1/-1;grid-row:2}
 .active-filters .clear-view-filters{grid-column:2;grid-row:1}
 .active-filter-chip .filter-chip-value{max-width:none}
}
@container (max-width:520px){
 .workspace .active-filters{padding:12px 10px;gap:8px}
 .filter-summary{gap:7px}
 .filter-summary strong{font-size:11px}
 .filter-summary #filter-result-summary{font-size:9px}
 .filter-summary-icon{width:16px;height:16px}
 .active-filters .clear-view-filters{padding:10px;font-size:10px;gap:5px}
 .active-filter-chips{flex-wrap:nowrap;overflow-x:auto;padding:3px 3px 8px;margin:-3px;scrollbar-width:thin;scrollbar-color:#3d7049 #0b2111}
 .active-filters .active-filter-chip{font-size:10px;flex:none;max-width:100%}
 .workspace-header .workspace-heading{flex-direction:row;gap:8px}
 .filtered-empty{padding:20px 16px}
 .filtered-empty-card{padding:24px 0}
 .filtered-empty-card h2{font-size:18px}
}
@container (max-width:360px){
 .filter-summary-icon{display:none}
 .filter-summary strong{font-size:10px}
 .active-filters .clear-view-filters{font-size:9px;padding-inline:8px}
}
@media (prefers-reduced-motion:reduce){.active-filters button,.filtered-empty-card button{transition:none}}
@container (max-width:900px){
 .workspace:has(.word-frequency) .workspace-header .view-tools{order:3;flex-basis:100%;margin:0}
 .workspace-header .word-view-toolbar{justify-content:flex-start}
 .workspace-header .word-map-limit,.workspace-header .phrase-length-control{margin-left:auto}
 .workspace-header .word-info-button{margin-left:auto}
 .workspace-header .word-map-limit:not([hidden])~.word-info-button{margin-left:0}
}
@container (max-width:520px){
 .workspace-header{padding:8px 10px;gap:6px 10px}
 .workspace-header .workspace-heading{min-height:30px}
 .workspace-header h1{font-size:17px}
 .workspace-header .result-count{font-size:10px}
 .workspace-header .workspace-controls{flex-basis:100%;max-width:none;order:1}
 .workspace-header .workspace-controls .search kbd{display:none}
 .workspace-header .word-view-toolbar{gap:6px;flex-wrap:wrap}
 .workspace-header .word-view-switch{flex:1;justify-content:space-between;padding:2px;gap:0}
 .workspace-header .word-view-switch button{font-size:11px;padding:7px 8px;gap:4px}
 .workspace-header .word-view-switch button span{display:none}
 .workspace-header .word-map-limit{order:3;flex-basis:calc(100% - 46px);margin:0}
 .workspace-header .word-map-limit select{max-width:none;width:100%;height:40px}
 .workspace-header .word-info-button{order:4;margin-left:0}
 .word-frequency.has-header-tools.is-bubble-view{padding:6px}
 .word-frequency.has-header-tools.is-bubble-view .word-map-navigation{left:8px;right:8px;bottom:8px;justify-content:flex-end}
 .word-map-navigation>span{display:none}
 .word-map-zoom{gap:0}
 .word-map-zoom output{min-width:43px}
 .word-map-zoom button{padding:6px 8px}
 .workspace-header:has(.word-view-toolbar){display:grid;grid-template-columns:minmax(0,1fr) 110px 40px}
 .workspace-header:has(.word-view-toolbar) .workspace-heading{grid-column:1;grid-row:1;min-width:0}
 .workspace-header:has(.word-view-toolbar) h1{font-size:16px;white-space:normal}
 .workspace-header:has(.word-view-toolbar) .workspace-controls{grid-column:1/-1;grid-row:3;margin:0;width:100%}
 .workspace-header .view-tools:not([hidden]),.workspace-header .word-view-toolbar{display:contents}
 .workspace-header .word-view-switch{grid-column:1/-1;grid-row:2}
 .workspace-header .word-map-limit{grid-column:2;grid-row:1;min-width:0}
 .workspace-header .word-map-limit select{padding-inline:7px;font-size:11px}
 .workspace-header .word-info-button{grid-column:3;grid-row:1}
 .workspace-header:has(.word-map-limit[hidden]):not(:has(.word-map-limit:not([hidden]))) .workspace-heading{grid-column:1/3}
}
