:root {
    --page: #f4f6f5;
    --surface: #ffffff;
    --surface-muted: #f8faf9;
    --ink: #1e2927;
    --ink-muted: #63706d;
    --line: #d9e0de;
    --line-strong: #bdc9c6;
    --primary: #087f73;
    --primary-hover: #06685f;
    --primary-soft: #e7f5f2;
    --secondary: #315f8c;
    --secondary-soft: #eaf1f8;
    --accent: #b75d09;
    --accent-soft: #fff0df;
    --danger: #b4232c;
    --danger-soft: #fcebed;
    --success: #227447;
    --success-soft: #e8f5ed;
    --warning: #9a6508;
    --warning-soft: #fff7dd;
    --on-primary: #ffffff;
    --on-success: #ffffff;
    --on-danger: #ffffff;
    --console: #202826;
    --console-ink: #d9e5e1;
    --focus: #2a7ec1;
    --shadow: 0 8px 24px rgba(30, 41, 39, 0.07);
    --topbar: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    --page: #141918;
    --surface: #1d2422;
    --surface-muted: #252d2b;
    --ink: #edf3f1;
    --ink-muted: #a9b6b2;
    --line: #394441;
    --line-strong: #53615d;
    --primary: #4fc3b4;
    --primary-hover: #77d7ca;
    --primary-soft: #173f39;
    --secondary: #81acd3;
    --secondary-soft: #20364a;
    --accent: #efa756;
    --accent-soft: #4a321b;
    --danger: #ff858d;
    --danger-soft: #4b2529;
    --success: #6bce91;
    --success-soft: #213e2c;
    --warning: #e8bd5c;
    --warning-soft: #45391c;
    --on-primary: #102724;
    --on-success: #10251a;
    --on-danger: #321417;
    --console: #0e1312;
    --console-ink: #d9e5e1;
    --focus: #78b9ed;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    --topbar: rgba(29, 36, 34, 0.96);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
}

html[data-i18n-pending="true"] .preference-dock,
html[data-i18n-pending="true"] .app-shell,
html[data-i18n-pending="true"] .login-shell {
    visibility: hidden;
}

i[data-lucide] {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
}

.brand-mark i[data-lucide] {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
}

.button i[data-lucide] {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.icon-button i[data-lucide] {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

button,
select {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    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;
}

.app-shell {
    min-height: calc(100vh - 51px);
}

.login-shell {
    display: grid;
    min-height: calc(100vh - 51px);
    place-items: center;
    padding: 32px 20px;
    background: var(--page);
}

.login-panel {
    width: min(100%, 430px);
    padding: 28px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--primary);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.login-brand h1 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.login-intro {
    margin: 20px 0 22px;
    color: var(--ink-muted);
    font-size: 13px;
}

.login-form {
    display: grid;
    gap: 15px;
}

.login-submit {
    width: 100%;
    margin-top: 5px;
}

.login-error {
    margin: 16px 0 0;
}

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--topbar);
    backdrop-filter: blur(12px);
}

.brand-block {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.brand-block h1,
.section-heading h2,
.workflow-header h2,
.monitor-header h2 {
    margin: 0;
    color: var(--ink);
    font-weight: 680;
    letter-spacing: 0;
}

.brand-block h1 {
    font-size: 18px;
    line-height: 1.25;
}

.brand-block p {
    margin: 3px 0 0;
    color: var(--ink-muted);
    font-size: 12px;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid #b8ded8;
    border-radius: 6px;
    color: var(--primary);
    background: var(--primary-soft);
}

.brand-mark svg {
    width: 21px;
    height: 21px;
}

.topbar-status {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.status-badge,
.context-chip,
.token-label {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 620;
}

.status-badge {
    padding: 4px 10px;
    border: 1px solid var(--line);
    color: var(--ink-muted);
    background: var(--surface-muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #8c9996;
}

.status-success {
    border-color: #b8d8c5;
    color: var(--success);
    background: var(--success-soft);
}

.status-success .status-dot {
    background: var(--success);
}

.status-warning {
    border-color: #ead59c;
    color: var(--warning);
    background: var(--warning-soft);
}

.status-warning .status-dot {
    background: var(--warning);
}

.status-danger {
    border-color: #e8bcc0;
    color: var(--danger);
    background: var(--danger-soft);
}

.status-danger .status-dot {
    background: var(--danger);
}

.icon-button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-muted);
    background: var(--surface);
    transition: border-color 130ms ease, color 130ms ease, background 130ms ease;
}

.icon-button:hover:not(:disabled) {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--surface-muted);
}

.icon-button svg {
    width: 17px;
    height: 17px;
}

.icon-button-small {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
}

.icon-button-input {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-left: 0;
    border-radius: 0 5px 5px 0;
}

.setup-band {
    padding: 22px 28px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.section-heading,
.workflow-header,
.monitor-header,
.operation-heading,
.line-editor-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2,
.workflow-header h2,
.monitor-header h2 {
    font-size: 16px;
    line-height: 1.3;
}

.section-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 720;
    text-transform: uppercase;
}

.configuration-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 13px 14px;
    align-items: end;
}

.field {
    min-width: 0;
}

.field-wide {
    grid-column: span 2;
}

.field-full {
    grid-column: 1 / -1;
}

.field-grow {
    flex: 1 1 280px;
}

.field label,
.field-label {
    display: block;
    margin: 0 0 6px;
    color: #44514e;
    font-size: 12px;
    font-weight: 650;
}

.segmented-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.segmented-field legend {
    margin: 0 0 6px;
    padding: 0;
    color: #44514e;
    font-size: 12px;
    font-weight: 650;
}

.segmented-control {
    display: grid;
    height: 38px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: var(--surface-muted);
}

.segmented-control label {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.segmented-control label + label {
    border-left: 1px solid var(--line-strong);
}

.segmented-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.segmented-control span {
    display: grid;
    height: 36px;
    place-items: center;
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 650;
}

.segmented-control input:checked + span {
    color: var(--primary);
    background: var(--primary-soft);
}

.segmented-control input:focus-visible + span {
    box-shadow: inset 0 0 0 2px var(--focus);
}

.optional {
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 450;
}

.field input,
.field select {
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    outline: 0;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 130ms ease, box-shadow 130ms ease;
}

.field input::placeholder {
    color: #919c99;
}

.field input:focus,
.field select:focus,
.button:focus-visible,
.icon-button:focus-visible,
.step:focus-visible,
.system-tab:focus-visible,
.trace-item:focus-visible {
    border-color: var(--focus);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(42, 126, 193, 0.16);
}

.field input:user-invalid {
    border-color: var(--danger);
}

.input-with-icon {
    position: relative;
}

.input-with-icon > svg {
    position: absolute;
    z-index: 1;
    top: 11px;
    left: 10px;
    width: 16px;
    height: 16px;
    color: #7b8885;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 34px;
}

.input-action {
    display: flex;
}

.input-action input {
    border-radius: 5px 0 0 5px;
}

.form-command {
    display: flex;
    grid-column: -3 / -1;
    align-items: flex-end;
    justify-content: flex-end;
}

.login-command {
    grid-column: span 1;
}

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 670;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 130ms ease, border-color 130ms ease, color 130ms ease, transform 130ms ease;
}

