/* Charts for "Two weeks of the factory": the site's tokens (globals.css), nothing new but series colors. */
.fx { display: block; margin: 1.6em 0 2em; font: 13px/1.45 var(--mono); color: var(--soft); min-width: 0; }
.fx:not(:defined), .fx-failed { display: block; padding: 18px 20px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font: 14px/1.5 var(--mono); }
factory-stats:not(:defined), factory-heartbeat:not(:defined), factory-activity:not(:defined), factory-models:not(:defined),
factory-flow:not(:defined), factory-anatomy:not(:defined), factory-stacks:not(:defined), factory-decisions:not(:defined) {
  display: block; margin: 1.6em 0 2em; padding: 18px 20px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font: 14px/1.5 var(--mono);
}

.fx-box { width: 100%; }
.fx-box svg { display: block; overflow: visible; }
.fx-scroll { overflow-x: auto; }
.fx-canvas { display: block; width: 100%; touch-action: pan-y; }

.fx-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.fx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); }
.fx-seg button { font: 12px/1 var(--mono); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 7px 11px; cursor: pointer; }
.fx-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.fx-seg button:focus-visible, .fx-select select:focus-visible, .fx-data summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-select { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.fx-select select { font: 13px var(--mono); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 100%; }

.fx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--soft); font-size: 12px; }
.fx-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.fx-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fx-swatch.line { height: 2px; border-radius: 1px; }

.fx-grid { stroke: var(--line); stroke-width: 1; }
.fx-base { stroke: var(--muted); stroke-width: 1; }
.fx-axis { fill: var(--muted); font: 11px var(--mono); }
.fx-note { fill: var(--ink); font: 11px var(--mono); }
.fx-cross { stroke: var(--ink); stroke-width: 1; }
.fx-area { stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round; }

.fx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fx-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 14px; background: var(--bg); min-width: 0; }
.fx-stat strong { font: 700 28px/1.1 var(--mono); color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fx-stat span { color: var(--ink); font-size: 13px; }
.fx-stat small { color: var(--muted); font-size: 11px; line-height: 1.35; }

.fx-bars { display: grid; gap: 12px; }
.fx-bar-row { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; }
.fx-bar-label { display: flex; flex-direction: column; min-width: 0; }
.fx-bar-label strong { color: var(--ink); font-weight: 500; }
.fx-bar-label small { color: var(--muted); font-size: 11px; }
.fx-bar-track { height: 14px; }
.fx-bar-fill { display: block; height: 100%; min-width: 2px; background: var(--ink); border-radius: 0 4px 4px 0; }
.fx-bar-fill:hover { opacity: .8; }
.fx-bar-value { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.fx-comp { margin-top: 18px; }
.fx-comp-title { color: var(--ink); margin: 6px 0 8px; }
.fx-strip { display: flex; gap: 2px; height: 14px; }
.fx-strip.tall { height: 22px; }
.fx-strip span { display: block; min-width: 2px; border-radius: 3px; }
.fx-strip span:hover { opacity: .8; }

.fx-link { opacity: .45; }
.fx-link:hover { opacity: .8; }
.fx-node { fill: var(--ink); }
.fx-flow-label { fill: var(--soft); font: 12px var(--mono); }
.fx-flow-value { fill: var(--ink); font-weight: 700; }

.fx-rounds { margin-top: 14px; }
.fx-cols { display: flex; gap: 10px; align-items: flex-end; min-height: 120px; }
.fx-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1 1 0; max-width: 72px; }
.fx-col-bar { display: block; width: 100%; background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; }
.fx-col-bar:hover { opacity: .8; }
.fx-col-value { color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-col-label { color: var(--muted); font-size: 11px; }

.fx-band { fill: var(--chip); opacity: .45; }
.fx-row-label { fill: var(--ink); font: 12px var(--mono); }
.fx-seg-run:hover { opacity: .75; }
.fx-hatched { stroke: #eb6834; stroke-width: 1; }
.fx-landed { fill: var(--ink); stroke: var(--bg); stroke-width: 1.5; }
.fx-dep { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .45; }
.fx-arrowhead { fill: var(--ink); opacity: .6; }
.fx-wait { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 3; }
.fx-approved { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.fx-summary { margin: 0 0 10px; color: var(--soft); font-size: 13px; }

.fx-data { margin-top: 12px; }
.fx-data summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.fx-table { overflow-x: auto; margin-top: 8px; max-height: 320px; overflow-y: auto; }
.fx-table table { border-collapse: collapse; font: 12px var(--mono); width: 100%; }
.fx-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 12px 6px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
.fx-table td { padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }

.fx-tip { position: fixed; z-index: 50; max-width: 340px; padding: 8px 10px; background: var(--ink); color: var(--bg); border-radius: 8px; font: 12px/1.45 var(--mono); pointer-events: none; box-shadow: 0 6px 18px rgb(27 25 21 / .18); }
.fx-tip-head { color: var(--ink-soft); margin-bottom: 4px; }
.fx-tip-row { display: flex; gap: 8px; align-items: baseline; }
.fx-tip-row strong { color: var(--bg); font-weight: 700; white-space: nowrap; }
.fx-tip-row span:not(.fx-key) { color: var(--ink-soft); }
.fx-key { display: inline-block; width: 10px; height: 2px; border-radius: 1px; flex: none; align-self: center; }

@media (max-width: 520px) {
  .fx-bar-row { grid-template-columns: minmax(0, 1fr) 56px; }
  .fx-bar-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: no-preference) { .fx-link, .fx-bar-fill, .fx-col-bar { transition: opacity .12s; } }
