#browser{
  --sv-browse-accent:var(--sv-link-accent,var(--sp-link));
  --sv-browse-accent-alt:var(--sp-accent-2);
  --sv-browse-success:var(--sp-success,var(--sp-accent));
  --sv-browse-danger:var(--sp-danger);
  --sv-browse-hover-raise:var(--sp-border-w-1-neg);
  --sv-browse-hover-filter:brightness(1.04);

  --sv-browse-row-hover-bg:linear-gradient(90deg,color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent) 10%),color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent-alt) 5%));
  --sv-browse-row-hover-border:color-mix(in srgb,var(--sp-border),var(--sv-browse-accent) 36%);
  --sv-browse-row-hover-shadow:var(--sp-shadow-2), inset calc(var(--sp-border-w-2) + var(--sp-border-w-1)) 0 0 color-mix(in srgb,var(--sv-browse-accent),transparent 24%), inset 0 0 0 var(--sp-border-w-1) color-mix(in srgb,var(--sv-browse-accent),transparent 91%);
  --sv-browse-row-selected-bg:linear-gradient(90deg,color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent) 15%),color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent-alt) 8%));
  --sv-browse-row-selected-border:color-mix(in srgb,var(--sp-border-strong),var(--sv-browse-success) 48%);
  --sv-browse-row-selected-shadow:var(--sp-shadow-3), inset calc(var(--sp-border-w-2) + var(--sp-border-w-2)) 0 0 color-mix(in srgb,var(--sv-browse-success),transparent 5%), inset 0 0 0 var(--sp-border-w-1) color-mix(in srgb,var(--sv-browse-success),transparent 87%);

  --sv-browse-dir-bg:linear-gradient(90deg,color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent) 4%),transparent 48%);
  --sv-browse-dir-bg-hover:linear-gradient(90deg,color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent) 13%),color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent-alt) 6%));

  --sv-browse-drag-border:color-mix(in srgb,var(--sp-border-strong),var(--sv-browse-success) 50%);
  --sv-browse-drag-shadow:inset 0 0 0 var(--sp-border-w-1) color-mix(in srgb,var(--sv-browse-success),transparent 82%), var(--sp-shadow-2);
  --sv-browse-drop-bg:linear-gradient(90deg,color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent) 20%),color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-accent-alt) 9%));
  --sv-browse-drop-border:color-mix(in srgb,var(--sp-border-strong),var(--sv-browse-success) 62%);
  --sv-browse-drop-shadow:var(--sp-shadow-3), inset calc(var(--sp-border-w-2) + var(--sp-border-w-2)) 0 0 var(--sv-browse-success), inset 0 0 0 var(--sp-border-w-1) color-mix(in srgb,var(--sv-browse-success),transparent 78%);
  --sv-browse-drop-blocked-bg:linear-gradient(90deg,color-mix(in srgb,var(--sp-surface-2),var(--sv-browse-danger) 11%),color-mix(in srgb,var(--sp-surface-2),var(--sp-text) 2%));
  --sv-browse-drop-blocked-border:color-mix(in srgb,var(--sp-border-strong),var(--sv-browse-danger) 48%);
  --sv-browse-drop-blocked-shadow:inset calc(var(--sp-border-w-2) + var(--sp-border-w-2)) 0 0 color-mix(in srgb,var(--sv-browse-danger),transparent 25%);
  --sv-browse-focus-ring:color-mix(in srgb,var(--sp-focus),var(--sv-browse-success) 52%);
}

#browser .sv-fileList li{
  position:relative;
}

#browser .sv-fileItem{
  border-radius:var(--sp-radius-2);
  transition:transform var(--sp-duration-2) var(--sp-ease-standard), filter var(--sp-duration-2) var(--sp-ease-standard);
}

#browser .sv-fileItem:hover,
#browser .sv-fileItem:focus-within{
  transform:translateY(var(--sv-browse-hover-raise));
  filter:var(--sv-browse-hover-filter);
}

#browser .sv-fileItem:hover .sv-fileBtn,
#browser .sv-fileItem:focus-within .sv-fileBtn{
  background:var(--sv-browse-row-hover-bg);
  border-color:var(--sv-browse-row-hover-border);
  box-shadow:var(--sv-browse-row-hover-shadow);
}

#browser .sv-fileItem:hover .sv-fileTitle,
#browser .sv-fileItem:focus-within .sv-fileTitle{
  color:color-mix(in srgb,var(--sp-text),var(--sv-link-accent-hover) 22%);
}

