:root {
  color-scheme: light;
  --blue: #000080;
  --link: #0000ee;
  --visited: #551a8b;
  --hot: #ff00ff;
  --paper: #fff8d7;
  --panel: #ffffee;
  --shadow: #808080;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.4;
  background-color: #008080;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, .16) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, .12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, .16) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, .12) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

a {
  color: var(--link);
  font-weight: bold;
}

a:visited {
  color: var(--visited);
}

a:hover,
a:focus {
  color: #fff;
  background: #000080;
  outline: 2px dotted #ffff00;
}

.page-shell {
  width: min(920px, calc(100% - 24px));
  margin: 18px auto;
  padding: 12px;
  background: var(--paper);
  border: 6px ridge #c0c0c0;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .38);
}
.language-switcher { display:flex; justify-content:flex-end; gap:8px; margin:0 0 8px; }
.language-switcher button { padding:2px; border:2px outset #c0c0c0; background:#c0c0c0; cursor:pointer; }
.language-switcher button[aria-pressed="true"] { border-style:inset; background:#ffff00; }
.language-switcher button { perspective:120px; }
.language-switcher img {
  display:block;
  width:50px;
  height:30px;
  image-rendering:pixelated;
  transform-origin:left center;
  animation:retro-flag-wave 1.1s steps(6, end) infinite;
  filter:brightness(1.08) saturate(1.2);
}
.language-switcher button:nth-child(2) img { animation-delay:-.45s; }
@keyframes retro-flag-wave {
  0%,100% { transform:rotateY(0deg) skewY(0deg) translateY(0); filter:brightness(1.08) saturate(1.2); }
  25% { transform:rotateY(-18deg) skewY(2deg) translateY(-1px); filter:brightness(.88) saturate(1.3); }
  50% { transform:rotateY(10deg) skewY(-2deg) translateY(1px); filter:brightness(1.2) saturate(1.15); }
  75% { transform:rotateY(-8deg) skewY(1deg) translateY(0); filter:brightness(.96) saturate(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .language-switcher img { animation:none; }
}
.scroll-banner { overflow:hidden; color:#ffff00; background:#800000; border-bottom:3px ridge #c0c0c0; font:bold 16px "Courier New",monospace; white-space:nowrap; }
.scroll-banner span { display:inline-block; padding:7px 0; animation:scroll-banner 18s linear infinite; }
@keyframes scroll-banner { from { transform:translateX(100vw); } to { transform:translateX(-100%); } }

.site-header {
  text-align: center;
  padding: 18px 10px 22px;
  color: #fff;
  background: var(--blue);
  border: 4px double #ffff00;
}

.site-header.compact {
  padding-block: 12px 16px;
}

.kicker {
  margin: 0 0 8px;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  font-weight: bold;
}

h1 {
  margin: 0;
  color: #ffff00;
  font-size: clamp(36px, 8vw, 70px);
  line-height: 1;
  text-shadow: 3px 3px 0 #ff00ff, 6px 6px 0 #000;
}

h2 {
  margin: 0 0 10px;
  color: #800000;
  font-size: 28px;
  text-align: center;
}

.tagline {
  max-width: 680px;
  margin: 12px auto 0;
  font-size: 21px;
}

.ie-button,
.download-button {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  color: #000;
  background: #c0c0c0;
  border-color: #fff #404040 #404040 #fff;
  border-style: solid;
  border-width: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  text-decoration: none;
}

.ie-button::before {
  content: "e";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  color: #fff;
  background: #0055cc;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: bold;
  vertical-align: middle;
}

.main-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 14px 0;
  padding: 6px;
  background: #000;
  border: 3px inset #c0c0c0;
}

.main-menu a {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: #000;
  background: #c0c0c0;
  border-color: #fff #404040 #404040 #fff;
  border-style: solid;
  border-width: 3px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  text-decoration: none;
}

.main-menu a[aria-current="page"] {
  color: #ffff00;
  background: #800080;
}

main::before,
main::after {
  content: "* * * * * * * * * * * * * * * * * * * *";
  display: block;
  margin: 12px 0;
  color: #ff0000;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  text-align: center;
  letter-spacing: 2px;
}

.welcome-box,
.notice-board,
.link-grid,
.download-panel,
.safety-note {
  margin: 16px 0;
  padding: 14px;
  background: var(--panel);
  border: 3px groove #c0c0c0;
}

.notice-board table,
.download-panel table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 8px;
  border: 2px solid #000;
  vertical-align: top;
}

th {
  color: #fff;
  background: #800000;
  font-family: Arial, Helvetica, sans-serif;
}

.retro-icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  padding: 2px;
  background: #c0c0c0;
  border-color: #fff #404040 #404040 #fff;
  border-style: solid;
  border-width: 3px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.retro-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  color: #ffff00;
  background:
    linear-gradient(#000080 0 50%, #0000aa 50% 100%);
  border-color: #fff #404040 #404040 #fff;
  border-style: solid;
  border-width: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
}

code {
  overflow-wrap: anywhere;
  font-family: "Courier New", Courier, monospace;
  font-size: .9em;
}

.link-grid ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  list-style: none;
}

.link-grid li {
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  background: #e6e6fa;
  border: 2px dashed #000080;
}

.center-line {
  text-align: center;
}

.safety-note {
  background: #e0ffe0;
  border-color: #008000;
}

footer {
  margin-top: 16px;
  padding: 10px;
  color: #fff;
  background: #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .page-shell {
    width: calc(100% - 12px);
    margin-block: 6px;
    padding: 8px;
    box-shadow: none;
  }

  .main-menu,
  .link-grid ul {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
    text-shadow: 2px 2px 0 #ff00ff, 4px 4px 0 #000;
  }

  h2 {
    font-size: 24px;
  }

  .notice-board,
  .download-panel {
    overflow-x: auto;
  }

  table {
    min-width: 560px;
  }
}
