/* Article pages use the same topic directory as the blog index. */
.post--reading { min-width: 0; }
.post__breadcrumb { display: flex; align-items: baseline; gap: .65em; color: var(--muted); font: .76rem/1.5 Inter, Arial, sans-serif; }
.post__breadcrumb a { color: var(--link); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.post__breadcrumb span[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post--reading .post__header { padding: 34px 0 32px; border-bottom: 1px solid var(--line); }
.post--reading .post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65em;
  margin: 0 0 17px;
  color: var(--muted);
  font: .78rem/1.5 Inter, Arial, sans-serif;
}
.post--reading .post__header h1 {
  margin: 0;
  color: var(--link);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.3rem, 4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.post--reading .post__summary { margin: 21px 0 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.24rem); line-height: 1.55; }
.post__byline { display: flex; flex-wrap: wrap; gap: .65em; margin: 23px 0 0; color: var(--muted); font: .8rem/1.5 Inter, Arial, sans-serif; }
.post__byline a { text-decoration-color: var(--gold); text-underline-offset: 3px; }
.post--reading .post__body { min-width: 0; padding-top: 24px; font-size: 1.06rem; line-height: 1.78; overflow-wrap: anywhere; }
.post--reading .post__body h2,
.post--reading .post__body h3,
.post--reading .post__body h4 {
  color: var(--link);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  line-height: 1.3;
}
.post--reading .post__body h2, .post--reading .post__body h3 { scroll-margin-top: 25px; }
.post--reading .post__body h2 { margin: 2.25em 0 .5em; padding-top: .2em; font-size: 1.75rem; }
.post--reading .post__body > h2:first-child { margin-top: .85em; }
.post--reading .post__body h3 { margin: 1.9em 0 .5em; font-size: 1.32rem; }
.post--reading .post__body h4 { margin: 1.6em 0 .5em; font-size: 1.12rem; }
.post--reading .post__body p,
.post--reading .post__body ul,
.post--reading .post__body ol { margin: 0 0 1.25em; }
.post--reading .post__body li + li { margin-top: .25em; }
.post--reading .post__body a { text-decoration-color: var(--gold); text-underline-offset: 3px; }
.post--reading .post__body img { max-width: 100%; height: auto; }
.post--reading .post__body :not(pre) > code { padding: 2px 5px; border-radius: 3px; background: var(--surface); font-size: .88em; }
.post--reading .post__body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 17px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .82rem;
  line-height: 1.55;
}
.post--reading .post__body pre code { padding: 0; background: transparent; }
.post--reading .post__body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .93rem; }
.post--reading .post__body th,
.post--reading .post__body td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.post--reading .post__body iframe { max-width: 100%; }
.post--reading .post__body figure { margin: 1.7em 0; }
.post--reading .post__body figcaption { color: var(--muted); font: .8rem/1.5 Inter, Arial, sans-serif; }
.post--reading .post__body .paper-figure img { display: block; max-width: 100%; max-height: 700px; width: auto; margin: 0 auto; padding: 10px; border: 1px solid #e5e0d4; background: #fff; }
.post--reading .post__body .paper-figure figcaption { margin-top: 10px; }
.post--reading .post__body mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.post--reading .post__body blockquote { margin: 1.5em 0; padding: 3px 0 3px 22px; border-left: 3px solid var(--gold); color: var(--ink); }
.post--reading .post__body blockquote p:last-child { margin-bottom: 0; }
.post-toc { margin-top: 24px; border: 1px solid var(--line); background: var(--surface); font: .77rem/1.5 Inter, Arial, sans-serif; }
.post-toc__toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 0; background: none; color: var(--ink); cursor: pointer; font: 600 .79rem/1.5 Inter, Arial, sans-serif; text-align: left; }
.post-toc__toggle span { font-size: 1.2rem; line-height: 1; }
.post-toc__toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.post-toc__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2px 16px; padding: 0 16px 13px; }
.post-toc__nav[hidden] { display: none; }
.post-toc__nav a { display: block; padding: 5px 0; color: var(--muted); line-height: 1.35; text-decoration: none; }
.post-toc__nav a[data-level="3"] { padding-left: 13px; font-size: .73rem; }
.post-toc__nav a:hover, .post-toc__nav a[aria-current="location"] { color: var(--link); }
.post-toc__nav a[aria-current="location"] { font-weight: 600; }
.post--reading .post__footer { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.post--reading .post__footer a { text-decoration-color: var(--gold); text-underline-offset: 3px; }
@media (max-width: 560px) {
  .post--reading .post__header h1 { font-size: clamp(2.15rem, 9vw, 2.8rem); }
  .post--reading .post__body { font-size: 1rem; }
}
