/* Floating site Back button, shared by every sub page.
   At rest: a translucent circle with a left arrow.
   On hover or keyboard focus: fully opaque, showing the word "Back".
   Pages may theme it by setting --site-back-bg and --site-back-fg on the link. */
.site-back {
  --site-back-bg: #111827;
  --site-back-fg: #f8fafc;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--site-back-fg);
  border-radius: 999px;
  background: var(--site-back-bg);
  color: var(--site-back-fg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  font: 700 15px/1 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  letter-spacing: .02em;
  text-decoration: none;
  opacity: .45;
  transition: opacity .2s ease, padding .2s ease;
}

.site-back__icon { font-size: 20px; line-height: 1; }
.site-back__label { display: none; }

.site-back:hover,
.site-back:focus-visible {
  opacity: 1;
  padding: 0 16px;
}

.site-back:hover .site-back__icon,
.site-back:focus-visible .site-back__icon { display: none; }

.site-back:hover .site-back__label,
.site-back:focus-visible .site-back__label { display: inline; }

.site-back:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .site-back { transition: none; }
}
