:root {
  color-scheme: light;
  --bg: #fffff8;
  --fg: #111111;
  --muted: #666666;
  --line: #cccccc;
  --link: #0056b3;
  --link-hover: #007bff;
  --surface: #f6f8fa;
  --surface-strong: #ebebeb;
  --input-bg: #ffffff;
  --chip-bg: #f6f8fa;
  --chip-fg: #656d76;
  --btn: #242424;
  --btn-hover: #444444;
  --btn-fg: #ffffff;
  --nav-bg: #fffff8;
  --code-bg: #ebebeb;
  --code-fg: #111111;
  --blog-bg: var(--bg);
  --blog-fg: var(--fg);
  --blog-muted: var(--muted);
  --blog-line: var(--line);
  --blog-link: var(--link);
  --blog-link-hover: var(--link-hover);
  --blog-code: var(--code-bg);
  --article-code-bg: #eceef0;
  --article-code-fg: #2b2f33;
  --article-code-rule: #2b2f33;
  --article-scrollbar-track: #d9dcdf;
  --article-scrollbar-thumb: #737980;
  --article-tldr-bg: #f1f6fb;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1a1a;
  --fg: #e0e0e0;
  --muted: #a0a0a0;
  --line: #444444;
  --link: #4d9eff;
  --link-hover: #78b7ff;
  --surface: #252525;
  --surface-strong: #303030;
  --input-bg: #252525;
  --chip-bg: #21262d;
  --chip-fg: #aeb8c4;
  --btn: #e0e0e0;
  --btn-hover: #ffffff;
  --btn-fg: #1a1a1a;
  --nav-bg: #252525;
  --code-bg: #3c3c3c;
  --code-fg: #e0e0e0;
  --article-code-bg: #25282b;
  --article-code-fg: #e3e6e8;
  --article-code-rule: #a8adb2;
  --article-scrollbar-track: #35393d;
  --article-scrollbar-thumb: #858b91;
  --article-tldr-bg: #202831;
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.site-shell {
  margin: 0 auto;
  max-width: 52.5rem;
  padding: 0 1.25rem;
}

.site-header {
  align-items: center;
  border-bottom: 2px groove var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.brand {
  align-items: center;
  display: inline-flex;
}

.brand-name {
  color: var(--fg);
  font-size: 1.4rem;
  font-variant: small-caps;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 0.6rem;
}

.nav-link {
  border-bottom: 1px solid transparent;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.4;
}

.nav-link:hover {
  border-bottom-color: var(--link-hover);
  text-decoration: none;
}

.nav-link.is-active {
  border-bottom-color: currentColor;
}

.nav-separator {
  color: var(--muted);
  line-height: 1;
  user-select: none;
}

.theme-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 1.15rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 2rem;
}

.theme-toggle:hover {
  color: var(--link-hover);
}

.theme-icon-wrap,
.theme-icon {
  display: block;
  height: 1.15rem;
  width: 1.15rem;
}

.theme-icon {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: 0.25rem;
}

.menu-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: none;
  padding: 0;
}

.menu-line {
  background: var(--fg);
  display: block;
  height: 2px;
  margin: 5px 0;
  width: 24px;
}

.main-content {
  min-height: 60vh;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.3rem 0 2rem;
}

.footer-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.35rem;
  justify-content: center;
  text-align: center;
}

.home-contact {
  align-items: center;
  display: flex;
  margin-top: 0.45rem;
}

.social-links {
  align-items: center;
  display: flex;
  gap: 0.25rem;
}

