/* The shared site nav built by mountNav() in /assets/app.js. Every page links this file. Styles
   use the palette variables each page defines on :root. The brand is now an inline SVG mark
   (/assets/logo.svg equivalent) plus a wordmark; see mountNav. */

#nav { display: contents; }

.site-header {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; min-height: 60px;
  background: rgba(13, 13, 13, .72);
  border-bottom: 1px solid var(--line, rgba(255, 255, 255,.08));
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 6px 24px rgba(0, 0, 0, .3);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  font-size: 14px; line-height: normal;
}
.site-header a:hover { text-decoration: none; }
.nav-left, .nav-right, .nav-links, .nav-account { display: flex; align-items: center; gap: 4px; }

/* Brand = inline SVG mark + wordmark. The SVG is sized to 24px and inherits currentColor only on
   its stroke; the gradient fill is self-contained so it reads cleanly in both themes. */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  margin-right: 14px; padding: 4px 6px; border-radius: 8px;
  transition: transform .15s ease, color .15s ease;
}
.brand:hover { transform: translateY(-1px); }
.brand svg { width: 30px; height: 30px; flex: 0 0 auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0,.4)); }
.brand .wordmark { font-weight: 700; letter-spacing: -.02em; color: var(--text); }

.nav-link {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none;
  padding: 8px 13px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  transition: color .12s ease, background .12s ease;
}
.nav-link i { width: 14px; height: 14px; font-size: 12px; }
.nav-link:hover, .nav-link.on { color: var(--text); background: rgba(255, 255, 255,.06); }
.nav-right .nav-link { padding: 7px 12px; }

.nav-who {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: background .12s ease;
}
.nav-who:hover, .nav-who.on { background: rgba(255, 255, 255,.06); }

.nav-toggle { display: none; background: none; border: none; color: var(--muted); font-size: 16px; padding: 8px 10px; cursor: pointer; border-radius: 6px; }
.nav-toggle:hover { color: var(--text); background: rgba(255, 255, 255,.06); }

.site-header .btn {
  display: inline-block;
  background: rgba(30, 30, 30, .7);
  border: 1px solid var(--line, rgba(255, 255, 255,.08));
  border-radius: 8px; padding: 7px 14px;
  color: var(--text); font: inherit; font-size: 12px; font-weight: 500;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.site-header .btn:hover { border-color: var(--line-strong, rgba(255, 255, 255,.14)); background: rgba(40, 40, 40,.85); transform: translateY(-1px); }

.announcement {
  background: linear-gradient(90deg, rgba(30, 30, 30,.9), rgba(23, 23, 23,.9));
  border-bottom: 1px solid var(--line, rgba(255, 255, 255,.08));
  color: var(--text); font-size: 13px; line-height: normal; text-align: center;
  padding: 10px 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* ------------------------------------------------------------------ avatars */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; color: #ffffff;
  background: linear-gradient(135deg, var(--chip-1, #3c3c3c), var(--chip-2, #212121)); flex: 0 0 auto;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0,.3);
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-md { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 96px; height: 96px; font-size: 30px; }

/* ------------------------------------------------------------------ notifications */
.notif-wrap { position: relative; }
.notif-bell { position: relative; background: none; border: none; color: var(--muted); font-size: 16px; padding: 8px 10px; cursor: pointer; border-radius: 8px; transition: color .12s ease, background .12s ease; }
.notif-bell:hover { color: var(--text); background: rgba(255, 255, 255,.06); }
.notif-badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--bad, #f7f7f7); color: var(--bg, #0d0d0d); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0,.5);
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px; max-width: calc(100vw - 32px); max-height: 440px; overflow-y: auto;
  background: rgba(23, 23, 23, .92);
  border: 1px solid var(--line, rgba(255, 255, 255,.08));
  border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .55); z-index: 20;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line, rgba(255, 255, 255,.08)); }
.notif-list { display: grid; }
.notif-item { position: relative; display: block; padding: 11px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line, rgba(255, 255, 255,.08)); font-size: 13px; transition: background .12s ease; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255, 255, 255,.06); }
.notif-item.unread { background: rgba(255, 255, 255, .05); }
.notif-item.unread::before { content: ''; position: absolute; left: 6px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #cfcfcf); box-shadow: 0 0 6px rgba(255, 255, 255,.4); }
.notif-when { color: var(--muted); font-size: 11px; margin-top: 2px; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 960px) and (min-width: 761px) {
  .site-header { padding: 0 14px; }
  .nav-link { font-size: 12px; padding: 8px 9px; }
}

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; padding: 10px 16px; }
  .nav-toggle { display: inline-flex; order: 1; }
  .notif-wrap { order: 0; }
  .nav-account { order: 2; }
  .nav-left { flex: 1 1 auto; min-width: 0; }
  .nav-links, .nav-account { display: none; }
  .site-header.menu-open .nav-left { flex-wrap: wrap; row-gap: 6px; }
  .site-header.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    flex: 0 0 100%; width: 100%; margin-top: 10px;
  }
  .site-header.menu-open .nav-right { flex: 1 1 100%; width: 100%; flex-wrap: wrap; row-gap: 6px; }
  .site-header.menu-open .nav-toggle { position: absolute; top: 14px; right: 16px; }
  .site-header.menu-open .nav-account {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, rgba(255, 255, 255,.08));
  }
  .site-header.menu-open .nav-links .nav-link,
  .site-header.menu-open .nav-account .nav-link,
  .site-header.menu-open .nav-account .nav-who,
  .site-header.menu-open .nav-account .btn { width: 100%; box-sizing: border-box; }
  .site-header.menu-open .nav-account .nav-who { justify-content: flex-start; }
  .notif-panel { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; max-width: none; }
}

/* refreshed navigation surfaces */
.site-header {
  min-height: 68px; padding-inline: clamp(16px, 3vw, 38px);
  background: rgba(12, 12, 12, .82);
  border-bottom-color: rgba(224, 224, 224,.11);
  box-shadow: 0 8px 28px rgba(0, 0, 0,.24), inset 0 1px rgba(255, 255, 255,.025);
}
.brand { gap: 11px; font-size: 18px; letter-spacing: -.035em; }
.brand svg { width: 34px; height: 34px; }
.brand .wordmark { background: linear-gradient(100deg, #f3f3f3 25%, #e0e0e0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { gap: 3px; }
.nav-link { padding: 9px 12px; border-radius: 10px; font-weight: 550; }
.nav-link i { color: #909090; transition: color .16s ease; }
.nav-link:hover i, .nav-link.on i { color: var(--accent, #e0e0e0); }
.nav-link:hover, .nav-link.on { color: var(--text, #f3f3f3); background: rgba(224, 224, 224,.08); }
.nav-who:hover, .nav-who.on { background: rgba(224, 224, 224,.08); }
.site-header .btn { border-radius: 10px; background: rgba(30, 30, 30,.88); }
.site-header .btn:hover { border-color: rgba(224, 224, 224,.28); background: rgba(45, 45, 45,.92); }
.announcement { background: linear-gradient(90deg, rgba(34, 34, 34,.96), rgba(23, 23, 23,.96)); border-bottom-color: rgba(224, 224, 224,.14); }
@media (max-width: 760px) {
  .site-header { min-height: 60px; }
  .site-header.menu-open .nav-links .nav-link:hover,
  .site-header.menu-open .nav-account .nav-link:hover { padding-left: 16px; }
}
