.studio-page .toolbar {
  flex-wrap: nowrap;
}

.studio-page .toolbar-brand,
.studio-page .toolbar-actions {
  min-width: 0;
}

.toolbar-divider {
  width: 1px;
  height: 1.45rem;
  margin: 0 0.15rem;
  background: rgba(148, 163, 184, 0.35);
}

.hidden-file-input {
  display: none;
}

.studio-toast {
  position: fixed;
  right: 1rem;
  bottom: 2.65rem;
  z-index: 70;
  max-width: min(28rem, calc(100vw - 2rem));
  border: 1px solid rgba(34, 197, 94, 0.38);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.26);
  color: #f8fafc;
  font: 700 0.82rem/1.35 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  opacity: 0;
  padding: 0.72rem 0.9rem;
  pointer-events: none;
  transform: translateY(0.6rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.studio-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.studio-toast strong {
  display: block;
  margin-bottom: 0.18rem;
  color: #bbf7d0;
}

.studio-toast code {
  color: #e2e8f0;
  font: 700 0.78rem/1.35 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.studio-docs-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  height: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.55);
  color: #d6e0ee;
  padding: 0 0.66rem;
  cursor: pointer;
  font: 800 0.74rem/1 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.studio-docs-button:hover,
.studio-docs-button:focus-visible {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
  outline: none;
}

.studio-docs-button .app-icon {
  width: 0.96rem;
  height: 0.96rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.current-example-chip {
  min-width: 0;
  max-width: 18rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.14);
  color: #dbeafe;
  padding: 0 0.32rem 0 0.62rem;
}

.current-example-chip.hidden {
  display: none;
}

.current-example-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 780 0.72rem/1 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.current-example-clear {
  position: relative;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #bfdbfe;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.current-example-clear:hover,
.current-example-clear:focus-visible {
  background: rgba(96, 165, 250, 0.22);
  color: #ffffff;
  outline: none;
}

.current-example-clear .app-icon {
  width: 0.82rem;
  height: 0.82rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-workspace {
  display: grid;
  grid-template-columns: 2.35rem var(--explorer-width, 14rem) 3px minmax(0, 1fr);
  grid-template-rows: 100%;
}

.studio-workspace.maximized-panel-active {
  grid-template-columns: minmax(0, 1fr);
}

.studio-workspace.maximized-panel-active .activity-rail,
.studio-workspace.maximized-panel-active .spec-explorer-panel,
.studio-workspace.maximized-panel-active .studio-explorer-splitter {
  display: none;
}

.studio-workspace.explorer-hidden {
  grid-template-columns: 2.35rem 0 0 minmax(0, 1fr);
}

.studio-workspace.explorer-hidden .spec-explorer-panel,
.studio-workspace.explorer-hidden .studio-explorer-splitter {
  display: none;
}

.studio-main {
  grid-column: 4;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--editors-height, 38%) 3px minmax(0, 1fr);
  background: #eef2f7;
}

.studio-workspace.maximized-panel-active .studio-main {
  grid-column: 1;
}

.studio-workspace.explorer-hidden .studio-main {
  grid-column: 4;
}

.studio-main[data-maximized-panel] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.studio-main[data-maximized-panel] .studio-editor-splitter,
.studio-main[data-maximized-panel] .studio-output-splitter {
  display: none;
}

.studio-main[data-maximized-panel] .studio-editors {
  grid-column: 1;
  grid-row: 1;
  border-bottom: 0;
}

.studio-main[data-maximized-panel] .studio-output {
  grid-column: 1;
  grid-row: 1;
}

.studio-main[data-maximized-panel="types"] .studio-editors,
.studio-main[data-maximized-panel="input"] .studio-editors {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.studio-main[data-maximized-panel="types"] #types-panel,
.studio-main[data-maximized-panel="input"] #input-panel {
  display: flex;
  grid-column: 1;
}

.studio-main[data-maximized-panel="types"] #input-panel,
.studio-main[data-maximized-panel="input"] #types-panel,
.studio-main[data-maximized-panel="types"] .studio-output,
.studio-main[data-maximized-panel="input"] .studio-output {
  display: none;
}

.studio-main[data-maximized-panel="output"] .studio-editors,
.studio-main[data-maximized-panel="output"] .studio-output-splitter {
  display: none;
}

.studio-main[data-maximized-panel="output"] .studio-output {
  display: flex;
}

.panel-maximize-button.active {
  color: #1d4ed8;
}

.activity-rail-left {
  grid-column: 1;
  grid-row: 1;
}

.spec-explorer-panel {
  grid-column: 2;
  grid-row: 1;
}

.studio-explorer-splitter {
  grid-column: 3;
  grid-row: 1;
  background: #cbd5e1;
  cursor: col-resize;
}

.studio-main.editors-hidden:not([data-maximized-panel]) {
  grid-template-rows: 0 0 minmax(0, 1fr);
}

.studio-editors {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(14rem, min(var(--types-width, 66%), calc(100% - 14rem - 3px))) 3px minmax(14rem, 1fr);
  border-bottom: 1px solid #cbd5e1;
  background: #ffffff;
  overflow: hidden;
}

.studio-editor-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.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 {
  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-x: auto;
  scrollbar-width: none;
}

.spec-explorer-header .studio-panel-actions::-webkit-scrollbar {
  display: none;
}

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

.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: 720 0.76rem/1.25 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.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.48rem;
  padding-left: 0.32rem;
}

.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.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
  padding: 0.26rem;
}

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

