/* A check is one continuous task: request, analysis, then the report. */
body.workspace-ui[data-section="aml-deposits"] .workspace-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}
body.workspace-ui:not([data-section="aml-deposits"]) #workspace-new-check { display: none; }
body.workspace-ui #workspace-new-check { flex: 0 0 auto; }
body.workspace-ui #workspace-new-check svg { width: 16px; height: 16px; margin-right: 6px; }
body.workspace-ui .checks-workspace { display: grid; gap: 24px; min-width: 0; }
body.workspace-ui .checks-workspace > .card { margin: 0; min-width: 0; }
body.workspace-ui .checks-deposit-history { border-top: 1px solid var(--internal-line); padding-top: 18px; }
body.workspace-ui .checks-deposit-history > summary { width: fit-content; padding: 8px 0; color: var(--internal-muted); font-size: 14px; cursor: pointer; }
body.workspace-ui .checks-deposit-history[open] > summary { margin-bottom: 12px; }
body.workspace-ui #wallet-check-form .form-control:disabled,
body.workspace-ui #wallet-check-form .form-select:disabled { color: #44535c; background-color: #f3f6f7; opacity: 1; }
body.workspace-ui #wallet-check-result { scroll-margin-top: 90px; outline: none; }
body.workspace-ui #wallet-check-result:focus-visible { outline: 2px solid #547128; outline-offset: 4px; }
body.workspace-ui .check-flow { border-top: 1px solid var(--internal-line); padding-top: 26px; }
body.workspace-ui .check-flow-header { display: flex; align-items: center; gap: 20px; min-width: 0; }
body.workspace-ui .check-chain-logo { width: 68px; height: 68px; flex: 0 0 68px; overflow: visible; color: #4d6f24; }
body.workspace-ui .check-chain-left,
body.workspace-ui .check-chain-right { transform-box: fill-box; transform-origin: center; }
body.workspace-ui .check-flow:is([data-phase="submitting"], [data-phase="queued"], [data-phase="analyzing"], [data-phase="enriching"]) .check-chain-left {
    animation: chainy-link-left 2.4s cubic-bezier(.45, 0, .2, 1) infinite;
}
body.workspace-ui .check-flow:is([data-phase="submitting"], [data-phase="queued"], [data-phase="analyzing"], [data-phase="enriching"]) .check-chain-right {
    animation: chainy-link-right 2.4s cubic-bezier(.45, 0, .2, 1) infinite;
}
body.workspace-ui .check-flow:is([data-phase="failed"], [data-phase="partial"], [data-phase="unknown"], [data-phase="paused"]) .check-chain-logo { color: #745417; }
body.workspace-ui .check-flow-title { margin: 0 0 6px; font-family: inherit; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; color: var(--internal-ink); }
body.workspace-ui .check-flow-description { margin: 0; max-width: 65ch; font-size: 14px; line-height: 1.6; color: var(--internal-muted); }
body.workspace-ui .check-flow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 28px 0 20px; list-style: none; counter-reset: check-step; }
body.workspace-ui .check-flow-steps > li { position: relative; counter-increment: check-step; display: flex; align-items: center; gap: 10px; border-top: 2px solid #dce3e6; padding-top: 14px; color: #65727a; font-size: 13px; line-height: 1.45; }
body.workspace-ui .check-flow-steps > li::before { content: counter(check-step); display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid #a8b3b9; border-radius: 50%; font-size: 11px; font-weight: 600; }
body.workspace-ui .check-flow-steps > li[data-state="done"] { border-color: #658d35; color: #354e21; }
body.workspace-ui .check-flow-steps > li[data-state="done"]::before { content: "✓"; border-color: #658d35; background: #ecf4df; }
body.workspace-ui .check-flow-steps > li[data-state="current"] { border-color: #769d43; color: #263d13; font-weight: 600; }
body.workspace-ui .check-flow-steps > li[data-state="current"]::before { background: #b4dc55; border-color: #7b9d3e; }
body.workspace-ui .check-flow-steps > li[data-state="failed"] { border-color: #b77d25; color: #745417; }
body.workspace-ui .check-flow-steps > li[data-state="failed"]::before { content: "!"; border-color: #b77d25; background: #fff5df; }
body.workspace-ui .check-flow-notice { color: #745417; background: #fff8e9; border-left: 3px solid #b77d25; border-radius: 0 5px 5px 0; padding: 12px 14px; margin-top: 16px; font-size: 14px; line-height: 1.6; }
body.workspace-ui .check-flow-notice:empty { display: none; }
body.workspace-ui .check-flow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
body.workspace-ui .check-flow-actions:empty { display: none; }
body.workspace-ui .check-report { margin-top: 26px; border-top: 1px solid var(--internal-line); }
body.workspace-ui .check-report-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 24px 0; }
body.workspace-ui .check-report-score { display: block; font-family: inherit; font-size: 44px; font-weight: 600; line-height: 1.05; letter-spacing: -.045em; color: var(--internal-ink); font-variant-numeric: tabular-nums; }
body.workspace-ui .check-report-score small,
body.workspace-ui .check-report-score span { font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--internal-muted); }
body.workspace-ui .check-report-score[data-available="false"] { font-size: 20px; line-height: 1.4; letter-spacing: -.02em; }
body.workspace-ui .check-report-score strong { font-weight: inherit; }
body.workspace-ui .check-report-verdict { display: inline-flex; align-items: center; width: fit-content; padding: 5px 10px; border: 1px solid var(--internal-line); border-radius: 4px; font-size: 13px; font-weight: 600; line-height: 1.4; color: #384851; background: #f3f6f7; }
body.workspace-ui .check-report-verdict[data-level="clean"],
body.workspace-ui .check-report-verdict[data-level="low"] { background: #edf5e5; border-color: #b6cba6; color: #355523; }
body.workspace-ui .check-report-verdict[data-level="moderate"] { background: #fff4dd; border-color: #d6bc85; color: #715019; }
body.workspace-ui .check-report-verdict[data-level="elevated"],
body.workspace-ui .check-report-verdict[data-level="critical"] { background: #fff0ed; border-color: #dab2a7; color: #8c3826; }
body.workspace-ui .check-report-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; padding: 0 0 0 24px; margin: 0; border-left: 1px solid var(--internal-line); font-size: 13px; min-width: 0; }
body.workspace-ui .check-report-meta dt { font-weight: 400; color: var(--internal-muted); }
body.workspace-ui .check-report-meta dd { margin: 0; overflow-wrap: anywhere; }
body.workspace-ui .check-report-section { padding: 18px 0; border-top: 1px solid var(--internal-line); }
body.workspace-ui .check-report-section > summary { display: list-item; padding: 5px 0; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--internal-ink); }
body.workspace-ui .check-report-section[open] > summary { margin-bottom: 14px; }
body.workspace-ui .check-report-section h3,
body.workspace-ui .check-report-section h4 { font-family: inherit; font-size: 15px; font-weight: 600; margin: 0 0 14px; letter-spacing: 0; }
body.workspace-ui .check-report-section p { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
body.workspace-ui .check-report-table { width: 100%; font-size: 13px; border-collapse: collapse; }
body.workspace-ui .check-report-table th { padding: 10px 12px; background: #f3f6f7; text-align: left; color: #53616a; font-weight: 500; font-size: 12px; }
body.workspace-ui .check-report-table td { padding: 12px; border-bottom: 1px solid var(--internal-line); overflow-wrap: anywhere; vertical-align: top; }
body.workspace-ui .check-report-table th:first-child,
body.workspace-ui .check-report-table td:first-child { padding-left: 0; }
body.workspace-ui .check-report-table code { color: inherit; font-size: 12px; }
body.workspace-ui #manual-checks-table td:nth-child(4) { max-width: 360px; overflow-wrap: anywhere; white-space: normal; }
body.workspace-ui #manual-checks-table .check-child-row td:first-child { padding-left: 28px; }
body.workspace-ui [data-check-open] { white-space: nowrap; }
@keyframes chainy-link-left {
    0%, 12%, 100% { transform: translate(-5px, -3px) rotate(-7deg); }
    40%, 72% { transform: translate(0, 0) rotate(0); }
}
@keyframes chainy-link-right {
    0%, 12%, 100% { transform: translate(5px, 3px) rotate(7deg); }
    40%, 72% { transform: translate(0, 0) rotate(0); }
}
@media (max-width: 650px) {
    body.workspace-ui[data-section="aml-deposits"] .workspace-intro { flex-wrap: wrap; gap: 14px; }
    body.workspace-ui .checks-workspace { gap: 20px; }
    body.workspace-ui .check-flow { padding-top: 22px; }
    body.workspace-ui .check-flow-header { align-items: flex-start; gap: 14px; }
    body.workspace-ui .check-chain-logo { width: 48px; height: 48px; flex-basis: 48px; }
    body.workspace-ui .check-flow-title { font-size: 18px; }
    body.workspace-ui .check-flow-description { font-size: 13px; }
    body.workspace-ui .check-flow-steps { grid-template-columns: 1fr; gap: 0; margin: 22px 0 14px; }
    body.workspace-ui .check-flow-steps > li { border-top: 0; padding: 8px 0; font-size: 13px; }
    body.workspace-ui .check-report-summary { gap: 16px; }
    body.workspace-ui .check-report-score { font-size: 36px; }
    body.workspace-ui .check-report-meta { grid-template-columns: 1fr; gap: 4px; flex-basis: 100%; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--internal-line); }
    body.workspace-ui .check-report-meta dd { margin-bottom: 8px; }
    body.workspace-ui .check-report-table th,
    body.workspace-ui .check-report-table td { padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    body.workspace-ui .check-chain-left,
    body.workspace-ui .check-chain-right { animation: none !important; transform: none; }
}
