/* Chart components of the heat demo, round 18: charts.js plot() (fleet chart, person chart, sparkline) and the situation board (board.js).
   Colours and fonts come ONLY from the custom properties of heat.css (the design18 token block); this file defines none of its own.
   Text in the SVG inherits the page font. The SVG keeps its aspect ratio and scales to the width of its container. */

/* plot */
.hc-plot { display: block; width: 100%; max-width: 100%; height: auto; overflow: visible; }
.hc-plot text { font-family: inherit; font-size: 10px; font-variant-numeric: tabular-nums; }
.hc-plot path, .hc-plot line { fill: none; vector-effect: non-scaling-stroke; }
.hp-bg { fill: var(--sf-2); }
.hp-shade { fill: var(--tx-1); fill-opacity: .05; }
.hp-grid { stroke: var(--ln); stroke-width: 1; }
.hp-ax { fill: var(--tx-3); }
.hc-plot path.hp-iqr { fill: var(--tx-2); fill-opacity: .09; }
.hc-plot path.hp-fill { fill: var(--acc-hi); fill-opacity: .10; }
.hp-med { stroke: var(--tx-3); stroke-width: 1.4; stroke-linejoin: round; }
.hp-top { stroke: var(--acc-hi); stroke-width: 1.5; stroke-linejoin: round; }
.hp-line { stroke: var(--acc-hi); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
line.hp-watch { stroke: var(--watch); stroke-width: 1; opacity: .9; }
line.hp-alert { stroke: var(--alert); stroke-width: 1; opacity: .9; }
.hc-plot text.hp-refl { font-size: 9.5px; font-weight: 600; }
text.hp-watch { fill: var(--watch); } text.hp-alert { fill: var(--alert); }
.hp-now { stroke: var(--tx-3); stroke-width: 1; stroke-dasharray: 2 2; }
.hc-plot text.hp-nowt { fill: var(--tx-2); font-size: 9.5px; }
.hp-cur { stroke: var(--tx-1); stroke-width: 1.4; }
.hp-curd { fill: var(--tx-1); }
.hp-bub { fill: var(--bg-0); stroke: var(--ln-2); stroke-width: 1; }
.hc-plot text.hp-bubt { fill: var(--tx-1); font-size: 10.5px; font-weight: 600; }
.hp-mark { stroke: var(--sf-2); stroke-width: 1.5; }
.hc-plot text.hp-markt { font-size: 9.5px; font-weight: 600; }
circle.st-ok, .hp-end.st-ok { fill: var(--ok); } circle.st-watch { fill: var(--watch); } circle.st-alert { fill: var(--alert); }
text.st-watch { fill: var(--watch); } text.st-alert { fill: var(--alert); }
/* sparkline (crew rows): its own size, not the container width */
.hc-plot.hp-spark { width: auto; flex: none; }
.hp-sline { stroke: var(--tx-2); stroke-width: 1.3; stroke-linejoin: round; }

/* situation board (mounted into #board) */
.bd { display: flex; flex-direction: column; }
.bd-sec { padding: 12px 0; }
.bd-a, .bd-b, .bd-c { display: contents; }   /* round 20: three kept parts of the board (the chart re-renders apart) */
.bd-sec + .bd-sec, .bd-a:has(.bd-sec) + .bd-b > .bd-sec, .bd-b:has(.bd-sec) + .bd-c > .bd-sec, .bd-a:has(.bd-sec) + .bd-b:empty + .bd-c > .bd-sec { border-top: 1px solid var(--ln); }
.bd-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bd-ttl { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tx-1); }
.bd-u, .bd-lab { font-size: 11px; line-height: 14px; font-weight: 400; color: var(--tx-3); }
.bd-u { margin-left: 6px; }
.bd-st3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bd-st3 > div { display: flex; flex-direction: column; gap: 2px; }
.bd-st3 b { font-size: 26px; line-height: 30px; font-weight: 500; letter-spacing: -.01em; color: var(--tx-1); }
.bd-st3 .watch b { color: var(--watch); } .bd-st3 .alert b { color: var(--alert); }
.bd-k { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; color: var(--tx-3); }
.bd-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bd-dot.st-ok, .bd-sbar .st-ok { background: var(--ok); } .bd-dot.st-watch, .bd-sbar .st-watch { background: var(--watch); }
.bd-dot.st-alert, .bd-sbar .st-alert { background: var(--alert); }
.bd-sbar { display: flex; height: 4px; gap: 2px; border-radius: 2px; overflow: hidden; margin: 10px 0 12px; }
.bd-sbar i { display: block; height: 100%; min-width: 2px; } .bd-sbar .st-ok { opacity: .55; }
.bd-act { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ln); padding-top: 10px; }
.bd-act.five { grid-template-columns: repeat(5, 1fr); }
.bd-status > .bd-act:first-child { border-top: 0; padding-top: 0; }
.bd-act > div { display: flex; flex-direction: column; padding-left: 10px; border-left: 1px solid var(--ln); min-width: 0; }
.bd-act > div:first-child { padding-left: 0; border-left: 0; }
.bd-act b { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--tx-1); }
.bd-lg { display: flex; gap: 12px; margin: -2px 0 6px; font-size: 11px; color: var(--tx-3); }
.bd-lg span { display: inline-flex; align-items: center; gap: 5px; }
.bd-lg i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }
.bd-lg i.hp-top { background: var(--acc-hi); } .bd-lg i.hp-med { background: var(--tx-3); }
.bd-lg i.hp-fc { background: repeating-linear-gradient(90deg, var(--tx-3) 0 3px, transparent 3px 5px); }
.bd-al { display: grid; grid-template-columns: 52px minmax(56px, auto) 1fr; align-items: center; gap: 10px; width: calc(100% + 16px);
  min-height: 34px;
  margin: 0 -8px; padding: 5px 8px; border: 0; border-radius: var(--r-3); background: none; color: var(--tx-1); font: inherit;
  text-align: left; cursor: pointer; }
.bd-al + .bd-al { box-shadow: 0 -1px 0 var(--ln); }
.bd-al:hover, .bd-al:focus-visible { background: var(--sf-2); }
.bd-al .pill { justify-self: start; }
.bd-nm { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-when { font-size: 12px; color: var(--tx-2); white-space: nowrap; }
.bd-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; min-width: 0; }
.bd-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; line-height: 1;
  white-space: nowrap; color: var(--tx-2); background: var(--sf-3); }
.bd-tag.k-core.watch { color: var(--watch); background: var(--watch-t); }
.bd-tag.k-core.alert { color: var(--alert); background: var(--alert-t); }
.bd-more { display: block; margin-top: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--acc-hi);
  cursor: pointer; }
.bd-none { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--tx-2); }
.bd-hr { display: inline-flex; align-items: center; gap: 6px; }
.bd-note { margin: -2px 0 8px; font-size: 12px; line-height: 17px; color: var(--tx-2); }
.bd-note[hidden] { display: none; }
