/* Shared site navigation. Injected by nav.js on every page.
   Its palette is deliberately self-contained and dark, so the same bar reads correctly on
   the light foreman form and the dark review console without either page theming it.

   Desktop (>=900px): fixed sidebar on the left, body padded to clear it.
   Phone: fixed bottom tab bar, which never collides with a page's own sticky header. */

:root { --jpnav-w: 208px; --jpnav-h: 62px; }

.jpnav {
  position: fixed; z-index: 100;
  background: #16181D; color: #fff;
  font-family: 'Archivo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.jpnav a { text-decoration: none; color: inherit; }
.jpnav svg { flex: 0 0 auto; }

.jpnav-brand { display: none; }
.jpnav-brand .dot {
  width: 12px; height: 12px; background: #FF6A13; border-radius: 2px;
  display: inline-block; transform: skewX(-12deg); flex: 0 0 auto;
}
.jpnav-brand b { font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.jpnav-brand small {
  display: block; font-weight: 600; font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: #8B93A1; margin-top: 2px;
}

.jpnav-links { display: flex; }
.jpnav-link {
  display: flex; align-items: center; gap: 10px;
  color: #AEB4BF; font-weight: 700; font-size: 13.5px;
  border-radius: 8px; padding: 11px 12px;
  transition: background .12s, color .12s;
}
.jpnav-link small {
  display: block; font-weight: 600; font-size: 11px; color: #6F7684; margin-top: 1px;
}
.jpnav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.jpnav-link.on { background: #FF6A13; color: #fff; }
.jpnav-link.on small { color: rgba(255,255,255,.82); }
.jpnav-link.on svg { opacity: 1; }
.jpnav-link svg { opacity: .8; }

/* ---- desktop: left sidebar ---- */
@media (min-width: 900px) {
  body { padding-left: var(--jpnav-w); }
  .jpnav {
    top: 0; left: 0; bottom: 0; width: var(--jpnav-w);
    border-right: 3px solid #FF6A13;
    display: flex; flex-direction: column; padding: 16px 12px;
  }
  .jpnav-brand { display: flex; align-items: center; gap: 9px; padding: 4px 10px 18px; }
  .jpnav-links { flex-direction: column; gap: 4px; }
  .jpnav-foot {
    margin-top: auto; padding: 12px 10px 2px; font-size: 11px; line-height: 1.5;
    color: #6F7684; border-top: 1px solid #2A2E37;
  }
}

/* ---- phone: bottom tab bar ---- */
@media (max-width: 899px) {
  body { padding-bottom: calc(var(--jpnav-h) + env(safe-area-inset-bottom, 0px)); }
  .jpnav {
    left: 0; right: 0; bottom: 0;
    border-top: 3px solid #FF6A13;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
  }
  .jpnav-links { justify-content: space-around; }
  .jpnav-link {
    flex: 1; flex-direction: column; gap: 3px; justify-content: center;
    padding: 8px 4px; border-radius: 0; font-size: 11px; text-align: center;
    min-height: var(--jpnav-h);
  }
  .jpnav-link small { display: none; }
  .jpnav-link.on { background: transparent; color: #FF6A13; }
  .jpnav-link.on svg { color: #FF6A13; }
  .jpnav-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) { .jpnav * { transition: none !important; } }
