/* Article-only Tufte CSS adaptation; see TUFTE-CSS-LICENSE. Homepage rules remain in home.css. */
@font-face {
  font-family: "ET Book Article";
  src: url("/assets/fonts/et-book/et-book-roman-line-figures.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "ET Book Article";
  src: url("/assets/fonts/et-book/et-book-display-italic-old-style-figures.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "ET Book Article";
  src: url("/assets/fonts/et-book/et-book-bold-line-figures.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

body:has(.post-layout) {
  --paper: #fffff8;
  --ink: #111111;
  --muted: #111111;
  --link: #a00000;
  --rule: #333333;
  --stripe: #fbf7f0;
  --code-paper: #fffff8;
  --body-copy: "ET Book Article", "ET Book Fallback", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
  --code-copy: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  display: block;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-copy);
  font-size: 1rem;
  line-height: normal;
  counter-reset: sidenote-counter 0;
}

body:has(.post-layout) a {
  color: #a00000;
  text-decoration: none;
}

body:has(.post-layout) .site-header {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.page-content:has(.post-layout) {
  padding: 0;
}

.page-content > .wrapper:has(.post-layout) {
  width: min(89.5vw, calc(1400px + 2vw));
  max-width: none;
  margin-right: 0;
  margin-left: max(10.5vw, calc(54.25vw - 700px));
  padding-right: 0;
  padding-left: 0;
}

.post-layout {
  position: relative;
  display: block;
  width: min(90%, max(55%, 44rem));
  min-width: 0;
  margin: 0;
  padding: 5rem 0;
}

.post-layout::after {
  display: table;
  clear: both;
  content: "";
}

.post-layout--sidenotes {
  display: block;
  grid-template-columns: none;
  column-gap: 0;
}

.post-layout .post,
.post-layout:not(.post-layout--sidenotes) .post {
  width: 100%;
  max-width: none;
  margin: 0;
}

.post-layout .post-header {
  margin: 0;
}

.post-layout .post-title {
  margin: 1.568rem 0;
  color: #111111;
  font-family: var(--body-copy);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.184;
}

.post-reference-meta {
  width: 100%;
}

.post-author-wrap {
  float: left;
  margin: 0 1.2rem 1rem 0;
  font-size: 1.4rem;
  line-height: 2rem;
}

.post-author-button {
  position: relative;
  top: -0.09rem;
  display: inline-block;
  height: 20px;
  margin-bottom: 3px;
  padding: 0 6px;
  border: 1px solid;
  border-color: #adb1b8 #a2a6ac #8d9096;
  border-radius: 3px;
  background: #efefef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #0f1111;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  touch-action: manipulation;
  user-select: none;
  white-space: nowrap;
}

.post-reference-meta .post-author-button {
  color: #0f1111;
}

.post-author-button:hover {
  border-color: #a2a6ac #979aa1 #82858a;
  text-decoration: none;
}

.post-author-button:focus-visible {
  border-color: #a00000;
  box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
  outline: 0;
}

.post-author-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin: 0 0.2em;
  vertical-align: middle;
}

.post-reference-meta .post-date {
  display: block;
  max-width: none;
  margin: 1.4rem 0;
  margin-left: 0;
  color: #111111;
  font-size: 1.4rem;
  line-height: 2rem;
  text-align: right;
  white-space: normal;
}

.post-reference-meta .post-date time {
  font: inherit;
}

.post-layout .post-content {
  min-width: 0;
  margin: 0;
  color: #111111;
  font-family: var(--body-copy);
  font-size: 1.4rem;
  line-height: 2rem;
}

.post-content p,
.post-content ol,
.post-content ul {
  margin: 1.4rem 0;
  font-size: 1.4rem;
  line-height: 2rem;
}

.post-content p {
  padding-right: 0;
  text-align: justify;
  vertical-align: baseline;
}

.post-content ol,
.post-content ul {
  padding-left: 6%;
}

.post-content li {
  margin-bottom: 0.5em;
  text-align: justify;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: #111111;
  scroll-margin-top: 1.5rem;
}

.post-content h2 {
  margin: 1.86667rem 0 0;
  font-size: 2.1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 0.933333;
}

.post-content h3 {
  margin: 2.17778rem 0 0;
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.08889;
}

.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 0;
  font-weight: 700;
  line-height: normal;
}

.post-content h4 {
  font-size: 1rem;
}

.post-content h5 {
  font-size: 0.83em;
}

.post-content h6 {
  font-size: 0.67em;
}

.post-content blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  color: #111111;
  font-style: normal;
  letter-spacing: normal;
}

.post-content blockquote * {
  font-size: 1.1rem;
}

.post-content blockquote p {
  line-height: 1.75rem;
}

.post-content blockquote footer {
  text-align: right;
}

.post-content a:not(.heading-link):not(.image-zoom) {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.15em;
}

.post-content pre,
.post-content code {
  font-family: var(--code-copy);
  font-size: max(13px, 1rem);
  line-height: 1.5;
  border-radius: 4px;
  margin-top: 1.42rem;
}

.post-content p code,
.post-content li code,
.post-content td code,
.post-content th code,
.post-content kbd {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: max(13px, 1rem);
  overflow-wrap: anywhere;
}

.post-content pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.42rem 0;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: pre;
}