.button:active:not(:disabled) {
    transform: translateY(1px);
}

.button svg {
    width: 16px;
    height: 16px;
}

.button-primary {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

.button-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.button-secondary {
    color: var(--secondary);
    background: var(--secondary-soft);
    border-color: #bfd1e2;
}

.button-secondary:hover:not(:disabled) {
    color: #244b72;
    border-color: #91b2d0;
    background: #dce9f5;
}

.button-accent {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.button-accent:hover:not(:disabled) {
    border-color: #d99a54;
    background: #ffe4c5;
}

.button-danger {
    color: var(--on-danger);
    background: var(--danger);
    border-color: var(--danger);
}

.button-danger:hover:not(:disabled) {
    background: #951b23;
    border-color: #951b23;
}

.button-quiet {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.button-quiet:hover:not(:disabled) {
    border-color: var(--line-strong);
    background: var(--surface-muted);
}

.button-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.target-access-row {
    display: grid;
    grid-template-columns: minmax(420px, 1.4fr) minmax(330px, 0.8fr);
    gap: 18px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.inline-form {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    gap: 10px;
}

.wallet-balance-strip {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.wallet-balance-heading,
.wallet-balance-title {
    display: flex;
    min-width: 0;
    align-items: center;
}

.wallet-balance-heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.wallet-balance-heading h3 {
    font-size: 14px;
    line-height: 1.35;
}

.evidence-context {
    max-width: min(52vw, 520px);
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-balance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.wallet-balance-item {
    min-width: 0;
    padding: 12px 14px;
}

.wallet-balance-item + .wallet-balance-item {
    border-left: 1px solid var(--line);
}

.wallet-balance-title {
    gap: 8px;
}

.wallet-balance-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 5px;
    color: var(--primary);
    background: var(--primary-soft);
}

.wallet-balance-icon svg {
    width: 15px;
    height: 15px;
}

.wallet-balance-title strong {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13px;
}

.wallet-availability {
    flex: 0 0 auto;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 680;
}

.wallet-availability.is-available {
    color: var(--success);
}

.wallet-balance-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 0;
}

.wallet-balance-values div {
    min-width: 0;
}

.wallet-balance-values dt {
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 650;
    text-transform: uppercase;
}

.wallet-balance-values dd {
    min-width: 0;
    margin: 2px 0 0;
}

.wallet-balance-values output {
    display: block;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 720;
    overflow-wrap: anywhere;
}

.system-tabs {
    display: flex;
    height: 52px;
    align-items: stretch;
    gap: 4px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.system-tab {
    position: relative;
    display: inline-flex;
    min-width: 150px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--ink-muted);
    background: transparent;
    font-weight: 680;
}

.system-tab svg {
    width: 17px;
    height: 17px;
}

.system-tab:hover {
    color: var(--ink);
    background: var(--surface-muted);
}

.system-tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    align-items: start;
    gap: 22px;
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

.workflow-column,
.monitor-column,
.workflow-view {
    min-width: 0;
}

.workflow-header {
    min-height: 43px;
    margin-bottom: 14px;
}

.custom-sale-view-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.custom-sale-view-tab {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 0;
    border-radius: 6px;
    color: var(--ink-muted);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 720;
    cursor: pointer;
}

.custom-sale-view-tab:hover {
    color: var(--ink);
    background: var(--surface);
}

.custom-sale-view-tab.is-active {
    color: var(--primary);
    background: var(--surface);
    box-shadow: 0 1px 5px rgba(30, 41, 39, 0.08);
}

.custom-sale-view-tab:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.custom-sale-tracking-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.custom-sale-tracking-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.custom-sale-tracking-header h3 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
}

.custom-sale-tracking-header p {
    max-width: 720px;
    margin: 5px 0 0;
    color: var(--ink-muted);
    font-size: 12px;
}

.tracking-source-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--success);
    background: var(--success-soft);
    font-size: 11px;
    font-weight: 720;
    white-space: nowrap;
}

.tracking-source-badge.is-limited {
    color: var(--warning);
    background: var(--warning-soft);
}

.custom-sale-tracking-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    margin-top: 16px;
}

.custom-sale-auto-refresh {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.custom-sale-auto-refresh input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.custom-sale-tracking-state {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 6px;
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 12px;
}

.tracking-state-indicator {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--ink-muted);
}

.custom-sale-tracking-state.is-loading .tracking-state-indicator {
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.custom-sale-tracking-state.is-success .tracking-state-indicator {
    background: var(--success);
}

.custom-sale-tracking-state.is-error .tracking-state-indicator {
    background: var(--danger);
}

.custom-sale-tracking-warning {
    margin-top: 12px;
}

.context-chip {
    max-width: 320px;
    min-height: 30px;
    padding: 5px 11px;
    overflow: hidden;
    border: 1px solid var(--line);
    color: var(--ink-muted);
    background: var(--surface);
    text-overflow: ellipsis;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(7, minmax(88px, 1fr));
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px 6px 0 0;
    background: var(--surface-muted);
    scrollbar-width: thin;
}

.custom-stepper {
    grid-template-columns: repeat(8, minmax(78px, 1fr));
}

.step {
    position: relative;
    display: grid;
    min-width: 88px;
    min-height: 70px;
    grid-template-rows: 26px auto;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 8px 6px;
    border: 0;
    border-right: 1px solid var(--line);
    color: var(--ink-muted);
    background: transparent;
    font-size: 11px;
    font-weight: 650;
}

.step:last-child {
    border-right: 0;
}

.step:hover {
    color: var(--ink);
    background: var(--surface-muted);
}

.step.is-active {
    color: var(--primary);
    background: var(--primary-soft);
    box-shadow: inset 0 -3px 0 var(--primary);
}

.step.is-complete .step-index {
    color: var(--on-success);
    border-color: var(--success);
    background: var(--success);
}

.step.is-error .step-index {
    color: var(--on-danger);
    border-color: var(--danger);
    background: var(--danger);
}

.step-branch {
    background: var(--surface-muted);
}

.step-index {
    display: inline-grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
}

.step-index svg {
    width: 13px;
    height: 13px;
}

.step-state {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.step.is-complete .step-state {
    background: var(--success);
}

.step.is-error .step-state {
    background: var(--danger);
}

.operation-surface {
    min-height: 410px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.operation-panel {
    padding: 20px;
}

.operation-heading {
    min-height: 34px;
    margin-bottom: 20px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.operation-heading > div:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.operation-heading h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 680;
}

.operation-number {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 5px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 11px;
    font-weight: 750;
}

.token-label {
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid;
}

.token-label svg {
    width: 13px;
    height: 13px;
}

.token-mobile {
    color: var(--secondary);
    border-color: #c2d5e7;
    background: var(--secondary-soft);
}

.token-admin {
    color: var(--warning);
    border-color: var(--warning);
    background: var(--warning-soft);
}

.compact-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px 14px;
}

.field-context {
    min-width: 0;
    padding: 9px 10px 10px;
    border: 1px dashed var(--line);
    border-radius: 4px;
    background: var(--surface-muted);
}

.workflow-context-input {
    min-width: 0;
    font-family: "IBM Plex Mono", Consolas, monospace;
}

.operation-command {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.inline-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: -5px 0 18px;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 590;
}

.inline-alert svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.inline-alert-warning {
    color: #704a08;
    border-color: #e9cf8c;
    background: var(--warning-soft);
}

.inline-alert-error {
    color: #842029;
    border-color: #e5b7bb;
    background: var(--danger-soft);
}

.session-error {
    margin: 14px 0 0;
}

.order-editor {
    min-width: 0;
}

.line-editor-heading {
    margin-top: 20px;
    padding: 13px 0 10px;
    border-top: 1px solid var(--line);
}

.line-editor-heading .field-label {
    margin: 0;
}

.line-editor-heading strong {
    display: block;
    margin-top: 2px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 550;
}

.line-list {
    display: grid;
    gap: 10px;
}

.line-row {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 14px 42px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.line-row legend {
    padding: 0 5px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
}

.line-remove {
    position: absolute;
    top: 10px;
    right: 9px;
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    color: var(--danger);
    background: var(--surface);
}

.line-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px 12px;
}

.workflow-evidence {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line-strong);
}

.evidence-heading,
.evidence-block-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.evidence-heading {
    margin-bottom: 16px;
}

.evidence-heading h3 {
    font-size: 15px;
    line-height: 1.35;
}

.evidence-block + .evidence-block {
    margin-top: 18px;
}

.evidence-block-heading {
    margin-bottom: 7px;
}

.evidence-block-heading h4 {
    font-size: 13px;
    line-height: 1.35;
}

.evidence-block-heading > span {
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 650;
}

.evidence-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    scrollbar-width: thin;
}

