/* TRUMPF FLUX Process Line — widget styles.
   Every rule is scoped under .tfpl so a host theme cannot reach in,
   and nothing here sets a page background. */

.tfpl{
  /* The viewport is a 900x520 SVG scaled to its container, so without a cap it
     fills whatever column it is dropped into. Overridable from the Style tab. */
  max-width:var(--tfpl-max, 820px);
  margin:0 auto;
  container-type:inline-size;
  --tfpl-bg:#FFFFFF;
  --tfpl-spark:#FF7A00;
  --tfpl-blue:#0080C8;
  --tfpl-machine:#DCE4E9;
  --tfpl-metal:#7E8B93;
  --tfpl-metal-edge:#2E3A41;
  --tfpl-text:#1D2C36;
  --tfpl-text-2:#5E6E79;
  --tfpl-ink:#0F1A22;
  --tfpl-rule:#C9D2D8;
  --tfpl-panel:#FFFFFF;
  --tfpl-mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tfpl-display:"IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --tfpl-body:"IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family:var(--tfpl-body);
  color:var(--tfpl-ink);
}
.tfpl *,.tfpl *::before,.tfpl *::after{box-sizing:border-box}

/* ---------- process bar, sits below the animation ---------- */
.tfpl-rail{position:relative;margin:20px 0 0}
.tfpl-track{position:relative;height:2px;background:var(--tfpl-rule)}
.tfpl-track>[data-tfpl-fill]{position:absolute;left:0;top:0;height:2px;width:0;background:var(--tfpl-blue)}
.tfpl-track>[data-tfpl-part]{position:absolute;top:-4px;left:0;width:10px;height:10px;
  background:var(--tfpl-metal-edge);transform:translateX(-5px)}
.tfpl-stations{display:grid;grid-template-columns:repeat(6,1fr)}
.tfpl-stn{appearance:none;background:none;border:0;padding:10px 8px 10px 0;margin:0;
  text-align:left;cursor:pointer;font:inherit;color:var(--tfpl-text-2);position:relative}
.tfpl-stn::before{content:"";position:absolute;top:-1px;left:0;width:1px;height:9px;background:var(--tfpl-rule)}
.tfpl-stn-no{display:block;font-family:var(--tfpl-mono);font-size:10.5px;letter-spacing:.06em;color:#93A3AD}
.tfpl-stn-nm{display:block;margin-top:3px;font-family:var(--tfpl-display);font-weight:600;
  font-size:14px;line-height:1.15;color:#6D7E88}
.tfpl-stn[aria-current="true"]::before{background:var(--tfpl-blue);width:2px;height:13px;top:-2px}
.tfpl-stn[aria-current="true"] .tfpl-stn-no{color:var(--tfpl-blue)}
.tfpl-stn[aria-current="true"] .tfpl-stn-nm{color:var(--tfpl-ink)}
.tfpl-stn.is-done .tfpl-stn-nm{color:#4C5D67}
.tfpl-stn:focus-visible{outline:2px solid var(--tfpl-blue);outline-offset:2px}

/* ---------- console ---------- */
.tfpl-console{display:grid;grid-template-columns:1fr;border:1px solid var(--tfpl-ink)}
.tfpl-console:has(.tfpl-readout){grid-template-columns:1fr 214px}
.tfpl-screen{background:var(--tfpl-bg);position:relative;overflow:hidden;min-height:60px}
.tfpl-screen svg{display:block;width:100%;height:auto}
.tfpl-readout{background:var(--tfpl-panel);border-left:1px solid #D5DDE2;padding:16px 15px;
  font-family:var(--tfpl-mono);font-size:11.5px;color:var(--tfpl-text-2)}
.tfpl-rd-h{margin:0 0 10px;font-size:10px;letter-spacing:.08em;color:#93A3AD}
.tfpl-rd{display:flex;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px dotted #E3E9EC}
.tfpl-rd:last-of-type{border-bottom:0}
.tfpl-rd k{color:#7B8C97;font-weight:400}
.tfpl-rd v{color:var(--tfpl-ink);text-align:right}
.tfpl-rd.hot v{color:var(--tfpl-blue)}
.tfpl-rd.pending{opacity:.42}
.tfpl-rd.pending v{color:#7B8C97}

/* ---------- transport ---------- */
.tfpl-transport{display:flex;align-items:center;gap:14px;padding:11px 14px;background:#fff;
  border:1px solid var(--tfpl-ink);border-top:0}
.tfpl-pp{appearance:none;flex:none;width:34px;height:30px;padding:0;cursor:pointer;
  display:grid;place-items:center;border:1px solid var(--tfpl-ink);background:var(--tfpl-ink);color:#fff}
.tfpl-pp svg{fill:#fff}
.tfpl-pp:focus-visible{outline:2px solid var(--tfpl-blue);outline-offset:2px}
.tfpl-cap{font-size:14.5px;line-height:1.35;color:#33454F;max-width:62ch}
.tfpl-cap b{font-family:var(--tfpl-display);font-weight:700;font-size:16px;color:var(--tfpl-ink)}
.tfpl-scrub{margin-left:auto;flex:none;width:150px;height:22px;position:relative;cursor:pointer;
  border-bottom:1px solid var(--tfpl-rule)}
.tfpl-scrub i{position:absolute;bottom:-1px;left:0;display:block;width:0;height:2px;background:var(--tfpl-blue)}
.tfpl-scrub em{position:absolute;bottom:4px;right:0;font-style:normal;
  font-family:var(--tfpl-mono);font-size:10.5px;color:#93A3AD}
.tfpl-scrub:focus-visible{outline:2px solid var(--tfpl-blue);outline-offset:2px}

/* ---------- station notes ---------- */
.tfpl-notes{margin-top:44px;border-top:1px solid var(--tfpl-ink)}
.tfpl-note{display:grid;grid-template-columns:74px 1fr;gap:0 22px;align-items:start;
  padding:20px 0;border-bottom:1px solid var(--tfpl-rule)}
.tfpl-note-no{padding-top:3px;font-family:var(--tfpl-mono);font-size:11.5px;
  letter-spacing:.06em;color:var(--tfpl-blue)}
.tfpl-note h3{margin:0 0 6px;font-family:var(--tfpl-display);font-weight:600;font-size:20px;
  letter-spacing:-.005em;color:var(--tfpl-ink)}
.tfpl-note p{margin:0;max-width:64ch;font-size:15px;line-height:1.55;color:#3A4C57}
.tfpl-note .tfpl-io{margin-top:9px;font-family:var(--tfpl-mono);font-size:11.5px;color:var(--tfpl-text-2)}
.tfpl-note .tfpl-io i{font-style:normal;color:var(--tfpl-ink)}

/* container query first: the widget may be narrow inside a wide page */
@container (max-width:640px){
  .tfpl-stn{padding-right:5px}
  .tfpl-stn-nm{font-size:12px}
  .tfpl-stn-no{font-size:10px}
}
@container (max-width:460px){
  .tfpl-stn-nm{display:none}
}
@media (max-width:820px){
  .tfpl-console{grid-template-columns:1fr}
  .tfpl-readout{border-left:0;border-top:1px solid #D5DDE2;
    display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
  .tfpl-rd-h{grid-column:1/-1}
  .tfpl-stn-nm{font-size:12.5px}
  .tfpl-transport{flex-wrap:wrap}
  .tfpl-scrub{margin-left:0;width:100%}
  .tfpl-note{grid-template-columns:56px 1fr;gap:0 12px}
}
