
/* =========================================================
   FORGE NAV — slim top HUD + retro side dock (v0.41)
   ========================================================= */

/* --- Top primary HUD --- */
.primary-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.25rem;
  margin: 0.35rem auto 0.75rem;
  padding: 0.4rem 0.5rem;
  max-width: 720px;
  border: 1px solid rgba(9, 245, 48, 0.4);
  background:
    linear-gradient(180deg, rgba(0, 40, 18, 0.85), rgba(0, 0, 0, 0.9)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 100, 0.03) 2px,
      rgba(0, 255, 100, 0.03) 4px
    );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 18px rgba(9, 245, 48, 0.12),
    inset 0 0 24px rgba(0, 30, 12, 0.5);
  font-family: var(--crt-font, "Courier New", monospace);
}

.primary-hud-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.82rem !important;
  font-weight: bold !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  color: var(--primary-green, #09f530) !important;
  text-decoration: none !important;
  text-shadow: 0 0 6px rgba(9, 245, 48, 0.35) !important;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.15s ease;
}

.primary-hud-link:hover {
  color: #fff !important;
  border-color: rgba(9, 245, 48, 0.55);
  background: rgba(9, 245, 48, 0.1);
  box-shadow: 0 0 12px rgba(9, 245, 48, 0.25);
  transform: translateY(-1px);
}

.primary-hud-link .hud-ico {
  font-size: 0.75rem;
  opacity: 0.85;
}

.primary-hud-link.is-auth {
  border: 1px solid rgba(9, 245, 48, 0.35);
  background: rgba(9, 245, 48, 0.08);
}

.primary-hud-link.is-auth:hover {
  background: #09f530;
  color: #000 !important;
  text-shadow: none !important;
}

.primary-hud-sep {
  width: 1px;
  height: 1.1rem;
  background: rgba(9, 245, 48, 0.25);
  margin: 0 0.2rem;
}

.site-version-badge.hud-ver {
  margin-left: 0.35rem;
  font-size: 0.65rem;
  opacity: 0.7;
  border-color: rgba(0, 170, 85, 0.5);
}

/* Hide legacy dump nav if present */
header .nav-links.legacy-full-nav {
  display: none !important;
}

/* Brand slightly tighter so HUD has room */
header.header-main .brand-center {
  margin-bottom: 0.25rem;
}
header.header-main #main-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem) !important;
  letter-spacing: 0.18em !important;
  margin-bottom: 0.15rem !important;
}
header.header-main .wizard-logo {
  height: 140px !important;
  width: 140px !important;
  margin-bottom: 12px !important;
}

/* --- Side dock toggle (always visible on desktop) --- */
.dock-fab {
  position: fixed;
  left: 0;
  top: 42%;
  z-index: 10040;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 0.85rem 0.4rem;
  border: 1px solid #09f530;
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: rgba(0, 0, 0, 0.88);
  color: #09f530;
  font-family: var(--crt-font, "Courier New", monospace);
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.2em;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(9, 245, 48, 0.35);
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.dock-fab:hover {
  background: #09f530;
  color: #000;
  box-shadow: 0 0 20px rgba(9, 245, 48, 0.55);
}
.dock-fab .dock-fab-arrow {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
}

/* --- Side dock panel --- */
.forge-side-dock {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10045;
  width: min(300px, 88vw);
  height: 100vh;
  box-sizing: border-box;
  padding: 1rem 0.85rem 1.25rem;
  border-right: 2px solid #09f530;
  background:
    linear-gradient(185deg, rgba(0, 28, 14, 0.97) 0%, rgba(0, 0, 0, 0.98) 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 80, 0.025) 2px,
      rgba(0, 255, 80, 0.025) 4px
    );
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.65), 0 0 30px rgba(9, 245, 48, 0.12);
  font-family: var(--crt-font, "Courier New", monospace);
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #09f530 #111;
}
body.dock-open .forge-side-dock {
  transform: translateX(0);
}
body.dock-open .dock-fab {
  left: min(300px, 88vw);
  border-left: 1px solid #09f530;
}

.dock-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10042;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(1px);
}
body.dock-open .dock-backdrop {
  display: block;
}

.dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(9, 245, 48, 0.3);
}
.dock-head-title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #09f530;
  text-shadow: 0 0 8px rgba(9, 245, 48, 0.4);
}
.dock-head-sub {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: #666;
  letter-spacing: 0.06em;
}
.dock-close {
  background: transparent;
  border: 1px solid rgba(9, 245, 48, 0.45);
  color: #09f530;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  line-height: 1;
}
.dock-close:hover {
  background: #09f530;
  color: #000;
}

.dock-section {
  margin-bottom: 1rem;
}
.dock-section-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: #4a7a4a;
  margin: 0 0 0.4rem 0.15rem;
  text-transform: uppercase;
}
.dock-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.28rem;
  border: 1px solid rgba(9, 245, 48, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #b8e0b8 !important;
  text-decoration: none !important;
  font-size: 0.88rem !important;
  font-weight: bold !important;
  letter-spacing: 0.06em;
  transition: all 0.12s ease;
}
.dock-link:hover {
  border-color: #09f530;
  color: #fff !important;
  background: rgba(9, 245, 48, 0.12);
  box-shadow: inset 3px 0 0 #09f530, 0 0 12px rgba(9, 245, 48, 0.15);
  transform: translateX(3px);
}
.dock-link .d-ico {
  width: 1.4rem;
  text-align: center;
  color: #09f530;
  font-size: 0.95rem;
  text-shadow: 0 0 6px rgba(9, 245, 48, 0.5);
}
.dock-link .d-meta {
  margin-left: auto;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: #555;
  font-weight: normal;
}
.dock-link.is-hot {
  border-color: rgba(9, 245, 48, 0.55);
  background: rgba(9, 245, 48, 0.1);
  box-shadow: 0 0 14px rgba(9, 245, 48, 0.15);
}
.dock-link.is-hot .d-meta {
  color: #09f530;
}

.dock-stat-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.5rem 0 1rem;
}
.dock-stat {
  border: 1px solid rgba(9, 245, 48, 0.2);
  padding: 0.4rem 0.45rem;
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}
.dock-stat .n {
  display: block;
  font-size: 0.95rem;
  color: #09f530;
  font-weight: bold;
}
.dock-stat .l {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: #555;
  text-transform: uppercase;
}

.dock-foot {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(9, 245, 48, 0.2);
  font-size: 0.65rem;
  color: #444;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

/* When dock open, subtle shift on wide screens */
@media (min-width: 1100px) {
  body.dock-open .site-wrapper {
    margin-left: 0; /* overlay style — no layout jump */
  }
}

/* Narrow: hide edge fab a bit higher; hamburger can also open dock */
@media (max-width: 960px) {
  .dock-fab {
    top: auto;
    bottom: 5.5rem;
    writing-mode: horizontal-tb;
    transform: none;
    left: 0.75rem;
    border: 1px solid #09f530;
    border-radius: 4px;
    padding: 0.45rem 0.65rem;
    letter-spacing: 0.12em;
  }
  body.dock-open .dock-fab {
    left: 0.75rem;
    opacity: 0;
    pointer-events: none;
  }
  .primary-hud {
    max-width: 100%;
    gap: 0.2rem;
  }
  .primary-hud-link {
    padding: 0.4rem 0.55rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.1em !important;
  }
  .primary-hud-sep {
    display: none;
  }
}
