/* CamuflaAds official identity · tool chrome only.
   User media, canvas pixels, imported-page iframes, caption styles and export
   content are deliberately excluded. This file contains no processing rules. */

html[data-color-mode] :is(.ve-surface,.ve-dialog) {
  --ve-bg:var(--brand-bg);
  --ve-panel:var(--brand-surface);
  --ve-line:var(--brand-border);
  --ve-text:var(--brand-text);
  --ve-muted:var(--brand-muted);
  --ve-accent:var(--brand-primary);
  color:var(--brand-text);
}
html[data-color-mode] :is(.pg-surface,.pg-dialog) {
  --pg-panel:var(--brand-surface);
  --pg-line:var(--brand-border);
  --pg-muted:var(--brand-muted);
  color:var(--brand-text);
}
html[data-color-mode] :is(.rt-surface,.rt-dialog) {
  --rt-bg:var(--brand-surface);
  --rt-line:var(--brand-border);
  --rt-muted:var(--brand-muted);
  color:var(--brand-text);
}
html[data-color-mode] :is(.cc-surface,.cc-dialog) {
  --cc-bg:var(--brand-bg);
  --cc-card:var(--brand-surface);
  --cc-card-solid:var(--brand-surface);
  --cc-line:var(--brand-border);
  --cc-fg:var(--brand-text);
  --cc-muted:var(--brand-muted);
  --cc-soft:var(--brand-raised);
}
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace) {
  --pt-panel:var(--brand-surface);
  --pt-raised:var(--brand-raised);
  --pt-border:var(--brand-border);
  --pt-text:var(--brand-text);
  --pt-muted:var(--brand-muted);
}

/* Neutral, quiet work surfaces leave the actual creative in charge. */
html[data-color-mode] :is(.ve-panel,.ve-project-card,.ve-inspector,.ve-media-panel,
  .ve-timeline-panel,.pg-panel,.pg-project,.pg-pagebar,.pg-inspector,
  .rt-panel,.rt-link-card,.rt-domain-card,.rt-stat-panel,.rt-traffic-panel,
  .cc-stage,.cc-project-card,.cc-upload,.cc-setup,.cc-result,
  .media-settings,.media-preview-panel,.mw-panel) {
  background:var(--brand-surface)!important;
  color:var(--brand-text);
  border-color:var(--brand-border)!important;
}
html[data-color-mode] :is(.ve-panel-title,.ve-dock-heading,.ve-player-controls,
  .ve-timeline-tools,.ve-timeline-footer,.ve-bin-note,.ve-inspector-tabs,
  .ve-editor-tabs,.ve-track-labels,.ve-track-label,.ve-horizontal-gutter,
  .ve-ruler,.ve-timeline-hscroll-row,.pg-editor-heading,.pg-editor-toolbar,
  .pg-library-tabs,.pg-inspector-tabs,.pg-pagebar-footer,.pg-devices,
  .rt-panel-head,.rt-tabs,.cc-table th,.cc-tabs) {
  background:var(--brand-raised)!important;
  color:var(--brand-text)!important;
  border-color:var(--brand-border)!important;
  box-shadow:none;
}
html[data-color-mode] :is(.ve-dialog,.pg-dialog,.rt-dialog,.cc-dialog) {
  background:var(--brand-surface)!important;
  border-color:var(--brand-border)!important;
  color:var(--brand-text)!important;
  scrollbar-color:var(--brand-muted) transparent;
}
html[data-color-mode] :is(.ve-dialog,.pg-dialog,.rt-dialog,.cc-dialog)::backdrop {
  background:rgb(17 17 20 / .62);
}
html[data-color-mode] :is(.ve-dialog>header,.ve-dialog-actions,.pg-dialog-head,
  .pg-form-actions,.rt-dialog-heading,.rt-form-actions,.cc-dialog>header,
  .cc-dialog footer,.es-tabs,.es-caption,.es-style,.es-job,.es-silence) {
  border-color:var(--brand-border);
}

