/* nav: thin, translucent, like Apple's global nav */
nav {
  position: sticky; top: 0; z-index: 10; height: 56px;
  background: rgba(0,0,0,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
nav .in { position: relative; max-width: 980px; height: 100%; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; letter-spacing: -.01em; }
.nav-logo { display: inline-flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 40px; width: auto; display: block; transition: opacity .2s; }
.nav-logo:hover img { opacity: 0.85; }
[hidden] { display: none !important; }
.nav-auth { display: flex; align-items: center; }
.nav-btn { background: var(--accent); color: var(--accent-ink); font: 500 14px var(--font); letter-spacing: -.01em; padding: 7px 16px; border-radius: 980px; text-decoration: none; transition: background-color .2s; }
.nav-btn:hover { background: var(--accent-hover); }
.nav-btn:focus-visible, .nav-me:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.nav-me { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-size: 14px; padding: 4px 4px 4px 12px; border-radius: 980px; transition: background-color .2s; }
.nav-me:hover { background: #1c1c1e; }
.nav-me img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.nav-auth { gap: 4px; }

/* notifications: bell left of the profile chip, panel drops from the header */
.bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: #a1a1a6; cursor: pointer; transition: background-color .2s, color .2s; }
.bell:hover, .bell[aria-expanded="true"] { background: #1c1c1e; color: var(--text); }
.bell:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.bell svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell-badge { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 11px/17px var(--font); text-align: center; box-shadow: 0 0 0 2px #000; }
.notif { position: absolute; top: 58px; right: 22px; width: 380px; max-width: calc(100% - 24px); max-height: min(72vh, 520px); overflow-y: auto; overscroll-behavior: contain; background: #1c1c1e; border: 1px solid #2e2e30; border-radius: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.notif h2 { margin: 0; padding: 16px 20px 10px; font: 600 20px var(--font); letter-spacing: -.02em; }
.notif-empty { margin: 0; padding: 26px 20px 34px; color: var(--muted); font-size: 15px; text-align: center; }
.notif-list { list-style: none; margin: 0; padding: 0 0 8px; }
.nitem { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 10px 20px; color: var(--text); text-decoration: none; transition: background-color .15s; }
.nitem:hover { background: #242427; }
.nitem:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.nitem.unread { background: rgba(134,154,213,.09); }
.nitem.unread:hover { background: rgba(134,154,213,.15); }
.nitem img, .nicon { width: 36px; height: 36px; border-radius: 50%; display: block; }
.nicon { display: grid; place-items: center; background: rgba(134,154,213,.18); color: var(--link); }
.nicon svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.ntxt { min-width: 0; }
.nt { margin: 0; font-size: 14px; line-height: 1.35; }
.nt b { font-weight: 600; }
.nsnip { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.nitem time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
@media (max-width: 560px) { .notif { left: 12px; right: 12px; width: auto; max-width: none; } }


/* visitors: thin bar under the header + pop-up */
.vbar { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; padding: 0 22px; background: #0a0a0b; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--muted); font: 14px var(--font); letter-spacing: -.01em; cursor: pointer; opacity: 0; transition: opacity .25s, background-color .2s; }
.vbar.ready { opacity: 1; }
.vbar:hover { background: #111113; }
.vbar:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.vbar b { color: #7bc88a; font-weight: 600; }
.vdot { width: 10px; height: 10px; border-radius: 50%; background: #4cd964; box-shadow: 0 0 8px rgba(76,217,100,.7); flex: none; }
.vflags { display: inline-flex; margin-left: 4px; }
.vflags img { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1.5px #161617; }
.vflags img + img { margin-left: -6px; }
.vdlg { width: calc(100% - 32px); max-width: 440px; max-height: 80vh; padding: 0; background: #1c1c1e; color: var(--text); border: 1px solid #2e2e30; border-radius: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.6); overflow: hidden; flex-direction: column; }
.vdlg[open] { display: flex; }
.vdlg::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vhead { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #2e2e30; }
.vhead h2 { flex: 1; margin: 0; font: 600 22px var(--font); letter-spacing: -.02em; }
.vcount { color: var(--muted); font-weight: 400; }
.vclose { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #2c2c2e; color: var(--text); cursor: pointer; }
.vclose svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.vclose:hover { background: #3a3a3c; }
.vlist { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; }
.vlist li { display: flex; align-items: center; gap: 14px; padding: 8px 20px; }
.vlist img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.vname { flex: 1; min-width: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtime { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.vnew { animation: vin .4s ease-out; }
@keyframes vin { from { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .vnew { animation: none; } }
