@keyframes rgb-stream {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}
@keyframes rgb-dialog-in {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
body[data-rgb='flow'] dialog[open] {
  animation: rgb-dialog-in 160ms ease-out;
}
body {
  --rgb-palette: #00dfb2, #00b7ff, #604dff, #e533ef, #ff456b, #ffcb38, #00dfb2;
  --rgb-duration: 2.8s;
  --rgb-intensity: 0.95;
  --rgb-width: 2.5px;
  --rgb-direction: normal;
  --rgb-movement: rgb-stream;
  --rgb-rhythm: rgb-steady;
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  body:not([data-rgb='off']) .personal-wordmark {
    background-image: linear-gradient(90deg, var(--rgb-palette));
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
  body:not([data-rgb='off'], [data-rgb='static']) .personal-wordmark.rgb-text-running {
    animation: rgb-stream var(--rgb-duration) linear infinite;
  }
}
@media (forced-colors: active) {
  body[data-rgb] .personal-wordmark {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
}
.rgb-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 12px 0;
}
.rgb-settings small {
  flex-basis: 100%;
  color: var(--muted);
}
.rgb-settings select {
  width: auto;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
:where(body:not([data-rgb='off']) .rgb-position) {
  position: relative;
}
:where(body:not([data-rgb='off']) button.rgb-surface) {
  border-radius: 8px;
}
body:not([data-rgb='off']) :is(.input-wrap, .payment-input-row) {
  border-radius: 8px;
}
body:not([data-rgb='off']) :is(button, .cell-tag, .sync-pill, .stat-icon).rgb-surface::after {
  opacity: 0.85;
  padding: 1.5px;
}
body:not([data-rgb='off'])
  :is(button:focus-visible, .nav-item.active, [aria-pressed='true']).rgb-surface::after {
  opacity: 0.95;
  padding: 2px;
}
body:not([data-rgb='off'])
  :is(
    button:disabled,
    [aria-disabled='true'],
    .warning,
    .review-badge,
    .import-review-badge,
    .voice.listening
  ).rgb-surface::after {
  opacity: 0 !important;
  animation: none !important;
}
body:not([data-rgb='off']) :is(button, .nav-item):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
body:not([data-rgb='off']) .nav-item.active {
  box-shadow: inset 4px 0 0 var(--green);
  font-weight: 800;
}
body:not([data-rgb='off']) .field.rgb-surface {
  border-radius: 12px;
  padding: 12px;
  background: var(--white);
}
body.dark:not([data-rgb='off']) .field.rgb-surface {
  background: var(--surface);
}
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  body:not([data-rgb='off']) .rgb-surface::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: var(--rgb-width);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rgb-palette));
    background-size: 200% 100%;
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: var(--rgb-intensity);
  }
  body:not([data-rgb='off'], [data-rgb='static']) .rgb-running::after {
    animation:
      var(--rgb-movement) var(--rgb-duration) linear infinite var(--rgb-direction),
      var(--rgb-rhythm) var(--rgb-duration) ease-in-out infinite;
  }
  body:not([data-rgb='off']) .field:focus-within::after {
    opacity: 1;
    padding: 3px;
  }
  body:not([data-rgb='off']) .needs-review::after {
    opacity: 0.25;
  }
}
body:not([data-rgb='off']) :is(.primary, .secondary, .tool-btn, .nav-item) {
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}
@media (hover: hover) {
  body:not([data-rgb='off']) :is(.primary, .secondary, .tool-btn):not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px #007eab24;
    border-color: #23c9d1;
  }
}
body:not([data-rgb='off']) :is(.primary, .secondary, .tool-btn):not(:disabled):active {
  transform: translateY(0);
}
body:not([data-rgb='off']) .field:focus-within {
  box-shadow: 0 0 0 3px #16baca18;
}
@media (prefers-reduced-motion: reduce) {
  body[data-rgb] dialog[open] {
    animation: none !important;
  }
  /* Explicit RGB modes take priority over the global reduced-motion duration. */
  body:not([data-rgb='off'], [data-rgb='static']) .rgb-running::after {
    animation:
      var(--rgb-movement) var(--rgb-duration) linear infinite var(--rgb-direction),
      var(--rgb-rhythm) var(--rgb-duration) ease-in-out infinite !important;
  }
  body:not([data-rgb='off'], [data-rgb='static']) .personal-wordmark.rgb-text-running {
    animation: rgb-stream var(--rgb-duration) linear infinite !important;
  }
  body[data-rgb] :is(.primary, .secondary, .tool-btn, .nav-item) {
    transition: none;
    transform: none !important;
  }
}

