:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #050505;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #fff;
  background-color: #050505;
  background-repeat: no-repeat;
  background-position: top left;
  font-family: "Book Antiqua", Palatino, Georgia, serif;
}

img:not([usemap]) {
  max-width: 100%;
}

iframe {
  max-width: 100%;
  border: 0;
}

table {
  max-width: 100%;
}

a {
  text-underline-offset: 0.18em;
}

/* The archive's authentic image-map menu remains the desktop navigation. */
.mobile-site-header {
  display: none;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
    background-position: top left;
  }

  .mobile-site-header {
    display: block;
    width: 100%;
    background: #050505;
    border-bottom: 1px solid #740000;
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.55);
  }

  .mobile-brand-link {
    display: block;
    height: 100px;
    background-color: #050505;
    background-image: url("emages/BG_Front.jpg");
    background-repeat: no-repeat;
    background-position: -18px 0;
    background-size: 1710px auto;
  }

  .mobile-brand-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
  }

  body[background*="BG_Other"] .mobile-brand-link {
    background-image: url("emages/BG_Other.jpg");
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding: 0.4rem;
    background: linear-gradient(#160000, #050505);
    font-family: Arial, Helvetica, sans-serif;
  }

  .mobile-nav a {
    display: grid;
    min-width: 0;
    min-height: 48px;
    place-items: center;
    padding: 0.4rem 0.2rem;
    color: #fff;
    background: rgba(8, 8, 8, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    font-size: clamp(0.65rem, 2.6vw, 0.78rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.035em;
  }

  .mobile-nav a[aria-current="page"] {
    color: #fff;
    background: #760000;
    border-color: #ca1c1c;
  }

  .mobile-nav a:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #fff;
    outline-offset: -3px;
  }

  .legacy-image-map,
  body > p:has(img[usemap="#planetmap"]) {
    display: none;
  }

  body > div[style*="position: absolute"] {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0;
    padding: 1rem !important;
    overflow: visible !important;
    background: rgba(0, 0, 0, 0.78);
    border-top: 1px solid rgba(166, 0, 0, 0.62);
  }

  body > div[style*="position: absolute"] table,
  body > div[style*="position: absolute"] tbody,
  body > div[style*="position: absolute"] tr,
  body > div[style*="position: absolute"] td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  body > div[style*="position: absolute"] table {
    border-collapse: collapse;
  }

  body > div[style*="position: absolute"] td {
    padding: 0.35rem 0 !important;
  }

  body > div[style*="position: absolute"] [align="justify"],
  body > div[style*="position: absolute"] [style*="text-align: justify"] {
    text-align: left !important;
  }

  body > div[style*="position: absolute"] img:not([usemap]) {
    display: block !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0.75rem auto !important;
  }

  body > div[style*="position: absolute"] iframe {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 0.75rem 0 1.5rem;
    background: #000;
  }

  body > div[style*="position: absolute"] iframe[src$=".pdf"] {
    min-height: 70vh;
    aspect-ratio: auto;
    background: #fff;
  }

  body[background*="BG_Front"] > table,
  body[background*="BG_Front"] > table > tbody,
  body[background*="BG_Front"] > table > tbody > tr,
  body[background*="BG_Front"] > table > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  body[background*="BG_Front"] > table {
    margin: 0;
    padding: 0.75rem 0 1.5rem;
    background: rgba(0, 0, 0, 0.25);
  }

  body[background*="BG_Front"] > table > tbody > tr > td {
    height: auto !important;
  }

  body[background*="BG_Front"] > table > tbody > tr > td:first-child {
    display: none;
  }

  body[background*="BG_Front"] iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background: #000;
  }

  body[background*="BG_Front"] a[href*="amazon.com"] {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin: 1rem 0.75rem 2rem;
    padding: 0.75rem 1rem;
    background: rgba(101, 0, 0, 0.9);
    border: 1px solid #d22;
    border-radius: 0.2rem;
    text-align: center;
    text-decoration-thickness: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
