/* Quick Tools creation only. Existing mode class separates Production/Builder.
   Keep historical geometry, media, validation and handlers intact. */
html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]:has(#section-project-new:not(.hidden):not(.workflow-production)),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) body:has(#section-project-new:not(.hidden):not(.workflow-production)) {
  background: var(--ps-bg);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) main:has(> #section-project-new:not(.hidden):not(.workflow-production)) {
  scrollbar-color: var(--ps-line-strong) var(--ps-bg);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) {
  background: var(--ps-bg);
  border-color: var(--ps-line);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) > h2,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) > p,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.projects-panel-header, .workflow-preview-card, #newProjectQuickToolsPanel, #newProjectAppDetailsPanel, #newProjectQuickToolsActions) {
  font-family: var(--ps-font-ui);
  color: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.project-form-panel, .projects-panel-body) {
  background: var(--ps-bg);
  border-color: var(--ps-line);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) .projects-panel-header {
  background: var(--ps-surface-solid);
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.workflow-preview-card, .new-project-welcome, .new-project-overview) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) > h2,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.projects-panel-title, .workflow-section-label, .workflow-mode-title, .new-project-name-field label),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectAppDetailsPanel h2 {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.muted, .workflow-mode-desc),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectAppDetailsPanel :is(p, .new-project-description) {
  color: var(--ps-muted);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.projects-panel-icon, .workflow-mode-icon) {
  background: var(--ps-surface-solid);
  color: var(--ps-gold);
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) .workflow-mode-card,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #appSelection .app-card {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
  color: var(--ps-text);
  font-family: var(--ps-font-ui);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) .workflow-mode-card.active,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #appSelection .app-card.active {
  background: var(--ps-surface-solid);
  border-color: var(--ps-gold);
  box-shadow: inset 3px 0 var(--ps-gold);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) .workflow-mode-card:hover:not(:disabled),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #appSelection .app-card:hover:not(:disabled) {
  background: var(--ps-surface-solid);
  border-color: var(--ps-gold);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) .workflow-mode-card::after,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #appSelection .app-card::after {
  background: var(--ps-button-bg);
  color: var(--ps-button-text);
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #appSelection .app-card-title {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #appSelection .app-card-desc {
  color: var(--ps-muted);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectAppDetailsPanel .new-project-overview-label {
  color: var(--ps-gold);
}

/* The overview renderer uses these two exact inline text colors. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectAppDetailsPanel .new-project-description [style*="color:#0f172a"] {
  color: var(--ps-ink) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectAppDetailsPanel .new-project-description [style*="color:#475569"] {
  color: var(--ps-muted) !important;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectName {
  background: var(--ps-surface-soft);
  color: var(--ps-text);
  border-color: var(--ps-line-strong);
  font-family: var(--ps-font-ui);
  color-scheme: dark;
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectName::placeholder {
  color: var(--ps-muted);
  opacity: .75;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectName[aria-invalid="true"] {
  background: var(--ps-surface-soft);
  color: var(--ps-text);
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px #fca5a533;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectNameError {
  color: #fca5a5;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectQuickToolsActions {
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectQuickToolsActions > button {
  background: var(--ps-surface-soft);
  color: var(--ps-text);
  border-color: var(--ps-line-strong);
  box-shadow: none;
  font-family: var(--ps-font-ui);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectQuickToolsActions > button:hover:not(:disabled) {
  background: var(--ps-surface-solid);
  border-color: var(--ps-gold);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectQuickToolsActions > .btn-primary {
  background: var(--ps-button-bg);
  color: var(--ps-button-text);
  border-color: var(--ps-button-border);
  box-shadow: var(--ps-button-shadow);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) #newProjectQuickToolsActions > .btn-primary:hover:not(:disabled) {
  background: var(--ps-button-hover);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.workflow-mode-card, #appSelection .app-card, #newProjectQuickToolsActions > button):disabled {
  background: var(--ps-bg-soft);
  color: var(--ps-muted);
  border-color: var(--ps-line);
  box-shadow: none;
  opacity: .65;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-project-new:not(.hidden):not(.workflow-production) :is(.workflow-mode-card, #appSelection .app-card, #newProjectName, #newProjectQuickToolsActions > button):focus-visible {
  outline: 3px solid var(--ps-focus);
  outline-offset: 3px;
}
