body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  font-size: 1rem;
  background-color: #fdfdfd;
  color: #111;
  padding: 0 1rem;
}

.discover-header { margin-top:1rem; }
.discover-title { font-size:1.4rem; margin:0 0 .5rem; font-weight:600; }
.discover-nav { list-style:none; padding:0; margin:.2rem 0 1rem; display:flex; flex-wrap:wrap; gap:.75rem; font-size:.75rem; }
.discover-nav a { text-decoration:none; color:#444; }
.discover-nav a:hover { text-decoration:underline; }
.discover-intro { font-size:.8rem; color:#555; margin:.25rem 0 1.25rem; max-width:42rem; }
.discover-list { list-style:none; padding:0; margin:0 0 2rem; }
.discover-list li { display:flex; gap:.6rem; padding:.35rem 0; border-bottom:1px solid #eee; }
.discover-rank { width:2ch; text-align:right; font-weight:600; font-size:.75rem; color:#888; padding-top:.15rem; }
.discover-item { flex:1; min-width:0; }
.post-title { font-weight:600; color:#0057ae; text-decoration:none; }
.post-title:hover { text-decoration:underline; }
.post-meta { font-size:.65rem; color:#666; display:flex; flex-wrap:wrap; gap:.35rem; align-items:center; margin-top:.2rem; }
.post-meta a { color:inherit; text-decoration:none; }
.post-meta a:hover { text-decoration:underline; }
.post-meta .sep { opacity:.4; }
.empty { font-size:.85rem; color:#666; }

@media (prefers-color-scheme: dark) {
  .discover-nav a { color:#bbb; }
  .discover-intro { color:#aaa; }
  .discover-list li { border-color:#222; }
  .discover-rank { color:#666; }
  .post-meta { color:#888; }
  .empty { color:#888; }
}

@media (min-width: 801px) {
  main,
  :root {
    margin-left: auto;
    margin-right: auto;
    max-width: 50rem;
    padding: 2rem 1.2rem;
    padding-top: 0;
  }
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

a {
  color: #0057ae;
  text-decoration: underline;
}
a:hover {
  text-decoration: none;
}

.comment {
  font-size: 0.875rem;
  color: #666;
}

img.emoji {
  height: 1.2em;
  width: 1.2em;
  vertical-align: -0.1em;
  margin: 0 0.05em 0 0.1em;
}

abbr {
  text-decoration: none;
}

#button img {
  width: 300px;
  margin-top: 25px;
}

.milkdown .editor,
milkdown-code-block {
  background-color: #fdfdfd;
  padding: 1rem;
  border-radius: 0.5rem;
}

footer {
  border-top: 1px solid #e0e0e0;
}

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

thead th {
  text-align: left;
  padding-bottom: 8px;
  border-bottom: 1px solid #ccc;
}

tbody td {
  padding: 8px 0;
  font-size: 0.9em;
}

tbody tr:not(:last-child) {
  border-bottom: 1px solid #eee;
}

tbody tr:hover {
  background-color: #f9f9f9;
}

td:last-child {
  text-align: right;
}

.actions a {
  margin-left: 8px;
  text-decoration: none;
  color: #007bff;
  font-size: 0.85em;
}

.actions a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212 !important;
    color: #e0e0e0;
  }
  a,
  a:visited {
    color: #9dcaff;
  }
  a:hover {
    color: #b3d6ff;
  }

  .milkdown .editor,
  milkdown-code-block {
    background-color: #1e1e1e;
    border: 1px solid #333;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
  }
  .milkdown .ProseMirror {
    padding: 1rem !important;
    border-radius: 0 !important;
  }
  .comment {
    color: #aaa;
  }
  tbody tr:hover {
    background-color: transparent !important;
  }
}
