:root {
  --paper: #f5f6f7;
  --ink: #18191b;
  --muted: #5d6167;
  --rule: #c8ccd1;
  --rail: 152px;
  --gutter: 40px;
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body {
  max-width: 952px;
  margin: 40px 40px 80px clamp(24px, 5.5vw, 80px);
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: 0; }
h1 { font-size: 1.25rem; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: 1rem; font-weight: 600; margin: 0; }
h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; }
p { margin: 0 0 16px; }
ul { padding-left: 20px; }
li { margin: 6px 0; }
strong { font-weight: 600; }

.home > header {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.home h1 { font-size: 1.125rem; margin: 0; }
.profile-link { margin: 0; }
.intro { margin: 32px 0 0 calc(var(--rail) + var(--gutter)); }
.intro p:last-child { margin-bottom: 0; }
.home section, .note-section {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
  margin-top: 40px;
}
.home section h2, .note-section > h2 { padding-top: 1px; }
.project-list { list-style: none; margin: 0; padding: 0; }
.project-list li { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 24px; margin: 0 0 20px; }
.project-list li:last-child { margin-bottom: 0; }
.project-list a { align-self: start; overflow-wrap: anywhere; }
.note-list { list-style: none; padding: 0; margin: 0; }
.note-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin: 0; }
.note-list .date { white-space: nowrap; }
.note-list li + li { margin-top: 16px; }

.profile-link, .date, .back, footer, .source-link { font-size: 0.875rem; }
.date, footer { color: var(--muted); font-variant-numeric: tabular-nums; }
.back { padding-bottom: 16px; border-bottom: 1px solid var(--ink); margin-bottom: 32px; }
.note-header {
  margin-left: calc(var(--rail) + var(--gutter));
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  align-items: baseline;
}
.note-header h1 { grid-column: 1 / -1; }
.note-header .date, .source-link { margin: 0; }
.note-header .paper-authors { grid-column: 1 / -1; margin: 12px 0 0; font-size: 0.875rem; color: var(--muted); }
.section-body { min-width: 0; }
.section-body > :first-child { margin-top: 0; }
.section-body > :last-child { margin-bottom: 0; }
.derivation-with-margin { position: relative; }
.margin-reminder {
  position: absolute;
  top: 0;
  right: calc(100% + var(--gutter));
  width: var(--rail);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}
.margin-reminder p { margin-bottom: 8px; }
.underlined { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.model-config { margin: 20px 0; }
.model-config summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.table-scroll { overflow-x: auto; margin: 16px 0 12px; }
table { width: 100%; min-width: 500px; border-collapse: collapse; font-size: 0.875rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
caption { text-align: left; margin-bottom: 12px; font-weight: 600; }
th, td { padding: 5px 8px; vertical-align: top; border-bottom: 1px solid var(--rule); }
th { text-align: left; }
tbody th[scope="row"] { font-weight: normal; }
thead th:not(:first-child), td { text-align: center; white-space: nowrap; }
.table-group th { padding-top: 18px; border-bottom: 1px solid var(--ink); }
.table-source, .uncertain { font-size: 0.875rem; color: var(--muted); }
.uncertain { font-style: italic; }
.equation { overflow-x: auto; margin: 20px 0; padding: 10px 2px; }
.equation math { margin: 0; font-size: 1.05rem; }
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
footer { margin: 40px 0 0 calc(var(--rail) + var(--gutter)); padding-top: 12px; border-top: 1px solid var(--rule); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 24px; top: 8px; background: var(--paper); }

@media (max-width: 1000px) {
  :root { --rail: 128px; --gutter: 28px; }
  .project-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 680px) {
  body { margin: 24px 20px 60px; }
  .home > header { grid-template-columns: 1fr auto; gap: 20px; }
  .home section, .note-section { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 32px; }
  .home section h2, .note-section > h2 { padding: 0 0 8px; border-bottom: 1px solid var(--rule); }
  .intro, .note-header, footer { margin-left: 0; }
  .note-header { column-gap: 12px; }
  .back { margin-bottom: 24px; }
  .margin-reminder { position: static; width: auto; margin: 0 0 20px; }
}

@media print {
  :root { background: white; color: black; --rail: 100px; --gutter: 24px; }
  body { max-width: none; margin: 0; font-size: 11pt; }
  a { color: inherit; }
  .back, .skip-link, footer { display: none; }
  h2, h3 { break-after: avoid; }
  .equation, .table-scroll { overflow: visible; }
  .margin-reminder { position: static; width: auto; margin-bottom: 16px; }
}
