:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f2f2f2;
  background: #111;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; background: #111; color: #f2f2f2; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid #f2f2f2; outline-offset: 4px; }

.site { max-width: 800px; margin: 0 auto; padding: 64px 24px 32px; }
.site-header { padding-bottom: 56px; }
.site-header h1 { margin: 0 0 12px; font-size: clamp(2.5rem, 8vw, 4.25rem); line-height: 1; letter-spacing: -.055em; }
.site-header p { max-width: 42rem; margin: 0; color: #aaa; line-height: 1.6; }
.section-title { margin: 0; padding-bottom: 12px; border-bottom: 1px solid #eee; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.article-card { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid #383838; }
.article-card[hidden], .pagination[hidden] { display: none; }
.article-image { display: block; align-self: start; aspect-ratio: 8 / 5; background: #292929; overflow: hidden; }
.article-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-content time, .article-page time { color: #aaa; font-size: .8rem; }
.article-content h3 { margin: 8px 0; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.025em; }
.article-content h3 a { text-decoration: none; }
.article-content h3 a:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-content p { margin: 0; color: #bdbdbd; line-height: 1.6; }
.article-content .read-link { display: inline-block; margin-top: 14px; font-size: .85rem; text-underline-offset: 3px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination button { min-width: 36px; min-height: 36px; padding: 6px 10px; border: 1px solid #555; border-radius: 4px; background: transparent; color: #eee; font: inherit; cursor: pointer; }
.pagination button:hover, .pagination button[aria-current="page"] { background: #eee; color: #111; }
.pagination button:focus-visible { outline: 2px solid #eee; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.back-link { display: inline-block; margin-bottom: 56px; text-decoration: none; font-size: .9rem; }
.article-page { max-width: 680px; }
.article-page h1 { margin: 12px 0 32px; font-size: clamp(2.2rem, 7vw, 3.5rem); line-height: 1.1; letter-spacing: -.045em; }
.article-page p { line-height: 1.75; }
.article-page img { max-width: 100%; height: auto; }
.article-page :not(pre) > code { padding: .15em .35em; border: 1px solid #383838; border-radius: 4px; background: #202020; font-size: .9em; }
.article-page pre { overflow-x: auto; margin: 24px 0; padding: 18px 20px; border: 1px solid #383838; border-radius: 6px; background: #1b1b1b; line-height: 1.55; tab-size: 4; }
.article-page pre code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9rem; }
.article-page pre[class*="language-"] { margin: 24px 0; padding: 42px 20px 18px; border: 1px solid #383838; border-radius: 6px; background: #1b1b1b; box-shadow: none; }
.article-page pre[class*="language-"] code { text-shadow: none; }
.code-toolbar > .toolbar { top: 8px; right: 8px; opacity: 1; }
.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button { padding: 5px 9px; border: 1px solid #555; border-radius: 4px; background: #2c2c2c; color: #eee; box-shadow: none; font: inherit; font-size: .75rem; cursor: pointer; }
.code-toolbar > .toolbar .toolbar-item > button.copy-to-clipboard-button:hover { background: #424242; }
footer { padding-top: 56px; color: #999; font-size: .8rem; }

@media (max-width: 520px) {
  .site { padding-top: 40px; }
  .site-header { padding-bottom: 44px; }
  .article-card { grid-template-columns: 112px 1fr; gap: 16px; }
  .article-content h3 { font-size: 1.15rem; }
}

.site { max-width: 1100px; margin: 0 auto; padding: 64px 24px 32px; }
.article-page { max-width: 1000px; }

#tag-filters { margin: 1rem 0 1.5rem; }
#tag-filters a { margin-right: .75rem; }
#tag-filters a[aria-current="page"] { font-weight: 700; }
.article-card[hidden] { display: none !important; }

#tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0 1.5rem;
}

#tag-filters a {
  padding: .35rem .75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  opacity: .65;
}

#tag-filters a:hover,
#tag-filters a:focus-visible {
  opacity: 1;
}

#tag-filters a[aria-current="page"] {
  background: #243b53;
  border-color: #243b53;
  color: #fff;
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 0 0 2px #a9bed0;
}

.article-lang-tag img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  object-fit: contain;
}

.site-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  box-sizing: border-box;
}

/* The outer wrapper now controls the page width. */
.site-layout > .site {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

.page-sidebar {
  position: sticky;
  top: 32px;
}

.sidebar-name {
  display: block;
  margin-bottom: 24px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.page-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #62626b;
  text-decoration: none;
}

.page-menu a:hover {
  background: #f0f0f3;
  color: #25252d;
}

.page-menu a[aria-current="page"] {
  background: #e9e9ee;
  color: #25252d;
  font-weight: 700;
  box-shadow: inset 3px 0 #74748b;
}

.page-menu a:focus-visible {
  outline: 2px solid #74748b;
  outline-offset: 3px;
}

/* On small screens, navigation sits above the content. */
@media (max-width: 760px) {
  .site-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 16px;
  }

  .page-sidebar {
    position: static;
  }

  .sidebar-name {
    margin-bottom: 12px;
  }

  .page-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-link > div {
  min-width: 0;
}

.contact-link .contact-icon {
  display: block;
  width: 28px;
  height: 28px;
  max-width: 28px;
  object-fit: contain;
  flex: 0 0 28px;
}



  .toc {
    margin: 0 0 2rem;
    padding: 1rem 1.1rem;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 8px;
    font-size: .9rem;
  }

  .toc-title {
    margin-bottom: .6rem;
    font-weight: 700;
  }

  .toc nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .toc nav ul ul {
    margin: .25rem 0 0 1rem;
  }

  .toc li + li {
    margin-top: .3rem;
  }

  .toc a {
    color: inherit;
    text-decoration: none;
    opacity: .75;
  }

  .toc a:hover,
  .toc a:focus {
    opacity: 1;
    text-decoration: underline;
  }

  /* Prevent a heading from hiding underneath a sticky header. */
  article h2,
  article h3 {
    scroll-margin-top: 1.5rem;
  }

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc ul ul {
  padding-left: 1.5rem;
}

.toc li {
  margin: 0.4rem 0;
}

.toc {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.5rem;
}

.toc a {
  overflow-wrap: anywhere;
}