/* Error screens: page not found (404.html) and "server not reachable" in the app.
   Colours come from base.css, so light/dark mode works by itself. */

.error-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px 48px;
  background: var(--bg);
}

/* In the app: covers the (empty) app when the backend cannot load the data */
.error-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
}

.error-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.error-top .logo {
  color: var(--ink);
  padding: 0;
}

.error-box {
  width: min(440px, 100%);
  text-align: center;
}

/* The big code ("404") or the symbol for server errors */
.error-box .error-code {
  margin: 0 0 10px;
  max-width: none;
  font-family: "Inter Display", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(88px, 22vw, 136px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-text);
}

.error-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: var(--brand-soft);
  color: var(--brand-text);
}

.error-box h1 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.25;
}

.error-box > p:not(.error-code):not(.error-detail) {
  margin: 0 auto;
  max-width: 36ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.error-actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.error-actions .primary,
.error-actions .secondary {
  display: block;
  padding: 13px 16px;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}

.error-box .error-detail {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}
