@view-transition {
  navigation: auto;
}

html {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
    "DejaVu Sans Mono", monospace;
  font-weight: 375; /* compromise for windows */
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  background-color: whitesmoke;
}

body {
  margin: 0;
  padding: 1em;
}

/* main should be at least window height, because of navigation... */
main {
  min-height: 100vh;
}

article {
  background: white;
  border: solid 1px black;
  max-width: 30em;
  overflow: hidden; /* TODO: make so this isn't needed (iframe width etc.) */
}

p {
  margin: 1em;
}

p:has(img),
p:has(video) {
  margin: 0;
  line-height: 0;
}

article {
  margin-bottom: 1em;
  height: fit-content;
}

.posts-list {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(25em, 1fr));
  grid-template-rows: masonry;
}

.posts-list {
  display: masonry; /* this is for chrome */
}

.post-meta a {
  color: black;
  font-size: 0.75em;
  font-weight: 500;
  display: block;
  margin: 0 1em;
  border-bottom: 1px solid black;
  text-decoration: none;
  text-transform: uppercase;
  padding: 1em 0;
}

.post-meta a:visited {
  color: black;
}

.post-meta a:hover,
.post-meta a:focus {
  text-decoration: underline;
}

img,
video {
  background: repeating-conic-gradient(whitesmoke 0 25%, white 0 50%) 0 / 3em
    3em;
  width: 100%;
  height: auto;
}

summary {
  cursor: pointer;
}

.sitemap {
  background: center / cover no-repeat darkgreen url("/background.jpg"); /* FIXME: Change URL.*/
  border: solid 1px black;
  max-width: 31em;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15); /* black */
  position: sticky;
  margin-left: -0.5em;
  bottom: 1em;
  min-width: 10em;
}

.sitemap h2 {
  font-weight: 500;
  font-size: 1em;
  padding: 0.4em 1em;
  background: black;
  color: white;
  margin: 0;
  text-transform: uppercase;
  font-size: 12px;
}

summary::marker {
  content: "";
}

.sitemap ul {
  list-style: none;
}

.sitemap li {
  display: inline-block;
  margin: 0 0.5em 1em 0;
}

.sitemap a {
  text-decoration: none;
  color: black;
  background: white;
}

.sitemap a:hover,
.sitemap a:focus {
  text-decoration: underline;
}

.sitemap a:visited {
  color: black;
}

a {
  color: mediumblue;
}

a:visited {
  color: rebeccapurple;
}

a.faux-button,
a.reply-by-email {
  font-family: system-ui, sans-serif;
  font-size: 1em;
  background-color: gainsboro;
  color: black;
  border: 1px solid black;
  border-radius: 3px;
  box-shadow: inset 1px 1px 0 gainsboro, inset 2px 2px 0 white,
    inset -1px -1px 1px dimgray;
  padding: 2px 10px;
  min-width: 58px;
  text-align: center;
  font-weight: bold;
  text-decoration: none !important;
  text-wrap: nowrap;
}

a.faux-button:active,
a.reply-by-email:active {
  background-color: gray;
  color: white;
  box-shadow: inset 1px 1px 1px dimgray, inset -1px -1px 1px darkgray;
}

button,
input {
  font-size: 1em;
}