.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.22rem 0.18rem;
  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.48rem;
  padding: 0.42rem 0.56rem;
  text-align: left;
  font: 680 0.75rem/1.2 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-context-menu .app-icon {
  width: 0.9rem;
  height: 0.9rem;
  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;
}

#types-panel {
  grid-column: 1;
}

#editor-splitter {
  grid-column: 2;
}

#input-panel {
  grid-column: 3;
}

.studio-editor-panel.collapsed {
  display: none;
}

.studio-editors.types-collapsed {
  grid-template-columns: 0 0 minmax(14rem, 1fr);
}

.studio-editors.input-collapsed {
  grid-template-columns: minmax(18rem, 1fr) 0 0;
}

.studio-editors.types-collapsed.input-collapsed {
  display: none;
}

.studio-editor-splitter,
.studio-output-splitter,
.studio-explorer-splitter {
  background: #cbd5e1;
}

.studio-editor-splitter {
  cursor: col-resize;
}

.studio-output-splitter {
  grid-column: 1;
  grid-row: 2;
  cursor: row-resize;
}

.studio-editor-splitter:hover,
.studio-editor-splitter.dragging,
.studio-output-splitter:hover,
.studio-output-splitter.dragging,
.studio-explorer-splitter:hover,
.studio-explorer-splitter.dragging {
  background: rgba(37, 99, 235, 0.35);
}

.studio-panel-header {
  height: var(--panel-header-height);
  flex: 0 0 var(--panel-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.42rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.studio-panel-title {
  color: #334155;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.studio-panel-meta {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.studio-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.studio-panel-title-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.editor-reset-button {
  position: relative;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
  transition: background 0.18s ease, color 0.18s ease;
}

.editor-reset-button.hidden {
  display: none;
}

.editor-reset-button:hover,
.editor-reset-button:focus-visible {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  outline: none;
}

.editor-reset-button .app-icon {
  width: 0.82rem;
  height: 0.82rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.editor-reset-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 50;
  width: max-content;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  color: #f8fafc;
  font: 600 0.68rem/1.25 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
  visibility: hidden;
  white-space: nowrap;
}

.editor-reset-button[data-tooltip]::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  z-index: 51;
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, 0.95);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px) rotate(45deg);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
  visibility: hidden;
}

.editor-reset-button[data-tooltip]:hover::before,
.editor-reset-button[data-tooltip]:hover::after,
.editor-reset-button[data-tooltip]:focus-visible::before,
.editor-reset-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: var(--button-tooltip-delay), var(--button-tooltip-delay), 0s;
  visibility: visible;
}

