/* HSC Vault — the one site navbar (rendered by /nav.js on every public page).
   Self-contained: it brings its own colours and font, so it looks identical whatever
   the host page defines. Every class is prefixed hn- to stay out of page styles. */

.hn, .hn-slot {
  --hn-ink: #EAF0FA;
  --hn-ink-2: #93A0B8;
  --hn-ink-3: #5E6B82;
  --hn-line: rgba(255, 255, 255, .10);
  --hn-line-soft: rgba(255, 255, 255, .06);
  --hn-sky: #3B9EFF;
  --hn-cyan: #22D3EE;
  --hn-green: #30D158;
  --hn-grad: linear-gradient(135deg, #2563EB, #3B9EFF 50%, #22D3EE);
  --hn-blur: blur(30px) saturate(180%);
}

/* Reserves the bar's height until nav.js fills it (React pages mount it after hydration). */
.hn-slot { display: block; min-height: 82px; }
.hn-slot:has(.hn) { min-height: 0; }

.hn {
  position: sticky; top: 0; z-index: 50;
  padding: 12px 0;
  font-family: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.2;
}
.hn *, .hn *::before, .hn *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hn a { color: inherit; text-decoration: none; }
.hn svg { display: block; }

.hn-wrap { position: relative; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.hn-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 11px 16px 11px 18px;
  background: rgba(9, 13, 23, .66);
  -webkit-backdrop-filter: var(--hn-blur); backdrop-filter: var(--hn-blur);
  border: 1px solid var(--hn-line);
  border-radius: 18px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* logo */
.hn-logo { display: inline-flex; align-items: center; gap: 11px; flex: none; color: var(--hn-ink); }
.hn-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--hn-grad);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.hn-mark svg { width: 19px; height: 19px; }
.hn-word { font-size: 18px; letter-spacing: -.02em; font-weight: 600; }
.hn-word span { color: var(--hn-ink-2); font-weight: 500; }

/* links */
.hn-links { display: flex; align-items: center; gap: 6px; }
.hn-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hn-ink-2); font-size: 14.5px; font-weight: 500;
  padding: 8px 13px; border-radius: 11px;
  transition: color .2s, background .2s;
}
.hn-link:hover { color: var(--hn-ink); background: rgba(255, 255, 255, .05); }
.hn-link[aria-current="page"] { color: var(--hn-ink); background: rgba(59, 158, 255, .12); }
.hn-new {
  display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--hn-grad); color: #fff; box-shadow: 0 2px 6px -1px rgba(59, 158, 255, .55);
}

/* right side */
.hn-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.hn-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  padding: 12px 20px; border-radius: 14px; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .3s ease, background .3s ease, border-color .3s, color .3s;
}
.hn-btn svg { width: 16px; height: 16px; position: relative; z-index: 1; }
.hn-btn > span { position: relative; z-index: 1; }
.hn-login {
  background: rgba(34, 211, 238, .10); color: var(--hn-cyan); border-color: rgba(34, 211, 238, .4);
  -webkit-backdrop-filter: var(--hn-blur); backdrop-filter: var(--hn-blur);
  box-shadow: 0 6px 18px -8px rgba(34, 211, 238, .5), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hn-login svg { width: 15px; height: 15px; }
.hn-login:hover {
  background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .65); color: #7BEBF7; transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(34, 211, 238, .7), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.hn-get {
  background: var(--hn-grad); color: #fff;
  box-shadow: 0 10px 26px -8px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .34);
}
.hn-get:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(37, 99, 235, .85), inset 0 1px 0 rgba(255, 255, 255, .4); }
/* light sweep across both buttons */
.hn-login::after, .hn-get::after {
  content: ""; position: absolute; top: 0; left: -140%; width: 55%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-18deg);
}
.hn-login::after { animation: hn-sheen 5s ease-in-out infinite; }
.hn-get::after { transition: left .75s ease; }
.hn-get:hover::after { left: 175%; }
@keyframes hn-sheen { 0%, 62% { left: -140%; } 82%, 100% { left: 170%; } }

