/* Original dashboard styles, source blob6c646799b706f37381e35d073d2293ab418fd5ec; routing region, before responsive application shell. */
.diagram {
  position: relative;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  padding: 32px;
  overflow: hidden;
  margin-bottom: 28px;
  min-height: 460px;
}

.diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
  pointer-events: none;
}

.diagram canvas.flows {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.3fr;
  gap: 64px;
  align-items: stretch;
}

.column-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-label .hex {
  width: 6px;
  height: 6px;
  background: var(--amber);
  transform: rotate(45deg);
}

.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px 18px;
}

.facility {
  gap: 8px;
  align-items: flex-start;
}

.miner-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(248px, 100%);
  max-width: 248px;
  padding-bottom: 28px;
}

.worker-provider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.worker-provider-group + .worker-provider-group {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.worker-provider-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-bottom: 2px;
  min-width: 0;
  width: 100%;
}

.worker-provider-label > span:not(.hex) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-provider-label > .worker-provider-label-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
  overflow: visible;
  text-overflow: clip;
}

.worker-provider-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-provider-rate,
.worker-provider-count,
.worker-provider-sep {
  flex: 0 0 auto;
  white-space: nowrap;
}

.provider-add-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--amber-soft);
  font: inherit;
  letter-spacing: inherit;
  text-transform: lowercase;
  cursor: pointer;
}

.provider-add-link {
  color: var(--ink-mute);
}

.provider-add-link:hover {
  color: var(--amber);
}

.worker-provider-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-content: start;
  width: 100%;
}

.worker-provider-cards > .miner:not(.worker-provider-summary) {
  width: calc(100% - 12px);
  margin-left: 12px;
}

.worker-provider-cards > .miner:not(.worker-provider-summary)::before,
.flow-client-group--paid .flow-client-cards > .dest:not(.flow-client-summary)::before {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: -7px;
  width: 1px;
  background: var(--hierarchy-guide);
  pointer-events: none;
}

.worker-provider-waiting {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  padding: 1px 2px 4px;
  text-transform: lowercase;
}

.miner-grid .empty {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-align: center;
  padding: 18px 8px;
  border: 1px dashed var(--border);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.miner {
  background: rgba(26, 24, 18, 0.8);
  border: 1px solid rgba(42, 39, 32, 0.8);
  border-right-color: rgba(255, 122, 26, 0.72);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.25;
  position: relative;
  transition: all 0.2s var(--ease);
}

.route-group-summary {
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.route-group-summary:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 2px;
}

.route-group-chevron {
  color: var(--amber-soft);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-left: auto;
}

.miner::after {
  content: "";
  position: absolute;
  top: 5px;
  right: -1px;
  bottom: 5px;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--amber), transparent);
  box-shadow: 0 0 10px rgba(255, 122, 26, 0.6);
  pointer-events: none;
}

.miner .mm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  gap: 6px;
  min-width: 0;
}

.miner .mm .model {
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.miner .worker-name-short {
  display: none;
}

.miner .mm .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  margin-top: 0;
  flex-shrink: 0;
}

.miner.status-working .led {
  animation: miner-working-pulse 1.8s ease-in-out infinite;
}

.miner.status-authorized .led,
.miner.status-idle .led {
  animation: miner-idle-pulse 1.9s ease-in-out infinite;
}

@keyframes miner-working-pulse {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.92);
    box-shadow: 0 0 5px rgba(139, 201, 139, 0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(139, 201, 139, 0.95);
  }
}

.miner.status-authorized .led,
.miner.status-degraded .led,
.miner.status-idle .led {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

@keyframes miner-idle-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.9);
    box-shadow: 0 0 5px rgba(255, 154, 61, 0.58);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(255, 154, 61, 0.88);
  }
}

.miner.status-connecting .led,
.miner.status-subscribed .led {
  background: var(--ink-dim);
  box-shadow: none;
}

.miner .hr {
  color: var(--ink-dim);
  font-size: 10px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.miner .hr .v {
  color: var(--amber-soft);
}

.miner .worker-hr-int,
.miner .worker-hr-compact {
  display: none;
}

.miner .ua {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-dim);
}

/* stratum proxy */
.proxy-col {
  justify-content: center;
}

.proxy {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-deep));
  border: 1px solid var(--amber-line);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

.proxy.stress {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber-line), 0 0 24px rgba(255, 122, 26, 0.12);
}

.proxy.curtailed {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(226, 106, 90, 0.4), 0 0 28px rgba(226, 106, 90, 0.15);
}

.proxy::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: scan 3s ease-in-out infinite;
}

@keyframes scan {
  0%,
  100% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
  }
}

.p-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 12px;
}

.p-head .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.p-head .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.p-head .status .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}

