/* Hostna notifications — bell, shade, detail sheet, the card that flies into
   the bell. Tokens only (os.css: --glass-a/b, --stroke, --tile, --ink-*,
   --shadow-pop, --bar-h, --ease-out); no new palette. See notify.js. */

/* ── the bell ── */
.nt-bell{position:relative}
.nt-bell .nt-i{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.nt-bell--bar{width:26px;padding:0;justify-content:center;color:var(--ink)}
.nt-bell--bar .nt-i{width:14px;height:14px}
.nt-bell[hidden]{display:none!important}
.nt-badge{position:absolute;top:-5px;right:-6px;min-width:15px;height:15px;padding:0 4px;border-radius:99px;
  display:inline-flex;align-items:center;justify-content:center;background:#d6304f;color:#fff;
  font-style:normal;font-size:9.5px;font-weight:700;line-height:1;letter-spacing:0;
  box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.28),0 0 0 2px var(--bg-base);pointer-events:none}
.nt-badge[hidden]{display:none}
.nt-bell.is-bump .nt-i{animation:ntSwing .9s var(--ease-out)}
.nt-bell.is-bump .nt-badge{animation:ntPop .5s var(--ease-out)}
@keyframes ntSwing{0%{transform:rotate(0)}15%{transform:rotate(16deg)}30%{transform:rotate(-13deg)}45%{transform:rotate(9deg)}
  60%{transform:rotate(-6deg)}75%{transform:rotate(3deg)}100%{transform:rotate(0)}}
@keyframes ntPop{0%{transform:scale(.3)}60%{transform:scale(1.22)}100%{transform:scale(1)}}
.nt-bell .nt-i{transform-origin:50% 12%}

/* the overview bell (phone only: there the menubar is gone) */
.nt-bell--cc{display:none}
@media (max-width:700px){
  .nt-bell--cc{display:grid;place-items:center;flex:0 0 auto;margin-left:auto;width:38px;height:38px;border-radius:50%;
    background:var(--tile);border:1px solid var(--stroke);color:var(--ink);
    box-shadow:inset 0 1px 0 var(--spec),0 2px 8px -4px rgba(0,0,0,.18);transition:background .18s,transform .18s}
  .nt-bell--cc:active{transform:scale(.94)}
  .nt-bell--cc .nt-i{width:18px;height:18px}
  .nt-bell--cc .nt-badge{top:-3px;right:-4px;min-width:17px;height:17px;font-size:10px}
}

/* ── scrim ── */
.nt-scrim{position:fixed;inset:0;z-index:139;display:none}
.nt-scrim.is-on{display:block}
@media (max-width:700px){
  .nt-scrim{display:block;pointer-events:none;background:rgba(10,12,18,0);transition:background .32s var(--ease)}
  .nt-scrim.is-on{pointer-events:auto;background:rgba(10,12,18,.32)}
  html[data-theme="light"] .nt-scrim.is-on{background:rgba(40,36,32,.2)}
}

/* ── the shade ── */
.nt-shade{position:fixed;z-index:140;top:calc(var(--bar-h) + 8px);right:12px;width:min(392px,calc(100vw - 24px));
  max-height:min(72vh,640px);display:none;flex-direction:column;border-radius:22px;overflow:hidden;color:var(--ink);
  background:linear-gradient(165deg,var(--glass-a),var(--glass-b));
  -webkit-backdrop-filter:blur(22px) saturate(180%);backdrop-filter:blur(22px) saturate(180%);
  border:1px solid var(--stroke);box-shadow:var(--shadow-pop),inset 0 1px 0 var(--spec);
  transform-origin:calc(100% - 60px) 0;outline:none}
.nt-shade.is-on{display:flex;animation:ntDrop .34s var(--ease-out) both}
.nt-shade.is-out{display:flex;animation:ntLift .24s var(--ease) forwards;pointer-events:none}
@keyframes ntDrop{from{opacity:0;transform:translateY(-10px) scale(.96)}}
@keyframes ntLift{to{opacity:0;transform:translateY(-8px) scale(.97)}}