.evidence-table-scroll:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.evidence-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: 12px;
}

.evidence-table th,
.evidence-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.evidence-table tr:last-child td {
    border-bottom: 0;
}

.evidence-table th {
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 11px;
    font-weight: 760;
    text-transform: uppercase;
    white-space: nowrap;
}

.evidence-table td {
    max-width: 260px;
    overflow-wrap: anywhere;
}

.evidence-table tbody tr:nth-child(even):not(.evidence-empty-row) {
    background: var(--surface-muted);
}

.evidence-table tbody tr:not(.evidence-empty-row):hover {
    background: var(--primary-soft);
}

.root-order-table tbody tr:not(.evidence-empty-row) {
    box-shadow: inset 3px 0 0 var(--primary);
}

.evidence-table code {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-table .numeric-cell {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.evidence-empty-row td {
    padding: 18px 12px;
    color: var(--ink-muted);
    text-align: center;
}

.order-identity-cell {
    width: 30%;
    min-width: 220px;
}

.order-identity-cell > span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-bonus-cell {
    min-width: 120px;
    font-variant-numeric: tabular-nums;
}

.order-bonus-cell span {
    display: block;
    white-space: nowrap;
}

.order-bonus-cell span + span {
    margin-top: 3px;
    color: var(--ink-muted);
    font-size: 11px;
}

.order-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 720;
    white-space: nowrap;
}

.order-state::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink-muted);
    content: "";
}

.order-state.is-active {
    color: var(--success);
}

.order-state.is-active::before {
    background: var(--success);
}

.order-state.is-inactive {
    color: var(--danger);
}

.order-state.is-inactive::before {
    background: var(--danger);
}

.verification-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sale-story {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
}

.sale-story.is-incorrect {
    border-color: #d76f76;
    box-shadow: inset 4px 0 0 var(--danger);
}

.sale-story-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.sale-story.is-incorrect .sale-story-header {
    background: var(--danger-soft);
}

.sale-story-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.sale-story-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 5px;
    color: var(--primary);
    background: var(--primary-soft);
}

.sale-story.is-incorrect .sale-story-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.sale-story-icon svg {
    width: 18px;
    height: 18px;
}

.sale-story-identity > div {
    min-width: 0;
}

.sale-story-identity > div > span {
    display: block;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 720;
    text-transform: uppercase;
}

.sale-story-identity h5 {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.35;
}

.sale-story-status {
    display: grid;
    min-width: 300px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid var(--line);
    background: var(--line);
}

.story-status-item {
    min-width: 0;
    padding: 7px 9px;
    background: var(--surface);
}

.story-status-item dt {
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 720;
    text-transform: uppercase;
}

.story-status-item dd {
    margin: 2px 0 0;
    overflow: hidden;
    font-size: 11px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-status-item.is-stage dd {
    color: var(--secondary);
}

.story-status-item.is-correct dd {
    color: var(--success);
}

.story-status-item.is-incorrect dd {
    color: var(--danger);
}

.sale-story-timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.verification-history-item,
.verification-empty {
    position: relative;
    min-width: 0;
    border-bottom: 1px solid var(--line);
}

.sale-story-timeline .verification-history-item:last-child,
.verification-empty:last-child {
    border-bottom: 0;
}

.sale-story-timeline .verification-history-item::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 27px;
    width: 2px;
    background: var(--line-strong);
    content: "";
}

.sale-story-timeline .verification-history-item:first-child::before {
    top: 31px;
}

.sale-story-timeline .verification-history-item:last-child::before {
    bottom: calc(100% - 31px);
}

.sale-story-timeline .verification-history-item:only-child::before {
    display: none;
}

.verification-empty {
    display: flex;
    padding: 16px 14px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-muted);
    font-size: 11px;
}

.verification-empty svg {
    width: 15px;
    height: 15px;
}

.operation-verification summary {
    list-style: none;
}

.operation-verification summary::-webkit-details-marker {
    display: none;
}

.operation-verification-summary {
    display: grid;
    min-width: 0;
    min-height: 62px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 11px;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
}

.verification-history-item.is-current {
    box-shadow: inset 3px 0 0 var(--primary);
}

.verification-history-item.is-current.is-fail {
    box-shadow: inset 4px 0 0 var(--danger);
}

.verification-history-item.is-superseded:not(.is-fail) .operation-verification-summary {
    background: var(--surface-muted);
}

.verification-history-item.is-superseded:not(.is-fail) .operation-result-icon {
    color: var(--ink-muted);
    background: var(--surface-muted);
}

.operation-verification-summary:hover {
    background: var(--surface-muted);
}

.operation-verification-summary:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.verification-history-item.is-fail {
    box-shadow: inset 4px 0 0 var(--danger);
}

.verification-history-item.is-fail .operation-verification-summary {
    background: var(--danger-soft);
}

.verification-history-item.is-fail .operation-verification-summary:hover {
    background: var(--danger-soft);
}

.operation-result-icon {
    position: relative;
    z-index: 1;
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 5px;
    color: var(--success);
    background: var(--success-soft);
}

