/* REZZZ universal module header.
   Markup:
   <header class="rzh">
     <div class="rzh-in">
       <a class="rzh-brand" href="../tools.html">…</a>
       <span class="rzh-badge">…</span>
       <a class="rzh-back" href="../tools.html">…</a>
     </div>
   </header>
   Colors live in the custom properties below so a theme change only touches this file. */
.rzh {
  --rzh-bg: #151515;
  --rzh-fg: #ffffff;
  --rzh-muted: #a3a3a3;
  --rzh-accent: #c7ff00;
  --rzh-accent-fg: #151515;
  --rzh-line: #ffffff;

  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  background: var(--rzh-bg);
  color: var(--rzh-fg);
  border-bottom: 3px solid var(--rzh-bg);
  padding-top: env(safe-area-inset-top, 0px);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.rzh *,
.rzh *::before,
.rzh *::after { box-sizing: border-box; }

.rzh-in {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 56px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
}

.rzh-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.rzh-r {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--rzh-accent);
  color: var(--rzh-accent-fg);
  border: 2px solid var(--rzh-line);
  font-weight: 900;
  font-size: 17px;
  line-height: 1;
}
.rzh-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.rzh-name b {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--rzh-accent);
  font-weight: 800;
}

.rzh-badge {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--rzh-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rzh-back {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  background: var(--rzh-accent);
  color: var(--rzh-accent-fg);
  border: 2px solid var(--rzh-line);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rzh-badge + .rzh-back { margin-left: 0; }
.rzh-back svg { width: 16px; height: 16px; flex: none; }
.rzh-back:focus-visible,
.rzh-brand:focus-visible {
  outline: 2px solid var(--rzh-accent);
  outline-offset: 3px;
}
.rzh-back:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.5);
}
@media (hover: hover) and (pointer: fine) {
  .rzh-back:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  }
}

/* For pages whose main container has no top padding. */
.rzh--gap { margin-bottom: 24px; }

/* Phones: drop the category text, keep brand + back button. */
@media (max-width: 559px) {
  .rzh-badge { display: none; }
  .rzh-in { gap: 8px; }
  .rzh-name { font-size: 15px; }
}
@media (max-width: 359px) {
  .rzh-back span { display: none; }
  .rzh-back { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rzh-back { transition: none; }
}
