/* Web push alerts: header bell, alerts panel, follow button, nudge card, toast (assets/js/push.js).
   Hand-written, no build step. Uses the brand tokens from app.css. */

/* Bell */
.fxp-bell{position:relative}
.fxp-dot{position:absolute;top:8px;right:9px;width:8px;height:8px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 2px var(--hair)}
.fxp-dot[hidden]{display:none}
.fxp-bell.is-on{color:var(--acc)}
.fxp-bell.is-on svg path:first-child{fill:currentColor;fill-opacity:.2}

/* Panel: popover under the bell on wide screens, bottom sheet on phones */
.fxp-panel{position:fixed;inset:0;z-index:1000;pointer-events:none}
.fxp-panel[hidden]{display:none}
.fxp-scrim{display:none}
.fxp-sheet{position:fixed;top:72px;right:16px;width:372px;max-height:calc(100vh - 96px);overflow:auto;overscroll-behavior:contain;pointer-events:auto;
  background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:18px;padding:16px 18px 18px;font-family:var(--ff);
  box-shadow:0 24px 56px rgba(16,19,24,.18),0 2px 8px rgba(16,19,24,.06);
  opacity:0;transform:translateY(-6px) scale(.985);transform-origin:top right;transition:opacity .18s ease,transform .18s cubic-bezier(.2,.8,.2,1)}
.fxp-panel.is-in .fxp-sheet{opacity:1;transform:none}
.fxp-sheet:focus{outline:none}
.fxp-grip{display:none}
.fxp-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.fxp-hd h2{font-family:var(--fh);font-size:19px;font-weight:700;letter-spacing:-.01em;margin:0}
.fxp-x{width:32px;height:32px;border-radius:50%;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer}
.fxp-x:hover{background:var(--hair);color:var(--ink)}
.fxp-x svg{width:16px;height:16px}

/* The preview: what an alert will look like, one card on a small stack */
.fxp-stage{position:relative;margin:2px 0 4px;padding:14px 14px 24px;border-radius:16px;border:1px solid var(--hair);
  background:linear-gradient(155deg,var(--brand-soft) 0%,transparent 72%)}
.fxp-stage::after{content:"";position:absolute;left:30px;right:30px;bottom:13px;height:20px;border-radius:0 0 12px 12px;
  background:var(--raised);border:1px solid var(--line);border-top:0;opacity:.55}
.fxp-note{position:relative;z-index:1;display:grid;grid-template-columns:36px 1fr;gap:12px;align-items:start;padding:12px 14px;border-radius:14px;
  background:var(--raised);border:1px solid var(--line);box-shadow:0 10px 24px rgba(16,19,24,.12)}
.fxp-note img{width:36px;height:36px;border-radius:9px;display:block}
.fxp-note p{margin:0}
.fxp-note-app{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:2px!important}
.fxp-note-app span{color:var(--faint)}
.fxp-note-h{font-size:14px;font-weight:600;line-height:1.3}
.fxp-note-b{font-size:13px;color:var(--muted);line-height:1.4;margin-top:1px!important}

/* Sections */
.fxp-sec{margin-top:16px}
.fxp-sec h3{font-family:var(--ff);font-size:14px;font-weight:600;margin:0 0 2px}
.fxp-row-d{font-size:13px;color:var(--muted);margin:0;line-height:1.4}
.fxp-lede{font-size:15px;line-height:1.5;margin:4px 0 10px}
.fxp-steps{margin:0 0 4px;padding-left:22px;font-size:14.5px;line-height:1.8}
.fxp-small{font-size:12.5px;color:var(--muted);margin:0;line-height:1.5}
.fxp-center{text-align:center;margin-top:10px}

/* Pair chips and search */
.fxp-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.fxp-chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);
  background:transparent;color:var(--ink);font:500 13px/1 var(--ff);cursor:pointer;white-space:nowrap}
.fxp-chip:hover{border-color:var(--faint)}
.fxp-chip svg{width:12px;height:12px;color:var(--muted)}
.fxp-chip.is-on{background:var(--brand-soft);border-color:transparent;padding-right:10px}
.fxp-chip.is-on:hover svg{color:var(--ink)}
.fxp-chip-add{border-style:dashed;color:var(--muted)}
.fxp-chip-sugg{color:var(--muted);border-color:var(--hair);background:var(--hair)}
.fxp-chip-sugg:hover{color:var(--ink);border-color:var(--hair)}
.fxp-add{margin-top:10px}
.fxp-search{width:100%;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:0 12px;font:15px var(--ff)}
.fxp-results{margin-top:6px;max-height:232px;overflow:auto}
.fxp-results .fxp-small{padding:8px 4px}
.fxp-result{display:flex;align-items:baseline;gap:10px;width:100%;text-align:left;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer;font-family:var(--ff)}
.fxp-result:hover,.fxp-result:focus-visible{background:var(--hair)}
.fxp-result b{font-size:14px;font-weight:600;min-width:74px}
.fxp-result span{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Switch rows */
.fxp-rows{margin-top:18px;border-top:1px solid var(--hair)}
.fxp-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--hair)}
.fxp-row-t{font-size:14px;font-weight:500;margin:0 0 1px}
.fxp-sw{position:relative;flex-shrink:0;width:44px;height:26px;border-radius:999px;border:0;background:var(--line);cursor:pointer;transition:background .18s}
.fxp-sw i{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(16,19,24,.25);transition:transform .18s cubic-bezier(.2,.8,.2,1)}
.fxp-sw[aria-checked="true"]{background:var(--brand)}
.fxp-sw[aria-checked="true"] i{transform:translateX(18px)}