.load-warning-badge {
  border: 1px solid var(--amber-line);
  background: var(--amber-wash);
  color: var(--amber-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  text-transform: uppercase;
}

.proxy.stress .p-head .status .led {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.proxy.curtailed .p-head .status .led {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.proxy h2 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.proxy .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.proxy .routing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.proxy .rg .k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 2px;
}

.proxy .rg .v {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.proxy .rg .v .u {
  font-size: 11px;
}

.proxy .formula {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.proxy .formula code {
  color: var(--amber-soft);
  background: var(--bg-lift);
  padding: 2px 6px;
}

.router-column-label {
  justify-content: center;
}

.stage-column-label {
  font-weight: 700;
  color: var(--ink);
}

.stage-column-label--destinations {
  justify-content: flex-end;
}

.proxy-col {
  justify-content: flex-start;
  align-items: stretch;
}

.proxy-col .proxy {
  min-height: 340px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.proxy-col .proxy::before {
  display: none;
}

.proxy-col .proxy > * {
  display: none;
}

/* destinations */
.destinations {
  gap: 8px;
  align-items: flex-end;
}

.destinations #dest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#flow-cards {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
}

.flow-client-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(360px, 100%);
}

#flow-cards > .flow-clients-aggregate,
#flow-cards > .flow-client-group--paid {
  width: min(360px, 100%);
}

#flow-cards > .flow-client-group--paid {
  position: relative;
  padding-left: 12px;
  align-self: flex-end;
}

#flow-cards > .flow-client-group--paid::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--hierarchy-guide);
  pointer-events: none;
}

