/* The chart's room-state colours and property-map fills stay the same in both
 * themes. Dark colours apply to the surrounding workspace and controls only.
 */
:root {
  --plot-text: #5c6c65;
  --plot-grid: #dce1d7;
  --plot-sample: #286b57;
  --plot-wall: #a97930;
}
:root[data-app-theme="dark"] {
  color-scheme: dark;
  --paper: #111b20;
  --panel: #17252b;
  --ink: #e2ece7;
  --muted: #b0c1b8;
  --line: #3c5054;
  --green: #8bd7b4;
  --green-dark: #ade7cb;
  --soft: #23373b;
  --gold: #e8bf73;
  --plot-text: #b0c1b8;
  --plot-grid: #3c5054;
  --plot-sample: #8bd7b4;
  --plot-wall: #e8bf73;
  color: var(--ink);
  background: var(--paper);
}
html[data-app-theme="dark"] body {
  background: var(--paper);
  color: var(--ink);
}
html[data-app-theme="dark"]
  :is(input[type="number"], input[type="search"], select, textarea, option) {
  background: #101e25;
  color: var(--ink);
  border-color: #607a7b;
}
html[data-app-theme="dark"] input::placeholder,
html[data-app-theme="dark"] textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
html[data-app-theme="dark"] .search-field input,
html[data-app-theme="dark"] .colour-field select {
  background: transparent;
}
html[data-app-theme="dark"] :focus-visible {
  outline-color: #91c9f1;
}
html[data-app-theme="dark"] .brand-mark {
  background: #2c5548;
  color: #eef8f0;
}
html[data-app-theme="dark"] :is(.secondary-button, .play-button) {
  background: #276b52;
  border-color: #4e9b7c;
  color: #f3fff8;
}
html[data-app-theme="dark"] :is(.secondary-button, .play-button):hover {
  background: #327e61;
}
html[data-app-theme="dark"] :is(.list-element, .skip-link) {
  background: var(--panel);
  color: var(--ink);
}
html[data-app-theme="dark"] .element-summary {
  color: #c8d8ce;
}
html[data-app-theme="dark"] :is(.heat-flow, .model-caption, .noscript) {
  background: #203438;
  color: var(--ink);
}
html[data-app-theme="dark"] .heating-status.limited {
  color: #f2c485;
}
html[data-app-theme="dark"] .series-placeholder {
  background: #203137;
  border-color: #607d73;
  color: var(--muted);
}
html[data-app-theme="dark"] .identity-tile {
  color: #1d3831;
}
html[data-app-theme="dark"] .state-key-items {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f4f3ed;
}
html[data-app-theme="dark"] .orbital-box {
  background: #203b31;
  border-color: #658c78;
  color: #e4f6e9;
}
html[data-app-theme="dark"] .orbital-row.valence .orbital-box {
  background: #30543e;
  border-color: #83bda0;
}
html[data-app-theme="dark"] :is(.photo-open, #photo-large) {
  background: #101b20;
}
html[data-app-theme="dark"]
  :is(.advanced-controls[open], .chart-details[open], dialog) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 16px 55px #0006;
}
html[data-app-theme="dark"] dialog::backdrop {
  background: #050c10a6;
}
html[data-app-theme="dark"] .toast {
  background: #254d3f;
  color: #edfff2;
  border: 1px solid #558b70;
}
html[data-app-theme="dark"] :is(.atom-visual, .energy-level-graph) svg text {
  fill: var(--muted);
}
html[data-app-theme="dark"] .energy-level-graph svg text[fill="#755b29"] {
  fill: #e8bf73;
}
html[data-app-theme="dark"] .energy-level-graph svg line[stroke="#d8dfd4"] {
  stroke: #405651;
}
html[data-app-theme="dark"] .energy-level-graph svg line[stroke="#286b57"] {
  stroke: #8bd7b4;
}
html[data-app-theme="dark"] .energy-level-graph svg line[stroke="#9d7b3b"] {
  stroke: #e8bf73;
}
html[data-app-theme="dark"] .energy-level-graph svg rect[fill="#e8e4d5"] {
  fill: #514832;
}
html[data-app-theme="dark"] .energy-level-graph svg path[stroke="#b4beb2"] {
  stroke: #7d9184;
}
html[data-app-theme="dark"] [data-site-legal],
html[data-app-theme="dark"] [data-site-legal] details {
  color: var(--ink) !important;
}
html[data-app-theme="dark"] [data-site-legal] details {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}
html[data-app-theme="dark"] [data-site-legal] a {
  color: var(--green-dark) !important;
}
html[data-app-theme="dark"] .sn-account-link {
  border: 1px solid #7d69ae;
}