.editor-reset-button[data-tooltip]:hover::before,
.editor-reset-button[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.studio-panel-action {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 5px;
  color: #64748b;
}

.studio-panel-action:hover,
.studio-panel-action:focus-visible {
  color: #1e293b;
}

.studio-editor {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  padding: 0.8rem 0.85rem;
  background: #ffffff;
  color: #1f2933;
  font: 0.8rem/1.55 "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  overflow-wrap: normal;
}

.studio-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.studio-editor-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.studio-editor-highlight {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: auto;
  padding: 0.8rem 0.85rem;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
  color: #1f2933;
  font: 0.8rem/1.55 "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  pointer-events: none;
}

.studio-editor-highlight::-webkit-scrollbar {
  display: none;
}

.studio-editor-highlight {
  scrollbar-width: none;
}

.studio-editor-overlay {
  position: absolute;
  inset: 0;
  min-width: 100%;
  width: 100%;
  overflow: auto;
  background: transparent;
  color: transparent;
  caret-color: #1f2933;
  -webkit-text-fill-color: transparent;
  white-space: pre;
  overflow-wrap: normal;
}

.studio-editor-overlay::selection {
  background: rgba(37, 99, 235, 0.26);
  color: transparent;
}

.studio-output {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  padding: 0;
}

.studio-output .semantic-outline {
  min-height: 0;
  width: var(--outline-width, 17rem);
}

.studio-output.outline-hidden .semantic-outline {
  display: none;
}

.studio-output.outline-hidden .semantic-outline-resizer {
  display: none;
}

.studio-run {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2rem;
  border: 1px solid rgba(96, 165, 250, 0.52);
  border-radius: 6px;
  background: #1d4ed8;
  color: #ffffff;
  padding: 0 0.72rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  cursor: pointer;
  font: 800 0.76rem/1 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.studio-run:hover,
.studio-run:focus-visible {
  background: #2563eb;
  border-color: rgba(147, 197, 253, 0.72);
  outline: none;
}

.studio-run:disabled {
  cursor: default;
  opacity: 0.72;
}

.studio-run .app-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-run.running .app-icon {
  animation: spin 1s linear infinite;
}

.studio-run[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 50;
  width: max-content;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  color: #f8fafc;
  font: 600 0.68rem/1.25 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
  visibility: hidden;
  white-space: nowrap;
}

.studio-run[data-tooltip]::before {
  content: "";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  z-index: 51;
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, 0.95);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px) rotate(45deg);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
  visibility: hidden;
}

.studio-run[data-tooltip]:hover::before,
.studio-run[data-tooltip]:hover::after,
.studio-run[data-tooltip]:focus-visible::before,
.studio-run[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: var(--button-tooltip-delay), var(--button-tooltip-delay), 0s;
  visibility: visible;
}

