:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', sans-serif;
  color: #242424;
  background: #fff;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}
.brand {
  height: 160px;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
}
main {
  max-width: 752px;
  margin: 0 auto;
  padding: 24px 16px;
}
.listing {
  padding-top: 0;
}
.post-card {
  padding: 28px 16px 10px;
  border-bottom: 1px solid #ddd;
}
.post-preview {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.post-preview h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.6;
}
.post-preview p {
  margin: 0;
  color: #777;
  font-size: 14px;
}
.post-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  color: #777;
  font-size: 14px;
}
time {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #888;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}
.pagination a {
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.pagination [aria-current] {
  background: #777;
  color: white;
}
footer {
  max-width: 752px;
  margin: 24px auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: #777;
  font-size: 14px;
}
footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 4px double #aaa;
  padding-top: 16px;
  width: 100%;
}
.header-icon {
  display: flex;
  align-items: center;
}
.header-icon svg {
  width: 24px;
  height: 24px;
}
.footer-tools {
  display: contents;
}
.footer-tools summary {
  cursor: pointer;
  list-style: none;
}
.footer-tools summary::-webkit-details-marker {
  display: none;
}
.footer-tools summary:hover {
  text-decoration: underline;
}
.tool-links {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.prose ol,
.prose ul {
  padding-inline-start: 1.8em;
}
.prose li {
  margin: 0.4em 0;
}
.prose {
  overflow-wrap: anywhere;
}
.prose h1 {
  font-size: 2em;
}
.prose h2 {
  font-size: 1.5em;
}
.prose h3 {
  font-size: 1.2em;
}
.prose h1,
.prose h2,
.prose h3 {
  margin: 1.2em 0 0.6em;
  line-height: 1.4;
  scroll-margin-top: 60px;
}
.prose p {
  margin: 0.8em 0;
}
.prose a {
  color: #2384d1;
}
.prose figure {
  margin: 24px 0;
}
.prose img,
.prose video {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
figcaption {
  text-align: center;
  color: #888;
  font-size: 13px;
}
pre {
  overflow-x: auto;
  padding: 20px;
  background: #f4f4f4;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: normal;
  tab-size: 2;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
:not(pre) > code {
  padding: 2px 5px;
  border-radius: 3px;
  background: #eee;
}
blockquote {
  border-left: 3px solid #aaa;
  padding-left: 20px;
  margin: 20px 0;
  color: #777;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
}
th,
td {
  border: 1px solid #ccc;
  padding: 8px;
}
.neighbors {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid #ddd;
  margin-top: 24px;
}
.neighbors > * {
  flex: 1;
}
.neighbors > :last-child {
  text-align: right;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.tag-cloud small {
  color: #999;
}
.comments {
  padding-top: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color: #ddd;
    background: #181818;
  }
  header {
    background: #181818;
  }
  pre,
  :not(pre) > code {
    background: #262626;
  }
  .post-card,
  .neighbors {
    border-color: #444;
  }
}
@media (max-width: 480px) {
  .post-card {
    padding-left: 0;
    padding-right: 0;
  }
  .post-preview {
    gap: 12px;
  }
  .prose h1 {
    font-size: 1.7em;
  }
}

/* Generic code-block markup is themed by this site's stylesheet. */
.tio-code-block {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  margin: 20px 0;
}
.tio-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  gap: 12px;
  font-size: 12px;
  background: #f4f4f4;
}
.tio-code-toolbar fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 4px;
}
.tio-code-toolbar label {
  font: inherit;
  color: inherit;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 4px 8px;
}
.tio-code-toolbar label:has(input:checked) {
  background: #ddd;
}
.tio-code-body {
  min-width: 0;
}
.tio-code-source,
.tio-code-preview {
  min-width: 0;
  overflow: auto;
}
.tio-code-source pre {
  margin: 0;
  border-radius: 0;
}
.shiki {
  background: var(--shiki-light-bg);
  color: var(--shiki-light);
}
.shiki span {
  color: var(--shiki-light);
}
.tio-code-block:has(input[value='split']:checked) .tio-code-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.tio-code-preview {
  padding: 12px;
}
.tio-code-preview iframe {
  width: 100%;
  height: 360px;
  border: 0;
  background: white;
}
.tio-code-preview img {
  max-width: 100%;
  height: auto;
}
/* Native radios retain all three Mermaid modes without JavaScript. */
.tio-code-block:has(input[value='code']:checked) .tio-code-preview,
.tio-code-block:is([data-code-preview='mermaid'], [data-html-ready]):has(
    input[value='preview']:checked
  )
  .tio-code-source,
.tio-code-block[data-code-preview='html']:not([data-html-ready]) .tio-code-preview {
  display: none;
}
.tio-code-block[data-code-preview='html']:not([data-html-ready]) .tio-code-body {
  display: block;
}
@media (prefers-color-scheme: dark) {
  .tio-code-block {
    border-color: #444;
  }
  .tio-code-toolbar {
    background: #262626;
  }
  .tio-code-toolbar label:has(input:checked) {
    background: #444;
  }
  .shiki {
    background: var(--shiki-dark-bg);
    color: var(--shiki-dark);
  }
  .shiki span {
    color: var(--shiki-dark);
  }
}
@media (max-width: 600px) {
  .tio-code-block:has(input[value='split']:checked) .tio-code-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