.verification-history-item.is-fail .operation-result-icon {
    color: var(--on-danger);
    background: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

.operation-result-icon svg {
    width: 18px;
    height: 18px;
}

.operation-history-copy {
    min-width: 0;
}

.operation-history-copy strong,
.operation-history-copy span,
.operation-history-outcome strong,
.operation-history-outcome span {
    display: block;
}

.operation-history-copy strong {
    font-size: 13px;
}

.operation-lifecycle-state {
    display: block;
    margin-top: 2px;
    color: var(--primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 720;
}

.verification-history-item.is-superseded .operation-lifecycle-state {
    color: var(--ink-muted);
}

.operation-history-copy span {
    margin-top: 3px;
    overflow: hidden;
    color: var(--ink-muted);
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operation-history-outcome {
    min-width: 132px;
    text-align: right;
}

.operation-history-outcome strong {
    color: var(--success);
    font-size: 12px;
    text-transform: uppercase;
}

.verification-history-item.is-fail .operation-history-outcome strong {
    color: var(--danger);
}

.operation-history-outcome span {
    margin-top: 3px;
    color: var(--ink-muted);
    font-size: 11px;
    white-space: nowrap;
}

.operation-history-chevron {
    width: 16px;
    height: 16px;
    color: var(--ink-muted);
    transition: transform 140ms ease;
}

.operation-verification[open] .operation-history-chevron {
    transform: rotate(180deg);
}

.operation-verification-details {
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--surface-muted);
}

.upstream-outcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 650;
}

.upstream-outcome-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
}

.upstream-outcome-chip::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.upstream-outcome-chip.is-success {
    color: var(--success);
    background: var(--success-soft);
}

.upstream-outcome-chip.is-error {
    color: var(--danger);
    background: var(--danger-soft);
}

.upstream-problem {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    padding: 11px 12px;
    border-left: 4px solid var(--warning);
    color: var(--warning);
    background: var(--warning-soft);
}

.upstream-problem.is-error {
    border-left-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}

.upstream-problem svg {
    width: 18px;
    height: 18px;
}

.upstream-problem strong {
    font-size: 12px;
}

.upstream-problem p {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: 11px;
}

.operation-history-metadata {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 12px;
    border: 1px solid var(--line);
    background: var(--line);
}

.operation-history-metadata > div {
    min-width: 0;
    padding: 8px 9px;
    background: var(--surface);
}