.flow-client-group + .flow-client-group {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.flow-client-label {
  margin-bottom: 2px;
  justify-content: flex-end;
}

.flow-client-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.flow-client-group--paid .flow-client-cards > .dest:not(.flow-client-summary) {
  position: relative;
  width: calc(100% - 12px);
  align-self: flex-end;
}

.dest {
  background: var(--bg-card);
  border: 1px solid var(--border);
  width: 100%;
  min-width: 0;
  padding: 5px 9px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  line-height: 1.25;
  transition: all 0.2s var(--ease);
}

.dest.disabled {
  opacity: 0.55;
  border-style: dashed;
}

.dest--runtime-only {
  border-style: dashed;
  border-color: rgba(122, 167, 217, 0.36);
}

.dest .who {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dest .who .ix {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.dest .who .n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dest .who .dest-title-target {
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.dest .who .badge-default {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--blue);
  letter-spacing: 0.08em;
  border: 1px solid rgba(122, 167, 217, 0.35);
  padding: 1px 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.dest .who .badge-flow-status {
  border: 1px solid var(--amber-line);
  background: var(--amber-wash);
  padding: 1px 6px;
  color: var(--amber-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}

.dest .pool {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--blue);
  padding: 0;
  background: transparent;
  border: 0;
  justify-self: end;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dest .flow-card-rate {
  display: none;
  justify-self: end;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber-soft);
  white-space: nowrap;
}

.dest .allocation {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.15;
  color: var(--ink);
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1px;
  padding-top: 0;
  gap: 12px;
}

.dest .allocation .nominal {
  color: var(--ink-dim);
}

.dest .allocation .deliv {
  color: var(--ink-dim);
  white-space: nowrap;
}

.dest .flow-card-metric {
  color: var(--ink-dim);
  white-space: nowrap;
}

.dest .flow-card-metric-label,
.dest .flow-card-metric-sep {
  color: var(--ink-dim);
}

.dest .flow-card-metric--good {
  color: var(--green);
}

.dest .flow-card-metric--warn {
  color: var(--amber);
}

.dest .flow-card-metric--bad {
  color: var(--red);
}

.dest .flow-card-metric--neutral {
  color: var(--ink-dim);
}

.dest.deviation-ok {
  border-color: rgba(139, 201, 139, 0.32);
}

.dest.empty {
  padding: 20px;
  text-align: center;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-style: dashed;
  text-transform: uppercase;
  display: block;
}

/* ── panes (data tables) ──────────────────────────────────── */
.panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.pane {
  background: var(--bg-lift);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pane-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.pane-head h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.pane-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pane-summary {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.ledger-scroll {
  overflow-x: auto;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ledger thead th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  white-space: nowrap;
  background: var(--bg-deep);
}

.ledger thead th.text-end,
.ledger tbody td.text-end {
  text-align: right;
}

.ledger tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  vertical-align: top;
}

.ledger tbody tr:last-child td {
  border-bottom: 0;
}

/* STR-64 — the Avg HR cell carries a unit suffix (e.g. "1.34 TH/s")
   because its column header is just "Avg HR", not "Avg HR · TH/s".
   Without nowrap the narrow auto-layout column wraps "TH/s" onto a
   second line; the operator reads that as a different number on glance. */
.ledger tbody tr:hover td {
  background: rgba(255, 122, 26, 0.025);
}

.ledger tbody td.col--worker,
.ledger tbody td.col--name {
  white-space: normal;
}

.ledger tbody td.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.ledger tbody td.num {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}

.ledger tbody td.num.amber {
  color: var(--amber);
}

.ledger tbody td.num.red {
  color: var(--red);
}

.ledger tbody td.num.dim {
  color: var(--ink-dim);
}

.ledger .empty-row td {
  text-align: center;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 28px;
}

.ledger .totals-tbody tr td {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-hot);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.ledger .totals-tbody td.totals-label {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 11px;
}

.ledger .totals-tbody td.num.amber {
  color: var(--amber);
}

.ledger .totals-tbody td.num.red {
  color: var(--red);
}

/* row toggle / accordion */
.row-toggle {
  cursor: pointer;
  user-select: none;
  color: var(--ink-mute);
  font-family: var(--mono);
  font-size: 12px;
  display: inline-block;
  width: 1.5em;
  text-align: center;
  transition: color 0.15s var(--ease);
}

.row-toggle:hover {
  color: var(--amber-soft);
}

.row--disabled td {
  opacity: 0.55;
  font-style: italic;
}

/* The accordion `<td>` colspan = number of columns, so its natural width
   matches the table — which can be wider than the visible pane when the
   ledger overflows horizontally. We pin the inner .accordion-body to
   the scroll-viewport's left edge with `position: sticky; left: 0;` so
   the chart stays in view regardless of horizontal scroll, and size it
   to the pane's clientWidth (set inline by JS). Operator review:
   "below the graph should be always visible no matter what horizontal
   scroll is. It should be scaled down horizontally accordingly". */
/* Specificity bump (.ledger tbody .accordion-row > td) so the cell's
   default ledger-tbody padding (12px 16px) doesn't push the sticky body
   16px to the right of the scroll-viewport edge. */
.ledger tbody .accordion-row > td,
.accordion-row > td {
  background: transparent;
  padding: 0;
  border-bottom: 1px solid var(--border-hot);
}

.accordion-body {
  padding: 12px 16px 14px;
  font-size: 12px;
  /* STR-58: chart + events both live inside the body; drop the height cap
     so the chart can claim its own surface, and let the events table grow
     naturally below. */
  overflow: visible;
  box-sizing: border-box;
  /* Pin to the scroll-viewport's left edge across horizontal scroll. */
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-deep);
  /* width is set inline by fitAccordionBodies() in app.js to the
     pane's .ledger-scroll clientWidth — keeps the chart confined to the
     pane regardless of how wide the table gets. */
}

.accordion-body .ts-events-host {
  max-height: 200px;
  overflow: auto;
}

/* ── STR-58: 24h hashrate chart ──────────────────────────────────────── */
.ts-chart-host {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: 260px;
  margin-bottom: 14px;
  padding: 10px 8px 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border-hot);
  border-radius: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.chart-canvas-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.chart-series-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.chart-series-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}

.chart-series-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.chart-series-group-label {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chart-series-group-label::after {
  content: ":";
  color: var(--ink-dim);
  font-weight: 500;
}

.chart-series-options {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.chart-series-option input {
  appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid var(--border-hot);
  background: rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
  position: relative;
}

.chart-series-option input:checked {
  border-color: var(--amber);
  background: var(--amber);
}

.chart-series-option input:checked::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--bg-deep);
  border-bottom: 2px solid var(--bg-deep);
  transform: rotate(-45deg);
}

.chart-series-swatch {
  width: 12px;
  height: 2px;
  display: inline-block;
  flex: 0 0 auto;
  background: var(--series-color, var(--amber));
}

.chart-series-swatch--dash {
  height: 0;
  background: transparent;
  border-top: 1px dashed var(--series-color, var(--amber));
}

.chart-series-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-series-option input:not(:checked) ~ .chart-series-swatch,
.chart-series-option input:not(:checked) ~ .chart-series-label {
  opacity: 0.42;
}

.chart-series-option input:not(:checked) ~ .chart-series-label {
  text-decoration: line-through;
}

/* Popup variant: fills the modal body height, no fixed pixel cap. */
.ts-chart-host--popup {
  height: 100%;
  margin-bottom: 0;
  border: 1px solid var(--border-hot);
}

.ts-chart-host.ts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-loading-msg,
.ts-empty-msg {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  font-style: italic;
}

.ts-chart-svg,
.ts-chart-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.ts-grid {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}

.ts-line {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.ts-target {
  stroke: rgba(255, 122, 26, 0.45);
  stroke-dasharray: 4 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ts-target-label {
  fill: var(--amber-soft, #ff9b57);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ts-crosshair {
  stroke: rgba(245, 237, 224, 0.35);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.ts-cross-dot,
.ts-only-point {
  fill: var(--amber);
  pointer-events: none;
}

.ts-axis-x,
.ts-axis-y {
  fill: var(--ink-mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.ts-axis-y {
  text-anchor: end;
}

.ts-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--border-hot);
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
  border-radius: 0;
  z-index: 10;
  line-height: 1.4;
}
.ts-tip-time {
  color: var(--ink-mute);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ts-tip-val {
  color: var(--amber-soft, #ff9b57);
  font-size: 12px;
  font-weight: 500;
}
.ts-tip-val .u {
  color: var(--ink-mute);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-left: 3px;
}
.ts-tip-dev {
  color: var(--ink);
  font-size: 10px;
}
.ts-tip-dev .u {
  color: var(--ink-mute);
  font-size: 9px;
  padding-left: 1px;
}

