*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  line-height: calc(1em + 0.9rem);
  margin: 0;
}

:root {
  font-size: 10px;
  -webkit-text-size-adjust: 100%;
  --color-bg-body: #202120;
  --color-table-border: #5B927E;
  --color-text: #CAD4BF;
  --color-text-accent: #CE9C3C;
  --color-text-middle-space: #5B927E;
  --gutter: 2rem;
  --table-cell-padding: 0.5rem;
  --type-base: 1.2em;
  --type-family-body: monospace;
  --type-large: 200%;
}

body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  background-color: var(--color-bg-body);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  font-family: var(--type-family-body);
  font-size: var(--type-base);
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

main,
footer {
  padding: var(--gutter);
}

footer {
  text-align: center;
}

main > header {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

main > header > img {
  border-radius: 1.8rem;
  display: block;
  height: auto;
  margin-inline-end: var(--gutter);
  max-width: 100%;
}

h1 {
  font-size: var(--type-large);
  margin-top: var(--gutter);
}

table,
th,
td {
  border: 1px solid var(--color-table-border);
}

table {
  margin: var(--gutter) auto;
  max-width: 96rem;
  table-layout: fixed;
  border-collapse: collapse;
}

th,
td {
  padding: var(--table-cell-padding);
  text-align: center;
  width: 20%;
  overflow: hidden;
}

th {
  font-weight: normal;
  height: 5rem;
}

td {
  position: relative;
}

td > div {
  align-items: center;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  max-width: 100%;
}

a {
  color: var(--color-text-accent);
  text-underline-offset: 0.3rem;
}

a:hover,
a:focus {
  filter: brightness(150%);
}

.space-middle {
  color: var(--color-text-middle-space);
}

@media (min-width: 480px) {
  :root {
    --type-base: 1.6em;
  }

  main > header {
    flex-direction: row;
  }

  h1 {
    margin-top: 0;
  }
}

@media print {
  :root {
    --type-base: 1.2em;
  }

  main,
  table {
    margin: 0;
  }

  main > header {
    display: none;
  }

  table {
    width: 100%;
  }

  .space-middle {
    color: inherit;
  }
}
