/* FREMZO local visual trial: resource-muted-20261019.
   Independent of the Gantt trial; remove its marked index.html link to undo.
   Normal work retains project/person identity. No task types or data change. */
@media screen {
 :root {
  --resource-trial-wash:#f3f6f2;--resource-trial-tint:43%;
  --resource-trial-ink:#102a33;--resource-trial-ink2:#4b625d;
  --resource-trial-card:#fff;--resource-trial-label:#f3f6f2;--resource-trial-head:#eef3ef;
  --resource-trial-line:#cedbd3;--resource-trial-grid:#e2e9e3;--resource-trial-period:#95a89b;
  --resource-trial-weekend:#f0f3ef;--resource-trial-today:#1d694b;--resource-trial-today-head:#e4f2e8;--resource-trial-today-cell:#f5f9f3;
 }
 /* Slightly mute each original hue, keeping it recognisable in both lenses. */
:is(#v-tavla,#v-project .pb-layout) .tw-bubble.work:not(.overtime):not(.unavailable-work) {
  --resource-trial-source:color-mix(in srgb,var(--task-accent,#527a82) 78%,#6e867a);
  background:color-mix(in srgb,var(--resource-trial-source) var(--resource-trial-tint),var(--resource-trial-wash));
  color:var(--resource-trial-ink);box-shadow:none;
 }
 :is(#v-tavla,#v-project .pb-layout) .tw-bubble.work:not(.overtime):not(.unavailable-work):not(.conflict):not(.needs-replacement):not(.invalid) {
  border-color:color-mix(in srgb,var(--resource-trial-source) 62%,var(--resource-trial-wash));
 }
 :is(#v-tavla,#v-project .pb-layout) .tw-bubble.work:not(.overtime):not(.unavailable-work) small {color:var(--resource-trial-ink2)}
 #v-project .pb-layout :is(.tw-scale,.tw-pan) input[type=range] {accent-color:var(--resource-trial-today)}
}
/* Calendar backgrounds retain the existing dark theme. */
@media screen {
 :where(:root[data-theme=light]) #v-tavla {
  --tv-canvas:var(--resource-trial-card);--tv-label-surface:var(--resource-trial-label);
  --tv-calendar-surface:var(--resource-trial-head);--tv-group-surface:var(--resource-trial-head);
  --tv-weekend-surface:var(--resource-trial-weekend);--tv-grid-line:var(--resource-trial-grid);
  --tv-row-divider:var(--resource-trial-line);--tv-period:var(--resource-trial-period);
  --tv-today-surface:var(--resource-trial-today-cell);--tv-today-head:var(--resource-trial-today-head);
 }
 :where(:root[data-theme=light]) #v-project .pb-layout {
  --pw-card:var(--resource-trial-card);--pw-board:var(--resource-trial-label);--pw-soft:var(--resource-trial-head);
  --pw-line:var(--resource-trial-line);--pw-head:var(--resource-trial-head);--pw-period:var(--resource-trial-period);
  --pw-head-ink:var(--resource-trial-ink2);--pw-ink:var(--resource-trial-ink);--pw-ink2:var(--resource-trial-ink2);
  --card:var(--resource-trial-card);--board:var(--resource-trial-label);--soft:var(--resource-trial-head);
  --line:var(--resource-trial-line);--pt-head:var(--resource-trial-head);--pt-period:var(--resource-trial-period);
  --pt-head-ink:var(--resource-trial-ink2);--ink:var(--resource-trial-ink);--ink2:var(--resource-trial-ink2);
 }
 :where(:root[data-theme=light]) :is(#v-tavla,#v-project .pb-layout) .tw-date.today {background:var(--resource-trial-today-head);box-shadow:inset 0 3px var(--resource-trial-today)}
 :where(:root[data-theme=light]) #v-project .pb-layout .tw-day.weekend:not(.has-full-health-absence):not(.has-partial-absence):not(.has-overtime) {background:var(--resource-trial-weekend)}
 :where(:root[data-theme=light]) #v-project .pb-layout .tw-day {border-right-color:var(--resource-trial-grid)}
 :where(:root[data-theme=light]) #v-project .pb-layout .tw-day.fag-in-period {border-top-color:var(--resource-trial-period);border-bottom-color:var(--resource-trial-period)}
 :where(:root[data-theme=light]) #v-project .pb-layout .tw-day.fag-period-start {border-left-color:var(--resource-trial-period)}
 :where(:root[data-theme=light]) #v-project .pb-layout .tw-day.fag-period-end {border-right-color:var(--resource-trial-period)}
}
@media screen and (prefers-color-scheme:light) {
 :where(:root:not([data-theme=dark])) #v-tavla {
  --tv-canvas:var(--resource-trial-card);--tv-label-surface:var(--resource-trial-label);
  --tv-calendar-surface:var(--resource-trial-head);--tv-group-surface:var(--resource-trial-head);
  --tv-weekend-surface:var(--resource-trial-weekend);--tv-grid-line:var(--resource-trial-grid);
  --tv-row-divider:var(--resource-trial-line);--tv-period:var(--resource-trial-period);
  --tv-today-surface:var(--resource-trial-today-cell);--tv-today-head:var(--resource-trial-today-head);
 }
 :where(:root:not([data-theme=dark])) #v-project .pb-layout {
  --pw-card:var(--resource-trial-card);--pw-board:var(--resource-trial-label);--pw-soft:var(--resource-trial-head);
  --pw-line:var(--resource-trial-line);--pw-head:var(--resource-trial-head);--pw-period:var(--resource-trial-period);
  --pw-head-ink:var(--resource-trial-ink2);--pw-ink:var(--resource-trial-ink);--pw-ink2:var(--resource-trial-ink2);
  --card:var(--resource-trial-card);--board:var(--resource-trial-label);--soft:var(--resource-trial-head);
  --line:var(--resource-trial-line);--pt-head:var(--resource-trial-head);--pt-period:var(--resource-trial-period);
  --pt-head-ink:var(--resource-trial-ink2);--ink:var(--resource-trial-ink);--ink2:var(--resource-trial-ink2);
 }
 :where(:root:not([data-theme=dark])) :is(#v-tavla,#v-project .pb-layout) .tw-date.today {background:var(--resource-trial-today-head);box-shadow:inset 0 3px var(--resource-trial-today)}
 :where(:root:not([data-theme=dark])) #v-project .pb-layout .tw-day.weekend:not(.has-full-health-absence):not(.has-partial-absence):not(.has-overtime) {background:var(--resource-trial-weekend)}
 :where(:root:not([data-theme=dark])) #v-project .pb-layout .tw-day {border-right-color:var(--resource-trial-grid)}
 :where(:root:not([data-theme=dark])) #v-project .pb-layout .tw-day.fag-in-period {border-top-color:var(--resource-trial-period);border-bottom-color:var(--resource-trial-period)}
 :where(:root:not([data-theme=dark])) #v-project .pb-layout .tw-day.fag-period-start {border-left-color:var(--resource-trial-period)}
 :where(:root:not([data-theme=dark])) #v-project .pb-layout .tw-day.fag-period-end {border-right-color:var(--resource-trial-period)}
}
@media screen and (prefers-color-scheme:dark) {
 :root:not([data-theme=light]) {
  --resource-trial-wash:#263130;--resource-trial-tint:65%;
  --resource-trial-ink:#f0f5f1;--resource-trial-ink2:#d3e0d9;
  --resource-trial-card:#232c2c;--resource-trial-label:#293530;--resource-trial-head:#2b3734;
  --resource-trial-line:#46564f;--resource-trial-grid:#35443d;--resource-trial-period:#819b8c;
  --resource-trial-weekend:#2b3631;--resource-trial-today:#a4c888;--resource-trial-today-head:#304639;--resource-trial-today-cell:#28362e;
 }
}
@media screen {
 :root[data-theme=dark] {
  --resource-trial-wash:#263130;--resource-trial-tint:65%;
  --resource-trial-ink:#f0f5f1;--resource-trial-ink2:#d3e0d9;
  --resource-trial-card:#232c2c;--resource-trial-label:#293530;--resource-trial-head:#2b3734;
  --resource-trial-line:#46564f;--resource-trial-grid:#35443d;--resource-trial-period:#819b8c;
  --resource-trial-weekend:#2b3631;--resource-trial-today:#a4c888;--resource-trial-today-head:#304639;--resource-trial-today-cell:#28362e;
 }
}

/* The new/edit project palette previews the same screen tone as normal work.
   Inline accent values remain unchanged for saving and for disabling the trial. */
@media screen {
 .project-color-field .project-color-chip,.project-color-field .project-color-preview {
  --resource-trial-source:color-mix(in srgb,var(--task-accent) 78%,#6e867a);
  background:color-mix(in srgb,var(--resource-trial-source) var(--resource-trial-tint),var(--resource-trial-wash))!important;
 }
 .project-color-field .project-color-chip {box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--resource-trial-source) 62%,var(--resource-trial-wash))}
 .project-color-field .project-color-preview {
  --task-accent:var(--project-preview);
  border-color:color-mix(in srgb,var(--resource-trial-source) 62%,var(--resource-trial-wash));
  color:var(--resource-trial-ink);
 }
}

/* Daily distribution is resource-centric, so normal work identifies its project,
   with the same tone as Ressursplan -> Personer and the project colour picker. */
@media screen {
 .hour-plan-sheet .hour-editor-block.work:not(.overtime) {
  --resource-trial-source:color-mix(in srgb,var(--task-accent,#527a82) 78%,#6e867a);
  background:color-mix(in srgb,var(--resource-trial-source) var(--resource-trial-tint),var(--resource-trial-wash))!important;
  color:var(--resource-trial-ink)!important;
  border:1px solid color-mix(in srgb,var(--resource-trial-source) 62%,var(--resource-trial-wash));
 }
}
