.spec-explorer {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.spec-explorer.hidden {
  display: none;
}

.spec-explorer-header {
  position: relative;
  z-index: 2;
  min-height: var(--panel-header-height);
  flex: 0 0 auto;
  gap: 0.35rem;
  padding: 0 0.42rem 0 0.65rem;
}

.spec-explorer-header .studio-panel-actions {
  min-width: 0;
  overflow: visible;
}

.spec-explorer-header .studio-panel-action {
  flex: 0 0 auto;
}

.project-open-menu-wrap {
  position: relative;
  display: inline-flex;
}

.project-open-trigger .project-open-chevron .app-icon {
  width: 0.64rem;
  height: 0.64rem;
  transform: rotate(90deg);
}

.project-open-menu {
  top: calc(100% + 0.32rem);
  right: 0;
  left: auto;
  min-width: 10.5rem;
}

.spec-tree {
  min-width: 0;
}

.spec-tree {
  flex: 1;
  overflow: auto;
  padding: 0 0.45rem 0.55rem;
}

.spec-tree-folder {
  margin: 0.16rem 0;
}

.spec-tree-folder-name,
.spec-tree-file {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.spec-tree-folder-name {
  padding: 0.32rem 0.36rem;
  font: 600 0.76rem/1.25 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-tree-root-name {
  color: #334155;
  font-weight: 780;
}

.spec-tree-file {
  padding: 0.34rem 0.4rem;
  font: 650 0.76rem/1.25 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-tree-file.dirty {
  color: #334155;
  font-weight: 760;
}

.spec-tree-folder-name:hover,
.spec-tree-folder-name:focus-visible,
.spec-tree-file:hover,
.spec-tree-file:focus-visible {
  background: #e2e8f0;
  outline: none;
}

.spec-tree-folder-name.selected,
.spec-tree-file.selected {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

.spec-tree-file.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.spec-tree-dirty-marker {
  display: none;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
  flex: 0 0 auto;
  margin-left: auto;
}

.spec-tree-file.dirty .spec-tree-dirty-marker {
  display: block;
}

.spec-tree-menu-button {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 5px;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font: 800 0.92rem/1 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: 0;
  margin-left: auto;
  opacity: 0;
}

.spec-tree-file.dirty .spec-tree-menu-button {
  margin-left: 0.12rem;
}

.spec-tree-folder-name:hover .spec-tree-menu-button,
.spec-tree-folder-name:focus-visible .spec-tree-menu-button,
.spec-tree-file:hover .spec-tree-menu-button,
.spec-tree-file:focus-visible .spec-tree-menu-button,
.spec-tree-menu-button:focus-visible {
  opacity: 0.72;
}

.spec-tree-menu-button:hover,
.spec-tree-menu-button:focus-visible {
  background: rgba(100, 116, 139, 0.18);
  opacity: 1;
  outline: none;
}

.spec-tree-icon,
.spec-tree-chevron {
  width: 0.92rem;
  height: 0.92rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spec-tree-folder:not(.collapsed) > .spec-tree-folder-name .spec-tree-chevron {
  transform: rotate(90deg);
}

.spec-tree-folder.collapsed > .spec-tree-folder-children {
  display: none;
}

.spec-tree-folder-children {
  border-left: 1px solid #e2e8f0;
  margin-left: 0.78rem;
  padding-left: 0.78rem;
}

.spec-tree-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-context-menu {
  position: absolute;
  z-index: 45;
  min-width: 8.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  padding: 0.24rem;
}

.spec-context-menu.hidden {
  display: none;
}

.yaml-context-menu {
  position: fixed;
  z-index: 120;
}

.spec-context-menu[data-item-type="file"] [data-spec-action="new-file"],
.spec-context-menu[data-item-type="file"] [data-spec-action="new-folder"],
.spec-context-menu[data-item-type="file"] .spec-context-separator,
.spec-context-menu[data-item-type="root"] [data-spec-action="rename"],
.spec-context-menu[data-item-type="root"] [data-spec-action="move"],
.spec-context-menu[data-item-type="root"] [data-spec-action="delete"],
.spec-context-menu[data-item-type="root"] .spec-context-separator {
  display: none;
}

.spec-context-separator {
  height: 1px;
  margin: 0.18rem 0.24rem;
  background: #e2e8f0;
}

.spec-context-menu button {
  width: 100%;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.46rem;
  padding: 0.36rem 0.52rem;
  text-align: left;
  font: 640 0.72rem/1.2 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-context-menu .app-icon {
  width: 0.86rem;
  height: 0.86rem;
  flex: 0 0 auto;
  color: #64748b;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spec-context-menu button:hover,
.spec-context-menu button:focus-visible {
  background: #e2e8f0;
  color: #0f172a;
  outline: none;
}

.spec-context-menu button:hover .app-icon,
.spec-context-menu button:focus-visible .app-icon {
  color: currentColor;
}
