/*
 * Boot styling and the start-up diagnostic.
 *
 * Linked directly from index.html rather than imported by the application, so
 * it applies even when the application bundle never loads. That is exactly the
 * case where a person most needs to be told what went wrong.
 *
 * The diagnostic is revealed by a CSS animation with a long delay: no script,
 * no inline style, nothing for the Content-Security-Policy to object to. A
 * healthy start-up clears #app long before the delay elapses, so it is never
 * seen in normal use.
 */

.boot {
  max-width: 44rem;
  margin: 0;
  padding: 2rem 1.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  color: #857a6b;
}

.boot__message {
  margin: 0;
}

.boot__diagnostic {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #ded3c0;
  border-left: 4px solid #8c2f39;
  border-radius: 10px;
  background: #fffdf8;
  color: #2b2118;

  /* Hidden until the delay elapses. */
  opacity: 0;
  animation: boot-diagnostic 1ms linear 8s forwards;
}

@keyframes boot-diagnostic {
  to {
    opacity: 1;
  }
}

.boot__diagnostic h1 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-family: Georgia, "Times New Roman", serif;
}

.boot__diagnostic p {
  margin: 0 0 0.75rem;
}

.boot__diagnostic ul {
  margin: 0 0 0.75rem;
  padding-inline-start: 1.2rem;
}

.boot__diagnostic li {
  margin-bottom: 0.35rem;
}

.boot__diagnostic code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #efe9dd;
  font-size: 0.92em;
}

.boot__diagnostic a {
  color: #8c2f39;
}

.boot__note {
  margin: 0;
  font-size: 0.9rem;
  color: #857a6b;
}

@media (prefers-color-scheme: dark) {
  .boot {
    color: #9c9184;
  }

  .boot__diagnostic {
    border-color: #3a332c;
    border-left-color: #e79aa2;
    background: #211d1a;
    color: #f0e9dd;
  }

  .boot__diagnostic code {
    background: #161311;
  }

  .boot__diagnostic a {
    color: #e79aa2;
  }

  .boot__note {
    color: #9c9184;
  }
}
