@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
:root {
  --font-body: Inter, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Inter, "Helvetica Neue", Arial, sans-serif;
  --base-size: 16px;
  --small-size: 0.86rem;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fff6cc;
  --surface-3: #ffd43b;
  --text: #1f1f1f;
  --muted: #676767;
  --border: #1f1f1f;
  --rule: #ddd8cb;
  --link: #8b6400;
  --link-hover: #5f4500;
  --visited: #8b6400;
  --focus: #ffcc00;
  --button-bg: #ffd43b;
  --button-text: #1f1f1f;
}

[data-theme=dark] {
  --bg: #0f1113;
  --surface: #14171a;
  --surface-2: #2a240f;
  --surface-3: #ffd93d;
  --text: #f3f1ea;
  --muted: #b6b0a3;
  --border: #f3f1ea;
  --rule: #34312a;
  --link: #ffd93d;
  --link-hover: #ffe978;
  --visited: #ffd93d;
  --focus: #ffd93d;
  --button-bg: #ffd93d;
  --button-text: #17130b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  overflow-y: scroll;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--base-size);
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface), var(--bg) 22rem);
  letter-spacing: -0.01em;
  padding-top: 0.35rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.08em;
}

a:visited {
  color: var(--visited);
}

a:hover,
a:active {
  color: var(--link-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-header,
.site-main,
.site-footer {
  max-width: 58rem;
  margin: 0 auto;
  width: 100%;
}

.site-header {
  padding: 0.85rem 1rem 0;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--border);
}

.site-brand,
.site-nav a,
.lang-switch,
.theme-toggle {
  font-size: 1rem;
}

.site-nav a,
.lang-switch,
.theme-toggle {
  color: var(--text);
}

.site-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  margin-right: 1rem;
  text-decoration: none;
  color: var(--text);
}

.site-brand:hover {
  color: var(--link);
}

.site-nav,
.site-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.site-nav {
  justify-content: center;
}

.site-tools {
  justify-self: end;
}

.site-nav a:not(:hover),
.site-brand:not(:hover),
.lang-switch:not(:hover) {
  text-decoration: none;
}

.site-nav a[aria-current=page] {
  font-weight: 600;
  color: var(--text);
}

.site-nav a,
.lang-switch,
.theme-toggle {
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle__icon svg {
  width: 1rem;
  height: 1rem;
}

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

[data-theme=dark] .theme-toggle__icon--sun {
  display: inline-flex;
}

[data-theme=dark] .theme-toggle__icon--moon {
  display: none;
}

.site-main {
  flex: 1;
  padding: 0 1rem 2.5rem;
}

.site-footer {
  padding: 1rem 1rem 2rem;
  color: var(--text);
  font-size: var(--small-size);
  border-top: 2px solid var(--border);
  text-align: center;
}

h1,
h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

h2 {
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  margin-bottom: 0.6rem;
}

p,
ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

.page-shell__header {
  margin-bottom: 1.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--border);
}

.page-shell__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.page-shell__meta,
.listing-item__meta,
.compact-listing-item__meta {
  color: var(--muted);
  font-size: var(--small-size);
}

.page-shell__lede {
  color: var(--muted);
  max-width: 40em;
  margin-top: 0.75rem;
}

.page-shell__taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: center;
  margin-top: 0.45rem;
}

.home-grid {
  display: grid;
  gap: 1rem;
}

.home-section {
  padding: 0.9rem 0 0;
}

.home-section__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.45rem;
}

.home-section__heading h2 {
  position: relative;
}

.home-section__heading h2::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  margin-top: 0.35rem;
  background: var(--focus);
}

.home-section__heading a {
  font-size: var(--small-size);
  color: var(--text);
  text-decoration: none;
}

.home-section__heading a:hover {
  color: var(--link);
}

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

.compact-listing-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.3rem 1rem;
  align-items: start;
  padding: 0.6rem 0;
}

.compact-listing-item__body,
.compact-listing-item__link {
  min-width: 0;
}

.compact-listing-item__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.compact-listing-item__link:hover {
  color: var(--link);
}

.compact-listing-item__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: baseline;
}

.compact-listing-item__summary {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.tag-list__item {
  padding: 0.06rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.75rem;
  line-height: 1.3;
}

.tag-list__link {
  color: inherit;
  text-decoration: none;
}

.tag-list__item:hover {
  background: var(--button-bg);
  border-color: color-mix(in srgb, var(--button-bg) 68%, black);
  color: var(--button-text);
}

.tag-list__link:hover {
  color: inherit;
}

.tag-list--compact {
  margin-top: 0.35rem;
}

.listing-stack {
  display: grid;
  gap: 0;
}

.listing-item {
  padding: 0.75rem 0;
}

.listing-item__row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.45rem 1rem;
  align-items: start;
}