#browser .sv-fileItem:hover .sv-fileKind,
#browser .sv-fileItem:focus-within .sv-fileKind{
  color:color-mix(in srgb,var(--sp-muted),var(--sv-link-accent-hover) 34%);
  opacity:1;
}

#browser .sv-fileBtn[aria-current="true"]{
  background:var(--sv-browse-row-selected-bg);
  border-color:var(--sv-browse-row-selected-border);
  box-shadow:var(--sv-browse-row-selected-shadow);
}

#browser .sv-fileBtn[aria-current="true"] .sv-fileTitle{
  color:var(--sp-text);
}

#browser .sv-fileBtn[aria-current="true"] .sv-fileKind{
  color:color-mix(in srgb,var(--sp-muted),var(--sv-link-accent-hover) 42%);
  opacity:1;
}

#browser .sv-fileItem--dir .sv-fileBtn{
  background-image:var(--sv-browse-dir-bg);
}

#browser .sv-fileItem--dir:hover .sv-fileBtn,
#browser .sv-fileItem--dir:focus-within .sv-fileBtn{
  background:var(--sv-browse-dir-bg-hover);
}

#browser .sv-fileItem.is-dragging .sv-fileBtn{
  border-color:var(--sv-browse-drag-border);
  box-shadow:var(--sv-browse-drag-shadow);
}

#browser .sv-fileItem.is-dropTarget .sv-fileBtn{
  background:var(--sv-browse-drop-bg)!important;
  border-color:var(--sv-browse-drop-border)!important;
  box-shadow:var(--sv-browse-drop-shadow)!important;
}

#browser .sv-fileItem.is-dropBlocked .sv-fileBtn{
  background:var(--sv-browse-drop-blocked-bg)!important;
  border-color:var(--sv-browse-drop-blocked-border)!important;
  box-shadow:var(--sv-browse-drop-blocked-shadow)!important;
}

#browser .sv-fileBtn:focus-visible{
  outline:var(--sp-border-w-2) solid var(--sv-browse-focus-ring);
  outline-offset:var(--sp-border-w-2);
}

/* Parent directory row: inline label */
#browser{
  --sv-browser-inline-label-gap:var(--sp-2);
}

#browser .sv-fileBtn .sv-fileRow > div:has(> .sp-muted){
  display:flex;
  align-items:baseline;
  gap:var(--sv-browser-inline-label-gap);
  min-width:0;
}

#browser .sv-fileBtn .sv-fileRow > div:has(> .sp-muted) > strong{
  flex:0 0 auto;
}

#browser .sv-fileBtn .sv-fileRow > div:has(> .sp-muted) > .sp-muted{
  display:inline;
  margin:0;
  line-height:var(--sp-lh-1);
  white-space:nowrap;
}

/* Compact Browse header controls: 3-up first row, Codecrunchers + indicator second row */
#browser{
  --sv-browser-compact-header-pad-start:calc(var(--sp-2) + var(--sp-border-w-1));
  --sv-browser-compact-header-pad-end:var(--sp-2);
  --sv-browser-compact-header-gap:calc(var(--sp-1) + var(--sp-border-w-1));
  --sv-browser-compact-title-gap:calc(var(--sp-1) + var(--sp-border-w-1));
  --sv-browser-compact-title-fs:var(--sp-fs-3);
  --sv-browser-compact-title-lh:var(--sp-lh-1);
  --sv-browser-compact-path-fs:var(--sp-fs-2);
  --sv-browser-compact-actions-gap:calc(var(--sp-1) + var(--sp-border-w-1));
  --sv-area-compact-grid-gap:calc(var(--sp-1) + var(--sp-border-w-1));
  --sv-area-compact-min-height:calc(var(--sp-7) + var(--sp-border-w-1));
  --sv-area-compact-pad-block:var(--sp-1);
  --sv-area-compact-pad-inline:var(--sp-1);
  --sv-area-compact-radius:var(--sp-radius-3);
  --sv-area-compact-fs:var(--sp-fs-1);
  --sv-status-compact-pad-inline:var(--sp-2);
  --sv-status-panel-header-gap:var(--sp-1);
}

#browser .sv-panel__header{
  padding-top:var(--sv-browser-compact-header-pad-start);
  padding-bottom:var(--sv-browser-compact-header-pad-end);
}