/* signed-in chip (replaces Login) */
.hn-acct {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 15px 6px 6px; border-radius: 100px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(37, 99, 235, .10)); border: 1px solid rgba(34, 211, 238, .4);
  box-shadow: 0 8px 22px -10px rgba(34, 211, 238, .6), inset 0 1px 0 rgba(255, 255, 255, .16);
  font-size: 14px; font-weight: 600; color: var(--hn-ink);
  transition: transform .18s ease, box-shadow .3s, border-color .3s;
}
.hn-acct:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, .7); }
.hn-av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--hn-grad); flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
}
.hn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hn-green); animation: hn-dot 2.2s ease-in-out infinite; }
@keyframes hn-dot { 0%, 100% { box-shadow: 0 0 0 3px rgba(48, 209, 88, .20); } 50% { box-shadow: 0 0 0 6px rgba(48, 209, 88, .03); } }

/* hamburger */
.hn-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--hn-line); color: var(--hn-ink);
  cursor: pointer; transition: background .2s, transform .18s ease; -webkit-tap-highlight-color: transparent;
}
.hn-toggle:hover { background: rgba(255, 255, 255, .08); }
.hn-toggle:active { transform: scale(.94); }
.hn-toggle svg { width: 22px; height: 22px; pointer-events: none; }
.hn-toggle line { transition: transform .32s cubic-bezier(.4, .01, .2, 1), opacity .2s ease; transform-origin: center; }
.hn-toggle[aria-expanded="true"] .hn-l1 { transform: translateY(5px) rotate(45deg); }
.hn-toggle[aria-expanded="true"] .hn-l2 { opacity: 0; transform: scaleX(.2); }
.hn-toggle[aria-expanded="true"] .hn-l3 { transform: translateY(-5px) rotate(-45deg); }

/* mobile menu */
.hn-menu {
  display: none; position: absolute; left: 24px; right: 24px; top: calc(100% + 4px);
  padding: 10px; border-radius: 16px;
  background: rgba(14, 19, 32, .94);
  -webkit-backdrop-filter: var(--hn-blur); backdrop-filter: var(--hn-blur);
  border: 1px solid var(--hn-line);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .14);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.985); transform-origin: top center;
  transition: opacity .26s ease, transform .3s cubic-bezier(.22, .61, .36, 1), visibility .26s;
}
.hn-menu.hn-open { opacity: 1; visibility: visible; transform: none; }
.hn-mlink {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--hn-ink-2); font-size: 16px; font-weight: 500; letter-spacing: -.01em;
  padding: 13px 14px; border-radius: 12px; transition: color .2s, background .2s;
}
.hn-mlink:hover, .hn-mlink:focus-visible, .hn-mlink[aria-current="page"] { color: var(--hn-ink); background: rgba(255, 255, 255, .05); }
.hn-mlink .hn-new { margin-left: 8px; }
.hn-mlink svg { width: 17px; height: 17px; color: var(--hn-ink-3); flex: none; transition: transform .2s, color .2s; }
.hn-mlink:hover svg { color: var(--hn-sky); transform: translateX(2px); }
.hn-sep { height: 1px; background: var(--hn-line-soft); margin: 8px 6px; }
.hn-menu .hn-get { width: 100%; justify-content: center; }

.hn a:focus-visible, .hn button:focus-visible { outline: 2px solid var(--hn-sky); outline-offset: 2px; }

@media (max-width: 860px) {
  .hn-links, .hn-login, .hn-acct, .hn-long { display: none; }
  .hn-toggle { display: inline-flex; }
  .hn-menu { display: block; }
}
@media (max-width: 380px) {
  .hn-wrap { padding: 0 12px; }
  .hn-menu { left: 12px; right: 12px; }
  .hn-bar { padding: 9px 10px 9px 12px; gap: 10px; }
  .hn-btn { padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hn *, .hn *::before, .hn *::after { animation: none !important; transition: none !important; }
}
