/* Brand map — the landscape as one zoomable picture. Light page, nothing under 14px
   in the chrome (the SVG keeps its own text screen-constant from JS). */

.bm-wrap { max-width: 1720px; margin: 0 auto; padding: 10px 22px 26px; }
.bm-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.bm-h1 { margin: 0 0 2px; font-size: 26px; }
.bm-say { font-size: 14.5px; color: #52514e; }
.bm-search { width: 300px; padding: 9px 13px; font-size: 14.5px; border: 1px solid #d5d2c9;
             border-radius: 8px; background: #fff; }
.bm-search:focus { outline: 2px solid #2a78d6; outline-offset: 0; }

/* Filters: one bar, groups combine (AND across groups, OR inside one). */
.bm-filterbar { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 10px; }
.bm-fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
             padding-right: 10px; margin-right: 2px; border-right: 1px solid #e6e3da; }
.bm-fgroup:last-child { border-right: 0; }
.bm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; font-size: 14px;
           border: 1px solid #d5d2c9; border-radius: 999px; background: #fff; color: #2c3440;
           cursor: pointer; user-select: none; white-space: nowrap; }
.bm-chip .n { font-size: 13px; color: #898781; }
.bm-chip .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.bm-chip.on { background: #0b0b0b; border-color: #0b0b0b; color: #fff; }
.bm-chip.on .n { color: #c9c9c9; }
.bm-chip.faint { opacity: 0.4; }        /* would leave nothing, still clickable */
.bm-more { font-size: 14px; border: 0; background: none; color: #52514e; cursor: pointer;
           text-decoration: underline; padding: 6px 4px; }

.bm-stage { position: relative; height: 60vh; min-height: 320px;   /* JS sets the real height */
            background: #fcfcfb; border: 1px solid #e1e0d9; border-radius: 12px; overflow: hidden; }
#bm-svg { width: 100%; height: 100%; display: block; cursor: grab; }
#bm-svg:active { cursor: grabbing; }

/* SVG marks (world-space; font sizes are set from JS so they stay screen-constant) */
.bm-cell { fill: #f7f6f1; stroke: #e4e2da; stroke-width: 1; }
.bm-guide { stroke: #e8e6de; }
.bm-axcap { fill: #a5a29a; font-weight: 600; pointer-events: none;
            paint-order: stroke; stroke: #f7f6f1; stroke-width: 3.5px; stroke-linejoin: round; }
.bm-cellname { fill: #52514e; font-weight: 700; cursor: pointer;
               paint-order: stroke; stroke: #f6f5f0; stroke-width: 4px; stroke-linejoin: round; }
.bm-cellname:hover { fill: #0b0b0b; }
.bm-node circle.core { stroke: #ffffff; }
.bm-node.talky circle.core { stroke: #0b0b0b; }
.bm-node circle.unknown { stroke-dasharray: 3 2.4; }
.bm-node .ring { fill: none; stroke: #52514e; opacity: 0.55; }
.bm-node text.bname { fill: #0b0b0b; font-weight: 600; paint-order: stroke; stroke: #fcfcfb;
                      stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
/* The count sits under the name and has to read as the quieter half of one label,
   never as a second name. Same halo so it survives landing on a bubble. */
.bm-node text.bvids { fill: #6b6862; paint-order: stroke; stroke: #fcfcfb; stroke-width: 2.6px;
                      stroke-linejoin: round; pointer-events: none; }
.bm-node.dim { opacity: 0.10; pointer-events: none; }
.bm-node { cursor: pointer; transition: opacity 0.25s ease; }
.bm-node:hover circle.core { stroke: #0b0b0b; }
.bm-node.sel circle.core { stroke: #0b0b0b; }
.bm-badge rect { rx: 9px; }
.bm-badge text { fill: #fff; font-weight: 700; }
.bm-badge.mail rect { fill: #0b0b0b; }
.bm-badge.li rect { fill: #0a66c2; }

/* Overlays */
.bm-legend { position: absolute; left: 14px; bottom: 14px; background: rgba(255,255,255,0.95);
             border: 1px solid #e1e0d9; border-radius: 10px; padding: 12px 14px; font-size: 14px;
             color: #2c3440; max-width: 300px; }
.bm-legend h4 { margin: 0 0 6px; font-size: 14px; color: #52514e; }
.bm-lhead { border: 0; background: none; font-size: 14px; font-weight: 700; color: #52514e;
            cursor: pointer; padding: 0; margin-bottom: 6px; }
.bm-lbody[hidden] { display: none; }
.bm-lrow { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.bm-lrow .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.bm-lrow .n { color: #898781; margin-left: auto; padding-left: 10px; }
.bm-lsizes { display: flex; align-items: flex-end; gap: 10px; margin: 8px 0 2px; }
.bm-lsizes .szc { border: 1.6px solid #52514e; border-radius: 50%; background: #eceae3; }
.bm-lsizes .szc.unk { border-style: dashed; }
.bm-lnote { color: #898781; font-size: 13.5px; margin-top: 6px; }
.bm-fold { border: 0; background: none; font-size: 14px; color: #52514e; cursor: pointer;
           text-decoration: underline; padding: 0; margin-top: 8px; }

.bm-tip { position: fixed; z-index: 60; background: #0b0b0b; color: #fff; border-radius: 9px;
          padding: 10px 13px; font-size: 14px; max-width: 330px; pointer-events: none;
          box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
.bm-tip .t { font-weight: 700; font-size: 15px; }
.bm-tip .s { color: #c9c9c9; margin-top: 2px; }
.bm-tip .k { color: #9ec5f4; }

.bm-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
            font-size: 16px; color: #b3261e; padding: 40px; text-align: center; background: #fcfcfb; }

/* Drawer — the dash on the right. */
.bm-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92%;
             background: #ffffff; border-left: 1px solid #e1e0d9; box-shadow: -10px 0 30px rgba(0,0,0,0.08);
             overflow-y: auto; padding: 18px 20px 26px; font-size: 14.5px; color: #2c3440; }
.bm-drawer h2 { margin: 0; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.bm-drawer h2 img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain;
                    border: 1px solid #eceae3; background: #fff; }
.bm-dhead .dom { margin: 4px 0 8px; }
.bm-dhead .dom a { color: #2a78d6; text-decoration: none; font-size: 14.5px; }
.bm-dchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bm-dchip { font-size: 13.5px; padding: 3px 9px; border-radius: 999px; background: #f2efe9; color: #52514e; }
.bm-dchip.av { color: #fff; }
.bm-dblurb { color: #52514e; margin: 8px 0 2px; }
.bm-dsec { margin-top: 18px; border-top: 1px solid #eceae3; padding-top: 12px; }
.bm-dsec h3 { margin: 0 0 8px; font-size: 15.5px; }
.bm-dsec h3 .n { color: #898781; font-weight: 400; }
.bm-person { padding: 8px 0; border-bottom: 1px dashed #eceae3; }
.bm-person:last-child { border-bottom: 0; }
.bm-person .who { font-weight: 600; }
.bm-person .who a { color: #0a66c2; text-decoration: none; }
.bm-person .meta { color: #898781; font-size: 13.5px; margin-top: 1px; }
.bm-person .snip { color: #52514e; font-size: 13.5px; margin-top: 3px; font-style: italic; }
.bm-pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 8px;
           border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.bm-pill.live { background: #c9e7cd; color: #14431c; }
.bm-pill.cold { background: #fdf0c2; color: #5c4a05; }
.bm-pill.quiet { background: #eceae3; color: #52514e; }
.bm-none { color: #898781; }
.bm-dwhy { color: #52514e; }
.bm-dclose { position: sticky; top: 0; float: right; border: 1px solid #d5d2c9; background: #fff;
             border-radius: 8px; font-size: 15px; padding: 4px 11px; cursor: pointer; }
.bm-dlink { display: inline-block; margin-top: 10px; color: #2a78d6; text-decoration: none; }
.bm-skel { color: #898781; padding: 30px 0; text-align: center; }

/* An author display rule on anything that also uses [hidden] needs this guard,
   or the attribute silently loses (see the /manus-library modal lesson). */
.bm-legend[hidden], .bm-tip[hidden], .bm-drawer[hidden], .bm-error[hidden] { display: none; }

@media (max-width: 900px) {
  .bm-top { flex-direction: column; align-items: stretch; }
  .bm-search { width: 100%; }
  .bm-stage { height: 70vh; }
}