#browser .sv-browserHeader{
  gap:var(--sv-browser-compact-header-gap);
}

#browser .sv-browserTitle{
  gap:var(--sv-browser-compact-title-gap);
  width:100%;
}

#browser .sv-browserTitle h2{
  font-size:var(--sv-browser-compact-title-fs);
  line-height:var(--sv-browser-compact-title-lh);
}

#browser .sv-browserTitlePath{
  font-size:var(--sv-browser-compact-path-fs);
  max-width:100%;
}

#browser .sv-browserActions{
  gap:var(--sv-browser-compact-actions-gap);
  width:100%;
}

#browser .sv-areaNav{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--sv-area-compact-grid-gap);
  align-items:stretch;
  width:100%;
  overflow:visible;
  padding-bottom:var(--sp-0);
}

#browser .sv-areaBtn{
  width:100%;
  min-width:0;
  min-height:var(--sv-area-compact-min-height);
  padding:var(--sv-area-compact-pad-block) var(--sv-area-compact-pad-inline);
  border-radius:var(--sv-area-compact-radius);
  font-size:var(--sv-area-compact-fs);
  line-height:var(--sp-lh-1);
  white-space:nowrap;
  justify-content:center;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
}

#browser #areaWorkbenchBtn{ grid-column:1; grid-row:1; }
#browser #areaSpectraportalBtn{ grid-column:2; grid-row:1; }
#browser #areaHollowverseBtn{ grid-column:3; grid-row:1; }
#browser #areaCodecrunchersBtn{ grid-column:1; grid-row:2; }

#browser .sv-statusToggle{
  grid-column:2 / 4;
  grid-row:2;
  width:100%;
  min-width:0;
  min-height:var(--sv-area-compact-min-height);
  padding:var(--sv-area-compact-pad-block) var(--sv-status-compact-pad-inline);
  border-radius:var(--sv-area-compact-radius);
  font-size:var(--sv-area-compact-fs);
  justify-content:center;
  white-space:nowrap;
  overflow:hidden;
}

#browser .sv-statusToggleLabel{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#browser .sv-statusPanel--header{
  margin-top:var(--sv-status-panel-header-gap);
}

/* Browse row overflow guard: keep row actions inside the panel without creating horizontal scroll. */
#browser .sv-panel__body.sv-scroll{
  overflow-y:auto;
  overflow-x:hidden;
}

#browser .sv-fileList,
#browser .sv-fileList > li,
#browser .sv-fileItem{
  min-width:0;
  max-width:100%;
}

#browser .sv-fileItem{
  width:100%;
  box-sizing:border-box;
}

#browser .sv-fileItem .sv-fileBtn{
  width:auto;
  min-width:0;
  box-sizing:border-box;
}

#browser .sv-fileRow,
#browser .sv-fileName{
  min-width:0;
}

#browser .sv-fileTitle{
  overflow:hidden;
  text-overflow:ellipsis;
}

#browser .sv-fileAction{
  box-sizing:border-box;
}

/* Compact Preview header controls: visibly roomier */
#preview{
  --sv-preview-header-pad-block:var(--sp-3);
  --sv-preview-header-pad-inline:calc(var(--sp-4) + var(--sp-1));
  --sv-preview-header-min-height:calc(var(--sp-10) + var(--sp-3));
  --sv-preview-header-gap:var(--sp-3);
  --sv-preview-heading-gap:var(--sp-3);
  --sv-preview-title-fs:var(--sp-fs-3);
  --sv-preview-title-lh:var(--sp-lh-1);
  --sv-preview-control-min-height:calc(var(--sp-7) + var(--sp-border-w-2));
  --sv-preview-control-pad-block:var(--sp-1);
  --sv-preview-control-pad-inline:var(--sp-3);
  --sv-preview-control-radius:var(--sp-radius-3);
  --sv-preview-control-fs:var(--sp-fs-1);
  --sv-preview-control-lh:var(--sp-lh-1);
  --sv-preview-action-gap:var(--sp-2);
}

#preview .sv-panel__header{
  min-height:0;
  padding-top:var(--sv-preview-header-pad-block)!important;
  padding-bottom:var(--sv-preview-header-pad-block)!important;
  padding-left:var(--sv-preview-header-pad-inline)!important;
  padding-right:var(--sv-preview-header-pad-inline)!important;
}

#preview .sv-previewHeader{
  align-items:center;
  min-height:var(--sv-preview-header-min-height);
  gap:var(--sv-preview-header-gap);
}

