* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--violet-500) var(--surface-soft);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: var(--surface-soft);
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--violet-500);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--violet-600);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  color-scheme: light;
  font-family: var(--font-body);
  background: var(--surface-soft);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink-900);
  background: var(--surface-soft);
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

:focus-visible {
  outline: 2px solid var(--violet-600);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.auth-pending:not(.splash-pending) {
  visibility: hidden;
}

.splash-pending .workspace-shell,
.splash-pending .login-layout,
.splash-pending .notification-region,
.splash-pending .ambient {
  visibility: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-brand);
  min-width: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  flex: 0 0 56px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-5deg) scale(1.04);
  box-shadow: 0 18px 38px rgba(138, 81, 255, 0.34);
}

.brand-mark svg,
.brand-mark img {
  width: 38px;
  height: 38px;
}

.brand-mark img {
  display: block;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: inherit;
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--ink-400);
  font: 800 13px var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-light {
  color: #fff;
}

.brand-light small {
  color: rgba(211, 217, 229, 0.72);
}

.app-splash {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #111827;
  background-size:
    42px 42px,
    42px 42px,
    auto;
  transition:
    opacity 0.28s var(--ease),
    visibility 0.28s var(--ease);
}

.splash-pending .app-splash {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.splash-shell {
  width: min(320px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  animation: splashCardIn 0.48s var(--ease) both;
}

.splash-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  animation: splashLogoPulse 1.6s var(--ease) infinite;
}

.splash-brand strong,
.splash-brand small {
  display: block;
}

.splash-brand strong {
  color: #fff;
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.splash-brand small {
  margin-top: 5px;
  color: rgba(211, 217, 229, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.splash-label {
  color: #aab4c4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.splash-progress {
  width: min(220px, 100%);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.splash-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--violet-500);
  animation: splashProgress 1.25s var(--ease) infinite;
}

@keyframes splashCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes splashLogoPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.04);
  }
}

@keyframes splashProgress {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-shell,
  .splash-brand,
  .splash-progress span {
    animation: none;
  }
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--violet-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #c8bdff;
}

.page-enter {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  animation: pageEnter 0.42s var(--ease) forwards;
}

.page-enter-delay {
  animation-delay: 0.06s;
}

@keyframes pageEnter {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes toastEnter {
  from {
    opacity: 0;
    transform: translate3d(20px, -8px, 0) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.brand-light:focus-visible {
  outline-color: #c8bdff;
}