/* Footer */
.fxp-foot{margin-top:16px}
.fxp-cta{display:block;width:100%;height:46px;border-radius:12px;border:0;background:var(--brand);color:var(--brand-on);font:600 15px var(--ff);cursor:pointer}
.fxp-cta:hover{background:var(--brand2)}
.fxp-cta:disabled{opacity:.62;cursor:progress}
.fxp-cta-sm{display:inline-block;width:auto;height:36px;padding:0 16px;font-size:14px;border-radius:10px}
.fxp-live{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--up);margin-right:7px;vertical-align:1px}
.fxp-meta{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.fxp-link{border:0;background:none;padding:0;color:var(--muted);font:500 12.5px var(--ff);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.fxp-link:hover{color:var(--ink)}
.fxp-id{border:0;background:none;padding:0;color:var(--faint);font:12px var(--fm);cursor:copy}
.fxp-flash{color:var(--acc);font-weight:500}

/* Follow button */
.fxp-follow-wrap{margin:12px 0 16px}
.an-article .fxp-follow-wrap{margin:2px 0 16px}
.fxp-follow{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 15px 0 12px;border-radius:999px;border:1px solid var(--line);
  background:var(--surface);color:var(--ink);font:500 14px/1 var(--ff);cursor:pointer;transition:background .15s,border-color .15s}
.fxp-follow svg{width:16px;height:16px;color:var(--muted)}
.fxp-follow:hover{border-color:var(--faint)}
.fxp-follow.is-on{background:var(--brand-soft);border-color:transparent}
.fxp-follow.is-on svg{color:var(--acc)}
.fxp-follow.is-on svg path:first-child{fill:currentColor;fill-opacity:.25}

/* Nudge card */
.fxp-nudge{position:fixed;right:20px;bottom:20px;z-index:900;width:360px;display:grid;grid-template-columns:40px 1fr;gap:12px;padding:14px 16px 14px 14px;
  background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 44px rgba(16,19,24,.16);font-family:var(--ff);
  opacity:0;transform:translateY(12px);transition:opacity .2s ease,transform .2s cubic-bezier(.2,.8,.2,1)}
.fxp-nudge.is-in{opacity:1;transform:none}
.fxp-nudge img{width:40px;height:40px;border-radius:10px}
.fxp-nudge p{margin:0;font-size:13.5px;color:var(--muted);line-height:1.45}
.fxp-nudge .fxp-nudge-h{font-size:15px;font-weight:600;color:var(--ink);margin-bottom:2px}
.fxp-nudge-act{display:flex;align-items:center;gap:14px;margin-top:10px}

/* Toast */
.fxp-toast{position:fixed;left:50%;bottom:24px;z-index:1100;transform:translate(-50%,16px);opacity:0;pointer-events:none;
  background:var(--ink);color:var(--bg);padding:10px 18px;border-radius:999px;font:500 14px var(--ff);box-shadow:0 8px 24px rgba(16,19,24,.2);
  transition:opacity .2s,transform .2s;max-width:calc(100vw - 32px);text-align:center}
.fxp-toast.is-in{opacity:1;transform:translate(-50%,0)}

/* Focus */
.fxp-panel :focus-visible,.fxp-follow:focus-visible,.fxp-bell:focus-visible,.fxp-nudge :focus-visible{outline:2px solid var(--acc);outline-offset:2px}

/* Phones: bottom sheet */
@media(max-width:639px){
  html.fxp-open{overflow:hidden}
  .fxp-scrim{display:block;position:absolute;inset:0;background:rgba(16,19,24,.5);pointer-events:auto;opacity:0;transition:opacity .2s}
  .fxp-panel.is-in .fxp-scrim{opacity:1}
  .fxp-sheet{top:auto!important;right:0!important;left:0;bottom:0;width:auto;max-height:88vh;border-radius:22px 22px 0 0;border-width:1px 0 0;
    padding:8px 18px calc(18px + env(safe-area-inset-bottom));transform:translateY(100%);opacity:1;transition:transform .24s cubic-bezier(.2,.8,.2,1)}
  .fxp-grip{display:block;width:38px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 10px}
  .fxp-nudge{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:auto}
  .fxp-toast{bottom:calc(16px + env(safe-area-inset-bottom))}
}

@media(prefers-reduced-motion:reduce){
  .fxp-sheet,.fxp-scrim,.fxp-nudge,.fxp-toast,.fxp-sw,.fxp-sw i{transition:none}
}
