/* Light spills follow the existing dashboard surfaces and controls. */
html[data-theme=dark] body #dashboardOverview {
  background-image:
    radial-gradient(ellipse 42rem 24rem at 12% 1%, #81d8aa26, transparent 75%),
    radial-gradient(ellipse 32rem 22rem at 96% 28%, #a697df1f, transparent 75%);
}

html[data-theme=light] body #dashboardOverview {
  background-image:
    radial-gradient(ellipse 42rem 24rem at 12% 1%, #7cc69f30, transparent 75%),
    radial-gradient(ellipse 32rem 22rem at 96% 28%, #a597d025, transparent 75%);
}

#dashboardOverview :is(.workspaceHeroCopy, .dashboard-card .card-heading) {
  text-shadow: 0 0 24px #87dbb344;
}

#dashboardOverview :is(.workspacePrimary, .workspaceContinue, .workspaceLearningCard) {
  transition: filter .24s ease;
}

#dashboardOverview :is(.workspacePrimary, .workspaceContinue, .workspaceLearningCard):is(:hover, :focus-visible) {
  filter: drop-shadow(0 5px 13px #66be9b52);
}

@media (prefers-reduced-motion: reduce) {
  #dashboardOverview :is(.workspacePrimary, .workspaceContinue, .workspaceLearningCard) {
    transition: none;
  }
}

html[data-theme] body.flow-workspace.is-signed-in #dashboardOverview .flowContextRail .workspaceHeroCopy {
  background-image: linear-gradient(118deg, var(--dashboard-aura-mint), transparent 49%, var(--dashboard-aura-violet)) !important;
}

html[data-theme] body.flow-workspace.is-signed-in #dashboardOverview .dashboardModuleTile {
  background-image: radial-gradient(ellipse at 86% 4%, var(--dashboard-aura-violet), transparent 72%);
}

html[data-theme] body.flow-workspace.is-signed-in #dashboardOverview .dashboardModuleTile:is(:hover, :focus-within) {
  background-image: radial-gradient(ellipse at 86% 4%, var(--dashboard-aura-mint), transparent 78%);
}

html[data-theme=dark] #dashboardOverview {
  --dashboard-aura-mint: #83dcb93d;
  --dashboard-aura-violet: #aa85ed4a;
}

html[data-theme=light] #dashboardOverview {
  --dashboard-aura-mint: #75cba449;
  --dashboard-aura-violet: #aa8cdd55;
}

/* Add ambient light to existing headers, outside the plotting area. */
html[data-theme=dark] body {
  --member-mint-light: #83dcb92c;
  --member-violet-light: #a697df30;
}

html[data-theme=light] body {
  --member-mint-light: #62af8930;
  --member-violet-light: #a597d034;
}

html[data-theme] body #journalWorkspace :is(.journal-topline,.insightsHeading,.journalToolbar,.journal-calendar-header,.journal-volume-header,.exchange-activity-header),
html[data-theme] body #courseWorkspace :is(.courseHead,.learningModuleCard,.courseLesson) {
  background-image:
    radial-gradient(ellipse 75% 13rem at 5% 0, var(--member-mint-light), transparent 85%),
    radial-gradient(ellipse 65% 13rem at 98% 0, var(--member-violet-light), transparent 85%) !important;
}

html[data-theme] body #journalWorkspace :is(.journal-topline,.insightsHeading,.journalToolbar,.journal-calendar-header,.journal-volume-header,.exchange-activity-header) :is(h1,h2,h3),
html[data-theme] body #courseWorkspace :is(.courseHead,.learningModuleCard,.courseLesson) :is(h1,h2,h3) {
  text-shadow: 0 0 22px var(--member-mint-light);
}

/* Round the elements that paint the light itself, including nested headers. */
html[data-theme] body #dashboardOverview,
html[data-theme] body.flow-workspace.is-signed-in #dashboardOverview :is(.flowContextRail .workspaceHeroCopy,.dashboardModuleTile,.flowMarketSurface>.chart-card),
html[data-theme] body #journalWorkspace :is(.journal-topline,.insightsHeading,.journalToolbar,.journal-calendar-header,.journal-volume-header,.exchange-activity-header),
html[data-theme] body #courseWorkspace :is(.courseHead,.learningModuleCard,.courseLesson),
html[data-theme] body #dashboardOverview .workspaceAccountCenter .accountIdentity {
  border-radius: 14px;
}

html[data-theme] body #dashboardOverview .workspaceAccountCenter .accountIdentity {
  background-image:
    radial-gradient(ellipse at 5% 0, var(--member-mint-light), transparent 68%),
    radial-gradient(ellipse at 98% 0, var(--member-violet-light), transparent 72%) !important;
}

html[data-theme] body #dashboardOverview .workspaceAccountCenter .accountIdentityCopy h2 {
  text-shadow: 0 0 22px var(--member-mint-light);
}

/* Keep labels and actions inside the rounded header surfaces. */
html[data-theme] body #journalWorkspace :is(.journal-topline,.insightsHeading,.journalToolbar,.journal-calendar-header,.journal-volume-header,.exchange-activity-header) {
  box-sizing: border-box;
  padding: 8px clamp(12px, 1.5vw, 20px);
}

/* The light workspace sets some surfaces with a strong background shorthand. */
html[data-theme=light] body.modern-workspace.is-signed-in #courseWorkspace :is(.courseHead,.learningModuleCard,.courseLesson),
html[data-theme=light] body.modern-workspace.is-signed-in #journalWorkspace :is(.journal-topline,.insightsHeading,.journalToolbar,.journal-calendar-header,.journal-volume-header,.exchange-activity-header),
html[data-theme=light] body.modern-workspace.is-signed-in #dashboardOverview .workspaceAccountCenter .accountIdentity {
  background-image:
    radial-gradient(ellipse 75% 13rem at 5% 0, #62af893b, transparent 85%),
    radial-gradient(ellipse 65% 13rem at 98% 0, #a597d043, transparent 85%) !important;
}

/* Both chart views use the same ambient lighting in either theme. */
html[data-theme] body.flow-workspace.modern-workspace.is-signed-in #dashboardOverview .flowMarketSurface>:is(.chart-card,.chart-card:has(.kd-chart-header)) {
  background-image:
    radial-gradient(ellipse 75% 13rem at 5% 0, #83dcb92c, transparent 85%),
    radial-gradient(ellipse 65% 13rem at 98% 0, #a697df30, transparent 85%) !important;
}

/* Extend the existing mint and violet light into the overview's page background. */
html[data-theme] body.flow-workspace.modern-workspace.is-signed-in:not(.admin-portal-open)
  > main:has(#dashboardOverview[data-workspace-section=overview]:not([hidden], [data-chart-focus=true])) {
  background-image:
    linear-gradient(to bottom, var(--flow-bg), transparent clamp(32px, 6vw, 72px)),
    radial-gradient(ellipse 85% 70% at 8% 12%, var(--member-mint-light), transparent 92%),
    radial-gradient(ellipse 80% 78% at 96% 42%, var(--member-violet-light), transparent 94%);
  background-repeat: no-repeat;
  border-start-start-radius: 20px;
  border-start-end-radius: 20px;
}
