* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-color: #333 #111;
}

body {
  background: #111;
  color: #eee;
  font-family: monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  width: 100%;
}

.dim {
  color: #aaa;
}

.box a,
.page > nav a,
.error nav a {
  color: #aaa;
  text-decoration: none;
  margin: 0 0.25rem;
}

.box a:hover,
.page > nav a:hover,
.error nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.box {
  padding: 1rem;
  margin: 1rem auto;
  text-align: center;
  max-width: min(60ch, 100% - 2rem);
  width: 100%;
  background:
    linear-gradient(#333, #333) top left / 2px 1rem no-repeat,
    linear-gradient(#333, #333) top left / 1rem 2px no-repeat,
    linear-gradient(#333, #333) top right / 2px 1rem no-repeat,
    linear-gradient(#333, #333) top right / 1rem 2px no-repeat,
    linear-gradient(#333, #333) bottom left / 2px 1rem no-repeat,
    linear-gradient(#333, #333) bottom left / 1rem 2px no-repeat,
    linear-gradient(#333, #333) bottom right / 2px 1rem no-repeat,
    linear-gradient(#333, #333) bottom right / 1rem 2px no-repeat;
}

.box pre {
  margin-bottom: 1rem;
}

.box p {
  margin: 1rem 0 0.25rem;
  color: #888;
}

.box p.prose {
  text-align: left;
  line-height: 1.6;
  color: #ccc;
}

.box nav {
  margin-top: 0.25rem;
}

.badges {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.badges img {
  image-rendering: pixelated;
}

.error {
  text-align: center;
}

.error p:first-child {
  font-size: 2rem;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 1rem;
}

.page > pre {
  margin-bottom: 1rem;
}

.page > nav {
  margin-bottom: 1rem;
}

.page > .box {
  margin: 0;
}

.post-item {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  max-width: 60ch;
  width: 100%;
}

.post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-item .dim {
  font-size: 0.85em;
  white-space: nowrap;
}

.post-item .post-title {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  margin: 0;
  display: block;
}

.post-item .post-title:hover {
  text-decoration: underline;
}

.post-summary {
  display: block;
  color: #888;
  font-size: 0.9em;
  margin-top: 0.25rem;
}

.post-header {
  margin-bottom: 1rem;
}

.post-header .dim {
  white-space: nowrap;
  font-size: 0.85em;
}

.post {
  text-align: left;
  max-width: 120ch;
  overflow-wrap: break-word;
}

.blog-list {
  text-align: left;
}

.post h1 {
  margin: 1rem 0 0.25rem;
  font-size: 1.4em;
  color: #fff;
}

.post .prose {
  line-height: 1.7;
  color: #ccc;
}

.post .prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-size: 1.2em;
  color: #fff;
  border-bottom: 1px solid #333;
  padding-bottom: 0.25rem;
}

.post .prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1em;
  color: #eee;
}

.post .prose h4,
.post .prose h5,
.post .prose h6 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #ddd;
}

.post .prose p {
  margin: 1rem 0;
  color: #ccc;
}

.post .prose a {
  color: #8cf;
  margin: 0;
}

.post .prose a:hover {
  color: #bef;
}

.post .prose strong {
  color: #eee;
}

.post .prose em {
  color: #ddd;
}

.post .prose del {
  color: #777;
}

.post .prose code {
  background: #1a1a1a;
  border: 1px solid #333;
  padding: 0.1em 0.3em;
  font-size: 0.9em;
  color: #e8e8e8;
}

/* !important overrides chroma's inline background-color */
.post .prose pre {
  background: #0d0d0d !important;
  border: 1px solid #333;
  padding: clamp(0.5rem, 2vw, 1rem);
  margin: 1rem 0;
  overflow-x: auto;
  line-height: 1.5;
}

.post .prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85em;
}

.post .prose blockquote {
  border-left: 3px solid #444;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #999;
}

.post .prose blockquote blockquote {
  margin-top: 0.5rem;
}

.post .prose ul,
.post .prose ol {
  margin: 1rem 0;
  padding-left: 2rem;
  color: #ccc;
}

.post .prose ul {
  list-style: disc;
}

.post .prose ol {
  list-style: decimal;
}

.post .prose li {
  margin: 0.25rem 0;
}

.post .prose li ul,
.post .prose li ol {
  margin: 0.25rem 0;
}

.post .prose img {
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  display: block;
}

.post .prose hr {
  border: none;
  border-top: 1px solid #333;
  margin: 2rem 0;
}

.post .prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9em;
  display: block;
  overflow-x: auto;
}

.post .prose th,
.post .prose td {
  border: 1px solid #333;
  padding: 0.4rem 0.8rem;
  text-align: left;
  white-space: nowrap;
}

.post .prose th {
  background: #1a1a1a;
  color: #eee;
}

.post .prose td {
  color: #bbb;
}

.post .prose input[type="checkbox"] {
  margin-right: 0.5rem;
}

.post .prose .footnotes {
  margin-top: 2rem;
  border-top: 1px solid #333;
  padding-top: 1rem;
  font-size: 0.85em;
  color: #999;
}

.post .prose .footnotes > hr {
  display: none;
}

.post .prose .footnotes ol {
  padding-left: 1.5rem;
}

.post .prose .footnotes li {
  margin: 0.25rem 0;
}

.post .prose sup a,
.post .prose .footnote-backref {
  color: #8cf;
  text-decoration: none;
}

.post .prose sup a:hover,
.post .prose .footnote-backref:hover {
  text-decoration: underline;
}


