/* ---------- NOTIFICATION CENTER (KAN-117), Mythril Version 1 ----------
   One bell, drawn by the shell at the top right of every chrome screen; its
   glass quick menu of what needs you and the latest; the Inbox page. On a
   phone the bell rides in the top bar and the quick menu becomes a sheet.
   js/notify.js draws all of it. Colours and shapes are the shared tokens in
   css/design-system.css; nothing here names a colour of its own. The
   underline tabs (.lh-notif-tabs) stay in design-system.css: Settings and
   Tickets use them too. */

/* ---------- the bell ---------- */
.lh-bell{ display:none; position:fixed; top:var(--bell-top); right:var(--bell-right); z-index:160; width:var(--bell-size); height:var(--bell-size); padding:0; border:0; border-radius:var(--my-r); background:var(--my-glass); color:var(--text-body); align-items:center; justify-content:center; box-shadow:inset 0 0 0 1px var(--my-glass-line), var(--ds-shadow-card); -webkit-backdrop-filter:blur(18px) saturate(1.5); backdrop-filter:blur(18px) saturate(1.5); cursor:pointer; transition:color .16s ease, background .16s ease; }
body.lh-shell .lh-bell{ display:flex; }
.lh-bell svg{ width:19px; height:19px; }
.lh-bell:hover, .lh-bell[aria-expanded="true"]{ color:var(--text-strong); background:color-mix(in oklab, var(--text-strong) 6%, var(--surface)); }
.lh-bell:active{ transform:scale(.95); }
/* Inside a page's glass bar the bell is one of the bar's own buttons: no box
   of its own (js/notify.js sets is-docked while a bar is under it). Once the
   bar has scrolled away, or on a screen with no bar, it is the glass button
   above. */
