:root {
  color-scheme: dark;
  --ops-fallback-panel-notch: 12px;
  --ops-fallback-chip-notch: 8px;
  --ops-fallback-base: #0a0f0d;
  --ops-fallback-surface-base: #0e1411;
  --ops-fallback-surface-raised: #1a221e;
  --ops-fallback-surface-overlay: #222b27;
  --ops-fallback-text-primary: #e6ece9;
  --ops-fallback-text-secondary: #b4bfba;
  --ops-fallback-text-muted: #9aa6a0;
  --ops-fallback-border-soft: rgba(255, 255, 255, 0.08);
  --ops-fallback-border-strong: rgba(255, 255, 255, 0.14);
  --ops-fallback-focus: rgba(183, 247, 218, 0.86);
}

.ops-boot-fallback-shell,
.ops-crash-fallback-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  background-color: var(--ops-fallback-base);
  color: var(--ops-fallback-text-primary);
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.ops-boot-fallback-container,
.ops-crash-fallback-container {
  max-width: 40rem;
  margin: 0 auto;
}

.ops-boot-fallback-eyebrow,
.ops-crash-fallback-eyebrow,
.ops-crash-fallback-detail-label,
.ops-crash-fallback-danger-label,
.ops-boot-fallback-button,
.ops-crash-fallback-button {
  font-family:
    'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ops-boot-fallback-eyebrow,
.ops-crash-fallback-eyebrow {
  letter-spacing: 0.28em;
  color: #fca5a5;
}

.ops-boot-fallback-title,
.ops-crash-fallback-title {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-boot-fallback-copy,
.ops-crash-fallback-status {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--ops-fallback-text-secondary);
}

.ops-boot-fallback-actions,
.ops-crash-fallback-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ops-boot-fallback-button,
.ops-crash-fallback-button {
  --notch: var(--ops-fallback-chip-notch);
  -webkit-clip-path: polygon(
    var(--notch) 0,
    100% 0,
    100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%,
    0 100%,
    0 var(--notch)
  );
  clip-path: polygon(
    var(--notch) 0,
    100% 0,
    100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%,
    0 100%,
    0 var(--notch)
  );
  transform: translateZ(0);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    opacity 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.ops-boot-fallback-button:focus-visible,
.ops-crash-fallback-button:focus-visible,
.ops-crash-fallback-checkbox:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(10, 15, 13, 0.96),
    inset 0 0 0 3px var(--ops-fallback-focus);
}

.ops-boot-fallback-button {
  color: #fef3c7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 68%),
    rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
}

.ops-crash-fallback-detail-card,
.ops-crash-fallback-danger-zone {
  --notch: var(--ops-fallback-panel-notch);
  -webkit-clip-path: polygon(
    var(--notch) 0,
    100% 0,
    100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%,
    0 100%,
    0 var(--notch)
  );
  clip-path: polygon(
    var(--notch) 0,
    100% 0,
    100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%,
    0 100%,
    0 var(--notch)
  );
  transform: translateZ(0);
  margin-top: 1.5rem;
  padding: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.ops-crash-fallback-detail-card {
  border: 1px solid var(--ops-fallback-border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 30%),
    var(--ops-fallback-surface-overlay);
}

.ops-crash-fallback-detail-label {
  letter-spacing: 0.16em;
  color: var(--ops-fallback-text-muted);
}

.ops-crash-fallback-detail {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-family: monospace;
  color: #fca5a5;
  word-break: break-word;
}

.ops-crash-fallback-button-primary {
  color: #a7f3d0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 68%),
    rgba(16, 185, 129, 0.1);
  border-color: rgba(52, 211, 153, 0.4);
}

.ops-crash-fallback-button-muted {
  color: var(--ops-fallback-text-primary);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 68%),
    var(--ops-fallback-surface-raised);
  border-color: var(--ops-fallback-border-soft);
}

.ops-crash-fallback-button-retry {
  color: #93c5fd;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 68%),
    rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
}

.ops-crash-fallback-button-reload {
  color: #fef3c7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 68%),
    rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
}

.ops-crash-fallback-danger-zone {
  border: 1px solid rgba(248, 113, 113, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    rgba(127, 29, 29, 0.18);
}

.ops-crash-fallback-danger-label {
  letter-spacing: 0.16em;
  color: #fca5a5;
}

.ops-crash-fallback-danger-copy {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #d4d4d8;
}

.ops-crash-fallback-checkbox-row {
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ops-fallback-text-primary);
}

.ops-crash-fallback-checkbox {
  margin-top: 0.2rem;
}

.ops-crash-fallback-button-danger {
  color: #fee2e2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 68%),
    rgba(220, 38, 38, 0.12);
  border-color: rgba(248, 113, 113, 0.45);
}

.ops-crash-fallback-button-danger.is-armed {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 68%),
    rgba(220, 38, 38, 0.32);
}

.ops-crash-fallback-danger-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #fecaca;
}

.ops-boot-fallback-button:disabled,
.ops-crash-fallback-button:disabled,
.ops-crash-fallback-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (forced-colors: active) {
  .ops-boot-fallback-shell,
  .ops-crash-fallback-shell,
  .ops-crash-fallback-detail-card,
  .ops-crash-fallback-danger-zone,
  .ops-boot-fallback-button,
  .ops-crash-fallback-button {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  .ops-boot-fallback-button:focus-visible,
  .ops-crash-fallback-button:focus-visible,
  .ops-crash-fallback-checkbox:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}
