:root {
  --bg-body: #ffffff;
  --bg-main: #e4dbbf;
  --accent: #ed9106;
  --muted: #bfb494;
  --text: #000000;
  --link: #005f73;
  --hover: #0a9396;
  --visited: #9b5de5;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  display: flex;
  font-size: 16px;
  align-items: center;
  flex-direction: column;
  font-family: sans-serif;
  background-color: var(--bg-body);
  color: var(--text);
}

h1,
h2,
h3 {
  margin: 0;
  font-size: 1em;
}

h2 {
  font-size: 0.9rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:visited {
  color: var(--visited);
}

a:hover {
  color: var(--hover);
}

header,
main,
footer {
  width: 100%;
  display: flex;
  max-width: 64%;
  padding: 0.4em;
  flex-direction: column;
}

main {
  padding: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 16px;
  height: 100%;
  font-size: 0.8rem;
  background-color: var(--bg-main);
}

header {
  padding: 0.8em 0.4em;
  background-color: var(--accent);
}

footer {
  gap: 8px;
  flex-direction: row;
  padding: 0.8em 0.4em;
  justify-content: center;
  background-color: var(--bg-main);
  border-top: 2px solid var(--accent);
}

section {
  border-top: 1px solid var(--accent);
}

section > h2,
[data-htms] {
  padding: 0.8em 0.4em;
}

section:first-child {
  border-top: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul li,
article {
  padding: 0.4rem;
  transition: background 0.2s ease;
  border-top: 1px solid var(--muted);
}

ul li:hover,
article:hover {
  background: var(--muted);
}

.most-upvoted {
  background: var(--accent);
}