.operation-history-metadata dt {
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.operation-history-metadata dd {
    margin: 3px 0 0;
    overflow: hidden;
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-exchange-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid #485552;
    border-radius: 5px;
    background: #485552;
}

.history-exchange {
    min-width: 0;
    background: var(--console);
}

.history-exchange h5 {
    margin: 0;
    padding: 8px 10px;
    color: var(--console-ink);
    background: #2a3431;
    font-size: 11px;
}

.history-exchange pre {
    min-height: 130px;
    max-height: 280px;
    margin: 0;
    padding: 11px;
    overflow: auto;
    color: var(--console-ink);
    background: var(--console);
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.history-exchange pre:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.operation-checks {
    margin-top: 13px;
}

.operation-checks-heading,
.operation-check-title {
    display: flex;
    min-width: 0;
    align-items: center;
}

.operation-checks-heading {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.operation-checks-heading h5 {
    margin: 0;
    font-size: 12px;
}

.operation-checks-heading span {
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 650;
}

.operation-check-list {
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    list-style: none;
}

.operation-check-item,
.operation-check-empty {
    padding: 10px 11px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.operation-check-item:last-child,
.operation-check-empty:last-child {
    border-bottom: 0;
}

.operation-check-item.is-fail {
    border-left: 4px solid var(--danger);
    background: var(--danger-soft);
}

.operation-check-title {
    gap: 8px;
}

.operation-check-title svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.operation-check-title strong {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.operation-check-title span {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 760;
    text-transform: uppercase;
}

.operation-check-item.is-pass .operation-check-title {
    color: var(--success);
}

.operation-check-item.is-fail .operation-check-title {
    color: var(--danger);
}

.operation-check-item.is-neutral .operation-check-title {
    color: var(--ink-muted);
}

.operation-check-empty {
    color: var(--ink-muted);
    font-size: 11px;
}

.verification-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 8px 0 0 22px;
}

.verification-values div {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
}

.verification-values dt {
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 650;
}

.verification-values dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
}

.verification-message {
    margin: 7px 0 0 22px;
    color: var(--ink-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.history-messages {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 4px solid var(--warning);
    color: var(--warning);
    background: var(--warning-soft);
}

.history-messages.is-error {
    border-left-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}

.history-messages h5 {
    margin: 0;
    font-size: 11px;
}

.history-messages ul {
    margin: 5px 0 0;
    padding-left: 18px;
    font-size: 11px;
}

[data-verification-summary].is-error {
    color: var(--danger);
    font-weight: 760;
}

.monitor-column {
    position: sticky;
    top: 92px;
    max-height: calc(100dvh - var(--workspace-chrome-height, 119px) - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.monitor-column.is-error {
    border-color: #d76f76;
    box-shadow: 0 0 0 3px var(--danger-soft), var(--shadow);
}

.monitor-column.is-error .monitor-header {
    box-shadow: inset 4px 0 0 var(--danger);
}

.monitor-header {
    min-height: 63px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
}

.monitor-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.metric {
    min-width: 0;
    padding: 10px 12px;
    border-right: 1px solid var(--line);
}

.metric:last-child {
    border-right: 0;
}

.metric span {
    display: block;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric strong.is-success {
    color: var(--success);
}

.metric strong.is-error {
    color: var(--danger);
}

.request-progress {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-bottom: 1px solid #ead9a9;
    color: #71500f;
    background: var(--warning-soft);
    font-size: 12px;
    font-weight: 620;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #d9bc71;
    border-top-color: var(--warning);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.trace-list {
    max-height: 245px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    list-style: none;
    scrollbar-width: thin;
}

.trace-history-heading {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 13px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 11px;
    font-weight: 720;
    text-transform: uppercase;
}

.trace-history-heading span:last-child.is-error {
    color: var(--danger);
}

.trace-list:empty::before {
    display: block;
    padding: 20px 14px;
    color: var(--ink-muted);
    content: "История запросов пуста";
    font-size: 12px;
    text-align: center;
}

html[data-language="tr"] .trace-list:empty::before {
    content: "İstek geçmişi boş";
}

html[data-language="en"] .trace-list:empty::before {
    content: "Request history is empty";
}

.trace-item {
    display: grid;
    width: 100%;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 13px;
    border: 0;
    border-bottom: 0;
    color: var(--ink);
    background: var(--surface);
    text-align: left;
}

.trace-item:hover,
.trace-item.is-selected {
    background: var(--surface-muted);
}

.trace-item.is-selected:not(.is-error) {
    box-shadow: inset 4px 0 0 var(--primary);
}

.trace-list-item {
    border-bottom: 1px solid var(--line);
}

.trace-list-item:last-child {
    border-bottom: 0;
}

.trace-indicator {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 5px;
    color: var(--success);
    background: var(--success-soft);
}

.trace-indicator svg {
    width: 15px;
    height: 15px;
}

.trace-item.is-error {
    color: var(--danger);
    background: var(--danger-soft);
    box-shadow: inset 4px 0 0 var(--danger);
}

.trace-item.is-error:hover,
.trace-item.is-error.is-selected {
    background: var(--danger-soft);
}

.trace-item.is-error .trace-indicator {
    color: var(--on-danger);
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--danger-soft);
}

.trace-item.is-error .trace-meta {
    color: var(--danger);
    font-weight: 720;
}

.trace-copy {
    min-width: 0;
}

.trace-copy strong,
.trace-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trace-copy strong {
    font-size: 12px;
}

.trace-copy span,
.trace-meta {
    color: var(--ink-muted);
    font-size: 11px;
}

.trace-meta {
    white-space: nowrap;
}

.trace-request-target {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 9px 13px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.trace-request-target[hidden] {
    display: none;
}

.http-method {
    min-width: 52px;
    padding: 4px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--primary);
    background: var(--primary-soft);
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    font-weight: 760;
    text-align: center;
}

.request-relative-uri,
.request-full-uri {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-full-uri {
    display: none;
}

.exchange-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}

.exchange-panel {
    min-width: 0;
}

.exchange-panel + .exchange-panel {
    border-top: 1px solid #485552;
}

.json-console-header {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 11px 6px 14px;
    color: var(--console-ink);
    background: #2a3431;
    font-size: 11px;
    font-weight: 650;
}

.json-console-header .icon-button {
    color: #b8c7c2;
    border-color: #485552;
    background: transparent;
}

.json-console {
    width: 100%;
    min-height: 180px;
    max-height: 300px;
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 0;
    color: var(--console-ink);
    background: var(--console);
    font-family: "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    tab-size: 2;
    scrollbar-color: #596661 var(--console);
}

.json-console:focus {
    outline: 2px solid var(--focus);
    outline-offset: -2px;
}

.monitor-column:fullscreen {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    max-height: none;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
}

.monitor-column:fullscreen .request-relative-uri {
    display: none;
}

.monitor-column:fullscreen .request-full-uri {
    display: block;
    overflow-x: auto;
    text-overflow: clip;
    white-space: nowrap;
}

.monitor-column:fullscreen .trace-list {
    min-height: 90px;
    max-height: 22vh;
    flex: 0 1 22vh;
}

.monitor-column:fullscreen .exchange-grid {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monitor-column:fullscreen .exchange-panel {
    display: grid;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
}

.monitor-column:fullscreen .exchange-panel + .exchange-panel {
    border-top: 0;
    border-left: 1px solid #485552;
}

.monitor-column:fullscreen .json-console {
    min-height: 0;
    max-height: none;
}

@media (max-width: 1320px) {
    .configuration-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .workspace-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    }

    .compact-form-grid,
    .line-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1060px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .monitor-column {
        position: static;
        max-height: none;
        overflow: visible;
        overscroll-behavior: auto;
        scrollbar-gutter: auto;
    }

    .json-console {
        min-height: 240px;
        max-height: 420px;
    }

    .target-access-row {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 820px) {
    .custom-sale-tracking-header {
        flex-direction: column;
    }

    .custom-sale-tracking-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .tracking-source-badge {
        white-space: normal;
    }

    .sale-story-header {
        align-items: stretch;
        flex-direction: column;
    }

    .sale-story-status {
        width: 100%;
        min-width: 0;
    }

    .history-exchange-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .operation-history-metadata {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monitor-column:fullscreen .exchange-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .monitor-column:fullscreen .trace-list {
        min-height: 72px;
        max-height: 16vh;
        flex-basis: 16vh;
    }

    .monitor-column:fullscreen .exchange-panel + .exchange-panel {
        border-top: 1px solid #485552;
        border-left: 0;
    }

    .topbar {
        position: static;
        align-items: flex-start;
        padding: 12px 18px;
    }

    .topbar-status {
        flex-wrap: wrap;
    }

    .status-badge {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .setup-band {
        padding: 20px 18px;
    }

    .configuration-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field-wide,
    .form-command {
        grid-column: span 2;
    }

    .system-tabs {
        padding: 0 18px;
    }

    .workspace-grid {
        padding: 20px 18px 34px;
    }

    .compact-form-grid,
    .line-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stepper {
        grid-template-columns: repeat(7, 96px);
    }

    .custom-stepper {
        grid-template-columns: repeat(8, 96px);
    }
}

@media (max-width: 580px) {
    .custom-sale-view-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .custom-sale-view-tab {
        justify-content: center;
        padding-inline: 8px;
    }

    .custom-sale-tracking-panel {
        padding: 16px 13px;
    }

    .custom-sale-auto-refresh,
    .custom-sale-tracking-toolbar .button {
        width: 100%;
    }

    .button {
        max-width: 100%;
        min-width: 0;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .button svg {
        flex: 0 0 auto;
    }

    .topbar {
        display: block;
    }

    .topbar-status {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 12px;
        align-items: stretch;
    }

    .status-badge {
        width: 100%;
        max-width: none;
        min-height: 38px;
        justify-content: center;
        overflow: visible;
        text-align: center;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.25;
    }

    .topbar-status > .icon-button {
        grid-column: 2;
        justify-self: end;
    }

    .section-heading {
        align-items: flex-start;
    }

    .wallet-balance-heading,
    .evidence-heading,
    .evidence-block-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .evidence-context {
        width: 100%;
        max-width: none;
    }

    .wallet-balance-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wallet-balance-item + .wallet-balance-item {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .operation-verification-summary {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .operation-history-outcome {
        min-width: 0;
        grid-column: 2;
        text-align: left;
    }

    .operation-history-chevron {
        grid-row: 1 / span 2;
        grid-column: 3;
    }

    .verification-values {
        grid-template-columns: minmax(0, 1fr);
    }

    .operation-history-metadata {
        grid-template-columns: minmax(0, 1fr);
    }

    .sale-story-status {
        grid-template-columns: minmax(0, 1fr);
    }

    .configuration-form,
    .compact-form-grid,
    .line-grid {
        grid-template-columns: 1fr;
    }

    .field-wide,
    .field-full,
    .form-command {
        grid-column: 1;
    }

    .form-command .button,
    .operation-command .button {
        width: 100%;
    }

    .target-access-row {
        min-width: 0;
    }

    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-form .button {
        width: 100%;
    }

    .field-grow {
        flex: 0 0 auto;
    }

    .system-tabs {
        padding: 0;
    }

    .system-tab {
        min-width: 0;
        flex: 1 1 50%;
        padding: 0 10px;
    }

    .workflow-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .context-chip {
        width: 100%;
        max-width: none;
    }

    .operation-panel {
        padding: 16px 13px;
    }

    .operation-heading {
        align-items: flex-start;
    }

    .token-label {
        flex: 0 0 auto;
    }

    .line-row {
        padding: 13px 40px 13px 11px;
    }

    .metric {
        padding: 9px 8px;
    }
}

.preference-dock {
    position: relative;
    z-index: 80;
    display: flex;
    min-height: 51px;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 6px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.language-selector {
    display: grid;
    min-width: 70px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    padding-left: 8px;
    color: var(--ink-muted);
}

.language-selector svg {
    width: 16px;
    height: 16px;
}

.language-selector select {
    min-width: 44px;
    height: 32px;
    padding: 3px 24px 3px 5px;
    border: 0;
    background-color: transparent;
    font-size: 12px;
    font-weight: 700;
}

.theme-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(72px, auto));
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface-muted);
}

.theme-choice {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 9px;
    border: 0;
    border-radius: 4px;
    color: var(--ink-muted);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
}

.theme-choice svg {
    width: 14px;
    height: 14px;
}

.theme-choice.is-active {
    color: var(--primary);
    background: var(--surface);
    box-shadow: 0 1px 4px rgba(30, 41, 39, 0.12);
}

.sale-scenario-catalog {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: var(--ink-muted);
    font-size: 12px;
}

.sale-scenario-catalog svg {
    width: 15px;
    height: 15px;
}

.sale-scenario-catalog .is-error {
    color: var(--danger);
}

.workbench-layout {
    display: grid;
    min-width: 0;
    grid-template-columns: 264px minmax(0, 1fr);
    align-items: start;
    transition: grid-template-columns 160ms ease;
}

.workbench-layout.is-sidebar-collapsed {
    grid-template-columns: 68px minmax(0, 1fr);
}

.workbench-content {
    min-width: 0;
}

.controller-sidebar {
    position: sticky;
    z-index: 14;
    top: 68px;
    width: 264px;
    height: calc(100vh - 68px);
    overflow: hidden;
    border-right: 1px solid var(--line);
    background: var(--surface);
    transition: width 160ms ease;
}

.controller-sidebar-header {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 18px;
    border-bottom: 1px solid var(--line);
}

.controller-sidebar-header > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.controller-sidebar-header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.controller-navigation {
    height: calc(100% - 64px);
    padding: 8px 8px 18px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.controller-group {
    border-bottom: 1px solid var(--line);
}

.controller-group:last-child {
    border-bottom: 0;
}

.controller-group summary {
    display: grid;
    min-height: 42px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    list-style: none;
}

.controller-group summary::-webkit-details-marker {
    display: none;
}

.controller-group summary:hover {
    color: var(--ink);
    background: var(--surface-muted);
}

.controller-group summary svg,
.controller-entry svg {
    width: 17px;
    height: 17px;
}

.controller-count {
    min-width: 22px;
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-align: center;
    font-size: 10px;
}

.controller-group-items {
    display: grid;
    gap: 2px;
    padding: 0 0 8px;
}

.controller-entry {
    display: grid;
    width: 100%;
    min-height: 38px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 9px 7px 14px;
    border: 0;
    border-radius: 5px;
    color: var(--ink-muted);
    background: transparent;
    text-align: left;
}

.controller-entry span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.controller-entry:hover:not(:disabled) {
    color: var(--ink);
    background: var(--surface-muted);
}

.controller-entry.is-active {
    color: var(--primary);
    background: var(--primary-soft);
    font-weight: 700;
}

.controller-entry:disabled {
    opacity: 0.42;
}

.workbench-layout.is-sidebar-collapsed .controller-sidebar {
    width: 68px;
}

.workbench-layout.is-sidebar-collapsed .controller-sidebar-header {
    justify-content: center;
    padding-inline: 8px;
}

.workbench-layout.is-sidebar-collapsed .controller-sidebar-header > div,
.workbench-layout.is-sidebar-collapsed .controller-group summary span,
.workbench-layout.is-sidebar-collapsed .controller-entry span {
    display: none;
}

.workbench-layout.is-sidebar-collapsed .controller-navigation {
    padding-inline: 7px;
    scrollbar-gutter: auto;
}

.workbench-layout.is-sidebar-collapsed .controller-group summary,
.workbench-layout.is-sidebar-collapsed .controller-entry {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding-inline: 0;
}

.controller-workspace {
    min-width: 0;
}

.controller-workspace-header {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.controller-workspace-header h2 {
    margin: 2px 0 0;
    font-size: 18px;
}

[data-order-family-details="true"] .evidence-table {
    min-width: 1080px;
}

.controller-workspace-status {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.endpoint-tabs {
    display: flex;
    min-height: 46px;
    align-items: stretch;
    gap: 4px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px 6px 0 0;
    background: var(--surface);
}

.endpoint-tab {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--ink-muted);
    background: transparent;
}

.endpoint-tab.is-active {
    border-color: var(--line);
    color: var(--ink);
    background: var(--surface-muted);
}

.endpoint-tabs-empty {
    align-self: center;
    padding: 5px 9px;
    color: var(--ink-muted);
    font-size: 12px;
}

.controller-endpoint-shell {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 290px);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--surface-muted);
}

.controller-endpoint-main,
.controller-endpoint-context {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 12px;
}

.controller-panel,
.controller-result {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.controller-panel-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.controller-panel-heading svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.controller-panel-heading h3 {
    margin: 0;
    font-size: 13px;
}

.controller-panel p,
.controller-placeholder {
    margin: 0;
    color: var(--ink-muted);
    font-size: 12px;
}

.controller-panel .field {
    display: grid;
    gap: 6px;
}

.controller-parameter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.controller-body-editor {
    width: 100%;
    min-height: 190px;
    resize: vertical;
    font: 12px/1.55 Consolas, "Courier New", monospace;
}

.endpoint-tab {
    min-width: 92px;
    max-width: 148px;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px 11px;
    text-align: center;
    scroll-snap-align: start;
}

.endpoint-tabs {
    scroll-snap-type: x proximity;
    scrollbar-gutter: stable;
}

.endpoint-tab-icon {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    margin-inline: auto;
    border-radius: 50%;
    color: var(--text-muted);
    background: var(--surface-muted);
}

.endpoint-tab-icon svg {
    width: 15px;
    height: 15px;
}

.endpoint-tab-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    font-weight: 720;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-tab.is-active .endpoint-tab-icon {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.controller-schema-field {
    position: relative;
    min-width: 0;
}

.controller-field-title {
    padding-right: 58px;
    overflow-wrap: anywhere;
}

.controller-field-required {
    color: var(--danger);
}

.controller-field-location {
    position: absolute;
    top: 0;
    right: 0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.controller-schema-field.is-boolean > input {
    width: 20px;
    height: 20px;
    margin-top: 6px;
}

.controller-schema-field.is-long-string {
    grid-column: 1 / -1;
}

.controller-schema-field.is-long-string textarea {
    min-height: 108px;
    resize: vertical;
}

.controller-field-hint {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.controller-advanced-json {
    border: 1px dashed var(--line-strong);
    border-radius: 5px;
    background: var(--surface-muted);
}

.controller-advanced-json summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
}

.controller-advanced-json summary svg {
    width: 16px;
    height: 16px;
}

.controller-advanced-json > p {
    margin: 0;
    padding: 0 11px 9px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.controller-advanced-json .controller-body-editor {
    width: calc(100% - 22px);
    margin: 0 11px 11px;
}

.risk-confirmation {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin-top: 11px;
    color: var(--danger);
    font-size: 12px;
}

.risk-confirmation input {
    margin-top: 2px;
}

.controller-confirmation-phrase {
    margin-top: 11px;
}

.controller-execute {
    width: 100%;
}

.controller-result {
    margin-top: 14px;
}

.controller-result.is-error {
    border-color: var(--danger);
}

.controller-result pre {
    min-height: 120px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    border-radius: 4px;
    color: var(--console-ink);
    background: var(--console);
    font: 12px/1.55 Consolas, "Courier New", monospace;
}

.controller-stress-panel {
    min-width: 0;
    margin-top: 14px;
    scroll-margin-top: calc(var(--preference-dock-height, 51px) + 8px);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.controller-stress-heading {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.controller-stress-heading h3 {
    margin: 2px 0 0;
    font-size: 16px;
}

.controller-stress-heading p {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--ink-muted);
    font-size: 12px;
}

.controller-stress-state {
    display: inline-flex;
    min-height: 28px;
    flex: 0 0 auto;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.controller-stress-form {
    display: grid;
    min-width: 0;
    gap: 16px;
    padding-top: 16px;
}

.controller-stress-mode {
    width: min(100%, 360px);
}

.controller-stress-mode .segmented-control span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.controller-stress-mode svg {
    width: 15px;
    height: 15px;
}

.controller-stress-options {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
}

.controller-stress-options .field {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.controller-stress-thresholds {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.controller-stress-thresholds legend {
    padding: 0 6px;
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 700;
}

.controller-stress-thresholds .controller-stress-options {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.controller-stress-mutation {
    margin: 0;
}

.controller-stress-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.controller-stress-progress {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.controller-stress-progress > div {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink-muted);
    font-size: 12px;
}

.controller-stress-progress strong {
    color: var(--ink);
}

.controller-stress-progress progress {
    width: 100%;
    height: 9px;
    accent-color: var(--primary);
}

.controller-stress-results {
    min-width: 0;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.controller-stress-metrics {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(6, minmax(90px, 1fr));
    border: 1px solid var(--line);
    border-radius: 5px;
    overflow: hidden;
}

.controller-stress-metrics > div {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 11px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}

.controller-stress-metrics > div:nth-child(6n) {
    border-right: 0;
}

.controller-stress-metrics > div:nth-last-child(-n + 5) {
    border-bottom: 0;
}

.controller-stress-metrics span {
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.controller-stress-metrics strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.controller-stress-detail-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    margin-top: 18px;
}

.controller-stress-detail-grid > section {
    min-width: 0;
}

.controller-stress-detail-grid h4 {
    margin: 0 0 8px;
    font-size: 12px;
}

.controller-stress-histogram,
.controller-stress-errors {
    display: grid;
    min-width: 0;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.controller-stress-histogram li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-left: 3px solid var(--secondary);
    background: var(--surface-muted);
    font-size: 12px;
}

.controller-stress-errors li {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 8px 10px;
    border-left: 3px solid var(--danger);
    background: var(--danger-soft);
    font-size: 11px;
}

.controller-stress-errors span {
    color: var(--ink-muted);
    overflow-wrap: anywhere;
}

.controller-stress-histogram .is-empty,
.controller-stress-errors .is-empty {
    border-left-color: var(--line-strong);
    color: var(--ink-muted);
    background: var(--surface-muted);
}

.controller-stress-verdict {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 5px;
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 12px;
}

.controller-stress-verdict.is-passed {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-soft);
}

.controller-stress-verdict.is-failed {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}

.controller-stress-verdict ul,
.controller-stress-verdict p {
    margin: 0;
}

.controller-stress-report {
    width: fit-content;
    margin-top: 12px;
}

.controller-node {
    display: grid;
    min-width: 0;
}

.controller-node > .controller-entry {
    grid-template-columns: 18px minmax(0, 1fr) 16px;
}

.controller-entry-chevron {
    display: inline-grid;
    place-items: center;
    color: var(--ink-muted);
}

.controller-entry-chevron svg {
    width: 14px;
    height: 14px;
}

.controller-node.is-expanded > .controller-entry {
    color: var(--ink);
    background: var(--surface-muted);
}

.controller-children {
    display: grid;
    min-width: 0;
    gap: 3px;
    margin: 2px 0 7px 22px;
    padding: 2px 0 2px 8px;
    border-left: 1px solid var(--line-strong);
}

.controller-child {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 6px 7px;
    border: 0;
    border-radius: 4px;
    color: var(--ink-muted);
    background: transparent;
    text-align: left;
}

.controller-child:hover {
    color: var(--ink);
    background: var(--surface-muted);
}

.controller-child.is-active {
    color: var(--primary);
    background: var(--primary-soft);
}

.controller-child svg {
    width: 15px;
    height: 15px;
}

.controller-child > span:not(.controller-child-copy),
.controller-child-copy,
.controller-child-copy strong,
.controller-child-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.controller-child > span:not(.controller-child-copy),
.controller-child-copy strong,
.controller-child-copy small {
    white-space: nowrap;
}

.controller-child-copy {
    display: grid;
    gap: 1px;
}

.controller-child-copy strong {
    font-size: 11px;
    font-weight: 700;
}

.controller-child-copy small {
    color: var(--ink-muted);
    font-size: 9px;
}

.controller-scenario-items {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.controller-scenario-entry.is-unavailable {
    opacity: 0.58;
}

.controller-scenario-entry.is-unavailable:hover {
    opacity: 0.82;
}

.controller-tree-message {
    display: block;
    padding: 7px;
    color: var(--ink-muted);
    font-size: 10px;
    line-height: 1.35;
}

.workbench-layout.is-sidebar-collapsed .controller-children,
.workbench-layout.is-sidebar-collapsed .controller-entry-chevron {
    display: none;
}

.automated-scenario-workspace {
    min-width: 0;
}

.scenario-workspace-header {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.scenario-workspace-header > div {
    min-width: 0;
}

.scenario-workspace-header h2 {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: 20px;
}

.scenario-description {
    max-width: none;
    margin: 14px 0;
    color: var(--ink-muted);
}

.scenario-description > .scenario-copy {
    margin: 0;
}

.scenario-status,
.scenario-step-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.scenario-metadata {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border-block: 1px solid var(--line);
}

.scenario-metadata > div {
    min-width: 0;
    padding: 10px 12px;
    border-right: 1px solid var(--line);
}

.scenario-metadata > div:last-child {
    border-right: 0;
}

.scenario-metadata dt {
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.scenario-metadata dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 700;
}

.scenario-availability-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--warning);
    color: var(--warning);
    background: var(--warning-soft);
    font-size: 12px;
}

.scenario-progress {
    display: grid;
    grid-template-columns: minmax(120px, 280px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    color: var(--ink-muted);
    font-size: 12px;
}

.scenario-progress progress {
    width: 100%;
    height: 8px;
    accent-color: var(--primary);
}

.scenario-progress .is-error {
    color: var(--danger);
}

.scenario-section,
.scenario-execution-panel {
    min-width: 0;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.scenario-section-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.scenario-section-heading h3,
.scenario-execution-panel h3 {
    margin: 2px 0 0;
    font-size: 14px;
}

.scenario-step-list {
    display: grid;
    min-width: 0;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.scenario-step {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 6px;
    background: var(--surface);
}

.scenario-step-header {
    display: grid;
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
}

.scenario-step-index {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink-muted);
    font: 700 11px/1 Consolas, "Courier New", monospace;
}

.scenario-step-header h4 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.scenario-step-header p,
.scenario-assertions p {
    margin: 3px 0 0;
    color: var(--ink-muted);
    font-size: 11px;
}

.scenario-step-error {
    margin-top: 9px;
    padding: 8px 9px;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.scenario-assertions {
    min-width: 0;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.scenario-assertions > strong {
    font-size: 11px;
}

.scenario-assertion-scroll {
    min-width: 0;
    margin-top: 7px;
    overflow-x: auto;
}

.scenario-assertion-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 11px;
}

.scenario-assertion-table th,
.scenario-assertion-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.scenario-assertion-table th {
    color: var(--ink-muted);
    background: var(--surface-muted);
    font-size: 10px;
}

.scenario-show-call {
    margin-top: 10px;
}

.scenario-call-path {
    display: block;
    min-width: 0;
    padding: 8px 10px;
    overflow: auto;
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 11px;
    white-space: nowrap;
}

.scenario-call-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.scenario-call-grid > div {
    min-width: 0;
}

.scenario-call-grid pre {
    min-height: 150px;
    max-height: 360px;
    margin: 5px 0 0;
    padding: 11px;
    overflow: auto;
    border-radius: 4px;
    color: var(--console-ink);
    background: var(--console);
    font: 11px/1.5 Consolas, "Courier New", monospace;
}

.scenario-execution-panel {
    display: grid;
    min-width: 0;
    gap: 12px;
    padding-bottom: 8px;
}

.scenario-confirmation {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    color: var(--danger);
    font-size: 12px;
}

.scenario-confirmation input {
    margin-top: 2px;
}

.scenario-confirmation-phrase {
    max-width: 560px;
}

.scenario-confirmation-phrase small {
    color: var(--ink-muted);
    overflow-wrap: anywhere;
}

.scenario-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-passed {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-soft);
}

.status-failed {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}

.status-blocked {
    border-color: var(--warning);
    color: var(--warning);
    background: var(--warning-soft);
}

.status-not-evaluated {
    border-color: var(--line-strong);
    color: var(--ink-muted);
    background: var(--surface-muted);
}

.status-known-defect {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.status-cancelled {
    border-color: var(--line-strong);
    color: var(--ink-muted);
    background: var(--surface-muted);
}

.status-running {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--secondary-soft);
}

.status-waiting {
    border-color: var(--line);
    color: var(--ink-muted);
    background: var(--surface-muted);
}

.scenario-step.status-passed,
.scenario-step.status-failed,
.scenario-step.status-blocked,
.scenario-step.status-not-evaluated,
.scenario-step.status-known-defect,
.scenario-step.status-cancelled,
.scenario-step.status-running,
.scenario-step.status-waiting {
    background: var(--surface);
}

.scenario-empty {
    padding: 18px;
    border: 1px dashed var(--line-strong);
    color: var(--ink-muted);
    text-align: center;
    font-size: 12px;
}

html[data-theme="dark"] .brand-mark {
    border-color: #2b655e;
}

html[data-theme="dark"] .status-success {
    border-color: #356f4b;
}

html[data-theme="dark"] .status-warning {
    border-color: #6d5725;
}

html[data-theme="dark"] .status-danger {
    border-color: #71373c;
}

html[data-theme="dark"] .button-secondary:hover:not(:disabled) {
    color: var(--ink);
    border-color: var(--secondary);
    background: var(--secondary-soft);
}

html[data-theme="dark"] .button-accent:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

html[data-theme="dark"] .button-danger:hover:not(:disabled) {
    color: var(--on-danger);
    border-color: var(--danger);
    background: var(--danger);
}

@media (max-width: 1100px) {
    .workbench-layout {
        grid-template-columns: 224px minmax(0, 1fr);
    }

    .controller-sidebar {
        width: 224px;
    }

    .controller-stress-options {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .controller-stress-thresholds .controller-stress-options {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .controller-stress-metrics {
        grid-template-columns: repeat(4, minmax(90px, 1fr));
    }
}

@media (max-width: 900px) {
    .workbench-layout,
    .workbench-layout.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .controller-sidebar,
    .workbench-layout.is-sidebar-collapsed .controller-sidebar {
        position: relative;
        top: auto;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .workbench-layout.is-sidebar-collapsed .controller-sidebar-header {
        justify-content: space-between;
        padding: 10px 18px;
    }

    .workbench-layout.is-sidebar-collapsed .controller-sidebar-header > div {
        display: grid;
    }

    .workbench-layout.is-sidebar-collapsed .controller-navigation {
        display: none;
    }

    .controller-navigation {
        height: min(54vh, 520px);
    }

    .controller-endpoint-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .controller-stress-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .scenario-metadata {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scenario-metadata > div:nth-child(2) {
        border-right: 0;
    }

    .scenario-metadata > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .scenario-call-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 580px) {
    .controller-sidebar-header {
        padding-inline: 14px;
    }

    .controller-workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .controller-workspace-status {
        justify-content: flex-start;
    }

    .controller-endpoint-shell {
        padding: 11px;
    }

    .controller-parameter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .endpoint-tab {
        min-width: min(42vw, 136px);
        max-width: min(42vw, 136px);
    }

    .controller-schema-field.is-long-string {
        grid-column: auto;
    }

    .controller-stress-panel {
        padding: 13px;
    }

    .controller-stress-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .controller-stress-options,
    .controller-stress-thresholds .controller-stress-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .controller-stress-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .controller-stress-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .controller-stress-actions .button {
        width: 100%;
    }

    .controller-stress-progress > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .scenario-workspace-header,
    .scenario-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .scenario-metadata {
        grid-template-columns: minmax(0, 1fr);
    }

    .scenario-metadata > div,
    .scenario-metadata > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .scenario-metadata > div:last-child {
        border-bottom: 0;
    }

    .scenario-progress {
        grid-template-columns: minmax(0, 1fr);
    }

    .scenario-step-header {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .scenario-step-status {
        grid-column: 2;
        justify-self: start;
    }

    .scenario-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .scenario-actions .button {
        width: 100%;
    }

    .controller-children {
        margin-left: 14px;
    }

    .preference-dock {
        padding-inline: 12px;
    }
}