.post-content pre.highlight,
.post-content .highlight pre {
  max-width: 100%;
  margin-top: 1.42rem;
  padding: 0.5rem;
  overflow-x: auto;
  border: 1.5px solid gray;
  border-radius: 4px;
  background: #ffffff;
}

.post-content .highlight {
  max-width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fffff8;
}

.post-content pre code {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: max(13px, 1rem);
  line-height: 1.5;
  overflow-wrap: normal;
}

.post-content .highlight .c,
.post-content .highlight .cm,
.post-content .highlight .c1 {
  color: #66665b;
  font-style: italic;
}

.post-content .highlight .err {
  color: #a61717;
  background: #e3d2d2;
}

.post-content .highlight .k,
.post-content .highlight .o,
.post-content .highlight .kc,
.post-content .highlight .kd,
.post-content .highlight .kp,
.post-content .highlight .kr,
.post-content .highlight .ow {
  font-weight: 700;
}

.post-content .highlight .cp,
.post-content .highlight .cs {
  color: #666666;
  font-weight: 700;
}

.post-content .highlight .cs {
  font-style: italic;
}

.post-content .highlight .gd {
  color: #000000;
  background: #ffdddd;
}

.post-content .highlight .gd .x {
  color: #000000;
  background: #ffaaaa;
}

.post-content .highlight .ge {
  font-style: italic;
}

.post-content .highlight .gr,
.post-content .highlight .gt {
  color: #aa0000;
}

.post-content .highlight .gh {
  color: #666666;
}

.post-content .highlight .gi {
  color: #000000;
  background: #ddffdd;
}

.post-content .highlight .gi .x {
  color: #000000;
  background: #aaffaa;
}

.post-content .highlight .go {
  color: #666666;
}

.post-content .highlight .gp {
  color: #555555;
}

.post-content .highlight .gs {
  font-weight: 700;
}

.post-content .highlight .gu {
  color: #666666;
}

.post-content .highlight .kt,
.post-content .highlight .nc {
  color: #445588;
  font-weight: 700;
}

.post-content .highlight .m,
.post-content .highlight .mf,
.post-content .highlight .mh,
.post-content .highlight .mi,
.post-content .highlight .mo,
.post-content .highlight .il {
  color: #007575;
}

.post-content .highlight .s,
.post-content .highlight .sb,
.post-content .highlight .sc,
.post-content .highlight .sd,
.post-content .highlight .s2,
.post-content .highlight .se,
.post-content .highlight .sh,
.post-content .highlight .si,
.post-content .highlight .sx,
.post-content .highlight .s1 {
  color: #dd1144;
}

.post-content .highlight .na,
.post-content .highlight .no,
.post-content .highlight .nv,
.post-content .highlight .vc,
.post-content .highlight .vg,
.post-content .highlight .vi {
  color: teal;
}

.post-content .highlight .nb {
  color: #006b8f;
}

.post-content .highlight .ni {
  color: purple;
}

.post-content .highlight .ne,
.post-content .highlight .nf {
  color: #990000;
  font-weight: 700;
}

.post-content .highlight .nn,
.post-content .highlight .bp {
  color: #555555;
}

.post-content .highlight .nt {
  color: navy;
}

.post-content .highlight .w {
  color: #666666;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 1.4rem 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.post-content table {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-spacing: 0;
  border-collapse: separate;
  border-top: 2px solid #333333;
  border-bottom: 2px solid #333333;
  color: #111111;
  font-size: 1.2rem;
  line-height: 1.35;
  text-align: left;
}

