/* Carbon White replica, scoped to the example. No Carbon runtime or component CSS.
   Reference: Obscura web/src/styles/app.css document view and Carbon button styles.
   https://carbondesignsystem.com/components/button/style/ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
.workflow-demo {
 --demo-blue: #0f62fe; --demo-text: #161616; --demo-secondary: #525252;
 --demo-layer: #f4f4f4; --demo-border: #e0e0e0;
 overflow: hidden; border: 1px solid #8d8d8d; border-radius: 0; background: white;
 color: var(--demo-text); font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
 font-size: 14px; font-weight: 400; line-height: 1.4; box-shadow: none; scroll-margin-top: 90px;
}
.workflow-demo button, .workflow-demo textarea { font-family: inherit; }
.demo-appbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 16px; padding: 8px 16px; border-bottom: 1px solid var(--demo-border); background: white; }
.demo-app-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; }
.demo-app-brand small { font-size: inherit; color: #525252; }
.demo-sandbox { padding: 2px 8px; background: #e0e0e0; color: #161616; font-size: 11px; white-space: nowrap; }
.demo-workspace { padding: 0 16px 16px; }
.demo-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-inline: -16px; padding: 4px 16px; min-height: 40px; background: var(--demo-layer); font-size: 12px; color: var(--demo-secondary); }
.demo-heading > span { color: #0043ce; }
.demo-reset { min-height: 32px; padding: 4px 8px; color: #0f62fe; font-size: 12px; cursor: pointer; }
.demo-reset:hover { background: #e0e0e0; }
.demo-record-heading { padding-block: 16px; }
.demo-document-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.demo-document-code { font: 400 11px 'IBM Plex Mono', monospace; color: var(--demo-secondary); }
.demo-document-code b { margin-left: 8px; font-weight: 400; }
.demo-status { padding: 2px 8px; border-radius: 12px; background: #e0e0e0; color: #161616; font-size: 12px; }
[data-phase="1"] .demo-status { color: #491d8b; background: #e8daff; }
[data-phase="2"] .demo-status, [data-phase="3"] .demo-status { color: #044317; background: #a7f0ba; }
.demo-record-heading h2 { margin-top: 8px; font-size: 22px; font-weight: 400; line-height: 1.25; letter-spacing: 0; }
.demo-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.demo-tab { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border-top: 3px solid transparent; border-right: 1px solid #8d8d8d; background: #e0e0e0; color: #525252; text-align: left; font-size: 12px; font-weight: 400; cursor: pointer; }
.demo-tab:last-child { border-right: 0; }
.demo-tab > b { font: 400 10px 'IBM Plex Mono', monospace; }
.demo-tab:hover:not(:disabled) { background: #cacaca; }
.demo-tab[aria-selected=true] { border-top-color: #0f62fe; background: #f4f4f4; color: #161616; font-weight: 600; }
.demo-tab.is-complete > b { color: #0e6027; }
.demo-tab:disabled { color: #6f6f6f; cursor: default; }
.demo-record-body { display: grid; grid-template-columns: .85fr 1.15fr; align-items: stretch; gap: 16px; }
.demo-document { min-width: 0; padding: 0 16px 16px; border: 1px solid var(--demo-border); background: white; }
.demo-preview-bar { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-inline: -16px; padding: 6px 12px; border-bottom: 1px solid var(--demo-border); background: var(--demo-layer); font-size: 11px; color: #525252; }
.demo-preview-bar > span:last-child { margin-left: auto; font: 400 10px 'IBM Plex Mono', monospace; }
.demo-document h3 { margin-top: 24px; padding-top: 8px; border-top: 2px solid #0f62fe; font-size: 15px; font-weight: 600; line-height: 1.3; }
.demo-document-type { margin-top: 8px; color: var(--demo-secondary); font-size: 10px; }
.demo-paper-lines { display: grid; gap: 6px; margin-block: 16px; }
.demo-paper-lines i { height: 3px; background: #e0e0e0; }
.demo-paper-lines i:last-child { width: 72%; }
.demo-scope > span { color: #525252; font-size: 11px; font-weight: 500; }
.demo-scope p { margin-top: 6px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.demo-task { display: flex; flex-direction: column; min-width: 0; min-height: 264px; padding: 16px; background: #f4f4f4; }
.demo-role { display: flex; gap: 8px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--demo-border); color: #525252; font-size: 12px; }
.demo-role strong { display: block; color: #161616; font-weight: 600; }
.demo-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: #393939; color: white; font: 400 10px 'IBM Plex Mono', monospace; }
.demo-state { display: flex; flex: 1; flex-direction: column; gap: 16px; padding-top: 16px; }
.demo-state > p { font-size: 13px; line-height: 1.5; }
.demo-field { display: grid; gap: 8px; color: #525252; font-size: 12px; }
.demo-field textarea { width: 100%; resize: vertical; min-height: 80px; max-height: 140px; padding: 10px 12px; border: 0; border-bottom: 1px solid #8d8d8d; border-radius: 0; background: white; color: #161616; font-size: 14px; line-height: 1.4; }
.demo-field textarea:disabled { color: #6f6f6f; background: #e0e0e0; border-color: transparent; }
.demo-actions { display: none; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.is-interactive .demo-actions { display: flex; }
.demo-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1 1 112px; min-height: 40px; padding: 10px 12px; border: 1px solid transparent; border-radius: 0; background: #0f62fe; color: white; text-align: left; font-size: 13px; font-weight: 400; line-height: 1.4; cursor: pointer; }
.demo-button svg { flex-shrink: 0; margin-left: auto; }
.demo-button:hover { background: #0353e9; }
.demo-button:active { background: #002d9c; }
.demo-button:disabled { background: #c6c6c6; color: #525252; cursor: wait; }
.demo-button-secondary { color: #da1e28; border-color: #da1e28; background: transparent; }
.demo-button-secondary:hover { background: #b81921; border-color: #b81921; color: white; }
.demo-resume { flex: 0 0 auto; width: 100%; margin-top: 16px; }
.demo-feedback { padding: 12px; border-left: 3px solid #da1e28; background: #fff1f1; color: #750e13; }
.demo-signature-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 12px; border-top: 1px solid #c6c6c6; }
.demo-signature-label { color: #525252; font-size: 10px; }
.demo-signature { width: 180px; max-width: 100%; height: 50px; color: #0043ce; }
.demo-signature path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-signed .demo-signature path { stroke-dashoffset: 0; animation: demo-sign .85s ease-out both; }
.demo-signature-box strong { display: block; font-size: 11px; font-weight: 400; color: #525252; }
.demo-signed-seal { display: flex; align-items: center; gap: 6px; font-size: 16px; color: #0e6027; }
.demo-signed-seal small { font-size: 11px; }
.demo-archive { display: flex; align-items: flex-start; gap: 8px; }
.demo-archive > svg { flex: 0 0 20px; width: 20px; height: 20px; color: #0f62fe; }
.demo-archive strong { font-size: 14px; font-weight: 600; }
.demo-archive p { margin-top: 8px; font: 400 10px/1.5 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
.demo-activity { margin-top: 16px; background: #f4f4f4; }
.demo-activity-heading { display: flex; justify-content: space-between; padding: 8px 12px; background: #e0e0e0; font-size: 12px; color: #161616; }
.demo-activity-heading strong { font-weight: 600; }
.demo-activity ol { max-height: 68px; overflow-y: auto; font-size: 11px; color: #525252; line-height: 1.5; }
.demo-activity li { display: flex; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #c6c6c6; }
.demo-activity li::before { content: '✓'; color: #0e6027; }
.demo-activity li[data-event="reject"]::before { content: '×'; color: #da1e28; }
.demo-activity .is-archived { max-height: 136px; }
.demo-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; border-top: 1px solid #e0e0e0; font-size: 10px; color: #525252; }
.demo-caption a { display: inline-flex; min-height: 32px; align-items: center; color: #0f62fe; font-size: 12px; }
.demo-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.workflow-demo [hidden] { display: none !important; }
.workflow-demo :focus-visible { outline: 2px solid #0f62fe; outline-offset: -2px; }
.workflow-demo .demo-button:focus-visible { outline-offset: 2px; box-shadow: inset 0 0 0 1px white; }
@keyframes demo-sign { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (min-width: 801px) and (max-width: 1100px), (max-width: 519px) {
 .demo-record-body { grid-template-columns: 1fr; }
 .demo-task { min-height: 0; }
 .demo-document h3 { margin-top: 16px; }
 .demo-role { padding-bottom: 12px; }
 .demo-role strong { display: inline; }
 .demo-state { gap: 12px; padding-top: 12px; }
 .demo-field textarea { min-height: 60px; }
}
@media (max-width: 519px) {
 .demo-workspace { padding-inline: 12px; }
 .demo-appbar { padding-inline: 12px; gap: 8px; }
 .demo-heading { margin-inline: -12px; padding-inline: 12px; font-size: 11px; }
 .demo-record-heading h2 { font-size: 20px; }
 .demo-tab { padding-inline: 8px; gap: 6px; font-size: 11px; }
 .demo-tab > b { display: none; }
 .demo-field textarea { font-size: 16px; }
 .demo-caption { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .is-signed .demo-signature path { animation: none; } }
