/* 42dot Sans variable normal latin */
@font-face {
  font-family: '42dot Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/42dot-sans:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}


:root {
  font-size: min(4svw,18px);
  --spacing: 1em;
  line-height: 1.5;

  color-scheme: light dark;
}

body, button, input, select {
  font-family: '42dot Sans', sans-serif;
}

body {
  background: Canvas;
  display: grid;
  gap: var(--spacing);
  justify-content: center;
  justify-items: center;
  margin: 0;
}

body > header, main, footer {
  padding: 0 var(--spacing);
}

nav {
  padding: 0.5lh 0;
}

p:first-child {
    margin-top: 0;
}

small {
  font-weight: normal;
}

footer {
  margin-top: 10svh;
}

.description {
  font-style: italic;
}

#filter {
  & #category {
    max-width: calc(100svw - 13em);
  }
  & p {
    margin: 0.5lh 0;
  }
}

#modes {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  width: 100%;
  margin: 0;
}

#classify {
  & .place-name {
    font-size: 1.5rem;
    height: 3em;
    text-align: center;
    font-weight: bold;
  }
  
  & button.undo {
    font-size: small;
  }

  & .description {
    height: 2lh;
  }
  
  & #controls {
    display: grid;
    justify-items: center;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing);
  
    & .undo {
      grid-column: span 2;

      &:disabled {
        visibility: hidden;
      }
    }
  }
}

#controls button {
  padding: 1rem;
  width: 10em;
}

button, input, select {
    font-size: inherit;
    font-family: inherit;
}


#comparison #places {
    display: flex;
    gap: calc(3 * var(--spacing));
    flex-wrap: wrap;
    justify-content: center;
}
#comparison .choice {
    border: medium solid;
    padding: var(--spacing);
    border-radius: var(--spacing);
    cursor: pointer;
    max-width: 10em;
}
#comparison .choice h2 {
    margin-top: 0;
}

#comparison .choice button {
    display: block;
    width: 100%;
    border: none;
    background: none;
    font-size: 1.3em;
    cursor: pointer;
}


#leaderboard table {
    font-variant: tabular-nums;
    border-collapse: collapse;
}

#leaderboard td:not(:first-child) {
    text-align: right;
}

#leaderboard tr > :first-child {
  padding-left: var(--spacing);
}

#leaderboard tbody tr:is(:nth-child(4n+1),:nth-child(4n+2)) {
  background: #eee;
}

#leaderboard .description {
  font-size: small;
}