/* W17-07 — resource universes atlas (assets/js/booking-atlas.js), one band inside #bkc after .bkc-limit.
   Motif: a constellation. Three glowing resource nodes, directed luminous threads that flow into one central
   all-or-none padlock, and a resource equation beside it. Each example carries its own accent (teal / copper /
   violet / cobalt) on a deep cobalt night. Height budget: one band ≈200px at 1440 (the legacy six-chapter wheel
   trace allows 100 × 160px). Text ≥14px, white high contrast, never faded; tap targets ≥40px; motion is
   transform-only on text and runs once per pick; reduced motion switches it all off. */

.brx, .brx-pick { --brx-a: #3fd6c6; --brx-a2: #b4fff2; --brx-rgb: 63 214 198; }
.brx[data-accent="copper"], .brx-pick[data-accent="copper"] { --brx-a: #ff9a57; --brx-a2: #ffd6bb; --brx-rgb: 255 154 87; }
.brx[data-accent="violet"], .brx-pick[data-accent="violet"] { --brx-a: #9b87ff; --brx-a2: #e2dbff; --brx-rgb: 155 135 255; }
.brx[data-accent="cobalt"], .brx-pick[data-accent="cobalt"] { --brx-a: #5b8cff; --brx-a2: #d3e1ff; --brx-rgb: 91 140 255; }

.brx {
  position: relative; display: grid; grid-template-columns: minmax(0, .8fr) 290px minmax(0, 1.2fr); gap: .5rem 1.25rem; align-items: center;
  padding: .6rem 1rem; border-radius: 20px; border: 1px solid rgb(var(--brx-rgb) / .38);
  background-color: #071338;
  background-image: radial-gradient(38% 120% at 50% 50%, rgb(var(--brx-rgb) / .16), transparent 70%), linear-gradient(90deg, rgb(155 135 255 / .07), transparent 40%, rgb(255 154 87 / .05));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05);
  transition: border-color var(--dur-2);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ---------- intro: kicker, line, four example picks ---------- */
.brx-intro { display: grid; gap: .35rem; min-width: 0; }
.brx-kicker { margin: 0; color: var(--bkc-teal-2, #b4fff2); font-size: .875rem; font-weight: 600; line-height: 1.5; }
.brx-intro h5 { margin: 0 0 .2rem; color: #fff; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.4; text-wrap: balance; }
.brx-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.brx-pick {
  display: flex; align-items: center; gap: .45rem; min-width: 0; min-height: 40px; padding: .3rem .7rem; border-radius: 12px;
  border: 1px solid rgb(150 172 224 / .32); background-color: #0b1a4a; color: var(--text-1); font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.3; text-align: start; cursor: pointer;
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-2);
}
.brx-pick i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--brx-a); box-shadow: 0 0 8px rgb(var(--brx-rgb) / .8); }
.brx-pick:hover { border-color: var(--brx-a); }
.brx-pick[aria-pressed="true"] { border-color: var(--brx-a); background-color: #12295f; color: #fff; box-shadow: inset 0 0 0 1px var(--brx-a), 0 0 20px -4px rgb(var(--brx-rgb) / .6); }
.brx-pick:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- constellation: three nodes, threads into one padlock ---------- */
.brx-sky { position: relative; height: 160px; margin: 0; min-width: 0; }
.brx-threads { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.brx-glow { stroke: var(--brx-a); stroke-width: 8; stroke-opacity: .16; stroke-linecap: round; }
.brx-flow { stroke: var(--brx-a2); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 8; filter: drop-shadow(0 0 3px var(--brx-a)); }
.brx-nodes { margin: 0; padding: 0; list-style: none; }
.brx-node {
  position: absolute; z-index: 1; translate: -50% -50%; display: inline-flex; align-items: center; gap: .4rem; max-width: 44%; min-height: 36px; padding: .25rem .8rem; border-radius: 999px;
  border: 1px solid var(--brx-a); background-color: #0c1c52; color: #fff; white-space: nowrap;
  box-shadow: 0 0 0 4px rgb(var(--brx-rgb) / .1), 0 0 22px -2px rgb(var(--brx-rgb) / .5);
}
.brx-node--1 { left: 82%; top: 13%; --tx: -36px; --ty: 26px; }
.brx-node--2 { left: 18%; top: 13%; --tx: 36px; --ty: 26px; }
.brx-node--3 { left: 50%; top: 88.5%; --tx: 0px; --ty: -34px; }
.brx-node i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brx-a2); box-shadow: 0 0 8px var(--brx-a); }
.brx-node b { overflow: hidden; text-overflow: ellipsis; font-size: .95rem; font-weight: 600; line-height: 1.3; }

.brx-lock {
  position: absolute; z-index: 1; left: 50%; top: 44%; translate: -50% -50%; display: grid; place-content: center; justify-items: center; gap: 0;
  width: 92px; height: 92px; margin: 0; border-radius: 50%; text-align: center;
  background-color: #0a1745; background-image: radial-gradient(circle at 50% 35%, rgb(var(--brx-rgb) / .24), transparent 70%);
  box-shadow: 0 0 0 1px rgb(var(--brx-rgb) / .5), 0 0 34px -4px rgb(var(--brx-rgb) / .6);
}
/* the shackle: the lock closes on the three threads together */
.brx-lock::before { content: ""; position: absolute; top: -15px; left: calc(50% - 17px); width: 34px; height: 22px; border: 3px solid var(--brx-a); border-bottom: 0; border-radius: 18px 18px 0 0; }
.brx-lock__ring { position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from -60deg, var(--brx-a) 0 112deg, transparent 112deg 128deg, var(--brx-a) 128deg 232deg, transparent 232deg 248deg, var(--brx-a) 248deg 352deg, transparent 352deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.brx-lock__core { position: relative; color: #fff; font-family: var(--font-display); font-size: 1rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.brx-lock__rule { position: relative; color: var(--brx-a2); font-size: .875rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }

/* ---------- the equation, what is verified, what is not claimed ---------- */
.brx-read { display: grid; gap: .35rem; min-width: 0; }
.brx-eq { margin: 0; color: #fff; font-size: 1rem; line-height: 1.55; }
.brx-ex { display: inline-block; padding: 0 .5rem; border: 1px dashed #c9b6ff; border-radius: 999px; color: #e2dbff; font-size: .875rem; font-weight: 600; line-height: 1.6; vertical-align: 1px; }
.brx-eq__name { font-weight: 700; }
.brx-term { color: var(--brx-a2); font-weight: 700; }
.brx-op { color: var(--text-2); font-family: var(--font-num); font-weight: 700; }
.brx-eq__result { padding: 0 .35rem; border-radius: 6px; background-color: #12295f; box-shadow: inset 0 -2px 0 var(--brx-a); color: #fff; font-weight: 700; }
.brx-proof, .brx-limit { margin: 0; color: var(--text-2); font-size: .875rem; line-height: 1.5; }
.brx-proof b { color: #a6f0cf; font-weight: 700; }

/* ---------- motion: one gesture per pick (transform on text; opacity only on the aria-hidden threads) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .brx-flow { animation: brx-flow 1.4s linear infinite; }
  .brx.is-switching .brx-node { animation: brx-node .62s var(--ease-out) both; }
  .brx.is-switching .brx-node--2 { animation-delay: 70ms; }
  .brx.is-switching .brx-node--3 { animation-delay: 140ms; }
  .brx.is-switching .brx-threads { animation: brx-thread .7s var(--ease-out) both; }
  .brx.is-switching .brx-lock__ring { animation: brx-turn .9s var(--ease-out) both; }
  .brx.is-switching .brx-lock::before { animation: brx-shut .7s var(--ease-out) .25s both; }
  .brx.is-switching .brx-lock__core, .brx.is-switching .brx-eq { animation: brx-rise .5s var(--ease-out) both; }
  .brx[data-dir="back"].is-switching .brx-lock__ring { animation-name: brx-turn-back; }
}
@keyframes brx-flow { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } } /* dashes travel node → lock */
@keyframes brx-node { from { transform: scale(.55); } to { transform: none; } } /* grow in place: no resource node crosses the central lock */
@keyframes brx-thread { from { opacity: .15; } to { opacity: 1; } }
@keyframes brx-turn { from { transform: rotate(-120deg); } to { transform: none; } }
@keyframes brx-turn-back { from { transform: rotate(120deg); } to { transform: none; } }
@keyframes brx-shut { 0% { transform: translateY(-7px); } 70% { transform: translateY(1px); } 100% { transform: none; } }
@keyframes brx-rise { from { transform: translateY(6px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .brx, .brx *, .brx *::before, .brx *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrower desktops, tablet, mobile ---------- */
@media (max-width: 1300px) {
  .brx { grid-template-columns: minmax(0, 1fr) 270px minmax(0, 1.1fr); gap: .5rem 1rem; }
}
@media (max-width: 1100px) {
  .brx { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .brx-intro { grid-column: 1 / -1; }
  .brx-picks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .brx { grid-template-columns: minmax(0, 1fr); gap: .6rem; padding: .7rem .75rem; }
  .brx-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brx-sky { width: 100%; max-width: 360px; height: 230px; justify-self: center; }
}
@media (max-width: 440px) {
  .brx { padding: .65rem .6rem; }
  .brx-pick { padding-inline: .5rem; gap: .35rem; }
  .brx-node { padding: .25rem .55rem; gap: .3rem; }
  .brx-node--1 { left: 80%; }
  .brx-node--2 { left: 20%; } /* thread ends stay under the node; the pill never leaves the box at 320 */
  .brx-node b { font-size: .9375rem; }
}
