/* Bond movers (/bonds/movers/), on top of /site.css, whose tokens it uses. The
   one chart hue is SQX Blue (--accent); rises and falls are told apart by sign
   and by the table they sit in, not by colour alone. */
.mv { max-width: var(--max); margin: 0 auto; padding: 0 var(--page-padding, 16px) 48px; }
.mv-lede { max-width: 75ch; font-size: var(--fs-lead, 18px); color: var(--text); }
.mv-meta { color: var(--label); font-size: 14px; min-height: 1.4em; }

.mv-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin: 16px 0 20px;
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 6px); }
.mv-seg { display: flex; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.mv-seg legend { width: 100%; margin-bottom: 4px; font-size: 13px; color: var(--label); }
.mv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mv-seg label { padding: 6px 12px; border: 1px solid var(--line-2); margin-left: -1px; font-size: 14px; cursor: pointer; background: var(--paper, #fff); }
.mv-seg label:first-of-type { border-radius: 4px 0 0 4px; margin-left: 0; }
.mv-seg label:last-of-type { border-radius: 0 4px 4px 0; }
.mv-seg input:checked + label { background: var(--accent); border-color: var(--accent); color: #fff; }
.mv-seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.mv-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--label); }
.mv-field select { min-width: 180px; max-width: 260px; padding: 6px 8px; font: 14px var(--sans); color: var(--ink); border: 1px solid var(--line-2); border-radius: 4px; background: var(--paper, #fff); }
.mv-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); white-space: nowrap; }
/* site.css sizes form inputs for text; a checkbox keeps its own size. */
.mv-check input { width: 16px; height: 16px; margin: 0; padding: 0; flex: none; }

.mv-note { padding: 8px 12px; background: var(--accent-wash); border-left: 3px solid var(--accent); font-size: 14px; }
.mv-tables { display: grid; gap: 24px; }
.mv-table { margin: 0; }
.mv-table figcaption { margin: 0 0 8px; font: 600 17px var(--sans); color: var(--ink); }
/* site.css makes a table its own scroll box; the wrapper scrolls instead and the
   table stays a table. */
.mv-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius, 6px); background: var(--panel); }
.mv-table table { display: table; width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mv-table th { padding: 8px 10px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--label); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.mv-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.mv-table tr:last-child td { border-bottom: 0; }
.mv-table :is(th, td).num { text-align: right; }
.mv-table td.mv-bond { white-space: normal; min-width: 220px; }
.mv-bond strong { display: block; font-weight: 600; color: var(--ink); }
.mv-bond span { display: block; font-size: 12.5px; color: var(--muted); }
.mv-bond .mv-sm { display: none; }
.mv-band { font-weight: 600; }
.mv-rebanded { color: var(--accent-deep, var(--accent)); }
.mv-basis { font-size: 13px; color: var(--muted); }
.mv-chg { font-weight: 600; color: var(--ink); }
.mv-unit { font-weight: 400; color: var(--muted); }
.mv-none { color: var(--muted); text-align: center; }

.mv-api, .mv-ratings { margin-top: 40px; }
.mv-api p, .mv-ratings p { max-width: 75ch; }
.mv-code { overflow-x: auto; margin: 8px 0 16px; padding: 12px 14px; background: var(--ink); color: #f4f7fb; border-radius: var(--radius, 6px); font: 13px/1.5 var(--mono, monospace); }
.mv-json { max-height: 260px; }

.mv-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 12px; padding: 0; list-style: none; font-size: 13px; color: var(--text); }
.mv-legend li::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.mv-bars { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.mv-bar-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 80px; align-items: center; gap: 8px; min-height: 26px; }
.mv-bar-label { font-weight: 600; font-size: 14px; }
.mv-bar-track { display: block; height: 18px; border-left: 1px solid var(--line-2); }
.mv-bar { display: flex; height: 100%; min-width: 2px; border-radius: 0 3px 3px 0; overflow: hidden; }
.mv-bar-value { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
/* Segments: one hue in steps of lightness, darkest for the model. */
[data-g="model"] { background: var(--accent); }
[data-g="market"] { background: #6aa0cf; }
[data-g="sibling"] { background: #a9c8e6; }
[data-g="other"] { background: #d7e3ef; }
.mv-legend li[data-g]::before { background: inherit; }
.mv-legend li[data-g] { background: none; }
.mv-legend li[data-g="model"]::before { background: var(--accent); }
.mv-legend li[data-g="market"]::before { background: #6aa0cf; }
.mv-legend li[data-g="sibling"]::before { background: #a9c8e6; }
.mv-legend li[data-g="other"]::before { background: #d7e3ef; }

@media (max-width: 760px) {
  /* Phones: the bond cell carries country, sector and rating, so the level and the
     change stay on screen without a sideways scroll. */
  .mv-table .mv-lg { display: none; }
  .mv-bond .mv-sm { display: block; }
  .mv-table td.mv-bond { min-width: 0; }
  .mv-controls { flex-direction: column; align-items: stretch; }
  .mv-check { white-space: normal; }
  .mv-field select { max-width: none; width: 100%; }
  .mv-bar-row { grid-template-columns: 40px minmax(0, 1fr) 64px; }
}
