/* Lot 7: visible Activity Jobs only; never Admin Job Monitor, shared dialogs,
   workspaces or exported media. Inline hooks retain exact Original fallbacks. */
html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]:has(#appContainer > main > #section-jobs:not(.hidden)),
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) body:has(#appContainer > main > #section-jobs:not(.hidden)) {
  background: var(--ps-bg);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) {
  --ps-activity-card: var(--ps-bg-soft);
  --ps-activity-line: var(--ps-line);
  --ps-activity-track: var(--ps-surface-solid);
  --ps-activity-progress: #93c5fd;
  --ps-activity-error: #fda4af;
  min-width: 0;
  max-width: 100%;
  container-type: inline-size;
  background: var(--ps-bg);
  border-color: var(--ps-line);
  border-radius: 9px;
  box-shadow: var(--ps-shell-reflection), 0 8px 24px #0003;
  color: var(--ps-text);
  font-family: var(--ps-font-ui);
  overflow-wrap: anywhere;
  overflow-anchor: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) :is(h2, h3, .projects-panel-title) {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) > h2 {
  font-weight: 600;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) :is(.projects-panel, .admin-subcard) {
  min-width: 0;
  max-width: 100%;
  background: var(--ps-surface-soft);
  border-color: var(--ps-line);
  border-radius: 9px;
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .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-jobs:not(.hidden) :is(.projects-panel-icon, .admin-subcard-icon) {
  background: var(--ps-bg-soft);
  color: var(--ps-gold-light);
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .admin-subcard:hover {
  box-shadow: var(--ps-shell-reflection), 0 4px 12px #0002;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .muted {
  color: var(--ps-muted);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) :is(.ps-activity-job-card, .ps-activity-job-heading > div) {
  min-width: 0;
  max-width: 100%;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .status-pill {
  max-width: 100%;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Preserve the renderer's actual semantic groups: queued; running/cancelling;
   succeeded; failed/cancelled. Labels and percentages are never rewritten. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .status-pill--not-started {
  background: #142639;
  color: #93c5fd;
  border-color: #365a80;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .status-pill--in-progress {
  background: #302718;
  color: #fcd34d;
  border-color: #80632b;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .status-pill--done {
  background: #102e25;
  color: #86efac;
  border-color: #3d7658;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .status-pill--error {
  background: #331f25;
  color: #fda4af;
  border-color: #82434f;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .ps-activity-job-card:has(.status-pill--in-progress) {
  --ps-activity-progress: #fcd34d;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .ps-activity-job-card:has(.status-pill--done) {
  --ps-activity-progress: #86efac;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .ps-activity-job-card:has(.status-pill--error) {
  --ps-activity-progress: #fda4af;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) details[data-jobs-history] > summary {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) details[data-jobs-history] > summary::marker {
  color: var(--ps-gold);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) details[data-jobs-history] > summary:focus-visible {
  outline: 2px solid var(--ps-focus);
  outline-offset: 2px;
}

@container (max-width: 520px) {
  :where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .ps-activity-job-heading {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-jobs:not(.hidden) .admin-subcard {
    transition: none;
  }
}
