/* Market breadth (src/dashboard/breadth.js, docs/market-breadth.md). Colours come from app.css's variables, so dark mode follows. Up and down are the app's usual --pos and --neg for a stock that rose or fell;
   nothing else here is coloured good or bad. Phone first: every grid wraps by the width it has, nothing is wider than the screen. */
.br-card, .br-industries, .br-rotation-card { min-width: 0; }
.br-line { border-inline-start: 3px solid var(--accent); background: var(--panel-2); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.br-line p, .br-regime p { margin: 0 0 4px; overflow-wrap: anywhere; }
.br-regime { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
/* The figures are the shared band (app.css `.band`, concept v2); only the room under it is this card's. */
.br-tiles { margin-bottom: 14px; }
.br-split { display: flex; height: 6px; margin-top: 6px; border-radius: 3px; overflow: hidden; background: var(--line); }
.br-split .adv { background: var(--pos); }
.br-split .dec { background: var(--neg); }
.br-split .flat { background: var(--faint, var(--muted)); opacity: 0.5; }
.br-charts { display: grid; gap: 8px; margin-bottom: 8px; }
.br-charts .seg { max-width: 100%; flex-wrap: wrap; }
.br-chart { min-width: 0; }
.br-foot { margin: 10px 0 6px; overflow-wrap: anywhere; }
.br-how-list { padding-inline-start: 18px; display: grid; gap: 6px; }
.br-sortbar { flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.br-sortbar select { min-width: 0; max-width: 100%; }
.br-table { width: 100%; border-collapse: collapse; }
.br-table th, .br-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.br-table th.num, .br-table td.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-table th { font-size: 12px; font-weight: 600; color: var(--muted); }
.br-table .sort-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.br-table th.on .sort-btn { color: var(--text); }
.br-name { min-width: 0; overflow-wrap: anywhere; }
.br-name a { color: var(--text); font-weight: 600; }
.br-rot { min-width: 0; }
.br-rot-chart { width: 100%; }
.br-rotation .q { stroke: none; }
.br-rotation .q-leading { fill: var(--accent-bg); opacity: 0.55; }
.br-rotation .q-improving { fill: var(--panel-2); }
.br-rotation .q-weakening { fill: var(--panel-2); }
.br-rotation .q-lagging { fill: var(--accent-bg); opacity: 0.25; }
.br-rotation .axis { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.br-rotation .qlabel, .br-rotation .axis-title { fill: var(--muted); font-size: 11px; }
.br-rotation .trail { fill: none; stroke: var(--muted); stroke-width: 1.4; opacity: 0.8; }
.br-rotation .old { fill: var(--muted); opacity: 0.7; }
.br-rotation .head { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; cursor: pointer; }
.br-rotation .head:focus { outline: none; stroke: var(--text); stroke-width: 2; }
.br-rotation .name { fill: var(--text); font-size: 11px; font-weight: 600; pointer-events: none; }
.br-rot-info { min-height: 1.4em; margin: 6px 0 0; overflow-wrap: anywhere; }
.br-rot-details { margin: 8px 0; }
.br-rot-details summary { cursor: pointer; }
/* Under 900px (where app.css drops its wide columns) each industry is a small block, its figures side by side under its name, like the analyst table: the head is kept for a screen reader, and the
   "Sort by" choice above does the sorting. */
@media (max-width: 899px) {
  .br-group .br-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .br-group .br-table, .br-group .br-table tbody { display: block; }
  .br-group .br-table tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .br-group .br-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .br-group .br-table td.br-name { grid-column: 1 / -1; }
  .br-group .br-table td.num { text-align: start; }
  .br-group .br-table td.num::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
  .br-group .br-table td.hide-sm { display: none; }
}
