/* Voilà: exact Coral & Deep Navy palette; preserve the original gold logo. */
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode] {
  --ui-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --kv-signature-gradient: linear-gradient(135deg, #040061 0%, #00017D 55%, #166AD2 100%);
  --kv-action-gradient: linear-gradient(125deg, #00017D, #166AD2);
  --kv-message-gradient: linear-gradient(125deg, #00017D, #166AD2);
  --kv-selection-gradient: linear-gradient(110deg, #FE7D50, #CF5C47);
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode="light"] {
  --ink: #14243d; --muted: #4b607c; --muted-2: #536a87;
  --line: #cbd8e8; --paper: #eef3fa; --wash: #e7edf7;
  --panel: #ffffff; --panel-2: #f4f7fc; --thread-bg: #edf3fa;
  --accent: #224d83; --accent-2: #375f95; --accent-3: #166AD2; --accent-strong: #173c71;
  --bubble-in: #ffffff; --bubble-out: #00017D; --active-bg: #00017D; --active-ink: #ffffff;
  --avatar-bg: #dbe7f7; --avatar-ink: #1e416e;
  --new-bg: #dbe8fa; --new-ink: #14243d; --new-avatar-ink: #1e416e;
  --chip-bg: #e7eef8; --chip-line: #cbd8e8;
  --done-bg: #e7eef8; --done-line: #bacce3; --done-ink: #14243d;
  --media-bg: #040061; --hover-line: #166AD2; --focus-ring: rgba(22,106,210,.2);
  --kv-canvas: #edf3fa; --kv-chat-dot: rgba(35,72,120,.045);
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode="dark"] {
  --ink: #f2f6fd; --muted: #bbcce3; --muted-2: #a9bed9;
  --line: #344e72; --paper: #0e1b31; --wash: #091429;
  --panel: #14243e; --panel-2: #192d4b; --thread-bg: #040061;
  --accent: #afcffb; --accent-2: #a4c5f1; --accent-3: #94bdf7; --accent-strong: #d4e6ff;
  --bubble-in: #192d4b; --bubble-out: #00017D; --active-bg: #00017D; --active-ink: #ffffff;
  --avatar-bg: #223e62; --avatar-ink: #e5efff;
  --new-bg: #213b5d; --new-ink: #f2f6fd; --new-avatar-ink: #c1dafe;
  --chip-bg: #203654; --chip-line: #3c567a;
  --done-bg: #203654; --done-line: #3c567a; --done-ink: #f2f6fd;
  --media-bg: #081124; --hover-line: #85a9d9; --focus-ring: rgba(148,189,247,.28);
  --kv-canvas: #040061; --kv-chat-dot: rgba(164,197,241,.045);
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode] .conversation-rail {
  background: linear-gradient(160deg, var(--paper), var(--wash));
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode] .conversation-rail .rail-header {
  background: var(--kv-signature-gradient);
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode] .category-tab.active {
  background: var(--kv-action-gradient); color: #ffffff;
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode] .thread-pane .send-button:not(.is-scheduling) {
  background: var(--kv-action-gradient); color: #ffffff;
}
:root:is([data-theme-family="switchboard"], [data-theme-family="papyrus"])[data-theme-mode] .primary-inline-action {
  background: #00017D; border-color: #00017D; color: #ffffff;
}
:root[data-theme-family="papyrus"] .thread-pane .message-row.outbound:not(.failed):not(.warning):not(.search-target) .message-bubble {
  background: var(--kv-message-gradient); color: #ffffff;
}
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-pane .thread-header {
  border-top-color: #FE7D50; border-bottom-color: #344e72; box-shadow: 0 4px 24px rgba(9,20,41,.2);
}
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-header .thread-title-wrap { border-inline-start-color: #CF5C47; }
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .rail-header #newConversationButton { border-color: #FE7D50; }
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-header :is(.icon-button, .small-button):hover { border-color: #FE7D50; }
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .conversation-item.active:not(.selected):not(.swiping) {
  background: linear-gradient(110deg, #14243e, #203a60) padding-box, var(--kv-selection-gradient) border-box;
  box-shadow: 0 5px 22px rgba(9,20,41,.2);
}
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-pane .composer-input-row { background: #14243e; border-color: #344e72; }
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-pane .composer-input-row:focus-within { border-color: #94bdf7; }
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-pane .composer-text-wrap textarea { background: #040061; }
:root[data-theme-family="switchboard"][data-theme-mode="dark"] .thread-pane .transcribed-audio { background: #14243e; border-color: #344e72; }
.rail-header .kavenv-brand .kavenv-logo,
body.kavenv-login .kavenv-logo {
  object-fit: contain; padding: 0; background: transparent;
  border: 0; border-radius: 50%; box-shadow: 0 4px 18px rgba(0,0,0,.2);
}
.rail-header .kavenv-brand .kavenv-logo { width: 56px; height: 56px; flex-basis: 56px; }
body.kavenv-login .kavenv-logo { width: 112px; height: 112px; margin: 0 auto 22px; }
.rail-header .rail-actions { display: flex; flex-wrap: wrap; align-items: center; width: 100%; gap: 8px; }
.rail-header .voila-sign-out {
  margin-inline-start: auto; min-height: 44px; padding: 8px 12px;
  background: rgba(255,255,255,.09); color: #ffffff; border: 1px solid rgba(255,255,255,.38);
  border-radius: 12px; font-weight: 650; white-space: nowrap;
}
.rail-header .voila-sign-out:hover { background: rgba(255,255,255,.19); border-color: #ffffff; }
.rail-header .voila-sign-out:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.voila-thread-sign-out { display: none; min-height: 44px; }
body.kavenv-login { background: linear-gradient(135deg, #040061 0%, #00017D 55%, #166AD2 100%); }
body.kavenv-login main::before { background: linear-gradient(90deg, #FE7D50, #CF5C47); }
body.kavenv-login button:not(.secondary-button) { background: linear-gradient(125deg, #00017D, #166AD2); border-color: #166AD2; }
@media (prefers-color-scheme: dark) {
  body.kavenv-login { --panel: #12223c; --ink: #f2f6fd; --muted: #bbcce3; --line: #344e72; }
}
@media (max-width: 760px) {
  .voila-thread-sign-out { display: inline-flex; align-items: center; }
  .thread-pane .thread-header > .mobile-back-button { grid-column: 1; grid-row: 1; }
  .thread-pane .thread-header > .thread-title-wrap { grid-column: 2; grid-row: 1; }
  .thread-pane .thread-header > .voila-thread-sign-out { grid-column: 3; grid-row: 1; }
  .thread-pane .thread-header > .thread-actions { grid-column: 2 / 4; grid-row: 2; }
  .rail-header .rail-actions .icon-button { flex: 0 0 44px; }
  .rail-header .kavenv-brand h1 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .voila-sign-out { transition: none; }
}
@media (forced-colors: active) {
  .rail-header .voila-sign-out,
  :root[data-theme-family][data-theme-mode] .thread-header .voila-thread-sign-out {
    border: 1px solid ButtonText; color: ButtonText; background: ButtonFace;
  }
  :root[data-theme-family][data-theme-mode] :is(.conversation-rail, .conversation-rail .rail-header, .thread-pane .thread-header, .category-tab.active, .primary-inline-action),
  body.kavenv-login { background: Canvas; color: CanvasText; box-shadow: none; }
}