@media (min-width:641px){
  .lh-bell.is-docked{ background:transparent; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
  .lh-bell.is-docked:hover, .lh-bell.is-docked[aria-expanded="true"]{ background:color-mix(in oklab, var(--text-strong) 8%, transparent); }
}
.lh-bell:focus-visible{ outline:2px solid color-mix(in oklab, var(--gold-dark) 80%, var(--text-strong)); outline-offset:2px; }
.lh-bell-dot{ position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 5px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; border-radius:7px; background:var(--royal); color:var(--surface); font-size:10.5px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.lh-bell-dot[hidden]{ display:none; }
.lh-bell-scrim{ display:none; }

/* ---------- the quick menu ---------- */
.lh-bell-panel{ position:fixed; top:calc(var(--bell-top) + var(--bell-size) + 8px); right:var(--bell-right); z-index:260; width:380px; max-width:calc(100vw - 32px); max-height:calc(100vh - 96px); max-height:calc(100dvh - 96px); overflow:auto; box-sizing:border-box; padding:8px; color:var(--text-strong); background:color-mix(in oklab, var(--surface) 86%, transparent); -webkit-backdrop-filter:blur(30px) saturate(1.7); backdrop-filter:blur(30px) saturate(1.7); border-radius:20px; box-shadow:var(--my-pop-shadow); transform-origin:100% 0; animation:myPop .32s var(--my-spring) both; }
@media (prefers-reduced-transparency:reduce){ .lh-bell-panel{ background:var(--surface); -webkit-backdrop-filter:none; backdrop-filter:none; } }
.lh-bell-head{ display:flex; align-items:baseline; gap:10px; padding:8px 10px 4px; }
.lh-bell-title{ font:600 16px/1.3 var(--font-serif); letter-spacing:-.005em; color:var(--text-head); }
.lh-bell-count{ font-size:12.5px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.lh-bell-all{ margin-left:auto; border:0; background:none; font:inherit; font-size:12.5px; font-weight:600; color:var(--royal-ink); cursor:pointer; padding:5px 8px; border-radius:8px; }
.lh-bell-all:hover{ background:var(--royal-tint); }
.lh-bell-group{ margin:10px 10px 2px; font:600 12.5px/1.3 var(--font-sans); color:var(--text-muted); }
.lh-bell-empty{ font-size:13.5px; color:var(--text-muted); padding:14px 10px 18px; }
.lh-bell-foot{ display:block; width:100%; margin-top:6px; height:38px; border:0; border-radius:var(--my-r); background:color-mix(in oklab, var(--text-strong) 6%, transparent); font:inherit; font-size:13px; font-weight:600; color:var(--text-strong); text-align:center; cursor:pointer; }
.lh-bell-foot:hover{ background:color-mix(in oklab, var(--text-strong) 11%, transparent); }
:is(.lh-bell-all, .lh-bell-foot):focus-visible{ outline:2px solid color-mix(in oklab, var(--gold-dark) 80%, var(--text-strong)); outline-offset:2px; }
.lh-notif-rows{ display:grid; gap:2px; }
.lh-notif{ display:grid; grid-template-columns:32px minmax(0,1fr); grid-template-areas:"av title" "av when" "av quote"; gap:2px 12px; align-items:start; width:100%; text-align:left; border:0; background:transparent; font:inherit; padding:10px; border-radius:var(--my-r); cursor:pointer; color:var(--text-body); transition:background .15s ease; }
.lh-notif:hover{ background:color-mix(in oklab, var(--text-strong) 7%, transparent); }
.lh-notif:focus-visible{ outline:2px solid color-mix(in oklab, var(--gold-dark) 80%, var(--text-strong)); outline-offset:-2px; }
.lh-notif-av{ grid-area:av; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:#fff; font-size:11.5px; font-weight:700; letter-spacing:.02em; overflow:hidden; }
.lh-notif-title{ grid-area:title; font-size:13.5px; line-height:1.4; color:var(--text-body); }
.lh-notif-title b{ font-weight:600; }
.lh-notif.is-new .lh-notif-title{ color:var(--text-strong); }
.lh-notif-when{ grid-area:when; display:flex; gap:8px; font-size:12px; color:var(--text-faint); }
.lh-notif-kind{ color:var(--text-muted); }
.lh-notif-quote, .lh-notif-body{ grid-area:quote; margin-top:2px; font-size:13px; line-height:1.45; color:var(--text-muted); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }

/* ---------- the Inbox page ----------
   The title, then one sheet the full width of the page. Side: Unread,
   Mentions and All with their counts, then the categories. Main: search,
   From and Mark all read, then the rows by day. */
.ncx{ display:flex; flex-direction:column; gap:18px; }
/* The glass bar: its centre on the bell's centre line, and it stops short of the bell. */
.ncx-head{ position:relative; z-index:5; gap:14px; padding:0 var(--bell-dock) 0 20px; margin-top:calc(var(--bell-top) + var(--bell-size) / 2 - 30px - var(--page-top)); margin-right:calc(var(--bar-end) - var(--page-gutter)); }
.ncx-title{ margin:0; font:600 20px/1.2 var(--font-serif); letter-spacing:-.01em; color:var(--text-head); }
.ncx-lead{ margin:0 8px 0 0; font-size:13.5px; color:var(--text-muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.ncx-sheet{ display:grid; grid-template-columns:248px minmax(0,1fr); min-height:min(640px, calc(100dvh - 190px)); background:var(--surface); border-radius:var(--my-r-lg); box-shadow:var(--ds-shadow-card); }
.ncx-side{ padding:14px 12px 18px; border-radius:var(--my-r-lg) 0 0 var(--my-r-lg); background:color-mix(in oklab, var(--text-strong) 3.5%, var(--surface)); }
.ncx-main{ min-width:0; padding:4px 20px 22px; }
.ncx-tabs, .ncx-cats{ display:grid; gap:2px; }
.ncx-tab, .ncx-cat{ display:flex; align-items:center; gap:10px; width:100%; height:38px; padding:0 12px; box-sizing:border-box; border:0; border-radius:10px; background:none; font:500 14px/1 var(--font-sans); color:var(--text-body); text-align:left; cursor:pointer; transition:background .15s ease, color .15s ease; }
.ncx-cat{ padding-left:6px; font-size:13.5px; }
.ncx-tab:hover, .ncx-cat:hover{ background:color-mix(in oklab, var(--text-strong) 6%, transparent); color:var(--text-strong); }
.ncx-tab.is-active{ background:var(--royal-tint); color:var(--royal-ink); font-weight:600; }
.ncx-cat.is-active{ background:color-mix(in oklab, var(--text-strong) 8%, transparent); color:var(--text-strong); font-weight:600; }
.ncx-tab-name, .ncx-cat-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ncx-n{ flex:none; font-size:12.5px; font-weight:600; font-variant-numeric:tabular-nums; color:var(--text-muted); }
.ncx-tab.is-active .ncx-n{ color:var(--royal-ink); }
[data-theme="dark"] .ncx-tab.is-active{ background:color-mix(in oklab, var(--gold) 15%, transparent); color:var(--gold-ink); }
[data-theme="dark"] .ncx-tab.is-active .ncx-n{ color:var(--gold-ink); }
.ncx-side-h{ margin:20px 12px 6px; font:600 12.5px/1.3 var(--font-sans); color:var(--text-muted); }
:is(.ncx-tab, .ncx-cat, .ncx-act, .ncx-row-act, .ncx-undo-btn):focus-visible, .lh-shell .ncx-act:focus-visible{ outline:2px solid color-mix(in oklab, var(--gold-dark) 80%, var(--text-strong)); outline-offset:2px; box-shadow:none; }
/* A category's tile: its icon on a tint of its own colour (--c). */
.ncx-ico{ flex:none; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:var(--my-r-sm); background:color-mix(in oklab, var(--c, var(--text-muted)) 16%, transparent); color:color-mix(in oklab, var(--c, var(--text-muted)) 72%, var(--text-strong)); }
.ncx-ico svg{ width:16px; height:16px; }

.ncx-search{ position:relative; flex:1 1 280px; max-width:440px; display:block; }
.ncx-search svg{ position:absolute; left:11px; top:50%; width:16px; height:16px; margin-top:-8px; color:var(--text-faint); pointer-events:none; }
.ncx-search input{ width:100%; height:38px; padding:0 12px 0 36px; box-sizing:border-box; border:0; border-radius:10px; background:color-mix(in oklab, var(--surface) 70%, transparent); color:var(--text-strong); font:400 14px/1 var(--font-sans); box-shadow:inset 0 0 0 1px var(--hairline); -webkit-appearance:none; appearance:none; }
.ncx-search input::placeholder{ color:var(--text-faint); }
.ncx-search input:hover{ box-shadow:inset 0 0 0 1.5px var(--gold); }
.ncx-search input:focus{ outline:none; background:var(--surface); box-shadow:inset 0 0 0 1.5px color-mix(in oklab, var(--text-strong) 34%, transparent); }
.ncx-tabs-r{ margin-left:auto; display:flex; align-items:center; gap:4px; }
.ncx-act{ display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; border:0; border-radius:10px; background:none; font:500 13.5px/1 var(--font-sans); color:var(--text-body); cursor:pointer; white-space:nowrap; transition:background .15s ease, color .15s ease; }
.ncx-act svg{ width:13px; height:13px; flex-shrink:0; }
.ncx-act:hover, .ncx-act[aria-expanded="true"]{ background:color-mix(in oklab, var(--text-strong) 8%, transparent); color:var(--text-strong); }
.ncx-from{ position:relative; }
.ncx-from-btn > span{ max-width:220px; overflow:hidden; text-overflow:ellipsis; }
/* The From menu: solid, so the rows behind never show through. */
.ncx-menu{ position:absolute; top:calc(100% + 6px); right:0; z-index:60; min-width:200px; max-width:min(300px, calc(100vw - 32px)); max-height:320px; overflow:auto; box-sizing:border-box; padding:6px; background:var(--surface); border-radius:14px; box-shadow:var(--my-pop-shadow); transform-origin:100% 0; animation:myPop .32s var(--my-spring) both; }
[data-theme="dark"] .ncx-menu{ background:color-mix(in oklab, var(--royal) 9%, var(--surface)); }
.ncx-menu[hidden]{ display:none; }
.ncx-opt{ display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; height:36px; border:0; background:transparent; font:inherit; font-size:13.5px; color:var(--text-body); text-align:left; padding:0 10px; border-radius:8px; cursor:pointer; }
.ncx-opt > span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ncx-opt svg{ width:14px; height:14px; flex-shrink:0; color:var(--royal-ink); }
.ncx-opt:hover, .ncx-opt:focus{ background:color-mix(in oklab, var(--text-strong) 7%, transparent); color:var(--text-strong); outline:none; }
.lh-shell .ncx-opt:focus-visible{ outline:none; box-shadow:inset 0 0 0 2px color-mix(in oklab, var(--gold-dark) 80%, var(--text-strong)); }
.ncx-opt[aria-checked="true"]{ color:var(--text-strong); font-weight:600; }

/* The rows, by day: one line of who did what, one of what it says. */
.ncx-group{ font:600 13px/1.3 var(--font-sans); color:var(--text-muted); margin:24px 0 6px 10px; }
.ncx-panel > .ncx-group:first-child{ margin-top:16px; }
.ncx-rows{ list-style:none; margin:0; padding:0; }
.ncx-item{ display:flex; align-items:center; margin:0; padding:0; transition:background .15s ease; }
.ncx-item + .ncx-item{ border-top:1px solid var(--rule); }
.ncx-item:hover{ background:var(--hover); }
.ncx-row{ flex:1; min-width:0; display:flex; align-items:center; gap:12px; padding:12px 8px 12px 10px; box-sizing:border-box; border:0; background:none; font:inherit; color:inherit; text-align:left; text-decoration:none; cursor:pointer; }
.ncx-row.is-still{ cursor:default; }
.lh-shell .ncx-row:focus-visible, .ncx-row:focus-visible{ outline:2px solid color-mix(in oklab, var(--gold-dark) 80%, var(--text-strong)); outline-offset:-2px; box-shadow:none; }
.ncx-dot{ flex:none; width:8px; height:8px; border-radius:3px; background:var(--royal); visibility:hidden; }
.ncx-row.is-unread .ncx-dot{ visibility:visible; }
.ncx-row-body{ flex:1; min-width:0; }
.ncx-row-title, .ncx-row-meta{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ncx-row-title{ font-size:14.5px; line-height:1.4; font-weight:600; color:var(--text-strong); }
.ncx-row.is-read .ncx-row-title{ font-weight:500; color:var(--text-body); }
.ncx-row-meta{ margin-top:1px; font-size:13px; line-height:1.45; color:var(--text-muted); }
.ncx-row-right{ flex:none; font-size:12.5px; color:var(--text-faint); font-variant-numeric:tabular-nums; white-space:nowrap; text-align:right; }
.ncx-bad{ display:block; margin-top:3px; font-weight:600; color:var(--red-ink); }
.ncx-row-acts{ flex:none; display:flex; gap:2px; padding-right:8px; opacity:0; transition:opacity .15s ease; }
.ncx-item:hover .ncx-row-acts, .ncx-item:focus-within .ncx-row-acts{ opacity:1; }
.ncx-row-act{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; padding:0; border:0; border-radius:9px; background:none; color:var(--text-muted); cursor:pointer; transition:background .15s ease, color .15s ease; }
.ncx-row-act svg{ width:17px; height:17px; }
.ncx-row-act:hover{ background:color-mix(in oklab, var(--text-strong) 9%, transparent); color:var(--text-strong); }
@media (hover:none){ .ncx-row-acts{ opacity:1; } }
.ncx-empty{ margin:0; padding:56px 10px; font-size:14.5px; color:var(--text-muted); text-align:center; }
.ncx-error{ display:flex; flex-wrap:wrap; align-items:center; gap:12px 16px; padding:28px 10px; }
.ncx-error p{ margin:0; font-size:13.5px; color:var(--red-ink); }
.ncx-act-error{ margin:12px 10px 0; font-size:13px; color:var(--red-ink); }
.ncx-sr{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
/* Snoozed: one note at the foot of the window, with its Undo. */
.ncx-undo{ position:fixed; left:var(--pane-left, 0px); right:0; bottom:24px; z-index:300; width:max-content; max-width:calc(100vw - 32px); margin:0 auto; padding-right:8px; }
.ncx-undo-btn{ border:0; background:none; height:32px; padding:0 10px; border-radius:8px; font:600 13.5px/1 var(--font-sans); color:var(--royal-ink); cursor:pointer; }
.ncx-undo-btn:hover{ background:var(--royal-tint); }
/* Loading: the rows' own shape, at once. */
.ncx-skel i{ display:block; height:10px; border-radius:5px; background:var(--hairline); animation:ncx-skel 1.4s ease-in-out infinite; }
.ncx-skel .ncx-skel-head{ width:64px; margin:22px 0 12px 10px; }
.ncx-skel-row{ display:flex; align-items:center; gap:12px; padding:14px 10px 14px 30px; }
.ncx-skel-row + .ncx-skel-row{ border-top:1px solid var(--rule); }
.ncx-skel .ncx-skel-tile{ width:28px; height:28px; border-radius:var(--my-r-sm); flex:none; }
.ncx-skel-body{ flex:1; min-width:0; display:grid; gap:9px; }
.ncx-skel-body i:first-child{ height:12px; }
.ncx-skel .ncx-skel-time{ width:56px; flex-shrink:0; }
@keyframes ncx-skel{ 0%,100%{ opacity:1; } 50%{ opacity:.5; } }
@media (prefers-reduced-motion:reduce){
  .lh-bell-panel, .ncx-menu, .ncx-skel i{ animation:none; }
  .lh-bell, .lh-notif, .ncx-tab, .ncx-cat, .ncx-act, .ncx-item, .ncx-row-acts, .ncx-row-act{ transition:none; }
  .lh-bell:active{ transform:none; }
}

/* A narrower window: the side becomes two lines over the rows. */
@media (max-width:900px){
  .ncx-sheet{ grid-template-columns:minmax(0,1fr); min-height:0; }
  .ncx-side{ padding:10px 10px 8px; border-radius:var(--my-r-lg) var(--my-r-lg) 0 0; }
  .ncx-tabs, .ncx-cats{ display:flex; gap:4px; overflow-x:auto; scrollbar-width:none; }
  .ncx-tabs::-webkit-scrollbar, .ncx-cats::-webkit-scrollbar{ display:none; }
  .ncx-tab, .ncx-cat{ width:auto; flex:0 0 auto; }
  .ncx-tab-name, .ncx-cat-name{ flex:none; }
  .ncx-cats{ margin-top:6px; }
  .ncx-side-h{ position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
  .ncx-main{ padding:12px 12px 18px; }
}
@media (max-width:640px){
  .lh-bell{ top:calc(env(safe-area-inset-top) + 6px); right:56px; width:44px; height:44px; background:transparent; color:var(--sidebar-text-strong); box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
  .lh-bell:hover, .lh-bell[aria-expanded="true"]{ color:var(--sidebar-text-strong); background:transparent; }
  .lh-bell-dot{ top:5px; right:5px; }
  .lh-bell-scrim{ display:block; position:fixed; inset:0; z-index:255; background:color-mix(in oklab, var(--text-strong) 40%, transparent); }
  [data-theme="dark"] .lh-bell-scrim{ background:color-mix(in oklab, var(--canvas) 70%, transparent); }
  .lh-bell-panel{ top:auto; right:0; left:0; bottom:0; width:auto; max-width:none; max-height:80vh; border-radius:var(--my-r-xl) var(--my-r-xl) 0 0; padding:10px 10px calc(10px + env(safe-area-inset-bottom)); transform-origin:50% 100%; animation-name:myRise; }
  .lh-bell-foot{ height:44px; }
  .ncx-head{ margin:0; flex-wrap:wrap; gap:6px 10px; padding:12px; }
  .ncx-lead{ margin-right:0; }
  .ncx-search{ flex:1 1 100%; max-width:none; }
  .ncx-search input{ height:44px; font-size:16px; }
  .ncx-tabs-r{ flex:1 1 100%; margin-left:0; justify-content:space-between; }
  .ncx-tab, .ncx-cat, .ncx-act{ height:44px; }
  .ncx-menu{ left:0; right:auto; transform-origin:0 0; }
  .ncx-from-btn > span{ max-width:52vw; }
  .ncx-row{ flex-wrap:wrap; gap:2px 10px; padding-left:4px; }
  .ncx-row-body{ flex:1 1 0; }
  .ncx-row-title{ white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .ncx-row-right{ flex:1 1 100%; display:flex; gap:10px; padding-left:56px; text-align:left; }
  .ncx-bad{ margin-top:0; }
  .ncx-row-act{ width:44px; height:44px; }
  .ncx-row-acts{ padding-right:0; }
  .ncx-undo{ left:0; bottom:calc(72px + env(safe-area-inset-bottom)); }
}