#preview .sv-previewHeading{
  gap:var(--sv-preview-heading-gap);
  align-items:center;
}

#preview .sv-previewHeading h2{
  font-size:var(--sv-preview-title-fs);
  line-height:var(--sv-preview-title-lh);
}

#preview #statusMode,
#preview .sp-badge{
  min-height:var(--sv-preview-control-min-height);
  padding:var(--sv-preview-control-pad-block) var(--sv-preview-control-pad-inline);
  border-radius:var(--sv-preview-control-radius);
  font-size:var(--sv-preview-control-fs);
  line-height:var(--sv-preview-control-lh);
  display:inline-flex;
  align-items:center;
}

#preview .sv-previewActionRow{
  gap:var(--sv-preview-action-gap);
  align-items:center;
  margin-top:0;
}

#preview .sv-previewActionRow .sp-btn{
  min-height:var(--sv-preview-control-min-height);
  padding:var(--sv-preview-control-pad-block) var(--sv-preview-control-pad-inline);
  border-radius:var(--sv-preview-control-radius);
  font-size:var(--sv-preview-control-fs);
  line-height:var(--sv-preview-control-lh);
}

@media (max-width:980px){
  #browser .sv-areaBtn{
    font-size:var(--sp-fs-1);
    padding:var(--sp-1) var(--sp-1);
  }
  #browser .sv-statusToggle,
  #preview #statusMode,
  #preview .sp-badge,
  #preview .sv-previewActionRow .sp-btn{
    font-size:var(--sp-fs-1);
  }
}

/* Viewer component scale normalization.
   Uses Spectra framework tokens; only component layout composition stays local. */
#browser{
  --sv-browser-title-fs:var(--sp-fs-5);
  --sv-browser-path-fs:var(--sp-fs-2);
  --sv-workspace-btn-fs:var(--sp-fs-3);
  --sv-status-fs:var(--sp-fs-2);
  --sv-file-title-fs:var(--sp-fs-4);
  --sv-file-kind-fs:var(--sp-fs-2);

  --sv-browser-title-lh:var(--sp-lh-1);
  --sv-browser-control-lh:var(--sp-lh-1);
  --sv-file-title-lh:var(--sp-lh-1);
  --sv-file-kind-lh:var(--sp-lh-1);

  --sv-workspace-btn-fw:var(--sp-fw-semibold);
  --sv-file-title-fw:var(--sp-fw-bold);

  --sv-file-kind-opacity:var(--sp-opacity-80);
  --sv-file-arrow-opacity:var(--sp-opacity-80);

  --sv-workspace-grid-template:repeat(2,minmax(0,1fr));
  --sv-workspace-gap:var(--sp-1);

  --sv-file-row-pad-block:var(--sp-2);
  --sv-file-row-pad-inline:var(--sp-3);
}

#browser .sv-browserTitle h2{
  font-size:var(--sv-browser-title-fs)!important;
  line-height:var(--sv-browser-title-lh)!important;
}

#browser .sv-browserTitlePath{
  font-size:var(--sv-browser-path-fs)!important;
  line-height:var(--sv-browser-control-lh)!important;
}

#browser .sv-areaNav{
  grid-template-columns:var(--sv-workspace-grid-template)!important;
  gap:var(--sv-workspace-gap)!important;
}

#browser #areaWorkbenchBtn{ grid-column:1!important; grid-row:1!important; }
#browser #areaUploadsBtn{ grid-column:2!important; grid-row:1!important; }
#browser #areaExportsBtn{ grid-column:1!important; grid-row:2!important; }
#browser #areaHandoffsBtn{ grid-column:2!important; grid-row:2!important; }

#browser .sv-areaBtn{
  min-height:calc(var(--sp-7) + var(--sp-1))!important;
  padding:var(--sp-1) var(--sp-2)!important;
  border-radius:var(--sp-radius-2)!important;
  font-size:var(--sv-workspace-btn-fs)!important;
  line-height:var(--sv-browser-control-lh)!important;
  font-weight:var(--sv-workspace-btn-fw)!important;
}

#browser .sv-statusToggle{
  font-size:var(--sv-status-fs)!important;
  min-height:calc(var(--sp-7) + var(--sp-1))!important;
  padding:var(--sp-1) var(--sp-2)!important;
  line-height:var(--sv-browser-control-lh)!important;
}