.post-content th {
  padding: 0.65ex 0.5em 0.4ex;
  border-bottom: 1px solid #333333;
  font-weight: 400;
  text-align: center;
}

.post-content td {
  padding: 0.1ex 0.5em;
  border: 0;
  text-align: left;
  vertical-align: top;
}

.post-content tbody tr:first-child td {
  padding-top: 0.65ex;
}

.post-content tbody td:first-child {
  text-align: left;
}

.post-content tbody tr:nth-child(2n + 1) {
  background: #fbf7f0;
}

.post-content table caption {
  width: auto;
  margin: 1ex auto 0;
  caption-side: top;
  font-size: 90%;
  text-align: left;
}

.table-scroll--wide table {
  width: 100%;
  min-width: 100%;
}

.post-content img {
  display: inline;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.post-content figure {
  max-width: 100%;
  margin: 0;
}

.post-content figure img {
  margin: 0;
}

.post-content figure.maincolumn {
  margin-bottom: 3em;
}

.post-content figure.maincolumn > figcaption {
  display: block !important;
}

.post-content figure.fullwidth {
  max-width: 90%;
}

.post-content figure.fullwidth figcaption {
  float: left;
  margin-right: 0;
  margin-left: 36%;
}

.post-content figcaption,
.post-content p > em:only-child {
  display: block;
  width: auto;
  margin: 1ex auto 0;
  color: #111111;
  font-size: 90%;
  line-height: 1.4;
  text-align: left;
}

.post-content .fullwidth {
  max-width: 90%;
}

.post-layout--sidenotes .post-content .sidenote,
.post-layout--sidenotes .post-content .marginnote {
  display: block;
  position: relative;
  float: right;
  clear: right;
  width: 24.0625vw;
  max-width: 336.875px;
  margin: 0 -60% 1.4rem 0;
  color: #111111;
  font-size: 1rem;
  line-height: 1.4;
  text-align: start;
  vertical-align: baseline;
}

.post-layout--sidenotes .post-content label.sidenote-number {
  position: relative;
  color: #a00000;
  cursor: pointer;
  font-family: "ET Book Old Style", "ET Book Article", serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  vertical-align: baseline;
  counter-increment: sidenote-counter;
}

.post-layout--sidenotes .post-content label.sidenote-number::after {
  position: relative;
  top: -0.5rem;
  left: 0.1rem;
  color: #a00000;
  content: counter(sidenote-counter);
  font-family: "ET Book Old Style", "ET Book Article", serif;
  font-size: 1rem;
  vertical-align: baseline;
}

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

.post-layout .post-content input.margin-toggle {
  display: inline-block;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  vertical-align: middle;
}

.post-layout .post-content input.margin-toggle:focus-visible {
  width: 1.2rem;
  height: 1.2rem;
  opacity: 1;
  accent-color: #a00000;
  outline: 2px solid #a00000;
  outline-offset: 2px;
}

.post-content .sidenote::before {
  position: relative;
  color: #a00000;
  font-family: "ET Book Old Style", "ET Book Article", serif;
  vertical-align: baseline;
  content: counter(sidenote-counter) ". ";
}

.post-content .sidenote-paragraph {
  display: block;
  margin: 0 0 0.4rem;
}

.post-content .sidenote-paragraph:last-child {
  margin-bottom: 0;
}

.post-content .mermaid,
.post-content svg {
  max-width: 100%;
}

.post-content .mermaid {
  clear: left;
  overflow-x: auto;
}

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

.post-content hr {
  height: 1px;
  margin: 1.4rem 0;
  border: 0;
  background-image: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.75), transparent);
}

.post-content .heading-link {
  color: inherit;
  text-decoration: none;
}

.post-content .heading-link:hover {
  text-decoration: none;
}

.post-content .define {
  border-bottom: 1px dotted #a00000;
}

.post-content .define-tooltip {
  border: 1px solid #333333;
  border-radius: 0;
  background: #fffff8;
  box-shadow: none;
  color: #111111;
  font-family: var(--body-copy);
}

.post-content .define-tooltip-body {
  color: #111111;
}

.post-content .excalidraw-embed {
  max-width: 100%;
  margin: 1.4rem 0;
  border: 0;
  border-radius: 0;
}

