:root {
  color-scheme: dark;
  --bg: #0d0d15;
  --surface: #171720;
  --text: #e7e5ee;
  --muted: #aaa7b8;
  --line: #2d2b3b;
  --accent: #b995ff;
  --pink: #f48fbd;
  --cyan: #73d6d8;
  --code: #13131e;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f6fa;
  --surface: #eeedf4;
  --text: #242132;
  --muted: #615b72;
  --line: #d7d2e3;
  --accent: #6540a5;
  --pink: #a92b66;
  --cyan: #17696c;
  --code: #eceaf3;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  overflow-wrap: break-word;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button {
  color: inherit;
}
img,
video {
  max-width: 100%;
  height: auto;
}
svg {
  display: block;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}
.shell {
  width: min(1080px, calc(100% - 64px));
  margin-inline: auto;
}
.site-main {
  padding-block: 65px 100px;
  min-height: 65vh;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  gap: 20px;
}
.brand {
  font: 700 16px/1.5 var(--mono);
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}
.brand span {
  color: var(--pink);
  margin-right: 6px;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}
.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
}
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 12px;
  min-height: 44px;
  cursor: pointer;
  font: 13px var(--mono);
}
[hidden] {
  display: none !important;
}
.nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 0 0 20px;
  margin: 0;
  font: 13px/1.8 var(--mono);
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  display: block;
  padding-block: 4px;
}
.nav-current a,
.nav a:hover {
  color: var(--accent);
}
.nav-current a:after {
  content: '';
  display: block;
  height: 2px;
  background: var(--accent);
  margin-bottom: -2px;
}
.hero {
  padding: 10px 0 40px;
}
.wordmark {
  width: min(100%, 752px);
  height: auto;
  margin: 0 0 48px;
  display: block;
}
.eyebrow,
.section-heading h2 {
  font: 13px/1.5 var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 12px;
}
.eyebrow span,
.section-heading h2 span {
  color: var(--pink);
  margin-right: 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1.13;
  font-weight: 700;
  margin-bottom: 23px;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
}
.accent,
.purple {
  color: var(--accent);
}
.pink {
  color: var(--pink);
}
.cyan {
  color: var(--cyan);
}
.intro {
  font-size: 19px;
  line-height: 1.8;
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 38px;
}
.category-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 38px;
}
.category-links > a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 25px 20px 27px;
  text-decoration: none;
  color: var(--text);
  border-right: 1px solid var(--line);
}
.category-links > a:last-child {
  border-right: 0;
}
.category-links > a:hover {
  background: var(--surface);
}
.category-label {
  font: 11px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.category-links > a > span:nth-child(2) {
  font-weight: 550;
  font-size: 16px;
}
.category-links > a > span:nth-child(2) > span {
  float: right;
  color: var(--muted);
}
small,
.category-links small {
  font: 12px/1.5 var(--mono);
  color: var(--muted);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 23px 0 7px;
}
.section-heading h2 {
  margin: 0;
  color: var(--accent);
}
.section-heading > a {
  font: 12px var(--mono);
  color: var(--muted);
  text-decoration: none;
}
.post-row {
  padding: 27px 0 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.row-meta,
.article-meta,
.article-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font: 12px/1.7 var(--mono);
  color: var(--muted);
}
.row-meta {
  margin-bottom: 10px;
}
.badge {
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
}
.badge-bug {
  color: var(--pink);
}
.badge-research {
  color: var(--cyan);
}
.badge-blog {
  color: var(--accent);
}
.severity {
  color: var(--muted);
  font-size: 11px;
}
.post-row h3 {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  max-width: 950px;
}
.post-row h3 a {
  color: var(--text);
  text-decoration: none;
}
.post-row h3 a:hover {
  color: var(--accent);
}
.row-arrow {
  font: 17px var(--mono);
  color: var(--accent);
  display: inline-block;
  margin-left: 10px;
}
.post-row p {
  color: var(--muted);
  font-size: 15px;
  max-width: 780px;
  margin-bottom: 0;
  line-height: 1.7;
}
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 34px;
  font: 12px/1.6 var(--mono);
  color: var(--muted);
}
.pagination a:last-child {
  text-align: right;
}
.pagination a {
  padding-block: 10px;
}
.archive-header {
  max-width: 800px;
  margin-bottom: 30px;
  padding-top: 10px;
}
.archive-header p {
  color: var(--muted);
  font-size: 18px;
}
.archive-header h1 {
  margin-bottom: 20px;
}
.article-header {
  max-width: 800px;
  margin: 0 auto 40px;
}
.article-kicker {
  margin-bottom: 20px;
}
.article-kicker > a {
  text-decoration: none;
}
.article-header h1 {
  font-size: clamp(2rem, 4.7vw, 3.55rem);
  line-height: 1.14;
  margin-bottom: 25px;
}
.article-deck {
  font-size: 20px;
  color: var(--muted);
}
.article-meta {
  font-size: 12px;
  gap: 12px;
}
.article-meta a {
  color: var(--text);
}
.feature-image {
  max-width: 900px;
  margin: 0 auto 46px;
}
.feature-image img {
  width: 100%;
  display: block;
  border-radius: 5px;
  max-height: 400px;
  object-fit: cover;
}
.feature-image figcaption,
.prose figcaption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 9px;
}
.prose {
  max-width: 720px;
  margin-inline: auto;
  font-size: 18px;
  line-height: 1.85;
  display: flow-root;
}
.prose > * {
  max-width: 100%;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 1.5em;
}
.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin: 2.2em 0 0.8em;
}
.prose h2 {
  font-size: 1.65em;
}
.prose h3 {
  font-size: 1.25em;
}
.prose h4 {
  font-size: 1.1em;
}
.prose li {
  padding-left: 0.25em;
  margin-bottom: 0.5em;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose strong {
  font-weight: 650;
}
.prose code {
  font: 0.82em/1.7 var(--mono);
  background: var(--code);
  border-radius: 3px;
  padding: 0.15em 0.3em;
  overflow-wrap: anywhere;
}
.prose pre {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  margin: 1.7em 0;
  font: 13px/1.8 var(--mono);
  tab-size: 4;
  white-space: pre;
  overflow-wrap: normal;
}
.prose pre code {
  padding: 0;
  background: transparent;
  font: inherit;
  white-space: inherit;
  overflow-wrap: normal;
}
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  color: var(--muted);
}
.prose blockquote p:last-child {
  margin: 0;
}
.prose img {
  display: block;
  margin: 1.5em auto;
}
.prose figure {
  margin: 2em 0;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5em 0;
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--line);
}
.prose .kg-width-wide {
  width: min(900px, calc(100vw - 64px));
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.prose .kg-width-full {
  width: calc(100vw - 24px);
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.kg-bookmark-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: var(--text);
}
.kg-bookmark-content {
  padding: 18px;
  min-width: 0;
}
.kg-bookmark-title {
  font-weight: 600;
}
.kg-bookmark-description {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-top: 12px;
}
.kg-bookmark-icon {
  width: 20px;
  height: 20px;
  margin: 0 !important;
}
.kg-bookmark-thumbnail {
  flex: 0 0 25%;
}
.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kg-gallery-row {
  display: flex;
  gap: 12px;
}
.kg-gallery-image {
  flex: 1 1 0;
  min-width: 0;
}
.kg-gallery-image img {
  width: 100%;
  margin: 0;
}
.kg-callout-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  display: flex;
  gap: 14px;
  margin: 1.6em 0;
}
.kg-callout-emoji {
  font-size: 22px;
}
.kg-callout-text {
  font-size: 16px;
}
.kg-button-card {
  display: flex;
  margin: 1.5em 0;
}
.kg-align-center {
  justify-content: center;
}
.kg-btn,
.button {
  display: inline-block;
  padding: 10px 18px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  font: 14px/1.5 var(--mono);
  cursor: pointer;
}
.kg-toggle-card {
  padding: 16px;
  border: 1px solid var(--line);
  margin: 1.5em 0;
}
.kg-header-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
}
.kg-header-card h2 {
  margin-top: 0;
}
.kg-image-card img {
  height: auto;
}
.kg-file-card {
  padding: 18px;
  border: 1px solid var(--line);
}
.kg-file-card a {
  display: block;
}
.article-footer {
  max-width: 720px;
  margin: 45px auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font: 12px/1.8 var(--mono);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tags a {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
}
.post-neighbours {
  max-width: 800px;
  margin: 45px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.post-neighbours > a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  line-height: 1.5;
}
.post-neighbours > a:hover {
  color: var(--accent);
}
.post-neighbours span {
  font-weight: 550;
}
.page-article {
  max-width: 800px;
  margin: auto;
}
.empty-state {
  padding: 40px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.empty-state p {
  margin-bottom: 8px;
}
.error-state {
  max-width: 700px;
  padding: 20px 0 50px;
}
.error-code {
  font: 90px/1 var(--mono);
  color: var(--accent);
  margin-bottom: 25px;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 25px;
}
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-block: 36px 24px;
}
.site-footer p {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 18px;
  font: 12px/1.8 var(--mono);
}
.footer-links a {
  color: var(--muted);
  padding-block: 6px;
}
.copyright {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 11px/1.8 var(--mono) !important;
}
.copyright a {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 760px) {
  .shell {
    width: calc(100% - 40px);
  }
  .site-main {
    padding-block: 40px 64px;
  }
  .header-top {
    min-height: 72px;
  }
  .wordmark {
    margin-bottom: 35px;
  }
  .category-links {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .category-links > a {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 6px;
  }
  .category-links > a:last-child {
    border-bottom: 0;
  }
  .category-links small {
    font-size: 11px;
  }
  .hero {
    padding-bottom: 20px;
  }
  .intro {
    font-size: 17px;
  }
  .post-row h3 {
    font-size: 20px;
  }
  .prose {
    font-size: 17px;
  }
  .article-header {
    margin-bottom: 28px;
  }
  .article-header h1 {
    font-size: clamp(1.9rem, 6vw, 2.7rem);
  }
  .feature-image {
    margin-bottom: 30px;
  }
  .prose pre {
    padding: 16px;
    font-size: 12px;
  }
  .prose .kg-width-wide {
    width: calc(100vw - 40px);
  }
  .site-footer {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .copyright {
    flex-direction: column;
    gap: 5px;
  }
  .post-neighbours {
    gap: 20px;
  }
  .pagination {
    font-size: 11px;
    gap: 10px;
  }
  .archive-header p {
    font-size: 17px;
  }
}
@media (max-width: 480px) {
  .header-actions {
    gap: 1px;
  }
  .brand {
    font-size: 14px;
  }
  .js .menu-toggle {
    display: block !important;
  }
  .js .site-nav[data-collapsed='true'] {
    display: none;
  }
  .nav {
    gap: 8px 20px;
    padding-bottom: 18px;
  }
  .article-meta {
    gap: 8px;
    font-size: 11px;
  }
  .article-kicker {
    font-size: 11px;
  }
  .post-neighbours {
    grid-template-columns: 1fr;
  }
  .post-row {
    padding-block: 24px;
  }
  .prose h2 {
    font-size: 1.45em;
  }
  .kg-bookmark-thumbnail {
    display: none;
  }
  .wordmark {
    margin-bottom: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .site-header,
  .site-footer,
  .post-neighbours,
  .article-footer,
  .header-actions {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
  .shell,
  .prose {
    width: 100%;
    max-width: none;
  }
  .site-main {
    padding: 0;
  }
  .prose pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  a {
    color: inherit;
  }
  .feature-image {
    max-height: 200px;
    overflow: hidden;
  }
}
body {
  font-family: var(--gh-font-body, var(--sans));
}
h1,
h2,
h3,
h4 {
  font-family: var(--gh-font-heading, var(--sans));
}
.menu-toggle {
  display: none;
}
