:root {
  color-scheme: light dark;
  --ez-bg-app: #ffffff;
  --ez-typo-header: rgba(0, 0, 0, 1);
  --ez-typo-description: rgba(0, 0, 0, 1);
  --ez-text-muted: rgba(0, 0, 0, 0.65);
  --ez-navbar-login-bg: #000000;
  --ez-navbar-login-text: #ffffff;
  --ez-navbar-login-hover-bg: #171717;
  --error-badge-bg: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ez-bg-app: #000000;
    --ez-typo-header: #ffffff;
    --ez-typo-description: #ffffff;
    --ez-text-muted: #ffffff;
    --ez-navbar-login-bg: #ffffff;
    --ez-navbar-login-text: #000000;
    --ez-navbar-login-hover-bg: #e5e5e5;
    --error-badge-bg: rgba(255, 255, 255, 0.08);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background-color: var(--ez-bg-app);
  color: var(--ez-typo-header);
  font-family: "Geist", Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  text-align: center;
}

.error-shell {
  width: 100%;
  max-width: 720px;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 24px);
}

.error-panel {
  width: 100%;
  margin: 0 auto;
  padding: 24px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand {
  display: inline-grid;
  place-items: center;
  width: clamp(76px, 20vw, 112px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: clamp(20px, 4vw, 28px);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.error-title {
  margin: 0;
  font-size: clamp(1.95rem, 7vw, 3rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ez-typo-header);
}

.error-description {
  margin: clamp(14px, 2.8vw, 18px) auto 0;
  max-width: min(36rem, 92vw);
  font-size: clamp(0.98rem, 3.4vw, 1.0625rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--ez-typo-description);
  text-wrap: balance;
}

.error-actions {
  margin-top: clamp(32px, 6vw, 48px);
}

.retry-button {
  appearance: none;
  border: 0;
  border-radius: 24px;
  background: var(--ez-navbar-login-bg);
  color: var(--ez-navbar-login-text);
  width: min(100%, 168px);
  padding: 14px 20px;
  min-width: 0;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.retry-button:hover {
  background: var(--ez-navbar-login-hover-bg);
}

.retry-button:active {
  transform: translateY(1px);
}

.retry-button:focus-visible {
  outline: 2px solid var(--ez-typo-header);
  outline-offset: 3px;
}

.error-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(72px, 20vw, 86px);
  margin-top: clamp(26px, 4vw, 34px);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--error-badge-bg);
  color: var(--ez-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .error-panel {
    padding: 8px 0 16px;
  }
}
