/* HN Stories */

h1 {
  font-size: 1.6rem;
  margin-bottom: 0;
}

ul.hn-posts {
  list-style-type: none;
  padding: unset;
}

ul.hn-posts li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

ul.hn-posts li > .hn-meta {
  flex: none;
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.1rem;
  text-decoration: none;
  color: inherit;
}

ul.hn-posts li > .hn-meta:hover {
  text-decoration: underline;
}

ul.hn-posts li a:visited {
  color: var(--link-visited);
}

.hn-points {
  font-size: 0.8em;
  color: #888;
}

.hn-range {
  display: inline-flex;
  margin-left: 0.3rem;
  gap: 0.3rem;
  vertical-align: baseline;
}

.hn-range-btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid currentColor;
  background: none;
  color: inherit;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  line-height: 1.4;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.hn-range-btn:hover:not(.hn-range-active) {
  opacity: 0.75;
}

.hn-range-btn.hn-range-active {
  opacity: 1;
  background: var(--accent);
  color: Canvas;
  border-color: var(--accent);
}

@media (min-width: 768px) {
  ul.hn-posts li {
    flex-direction: row;
    align-items: baseline;
  }

  ul.hn-posts li > .hn-meta {
    flex: 0 0 24ch;
    flex-direction: column;
    width: auto;
    justify-content: initial;
    align-items: initial;
    margin-bottom: 0;
    order: -1;
  }
}
