.jp-splash {
  --jp-splash-bg: #ffffff;
  --jp-splash-fg: #525252;
  --jp-splash-track: rgba(23, 23, 23, 0.2);
  --jp-splash-bar: #171717;
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--jp-splash-bg);
  overflow: hidden;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    sans-serif;
}

html.dark .jp-splash {
  --jp-splash-bg: #171717;
  --jp-splash-fg: #d4d4d4;
  --jp-splash-track: rgba(250, 250, 250, 0.2);
  --jp-splash-bar: #fafafa;
}

.jp-splash.jp-splash--exit {
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
  visibility: hidden;
}

.jp-splash__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 1.25rem;
  width: fit-content;
  max-width: min(92vw, 560px);
  min-width: min(257px, 92vw);
  box-sizing: border-box;
}

.jp-splash__logo-wrap {
  position: relative;
  width: min(167px, 72vw);
  height: 40px;
  flex-shrink: 0;
  animation: jp-splash-logo-in 0.5s ease 0.02s both;
}

.jp-splash__logo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: auto;
  object-fit: contain;
  object-position: center;
}

.jp-splash__logo--light {
  display: block;
}

.jp-splash__logo--dark {
  display: none;
}

html.dark .jp-splash__logo--light {
  display: none;
}

html.dark .jp-splash__logo--dark {
  display: block;
}

.jp-splash__tagline {
  margin: 0;
  min-height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  font-size: clamp(7px, 2.15vw, 11px);
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--jp-splash-fg);
  opacity: 0;
  animation: jp-splash-fade 0.4s ease 0.2s forwards;
}

.jp-splash__tagline--static {
  opacity: 1;
  animation: none;
}

.jp-splash__progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(200px, 78vw);
}

.jp-splash__progress-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--jp-splash-track);
  overflow: hidden;
}

.jp-splash__progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--jp-splash-bar);
  transition: width 0.14s ease-out;
}

.jp-splash__progress-bar.jp-splash__progress-bar--indeterminate {
  width: 36% !important;
  animation: jp-splash-progress-indeterminate 1.1s ease-in-out infinite;
}

.jp-splash__progress-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 1rem;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  color: var(--jp-splash-fg);
  letter-spacing: 0;
}

.jp-splash__progress-label {
  display: inline-block;
  min-width: 17ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.jp-splash__chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  max-width: 280px;
}

.jp-splash__chip {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--jp-splash-fg);
  background: color-mix(in srgb, var(--jp-splash-bar) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--jp-splash-bar) 18%, transparent);
  opacity: 0;
  animation: jp-splash-fade 0.45s ease forwards;
}

.jp-splash__chip:nth-child(1) {
  animation-delay: 0.2s;
}
.jp-splash__chip:nth-child(2) {
  animation-delay: 0.3s;
}
.jp-splash__chip:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes jp-splash-logo-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes jp-splash-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes jp-splash-progress-indeterminate {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(340%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jp-splash__logo-wrap,
  .jp-splash__tagline,
  .jp-splash__chip {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .jp-splash__progress-bar.jp-splash__progress-bar--indeterminate {
    animation: none !important;
    width: 55% !important;
    margin-left: 22.5%;
  }
}