/* Primary actions keep white labels and the same pink while hovering. */
html[data-color-mode] :is(.ve-button.ve-primary,.pg-button.pg-primary,
  .rt-button.rt-primary,.cc-button.cc-primary,.ve-player-controls [data-ve-play]):not(:disabled) {
  background:var(--brand-primary)!important;
  border-color:var(--brand-primary)!important;
  color:var(--brand-on-primary)!important;
  box-shadow:none!important;
  filter:none;
  font-weight:700;
}
html[data-color-mode] :is(.ve-button.ve-primary,.pg-button.pg-primary,
  .rt-button.rt-primary,.cc-button.cc-primary,.ve-player-controls [data-ve-play]):hover:not(:disabled) {
  background:var(--brand-primary)!important;
  border-color:var(--brand-primary)!important;
  color:var(--brand-on-hover)!important;
  filter:none;
  transform:none;
}
html[data-color-mode] :is(.ve-button,.pg-button,.rt-button,.cc-button):not(.ve-primary):not(.pg-primary):not(.rt-primary):not(.cc-primary):not(.rt-danger) {
  color:var(--brand-text);
  border-color:var(--brand-border);
}
html[data-color-mode] :is(.ve-button,.pg-button,.rt-button,.cc-button):not(:disabled):not([aria-disabled=true]):focus-visible,
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,.rt-surface,.rt-dialog,.cc-surface,.cc-dialog,.media-workspace,.mw-panel)
  :is(a,input,select,textarea,summary,[tabindex]):focus-visible {
  outline:2px solid var(--brand-link)!important;
  outline-offset:3px;
}
html[data-color-mode] :is(.ve-import,.media-upload,.cc-drop):focus-within {
  outline:2px solid var(--brand-link)!important;
  outline-offset:4px;
}

/* Selection is represented by a small accent and a tinted neutral surface. */
html[data-color-mode] :is(.ve-editor-tabs .ve-button[aria-pressed=true],
  .ve-surface .ve-inspector-tabs>.ve-button[aria-selected=true],
  .es-tabs .ve-button[aria-pressed=true],.pg-devices>.pg-button[aria-pressed=true],
  .pg-library-tabs>.pg-button[aria-pressed=true],.pg-inspector-tabs>.pg-button[aria-pressed=true],
  .pg-mobile-panels>.pg-button[aria-pressed=true],.pg-tree-node.pg-selected,
  .pg-step.pg-selected,.rt-tabs .rt-button[aria-pressed=true],
  .rt-choice:has(input:checked),.rt-select-option:has(input:checked),
  .pg-template-options label:has(input:checked),.mw-file-row [aria-pressed=true]) {
  background:var(--brand-soft)!important;
  border-color:var(--brand-primary)!important;
  color:var(--brand-link)!important;
  box-shadow:inset 0 -2px 0 var(--brand-primary)!important;
}
html[data-color-mode] .ve-surface .ve-track-label.ve-lane-selected {
  background:var(--brand-soft)!important;
  color:var(--brand-link)!important;
  box-shadow:inset 3px 0 var(--brand-primary);
}
html[data-color-mode] :is(.ve-clip.ve-selected,.ve-preview-selection) {
  border-color:var(--brand-primary)!important;
  box-shadow:0 0 0 1px var(--brand-primary);
}
html[data-color-mode] .ve-preview-handle {
  background:var(--brand-primary);
  border-color:var(--brand-on-primary);
}
html[data-color-mode] :is(.ve-playhead,.ve-playhead>span,.ve-surface .ve-snap-guide) {
  background:var(--brand-primary)!important;
  box-shadow:none;
}
html[data-color-mode] :is(.ve-dock-target,.ve-drop-target,.ve-dragover,.cc-drag-over) {
  border-color:var(--brand-primary)!important;
}
html[data-color-mode] .ve-surface .ve-inspector-tabs>.ve-button {
  font-size:10px;
  font-weight:600;
}
html[data-color-mode] :is(.pg-widget-grid>.pg-button,.pg-tree-node,.rt-chip) {
  background:var(--brand-raised);
  border-color:var(--brand-border);
  color:var(--brand-text);
}
html[data-color-mode] .pg-widget-grid>.pg-button:hover {
  border-color:var(--brand-primary);
  background:var(--brand-soft);
  color:var(--brand-link);
  transform:none;
}
html[data-color-mode] .pg-widget-grid>.pg-button svg {color:inherit}

/* Canvas surroundings are UI; the iframe and all rendered contents are untouched. */
html[data-color-mode] .pg-editing .pg-canvas-zone {
  background-color:var(--brand-bg);
  background-image:radial-gradient(var(--brand-border) 1px,transparent 1px);
}
html[data-color-mode] :is(.pg-canvas-label,.pg-library-note,.pg-help,.pg-tip,
  .ve-inspector-note,.ve-note,.ve-bin-note,.ve-shortcut-note,.ve-save-state,
  .ve-project-intro,.rt-muted,.rt-note,.rt-filter-note,.cc-muted,.cc-retention) {
  color:var(--brand-muted);
}
html[data-color-mode] :is(.pg-field>span,.ve-field>span,.rt-field>span) {
  color:var(--brand-text);
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,
  .rt-surface,.rt-dialog,.cc-surface,.cc-dialog,.mw-panel)
  :is(input:not([type=color]):not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea) {
  background-color:var(--brand-bg)!important;
  border-color:var(--brand-border)!important;
  color:var(--brand-text)!important;
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,
  .rt-surface,.rt-dialog,.cc-surface,.cc-dialog,.mw-panel) select option {
  background:var(--brand-surface)!important;
  color:var(--brand-text)!important;
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,
  .rt-surface,.rt-dialog,.cc-surface,.cc-dialog,.mw-panel) :is(input,textarea)::placeholder {
  color:var(--brand-muted)!important;
  opacity:1;
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,
  .rt-surface,.rt-dialog,.cc-surface,.cc-dialog,.media-workspace,.mw-panel)
  :is(input[type=checkbox],input[type=radio],input[type=range]) {
  accent-color:var(--brand-primary);
}
html[data-color-mode] :is(.ve-surface,.ve-dialog) input[type=range]::-webkit-slider-thumb {
  background:var(--brand-primary);
  border:1px solid var(--brand-on-primary);
  width:12px;height:12px;
}
html[data-color-mode] :is(.ve-surface,.ve-dialog) input[type=range]::-moz-range-thumb {
  background:var(--brand-primary);
  border:1px solid var(--brand-on-primary);
  width:12px;height:12px;
}