#browser .sv-fileBtn{
  padding:var(--sv-file-row-pad-block) var(--sv-file-row-pad-inline)!important;
}

#browser .sv-fileTitle{
  font-size:var(--sv-file-title-fs)!important;
  line-height:var(--sv-file-title-lh)!important;
  font-weight:var(--sv-file-title-fw)!important;
}

#browser .sv-fileKind{
  font-size:var(--sv-file-kind-fs)!important;
  line-height:var(--sv-file-kind-lh)!important;
  opacity:var(--sv-file-kind-opacity)!important;
}

#browser .sv-fileArrow{
  opacity:var(--sv-file-arrow-opacity)!important;
}

@media (max-width:980px){
  #browser .sv-areaBtn{
    font-size:var(--sv-workspace-btn-fs)!important;
    padding:var(--sp-1) var(--sp-2)!important;
  }

  #browser .sv-statusToggle{
    font-size:var(--sv-status-fs)!important;
  }
}

/* Workspace button treatment: token-based, Viewer-scoped. */
#browser{
  --sv-workspace-btn-bg:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 7%);
  --sv-workspace-btn-bg-hover:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 12%);
  --sv-workspace-btn-bg-active:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 18%);
  --sv-workspace-btn-border:color-mix(in srgb,var(--sp-border),var(--sv-link-accent) 24%);
  --sv-workspace-btn-border-hover:color-mix(in srgb,var(--sp-border-strong),var(--sv-link-accent) 34%);
  --sv-workspace-btn-border-active:color-mix(in srgb,var(--sp-border-strong),var(--sv-link-accent) 48%);
  --sv-workspace-btn-color:color-mix(in srgb,var(--sp-text),var(--sv-link-accent) 8%);
  --sv-workspace-btn-color-active:var(--sp-text);
  --sv-workspace-btn-shadow-active:inset 0 0 0 var(--sp-border-w-1) color-mix(in srgb,var(--sv-link-accent),transparent 48%);
}

#browser .sv-areaBtn{
  min-height:calc(var(--sp-8) + var(--sp-1))!important;
  padding:var(--sp-2) var(--sp-3)!important;
  background:var(--sv-workspace-btn-bg)!important;
  border-color:var(--sv-workspace-btn-border)!important;
  color:var(--sv-workspace-btn-color)!important;
  font-size:var(--sp-fs-3)!important;
  line-height:var(--sp-lh-1)!important;
  font-weight:var(--sp-fw-semibold)!important;
  letter-spacing:var(--sp-ls-normal)!important;
}

#browser .sv-areaBtn:hover,
#browser .sv-areaBtn:focus-visible{
  background:var(--sv-workspace-btn-bg-hover)!important;
  border-color:var(--sv-workspace-btn-border-hover)!important;
  color:var(--sp-text)!important;
}

#browser .sv-areaBtn.is-active{
  background:var(--sv-workspace-btn-bg-active)!important;
  border-color:var(--sv-workspace-btn-border-active)!important;
  color:var(--sv-workspace-btn-color-active)!important;
  box-shadow:var(--sv-workspace-btn-shadow-active)!important;
}

/* Browse polish: quieter parent navigation + softer workspace controls. */
#browser{
  --sv-workspace-btn-bg:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 4%);
  --sv-workspace-btn-bg-hover:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 9%);
  --sv-workspace-btn-bg-active:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 13%);
  --sv-workspace-btn-border:color-mix(in srgb,var(--sp-border),var(--sv-link-accent) 18%);
  --sv-workspace-btn-border-hover:color-mix(in srgb,var(--sp-border-strong),var(--sv-link-accent) 28%);
  --sv-workspace-btn-border-active:color-mix(in srgb,var(--sp-border-strong),var(--sv-link-accent) 42%);
  --sv-parent-row-bg:color-mix(in srgb,var(--sp-surface-2),transparent 18%);
  --sv-parent-row-border:color-mix(in srgb,var(--sp-border),var(--sv-link-accent) 10%);
  --sv-parent-row-color:color-mix(in srgb,var(--sp-text),var(--sp-muted) 12%);
}

#browser .sv-areaBtn{
  background:var(--sv-workspace-btn-bg)!important;
  border-color:var(--sv-workspace-btn-border)!important;
}

#browser .sv-areaBtn:hover,
#browser .sv-areaBtn:focus-visible{
  background:var(--sv-workspace-btn-bg-hover)!important;
  border-color:var(--sv-workspace-btn-border-hover)!important;
}