.studio-run[data-tooltip]:hover::before,
.studio-run[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.semantic-empty {
  margin: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 1rem;
  color: #64748b;
  font: 650 0.82rem/1.45 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.semantic-error {
  margin: 1rem;
  border: 1px solid rgba(185, 28, 28, 0.3);
  border-radius: 8px;
  background: #fff7f7;
  padding: 1rem;
  color: #b91c1c;
  font: 650 0.82rem/1.45 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.json-container {
  padding: 0.85rem 1rem;
}

.spec-dialog {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

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

.spec-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.16s ease;
}

.spec-dialog.open .spec-dialog-backdrop {
  opacity: 1;
}

.spec-dialog-panel {
  position: relative;
  width: min(26rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 2rem));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(0.4rem) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.spec-dialog.open .spec-dialog-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.spec-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.spec-dialog-title {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.spec-dialog-subtitle {
  margin-top: 0.24rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.3;
}

.spec-dialog-body {
  min-height: 0;
  overflow: auto;
  padding: 0.85rem;
}

.spec-dialog-message {
  margin-bottom: 0.72rem;
  color: #64748b;
  font: 650 0.78rem/1.4 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  overflow-wrap: anywhere;
}

.spec-dialog-message.danger {
  color: #b91c1c;
}

.spec-dialog-field {
  display: grid;
  gap: 0.35rem;
  color: #475569;
  font: 760 0.72rem/1 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-dialog-field input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2937;
  padding: 0.52rem 0.58rem;
  font: 650 0.82rem/1.2 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-dialog-field input:focus {
  border-color: #60a5fa;
  outline: 3px solid rgba(96, 165, 250, 0.25);
}

.spec-folder-picker {
  display: grid;
  gap: 0.18rem;
  max-height: 17rem;
  overflow: auto;
}

.spec-folder-option {
  width: 100%;
  border: 0;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  padding: 0.46rem 0.5rem;
  text-align: left;
  font: 680 0.78rem/1.25 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

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

.spec-folder-option.selected {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 780;
}

.spec-folder-icon {
  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-folder-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.72rem 0.8rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.spec-dialog-button {
  min-width: 4.8rem;
  height: 2rem;
  border-radius: 6px;
  cursor: pointer;
  padding: 0 0.72rem;
  font: 800 0.74rem/1 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.spec-dialog-button.secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
}

.spec-dialog-button.primary {
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

.spec-dialog-button.primary.danger {
  border-color: #b91c1c;
  background: #b91c1c;
}

.spec-dialog-button:hover,
.spec-dialog-button:focus-visible {
  outline: none;
  filter: brightness(1.04);
}

.examples-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.examples-dialog.hidden {
  display: none;
}

.examples-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.18s ease;
}

.examples-dialog.open .examples-dialog-backdrop {
  opacity: 1;
}

.examples-dialog-panel {
  position: relative;
  width: min(72rem, calc(100vw - 2rem));
  height: 100vh;
  display: grid;
  grid-template-rows: var(--panel-header-height) minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-left: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.22);
  pointer-events: auto;
  transform: translateX(100%);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.examples-dialog.open .examples-dialog-panel {
  transform: translateX(0);
}

.examples-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.examples-dialog-title {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.examples-dialog-subtitle {
  margin-top: 0.24rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 650;
}

.examples-dialog-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
}

.examples-list {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.5rem;
}

.example-list-item {
  width: 100%;
  display: block;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  padding: 0.58rem 0.62rem;
  text-align: left;
}

.example-list-item:hover,
.example-list-item:focus-visible {
  background: #e8eef7;
  outline: none;
}

.example-list-item.active {
  border-color: #bfdbfe;
  background: #dbeafe;
}

.example-list-title {
  display: block;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
}

.example-list-description {
  display: block;
  margin-top: 0.24rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 620;
  line-height: 1.35;
}

.examples-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 1.2rem 1.2rem;
}

.examples-content-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1.2rem 1rem;
  padding: 0.9rem 1.2rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.examples-content-title {
  color: #1e293b;
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
}

.examples-content-subtitle {
  margin-top: 0.22rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.35;
}

.examples-doc {
  max-width: 48rem;
  color: #334155;
  font: 0.92rem/1.58 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.examples-doc h2,
.examples-doc h3 {
  margin: 0 0 0.7rem;
  color: #1e293b;
  letter-spacing: 0;
}

.examples-doc h2 {
  font-size: 1.24rem;
}

.examples-doc h3 {
  font-size: 1.05rem;
}

.examples-doc p {
  margin: 0 0 0.72rem;
}

.examples-doc code {
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  padding: 0.04rem 0.22rem;
  color: #1e40af;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78em;
}

.examples-try-button {
  flex: 0 0 auto;
  height: 2rem;
}

.examples-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.examples-preview {
  min-width: 0;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.examples-preview-title {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.45rem 0.6rem;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.examples-preview pre {
  max-height: 18rem;
  margin: 0;
  overflow: auto;
  padding: 0.65rem;
  color: #1f2933;
  font: 0.72rem/1.5 "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre;
}

.examples-preview:first-child pre {
  max-height: 22rem;
}

.examples-preview-yaml .syntax-key,
.examples-preview-yaml .syntax-type-key,
.examples-preview-yaml .syntax-marker {
  color: #2563eb;
}

.studio-editor-highlight .syntax-type-key,
.studio-editor-highlight .syntax-type-reference,
.examples-preview-yaml .syntax-type-reference {
  color: #2563eb;
}

.studio-editor-highlight .syntax-directive-key,
.examples-preview-yaml .syntax-directive-key {
  color: #7c3aed;
}

.studio-editor-highlight .syntax-field-key,
.studio-editor-highlight .syntax-field-reference,
.examples-preview-yaml .syntax-field-key,
.examples-preview-yaml .syntax-field-reference {
  color: #b45309;
}

.examples-preview-yaml .syntax-string {
  color: #0891b2;
}

.examples-preview-yaml .syntax-number {
  color: #16a34a;
}

.examples-preview-yaml .syntax-literal {
  color: #c2410c;
}

.examples-preview-yaml .syntax-comment {
  color: #64748b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .studio-docs-button {
    background: rgba(255, 255, 255, 0.08);
    border-color: #3a404c;
    color: #d7dce4;
  }

  :root:not([data-theme]) .studio-docs-button:hover,
  :root:not([data-theme]) .studio-docs-button:focus-visible {
    background: #2b303a;
    border-color: #566070;
    color: #ffffff;
  }

  :root:not([data-theme]) .current-example-chip {
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(96, 165, 250, 0.12);
    color: #d7dce4;
  }

  :root:not([data-theme]) .studio-main {
    background: #171a21;
  }

  :root:not([data-theme]) .studio-editors,
  :root:not([data-theme]) .studio-editor-panel,
  :root:not([data-theme]) .studio-editor,
  :root:not([data-theme]) .studio-editor-shell,
  :root:not([data-theme]) .studio-editor-highlight {
    background: #171a21;
    color: #d7dce4;
  }

  :root:not([data-theme]) .studio-editor-overlay {
    background: transparent;
    color: transparent;
    caret-color: #d7dce4;
    -webkit-text-fill-color: transparent;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-key {
    color: #60a5fa;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-string {
    color: #22d3ee;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-type-key,
  :root:not([data-theme]) .studio-editor-highlight .syntax-type-reference {
    color: #7aa2d6;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-directive-key {
    color: #b89ce8;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-field-key,
  :root:not([data-theme]) .studio-editor-highlight .syntax-field-reference {
    color: #c9a26d;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-number {
    color: #4ade80;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-literal {
    color: #fb923c;
  }

  :root:not([data-theme]) .studio-editor-highlight .syntax-comment,
  :root:not([data-theme]) .studio-editor-highlight .syntax-marker {
    color: #9aa5b5;
  }

  :root:not([data-theme]) .studio-editors,
  :root:not([data-theme]) .studio-panel-header {
    border-color: #3a404c;
  }

  :root:not([data-theme]) .studio-panel-header {
    background: #1f2229;
  }

  :root:not([data-theme]) .studio-panel-title {
    color: #d7dce4;
  }

  :root:not([data-theme]) .studio-panel-meta {
    color: #9aa5b5;
  }

  :root:not([data-theme]) .studio-panel-action {
    color: #9aa5b5;
  }

  :root:not([data-theme]) .studio-panel-action:hover,
  :root:not([data-theme]) .studio-panel-action:focus-visible {
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-explorer {
    border-color: #3a404c;
    background: #1b1f27;
  }

  :root:not([data-theme]) .spec-explorer-header,
  :root:not([data-theme]) .spec-tree-folder-name {
    color: #9aa5b5;
  }

  :root:not([data-theme]) .spec-tree-file {
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-tree-file.dirty {
    color: #f1f5f9;
  }

  :root:not([data-theme]) .spec-tree-folder-name:hover,
  :root:not([data-theme]) .spec-tree-folder-name:focus-visible,
  :root:not([data-theme]) .spec-tree-file:hover,
  :root:not([data-theme]) .spec-tree-file:focus-visible {
    background: #2b303a;
  }

  :root:not([data-theme]) .spec-tree-folder-name.selected,
  :root:not([data-theme]) .spec-tree-file.selected {
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.24);
  }

  :root:not([data-theme]) .spec-tree-file.active {
    background: rgba(96, 165, 250, 0.18);
    color: #93c5fd;
  }

  :root:not([data-theme]) .spec-tree-dirty-marker {
    background: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.16);
  }

  :root:not([data-theme]) .spec-tree-menu-button:hover,
  :root:not([data-theme]) .spec-tree-menu-button:focus-visible {
    background: rgba(154, 165, 181, 0.14);
  }

  :root:not([data-theme]) .spec-tree-folder-children {
    border-color: #3a404c;
  }

  :root:not([data-theme]) .spec-context-menu {
    border-color: #3a404c;
    background: #1f2229;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
  }

  :root:not([data-theme]) .spec-context-menu button {
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-context-menu .app-icon {
    color: #9aa5b5;
  }

  :root:not([data-theme]) .spec-context-separator {
    background: #3a404c;
  }

  :root:not([data-theme]) .spec-context-menu button:hover,
  :root:not([data-theme]) .spec-context-menu button:focus-visible {
    background: #2b303a;
    color: #ffffff;
  }

  :root:not([data-theme]) .studio-editor-splitter,
  :root:not([data-theme]) .studio-output-splitter,
  :root:not([data-theme]) .studio-explorer-splitter {
    background: #3a404c;
  }

  :root:not([data-theme]) .semantic-empty {
    border-color: #566070;
    color: #9aa5b5;
  }

  :root:not([data-theme]) .semantic-error {
    border-color: rgba(240, 160, 141, 0.35);
    background: rgba(91, 54, 42, 0.42);
    color: #f0a08d;
  }

  :root:not([data-theme]) .examples-dialog-panel,
  :root:not([data-theme]) .spec-dialog-panel,
  :root:not([data-theme]) .examples-list,
  :root:not([data-theme]) .spec-dialog-header,
  :root:not([data-theme]) .spec-dialog-footer,
  :root:not([data-theme]) .examples-dialog-header,
  :root:not([data-theme]) .examples-content-header,
  :root:not([data-theme]) .examples-preview,
  :root:not([data-theme]) .examples-doc code {
    background: #1f2229;
    border-color: #3a404c;
    color: #93c5fd;
  }

  :root:not([data-theme]) .examples-dialog-title,
  :root:not([data-theme]) .spec-dialog-title,
  :root:not([data-theme]) .examples-content-title,
  :root:not([data-theme]) .examples-doc h2,
  :root:not([data-theme]) .examples-doc h3,
  :root:not([data-theme]) .example-list-title,
  :root:not([data-theme]) .examples-preview pre {
    color: #d7dce4;
  }

  :root:not([data-theme]) .examples-dialog-subtitle,
  :root:not([data-theme]) .spec-dialog-subtitle,
  :root:not([data-theme]) .spec-dialog-message,
  :root:not([data-theme]) .spec-dialog-field,
  :root:not([data-theme]) .examples-content-subtitle,
  :root:not([data-theme]) .examples-doc,
  :root:not([data-theme]) .example-list-description,
  :root:not([data-theme]) .examples-preview-title {
    color: #9aa5b5;
  }

  :root:not([data-theme]) .example-list-item {
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-dialog-field input {
    border-color: #3a404c;
    background: #171a21;
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-folder-option {
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-folder-option:hover,
  :root:not([data-theme]) .spec-folder-option:focus-visible {
    background: #2b303a;
  }

  :root:not([data-theme]) .spec-folder-option.selected {
    background: rgba(96, 165, 250, 0.18);
    color: #93c5fd;
  }

  :root:not([data-theme]) .spec-dialog-button.secondary {
    border-color: #3a404c;
    background: #171a21;
    color: #d7dce4;
  }

  :root:not([data-theme]) .spec-dialog-message.danger {
    color: #fca5a5;
  }

  :root:not([data-theme]) .example-list-item:hover,
  :root:not([data-theme]) .example-list-item:focus-visible {
    background: #2b303a;
  }

  :root:not([data-theme]) .example-list-item.active {
    border-color: #4f6ea6;
    background: rgba(79, 110, 166, 0.22);
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-key,
  :root:not([data-theme]) .examples-preview-yaml .syntax-type-key,
  :root:not([data-theme]) .examples-preview-yaml .syntax-marker {
    color: #60a5fa;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-string {
    color: #22d3ee;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-type-reference {
    color: #7aa2d6;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-directive-key {
    color: #b89ce8;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-field-key,
  :root:not([data-theme]) .examples-preview-yaml .syntax-field-reference {
    color: #c9a26d;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-number {
    color: #4ade80;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-literal {
    color: #fb923c;
  }

  :root:not([data-theme]) .examples-preview-yaml .syntax-comment {
    color: #9aa5b5;
  }
}

:root[data-theme="dark"] .studio-docs-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3a404c;
  color: #d7dce4;
}

:root[data-theme="dark"] .studio-docs-button:hover,
:root[data-theme="dark"] .studio-docs-button:focus-visible {
  background: #2b303a;
  border-color: #566070;
  color: #ffffff;
}

:root[data-theme="dark"] .current-example-chip {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.12);
  color: #d7dce4;
}

:root[data-theme="dark"] .studio-main {
  background: #171a21;
}

:root[data-theme="dark"] .studio-editors,
:root[data-theme="dark"] .studio-editor-panel,
:root[data-theme="dark"] .studio-editor,
:root[data-theme="dark"] .studio-editor-shell,
:root[data-theme="dark"] .studio-editor-highlight {
  background: #171a21;
  color: #d7dce4;
}

:root[data-theme="dark"] .studio-editor-overlay {
  background: transparent;
  color: transparent;
  caret-color: #d7dce4;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-key {
  color: #60a5fa;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-string {
  color: #22d3ee;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-type-key,
:root[data-theme="dark"] .studio-editor-highlight .syntax-type-reference {
  color: #7aa2d6;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-directive-key {
  color: #b89ce8;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-field-key,
:root[data-theme="dark"] .studio-editor-highlight .syntax-field-reference {
  color: #c9a26d;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-number {
  color: #4ade80;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-literal {
  color: #fb923c;
}

:root[data-theme="dark"] .studio-editor-highlight .syntax-comment,
:root[data-theme="dark"] .studio-editor-highlight .syntax-marker {
  color: #9aa5b5;
}

:root[data-theme="dark"] .studio-editors,
:root[data-theme="dark"] .studio-panel-header {
  border-color: #3a404c;
}

:root[data-theme="dark"] .studio-panel-header {
  background: #1f2229;
}

:root[data-theme="dark"] .studio-panel-title {
  color: #d7dce4;
}

:root[data-theme="dark"] .studio-panel-meta {
  color: #9aa5b5;
}

:root[data-theme="dark"] .studio-panel-action {
  color: #9aa5b5;
}

:root[data-theme="dark"] .studio-panel-action:hover,
:root[data-theme="dark"] .studio-panel-action:focus-visible {
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-explorer {
  border-color: #3a404c;
  background: #1b1f27;
}

:root[data-theme="dark"] .spec-explorer-header,
:root[data-theme="dark"] .spec-tree-folder-name {
  color: #9aa5b5;
}

:root[data-theme="dark"] .spec-tree-file {
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-tree-file.dirty {
  color: #f1f5f9;
}

:root[data-theme="dark"] .spec-tree-folder-name:hover,
:root[data-theme="dark"] .spec-tree-folder-name:focus-visible,
:root[data-theme="dark"] .spec-tree-file:hover,
:root[data-theme="dark"] .spec-tree-file:focus-visible {
  background: #2b303a;
}

:root[data-theme="dark"] .spec-tree-folder-name.selected,
:root[data-theme="dark"] .spec-tree-file.selected {
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.24);
}

:root[data-theme="dark"] .spec-tree-file.active {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

:root[data-theme="dark"] .spec-tree-dirty-marker {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.16);
}

:root[data-theme="dark"] .spec-tree-menu-button:hover,
:root[data-theme="dark"] .spec-tree-menu-button:focus-visible {
  background: rgba(154, 165, 181, 0.14);
}

:root[data-theme="dark"] .spec-tree-folder-children {
  border-color: #3a404c;
}

:root[data-theme="dark"] .spec-context-menu {
  border-color: #3a404c;
  background: #1f2229;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .spec-context-menu button {
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-context-menu .app-icon {
  color: #9aa5b5;
}

:root[data-theme="dark"] .spec-context-separator {
  background: #3a404c;
}

:root[data-theme="dark"] .spec-context-menu button:hover,
:root[data-theme="dark"] .spec-context-menu button:focus-visible {
  background: #2b303a;
  color: #ffffff;
}

:root[data-theme="dark"] .studio-editor-splitter,
:root[data-theme="dark"] .studio-output-splitter,
:root[data-theme="dark"] .studio-explorer-splitter {
  background: #3a404c;
}

:root[data-theme="dark"] .semantic-empty {
  border-color: #566070;
  color: #9aa5b5;
}

:root[data-theme="dark"] .semantic-error {
  border-color: rgba(240, 160, 141, 0.35);
  background: rgba(91, 54, 42, 0.42);
  color: #f0a08d;
}

:root[data-theme="dark"] .examples-dialog-panel,
:root[data-theme="dark"] .spec-dialog-panel,
:root[data-theme="dark"] .examples-list,
:root[data-theme="dark"] .spec-dialog-header,
:root[data-theme="dark"] .spec-dialog-footer,
:root[data-theme="dark"] .examples-dialog-header,
:root[data-theme="dark"] .examples-content-header,
:root[data-theme="dark"] .examples-preview,
:root[data-theme="dark"] .examples-doc code {
  background: #1f2229;
  border-color: #3a404c;
  color: #93c5fd;
}

:root[data-theme="dark"] .examples-dialog-title,
:root[data-theme="dark"] .spec-dialog-title,
:root[data-theme="dark"] .examples-content-title,
:root[data-theme="dark"] .examples-doc h2,
:root[data-theme="dark"] .examples-doc h3,
:root[data-theme="dark"] .example-list-title,
:root[data-theme="dark"] .examples-preview pre {
  color: #d7dce4;
}

:root[data-theme="dark"] .examples-dialog-subtitle,
:root[data-theme="dark"] .spec-dialog-subtitle,
:root[data-theme="dark"] .spec-dialog-message,
:root[data-theme="dark"] .spec-dialog-field,
:root[data-theme="dark"] .examples-content-subtitle,
:root[data-theme="dark"] .examples-doc,
:root[data-theme="dark"] .example-list-description,
:root[data-theme="dark"] .examples-preview-title {
  color: #9aa5b5;
}

:root[data-theme="dark"] .example-list-item {
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-dialog-field input {
  border-color: #3a404c;
  background: #171a21;
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-folder-option {
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-folder-option:hover,
:root[data-theme="dark"] .spec-folder-option:focus-visible {
  background: #2b303a;
}

:root[data-theme="dark"] .spec-folder-option.selected {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

:root[data-theme="dark"] .spec-dialog-button.secondary {
  border-color: #3a404c;
  background: #171a21;
  color: #d7dce4;
}

:root[data-theme="dark"] .spec-dialog-message.danger {
  color: #fca5a5;
}

:root[data-theme="dark"] .example-list-item:hover,
:root[data-theme="dark"] .example-list-item:focus-visible {
  background: #2b303a;
}

:root[data-theme="dark"] .example-list-item.active {
  border-color: #4f6ea6;
  background: rgba(79, 110, 166, 0.22);
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-key,
:root[data-theme="dark"] .examples-preview-yaml .syntax-type-key,
:root[data-theme="dark"] .examples-preview-yaml .syntax-marker {
  color: #60a5fa;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-string {
  color: #22d3ee;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-type-reference {
  color: #7aa2d6;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-directive-key {
  color: #b89ce8;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-field-key,
:root[data-theme="dark"] .examples-preview-yaml .syntax-field-reference {
  color: #c9a26d;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-number {
  color: #4ade80;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-literal {
  color: #fb923c;
}

:root[data-theme="dark"] .examples-preview-yaml .syntax-comment {
  color: #9aa5b5;
}

@media (max-width: 900px) {
  body {
    height: 100vh;
    overflow: hidden;
  }

  .studio-page {
    height: 100vh;
    min-height: 0;
  }

  .studio-page .toolbar {
    align-items: center;
    flex-wrap: nowrap;
    padding: 0.55rem 0.75rem;
  }

  .studio-page .toolbar-brand {
    width: auto;
    min-width: 0;
    flex: 0 1 auto;
  }

  .studio-page .toolbar-actions {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .studio-workspace {
    grid-template-columns: 2.35rem var(--explorer-width, 12rem) 3px minmax(0, 1fr);
    grid-template-rows: 100%;
  }

  .studio-workspace.explorer-hidden {
    grid-template-columns: 2.35rem 0 0 minmax(0, 1fr);
  }

  .studio-page .activity-rail {
    width: auto;
    min-height: 0;
    flex-direction: column;
    justify-content: flex-start;
    border-width: 0 1px 0 0;
  }

  .semantic-outline {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    max-height: none;
    border-bottom: 0;
    border-left: 1px solid #cbd5e1;
  }

  .semantic-outline-resizer {
    display: block;
  }

  .studio-page .statusbar {
    align-items: center;
    flex-direction: row;
    gap: 1rem;
    padding: 0.18rem 0.75rem;
  }

  .studio-page .statusbar-right {
    width: auto;
    min-width: 0;
    justify-content: flex-end;
  }

  .studio-page .status-meta {
    width: auto;
    justify-content: flex-end;
    gap: 0.75rem;
    overflow: hidden;
  }

  .examples-dialog-panel {
    width: min(64rem, calc(100vw - 2.35rem));
  }

  .examples-dialog-body {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .examples-dialog-panel {
    width: 100vw;
  }

  .examples-dialog-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .examples-list {
    max-height: 11rem;
    border-right: 0;
    border-bottom-width: 1px;
    border-bottom-style: solid;
  }
}
