.top { gap: 8px; }
.top .actions { flex: none; flex-wrap: nowrap; }
.top .crumb { min-width: 0; }
.top .crumbPage { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.themeControl {
  --segment: 34px; --thumb: var(--butter);
  display: inline-grid; grid-template-columns: repeat(3, var(--segment));
  position: relative; isolation: isolate; padding: 3px; border: 1px solid var(--edge); border-radius: 30px;
  background: var(--pane); box-shadow: var(--shine); backdrop-filter: var(--frost);
}
.themeControl::before {
  content: ''; position: absolute; inset: 3px auto 3px 3px; width: var(--segment);
  border-radius: inherit; background: var(--thumb);
  box-shadow: inset 0 1px 0 #ffffffa6, 0 1px 4px #241d282b;
}
.themeControl:has([value="night"]:checked)::before { transform: translateX(100%); --thumb: var(--lilac); }
.themeControl:has([value="auto"]:checked)::before { transform: translateX(200%); --thumb: var(--ice); }
.themeChoice { display: grid; place-items: center; position: relative; height: 30px; border-radius: 30px; color: var(--muted); }
.themeChoice input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.themeChoice:hover { color: var(--ink); background: #9188951a; }
.themeChoice:has(:checked) { color: #27232d; }
.themeChoice:has(:checked) svg { stroke-width: 2.1; }
.themeChoice:has(:focus-visible) { outline: 2px solid currentColor; outline-offset: -2px; }
@media (prefers-reduced-motion: no-preference) {
  .themeControl::before { transition: transform .22s ease-out, background-color .18s; }
}
@media (forced-colors: active) {
  .themeChoice:has(:checked) { border: 2px solid Highlight; }
}
@media (max-width: 430px) {
  .themeControl { --segment: 29px; }
  .top .actions { gap: 4px; }
  .top .identity { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
  .top .identity span { overflow: hidden; text-overflow: ellipsis; }
}

:root[data-theme='day'] {
  color-scheme: light;
  --studio-backdrop: #efefed;
  --sidebar: rgb(249 249 247 / .45);
  --chrome: rgb(255 253 250 / .32);
  --pane: rgb(255 255 255 / .18);
  --floating-pane: rgb(253 253 253 / .32);
  --edge: rgb(66 51 55 / .18);
  --shine: 0 3px 12px #0000000a;
  --butter: #ffda66;
  --apricot: #ffcaab;
  --lilac: #e1d2f6;
  --ice: #c4e5ea;
  --day-ink: #302c32;
  --day-muted: #605860;
  --day-accent: #795517;
  --day-alert: #983f35;
  --day-wash: rgb(82 61 69 / .055);
}
[data-theme='day'] :is(.shell, #dialog, .boardShell .dock, .boardShell .notesRail, #boardMenu, #studioWelcome, #toast) {
  --ink: var(--day-ink); --muted: var(--day-muted); --line: var(--edge);
  color: var(--ink); color-scheme: light;
}
[data-theme='day'] :is(.side,.side .brand,.nav,.nav.active,.shell .textbtn,.tab),
[data-theme='day'] #dialog :is(.textbtn,.tab) { color: var(--day-ink); }
[data-theme='day'] :is(.sidecaption,.profile small,.top .crumbPage) { color: var(--day-muted); }
[data-theme='day'] :is(.brand span,.nav.active svg,#welcomeGreeting em,.welcomeDue) { color: var(--day-accent); }
[data-theme='day'] .nav.active { background: #ffffffc4; }
[data-theme='day'] :is(.nav:hover:not(.active),.tab:where(:not(.selected)):hover,.viewSwitch button:where(:not([aria-pressed="true"])):hover,.dirAction:hover,.top .iconbtn:hover,.identity:hover) { background: var(--day-wash); }
[data-theme='day'] .nav small { border-color: var(--edge); }
[data-theme='day'] .menuopen .side { background: var(--floating-pane); }
[data-theme='day'] .notif.unread::after { background: #b65b35; box-shadow: 0 0 0 2px #fff9f1; }
[data-theme='day'] :is(.shell .button,.shell select,.top .identity,.top .iconbtn),
[data-theme='day'] #dialog .button { background: #ffffff75; }
[data-theme='day'] :is(.shell .button:is(.dark,.lime)) { background: #39343a; color: #fffaf4; }
[data-theme='day'] .shell .button:is(.dark,.lime):hover { background: #524a51; color: white; }
[data-theme='day'] :is(.shell,#dialog,#studioWelcome) :focus-visible { outline-color: #855812; }
[data-theme='day'] .deliveryHero { background: var(--butter); border-color: #d7af635c; }
[data-theme='day'] .desk .metric { border-color: #60475220; }
[data-theme='day'] :is(.shell th,#dialog th,.boardShell .notesRail header) { background: var(--floating-pane); color: var(--day-muted); }
[data-theme='day'] .shell .queueWrap th[aria-sort] { color: var(--day-ink); }
[data-theme='day'] :is(.shell .itemrow:hover,#dialog .itemrow:hover) { background: var(--day-wash); }
[data-theme='day'] :is(.directoryArrow,.directoryGroup h2 small,.workFrame header span,.boardShell .notesRail summary small) { background: var(--day-wash); color: var(--day-ink); }
[data-theme='day'] :is(.directoryDelivery,.directoryDelivery.noPlan,.issueCard .issueDates,.projectTaskDeadline,.deadlineIcon,.phaseTools button,.boardShell .noteCounts) { background: var(--day-wash); }
[data-theme='day'] :is(.directoryMilestone > svg,.directoryClock,.projectTaskDeadline,.projectTaskCard .projectTaskTiming .workClock,.monthlyWork dd) { color: var(--day-accent); }
[data-theme='day'] :is(.shell .workClock.late,.shell .deleteAction,.directoryDelivery.late .directoryClock,.projectTaskCard .projectTaskTiming .workClock.late,.projectTaskDeadline:has(.late) .deadlineIcon,.welcomeDue.late,#dialog .error) { color: var(--day-alert); }
[data-theme='day'] .directoryStatus[data-status='Active']::before { background: #6d8154; }
[data-theme='day'] .directoryStatus[data-status='On hold']::before { background: #b77446; }
[data-theme='day'] .shell .phaseTile.current { background: var(--butter); }
[data-theme='day'] .shell .phaseTile.viewing { box-shadow: inset 0 3px #b48a45; }
[data-theme='day'] .galleryCard.isSelected { outline-color: var(--day-accent); }

[data-theme='day'] #dialog { box-shadow: 0 18px 60px #00000022; }
[data-theme='day'] #dialog::backdrop { background: #41414138; }
[data-theme='day'] :is(#dialog input,#dialog select,#dialog textarea):not([type=checkbox],[type=radio],[type=range],[type=color]),
[data-theme='day'] .shell .boardShell .dock select { background: var(--field-glass); border-color: #aba0aa; }
[data-theme='day'] #dialog ::placeholder { color: #736a73; }
[data-theme='day'] :is(#dialog input,.boardShell .penpanel input,.boardShell .notesRail input) { accent-color: var(--day-accent); }
[data-theme='day'] #dialog .button:is(.lime,.dark) { background: var(--butter); color: #382b17; border-color: #c8a45d; }
[data-theme='day'] #dialog .button.danger { background: #f6c7bb; color: #672f25; }
[data-theme='day'] :is(#dialog > header .iconbtn,.boardShell .wbtool:hover,#boardMenu button:enabled:hover,.boardShell .zoomlabel:hover) { background: var(--day-wash); }
[data-theme='day'] :is(.welcomeSubject small,.welcomeMast > span:last-child) { color: var(--day-muted); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme='day'] { --pane: #faf8f4; --floating-pane: #faf7f3; --sidebar: #eae5df; --chrome: #f2ede7; }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-theme='day'] { --pane: #faf8f4; --floating-pane: #faf7f3; --sidebar: #eae5df; --chrome: #f2ede7; }
}
