/* Light is the default, independent of the operating system theme. */
:root {
  color-scheme: light;
  --canvas: #f6f7fb;
  --surface: #ffffff;
  --surface-raised: #f0eefb;
  --input-surface: #fafaff;
  --border: #e3e5ef;
  --border-strong: #d6d8e5;
  --text: #26243e;
  --text-secondary: #66677f;
  --action: #6844d8;
  --action-hover: #5531c1;
  --action-text: #6844d8;
  --action-soft: #eee8fd;
  --on-action: #ffffff;
  --activity: #188675;
  --activity-soft: #e2f6ed;
  --healthy: #22745d;
  --healthy-soft: #eef8f3;
  --healthy-border: #c4e8d8;
  --warning: #a76714;
  --warning-soft: #fff0e1;
  --danger: #b83d4d;
  --danger-solid: #b83d4d;
  --danger-soft: #fff0f1;
  --danger-border: #f1cbd0;
  --unique: #8054c7;
  --focus-ring: #8054d8;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #06152f;
  --surface: #081b3a;
  --surface-raised: #0b2348;
  --input-surface: #071831;
  --border: #203958;
  --border-strong: #345678;
  --text: #f1f6ff;
  --text-secondary: #a6b8d0;
  --action: #2864dc;
  --action-hover: #3578ff;
  --action-text: #79b0ff;
  --action-soft: #102e59;
  --on-action: #ffffff;
  --activity: #40d9e8;
  --activity-soft: #0b2d43;
  --healthy: #39e6a5;
  --healthy-soft: #0b2b30;
  --healthy-border: #245f53;
  --warning: #f1bc65;
  --warning-soft: #322c24;
  --danger: #ff929b;
  --danger-solid: #b63044;
  --danger-soft: #321e31;
  --danger-border: #733349;
  --unique: #c2acff;
  --focus-ring: #63a4ff;

}

button.themeToggle {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;min-height:44px;border:1px solid var(--border-strong);
  border-radius:10px;background:var(--surface);color:var(--text);
  font:500 14px/1.4 var(--body,system-ui,sans-serif);cursor:pointer;white-space:nowrap;
}
button.themeToggle:hover{background:var(--surface-raised);border-color:var(--action-text)}
button.themeToggle:focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}
.themeToggle .toLight{display:none}
:root[data-theme="dark"] .themeToggle .toLight{display:inline}
:root[data-theme="dark"] .themeToggle .toDark{display:none}
.themeToggle svg{width:18px;height:18px;flex:none}
.themeSaveStatus{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.loginTheme{position:absolute;right:28px;top:24px;z-index:2}
.present .themeToggle{position:fixed;left:1.4vw;bottom:1.4vh;z-index:6}
@media(max-width:760px){.loginTheme{right:16px;top:16px}.loginBrand{max-width:calc(100% - 135px)}.loginBrand>span{flex:none}.loginBrand{font-size:20px}.tableScreen .themeToggle{margin-left:auto}.mod .topIndicators{justify-content:flex-start}}
@media print{.themeToggle,.themeSaveStatus{display:none!important}}

/* Preserve the earlier light palette's lavender surfaces and semantic accents. */
@media screen {
:root:not([data-theme="dark"]) .loginStory{background:#ece6fc}
:root:not([data-theme="dark"]) .artTables i{border-color:#ece6fc}
:root:not([data-theme="dark"]) .ideaBubble.one{background:white;color:#7250b2}
:root:not([data-theme="dark"]) .ideaBubble.two{background:#d5efdf;color:#296448}
:root:not([data-theme="dark"]) .sidebar{background:white}
:root:not([data-theme="dark"]) .workspaceTop{background:white}
:root:not([data-theme="dark"]) .eventBadge{background:#f7f7fb}
:root:not([data-theme="dark"]) .mod .nav a[aria-current=page]{color:#6035cc;border-color:#eee8fd;box-shadow:inset 3px 0 #6844d8}
:root:not([data-theme="dark"]) .stat.violet>svg{background:#eee8fd;color:#7045cc}
:root:not([data-theme="dark"]) .stat.mint>svg{background:#e2f6ed;color:#238469}
:root:not([data-theme="dark"]) .stat.peach>svg{background:#fff0e1;color:#a46020}
:root:not([data-theme="dark"]) .stat.blue>svg{background:#e8efff;color:#3b6bc3}
:root:not([data-theme="dark"]) .heroNext{background:#f5f1fe;border:0;border-radius:12px;padding:18px}
:root:not([data-theme="dark"]) .heroNext h3{color:#6640b8}
:root:not([data-theme="dark"]) .mod .tally button.on{background:#6844d8;border-color:#6844d8;color:white}
:root:not([data-theme="dark"]) .mod .tally.teal button.on{background:#188675;border-color:#188675;color:white}
:root:not([data-theme="dark"]) .mod .tally.rust button.on{background:#b83d4d;border-color:#b83d4d;color:white}
:root:not([data-theme="dark"]) .mod button.stop:hover{background:#fce2e5;border-color:#b83d4d;color:#a32e3e}
:root:not([data-theme="dark"]) .tableScreen .tent{background:#ece5fc;color:#6037b2;border-color:#dfd2f5}
:root:not([data-theme="dark"]) .tableScreen .tent .num{color:#6037b2}
:root:not([data-theme="dark"]) .tableScreen .micCheck{background:#edf7f2;border-color:#d1e7db}
:root:not([data-theme="dark"]) .sheet .script{border-color:var(--border-strong)}
:root:not([data-theme="dark"]) .sheetBackdrop{background:#21182e55}
:root:not([data-theme="dark"]) .present .deck{background:var(--canvas)}
:root:not([data-theme="dark"]) .present .tally b.on{border-color:#b8a4e0}
}
@media(max-width:380px){.loginStory{padding-top:76px}.loginBrand{max-width:none}}
