/* The pulse map (templates/site/hooks/_pulse.html, assets/lp/js/hooks/pulse.js; WP1 of
   docs/superpowers/specs/2026-09-21-banrox-journey-design.md). Builds on the kit's tokens (.bxc in bx-capture.css)
   and classes (.bxc-glass, .bxc-list, .bxc-note, .fr-big, .bxc-sk ...); only the widget's own pieces are here.
   Palette: the brand blue family, white at opacities, #FF4242 for the complaints, #31A650 for done.

   Layout: on a wide page (the home page, Identity Protect) the words sit on the left and stay in view while the
   card, 760px wide, scrolls past on the right; everywhere else the words sit above the card. The card sizes
   its inside by its own width (a container), so the same rules serve 760px, an article's 720px and a phone. */

.bxp { display: flex; flex-direction: column; gap: 24px; }
.bxp [hidden] { display: none !important; }

/* ---------- the words ---------- */
.bxp-head { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.bxp-head .bxc-label { color: rgba(255, 255, 255, .5); }
.bxp-head .bxc-sub { color: var(--bx-text-2); }
.bxp-notes { display: none; }
.bxp-notes .bxc-note i { text-wrap: pretty; }
@media (min-width: 1200px) {
  .bxp:not(.bxp--inline) { display: grid; grid-template-columns: minmax(0, 1fr) 760px; column-gap: 72px; align-items: start; }
  .bxp:not(.bxp--inline) .bxp-head { position: sticky; top: 120px; gap: 12px; padding-top: 8px; }
  .bxp:not(.bxp--inline) .bxp-head h2 { font-size: 40px; line-height: 46px; letter-spacing: -0.03em; }
  .bxp:not(.bxp--inline) .bxp-head .bxc-sub { font-size: 17px; line-height: 26px; }
  .bxp:not(.bxp--inline) .bxp-notes { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; padding-top: 24px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
}

/* ---------- the card ---------- */
.bxp-card { position: relative; min-width: 0; border-radius: var(--bx-r-card); overflow: hidden; isolation: isolate; container-type: inline-size; container-name: bxpc; }
/* the hairline has to sit over the map too, so it is drawn above the content */
.bxp-card::after { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .10); }

/* ---------- the map ---------- */
.bxp-map { position: relative; height: 320px; overflow: hidden; z-index: 0;
  background: radial-gradient(60% 90% at 50% 40%, rgba(38, 75, 255, .16) 0%, rgba(38, 75, 255, 0) 70%), linear-gradient(180deg, #0A0F2C 0%, #070A1F 100%); }
.bxp-grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(133, 133, 233, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(133, 133, 233, .08) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(90% 90% at 50% 45%, #000 40%, transparent 100%);
          mask-image: radial-gradient(90% 90% at 50% 45%, #000 40%, transparent 100%); }
.bxp-gl { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--bx-ease); }
.bxp.is-map .bxp-gl { opacity: 1; }
.bxp-gl .maplibregl-canvas { outline: none; }
.bxp-shine { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .3s var(--bx-ease);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .06) 50%, rgba(255, 255, 255, 0) 70%);
  background-size: 240% 100%; animation: bxc-sheen 1.4s linear infinite; }
.bxp.is-loading .bxp-shine, .bxp.is-busy .bxp-shine { opacity: 1; }
.bxp-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 10, 31, .50) 0%, rgba(7, 10, 31, 0) 24%, rgba(7, 10, 31, 0) 50%, rgba(7, 10, 31, .92) 100%); }

/* the city, large, bottom left, like the map apps */
.bxp-place { position: absolute; left: 28px; right: 28px; bottom: 24px; z-index: 3; pointer-events: none; }
.bxp-city { font-family: var(--bx-font-numbers); font-weight: 600; font-size: 56px; line-height: 56px; letter-spacing: -0.04em; color: #FFFFFF;
  text-shadow: 0 2px 24px rgba(7, 10, 31, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bxp-where { margin-top: 8px; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .64); text-shadow: 0 1px 12px rgba(7, 10, 31, .8); }
.bxp-where b { font-weight: 500; color: rgba(255, 255, 255, .88); }

/* what the dots mean */
.bxp-legend { position: absolute; top: 16px; left: 16px; z-index: 3; display: flex; gap: 14px; margin: 0; padding: 7px 12px; border-radius: 999px;
  font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .74); pointer-events: none;
  background: rgba(9, 12, 33, .74); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .3s var(--bx-ease); }
