html:has(.site-document-page) { height: auto; overflow: auto; }

body.site-document-page {
  min-height: 100vh;
  height: auto;
  margin: 0;
  overflow: visible;
  background: var(--glass-solid, #fffdf8);
  color: var(--ink, #1d2a23);
  font: 1rem/1.65 Rubik, system-ui, sans-serif;
}

.site-document-shell {
  position: relative;
  width: min(100% - 36px, 670px);
  margin: 24px auto 48px;
}

.site-document-header {
  position: absolute;
  top: 0;
  left: 0;
}

.site-document-shell a:any-link { color: inherit; text-underline-offset: .18em; }
.site-document-shell a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.site-document-close {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line, #dbd9cb);
  border-radius: 12px;
  text-decoration: none;
}

.site-document-close:hover { background: var(--chip, #f3eee2); }
.site-document-content h1 {
  min-height: 44px;
  margin: 0 0 .65em;
  padding-left: 56px;
  font-size: clamp(1.65em, 5vw, 2.2em);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (min-width: 820px) {
  .site-document-header { left: -60px; }
  .site-document-content h1 { padding-left: 0; }
}
.site-document-content h2 { margin: 1.35em 0 .35em; font-size: 1.15em; }
.site-document-content p { margin: 0 0 .75em; }
.site-document-content time { color: var(--ink-2, #4f6455); }
