/* Color Variables */

:root {
  color-scheme: light dark;

  --back: #fff;
  --fore: #444;
  --low: #eee;
  --contrast: #000;
  --link: #00e;

  font-size: 16px;
}

/* Dark Mode */

@media (prefers-color-scheme: dark) {
  :root {
    --back: #000;
    --fore: #bbb;
    --low: #222;
    --contrast: #fff;
    --link: #0cd;
  }
}

:target {
  outline: 2px dotted red;
}

body {
  min-height: 100vh;
  max-width: 55ch;
  margin: auto;
  padding: 2ch;
  line-height: 1.4;
  background-color: var(--back);
  color: var(--fore);
}

header {
  text-align: center;

  h1 {
    font-family: serif;
    font-style: italic;

    a:any-link {
      color: var(--fore);
      text-decoration: none;
    }
  }
}

code {
  background-color: var(--low);
  color: var(--contrast);
  padding: 0.1ch 0.3ch;
  border-radius: 4px;
}

strong {
  color: var(--contrast);
}

li {
  margin: 1ch 0;
}

figure {
  text-align: center;

  img {
    background-color: white;
  }
}

img {
  width: 100%;
  height: auto;
}

.thumb {
  max-width: 120px;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

thead {
  border-bottom: 1px solid var(--low);
}

tbody tr {
  border-top: 1px solid var(--low);
}

th,
td {
  padding: 8px;
}

footer {
  margin: 6ch 0;
  border-top: 2px solid var(--fore);
  border-radius: 8px;
  padding: 0 1ch;
}

:any-link {
  color: var(--link);
  text-decoration-line: none;

  &[href^="http://"],
  &[href^="https://"] {
    text-decoration-line: underline;
  }
}

.term {
  display: inline-block;
}