.listing-item__body {
  min-width: 0;
}

.listing-item__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: baseline;
}

.listing-item__title {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.listing-item__meta {
  font-family: var(--font-body);
  font-weight: 400;
  padding-top: 0.12rem;
}

.page-shell__meta {
  text-align: right;
  margin-left: auto;
}

.listing-item__title a {
  color: var(--text);
  text-decoration: none;
}

.listing-item__title a:hover {
  color: var(--link);
}

.listing-item__summary {
  margin: 0.22rem 0 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.listing-item__excerpt {
  margin: 0.45rem 0 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 2px solid var(--focus);
  color: var(--muted);
}

.listing-item__excerpt p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.external-link-icon {
  width: 0.95em;
  height: 0.95em;
  flex: 0 0 auto;
}

.listing-item__title a,
.compact-listing-item__link {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.tag-list--page {
  margin-top: 0;
  margin-bottom: 0;
}

.page-content {
  max-width: 44rem;
}

.page-content > * + * {
  margin-top: 1rem;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  scroll-margin-top: 2rem;
}

.page-content h1 {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
}

.page-content h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}

.page-content h3 {
  font-size: 1.08rem;
}

.page-content h4,
.page-content h5,
.page-content h6 {
  font-size: 0.96rem;
}

.page-content ul,
.page-content ol {
  padding-left: 1.3rem;
}

.page-content li + li {
  margin-top: 0.25rem;
}

.page-content blockquote {
  margin: 1.2rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--focus);
  color: var(--muted);
}

.page-content hr {
  border: 0;
  border-top: 2px solid var(--border);
  margin: 1.6rem 0;
}

.page-content code,
.page-content kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

.page-content :not(pre) > code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: color-mix(in srgb, var(--text) 88%, #7a3b00);
}

.page-content mark {
  padding: 0.04rem 0.22rem;
  border-radius: 0.2rem;
  background: color-mix(in srgb, var(--surface-2) 88%, white);
  color: var(--text);
}

.page-content kbd {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  background: var(--surface);
}

.page-content pre {
  overflow-x: auto;
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 0.45rem;
  background: #111111;
  color: #f5f5f5;
}

.page-content pre code {
  display: block;
  line-height: 1.55;
}

.page-content figure {
  margin: 1.4rem 0;
}

.page-content figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: var(--small-size);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

.page-content th,
.page-content td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.page-content th {
  font-weight: 600;
}

.page-content dl {
  margin: 1.2rem 0;
}

.page-content dt {
  font-weight: 600;
}

.page-content dd {
  margin: 0.2rem 0 0.8rem;
  color: var(--muted);
}

.page-content details {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 0.4rem;
  background: var(--surface);
}

.page-content summary {
  cursor: pointer;
  font-weight: 600;
}

.page-content .hljs {
  color: #f5f5f5;
  background: transparent;
}

.page-content .hljs-keyword,
.page-content .hljs-literal,
.page-content .hljs-operator {
  color: #f4d35e;
}

.page-content .hljs-string,
.page-content .hljs-title.class_,
.page-content .hljs-title.function_ {
  color: #9fd3c7;
}

.page-content .hljs-variable,
.page-content .hljs-property,
.page-content .hljs-title,
.page-content .hljs-attr {
  color: #f7f7f7;
}

.page-content .hljs-punctuation,
.page-content .hljs-meta {
  color: #b8b8b8;
}

@media (min-width: 48rem) {
  :root {
    --base-size: 17px;
  }
  .site-main {
    padding-top: 0.25rem;
  }
}
@media (max-width: 42rem) {
  .site-header {
    padding-top: 0.95rem;
  }
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: start;
  }
  .site-brand {
    margin-right: 0;
  }
  .site-nav {
    gap: 0.4rem 0.75rem;
  }
  .site-nav a {
    padding-left: 0;
    padding-right: 0;
  }
  .site-tools {
    margin-left: 0;
    justify-content: flex-end;
    gap: 0.3rem 0.55rem;
  }
  .compact-listing-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .compact-listing-item__meta {
    grid-column: auto;
  }
  .page-shell__meta,
  .listing-item__meta {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }
  .page-shell__title-row {
    justify-content: flex-start;
  }
  .listing-item__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}