.bxp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.bxp-legend b { font-weight: 400; }
.bxp-legend__dot { width: 8px; height: 8px; border-radius: 50%; background: #FF4242; box-shadow: 0 0 8px rgba(255, 66, 66, .7); }
.bxp-legend__ring { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px #5A87FC, 0 0 8px rgba(38, 75, 255, .8); }
.bxp:not(.is-ready) .bxp-legend { opacity: 0; }

/* ---------- the dots ---------- */
.bxp-dots { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bxp-dot { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
  opacity: 0; transition: opacity .4s var(--bx-ease); }
.bxp.is-ready .bxp-dot { opacity: 1; }
.bxp-dot i { position: relative; display: block; width: var(--s, 10px); height: var(--s, 10px); border-radius: 50%; background: #FF4242;
  box-shadow: 0 0 0 3px rgba(255, 66, 66, .20), 0 0 18px 2px rgba(255, 66, 66, .45); transition: transform .3s var(--bx-ease); }
.bxp-dot i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 66, 66, .5);
  animation: bxp-ping 3.2s cubic-bezier(.2, .8, .2, 1) infinite; animation-delay: var(--d, 0s); }
.bxp-dot:hover i, .bxp-dot:focus-visible i, .bxp-dot.is-open i { transform: scale(1.18); }
.bxp-dot:active i { transform: scale(.94); transition-duration: 75ms; }
.bxp-dot:focus { outline: none; }
.bxp-dot:focus-visible { outline: 2px solid #8585E9; outline-offset: -4px; }
/* their own ZIP code: the brand-blue ring, with its own dot inside when it has complaints */
.bxp-dot--own { z-index: 1; }
.bxp-dot--own::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--r, 22px); height: var(--r, 22px); margin: calc(var(--r, 22px) / -2) 0 0 calc(var(--r, 22px) / -2);
  border-radius: 50%; box-shadow: inset 0 0 0 2.5px #5A87FC, 0 0 0 1px rgba(7, 10, 31, .5), 0 0 22px 3px rgba(38, 75, 255, .55); }
.bxp-dot--own.is-zero i { display: none; }
@keyframes bxp-ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.8); opacity: 0; } }

/* the callout a dot opens */
.bxp-call { position: absolute; left: 0; top: 0; z-index: 4; min-width: 132px; padding: 9px 12px 10px; border-radius: 12px; pointer-events: none;
  background: rgba(9, 12, 33, .94); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 16px 34px -12px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity .2s var(--bx-ease); white-space: nowrap; }
