/* Header: notifications bell and account menu (Package D, 2026-11-04). Every page, after glass.css.
   Markup: tools/port_v2.py header(); behaviour: assets/v2.js. Neutral tones only; tokens from assets/v2.css. */

/* ---------- bell: right of the theme toggle, signed in only ([data-auth-in]) ---------- */
.nt-dd { position: relative; display: flex; align-items: center; }
.site-hd .nt-trigger { position: relative; }
.nt-trigger .ico { width: 20px; height: 20px; }
.nt-badge {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  background: var(--text); color: var(--bg); box-shadow: 0 0 0 2px var(--bg);
  font: 700 12px/18px "Hanken Grotesk", system-ui, sans-serif; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none;
}
.nt-badge[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .nt-badge:not([hidden]) { animation: nt-pop var(--t-ui, .22s) var(--ease-out, ease-out) both; }
}
@keyframes nt-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- notifications popover: the account menu's glass material ---------- */
.acct-menu.nt-menu { width: 380px; padding: 8px; gap: 2px; }
.acct-menu.nt-menu.nt-repaint:not(.is-closing) > * { animation: none !important; }
.nt-head, .nt-empty, .nt-wait { position: relative; z-index: 1; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 4px 6px 6px 12px; }
.nt-h { margin: 0; font: 700 1.125rem/1.2 "Bricolage Grotesque", sans-serif; letter-spacing: -.01em; color: var(--text); }
.nt-all {
  height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 600 var(--fs-sm, .9375rem)/1 "Hanken Grotesk", system-ui, sans-serif; color: var(--text);
  transition: background-color var(--t-hover, .16s) ease;
}
.nt-all:hover { background: rgba(var(--lg-ink, 255,255,255), .08); }
[data-theme="light"] .nt-all:hover { background: rgba(20, 20, 28, .06); }
.nt-all:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.nt-all:disabled { opacity: .5; cursor: default; }
.acct-menu a.nt-item { align-items: flex-start; gap: 12px; padding: 10px 12px; }
.nt-ico { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: rgba(var(--lg-ink, 255,255,255), .08); color: var(--text); }
[data-theme="light"] .nt-ico { background: rgba(20, 20, 28, .06); }
.nt-ico .ico { width: 18px; height: 18px; }
.nt-t { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.nt-text { font: 500 var(--fs-sm, .9375rem)/1.4 "Hanken Grotesk", system-ui, sans-serif; color: var(--text); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.nt-item:not(.is-unread) .nt-text { color: color-mix(in srgb, var(--text) 78%, transparent); font-weight: 400; }
.nt-meta { font-size: .875rem; line-height: 1.35; color: color-mix(in srgb, var(--text) 66%, transparent); font-variant-numeric: tabular-nums; }
.nt-dot { width: 8px; height: 8px; flex: none; margin-top: 7px; border-radius: 50%; background: var(--text); }
.nt-empty { margin: 0; padding: 8px 12px 14px; font-size: var(--fs-sm, .9375rem); line-height: 1.5; color: color-mix(in srgb, var(--text) 74%, transparent); }
.nt-wait { height: 168px; }
.acct-menu a.nt-see { justify-content: center; gap: 8px; margin-top: 2px; font-weight: 600; }
.nt-see .ico { width: 16px; height: 16px; }

/* ---------- account menu: who you are (opens the Profile), the pages, sign out ---------- */
.acct-menu#acct-menu { width: 280px; }
.acct-menu a.am-head { gap: 12px; padding: 10px 12px; margin: 0; border-bottom: 0; }
.am-head .am-avatar.acct-av { width: 44px; height: 44px; font-size: 1rem; }
.acct-menu .am-who { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.acct-menu .am-name { font-size: 1rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu .am-sub { font-size: var(--fs-sm, .9375rem); font-weight: 400; color: color-mix(in srgb, var(--text) 70%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu .am-l { flex: 1 1 auto; min-width: 0; }
.acct-menu .am-sep { margin: 6px 12px; }
.acct-menu .am-signout { color: var(--text); }
.acct-menu .am-count { margin-left: auto; padding-left: 10px; font-size: .875rem; font-weight: 600; color: color-mix(in srgb, var(--text) 70%, transparent); font-variant-numeric: tabular-nums; }

@media (max-width: 680px) {
  .site-hd .nav-tools { gap: 4px; }
  .acct-menu.nt-menu, .acct-menu#acct-menu { width: auto; }
}
@media (max-width: 360px) {
  .site-hd .nav-tools .icon-btn, .site-hd .acct-trigger { width: 40px; height: 40px; }
}
