/* The cat bond map on the cat bond page (':::app' wraps it in .app-embed.dash),
   on top of /site.css, whose tokens it uses. The territory ramp and the alert
   colours live in map.js beside the data they encode. */
.cbm { position: relative; }
.cbm-note { color: var(--label); font-size: 14px; }
.cbm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; font-size: 14px; color: var(--text); }
.cbm-controls select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.cbm-views { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.cbm-toggle { font: inherit; padding: 5px 12px; border: 0; background: var(--paper); color: var(--text); cursor: pointer; }
.cbm-toggle + .cbm-toggle { border-left: 1px solid var(--line); }
.cbm-toggle[aria-pressed="true"] { background: var(--accent); color: #fff; }
.cbm-ev-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cbm-caption { max-width: 75ch; margin: 0 0 8px; font-size: 14px; color: var(--text); }
.cbm-map { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cbm-svg { display: block; width: 100%; height: auto; }
.cbm-sphere { fill: #f7f9fb; stroke: var(--line); stroke-width: 0.5; }
/* A covered territory's fill is its ramp step, set on the element by map.js;
   only the uncovered ones take the neutral land colour. */
.cbm-land { stroke: #fff; stroke-width: 0.5; }
.cbm-land:not(.cbm-hot) { fill: #e4e8ee; }
.cbm-hot { cursor: pointer; }
.cbm-hot:hover, .cbm-hot:focus-visible, .cbm-dot:hover, .cbm-dot:focus-visible { stroke: var(--ink); stroke-width: 1.2; outline: none; }
.cbm-dot { stroke: #fff; stroke-width: 1.5; cursor: pointer; }
.cbm-event { stroke: #fff; stroke-width: 2; cursor: pointer; }
.cbm-event:hover, .cbm-event:focus-visible { stroke: var(--ink); outline: none; }
.cbm-event-label { font: 500 12px var(--sans); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.cbm-tip { position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 2px; max-width: 320px; padding: 8px 10px; background: var(--sqx-white, #FFFFFF); color: var(--sqx-ink, #1A2430); border: 1px solid var(--sqx-hairline, #D3D7DF); border-radius: 6px; box-shadow: 0 4px 16px rgba(26, 36, 48, 0.14); font-size: 13px; line-height: 1.4; pointer-events: none; }
.cbm-tip[hidden] { display: none; }
/* the site's one tooltip look (site.css .chart-tip): ink text on white, the
   secondary lines grey, set at site.css's .app-embed.dash specificity or higher */
.app-embed.dash .cbm-tip :is(strong, li, span) { color: var(--sqx-ink, #1A2430); }
.app-embed.dash .cbm-tip strong { font-size: 14px; }
.app-embed.dash .cbm-tip .cbm-tip-sub { color: var(--sqx-grey, #69727A); }
.cbm-tip ul { margin: 2px 0; padding-left: 16px; }
.cbm-legend { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--text); }
.cbm-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.cbm-key-title { font-weight: 500; color: var(--ink); }
.cbm-key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cbm-key i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.cbm-key i.cbm-key-dot { width: 10px; height: 10px; border-radius: 50%; }
.cbm-key-shape::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--faint); }
.cbm-key-shape[data-shape="circle"]::before { border-radius: 50%; }
.cbm-key-shape[data-shape="diamond"]::before { transform: rotate(45deg) scale(0.85); }
.cbm-key-shape[data-shape="triangle"]::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.cbm-key-shape[data-shape="triangleDown"]::before { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.cbm-key-note { color: var(--label); }
.cbm-pinned:not(:empty) { margin: 14px 0 0; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.cbm-pinned-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cbm-pinned h3, .cbm-events h3 { margin: 0 0 4px; font-size: 16px; }
.cbm-pinned p { margin: 0 0 8px; font-size: 14px; }
.cbm-close, .cbm-link { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; text-decoration: underline; }
.cbm-events { margin: 16px 0 0; font-size: 14px; }
.cbm-events ul { margin: 6px 0; padding-left: 0; list-style: none; }
.cbm-events li { margin: 0 0 6px; }
.cbm-alert { display: inline-block; padding: 1px 6px; border-radius: 3px; color: #fff; font-size: 12px; font-weight: 500; }
.cbm-details { margin: 12px 0 0; }
.cbm-details summary { cursor: pointer; color: var(--accent); font-size: 14px; }
/* site.css makes a table its own scroll box (display: block); the wrapper
   scrolls instead so the table keeps its columns. */
.cbm-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.app-embed.dash .cbm-table { display: table; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.app-embed.dash .cbm-table :is(th, td).num { text-align: right; white-space: nowrap; }

@media (max-width: 640px) {
  .cbm-controls { font-size: 13px; }
  .cbm-event-label { font-size: 15px; }
}
