/**
 * dpopd — fixed top-left navigation
 * Back / exit / home links stay in the upper-left corner.
 */

.site-nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
  max-width: min(calc(100vw - 2rem), 22rem);
  pointer-events: none;
}

.site-nav-fixed > * {
  pointer-events: auto;
}

.site-nav-link {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #888;
  text-decoration: none;
  line-height: 1.45;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  color: #111;
}

/* Standalone back links on tool / app pages */
body:not(.has-play-shell) > a.back,
body:not(.has-play-shell) .wrap > a.back,
body:not(.has-play-shell) .page > .topbar > a.back {
  position: fixed;
  top: 1rem;
  left: 1.25rem;
  z-index: 1000;
  margin: 0 !important;
}

body:not(.has-play-shell):has(> a.back) {
  padding-top: 2.75rem;
}

body:not(.has-play-shell) .wrap:has(> a.back) {
  padding-top: 2.75rem;
}

body:has(> a.back-home) {
  padding-top: 3.25rem;
}

a.back-home {
  position: fixed;
  top: 1rem;
  left: 1.25rem;
  z-index: 1000;
}

/* Keep sticky-header backs in the header row (already top-left) */
header.top .back,
.topbar .back {
  position: static;
}

/* Simple inner pages (vision / contact) */
.page-simple .simple-back {
  position: fixed;
  top: 1rem;
  left: 1.25rem;
  z-index: 1001;
  margin: 0 !important;
}

.page-simple .simple-wrap {
  padding-top: 2.75rem;
}

/* Auth pages: back link stays in flow (header owns top-left brand) */
.auth-page .auth-back-home,
.auth-guest-nav .auth-back-home {
  position: static;
}

/* Codify detail overlay */
.method-detail:not([hidden]) .detail-close {
  position: fixed;
  top: 1rem;
  left: 1.25rem;
  z-index: 31;
  margin: 0;
  padding: 0.35rem 0.65rem;
  background: rgba(246, 243, 236, 0.96);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(28, 25, 22, 0.08);
}
