/* Boot loading + static error pages — must load before React (survives prerender via /fallback.css link). */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.pe-error-page {
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #eff6ff, #ffffff);
  color: #111827;
  text-align: center;
  padding: 2rem 1.25rem;
  width: 100%;
}

.pe-error-page *,
.pe-error-page *::before,
.pe-error-page *::after {
  box-sizing: border-box;
}

.pe-error-page__inner {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
}

.pe-error-page__code {
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  font-weight: 700;
  color: #2563eb;
  margin: 0 0 1rem;
  line-height: 1.1;
}

.pe-error-page__title {
  font-size: clamp(1.375rem, 5vw, 1.875rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: #111827;
  line-height: 1.25;
}

.pe-error-page__message {
  font-size: clamp(1rem, 3.5vw, 1.125rem);
  color: #4b5563;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.pe-error-page__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 640px) {
  .pe-error-page__actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .pe-error-page__actions a,
  .pe-error-page__actions button {
    width: auto;
    min-width: 10rem;
  }
}

.pe-error-page__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
}

.pe-error-page__btn--primary {
  background: #2563eb;
  color: #ffffff;
}

.pe-error-page__btn--outline {
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.pe-boot-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: pe-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.pe-boot-loading-text {
  color: #2563eb;
  font-weight: 600;
  margin: 0;
  font-size: 1rem;
}
