/* Context simulator, rules, and approvals. Shares the studio theme tokens. */
.wf-page {
  --wf-control: var(--input, var(--panel));
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}
.wf-header,
.wf-toolbar,
.wf-panel-head,
.wf-panel-footer,
.wf-match-top,
.wf-rule-head,
.wf-rule-footer,
.wf-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.wf-header { min-width: 0; }
.wf-header .compact-heading { min-width: 0; }
.wf-header .compact-heading h1 { margin-bottom: 20px; }
.wf-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.wf-tabs > a,
.wf-tabs > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 37px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}
.wf-tabs > a:hover,
.wf-tabs > button:hover { color: var(--text); background: var(--panel); }
.wf-tabs > .active {
  color: var(--accent-text);
  border-color: var(--edge);
  background: var(--soft-violet);
}
.wf-tabs svg { width: 15px; height: 15px; flex-shrink: 0; }
.wf-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}
.wf-tabs > .active .wf-tab-count { color: var(--accent-text); }
.wf-toolbar { flex-wrap: wrap; margin-bottom: 18px; }
.wf-toolbar > div { min-width: 0; }
.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 18px; align-items: start; }
.wf-panel,
.wf-queue-detail { min-width: 0; padding: 24px; }
.wf-panel-head { margin-bottom: 19px; }
.wf-panel-head h3,
.wf-rule-head h3 { font-size: 14px; font-weight: 500; letter-spacing: -.25px; }
.wf-panel-head svg { flex-shrink: 0; }
.wf-muted { color: var(--muted); font-size: 11px; line-height: 1.6; }
.wf-scenario-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.wf-scenario {
  min-height: 33px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--wf-control);
  font-size: 10px;
  line-height: 1.4;
}
.wf-scenario:hover { border-color: var(--accent-text); color: var(--text); }
.wf-scenario.active { color: var(--accent-text); border-color: var(--accent-text); background: var(--soft-violet); }
.wf-form .form-label { margin-top: 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.wf-form .form-label:first-child { margin-top: 0; }
.wf-form input:not([type=checkbox]):not([type=radio]),
.wf-form select,
.wf-form textarea,
.wf-context-overrides select,
.wf-builder select,
.wf-builder input:not([type=checkbox]):not([type=radio]),
.wf-builder textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--wf-control, var(--panel));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}
.wf-form input::placeholder,
.wf-form textarea::placeholder,
.wf-builder input::placeholder,
.wf-builder textarea::placeholder { color: var(--muted); }
.wf-form input:focus,
.wf-form select:focus,
.wf-form textarea:focus,
.wf-context-overrides select:focus,
.wf-builder select:focus,
.wf-builder input:focus,
.wf-builder textarea:focus { border-color: var(--accent-text); }
.wf-form select option,
.wf-context-overrides select option,
.wf-builder select option { background: var(--panel-solid); color: var(--text); }
.wf-message-body { min-height: 190px !important; resize: vertical; }
.wf-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.wf-field-row > .form-label { margin-top: 15px !important; }
.wf-panel-footer { margin-top: 20px; }
.wf-panel-footer .button { flex-shrink: 0; }
.wf-context-row { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.wf-context-row:last-child { border-bottom: 0; }
.wf-context-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
}
.wf-context-icon svg { width: 15px; height: 15px; }
.wf-context-copy { min-width: 0; flex: 1; }
.wf-context-copy strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.wf-context-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.wf-section-label { margin: 20px 0 10px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.5; letter-spacing: 1px; text-transform: uppercase; }
.wf-match { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--wf-control); }
.wf-match + .wf-match { margin-top: 10px; }
.wf-match-top { align-items: flex-start; gap: 10px; }
.wf-match-top strong { font-size: 12px; font-weight: 500; }
.wf-mini-icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); }
.wf-mini-icon svg { width: 15px; height: 15px; }
.wf-action-line { display: flex; align-items: center; gap: 8px; margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.wf-action-line svg { width: 14px; height: 14px; flex-shrink: 0; }
.wf-result-footer { margin-top: 20px; }
.wf-result-footer .button { width: 100%; justify-content: center; }
.wf-empty { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 250px; padding: 30px 20px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.7; }
.wf-empty > svg { width: 32px; height: 32px; opacity: .65; }
.wf-empty strong { color: var(--text); font-size: 13px; font-weight: 500; }
.wf-empty p { max-width: 310px; }
.wf-notice { display: flex; align-items: flex-start; gap: 8px; margin-top: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--wf-control); color: var(--muted); font-size: 11px; line-height: 1.6; }
.wf-notice svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.wf-notice.warning { border-color: rgba(173, 141, 81, .28); background: rgba(184, 146, 79, .065); color: #9c7f4b; }
[data-theme=dark] .wf-notice.warning { color: #c8b17f; border-color: rgba(200, 177, 127, .23); }
.wf-context-overrides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.wf-context-overrides label { color: var(--muted); font-size: 10px; line-height: 1.5; }
.wf-rule-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.wf-rule-card { min-width: 0; padding: 20px; }
.wf-rule-head { margin-bottom: 16px; }
.wf-rule-head > div { min-width: 0; }
.wf-rule-head > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.wf-rule-head strong { font-size: 13px; font-weight: 500; }
.wf-rule-chain { display: flex; align-items: stretch; gap: 10px; }
.wf-chain-item { min-width: 0; flex: 1; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--wf-control); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.wf-chain-item strong { font-size: 11px; font-weight: 500; }
.wf-chain-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; letter-spacing: .85px; text-transform: uppercase; }
.wf-rule-chain > svg { align-self: center; width: 13px; height: 13px; flex-shrink: 0; color: var(--muted); }
.wf-rule-footer { flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.wf-rule-footer > div { display: flex; align-items: center; gap: 8px; }
.wf-builder { display: grid; gap: 14px; }
.wf-builder-row { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 14px; }
.wf-builder-label { padding-top: 19px; color: var(--muted); font-size: 10px; line-height: 1.5; letter-spacing: .75px; text-transform: uppercase; }
.wf-builder-condition { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.wf-builder .form-label { margin-top: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.wf-queue-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.wf-queue-list { min-width: 0; overflow: hidden; }
.wf-queue-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 18px; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; }
.wf-queue-row:last-child { border-bottom: 0; }
.wf-queue-row:hover { background: var(--panel); }
.wf-queue-row.selected { background: var(--soft-violet); }
.wf-queue-copy { min-width: 0; flex: 1; }
.wf-queue-copy strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
.wf-queue-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.wf-queue-check { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; accent-color: var(--accent-text); }
.wf-queue-check svg { width: 16px; height: 16px; }
.wf-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--panel); font-size: 9px; line-height: 1.4; white-space: nowrap; }
.wf-status.pending { border-color: rgba(173, 141, 81, .23); color: #a08551; background: rgba(184, 146, 79, .06); }
.wf-status.approved { border-color: transparent; color: var(--mint-text); background: var(--mint); }
.wf-status.rejected { color: var(--muted); background: var(--wf-control); }
[data-theme=dark] .wf-status.pending { color: #c8b17f; border-color: rgba(200, 177, 127, .23); }
.wf-status svg { width: 11px; height: 11px; }
.wf-detail-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; margin: 18px 0; }
.wf-detail-meta > div { min-width: 0; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.wf-detail-meta label,
.wf-detail-meta small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.wf-detail-meta strong { font-size: 11px; font-weight: 500; }
.wf-context-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 15px 0; }
.wf-context-chips > span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--edge); border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 9px; line-height: 1.5; }
.wf-context-chips svg { width: 12px; height: 12px; flex-shrink: 0; }
.wf-draft-surface { width: 100%; min-height: 165px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--wf-control); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 12px; line-height: 1.8; }
textarea.wf-draft-surface { display: block; resize: vertical; }
.wf-draft-surface:focus { border-color: var(--accent-text); }
.wf-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.wf-detail-actions .button { min-height: 36px; }
.wf-bulk-bar { flex-wrap: wrap; margin-bottom: 14px; padding: 12px; border: 1px solid var(--edge); border-radius: 11px; background: var(--soft-violet); font-size: 11px; }
.wf-bulk-bar > div { display: flex; align-items: center; gap: 8px; }
.wf-search { display: flex; align-items: center; gap: 8px; min-width: 180px; min-height: 37px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--wf-control); }
.wf-search svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--muted); }
.wf-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 12px; }
.wf-search input::placeholder { color: var(--muted); }
.wf-search:focus-within { border-color: var(--accent-text); }
.wf-decision-note { margin-top: 13px; color: var(--muted); font-size: 10px; line-height: 1.7; }