/* Shared by the studio preview and every illuminated surface. */
@property --rgb-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes rgb-orbit {
  to {
    --rgb-angle: 360deg;
  }
}
@keyframes rgb-rain {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 96px;
  }
}
@keyframes rgb-wave {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 200% 200%;
  }
}
@keyframes rgb-bounce {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes rgb-still {
  from,
  to {
    background-position: 0% 50%;
  }
}
@keyframes rgb-steady {
  from,
  to {
    opacity: var(--rgb-intensity);
  }
}
@keyframes rgb-breathe {
  0%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.22);
  }
  50% {
    opacity: var(--rgb-intensity);
  }
}
@keyframes rgb-blink {
  0%,
  40%,
  100% {
    opacity: var(--rgb-intensity);
  }
  50%,
  85% {
    opacity: calc(var(--rgb-intensity) * 0.12);
  }
}
@keyframes rgb-heartbeat {
  0%,
  40%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.25);
  }
  15%,
  30% {
    opacity: var(--rgb-intensity);
  }
  23% {
    opacity: calc(var(--rgb-intensity) * 0.45);
  }
}
body:not([data-rgb='off']) .rgb-surface::after {
  padding: var(--rgb-width);
  opacity: var(--rgb-intensity);
}
body:not([data-rgb='off'])[data-rgb-effect='orbit'] .rgb-surface::after {
  background-image: conic-gradient(from var(--rgb-angle), var(--rgb-palette));
  background-size: 100% 100%;
}
body:not([data-rgb='off'])[data-rgb-effect='chase'] .rgb-surface::after {
  background-image: conic-gradient(
    from var(--rgb-angle),
    transparent 0deg 180deg,
    var(--rgb-palette),
    transparent 360deg
  );
  background-size: 100% 100%;
}
body:not([data-rgb='off'])[data-rgb-effect='rain'] .rgb-surface::after {
  background-image: var(--rgb-rain-image);
  background-size: 96px 96px;
}
body:not([data-rgb='off'])[data-rgb-effect='wave'] .rgb-surface::after {
  background-image: linear-gradient(135deg, var(--rgb-palette));
  background-size: 200% 200%;
}
body.lighting-active main > :not(.topbar, #lightingPanel),
body.lighting-active #newExcelBtn {
  display: none !important;
}
#lightingPanel[hidden],
#lightingPanel [hidden] {
  display: none !important;
}
#lightingPanel {
  padding: 8px 0 32px;
}
.lighting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 24px;
}
.lighting-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 6px 0 10px;
}
.lighting-heading p,
.lighting-preview p {
  line-height: 1.6;
}
.lighting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}
.lighting-controls {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.lighting-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  min-width: 0;
}
.lighting-card h3 {
  margin: 0 0 18px;
  font-size: 18px;
}
.lighting-label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}
#lightingPanel select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
#lightingPanel .rgb-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.lighting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.lighting-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}
.lighting-colors label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
#lightingPanel input[type='color'] {
  width: 64px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  cursor: pointer;
  background: var(--white);
}
.lighting-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0 0;
}
.lighting-slider {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 22px;
  font-size: 14px;
}
.lighting-slider output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#lightingPanel input[type='range'] {
  grid-column: 1 / -1;
  width: 100%;
  padding: 0;
  min-height: 28px;
  accent-color: #008cab;
  cursor: pointer;
}
.lighting-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.lighting-preview {
  position: sticky;
  top: 24px;
  text-align: center;
}
.lighting-ring {
  width: min(100%, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 24px auto;
  background: var(--white);
  border: 1px solid var(--line);
}
.lighting-ring > div {
  display: grid;
  gap: 12px;
  padding: 30px;
}
.lighting-ring strong {
  font-size: 21px;
}
.lighting-preview-icon {
  font-size: 36px;
  color: var(--muted);
}
#lightingPreviewLabel {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.lighting-sample {
  padding: 20px;
  margin: 22px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .lighting-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .lighting-preview {
    order: -1;
    top: 8px;
    z-index: 2;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    box-shadow: 0 8px 20px #0002;
  }
  .lighting-preview > p:not(.eyebrow, #lightingSaveStatus),
  .lighting-preview .lighting-sample,
  .lighting-preview-icon {
    display: none;
  }
  .lighting-preview > .eyebrow,
  #lightingPause,
  #lightingSaveStatus {
    grid-column: 2;
    margin: 0;
  }
  #lightingSaveStatus {
    font-size: 11px;
  }
  .lighting-ring {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 130px;
    margin: 0;
  }
  .lighting-ring > div {
    padding: 14px;
    gap: 8px;
  }
  .lighting-ring strong {
    font-size: 15px;
  }
  #lightingPreviewLabel {
    font-size: 10px;
  }
}
@media (max-width: 480px) {
  .lighting-card {
    padding: 18px;
  }
  .lighting-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lighting-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@keyframes rgb-waterfall {
  from {
    background-position: 50% 0%;
  }
  to {
    background-position: 50% 200%;
  }
}
@keyframes rgb-ripple {
  0%,
  100% {
    background-size: 100% 100%;
  }
  50% {
    background-size: 180% 180%;
  }
}
@keyframes rgb-scan {
  from {
    background-position: 50% 200%;
  }
  to {
    background-position: 50% 0%;
  }
}
@keyframes rgb-mosaic {
  from {
    background-position:
      0 0,
      0 0;
  }
  to {
    background-position:
      64px 64px,
      -64px 64px;
  }
}
@keyframes rgb-fadein {
  0%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.2);
  }
  80% {
    opacity: var(--rgb-intensity);
  }
}
@keyframes rgb-fadeout {
  0%,
  100% {
    opacity: var(--rgb-intensity);
  }
  80% {
    opacity: calc(var(--rgb-intensity) * 0.2);
  }
}
@keyframes rgb-candle {
  0%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.65);
  }
  22% {
    opacity: var(--rgb-intensity);
  }
  48% {
    opacity: calc(var(--rgb-intensity) * 0.55);
  }
  74% {
    opacity: calc(var(--rgb-intensity) * 0.88);
  }
}
@keyframes rgb-shimmer {
  0%,
  33%,
  66%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.68);
  }
  16%,
  50%,
  83% {
    opacity: var(--rgb-intensity);
  }
}
@keyframes rgb-tide {
  0%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.35);
  }
  35%,
  70% {
    opacity: var(--rgb-intensity);
  }
}
@keyframes rgb-swell {
  0%,
  100% {
    opacity: calc(var(--rgb-intensity) * 0.1);
  }
  20%,
  80% {
    opacity: calc(var(--rgb-intensity) * 0.3);
  }
  50% {
    opacity: var(--rgb-intensity);
  }
}
body:not([data-rgb='off'])[data-rgb-effect='waterfall'] .rgb-surface::after {
  background-image: linear-gradient(0deg, var(--rgb-palette));
  background-size: 100% 200%;
}
body:not([data-rgb='off'])[data-rgb-effect='double'] .rgb-surface::after {
  background-image: repeating-conic-gradient(
    from var(--rgb-angle),
    transparent 0deg 85deg,
    var(--rgb-palette),
    transparent 180deg
  );
  background-size: 100% 100%;
}
body:not([data-rgb='off'])[data-rgb-effect='dashed'] .rgb-surface::after {
  background-image: repeating-conic-gradient(
    from var(--rgb-angle),
    var(--rgb-palette),
    transparent 24deg 36deg
  );
  background-size: 100% 100%;
}
body:not([data-rgb='off'])[data-rgb-effect='prism'] .rgb-surface::after {
  background-image: repeating-linear-gradient(60deg, var(--rgb-palette));
  background-size: 50% 200%;
}
body:not([data-rgb='off'])[data-rgb-effect='ripple'] .rgb-surface::after {
  background-image: repeating-radial-gradient(circle, var(--rgb-palette));
  background-position: center;
}
body:not([data-rgb='off'])[data-rgb-effect='scan'] .rgb-surface::after {
  background-image: linear-gradient(0deg, transparent 20%, var(--rgb-palette), transparent 80%);
  background-size: 100% 200%;
}
body:not([data-rgb='off'])[data-rgb-effect='ribbons'] .rgb-surface::after {
  background-image: repeating-linear-gradient(135deg, var(--rgb-palette), transparent 45% 50%);
  background-size: 200% 200%;
}
body:not([data-rgb='off'])[data-rgb-effect='diamond'] .rgb-surface::after {
  background-image: repeating-conic-gradient(
    from var(--rgb-angle),
    var(--rgb-palette),
    transparent 80deg 90deg
  );
  background-size: 100% 100%;
}
body:not([data-rgb='off'])[data-rgb-effect='mosaic'] .rgb-surface::after {
  background-image:
    repeating-linear-gradient(45deg, transparent 0 8px, var(--rgb-palette), transparent 32px),
    repeating-linear-gradient(-45deg, var(--rgb-palette), transparent 32px);
  background-size: 64px 64px;
}
.lighting-palette-swatch {
  height: 18px;
  border-radius: 8px;
  margin-top: 16px;
  border: 1px solid var(--line);
}
.lighting-presets {
  margin-top: 16px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
}
.lighting-presets button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lighting-preset-swatch {
  width: 26px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 6px;
}
.lighting-presets button[aria-pressed='true'] {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@property --rgb-color-0 {
  syntax: '<color>';
  inherits: true;
  initial-value: #00dfb2;
}
@property --rgb-color-1 {
  syntax: '<color>';
  inherits: true;
  initial-value: #00b7ff;
}
@property --rgb-color-2 {
  syntax: '<color>';
  inherits: true;
  initial-value: #604dff;
}
@property --rgb-color-3 {
  syntax: '<color>';
  inherits: true;
  initial-value: #e533ef;
}
@property --rgb-color-4 {
  syntax: '<color>';
  inherits: true;
  initial-value: #ff456b;
}
@property --rgb-color-5 {
  syntax: '<color>';
  inherits: true;
  initial-value: #ffcb38;
}
body[data-lighting-transition='smooth'] {
  transition:
    --rgb-color-0 650ms ease,
    --rgb-color-1 650ms ease,
    --rgb-color-2 650ms ease,
    --rgb-color-3 650ms ease,
    --rgb-color-4 650ms ease,
    --rgb-color-5 650ms ease;
}
.lighting-personal {
  margin-top: 18px;
}
.lighting-personal .lighting-card {
  margin-bottom: 18px;
}
.lighting-personal .lighting-grid {
  margin-top: 14px;
}
.lighting-personal input[type='text'] {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--input, var(--white));
}
.lighting-personal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.lighting-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.lighting-check input {
  width: 18px;
  height: 18px;
}
#lightingUndo {
  margin-top: 10px;
}
.lighting-preview #lightingUndo {
  display: block;
  margin: 10px auto 0;
}
@media (max-width: 900px) {
  .lighting-personal :is(input, select, button) {
    scroll-margin-top: 270px;
  }
}
/* Extend the selected palette to native controls, tables and dividing lines. */
body:not([data-rgb='off']) .rgb-rounded {
  border-top-left-radius: max(10px, var(--rgb-radius-topleft, 10px)) !important;
  border-top-right-radius: max(10px, var(--rgb-radius-topright, 10px)) !important;
  border-bottom-right-radius: max(10px, var(--rgb-radius-bottomright, 10px)) !important;
  border-bottom-left-radius: max(10px, var(--rgb-radius-bottomleft, 10px)) !important;
}
body:not([data-rgb='off']) .rgb-native-border {
  border-color: var(--rgb-color-0) var(--rgb-color-2) var(--rgb-color-4) var(--rgb-color-1);
}
body:not([data-rgb='off']) .rgb-divider {
  border-image: linear-gradient(90deg, var(--rgb-palette)) 1;
}
@keyframes rgb-native-cycle {
  0%,
  100% {
    border-color: var(--rgb-color-0) var(--rgb-color-2) var(--rgb-color-4) var(--rgb-color-1);
  }
  33% {
    border-color: var(--rgb-color-2) var(--rgb-color-4) var(--rgb-color-1) var(--rgb-color-0);
  }
  66% {
    border-color: var(--rgb-color-4) var(--rgb-color-1) var(--rgb-color-0) var(--rgb-color-2);
  }
}
body:not([data-rgb='off'], [data-rgb='static']) .rgb-native-border.rgb-running:not(.rgb-divider) {
  animation: rgb-native-cycle var(--rgb-duration) linear infinite var(--rgb-direction);
}
@media (forced-colors: active) {
  body[data-rgb] .rgb-native-border {
    border-color: CanvasText;
    border-image: none;
    animation: none;
  }
}
body:not([data-rgb='off'])[data-aesthetic-buttons='round']
  :is(button.primary, button.secondary, button.nav-item).rgb-rounded {
  border-radius: 24px !important;
}
body:not([data-rgb='off']) .aesthetic-card.rgb-rounded {
  border-radius: max(10px, var(--aesthetic-radius, 18px)) !important;
}