#browser .sv-areaBtn.is-active{
  background:var(--sv-workspace-btn-bg-active)!important;
  border-color:var(--sv-workspace-btn-border-active)!important;
}

#browser .sv-fileItem--parentNav{
  transform:none!important;
  filter:none!important;
}

#browser .sv-fileItem--parentNav .sv-fileBtn,
#browser .sv-fileItem--parentNav .sv-fileBtn[aria-current="true"]{
  background:var(--sv-parent-row-bg)!important;
  border-color:var(--sv-parent-row-border)!important;
  box-shadow:none!important;
  color:var(--sv-parent-row-color)!important;
}

#browser .sv-fileItem--parentNav .sv-fileTitle{
  font-size:var(--sp-fs-4)!important;
  font-weight:var(--sp-fw-semibold)!important;
  line-height:var(--sp-lh-1)!important;
}

#browser .sv-fileItem--parentNav:hover .sv-fileBtn,
#browser .sv-fileItem--parentNav:focus-within .sv-fileBtn{
  background:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 6%)!important;
  border-color:color-mix(in srgb,var(--sp-border),var(--sv-link-accent) 22%)!important;
  box-shadow:none!important;
}

/* Browse header spacing: Viewer semantic tokens composed from Spectra framework tokens. */
#browser{
  --sv-browser-header-pad-block:var(--sp-3);
  --sv-browser-header-pad-inline:calc(var(--sp-4) + var(--sp-1));
  --sv-browser-header-gap:var(--sp-3);
}

#browser .sv-panel__header{
  padding-block:var(--sv-browser-header-pad-block)!important;
  padding-inline:var(--sv-browser-header-pad-inline)!important;
  box-sizing:border-box!important;
}

#browser .sv-browserHeader{
  gap:var(--sv-browser-header-gap)!important;
  min-width:0!important;
}

#browser .sv-browserTitle{
  min-width:0!important;
}

/* Browse panel hierarchy guard. */
#browser.sv-panel{
  isolation:isolate;
}

#browser .sv-panel__header{
  position:relative!important;
  inset:auto!important;
  z-index:var(--sp-z-sticky,10)!important;
  flex:0 0 auto!important;
  overflow:hidden!important;
  background:var(--sv-browser-header-bg)!important;
}

#browser .sv-panel__body{
  position:relative!important;
  z-index:0!important;
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:var(--sv-browser-body-bg)!important;
}

#browser .sv-panel__body.sv-scroll{
  scroll-padding-top:var(--sp-3,1rem);
}

#browser .sv-fileList{
  position:relative!important;
  z-index:0!important;
}
/* End Browse panel hierarchy guard. */

/* Browse file action controls. */
/* Viewer-owned action layout for Browse file rows.
   Framework owns the button primitive; Viewer owns file-row density, action
   placement, and selected-row affordance. Keep file actions quiet: the row owns
   the visible surface, while ↓ / ↗ remain lightweight green icons. */