.nt-head{display:flex;align-items:center;gap:8px;padding:14px 12px 8px 16px}
.nt-head b{font-size:14.5px;font-weight:650;letter-spacing:-.02em}
.nt-sub{font-size:11px;font-weight:600;color:#d6304f;background:color-mix(in srgb,#d6304f 12%,transparent);
  padding:2px 7px;border-radius:99px}
.nt-sub:empty{display:none}
.nt-x{margin-left:auto;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--ink-2);
  background:var(--tile);border:1px solid var(--stroke-2);cursor:pointer}
.nt-x:hover{background:var(--tile-hover);color:var(--ink)}
.nt-g{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.nt-list{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px 8px 8px}
.nt-group{margin:10px 8px 4px;font-size:10px;font-weight:650;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3)}
.nt-group:first-child{margin-top:4px}

.nt-row{position:relative;display:grid;grid-template-columns:38px minmax(0,1fr) 28px;align-items:start;gap:11px;
  padding:10px 8px 10px 10px;margin-bottom:4px;border-radius:16px;cursor:pointer;
  transition:background .18s,transform .26s var(--ease-out),opacity .26s,height .26s var(--ease),margin .26s,padding .26s;
  touch-action:pan-y;outline:none}
.nt-row:hover,.nt-row:focus-visible{background:var(--tile-hover)}
.nt-row:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 55%,transparent)}
.nt-row.is-state{background:var(--tile);border:1px solid var(--stroke-2)}
.nt-row.is-drag{transition:none}
.nt-row.is-gone{opacity:0;transform:translateX(30%);height:0!important;margin:0;padding-top:0;padding-bottom:0;overflow:hidden}
.nt-row.is-swept{opacity:0;transform:translateX(40%)}
.nt-txt{min-width:0}
.nt-txt b{display:block;font-size:13px;font-weight:620;letter-spacing:-.01em;line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nt-row.is-new .nt-txt b::after{content:'';display:inline-block;width:7px;height:7px;margin-left:7px;vertical-align:1px;
  border-radius:50%;background:var(--accent)}
.nt-txt p{margin:2px 0 0;font-size:12px;line-height:1.45;color:var(--ink-2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nt-txt em{display:block;margin-top:4px;font-style:normal;font-size:10.5px;color:var(--ink-3)}
.nt-del{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--ink-3);
  background:transparent;border:0;cursor:pointer;opacity:.7;transition:opacity .18s,background .18s,color .18s}
.nt-del .nt-g{width:13px;height:13px}
.nt-del:hover,.nt-del:focus-visible{opacity:1;background:var(--tile-2);color:#d6304f}
@media (hover:hover) and (pointer:fine){ .nt-row .nt-del{opacity:0} .nt-row:hover .nt-del,.nt-row:focus-within .nt-del{opacity:.8} }

/* the icon tiles: the severity is the colour, the kind is the glyph */
.nt-ico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#fff;
  background:linear-gradient(160deg,#8fc0ff,#3f6cff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 4px 10px -5px rgba(40,60,140,.55)}
.nt-ico .nt-g{width:18px;height:18px;stroke-width:1.7}
.sev-good .nt-ico{background:linear-gradient(160deg,#e3ff8a,#a3dc1f);color:#1f3f12;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 4px 10px -5px rgba(90,130,20,.55)}
.sev-warn .nt-ico{background:linear-gradient(160deg,#ffe08a,#f5a524);color:#4a2c00;box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 4px 10px -5px rgba(170,110,10,.55)}
.sev-bad .nt-ico{background:linear-gradient(160deg,#ff9aac,#d6304f);box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 4px 10px -5px rgba(160,30,60,.55)}

.nt-empty{display:grid;justify-items:center;text-align:center;gap:6px;padding:26px 18px 30px;color:var(--ink-2)}
.nt-empty b{font-size:13.5px;color:var(--ink)}
.nt-empty p{margin:0;font-size:12px;color:var(--ink-3)}
.nt-empty-g{width:30px;height:30px;color:var(--ink-3);margin-bottom:4px}

.nt-foot{display:flex;align-items:center;gap:10px;padding:9px 12px 12px 16px;border-top:1px solid var(--stroke-2)}
.nt-foot-note{font-size:11px;color:var(--ink-3)}
.nt-clear{margin-left:auto;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:99px;
  font-size:12px;font-weight:600;color:var(--ink-2);background:var(--tile);border:1px solid var(--stroke-2);cursor:pointer;
  transition:background .18s,color .18s}
.nt-clear:hover{background:color-mix(in srgb,#d6304f 12%,var(--tile));color:#d6304f}
.nt-clear .nt-g{width:14px;height:14px}
.nt-clear[hidden]{display:none}
.nt-grip{display:none}

/* phone: the shade comes down from the top edge, like the phone's own */
@media (max-width:700px){
  .nt-shade{top:max(8px,env(safe-area-inset-top));left:8px;right:8px;width:auto;max-height:84svh;border-radius:26px;
    transform-origin:50% 0;-webkit-backdrop-filter:blur(26px) saturate(190%);backdrop-filter:blur(26px) saturate(190%)}
  .nt-shade.is-on{animation:ntShadeIn .42s var(--ease-out) both}
  .nt-shade.is-out{animation:ntShadeOut .28s var(--ease) forwards}
  @keyframes ntShadeIn{from{transform:translateY(-104%)}}
  @keyframes ntShadeOut{to{transform:translateY(-104%)}}
  .nt-head{padding:16px 14px 8px 18px}
  .nt-head b{font-size:16px}
  .nt-row{grid-template-columns:42px minmax(0,1fr) 32px;padding:11px 8px 11px 10px}
  .nt-ico{width:42px;height:42px;border-radius:14px}
  .nt-del{width:32px;height:32px;opacity:.75}
  .nt-txt b{font-size:13.5px}
  .nt-txt p{font-size:12.5px}
  .nt-foot{padding:10px 14px 6px 18px}
  .nt-clear{height:34px;padding:0 14px}
  .nt-grip{display:block;width:44px;height:5px;margin:4px auto 9px;border-radius:99px;background:var(--ink-3);opacity:.45;
    touch-action:none;cursor:grab;position:relative}
  .nt-grip::before{content:'';position:absolute;inset:-14px -40px}
}

/* ── one notification, in full ── */
.nt-detail-wrap{position:fixed;inset:0;z-index:150;display:grid;place-items:center;padding:16px;
  background:rgba(10,12,18,0);transition:background .22s var(--ease)}
.nt-detail-wrap.is-on{background:rgba(10,12,18,.26)}
html[data-theme="light"] .nt-detail-wrap.is-on{background:rgba(40,36,32,.16)}
.nt-detail{width:min(440px,100%);max-height:calc(100svh - 32px);overflow:auto;padding:22px 22px 16px;border-radius:24px;color:var(--ink);
  background:linear-gradient(165deg,var(--glass-a),var(--glass-b));
  -webkit-backdrop-filter:blur(24px) saturate(185%);backdrop-filter:blur(24px) saturate(185%);
  border:1px solid var(--stroke);box-shadow:var(--shadow-pop),inset 0 1px 0 var(--spec);outline:none;
  opacity:0;transform:translateY(8px) scale(.97);transition:opacity .22s var(--ease),transform .3s var(--ease-out)}
.nt-detail-wrap.is-on .nt-detail{opacity:1;transform:none}
.nt-ico--lg{width:48px;height:48px;border-radius:15px;margin-bottom:12px}
.nt-ico--lg .nt-g{width:22px;height:22px}
.nt-detail h3{margin:0;font-size:17px;font-weight:650;letter-spacing:-.025em;line-height:1.3}
.nt-detail em{display:block;margin-top:3px;font-style:normal;font-size:11px;color:var(--ink-3)}
.nt-detail p{margin:12px 0 0;font-size:13.5px;line-height:1.6;color:var(--ink-2);white-space:pre-line;overflow-wrap:anywhere}
.nt-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.nt-acts:empty{display:none}
.nt-act{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 15px;border-radius:99px;font-size:12.5px;
  font-weight:620;color:var(--ink);background:var(--tile);border:1px solid var(--stroke);cursor:pointer;text-decoration:none;
  transition:background .18s,transform .18s}
.nt-act:hover{background:var(--tile-hover)}
.nt-act:active{transform:scale(.97)}
.nt-act.prime{background:#c9f542;border-color:color-mix(in srgb,#a3dc1f 60%,transparent);color:#1f3f12}
.nt-act.prime:hover{background:#d3f766}
.nt-detail-foot{display:flex;align-items:center;gap:8px;margin-top:18px;padding-top:12px;border-top:1px solid var(--stroke-2)}
.nt-detail-foot .nt-clear{margin-left:0}
.nt-detail-foot .nt-act{margin-left:auto}

/* ── the card that flies into the bell ── */
.nt-flys{position:fixed;z-index:135;top:calc(var(--bar-h) + 12px);right:16px;display:flex;flex-direction:column;gap:9px;pointer-events:none}
.nt-fly{pointer-events:auto;cursor:pointer;display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:start;
  width:322px;padding:12px 14px 12px 12px;border-radius:18px;color:var(--ink);
  background:linear-gradient(160deg,var(--glass-a),var(--glass-b));
  -webkit-backdrop-filter:blur(18px) saturate(180%);backdrop-filter:blur(18px) saturate(180%);
  border:1px solid var(--stroke);box-shadow:var(--shadow-pop),inset 0 1px 0 var(--spec);
  animation:ntFlyIn .5s var(--ease-out) both}
.nt-fly .nt-txt p{-webkit-line-clamp:2}
@keyframes ntFlyIn{from{opacity:0;transform:translateX(calc(100% + 24px))}}
.nt-fly.is-out{animation:ntFlyOut .34s var(--ease) forwards}
@keyframes ntFlyOut{to{opacity:0;transform:translateX(40px) scale(.96)}}
.nt-fly.is-flying{animation:none;transition:transform .58s cubic-bezier(.55,0,.75,.2),opacity .58s ease-in,border-radius .58s;
  transform:translate(var(--nt-dx),var(--nt-dy)) scale(.06);opacity:.15;border-radius:50%}
@media (max-width:700px){
  .nt-flys{top:max(10px,env(safe-area-inset-top));right:10px;left:10px;align-items:flex-end}
  .nt-fly{width:min(340px,100%)}
}

@media (prefers-reduced-motion:reduce){
  .nt-shade.is-on,.nt-shade.is-out,.nt-fly,.nt-fly.is-out,.nt-bell.is-bump .nt-i,.nt-bell.is-bump .nt-badge{animation:none}
  .nt-row,.nt-detail,.nt-detail-wrap,.nt-fly.is-flying{transition:none}
}

/* night: the glass alone lets the lime overview banner bleed through the text */
html[data-theme="dark"] .nt-shade,html[data-theme="dark"] .nt-detail,html[data-theme="dark"] .nt-fly{
  background:linear-gradient(165deg,rgba(34,39,52,.84),rgba(16,19,28,.9))}
html[data-theme="dark"] .nt-sub{color:#ff9aac;background:rgba(255,120,145,.14)}
html[data-theme="dark"] .nt-scrim.is-on,html[data-theme="dark"] .nt-detail-wrap.is-on{background:rgba(2,4,8,.5)}
html[data-theme="dark"] .nt-badge{box-shadow:0 1px 2px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.28),0 0 0 2px #0b0e16}
html[data-theme="light"] .nt-detail-wrap.is-on{background:rgba(40,36,32,.24)}

/* touch-sized menubar (os-tablet.css raises every chip to 40px): the bell
   follows the theme switch, a round 40px target, not a 26x40 sliver */
@media (min-width:701px) and (max-width:860px){
  body.hostna-os .mb-chip.nt-bell--bar{width:40px;padding:0}
  body.hostna-os .mb-chip.nt-bell--bar .nt-i{width:17px;height:17px}
}
@media (min-width:861px) and (pointer:coarse){
  body.hostna-os .mb-chip.nt-bell--bar{width:40px;padding:0}
  body.hostna-os .mb-chip.nt-bell--bar .nt-i{width:17px;height:17px}
}

/* ── this device: the push button in the shade foot + its settings window (1.1) ── */
.nt-push{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:99px;font-size:12px;font-weight:600;
  color:#1f3f12;background:#c9f542;border:1px solid color-mix(in srgb,#a3dc1f 60%,transparent);cursor:pointer;transition:background .18s,transform .12s}
.nt-push:hover{background:#d3f766}
.nt-push:active{transform:scale(.97)}
.nt-push .i,.nt-push .nt-g{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nt-push.is-on{color:var(--ink-2);background:var(--tile);border-color:var(--stroke-2)}
.nt-push.is-denied,.nt-push.is-ios-install{color:var(--ink-2);background:var(--tile);border-color:var(--stroke-2)}
.nt-push[hidden]{display:none}
.nt-pset .nt-ico--lg .i{width:22px;height:22px;fill:none;stroke:#fff;stroke-width:1.7}
.nt-pset-body{margin-top:8px}
.nt-pset-body em{font-style:normal;font-size:12px;color:var(--ink-3)}
.nt-pset .nt-group{margin:14px 0 6px}
.nt-dev{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid var(--stroke-2);font-size:13px}
.nt-dev i{font-style:normal;font-size:10.5px;font-weight:650;color:#37691a;background:color-mix(in srgb,#c9f542 45%,transparent);padding:2px 7px;border-radius:99px;margin-left:6px}
.nt-dev .nt-del{opacity:.75}
.nt-dev-none{margin:4px 0 0!important;font-size:12.5px!important;color:var(--ink-3)!important}
.nt-cat{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:13px;cursor:pointer}
.nt-cat input{appearance:auto;accent-color:#7fbf1f;width:16px;height:16px;margin:0}
.nt-quiet{margin:12px 0 0!important;font-size:11.5px!important;color:var(--ink-3)!important}
@media (max-width:700px){ .nt-push{height:34px;padding:0 14px} .nt-foot{flex-wrap:wrap} }
html[data-theme="dark"] .nt-dev i{color:#d3f766}

/* ── the shade foot, symmetric (9.39.2, owner) ──
   Two equal halves, one shape: every visible control is a 32px pill of the same
   width, the same distance from both edges and from the line above. One control
   left → it spans the row. An empty note takes no cell (it used to push the
   left button 10px further in than the right one). */
.nt-foot{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:center;gap:8px;
  padding:8px;margin:0 6px;border-top:1px solid var(--stroke-2)}
.nt-foot-note:empty{display:none}
.nt-foot-note{padding:0 6px;line-height:1.3}
.nt-foot .nt-push,.nt-foot .nt-clear{width:100%;min-width:0;height:30px;margin:0;padding:0 12px;justify-content:center;
  border-radius:99px;font-size:12px;font-weight:600;white-space:nowrap}
.nt-foot .nt-push span,.nt-foot .nt-clear span{overflow:hidden;text-overflow:ellipsis}
.nt-foot .nt-push.is-on,.nt-foot .nt-push.is-denied,.nt-foot .nt-push.is-ios-install,.nt-foot .nt-clear{
  color:var(--ink-2);background:var(--tile);border:1px solid var(--stroke-2)}
.nt-foot .nt-push.is-on .i,.nt-foot .nt-push.is-on .nt-g{color:#5c9a1c}
.nt-foot .nt-push[hidden],.nt-foot .nt-clear[hidden]{display:none}
@media (max-width:700px){
  .nt-foot{padding:8px;margin:0 8px;flex-wrap:nowrap}
  .nt-foot .nt-push,.nt-foot .nt-clear{height:34px}
  .nt-grip{margin:0 auto 8px}
}
html[data-theme="dark"] .nt-foot .nt-push.is-on .i,html[data-theme="dark"] .nt-foot .nt-push.is-on .nt-g{color:#c9f542}
