/* Progressive enhancement keeps native forms available, with a quiet file workspace. */
body:has(.workspace-ready) .topbar{display:none}
body:has(.workspace-ready) #main{padding:0 24px 24px}
.workspace-ready .workspace-header{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;align-items:center;position:sticky;top:0;background:var(--bg);z-index:25;padding:16px 0 12px;border-bottom:1px solid var(--border)}
.workspace-ready .collection-heading{grid-column:1;grid-row:1;margin:0}
.workspace-ready .collection-heading>div:first-child{gap:16px}
.workspace-ready .collection-title{min-width:0}
.workspace-ready .detail-title{font-size:20px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;margin:0}
.workspace-ready .collection-meta{grid-column:1;grid-row:2;margin:4px 0 0;padding:0;border:0;font-size:12px;gap:12px}
.workspace-ready .collection-meta .collection-size,.workspace-ready .collection-meta [data-state=ready]{display:none}
.workspace-ready[data-data-view=result] .collection-meta{visibility:hidden}
.workspace-ready .workspace-toolbar{grid-column:2;grid-row:1/3;margin:0;padding:0;border:0;gap:8px}
.workspace-ready .workspace-toolbar>a{border:1px solid var(--control-border);color:var(--control-text);background:var(--control-bg);padding:9px 16px;border-radius:8px;min-height:40px}
.workspace-ready .workspace-toolbar>a.primary{color:var(--primary-text);background:var(--primary-bg);border-color:var(--primary-bg)}
.workspace-ready .workspace-toolbar>a.selected:not(.primary){background:var(--accent-bg);color:var(--text);border-color:var(--accent)}
.workspace-ready .workspace-more{margin-left:0}
.workspace-ready .workspace-more>summary{display:flex;align-items:center;justify-content:center;width:40px;min-height:40px;font-size:22px;font-weight:700;padding:4px;list-style:none;border:1px solid var(--control-border)}
.workspace-ready .workspace-more>summary::-webkit-details-marker{display:none}
.workspace-ready .workspace-more[open]>div{max-height:calc(100dvh - 100px);overflow-y:auto;width:265px}
.workspace-ready .workspace-theme{display:block;border:0;width:100%;height:auto;font:inherit;text-align:left;padding:9px 12px;background:transparent;color:var(--text);border-radius:6px}
.workspace-ready .workspace-theme:hover{background:var(--accent-bg)}
.workspace-ready .sheet-toolbar{margin:12px 0;padding:0;border:0;background:transparent}
.workspace-ready .sheet-query-bar{display:flex;flex-wrap:nowrap;gap:8px;width:100%}
.workspace-ready .sheet-query-bar>.sheet-search{flex:1;min-width:0}
.workspace-ready .sheet-query-bar>.sheet-search:first-child{grid-column:auto}
.workspace-ready .sheet-query-bar>.sheet-search-submit{display:none}
.workspace-ready .sheet-query-bar>.toolbar-disclosure{width:auto;flex-shrink:0;order:0;position:relative}
.workspace-ready .sheet-query-bar>.toolbar-disclosure[open]{grid-column:auto;order:0;width:auto;position:relative}
.workspace-ready .sheet-query-bar>.toolbar-disclosure>summary{width:auto;white-space:nowrap}
.workspace-ready .sheet-query-bar>.column-controls>summary{min-width:40px;text-align:center}
.workspace-ready .sheet-query-bar>.toolbar-disclosure[open]>.toolbar-popover{position:absolute;right:0;left:auto;width:min(500px,calc(100vw - 48px))!important;max-height:min(500px,70dvh);overflow:auto;margin-top:8px;z-index:26}
.workspace-ready .sheet-query-bar>.column-controls[open]>.toolbar-popover{width:240px!important;max-width:calc(100vw - 48px)}
.table-preferences{display:grid;gap:10px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--border)}
.table-preferences label{display:flex;gap:8px;align-items:center;font-size:13px}
.table-preferences select{width:100%}
.workspace-ready:not(.show-column-types) .column-type{display:none}
.workspace-ready .sheet-column-heading{min-height:24px}
.workspace-ready .sheet-data{border:1px solid var(--border);border-radius:8px}
.workspace-ready .sheet-pagination{border:0;margin:0;padding:12px}
.workspace-ready>.collection-tools,.workspace-ready>.activity-panel,.workspace-ready #detail-content .sheet-tools,.workspace-ready #detail-content .source-editing{display:none}
.workspace-ready .file-workspace-tool{top:82px;max-height:calc(100dvh - 96px);margin-top:12px;padding-left:20px}
.workspace-ready .workspace-tool-heading{padding-bottom:14px;align-items:center}
.workspace-ready .workspace-tool-heading h2{font-size:18px;margin:0}
.workspace-ready .workspace-tool-heading .button{border:0;min-width:36px;min-height:36px;font-size:23px;padding:0}
.workspace-ready #workspace-tool-content .cleanup-add{border:0;padding:0;margin-bottom:12px}
.workspace-ready #workspace-tool-content .cleanup-controls{gap:12px}
.workspace-ready #workspace-tool-content .cleanup-steps{padding:0 0 12px}
.workspace-ready #workspace-tool-content .cleanup-steps h2{font-size:13px;margin:0;flex-basis:auto}
.workspace-ready #workspace-tool-content .cleanup-steps .panel-toolbar{justify-content:space-between}
.workspace-ready #workspace-tool-content .cleanup-steps ol{list-style:none;counter-reset:cleanup-step}
.workspace-ready #workspace-tool-content .cleanup-steps li{display:flex;align-items:center;gap:6px;padding:6px 0;font-size:13px;counter-increment:cleanup-step}
.workspace-ready #workspace-tool-content .cleanup-steps li::before{content:counter(cleanup-step) ".";color:var(--muted);flex-shrink:0}
.workspace-ready #workspace-tool-content .cleanup-steps li>span{flex:1;min-width:0;overflow-wrap:anywhere}
.workspace-ready #workspace-tool-content .cleanup-steps li>.button{float:none;margin:0;min-height:32px;min-width:32px;height:32px;padding:0;flex-shrink:0;font-size:17px}
.workspace-clean-advanced{font-size:13px;margin-top:4px}
.workspace-clean-advanced>summary{cursor:pointer;color:var(--muted);padding:8px 0}
.workspace-clean-advanced[open]>:not(summary){margin-top:14px}
.workspace-clean-advanced .cleanup-save{padding:0}
.workspace-ready #workspace-result .cleanup-result-heading,.workspace-ready #workspace-result .cleanup-preview>.muted{display:none}
.workspace-ready .workspace-data-heading{padding:12px 0 0;margin:0}
.workspace-ready .workspace-data-heading[hidden]{display:none}
.workspace-ready .workspace-view-switch{padding:2px;border:0}
.workspace-ready #workspace-data-caption{font-size:12px}
.workspace-ready #workspace-result{margin-top:12px}
.download-source-options{font-size:13px}
.download-source-options>summary{cursor:pointer;color:var(--muted)}
.download-source-options[open]>label{margin-top:12px}
.download-notes>details{margin:12px 0}
.download-filename{font-size:14px;overflow-wrap:anywhere;margin:12px 0 4px}
.workspace-ready .cleanup-result-table .cell-json{font-size:11px;min-height:26px}
.workspace-value-dialog{width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.workspace-value-dialog textarea{width:100%;height:auto!important;max-height:50dvh}
.workspace-value-dialog [role=status]{margin-left:12px;font-size:13px}
.workspace-ready #workspace-tool-content .dataset-downloads{padding:0;border:0;background:transparent}
.workspace-ready #workspace-tool-content .download-format-note{padding:0;background:transparent;font-size:12px}
.workspace-ready #workspace-tool-content .download-notes{border:0;padding-top:0}
.workspace-ready #workspace-tool-content .source-editing{margin-bottom:18px}
.workspace-ready #workspace-tool-content .delete-source{margin-top:20px}
.workspace-action-icon{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.workspace-toolbar>a{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.workspace-extra-tools>a{display:flex;align-items:center;gap:9px}
.workspace-tool-short,.workspace-desktop-tools{display:none}
.workspace-theme{display:flex!important;align-items:center;gap:9px}
.workspace-ready .file-workspace-tool{top:var(--workspace-header-height,94px);max-height:calc(100dvh - var(--workspace-header-height,94px) - 12px)}
@media(min-width:768px){
 .workspace-ready .workspace-more{display:none}
 .workspace-ready .workspace-desktop-tools,.workspace-ready .workspace-extra-tools{display:flex;align-items:center;gap:4px}
 .workspace-ready .workspace-toolbar{flex-wrap:nowrap;gap:8px}
 .workspace-ready .workspace-extra-tools{border-left:1px solid var(--border);padding-left:8px}
 .workspace-desktop-tools .workspace-tool-label{display:none}
 .workspace-desktop-tools .workspace-tool-short{display:inline}
 .workspace-desktop-tools a{color:var(--text);text-decoration:none;border-radius:7px;padding:9px 8px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;white-space:nowrap}
 .workspace-desktop-tools a:hover,.workspace-desktop-tools a:focus-visible,.workspace-desktop-tools a[aria-current]{background:var(--accent-bg);color:var(--text)}
 .workspace-desktop-tools a[aria-current]{box-shadow:inset 0 -2px var(--accent)}
 .workspace-desktop-tools [data-workspace-theme]{display:flex;align-items:center}
 .workspace-desktop-tools .workspace-theme{width:40px;min-height:40px;height:40px;padding:8px;justify-content:center}
 .workspace-desktop-tools .workspace-theme:hover{background:var(--accent-bg)}
}
@media(min-width:768px) and (max-width:1599px){
 .workspace-ready .collection-heading{grid-column:1;grid-row:1}
 .workspace-ready .collection-meta{grid-column:2;grid-row:1;margin:0}
 .workspace-ready .workspace-toolbar{grid-column:1/-1;grid-row:2;margin-top:12px;justify-content:flex-end}
}
@media(min-width:768px) and (max-width:1199px){.workspace-desktop-tools .workspace-tool-short{display:none}.workspace-desktop-tools a{width:36px;padding:8px}.workspace-desktop-tools .workspace-theme{width:36px}.workspace-desktop-tools .workspace-extra-tools{gap:2px}}
@media(max-width:767px){
 .workspace-ready .workspace-desktop-tools{display:none}
 .workspace-ready .collection-heading{grid-column:1;grid-row:1}
 .workspace-ready .collection-meta{grid-column:2;grid-row:1;margin:0}
 .workspace-ready .workspace-toolbar{grid-column:1/-1;grid-row:2;justify-content:flex-end;margin-top:8px}
}
@media(max-width:1000px){.workspace-ready .file-workspace-tool{position:static;max-height:none;padding:16px 0 0}.workspace-ready .workspace-tool-heading{position:static}}
@media(max-width:600px){body:has(.workspace-ready) #main{padding:0 12px 16px}.workspace-ready .workspace-header{column-gap:8px;padding:12px 0 10px}.workspace-ready .collection-heading{grid-column:1/-1;grid-row:1}.workspace-ready .collection-heading>div:first-child{display:flex;gap:12px}.workspace-ready .collection-title{margin:0;flex:1}.workspace-ready .detail-title{font-size:18px}.workspace-ready .format-tag{display:none}.workspace-ready .collection-meta{grid-row:2;margin-top:8px}.workspace-ready .workspace-toolbar{grid-row:2;grid-column:2;margin-top:8px;gap:6px}.workspace-ready .workspace-toolbar>a{font-size:13px;min-height:42px;padding:10px 12px}.workspace-ready .workspace-more>summary{min-height:42px}.workspace-ready .workspace-more[open]>div{max-height:calc(100dvh - 140px)}.workspace-ready .sheet-query-bar>.toolbar-disclosure[open]>.toolbar-popover{width:calc(100vw - 24px)}.workspace-ready .sheet-query-bar>.column-controls[open]>.toolbar-popover{width:240px}.workspace-ready .sheet-filters[open]>.toolbar-popover{right:-48px!important}.workspace-ready .cell-copy:not(:focus-visible){display:none}.workspace-ready .sheet-pagination{padding:10px 6px}.workspace-ready #workspace-tool-content .panel{padding:12px 0}.workspace-ready #workspace-tool-content .dataset-downloads{padding:0}}

@media(max-width:600px){.workspace-ready .collection-heading{grid-column:1;grid-row:1}.workspace-ready .collection-meta{grid-column:2;grid-row:1;margin:0}.workspace-ready .workspace-toolbar{grid-column:1/-1;grid-row:2;justify-content:flex-end}.workspace-ready .workspace-toolbar>a{gap:6px;padding:9px 10px}.workspace-ready .workspace-more>summary{width:38px}}
