/* The native theme owns the light/dark choice. Scope the palette to the live
   app so the reference lab keeps its original swatches and examples. */
html[data-aim-local] {
  --rc-signal: var(--rc-ocean);
  --rc-signal-hover: var(--rc-ocean-hover);
  --rc-signal-text: var(--rc-ocean-text);
  --rc-ice: var(--rc-ocean-text);
}
html[data-aim-local]:not(:has(.hall-root.hall-light, .al-studio-shell.hall-light, .al-guide.hall-light, .al-rv.hall-light)) {
  --rc-paper: var(--rc-night);
  --rc-paper-raise: var(--rc-night-2);
  --rc-paper-sunk: var(--rc-night-3);
  --rc-ink: var(--rc-night-text);
  --rc-ink-soft: var(--rc-night-text-soft);
  --rc-slate: var(--rc-night-muted);
  --rc-rule: var(--rc-night-rule);
  --rc-rule-strong: var(--rc-night-rule-strong);
  --rc-signal-text: var(--rc-night-signal-text);
  --rc-ice: var(--rc-night-ice);
  --rc-selection-fill: var(--rc-night-3);
  --rc-selection-text: var(--rc-night-text);
  --rc-danger: var(--rc-night-danger);
  --rc-color-scheme: dark;
}
html[data-aim-local],
html[data-aim-local] :is(.hall-root, .hall-portal, .al-guide, .al-rv, .al-studio-shell, .pw-stage) {
  --aim-focus: var(--rc-ice);
  color-scheme: var(--rc-color-scheme) !important;
}

/* Inverted artwork labels retain their own palette in either theme. */
html[data-aim-local] .rc-map-browser .al-wk-feat {
  background: var(--rc-night);
  border-color: var(--rc-rule-strong);
  color: var(--rc-night-text);
}
html[data-aim-local] .rc-map-browser .al-wk-feat h2,
html[data-aim-local] .rc-map-browser .al-wk-feat .al-wk-tchip { color: var(--rc-night-text); }
html[data-aim-local] .rc-map-browser .al-wk-card-no,
html[data-aim-local] .pw-stage .pw-inf-sq {
  background: var(--rc-night-2);
  color: var(--rc-night-text);
}

html[data-aim-local] .rc-map-browser .al-wk-chip.al-wk-on,
html[data-aim-local] .rc-map-browser .al-wk-toggle.is-on,
html[data-aim-local] .rc-site-options button[aria-pressed="true"],
html[data-aim-local] :is(.hall-segment, .hall-choice-options, .hall-crosshair-tabs, .pw-shelf-tabs) button:is(.is-active, .is-on, [aria-pressed="true"]),
html[data-aim-local] .aim-account-panel .aim-account-tabs button.is-active {
  background: var(--rc-selection-fill) !important;
  color: var(--rc-selection-text) !important;
  border-color: var(--rc-signal);
}
html[data-aim-local] .al-studio-shell .al-tl-zoom button.is-on,
html[data-aim-local] .al-studio-shell .al-tl-rec {
  background: var(--rc-selection-fill);
  color: var(--rc-selection-text);
  border-color: var(--rc-rule-strong);
}
/* Unslop typography: Damir Sokolovsky (@heydamir), CC BY 4.0.
   https://github.com/heydamir/unslop */
html[data-aim-local] .al-studio-shell .al-studio-workspace button.pwb-main {
  background: var(--rc-signal);
  color: var(--rc-on-signal);
  border: 0;
  border-radius: var(--rc-r) !important;
  clip-path: var(--rc-cut-path) !important;
  font: 700 var(--rc-fs-15)/1.2 var(--rc-font-condensed) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--rc-on-signal) 24%, transparent);
}
html[data-aim-local] .aim-account-panel .aim-account-link { color: var(--rc-ice); }
html[data-aim-local] .aim-account-panel .aim-account-close {
  border-radius: var(--rc-r-small);
  background: var(--rc-paper-sunk);
  color: var(--rc-ink);
}
html[data-aim-local] .aim-account-panel :is(input, select):focus { border-color: var(--rc-ice); }
html[data-aim-local] .hall-topnav .aim-local-actions .aim-account-button {
  background: var(--rc-selection-fill);
  color: var(--rc-selection-text) !important;
  border-color: var(--rc-rule-strong);
}
html[data-aim-local] .aim-local-actions .aim-performance-button::after {
  background: var(--rc-signal);
  color: var(--rc-on-signal);
}
html[data-aim-local] .rc-map-choice[aria-pressed="true"] { border-color: var(--rc-signal); }
html[data-aim-local] :is(input, textarea)::placeholder { color: var(--rc-slate); opacity: 1; }