@media/* --sp-bp-md: 52rem */
 (max-width:52rem){
  #browser{
    --sv-browse-list-top-gap:var(--sp-2,.5rem);
    --sv-mobile-file-row-pad-block:calc(var(--sp-2,.5rem) + var(--sp-hairline,1px));
    --sv-mobile-file-row-pad-inline:calc(var(--sp-3,1rem) + var(--sp-1,.25rem));
    --sv-mobile-file-action-size:calc(var(--sp-9,2.25rem) + var(--sp-1,.25rem));
    --sv-mobile-file-action-gap:var(--sp-1,.25rem);
    --sv-mobile-file-action-pad:calc(var(--sp-3,1rem) + var(--sp-1,.25rem));
    --sv-mobile-row-action-inline-end:var(--sp-2,.5rem);
    --sv-mobile-download-action-nudge:var(--sp-2,.5rem);
    --sv-mobile-file-action-z:var(--sp-z-sticky);
    --sv-mobile-file-action-icon-fs:var(--sp-fs-3,1rem);
    --sv-mobile-file-action-download-opacity:.78;
    --sv-mobile-file-action-open-opacity:.9;
    --sv-mobile-file-action-active-opacity:1;
    --sv-mobile-file-action-color:var(--sv-link-accent);
    --sv-mobile-file-action-color-hover:var(--sv-link-accent-hover);
    --sv-mobile-file-action-bg:transparent;
    --sv-mobile-file-action-bg-hover:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 12%);
    --sv-mobile-file-action-bg-active:color-mix(in srgb,var(--sp-surface-2),var(--sv-link-accent) 18%);
    --sv-mobile-file-action-border:transparent;
    --sv-mobile-file-action-border-hover:color-mix(in srgb,var(--sp-border),var(--sv-link-accent) 28%);
    --sv-file-row-pad-block:var(--sv-mobile-file-row-pad-block);
    --sv-file-row-pad-inline:var(--sv-mobile-file-row-pad-inline);
  }

  #browser .sv-panel__body.sv-scroll{
    padding-top:var(--sv-browse-list-top-gap)!important;
    scroll-padding-top:var(--sv-browse-list-top-gap)!important;
    overflow-anchor:none!important;
  }

  #browser .sv-fileList{
    margin-top:0!important;
    padding-top:0!important;
  }

  #browser .sv-fileList > li:first-child{
    scroll-margin-top:var(--sv-browse-list-top-gap)!important;
  }

  #browser .sv-fileList,
  #browser .sv-fileList > li,
  #browser .sv-fileItem{
    margin-block:var(--sp-0,0)!important;
    padding-block:var(--sp-0,0)!important;
  }

  #browser .sv-fileItem{
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }

  #browser .sv-fileBtn{
    padding-block:var(--sv-mobile-file-row-pad-block)!important;
    padding-inline-start:var(--sv-mobile-file-row-pad-inline)!important;
  }

  #browser .sv-fileItem .sv-fileBtn{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding-inline-end:calc(var(--sv-mobile-file-action-pad) + var(--sv-mobile-row-action-inline-end))!important;
    box-sizing:border-box!important;
  }

  #browser .sv-fileItem:has(> .sv-fileAction) .sv-fileBtn{
    padding-inline-end:calc(var(--sv-mobile-file-action-size) + var(--sv-mobile-file-action-pad) + var(--sv-mobile-row-action-inline-end))!important;
  }

  #browser .sv-fileItem:has(> .sv-fileAction:nth-last-child(2)) .sv-fileBtn{
    padding-inline-end:calc((var(--sv-mobile-file-action-size) * 2) + var(--sv-mobile-file-action-gap) + var(--sv-mobile-file-action-pad) + var(--sv-mobile-row-action-inline-end))!important;
  }

  #browser .sv-fileItem > .sv-fileAction{
    position:absolute!important;
    inset-block-start:0!important;
    inset-block-end:0!important;
    inset-inline-end:var(--sv-mobile-row-action-inline-end)!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    inline-size:var(--sv-mobile-file-action-size)!important;
    width:var(--sv-mobile-file-action-size)!important;
    min-inline-size:var(--sv-mobile-file-action-size)!important;
    min-width:var(--sv-mobile-file-action-size)!important;
    max-inline-size:var(--sv-mobile-file-action-size)!important;
    max-width:var(--sv-mobile-file-action-size)!important;
    block-size:auto!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border-radius:var(--sp-radius-2)!important;
    background:var(--sv-mobile-file-action-bg)!important;
    border-color:var(--sv-mobile-file-action-border)!important;
    box-shadow:none!important;
    color:var(--sv-mobile-file-action-color)!important;
    font-size:var(--sv-mobile-file-action-icon-fs)!important;
    text-decoration:none!important;
    z-index:var(--sv-mobile-file-action-z)!important;
  }

  #browser .sv-fileItem > .sv-fileAction:nth-last-child(2){
    inset-inline-end:calc(var(--sv-mobile-file-action-size) + var(--sv-mobile-file-action-gap) + var(--sv-mobile-row-action-inline-end))!important;
    opacity:var(--sv-mobile-file-action-download-opacity)!important;
    transform:translateX(var(--sv-mobile-download-action-nudge))!important;
  }

  #browser .sv-fileItem > .sv-fileAction:last-child:not(:first-child){
    inset-inline-end:var(--sv-mobile-row-action-inline-end)!important;
    opacity:var(--sv-mobile-file-action-open-opacity)!important;
  }

  #browser .sv-fileItem > .sv-fileAction:hover,
  #browser .sv-fileItem > .sv-fileAction:focus-visible,
  #browser .sv-fileItem > .sv-fileAction:active{
    opacity:var(--sv-mobile-file-action-active-opacity)!important;
  }

  #browser .sv-fileItem > .sv-fileAction:hover,
  #browser .sv-fileItem > .sv-fileAction:focus-visible,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction:hover,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction:focus-visible{
    background:var(--sv-mobile-file-action-bg-hover)!important;
    border-color:var(--sv-mobile-file-action-border-hover)!important;
    color:var(--sv-mobile-file-action-color-hover)!important;
    box-shadow:inset 0 0 0 var(--sp-border-w-1) color-mix(in srgb,var(--sv-link-accent),transparent 78%)!important;
    outline:none!important;
  }

  #browser .sv-fileItem > .sv-fileAction:active,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction:active{
    background:var(--sv-mobile-file-action-bg-active)!important;
    border-color:var(--sv-mobile-file-action-border-hover)!important;
    color:var(--sv-mobile-file-action-color-hover)!important;
  }

  #browser .sv-fileItem > .sv-fileAction:nth-last-child(2):hover,
  #browser .sv-fileItem > .sv-fileAction:nth-last-child(2):focus-visible,
  #browser .sv-fileItem > .sv-fileAction:nth-last-child(2):active{
    transform:translateX(var(--sv-mobile-download-action-nudge))!important;
  }

  #browser .sv-fileArrow{
    margin-left:auto!important;
    padding-inline-end:var(--sv-mobile-row-action-inline-end)!important;
    transform:none!important;
    opacity:var(--sv-file-arrow-opacity)!important;
  }

  #browser .sv-fileItem--dir:hover .sv-fileArrow,
  #browser .sv-fileItem--dir:focus-within .sv-fileArrow,
  #browser .sv-fileBtn[aria-current="true"] .sv-fileArrow{
    transform:none!important;
  }
}

