/* Loaded AFTER Bootstrap. Every colour that must follow the theme comes from
   one of Bootstrap's variables, so light and dark need no rules of their own. */

body {
  background:
    radial-gradient(60rem 30rem at 15% 0%, rgba(var(--bs-warning-rgb), .16), transparent 60%),
    radial-gradient(50rem 30rem at 100% 100%, rgba(var(--bs-primary-rgb), .12), transparent 60%),
    var(--bs-body-bg);
}

/* Bootstrap's outline buttons keep one grey in both themes, and on the dark
   background that grey is too faint to read. This one takes its colours from
   the theme, through Bootstrap's own button variables. */
.theme-toggle {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-border-color: var(--bs-secondary-color);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-hover-border-color: var(--bs-body-color);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-active-bg: var(--bs-secondary-bg);
  --bs-btn-active-border-color: var(--bs-body-color);
}

.notice {
  width: 100%;
  max-width: 34rem;
}

/* Even line lengths, so a sentence never leaves one word alone on a line. */
.notice h1,
.notice .lead {
  text-wrap: balance;
}

/* The black-and-yellow tape along the top of the card. Fixed colours on
   purpose: tape is the same in daylight and in the dark. */
.hazard {
  height: .625rem;
  background: repeating-linear-gradient(-45deg, #ffc107 0 1rem, #000 1rem 2rem);
  background-size: 2.8284rem 100%;
  animation: hazard-slide 1.6s linear infinite;
}

/* One period of a 45-degree stripe pair 2rem wide is 2rem x sqrt(2) along the
   edge, so sliding by exactly that distance loops without a jump. */
@keyframes hazard-slide {
  to { background-position: 2.8284rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hazard { animation: none; }
}

.cone {
  width: 4.5rem;
  height: 4.5rem;
}
