/* Keep contents on the left, including narrower desktop windows. */
.blog-contents[hidden] { display: none; }
.blog-contents { position: fixed; left: 16px; bottom: 20px; z-index: 50; width: min(280px, calc(100vw - 32px)); max-height: calc(100dvh - 100px); overflow-y: auto; margin: 0; color: #617168; background: #ffffff; border: 1px solid #dce5df; border-radius: 8px; }
.blog-contents:has(details:not([open])) { width: auto; }
.blog-contents-details { padding: 12px 16px; }
.blog-contents summary { cursor: pointer; font-size: 14px; font-weight: 500; line-height: 1.6; }
.blog-contents-list { list-style: none; margin: 16px 0 0; padding: 0; border-left: 1px solid #dce5df; }
.blog-contents-list li { margin: 0; padding: 0; }
.blog-contents-list a { display: block; margin-left: -1px; border-left: 2px solid transparent; padding: 8px 0 8px 16px; color: #617168; font-size: 14px; font-weight: 400; line-height: 1.6; text-decoration: none; }
.blog-contents-list a:hover { color: #1b473e; }
.blog-contents-list a[aria-current="location"] { color: #11665b; border-left-color: #1a9c8d; }
.blog-prose h2[id] { scroll-margin-top: 88px; }
/* Tool pages jump to sections and references by id: keep the target below the fixed navigation. */
.blog-prose--tool [id] { scroll-margin-top: 88px; }
.blog-prose h2[tabindex="-1"]:focus { outline: none; }
@media (min-width: 768px) {
  .blog-main--article { max-width: 1440px; }
  .blog-main--article:has(.has-contents) > article { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 740px) minmax(0, 1fr); column-gap: 24px; }
  .blog-main--article:has(.has-contents) .blog-heading, .blog-main--article:has(.has-contents) .blog-hero { grid-column: 2; width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }
  .blog-reading-layout.has-contents { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 740px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .blog-reading-layout.has-contents > .blog-prose { grid-column: 2; min-width: 0; width: 100%; }
  .blog-contents { grid-column: 1; position: sticky; top: 88px; left: auto; bottom: auto; width: auto; max-height: calc(100vh - 112px); overflow-y: auto; margin: 0; scrollbar-width: thin; background: transparent; border: 0; border-radius: 0; }
  .blog-contents-details { padding: 0; border: 0; }
  .blog-contents summary { list-style: none; cursor: default; color: #4a5a54; }
  .blog-contents summary::-webkit-details-marker { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.blog-contents) { scroll-behavior: auto; }
}
/* Tool articles: the tool spans the page up to 1180px, byline and abstract sit in the reading column under it. */
@media (min-width: 768px) {
  .blog-main--article:has(.has-contents) > article > .blog-tool-about { grid-column: 2; width: 100%; min-width: 0; }
  .blog-main--article:has(.has-contents) > article > .blog-tool { grid-column: 1 / -1; width: 100%; max-width: 1180px; min-width: 0; margin-left: auto; margin-right: auto; }
  /* The compact tool head (2026-12-02) is as wide as the tool, not the reading column. */
  .blog-main--tool:has(.has-contents) > article > .blog-heading { grid-column: 1 / -1; width: 100%; max-width: 1180px; min-width: 0; margin-left: auto; margin-right: auto; }
}