.post-content .excalidraw-fullscreen-btn {
  border-radius: 0;
  background: #fffff8;
  color: #a00000;
  font-family: "Gill Sans", "Gill Sans MT", Lato, Calibri, sans-serif;
}

.post-layout .post-meta-footer,
.post-layout .post-clap,
.post-layout .post-comments {
  display: none;
}

@media screen and (max-width: 1199px) {
  .post-layout--sidenotes .post-content .sidenote,
  .post-layout--sidenotes .post-content .marginnote {
    display: none;
    float: none;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    padding: 0 5%;
    border: 0;
    background: transparent;
  }

  .post-layout--sidenotes .post-content input.margin-toggle:checked + .sidenote,
  .post-layout--sidenotes .post-content input.margin-toggle:checked + .marginnote {
    display: block;
  }

  .post-layout--sidenotes .post-content label.sidenote-number::before {
    position: absolute;
    inset: -1rem -0.75rem;
    content: "";
  }

}

@media screen and (max-width: 760px) {
  .post-content pre {
    padding: 0.5rem;
    border-radius: 4px;
  }

  .post-content pre code {
    font-size: max(13px, 1rem);
  }

  .post-content table {
    width: 85%;
    max-width: none;
    margin-inline: auto;
  }

  .table-scroll--wide table {
    width: 100%;
    min-width: 100%;
    margin-inline: 0;
  }

  .post-content figure {
    max-width: 90%;
  }

  .post-content figcaption,
  .post-content figure.fullwidth figcaption {
    float: none;
    width: auto;
    max-width: none;
    margin: 0.55rem 0 0;
  }

  .post-reference-meta .post-date {
    white-space: normal;
  }
}
/* Keep wide tables at their natural width and scroll them inside their wrapper. */
.table-scroll--wide table {
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin: 0;
  table-layout: auto;
}
.table-scroll--wide th,
.table-scroll--wide td {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
/* The About page shares the reference article grid and typography. */
body:has(.about-page) {
  --paper: #fffff8;
  --ink: #111111;
  --muted: #111111;
  --link: #a00000;
  --rule: #333333;
  --stripe: #fbf7f0;
  --code-paper: #fffff8;
  --body-copy: "ET Book Article", "ET Book Fallback", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
  --code-copy: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  display: block;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-copy);
  font-size: 1rem;
  line-height: normal;
}
body:has(.about-page) a {
  color: #a00000;
  text-decoration: none;
}
body:has(.about-page) .site-header {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.page-content:has(.about-page) {
  padding: 0;
}
.page-content > .wrapper:has(.about-page) {
  width: min(89.5vw, calc(1400px + 2vw));
  max-width: none;
  margin-right: 0;
  margin-left: max(10.5vw, calc(54.25vw - 700px));
  padding-right: 0;
  padding-left: 0;
}
article.about-page {
  position: relative;
  display: block;
  width: min(90%, max(55%, 44rem));
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 5rem 0;
  color: #111111;
  font-family: var(--body-copy);
}
.about-page .page-header {
  margin: 0;
}
.about-page .page-title {
  margin: 1.568rem 0;
  color: #111111;
  font-family: var(--body-copy);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.184;
}
.about-page .page-content-body {
  min-width: 0;
  margin: 0;
  color: #111111;
  font-family: var(--body-copy);
  font-size: 1.4rem;
  line-height: 2rem;
}
/* Keep descriptive table cells aligned to their text. */
.table-scroll--wide td {
  text-align: left;
}
.table-scroll--wide th:first-child {
  white-space: nowrap;
}
@media screen and (max-width: 760px) {
  .table-scroll--wide table {
    width: max-content;
  }
}

/* Keep body copy readable and avoid large justification gaps on small screens. */
@media screen and (max-width: 700px) {
  .post-content p,
  .post-content li,
  .post-content h1,
  .post-content h2,
  .post-content h3 {
    text-align: left;
  }

  .post-content pre code {
    font-size: 13px;
  }
}

/* The long-form articles include Markdown TOCs in the content itself. */
.post-content #table-of-contents + ul a,
.post-content #table-of-contents + ol a {
  display: block;
  min-height: 24px;
  padding-block: 0.3rem;
}

.post-content .highlight .sr {
  color: #007020;
}

.post-content .highlight .ss {
  color: #990073;
}