/* Progress colors, selected chips and neutral chart axes in both themes. */
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,.rt-surface,.rt-dialog,.cc-surface,.cc-dialog) progress {
  accent-color:var(--brand-primary);
  background:var(--brand-border);
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,.rt-surface,.rt-dialog,.cc-surface,.cc-dialog) progress::-webkit-progress-bar {
  background:var(--brand-border);
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,.rt-surface,.rt-dialog,.cc-surface,.cc-dialog) progress::-webkit-progress-value {
  background:var(--brand-primary);
}
html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,.rt-surface,.rt-dialog,.cc-surface,.cc-dialog) progress::-moz-progress-bar {
  background:var(--brand-primary);
}
html[data-color-mode] .cc-count {
  background:var(--brand-soft);
  color:var(--brand-link);
  border:1px solid var(--brand-border);
}
html[data-color-mode] .cc-example strong {color:var(--brand-link)}
html[data-color-mode] .rt-line-chart .rt-series-original {stroke:var(--brand-link)}
html[data-color-mode] .rt-line-chart .rt-series-alternative {stroke:var(--brand-muted)}
html[data-color-mode] .rt-chart-legend i {background:var(--brand-link)}
html[data-color-mode] .rt-chart-legend i.rt-alt {background:var(--brand-muted)}
html[data-color-mode] .rt-line-chart text {fill:var(--brand-muted)}
html[data-color-mode] .rt-line-chart .rt-chart-grid {stroke:var(--brand-border)}
html[data-color-mode] .rt-daily span {background:var(--brand-primary)}
html[data-color-mode] .rt-bar-row meter::-webkit-meter-optimum-value {background:var(--brand-primary)}
html[data-color-mode] .rt-bar-row meter::-moz-meter-bar {background:var(--brand-primary)}
html[data-color-mode] :is(.rt-public-url a,.rt-link-actions a:not(.rt-button),.pg-help a,.ve-note a,.cc-notice a:not(.cc-button)) {
  color:var(--brand-link);
  text-underline-offset:3px;
}

/* Media profiles remain recognizably locked when the plan does not include them. */
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace)
  :is(.profile,.media-profiles label,.format-option):has(input:checked):not([aria-disabled=true]) {
  background:var(--brand-soft)!important;
  border-color:var(--brand-primary)!important;
  box-shadow:inset 0 0 0 1px var(--brand-primary)!important;
}
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace)
  :is(.profile,.media-profiles label,.format-option):has(input:focus-visible) {
  outline:2px solid var(--brand-link)!important;
  outline-offset:4px;
}
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace)
  :is(.profile,.media-profiles label,.format-option):has(input:checked):not([aria-disabled=true]) {
  color:var(--brand-link)!important;
}
html[data-color-mode] #video-workspace .profile:has(input:checked):not([aria-disabled=true]) .radio-mark {
  background:var(--brand-primary)!important;border-color:var(--brand-primary)!important;
}
html[data-color-mode] #video-workspace .profile:has(input:checked):not([aria-disabled=true]) .radio-mark:after {
  background:var(--brand-on-primary)!important;
}
html[data-color-mode] :is(#video-workspace,.media-workspace) .green-toggle>input:checked:not(:disabled)+.green-switch {
  background:var(--brand-primary)!important;border-color:var(--brand-primary)!important;
}
html[data-color-mode] :is(#video-workspace,.media-workspace) .green-toggle>input:checked:not(:disabled)+.green-switch::after {
  background:var(--brand-on-primary)!important;
}
html[data-color-mode] :is(#video-workspace,.media-workspace) .green-levels input:checked:not(:disabled)+span {
  background:var(--brand-soft)!important;border-color:var(--brand-primary)!important;color:var(--brand-link)!important;
}
html[data-color-mode] :is(#video-workspace,.media-workspace) :is(.green-toggle>input:focus-visible+.green-switch,.green-levels input:focus-visible+span) {
  outline:2px solid var(--brand-link)!important;outline-offset:3px;
}
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace) progress::-webkit-progress-bar {
  background:var(--brand-border);
}
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace) progress::-webkit-progress-value {
  background:var(--brand-primary)!important;
}
html[data-color-mode] :is(#video-workspace,.media-workspace,#text-workspace) progress::-moz-progress-bar {
  background:var(--brand-primary)!important;
}
html[data-color-mode] :is(.media-upload.drag-over,.media-upload.has-file) {
  border-color:var(--brand-primary)!important;
}
html[data-color-mode] :is(.media-upload.drag-over,.ve-import:hover,.cc-drop.cc-drag-over) {
  background:var(--brand-soft)!important;
}
html[data-color-mode] :is(.media-range output,.ve-timecode strong) {color:var(--brand-link)}
html[data-color-mode] .audio-bars i {
  background:var(--brand-primary);
  opacity:.8;
}

