/* The workflow studio extends the existing Praxiell palette and typography. */
.workflow-studio {
  --ws-border: rgba(167, 211, 187, .3);
  --ws-subtle: #c4d9cb;
  --ws-surface: #123f38;
  --ws-alert: #efd6a4;
  position: relative;
  isolation: isolate;
  color: var(--parchment, #f4f0e7);
  background: var(--pine, #174f46);
}
.workflow-studio .section-index { color: var(--mint, #a7d3bb); }
.ws-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 46px;
}
.ws-heading h2 { margin-bottom: 0; }
.ws-heading h2 em { color: var(--mint, #a7d3bb); font-style: normal; }
.ws-heading > p { max-width: 405px; justify-self: end; margin: 0 0 5px; color: var(--ws-subtle); font-size: 15px; line-height: 1.85; }
.ws-console { border-top: 1px solid var(--ws-border); }
.ws-console-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; }
.ws-demo-label { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0; font-size: 10px; letter-spacing: .085em; color: #d2e3d7; }
.ws-demo-label > span:first-child { width: 6px; height: 6px; background: var(--mint, #a7d3bb); border-radius: 50%; }
.ws-label-divider { color: #8fb4a1; padding-inline: 2px; }
.ws-path-label { color: var(--mint, #a7d3bb); font-size: 11px; white-space: nowrap; }
.workflow-studio[data-ws-exception="true"] .ws-path-label { color: var(--ws-alert); }
.ws-controls { display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.ws-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border: 1px solid var(--ws-border); min-width: 0; width: min(100%, 650px); }
.ws-tabs button { border: 0; border-radius: 0; min-height: 48px; padding: 11px 17px; background: transparent; color: #d6e7dc; font-size: 12px; line-height: 1.45; transition: color .2s, background .2s; }
.ws-tabs button:hover { background: rgba(167, 211, 187, .09); }
.ws-tabs button[aria-selected="true"] { color: #153f35; background: var(--mint, #a7d3bb); }
.ws-tabs button:focus-visible, .ws-step-list button:focus-visible, .ws-actions button:focus-visible, .ws-use:focus-visible, .ws-toggle input:focus-visible { outline: 2px solid #e3c88c; outline-offset: 5px; }
.ws-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; margin: 0; font-size: 11px; cursor: pointer; min-height: 44px; color: #e0eae1; }
.ws-toggle input { appearance: none; -webkit-appearance: none; width: 38px; height: 23px; min-width: 38px; margin: 0; border: 1px solid #88ad99; border-radius: 20px; background: #224f43; position: relative; cursor: pointer; transition: border-color .2s, background .2s; }
.ws-toggle input::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; top: 3px; left: 3px; background: #c4d9cb; transition: transform .2s, background .2s; }
.ws-toggle input:checked { background: #6e613e; border-color: #cfb77f; }
.ws-toggle input:checked::after { background: #f3deb3; transform: translateX(15px); }
.ws-panel { outline: none; }
.ws-panel:focus-visible { outline: 2px solid #e3c88c; outline-offset: 6px; }
.ws-steps { position: relative; padding: 31px 0 23px; }
.ws-step-track { position: absolute; top: 52px; left: 10%; right: 10%; height: 1px; background: #5f8a76; }
.ws-step-track > span { display: block; width: 0; height: 100%; background: #c0e2cd; transition: width .55s cubic-bezier(.22, .61, .36, 1); }
.ws-step-list { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.ws-step-list li { min-width: 0; }
.ws-step-list button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 11px; min-height: 75px; width: 100%; padding: 0 5px; color: #c4d9cb; background: transparent; border: 0; font-size: 11px; line-height: 1.5; letter-spacing: .02em; }
.ws-step-number { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #7ba38e; border-radius: 50%; background: var(--pine, #174f46); font-size: 10px; font-variant-numeric: tabular-nums; transition: background .25s, color .25s, border-color .25s, box-shadow .25s; }
.ws-step-list button:hover .ws-step-number { border-color: #cee6d4; box-shadow: 0 0 0 4px rgba(167, 211, 187, .08); }
.ws-step-list button[data-done="true"] .ws-step-number { background: #245e4e; border-color: var(--mint, #a7d3bb); color: #e0f0e5; }
.ws-step-list button[aria-pressed="true"] { color: #f2f5e9; }
.ws-step-list button[aria-pressed="true"] .ws-step-number { color: #123f35; background: var(--mint, #a7d3bb); border-color: var(--mint, #a7d3bb); box-shadow: 0 0 0 5px rgba(167, 211, 187, .08); }
.workflow-studio[data-ws-exception="true"] .ws-step-list button[data-ws-step="2"][aria-pressed="true"] .ws-step-number { background: var(--ws-alert); border-color: var(--ws-alert); color: #443b27; }
.ws-workbench { display: grid; grid-template-columns: minmax(0, .96fr) 35px minmax(0, 1.04fr); gap: clamp(20px, 2.4vw, 38px); align-items: center; background: var(--ws-surface); padding: clamp(22px, 3.2vw, 45px); border: 1px solid var(--ws-border); }
.ws-input, .ws-detail { min-width: 0; }
.ws-pane-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 28px; margin-bottom: 18px; color: #abc8b7; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.ws-document-code { color: #d0dfd5; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: .05em; }
.ws-document { background: var(--parchment, #f4f0e7); color: var(--pine, #174f46); padding: clamp(24px, 3vw, 39px); box-shadow: 0 15px 30px rgba(4, 27, 21, .15); }
.ws-document-top { display: flex; align-items: center; gap: 12px; color: #566e5e; margin-bottom: 25px; font-size: 8px; letter-spacing: .15em; }
.ws-document-top svg { color: #557864; flex-shrink: 0; }
.ws-document h3 { font-size: clamp(24px, 2.35vw, 32px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.04em; }
.ws-document-description { font-size: 12px; line-height: 1.75; color: #5b7164; margin: 0 0 25px; min-height: 42px; max-width: 320px; }
.ws-fields, .ws-evidence { margin: 0; }
.ws-fields > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; padding: 13px 0; border-top: 1px solid #ccd3c6; font-size: 11px; line-height: 1.5; }
.ws-fields dt { color: #596c5e; }
.ws-fields dd { margin: 0; text-align: right; color: #244c3f; overflow-wrap: anywhere; }
.ws-fields > div[data-missing="true"] dd { color: #8a592a; font-weight: 700; }
.ws-document-condition { display: flex; align-items: center; gap: 9px; padding-top: 17px; margin: 0; border-top: 1px solid #ccd3c6; color: #4d6d58; font-size: 10px; line-height: 1.6; }
.ws-document-condition > span:first-child { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: #638b6e; }
.workflow-studio[data-ws-exception="true"] .ws-document-condition { color: #87582b; }
.workflow-studio[data-ws-exception="true"] .ws-document-condition > span:first-child { background: #9d692c; }
.ws-transfer { display: grid; place-items: center; color: var(--mint, #a7d3bb); }
.ws-detail { align-self: start; }
.ws-state { padding: 5px 8px; border: 1px solid #577e69; color: #cce3d2; letter-spacing: .025em; text-transform: none; font-size: 9px; line-height: 1.4; white-space: nowrap; }
.ws-state[data-tone="review"] { border-color: #a49766; color: var(--ws-alert); }
.ws-detail h3 { min-height: 68px; margin: 20px 0 15px; font-size: clamp(25px, 2.5vw, 35px); line-height: 1.24; letter-spacing: -.035em; color: #f1f0e5; }
.ws-step-description { min-height: 78px; margin: 0 0 24px; font-size: 13px; line-height: 1.85; color: #c4d9cb; max-width: 430px; }
.ws-evidence > div { display: grid; grid-template-columns: minmax(85px, .42fr) minmax(0, 1fr); gap: 20px; padding: 13px 0; border-top: 1px solid #436e5b; font-size: 11px; line-height: 1.65; }
.ws-evidence dt { color: #91b6a1; }
.ws-evidence dd { margin: 0; color: #e5eee4; overflow-wrap: anywhere; }
.ws-outcome { display: flex; align-items: flex-start; gap: 12px; margin-top: 19px; padding-top: 18px; border-top: 1px solid #436e5b; }
.ws-outcome > span { flex-shrink: 0; color: var(--mint, #a7d3bb); font-size: 19px; line-height: 1.25; }
.ws-outcome p { margin: 0; color: #c8dfce; font-size: 11px; line-height: 1.8; }
.ws-actions { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 25px 0 21px; }
.ws-playback { display: flex; align-items: center; gap: 18px; }
.ws-run, .ws-reset { min-height: 47px; border-radius: 0; padding: 12px 20px; font-size: 11px; line-height: 1.5; }
.ws-run { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-width: 142px; color: #153f35; border: 1px solid var(--mint, #a7d3bb); background: var(--mint, #a7d3bb); font-weight: 700; transition: background .2s, border-color .2s, transform .2s; }
.ws-run:hover { background: #c0e2cd; border-color: #c0e2cd; transform: translateY(-1px); }
.ws-run-icon { display: block; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; }
.workflow-studio[data-ws-running="true"] .ws-run-icon { width: 6px; height: 9px; border: 0; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.ws-reset { border: 1px solid transparent; background: transparent; color: #c7ddcd; padding-inline: 5px; }
.ws-reset:hover { color: #f4f3e9; }
.ws-inspect-hint { color: #a7c7b4; font-size: 10px; }
.ws-use { display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; flex-shrink: 0; min-height: 44px; font-size: 12px; color: #e9efdf; border-bottom: 1px solid #8cae95; }
.ws-use > span { color: var(--mint, #a7d3bb); font-size: 19px; transition: transform .2s; }
.ws-use:hover > span { transform: translate(2px, -2px); }
.ws-disclosure { color: #9fbda8; margin: 0; padding-top: 14px; border-top: 1px solid var(--ws-border); font-size: 10px; line-height: 1.8; }
.ws-noscript { color: #d4e1d4; font-size: 12px; margin-top: 16px; }
.ws-sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0, 0, 0, 0)!important; white-space: nowrap!important; border: 0!important; }
@media (max-width: 1050px) {
  .ws-controls { gap: 22px; }
  .ws-tabs button { padding-inline: 12px; font-size: 11px; }
  .ws-toggle { font-size: 10px; gap: 9px; }
  .ws-workbench { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); gap: 20px; padding: 25px; }
  .ws-document { padding: 27px; }
  .ws-document h3 { font-size: 26px; }
  .ws-detail h3 { font-size: 29px; }
  .ws-step-description { min-height: 95px; font-size: 12px; }
  .ws-fields > div, .ws-evidence > div { font-size: 10px; gap: 15px; }
  .ws-inspect-hint { display: none; }
}
@media (max-width: 800px) {
  .ws-heading { gap: 35px; grid-template-columns: 1fr 1fr; }
  .ws-heading > p { font-size: 13px; }
  .ws-controls { flex-wrap: wrap; gap: 9px; }
  .ws-tabs { width: 100%; }
  .ws-tabs button { font-size: 12px; }
  .ws-toggle { margin-left: auto; }
  .ws-workbench { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 26px; align-items: start; }
  .ws-transfer { display: none; }
  .ws-document { padding: 23px; }
  .ws-fields > div { grid-template-columns: 1fr; gap: 5px; padding-block: 11px; }
  .ws-fields dd { text-align: left; }
  .ws-document-description { min-height: 60px; }
  .ws-detail h3 { font-size: 28px; min-height: 93px; }
  .ws-step-description { min-height: 118px; }
  .ws-evidence > div { grid-template-columns: 1fr; gap: 5px; padding-block: 11px; }
}
@media (max-width: 640px) {
  .ws-heading { grid-template-columns: 1fr; gap: 21px; margin-bottom: 31px; }
  .ws-heading h2 { font-size: 40px; }
  .ws-heading > p { justify-self: start; max-width: 400px; margin-bottom: 0; font-size: 14px; }
  .ws-console-top { gap: 14px; padding: 21px 0; align-items: flex-start; }
  .ws-demo-label { font-size: 8px; gap: 6px; letter-spacing: .04em; }
  .ws-path-label { font-size: 9px; }
  .ws-tab-break { display: block; }
  .ws-tabs button { font-size: 11px; padding: 11px 5px; min-height: 57px; }
  .ws-toggle { min-height: 46px; font-size: 11px; }
  .ws-steps { padding-top: 15px; padding-bottom: 19px; }
  .ws-step-track { top: 32px; }
  .ws-step-list button { min-height: 65px; font-size: 10px; gap: 10px; padding-inline: 3px; }
  .ws-step-number { width: 35px; height: 35px; font-size: 9px; }
  .ws-step-list button[aria-pressed="true"] .ws-step-number { box-shadow: 0 0 0 3px rgba(167, 211, 187, .08); }
  .ws-workbench { grid-template-columns: 1fr; padding: 22px; gap: 29px; }
  .ws-pane-heading { font-size: 8px; margin-bottom: 15px; gap: 10px; }
  .ws-document { padding: 27px; }
  .ws-document-top { margin-bottom: 20px; }
  .ws-document h3 { font-size: 28px; }
  .ws-document-description { min-height: 0; margin-bottom: 21px; font-size: 12px; }
  .ws-fields > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 17px; padding-block: 12px; font-size: 10px; }
  .ws-fields dd { text-align: right; }
  .ws-document-condition { font-size: 9px; }
  .ws-detail { border-top: 1px solid var(--ws-border); padding-top: 22px; }
  .ws-detail h3 { min-height: 0; font-size: 29px; max-width: 400px; margin-top: 15px; }
  .ws-step-description { min-height: 0; font-size: 13px; margin-bottom: 22px; }
  .ws-evidence > div { grid-template-columns: minmax(75px, .45fr) minmax(0, 1fr); gap: 17px; padding-block: 12px; font-size: 11px; }
  .ws-outcome { margin-top: 11px; }
  .ws-outcome p { font-size: 11px; }
  .ws-actions { flex-wrap: wrap; align-items: start; gap: 14px; padding: 23px 0 20px; }
  .ws-playback { gap: 20px; }
  .ws-run { min-width: 140px; }
  .ws-use { font-size: 11px; gap: 20px; }
  .ws-disclosure { font-size: 9px; line-height: 1.9; }
}
@media (max-width: 380px) {
  .ws-heading h2 { font-size: 36px; }
  .ws-demo-label { gap: 5px; font-size: 7px; }
  .ws-workbench { padding: 18px; }
  .ws-document { padding: 21px; }
  .ws-fields > div { gap: 14px; }
  .ws-pane-heading { font-size: 7px; }
  .ws-state { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .workflow-studio *, .workflow-studio *::before, .workflow-studio *::after { transition: none!important; animation: none!important; }
}
