/* The only fixed navigation: a native link back to the page header. */
:root { --page-tools-space: calc(3.5rem + 24px + env(safe-area-inset-bottom)); }
html { scroll-padding-block-end: var(--page-tools-space); }
body { padding-block-end: var(--page-tools-space); }
.page-tools {
  position: fixed;
  inset: auto 20px calc(12px + env(safe-area-inset-bottom)) auto;
  width: fit-content;
  max-width: calc(100% - 40px);
  z-index: 5;

}
.page-tools > .shell { display: flex; width: auto; margin: 0; }
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: var(--white);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.back-to-top:hover { color: var(--white); background: var(--blue); }
body:has(dialog[open]) .page-tools { visibility: hidden; }
@media print {
  .page-tools { display: none; }
  body { padding-block-end: 0; }
}
