/* حاضرين error pages. Also served alone with the standalone error HTML
   (lib/browser-errors.ts), so it carries its own copy of the brand tokens. */
@font-face {
  font-family: SBArabic;
  src: url('/fonts/ibm-plex-sans-arabic-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: SBArabic;
  src: url('/fonts/ibm-plex-sans-arabic-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
html {
  color-scheme: only light;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
.standalone-error,
.error-header,
.error-main {
  --e-paper: #f6f0e6;
  --e-surface: #fffbf5;
  --e-ink: #2a1d18;
  --e-soft: #5f5149;
  --e-line: #e4d6c4;
  --e-clay: #9a3d28;
  --e-clay-press: #7e3020;
  --e-tint: #f2ded3;
}
.standalone-error {
  margin: 0;
  background: var(--e-paper);
  color: var(--e-ink);
  font-family: SBArabic, 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
}
.standalone-error button,
.standalone-error input,
.standalone-error a {
  font: inherit;
}
.error-header {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--e-line);
  background: var(--e-surface);
}
.error-brand {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  text-decoration: none;
}
.error-brand img {
  display: block;
  width: auto;
  height: 2.25rem;
}
.error-main {
  display: grid;
  place-items: center;
  min-height: 65vh;
  padding: 2rem 1.25rem;
  background: var(--e-paper);
  color: var(--e-ink);
}
.error-card {
  width: 100%;
  max-width: 32rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--e-line);
  border-radius: 2rem;
  background: var(--e-surface);
  text-align: center;
}
.error-symbol {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 999px 999px 1rem 1rem;
  background: var(--e-tint);
  color: var(--e-clay);
  font-size: 1.75rem;
  font-weight: 600;
}
.error-card h1 {
  margin: 0 0 0.875rem;
  color: var(--e-ink);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.error-card p {
  margin: 0 0 1.5rem;
  color: var(--e-soft);
  line-height: 1.9;
}
.error-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.error-actions form {
  margin: 0;
}
.error-actions button,
.error-actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.625rem 1.25rem;
  border: 1.5px solid var(--e-clay);
  border-radius: 999px;
  background: var(--e-clay);
  color: var(--e-surface);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.error-actions button:hover,
.error-actions .button:hover {
  background: var(--e-clay-press);
  border-color: var(--e-clay-press);
  color: var(--e-surface);
}
.error-actions .outline,
.error-actions button.outline {
  background: var(--e-surface);
  border-color: var(--e-ink);
  color: var(--e-ink);
}
.error-actions .outline:hover,
.error-actions button.outline:hover {
  background: var(--e-paper);
  color: var(--e-ink);
}
.error-secondary {
  display: grid;
  place-items: center;
  min-height: 3rem;
  color: var(--e-clay);
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.standalone-error .staging-banner {
  padding: 0.375rem 1rem;
  border-bottom: 1px solid #cfd3b0;
  background: #e6e8d3;
  color: #3d4520;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}
.standalone-error :focus-visible,
.error-main :focus-visible,
.error-header :focus-visible {
  outline: 3px solid var(--e-clay);
  outline-offset: 4px;
}
@media (max-width: 430px) {
  .error-card {
    padding: 1.75rem 1.125rem;
  }
  .error-card h1 {
    font-size: 1.875rem;
  }
  .error-main {
    padding: 1.75rem 1rem;
  }
  .error-header {
    padding: 0.5rem 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
