/* Article layout is independent of the mission page and marketing worktrees. */
.blog-page main:has(> .blog-post) {
  width: min(100% - 3rem, 46rem);
  max-width: none;
  margin-inline: auto;
  padding: 2.5rem 0 4rem;
}
.blog-page .blog-post { font-size: 1.0625rem; line-height: 1.85; }
.reader-actions {
  position: fixed;
  z-index: 12;
  top: var(--reader-top, calc(var(--site-header-height, 80px) + 1.5rem));
  left: var(--reader-left, clamp(1rem, 7vw, 7rem));
  width: max-content;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.blog-page .blog-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  color: var(--red);
  font: .8rem/1.4 var(--font-mono);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.blog-page .blog-back:hover { color: var(--red-6); }
.reader-actions kbd {
  padding: .25rem .35rem;
  border: 1px solid #ffffff14;
  border-radius: 4px;
  background: #191919;
  color: var(--ink-muted);
  font: .65rem/1 var(--font-mono);
}
.blog-back:focus-visible, .reader-rail a:focus-visible, .reader-contents a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}
.blog-page .blog-post .post-header { margin-bottom: 2rem; }
.blog-page .blog-post h1 { margin: 0 0 1.25rem; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -.035em; text-wrap: balance; }
.blog-page .blog-post .post-meta { font-size: .75rem; line-height: 1.8; }
.blog-page .blog-post .post-content > p { margin-bottom: 1.35rem; }
.blog-page .blog-post h2 { margin: 3rem 0 1rem; font-size: 1.4rem; line-height: 1.35; letter-spacing: -.02em; }
.blog-page .blog-post h3 { margin: 2.25rem 0 .85rem; font-size: 1.15rem; line-height: 1.45; }
.blog-page .blog-post li { margin-bottom: .65rem; }
.blog-page .blog-post pre.code { padding: 1.1rem 1.25rem; font-size: .825rem; line-height: 1.7; border-radius: 6px; }
.blog-post :is(h1, .post-content > *) { scroll-margin-top: 8rem; }
.reader-rail {
  position: fixed;
  z-index: 10;
  top: 50%;
  right: var(--reader-right, clamp(1rem, 4vw, 4rem));
  transform: translateY(-50%);
  width: 56px;
  max-height: min(65vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.reader-rail::-webkit-scrollbar { display: none; }
.reader-rail ol { display: flex; flex-direction: column; margin: 0; padding: 12px 0; list-style: none; }
.reader-rail li { margin: 0; padding: 0; }
.reader-rail a {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 12px;
  padding: 0 10px;
  color: #5b5b5b;
  text-decoration: none;
}
.reader-rail .is-heading { height: 25px; color: #9c9c9c; }
.reader-rail .reader-tick { width: 9px; height: 2px; flex: none; border-radius: 2px; color: inherit; background: currentColor; transition: width 160ms, color 160ms; }
.reader-rail .is-heading .reader-tick { width: 25px; }
.reader-rail .is-subheading .reader-tick { width: 17px; }
.reader-rail .is-title .reader-tick { width: 34px; height: 3px; }
.reader-rail .is-past { color: #777; }
.reader-rail a:is(:hover, :focus-visible) { color: #fff; }
.reader-rail a[aria-current] { color: var(--red); }
.reader-rail a[aria-current] .reader-tick { width: 34px; }
.reader-label {
  position: fixed;
  z-index: 30;
  right: calc(var(--reader-right, 1.25rem) + 4.5rem);
  top: 50%;
  width: max-content;
  max-width: min(22rem, 50vw);
  padding: .6rem .8rem;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #171717;
  box-shadow: 0 8px 30px #0005;
  color: #e5e5e5;
  font: .8rem/1.5 var(--font-sans);
  pointer-events: none;
}
.reader-label[hidden] { display: none; }
.reader-contents { display: none; margin-bottom: 1.75rem; padding: .75rem 1rem; border: 1px solid var(--rule); border-radius: 7px; background: var(--chat-surface); font-size: .875rem; }
.reader-contents summary { cursor: pointer; color: var(--ink-muted); }
.reader-contents ol { margin: 1rem 0 0; padding-left: 1.2rem; }
.reader-contents li { margin-bottom: .65rem; }
.reader-contents a { color: var(--ink); text-decoration: none; }
.reader-at-footer :is(.reader-actions, .reader-rail, .reader-label) { visibility: hidden; }
.reader-inline-actions .reader-actions { position: static; margin-bottom: 1.5rem; }
.reader-compact-navigation :is(.reader-rail, .reader-label) { display: none; }
.reader-compact-navigation .reader-contents { display: block; }

@media (max-width: 1199px) {
  .reader-actions { position: static; margin-bottom: 1.5rem; }
}
@media (max-width: 1079px) {
  .reader-rail, .reader-label { display: none; }
  .reader-contents { display: block; }
}
@media (max-width: 599px) {
  .blog-page main:has(> .blog-post) { width: calc(100% - 2.5rem); padding-top: 1.5rem; }
  .blog-page .blog-post { font-size: 1rem; line-height: 1.8; }
  .reader-actions { margin-bottom: 1.5rem; }
  .blog-page .blog-post h1 { font-size: 2rem; }
  .blog-page .blog-post h2 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.blog-post) { scroll-behavior: smooth; }
}
