.fl-page [hidden] { display:none !important; }
.fm-console {
  margin-block:24px 50px; padding:clamp(12px, 2.5vw, 28px); background:#14202c; color:#f0f5f8;
  border:1px solid #43556a; border-radius:12px; font-variant-numeric:tabular-nums;
}
.fm-console [id], #fl-model { scroll-margin-top:110px; }
#fl-console { scroll-margin-top:12px; }
.fm-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:14px; align-items:center; }
.fm-heading h2 { font-size:clamp(1.4rem, 3vw, 2rem); line-height:1.4; }
.fm-heading p { margin:.35em 0 0; color:#c0d1dd; font-size:.9rem; }
.fm-jumps { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0; }
.fm-jumps a { display:flex; align-items:center; min-height:44px; padding:6px 10px; border:1px solid #526a7b; border-radius:5px; font-size:.88rem; }
.fm-work { display:grid; grid-template-columns:minmax(0, 2.15fr) minmax(0, 1fr); gap:14px; align-items:start; }
.fm-card { padding:clamp(12px,2vw,19px); min-width:0; border:1px solid #506576; border-radius:8px; background:#202f3c; }
.fm-switch { background:#233447; }
.fm-inspector { display:grid; gap:14px; min-width:0; }
.fm-card h3, .fm-monitor h3 { margin:0 0 14px; font-size:1.2rem; }
.fm-console label { display:grid; gap:5px; margin:8px 0; font-size:.9rem; min-width:0; }
.fm-console button, .fm-console select {
  border:1px solid #718799; border-radius:5px; min-height:44px; padding:6px 10px;
  background:#e8f0f5; color:#203849; font:inherit; line-height:1.35; font-weight:650;
}
.fm-console button:hover { background:#c7e4ee; color:#203849; }
.fm-console button:disabled { opacity:.6; cursor:default; }
.fm-console select { width:100%; min-width:0; font-size:1rem; }
.fm-read { margin:12px 0; font-size:.9rem; line-height:1.75; color:#d4e3ed; }
.fm-text-link { text-decoration:underline; text-underline-offset:.22em; display:inline-flex; min-height:44px; align-items:center; }
.fm-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.fm-buttons button { font-size:.875rem; }
.fm-operation, .fm-matrix-head, .fm-slot { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; }
.fm-operation { padding:10px; background:#192937; border:1px solid #526a7b; border-radius:6px; }
.fm-operation span, .fm-matrix-head h4, .fm-salvo h4 { margin:0; font-size:.9rem; font-weight:700; }
.fm-operation button[aria-pressed=true] { background:#97d6e5; color:#132f40; border-color:#b2e5ef; }
.fm-matrix-head { justify-content:space-between; margin:16px 0 6px; }
.fm-key { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:.8rem; font-weight:650; }
.fm-key [data-key=live] { color:#a5e2ee; }
.fm-key [data-key=pending] { color:#ffcc9e; }
.fm-key [data-key=edit] { color:#ebc8fa; }
.fm-grid { overflow-x:auto; scroll-padding-inline-start:75px; min-width:0; border:1px solid #526a7b; background:#192937; }
.fm-grid table { border-collapse:separate; border-spacing:2px; width:100%; white-space:nowrap; }
.fm-grid th { padding:0; font-size:.78rem; }
.fm-grid th:first-child { position:sticky; left:0; z-index:1; background:#192937; }
.fm-grid td { padding:0; text-align:center; }
.fm-grid button { min-width:44px; width:100%; font-size:.82rem; padding:4px; border-radius:3px; }
.fm-grid :is(.fm-source-key,.fm-dest-key) { background:#2b4052; color:#edf4fa; white-space:nowrap; }
.fm-grid .fm-dest-key { min-width:60px; }
.fm-grid button[data-state=idle] { background:#30485a; color:#acbfcb; border-color:#526a7b; }
.fm-grid button[data-state=idle]:hover { background:#48687e; color:#fff; }
.fm-grid button[data-state=live] { background:#97d6e5; color:#142e3c; }
.fm-grid button[data-state=pending] { background:#ffcc9e; color:#462c1d; }
.fm-grid button[data-state=edit] { background:#ebc8fa; color:#40204b; }
.fm-grid-help { margin:7px 0; font-size:.8rem; color:#c0d1dd; }
.fm-confirm { justify-content:flex-end; padding:8px 0 12px; }
#fm-take:not(:disabled) { background:#ffcc9e; color:#462c1d; }
.fm-salvo { padding:12px; border:1px solid #526a7b; border-radius:6px; background:#192937; }
.fm-slot label { flex:1 1 170px; }
.fm-slot { align-items:end; }
.fm-slot .fm-buttons { padding-bottom:8px; }
.fm-salvo #fm-status { margin-bottom:0; }
.fm-monitor,.fm-notes { margin-top:22px; }
.fm-card summary { cursor:pointer; font-weight:700; padding:8px 0; min-height:44px; }
@media(max-width:900px) { .fm-work { grid-template-columns:minmax(0,1fr); } }
@media(min-width:600px) and (max-width:900px) { .fm-inspector { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.fm-bank { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.fm-output { min-width:0; background:#202f3c; border:1px solid #506576; border-radius:8px; padding:14px; }
.fm-output[data-selected=true] { border-color:#97d6e5; }
.fm-output h4, .fm-output h5 { margin:0 0 8px; }
.fm-out-flow { margin:0 0 12px; font-size:.86rem; color:#cfdee7; }
.fm-ports { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.fm-port { min-width:0; border-radius:6px; background:#ebf1e8; color:#183630; padding:10px; }
.fm-port:only-child { grid-column:1/-1; }
.fm-port p { margin:6px 0 0; font-size:.84rem; overflow-wrap:anywhere; }
.fm-picture {
  display:grid; place-items:center; aspect-ratio:16/7; margin-bottom:8px; border-radius:4px;
  background:repeating-linear-gradient(140deg,#227868 0px,#227868 16px,#348575 16px,#348575 32px);
  color:#fff; font-size:clamp(1.15rem,4vw,2rem); font-weight:750;
}
.fm-picture[data-color=amber] { background:repeating-linear-gradient(140deg,#9b5c24 0 16px,#a96c33 16px 32px); }
.fm-picture[data-color=plum] { background:repeating-linear-gradient(140deg,#6d4269 0 16px,#785177 16px 32px); }
.fm-picture[data-color=blue] { background:repeating-linear-gradient(140deg,#355c83 0 16px,#456b8f 16px 32px); }
.fm-picture[data-color=olive] { background:repeating-linear-gradient(140deg,#576535 0 16px,#647542 16px 32px); }
.fm-audio { border-top:1px solid #b9cabe; padding-top:4px; }
.fm-notes a { text-decoration:underline; text-underline-offset:.2em; }
.fm-console :is(button,select,summary,a,[tabindex]):focus-visible { outline:3px solid #ffdb93; outline-offset:3px; }
@media(max-width:760px) { .fm-bank { grid-template-columns:1fr; } }
@media(max-width:390px) { .fm-select-pair { grid-template-columns:1fr; gap:0; } .fm-output,.fm-port { padding:8px; } }
#fl-model { scroll-margin-top:110px; }
.fm-grid :is(.fm-source-key,.fm-dest-key)[aria-pressed=true] { background:#36576c; color:#fff; border-color:#97d6e5; }
@media(min-width:901px) and (pointer:fine) {
  .fm-grid button { min-height:34px; }
}

/* Shared tool views for the signal-path console. */
.fm-console { background:#1e2b33; border-color:#556b71; }
.fm-heading { margin-bottom:12px; }
.fm-heading h2 { margin:0; }
.fm-utility { margin:0; }
.fm-utility a { min-height:36px; }
.fm-toolbar {
  display:flex; flex-wrap:wrap; gap:5px; margin:0 0 12px; padding:7px;
  background:#121e25; border:1px solid #556b71; border-radius:6px;
}
.fm-toolbar button {
  flex:1 1 125px; font-size:.9rem; min-height:44px; background:#293b45; color:#eaf2f4;
  border-color:#5c757d;
}
.fm-toolbar button[aria-pressed=true] {
  background:#d6edec; color:#14383e; box-shadow:inset 0 -3px #4d9092; border-color:#a8d1cf;
}
.fm-overview {
  --flow-row:34px;
  padding:clamp(10px, 2vw, 20px); color:#162d37; background:#e6edf0;
  border:1px solid #819da5; border-radius:7px;
}
.fm-pane-bar {
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; align-items:center;
  padding-bottom:6px; border-bottom:1px solid #a7b9bf;
}
.fm-pane-bar h3 { margin:0; font-size:1.24rem; }
.fm-flow-key { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:.82rem; color:#34525c; }
.fm-flow-key span::before {
  content:""; display:inline-block; width:18px; margin-inline-end:6px;
  vertical-align:.22em; border-top:3px solid #087d82;
}
#fm-pending-key::before { border-top:3px dashed #a64c17; }
.fm-overview-label { margin:8px 0; font-size:.88rem; }
.fm-flow-scroll { overflow-x:auto; overscroll-behavior-inline:contain; }
.fm-flow-board {
  --flow-tracks:minmax(0,1fr) minmax(12px,.46fr) minmax(0,1fr) minmax(12px,.85fr)
    minmax(0,1fr) minmax(12px,.46fr) minmax(0,1fr);
}
.fm-flow-board[data-advanced=true] {
  min-width:1080px;
  --flow-tracks:minmax(0,1fr) minmax(18px,.27fr) minmax(0,1fr) repeat(7,7px minmax(0,1fr))
    minmax(33px,.75fr) minmax(0,1fr) minmax(15px,.29fr) minmax(0,1fr);
}
.fm-flow-scroll-note { display:none; margin:0 0 8px; color:#34525c; font-size:.84rem; }
.fm-flow-head,.fm-flow { display:grid; grid-template-columns:var(--flow-tracks); }
.fm-flow-head button { min-width:0; }
.fm-flow-board[data-advanced=true] .fm-flow-head button:nth-child(n+2):nth-child(-n+9) {
  background:#31576a; border-color:#31576a;
}
.fm-flow-board[data-advanced=true] .fm-flow-block { padding-inline:5px; }
.fm-flow-board[data-advanced=true] .fm-flow-block small { font-size:.71rem; }
@media(max-width:1280px) {
  .fm-overview[data-advanced=true] .fm-flow-scroll-note { display:block; }
}
.fm-flow-head button {
  padding:4px; min-height:40px; font-size:.82rem; background:#203d49; color:#f1f7fb; border-color:#20434e;
}
.fm-flow { margin-top:4px; align-items:stretch; }
.fm-flow-column { display:grid; grid-auto-rows:var(--flow-row); min-width:0; }
.fm-console .fm-flow-block {
  display:flex; align-items:center; justify-content:space-between; text-align:left; min-width:0; min-height:0;
  gap:4px; margin-block:2px; padding:2px 8px; font-size:.88rem;
  background:#f7fafb; color:#223f49; border-color:#829ea7;
}
.fm-flow-block strong { flex-shrink:0; font-family:var(--mono,monospace); }
.fm-flow-block small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.75rem; }
.fm-console .fm-flow-block[data-traced=true] {
  background:#c4eeee; border-color:#087d82; box-shadow:inset 3px 0 #087d82; color:#0c4448;
}
.fm-console .fm-flow-block:hover { background:#d4e5ec; }
.fm-flow-block:focus-visible,.fm-flow-head button:focus-visible { outline-color:#086c70 !important; }
.fm-wires { width:100%; height:calc(var(--flow-row) * var(--flow-count)); }
.fm-wire { fill:none; stroke-width:1.3; stroke:#778e98; }
.fm-wire-live { stroke:#087d82; stroke-width:2.6; }
.fm-wire-pending { stroke:#a64c17; stroke-width:2.1; stroke-dasharray:3 3; }
.fm-flow-detail { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; margin-top:10px; padding-top:8px; border-top:1px solid #a7b9bf; }
.fm-path-audio { flex:1 1 230px; margin:0; font-size:.87rem; overflow-wrap:anywhere; }
.fm-flow-detail button { min-height:40px; font-size:.82rem; }
.fm-dialog {
  position:fixed; width:min(1040px,calc(100% - 24px)); max-width:none; max-height:calc(100% - 24px);
  padding:0; color:#f0f5f8; background:#1c3441; border:1px solid #a5c6d1; border-radius:10px;
  box-shadow:0 16px 50px #0b202f80; overflow:hidden;
}
.fm-dialog::backdrop { background:#12283256; }
.fm-dialog[open] { display:flex; flex-direction:column; }
body:has(.fm-dialog[open]) { overflow:hidden; }
.fm-dialog-bar {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px 12px; background:#254b5d; border-bottom:1px solid #7b9ba8;
}
.fm-dialog-bar h3 { margin:0; font-size:1.08rem; }
.fm-dialog-body { overflow:auto; overscroll-behavior:contain; padding:12px; min-width:0; }
.fm-dialog-body .fm-process-pane { max-width:none; }
@media (max-width:820px) {
  .fm-overview { --flow-row:48px; }
  .fm-console .fm-flow-block { flex-direction:column; justify-content:center; align-items:flex-start; gap:1px; padding-inline:5px; }
  .fm-flow-block small { max-width:100%; }
}
@media (max-width:465px) {
  .fm-flow-board:not([data-advanced=true]) { --flow-tracks:minmax(0,1fr) 10px minmax(0,1fr) 20px minmax(0,1fr) 10px minmax(0,1fr); }
  .fm-flow-head button { padding-inline:2px; font-size:.70rem; }
  .fm-console .fm-flow-block { font-size:.76rem; }
  .fm-flow-block small { font-size:.66rem; }
  .fm-dialog-body { padding:7px; }
}
.fm-process-pane { max-width:630px; }
.fm-patch-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 14px; max-width:900px; }
.fm-patch-list p { grid-column:1/-1; }
.fm-console .fm-patch-row {
  display:grid; grid-template-columns:minmax(82px, .65fr) minmax(0,1fr); gap:10px; align-items:center;
  padding:6px 10px; margin:4px 0; border:1px solid #526a7b; background:#192937;
}
.fm-patch-row select { margin:0; }
.fm-patch-row select:disabled { opacity:.73; }
@media(max-width:700px) {
  .fm-patch-list { grid-template-columns:1fr; }
}
.fm-selectors .fm-patch-list { display:none; }
.fm-selector-grid { max-width:100%; }
.fm-selector-grid tbody th { padding-inline:8px; text-align:left; }
.fm-selector-grid [data-context=true] { box-shadow:inset 0 0 0 2px #8ed1dc; }
.fm-console .fm-patch-row[data-context=true] { border-color:#a2e4e7; background:#284656; }
.fm-selector-grid button[data-state=live]:disabled { opacity:1; }
@media(max-width:700px) {
  .fm-selectors .fm-patch-list { display:grid; }
  .fm-selector-grid { display:none; }
}

.fm-stage-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:16px; }
.fm-stage-layout > * { min-width:0; }
.fm-dialog-body .fm-stage-inline-title { display:none; }
.fm-stage-preview { padding:12px; background:#152937; border:1px solid #4b6e80; border-radius:7px; }
.fm-stage-preview h4 { margin:0 0 10px; }
.fm-stage-preview figure { margin:0; min-width:0; }
.fm-stage-preview figcaption { font-size:.82rem; margin:0 0 4px; overflow-wrap:anywhere; }
.fm-stage-destinations { margin:8px 0; font-size:.86rem; overflow-wrap:anywhere; }
.fm-chart-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.fm-chart {
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(28px,5fr) minmax(16px,3fr) 21px;
  aspect-ratio:16/8; margin:0 0 8px; border:1px solid #6c8792; background:#152431;
}
.fm-frame-track {
  grid-column:1/-1; position:relative; padding:0 4px; border-top:1px solid #7b96a3; background:#233947; color:#fff;
  overflow:hidden; font:600 .72rem/20px var(--mono,monospace);
}
.fm-frame-track i { position:absolute; inset-block:0; border-left:3px solid #a9f6e9; }
.fm-frame-track span { position:relative; padding:0 4px; background:#1b3244e0; }
.fm-console .fm-stage-range { grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:0 6px; }
.fm-stage-range input { grid-column:1/-1; }
.fm-stage-range output { font-family:var(--mono,monospace); }
.fm-console .fm-stage-check { grid-template-columns:20px minmax(0,1fr); align-items:center; min-height:44px; }
.fm-stage-check input { width:17px; height:17px; }
.fm-console .fm-stage input { accent-color:#9de7e4; }
.fm-signal-values { font-size:.82rem; margin:8px 0 0; }
.fm-signal-values > div { display:grid; grid-template-columns:minmax(0,7em) minmax(0,1fr); gap:4px 8px; padding:2px 0; border-top:1px solid currentColor; }
.fm-signal-values dt { font-weight:700; }
.fm-signal-values dd { margin:0; overflow-wrap:anywhere; }
@media(max-width:700px) {
  .fm-stage-layout { grid-template-columns:1fr; gap:10px; }
  .fm-stage-preview { padding:8px; }
}

.fm-chart-pair.fm-chart-reference { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:450px) {
  .fm-chart-pair.fm-chart-reference { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fm-chart-reference figure:first-child { grid-column:1/-1; max-width:155px; }
}

.fm-preview-controls {
  position:sticky; top:-12px; z-index:1; display:flex; flex-wrap:wrap; align-items:center;
  justify-content:space-between; gap:6px 12px; padding:8px 10px;
  background:#132c39; border:1px solid #5e8795; border-radius:6px;
}
.fm-preview-controls p { margin:0; font-size:.9rem; }
#fm-preview-take:not(:disabled) { background:#f2cc8a; border-color:#f2cc8a; color:#38250d; }
.fm-preview-audio { margin:0 0 8px; font-size:.86rem; color:#c7eff2; }
.fm-preview-audio:empty { margin:0; }
.fm-preview-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,455px),1fr)); gap:12px; }
.fm-preview-card { min-width:0; border:1px solid #5e8795; border-radius:8px; background:#182e3a; overflow:hidden; }
.fm-preview-card h4 { margin:0; padding:8px 10px; background:#2a4c5b; font-size:1rem; overflow-wrap:anywhere; }
.fm-preview-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:#59717d; }
.fm-preview-side {
  min-width:0; padding:10px; display:flex; flex-direction:column; gap:8px; background:#152b37; font-size:.84rem;
}
.fm-preview-side[data-side=queued] { background:#233641; }
.fm-preview-side-head { min-height:4.3em; }
.fm-preview-side-head h5 { margin:0; color:#a9e4e5; font-size:.93rem; }
.fm-preview-side[data-side=queued] h5 { color:#ffd491; }
.fm-preview-side-head p { margin:0; line-height:1.45; overflow-wrap:anywhere; }
.fm-preview-side figure { min-width:0; margin:0; }
.fm-preview-side figcaption { margin-bottom:3px; font-size:.8rem; }
.fm-preview-side .fm-chart { margin:0; }
.fm-preview-side button { margin-top:auto; font-size:.82rem; }
.fm-preview-side button[aria-pressed=true] { background:#91e1e3; }
.fm-preview-wave { width:100%; background:#0e202a; border-radius:4px; }
.fm-preview-wave line { stroke:#55727e; }
.fm-preview-wave text { fill:#e3eff1; font:12px var(--mono,monospace); }
.fm-preview-wave path { fill:none; stroke-width:2; }
.fm-wave-bars { stroke:#a3eadf; }
.fm-wave-gray { stroke:#ffcf8b; stroke-dasharray:5 3; }
.fm-preview-edit { padding:8px 10px 10px; border-top:1px solid #59717d; }
.fm-preview-edit p { margin:0 0 6px; font-size:.86rem; }
.fm-preview-live-use { color:#d6ceb4; }
.fm-preview-edit .fm-buttons { gap:5px; }
.fm-preview-edit .fm-buttons button { font-size:.8rem; }
@media(max-width:700px) { .fm-preview-controls { top:-7px; } }
@media(max-width:445px) {
  .fm-dialog-bar h3 { font-size:.91rem; }
  .fm-dialog-bar #fm-preview-return { font-size:.8rem; padding-inline:5px; }
  .fm-dialog-bar .fm-buttons { flex-wrap:nowrap; gap:4px; }
  .fm-preview-side { padding:6px; }
  .fm-preview-side button { padding-inline:4px; }
  .fm-preview-side-head { min-height:6em; }
}

.fm-preview-values { width:100%; table-layout:fixed; border-collapse:collapse; font-size:.82rem; line-height:1.5; }
.fm-preview-values :is(th,td) { padding:5px 7px; vertical-align:top; border-top:1px solid #476572; text-align:left; overflow-wrap:anywhere; }
.fm-preview-values th:first-child { width:28%; }
.fm-preview-values thead th { background:#284653; }
.fm-preview-values td[data-changed=true] { background:#34434a; color:#ffe2ac; }
@media(max-width:445px) {
  .fm-preview-values :is(th,td) { padding:5px 4px; font-size:.77rem; }
}

.fm-pattern-row { display:flex; }
.fm-pattern-row i { flex:1 1 0; }
.fm-chart[data-pattern=smpte] { grid-template-rows:minmax(27px,5fr) minmax(8px,1fr) minmax(14px,2fr) 21px; }
.fm-chart[data-pattern=ramp] { grid-template-rows:minmax(44px,1fr) 21px; }
.fm-ramp { background:linear-gradient(90deg,#000,#fff); }
.fm-ramp i { visibility:hidden; }
.fm-chart[data-pattern=disable] { grid-template-rows:1fr; background:#132533; }
.fm-no-picture { align-self:center; text-align:center; color:#cad9e0; font-size:.83rem; }
.fm-stage-preview > figure { margin-top:10px; }

.fm-preview-jumps { flex:1 1 100%; }
.fm-preview-jumps:empty { display:none; }
.fm-preview-jumps button { min-height:38px; }
.fm-preview-frame-controls { max-width:420px; }
.fm-console .fm-preview-frame-controls label { grid-template-columns:minmax(0,1fr) auto; gap:0 8px; margin-bottom:0; }
.fm-preview-frame-controls input { grid-column:1 / -1; accent-color:#9de7e4; }
.fm-preview-frame-controls output { font:600 .86rem var(--mono,monospace); }