.bxp-call.is-on { opacity: 1; }
/* its tail, pointing at the dot (--tx is the dot's x inside the callout) */
.bxp-call::after { content: ""; position: absolute; left: var(--tx, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px;
  background: rgba(9, 12, 33, .94); box-shadow: 1px 1px 0 rgba(255, 255, 255, .12); transform: rotate(45deg); border-radius: 0 0 2px 0; }
.bxp-call.is-below::after { bottom: auto; top: -5px; box-shadow: -1px -1px 0 rgba(255, 255, 255, .12); border-radius: 2px 0 0 0; }
.bxp-call b { display: block; font-weight: 500; font-size: 14px; line-height: 18px; color: #FFFFFF; }
.bxp-call span { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .7); }
.bxp-call span em { font-style: normal; font-family: var(--bx-font-numbers); font-weight: 500; color: #FFFFFF; }

/* ---------- MapLibre's own controls, in the kit's type ---------- */
.bxp .maplibregl-ctrl-attrib { background: none; padding: 0 8px; margin: 0 4px 6px 0; font: 400 10px/14px var(--bx-font); color: rgba(255, 255, 255, .42); }
.bxp .maplibregl-ctrl-top-right .maplibregl-ctrl-attrib { margin: 8px 6px 0 0; }
.bxp .maplibregl-ctrl-attrib a { color: rgba(255, 255, 255, .5); text-decoration: none; }
.bxp .maplibregl-ctrl-attrib a:hover { color: #FFFFFF; text-decoration: underline; }
.bxp .maplibregl-ctrl-bottom-right, .bxp .maplibregl-ctrl-top-right { z-index: 3; }
.bxp .maplibregl-cooperative-gesture-screen { z-index: 6; padding: 24px; background: rgba(7, 10, 31, .62); color: #FFFFFF;
  font: 500 15px/20px var(--bx-font); letter-spacing: -0.01em; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------- the numbers ---------- */
.bxp-body { display: flex; flex-direction: column; padding: 26px 32px 30px; }
.bxp-body > * { max-width: 760px; }
.bxp-body, .bxp-dots, .bxp-place { transition: opacity .3s var(--bx-ease); }
/* another ZIP code asked for: what is on screen stays, dimmed, until the new numbers land */
.bxp.is-busy .bxp-body > :not(.bxp-hero), .bxp.is-busy .bxp-dots, .bxp.is-busy .bxp-place,
.bxp.is-busy .bxp-num, .bxp.is-busy .bxp-line, .bxp.is-busy .bxp-note { opacity: .45; }
.bxp-num, .bxp-line, .bxp-note { transition: opacity .3s var(--bx-ease); }
.bxp-num { margin: 0; min-height: 70px; font-size: 72px; line-height: 70px; font-variant-numeric: tabular-nums; }
.bxp-line { margin-top: 10px; min-height: 24px; font-size: 17px; line-height: 24px; color: rgba(255, 255, 255, .82); text-wrap: pretty; }
.bxp-line b { font-weight: 500; color: #FFFFFF; }
.bxp-note { margin-top: 8px; min-height: 18px; max-width: 600px; text-wrap: pretty; }
.bxp-change { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 -8px -4px; align-self: flex-start; }
.bxp.is-loading .bxp-change { visibility: hidden; }        /* its place is kept, so nothing moves when the numbers land */
.bxp-change svg { width: 16px; height: 16px; }
.bxp-zipform { display: flex; gap: 10px; margin-top: 12px; max-width: 360px; }
.bxp-zipform .bxc-input { flex: 1; min-width: 0; height: 48px; font-family: var(--bx-font-numbers); letter-spacing: .04em; }
.bxp-zipform .btn { flex: none; }

.bxp-side { margin-top: 26px; padding-top: 24px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }
.bxp-bars { display: flex; flex-direction: column; gap: 18px; }
.bxp-bars--more { padding-top: 18px; }
.bxp-bar__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0; font-size: 15px; line-height: 20px; color: rgba(255, 255, 255, .84); }
.bxp-bar__top b { flex: none; font-family: var(--bx-font-numbers); font-weight: 500; font-size: 17px; line-height: 20px; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.bxp-bar__track { position: relative; display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bxp-bar__track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--bx-ramp);
  transition: width .9s var(--bx-ease); }
.bxp-bar[data-bxp-bar="improper_use"] .bxp-bar__track i { background: #FF4242; box-shadow: 0 0 12px rgba(255, 66, 66, .45); }
.bxp .bxg { margin-top: 0; }

.bxp-listhead { margin: 28px 0 10px; }
.bxp-listhead b { font-size: 16px; line-height: 20px; }
.bxp-list { list-style: none; margin: 0; padding: 0; }
.bxp-li { min-height: 60px; }
.bxp-li__dot { position: relative; width: 28px; height: 28px; flex: none; display: grid; place-items: center; }
.bxp-li__dot::after { content: ""; width: var(--s, 0px); height: var(--s, 0px); border-radius: 50%; background: #FF4242; box-shadow: 0 0 10px rgba(255, 66, 66, .5); }
.bxp-li .bxc-li__txt b { display: block; }
.bxp-li .bxc-li__txt i { text-wrap: pretty; }
.bxp-li__n { flex: none; font-family: var(--bx-font-numbers); font-weight: 500; font-size: 17px; line-height: 22px; font-variant-numeric: tabular-nums; }

.bxp-alert { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 22px; }
.bxp-alert__btn svg { width: 18px; height: 18px; }
.bxp-alert__fine { margin: 0; max-width: 520px; }
.bxp-alert__fine--err { color: var(--bx-error); }
.bxp-alert__done { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .86); }
.bxp-alert__done svg { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #31A650; color: #FFFFFF; }

.bxp-src { min-height: 72px; margin: 26px 0 0; padding-top: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

/* a number arrives: it rises into place, the way the kit's screens change */
@keyframes bxp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bxp-fade { from { opacity: 0; } to { opacity: 1; } }
.bxp.is-ready [data-bxp-num] > *, .bxp.is-ready [data-bxp-city] > * { display: inline-block; animation: bxp-in .4s var(--bx-ease) both; }
.bxp.is-ready [data-bxp-line] > *, .bxp.is-ready [data-bxp-where] > * { animation: bxp-fade .4s var(--bx-ease) both; }

/* ---------- skeleton: the final shape, shimmering ---------- */
.bxp .bxc-sk { display: inline-block; vertical-align: middle; }
.bxp-sk-city { width: 220px; height: 44px; border-radius: 12px; }
.bxp-sk-where { width: 260px; height: 12px; border-radius: 6px; }
.bxp-sk-num { width: 200px; height: 58px; border-radius: 12px; }
.bxp-sk-line { display: block !important; width: 420px; max-width: 92%; height: 12px; margin: 6px 0 0; border-radius: 6px; }
.bxp-sk-line--short { display: none !important; }
.bxp-sk-fine { display: block !important; width: 520px; max-width: 86%; height: 10px; margin: 4px 0 0; border-radius: 5px; }
.bxp-sk-fine--short { width: 180px; margin-top: 8px; }
.bxp-note .bxp-sk-fine--short { display: none !important; }   /* one line wide, two on a phone (below) */
.bxp-sk-count { width: 44px; height: 14px; border-radius: 7px; }
.bxp-sk-li { width: 140px; height: 12px; border-radius: 6px; }
.bxp-sk-li--sub { width: 200px; height: 10px; margin-top: 4px; }
.bxp.is-loading .bxp-bar__track { background: rgba(255, 255, 255, .06); }

/* ---------- empty and error ---------- */
.bxp-state { position: absolute; left: 50%; top: 44%; z-index: 3; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  display: none; place-items: center; color: #FFFFFF; pointer-events: none;
  background: radial-gradient(circle, rgba(38, 75, 255, .35) 0%, rgba(38, 75, 255, 0) 70%); }
.bxp-state svg { width: 26px; height: 26px; }
.bxp-state::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(90, 135, 252, .9), 0 0 24px rgba(38, 75, 255, .6); }
.bxp.is-empty .bxp-state--empty, .bxp.is-error .bxp-state--error { display: grid; }
.bxp.is-error .bxp-state { background: radial-gradient(circle, rgba(133, 133, 233, .22) 0%, rgba(133, 133, 233, 0) 70%); color: rgba(255, 255, 255, .8); }
.bxp.is-error .bxp-state::before { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28); }
.bxp.is-empty .bxp-body, .bxp.is-error .bxp-body, .bxp.is-empty .bxp-place, .bxp.is-error .bxp-place { display: none; }
.bxp-empty, .bxp-error { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px 32px 32px; }
.bxp-empty .bxc-small, .bxp-error .bxc-small { max-width: 520px; }
.bxp-empty .bxp-zipform { width: 100%; max-width: 460px; margin-top: 8px; }
.bxp-ziperr { margin: 0; }
.bxp-error .btn { margin-top: 8px; }
.bxp-error .btn svg { width: 18px; height: 18px; }

/* ---------- the card's own widths ---------- */
@container bxpc (max-width: 699px) {
  .bxp-map { height: 280px; }
  .bxp-city { font-size: 46px; line-height: 48px; }
  .bxp-num { font-size: 64px; line-height: 62px; min-height: 62px; }
  .bxp-note { min-height: 36px; }                            /* a tablet's card: the note can take two lines */
}
@container bxpc (max-width: 559px) {
  .bxp-map { height: 240px; }
  /* on a phone the map is zoomed out and the city's name covers a third of it: the map's own labels fade out
     under the name and the "from your connection" line (the dots sit above this layer and above the name) */
  .bxp-scrim { background: linear-gradient(180deg, rgba(7, 10, 31, .50) 0%, rgba(7, 10, 31, 0) 22%, rgba(7, 10, 31, 0) 38%, rgba(7, 10, 31, .78) 66%, rgba(7, 10, 31, .96) 100%); }
  .bxp-place { left: 18px; right: 18px; bottom: 16px; }
  .bxp-city { font-size: 36px; line-height: 40px; letter-spacing: -0.035em; }
  .bxp-where { margin-top: 4px; font-size: 12.5px; line-height: 18px; }
  .bxp-legend { display: none; }
  .bxp-body { padding: 20px 18px 22px; }
  .bxp-num { font-size: 56px; line-height: 56px; min-height: 56px; }
  .bxp-sk-num { height: 46px; width: 150px; }
  .bxp-line { font-size: 15px; line-height: 22px; min-height: 44px; }
  .bxp-sk-line--short { display: block !important; width: 40%; }
  .bxp-note { min-height: 36px; }
  .bxp-note .bxp-sk-fine--short { display: block !important; }
  .bxp-src { min-height: 126px; }
  .bxp-side { margin-top: 20px; padding-top: 20px; }
  .bxp-sk-city { width: 160px; height: 32px; }
  .bxp-sk-where { width: 200px; }
  .bxp-empty, .bxp-error { padding: 22px 18px 24px; }
  .bxp-empty .bxp-zipform { flex-direction: column; }
  .bxp-empty .bxp-zipform .bxc-input { flex: none; }        /* in a column, flex: 1 would take its height away */
  .bxp-empty .bxp-zipform .btn { width: 100%; }
  .bxp-call { min-width: 120px; }
}

/* a narrow column (an article on a phone): a ZIP code's line takes two lines, and so does its skeleton; the note
   under the number can take three, so three are kept for it */
@container bxpc (max-width: 352px) {
  .bxp-li { min-height: 82px; }
  .bxp-note { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .bxp-dot i::after { animation: none; opacity: 0; }
  .bxp-shine { animation: none; }
  .bxp-gl, .bxp-dot, .bxp-bar__track i, .bxp-call, .bxp-legend, .bxp-body, .bxp-dots, .bxp-place, .bxp-num, .bxp-line, .bxp-note { transition: none; }
  .bxp.is-ready [data-bxp-num] > *, .bxp.is-ready [data-bxp-line] > *, .bxp.is-ready [data-bxp-city] > *, .bxp.is-ready [data-bxp-where] > * { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bxp-legend, .bxp-call { background: #0D1130; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