.social-link {
  align-items: center;
  border-radius: 0.25rem;
  color: var(--muted);
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.social-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.social-link:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.social-icon {
  display: block;
  fill: none;
  flex: 0 0 auto;
  height: 1.125rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  width: 1.125rem;
}

.social-icon-brand {
  fill: currentColor;
  stroke: none;
}

.about-contact {
  margin-top: -0.75rem;
}

.about-contact .social-links {
  gap: 0.4rem;
}

.about-contact .social-link {
  border: 1px solid var(--line);
}

.home-wrap {
  color: var(--fg);
  padding: 1.25rem 0 2rem;
}

.home-intro {
  font-size: 1.22rem;
  line-height: 1.52;
  margin-top: 1rem;
  max-width: 70ch;
  text-align: justify;
}

.home-intro p {
  margin: 0;
}

.home-intro-note {
  margin-top: 0.45rem !important;
}

.palindrome-name {
  border-radius: 0.15rem;
  cursor: help;
  display: inline-block;
  position: relative;
}

.palindrome-letters {
  text-decoration-color: var(--link);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.palindrome-name:focus-visible {
  outline: 1px dotted var(--link);
  outline-offset: 0.2rem;
}

.palindrome-letter {
  display: inline-block;
}

.palindrome-name.is-animating .palindrome-letter-outer {
  animation: palindrome-pair 260ms ease 0ms both;
}

.palindrome-name.is-animating .palindrome-letter-inner {
  animation: palindrome-pair 260ms ease 210ms both;
}

.palindrome-name.is-animating .palindrome-letter-center {
  animation: palindrome-pair 260ms ease 420ms both;
}

.palindrome-tooltip {
  background: var(--fg);
  border-radius: 0.3rem;
  bottom: calc(100% + 0.5rem);
  color: var(--bg);
  font-size: 0.74rem;
  font-style: normal;
  left: 0;
  line-height: 1.35;
  opacity: 0;
  padding: 0.4rem 0.55rem;
  pointer-events: none;
  position: absolute;
  text-align: left;
  transform: translateY(0.25rem);
  transition: opacity 140ms ease, transform 140ms ease;
  visibility: hidden;
  white-space: nowrap;
  z-index: 10;
}

.palindrome-name:hover .palindrome-tooltip,
.palindrome-name:focus-visible .palindrome-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

@keyframes palindrome-pair {
  0%,
  100% {
    color: inherit;
    transform: translateY(0);
  }

  40%,
  60% {
    color: var(--link);
    transform: translateY(-0.1em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .palindrome-name.is-animating .palindrome-letter {
    animation: none;
  }

  .palindrome-tooltip {
    transition: none;
  }
}

.home-sections {
  display: grid;
  gap: 2.5rem;
  margin-top: 1.7rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 0.8rem;
}

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

.home-row td {
  font-size: 1.08rem;
  padding: 0.24rem 0;
  vertical-align: top;
}

.home-date {
  color: var(--muted);
  width: 8.5rem;
}

.home-title {
  padding-left: 0.8rem;
}

.newsletter-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-top: 2.5rem;
  text-align: center;
}

.newsletter-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.newsletter-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.newsletter-input {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  color: var(--fg);
  font-size: 0.9rem;
  min-width: 18rem;
  padding: 0.55rem 0.6rem;
}

.newsletter-btn {
  background: var(--btn);
  border: 0;
  border-radius: 0.4rem;
  color: var(--btn-fg);
  cursor: pointer;
  font-weight: 600;
  padding: 0.58rem 0.9rem;
}

.newsletter-btn:hover {
  background: var(--btn-hover);
}

.newsletter-btn:disabled,
.newsletter-input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.page-block {
  padding: 2rem 0;
}

.page-head {
  margin-bottom: 1.2rem;
}

.page-head h1,
.article-header h1 {
  font-size: clamp(2.15rem, 5vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.page-head p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.search-wrap {
  margin-top: 1rem;
  max-width: 34rem;
}

.search-wrap input {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--fg);
  font-size: 1rem;
  padding: 0.62rem 0.75rem;
  width: 100%;
}

.search-status {
  color: var(--muted);
  font-size: 0.93rem;
  margin-top: 0.75rem;
}

.post-listing {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}

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

.writing-archive .post-item {
  padding: 0.72rem 0;
}

.writing-head {
  align-items: center;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  margin-bottom: 1.1rem;
}

.writing-head h1 {
  font-size: clamp(1.7rem, 3vw, 1.9rem);
  line-height: 1.15;
}

.writing-head .search-status {
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0.25rem 0 0;
}

.writing-search {
  justify-self: end;
  margin-top: 0;
  max-width: none;
  width: 100%;
}

.writing-search input {
  font-size: 0.92rem;
  height: 2.55rem;
  line-height: 1.25;
  padding: 0.5rem 0.7rem;
}

.archive-post-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 7.8rem minmax(0, 1fr);
}

.archive-post-date {
  align-self: start;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0.18rem 0 0;
  white-space: nowrap;
}

.archive-post-date dd {
  margin: 0;
}

.archive-post-content {
  min-width: 0;
}

.archive-post-content h2 {
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}

.archive-post-summary {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-post-topics {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.15rem 0.65rem;
  line-height: 1.3;
  margin-top: 0.2rem;
}

.archive-post-topics a {
  color: var(--link);
}

.archive-pagination {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 1.5rem;
}

.archive-pagination[hidden] {
  display: none;
}

.pagination-pages {
  display: flex;
  gap: 0.35rem;
}

.pagination-direction,
.pagination-number {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 2.25rem;
  text-decoration: none;
}

.pagination-direction {
  padding: 0.25rem 0.4rem;
}

.pagination-number {
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  min-width: 2.25rem;
  padding: 0.25rem 0.5rem;
}

.pagination-number:hover {
  border-color: var(--link);
  text-decoration: none;
}

.pagination-number.is-current {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  font-weight: 700;
}

.pagination-direction.is-disabled {
  color: var(--muted);
  opacity: 0.55;
}

.topics-wrap {
  max-width: 61rem;
}

.topic-directory {
  display: grid;
  gap: 0 2.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.topic-directory-link {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  line-height: 1.3;
  min-height: 2.75rem;
  overflow-wrap: anywhere;
  padding: 0.64rem 0.1rem;
  text-decoration: none;
}

.topic-directory-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.topic-directory-link.is-empty {
  color: var(--muted);
  cursor: default;
}

.topic-directory-link.is-empty:hover {
  color: var(--muted);
}

.topic-directory-link:focus-visible {
  border-radius: 0.15rem;
  outline-offset: 0.2rem;
}

.topic-directory-name {
  min-width: 0;
}

.topic-directory-count {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.topic-archive-head {
  margin-bottom: 1.1rem;
}

.topic-archive-heading {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.topic-archive-heading h1 {
  font-size: clamp(1.7rem, 3vw, 1.9rem);
  line-height: 1.15;
}

.topic-archive-heading p {
  flex: 0 0 auto;
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0;
}

.topics-back-link {
  display: inline-block;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.not-found {
  margin: 0 auto;
  max-width: 36rem;
  padding-bottom: 4rem;
  padding-top: 4rem;
  text-align: center;
}

.not-found-code {
  color: var(--link);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 0.45rem;
}

.not-found h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.not-found > p:not(.not-found-code) {
  color: var(--muted);
  margin: 0.75rem 0 1.25rem;
}

.not-found-links {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: center;
}

.not-found-links span {
  color: var(--muted);
}

.article-wrap {
  margin: 0 auto;
  max-width: 66rem;
  padding-bottom: 2.5rem;
}

.article-header {
  text-align: center;
}

.article-header time {
  color: var(--muted);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.article-meta {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin: 1.3rem 0;
  padding: 0.7rem 0;
  text-align: center;
}

.prose-wrap {
  color: var(--fg);
  font-size: 1.16rem;
  line-height: 1.62;
}

.prose-wrap h1,
.prose-wrap h2,
.prose-wrap h3,
.prose-wrap h4 {
  line-height: 1.35;
  margin-top: 1.5rem;
}

.prose-wrap p,
.prose-wrap li {
  text-align: justify;
}

.prose-wrap pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--code-fg);
  overflow-x: auto;
  padding: 0.9rem;
}

.prose-wrap code {
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: 0.3rem;
  font-size: 0.9em;
  padding: 0.1rem 0.25rem;
}

.prose-wrap pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.code-block {
  margin: 1.35rem 0;
  max-width: 100%;
  min-width: 0;
  position: relative;
}

.prose-wrap .code-block pre,
.blog-page .article-body .code-block pre {
  margin: 0;
}

.code-copy-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 0.55rem;
  top: 0.55rem;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  width: 2rem;
  z-index: 2;
}

.code-copy-icon {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1rem;
}

.code-copy-button:hover {
  background: var(--surface-strong);
  border-color: var(--muted);
}

.code-copy-button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.code-copy-button.is-copied {
  border-color: var(--link);
  color: var(--link);
}

.code-copy-button.is-failed {
  color: #b42318;
}

.prose-wrap img {
  border-radius: 0.55rem;
  height: auto;
  max-width: 100%;
}

.article-footer {
  margin-top: 1rem;
}

.related-posts {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1rem;
}

.related-posts h2 {
  font-size: 1.35rem;
  margin: 0 0 0.6rem;
}

.related-post-list {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-post-list li {
  border-bottom: 1px dashed var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.related-post-list span {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Book-style blog articles */
.blog-page {
  background: var(--blog-bg);
  color: var(--blog-fg);
}

.blog-page .site-shell {
  max-width: 52.5rem;
  padding: 0 1.25rem;
}

.blog-page.post-page .site-shell {
  max-width: 64rem;
}

.blog-page .site-header {
  border-bottom: 2px groove var(--blog-line);
  padding: 1rem 0;
}

.blog-page .brand-name {
  background: none;
  color: var(--blog-fg);
}

.blog-page .site-nav {
  gap: 0.75rem;
}

.blog-page .nav-link {
  color: var(--blog-fg);
}

.blog-page .menu-line {
  background: var(--blog-fg);
}

.blog-page a {
  color: var(--blog-link);
}

.blog-page a:hover {
  color: var(--blog-link-hover);
}

.blog-page .article-wrap {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  margin: 0 auto;
  max-width: 44.5rem;
  padding: 2rem 0 3rem;
}

.blog-page .article-wrap.has-article-toc {
  max-width: 61rem;
}

.blog-page .article-header {
  margin-bottom: 2rem;
  max-width: 44.5rem;
  text-align: left;
}

.blog-page .article-header h1 {
  color: var(--blog-fg);
  font-family: inherit;
  font-size: clamp(1.55rem, 3.5vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin: 0 0 1.35rem;
  max-width: 43rem;
}

.blog-page .article-metadata {
  align-items: baseline;
  border-top: 1px solid var(--blog-line);
  color: var(--blog-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: 0.2rem 0.45rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.8rem 0 0;
}

.blog-page .article-meta-item {
  align-items: baseline;
  display: inline-flex;
  gap: 0.45rem;
  line-height: inherit;
}

.blog-page .article-meta-item + .article-meta-item::before {
  color: var(--blog-muted);
  content: "·";
  margin-right: 0.05rem;
}

.blog-page .article-meta-item dt:not(.sr-only) {
  color: var(--blog-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.blog-page .article-meta-item dd {
  color: var(--blog-muted);
  line-height: inherit;
  margin: 0;
}

.blog-page .article-header time {
  color: inherit;
  display: inline;
  line-height: inherit;
  margin: 0;
}

.blog-page .article-tags {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  line-height: inherit;
}

.blog-page .article-tags a::before {
  content: "#";
}

.blog-page .article-main {
  min-width: 0;
}

.blog-page .article-tldr {
  background: var(--article-tldr-bg);
  border-left: 3px solid var(--blog-link);
  margin: 0 0 2.25rem;
  padding: 1.05rem 1.2rem;
}

.blog-page .article-tldr h2 {
  color: var(--blog-link);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.4;
  margin: 0 0 0.45rem;
}

.blog-page .article-tldr-content {
  color: var(--blog-fg);
  font-size: 0.98rem;
  line-height: 1.5;
}

.blog-page .article-tldr-content ul {
  display: grid;
  gap: 0.42rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-page .article-tldr-content li {
  padding-left: 0.95rem;
  position: relative;
}

.blog-page .article-tldr-content li::before {
  background: var(--blog-link);
  border-radius: 50%;
  content: "";
  height: 0.28rem;
  left: 0;
  position: absolute;
  top: 0.68em;
  width: 0.28rem;
}

.blog-page .article-tldr-content strong {
  font-weight: 700;
}

.blog-page .article-tldr-content > :first-child {
  margin-top: 0;
}

.blog-page .article-tldr-content > :last-child {
  margin-bottom: 0;
}

.blog-page .article-toc-details summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  list-style-position: inside;
  padding: 0.8rem 0;
}

.blog-page .article-toc-panel {
  padding: 0 0 1rem;
}

.blog-page .article-toc-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-page .article-toc-links li {
  margin: 0;
}

.blog-page .article-toc-links a {
  border-left: 2px solid transparent;
  color: var(--blog-muted);
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-left: -1.05rem;
  padding: 0.36rem 0 0.36rem 1rem;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease;
}

.blog-page .article-toc-links a:hover {
  border-left-color: var(--blog-muted);
  color: var(--blog-link-hover);
  text-decoration: none;
}

.blog-page .article-toc-links a.is-active {
  border-left-color: var(--blog-link);
  color: var(--blog-link);
  font-weight: 700;
}

.blog-page .article-body {
  color: var(--blog-fg);
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
}

.blog-page .article-body > :first-child {
  margin-top: 0;
}

.blog-page .article-body h2,
.blog-page .article-body h3,
.blog-page .article-body h4 {
  color: var(--blog-fg);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.9rem;
  margin-top: 2.25rem;
  position: relative;
}

.blog-page .article-body h2 {
  font-size: 1.5rem;
}

.blog-page .article-body h3 {
  font-size: 1.25rem;
}

.blog-page .article-body h4 {
  font-size: 1.1rem;
}

.blog-page .heading-anchor {
  left: -1.1em;
  opacity: 0;
  position: absolute;
  text-decoration: none;
  transition: opacity 160ms ease-in-out;
}

.blog-page .article-body h2:hover .heading-anchor,
.blog-page .article-body h3:hover .heading-anchor,
.blog-page .article-body h4:hover .heading-anchor,
.blog-page .heading-anchor:focus {
  opacity: 1;
}

.blog-page .article-body p,
.blog-page .article-body li {
  text-align: left;
}

.blog-page .article-body code {
  background: var(--article-code-bg);
  color: var(--blog-fg);
}

.blog-page .article-body .code-block {
  background: var(--article-code-bg);
  border-left: 3px solid var(--article-code-rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3rem;
}

.blog-page .article-body pre {
  background: var(--article-code-bg) !important;
  border: 0;
  border-left: 3px solid var(--article-code-rule);
  border-radius: 0;
  color: var(--article-code-fg) !important;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 100%;
  overscroll-behavior-x: contain;
  overflow-x: auto;
  padding: 0.95rem 1rem;
  scrollbar-color: var(--article-scrollbar-thumb) var(--article-scrollbar-track);
  scrollbar-width: auto;
  white-space: pre;
}

.blog-page .article-body .code-block pre {
  border-left: 0;
  grid-column: 1;
  min-width: 0;
  width: 100%;
}

.blog-page .article-body code {
  border-radius: 0.18rem;
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.08em 0.28em;
}

.blog-page .article-body pre code,
.blog-page .article-body pre code span {
  background: transparent;
  color: inherit !important;
  padding: 0;
}

.blog-page .article-body pre::-webkit-scrollbar {
  height: 0.7rem;
}

.blog-page .article-body pre::-webkit-scrollbar-track {
  background: var(--article-scrollbar-track);
}

.blog-page .article-body pre::-webkit-scrollbar-thumb {
  background: var(--article-scrollbar-thumb);
  border: 2px solid var(--article-scrollbar-track);
  border-radius: 999px;
}

.blog-page .article-body pre::-webkit-scrollbar-thumb:hover {
  background: var(--article-code-rule);
}

.blog-page .article-body img {
  height: auto;
  max-width: 100%;
}

.blog-page .article-body .code-copy-button {
  align-self: start;
  background: transparent;
  border: 0;
  color: var(--article-code-fg);
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin-top: 0.55rem;
  opacity: 0.58;
  position: static;
  transition: background-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.blog-page .article-body .code-copy-button:hover,
.blog-page .article-body .code-copy-button:focus-visible {
  background: var(--article-scrollbar-track);
  opacity: 1;
}

.blog-page .article-body .code-copy-button.is-copied {
  background: transparent;
  color: var(--blog-link);
  opacity: 1;
}

.blog-page .article-body .code-copy-button.is-failed {
  opacity: 1;
}

.blog-page .article-body blockquote {
  border-left: 3px solid var(--blog-line);
  color: var(--blog-muted);
  font-style: italic;
  margin-left: 0;
  padding-left: 1.35rem;
}

.blog-page .article-body table {
  border-collapse: collapse;
  display: block;
  margin: 2rem 0;
  overflow-x: auto;
  width: 100%;
}

.blog-page .article-body th,
.blog-page .article-body td {
  border-top: 1px solid var(--blog-line);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.blog-page .article-body th {
  border-bottom: 2px solid var(--blog-fg);
}

.blog-page .related-posts,
.blog-page .article-footer {
  border-color: var(--blog-line);
}

.blog-page .related-posts h2 {
  color: var(--blog-fg);
  font-family: inherit;
  font-weight: 400;
}

.blog-page .related-post-list li {
  border-color: var(--blog-line);
}

.blog-page .related-post-list span,
.blog-page .site-footer,
.blog-page .footer-row {
  color: var(--blog-muted);
}

.empty-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

@media (min-width: 1100px) {
  .blog-page .article-wrap.has-article-toc .article-layout {
    display: grid;
    gap: 2.5rem;
    grid-template-areas: "main toc";
    grid-template-columns: minmax(0, 44.5rem) minmax(12rem, 14rem);
  }

  .blog-page .article-wrap.has-article-toc .article-main {
    grid-area: main;
  }

  .blog-page .article-wrap.has-article-toc .article-toc {
    align-self: start;
    grid-area: toc;
    position: sticky;
    top: 1.5rem;
    transform: translateX(2rem);
  }

  .blog-page .article-toc-details summary {
    border-left: 1px solid var(--blog-line);
    color: var(--blog-muted);
    cursor: default;
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    list-style: none;
    padding: 0.2rem 0 0.4rem 1rem;
    pointer-events: none;
    text-transform: uppercase;
  }

  .blog-page .article-toc-details summary::-webkit-details-marker {
    display: none;
  }

  .blog-page .article-toc-details:not([open]) > .article-toc-panel {
    display: block;
  }

  .blog-page .article-toc-panel {
    border-left: 1px solid var(--blog-line);
    padding: 0.1rem 0 0.5rem 1rem;
  }
}

@media (max-width: 1099px) {
  .blog-page.post-page .site-shell {
    max-width: 52.5rem;
  }

  .blog-page .article-wrap.has-article-toc {
    max-width: 44.5rem;
  }

  .blog-page .article-layout {
    display: flex;
    flex-direction: column;
  }

  .blog-page .article-toc {
    border-bottom: 1px solid var(--blog-line);
    border-top: 1px solid var(--blog-line);
    margin-bottom: 1.75rem;
    order: -1;
  }
}

@media (max-width: 900px) {
  .blog-page .site-shell {
    padding: 0 1rem;
  }

  .blog-page .article-wrap {
    padding-top: 1.5rem;
  }

  .blog-page .article-wrap.has-article-toc {
    max-width: 44.5rem;
  }

  .blog-page .article-header {
    margin-bottom: 1.5rem;
  }

  .blog-page .article-body,
  .blog-page .article-body p,
  .blog-page .article-body li {
    text-align: left;
  }

  .blog-page .heading-anchor {
    left: -0.78em;
    opacity: 0;
  }

  .site-nav {
    background: var(--nav-bg);
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    display: none;
    flex-direction: column;
    padding: 0.8rem;
    position: absolute;
    right: 0;
    top: 3.75rem;
    z-index: 20;
  }

  .nav-separator {
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .archive-post-grid {
    gap: 0.12rem;
    grid-template-areas:
      "date"
      "content";
    grid-template-columns: minmax(0, 1fr);
  }

  .archive-post-date {
    grid-area: date;
    margin-top: 0;
  }

  .archive-post-content {
    grid-area: content;
  }

  .archive-post-summary {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .archive-pagination {
    gap: 0.5rem;
  }

  .pagination-direction {
    font-size: 0.88rem;
  }

  .home-date {
    width: 6.5rem;
  }

  .home-row td {
    font-size: 0.98rem;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .related-post-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .writing-head {
    align-items: stretch;
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  .writing-search {
    justify-self: stretch;
  }

  .topic-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .blog-page .article-meta-topics {
    flex-basis: 100%;
  }

  .blog-page .article-meta-topics::before {
    display: none;
  }

  .topic-directory {
    grid-template-columns: 1fr;
  }

}
