/* Toymodel workflow beside the hero copy, drawn by js/toymodel-workflow.js.
   The colours are the page's tokens from css/graphbook.css: the sunk panel of
   the Toymodel canvas for the plate, white cards ruled in the text ink, gold
   for what is running, and the Toymodel ok and orange inks for the verdicts.
   Placement in the hero is in graphbook.css. */

.tm-flow{position:relative;margin:0}
.tm-flow-plate{position:relative;aspect-ratio:640 / 520;overflow:hidden;
  background:var(--panel-sunk);border:1px solid rgba(12,58,70,.10);
  border-radius:var(--site-corner-radius);box-shadow:var(--site-card-shadow)}
.tm-flow-plate > svg{display:block;width:100%;height:100%}

/* Pause and play, over the plate's empty top-right corner. */
.tm-flow-toggle{position:absolute;top:9px;right:9px;z-index:1;display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;padding:0;border:1px solid var(--rule-2);border-radius:50%;
  background:#ffffff;color:var(--zb-text-mid);cursor:pointer;transition:color .15s,border-color .15s}
.tm-flow-toggle:hover{color:var(--gold-ink);border-color:var(--zb-gold)}
.tm-flow-toggle svg{width:10px;height:10px;fill:currentColor}
.tm-flow .tm-flow-play,.tm-flow.is-paused .tm-flow-pause{display:none}
.tm-flow.is-paused .tm-flow-play{display:inline}
@media(max-width:560px){.tm-flow-toggle{top:4px;right:4px;width:22px;height:22px}}

/* ── inside the drawing ──────────────────────────────────── */
.tmf text{font-family:var(--mono);font-size:8px;fill:var(--zb-text-mid)}
.tmf-grid{fill:none;stroke:rgba(12,58,70,.055)}
.tmf-crumb rect{fill:#ffffff;stroke:rgba(12,58,70,.16)}

.tmf-lift{fill:rgba(12,58,70,.14)}
.tmf-card{fill:#ffffff;stroke:rgba(12,58,70,.20);transition:stroke .2s}
.tmf-node.is-hit .tmf-card{stroke:var(--zb-gold);stroke-width:1.6}
.tmf-bar{fill:#f5f9fa}
.tmf-rule{stroke:rgba(12,58,70,.12)}
.tmf .tmf-title{font-weight:600;font-size:8.6px;fill:var(--zb-text)}
.tmf-glyph-compute,.tmf-glyph-chart-dot,.tmf-mark{fill:var(--zb-gold)}
.tmf-glyph-data{fill:none;stroke:var(--zb-text);stroke-width:1.4}
.tmf-glyph-chart{fill:none;stroke:var(--zb-gold);stroke-width:1.4}

.tmf-tag rect{fill:#ffffff;stroke:rgba(12,58,70,.20)}
.tmf .tmf-tag text{font-size:7.4px;fill:var(--zb-text-mid)}

/* code */
.tmf .tmf-code{font-size:9px;white-space:pre}
.tmf .tmf-ln{fill:rgba(12,58,70,.34)}
.tmf .k-kw{fill:var(--orange-ink);font-weight:600}
.tmf .k-type{fill:var(--gold-ink);font-weight:600}
.tmf .k-fn{fill:var(--zb-text);font-weight:600}
.tmf .k-id{fill:var(--zb-text-mid)}
.tmf .k-num,.tmf .k-str{fill:#12603a}
.tmf .k-com{fill:var(--zb-text-dim);font-style:italic}
.tmf .k-pun{fill:var(--zb-text-dim)}
.tmf-caret{fill:var(--zb-gold)}
.tmf-band{fill:rgba(253,180,20,.10)}
.tmf-band-edge{fill:var(--zb-gold)}
.tmf-run circle{fill:#ffffff;stroke:rgba(12,58,70,.28)}
.tmf-run path{fill:var(--zb-text-mid)}
.tmf-run.is-on circle{fill:var(--zb-gold);stroke:var(--zb-gold)}
.tmf-run.is-on path{fill:var(--zb-text)}

/* status */
.tmf-dot{fill:rgba(12,58,70,.30)}
.tmf-dot.is-busy{fill:var(--zb-gold)}
.tmf-dot.is-ok{fill:#12603a}
.tmf .tmf-state{font-weight:600;fill:var(--zb-text)}
.tmf-track{fill:rgba(12,58,70,.08)}
.tmf-fill{fill:var(--zb-gold)}
.tmf .tmf-value{font-weight:600;fill:var(--zb-text)}

/* tables */
.tmf .tmf-dim{fill:var(--zb-text-dim)}
.tmf .tmf-head{font-size:7px;fill:var(--zb-text-dim)}
.tmf .tmf-type{fill:var(--gold-ink);font-weight:600}
.tmf .tmf-num{font-size:7.6px;fill:var(--zb-text)}
.tmf .tmf-num.tmf-dim{fill:var(--zb-text-dim)}
.tmf-newest{fill:rgba(253,180,20,.16)}
.tmf .tmf-small{font-size:7px}
.tmf-cell{fill:#f4f8f9;stroke:rgba(12,58,70,.10);stroke-width:.6}
.tmf-cell.s0{fill:#f4f8f9}
.tmf-cell.s1{fill:#fff0c7;stroke:rgba(253,180,20,.45)}
.tmf-cell.s2{fill:#d6e9ee;stroke:rgba(12,58,70,.12)}
.tmf-cell.s3{fill:var(--zb-text);stroke:var(--zb-text)}
.tmf .tmf-digit{font-size:6.6px;font-weight:600;fill:#9db5bc}
.tmf .tmf-digit.s1{fill:var(--gold-ink)}
.tmf .tmf-digit.s2{fill:var(--zb-text)}
.tmf .tmf-digit.s3{fill:#ffffff}
.tmf .tmf-ok{fill:#12603a;font-weight:600}
.tmf .tmf-bad{fill:var(--orange-ink);font-weight:600}

/* chart */
.tmf-gridline{stroke:rgba(12,58,70,.12);stroke-dasharray:2 3}
.tmf-axis{stroke:rgba(12,58,70,.30)}
.tmf-area{fill:rgba(253,180,20,.20)}
.tmf-line-min{fill:none;stroke:var(--zb-text);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.tmf-line-mean{fill:none;stroke:var(--zb-text-dim);stroke-width:1;stroke-dasharray:3 2}
.tmf-head-dot{fill:var(--zb-gold);stroke:var(--zb-text);stroke-width:1}

/* wires */
.tmf-wire{fill:none;stroke:rgba(12,58,70,.50);stroke-width:1.3}
.tmf-arrow{fill:rgba(12,58,70,.62)}
.tmf-port{fill:#ffffff;stroke:rgba(12,58,70,.55)}
.tmf-packet{fill:var(--zb-gold);stroke:var(--zb-text);stroke-width:1}