/* Small screens retain independent panel/timeline scrolling and original dock order. */
@media(max-width:900px) {
  html[data-color-mode] :is(.pg-heading,.rt-heading,.ve-page-heading,.cc-head) {flex-wrap:wrap}
  html[data-color-mode] :is(.pg-actions,.rt-heading-actions,.ve-heading-actions,.cc-actions) {max-width:100%;gap:8px}
  html[data-color-mode] :is(.pg-dialog,.rt-dialog,.ve-dialog,.cc-dialog) {max-width:calc(100vw - 24px)}
  html[data-color-mode] .ve-surface[data-ve-view=editor]>.ve-editor-heading {
    grid-template-columns:auto minmax(80px,1fr) auto;
  }
}
@media(max-width:600px) {
  html[data-color-mode] :is(.pg-heading,.rt-heading,.ve-page-heading,.cc-head) {gap:18px}
  html[data-color-mode] :is(.pg-heading h1,.rt-heading h1,.ve-page-heading h1,.cc-head h1) {overflow-wrap:anywhere}
  html[data-color-mode] :is(.pg-dialog,.rt-dialog,.ve-dialog,.cc-dialog) {max-height:calc(100dvh - 24px)}
  html[data-color-mode] :is(.pg-actions,.rt-heading-actions,.cc-actions) > :is(button,a) {white-space:normal}
  html[data-color-mode] .cc-surface {padding-inline:0}
  html[data-color-mode] .es-actions .ve-field {min-width:0;flex-basis:100%}
  html[data-color-mode] :is(.rt-dns-value,.rt-public-url,.rt-destination,.pg-publication) {overflow-wrap:anywhere;min-width:0}
  /* Name and actions occupy separate rows instead of obscuring each other. */
  html[data-color-mode] .ve-surface[data-ve-view=editor]>.ve-editor-heading {
    grid-template-columns:auto minmax(0,1fr);
    grid-template-areas:"back name" "actions actions";
    height:auto;min-height:78px;gap:6px 10px;
  }
  html[data-color-mode] .ve-surface .ve-title-group {grid-area:back}
  html[data-color-mode] .ve-surface .ve-project-title {
    grid-area:name;justify-self:stretch;justify-content:flex-start;overflow:hidden;
  }
  html[data-color-mode] .ve-surface .ve-project-title strong {max-width:100%}
  html[data-color-mode] .ve-surface .ve-heading-actions {
    grid-area:actions;width:100%;justify-content:flex-end;gap:7px;flex-wrap:wrap;
  }
  html[data-color-mode] .pg-editing .pg-editor-heading {
    display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;
    height:auto;min-height:0;gap:8px;padding:10px 12px;
  }
  html[data-color-mode] .pg-editing .pg-editor-name {grid-column:1;grid-row:1;width:100%;gap:10px}
  html[data-color-mode] .pg-editing .pg-editor-name>div {flex:1;min-width:0}
  html[data-color-mode] .pg-editing .pg-project-title {
    display:block;width:100%;max-width:100%;font-size:13px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  html[data-color-mode] .pg-editing .pg-project-title svg {display:inline-block;vertical-align:middle;margin-left:8px}
  html[data-color-mode] .pg-editing .pg-editor-save {
    grid-column:1;grid-row:2;width:100%;justify-content:flex-end;gap:8px;flex-wrap:wrap;
  }
}
@media(prefers-reduced-motion:reduce) {
  html[data-color-mode] :is(.ve-surface,.ve-dialog,.pg-surface,.pg-dialog,.rt-surface,.rt-dialog,.cc-surface,.cc-dialog,.media-workspace,.mw-panel)
    :is(button,a,progress,.pg-progress-orbit,.rt-skeleton,.cc-loading,.pg-loading) {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}
