*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --neutral: #808080;
  --accent: #0366e6;

  --dark: #111111;
  --light: #eeeeee;

  --dark-gray: #222222;
  --light-gray: #dddddd;

  --border: 1px solid var(--dark);

  --space-xs: 0.25rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: 6rem;

  font-family:
    InterVariable,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue";

  font-feature-settings:
    "liga" 1,
    "calt" 1; /* fix for Chrome */
}

@supports (font-variation-settings: normal) {
  :root {
    font-family:
      InterVariable,
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      Roboto,
      Oxygen,
      Ubuntu,
      Cantarell,
      "Open Sans",
      "Helvetica Neue",
      sans-serif;
  }
}

body {
  max-width: 48rem;
  min-height: 100vh;
  width: 100%;
  height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  color: var(--foreground);
  background: var(--background);

  word-break: break-word;
  word-wrap: break-word;
}

main {
  margin: var(--space-xl) 0;
}

a,
p,
h1,
h2,
h3,
h4 {
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4 {
  line-height: 1;
}

h1 {
  font-size: calc(4vw + 4vh + 2vmin);
  margin-top: var(--space-l);
  margin-bottom: var(--space-m);
}

h2 {
  font-size: calc(3vw + 3vh + 0.75vmin);
  margin-top: var(--space-m);
  margin-bottom: var(--space-s);
}

h3 {
  font-size: calc(2vw + 2vh + 0.5vmin);
}

h4 {
  font-size: 1rem;
  margin-top: var(--space-s);
}

p,
button,
li {
  font-size: 1.125rem;
}

.accent {
  color: var(--neutral);
}

.lead {
  font-size: 1.5rem;
  color: var(--neutral);
}

#logo {
  color: var(--accent);
  font-size: 1.5rem;

  &:hover {
    text-decoration: none !important;
  }
}

nav,
button,
.button {
  font-weight: 470;
  border-radius: 6px;
}

nav,
footer {
  background: inherit;
  color: inherit;
  font-size: 0.875rem !important;

  max-width: inherit;

  a {
    color: var(--foreground);
    text-decoration: none;
    text-underline-offset: var(--space-xs);

    &:hover {
      color: var(--accent);
      text-decoration: underline;
      text-decoration-style: dashed;
      text-decoration-color: var(--accent);
    }
  }
}

nav {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  padding: var(--space-s) 0;

  margin: auto;

  display: flex;
  justify-content: space-between;
  align-items: center;

  text-transform: uppercase;
  padding: var(--space-s) var(--space-s);
}

footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: 0 0 var(--space-m) 0;

  div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-s);
    justify-content: center;
  }
}

button,
.card {
  border: none;
  border-radius: 6px;
}

button,
.button {
  cursor: pointer;
  display: inline-block;
  padding: 0.25rem 0.8rem;
  text-decoration: none;
  user-select: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.button-accent {
  background: var(--accent);
  color: var(--light);

  &:hover {
    color: var(--light);
  }
}

.card {
  background: var(--accent);
  padding: var(--space-xs);

  h2 {
    margin-top: 0;
    font-size: 2rem;
  }
}
.card-inner {
  padding: var(--space-s);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border: 1px dashed transparent;

  color: var(--light) !important;
  text-decoration: none !important;

  .card-price {
    text-align: end;
    font-weight: 500;
  }

  &:hover {
    color: var(--light) !important;
    border: 1px dashed var(--light);
  }
}

table,
.cards-grid {
  margin-top: var(--space-m) !important;
}

table {
  width: 100%;
  color: var(--foreground);
}

th,
td {
  padding: 0.25rem 0.8rem;
}
th {
  background-color: var(--accent);
  color: var(--light);
}
tr:nth-child(even) {
  background: var(--row-color);
  color: var(--foreground);
}

td {
  text-align: center;
}

article {
  /*
  h1 {
    font-size: calc(3.2vw + 3.2vh + 0.75vmin);
    margin-top: var(--space-m);
    margin-bottom: var(--space-s);
  }*/

  h2 {
    font-size: calc(2vw + 2vh + 0.5vmin);
  }

  h3 {
    font-size: 1.2rem;
    margin-top: var(--space-s);
  }

  display: flex;
  flex-direction: column;
  gap: var(--space-s);

  p {
    line-height: 1.5;
  }

  ul {
    list-style-type: "×   ";
  }

  li {
    line-height: 1.25;
    list-style-position: inside;
    &::marker {
      color: var(--neutral);
    }
  }

  a,
  a:not(.card) {
    color: var(--foreground);
    text-decoration: underline;
    text-decoration-color: var(--neutral);
    text-underline-offset: var(--space-xs);

    &:hover {
      color: var(--accent);
      text-decoration-style: dashed;
      text-decoration-color: var(--accent);
    }
  }

  small {
    color: var(--neutral);
    line-height: 1 !important;
  }

  .footnotes {
    margin-top: var(--space-m);
    padding-top: var(--space-m);

    ol {
      li {
        font-size: 0.875rem;
      }
    }
  }

  #footnote-label {
    display: none;
  }
}

img {
  width: 100%;
  height: fit-content;
  margin: var(--space-m) 0;
}

@media (prefers-color-scheme: light) {
  :root {
    --foreground: var(--dark);
    --background: var(--light);
    --row-color: var(--light-gray);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --foreground: var(--light);
    --background: var(--dark);

    --row-color: var(--dark-gray);
  }
}

@media (max-width: 48rem) {
  body {
    padding: 0 var(--space-s);
  }
  .cards-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (min-width: 48rem) {
  body {
    padding: 0;
  }

  .cards-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-s);
  }
}
