.posts {
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.posts > li {
  border-bottom: 1px solid var(--line);
}

.page-head + .posts {
  margin-top: 56px;
}

.post-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  column-gap: 32px;
  padding: 32px 0 36px;
  text-decoration: none;
}

.post-thumb,
.page-aside-img {
  display: block;
  overflow: hidden;
  width: 120px;
  aspect-ratio: 272 / 346;
  background: var(--white);
}

.post-thumb img,
.page-aside-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.post-row:hover .post-thumb img,
.post-row:focus-visible .post-thumb img {
  transform: scale(1.04);
}

.post-text {
  display: block;
  min-width: 0;
}

.post-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-2);
  font-weight: var(--body-weight);
  line-height: 1.4;
  color: var(--fg-soft);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: var(--body-weight);
  line-height: 1.3;
  white-space: nowrap;
  color: var(--fg);
  text-align: center;
}

.tag.blog {
  border-color: var(--fg-soft);
}

.tag.paper {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.tag.benchmark {
  border-color: var(--fg);
}

.venue {
  color: var(--fg);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.filters button {
  padding: 7px 12px 6px;
  border: 1px solid var(--muted);
  border-radius: 2px;
  background: transparent;
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: var(--body-weight);
  line-height: 1.2;
  color: var(--fg-soft);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filters button:hover,
.filters button:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
}

.filters button[aria-pressed="true"] {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--cream);
}

.posts li[hidden] {
  display: none;
}

.soon {
  color: var(--fg);
}

.post-title {
  display: block;
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: var(--title);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.post-desc {
  display: block;
  margin: 14px 0 0;
  max-width: none;
  font-size: var(--text-item);
  line-height: 1.45;
}

.post-row:hover .post-title,
.post-row:focus-visible .post-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.all-link {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--sans);
  font-size: var(--fs-3);
  font-weight: var(--body-weight);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.all-link:hover,
.all-link:focus-visible {
  text-decoration-thickness: 2px;
}

.page {
  --measure: 45rem;
  min-height: calc(100vh - var(--header-h));
}

.post {
  --measure: 48rem;
}

.page > .wrap {
  padding-top: 88px;
  padding-bottom: 96px;
}

.page-aside .label a {
  text-decoration: none;
}

.page-aside .label a:hover,
.page-aside .label a:focus-visible {
  text-decoration: underline;
}

.page-aside-img {
  width: 200px;
  height: 200px;
  margin-top: 32px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  margin-top: 56px;
  padding-right: 16px;
}

.page-aside .label + .toc {
  margin-top: 40px;
}

.toc-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toc ol,
.toc ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  line-height: 1.4;
}

.toc-label + ol,
.toc-label + ul {
  margin-top: 16px;
}

.toc li + li {
  margin-top: 12px;
}

.toc a {
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible,
.toc a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-title {
  font-size: var(--page-title);
  line-height: 1.04;
  max-width: 18em;
}

.page .page-meta {
  display: block;
  max-width: var(--measure);
  margin-top: 20px;
  font-family: var(--sans);
  font-size: var(--fs-3);
  font-weight: var(--body-weight);
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-soft);
}

.page-authors a {
  text-decoration: underline;
  text-decoration-color: rgba(30, 28, 29, 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.page-authors a:hover,
.page-authors a:focus-visible {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.page-venue {
  max-width: var(--measure);
  margin-top: 6px;
  font-size: var(--fs-3);
  line-height: 1.45;
  color: var(--fg-soft);
}

.page-venue + .page-venue {
  margin-top: 0;
}

.page-links + .prose > figure:first-child,
.paper-links + .prose > figure:first-child {
  margin-top: 56px;
}

.page-authors {
  max-width: var(--measure);
  margin-top: 24px;
  font-size: var(--fs-3);
  line-height: 1.45;
  text-wrap: pretty;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: var(--measure);
  margin-top: 28px;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 15px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: var(--fs-2);
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.paper-link svg {
  flex: none;
}

.paper-link:hover,
.paper-link:focus-visible {
  background: var(--button-fill);
  border-color: var(--button-fill);
}

.post-end {
  max-width: var(--measure);
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.post-end .all-link {
  margin-top: 28px;
}

.prose {
  max-width: var(--measure, 45rem);
  margin-top: 56px;
  font-size: var(--text-lg);
  line-height: 1.65;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.25em;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 2em 0 0.5em;
  font-size: var(--title);
  line-height: 1.15;
}

.prose h2 strong,
.prose h3 strong {
  font-weight: inherit;
}

.prose h3 {
  margin: 1.9em 0 0.6em;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.45;
}

.prose strong {
  font-weight: 500;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose ul {
  list-style: square;
}

.prose li::marker {
  color: var(--accent);
}

.prose li {
  padding-left: 0.2em;
}

.prose li + li {
  margin-top: 0.6em;
}

.prose a {
  text-underline-offset: 0.2em;
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-thickness: 2px;
}

.prose figure {
  margin: 48px 0 40px;
}

.prose figcaption {
  max-width: 100%;
  margin: 14px auto 0;
  font-size: var(--fs-2);
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
  color: var(--fg-soft);
}

.prose .table-figure figcaption {
  max-width: none;
  margin-left: 0;
  text-align: left;
}

.fig-num {
  margin-right: 6px;
  font-weight: 500;
  color: var(--fg);
}

.figure-body {
  padding: 28px;
  background: var(--white);
  border: 1px solid rgba(30, 28, 29, 0.12);
}

.figure-body svg,
.figure-body img {
  display: block;
  width: 100%;
  height: auto;
}

.diagram svg {
  color: var(--ink);
  font-family: var(--sans);
}

.d-node rect {
  fill: var(--cream);
  stroke: currentColor;
  stroke-width: 1;
}

.d-node text {
  font-size: 19px;
  fill: currentColor;
}

.diagram .d-name {
  font-size: 19px;
  fill: currentColor;
}

.diagram .d-math {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  fill: currentColor;
}

.diagram .d-sub {
  font-size: 13px;
}

.d-node .d-num {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.d-accent rect {
  fill: var(--blue);
  stroke: var(--blue);
}

.d-accent text {
  fill: var(--cream);
}

.d-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}

.d-dash {
  stroke-dasharray: 5 5;
}

.d-note {
  font-family: var(--mono);
  font-size: 13px;
  fill: var(--fg-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1.5px solid var(--fg);
  border-bottom: 1.5px solid var(--fg);
  font-size: var(--fs-2);
  line-height: 1.45;
}

.prose thead th {
  padding: 12px 24px 10px 0;
  border-bottom: 1px solid var(--fg);
  font-weight: 500;
  text-align: left;
}

.prose tbody th,
.prose tbody td {
  padding: 9px 24px 9px 0;
  text-align: left;
  vertical-align: top;
}

.prose tbody tr:first-child > * {
  padding-top: 14px;
}

.prose tbody tr:last-child > * {
  padding-bottom: 14px;
}

.prose tbody th {
  padding-right: 28px;
  font-weight: 500;
  white-space: nowrap;
}

.prose tbody td {
  color: rgba(30, 28, 29, 0.88);
}

.prose tbody td:last-child,
.prose thead th:last-child {
  padding-right: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .prose table {
    font-size: var(--fs-1);
    line-height: 1.45;
  }

  .prose thead th,
  .prose tbody th,
  .prose tbody td {
    padding-right: 12px;
  }

  .prose thead th:last-child,
  .prose tbody td:last-child {
    padding-right: 0;
  }

  .prose tbody th {
    white-space: normal;
  }

  .figure-body {
    padding: 16px;
  }
}

.legal .prose h2 {
  margin-top: 2.2em;
  font-size: var(--title-sm);
  line-height: 1.15;
}

@media (max-width: 1023px) {
  .page-aside-img {
    width: min(160px, calc(100% - 32px));
    height: auto;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .page-aside {
    display: none;
  }
}

@media (max-width: 900px) {
  .page > .wrap {
    padding-top: 40px;
    padding-bottom: 88px;
  }

  .page-head + .posts {
    margin-top: 36px;
  }

  .prose {
    margin-top: 40px;
  }

  .prose h2 {
    margin-top: 1.5em;
  }

  .legal .prose h2 {
    font-size: var(--title-sm);
  }

  .post-end {
    margin-top: 56px;
  }
}

@media (max-width: 560px) {
  .post-row {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    padding: 28px 0 32px;
  }

  .post-text {
    display: contents;
  }

  .post-thumb {
    grid-row: 1;
    width: 72px;
  }

  .post-meta {
    grid-column: 2;
    grid-row: 1;
  }

  .post-title,
  .post-desc {
    grid-column: 1 / -1;
  }

  .post-title {
    margin-top: 20px;
  }

  .post-desc {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-thumb img {
    transition: none;
  }
}

.citation {
  max-width: none;
  margin-top: 72px;
}

.citation h2 {
  font-size: var(--title);
  line-height: 1.15;
}

.citation-code {
  position: relative;
  width: min(var(--measure), 100%);
  margin-top: 20px;
}

.citation-code code {
  font-family: inherit;
  font-size: inherit;
}

.citation-code pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  background: var(--white);
  border: 1px solid rgba(30, 28, 29, 0.12);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: var(--fs-1);
  line-height: 1.7;
  white-space: pre;
  scrollbar-width: thin;
}

.bib-type {
  color: var(--blue);
}

.bib-key,
.bib-field {
  color: var(--fg);
  font-weight: 500;
}

.bib-value {
  color: rgba(30, 28, 29, 0.7);
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(30, 28, 29, 0.18);
  border-radius: 4px;
  background: var(--cream);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-1);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--fg);
}

.copy-done {
  display: none;
}

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

.copy-button.is-copied .icon-copy {
  display: none;
}

.copy-button.is-copied .copy-done {
  display: inline;
}

.prose .cite {
  white-space: nowrap;
}

.prose .cite a {
  color: var(--fg-soft);
  text-decoration: none;
}

.prose .cite a:hover,
.prose .cite a:focus-visible {
  color: var(--fg);
  text-decoration: underline;
}

.prose ol.references li::marker {
  content: "[" counter(list-item) "]  ";
  color: var(--fg-soft);
}

.prose ol.references {
  padding-left: 2.25em;
  color: rgba(30, 28, 29, 0.88);
}

.prose ol.references li {
  padding-left: 4px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose ol.references li + li {
  margin-top: 8px;
}

.prose ol.references a {
  overflow-wrap: anywhere;
}

.prose ol.references li:target {
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}