@media (min-width:52.001rem){
  #browser{
    --sv-desktop-file-action-size:1.75rem;
    --sv-desktop-file-action-gap:.125rem;
    --sv-desktop-file-action-pad:.35rem;
    --sv-desktop-file-action-bg:transparent;
    --sv-desktop-file-action-border:transparent;
    --sv-desktop-file-action-color:var(--sv-link-accent);
    --sv-desktop-file-action-color-hover:var(--sv-link-accent-hover);
  }

  #browser .sv-fileItem > .sv-fileAction,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction{
    inline-size:var(--sv-desktop-file-action-size)!important;
    width:var(--sv-desktop-file-action-size)!important;
    min-inline-size:var(--sv-desktop-file-action-size)!important;
    min-width:var(--sv-desktop-file-action-size)!important;
    max-inline-size:var(--sv-desktop-file-action-size)!important;
    max-width:var(--sv-desktop-file-action-size)!important;
    background:var(--sv-desktop-file-action-bg)!important;
    border-color:var(--sv-desktop-file-action-border)!important;
    box-shadow:none!important;
    color:var(--sv-desktop-file-action-color)!important;
    text-decoration:none!important;
  }

  #browser .sv-fileItem:has(> .sv-fileAction) .sv-fileBtn{
    padding-inline-end:calc(var(--sv-desktop-file-action-size) + var(--sv-desktop-file-action-pad))!important;
  }

  #browser .sv-fileItem:has(> .sv-fileAction:nth-last-child(2)) .sv-fileBtn{
    padding-inline-end:calc((var(--sv-desktop-file-action-size) * 2) + var(--sv-desktop-file-action-gap) + var(--sv-desktop-file-action-pad))!important;
  }

  #browser .sv-fileItem > .sv-fileAction:last-child:not(:first-child){
    inset-inline-end:var(--sv-desktop-file-action-pad)!important;
  }

  #browser .sv-fileItem > .sv-fileAction:nth-last-child(2){
    inset-inline-end:calc(var(--sv-desktop-file-action-size) + var(--sv-desktop-file-action-gap) + var(--sv-desktop-file-action-pad))!important;
  }

  #browser .sv-fileItem > .sv-fileAction:hover,
  #browser .sv-fileItem > .sv-fileAction:focus-visible,
  #browser .sv-fileItem > .sv-fileAction:active,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction:hover,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction:focus-visible,
  #browser .sv-fileBtn[aria-current="true"] ~ .sv-fileAction:active{
    background:var(--sv-desktop-file-action-bg)!important;
    border-color:var(--sv-desktop-file-action-border)!important;
    box-shadow:none!important;
    color:var(--sv-desktop-file-action-color-hover)!important;
  }
}
/* End Browse file action controls. */
