* {
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--heading-color);
  font-family: "Verdana", sans-serif;
}

b,
strong {
  color: var(--strong-color);
}

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

html {
  color: var(--default-color);
  font-family: "Georgia", serif;
  font-size: 1.2em;
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: var(--background-color);
}

body {
  max-width: 800px;
  overflow-x: scroll;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 2.5em;
  margin-bottom: 10px;
  /* text-align: center; */
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: left;
  font-size: 1.2em;
  margin-bottom: 20px;
}

pre {
  overflow-x: scroll;
}

img {
  max-width: 100vw;
}

.block {
  border: 1px dotted white;
  padding: 5px 15px;
  margin: 0 10px;
}

.block h1 {
  font-size: 1em;
  text-align: center;
  margin-bottom: 0;
}

.small {
  font-size: 0.8em;
}

.wave {
  background: #111;
  color: #fff;
  text-shadow: 1px 1px 10px #fff, 1px 1px 10px #ccc;
}

footer {
  margin-top: 30px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* overflows the flex intentionally */
footer > hr {
  align-self: flex-start;
  width: 100%;
  height: 3px;
  color: #ccc;
  background: #ccc;
  border: none;
}

footer > div {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: 25%; /* make sure it looks like a column, even if content is narrow */
  gap: 10px;
}

footer p {
  margin: 0; /* just follow gap settings */
}

.social-link {
  /* treat as one word for wrapping purposes; we only want to break when absolutely necessary for reflow */
  word-break: keep-all;
  display: flex;
  gap: 5px;
  align-items: center;
}

.social-link img {
  height: 1em;
  width: 1em;
}

table {
  border-collapse: collapse;
}

td {
  border: 2px solid #333;
  padding: 5px;
}

th {
  border: 2px solid #333;
  border-bottom: 3px solid #777;
  padding: 5px;
}

.light-only {
  display: none;
}
.dark-only {
  display: initial;
}
@media (prefers-color-scheme: light) {
  .light-only {
    display: initial;
  }
  .dark-only {
    display: none;
  }
}

:root {
  --heading-color: #ddd;
  --strong-color: #fff;
  --link-color: #eee;
  --default-color: #ccc;
  --background-color: #111;
}
/* for now light theme inverts colours */
@media (prefers-color-scheme: light) {
  :root {
    --heading-color: #222;
    --strong-color: #000;
    --link-color: #111;
    --default-color: #333;
    --background-color: #eee;
  }
}
