/* Reading tools augment the original article without changing its prose. */
.reader-post .post-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--global-divider-color);
  margin-bottom: 2rem;
}
.reader-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}
.reader-sidebar {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100dvh - 7rem);
  overflow-y: auto;
  font-size: 0.8rem;
}
.reader-contents summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--global-divider-color);
}
.reader-contents:not([open]) summary span {
  font-size: 0;
}
.reader-contents:not([open]) summary span::after {
  content: "+";
  font-size: 1rem;
}
.reader-contents nav {
  padding: 0.7rem 0;
}
.reader-contents a {
  display: block;
  color: var(--global-text-color);
  padding: 0.45rem 0.6rem;
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.reader-contents a[aria-current] {
  border-left-color: var(--global-theme-color);
  color: var(--global-theme-color);
  background: var(--global-code-bg-color);
}
.reader-contents a.reader-subsection {
  padding-left: 1.1rem;
  font-size: 0.75rem;
}
.reader-position {
  padding: 0.75rem 0;
  border-top: 1px solid var(--global-divider-color);
  font-size: 0.75rem;
}
.reader-position a {
  display: inline;
  padding: 0;
  border: 0;
  text-decoration: underline;
}
.reader-post .post-content {
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.85;
}
.reader-post #markdown-content > p {
  margin-bottom: 1.4rem;
}
.reader-post #markdown-content :is(h1, h2, h3, h4) {
  font-family: Roboto, sans-serif;
  line-height: 1.3;
  position: relative;
  scroll-margin-top: 6rem;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
}
.reader-post #markdown-content :is(h1, h2) {
  font-size: 1.55rem;
  font-weight: 500;
}
.reader-post #markdown-content h3 {
  font-size: 1.2rem;
  font-weight: 500;
}
.reader-post #markdown-content blockquote {
  padding: 1rem 1.2rem;
  background: var(--global-code-bg-color);
  border-left: 3px solid var(--global-theme-color);
  font-size: 1em;
}
.reader-post #markdown-content .row[style] {
  width: 100% !important;
}
.reader-post figure {
  margin: 1.8rem 0;
  padding: 0.7rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 4px;
  background: #fff;
}
.reader-post figure img {
  border-radius: 0 !important;
  box-shadow: none !important;
  display: block;
  height: auto;
}
.reader-post figure figcaption {
  color: #444;
  text-align: left;
  font:
    0.8rem/1.5 Roboto,
    sans-serif;
  padding: 0.75rem 0.2rem 0;
}
.reader-figure-open {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}
.reader-figure-label {
  display: block;
  font:
    0.75rem/1.4 Roboto,
    sans-serif;
  text-align: right;
  color: #555;
  padding: 0.6rem 0.2rem 0;
}
.reader-heading-link {
  position: absolute;
  right: -1.5rem;
  top: 0.1em;
  font:
    0.9rem/1.5 Roboto,
    sans-serif;
  border: 0;
  color: var(--global-theme-color);
  background: transparent;
  opacity: 0;
}
:is(h1, h2, h3, h4):hover .reader-heading-link,
.reader-heading-link:focus-visible {
  opacity: 1;
}
.reader-post #markdown-content .table-responsive {
  overflow-x: auto;
}
.reader-post #markdown-content pre {
  font-size: 0.8rem;
  line-height: 1.6;
}
.reader-image-viewer {
  width: min(1100px, 94vw);
  max-height: 92dvh;
  padding: 1rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 6px;
  color: var(--global-text-color);
  background: var(--global-bg-color);
}
.reader-image-viewer::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
.reader-viewer-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}
.reader-viewer-tools [data-image-close] {
  margin-left: auto;
}
.reader-viewer-tools button {
  color: inherit;
  background: transparent;
  border: 1px solid var(--global-divider-color);
  padding: 0.5rem 0.8rem;
  border-radius: 3px;
}
.reader-image-stage {
  overflow: auto;
  background: #fff;
  text-align: center;
}
.reader-image-stage img {
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}
.reader-image-viewer [data-image-caption] {
  font-size: 0.85rem;
  margin: 0.8rem 0;
}
.reader-image-viewer [data-image-original] {
  font-size: 0.8rem;
}
@media (max-width: 760px) {
  .reader-layout {
    display: block;
  }
  .reader-sidebar {
    top: 3.5rem;
    z-index: 20;
    background: var(--global-bg-color);
    max-height: 55dvh;
    border: 1px solid var(--global-divider-color);
    border-radius: 4px;
    padding: 0 0.85rem;
    margin-bottom: 1.5rem;
  }
  .reader-post .post-content {
    font-size: 1rem;
  }
  .reader-heading-link {
    position: static;
    margin-left: 0.5rem;
    opacity: 0.7;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .reader-contents[open] nav {
    animation: reader-reveal 0.18s ease-out;
  }
  @keyframes reader-reveal {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media print {
  .reader-sidebar,
  .reader-heading-link,
  .reader-figure-label,
  .reader-image-viewer {
    display: none !important;
  }
  .reader-layout {
    display: block;
  }
  .reader-post .post-content {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
  }
  .reader-post figure {
    break-inside: avoid;
  }
}
/* The template post has its own resource layout, separate from the reading tools. */
.post-comments {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--global-divider-color);
}
.post-comments h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 5rem;
}
.post-comments-load {
  padding: 0.7rem 1rem;
  color: var(--global-text-color);
  background: var(--global-bg-color);
  border: 1px solid var(--global-divider-color);
  border-radius: 4px;
  cursor: pointer;
}
.post-comments-load:hover,
.post-comments-load:focus-visible {
  border-color: var(--global-theme-color);
}
.post-comments-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--global-text-color-light);
}
.template-intro {
  padding: 1.75rem 0;
  border-block: 1px solid var(--global-divider-color);
  margin: 1.75rem 0 2rem;
}
.template-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--global-theme-color);
}
.template-intro h2 {
  font-size: 1.9rem;
  font-weight: 400;
  margin: 0.5rem 0 1rem;
}
.template-intro > p:not(.template-eyebrow):not(.template-small) {
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 720px;
}
.template-downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin: 1.5rem 0 1rem;
}
.template-primary {
  display: inline-block;
  padding: 0.85rem 1.2rem;
  background: var(--global-theme-color);
  color: var(--global-bg-color) !important;
  border-radius: 3px;
  font-weight: 500;
}
.template-small {
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 690px;
  margin: 0;
}
.template-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.template-previews figure {
  border: 1px solid var(--global-divider-color);
  background: #fff;
  padding: 0.5rem;
  margin-bottom: 1rem;
}
.template-previews img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  object-position: top;
}
.template-previews h3 {
  font-size: 1.1rem;
  color: var(--global-text-color);
  margin: 0 0 0.5rem;
}
.template-previews p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.template-previews > article > a {
  font-size: 0.8rem;
}
.template-guide ~ h2 {
  margin-top: 2.5rem;
}
@media (max-width: 600px) {
  .template-previews {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .template-previews img {
    height: 340px;
  }
  .template-intro h2 {
    font-size: 1.6rem;
  }
}
