/* Renderer-only foundation for all migrated product surfaces. */
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button { border-radius: var(--radius-control); background: var(--color-accent); color: var(--color-accent-foreground); font-size: var(--type-control); transition: background 150ms, border-color 150ms; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button[data-variant="secondary"] { background: var(--color-surface); border-color: var(--color-border-strong); color: var(--color-accent); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button[data-variant="ghost"] { color: var(--color-text-muted); background: transparent; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button[data-variant="destructive"] { background: var(--color-danger-bg); color: var(--color-danger); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button:hover:not(:disabled) { filter: none; background: var(--color-accent-hover); color: var(--color-accent-foreground); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button:is([data-variant="secondary"],[data-variant="ghost"]):hover:not(:disabled) { background: var(--color-selected); color: var(--color-accent); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button[data-variant="destructive"]:hover:not(:disabled) { background: var(--color-danger); color: var(--color-accent-foreground); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button:active:not(:disabled) { filter: none; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button:disabled { opacity: 1; background: var(--color-disabled); color: var(--color-disabled-text); border-color: var(--color-border); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-control { color-scheme: light; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-control-border); border-radius: var(--radius-control); font-size: var(--type-control); padding: var(--space-2) 10px; accent-color: var(--color-accent); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-control::placeholder { color: var(--color-text-subtle); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-label { color: var(--color-text-muted); font-size: var(--type-label); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-helper { display: block; color: var(--color-text-subtle); font-size: var(--type-meta); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-field-error { display: block; color: var(--color-danger); font-size: var(--type-label); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-control[aria-invalid="true"] { border-color: var(--color-danger); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) :is(.ds-button,.ds-control,.ds-navigation-item,.ds-list-row,.ds-focus):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .publication-execution .ds-button:focus-visible { outline-color: var(--color-highlight); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-navigation-item { border-radius: var(--radius-control); font-size: var(--type-control); transition: background 150ms, border-color 150ms; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-navigation-item:hover:not(:disabled) { filter: none; background: var(--color-selected); color: var(--color-accent); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-navigation-item:disabled { opacity: 1; background: var(--color-disabled); color: var(--color-disabled-text); border-color: var(--color-border); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-list-row { border-radius: var(--radius-surface); font-size: var(--type-control); transition: background 150ms, border-color 150ms; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-list-row:hover:not(:disabled) { filter: none; background: var(--color-selected); color: var(--color-accent); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-list-row:disabled { opacity: 1; background: var(--color-disabled); color: var(--color-disabled-text); border-color: var(--color-border); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-status[data-tone="unknown"] { color: var(--color-unknown); background: var(--color-unknown-bg); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-alert[data-tone="danger"] { color: var(--color-danger); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-alert[data-tone="warning"] { color: var(--color-warning); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-alert[data-tone="info"] { color: var(--color-info); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button[data-emphasis="context"]:not(:disabled) { background: var(--color-highlight); color: var(--color-context); border-color: var(--color-highlight); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-button[data-emphasis="context"]:hover:not(:disabled) { background: var(--color-selected); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-status { color: var(--color-text-muted); background: var(--color-selected); border: 0; padding: var(--space-1) var(--space-2); font-size: var(--type-meta); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-status[data-tone="success"] { color: var(--color-success); background: var(--color-success-bg); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-status[data-tone="warning"] { color: var(--color-warning); background: var(--color-warning-bg); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-status[data-tone="danger"] { color: var(--color-danger); background: var(--color-danger-bg); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-status[data-tone="info"] { color: var(--color-info); background: var(--color-info-bg); }
/* Compact destructive action had a smaller target in the approved pilot. */
.app-shell[data-visual-pilot] :where([data-ds-scope]) .project-list-row > .ds-button { min-height: 24px; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-icon-button { min-height: 24px; }
/* Section/layout consumers retain their measured geometry. */
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-surface[data-surface="surface"] { background: var(--color-surface); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-surface[data-surface="muted"] { background: var(--color-surface-muted); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-surface[data-surface="elevated"] { background: var(--color-surface-elevated); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-surface[data-surface="context"] { background: var(--color-context); color: var(--color-accent-foreground); }
@media (prefers-reduced-motion:reduce) { .app-shell[data-visual-pilot] :where([data-ds-scope]) :is(.ds-button,.ds-control,.ds-navigation-item,.ds-list-row) { transition: none; } }

.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-divider { border-bottom: 1px solid var(--color-border); }

/* Native checkbox and reusable flat collections; first consumers: Dashboard filters/results. */
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-checkbox { accent-color: var(--color-accent); width: var(--space-4); height: var(--space-4); margin: var(--space-1); flex: none; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-checkbox:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-collection { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-collection-row { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-collection-row:last-child { border-bottom: 0; }

/* Shared P2 publication family: TikTok and Instagram. Exact approved geometry retained. */
.app-shell[data-visual-pilot] .publication-product-surface { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 0; border: 0; border-radius: 0; background: var(--color-surface); color: var(--color-text); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-header { flex-shrink: 0; padding: var(--space-4) 18px var(--space-3); gap: var(--space-3); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-header > div:first-child { min-width: 0; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-header h2 { font-size: var(--type-object); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--color-text); }
.app-shell[data-visual-pilot] .publication-product-surface .eyebrow { color: var(--color-text-subtle); font-size: var(--type-meta); letter-spacing: 1.1px; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-updated { color: var(--color-text-subtle); font-size: var(--type-meta); margin: var(--space-1) 0 0; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-header-actions { flex-shrink: 0; align-self: start; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-editor-scroll { flex: 1; min-height: 0; overflow: auto; scroll-padding: var(--space-2); padding: var(--space-4) 18px; display: grid; align-content: start; gap: var(--space-4); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-list { display: flex; gap: var(--space-2); min-height: 80px; max-height: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: var(--space-2); scroll-padding: var(--space-2); background: transparent; border: 0; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-list-heading { position: static; flex: 0 0 90px; align-self: center; background: transparent; color: var(--color-text-muted); padding: 0; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-list-heading strong { font-size: var(--type-meta); }
.app-shell[data-visual-pilot] .publication-product-surface button.publication-item { scroll-margin: var(--space-2); flex: 0 0 190px; max-width: 190px; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-surface); color: var(--color-text); background: var(--color-surface-muted); }
.app-shell[data-visual-pilot] .publication-product-surface button.publication-item.selected { border-color: var(--color-border-strong); background: var(--color-selected); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-item-copy strong { font-size: var(--type-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-item-copy > span { font-size: var(--type-meta); color: var(--color-text-muted); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-content { border: 1px solid var(--color-border); border-radius: var(--radius-surface); padding: var(--space-4); gap: 10px; }
.app-shell[data-visual-pilot] .publication-product-surface :is(.publication-section-heading p,.technical-section p,.inline-feedback) { color: var(--color-text-muted); font-size: var(--type-label); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-content h3 { color: var(--color-text); font-size: var(--type-section); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-date-fields { grid-template-columns: minmax(0,1fr) minmax(75px,.7fr); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-date-fields label:last-child { grid-column: 1/-1; }
.app-shell[data-visual-pilot] .publication-product-surface .publication-execution { flex-shrink: 0; display: grid; gap: 6px; padding: 14px 18px; margin: 0 10px 10px; border: 0; border-radius: var(--radius-context); background: var(--color-context); color: var(--color-accent-foreground); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-execution h3 { color: var(--color-accent-foreground); font-size: var(--type-section); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-execution p { color: var(--color-context-muted); font-size: var(--type-label); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-technical-details { color: var(--color-text-muted); border-color: var(--color-border); }
.app-shell[data-visual-pilot] .publication-product-surface :is(.publication-technical-content,.technical-results pre) { color: var(--color-text); background: var(--color-surface-muted); }
.app-shell[data-visual-pilot] .publication-product-surface :is(dt,dd,.technical-state-grid dd,.technical-failure-grid dd) { color: var(--color-text-muted); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-list-state { background: var(--color-text-subtle); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-list-state-failed { background: var(--color-danger); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-list-state-scheduled { background: var(--color-success); }
@media (max-width:1100px) {
  .app-shell[data-visual-pilot] .publication-product-surface .publication-header { padding: var(--space-3); }
  .app-shell[data-visual-pilot] .publication-product-surface .publication-editor-scroll { padding: var(--space-3); }
  .app-shell[data-visual-pilot] .publication-product-surface .publication-execution { padding: var(--space-3); }
}

/* Shared overlays: existing native-cover dialog; local action menu in both planners. */
.app-shell[data-visual-pilot] .accessible-dialog[data-ds-scope] { box-sizing: border-box; color: var(--color-text); background: var(--color-surface-elevated); border-color: var(--color-border); border-radius: var(--radius-overlay); box-shadow: var(--shadow-overlay); padding: var(--space-4); max-height: calc(100dvh - var(--space-4) * 2); width: min(620px, calc(100vw - var(--space-4) * 2)); overflow: auto; overflow-wrap: anywhere; font-family: var(--font-ui); font-size: var(--type-control); }
.app-shell[data-visual-pilot] .accessible-dialog[data-ds-scope]::backdrop { background: var(--color-overlay); }
.app-shell[data-visual-pilot] .accessible-dialog[data-ds-scope] h2 { color: var(--color-text); font-size: var(--type-object); }
.app-shell[data-visual-pilot] .accessible-dialog[data-ds-scope] [data-dialog-close] { margin-top: var(--space-3); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-menu { position: fixed; right: auto; z-index: 30; box-sizing: border-box; width: min(244px, calc(100vw - var(--space-2) * 2)); max-height: calc(100dvh - var(--space-2) * 2); overflow: auto; display: grid; gap: var(--space-1); padding: var(--space-1); color: var(--color-text); background: var(--color-surface-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-overlay); box-shadow: var(--shadow-popover); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-menu [role=menuitem] { text-align: left; width: 100%; padding: var(--space-2); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .publication-menu-note { color: var(--color-text-muted); font-size: var(--type-meta); margin: var(--space-1) var(--space-2); }
.app-shell[data-visual-pilot] .publication-delete-dialog[data-ds-scope] { display: block; }
.app-shell[data-visual-pilot] .publication-delete-dialog[data-ds-scope]:not([open]) { display: none; }
.app-shell[data-visual-pilot] .publication-delete-dialog .publication-delete-icon { background: var(--color-danger-bg); color: var(--color-danger); margin-bottom: var(--space-3); }
.app-shell[data-visual-pilot] .publication-delete-dialog .publication-delete-copy { gap: var(--space-3); }
.app-shell[data-visual-pilot] .publication-delete-dialog .publication-delete-copy p:not(.ds-alert) { color: var(--color-text-muted); font-size: var(--type-control); }
.app-shell[data-visual-pilot] .publication-delete-dialog .publication-delete-actions { flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

.app-shell[data-visual-pilot] .publication-delete-dialog[data-ds-scope] .publication-delete-copy .ds-alert[data-tone="danger"] { color: var(--color-danger); background: var(--color-danger-bg); border-radius: var(--radius-control); padding: var(--space-2); }

/* Native fallback typography is shared; geometry and native browser measurement stay with consumers. */
.app-shell[data-visual-pilot] { color: var(--color-text); }
.app-shell[data-visual-pilot] :is(input,select,textarea) { color-scheme: light; color: var(--color-text); background: var(--color-surface); border-color: var(--color-control-border); }
.app-shell[data-visual-pilot] label { color: var(--color-text-muted); font-size: var(--type-label); }
.app-shell[data-visual-pilot] :is(small,.muted,.eyebrow) { color: var(--color-text-subtle); font-size: var(--type-meta); }
.app-shell[data-visual-pilot] :is(h2,h3) { color: var(--color-text); font-size: var(--type-section); }
.app-shell[data-visual-pilot] :is(button,a,summary,[tabindex],input,select,textarea):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.app-shell[data-visual-pilot] :is(.error,.workspace-feedback p) { color: var(--color-danger); }
.app-shell[data-visual-pilot] :is(.panel-heading p,.inline-feedback,.technical-details,.network-facts dt,.browser-placeholder strong) { color: var(--color-text-muted); font-size: var(--type-label); }
.app-shell[data-visual-pilot] :is(.operations-route,.inspector-content,.browser-panel,.browser-section) { background: var(--color-surface); color: var(--color-text); font-family: var(--font-ui); font-size: var(--type-control); }
.app-shell[data-visual-pilot] .publication-product-surface .publication-item span { opacity: 1; }
.app-shell[data-visual-pilot] .publication-product-surface button.publication-item:hover:not(:disabled) { background: var(--color-selected); color: var(--color-text); }
.app-shell[data-visual-pilot] :where([data-ds-scope]) .ds-control:disabled { background: var(--color-disabled); color: var(--color-disabled-text); }
