/* Lot 9.3: one shared board renderer (Active/Admin/Archive) and its two owned
   body ghosts. No detail, Sheet, subtask, diagram, Calendar or Team selectors.
   Folder colors keep their 4px accents. Project colors fill their entire card.
   No width, height, grid, padding, transform, drag or drop calculation changes. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #section-production-tracker:not(.hidden):has(> #productionTrackerRoot > .pt-page > .pt-board) {
  overflow-anchor: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) {
  font-family: var(--ps-font-ui);
  color: var(--ps-text);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board > .pt-folder, body > .pt-folder[data-ps-tracker-portal="folder-ghost"]) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
  border-radius: 9px;
  box-shadow: var(--ps-shell-reflection), 0 8px 24px #0003;
}

/* The header's inline background is a business color, not historical paint.
   A noninteractive surface leaves its left edge visible without replacing it.
   Children keep their existing boxes and hit targets above that surface. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-folder-header {
  position: relative;
  isolation: isolate;
  border-color: var(--ps-line);
  box-shadow: var(--ps-shell-reflection);
  text-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-folder-header::before {
  content: "";
  position: absolute;
  inset: 0 0 0 4px;
  background: var(--ps-surface-solid);
  pointer-events: none;
  z-index: 0;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-folder-header > * {
  position: relative;
  z-index: 1;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board .pt-project-card, body > [data-ps-tracker-portal="folder-ghost"] .pt-project-card, body > .pt-project-card[data-ps-tracker-portal="project-ghost"]) {
  border-color: var(--ps-line-strong);
  border-radius: 9px;
  box-shadow: var(--ps-shell-reflection), 0 6px 16px #0004;
  color: var(--ps-tracker-card-ink);
}

/* Derived presentation metadata follows cloned card/folder ghosts. The inline
   business background remains the sole source of the project's actual color.
   Pure black/white maximize contrast on arbitrary opaque project colors. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board .pt-project-card, body > [data-ps-tracker-portal="folder-ghost"] .pt-project-card, body > .pt-project-card[data-ps-tracker-portal="project-ghost"])[data-ps-tracker-ink="dark"] {
  --ps-tracker-card-ink: #000;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board .pt-project-card, body > [data-ps-tracker-portal="folder-ghost"] .pt-project-card, body > .pt-project-card[data-ps-tracker-portal="project-ghost"])[data-ps-tracker-ink="light"] {
  --ps-tracker-card-ink: #fff;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board .pt-project-card:hover {
  border-color: var(--ps-gold);
  box-shadow: var(--ps-shell-reflection), 0 10px 24px #0006;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-card-body {
  background: inherit;
  backdrop-filter: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-handle {
  background: inherit;
  border-color: var(--ps-tracker-card-ink);
  color: var(--ps-tracker-card-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board .pt-project-card, body > [data-ps-tracker-portal="folder-ghost"] .pt-project-card, body > .pt-project-card[data-ps-tracker-portal="project-ghost"]):not(:has(> .pt-project-handle)) > .pt-project-card-body {
  background: inherit;
}

/* Keep the existing grab glyph's intrinsic width/time-sensitive hit area.
   Textual content uses IBM Plex; this symbol retains its historical font. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) :is(.pt-folder-handle, .pt-project-handle) {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: var(--ps-tracker-card-ink, var(--ps-gold-light));
}

/* Legacy injected CSS forces seven colors with !important (main module,
   .pt-folder-header h3/.muted and .pt-project-title/client/meta/span/strong).
   These three color declarations are the sole priority bridge, on owned roots
   only. Original/injected rules remain byte-identical; there is no generic
   !important reset or layer/animation trick. Every other declaration is normal. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) :is(.pt-folder-header h3, .pt-project-title) {
  color: var(--ps-tracker-card-ink, var(--ps-ink)) !important;
  font-weight: 600;
  text-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) :is(.pt-folder-header .muted, .pt-project-client, .pt-project-meta, .pt-project-meta span) {
  color: var(--ps-tracker-card-ink, var(--ps-muted)) !important;
  font-weight: 400;
  text-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-meta strong {
  color: var(--ps-tracker-card-ink, var(--ps-text)) !important;
  font-weight: 600;
  text-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-card .pt-status-dot,
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) body > .pt-project-card[data-ps-tracker-portal="project-ghost"] .pt-status-dot {
  border-color: var(--ps-tracker-card-ink);
}

/* Preserve the measured historical line boxes when switching font families;
   card dimensions and folder/grid drop origins must not follow font metrics. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-folder-header h3 {
  line-height: 21px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-folder-header .muted {
  line-height: 17px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-title {
  line-height: 20px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-client {
  line-height: 16px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"], body > [data-ps-tracker-portal="project-ghost"]) .pt-project-meta {
  line-height: 15px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-board-area-badge {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line-strong);
  color: var(--ps-gold-light);
  font-weight: 600;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) :is(#productionTrackerRoot > .pt-page > .pt-board, body > [data-ps-tracker-portal="folder-ghost"]) .pt-folder-header button {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line-strong);
  color: var(--ps-text);
  font-family: var(--ps-font-ui);
  font-weight: 600;
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board .pt-folder-header button:hover:not(:disabled) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-gold);
  color: var(--ps-ink);
  box-shadow: var(--ps-shell-reflection);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board :is(button, .pt-project-card):focus-visible {
  outline: 2px solid var(--ps-focus);
  outline-offset: 2px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board button:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board .pt-project-card[onclick=""] {
  cursor: default;
  border-style: dashed;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board :is(.pt-empty, .pt-folder-empty) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
  color: var(--ps-muted);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerRoot > .pt-page > .pt-board :is(.pt-project-placeholder, .pt-folder-placeholder) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-gold);
  box-shadow: inset 0 0 0 1px var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerModal[data-ps-tracker-portal="folder-edit"] .pt-modal-danger-zone {
  background: #321b20;
  border-color: #95545e;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerModal[data-ps-tracker-portal="folder-edit"] .pt-modal-danger-zone h3 {
  color: #ffaaaa;
  line-height: 20px;
}

/* Keep the new dialogs' native control boxes and color-swatch alignment at
   their historical metrics; Plex's normal line box is otherwise 2px taller. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerModal:is([data-ps-tracker-portal="folder-edit"], [data-ps-tracker-portal="move-area"]) :is(input, select, button) {
  line-height: 16px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerModal:is([data-ps-tracker-portal="folder-edit"], [data-ps-tracker-portal="move-area"]) .pt-modal-header h3 {
  line-height: 21px;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #productionTrackerModal[data-ps-tracker-portal="folder-edit"] :is(.pt-color-swatch, .pt-color-preset) {
  border-color: var(--ps-line-strong);
  box-shadow: none;
}
