@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #000;
  --muted: #474747;
  --link: #b1002e;
  --rule: #c6c6c6;
  --reading-font: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  font-family: Times, "Times New Roman", serif;
  font-size: 16px;
  line-height: 24px;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
p { margin: 0 0 12px; }
h1, h2, h3 { overflow-wrap: anywhere; }
h2 {
  margin: 0 0 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 20px;
  line-height: 36px;
}
main { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.top-nav {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink);
  font: inherit;
}
.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 28px;
  padding: 2px 5px;
  border: 0;
  border-radius: 2px;
  background-color: #f0f0f0;
  color: #242424;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 14.4px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  text-decoration: none;
  text-wrap: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.nav-button:hover, .nav-button:focus-visible {
  background-color: #f7e9ed;
  color: var(--link);
  text-decoration: none;
}
.nav-button:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .nav-button { transition: none; }
}
.page-header {
  padding: 48px 24px;
  border-bottom: 1px solid var(--ink);
  text-align: center;
}
.page-header h1 {
  max-width: 900px;
  margin: 0 auto 8px;
  font-size: 39.0625px;
  font-weight: 400;
  line-height: 48px;
}
.page-header p { margin: 0; }
.content {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}
.home-content, .blog-content { padding-top: 36px; padding-bottom: 60px; }
section + section { margin-top: 36px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
}
.section-heading h2 { margin: 0; border: 0; }
.section-heading > a { font-size: 14px; white-space: nowrap; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { margin: 0 0 24px; }
.post-list li:last-child { margin-bottom: 0; }
.post-list li > a { display: block; color: var(--ink); font-size: 20px; }
.post-list li > a:hover { color: var(--link); }
.post-list time { display: block; color: var(--muted); font-size: 14px; }
.post-list p { margin: 4px 0 0; }
.blog-page .top-nav { border-bottom: 0; }
.blog-index { width: 100%; max-width: 778px; margin: 0; padding: 48px 48px 64px; }
.blog-index h1 { margin: 0 0 32px; font-size: 32px; line-height: 1.25; font-weight: 400; }
.blog-year h2 { margin: 0 0 12px; border: 0; font-size: 12px; line-height: 24px; font-weight: 400; }
.blog-year ul { list-style: none; margin: 0; padding: 0; }
.blog-year li + li { margin-top: 12px; }
.blog-year a { color: var(--ink); font-family: var(--reading-font); font-size: 18px; line-height: 1.5; }
.blog-year a:hover, .blog-year a:focus-visible { color: var(--link); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; }
.pagination .nav-button, .pagination-current { min-width: 28px; min-height: 28px; padding: 2px 6px; text-align: center; }
.pagination-current { border-radius: 2px; background: #f7e9ed; color: var(--link); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14.4px; line-height: 24px; }
.pagination-gap { color: var(--muted); }
/* Article dimensions and type scale follow the Borretti reference. */
.article-page main, .article-layout { display: flex; flex: 1; flex-direction: column; }
.article-layout { width: 100%; }
.post-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 48px;
  border-bottom: 1px solid var(--ink);
}
.post-title { flex: 1; min-width: 0; text-align: center; }
.post-title h1 { margin: 0 12px 8px; font-size: 39.0625px; line-height: 48px; font-weight: 400; }
.post-date { margin: 0; font-size: 14px; }
.post-authors { margin: 0 0 6px; color: var(--muted); font-family: var(--reading-font); font-size: 15px; line-height: 1.5; }
.post-header figure { margin: 0; width: 320px; max-width: 100%; }
.post-header img { display: block; width: 100%; max-width: 512px; height: auto; }
.post-header figcaption { max-width: 512px; margin-top: 12px; font-size: 14px; }
.post-header figcaption p { margin: 0; }
@media (min-width: 900px) {
  .post-header { justify-content: center; }
  .post-title { flex: 0 1 720px; }
}
/* LessWrong-inspired reading typography, within the existing article frame. */
.prose {
  flex: 1;
  max-width: 730px;
  padding: 36px 24px 48px;
  overflow-wrap: break-word;
  color: #242424;
  font-family: var(--reading-font);
  font-size: 17px;
  line-height: 1.65;
}
.prose p { margin: 0 0 1.1em; }
.prose p, .prose li { text-align: justify; }
.prose h1, .prose h2 {
  margin: 2em 0 .75em;
  border: 0;
  color: #424242;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 400;
}
.prose h3 { margin: 2em 0 .8em; border: 0; color: #424242; font-size: 25px; line-height: 1.3; font-weight: 400; }
.prose h2 + h3 { margin-top: 1em; }
.prose h4 { margin: 1.4em 0 .6em; font-size: 20px; line-height: 1.3; font-weight: 600; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose li > ul, .prose li > ol { margin-top: .35em; margin-bottom: .35em; }
.prose li > p { margin-bottom: .5em; }
.prose dl { margin: 0 0 1.1em; }
.prose dt { font-weight: bold; }
.prose dd { margin-left: 1.5em; }
.prose blockquote { margin: 1.5em 0; padding: 8px 0 8px 20px; border-left: 3px solid #deddd8; font-style: normal; color: #474747; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose .tweet-embed { width: 100%; max-width: 400px; margin: 1.25em auto; }
.prose .tweet-embed blockquote { margin: 0; padding: 14px 16px; border: 1px solid var(--ink); background: #fff; font-size: 15px; }
.prose .tweet-embed blockquote p { margin-bottom: 12px; }
.prose .tweet-embed blockquote span, .prose .tweet-embed blockquote > a { font-size: 14px; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: #d9a5b2; }
.prose a:hover { text-decoration-color: var(--link); }
.prose .post-link-button, .home-description .post-link-button {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 2px;
  background: #f0f0f0;
  color: #242424;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 14.4px;
  line-height: 24px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.post-link-button + .post-link-button { margin-left: 8px; }
.post-resource-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.post-resource-links .post-link-button { margin-left: 0; }
.post-research-summary { align-items: center; }
.prose .post-link-button:hover, .prose .post-link-button:focus-visible, .home-description .post-link-button:hover, .home-description .post-link-button:focus-visible { background: #f7e9ed; color: var(--link); text-decoration: none; }
.prose h1[id], .prose h2[id], .prose h3[id], .prose h4[id] { scroll-margin-top: 24px; }
.post-link-unavailable { color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .prose .post-link-button, .home-description .post-link-button { transition: none; } }
.prose img, .prose video { display: block; max-width: 100%; height: auto; margin: 1.5em auto; }
.prose .video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.prose .video-embed iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.prose figure { margin: 1.5em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { margin-top: 12px; color: #666; font-size: 15px; line-height: 1.5; }
.prose .post-figure { scroll-margin-top: 24px; }
.prose .post-figure pre, .prose .post-figure table { margin-top: 0; margin-bottom: 0; }
.prose .post-figure figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.prose .figure-label { font: inherit; color: inherit; }
.prose .figure-caption-text { flex: 1 1 200px; min-width: 0; }
.prose .figure-caption-text > :last-child { margin-bottom: 0; }
.prose .plot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; width: 100%; max-width: 560px; margin: 0 auto; }
.prose #training-pipeline > img { width: 100%; }
.prose #latent-space .plot-grid, .prose #surprise-scores .plot-grid { max-width: none; }
.prose .plot-grid-1 { grid-template-columns: minmax(0, 1fr); }
.prose .plot-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .plot-panel { min-width: 0; }
.prose .plot-panel img { width: 100%; }
.prose .plot-panel .plot-panel-label { margin: 8px 0 0; color: #666; font-size: 15px; text-align: center; }
.prose .results-table { font-size: 13px; white-space: nowrap; }
.prose .coverage-heading { margin: 32px 0 8px; font-size: 18px; line-height: 1.4; color: var(--muted); }
.prose h2 + .coverage-heading { margin-top: 24px; }
.prose .press-list { list-style: none; padding: 0; margin: 0; }
.prose .press-list li { margin: 0 0 8px; text-align: left; }
.press-country { color: #666; }
.prose .coverage-list { list-style: none; padding: 0; margin: 0; }
.prose .coverage-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 20px; margin: 0; padding: 14px 0; text-align: left; }
.prose .coverage-list li + li { border-top: 1px solid #e8e5e2; }
.prose .coverage-list li > a { justify-self: start; text-decoration: none; }
.prose .coverage-list li > a:hover, .prose .coverage-list li > a:focus-visible { text-decoration: underline; }
.prose .coverage-list .coverage-meta { color: #666; font-size: 13px; line-height: 1.5; }
.prose .coverage-list p { grid-column: 1 / -1; margin: 0; color: #666; font-size: 15px; line-height: 1.5; text-align: left; }
@media (max-width: 600px) {
  .prose .coverage-list li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .prose .plot-grid { grid-template-columns: minmax(0, 1fr); }
  .prose .plot-panel { width: 100%; max-width: 320px; margin: 0 auto; }
  .prose #latent-space .plot-panel, .prose #surprise-scores .plot-panel { max-width: none; }
}
.prose figcaption a, .prose figcaption a:hover, .prose figcaption a:focus-visible { color: inherit; text-decoration-color: currentColor; }
.prose code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .78em; font-variant-ligatures: none; }
.prose :not(pre) > code { padding: 2px 5px; background: #f0f0f0; border-radius: 2px; color: #242424; }
.prose pre {
  margin: 1.6em 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 20px 22px;
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: #faf9f7;
  color: #242424;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  line-height: 1.75;
  tab-size: 4;
  white-space: pre;
  overflow-wrap: normal;
}
.prose pre > code { padding: 0; background: none; font-size: inherit; line-height: inherit; }
@media (max-width: 600px) {
  .prose pre { padding: 16px; font-size: 12px; }
}
.prose table { display: block; width: fit-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5em auto; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 12px; }
.prose hr { margin: 2em 0; border: 0; text-align: center; }
.prose hr::after { content: "❧"; color: var(--ink); }
.prose sup[id^="fnref:"] { font-size: .75em; vertical-align: super; line-height: 0; }
.prose sup[id^="fnref:"]::before { content: "["; }
.prose sup[id^="fnref:"]::after { content: "]"; }
.prose .footnotes { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.prose .katex { font-size: 1.05em; }
.prose .katex-display { margin: 1.5em 0; padding: 6px 0; overflow-x: auto; overflow-y: hidden; }
.prose .highlight .k, .prose .highlight .kn, .prose .highlight .kd, .prose .highlight .ow { color: var(--link); font-weight: 400; }
.prose .highlight .s, .prose .highlight .s1, .prose .highlight .s2, .prose .highlight .sa { color: #765442; }
.prose .highlight .c, .prose .highlight .c1, .prose .highlight .cm { color: #716d67; font-style: normal; }
.prose .highlight .nf, .prose .highlight .nc { color: var(--ink); }
.prose .highlight .mi, .prose .highlight .mf { color: #765442; }
.prose .highlight .err { color: var(--link); }
.link-preview {
  position: fixed;
  z-index: 100;
  width: min(300px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
  color: #242424;
  overflow-wrap: anywhere;
  font-family: var(--reading-font);
  animation: preview-appear .12s ease-out;
}
.link-preview[hidden] { display: none; }
.link-preview-source, .blog-year h2 { color: var(--muted); font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }
.link-preview-source { margin-top: 8px; font-size: 10px; line-height: 1.5; }
.link-preview-title { margin-bottom: 4px; font-size: 16px; line-height: 1.3; }
.link-preview p, .link-preview-authors { margin: 0; color: #555; font-size: 13px; line-height: 1.5; }
.link-preview .katex { font-size: 1.05em; }
.link-preview .katex-display { margin: .6em 0; overflow-x: auto; overflow-y: hidden; }
@keyframes preview-appear { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .link-preview { animation: none; } }
.post-metadata { border-top: 1px solid var(--ink); }
.post-metadata > .content > p { margin: 0; }
.post-bottom-bar { border-top: 1px solid var(--ink); }
.post-bottom-nav { display: flex; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.post-bottom-nav .nav-button { min-height: 22px; padding: 1px 4px; font-size: 12px; line-height: 20px; }
@media (max-width: 899px) {
  .post-header { flex-direction: column; padding: 24px; }
}
footer { border-top: 1px solid var(--ink); }
.footer-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
}
.footer-content nav { display: flex; gap: 12px; }
.skip-link { position: absolute; top: -100px; left: 12px; padding: 8px 12px; background: white; }
.skip-link:focus { top: 8px; z-index: 30; }

@media (max-width: 600px) {
  .page-header { padding: 32px 20px; }
  .page-header h1 { font-size: 32px; line-height: 40px; }
  .content { padding-left: 20px; padding-right: 20px; }
  .home-content, .blog-content { padding-top: 24px; }
  .footer-content { padding: 20px; }
  .article-layout .content { padding-left: 24px; padding-right: 24px; }
}

/* Plain nameplate, reading typography, and compact highlighted links. */
.homepage { padding: 48px; }
.homepage h1 { margin: 0 0 32px; font-size: 39.0625px; line-height: 48px; font-weight: 400; }
.home-description { max-width: 682px; font-family: var(--reading-font); font-size: 18px; line-height: 1.6; color: #242424; }
.home-description p { margin: 0 0 1.1em; }
.home-description .home-posts-link { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 128px; }
.home-description .home-posts-link a { padding-right: 9px; }
.home-posts-link a span { display: inline-block; transition: transform .2s ease; }
.home-posts-link a:hover span, .home-posts-link a:focus-visible span { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .home-posts-link a span { transition: none; }
  .home-posts-link a:hover span, .home-posts-link a:focus-visible span { transform: none; }
}
.safety-statement { margin-top: 48px; color: var(--link); }
.home-description .safety-statement + .home-posts-link { margin-top: 80px; }
.statement-highlight { padding: 2px 4px; background: #f7e9ed; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.safety-statement h2 { margin: 0; border: 0; font-family: var(--reading-font); font-size: 16px; line-height: 1.4; font-weight: 400; }
.safety-statement p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.selected-paper { margin-top: 48px; }
.selected-paper h2 { margin: 0 0 12px; border: 0; font-family: var(--reading-font); font-size: 22px; line-height: 1.4; font-weight: 400; }
.paper-preview { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; padding: 16px 0; }
.paper-thumbnail { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.paper-info h3 { margin: 0 0 5px; color: var(--ink); font-family: var(--reading-font); font-size: 19px; line-height: 1.3; font-weight: 400; }
.paper-info .paper-meta { margin: 0 0 5px; color: #77716b; font-family: "JetBrains Mono", monospace; font-size: 10px; line-height: 1.5; }
.paper-info .paper-authors { margin: 0 0 6px; color: #666; font-size: 13px; line-height: 1.4; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.home-description a {
  padding: 2px 5px;
  border-radius: 2px;
  background: #f0f0f0;
  color: #242424;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: .8em;
  font-weight: 400;
  text-decoration: none;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color .15s ease, color .15s ease;
}
.home-description a:hover, .home-description a:focus-visible { background: #f7e9ed; color: var(--link); text-decoration: none; }
.home-description .paper-image-link { position: relative; display: block; align-self: stretch; min-height: 0; padding: 0; background: transparent; border-radius: 10px; overflow: hidden; }
.home-description .paper-title-link { padding: 0; background: transparent; border-radius: 0; font: inherit; color: inherit; }
.home-description .paper-title-link:hover, .home-description .paper-title-link:focus-visible { color: var(--link); }
.paper-actions a { font-size: 12px; line-height: 20px; }
@media (prefers-reduced-motion: reduce) {
  .home-description a { transition: none; }
}
@media (max-width: 600px) {
  .homepage { padding: 32px 24px; }
  .blog-index { padding: 32px 24px 64px; }
  .paper-preview { grid-template-columns: minmax(80px, 30%) minmax(0, 1fr); gap: 12px; }
}