@media (min-width: 1200px) {
  .wf-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); }
}
@media (max-width: 960px) {
  .wf-layout,
  .wf-queue-layout { grid-template-columns: minmax(0, 1fr); }
  .wf-queue-list { max-height: 390px; overflow-y: auto; }
  .wf-header { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .wf-header { align-items: flex-start; gap: 10px; }
  .wf-header > .button { margin: 0 0 15px; }
  .wf-tabs { flex-wrap: nowrap; gap: 4px; margin-bottom: 18px; padding-bottom: 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .wf-tabs > a,
  .wf-tabs > button { flex-shrink: 0; padding: 8px 10px; font-size: 11px; }
  .wf-toolbar { align-items: stretch; gap: 10px; }
  .wf-toolbar .segmented { max-width: 100%; overflow-x: auto; }
  .wf-search { width: 100%; }
  .wf-layout,
  .wf-queue-layout { gap: 13px; }
  .wf-panel,
  .wf-queue-detail,
  .wf-rule-card { padding: 18px; }
  .wf-panel-head { margin-bottom: 16px; }
  .wf-field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wf-context-overrides { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wf-message-body { min-height: 170px !important; }
  .wf-panel-footer { flex-wrap: wrap; gap: 12px; }
  .wf-panel-footer > .button { margin-left: auto; }
  .wf-rule-head { align-items: flex-start; gap: 10px; }
  .wf-rule-chain { flex-direction: column; gap: 7px; }
  .wf-rule-chain > svg { transform: rotate(90deg); }
  .wf-rule-footer { align-items: flex-start; gap: 12px; }
  .wf-rule-footer > div { flex-wrap: wrap; }
  .wf-builder-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .wf-builder-label { padding-top: 4px; }
  .wf-builder-condition { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wf-queue-row { padding: 16px; gap: 10px; }
  .wf-queue-row > .wf-status { font-size: 8px; padding: 4px 5px; }
  .wf-detail-meta { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wf-draft-surface { padding: 15px; }
  .wf-detail-actions .button { flex: 1; justify-content: center; }
  .wf-bulk-bar { gap: 10px; }
  .wf-bulk-bar > div { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .wf-tabs > a,
  .wf-tabs > button { transition: none; }
}

/* Shared view details. */
.dock-count{position:absolute;right:1px;top:1px;min-width:13px;height:13px;display:grid;place-items:center;padding:0 3px;border:1px solid var(--panel-solid);border-radius:5px;background:var(--accent-text);color:var(--bg);font-size:7px;line-height:1}.dock-count[hidden]{display:none}.wf-text-button{display:inline-flex;align-items:center;gap:5px;color:var(--accent-text);font-size:10px;white-space:nowrap}.wf-text-button svg{width:11px;height:11px}.wf-action-line .wf-text-button{margin-left:auto}.wf-analysis-steps{display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:17px;font-size:9px;color:var(--muted)}.wf-rule-title{display:flex;gap:12px;align-items:center}.wf-rule-title small{display:block;font-size:9px;color:var(--muted);margin-top:4px}.wf-chain-arrow{display:grid;place-items:center;color:var(--muted2)}.wf-chain-arrow svg{width:13px;height:13px}.wf-section-label{display:flex;align-items:center;justify-content:space-between;gap:10px}.wf-section-label .wf-text-button{letter-spacing:0;text-transform:none}.wf-queue-list-head{display:flex;justify-content:space-between;align-items:center;padding:17px 18px;border-bottom:1px solid var(--line)}.wf-queue-list-head h3{font-size:12px}.wf-select-all{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:9px;cursor:pointer}.wf-select-all input{accent-color:var(--accent-text)}.wf-queue-item{display:flex;align-items:flex-start;gap:12px;flex:1;text-align:left;min-width:0;padding:0}.wf-detail-title{font-size:19px;line-height:1.4;font-weight:500;margin:8px 0 20px}.wf-detail-meta>div>span{display:block;color:var(--muted);font-size:9px;margin-bottom:4px}.wf-detail-meta strong{display:block}.wf-source-rule{display:flex;align-items:center;gap:7px;margin-top:14px;font-size:10px;color:var(--muted)}.wf-source-rule svg{width:12px;height:12px}.wf-rule-options{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--muted);gap:12px;margin-top:7px}.wf-rule-options label,.wf-rule-options span{display:flex;align-items:center;gap:7px}.wf-rule-options input{accent-color:var(--accent-text)}.wf-rule-options svg{width:13px;height:13px}.wf-result-footer>.wf-muted{display:block;margin-bottom:11px}.wf-notice{flex-wrap:wrap}.wf-notice p{flex-basis:100%}.wf-notice a{color:var(--accent-text);font-size:10px}.wf-notice a svg{width:11px;height:11px}.wf-queue-list .wf-empty{min-height:240px}.wf-status.neutral{color:var(--muted)}
@media(min-width:1200px){.wf-rule-list{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-rule-card .wf-rule-chain{gap:5px}.wf-rule-card .wf-chain-item{padding:11px}.wf-rule-card .wf-rule-head h3{font-size:13px}}
@media(max-width:700px){.wf-page .compact-heading h1{font-size:27px;letter-spacing:-1px}.wf-rule-chain .wf-chain-arrow{rotate:90deg}.wf-analysis-steps{font-size:8px}.wf-rule-options{flex-wrap:wrap}.wf-action-line{flex-wrap:wrap}.wf-queue-row .wf-status{font-size:8px}.wf-queue-item{gap:7px}.wf-bulk-bar>span{font-size:10px}}
@media(max-width:700px){.wf-page .wf-header{flex-direction:row;align-items:center;flex-wrap:wrap;gap:10px}.wf-page .wf-header>.button{margin:0}.wf-page .wf-header>.wf-muted{margin-left:auto}.wf-page .wf-header h1{margin:0}}

/* Readable workflow details and controls; page-title sizing stays unchanged. */
.wf-tabs > a,
.wf-tabs > button { font-size: 13px; }
.wf-tab-count { font-size: 11px; }
.wf-panel-head h3 { font-size: 18px; line-height: 1.35; }
.wf-rule-head h3,
.wf-rule-card .wf-rule-head h3 { font-size: 16px; line-height: 1.4; }
.wf-muted { font-size: 12px; line-height: 1.6; }
.wf-scenario { font-size: 12px; }
.wf-form .form-label,
.wf-builder .form-label,
.wf-context-overrides label { font-size: 12px; line-height: 1.5; }
.wf-form input:not([type=checkbox]):not([type=radio]),
.wf-form select,
.wf-form textarea,
.wf-context-overrides select,
.wf-builder select,
.wf-builder input:not([type=checkbox]):not([type=radio]),
.wf-builder textarea { font-size: 14px; line-height: 1.55; }
.wf-context-copy strong { font-size: 14px; line-height: 1.45; }
.wf-context-copy small { font-size: 12px; line-height: 1.6; }
.wf-section-label { font-size: 11px; line-height: 1.5; letter-spacing: .7px; }
.wf-match-top strong { font-size: 14px; line-height: 1.45; }
.wf-action-line { font-size: 12px; line-height: 1.5; }
.wf-text-button,
.wf-notice a { font-size: 12px; line-height: 1.5; }
.wf-empty { font-size: 13px; line-height: 1.65; }
.wf-empty strong { font-size: 14px; }
.wf-notice { font-size: 12px; line-height: 1.6; }
.wf-rule-head strong { font-size: 14px; }
.wf-rule-title small { font-size: 12px; line-height: 1.5; }
.wf-chain-item,
.wf-chain-item strong { font-size: 13px; line-height: 1.5; }
.wf-chain-label { font-size: 10px; line-height: 1.5; letter-spacing: .6px; }
.wf-rule-footer,
.wf-rule-options { font-size: 12px; line-height: 1.5; }
.wf-builder-label { font-size: 11px; line-height: 1.5; }
.wf-queue-list-head h3 { font-size: 16px; line-height: 1.4; }
.wf-select-all { font-size: 12px; }
.wf-queue-copy strong { font-size: 14px; line-height: 1.45; }
.wf-queue-copy small { font-size: 12px; line-height: 1.5; }
.wf-status,
.wf-queue-row .wf-status { font-size: 11px; line-height: 1.4; }
.wf-detail-title { font-size: 20px; line-height: 1.4; }
.wf-detail-meta > div { font-size: 13px; line-height: 1.55; }
.wf-detail-meta label,
.wf-detail-meta small,
.wf-detail-meta > div > span { font-size: 12px; line-height: 1.5; }
.wf-detail-meta strong { font-size: 13px; line-height: 1.5; }
.wf-context-chips > span { font-size: 11px; line-height: 1.5; }
.wf-draft-surface { font-size: 14px; line-height: 1.75; }
.wf-source-rule { font-size: 12px; line-height: 1.5; }
.wf-source-rule > span { min-width: 0; overflow-wrap: anywhere; }
.wf-bulk-bar,
.wf-bulk-bar > span { font-size: 12px; line-height: 1.5; }
.wf-search input { font-size: 13px; }
.wf-decision-note { font-size: 12px; line-height: 1.6; }
.wf-analysis-steps { font-size: 11px; line-height: 1.5; }
@media (max-width: 700px) {
  .wf-tabs > a,
  .wf-tabs > button { font-size: 12px; }
  .wf-queue-item { flex-wrap: wrap; row-gap: 9px; }
  .wf-queue-item > .wf-queue-copy { flex-basis: calc(100% - 43px); }
  .wf-section-label { flex-wrap: wrap; }
}
