:root {
    /* One shared scale for QA, reports, dialogs and account pages (docs/ui-design-system.md, «Шкала»). */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --control-height: 34px;
    --control-height-compact: 28px;
    --control-height-dense: 22px;
    --control-height-readable: 2.75rem;
    --loader-size: 5.5rem;
    --brand-size-prominent: 9rem;
    /* Text: 12 / 13 / 14 / 16 / 20 / 24 px; metrics 24 / 36 px. Nothing below 12 px except the
       dense workflow editor and technical tables (11 px) and labels drawn inside diagrams. */
    --font-size-dense: .6875rem;
    --font-size-diagram: .6875rem;
    --font-size-diagram-small: .5625rem;
    --font-size-small: .8125rem;
    --font-size-help: var(--font-size-small);
    --font-size-field: var(--font-size-small);
    --font-size-field-compact: .75rem;
    --font-size-caption: .75rem;
    --font-size-body: .875rem;
    --font-size-heading: 1.5rem;
    --font-size-heading-small: 1.25rem;
    --font-size-section: 1rem;
    --font-size-metric: 1.5rem;
    --font-size-metric-emphasized: 2.25rem;
    --metric-icon-size: 2rem;
    --metric-progress-height: .375rem;
    /* Radii: 6 / 8 / 12 px and pill. */
    --radius-surface: 12px;
    --radius-section: 8px;
    --radius-control: 8px;
    --radius-compact: 6px;
    --radius-pill: 999px;
    --scrollbar-size: 6px;
    --scrollbar-thumb: color-mix(in srgb, var(--text-muted) 85%, var(--surface-page));
    --scrollbar-thumb-hover: var(--text-muted);
    --field-height: var(--control-height);
    --field-font-size: var(--font-size-field);
    --select-arrow-inset: 5px;
    --select-arrow-width: 10px;
    --select-arrow-height: 6px;
    font-family: "Segoe UI Variable", Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-synthesis: none;
    color: var(--text-main);
    background: var(--surface-page);
}

:root, :root[data-theme="light"] {
    color-scheme: light;
    --surface-page: #f4f6f9;
    --surface-shell: #f9fafc;
    --surface-card: #ffffff;
    --surface-muted: #eef2f6;
    --surface-muted-2: #e4eaf1;
    --surface: var(--surface-card);
    --text-strong: #1c293b;
    --text-main: #35455a;
    --text-muted: #5d6c80;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235d6c80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --text-label: var(--text-muted);
    --text-on-accent: #ffffff;
    --line-soft: #dce3ec;
    --line-strong: #b6c3d4;
    --accent: #315db3;
    --accent-hover: #244789;
    --accent-solid: #315db3;
    --accent-solid-hover: #244789;
    --accent-soft: #eaf0fc;
    --focus-ring: #315db340;
    --success: #207047;
    --success-soft: #edf8f1;
    --success-line: #b6dcc5;
    --success-solid: #207047;
    --danger: #b13045;
    --danger-soft: #fff0f2;
    --danger-line: #ecc0c8;
    --danger-solid: #b13045;
    --warning: #875600;
    --warning-soft: #fff7e6;
    --warning-line: #e6d09e;
    --warning-solid: #875600;
    --info: #126d80;
    --info-soft: #eaf7fa;
    --info-line: #b3dce5;
    --info-solid: #126d80;
    --violet: #7351ac;
    --violet-soft: #f3eefb;
    --violet-line: #d7c8ed;
    --violet-solid: #7351ac;
    --shadow-color: #152b46;
    --shadow-card: 0 2px 8px #152b4606;
    --shadow-dialog: 0 20px 70px #152b462e;
    --overlay: #0d172975;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --surface-page: #111720;
    --surface-shell: #161e29;
    --surface-card: #1b2431;
    --surface-muted: #222e3e;
    --surface-muted-2: #2c3a4c;
    /* Keep even secondary text above 7:1 on the lightest neutral dark surface. */
    --text-strong: #f3f6fb;
    --text-main: #e0e7f0;
    --text-muted: #c2cddd;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23c2cddd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --line-soft: #334258;
    --line-strong: #576d89;
    --accent: #a0c0ff;
    --accent-hover: #c2d7ff;
    --accent-solid: #365fb6;
    --accent-solid-hover: #426dc7;
    --accent-soft: #263958;
    --focus-ring: #a0c0ff50;
    --success: #84d9aa;
    --success-soft: #1c372d;
    --success-line: #35644c;
    --success-solid: #25643f;
    --danger: #ffacb8;
    --danger-soft: #3e252f;
    --danger-line: #754351;
    --danger-solid: #a42b40;
    --warning: #efcd82;
    --warning-soft: #383122;
    --warning-line: #6d5c35;
    --warning-solid: #7c520b;
    --info: #8dd9e9;
    --info-soft: #203740;
    --info-line: #39606c;
    --info-solid: #1a6375;
    --violet: #c9acf4;
    --violet-soft: #312840;
    --violet-line: #5e4b7b;
    --violet-solid: #674397;
    --shadow-color: #000000;
    --shadow-card: 0 2px 8px #00000015;
    --shadow-dialog: 0 20px 70px #00000060;
    --overlay: #070b12b3;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scrollbar-gutter: stable; }
body { background: var(--surface-shell); }
/* The browser's «smaller» keeps <small> relative to its parent; the floor keeps it at the 12 px minimum. */
small { font-size: max(var(--font-size-caption), .8333em); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }

/* Shared tab strips. Screen-specific rules handle layout and panel content. */
.app-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    min-width: 0;
    max-width: 100%;
    border-block-end: 1px solid var(--line-soft);
}

.app-tabs > :where(button, a) {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    max-width: 100%;
    min-height: var(--control-height);
    padding: var(--space-1) var(--space-3) var(--space-2);
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: var(--font-size-field);
    font-weight: 600;
    text-align: start;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.app-tabs > :where(button, a):hover:not(:disabled) { background: var(--surface-muted); }
.app-tabs > :where(button, a):focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.app-tabs > :where(button, a):disabled { cursor: not-allowed; }

.app-tabs > :where(button, a):is(.active, [aria-selected="true"], [aria-current="page"], [aria-current="true"], [aria-pressed="true"]) {
    color: var(--accent);
}

.app-tabs > :where(button, a):where(.active, [aria-selected="true"], [aria-current="page"], [aria-current="true"], [aria-pressed="true"])::after {
    content: "";
    position: absolute;
    inset-inline: var(--space-3);
    inset-block-end: var(--space-1);
    border-block-end: 2px solid currentColor;
    border-radius: var(--radius-compact);
    pointer-events: none;
}

.app-tabs .tab-count {
    flex: none;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-variant-numeric: tabular-nums;
}

.app-tabs .tab-count.status-error { color: var(--danger); }

/* Secondary tabs: nested sections inside a panel, inspector or dialog. */
.app-tabs-secondary { gap: 0; }
.app-tabs-secondary > :where(button, a) {
    min-height: var(--control-height-compact);
    padding: var(--space-1) var(--space-2) var(--space-2);
}
.app-tabs-secondary > :where(button, a)::after { inset-inline: var(--space-2); }

.app-tabs-vertical {
    flex-flow: column nowrap;
    border-block-end: 0;
    border-inline-start: 1px solid var(--line-soft);
}

.app-tabs-vertical > :where(button, a) {
    justify-content: center;
    min-inline-size: var(--control-height);
    padding: var(--space-3) var(--space-2);
}

.app-tabs-vertical > :where(button, a)::after {
    inset-block: var(--space-3);
    inset-inline: var(--space-1) auto;
    border-block-end: 0;
    border-inline-start: 2px solid currentColor;
}

@media (pointer: coarse) {
    .app-tabs > :where(button, a) { min-height: max(44px, var(--control-height)); }
    .app-tabs-vertical > :where(button, a) { min-width: 44px; }
}

/* SegmentedControl: one choice of a few views or units inside a panel (role="radiogroup").
   Page sections with their own panels use SectionTabs. The selected option has a raised surface and aria-checked. */
.segmented-control {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    min-width: 0;
    max-width: 100%;
    padding: var(--space-1);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    background: var(--surface-shell);
}

.segmented-control > [role="radio"] {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-width: 0;
    max-width: 100%;
    min-height: var(--control-height-compact);
    padding: var(--space-1) var(--space-3);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-main);
    font-size: var(--font-size-field);
    font-weight: 600;
    text-align: center;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.segmented-control > [role="radio"]:hover:not(:disabled) { background: var(--surface-muted); }
.segmented-control > [role="radio"][aria-checked="true"] { border-color: var(--line-soft); background: var(--surface-card); color: var(--accent); box-shadow: var(--shadow-card); }
.segmented-control > [role="radio"]:disabled { cursor: not-allowed; opacity: .6; }
.segmented-control-count { color: var(--text-muted); font-size: var(--font-size-caption); font-variant-numeric: tabular-nums; }

@media (pointer: coarse) {
    .segmented-control > [role="radio"] { min-height: max(44px, var(--control-height)); }
}

@media (forced-colors: active) {
    .segmented-control > [role="radio"][aria-checked="true"] { border-color: Highlight; }
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { background: var(--accent-solid); color: var(--text-on-accent); padding: 22px var(--space-4); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 var(--space-2) 25px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-section); background: var(--accent-solid); font-weight: 700; }
.brand div { display: grid; line-height: 1.05; }
.brand div span { color: var(--text-muted); font-size: var(--font-size-small); }
.nav-menu { display: grid; gap: var(--space-1); }
.nav-menu a { color: var(--text-muted); text-decoration: none; padding: 10px var(--space-3); border-radius: var(--radius-control); }
.nav-menu a:hover, .nav-menu a.active { color: var(--text-on-accent); background: var(--accent-solid); }
.nav-menu a.active { box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.nav-group { margin: 18px var(--space-3) 6px; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.page-shell { min-width: 0; }
.topbar { min-height: 72px; display: flex; align-items: center; padding: var(--space-3) 30px; background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.topbar div { display: grid; }
.workspace-topbar { justify-content: space-between; gap: var(--space-6); }
.workspace-page { display: contents; }
.target-workspace-picker select { width: clamp(180px, 22vw, 340px); text-overflow: ellipsis; }
.version-workspace-picker { display: flex; gap: 10px; align-items: center; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; }
.version-workspace-picker select { min-width: 150px; }
.test-case-catalog { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.test-case-tree { position: sticky; top: 18px; max-height: calc(100vh - 110px); overflow: hidden; }
.test-case-toolbar { display: grid; gap: 10px; padding: 14px var(--space-4); border-bottom: 1px solid var(--line-soft); }
.compact-check { display: flex; gap: var(--space-2); align-items: center; color: var(--text-muted); font-size: var(--font-size-caption); }
.test-case-folder-list { max-height: calc(100vh - 260px); padding: 10px; overflow: auto; }
.test-case-folder-group h3 { display: flex; gap: 7px; align-items: center; margin: 10px 6px 7px; color: var(--text-muted); font-size: var(--font-size-caption); text-transform: uppercase; letter-spacing: .05em; }
.test-case-category-header {
    display: grid;
    grid-template-columns: 24px 16px minmax(0, 1fr) auto 28px;
    gap: 7px;
    align-items: center;
    min-height: 38px;
    padding: 7px 6px 7px calc(6px + var(--category-depth, 0) * 17px);
    color: var(--text-main);
    font-size: var(--font-size-caption);
}
.test-case-category-header > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.test-case-category-toggle,
.test-case-category-add {
    display: grid;
    width: 24px;
    height: 24px;
    padding: 0;
    place-items: center;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-compact);
    cursor: pointer;
}
.test-case-category-toggle:hover,
.test-case-category-add:hover { color: var(--accent); background: var(--accent-soft); }
.test-case-category-toggle i { font-size: var(--font-size-caption); }
.test-case-category-add { opacity: 0; }
.test-case-category-header:hover .test-case-category-add,
.test-case-category-add:focus-visible { opacity: 1; }
.test-case-category-count {
    min-width: 24px;
    padding: 2px 7px;
    color: var(--text-muted);
    text-align: center;
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 600;
    line-height: 1rem;
    font-variant-numeric: tabular-nums;
}
.test-case-category-toggle-spacer { width: 24px; }
.test-case-category-node > .test-case-nav-item { padding-left: calc(11px + var(--category-depth, 0) * 17px); }
.test-case-category-node > .test-case-row > .test-case-nav-item { padding-left: calc(11px + var(--category-depth, 0) * 17px); }
.test-case-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); padding-right: var(--space-3); }
.test-case-row > .test-case-nav-item { min-width: 0; }
.test-case-catalog .test-case-category-header { grid-template-columns: 24px 16px minmax(0, 1fr) max-content max-content; }
.test-case-nav-item { display: grid; gap: var(--space-1); width: 100%; margin-bottom: 5px; padding: 10px 11px; color: var(--text-strong); text-align: left; background: transparent; border: 1px solid transparent; border-radius: var(--radius-control); cursor: pointer; }
.test-case-nav-item:hover { background: var(--surface-shell); }
.test-case-nav-item.active { background: var(--accent-soft); border-color: var(--line-soft); }
.test-case-nav-item.excluded { opacity: .58; }
.test-case-nav-item > span { display: flex; align-items: center; justify-content: space-between; }
.test-case-nav-item strong { font-size: var(--font-size-small); }
.test-case-nav-item small { color: var(--text-muted); }
.test-case-detail { display: grid; gap: 18px; min-width: 0; }
.test-case-detail .test-case-editor-tabs { margin-bottom: 0; }
.test-case-inherited-note { display: flex; gap: 9px; align-items: center; margin: 0; padding: 10px 13px; font-size: var(--font-size-caption); }
.test-case-scope-strip.editable { align-items: end; }
.test-case-scope-strip.editable .test-case-scope-item { gap: 6px; min-width: 210px; }
.test-case-scope-strip.editable .form-control { min-width: 190px; color: var(--text-strong); background-color: var(--surface-card); font-weight: 700; }
.test-case-scope-edit {
    display: grid;
    width: 34px;
    height: 34px;
    align-self: center;
    padding: 0;
    place-items: center;
    color: var(--accent);
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    cursor: pointer;
}
.test-case-scope-edit:hover { color: var(--text-strong); background: var(--accent-soft); border-color: var(--line-soft); }
.test-case-scope-edit.cancel { color: var(--danger); background: var(--surface-muted); border-color: var(--danger-line); }
.test-case-category-picker { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: var(--space-2); }
.test-case-category-picker .button { min-width: 42px; padding: 0; }
.ui-element-catalog-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.ui-element-group-tree { position: sticky; top: 18px; max-height: calc(100vh - 110px); overflow: hidden; }
.ui-element-group-list { padding: var(--space-2); }
.ui-element-group-filter {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: var(--space-2);
    align-items: center;
    width: 100%;
    min-height: 38px;
    padding: var(--space-2) 10px;
    color: var(--text-main);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    cursor: pointer;
}
.ui-element-group-filter:hover,
.ui-element-group-filter.active { color: var(--text-strong); background: var(--accent-soft); border-color: var(--line-soft); }
.ui-element-group-filter > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-element-group-filter > span { min-width: 24px; padding: 2px 7px; text-align: center; background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.ui-element-group-tree .test-case-category-header.active { color: var(--text-strong); background: var(--accent-soft); }
.ui-element-group-name { overflow: hidden; padding: 0; color: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; background: transparent; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.ui-element-group-tree .test-case-folder-list { max-height: calc(100vh - 245px); overflow: auto; }
.ui-element-group-backdrop { z-index: 60; }
@media (max-width: 1050px) {
    .ui-element-catalog-layout { grid-template-columns: 1fr; }
    .ui-element-group-tree { position: static; max-height: none; }
    .ui-element-group-tree .test-case-folder-list { max-height: 360px; }
}
.test-case-tab-content { display: grid; gap: 14px; }
.test-case-step-editor { display: grid; gap: 10px; margin-top: 18px; }
.test-case-step-block { display: grid; gap: 10px; }
.test-case-shared-step-group { display: grid; overflow: hidden; gap: 0; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); box-shadow: 0 5px 16px color-mix(in srgb, var(--shadow-color) 6%, transparent); }
.test-case-shared-step-header { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 9px var(--space-3); color: var(--text-strong); background: var(--accent-soft); border-bottom: 1px solid var(--line-soft); }
.test-case-shared-step-icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: var(--accent); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.test-case-shared-step-title { display: grid; flex: 1 1 auto; gap: 1px; min-width: 170px; }
.test-case-shared-step-title small { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.test-case-shared-step-title strong { overflow: hidden; font-size: var(--font-size-small); text-overflow: ellipsis; white-space: nowrap; }
.test-case-shared-step-title a { display: inline-flex; gap: 6px; align-items: center; overflow: hidden; width: max-content; max-width: 100%; color: var(--accent); font-size: var(--font-size-small); font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.test-case-shared-step-title a:hover { color: var(--accent); text-decoration: underline; }
.test-case-shared-step-title a i { flex: 0 0 auto; font-size: var(--font-size-caption); opacity: .7; }
.test-case-shared-step-header .soft-pill { flex: 0 0 auto; background: var(--surface-card); }
.test-case-shared-synced, .test-case-shared-update { display: inline-flex; gap: 5px; align-items: center; flex: 0 0 auto; font-size: var(--font-size-caption); font-weight: 700; }
.test-case-shared-synced { color: var(--success); }
.test-case-shared-update { color: var(--warning); }
.test-case-shared-step-header .button { flex: 0 0 auto; min-height: 30px; }
.test-case-shared-step-group .test-case-edit-step { margin: 0 10px; background: var(--surface-card); border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.test-case-shared-step-group .test-case-edit-step:last-child { border-bottom: 0; }
.test-case-edit-step.shared textarea[readonly] { color: var(--text-strong); background: var(--surface-card); cursor: default; }
.test-case-step-heading-actions { display: flex; gap: var(--space-2); align-items: center; }
.shared-step-catalog { display: grid; gap: var(--space-4); max-width: 1190px; margin: 0 auto; }
.shared-step-catalog-summary { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px var(--space-5); }
.shared-step-catalog-summary h2 { margin: 2px 0 3px; }
.shared-step-catalog-summary p { margin: 0; color: var(--text-muted); }
.shared-step-catalog-icon { display: grid; width: 46px; height: 46px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-surface); font-size: var(--font-size-section); }
.shared-step-library-panel { overflow: hidden; }
.shared-step-library-panel .panel-header { align-items: center; }
.shared-step-search { width: min(320px, 40vw); }
.shared-step-catalog-list { display: grid; }
.shared-step-catalog-row { display: grid; grid-template-columns: 36px minmax(240px, 1fr) 88px 100px auto auto; gap: 14px; align-items: center; min-height: 72px; padding: 11px var(--space-4); border-top: 1px solid var(--line-soft); }
.shared-step-catalog-row:first-child { border-top: 0; }
.shared-step-catalog-row:hover { background: var(--surface-shell); }
.shared-step-row-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-control); }
.shared-step-row-main, .shared-step-catalog-row > span:not(.soft-pill), .shared-step-picker-row > span:nth-child(2) { display: grid; gap: 2px; }
.shared-step-catalog-row small, .shared-step-picker-row small { color: var(--text-muted); font-size: var(--font-size-caption); }
.shared-step-catalog-modal { width: min(1100px, calc(100vw - 40px)); max-height: calc(100vh - 40px); }
.shared-step-catalog-editor { display: grid; gap: var(--space-4); overflow: auto; }
.shared-step-editor-list { display: grid; gap: 10px; }
.shared-step-picker-modal { width: min(760px, calc(100vw - 40px)); }
.shared-step-picker-body { display: grid; gap: var(--space-3); min-height: 260px; }
.shared-step-picker-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.shared-step-picker-list { display: grid; gap: 7px; max-height: 430px; overflow: auto; }
.shared-step-picker-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto 18px; gap: 10px; align-items: center; width: 100%; padding: 10px; color: var(--text-strong); text-align: left; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); cursor: pointer; }
.shared-step-picker-row:hover { background: var(--surface-shell); border-color: var(--line-soft); }
.shared-step-picker-row.active { color: var(--text-strong); background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.shared-step-picker-check { color: var(--success); opacity: 0; }
.shared-step-picker-row.active .shared-step-picker-check { opacity: 1; }
.test-case-edit-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: var(--space-3); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.test-case-edit-step.has-validation-error { background: var(--surface-shell); border-color: var(--danger-line); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.test-case-edit-step.has-validation-error .step-number { color: var(--text-on-accent); background: var(--danger-solid); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.test-case-edit-step .field-invalid > span { color: var(--danger); }
.test-case-edit-step .field-invalid .form-control { border-color: var(--danger-line); background: var(--surface-card); box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 9%, transparent); }
.test-case-editor-tabs button.has-validation-error { color: var(--danger); }
.step-number { display: grid; width: 28px; height: 28px; place-items: center; color: var(--text-strong); background: var(--accent-soft); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.test-case-step-actions { display: flex; gap: var(--space-1); align-items: center; padding-top: 27px; }
.test-case-edit-step textarea {
    field-sizing: content;
    min-height: 4rem;
    max-height: 28rem;
    line-height: 1.45;
    resize: vertical;
}
.relation-panel { overflow: hidden; border-radius: var(--radius-surface) !important; }
.relation-panel > .panel-header { border-radius: var(--radius-surface) var(--radius-surface) 0 0; }
.relation-tabbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: 7px; background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); }
.relation-tab-add { align-self: stretch; white-space: nowrap; }
.relation-tab-content { min-height: 128px; border-radius: 0 0 var(--radius-surface) var(--radius-surface); }
.relation-column { min-width: 0; }
.relation-column h3 { margin: 0 0 10px; font-size: var(--font-size-body); }
.relation-row { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; padding: 13px 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.relation-row + .relation-row { margin-top: 6px; }
.relation-row span { display: grid; min-width: 0; }
.relation-row strong { overflow: hidden; font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.relation-row small { color: var(--text-muted); }
.relation-main { display: grid; flex: 1; gap: 5px; min-width: 0; }
.relation-title { display: flex; gap: 9px; align-items: center; min-width: 0; }
.relation-title small { flex: 0 0 auto; padding: 2px 7px; background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); }
.relation-target { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.relation-run { display: flex; gap: 7px; align-items: center; min-height: 22px; color: var(--text-muted); font-size: var(--font-size-caption); }
.relation-run > span { display: inline; }
.relation-run .status-badge { font-size: var(--font-size-caption); }
.relation-run time { color: var(--text-muted); }
.relation-never-run { display: inline-flex !important; gap: 6px; align-items: center; }
.relation-never-run i { font-size: var(--font-size-caption); }
.relation-run-guidance { display: flex; gap: 6px; align-items: center; color: var(--warning); font-size: var(--font-size-caption); font-weight: 600; }
.relation-run-guidance i { color: var(--warning); }
.relation-actions { display: flex; flex: 0 0 auto; gap: 6px; align-items: center; }
.relation-modal-body { height: min(360px, 52vh); align-content: start; }
.relation-modal-body .relation-picker { min-width: 0; }
.relation-modal .relation-picker-menu { position: static; margin-top: var(--space-2); }
.relation-picker-loading { display: grid; gap: var(--space-2); }
.relation-picker-loading-search,
.relation-picker-loading-row span,
.relation-picker-loading-row small {
    background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-shell) 50%, var(--surface-muted) 75%);
    background-size: 200% 100%;
    animation: relation-loading-shimmer 1.2s ease-in-out infinite;
}
.relation-picker-loading-search { height: 44px; border-radius: var(--radius-section); }
.relation-picker-loading-row { display: grid; gap: 7px; min-height: 55px; padding: 10px 11px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.relation-picker-loading-row span { width: min(72%, 360px); height: 12px; border-radius: var(--radius-pill); }
.relation-picker-loading-row small { width: min(48%, 240px); height: 9px; border-radius: var(--radius-pill); }
@keyframes relation-loading-shimmer { to { background-position: -200% 0; } }
.relation-picker { position: relative; }
.relation-picker-input { position: relative; }
.relation-picker-input > i { position: absolute; z-index: 1; top: 50%; left: 13px; color: var(--text-muted); font-size: var(--font-size-caption); transform: translateY(-50%); pointer-events: none; }
.relation-picker-input .form-control { width: 100%; padding-left: 35px; padding-right: 36px; }
.relation-picker-clear { position: absolute; top: 50%; right: 8px; display: grid; width: 25px; height: 25px; padding: 0; place-items: center; color: var(--text-muted); background: transparent; border: 0; border-radius: var(--radius-control); transform: translateY(-50%); cursor: pointer; }
.relation-picker-clear:hover { color: var(--text-strong); background: var(--surface-muted); }
.relation-picker-menu { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; left: 0; max-height: 310px; overflow: auto; padding: 5px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); box-shadow: 0 16px 36px color-mix(in srgb, var(--shadow-color) 14%, transparent); }
.relation-picker-menu > button { display: grid; gap: 3px; width: 100%; padding: 9px 11px; color: var(--text-strong); text-align: left; background: transparent; border: 0; border-radius: var(--radius-control); cursor: pointer; }
.relation-picker-menu > button:hover, .relation-picker-menu > button[aria-selected="true"] { background: var(--accent-soft); }
.relation-picker-menu > button strong { overflow: hidden; font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.relation-picker-menu > button small { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.relation-picker-empty, .relation-picker-hint { padding: 10px 11px; color: var(--text-muted); font-size: var(--font-size-caption); }
.relation-picker-hint { border-top: 1px solid var(--line-soft); }
.checkbox-stack { display: grid; gap: 10px; }
.checkbox-stack label { display: flex; gap: 9px; align-items: center; }
@media (max-width: 1050px) { .test-case-catalog { grid-template-columns: 1fr; } .test-case-tree { position: static; max-height: none; } .test-case-folder-list { max-height: 360px; } }
@media (max-width: 760px) { .test-case-edit-step { grid-template-columns: 32px minmax(0, 1fr); } .test-case-edit-step .form-field { grid-column: 2; } .test-case-step-actions { grid-column: 2; padding-top: 0; } .test-case-shared-step-header { flex-wrap: wrap; } .test-case-shared-step-title { min-width: calc(100% - 42px); } .test-case-step-heading-actions { flex-wrap: wrap; justify-content: flex-end; } .shared-step-catalog-summary { grid-template-columns: 48px minmax(0, 1fr); } .shared-step-catalog-summary > .soft-pill { grid-column: 2; justify-self: start; } .shared-step-library-panel .panel-header { align-items: stretch; flex-direction: column; } .shared-step-search { width: 100%; } .shared-step-catalog-row { grid-template-columns: 36px minmax(0, 1fr) auto; } .shared-step-catalog-row > span:not(.shared-step-row-icon, .soft-pill), .shared-step-catalog-row > .soft-pill { display: none; } .shared-step-picker-toolbar { grid-template-columns: 1fr; } .shared-step-picker-row { grid-template-columns: 36px minmax(0, 1fr) 18px; } .shared-step-picker-row .soft-pill { display: none; } .version-workspace-picker span { display: none; } }
@media (max-width: 760px) { .relation-row { align-items: stretch; flex-direction: column; } .relation-actions { flex-wrap: wrap; } }
@media (max-width: 680px) { .relation-tabbar { grid-template-columns: 1fr; } }

/* Scalable relation catalog */
.release-modal.relation-modal { width: min(780px, calc(100vw - 40px)); max-width: 780px; }
.relation-modal .relation-modal-body { height: min(590px, 68vh); min-height: 430px; padding: 18px 22px; overflow: hidden; }
.relation-modal-body .relation-picker { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); height: 100%; }
.relation-picker-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(120px, .7fr) auto; gap: 9px; align-items: end; margin-top: var(--space-3); }
.relation-picker-toolbar label { display: grid; gap: 5px; min-width: 0; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.relation-picker-toolbar .form-control { width: 100%; height: 38px; padding: 7px 30px 7px 10px; color: var(--text-strong); background-color: var(--surface-shell); font-size: var(--font-size-caption); text-transform: none; letter-spacing: normal; }
.relation-picker-reset { display: inline-flex; gap: 6px; align-items: center; justify-content: center; height: 38px; padding: 0 11px; color: var(--text-main); white-space: nowrap; background: transparent; border: 1px solid var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; }
.relation-picker-reset:hover { color: var(--text-strong); background: var(--accent-soft); border-color: var(--line-soft); }
.relation-picker-summary { display: flex; align-items: center; justify-content: space-between; min-height: 35px; padding: var(--space-2) 2px 6px; color: var(--text-muted); font-size: var(--font-size-caption); }
.relation-picker-summary strong { color: var(--text-strong); }
.relation-picker-busy { display: inline-flex; gap: 6px; align-items: center; color: var(--text-main); }
.relation-modal .relation-picker-menu { min-height: 0; max-height: none; margin: 0; overflow-y: auto; overscroll-behavior: contain; box-shadow: inset 0 1px 2px color-mix(in srgb, var(--shadow-color) 3%, transparent); scrollbar-gutter: stable; }
.relation-picker-menu > button { grid-template-columns: minmax(0, 1fr) auto 18px; gap: var(--space-3); align-items: center; min-height: 58px; padding: 9px var(--space-3); border: 1px solid transparent; }
.relation-picker-menu > button:hover,
.relation-picker-menu > button.active,
.relation-picker-menu > button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--line-soft); }
.relation-picker-result-main { display: grid; gap: 5px; min-width: 0; }
.relation-picker-result-main strong { font-size: var(--font-size-caption); }
.relation-picker-result-main small { font-size: var(--font-size-caption); }
.relation-picker-status { padding: 3px var(--space-2); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.relation-picker-status.active { color: var(--success); background: var(--success-soft); }
.relation-picker-status.inactive { color: var(--danger); background: var(--surface-muted); }
.relation-picker-check { color: var(--accent); font-size: var(--font-size-caption); }
.relation-picker-menu > .relation-picker-more { display: flex; grid-template-columns: none; gap: 7px; align-items: center; justify-content: center; min-height: 42px; margin-top: var(--space-1); color: var(--accent); background: var(--surface-shell); border-top-color: var(--line-soft); font-size: var(--font-size-caption); font-weight: 700; }
.relation-picker-empty { display: grid; gap: 7px; min-height: 180px; place-content: center; justify-items: center; text-align: center; }
.relation-picker-empty i { color: var(--text-muted); font-size: var(--font-size-heading-small); }
.relation-picker-empty strong { color: var(--text-main); font-size: var(--font-size-caption); }
.relation-picker-result-skeleton { display: grid; gap: var(--space-2); min-height: 58px; padding: var(--space-3); }
.relation-picker-result-skeleton span,
.relation-picker-result-skeleton small { height: 10px; background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-shell) 50%, var(--surface-muted) 75%); background-size: 200% 100%; border-radius: var(--radius-pill); animation: relation-loading-shimmer 1.2s ease-in-out infinite; }
.relation-picker-result-skeleton span { width: min(65%, 360px); }
.relation-picker-result-skeleton small { width: min(42%, 240px); height: 8px; }
@media (max-width: 700px) {
    .release-modal.relation-modal { width: min(100%, calc(100vw - 20px)); }
    .relation-modal .relation-modal-body { min-height: 0; height: min(620px, 72vh); padding: 14px; overflow: auto; }
    .relation-modal-body .relation-picker { height: auto; min-height: 100%; }
    .relation-picker-toolbar { grid-template-columns: 1fr 1fr; }
    .relation-picker-reset { align-self: end; }
    .relation-modal .relation-picker-menu { min-height: 260px; max-height: 360px; }
}
.eyebrow { color: var(--text-muted); font-size: var(--font-size-caption); letter-spacing: .08em; text-transform: uppercase; }
.content { max-width: 1380px; margin: 0 auto; padding: var(--space-7) 30px 60px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); margin-bottom: 22px; }
.page-header h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.025em; }
.page-header p { margin: 7px 0 0; color: var(--text-muted); }
.page-actions { display: flex; align-items: center; gap: 10px; }
.page-actions.spread { flex-wrap: wrap; gap: var(--space-3); margin-block-end: var(--space-3); }
.page-actions.spread > :last-child:not(:first-child) { margin-inline-start: auto; }
.page-actions.spread > .button { max-width: 100%; }

.panel { background: color-mix(in srgb, var(--surface-card) 85%, transparent); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); box-shadow: 0 14px 45px color-mix(in srgb, var(--shadow-color) 5%, transparent); backdrop-filter: blur(10px); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 19px 22px; border-bottom: 1px solid var(--line-soft); }
.panel-header.wrap { flex-wrap: wrap; }
.panel-header h2 { margin: 0; font-size: var(--font-size-section); }
.panel-body { padding: 22px; }
.editor-disclosure { min-width: 0; overflow-wrap: anywhere; }
.editor-disclosure > summary { padding: var(--space-3) var(--space-4); cursor: pointer; color: var(--text-muted); font-size: var(--font-size-body); font-weight: 600; }
.editor-disclosure[open] > summary { border-bottom: 1px solid var(--line-soft); color: var(--text-strong); }
.editor-disclosure > .visible-workflow-steps { margin: 0; border: 0; background: transparent; }
/* Run stage in the workflow player's mode bar: a compact wrapping summary beside the view switch;
   opened, it moves to a full row below the bar (WorkflowRunDiagnostics, WorkflowTestPlayer). */
.player-run-stage { flex: 1 1 12rem; }
.player-run-stage > summary { padding: var(--space-1) var(--space-2); font-size: var(--font-size-caption); line-height: 1.35; }
.player-run-stage[open] { flex-basis: 100%; order: 1; }
/* Opened details scroll inside, so the summary that closes them and the player below stay on screen. */
.player-run-stage[open] > .panel-body { max-height: 30dvh; overflow: auto; }
.stack { display: grid; gap: var(--space-5); }
.two-column { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.4fr); gap: var(--space-5); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.load-failure-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.load-failure-totals > div { display: grid; gap: var(--space-1); padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-shell); }
.load-failure-totals strong { font-size: var(--font-size-metric); color: var(--text-strong); }
.load-failure-totals span { font-size: var(--font-size-small); color: var(--text-muted); }
.load-failure-filter { display: grid; gap: 5px; max-width: 360px; margin: var(--space-5) 0; }
.load-failure-groups { display: grid; gap: var(--space-4); }
.load-failure-card { border: 1px solid var(--line-soft); border-radius: var(--radius-surface); padding: 18px; overflow-wrap: anywhere; }
.load-failure-card-heading { display: flex; justify-content: space-between; align-items: start; gap: var(--space-3); }
.load-failure-card-heading h3 { margin: 7px 0; }
.load-failure-card-heading .soft-pill { flex-shrink: 0; }
.load-failure-check { padding: var(--space-3) 14px; background: var(--surface-shell); border-left: 3px solid var(--accent); border-radius: var(--radius-compact); margin: var(--space-3) 0; }
.load-failure-check p { margin: 5px 0 0; }
.load-failure-card pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-shell); padding: var(--space-3); }
.load-failure-card .load-step-report-links { margin: 14px 0 var(--space-2); }
@media (max-width: 700px) { .load-failure-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .load-failure-card-heading { flex-wrap: wrap; } }
.load-pdf-download { display: grid; gap: 6px; justify-items: end; margin-left: auto; }
.load-pdf-download > small { color: var(--danger); max-width: 340px; }
.load-pdf-download > button { white-space: nowrap; }
.load-test-layout { grid-template-columns: minmax(340px, .8fr) minmax(0, 1.5fr); }
.load-test-layout small { display: block; margin-top: 3px; }
.load-test-layout td > small { display: block; }
.load-report-overview { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--space-3); align-items: stretch; margin-bottom: 14px; }
.load-report-summary { overflow: hidden; margin: 0; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); box-shadow: 0 8px 24px color-mix(in srgb, var(--shadow-color) 3%, transparent); }
.load-report-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 0; }
.load-report-overview .load-report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.load-report-overview .load-report-stats .stat-card:nth-child(4) { border-left: 0; }
.load-report-overview .load-report-stats .stat-card:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
.load-report-stats + .load-report-stats { border-top: 1px solid var(--line-soft); }
.load-report-stats .stat-card { min-width: 0; padding: 7px var(--space-3) 6px; background: transparent; border: 0; border-left: 1px solid var(--line-soft); border-radius: 0; box-shadow: none; }
.load-report-stats .stat-card:first-child { border-left: 0; }
.load-report-stats .stat-card strong { overflow: hidden; font-size: var(--font-size-heading-small); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.load-report-stats .stat-card span { display: block; margin-top: 2px; font-size: var(--font-size-caption); line-height: 1.2; }
.load-verification-panel { overflow: hidden; margin: 0; }
.load-verification-panel .panel-header { padding: 11px 18px; }
.load-verification-panel .panel-header h2 { font-size: var(--font-size-body); }
.load-verification-panel .panel-body { padding: 11px 18px var(--space-3); }
.load-verification-panel .alert { padding: 7px 10px; font-size: var(--font-size-caption); }
.load-verification-panel .version-metrics { gap: 6px; }
.load-verification-panel .version-metrics article { padding: 7px 10px; border-radius: var(--radius-control); }
.load-verification-panel .version-metrics strong { font-size: var(--font-size-section); line-height: 1.15; }
.load-verification-panel .version-metrics span { font-size: var(--font-size-caption); }
.load-verification-panel .panel-body > p { margin: 9px 0 0; font-size: var(--font-size-caption); }
.panel.load-items-panel { overflow: hidden; border-radius: var(--radius-surface); }
.load-items-panel > .panel-header:first-child { border-radius: var(--radius-surface) var(--radius-surface) 0 0; }
.load-latency-stats { margin-top: 0; }
.load-findings-panel { margin-bottom: var(--space-5); overflow: hidden; }
.load-finding-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding: 18px 22px 22px; }
.load-finding-group { overflow: hidden; border: 1px solid var(--line-soft); border-left-width: 4px; border-radius: var(--radius-surface); }
.load-finding-group.loss { border-left-color: var(--danger-line); }
.load-finding-group.difference { border-left-color: var(--warning-line); }
.load-finding-group.infrastructure { border-left-color: var(--accent); }
.load-finding-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: 13px 14px; background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.load-finding-group-head > div { display: grid; gap: 3px; }
.load-finding-group-head > div > strong { font-size: var(--font-size-body); }
.load-finding-group-head small { color: var(--text-muted); font-family: Consolas, monospace; }
.load-finding-group-head > strong { display: grid; place-items: center; min-width: 30px; height: 30px; color: var(--text-strong); background: var(--surface-muted); border-radius: 50%; }
.load-finding-examples { display: grid; }
.load-finding-examples > button { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.4fr) auto; gap: 10px; padding: 10px 14px; text-align: left; color: inherit; background: var(--surface-card); border: 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.load-finding-examples > button:hover { background: var(--surface-shell); }
.load-finding-examples > button span { font-weight: 700; }
.load-finding-examples > button small { color: var(--text-muted); }
.load-finding-examples > button code { color: var(--danger); white-space: nowrap; }
.load-finding-examples > small { padding: 9px 14px; color: var(--text-muted); }
.load-report-filters { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(190px, .8fr) minmax(170px, .7fr) minmax(180px, .7fr); gap: 14px; align-items: end; border-bottom: 1px solid var(--line-soft); }
.load-report-column-chooser { display: grid; gap: 14px; padding: var(--space-4) var(--space-5); background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.load-report-column-heading { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; }
.load-report-column-heading > div { display: grid; gap: 3px; }
.load-report-column-heading small { color: var(--text-muted); }
.load-report-column-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.load-report-column-options label { display: inline-flex; gap: 7px; align-items: center; min-height: 34px; padding: 6px 10px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); color: var(--text-strong); font-size: var(--font-size-small); font-weight: 600; cursor: pointer; }
.load-report-column-options label:has(input:checked) { background: var(--accent-soft); border-color: var(--line-soft); color: var(--accent); }
.load-report-column-options label small { color: var(--text-muted); font-weight: 600; }
.load-item-timestamp { white-space: nowrap; }
.load-item-identity { overflow-wrap: anywhere; }
.load-item-identity > strong, .load-item-identity > small { display: block; }
.load-item-identity > small { margin-top: 3px; color: var(--text-muted); }
.load-item-timestamp strong, .load-item-timestamp small { display: block; }
.load-item-timestamp small { margin-top: 3px; color: var(--text-muted); }
.load-finding-result { background: var(--warning-soft); }
.load-test-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .65fr); gap: var(--space-5); align-items: start; }
.load-test-filter-panel { margin-bottom: var(--space-5); }
.load-test-filter-grid { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(250px, 1fr) minmax(160px, .65fr) minmax(190px, .7fr); gap: 14px; align-items: end; }
.load-test-filter-summary { display: grid; gap: 3px; min-height: 42px; padding: 7px var(--space-3); border-left: 1px solid var(--line-soft); }
.load-test-filter-summary small, .panel-header small { color: var(--text-muted); }
.load-test-table td { vertical-align: middle; }
.load-test-table td:first-child { min-width: 220px; }
.load-test-table .table-primary-link { display: block; max-width: 48ch; overflow-wrap: anywhere; }
.load-test-created-at { white-space: nowrap; }
.load-test-run-action { display: grid; gap: 5px; justify-items: end; min-width: 180px; }
.load-test-run-action > small { max-width: 240px; text-align: right; }
.table-primary-link { color: var(--text-strong); font-weight: 700; text-decoration: none; }
.table-primary-link:hover { color: var(--accent); text-decoration: underline; }
.load-test-latest-run { display: inline-grid; gap: 5px; text-decoration: none; }
.load-test-latest-run small { color: var(--text-muted); }
.load-test-editor { overflow: hidden; }
.load-workflow-selection { display: flex; align-items: flex-end; gap: var(--space-3); }
.load-workflow-selection > .form-field { flex: 1; min-width: 0; }
.load-workflow-selection > .button { flex-shrink: 0; min-height: 44px; }
.workflow-details-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); color: var(--text-strong); background: var(--surface-card); box-shadow: 0 24px 80px color-mix(in srgb, var(--shadow-color) 30%, transparent); }
.workflow-details-dialog::backdrop { background: var(--overlay); }
.workflow-details-content { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: min(850px, calc(100dvh - 36px)); }
.workflow-details-dialog .release-modal-header { background: var(--surface-shell); border-color: var(--line-soft); }
.workflow-details-dialog .release-modal-header > div { min-width: 0; }
.workflow-details-dialog h3 { overflow-wrap: anywhere; }
.workflow-details-dialog .release-modal-header > button { flex-shrink: 0; }
.workflow-details-dialog .release-modal-footer { flex-wrap: wrap; border-color: var(--line-soft); background: var(--surface-shell); }
.workflow-details-body { align-content: start; }
.workflow-details-body.is-steps { overflow: hidden; }
.workflow-preview-workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-4); min-height: 0; height: 100%; }
.workflow-preview-step-list { display: block; min-width: 0; min-height: 0; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-section); align-self: stretch; }
.workflow-preview-step-list > h4 { position: sticky; top: 0; z-index: 1; margin: 0 !important; padding: 14px; background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.workflow-preview-step { display: flex; flex-shrink: 0; gap: 10px; width: 100%; height: auto; padding: var(--space-3); border: 0; border-bottom: 1px solid var(--line-soft); color: var(--text-strong); background: var(--surface-card); text-align: left; line-height: 1.4; cursor: pointer; }
.workflow-preview-step > span:last-child { display: grid; gap: 5px; min-width: 0; }
.workflow-preview-step strong { font-size: var(--font-size-caption); overflow-wrap: anywhere; }
.workflow-preview-step small, .workflow-preview-step code { color: var(--text-muted); font-size: var(--font-size-caption); }
.workflow-preview-step.selected { background: var(--accent-soft); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-preview-step:hover { background: var(--surface-shell); }
.workflow-preview-step.is-disabled { opacity: .65; }
.workflow-inspector { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-section); overflow: hidden; }
.workflow-inspector-heading { display: block; padding: 14px var(--space-4); }
.workflow-inspector-heading h4 { overflow-wrap: anywhere; }
.workflow-inspector-body { display: grid; align-content: start; gap: var(--space-3); min-height: 0; padding: 14px; overflow-y: auto; }
.workflow-inspect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) 18px; }
.workflow-inspect-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.workflow-inspect-field.full { grid-column: 1 / -1; }
.workflow-inspect-field > span { color: var(--text-muted); font-size: var(--font-size-caption); }
.workflow-inspect-field > strong { font-size: var(--font-size-caption); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow-details-body pre { max-width: 100%; margin: 0; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-shell); border-radius: var(--radius-compact); font-size: var(--font-size-dense); line-height: 1.55; }
.workflow-inspect-item { display: grid; gap: 10px; padding: var(--space-3) 0; border-bottom: 1px solid var(--line-soft); }
.workflow-inspect-item:first-of-type { padding-top: 0; }
.workflow-inspect-item:last-child { padding-bottom: 0; border: 0; }
.workflow-inspect-pairs { display: grid; gap: var(--space-2); }
.workflow-inspect-pairs > div { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 10px; align-items: start; font-size: var(--font-size-caption); }
.workflow-preview-run { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); color: var(--text-strong); background: var(--surface-card); text-align: left; cursor: pointer; }
.workflow-preview-run:hover { background: var(--accent-soft); }
@media (max-width: 800px) {
    .workflow-preview-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: 150px minmax(0, 1fr); gap: 10px; }
    .workflow-inspect-grid { grid-template-columns: minmax(0, 1fr); }
    .workflow-inspect-pairs > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
}
.workflow-details-description { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.workflow-details-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px var(--space-4); background: var(--surface-shell); border-radius: var(--radius-surface); }
.workflow-details-facts > div { display: grid; gap: 5px; overflow-wrap: anywhere; }
.workflow-details-facts span, .workflow-details-tags, .workflow-detail-next > span { color: var(--text-muted); font-size: var(--font-size-caption); }
.workflow-details-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.workflow-details-body h4 { margin: 0 0 var(--space-2); }
.workflow-details-steps { display: grid; gap: var(--space-3); }
.workflow-detail-step { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.workflow-detail-step.is-disabled { background: var(--surface-shell); border-style: dashed; }
.workflow-detail-step > p { margin: 0; white-space: pre-wrap; }
.workflow-detail-step-heading { display: flex; gap: var(--space-3); align-items: flex-start; }
.workflow-detail-step-heading > div { min-width: 0; overflow-wrap: anywhere; }
.workflow-detail-step-heading h4 { margin: 2px 0 0; }
.workflow-detail-order { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.workflow-detail-endpoint, .workflow-detail-rule { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); font-size: var(--font-size-small); }
.workflow-detail-endpoint { padding: 10px var(--space-3); background: var(--surface-shell); border-radius: var(--radius-control); }
.workflow-detail-endpoint > strong { color: var(--accent); font-size: var(--font-size-caption); }
.workflow-details-dialog code { overflow-wrap: anywhere; white-space: pre-wrap; }
.workflow-detail-checks summary, .workflow-details-variables summary { cursor: pointer; font-size: var(--font-size-small); font-weight: 600; }
.workflow-detail-checks ul { display: grid; gap: 10px; margin: var(--space-3) 0 0; padding-left: var(--space-5); }
.workflow-detail-checks li > * { display: block; overflow-wrap: anywhere; font-size: var(--font-size-caption); }
.workflow-detail-checks li > span { color: var(--text-muted); margin: 3px 0; }
.workflow-detail-next { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: var(--font-size-caption); }
.workflow-details-variables { padding: 14px var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.workflow-detail-variable { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px var(--space-3); padding-top: var(--space-3); font-size: var(--font-size-caption); }
.workflow-detail-variable > :nth-child(3), .workflow-detail-variable > small { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .load-workflow-selection { align-items: stretch; flex-direction: column; }
    .load-workflow-selection > .button { align-self: flex-start; }
    .workflow-details-dialog .release-modal-header, .workflow-details-dialog .release-modal-body, .workflow-details-dialog .release-modal-footer { padding: 14px; }
    .workflow-details-dialog h3 { font-size: var(--font-size-heading-small); }
    .workflow-details-facts { grid-template-columns: 1fr; }
    .workflow-detail-step { padding: var(--space-3); }
}
.load-editor-section { display: grid; gap: 15px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.load-editor-section:last-of-type { border-bottom: 0; }
.load-section-title { display: flex; gap: 11px; align-items: center; }
.load-section-title > span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; color: var(--text-on-accent); background: var(--accent-solid); border-radius: 50%; font-weight: 700; }
.load-section-title > div { display: grid; gap: 2px; }
.load-section-title small, .load-subsection-title small { color: var(--text-muted); }
.load-token-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px var(--space-3); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.load-token-strip > span { margin-right: 3px; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; }
.load-token-strip code { padding: 3px 7px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-compact); }
.load-config-list { display: grid; gap: 10px; }
.load-config-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(120px, .85fr) 130px minmax(240px, 1.25fr) auto; gap: 9px; align-items: end; padding: var(--space-3); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.load-row-checks { display: flex; flex-wrap: wrap; gap: 6px var(--space-3); align-items: center; min-height: 42px; }
.load-row-checks label { display: inline-flex; gap: 5px; align-items: center; color: var(--text-main); font-size: var(--font-size-caption); font-weight: 600; }
.load-verification-card { display: grid; gap: 14px; padding: 15px; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.load-verification-header { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 9px; align-items: end; }
.load-subsection-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: var(--space-1); }
.load-subsection-title > div { display: grid; gap: 3px; }
.load-check-presets { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 7px !important; }
.load-assertion-row { display: grid; grid-template-columns: minmax(150px, .8fr) 150px minmax(220px, 1.2fr); gap: 9px; align-items: center; padding: 11px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.load-assertion-row > .button { justify-self: start; }
.load-profile-list, .load-run-list { display: grid; }
.load-profile-item { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); align-items: center; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.load-profile-item:last-child { border-bottom: 0; }
.load-profile-item.selected { background: var(--surface-shell); }
.load-profile-item > button:first-child { display: grid; gap: 3px; min-width: 0; padding: 0; text-align: left; background: none; border: 0; cursor: pointer; }
.load-profile-item small, .load-run-list small { color: var(--text-muted); }
.load-run-list > a { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); padding: var(--space-3) 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.load-run-list > a:last-child { border-bottom: 0; }
.load-run-list > a > span:first-child { display: grid; gap: 3px; }
.load-run-list .inline-progress { grid-column: 1 / -1; }
.load-live-panel { margin-bottom: var(--space-5); min-width: 0; }
.load-workspace-tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: var(--space-6); }
.load-workspace-tabs > button { flex: 0 0 auto; }
.load-overview-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.load-profile-brief .panel-body { padding: var(--space-4) 22px; }
.load-profile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.load-profile-description { margin: 0 0 var(--space-4); color: var(--text-main); font-size: var(--font-size-small); line-height: 1.65; overflow-wrap: anywhere; }
.load-profile-facts { margin: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 18px; }
.load-profile-facts > div { min-width: 0; }
.load-profile-facts dt { font-size: var(--font-size-caption); color: var(--text-muted); margin-bottom: 7px; }
.load-profile-facts dd { margin: 0; font-weight: 600; font-size: var(--font-size-small); overflow-wrap: anywhere; }
.load-profile-facts .load-profile-stat { padding-left: 18px; border-left: 1px solid var(--line-soft); }
.load-profile-stat dd { font-size: var(--font-size-metric); line-height: 1.2; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.load-profile-stat dd small { font-size: var(--font-size-small); font-weight: 600; }
.load-profile-verification { margin: 14px 0 0; color: var(--text-muted); font-size: var(--font-size-caption); }
.load-overview-execution { min-width: 0; }
.load-overview-run-heading { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 14px; min-width: 0; }
.load-overview-run-meta { font-size: var(--font-size-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.load-overview-history-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding: 14px 22px; border-top: 1px solid var(--line-soft); }
.load-overview-history-heading h3 { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--font-size-small); }
.load-history-panel { margin-bottom: var(--space-6); }
.load-history-panel .panel-header { flex-wrap: wrap; gap: var(--space-3); }
.load-history-panel .panel-header small { display: block; margin-top: 5px; color: var(--text-muted); }
.load-history-table { width: 100%; min-width: 620px; }
.load-history-table td { padding: 14px 18px; }
.load-history-table td small { display: block; font-size: var(--font-size-caption); }
.load-history-table tr.selected { background: var(--accent-soft); }
.load-history-link { border: 0; background: transparent; color: var(--text-strong); cursor: pointer; font-weight: 700; padding: 5px 0; text-decoration: underline; text-underline-offset: 3px; }
.load-history-empty { padding: 22px; margin: 0; }
.load-run-picker { margin-bottom: var(--space-3); }
.load-run-picker-row { display: flex; align-items: center; gap: 10px var(--space-4); flex-wrap: wrap; }
.load-run-switcher { position: relative; display: flex; align-items: center; max-width: 100%; color: var(--text-strong); }
.load-run-switcher > i { position: absolute; pointer-events: none; font-size: var(--font-size-caption); }
.load-run-switcher > i:first-child { left: 12px; }
.load-run-switcher select { --select-padding-start: 34px; width: 296px; max-width: 100%; --field-font-size: var(--font-size-field-compact); }
.load-run-switcher select:hover { border-color: var(--accent); background: var(--surface-card); }
.load-run-switcher select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.load-run-history-expanded { margin-top: var(--space-3); }
.load-run-picker-context { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: var(--font-size-caption); }
.load-run-picker-row > button { margin-left: auto; }
.load-test-settings { max-width: none; margin: 0; }
.load-settings-content > .load-settings-toolbar { position: sticky; top: 8px; z-index: 3; gap: 14px; padding: 14px var(--space-5); background: var(--surface-card); border-radius: var(--radius-surface) var(--radius-surface) 0 0; }
.load-settings-toolbar h2 { margin: 0 0 var(--space-1); font-size: var(--font-size-section); }
.load-settings-toolbar small { font-size: var(--font-size-caption); color: var(--text-muted); }
.load-settings-toolbar > .button { flex: 0 0 auto; white-space: nowrap; box-shadow: none; }
.load-settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.load-settings-nav { display: grid; position: sticky; top: var(--space-2); }
.load-settings-nav button { align-items: flex-start; padding-block: var(--space-3); }
.load-settings-nav i { margin-top: 3px; width: 18px; flex: 0 0 18px; }
.load-settings-nav button > span { display: grid; gap: 5px; }
.load-settings-nav strong { font-size: var(--font-size-small); }
.load-settings-nav small { font-size: var(--font-size-caption); line-height: 1.5; color: var(--text-muted); }
.load-settings-content { min-width: 0; overflow: visible; }
.load-settings-content .panel-body { display: grid; gap: var(--space-5); padding: var(--space-6); }
.load-settings-content .form-field { min-width: 0; }
.load-settings-content h3 { margin: 0 0 var(--space-3); font-size: var(--font-size-body); color: var(--text-strong); }
.load-settings-intro { margin: 0; line-height: 1.65; color: var(--text-muted); font-size: var(--font-size-small); }
.load-profile-activation { display: grid; gap: var(--space-2); padding-top: 18px; border-top: 1px solid var(--line-soft); }
.load-profile-activation small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.5; }
.load-rate-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.load-rate-fields small { font-size: var(--font-size-caption); color: var(--text-muted); line-height: 1.5; }
.load-rate-preview { display: grid; gap: var(--space-3); padding: 22px; background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.load-rate-preview strong { font-size: var(--font-size-section); color: var(--text-strong); }
.load-rate-preview > span:not(.eyebrow) { font-size: var(--font-size-small); color: var(--text-main); }
.load-rate-preview small { font-size: var(--font-size-caption); color: var(--text-muted); line-height: 1.6; }
.load-settings-subheading { padding-top: var(--space-5); border-top: 1px solid var(--line-soft); }
.load-settings-subheading h3 { margin-bottom: 6px; }
.load-settings-subheading p { margin: 0; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.6; }
.load-settings-content .load-config-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; background: var(--surface-shell); }
.load-settings-content .load-row-checks { grid-column: 1 / -1; grid-row: 2; min-height: 0; border-top: 1px solid var(--line-soft); padding-top: var(--space-3); }
.load-settings-content .load-config-row > button { grid-row: 1; grid-column: 4; }
.load-settings-content .load-assertion-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.load-settings-content .load-assertion-row > button { justify-self: end; grid-column: 1 / -1; }
.load-verification-schedule { padding: 18px; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.load-verification-empty { display: flex; gap: 14px; align-items: flex-start; padding: var(--space-5); background: var(--surface-shell); border: 1px dashed var(--line-soft); border-radius: var(--radius-surface); color: var(--text-main); }
.load-verification-empty > i { font-size: var(--font-size-heading-small); margin-top: 2px; }
.load-verification-empty p { margin: var(--space-2) 0 0; line-height: 1.6; font-size: var(--font-size-caption); }
.load-verification-enabled { font-size: var(--font-size-caption); }
.load-request-options { border: 1px solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface-card); }
.load-request-options summary { padding: var(--space-3) 14px; cursor: pointer; color: var(--text-muted); font-weight: 600; font-size: var(--font-size-caption); }
.load-request-options > .form-grid { padding: var(--space-1) 14px var(--space-4); }
.load-settings-content .load-subsection-title { flex-wrap: wrap; padding-top: var(--space-4); border-top: 1px solid var(--line-soft); }
@media (max-width: 1000px) { .load-settings-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } .load-settings-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .load-rate-fields, .load-settings-content .load-config-row, .load-settings-content .load-assertion-row { grid-template-columns: minmax(0, 1fr); } .load-settings-content .load-row-checks { grid-row: auto; } .load-settings-content .load-config-row > button { grid-row: auto; grid-column: 1; justify-self: end; } .load-settings-content .panel-body { padding: 18px; } }
.load-test-settings .panel-header small { display: block; margin-top: 6px; color: var(--text-muted); }
.load-run-latencies { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; }
.load-verification-note { font-size: var(--font-size-caption); line-height: 1.5; }
.load-data-summary { margin: var(--space-5) 0; }
.load-data-summary > summary { padding: var(--space-4) 0; cursor: pointer; font-weight: 600; color: var(--text-strong); }
.load-report-tabs button { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 1050px) {
    .load-profile-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .load-profile-facts > div { grid-column: span 3; }
    .load-profile-facts .load-profile-stat { grid-column: span 2; border-left: 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 650px) { .load-run-latencies { grid-template-columns: repeat(2, minmax(0, 1fr)); } .load-run-picker-row > button { margin-left: 0; } .load-test-settings .panel-header { flex-wrap: wrap; gap: var(--space-3); } }
.load-test-sidebar .load-live-panel { margin-bottom: 0; }
.load-live-panel .panel-header { gap: 10px; }
.load-live-panel .panel-header > div { min-width: 0; }
.load-live-panel .panel-body { padding: var(--space-4); }
.load-live-indicator { display: inline-flex; gap: 6px; align-items: center; margin-bottom: var(--space-1); }
.load-live-indicator.running::before { content: ""; width: 7px; height: 7px; background: var(--success-solid); border-radius: 50%; animation: live-pulse 1.4s ease-in-out infinite; }
.load-live-run-title { display: flex; gap: var(--space-2); justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--space-4); overflow-wrap: anywhere; }
.load-live-run-title small, .load-live-iteration small, .load-live-footer small { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.load-live-progress-heading, .load-live-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin: var(--space-3) 0 7px; font-size: var(--font-size-caption); }
.load-live-progress-heading strong { white-space: nowrap; }
.load-live-panel .inline-progress > span { transition: width .35s ease; }
.load-live-panel .inline-progress.verification > span { background: var(--success-solid); }
.load-live-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 10px 0 var(--space-4); }
.load-live-metrics.finished { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.load-live-metrics > div { display: grid; gap: 3px; padding: var(--space-2) var(--space-1); background: var(--surface-shell); border-radius: var(--radius-control); text-align: center; }
.load-live-metrics strong { font-size: var(--font-size-section); font-variant-numeric: tabular-nums; }
.load-live-metrics span { font-size: var(--font-size-dense); color: var(--text-muted); white-space: nowrap; }
.load-live-panel.compact .load-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.load-live-panel.compact .load-live-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: var(--space-2); }
.load-live-metrics .passed strong { color: var(--success); }
.load-live-metrics .failed strong, .load-live-error { color: var(--danger); }
.load-live-phase { padding: 10px; background: var(--surface-muted); border-radius: var(--radius-control); font-size: var(--font-size-caption); }
.load-live-iterations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-2); }
.load-live-panel.compact .load-live-iterations { grid-template-columns: minmax(0, 1fr); }
.load-live-iteration { min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-control); padding: 10px; font-size: var(--font-size-caption); }
.load-live-iteration.active { border-left: 3px solid var(--accent); background: var(--surface-card); }
.load-live-iteration > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.load-thread-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: var(--space-3); border-top: 1px solid var(--line-soft); color: var(--text-muted); }
.load-thread-pagination > div { display: flex; align-items: center; gap: var(--space-3); }
.load-thread-pagination button { min-width: 36px; }
.load-thread-progress > .load-live-section-heading { margin: 9px 0 5px; }
.load-thread-grid { gap: 6px; }
.load-thread-card { padding: 7px 9px; border-left: 3px solid var(--line-soft); border-radius: var(--radius-control); }
.load-thread-count { margin-left: auto; line-height: 1.2; }
.load-thread-count > strong { color: var(--text-strong); font-size: var(--font-size-section); font-variant-numeric: tabular-nums; }
.load-thread-count > strong > span { color: var(--text-muted); font-size: var(--font-size-dense); font-weight: 600; }
.load-thread-card .inline-progress { height: 3px; margin-top: 5px; }
.load-thread-stats { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px var(--space-2); margin-top: 5px; }
.load-thread-outcomes { display: flex; flex-wrap: wrap; gap: 3px 9px; color: var(--text-muted); font-size: var(--font-size-dense); }
.load-thread-outcomes > span { white-space: nowrap; }
.load-thread-outcomes strong { font-variant-numeric: tabular-nums; }
.load-thread-outcomes .passed { color: var(--success); }
.load-thread-outcomes .failed { color: var(--danger); }
.load-thread-duration { margin-left: auto; white-space: nowrap; font-size: var(--font-size-dense); }
.load-thread-current { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; margin-top: 5px; }
.load-thread-current > small { white-space: nowrap; }
.load-thread-current .load-live-step { flex: 1 1 100px; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-size-dense); }
.load-thread-state { display: block; margin-top: var(--space-1); }
.load-live-step { display: block; color: var(--text-main); margin-top: 7px; overflow-wrap: anywhere; }
.load-live-outcomes { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); font-size: var(--font-size-dense); color: var(--text-muted); }
.load-live-outcomes .status-badge { font-size: var(--font-size-dense); }
.load-live-error { margin: var(--space-2) 0 0; font-size: var(--font-size-dense); overflow-wrap: anywhere; max-height: 7em; overflow-y: auto; }
.load-live-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); padding-top: 14px; font-size: var(--font-size-caption); }
.load-live-refresh-error { color: var(--warning); background: var(--warning-soft); padding: var(--space-2); font-size: var(--font-size-caption); border-radius: var(--radius-compact); }
@media (prefers-reduced-motion: reduce) { .load-live-indicator.running::before { animation: none; } .load-live-panel .inline-progress > span { transition: none; } }
.load-item-error { display: block; max-width: 360px; margin-top: 5px; color: var(--danger); }
.load-item-detail-row:hover { background: transparent; }
.load-item-detail-row > td { padding: 0 14px 18px; background: var(--surface-shell); }
.load-item-detail-grid { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); gap: var(--space-4); padding: 15px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.load-item-detail-grid h3 { margin: 0 0 10px; font-size: var(--font-size-body); }
.load-item-detail-grid section { min-width: 0; }
.load-item-detail-grid details { margin-bottom: var(--space-2); padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
@media (max-width: 1150px) {
    .load-report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .load-report-stats .stat-card:nth-child(4) { border-left: 0; }
    .load-report-stats .stat-card:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
    .load-test-workspace { grid-template-columns: 1fr; }
    .load-test-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-test-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-config-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-config-row .button { justify-self: start; }
    .load-finding-groups, .load-report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .load-report-overview { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .load-report-overview .load-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-report-stats .stat-card:nth-child(even) { border-left: 1px solid var(--line-soft); }
    .load-report-stats .stat-card:nth-child(odd) { border-left: 0; }
    .load-report-stats .stat-card:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
    .load-test-filter-grid { grid-template-columns: 1fr; }
    .load-test-sidebar, .load-item-detail-grid { grid-template-columns: 1fr; }
    .load-config-row, .load-verification-header, .load-assertion-row { grid-template-columns: 1fr; }
    .load-finding-groups, .load-report-filters { grid-template-columns: 1fr; }
    .load-finding-examples > button { grid-template-columns: 1fr; }
}

.topbar .topbar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

/* The language switch lives in the avatar menu and account pages (no longer in the sidebar). */
.sidebar-language-switch {
    display: flex;
    gap: 14px;
    margin: 0;
    border-bottom: 1px solid var(--line-soft);
}

.sidebar-language-switch button {
    position: relative;
    min-width: 28px;
    height: 31px;
    padding: 0 2px 7px;
    border: 0;
    border-radius: 0;
    color: var(--text-muted);
    background: transparent;
    box-shadow: none;
    font-size: var(--font-size-section);
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease;
}

.sidebar-language-switch button:hover {
    color: var(--accent, var(--text-strong));
    background: transparent;
}

.sidebar-language-switch button::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: var(--radius-compact) var(--radius-compact) 0 0;
    background: transparent;
    content: "";
}

.sidebar-language-switch button.active {
    color: var(--text-strong);
    background: transparent;
}

.sidebar-language-switch button.active::after {
    background: var(--accent, var(--accent-solid));
}

.sidebar-language-switch button:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 1px;
}

.project-card-list {
    display: grid;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.project-card:last-child {
    border-bottom: 0;
}

.project-card.selected {
    background: var(--accent-soft, var(--surface-muted));
    box-shadow: inset 3px 0 var(--accent, color-mix(in srgb, var(--shadow-color) 100%, transparent));
}

.project-card > div {
    display: grid;
    gap: var(--space-1);
}

.project-card span,
.project-card small {
    color: var(--text-muted);
}

.project-table td { vertical-align: middle; }
.project-table tbody tr.selected { background: var(--accent-soft, var(--surface-muted)); box-shadow: inset 3px 0 var(--accent, color-mix(in srgb, var(--shadow-color) 100%, transparent)); }
.project-table tbody tr.selected:hover { background: var(--accent-soft, var(--surface-muted)); }
.project-description { display: block; max-width: 480px; color: var(--text-muted); }
.project-updated { white-space: nowrap; }
.project-editor-panel { max-width: 820px; }
.project-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-1); border-top: 1px solid var(--line-soft); }

@media (max-width: 680px) {
    .project-editor-actions { align-items: stretch; flex-direction: column-reverse; }
    .project-editor-actions > .actions { justify-content: stretch; }
    .project-editor-actions > .actions > * { flex: 1; }
}

.nav-submenu {
    display: grid;
    gap: var(--space-1);
    margin: var(--space-1) 0 var(--space-2) 25px;
    padding-left: 9px;
    border-left: 1px solid var(--line-soft);
}

.nav-menu .nav-submenu a {
    min-height: 32px;
    padding: 7px 10px;
    font-size: var(--font-size-caption);
}

.nav-menu .nav-submenu a i {
    width: 15px;
    font-size: var(--font-size-caption);
}

@media (max-width: 760px) {
    .workspace-topbar,
    .topbar .topbar-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar .topbar-controls {
        width: 100%;
    }
    .target-workspace-picker select { width: 100%; }

}
.stat-card { padding: 22px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.stat-card strong { display: block; font-size: var(--font-size-metric-emphasized); }
.stat-card span { color: var(--text-muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-3);
}
.form-field-row > .form-field {
    grid-row: span 2;
    grid-template-rows: subgrid;
    align-items: start;
    min-width: 0;
}
.form-field-row > .form-field:has(> small) { grid-row: span 3; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > span, .field-label { color: var(--text-main); font-size: var(--font-size-small); font-weight: 600; }
/* FormField: the inner label names only the control and looks like the legacy span label; long values may shrink the field. */
.form-field > span > .form-field-label { display: inline; margin: 0; padding: 0; color: inherit; font: inherit; }
.form-field:has(> span > .form-field-label) { min-width: 0; }
/* Required mark: visual only (aria-hidden); the control carries aria-required. Generated text keeps the label text exact. */
.required-mark::after { content: "*"; margin-inline-start: var(--space-1); color: var(--danger); }
/* One class for field errors: Blazor ValidationMessage, FormField and the page's own checks. */
.validation-message,
.form-field .validation-message { color: var(--danger); font-size: var(--font-size-caption); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.form-field > .validation-message, .form-field-messages > .validation-message { margin: 0; }
.form-field-messages { display: grid; gap: var(--space-1); min-width: 0; }
/* Invalid controls: Blazor sets .invalid / aria-invalid; page checks set aria-invalid or show an error inside the field. */
.form-control.form-control:is(.invalid, [aria-invalid="true"]),
.form-field:has(> .validation-message, > .form-field-messages) > .form-control.form-control { border-color: var(--danger); }
.form-control.form-control:is(.invalid, [aria-invalid="true"]):focus,
.form-field:has(> .validation-message, > .form-field-messages) > .form-control.form-control:focus { border-color: var(--danger); outline: 2px solid var(--accent); outline-offset: 1px; }
.form-control, input.form-control, select.form-control, textarea.form-control {
    width: 100%; min-height: 42px; padding: 10px var(--space-3); color: var(--text-strong); background: var(--surface-card);
    border: 1px solid var(--line-soft); border-radius: var(--radius-section); outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shadow-color) 11%, transparent); }
textarea.form-control { min-height: 95px; resize: vertical; }
textarea.code { min-height: 220px; font-family: Consolas, monospace; font-size: var(--font-size-small); }
textarea.small-code { min-height: 92px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: 0; grid-column: 1 / -1; margin-top: var(--space-1); }
.check-field { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; }
.check-field input { width: 17px; height: 17px; }
.validation-errors, .alert { padding: var(--space-3) 14px; overflow-wrap: anywhere; border-radius: var(--radius-control); }
.validation-errors, .alert-error { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-line); }
/* Neutral notes and run progress: informational, never a success or error verdict. */
.alert-info { color: var(--text-main); background: var(--info-soft); border: 1px solid var(--info-line); }
.api-url-warning, .api-preview-warning { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.api-preview-warning { margin-top: 10px; padding: 9px 11px; font-size: var(--font-size-small); }

.button, button.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px var(--space-4); border: 0; border-radius: var(--radius-section); color: var(--text-on-accent); background: var(--accent-solid); text-decoration: none; cursor: pointer; box-shadow: 0 8px 18px color-mix(in srgb, var(--shadow-color) 14%, transparent); }
.button:hover { background: var(--accent-solid); }
.button.secondary { color: var(--text-strong); background: var(--surface-muted); }
.button.secondary:hover { background: var(--surface-muted); }
.button.danger { color: var(--danger); background: var(--danger-soft); }
.button.danger:hover { background: var(--danger-soft); }
.button.small { min-height: 32px; padding: 6px 10px; font-size: var(--font-size-small); }
.button:disabled { opacity: .5; cursor: not-allowed; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--space-3) 15px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--text-muted); background: var(--surface-shell); font-size: var(--font-size-caption); letter-spacing: .02em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-card); }
.actions { display: flex; gap: 7px; justify-content: flex-end; }

/* Editable item headers keep selection and ordering/deletion controls on one line. */
.editor-item-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); }
.editor-item-heading > .check-field { min-width: 0; min-height: var(--control-height); margin: 0; font-size: var(--font-size-caption); }
.editor-item-heading > .check-field input { flex-shrink: 0; }
.editor-item-heading > .check-field span { min-width: 0; overflow-wrap: anywhere; }
.editor-item-actions { align-items: center; flex-wrap: nowrap; gap: var(--space-1); }
.editor-item-actions.wrap { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.editor-item-actions.wrap > .button { max-width: 100%; }
.mono { font-family: Consolas, monospace; font-size: var(--font-size-caption); }
.muted { color: var(--text-muted); }
.url-stack { display: grid; gap: 5px; min-width: 0; }
.url-stack code { display: block; max-width: 520px; overflow: hidden; color: var(--text-main); text-overflow: ellipsis; white-space: nowrap; }

.status-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-2); border-radius: var(--radius-pill); color: var(--text-main); background: var(--surface-muted); font-size: var(--font-size-caption); font-weight: 700; }
.status-badge.status-badge-wrap { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
/* Status and HTTP-method colors are defined once in the "Status colors" block near the end of this file. */

.empty-state { padding: 34px var(--space-5); text-align: center; color: var(--text-muted); }
.empty-state strong { color: var(--text-strong); font-size: var(--font-size-section); }
.empty-state p { margin: 7px 0 var(--space-4); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Operational dashboard */
.dashboard-filter-bar { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 10px; align-items: end; margin-bottom: var(--space-4); padding: 13px 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); box-shadow: 0 7px 24px color-mix(in srgb, var(--shadow-color) 3%, transparent); }
.dashboard-filter-bar label { display: grid; gap: 5px; min-width: 0; }
.dashboard-filter-bar label > span { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; }
.dashboard-filter-bar .form-control { min-height: 36px; padding: 7px 9px; border-radius: var(--radius-control); font-size: var(--font-size-small); }
.dashboard-status-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.status-metric { display: flex; align-items: center; gap: 9px; padding: 9px var(--space-3); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.status-metric > span { display: grid; place-items: center; width: 25px; height: 25px; color: var(--text-main); background: var(--surface-muted); border-radius: 50%; font-weight: 700; }
.status-metric div { display: grid; line-height: 1.1; }
.status-metric strong { font-size: var(--font-size-section); }.status-metric small { color: var(--text-muted); }
.status-metric.passed > span { color: var(--success); background: var(--success-soft); }.status-metric.failed > span { color: var(--danger); background: var(--danger-soft); }.status-metric.running > span { color: var(--accent); background: var(--accent-soft); }
.dashboard-primary-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(265px, .9fr); gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
.dashboard-recent-panel, .dashboard-attention-panel, .dashboard-trend-panel, .dashboard-coverage-panel, .dashboard-recent-tests-panel, .dashboard-groups-panel { overflow: hidden; border-radius: var(--radius-surface); }
.dashboard-attention-wide, .dashboard-recent-wide { margin-bottom: var(--space-4); }
.dashboard-attention-wide .attention-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-attention-wide .attention-item { border-right: 1px solid var(--line-soft); }
.dashboard-attention-wide .attention-item:nth-child(3n) { border-right: 0; }
.dashboard-recent-wide .execution-name { max-width: 300px; }
.dashboard-recent-wide .execution-error { max-width: 420px; }
.dashboard-recent-wide .dashboard-execution-table { width: 100%; min-width: 0; table-layout: fixed; }
.dashboard-recent-wide .table-wrap { overflow-x: hidden; }
.dashboard-recent-wide .dashboard-execution-table th:nth-child(1) { width: 112px; }
.dashboard-recent-wide .dashboard-execution-table th:nth-child(2) { width: 24%; }
.dashboard-recent-wide .dashboard-execution-table th:nth-child(3) { width: 16%; }
.dashboard-recent-wide .dashboard-execution-table th:nth-child(4) { width: 92px; }
.dashboard-recent-wide .dashboard-execution-table th:nth-child(5) { width: 82px; }
.dashboard-recent-wide .dashboard-execution-table th:nth-child(7) { width: 58px; }
.dashboard-recent-wide .dashboard-execution-table td { min-width: 0; overflow-wrap: anywhere; }
.dashboard-recent-wide .dashboard-execution-table td:nth-child(2),
.dashboard-recent-wide .dashboard-execution-table td:nth-child(3),
.dashboard-recent-wide .dashboard-execution-table td:nth-child(6) { min-width: 0; }
.dashboard-recent-wide .dashboard-execution-table .button.small { padding-inline: var(--space-2); font-size: var(--font-size-caption); white-space: nowrap; }
.dashboard-recent-wide .dashboard-execution-table td:last-child,
.dashboard-recent-wide .dashboard-execution-table th:last-child { padding-inline: var(--space-2); text-align: center; }
.dashboard-recent-wide .execution-name,
.dashboard-recent-wide .execution-error { max-width: 100%; }
.dashboard-recent-panel .panel-header div, .dashboard-attention-panel .panel-header div, .dashboard-trend-panel .panel-header div, .dashboard-coverage-panel .panel-header div, .dashboard-recent-tests-panel .panel-header div, .dashboard-groups-panel .panel-header > div:first-child { display: grid; gap: 3px; }
.dashboard-recent-panel .panel-header, .dashboard-attention-panel .panel-header, .dashboard-trend-panel .panel-header, .dashboard-coverage-panel .panel-header, .dashboard-recent-tests-panel .panel-header, .dashboard-groups-panel .panel-header { padding: 14px var(--space-4); }
.dashboard-execution-table { font-size: var(--font-size-small); }
.dashboard-execution-table th, .dashboard-execution-table td { padding: 10px 11px; vertical-align: middle; }
.dashboard-execution-table th { white-space: nowrap; }
.dashboard-execution-table td:nth-child(2), .dashboard-execution-table td:nth-child(3), .dashboard-execution-table td:nth-child(6) { min-width: 150px; }
.dashboard-execution-table td:nth-child(4), .dashboard-execution-table td:nth-child(5) { white-space: nowrap; }
.dashboard-execution-table td > strong, .dashboard-execution-table td > small, .dashboard-execution-table td > span { display: block; }
.dashboard-execution-table td > small { margin-top: 3px; color: var(--text-muted); }
.clickable-row { cursor: pointer; }.clickable-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.execution-name { max-width: 235px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-execution-identity { display: grid; gap: 6px; min-width: 0; align-content: center; }
.dashboard-execution-identity .execution-name { margin-top: 0; }
.execution-type-badge { display: inline-flex; width: max-content; padding: 2px 6px; color: var(--text-main); background: var(--surface-muted); border-radius: var(--radius-compact); font-size: var(--font-size-caption); font-weight: 700; }
.type-workflow { color: var(--text-main); background: var(--accent-soft); }.type-cumulativesuite { color: var(--warning); background: var(--warning-soft); }.type-apiscenario { color: var(--accent); background: var(--info-soft); }
.dashboard-status-with-icon { display: inline-flex !important; align-items: center; gap: 5px; }.dashboard-status-with-icon > span:first-child { font-weight: 700; }
.dashboard-execution-actions { white-space: nowrap; }
.dashboard-details-button { width: 32px; min-width: 32px; padding-inline: 0 !important; justify-content: center; }
.integration-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: 14px; }
.integration-connection-name > div { display: grid; gap: 2px; min-width: 0; }
.integration-connection-name > div small { color: var(--text-muted); font-size: var(--font-size-caption); }
.execution-error { display: -webkit-box !important; max-width: 270px; overflow: hidden; color: var(--danger) !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.attention-count { display: grid; place-items: center; min-width: 26px; height: 26px; color: var(--danger); background: var(--danger-soft); border-radius: 50%; font-size: var(--font-size-caption); font-weight: 700; }
.attention-list { display: grid; }
.attention-item { display: grid; grid-template-columns: 1fr auto; gap: 3px var(--space-2); padding: var(--space-3) 14px; color: var(--text-strong); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.attention-item:last-child { border-bottom: 0; }.attention-item:hover { background: var(--surface-card); }
.attention-item .execution-type-badge { grid-column: 1 / -1; }.attention-item > span:not(.execution-type-badge) { color: var(--danger); font-size: var(--font-size-caption); }
.attention-item small { grid-column: 1 / -1; overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.attention-item time { grid-column: 2; grid-row: 2; color: var(--text-muted); font-size: var(--font-size-caption); }
.dashboard-secondary-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); align-items: start; gap: var(--space-4); margin-bottom: var(--space-4); }
.dashboard-side-stack { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.dashboard-recent-tests-panel .panel-header > a { font-size: var(--font-size-caption); font-weight: 700; white-space: nowrap; }
.recent-test-list { display: grid; }
.recent-test-item { position: relative; display: grid; gap: 5px; padding: var(--space-3) 34px var(--space-3) 14px; color: var(--text-strong); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.recent-test-item:last-child { border-bottom: 0; }
.recent-test-item:hover { background: var(--surface-card); }
.recent-test-item > strong { overflow: hidden; font-size: var(--font-size-small); text-overflow: ellipsis; white-space: nowrap; }
.recent-test-item > small { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.recent-test-item > small code { color: var(--text-main); font-size: var(--font-size-caption); }
.recent-test-item > time { color: var(--text-muted); font-size: var(--font-size-caption); }
.recent-test-item > i { position: absolute; top: 50%; right: 14px; color: var(--text-muted); font-size: var(--font-size-caption); transform: translateY(-50%); }
.recent-test-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.test-change-badge { display: inline-flex; width: max-content; padding: 2px 7px; border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.test-change-badge.change-added { color: var(--success); background: var(--success-soft); }
.test-change-badge.change-updated { color: var(--accent); background: var(--accent-soft); }
.trend-legend { display: flex !important; grid-auto-flow: column; gap: var(--space-3) !important; font-size: var(--font-size-caption); }
.trend-legend span::before { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; content: ""; }
.trend-legend .passed::before { background: var(--success-solid); }.trend-legend .failed::before { background: var(--danger-solid); }.trend-legend .skipped::before { background: var(--warning-solid); }
.trend-chart { display: grid; grid-template-columns: repeat(auto-fit, minmax(24px, 1fr)); gap: 5px; align-items: end; min-height: 210px; padding: var(--space-5) var(--space-4) 14px; }
.trend-column { display: grid; grid-template-rows: 130px auto auto; gap: var(--space-1); min-width: 0; text-align: center; }
.trend-values { display: flex; align-items: end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line-soft); }
.trend-values span { width: min(8px, 28%); min-height: 0; border-radius: var(--radius-compact) var(--radius-compact) 0 0; }.trend-passed { background: var(--success-solid); }.trend-failed { background: var(--danger-solid); }.trend-skipped { background: var(--warning-solid); }
.trend-column strong { font-size: var(--font-size-caption); }.trend-column small { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.coverage-list { display: grid; }.coverage-row { display: grid; gap: 10px; padding: 15px var(--space-4); border-bottom: 1px solid var(--line-soft); }.coverage-row:last-child { border-bottom: 0; }
.coverage-row > div:first-child { display: flex; justify-content: space-between; gap: 10px; }.coverage-row > div:first-child span { color: var(--text-muted); font-size: var(--font-size-caption); }
.coverage-bar { height: 7px; overflow: hidden; background: var(--surface-muted); border-radius: var(--radius-pill); }.coverage-bar span { display: block; height: 100%; background: var(--accent-solid); border-radius: inherit; }
.coverage-row dl, .group-summary dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }.coverage-row dl div, .group-summary dl div { display: grid; gap: 2px; }
.coverage-row dt, .group-summary dt { color: var(--text-muted); font-size: var(--font-size-caption); }.coverage-row dd, .group-summary dd { margin: 0; font-weight: 700; }.coverage-row > a { width: max-content; font-size: var(--font-size-caption); }
.group-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.group-summary { display: grid; gap: var(--space-1); min-width: 0; padding: var(--space-3); text-align: left; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); cursor: pointer; }.group-summary:hover { border-color: var(--line-soft); background: var(--surface-card); }
.group-summary > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.group-summary > span { margin-bottom: 5px; color: var(--text-muted); font-size: var(--font-size-caption); }.group-summary dl { grid-template-columns: repeat(2, 1fr); }
.dashboard-error { margin-bottom: 14px; }

@media (max-width: 1350px) {
    .dashboard-filter-bar { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
    .dashboard-primary-grid { grid-template-columns: minmax(0, 1fr); }.dashboard-attention-panel .attention-list { grid-template-columns: repeat(2, 1fr); }.attention-item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
    .dashboard-attention-wide .attention-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-attention-wide .attention-item { border-right: 1px solid var(--line-soft); }
    .dashboard-attention-wide .attention-item:nth-child(2n) { border-right: 0; }
    .group-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
    .dashboard-secondary-grid { grid-template-columns: 1fr; }
    .group-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .dashboard-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.dashboard-status-strip { grid-template-columns: repeat(2, 1fr); }
    .dashboard-attention-panel .attention-list, .dashboard-attention-wide .attention-list { grid-template-columns: 1fr; }.group-summary-grid { grid-template-columns: 1fr; }
    .dashboard-execution-table th:nth-child(3), .dashboard-execution-table td:nth-child(3), .dashboard-execution-table th:nth-child(5), .dashboard-execution-table td:nth-child(5) { display: none; }
}

.parameter-editor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 18px; background: linear-gradient(180deg, var(--surface-card), var(--surface-shell)); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.version-config-summary { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 15px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.version-config-summary.empty { grid-template-columns: 1fr; border-style: dashed; }
.version-config-summary > div { display: grid; gap: var(--space-1); min-width: 0; }
.version-config-summary strong { color: var(--text-strong); }
.version-config-summary span { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.version-config-summary small { color: var(--text-muted); }
.version-config-summary code { overflow: hidden; color: var(--text-strong); text-overflow: ellipsis; white-space: nowrap; }
.compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.api-config-section { display: grid; gap: var(--space-4); padding: var(--space-5); background: var(--surface-card); border: 1px solid var(--line-soft); border-left: 4px solid var(--accent); border-radius: var(--radius-surface); box-shadow: 0 8px 28px color-mix(in srgb, var(--shadow-color) 5%, transparent); }
.api-section-heading { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; }
.api-section-heading.with-actions { grid-template-columns: auto 1fr auto; align-items: center; }
.api-section-heading h3 { margin: 0; font-size: var(--font-size-section); }
.api-section-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: var(--font-size-small); }
.api-step { display: grid; place-items: center; width: 30px; height: 30px; color: var(--text-on-accent); background: var(--accent-solid); border-radius: var(--radius-pill); font-weight: 700; }
.api-main-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.api-main-grid.single-control { grid-template-columns: minmax(260px, 520px); }
.endpoint-picker-launch { align-content: start; }
.endpoint-picker-launch .button { width: 100%; box-shadow: none; }
.selected-endpoint-card { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); background: linear-gradient(180deg, var(--surface-shell), var(--surface-shell)); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.selected-endpoint-card.empty { align-items: center; background: var(--surface-card); border-style: dashed; border-color: var(--line-soft); }
.selected-endpoint-card h4 { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-1) 0 6px; font-size: var(--font-size-section); }
.selected-endpoint-card small { display: block; margin-top: 7px; }
.selected-endpoint-card code { color: var(--text-strong); word-break: break-all; }
.selected-endpoint-meta { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; color: var(--text-main); font-size: var(--font-size-caption); white-space: nowrap; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--space-7); background: var(--overlay); }
.endpoint-modal { display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(1240px, calc(100vw - 56px)); max-height: min(780px, calc(100vh - 56px)); overflow: hidden; background: var(--surface-card); border-radius: var(--radius-surface); box-shadow: 0 22px 70px color-mix(in srgb, var(--shadow-color) 25%, transparent); }
.endpoint-modal-header { display: flex; justify-content: space-between; gap: var(--space-5); padding: 18px var(--space-5); border-bottom: 1px solid var(--line-soft); }
.endpoint-modal-header h3 { margin: 0; font-size: var(--font-size-heading-small); }
.endpoint-modal-header p { margin: var(--space-1) 0 0; color: var(--text-muted); }
.endpoint-modal-toolbar { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr) auto; gap: 14px; align-items: end; padding: 14px var(--space-5); background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.endpoint-controller-field, .endpoint-method-search { display: grid; gap: 6px; min-width: 0; }
.endpoint-controller-field > span, .endpoint-method-search > span { color: var(--text-main); font-size: var(--font-size-dense); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.endpoint-picker-summary { align-self: center; white-space: nowrap; }
.endpoint-picker-empty { display: grid; place-items: center; align-content: center; gap: var(--space-2); min-height: 300px; color: var(--text-muted); text-align: center; }
.endpoint-picker-empty strong { color: var(--text-strong); font-size: var(--font-size-section); }
.endpoint-picker-empty small { max-width: 380px; }
.endpoint-picker-empty-icon { display: grid; place-items: center; width: 50px; height: 50px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-surface); font-size: var(--font-size-heading-small); }
@media (max-width: 800px) { .endpoint-modal-toolbar { grid-template-columns: 1fr; align-items: stretch; } .endpoint-picker-summary { white-space: normal; } }
.endpoint-grid-wrap { overflow: auto; }
.endpoint-card-list { display: grid; gap: 10px; padding: 14px var(--space-5) var(--space-5); background: var(--surface-shell); }
.endpoint-card { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.6fr) minmax(110px, .35fr) auto; gap: 14px; align-items: center; padding: 13px 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.endpoint-card:hover, .endpoint-card.selected { border-color: var(--line-soft); background: var(--surface-shell); box-shadow: 0 4px 16px color-mix(in srgb, var(--shadow-color) 5%, transparent); }
.endpoint-card-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
.endpoint-card-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-card-main small { display: block; margin-top: var(--space-1); overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.endpoint-card-url { display: grid; gap: var(--space-1); min-width: 0; }
.endpoint-card-url span, .endpoint-card-responses span { color: var(--text-muted); font-size: var(--font-size-dense); font-weight: 700; text-transform: uppercase; }
.endpoint-card-url code { overflow: hidden; color: var(--text-strong); text-overflow: ellipsis; white-space: nowrap; }
.endpoint-card-responses { display: grid; gap: var(--space-1); color: var(--text-strong); font-size: var(--font-size-caption); }
.endpoint-card > .button { justify-self: end; }
.api-method-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); max-height: 360px; overflow: auto; padding: var(--space-2); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.api-method-picker.compact { max-height: 230px; }
.api-method-option { display: grid; gap: 6px; padding: 10px var(--space-3); color: var(--text-strong); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); text-align: left; cursor: pointer; min-width: 0; }
.api-method-option:hover, .api-method-option.selected { border-color: var(--accent); background: var(--surface-shell); }
.api-method-option span { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.api-method-option code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); }
.api-method-option small { color: var(--text-muted); }
.api-advanced-details { padding: var(--space-3) 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.api-advanced-details summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.api-advanced-details .form-grid { margin-top: var(--space-3); }
.api-auth-block, .api-test-cases, .expectation-builder { display: grid; gap: var(--space-3); padding: 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.expectation-builder.nested { background: var(--surface-card); }
.expectation-builder-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.api-test-case { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.api-test-case summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); cursor: pointer; }
.api-test-case summary > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.api-test-case.grouped { padding: 0; overflow: hidden; background: var(--surface-card); border-color: var(--warning-line); border-radius: var(--radius-surface); }
.api-test-case.grouped[open] { box-shadow: 0 16px 36px color-mix(in srgb, var(--shadow-color) 5%, transparent); }
.api-test-case.grouped summary { padding: 14px var(--space-4); background: var(--surface-shell); border-bottom: 1px solid transparent; list-style: none; }
.api-test-case.grouped[open] summary { border-bottom-color: var(--warning-line); }
.api-test-case.grouped summary::-webkit-details-marker { display: none; }
.api-case-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 10px; min-width: 0; }
.api-case-title small { color: var(--text-main); }
.api-case-actions { display: inline-flex; align-items: center; gap: var(--space-2); }
.api-case-layout { display: grid; gap: var(--space-3); padding: 14px; background: var(--surface-muted); }
.api-case-group { display: grid; gap: var(--space-3); padding: 14px; background: var(--surface-card); border: 1px solid var(--warning-line); border-radius: var(--radius-surface); }
.api-case-group > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.api-case-group > header small { text-align: right; }
/* The API test dialog is an EditorDialog (Wide); its body keeps the two-column preview. */
.api-test-modal-body { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); }
.api-test-modal-body > .api-preview-warning { grid-column: 1 / -1; margin-top: 0; }
.api-test-preview-card { display: grid; align-content: start; gap: var(--space-3); padding: var(--space-4); background: var(--surface-card); border: 1px solid var(--warning-line); border-radius: var(--radius-surface); }
.api-test-preview-card:first-of-type { grid-row: span 2; }
.api-test-preview-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.api-test-preview-card header > div { display: grid; gap: 3px; }
.api-expectation-list { display: grid; gap: var(--space-2); margin: 0; padding-left: 18px; color: var(--text-strong); }
.inline-progress { height: 9px; overflow: hidden; background: var(--warning-soft); border-radius: var(--radius-pill); }
.inline-progress span { display: block; height: 100%; background: var(--accent-solid); border-radius: inherit; transition: width .2s ease; }
.api-test-run-log { display: grid; gap: 10px; margin-top: var(--space-2); padding: var(--space-3); background: var(--surface-muted); border: 1px solid var(--warning-line); border-radius: var(--radius-surface); }
.api-test-run-log summary { cursor: pointer; font-weight: 700; }
.api-test-run-log-body { display: grid; gap: 10px; margin-top: 10px; max-height: 440px; overflow: auto; }
.api-test-run-log-body article { display: grid; gap: 6px; }

.release-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
    padding: 22px;
    background: var(--surface-card);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-surface);
    box-shadow: 0 22px 60px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.release-toolbar-summary {
    display: grid;
    gap: 5px;
    max-width: 720px;
}

.release-toolbar-summary h2,
.release-toolbar-summary p {
    margin: 0;
}

.release-toolbar-summary h2 {
    font-size: var(--font-size-heading-small);
    letter-spacing: -.02em;
}

.release-toolbar-summary p {
    color: var(--text-main);
    line-height: 1.5;
}

.release-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.release-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 18px;
    align-items: start;
}

.release-dashboard.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.release-targets-panel {
    overflow: hidden;
}

.panel-header.compact {
    padding: var(--space-4) 18px;
}

.release-empty {
    display: grid;
    justify-items: center;
    gap: var(--space-2);
    padding: 56px var(--space-6);
    text-align: center;
}

.release-empty h3,
.release-empty p {
    margin: 0;
}

.release-empty p {
    color: var(--text-main);
}

.release-target-table td:first-child {
    min-width: 210px;
}

.release-reference-column {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 18px;
}

.reference-card {
    overflow: hidden;
}

.reference-list {
    display: grid;
}

.reference-row {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--warning-line);
    cursor: pointer;
}

.reference-row:hover {
    background: var(--surface-muted);
}

.reference-row span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.reference-row strong {
    font-size: var(--font-size-body);
}

.reference-row small {
    overflow: hidden;
    color: var(--text-main);
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: var(--font-size-caption);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-row small {
    font-family: inherit;
}

.soft-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: var(--space-1) 9px;
    color: var(--text-strong);
    background: var(--warning-soft);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.release-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(980px, calc(100vw - 56px));
    max-height: min(860px, calc(100vh - 56px));
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-surface);
    box-shadow: 0 30px 90px color-mix(in srgb, var(--shadow-color) 30%, transparent);
}

.release-modal.small-modal {
    width: min(620px, calc(100vw - 56px));
}

/* Shared wide editor: two-pane constructors, with a single scroll area on small screens. */
.panel:has(.editor-dialog-backdrop) { backdrop-filter: none; }
.editor-dialog-backdrop { padding: var(--space-4); }
@media screen {
    html:has(.full-window-backdrop) { overflow: hidden; scrollbar-gutter: auto; }
}
.editor-dialog-backdrop.full-window-backdrop { padding: 0; }
.release-modal.full-window-modal {
    width: 100%; height: 100dvh; max-height: none;
    grid-template-rows: auto minmax(0, 1fr);
    border: 0; border-radius: 0; background: var(--surface-page);
}
.full-window-modal > .release-modal-header { align-items: center; padding: var(--space-2) var(--space-4); }
.full-window-modal > .release-modal-body { padding: var(--space-2); min-width: 0; overscroll-behavior: contain; }
@media print {
    .full-window-backdrop { position: static; display: block; background: none; }
    .release-modal.full-window-modal, .full-window-modal > .release-modal-body { height: auto; overflow: visible; display: block; }
    .full-window-modal > .release-modal-header button { display: none; }
}
.release-modal.wide-editor-modal {
    width: min(1320px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
}
.release-modal-header > div { min-width: 0; overflow-wrap: anywhere; }
.wide-editor-modal .release-modal-footer { flex-wrap: wrap; }
@media (max-width: 600px) {
    .wide-editor-modal .release-modal-header,
    .wide-editor-modal .release-modal-body,
    .wide-editor-modal .release-modal-footer { padding: var(--space-3); }
}

.release-modal form {
    display: contents;
}

.release-modal-header,
.release-modal-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) 22px;
    border-bottom: 1px solid var(--warning-line);
}

.release-modal-header h3,
.release-modal-header p {
    margin: 0;
}

.release-modal-header h3 {
    margin-top: 3px;
    font-size: var(--font-size-heading);
    letter-spacing: -.02em;
}

.release-modal-header p {
    margin-top: 5px;
    color: var(--text-main);
}

.release-modal-body {
    display: grid;
    min-height: 0;
    gap: var(--space-4);
    overflow: auto;
    padding: 18px 22px;
}

.release-modal-footer {
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--warning-line);
    border-bottom: 0;
}

/* The release-target editor owns a long form inside the dialog body; the footer
   submit button stays outside the scrolling region even on a short viewport. */
.release-modal.release-target-editor-modal {
    height: min(860px, calc(100dvh - 56px));
}

.release-target-editor-modal .release-modal-body {
    min-height: 0;
    overscroll-behavior: contain;
}

/* On a phone or with enlarged text the header and footer alone can fill the dialog and squeeze the body to nothing:
   there the whole dialog scrolls vertically and the footer actions stay pinned to its bottom edge. The body keeps its
   full height but still contains wide content (tables, code) in its own horizontal scroll, so the dialog never scrolls sideways. */
@media (max-width: 640px), (max-height: 34rem) {
    .release-modal:not(.full-window-modal) { grid-template-rows: auto auto auto; overflow: auto; overscroll-behavior: contain; }
    .release-modal:not(.full-window-modal) > .release-modal-body,
    .release-modal:not(.full-window-modal) > form > .release-modal-body { min-height: max-content; }
    .release-modal:not(.full-window-modal) > .release-modal-footer,
    .release-modal:not(.full-window-modal) > form > .release-modal-footer { position: sticky; bottom: 0; background: var(--surface-card); }
}

.form-section {
    display: grid;
    gap: var(--space-4);
    padding: 18px;
    background: var(--warning-soft);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-surface);
}

.form-section.slim {
    padding: 14px 18px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.section-heading h4,
.section-heading p {
    margin: 0;
}

.section-heading h4 {
    font-size: var(--font-size-section);
}

.section-heading p {
    margin-top: 3px;
    color: var(--text-main);
}

.step-dot {
    display: inline-grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-small);
    font-weight: 700;
}

.inherited-url-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.inherited-url-card div {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 14px;
    background: var(--surface-muted);
    border: 1px dashed var(--warning-line);
    border-radius: var(--radius-surface);
}

.inherited-url-card span {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.inherited-url-card code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.expectation-row { display: grid; grid-template-columns: minmax(160px, .9fr) minmax(170px, 1fr) minmax(150px, .8fr) auto; gap: 10px; align-items: end; }
.scenario-checklist { display: grid; gap: var(--space-2); max-height: 420px; overflow: auto; }
.scenario-check { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 11px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.scenario-check input { margin-top: 3px; }
.scenario-check span { display: grid; }
.scenario-check small { color: var(--text-muted); }
.run-result { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.run-result:last-child { border-bottom: 0; }
.run-result h3 { margin: 0 0 9px; display: flex; align-items: center; gap: 9px; }
.run-link { text-decoration: none; }
.run-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.run-chip { padding: 3px 7px; color: var(--text-main); background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 600; }
.version-run-chip { color: var(--accent); background: var(--accent-soft); }
.result-group { margin-bottom: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); overflow: hidden; }
.result-group:last-child { margin-bottom: 0; }
.result-group-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 13px var(--space-4); background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.result-group-header h3 { margin: 0 0 3px; font-size: var(--font-size-section); }
.result-group-body { padding: 0 var(--space-4); }
.step-list { margin: var(--space-3) 0; padding-left: var(--space-5); }
.step-list li {
    margin-bottom: 10px;
}
.step-log-block {
    margin: var(--space-2) 0 0;
    max-width: 100%;
    overflow: auto;
    padding: var(--space-3) 14px;
    color: var(--text-strong);
    background: var(--surface-card);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-surface);
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: var(--font-size-caption);
    line-height: 1.55;
    white-space: pre;
}

.analytics-panel { overflow: hidden; }
.analytics-heading > div:first-child { display: grid; gap: var(--space-1); }
.analytics-stack { display: grid; gap: 22px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 13px; color: var(--text-muted); font-size: var(--font-size-caption); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; border-radius: var(--radius-compact); }
.legend-passed, .result-passed { background: var(--success-solid); }
.legend-failed, .result-failed { background: var(--danger-solid); }
.legend-skipped, .result-skipped { background: var(--warning-solid); }
.breakdown-card { min-width: 0; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.breakdown-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: 18px; }
.breakdown-header div { display: grid; gap: 3px; min-width: 0; }
.breakdown-header h3 { margin: 0; font-size: var(--font-size-section); }
.breakdown-header span { color: var(--text-muted); font-size: var(--font-size-caption); }
.breakdown-header > strong { color: var(--accent); font-size: var(--font-size-heading-small); }
.breakdown-rows { display: grid; gap: 15px; }
.breakdown-row { display: grid; gap: 6px; }
.breakdown-label { display: flex; justify-content: space-between; gap: 10px; min-width: 0; font-size: var(--font-size-caption); }
.breakdown-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breakdown-label span { flex: none; color: var(--text-muted); }
.result-bar { display: flex; width: 100%; height: 10px; overflow: hidden; background: var(--surface-muted); border-radius: var(--radius-pill); }
.result-segment { display: block; height: 100%; min-width: 2px; }
.breakdown-counts { display: flex; gap: 11px; font-size: var(--font-size-caption); font-weight: 700; }
.breakdown-counts span::before { margin-right: 3px; }
.count-passed { color: var(--success); }
.count-passed::before { content: "P"; }
.count-failed { color: var(--danger); }
.count-failed::before { content: "F"; }
.count-skipped { color: var(--warning); }
.count-skipped::before { content: "S"; }
.breakdown-empty { padding: 25px var(--space-2); color: var(--text-muted); text-align: center; font-size: var(--font-size-small); }
.breakdown-more { margin-top: 14px; color: var(--text-muted); font-size: var(--font-size-caption); text-align: right; }
.version-detail { display: grid; gap: var(--space-4); padding-top: var(--space-5); border-top: 1px solid var(--line-soft); }
.version-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.version-detail-header > div:first-child { display: grid; gap: var(--space-1); }
.version-detail-header h2 { margin: 0; font-size: var(--font-size-section); }
.version-switcher { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.version-option { display: grid; gap: 2px; min-width: 105px; padding: var(--space-2) 11px; color: var(--text-main); background: var(--surface-muted); border: 1px solid var(--line-soft); border-radius: var(--radius-control); cursor: pointer; text-align: left; }
.version-option:hover { border-color: var(--line-soft); background: var(--accent-soft); }
.version-option.active { color: var(--text-on-accent); background: var(--accent-solid); border-color: var(--accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--shadow-color) 15%, transparent); }
.version-option span { font-size: var(--font-size-caption); opacity: .78; }
.version-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.version-metrics article { padding: var(--space-3) 14px; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.version-metrics strong { display: block; font-size: var(--font-size-heading-small); }
.version-metrics span { color: var(--text-muted); font-size: var(--font-size-caption); }
.version-breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.version-suite-panel { margin-bottom: var(--space-5); overflow: hidden; }
.version-suite-panel .panel-header > div:first-child { display: grid; gap: var(--space-1); }
.version-suite-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.version-suite-options { display: flex; flex-wrap: wrap; gap: 10px; padding: var(--space-4) var(--space-5); }
.version-suite-option { display: grid; grid-template-columns: 22px auto; align-items: center; gap: var(--space-2); min-width: 170px; padding: 10px var(--space-3); color: var(--text-main); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); cursor: pointer; text-align: left; }
.version-suite-option:hover { border-color: var(--line-soft); }
.version-suite-option.selected { color: var(--accent); background: var(--accent-soft); border-color: var(--line-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shadow-color) 20%, transparent); }
.version-suite-option > span:last-child { display: grid; gap: 2px; }
.version-suite-option small { color: var(--text-muted); }
.version-check { display: grid; place-items: center; width: 20px; height: 20px; color: var(--text-on-accent); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-compact); font-size: var(--font-size-small); }
.version-suite-option.selected .version-check { background: var(--accent-solid); border-color: var(--accent); }
.version-suite-summary { padding: 11px var(--space-5); color: var(--text-muted); background: var(--surface-shell); border-top: 1px solid var(--line-soft); font-size: var(--font-size-small); }
.scenario-version-row td { padding-block: 10px; color: var(--accent); background: var(--accent-soft); border-top: 1px solid var(--line-soft); border-bottom-color: var(--line-soft); }
.scenario-version-row span { margin-left: 9px; color: var(--text-muted); font-size: var(--font-size-caption); }
.version-result-group { margin-bottom: 22px; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); overflow: hidden; background: var(--surface-card); }
.version-result-group:last-child { margin-bottom: 0; }
.version-result-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; color: var(--text-on-accent); background: linear-gradient(120deg, var(--accent-solid), var(--accent-solid)); }
.version-result-header h2 { margin: 2px 0 var(--space-1); font-size: var(--font-size-heading-small); }
.version-result-header .eyebrow, .version-result-header .muted { color: var(--text-on-accent); }
.version-result-body { padding: var(--space-4); }
.version-result-body .result-group { background: var(--surface-card); }
.scenario-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: var(--space-5); align-items: start; }
.scenario-workspace-single { grid-template-columns: minmax(0, 1fr); }
.scenario-browser { min-width: 0; display: grid; gap: var(--space-4); }
.scenario-browser-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: 2px 2px var(--space-1); }
.scenario-browser-toolbar > div { display: grid; gap: var(--space-1); }
.scenario-browser-toolbar h2 { margin: 0; font-size: var(--font-size-heading); }
.scenario-browser-toolbar > .scenario-browser-actions { display: flex; align-items: flex-end; gap: 10px; }
.scenario-browser-actions .button { white-space: nowrap; }
.scenario-client-filter { display: grid; gap: 5px; min-width: 180px; }
.scenario-client-filter > span { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; }
.scenario-client-filter .form-control { min-height: 38px; padding-block: 7px; }
@media (max-width: 760px) {
    .scenario-browser-toolbar > .scenario-browser-actions { align-items: stretch; flex-wrap: wrap; width: 100%; }
    .scenario-client-filter { flex: 1 1 180px; }
    .scenario-browser-actions .button { flex: 1 1 auto; justify-content: center; }
}
.scenario-type-groups { display: grid; gap: var(--space-4); }
.scenario-type-group { overflow: hidden; }
.scenario-type-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 14px var(--space-4); background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.scenario-type-header > div { display: flex; align-items: center; gap: 9px; }
.scenario-version-sidebar { position: sticky; top: 18px; overflow: hidden; }
.version-sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px var(--space-4); border-bottom: 1px solid var(--line-soft); }
.version-sidebar-header > div { display: grid; gap: 2px; }
.version-sidebar-header h2 { margin: 0; font-size: var(--font-size-section); }
.version-sidebar-header span { color: var(--text-muted); font-size: var(--font-size-caption); }
.quick-version-form { display: grid; gap: 10px; padding: 14px var(--space-4); background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.quick-version-form .button { width: 100%; }
.sidebar-manage-link { color: var(--text-muted); font-size: var(--font-size-caption); text-align: center; }
.client-filter { padding: 14px var(--space-4); border-bottom: 1px solid var(--line-soft); }
.version-sidebar-help { padding: 10px var(--space-4); color: var(--text-muted); background: var(--surface-card); border-bottom: 1px solid var(--line-soft); font-size: var(--font-size-caption); line-height: 1.4; }
.version-sidebar-list { display: grid; max-height: 490px; overflow-y: auto; }
.version-sidebar-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--line-soft); }
.version-sidebar-item:last-child { border-bottom: 0; }
.version-sidebar-item.focused { background: var(--surface-shell); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.version-sidebar-select { align-self: center; display: grid; place-items: center; width: 21px; height: 21px; margin-left: var(--space-3); padding: 0; color: var(--text-on-accent); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-compact); cursor: pointer; }
.version-sidebar-select.selected { background: var(--accent-solid); border-color: var(--accent); }
.version-sidebar-select:disabled { opacity: .45; cursor: not-allowed; }
.version-sidebar-focus { display: grid; gap: var(--space-1); padding: var(--space-3) 13px var(--space-3) var(--space-2); color: var(--text-strong); background: transparent; border: 0; cursor: pointer; text-align: left; }
.version-sidebar-focus:hover { background: var(--surface-shell); }
.version-sidebar-focus > span { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.version-sidebar-focus small { color: var(--text-muted); }
.version-sidebar-focus time { color: var(--text-muted); font-size: var(--font-size-caption); }
.version-sidebar-footer { display: grid; gap: 10px; padding: 14px var(--space-4); background: var(--surface-shell); border-top: 1px solid var(--line-soft); }
.version-sidebar-footer > div { display: flex; justify-content: space-between; gap: var(--space-2); color: var(--text-muted); font-size: var(--font-size-caption); }
.version-sidebar-footer .button { width: 100%; }
.latest-version-run { display: grid; grid-template-columns: auto auto; align-items: center; gap: 3px var(--space-2); min-width: 185px; padding: var(--space-2) 10px; color: var(--text-main); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); text-decoration: none; box-shadow: 0 2px 8px color-mix(in srgb, var(--shadow-color) 4%, transparent); }
.latest-version-run > span { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.latest-version-run small { grid-column: 1 / -1; color: var(--text-main); }
.latest-version-run time { grid-column: 1 / -1; color: var(--text-muted); font-size: var(--font-size-caption); }
.latest-version-run.empty { display: grid; grid-template-columns: 1fr; }
.latest-version-run.empty small { grid-column: auto; }
.live-run-stack { display: grid; gap: 10px; margin-bottom: 18px; }
/* In a dialog the body padding already separates the progress from the footer. */
.release-modal-body > .live-run-stack:last-child { margin-bottom: 0; }
.live-run-card { display: grid; gap: 10px; padding: 14px var(--space-4); background: var(--surface-card); border: 1px solid var(--line-soft); border-left-width: 4px; border-radius: var(--radius-section); box-shadow: 0 3px 14px color-mix(in srgb, var(--shadow-color) 4%, transparent); }
.live-run-card.status-border-queued { border-left-color: var(--accent); }
.live-run-card.status-border-running { border-left-color: var(--accent); }
.live-run-card.status-border-passed { border-left-color: var(--success-line); }
.live-run-card.status-border-failed { border-left-color: var(--danger-line); }
.live-run-card.status-border-skipped { border-left-color: var(--warning-line); }
.live-run-card header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.live-run-card header > div { display: flex; align-items: center; gap: var(--space-2); }
.live-run-time { display: grid; justify-items: end; gap: 2px; color: var(--text-muted); font-size: var(--font-size-caption); }
.live-run-time a { color: var(--accent); font-size: var(--font-size-caption); font-weight: 600; }
.live-indicator { width: 9px; height: 9px; background: var(--accent-solid); border-radius: 50%; }
.live-indicator.pulsing { background: var(--accent-solid); animation: live-pulse 1.35s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .35; transform: scale(.75); } }
.live-progress-track { height: 8px; overflow: hidden; background: var(--surface-muted); border-radius: var(--radius-pill); }
.live-progress-track > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-solid), var(--accent-solid)); border-radius: inherit; transition: width .3s ease; }
.live-run-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 14px; color: var(--text-muted); font-size: var(--font-size-caption); }
.live-run-meta > strong { margin-right: auto; color: var(--text-strong); }
.live-count { font-weight: 600; }
.live-count.passed { color: var(--success); }
.live-count.failed { color: var(--danger); }
.live-count.skipped { color: var(--warning); }
.current-scenario { display: flex; align-items: center; gap: 7px; color: var(--text-main); font-size: var(--font-size-caption); }
.current-scenario .spinner { width: 13px; height: 13px; }
.live-run-error { padding: var(--space-2) 10px; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-compact); font-size: var(--font-size-caption); }

/* Neutral design refresh
   Keeps the existing component structure, but moves the product away from the heavy blue palette. */


body {
    background: radial-gradient(circle at 8% 0%, var(--surface-card) 0, transparent 310px),
        linear-gradient(180deg, var(--surface-muted) 0%, var(--surface-page) 100%);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text-strong); }
input[type="checkbox"] { accent-color: var(--accent-solid); }

.app-shell {
    grid-template-columns: 248px 1fr;
    background: transparent;
}

.sidebar {
    color: var(--text-main);
    background: linear-gradient(180deg, var(--surface-muted) 0%, var(--warning-soft) 100%);
    border-right: 1px solid var(--line-soft);
    box-shadow: inset -1px 0 0 color-mix(in srgb, var(--shadow-color) 50%, transparent);
}

.brand {
    color: var(--text-strong);
}

.brand-mark {
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-radius: var(--radius-surface);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--shadow-color) 13%, transparent);
}

.brand div span,
.nav-group,
.eyebrow,
.page-header p,
.muted {
    color: var(--text-muted);
}

.nav-menu a {
    color: var(--text-main);
    border: 1px solid transparent;
}

.nav-menu a:hover {
    color: var(--text-strong);
    background: color-mix(in srgb, var(--surface-card) 52%, transparent);
    border-color: var(--line-soft);
}

.nav-menu a.active {
    color: var(--text-strong);
    background: var(--surface-card);
    border-color: var(--line-soft);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--shadow-color) 6%, transparent), inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.topbar {
    background: color-mix(in srgb, var(--surface-card) 80%, transparent);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(14px);
}

.content {
    max-width: 1440px;
}

.page-header h1,
.scenario-browser-toolbar h2,
.version-detail-header h2,
.panel-header h2,
.endpoint-modal-header h3,
.api-section-heading h3 {
    color: var(--text-strong);
}

.panel,
.stat-card,
.breakdown-card,
.version-result-group,
.scenario-type-group,
.scenario-version-sidebar,
.latest-version-run,
.live-run-card {
    background: var(--surface-card);
    border-color: var(--line-soft);
    box-shadow: 0 18px 55px color-mix(in srgb, var(--shadow-color) 5%, transparent);
}

.panel-header,
.version-sidebar-header,
.client-filter,
.version-sidebar-help,
.version-sidebar-footer,
.result-group-header,
.scenario-type-header {
    border-color: var(--line-soft);
}

.panel-header,
.scenario-type-header,
.result-group-header,
.version-sidebar-footer,
.version-sidebar-help,
th {
    background: var(--surface-shell);
}

.form-field > span,
.field-label,
th {
    color: var(--text-main);
}

.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    color: var(--text-strong);
    background: var(--surface-card);
    border-color: var(--line-strong);
    border-radius: var(--radius-surface);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.button,
button.button,
.button:not(.secondary):not(.danger):not(:where(.choice)) {
    color: var(--text-on-accent);
    background: var(--accent-solid);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--shadow-color) 9%, transparent);
}

.button:hover,
button.button:hover,
.button:not(.secondary):not(.danger):not(:where(.choice)):hover {
    background: var(--accent-solid);
}

.button.secondary {
    color: var(--text-main);
    background: var(--surface-muted-2);
    box-shadow: none;
}

.button.secondary:hover {
    color: var(--text-strong);
    background: var(--warning-soft);
}

.button.danger {
    color: var(--danger);
    background: var(--danger-soft);
    box-shadow: none;
}

th,
td,
.run-result,
.result-group,
.endpoint-modal-header,
.endpoint-modal-toolbar,
.version-sidebar-item,
.version-sidebar-footer,
.scenario-type-header,
.version-detail,
.version-suite-summary {
    border-color: var(--line-soft);
}

tbody tr:hover {
    background: var(--surface-muted);
}

.run-chip {
    color: var(--text-main);
    background: var(--warning-soft);
}

/* Status colors are defined once in the "Status colors" block near the end of this file. */

.spinner {
    border-color: var(--warning-line);
    border-top-color: var(--accent);
}

.parameter-editor,
.version-config-summary,
.quick-version-form,
.api-advanced-details,
.expectation-builder.nested {
    background: linear-gradient(180deg, var(--surface-shell), var(--surface-muted));
    border-color: var(--line-soft);
}

.api-config-section {
    background: var(--surface-card);
    border-color: var(--line-soft);
    border-left-color: var(--accent);
    box-shadow: 0 18px 46px color-mix(in srgb, var(--shadow-color) 5%, transparent);
}

.api-step {
    background: var(--accent-solid);
}

.selected-endpoint-card {
    background: linear-gradient(180deg, var(--warning-soft), var(--surface-shell));
    border-color: var(--warning-line);
}

.selected-endpoint-card.empty {
    background: var(--surface-card);
    border-color: var(--line-strong);
}

.endpoint-modal {
    background: var(--surface-card);
}

.endpoint-modal-toolbar,
.endpoint-card-list {
    background: var(--surface-muted);
}

.endpoint-card,
.api-method-option,
.api-auth-block,
.api-test-cases,
.expectation-builder,
.api-test-case,
.scenario-check {
    background: var(--surface-card);
    border-color: var(--line-soft);
}

.endpoint-card:hover,
.endpoint-card.selected,
.api-method-option:hover,
.api-method-option.selected {
    background: var(--surface-muted);
    border-color: var(--accent);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow-color) 7%, transparent);
}

.api-advanced-details summary {
    color: var(--accent);
}

.version-run-chip {
    color: var(--warning);
    background: var(--warning-soft);
}

.breakdown-header > strong,
.sidebar-manage-link,
.live-run-time a {
    color: var(--accent);
}

.result-bar,
.live-progress-track {
    background: var(--warning-soft);
}

.live-progress-track > span {
    background: linear-gradient(90deg, var(--accent-solid), var(--accent-solid));
}

.version-option {
    color: var(--text-main);
    background: var(--surface-muted);
    border-color: var(--line-soft);
}

.version-option:hover {
    background: var(--warning-soft);
    border-color: var(--warning-line);
}

.version-option.active,
.version-suite-option.selected .version-check,
.version-sidebar-select.selected {
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-color: var(--accent);
}

.version-suite-option {
    background: var(--surface-card);
    border-color: var(--line-soft);
}

.version-suite-option:hover,
.version-suite-option.selected {
    color: var(--text-strong);
    background: var(--surface-muted);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shadow-color) 13%, transparent);
}

.scenario-version-row td {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: var(--warning-line);
}

.version-result-header {
    color: var(--text-on-accent);
    background: linear-gradient(120deg, var(--accent-solid), var(--accent-solid));
}

.version-result-header .eyebrow,
.version-result-header .muted {
    color: var(--warning);
}

.version-sidebar-item.focused {
    background: var(--warning-soft);
    box-shadow: inset 3px 0 var(--accent);
}

.version-sidebar-select {
    border-color: var(--warning-line);
}

.version-sidebar-focus:hover {
    background: var(--surface-muted);
}

.live-indicator.pulsing { background: var(--warning-solid); }

/* Scenario editor studio layout */
.scenario-editor-studio {
    display: grid;
    gap: 18px;
}

.editor-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 18px 55px color-mix(in srgb, var(--shadow-color) 5%, transparent);
}

.editor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 46px;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--line-soft);
}

.editor-card-header > div {
    display: grid;
    gap: var(--space-1);
}

.editor-card-header h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-heading-small);
    letter-spacing: -.02em;
}

.editor-card-header small {
    max-width: 360px;
    color: var(--text-muted);
    text-align: right;
    line-height: 1.45;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    align-items: start;
}

.editor-grid > .form-field,
.parameter-editor > .form-field,
.api-main-grid > .form-field,
.compact-grid > .form-field {
    min-height: 82px;
}

.form-field {
    align-content: start;
}

.form-field > span,
.field-label {
    min-height: 17px;
    line-height: 17px;
}

.form-field > small,
.form-field > .muted {
    min-height: 17px;
    line-height: 1.35;
}

.form-control,
input.form-control,
select.form-control {
    min-height: 46px;
}

textarea.form-control {
    min-height: 118px;
}

textarea.compact-textarea,
.compact-textarea {
    min-height: 86px;
}

.editor-card-parameters {
    padding: 0;
    overflow: hidden;
}

.editor-card-parameters > .editor-card-header {
    margin: 0 22px;
    padding-top: 22px;
}

.editor-card-parameters > .parameter-editor {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--surface-card);
    box-shadow: none;
}

.advanced-card {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.advanced-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
}

.advanced-card > summary::-webkit-details-marker {
    display: none;
}

.advanced-card > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--text-strong);
    background: var(--surface-muted-2);
    border-radius: var(--radius-pill);
    font-weight: 700;
}

.advanced-card[open] > summary::after {
    content: "−";
}

.advanced-card > summary > span {
    display: grid;
    gap: var(--space-1);
}

.advanced-card > summary strong {
    color: var(--text-strong);
    font-size: var(--font-size-section);
}

.advanced-card > summary small {
    color: var(--text-muted);
}

.advanced-card > .editor-grid {
    padding: 0 22px 22px;
}

.editor-footer {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 14px var(--space-4);
    background: color-mix(in srgb, var(--surface-card) 91%, transparent);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 16px 50px color-mix(in srgb, var(--shadow-color) 9%, transparent);
    backdrop-filter: blur(14px);
}

.editor-footer .form-actions {
    margin: 0;
}

.version-config-summary {
    min-height: 96px;
    align-items: center;
}

.api-config-section {
    border-radius: var(--radius-surface);
}

.api-section-heading {
    min-height: 48px;
}

.selected-endpoint-card {
    min-height: 112px;
}

.request-model-preview,
.case-body-preview {
    display: grid;
    gap: 10px;
    padding: 14px var(--space-4);
    background: var(--warning-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
}

.request-model-preview {
    grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
    align-items: start;
}

.request-model-preview > div,
.case-body-preview > div {
    display: grid;
    gap: var(--space-1);
}

.request-model-preview strong {
    color: var(--text-strong);
    font-size: var(--font-size-section);
}

.request-model-preview pre,
.case-body-preview pre {
    margin: 0;
    max-height: 220px;
    overflow: auto;
    padding: 14px;
    color: var(--text-strong);
    background: var(--surface-card);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-surface);
    font-size: var(--font-size-caption);
    line-height: 1.55;
}

.case-body-preview {
    background: var(--surface-shell);
}

.endpoint-info-popover {
    position: relative;
    align-self: flex-end;
}

.endpoint-info-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    color: var(--text-strong);
    background: var(--accent-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: var(--font-size-dense);
    font-weight: 700;
    list-style: none;
    white-space: nowrap;
}

.endpoint-info-trigger i {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-dense);
}

.endpoint-info-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 7px;
    width: min(430px, calc(100vw - 80px));
    padding: var(--space-3);
    color: var(--text-main);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 20px 50px color-mix(in srgb, var(--shadow-color) 14%, transparent);
    white-space: normal;
}

.endpoint-info-close {
    position: absolute;
    top: 9px;
    right: 9px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: var(--text-main);
    background: var(--surface-muted);
    border: 0;
    border-radius: var(--radius-pill);
    cursor: pointer;
}

.endpoint-info-close:hover {
    color: var(--text-strong);
    background: var(--surface-muted);
}

.endpoint-info-content strong {
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.endpoint-info-content pre {
    margin: 0;
    max-height: 210px;
    overflow: auto;
    padding: 10px var(--space-3);
    color: var(--text-strong);
    background: var(--surface-shell);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-section);
    font-size: var(--font-size-dense);
    line-height: 1.45;
}

/* Hireus-inspired light product refresh */


body {
    background: radial-gradient(circle at 22% -12%, var(--surface-card) 0, transparent 380px),
        linear-gradient(180deg, var(--surface-shell) 0%, var(--surface-page) 100%);
}

a {
    color: var(--accent-hover);
}

input[type="checkbox"] {
    accent-color: var(--accent-solid);
}

.app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
    padding: 26px 14px;
    color: var(--text-main);
    background: var(--surface-card);
    border-right: 1px solid var(--line-soft);
    box-shadow: 10px 0 36px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.brand {
    gap: 10px;
    padding: 0 var(--space-1) 30px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-radius: var(--radius-surface);
    box-shadow: 0 12px 22px color-mix(in srgb, var(--shadow-color) 9%, transparent);
}

.brand strong {
    font-size: var(--font-size-section);
}

.brand div span {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.nav-menu {
    gap: 3px;
}

.nav-menu a {
    min-height: 38px;
    display: flex;
    align-items: center;
    color: var(--text-main);
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-section);
    font-size: var(--font-size-body);
}

.nav-menu a:hover {
    color: var(--text-strong);
    background: var(--surface-muted);
    border-color: var(--line-soft);
}

.nav-menu a.active {
    color: var(--text-strong);
    background: var(--surface-muted);
    border-color: var(--line-soft);
    box-shadow: inset 3px 0 var(--accent);
}

.nav-group {
    margin: 22px 10px var(--space-2);
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    letter-spacing: .11em;
}

.topbar {
    min-height: 72px;
    padding: 14px var(--space-7);
    background: color-mix(in srgb, var(--surface-card) 80%, transparent);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(18px);
}

.content {
    max-width: 1260px;
    padding: 30px 34px 68px;
}

.page-header {
    margin-bottom: var(--space-5);
}

.page-header h1 {
    color: var(--text-strong);
    font-size: clamp(28px, 3vw, 36px);
    letter-spacing: -.04em;
}

.page-header p {
    color: var(--text-main);
}

.eyebrow {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    letter-spacing: .12em;
}

.panel,
.stat-card,
.breakdown-card,
.version-result-group,
.scenario-type-group,
.scenario-version-sidebar,
.latest-version-run,
.live-run-card,
.release-modal,
.endpoint-modal {
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 18px 50px color-mix(in srgb, var(--shadow-color) 7%, transparent);
}

.panel-header,
.release-modal-header,
.release-modal-footer,
.endpoint-modal-header,
.version-sidebar-header,
.scenario-type-header,
.result-group-header {
    background: var(--surface-card);
    border-color: var(--line-soft);
}

.panel-header h2 {
    color: var(--text-strong);
    font-size: var(--font-size-section);
}


.nav-menu a {
    position: relative;
    min-height: 34px;
    padding: 7px var(--space-2) 7px var(--space-6);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.nav-menu a::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    width: 5px;
    height: 5px;
    background: var(--surface-muted-2);
    border-radius: var(--radius-pill);
    transform: translateY(-50%);
}

.nav-menu a:hover {
    color: var(--text-strong);
    background: transparent;
    border-color: transparent;
}

.nav-menu a:hover::before {
    background: var(--accent-solid);
}

.nav-menu a.active {
    color: var(--accent-hover);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    font-weight: 700;
}

.nav-menu a.active::before {
    width: 7px;
    height: 7px;
    background: var(--accent-solid);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--shadow-color) 10%, transparent);
}

.release-dashboard.single-column {
    max-width: none;
}

.release-targets-panel {
    border-radius: var(--radius-surface);
}

.release-target-table td:first-child {
    min-width: 230px;
}

.form-field > span,
.field-label,
th {
    color: var(--text-main);
}

.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    min-height: 44px;
    color: var(--text-strong);
    background: var(--surface-card);
    border-color: var(--line-strong);
    border-radius: var(--radius-section);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.button,
button.button,
.button:not(.secondary):not(.danger):not(:where(.choice)) {
    min-height: 38px;
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-radius: var(--radius-control);
    box-shadow: 0 10px 20px color-mix(in srgb, var(--shadow-color) 14%, transparent);
}

.button:hover,
button.button:hover,
.button:not(.secondary):not(.danger):not(:where(.choice)):hover {
    background: var(--accent-solid);
}

.button.secondary {
    color: var(--text-strong);
    background: var(--surface-muted);
    box-shadow: none;
}

.button.secondary:hover {
    background: var(--surface-muted);
}

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

th {
    background: var(--surface-shell);
    font-size: var(--font-size-caption);
    letter-spacing: .055em;
}

th,
td {
    border-color: var(--line-soft);
}

td {
    color: var(--text-main);
}

tbody tr:hover {
    background: var(--surface-shell);
}

.url-stack code,
.mono,
.reference-row small {
    color: var(--info);
}

.soft-pill,
.status-badge,
.run-chip {
    color: var(--text-main);
    background: var(--surface-muted);
}

.modal-backdrop {
    background: var(--overlay);
    backdrop-filter: blur(8px);
}

.release-modal,
.endpoint-modal {
    border-radius: var(--radius-surface);
}

.release-modal-body,
.endpoint-card-list {
    background: var(--surface-shell);
}

.form-section,
.api-config-section,
.api-test-preview-card,
.api-case-group,
.selected-endpoint-card,
.request-model-preview,
.case-body-preview,
.inherited-url-card div {
    background: var(--surface-card);
    border-color: var(--line-soft);
    border-radius: var(--radius-surface);
}

.step-dot,
.api-step {
    background: var(--accent-solid);
}

.inline-progress span,
.live-progress-track > span {
    background: linear-gradient(90deg, var(--accent-solid), var(--accent-solid));
}

.endpoint-card:hover,
.endpoint-card.selected,
.api-method-option:hover,
.api-method-option.selected {
    background: var(--surface-muted);
    border-color: var(--line-soft);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--shadow-color) 9%, transparent);
}

.version-result-header {
    background: linear-gradient(120deg, var(--accent-solid), var(--accent-solid));
}

.version-option.active,
.version-suite-option.selected .version-check,
.version-sidebar-select.selected {
    background: var(--accent-solid);
    border-color: var(--accent);
}

.version-option.active {
    color: var(--text-on-accent);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--shadow-color) 13%, transparent);
}

.version-sidebar-item.focused {
    background: var(--surface-muted);
    box-shadow: inset 3px 0 var(--accent);
}

.version-sidebar-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
}

.version-sidebar-focus {
    min-height: 96px;
}

.version-sidebar-item-actions {
    display: grid;
    align-self: stretch;
    place-items: center;
    padding: var(--space-3) 13px var(--space-3) var(--space-1);
}

.version-sidebar-item-actions .button {
    min-width: 58px;
    box-shadow: none;
}

.version-sidebar-item.focused .version-sidebar-item-actions .button:not(:disabled) {
    color: var(--text-on-accent);
    background: var(--accent-solid);
}

.scenario-card-list {
    display: grid;
    gap: 0;
}

.scenario-group-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.scenario-group-context > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 27px;
    padding: 5px 9px;
    color: var(--info);
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    line-height: 1;
}

.scenario-group-context strong {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.scenario-card {
    display: grid;
    grid-template-columns: minmax(230px, 1.25fr) minmax(220px, .9fr) auto;
    gap: var(--space-4);
    align-items: center;
    padding: 14px var(--space-4);
    border-top: 1px solid var(--line-soft);
}

.scenario-card:first-child {
    border-top: 0;
}

.scenario-card:hover {
    background: var(--surface-shell);
}

.scenario-card-main {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
}

.scenario-card-main a {
    color: var(--text-strong);
    font-size: var(--font-size-section);
    font-weight: 700;
    line-height: 1.28;
    text-decoration-thickness: 1px;
    overflow-wrap: anywhere;
}

.scenario-card-main small {
    color: var(--text-muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.scenario-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.scenario-card-meta > span:not(.case-badge) {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    min-height: 28px;
    padding: 5px 9px;
    color: var(--info);
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    line-height: 1;
}

.scenario-card-meta > span strong {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.case-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.case-positive {
    color: var(--text-strong);
    background: var(--accent-soft);
}

.case-negative {
    color: var(--danger);
    background: var(--danger-soft);
}

.case-mixed {
    display: grid;
    gap: 1px;
    align-items: center;
    color: var(--warning);
    background: var(--warning-soft);
    font-size: var(--font-size-caption);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.15;
    text-transform: none;
}

.case-mixed span {
    white-space: nowrap;
}

.scenario-card-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 7px;
}

.scenario-card-actions .button {
    box-shadow: none;
}

.scenario-type-header {
    display: grid;
    grid-template-columns: minmax(240px, 1.05fr) minmax(180px, .75fr) minmax(280px, .95fr);
    align-items: center;
    gap: 18px;
    min-height: 78px;
}

.scenario-group-identity {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.scenario-group-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.scenario-group-identity h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: -.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.scenario-group-identity small {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.scenario-group-context {
    justify-content: start;
    margin-left: 0;
}

.scenario-group-stats {
    display: grid;
    grid-template-columns: repeat(4, auto);
    align-items: center;
    gap: var(--space-2);
    justify-self: end;
}

.scenario-group-stats span {
    display: grid;
    min-width: 48px;
    gap: 2px;
    justify-items: center;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}

.scenario-group-stats strong {
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: 0;
}

.scenario-group-stats.legacy-stats {
    display: none;
}

.scenario-type-group {
    overflow: hidden;
    border-color: var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 16px 44px color-mix(in srgb, var(--shadow-color) 6%, transparent);
}

.scenario-type-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "identity stats"
        "context stats";
    gap: var(--space-3) var(--space-7);
    min-height: 118px;
    padding: var(--space-6) var(--space-6) 22px 62px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
}

.scenario-type-header::before {
    content: "⌄";
    position: absolute;
    left: 26px;
    top: 41px;
    color: var(--accent);
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1;
}

.scenario-group-identity {
    grid-area: identity;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) 14px;
}

.scenario-group-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 7px;
}

.scenario-group-tags .status-badge {
    min-height: 30px;
    padding-inline: var(--space-3);
    color: var(--text-strong);
    background: var(--accent-soft);
    font-size: var(--font-size-small);
}

.scenario-group-identity h3 {
    flex: 1 1 260px;
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-heading);
    letter-spacing: -.035em;
    line-height: 1.15;
}

.scenario-group-identity small {
    flex: none;
    color: var(--text-main);
    font-size: var(--font-size-body);
    font-weight: 700;
}

.scenario-group-context {
    grid-area: context;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-6);
    margin: 0;
}

.scenario-group-context > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: auto;
    padding: 0;
    color: var(--text-strong);
    background: transparent;
    border-radius: 0;
    font-size: var(--font-size-body);
}

.scenario-group-context strong {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.scenario-group-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(4, 74px);
    gap: 10px;
    align-self: center;
    justify-self: end;
}

.scenario-group-stats span {
    display: grid;
    min-height: 72px;
    place-items: center;
    gap: 2px;
    padding: 9px 7px;
    color: var(--text-strong);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--shadow-color) 3%, transparent);
    font-size: var(--font-size-caption);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.scenario-group-stats span:nth-child(1) strong { color: var(--success); }
.scenario-group-stats span:nth-child(2) strong { color: var(--text-main); }
.scenario-group-stats span:nth-child(3) {
    color: var(--text-strong);
    border-color: var(--line-soft);
    background: var(--surface-shell);
}
.scenario-group-stats span:nth-child(3) strong { color: var(--text-strong); }
.scenario-group-stats span:nth-child(4) {
    color: var(--danger);
    border-color: var(--danger-line);
    background: var(--surface-card);
}
.scenario-group-stats span:nth-child(4) strong { color: var(--danger); }

.scenario-group-stats strong {
    color: var(--text-strong);
    font-size: var(--font-size-metric);
    line-height: 1;
}

.scenario-list-heading {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, .9fr) minmax(260px, auto);
    gap: 18px;
    padding: 17px var(--space-6);
    color: var(--text-main);
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.scenario-list-heading span:last-child {
    text-align: center;
}

.scenario-card {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, .9fr) minmax(260px, auto);
    gap: 18px;
    padding: 22px var(--space-6);
    background: var(--surface-card);
}

.scenario-card + .scenario-card {
    border-top: 1px solid var(--line-soft);
}

.scenario-card:hover {
    background: var(--surface-card);
}

.scenario-card-main {
    position: relative;
    padding-left: var(--space-7);
}

.scenario-card-main::before {
    content: "⠿";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: -2px;
}

.scenario-card-main a {
    font-size: var(--font-size-section);
    text-decoration: none;
}

.scenario-card-main a:hover {
    text-decoration: underline;
}

.scenario-card-main small {
    font-size: var(--font-size-body);
}

.scenario-card-meta {
    justify-content: flex-start;
}

.scenario-card-actions {
    align-items: center;
    justify-content: flex-end;
    padding-left: 26px;
    border-left: 1px solid var(--line-soft);
}

.scenario-card-actions .button.small {
    min-width: 86px;
}

.spinner {
    border-color: var(--line-soft);
    border-top-color: var(--accent);
}

/* Alert variants are defined once next to .alert (success, info, error). */

/* Test case group mockup layout */
.scenario-type-groups {
    gap: 22px;
}

.scenario-type-group {
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 16px 44px color-mix(in srgb, var(--shadow-color) 6%, transparent);
}

.scenario-type-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "identity stats"
        "context stats";
    gap: var(--space-3) var(--space-7);
    min-height: 120px;
    padding: var(--space-6) var(--space-6) var(--space-6) 70px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
}

.scenario-type-header::before {
    content: "⌄";
    position: absolute;
    left: 28px;
    top: 42px;
    color: var(--text-strong);
    font-size: var(--font-size-heading);
    font-weight: 700;
    line-height: 1;
}

.scenario-group-identity {
    grid-area: identity;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.scenario-group-tags {
    display: inline-flex;
    flex: none;
}

.scenario-group-tags .status-badge {
    min-height: 34px;
    padding: 7px var(--space-3);
    color: var(--text-strong);
    background: var(--accent-soft);
    border-radius: var(--radius-control);
    font-size: var(--font-size-body);
    font-weight: 700;
}

.scenario-group-identity h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-heading);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.scenario-group-identity small,
.legacy-stats {
    display: none;
}

.scenario-group-context {
    grid-area: context;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px var(--space-8);
    margin: 0;
}

.scenario-group-context > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: auto;
    padding: 0;
    color: var(--text-strong);
    background: transparent;
    border-radius: 0;
    font-size: var(--font-size-section);
    line-height: 1.25;
}

.scenario-group-context > span::before {
    color: var(--text-main);
    font-size: var(--font-size-section);
}

.scenario-group-context > span:nth-child(1)::before { content: "▧"; }
.scenario-group-context > span:nth-child(2)::before { content: "▥"; }
.scenario-group-context > span:nth-child(3)::before { content: "▤"; }
.scenario-group-context > span:nth-child(4)::before { content: "▣"; }

.scenario-group-context strong {
    color: inherit;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.scenario-group-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(4, 74px);
    gap: 10px;
    align-self: center;
    justify-self: end;
}

.scenario-group-stats span {
    display: grid;
    min-height: 72px;
    place-items: center;
    gap: 3px;
    padding: 10px 7px;
    color: var(--text-strong);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--shadow-color) 3%, transparent);
    font-size: var(--font-size-small);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.scenario-group-stats strong {
    color: var(--text-strong);
    font-size: var(--font-size-metric);
    font-weight: 700;
    line-height: 1;
}

.scenario-group-stats span:nth-child(1) strong { color: var(--success); }
.scenario-group-stats span:nth-child(2) strong { color: var(--text-main); }
.scenario-group-stats span:nth-child(3) {
    color: var(--text-strong);
    background: var(--surface-shell);
    border-color: var(--line-soft);
}
.scenario-group-stats span:nth-child(3) strong { color: var(--text-strong); }
.scenario-group-stats span:nth-child(4) {
    color: var(--danger);
    background: var(--surface-card);
    border-color: var(--danger-line);
}
.scenario-group-stats span:nth-child(4) strong { color: var(--danger); }

.scenario-card-list {
    display: grid;
    gap: 0;
    padding: 0 var(--space-4) var(--space-4);
}

.scenario-list-heading {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px 120px 150px 360px;
    gap: 18px;
    padding: var(--space-5) 40px 18px 56px;
    color: var(--text-main);
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.scenario-list-heading span:last-child {
    text-align: center;
}

.scenario-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px 120px 150px 360px;
    gap: 18px;
    align-items: center;
    min-height: 104px;
    padding: 22px var(--space-6) 22px 56px;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-top: 0;
}

.scenario-card:first-of-type {
    border-top: 1px solid var(--line-soft);
    border-radius: var(--radius-control) var(--radius-control) 0 0;
}

.scenario-card:last-child {
    border-radius: 0 0 var(--radius-control) var(--radius-control);
}

.scenario-card:hover {
    background: var(--surface-card);
}

.scenario-card-main {
    position: relative;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding-left: 0;
}

.scenario-card-main::before {
    content: "⠿";
    position: absolute;
    left: -30px;
    top: 2px;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: -2px;
}

.scenario-card-main a {
    color: var(--text-strong);
    font-size: var(--font-size-section);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.scenario-card-main a:hover {
    text-decoration: underline;
}

.scenario-card-main small {
    color: var(--text-main);
    font-size: var(--font-size-section);
    line-height: 1.3;
}

.scenario-card-type,
.scenario-card-priority,
.scenario-card-status {
    display: flex;
    align-items: center;
}

.scenario-card-priority span {
    min-width: 58px;
    padding: var(--space-2) 13px;
    color: var(--text-strong);
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    text-align: center;
}

.scenario-card-status .status-badge {
    min-height: 36px;
    padding: var(--space-2) 14px;
    font-size: var(--font-size-section);
}

.scenario-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding-left: 34px;
    border-left: 1px solid var(--line-soft);
}

.scenario-card-actions .button.small {
    min-width: 88px;
    min-height: 46px;
    padding-inline: 18px;
    border-radius: var(--radius-control);
    font-size: var(--font-size-section);
}

.scenario-card-actions .button.small:first-child::before {
    content: "▷";
    margin-right: var(--space-2);
}

.scenario-card-actions .button.secondary:last-child {
    color: var(--danger);
    background: var(--surface-card);
    border: 1px solid var(--danger-line);
}

.scenario-card-actions .button.secondary:last-child:hover {
    background: var(--surface-shell);
}

/* Compact mockup fit for the real workspace with the versions sidebar visible */
.scenario-type-groups {
    gap: 18px;
}

.scenario-type-group {
    border-radius: var(--radius-surface);
}

.scenario-type-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
    min-height: 102px;
    padding: 18px var(--space-5) 18px 52px;
}

.scenario-type-header::before {
    content: "v";
    left: 22px;
    top: 38px;
    font-size: var(--font-size-section);
}

.scenario-group-identity {
    gap: 10px;
}

.scenario-group-tags .status-badge {
    min-height: 28px;
    padding: 5px 10px;
    border-radius: var(--radius-control);
    font-size: var(--font-size-caption);
}

.scenario-group-identity h3 {
    font-size: var(--font-size-heading-small);
    line-height: 1.18;
}

.scenario-group-context {
    gap: var(--space-2) 18px;
}

.scenario-group-context > span {
    gap: 5px;
    font-size: var(--font-size-small);
}

.scenario-group-context > span::before {
    content: none !important;
}

.scenario-group-context strong {
    font-weight: 700;
}

.scenario-group-stats {
    grid-template-columns: repeat(4, 58px);
    gap: 7px;
}

.scenario-group-stats span {
    min-height: 58px;
    padding: 7px 5px;
    border-radius: var(--radius-control);
    font-size: var(--font-size-caption);
}

.scenario-group-stats strong {
    font-size: var(--font-size-heading-small);
}

.scenario-card-list {
    padding: 0 14px 14px;
}

.scenario-list-heading {
    grid-template-columns: minmax(170px, 1fr) 112px 76px 104px minmax(170px, 180px);
    gap: 10px;
    padding: 13px 14px 13px 50px;
    font-size: var(--font-size-caption);
    letter-spacing: .05em;
}

.scenario-card {
    grid-template-columns: minmax(170px, 1fr) 112px 76px 104px minmax(170px, 180px);
    gap: 10px;
    min-height: 82px;
    padding: 15px 14px 15px 50px;
}

.scenario-card-main::before {
    content: "::";
    left: -24px;
    top: 2px;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: -1px;
}

.scenario-card-main a {
    font-size: var(--font-size-body);
    line-height: 1.24;
}

.scenario-card-main small {
    font-size: var(--font-size-caption);
}

.case-badge {
    min-height: 28px;
    padding: 5px 10px;
    font-size: var(--font-size-caption);
}

.scenario-card-priority span {
    min-width: 48px;
    padding: 6px 10px;
    font-size: var(--font-size-small);
}

.scenario-card-status .status-badge {
    min-height: 30px;
    padding: 6px 11px;
    font-size: var(--font-size-small);
}

.scenario-card-actions {
    flex-wrap: wrap;
    gap: 6px;
    padding-left: var(--space-3);
}

.scenario-card-actions .button.small {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: var(--radius-control);
    font-size: var(--font-size-caption);
    white-space: nowrap;
}

.scenario-card-actions .button.small:first-child {
    min-width: 52px;
}

.scenario-card-actions .button.small:first-child::before {
    content: none;
}

.scenario-card-actions .button.secondary:last-child {
    min-width: 78px;
}

/* Typography tuning */


body {
    font-size: var(--font-size-body);
    line-height: 1.45;
    letter-spacing: -.005em;
}

.topbar,
.nav-menu a,
.form-control,
button,
input,
select,
textarea {
    font-family: inherit;
}

.page-header h1 {
    font-size: clamp(24px, 2.4vw, 31px);
    font-weight: 700;
    letter-spacing: -.035em;
}

.page-header p,
.scenario-browser-toolbar .muted {
    font-size: var(--font-size-small);
}

.scenario-browser-toolbar h2 {
    font-size: var(--font-size-heading-small);
    font-weight: 700;
}

.panel-header h2,
.version-sidebar-header h2 {
    font-size: var(--font-size-section);
    font-weight: 700;
}

.eyebrow,
.nav-group,
.scenario-list-heading {
    letter-spacing: .07em;
}

.scenario-group-identity h3 {
    font-size: var(--font-size-section);
    font-weight: 700;
    letter-spacing: -.025em;
}

.scenario-group-tags .status-badge {
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.scenario-group-context > span {
    font-size: var(--font-size-caption);
}

.scenario-group-context strong {
    font-weight: 700;
}

.scenario-group-stats span {
    font-size: var(--font-size-caption);
}

.scenario-group-stats strong {
    font-size: var(--font-size-heading-small);
    font-weight: 700;
}

.scenario-list-heading {
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.scenario-card-main a {
    font-size: var(--font-size-small);
    font-weight: 700;
}

.scenario-card-main small {
    font-size: var(--font-size-caption);
}

.case-badge,
.scenario-card-priority span,
.scenario-card-status .status-badge,
.scenario-card-actions .button.small {
    font-size: var(--font-size-caption);
}

.case-badge {
    font-weight: 700;
}

.button,
button.button {
    font-weight: 600;
}

.status-badge {
    font-weight: 700;
}

/* Font Awesome icon alignment */
.nav-menu a {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding-left: 10px;
}

.nav-menu a::before {
    content: none;
}

.nav-menu a i {
    color: var(--text-muted);
    font-size: var(--font-size-small);
    text-align: center;
}

.nav-menu a.active i {
    color: var(--accent);
}

.scenario-type-header {
    padding-left: 56px;
}

.scenario-type-header::before {
    content: none;
}

.scenario-group-toggle {
    position: absolute;
    left: 22px;
    top: 37px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.scenario-group-context > span::before {
    content: none !important;
}

.scenario-group-context i {
    width: 15px;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    text-align: center;
}

.scenario-card-main {
    padding-left: 0;
}

.scenario-card-main::before {
    content: none;
}

.scenario-drag-handle {
    position: absolute;
    left: -25px;
    top: 4px;
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.scenario-card-actions .button {
    gap: 7px;
}

.scenario-card-actions .button i {
    font-size: var(--font-size-caption);
}

.scenario-card-actions .button.small:first-child::before {
    content: none;
}

/* Compact two-line group header */
.scenario-type-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
        "identity dates stats"
        "context dates stats";
    align-items: center;
    min-height: 70px;
    gap: 2px var(--space-4);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

.scenario-group-toggle {
    top: 50%;
    transform: translateY(-50%);
}

.scenario-group-identity {
    flex-wrap: nowrap;
    gap: 10px;
    align-self: end;
    min-width: 0;
}

.scenario-group-identity h3 {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    font-size: var(--font-size-body);
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.scenario-group-identity h3 > span { min-width: 0; }

.scenario-group-identity h3 small {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    display: inline;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 400;
}

.scenario-group-context {
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    align-self: start;
    padding-left: 0;
}

.scenario-group-context > span {
    font-size: var(--font-size-caption);
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    white-space: normal;
    overflow-wrap: anywhere;
}

.scenario-group-context i {
    font-size: var(--font-size-caption);
}

.scenario-type-header > .scenario-group-dates {
    grid-area: dates;
    display: grid;
    gap: 5px;
    align-content: center;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    white-space: nowrap;
}

.scenario-group-dates > span {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1);
}

.scenario-group-dates i {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.scenario-group-dates strong {
    color: var(--text-strong);
    font-weight: 700;
}

.scenario-group-dates time {
    font-variant-numeric: tabular-nums;
}

.scenario-group-stats {
    grid-template-columns: repeat(4, 48px);
    gap: 5px;
}

.scenario-type-header > div.scenario-group-stats { display: grid; }

.scenario-group-stats span {
    min-height: 42px;
    min-width: 0;
    padding: var(--space-1) 3px;
    font-size: var(--font-size-caption);
    overflow-wrap: anywhere;
}

.scenario-group-stats strong {
    font-size: var(--font-size-section);
}

.scenario-card-type .case-badge {
    gap: 5px;
}

.case-mixed {
    display: grid;
    gap: 3px;
    align-items: center;
    color: inherit;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: var(--font-size-caption);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
}

.case-mixed span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.case-mixed i {
    font-size: var(--font-size-caption);
}

.case-mixed strong {
    font-weight: 700;
}

.case-metric-positive {
    color: var(--accent);
}

.case-metric-negative {
    color: var(--danger);
}

.scenario-type-group {
    overflow: hidden;
    border: 1px solid var(--line-soft);
}

.scenario-type-groups {
    gap: var(--space-3);
}

.scenario-type-header {
    cursor: pointer;
    border-bottom: 0;
}

.scenario-type-group.is-expanded .scenario-type-header {
    border-bottom: 0;
}

.scenario-type-group.is-collapsed .scenario-type-header {
    border-bottom: 0;
}

.scenario-group-toggle {
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.scenario-group-toggle i {
    transition: transform .16s ease;
}

.scenario-card-list {
    max-height: 1400px;
    overflow: hidden;
    padding: var(--space-2) var(--space-3) var(--space-3);
    opacity: 1;
    transition:
        max-height .28s ease,
        padding-top .28s ease,
        padding-bottom .28s ease,
        opacity .18s ease;
}

.scenario-type-group.is-collapsed .scenario-card-list {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.scenario-list-heading {
    border: 1px solid var(--line-soft);
    border-bottom: 0;
    border-radius: var(--radius-control) var(--radius-control) 0 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

.scenario-card {
    border: 1px solid var(--line-soft);
    border-top: 0;
    min-height: 70px;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
}

.scenario-run-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
}

.scenario-run-inline:hover {
    text-decoration: none;
}

.scenario-run-inline .status-badge {
    min-height: 18px;
    padding: 3px 6px;
    font-size: var(--font-size-caption);
}

.scenario-run-inline time,
.scenario-run-inline span {
    white-space: nowrap;
}

.latest-run-status.is-passed {
    color: var(--success);
}

.latest-run-status.is-failed {
    color: var(--danger);
}

.latest-run-status.is-skipped {
    color: var(--text-muted);
}

.scenario-run-inline.no-run {
    color: var(--text-muted);
}

.scenario-run-inline.is-running {
    display: grid;
    gap: 5px;
    width: min(260px, 100%);
    color: var(--text-strong);
}

.scenario-run-inline.live-suite-status {
    display: grid;
    gap: 5px;
    width: min(260px, 100%);
}

.scenario-run-inline.live-suite-status.is-passed {
    color: var(--success);
}

.scenario-run-inline.live-suite-status.is-failed {
    color: var(--danger);
}

.scenario-run-inline.live-suite-status.is-skipped {
    color: var(--text-muted);
}

.scenario-run-inline-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.scenario-run-inline-row strong {
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.scenario-mini-progress {
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
}

.scenario-mini-progress span {
    display: block;
    height: 100%;
    background: var(--accent-solid);
    border-radius: inherit;
    transition: width .2s ease;
}

.scenario-card:first-of-type {
    border-top: 1px solid var(--line-soft);
    border-radius: 0;
}

.scenario-card:last-child {
    border-radius: 0 0 var(--radius-control) var(--radius-control);
}

.progress-summary {
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.progress-summary:hover {
    border-color: var(--line-soft);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--shadow-color) 7%, transparent);
}

/* UI test run: EditorDialog (Wide) with a stable height while the live preview changes. */
.release-modal.ui-run-execution-modal { height: min(900px, calc(100dvh - 32px)); }

.ui-run-execution-body {
    gap: 10px;
    overscroll-behavior: contain;
    padding: var(--space-3) var(--space-4) var(--space-4);
}

.ui-run-execution-modal .ui-layout-assertion-results {
    max-height: none;
    overflow: visible;
}

.ui-run-execution-modal .ui-layout-report-grid {
    align-items: start;
}

@media (min-width: 951px) {
    .ui-run-execution-modal .ui-layout-screenshot-stage { position: sticky; top: 8px; }
}

.ui-run-live-preview {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    background: var(--surface-card);
}

.ui-run-live-preview > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.ui-run-live-preview > header > div {
    display: grid;
    gap: 2px;
}

.ui-run-live-preview > header strong {
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.ui-run-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: var(--radius-pill);
    background: var(--success-soft);
    color: var(--success);
    font-size: var(--font-size-caption);
    font-weight: 700;
    text-transform: uppercase;
}

.ui-run-live-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success-solid);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--shadow-color) 14%, transparent);
}

.ui-run-live-frame {
    display: grid;
    place-items: center;
    height: clamp(280px, 48vh, 430px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    background: linear-gradient(45deg, var(--surface-muted) 25%, transparent 25%),
        linear-gradient(-45deg, var(--surface-muted) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--surface-muted) 75%),
        linear-gradient(-45deg, transparent 75%, var(--surface-muted) 75%),
        var(--surface-card);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.ui-run-live-frame img {
    display: block;
    width: 100%;
    height: clamp(280px, 48vh, 430px);
    object-fit: contain;
    object-position: center;
}

.ui-run-dialog-starting {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 86px;
    padding: 18px;
    color: var(--text-main);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
}

.ui-run-dialog-starting > i {
    color: var(--accent);
    font-size: var(--font-size-heading-small);
}

.ui-run-dialog-starting > div {
    display: grid;
    gap: 3px;
}

.ui-run-dialog-result {
    display: grid;
    gap: var(--space-3);
    padding: 14px;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
}

.ui-run-dialog-result > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.ui-run-dialog-result > header > div {
    display: grid;
    gap: 3px;
}

.ui-run-current-work {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    padding: 9px 10px;
    color: var(--text-strong);
    background: var(--surface-shell);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}

.ui-test-live-progress > header .ui-run-current-work {
    min-width: 190px;
    margin: 0 auto 0 var(--space-2);
    padding: 2px 14px;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line-soft);
    border-radius: 0;
}

.ui-test-live-progress > header .ui-run-current-work > i {
    font-size: var(--font-size-small);
}

.ui-run-current-work > span {
    display: grid;
    gap: 1px;
}

.ui-run-current-work small {
    color: var(--text-muted);
}

.scenario-editor-page-header {
    align-items: center;
    max-width: 1120px;
    margin: 0 auto var(--space-3);
}

.scenario-editor-page-header h1 {
    font-size: clamp(23px, 2vw, 29px);
    letter-spacing: -.035em;
}

.scenario-editor-page-header p {
    margin-top: var(--space-1);
    font-size: var(--font-size-small);
}

.scenario-editor-page-header .button {
    min-height: 34px;
    padding: 7px 14px;
    border-radius: var(--radius-section);
    font-size: var(--font-size-small);
}

.scenario-editor-studio {
    max-width: 1120px;
    margin: 0 auto;
    gap: var(--space-3);
}

.editor-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: var(--space-3);
    align-items: stretch;
}

.scenario-editor-studio .editor-card {
    gap: var(--space-3);
    padding: 15px 17px;
    border-radius: var(--radius-surface);
    box-shadow: 0 12px 34px color-mix(in srgb, var(--shadow-color) 5%, transparent);
}

.scenario-editor-studio .editor-card-header {
    min-height: 0;
    gap: var(--space-3);
    padding-bottom: 10px;
}

.scenario-editor-studio .editor-card-header h2 {
    font-size: var(--font-size-section);
    letter-spacing: -.015em;
}

.scenario-editor-studio .editor-card-header small {
    max-width: 300px;
    font-size: var(--font-size-caption);
    line-height: 1.35;
}

.scenario-editor-studio .icon-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--text-strong);
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    cursor: pointer;
}

.scenario-editor-studio .icon-button:hover {
    background: var(--accent-soft);
    border-color: var(--line-soft);
}

.scenario-editor-studio .icon-button.is-editing {
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-color: var(--accent);
}

.editor-read-grid,
.parameter-read-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.read-field {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
    padding: 10px var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
}

.read-field.compact {
    max-width: 140px;
}

.read-field.wide {
    min-width: 0;
}

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

.read-field > span {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.read-field strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.read-field p,
.read-field small {
    margin: 0;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.35;
}

.read-field code {
    overflow: hidden;
    font-size: var(--font-size-dense);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parameter-read-summary {
    padding: 0 17px var(--space-4);
}

.section-edit-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1040px, calc(100vw - 48px));
    max-height: min(820px, calc(100vh - 48px));
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 30px 80px color-mix(in srgb, var(--shadow-color) 27%, transparent);
}

.section-edit-modal-header,
.section-edit-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px var(--space-4);
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
}

.section-edit-modal-header h2 {
    margin: 2px 0 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
}

.section-edit-modal-body {
    overflow: auto;
    padding: var(--space-4);
    background: var(--surface-shell);
}

.section-edit-modal-body > .parameter-editor {
    background: var(--surface-card);
    border-radius: var(--radius-surface);
}

.section-edit-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--line-soft);
    border-bottom: 0;
}

.scenario-editor-studio .eyebrow {
    font-size: var(--font-size-caption);
    letter-spacing: .11em;
}

.scenario-editor-studio .editor-grid {
    gap: 10px var(--space-3);
}

.scenario-editor-studio .editor-grid > .form-field,
.scenario-editor-studio .parameter-editor > .form-field,
.scenario-editor-studio .api-main-grid > .form-field,
.scenario-editor-studio .compact-grid > .form-field {
    min-height: 0;
}

.scenario-editor-studio .form-field {
    gap: 5px;
}

.scenario-editor-studio .form-field > span,
.scenario-editor-studio .field-label {
    min-height: 0;
    font-size: var(--font-size-caption);
    line-height: 1.2;
}

.scenario-editor-studio .form-field > small,
.scenario-editor-studio .form-field > .muted {
    min-height: 0;
    font-size: var(--font-size-caption);
}

.scenario-editor-studio .form-control,
.scenario-editor-studio input.form-control,
.scenario-editor-studio select.form-control {
    min-height: 38px;
    padding: var(--space-2) 11px;
    border-radius: var(--radius-section);
    font-size: var(--font-size-small);
}

.scenario-editor-studio textarea.form-control {
    min-height: 74px;
    padding: 9px 11px;
    font-size: var(--font-size-small);
}

.scenario-editor-studio textarea.compact-textarea,
.scenario-editor-studio .compact-textarea {
    min-height: 58px;
}

.editor-card-identity .editor-grid {
    grid-template-columns: minmax(0, 1fr) 120px;
}

.editor-card-context .editor-grid {
    gap: 10px;
}

.scenario-editor-studio .version-config-summary {
    min-height: 0;
    gap: 10px;
    padding: 11px var(--space-3);
    border-radius: var(--radius-surface);
}

.scenario-editor-studio .version-config-summary strong {
    font-size: var(--font-size-small);
}

.scenario-editor-studio .version-config-summary span {
    font-size: var(--font-size-caption);
    letter-spacing: .06em;
}

.scenario-editor-studio .version-config-summary small,
.scenario-editor-studio .version-config-summary code {
    font-size: var(--font-size-dense);
}

.scenario-editor-studio .editor-card-parameters {
    padding: 0;
}

.scenario-editor-studio .editor-card-parameters > .editor-card-header {
    margin: 0 17px;
    padding-top: 15px;
}

.scenario-editor-studio .editor-card-parameters > .parameter-editor {
    gap: var(--space-3);
    padding: 14px 17px var(--space-4);
}

.scenario-editor-studio .api-config-section {
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-surface);
}

.scenario-editor-studio .api-section-heading {
    min-height: 0;
    gap: 10px;
}

.scenario-editor-studio .api-section-heading h3 {
    font-size: var(--font-size-section);
}

.scenario-editor-studio .api-section-heading p {
    margin-top: 1px;
    font-size: var(--font-size-caption);
}

.scenario-editor-studio .api-step {
    width: 25px;
    height: 25px;
    font-size: var(--font-size-caption);
}

.scenario-editor-studio .api-main-grid {
    gap: 9px;
}

.scenario-editor-studio .selected-endpoint-card {
    min-height: 0;
    align-items: start;
    gap: var(--space-3);
    padding: 11px var(--space-3);
    border-radius: var(--radius-surface);
}

.scenario-editor-studio .selected-endpoint-card h4 {
    gap: 7px;
    margin: 3px 0 var(--space-1);
    font-size: var(--font-size-section);
}

.scenario-editor-studio .selected-endpoint-card small {
    margin-top: 5px;
    font-size: var(--font-size-dense);
}

.scenario-editor-studio .selected-endpoint-card code {
    font-size: var(--font-size-caption);
}

.scenario-editor-studio .selected-endpoint-meta {
    justify-content: flex-start;
    gap: 6px;
    font-size: var(--font-size-dense);
}

.scenario-editor-studio .selected-endpoint-meta .button.small,
.scenario-editor-studio .endpoint-info-trigger {
    min-height: 28px;
    padding: 5px 9px;
    font-size: var(--font-size-dense);
}

.scenario-editor-studio .endpoint-info-trigger i {
    width: 15px;
    height: 15px;
    font-size: var(--font-size-dense);
}

.scenario-editor-studio .api-advanced-details {
    padding: 10px var(--space-3);
}

.scenario-editor-studio .advanced-card > summary {
    min-height: 50px;
    padding: var(--space-3) 17px;
}

.scenario-editor-studio .advanced-card > summary strong {
    font-size: var(--font-size-section);
}

.scenario-editor-studio .advanced-card > .editor-grid {
    padding: 0 17px 17px;
}

.scenario-editor-studio .editor-footer {
    bottom: 10px;
    padding: 10px var(--space-3);
    border-radius: var(--radius-surface);
}

.scenario-editor-studio .editor-footer .button {
    min-height: 36px;
    padding: var(--space-2) 14px;
    font-size: var(--font-size-small);
}

.scenario-editor-studio .check-field {
    min-height: 32px;
    font-size: var(--font-size-small);
}

.scenario-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3) 18px;
    padding: 15px 17px;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 12px 34px color-mix(in srgb, var(--shadow-color) 5%, transparent);
}

.scenario-summary-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    min-width: 0;
}

.scenario-summary-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--text-strong);
    background: var(--accent-soft);
    border-radius: var(--radius-surface);
    font-size: var(--font-size-heading-small);
}

.scenario-summary-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.scenario-summary-title-row h2 {
    overflow: hidden;
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-heading);
    line-height: 1.1;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scenario-summary-main p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: var(--font-size-small);
    line-height: 1.35;
}

.scenario-summary-actions {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.scenario-summary-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, minmax(92px, 1fr));
    gap: 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--line-soft);
}

.summary-meta-item {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
    padding: 0 var(--space-3);
    border-left: 1px solid var(--line-soft);
}

.summary-meta-item:first-child {
    padding-left: 0;
    border-left: 0;
}

.summary-meta-item span {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.summary-meta-item strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scenario-summary-editor {
    grid-column: 1 / -1;
    padding-top: var(--space-3);
    border-top: 1px solid var(--line-soft);
}

.api-test-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .72fr);
    gap: var(--space-3);
    align-items: start;
    padding: 0;
    background: transparent;
    border: 0;
}

.api-test-list-panel,
.api-case-inspector {
    min-width: 0;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.api-workbench-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) 14px;
    border-bottom: 1px solid var(--line-soft);
}

.api-workbench-heading h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: -.02em;
}

.api-workbench-heading p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.api-test-case-list {
    display: grid;
}

.api-test-case-row {
    display: grid;
    grid-template-columns: 22px minmax(180px, 1fr) auto minmax(104px, auto) auto 24px;
    gap: var(--space-3);
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 14px;
    color: var(--text-strong);
    text-align: left;
    background: var(--surface-card);
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    cursor: pointer;
}

.api-test-case-row:last-child {
    border-bottom: 0;
}

.api-test-case-row:hover,
.api-test-case-row.selected {
    background: var(--surface-shell);
}

.api-test-case-row.selected {
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.api-test-case-row i.positive {
    color: var(--success);
}

.api-test-case-row i.negative {
    color: var(--danger);
}

.api-test-case-row strong {
    display: block;
    font-size: var(--font-size-small);
    line-height: 1.25;
}

.api-test-case-row small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--font-size-dense);
}

.api-case-inspector {
    position: sticky;
    top: 82px;
    overflow: hidden;
}

.api-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line-soft);
}

.api-inspector-header h3 {
    margin: 2px 0 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    letter-spacing: -.02em;
}

.api-inspector-section {
    border-bottom: 1px solid var(--line-soft);
}

.api-inspector-section:last-child {
    border-bottom: 0;
}

.api-inspector-section > summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: 10px 14px;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.api-inspector-section > summary::-webkit-details-marker {
    display: none;
}

.api-inspector-section > summary::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 700;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.api-inspector-section[open] > summary::before {
    content: "\f107";
}

.api-inspector-section > .compact-grid,
.api-inspector-section > .api-validation-list,
.api-inspector-section > .expectation-row,
.api-inspector-section > p,
.api-inspector-section > pre {
    margin: 0 14px var(--space-3);
}

.api-validation-list {
    display: grid;
    gap: 6px;
}

.api-validation-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 26px;
    gap: var(--space-2);
    align-items: center;
    min-height: 32px;
    padding: 7px var(--space-2);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    color: var(--text-strong);
    font-size: var(--font-size-caption);
}

.api-validation-item > i {
    color: var(--success);
}

.api-validation-item button {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-control);
    cursor: pointer;
}

.api-validation-item button:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.compact-expectation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
    align-items: end;
}

.empty-state {
    display: grid;
    gap: 5px;
    padding: 18px;
    color: var(--text-muted);
}

.empty-state strong {
    color: var(--text-strong);
}

/* Scenario editor v2: read-first engineering workspace */
.scenario-editor-studio {
    max-width: 1280px;
    gap: 10px;
}

.scenario-editor-page-header {
    max-width: 1280px;
    margin-inline: auto;
    padding-bottom: var(--space-2);
}

.scenario-editor-page-header h1 {
    font-size: var(--font-size-heading);
}

.scenario-summary-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 13px 15px;
    border-radius: var(--radius-surface);
}

.scenario-summary-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-section);
    font-size: var(--font-size-section);
}

.scenario-summary-title-row h2 {
    font-size: var(--font-size-heading-small);
}

.scenario-summary-main p {
    margin-top: 3px;
    font-size: var(--font-size-caption);
}

.scenario-summary-meta {
    grid-template-columns: 1.05fr 1fr .75fr minmax(220px, 1.5fr) .55fr .75fr;
    gap: var(--space-2);
    padding-top: 10px;
}

.scenario-summary-meta .summary-meta-item {
    padding: 0 10px;
    border-left: 1px solid var(--line-soft);
}

.scenario-summary-meta .summary-meta-item:first-child {
    padding-left: 0;
    border-left: 0;
}

.summary-meta-item small {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.summary-meta-item.metric strong {
    font-size: var(--font-size-heading-small);
    line-height: 1;
}

.summary-meta-item.result strong {
    color: var(--success);
}

.scenario-editor-studio .editor-card-parameters {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.scenario-editor-studio .editor-card-parameters > .editor-card-header {
    display: none;
}

.scenario-editor-studio .editor-card-parameters > .parameter-editor {
    padding: 0;
}

.api-engine-shell {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.api-endpoint-inspector {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.api-endpoint-command {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.endpoint-command-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.endpoint-command-main strong {
    display: block;
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-command-main small {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--font-size-dense);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-command-actions {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.endpoint-read-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: var(--space-2) 0;
    border-block: 1px solid var(--line-soft);
}

.endpoint-read-strip span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding-inline: 10px;
    color: var(--text-strong);
    font-size: var(--font-size-caption);
    border-left: 1px solid var(--line-soft);
}

.endpoint-read-strip span:first-child {
    padding-left: 0;
    border-left: 0;
}

.endpoint-read-strip strong {
    color: var(--text-muted);
    font-size: var(--font-size-dense);
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.api-endpoint-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
    padding: 10px;
    background: var(--surface-shell);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
}

.endpoint-path-field {
    grid-column: span 2;
}

.endpoint-path-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
}

.endpoint-path-control .button {
    min-height: 38px;
    white-space: nowrap;
}

.endpoint-sections {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
}

.endpoint-section-row {
    border-bottom: 1px solid var(--line-soft);
}

.endpoint-section-row:last-child {
    border-bottom: 0;
}

.endpoint-section-row > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 36px;
    padding: var(--space-2) 11px;
    color: var(--text-strong);
    font-size: var(--font-size-caption);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.endpoint-section-row > summary::-webkit-details-marker {
    display: none;
}

.endpoint-section-row > summary span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.endpoint-section-row > summary i {
    width: 14px;
    color: var(--text-muted);
}

.endpoint-section-row > summary strong {
    color: var(--text-muted);
    font-size: var(--font-size-dense);
    font-weight: 700;
}

.endpoint-section-content {
    padding: 0 11px 10px;
}

.endpoint-section-content pre,
.endpoint-section-content code {
    display: block;
    overflow: auto;
    max-height: 180px;
    margin: 0;
    padding: var(--space-2) 9px;
    color: var(--text-strong);
    background: var(--surface-shell);
    border: 1px solid var(--warning-line);
    border-radius: var(--radius-control);
    font-size: var(--font-size-dense);
    line-height: 1.45;
    white-space: pre-wrap;
}

.api-test-workbench {
    grid-template-columns: minmax(0, 1.7fr) minmax(330px, .7fr);
    gap: 10px;
}

.api-test-list-panel,
.api-case-inspector {
    border-radius: var(--radius-surface);
}

.api-workbench-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 50px;
    padding: 9px var(--space-3);
}

.api-workbench-heading h3 {
    font-size: var(--font-size-section);
}

.api-mini-stats {
    display: flex;
    gap: 7px;
    align-items: center;
}

.api-mini-stats span {
    display: grid;
    place-items: center;
    min-width: 54px;
    min-height: 34px;
    padding: var(--space-1) var(--space-2);
    color: var(--text-muted);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    font-size: var(--font-size-dense);
    text-transform: uppercase;
}

.api-mini-stats strong {
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1;
}

.api-test-table-head,
.api-test-case-row {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) 112px 112px 92px 148px;
    align-items: center;
}

.api-test-table-head {
    min-height: 34px;
    padding: 0 var(--space-3);
    color: var(--text-main);
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-dense);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.api-test-case-row {
    gap: 10px;
    min-height: 54px;
    padding: 7px var(--space-3);
    cursor: pointer;
}

.api-case-name-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.api-case-name-cell span {
    min-width: 0;
}

.api-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.api-case-inspector {
    top: 70px;
}

.api-inspector-header {
    min-height: 50px;
    padding: 10px var(--space-3);
}

.api-inspector-header h3 {
    font-size: var(--font-size-section);
}

.api-inspector-actions {
    display: flex;
    gap: 6px;
}

.inspector-read-summary,
.inspector-value-grid {
    display: grid;
    gap: 7px;
    padding: 10px var(--space-3);
    border-bottom: 1px solid var(--line-soft);
}

.inspector-read-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inspector-read-summary span,
.inspector-value-grid span {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: var(--text-strong);
    font-size: var(--font-size-caption);
}

.inspector-read-summary strong,
.inspector-value-grid strong {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.inspector-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 var(--space-3) 10px;
}

.inspector-chip-list span {
    padding: 5px var(--space-2);
    color: var(--text-strong);
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
}

.api-inspector-section > summary {
    min-height: 34px;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-caption);
}

.api-inspector-section > .compact-grid,
.api-inspector-section > .api-validation-list,
.api-inspector-section > .expectation-row,
.api-inspector-section > p,
.api-inspector-section > pre {
    margin: 0 var(--space-3) 10px;
}

.api-validation-item {
    min-height: 30px;
    border-radius: var(--radius-pill);
}

.api-validation-list.readonly .api-validation-item {
    grid-template-columns: 18px minmax(0, 1fr);
    background: var(--surface-shell);
    border-color: var(--success-line);
}

.api-validation-list.readonly .api-validation-item button {
    display: none;
}

.compact-field {
    margin-bottom: var(--space-2);
}

.scenario-editor-studio {
    width: min(100%, 1480px);
    max-width: none;
}

.scenario-editor-page-header {
    width: min(100%, 1480px);
    max-width: none;
}

.scenario-editor-studio .editor-card-parameters > .parameter-editor {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.parameter-editor > .api-engine-shell.full {
    grid-column: 1 / -1;
    width: 100%;
}

.api-engine-shell {
    grid-template-columns: 1fr;
}

.api-endpoint-inspector {
    width: 100%;
}

.api-test-workbench {
    width: 100%;
    grid-template-columns: minmax(620px, 65fr) minmax(360px, 35fr);
    align-items: start;
}

.api-test-list-panel {
    min-height: 430px;
}

.api-case-inspector {
    min-height: 430px;
}

.api-row-actions .icon-button.subtle {
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.api-row-actions .icon-button.subtle:hover {
    color: var(--text-strong);
    background: var(--surface-muted);
}

.api-validation-item span {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.api-validation-item span strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-caption);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-validation-item span small {
    overflow: hidden;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-validation-list.readonly .api-validation-item {
    min-height: 38px;
    border-radius: var(--radius-surface);
}

.scenario-summary-card {
    background: linear-gradient(90deg, var(--surface-card) 0%, var(--surface-card) 65%, var(--surface-shell) 100%);
}

.scenario-summary-meta {
    align-items: stretch;
}

.scenario-summary-meta .summary-meta-item {
    padding: 9px 11px;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
}

.scenario-summary-meta .summary-meta-item:first-child {
    padding-left: 11px;
    border-left: 1px solid var(--line-soft);
}

.summary-meta-item strong {
    font-size: var(--font-size-small);
}

.summary-meta-item.endpoint strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--font-size-caption);
}

.summary-meta-item.metric,
.summary-meta-item.result {
    text-align: center;
}

.api-endpoint-inspector {
    padding: 10px var(--space-3);
}

.endpoint-read-strip {
    padding: 6px 0;
}

.endpoint-section-row > summary {
    min-height: 34px;
    padding-block: 7px;
}

.api-test-case-row {
    min-height: 56px;
}

.api-test-case-row .status-badge {
    justify-self: start;
}

.api-workbench-heading .actions .button {
    min-height: 32px;
}

/* Readability refinement pass: calmer hierarchy, fixed icon slots, less noise */
.scenario-editor-page-header {
    padding-top: var(--space-3);
}

.scenario-editor-page-header p {
    font-size: var(--font-size-small);
    line-height: 1.45;
}

.scenario-editor-studio {
    gap: 9px;
}

.scenario-editor-studio .eyebrow,
.scenario-editor-studio .field-label,
.scenario-editor-studio .form-field > span,
.summary-meta-item small,
.endpoint-read-strip strong,
.api-test-table-head,
.inspector-read-summary strong,
.inspector-value-grid strong {
    letter-spacing: .015em;
    text-transform: none;
}

.scenario-editor-studio .eyebrow,
.scenario-editor-studio .field-label,
.scenario-editor-studio .form-field > span {
    font-size: var(--font-size-caption);
    line-height: 1.35;
}

.scenario-summary-card {
    gap: 10px var(--space-4);
    padding: var(--space-3) 14px;
    background: var(--surface-card);
}

.scenario-summary-main {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-3);
}

.scenario-summary-title-row {
    gap: 10px;
}

.scenario-summary-title-row h2 {
    font-size: var(--font-size-heading);
    line-height: 1.14;
}

.scenario-summary-main p {
    max-width: 780px;
    color: var(--text-main);
    font-size: var(--font-size-small);
    line-height: 1.45;
}

.scenario-summary-icon {
    flex-shrink: 0;
}

.scenario-summary-meta {
    grid-template-columns: minmax(100px, .9fr) minmax(130px, 1fr) minmax(80px, .65fr) minmax(220px, 1.65fr) 104px 120px;
    gap: 0;
    padding-top: 10px;
    border-top-color: var(--line-soft);
}

.scenario-summary-meta .summary-meta-item,
.scenario-summary-meta .summary-meta-item:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 1px 14px;
    text-align: left;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line-soft);
    border-radius: 0;
}

.scenario-summary-meta .summary-meta-item:first-child {
    padding-left: 0;
    border-left: 0;
}

.summary-meta-item small {
    order: -1;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.summary-meta-item strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-body);
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-meta-item.endpoint strong {
    font-size: var(--font-size-small);
}

.summary-meta-item.metric,
.summary-meta-item.result {
    align-content: center;
    padding: 7px 10px;
    text-align: center;
    background: var(--surface-shell);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
}

.summary-meta-item.result {
    background: var(--surface-shell);
    border-color: var(--success-line);
}

.summary-meta-item.metric strong,
.summary-meta-item.result strong {
    font-size: var(--font-size-section);
}

.api-endpoint-inspector {
    gap: 9px;
    padding: 11px 13px;
    border-radius: var(--radius-surface);
}

.api-endpoint-command {
    min-height: 40px;
}

.endpoint-command-main {
    gap: 11px;
}

.endpoint-command-main .status-badge {
    flex-shrink: 0;
}

.endpoint-command-main > div {
    min-width: 0;
}

.endpoint-command-main strong {
    font-size: var(--font-size-section);
    line-height: 1.25;
}

.endpoint-command-main small {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.35;
}

.endpoint-command-actions,
.api-inspector-actions,
.api-row-actions {
    flex-shrink: 0;
}

.endpoint-read-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) 22px;
    padding: var(--space-1) 0 var(--space-2);
    border-block: 0;
}

.endpoint-read-strip span {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    padding: 0;
    border: 0;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.35;
    white-space: nowrap;
}

.endpoint-read-strip strong {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.endpoint-sections {
    border-color: var(--line-soft);
    border-radius: var(--radius-section);
}

.endpoint-section-row > summary {
    min-height: 38px;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 1.35;
}

.endpoint-section-row > summary span {
    min-width: 0;
}

.endpoint-section-row > summary i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-main);
}

.endpoint-section-row > summary strong {
    min-width: 34px;
    justify-self: end;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.endpoint-section-content {
    padding: 0 var(--space-3) 10px 40px;
}

.api-test-workbench {
    grid-template-columns: minmax(0, 62fr) minmax(380px, 38fr);
    gap: var(--space-3);
}

.api-test-list-panel,
.api-case-inspector {
    overflow: hidden;
    border-color: var(--line-soft);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.api-workbench-heading {
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: var(--space-3);
    padding: 9px var(--space-3);
}

.api-workbench-heading h3 {
    margin-top: 1px;
    font-size: var(--font-size-section);
    line-height: 1.25;
}

.api-mini-stats span {
    min-width: 52px;
    min-height: 34px;
    font-size: var(--font-size-dense);
    line-height: 1.15;
}

.api-mini-stats strong {
    font-size: var(--font-size-section);
}

.api-test-table-head,
.api-test-case-row {
    grid-template-columns: minmax(240px, 1fr) 108px 122px 96px 44px;
    column-gap: var(--space-3);
}

.api-test-table-head {
    min-height: 32px;
    padding: 0 var(--space-3);
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.api-test-case-row {
    min-height: 54px;
    padding: 7px var(--space-3);
    border-bottom-color: var(--line-soft);
}

.api-case-name-cell {
    gap: 10px;
}

.api-case-name-cell > i,
.api-test-case-row > i.positive,
.api-test-case-row > i.negative {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.api-case-name-cell span,
.api-test-case-row > span,
.api-test-case-row > small {
    min-width: 0;
}

.api-test-case-row strong {
    overflow: hidden;
    font-size: var(--font-size-body);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-test-case-row small {
    overflow: hidden;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-test-case-row > .status-badge {
    max-width: 100%;
    justify-self: start;
    white-space: nowrap;
}

.api-row-actions {
    justify-content: flex-end;
}

.api-row-actions .icon-button.subtle,
.scenario-editor-studio .icon-button,
.endpoint-info-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex: 0 0 32px;
}

.api-case-inspector {
    min-width: 380px;
}

.api-inspector-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    min-height: 56px;
    padding: 10px var(--space-3);
}

.api-inspector-header > div:first-child {
    min-width: 0;
}

.api-inspector-header h3 {
    overflow: hidden;
    font-size: var(--font-size-section);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-inspector-actions {
    align-items: center;
}

.api-inspector-actions .button,
.endpoint-command-actions .button {
    flex-shrink: 0;
    min-height: 32px;
    white-space: nowrap;
}

.inspector-read-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
    padding: 9px var(--space-3);
}

.inspector-read-summary span,
.inspector-value-grid span {
    font-size: var(--font-size-small);
    line-height: 1.35;
}

.inspector-read-summary strong,
.inspector-value-grid strong {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.api-inspector-section > summary {
    min-height: 38px;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 1.35;
}

.api-inspector-section > summary::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.api-validation-list {
    gap: 7px;
}

.api-validation-item {
    grid-template-columns: 20px minmax(0, 1fr) 26px;
    gap: var(--space-2);
    min-height: 40px;
    padding: 7px 10px;
}

.api-validation-list.readonly .api-validation-item {
    grid-template-columns: 20px minmax(0, 1fr);
}

.api-validation-item > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.api-validation-item span strong {
    font-size: var(--font-size-small);
    line-height: 1.25;
}

.api-validation-item span small {
    font-size: var(--font-size-caption);
    line-height: 1.25;
}

.status-badge,
.soft-pill {
    line-height: 1.25;
    white-space: nowrap;
}

/* A known-defect result: the status badge with the link to its issue, wrapping in narrow cells. */
.known-defect-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-2);
    max-width: 100%;
}

/* Persistent explanation next to a result that a known-defect rule explains or that looks fixed. */
.alert.known-defect-note {
    display: grid;
    gap: var(--space-1);
    margin: var(--space-3) 0;
    color: var(--text-main);
    background: var(--violet-soft);
    border: 1px solid var(--violet-line);
}

.known-defect-action {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-3) 0;
}

/* Pills with user data (target names) wrap inside narrow table cells instead of overlapping the next column. */
.soft-pill.wrap {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 1320px) {
    .api-test-workbench {
        grid-template-columns: minmax(0, 62fr) minmax(360px, 38fr);
    }

    .api-case-inspector {
        min-width: 360px;
    }

    .api-test-table-head,
    .api-test-case-row {
        grid-template-columns: minmax(210px, 1fr) 96px 104px 84px 38px;
        column-gap: var(--space-2);
    }

    .api-workbench-heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .api-workbench-heading .actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

/* Mockup-aligned test cases workspace: full-width list with inline selected details */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.api-test-workbench {
    display: block;
    width: 100%;
}

.api-test-list-panel {
    min-height: 0;
    width: 100%;
    border-radius: var(--radius-surface);
}

.api-workbench-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: var(--space-3);
    align-items: center;
    min-height: 54px;
    padding: 10px 14px;
}

.api-workbench-heading h3 {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1.25;
}

.api-workbench-heading h3 span {
    color: var(--text-main);
    font-size: var(--font-size-small);
    font-weight: 600;
}

.api-mini-stats {
    display: inline-flex;
    gap: 7px;
}

.api-mini-stats span {
    min-width: 66px;
    min-height: 36px;
    padding: var(--space-1) 10px;
    color: var(--text-main);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    font-size: var(--font-size-dense);
    font-weight: 700;
    letter-spacing: .025em;
    text-align: center;
    text-transform: uppercase;
}

.api-mini-stats strong {
    display: block;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1.1;
}

.api-test-table-head,
.api-test-case-row {
    display: grid;
    grid-template-columns: 34px minmax(260px, 1fr) minmax(104px, 140px) minmax(130px, 180px) minmax(110px, 150px) 46px;
    column-gap: var(--space-3);
    align-items: center;
}

.api-test-table-head {
    min-height: 34px;
    padding: 0 14px;
    color: var(--text-main);
    background: var(--surface-card);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.api-test-case-list {
    display: block;
}

.api-test-case-item {
    border-bottom: 1px solid var(--line-soft);
}

.api-test-case-item:last-child {
    border-bottom: 0;
}

.api-test-case-row {
    width: 100%;
    min-height: 56px;
    padding: var(--space-2) 14px;
    color: inherit;
    background: var(--surface-card);
    border: 0;
    cursor: pointer;
}

.api-test-case-row:hover {
    background: var(--surface-card);
}

.api-test-case-row:focus-visible {
    outline: 2px solid var(--line-soft);
    outline-offset: -2px;
}

.api-test-case-item.selected .api-test-case-row {
    background: var(--surface-shell);
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.test-status-icon,
.validation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.test-status-icon.positive,
.validation-icon {
    color: var(--success);
}

.test-status-icon.negative {
    color: var(--danger);
}

.api-case-name-cell {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.api-case-name-cell strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-body);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-case-name-cell small,
.api-test-case-row > small {
    overflow: hidden;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-test-case-row > .status-badge {
    justify-self: start;
    max-width: 100%;
}

.api-row-actions {
    display: flex;
    justify-content: flex-end;
}

.api-row-actions .icon-button.subtle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex: 0 0 32px;
}

.api-test-case-details {
    margin: 0 14px var(--space-3) 17px;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-top: 0;
    border-radius: 0 0 var(--radius-section) var(--radius-section);
}

.api-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 48px;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--line-soft);
}

.api-detail-toolbar h4,
.expected-panel-header h4 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-body);
    line-height: 1.25;
}

.expected-panel-header h4 span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    color: var(--text-main);
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
}

.api-detail-actions {
    display: flex;
    gap: var(--space-2);
    flex: 0 0 auto;
}

.api-detail-actions .button {
    min-height: 34px;
    flex-shrink: 0;
}

.api-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 60fr) minmax(340px, 40fr);
    min-width: 0;
}

.api-detail-main {
    min-width: 0;
    padding: 14px var(--space-4);
    border-right: 1px solid var(--line-soft);
}

.api-detail-read-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px var(--space-5);
}

.detail-read-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.detail-read-field.wide {
    grid-column: span 1;
}

.detail-read-field strong {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 700;
    line-height: 1.25;
}

.detail-read-field small {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.35;
    text-overflow: ellipsis;
}

.api-edit-grid {
    gap: 10px var(--space-3);
}

.api-expected-panel {
    min-width: 0;
    padding: 14px var(--space-4);
}

.expected-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 34px;
    margin-bottom: 9px;
}

.expected-panel-header .button {
    min-height: 30px;
    flex-shrink: 0;
}

.expected-results-grid {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}

.expected-results-head,
.expected-result-row {
    display: grid;
    grid-template-columns: 34px minmax(120px, 1fr) minmax(110px, .8fr) minmax(120px, 1fr) 40px;
    column-gap: 10px;
    align-items: center;
}

.expected-results-head {
    min-height: 32px;
    padding: 0 10px;
    color: var(--text-main);
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.expected-result-row {
    min-height: 40px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-small);
}

.expected-result-row:last-child {
    border-bottom: 0;
}

.expected-result-row strong,
.expected-result-row span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expected-result-row strong {
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.expected-result-row span {
    color: var(--text-strong);
}

.expected-result-row .icon-button {
    justify-self: end;
    width: 32px;
    height: 32px;
    min-width: 32px;
}

.expected-result-row .icon-button:disabled {
    opacity: .45;
    cursor: default;
}

.button.ghost {
    color: var(--text-strong);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.button.ghost:hover {
    background: var(--surface-muted);
    border-color: var(--line-soft);
}

@media (max-width: 1320px) {
    .api-test-table-head,
    .api-test-case-row {
        grid-template-columns: 30px minmax(220px, 1fr) 104px 130px 104px 40px;
        column-gap: var(--space-2);
    }

    .api-detail-body {
        grid-template-columns: minmax(0, 58fr) minmax(320px, 42fr);
    }

    .expected-results-head,
    .expected-result-row {
        grid-template-columns: 28px minmax(100px, 1fr) minmax(88px, .7fr) minmax(100px, 1fr) 34px;
        column-gap: 7px;
    }
}

@media (max-width: 980px) {
    .api-detail-body {
        grid-template-columns: 1fr;
    }

    .api-detail-main {
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }
}

/* Scenario editor workspace: final mockup-aligned interaction and density */
.content:has(.scenario-editor-studio) {
    width: 100%;
    max-width: 1680px;
    padding: 18px 22px 36px;
}

.scenario-editor-page-header,
.scenario-editor-studio {
    width: 100%;
    max-width: none;
}

.scenario-editor-page-header {
    align-items: center;
    margin-bottom: var(--space-3);
}

.scenario-editor-page-header h1 {
    font-size: var(--font-size-heading-small);
}

.scenario-editor-page-header p {
    margin-top: 3px;
    font-size: var(--font-size-caption);
}

.scenario-editor-page-header .button,
.scenario-summary-actions .button,
.endpoint-command-actions .button {
    border: 1px solid var(--line-soft);
    background: var(--surface-card);
}

.scenario-editor-studio {
    gap: 10px;
}

.scenario-editor-studio .api-workspace-card {
    overflow: visible;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.scenario-editor-studio .api-workspace-card > .parameter-editor {
    padding: 0;
    background: transparent;
}

.api-workspace-card .api-engine-shell {
    display: grid;
    gap: 10px;
}

.scenario-summary-card,
.api-endpoint-inspector,
.api-test-list-panel {
    border-color: var(--line-soft);
    border-radius: var(--radius-section);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow-color) 3%, transparent);
}

.scenario-summary-card {
    padding: var(--space-3) 14px 10px;
}

.scenario-summary-title-row h2 {
    font-size: var(--font-size-section);
}

.scenario-summary-meta {
    grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.15fr) minmax(90px, .75fr) minmax(180px, 1.5fr) 108px 128px;
}

.scenario-summary-meta .summary-meta-item {
    min-width: 0;
}

.summary-meta-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-endpoint-inspector {
    padding: var(--space-3) 14px 9px;
}

.api-workbench-heading {
    min-height: 48px;
}

.api-test-table-head {
    font-size: var(--font-size-dense);
}

.api-test-case-row {
    min-height: 52px;
}

.api-test-case-details {
    margin: 0 var(--space-3) var(--space-3) 15px;
}

.api-detail-toolbar {
    min-height: 46px;
    padding: 0 10px 0 14px;
}


.api-detail-panel {
    min-width: 0;
    min-height: 176px;
    padding: 14px var(--space-4) var(--space-4);
    animation: detail-tab-in .13s ease-out;
}

@keyframes detail-tab-in {
    from { opacity: .55; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.metadata-column {
    display: grid;
    gap: 0;
    padding: 0 14px;
}

.metadata-column:first-child {
    padding-left: 10px;
    border-right: 1px solid var(--line-soft);
}

.metadata-row {
    display: grid;
    grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 34px;
}

.metadata-row strong,
.read-summary-item strong,
.test-data-summary strong {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.metadata-row small,
.read-summary-item small,
.test-data-summary small {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.35;
    text-overflow: ellipsis;
}

.metadata-row .status-badge {
    font-size: var(--font-size-caption);
}

.tab-edit-grid {
    max-width: 920px;
    padding: 2px 6px;
}

.read-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}

.read-summary-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: var(--space-3);
    min-height: 50px;
    align-items: center;
    padding: 9px var(--space-3);
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.read-summary-item:nth-child(2n) { border-right: 0; }
.read-summary-item:nth-last-child(-n + 2) { border-bottom: 0; }

.read-summary-item small {
    white-space: pre-line;
}

.api-expected-panel {
    padding: 0;
}

.expectation-add-controls {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
}

.expectation-add-controls .form-control {
    width: 190px;
    min-height: 32px;
    padding-block: 5px;
}

.expected-results-grid.editing .expected-result-row {
    min-height: 48px;
}

.expected-result-row .form-control {
    min-height: 32px;
    padding: 5px var(--space-2);
    border-radius: var(--radius-compact);
    font-size: var(--font-size-caption);
}

.test-data-summary {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--space-4);
    align-items: start;
}

.test-data-summary > span {
    display: grid;
    gap: 6px;
    padding: 10px;
}

.test-data-summary pre {
    min-height: 118px;
    max-height: 260px;
    margin: 0;
    overflow: auto;
    padding: var(--space-3) 14px;
    color: var(--text-strong);
    background: var(--surface-shell);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    font: 12px/1.5 Consolas, monospace;
    white-space: pre-wrap;
}

.compact-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    min-height: 140px;
    color: var(--text-muted);
}

.compact-empty-state > i {
    font-size: var(--font-size-heading-small);
}

.compact-empty-state > div {
    display: grid;
    gap: 3px;
}

.compact-empty-state strong { color: var(--text-strong); font-size: var(--font-size-small); }
.compact-empty-state small { font-size: var(--font-size-caption); }

.scenario-editor-studio .advanced-card > summary {
    min-height: 48px;
    padding: 10px 14px;
}

.scenario-editor-studio .advanced-card > summary strong {
    font-size: var(--font-size-body);
}

.scenario-editor-studio .advanced-card > summary small {
    font-size: var(--font-size-caption);
}

.scenario-editor-studio .editor-footer {
    bottom: 10px;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--surface-card) 93%, transparent);
    border-radius: var(--radius-section);
    box-shadow: 0 5px 18px color-mix(in srgb, var(--shadow-color) 7%, transparent);
}

@media (max-width: 1320px) and (min-width: 1101px) {
    .scenario-summary-meta {
        grid-template-columns: minmax(100px, 1fr) minmax(135px, 1.15fr) minmax(85px, .7fr) minmax(150px, 1.4fr) 98px 118px;
        gap: 0;
    }

    .summary-meta-item.metric,
    .summary-meta-item.result {
        text-align: center;
    }

}

@media (max-width: 1100px) {
    .scenario-summary-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-2) 0;
    }

    .api-detail-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding-top: 6px;
    }


    .api-detail-actions {
        align-self: flex-end;
        padding-bottom: 7px;
    }
}

/* Business Workflows */
.workflow-tabs { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-4); }
.workflow-tab-links { flex: 1 1 auto; flex-wrap: nowrap; overflow-x: auto; }
.workflow-tab-links > button { flex: 0 0 auto; }
.workflow-validation-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: var(--space-1); min-height: 21px; padding: 2px 6px; border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; line-height: 1.2; vertical-align: middle; }
.workflow-validation-badge.is-error { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-validation-badge.is-warning { color: var(--warning); background: var(--warning-soft); }
.workflow-validation-messages { display: grid; gap: 6px; min-width: 0; }
.workflow-validation-message { display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; border-radius: var(--radius-control); font-size: var(--font-size-caption); line-height: 1.45; overflow-wrap: anywhere; }
.workflow-validation-message.is-error { color: var(--danger); background: var(--danger-soft); border-left: 3px solid var(--danger-line); }
.workflow-validation-message.is-warning { color: var(--warning); background: var(--warning-soft); border-left: 3px solid var(--warning-line); }
.workflow-validation-message > i { margin-top: 3px; flex: 0 0 auto; }
.workflow-validation-message > span > span { display: block; margin-top: 3px; }
label:has(> .workflow-validation-messages .is-error) > .form-control,
.workflow-validation-scope .form-control[aria-invalid="true"],
.workflow-condition-settings .form-control[aria-invalid="true"] { border-color: var(--danger-line); background-color: var(--surface-shell); }
label:has(> .workflow-validation-messages .is-error) > .form-control:focus,
.workflow-validation-scope .form-control[aria-invalid="true"]:focus,
.workflow-condition-settings .form-control[aria-invalid="true"]:focus { border-color: var(--danger-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shadow-color) 15%, transparent); }
.workflow-extraction-item { display: grid; gap: var(--space-2); padding: 10px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.workflow-extraction-item:has(.workflow-validation-message.is-error) { border-color: var(--danger-line); }
.workflow-extraction-item > .step-settings-group { margin: 0; }
.workflow-extraction-item summary .workflow-validation-badge { margin-left: var(--space-2); }
.extraction-selection-toggle { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; margin: 0; }
.extraction-selection-toggle > small { padding: 2px 7px; color: var(--text-main); background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); }
.extraction-selection-toggle:has(input:checked) > small { color: var(--accent); background: var(--accent-soft); }
.extraction-selection-help { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.5; }
.extraction-selection-settings > .form-grid { margin-top: var(--space-3); }
.workflow-input-issues { grid-column: 1 / -1; }
.workflow-input-issues:empty { display: none; }
.workflow-tab-actions { display: flex; flex: 0 0 auto; gap: 6px; align-items: center; margin-left: auto; padding-left: 10px; border-left: 1px solid var(--line-soft); }
.workflow-tab-actions select.form-control { width: clamp(120px, 17vw, 240px); min-width: 120px; max-width: 240px; text-overflow: ellipsis; }
.grid-action-icon { display: inline-grid; box-sizing: border-box; flex: 0 0 34px; width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; place-items: center; color: var(--text-strong); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); box-shadow: 0 2px 6px color-mix(in srgb, var(--shadow-color) 7%, transparent); font-size: var(--font-size-small); line-height: 1; vertical-align: middle; text-decoration: none; cursor: pointer; }
.workflow-tabs .workflow-tab-actions .grid-action-icon { display: inline-grid; padding: 0; }
.grid-action-icon:hover:not(:disabled) { color: var(--text-strong); background: var(--surface-shell); border-color: var(--line-soft); }
.grid-action-icon.danger { color: var(--danger); background: var(--surface-shell); border-color: var(--danger-line); }
.grid-action-icon.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.grid-action-icon:disabled { opacity: .42; cursor: not-allowed; }
.grid-action-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.grid-action-icon > i { margin: 0; pointer-events: none; }
.actions.grid-row-actions, .button-row.grid-row-actions, .scenario-card-actions.grid-row-actions { display: flex; gap: 7px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
td.grid-actions-cell { vertical-align: middle; }
.load-test-run-action { min-width: 116px; }
.step-identity-plan { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px var(--space-3); color: var(--success); background: var(--surface-muted); border: 1px solid var(--success-line); border-radius: var(--radius-control); }
.step-identity-plan-icon { display: grid; width: 30px; height: 30px; place-items: center; color: var(--success); background: var(--success-soft); border-radius: var(--radius-control); }
.step-identity-plan > div { display: grid; gap: 3px; }
.step-identity-plan strong { font-size: var(--font-size-caption); }
.step-identity-plan small { color: var(--success); font-size: var(--font-size-caption); line-height: 1.4; }
.workflow-variable-tabs { margin-bottom: var(--space-3); }
.workflow-active-run { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) 14px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.workflow-active-run-icon { display: grid; width: 32px; height: 32px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 50%; }
.workflow-active-run > div { display: grid; gap: 3px; }
.workflow-active-run small { color: var(--text-muted); }
.workflow-history-table { min-width: 820px; }
.workflow-run-correlation { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-history-body { padding-top: var(--space-3); }
.related-test-cases-panel .panel-header { align-items: flex-start; }
.related-test-case-list { display: grid; gap: var(--space-2); }
.related-test-case-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.related-test-case-row:hover { background: var(--surface-shell); border-color: var(--line-soft); }
.related-test-case-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-section); }
.related-test-case-main { min-width: 0; }
.related-test-case-title { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.related-test-case-title code { flex: 0 0 auto; color: var(--accent); font-size: var(--font-size-caption); font-weight: 700; }
.related-test-case-title strong { overflow: hidden; color: var(--text-strong); font-size: var(--font-size-small); text-overflow: ellipsis; white-space: nowrap; }
.related-test-case-main > small { display: block; margin-top: var(--space-1); color: var(--text-muted); }
.related-test-case-main p { margin: 7px 0 0; color: var(--text-main); font-size: var(--font-size-caption); }
.related-test-case-status { display: flex; gap: 6px; align-items: center; }
.test-case-studio { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-4); align-items: start; }
.test-case-document .panel-header, .automation-review-card .panel-header { align-items: flex-start; }
.test-case-document .panel-header h2, .automation-review-card .panel-header h2 { margin: 3px 0; }
.human-step-list { display: grid; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); overflow: hidden; }
.human-step-head, .human-step-row { display: grid; grid-template-columns: 38px minmax(180px, 1fr) minmax(180px, 1fr) minmax(145px, .55fr) auto; gap: 10px; align-items: center; }
.human-step-head { padding: 9px var(--space-3); color: var(--text-muted); background: var(--surface-shell); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; }
.human-step-row { padding: var(--space-3); border-top: 1px solid var(--line-soft); background: var(--surface-card); }
.human-step-row:first-of-type { border-top: 0; }
.human-step-row textarea { min-height: 72px; resize: vertical; }
.human-step-order { display: grid; place-items: center; width: 30px; height: 30px; color: var(--accent); background: var(--accent-soft); border-radius: 50%; font-weight: 700; }
.human-step-binding { display: grid; gap: 6px; align-content: center; }
.human-step-binding small { color: var(--text-muted); line-height: 1.35; }
.human-step-actions { display: flex; gap: 3px; }
.test-case-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); color: var(--text-muted); font-size: var(--font-size-caption); }
.automation-review-card { position: sticky; top: 14px; }
.automation-review-card p { margin: 0; color: var(--text-main); line-height: 1.5; }
.automation-review-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: var(--space-3); background: var(--surface-shell); border-radius: var(--radius-section); }
.automation-review-stats div { display: grid; gap: 3px; text-align: center; }
.automation-review-stats dt { color: var(--text-muted); font-size: var(--font-size-caption); text-transform: uppercase; }
.automation-review-stats dd { margin: 0; color: var(--text-strong); font-size: var(--font-size-heading-small); font-weight: 700; }
.automation-link-banner { display: flex; flex-wrap: wrap; gap: 7px var(--space-3); align-items: center; padding: 10px var(--space-3); color: var(--text-main); background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); }
.automation-link-banner strong { color: var(--text-strong); }
.automation-approval-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: var(--space-4); padding: var(--space-4) 18px; color: var(--warning); background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-surface); }
.automation-approval-copy { display: flex; align-items: center; gap: 13px; min-width: 0; }
.automation-approval-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; color: var(--warning); background: var(--warning-soft); border-radius: var(--radius-section); }
.automation-approval-heading { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.automation-approval-heading strong { color: var(--warning); }
.automation-approval-copy p { margin: var(--space-1) 0 0; line-height: 1.45; }
.automation-approval-actions { flex: 0 0 auto; }

.automation-implementation-panel > .panel-header { align-items: flex-start; gap: 18px; }
.automation-implementation-panel > .panel-header p { max-width: 720px; margin: 5px 0 0; }
.automation-type-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.automation-implementation-list { display: grid; gap: var(--space-3); }
.automation-implementation-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); }
.automation-implementation-summary { display: grid; min-width: 0; gap: 9px; }
.automation-implementation-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); color: var(--text-muted); font-size: var(--font-size-caption); }
.automation-implementation-meta i { width: 15px; color: var(--text-main); }
.automation-implementation-meta .automation-stale-version { color: var(--warning); font-weight: 700; }
.automation-compact-panel .panel-body { display: grid; gap: var(--space-4); }
.automation-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.automation-card-heading strong { margin-right: var(--space-1); font-size: var(--font-size-section); }
.automation-implementation-card.compact { padding: 14px var(--space-4); }
.legacy-automation-card { background: var(--surface-shell); }
.automation-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); }
.automation-preview-heading h4 { margin: 3px 0 var(--space-1); }
.automation-wizard-recommendation { display: flex; align-items: center; gap: 14px; padding: 14px var(--space-4); border-radius: var(--radius-surface); background: var(--accent-soft); color: var(--text-strong); }
.automation-wizard-recommendation > i { font-size: var(--font-size-heading-small); }
.automation-wizard-recommendation div { display: grid; gap: 2px; }
.automation-wizard-recommendation small, .automation-wizard-recommendation span { color: var(--text-muted); }
.automation-wizard-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.automation-wizard-option { position: relative; display: flex; align-items: flex-start; gap: 11px; min-height: 94px; padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); color: var(--text-strong); text-align: left; cursor: pointer; }
.automation-wizard-option:hover, .automation-wizard-option.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 12%, transparent); }
.automation-wizard-option > i { margin-top: 3px; color: var(--accent); }
.automation-wizard-option span { display: grid; gap: 5px; }
.automation-wizard-option small { color: var(--text-muted); line-height: 1.35; }
.automation-wizard-option em { position: absolute; right: 9px; top: 8px; color: var(--accent); font-size: var(--font-size-caption); font-style: normal; font-weight: 700; text-transform: uppercase; }
.automation-wizard-basics { margin: 0; }
.automation-wizard-preview { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); }
.automation-preview-heading { padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: var(--surface-shell); }
.automation-preview-heading span { color: var(--text-muted); font-size: var(--font-size-caption); }
.automation-preview-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) 15px; border-bottom: 1px solid var(--line-soft); }
.automation-preview-row:last-child { border-bottom: 0; }
.automation-preview-row > div { display: grid; gap: 3px; }
.automation-preview-row small { color: var(--text-muted); }
.automation-preview-action { color: var(--text-main); font-size: var(--font-size-caption); font-weight: 700; }
.workflow-automated-test-group { margin-bottom: var(--space-4); }
.workflow-automated-test-group .panel-body { padding-top: 0; }
.automation-definition-editor { display: grid; gap: 18px; margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--line-soft); }
.automation-definition-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.automation-definition-heading h3 { margin: var(--space-1) 0 0; }
.automation-adapter-field { grid-column: 1 / -1; }
.automation-step-list { display: grid; gap: var(--space-3); }
.automation-step-mapping { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(400px, 1.6fr); gap: var(--space-4); padding: 14px; border: 1px solid var(--line-soft); border-left: 4px solid var(--warning-line); border-radius: var(--radius-surface); background: var(--surface-shell); }
.automation-step-mapping.mapped { border-left-color: var(--success-line); }
.automation-mapping-source { display: grid; grid-template-columns: 34px 1fr; align-content: start; gap: var(--space-2) 10px; padding-right: 14px; border-right: 1px solid var(--line-soft); }
.automation-mapping-source .step-number { grid-row: 1 / span 2; display: grid; width: 28px; height: 28px; place-items: center; color: var(--text-strong); background: var(--accent-soft); border-radius: 50%; font-size: var(--font-size-caption); font-weight: 700; }
.automation-mapping-source small { display: block; margin-bottom: 3px; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.automation-mapping-source strong, .automation-mapping-source p { display: block; margin: 0; color: var(--text-strong); line-height: 1.45; overflow-wrap: anywhere; }
.automation-mapping-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; }
.automation-target-field { grid-column: 1 / -1; }
.automation-continue { align-self: center; margin-top: 18px; }
.automation-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

@media (max-width: 900px) {
    .automation-implementation-panel > .panel-header, .automation-implementation-card { align-items: stretch; flex-direction: column; }
    .automation-type-actions { justify-content: flex-start; }
    .automation-step-mapping { grid-template-columns: 1fr; }
    .automation-mapping-source { padding-right: 0; padding-bottom: var(--space-3); border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .automation-wizard-options { grid-template-columns: 1fr; }
    .automation-preview-row { grid-template-columns: auto 1fr; }
    .automation-preview-action, .automation-preview-row > .status-badge { grid-column: 2; }
}

@media (max-width: 620px) {
    .automation-mapping-editor { grid-template-columns: 1fr; }
    .automation-target-field { grid-column: auto; }
}
.workflow-editor-grid, .workflow-run-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.5fr); gap: var(--space-4); align-items: start; }
.workflow-editor-grid > .workflow-inspector,
.workflow-editor-grid > .workflow-inspector > .panel-body.stack { grid-template-columns: minmax(0, 1fr); }
.workflow-editor-grid > .workflow-inspector > .panel-body { overflow-wrap: anywhere; }
.workflow-step-list, .workflow-timeline { overflow: hidden; }
.workflow-step-list { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.workflow-step-list > .panel-header { flex: 0 0 auto; }
.workflow-step-items { min-width: 0; }
/* Keep the step list and inspector independently scrollable below their headers. */
.workflow-editor-grid { align-items: stretch; }
.workflow-editor-grid > .panel { display: flex; flex-direction: column; min-height: 0; }
.workflow-editor-grid > .panel > .panel-header,
.workflow-editor-grid > .panel > .step-inspector-tabs { flex: 0 0 auto; }
.workflow-editor-grid .workflow-step-items,
.workflow-editor-grid > .workflow-inspector > .panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.workflow-editor-grid > .workflow-inspector > .panel-body.stack { align-content: start; }
.workflow-editor-grid .workflow-step-items:focus-visible,
.workflow-editor-grid > .workflow-inspector > .panel-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 901px) {
    .page-shell:has(.workflow-editor-grid) { display: flex; flex-direction: column; height: 100dvh; }
    .page-shell:has(.workflow-editor-grid) > .topbar { flex: 0 0 auto; }
    .content:has(.workflow-editor-grid) { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding-bottom: var(--space-4); }
    .content:has(.workflow-editor-grid) > .workspace-page > *,
    .workflow-validation-scope:has(.workflow-editor-grid) > * { flex-shrink: 0; }
    .workflow-editor-grid { flex: 1 0 24rem; grid-template-rows: minmax(0, 1fr); min-height: 24rem; }
}
@media (max-width: 900px) {
    .workflow-editor-grid > .panel { height: 70dvh; min-height: 24rem; }
}
.workflow-add-step-button {
    color: var(--text-on-accent) !important;
    background: var(--accent-solid) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--shadow-color) 15%, transparent);
}
.workflow-add-step-button:hover:not(:disabled) { background: var(--accent-solid) !important; }
.workflow-step-type-grid { gap: 9px; }
.workflow-step-type-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    gap: var(--space-3);
    align-items: center;
    width: 100%;
    padding: 11px var(--space-3);
    color: var(--text-strong);
    text-align: left;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    cursor: pointer;
}
.workflow-step-type-option:hover { background: var(--surface-shell); border-color: var(--line-soft); transform: translateY(-1px); }
.workflow-step-type-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workflow-step-type-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: var(--radius-section);
}
.workflow-step-type-option > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.workflow-step-type-option strong { font-size: var(--font-size-small); }
.workflow-step-type-option small { color: var(--text-muted); font-size: var(--font-size-dense); line-height: 1.35; }
.workflow-step-type-option > i:last-child { color: var(--text-muted); font-size: var(--font-size-dense); }
.workflow-step-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: center; width: 100%; padding: 13px 15px; color: var(--text-strong); background: var(--surface-card); border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; cursor: pointer; }
.workflow-step-row:hover { background: var(--surface-shell); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.step-disabled { color: var(--text-muted); }
.workflow-step-row.step-disabled .step-order { color: var(--text-muted); background: var(--surface-muted); }
.workflow-step-row span { display: grid; gap: 3px; min-width: 0; }
.workflow-step-row small { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.workflow-step-row.generated:not(.selected) { background: var(--surface-card); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.generated:hover { background: var(--surface-shell); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.needs-binding:not(.selected) { background: var(--surface-shell); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.needs-binding:hover { background: var(--warning-soft); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.has-warning:not(.selected) { background: var(--warning-soft); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.has-error,
.workflow-step-row.has-error.generated,
.workflow-step-row.has-error.needs-binding { background: var(--danger-soft); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.has-error:hover { background: var(--danger-soft); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.execution-running, .workflow-step-row.execution-waiting { position: relative; background: var(--accent-soft); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.execution-running::after { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); content: ""; pointer-events: none; animation: workflow-running-pulse 1.6s ease-in-out infinite; }
.workflow-step-row.execution-passed { background: var(--surface-shell); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.execution-blocked, .workflow-step-row.execution-manual { background: var(--warning-soft); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.execution-failed, .workflow-step-row.execution-timedout { background: var(--danger-soft); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.execution-skipped, .workflow-step-row.execution-cancelled { background: var(--surface-shell); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.workflow-step-row.execution-pending { background: var(--surface-shell); box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); opacity: .82; }
.workflow-step-list .workflow-step-row.has-nested-scenario:where(:not(.has-error, .has-warning, .execution-running, .execution-waiting, .execution-blocked, .execution-manual, .execution-failed, .execution-timedout)) { background: var(--violet-soft); }
.workflow-nested-scenario-label { color: var(--violet); font-size: var(--font-size-caption); overflow-wrap: anywhere; }
.workflow-step-row .workflow-nested-scenario-label { display: flex; align-items: baseline; gap: var(--space-1); }
.workflow-readonly-step.has-nested-scenario > summary { background: var(--violet-soft); border-radius: var(--radius-compact); padding: var(--space-2); }
/* Selection stays distinct from execution status; keep the status stripe and badges. */
.workflow-step-list .workflow-step-row.selected { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; opacity: 1; }
.workflow-step-row.selected .step-order { color: var(--text-on-accent); background: var(--accent-solid); }
.workflow-step-row.selected small { color: var(--text-main); }
.workflow-step-list .workflow-step-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@keyframes workflow-running-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.workflow-step-content { gap: 5px !important; }
.workflow-step-title-row { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2) !important; align-items: center; min-height: 24px; }
.workflow-step-title-row > strong { min-width: 0; font-size: var(--font-size-caption); line-height: 1.3; overflow-wrap: anywhere; }
.workflow-step-request { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-2) !important; align-items: start; }
.workflow-step-state { display: flex !important; gap: 6px !important; align-items: center; justify-content: flex-end; }
.workflow-step-state .status-badge { white-space: nowrap; }
.workflow-step-attempt-count, .workflow-step-attempt-count > span { display: inline !important; }
.workflow-step-issue-badge { display: inline-flex !important; gap: 5px !important; align-items: center; padding: var(--space-1) 7px; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-pill); font-size: var(--font-size-dense); font-weight: 700; white-space: nowrap; }
.workflow-http-method { display: inline-grid !important; width: 58px; min-height: 22px; padding: 3px var(--space-2); place-items: center; color: var(--text-on-accent); border-radius: var(--radius-compact); font-size: var(--font-size-caption); font-weight: 700; line-height: 1; letter-spacing: .04em; }
.workflow-http-method.method-get { background: var(--accent-solid); }
.workflow-http-method.method-post { background: var(--success-solid); }
.workflow-http-method.method-put { background: var(--warning-solid); }
.workflow-http-method.method-patch { color: var(--info); background: var(--success-solid); }
.workflow-http-method.method-delete { background: var(--danger-solid); }
.workflow-step-url { display: block; max-width: 100%; min-height: 17px; color: var(--text-strong); font-size: var(--font-size-caption); line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.workflow-step-meta { display: flex !important; flex-direction: row; gap: 6px !important; align-items: center; }
.workflow-step-meta > span:first-child { display: block; overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.workflow-step-run-error { display: block !important; overflow: hidden; color: var(--danger); font-size: var(--font-size-dense); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.workflow-execution-status { display: inline-flex !important; width: fit-content; padding: var(--space-1) 7px; color: var(--text-main); background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; white-space: nowrap; }
.execution-running .workflow-execution-status, .execution-waiting .workflow-execution-status { color: var(--accent); background: var(--accent-soft); }
.execution-waiting .workflow-execution-status { white-space: normal; }
.execution-passed .workflow-execution-status { color: var(--success); background: var(--success-soft); }
.execution-failed .workflow-execution-status, .execution-timedout .workflow-execution-status { color: var(--danger); background: var(--danger-soft); }
.execution-skipped .workflow-execution-status, .execution-cancelled .workflow-execution-status { color: var(--text-main); background: var(--surface-muted); }
.execution-pending .workflow-execution-status { color: var(--text-muted); background: var(--surface-muted); }
.authentication-step-editor { display: grid; gap: 14px; }
.authentication-step-flow { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: 11px 13px; color: var(--text-main); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.authentication-step-flow span { display: inline-flex; gap: 7px; align-items: center; font-size: var(--font-size-caption); font-weight: 700; }
.authentication-step-flow > i { color: var(--text-muted); font-size: var(--font-size-caption); }
.authentication-step-flow span:last-child { color: var(--success); }
.authentication-step-summary { display: grid; gap: 5px; padding: var(--space-3) 14px; color: var(--success); background: var(--surface-muted); border: 1px solid var(--success-line); border-radius: var(--radius-section); }
.authentication-step-summary strong { font-size: var(--font-size-caption); }
.authentication-step-summary small { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--success); }
.authentication-login-body { min-height: 170px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.authentication-inherited-model { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.authentication-inherited-model summary { padding: 10px 13px; color: var(--text-main); background: var(--surface-shell); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; }
.authentication-inherited-model pre, .authentication-result pre { max-height: 300px; margin: 0; padding: 13px; overflow: auto; color: var(--text-on-accent); background: var(--accent-solid); font-size: var(--font-size-dense); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.authentication-headers-editor { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.authentication-headers-editor > header { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }
.authentication-headers-editor > header > div { display: grid; gap: 2px; }
.authentication-headers-editor small { color: var(--text-muted); font-size: var(--font-size-caption); }
.authentication-header-row { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(180px, 1.3fr) auto auto; gap: var(--space-2); align-items: center; }
.authentication-result { display: grid; gap: var(--space-3); }
.authentication-result > header { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }
.authentication-result > header > div { display: grid; gap: 2px; }
.authentication-result > header small { color: var(--text-muted); font-size: var(--font-size-caption); }
.authentication-result dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.authentication-result dl > div { display: grid; gap: var(--space-1); padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.authentication-result dt { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.authentication-result dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.authentication-result details { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.authentication-result details summary { padding: 10px 13px; color: var(--text-main); background: var(--surface-shell); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; }
.authentication-path-suggestions { display: grid; gap: var(--space-2); padding: var(--space-3); color: var(--text-main); background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.authentication-path-suggestions > div { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) { .authentication-header-row, .authentication-result dl { grid-template-columns: 1fr; } }
.workflow-origin-badge { display: inline-flex !important; flex: 0 0 auto; width: max-content; gap: 5px !important; align-items: center; padding: 3px 7px; color: var(--accent) !important; background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: .025em; }
.workflow-inspector-heading { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.workflow-inspector-heading > div { display: grid; gap: 2px; min-width: 0; }
.workflow-inspector-heading h2 { margin: 0; }
.workflow-inspector > .panel-header { flex-wrap: wrap; }
.workflow-inspector > .panel-header > .actions { flex-wrap: wrap; align-items: center; }
.workflow-inspector > .panel-header .check-field { margin: 0; white-space: nowrap; }
.workflow-inspector-heading > div > small { color: var(--text-muted); font-size: var(--font-size-dense); }
.step-inspector-tabs { flex-wrap: nowrap; overflow-x: auto; padding-inline: var(--space-3); }
.step-inspector-tabs button { flex: 0 0 auto; }
.step-inspector-tabs button i { width: 13px; text-align: center; }
.workflow-step-condition { display: flex !important; align-items: flex-start; gap: 6px; margin-top: var(--space-1); color: var(--warning); font-size: var(--font-size-dense); line-height: 1.4; text-align: left; }
.workflow-step-condition > span { min-width: 0; overflow-wrap: anywhere; }
.workflow-step-condition > i { margin-top: 2px; flex: 0 0 auto; }
.step-settings-group.workflow-condition-settings { border-color: var(--warning-line); background: var(--surface-shell); }
.workflow-condition-settings > header { flex-wrap: wrap; gap: 10px; }
.workflow-condition-settings .step-settings-help { display: block; margin: var(--space-2) 0; }
.workflow-condition-preview { padding: 10px var(--space-3); margin: var(--space-3) 0; background: var(--warning-soft); border-radius: var(--radius-control); color: var(--warning); overflow-wrap: anywhere; line-height: 1.5; }
.condition-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.workflow-condition-group { display: grid; gap: var(--space-3); min-width: 0; }
.condition-join { max-width: 320px; }
.workflow-condition-clause { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: var(--space-3); border: 1px solid var(--warning-line); border-radius: var(--radius-control); background: var(--surface-card); }
.workflow-condition-clause > .form-field { min-width: 0; align-self: start; }
.workflow-condition-clause .condition-remove { grid-column: 3; grid-row: 1; align-self: start; margin-top: 22px; }
.condition-actions, .condition-group-heading { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.condition-group-heading { justify-content: space-between; margin-bottom: 10px; }
.workflow-condition-nested { min-width: 0; padding: var(--space-3) 0 0 var(--space-3); border-left: 3px solid var(--warning-line); }
@media (max-width: 700px) {
    .workflow-condition-clause { grid-template-columns: minmax(0, 1fr); }
    .workflow-condition-clause .condition-remove { grid-column: 1; grid-row: auto; justify-self: end; margin-top: 0; }
    .workflow-condition-nested { padding-left: var(--space-2); }
    .workflow-condition-settings > header { align-items: flex-start; }
}
.step-settings-groups { display: grid; gap: var(--space-3); min-width: 0; }
.workflow-report-metrics { min-width: 0; padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.workflow-report-metrics > summary { cursor: pointer; color: var(--text-strong); font-size: var(--font-size-small); font-weight: 700; }
.workflow-report-metrics > p { margin: var(--space-3) 0; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.5; }
.workflow-report-metrics .form-field small { overflow-wrap: anywhere; }
.step-settings-group { min-width: 0; padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.step-settings-group > header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2) 14px; margin-bottom: var(--space-3); }
.step-settings-group > header h3 { margin: 0; color: var(--text-strong); font-size: var(--font-size-small); font-weight: 700; }
.step-settings-group .form-grid { align-items: start; gap: var(--space-3) 14px; }
.step-settings-group .check-field { margin: 0; padding: 0; min-height: 0; }
.step-settings-help { display: block; margin-top: 7px; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.5; }
.step-settings-footer { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.generated-step-notice { display: flex; gap: 11px; align-items: flex-start; padding: var(--space-3) 14px; color: var(--text-main); background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.generated-step-notice > i { margin-top: 2px; color: var(--text-muted); }
.generated-step-notice > div { display: grid; gap: 3px; }
.generated-step-notice strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.generated-step-notice span { color: var(--text-main); font-size: var(--font-size-caption); line-height: 1.4; }
.generated-step-notice.needs-binding { color: var(--warning); background: var(--warning-soft); border-color: var(--warning-line); }
.generated-step-notice.needs-binding > i, .generated-step-notice.needs-binding strong { color: var(--warning); }
.generated-step-notice.needs-binding span { color: var(--warning); }
.step-order { display: grid !important; place-items: center; width: 28px; height: 28px; background: var(--surface-muted); border-radius: var(--radius-pill); font-weight: 700; }
.workflow-inspector, .workflow-run-detail { min-width: 0; overflow: hidden; }
.workflow-rule-columns, .rule-list { display: grid; gap: 10px; }
.workflow-rule-columns { grid-template-columns: 1fr; }
.rule-list { padding: var(--space-3); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.rule-list header { display: flex; align-items: center; justify-content: space-between; }
.rule-list header > div { display: grid; gap: 3px; }
.rule-list header small { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 400; }
.workflow-general-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.workflow-general-layout .form-grid { align-items: start; }
.workflow-general-layout .form-grid > .full { grid-column: 1 / -1; }
.workflow-general-layout .form-field { min-width: 0; }
.workflow-general-options { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-7); }
.workflow-general-options .check-field { min-height: 32px; margin: 0; }
.workflow-general-layout > .workflow-auth-card { min-width: 0; margin-top: 0; }
.workflow-general-layout .workflow-auth-card > header { flex-wrap: wrap; gap: var(--space-2) 18px; }
.workflow-general-layout .workflow-auth-card > header > div { flex: 1 1 240px; min-width: 0; }
.workflow-general-layout .selected-endpoint-card,
.workflow-inspector .selected-endpoint-card { min-width: 0; flex-wrap: wrap; }
.workflow-general-layout .selected-endpoint-card > div,
.workflow-inspector .selected-endpoint-card > div { min-width: 0; overflow-wrap: anywhere; }
.workflow-auth-card { display: grid; gap: var(--space-4); margin-top: var(--space-2); padding: 18px; background: linear-gradient(180deg, var(--surface-shell), var(--surface-card)); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.workflow-auth-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.workflow-auth-card h2 { margin: 3px 0; font-size: var(--font-size-section); }
.workflow-auth-card p { margin: 0; color: var(--text-muted); font-size: var(--font-size-small); }
.workflow-filter-panel { margin-bottom: 14px; }
.workflow-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) minmax(160px, .7fr) auto; gap: 14px; align-items: end; }
.workflow-filter-summary { display: grid; gap: 2px; align-self: stretch; align-content: center; padding: var(--space-2) 14px; border-left: 1px solid var(--line-soft); }
.workflow-filter-summary strong { font-size: var(--font-size-section); color: var(--text-strong); }
.workflow-filter-summary small { color: var(--text-muted); }
.workflow-clear-filters { margin-bottom: 1px; }
.workflow-target-groups { display: grid; gap: var(--space-4); }
.workflow-target-group { overflow: hidden; }
.workflow-target-header { display: flex; justify-content: flex-end; gap: var(--space-6); padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--surface-shell), var(--surface-card)); }
.workflow-target-actions { display: flex; align-items: flex-start; gap: 10px; }
.workflow-target-table { min-width: calc(1320px + var(--control-height) + 2 * var(--space-4)); table-layout: fixed; }
.workflow-target-table td:first-child .selection-checkbox { justify-content: center; }
.workflow-target-table td:nth-child(2) { width: 28%; min-width: 220px; overflow-wrap: anywhere; }
.workflow-identity { display: grid; justify-items: start; gap: var(--space-1); min-width: 0; }
.workflow-identity > * { min-width: 0; max-width: 100%; }
.data-grid-table tbody tr.workflow-production-row { background: color-mix(in srgb, var(--violet-soft) 65%, var(--surface-card)); }
.data-grid-table tbody tr.workflow-production-row:hover { background: var(--violet-soft); }
.workflow-production-row > td:first-child { box-shadow: inset var(--space-1) 0 var(--violet); }
.workflow-target-table td:nth-child(2) > small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.workflow-target-table th:nth-child(3), .workflow-target-table td:nth-child(3) { width: 156px; min-width: 156px; }
.workflow-target-table th:nth-child(4), .workflow-target-table td:nth-child(4) { width: 20%; min-width: 190px; }
.workflow-target-table th:nth-child(5), .workflow-target-table td:nth-child(5),
.workflow-target-table th:nth-child(6), .workflow-target-table td:nth-child(6) { width: 84px; min-width: 84px; }
.workflow-target-table th:nth-child(7), .workflow-target-table td:nth-child(7),
.workflow-target-table th:nth-child(8), .workflow-target-table td:nth-child(8) { width: 104px; min-width: 104px; }
.workflow-target-table th:nth-child(9), .workflow-target-table td:nth-child(9) { width: 168px; min-width: 168px; }
/* Reserve five full-size actions, four gaps and the cell padding. */
.workflow-target-table th:last-child, .workflow-target-actions-cell { width: calc(5 * var(--control-height) + 4 * 7px + 2 * var(--space-4)); min-width: calc(5 * var(--control-height) + 4 * 7px + 2 * var(--space-4)); }
.workflow-target-actions-cell { vertical-align: middle; }
.workflow-row-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: flex-end; }
.workflow-date-cell { vertical-align: middle; }
.workflow-date-cell time { display: grid; width: max-content; gap: 2px; color: var(--text-main); font-size: var(--font-size-caption); font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.workflow-date-cell time small { color: var(--text-muted); font-size: var(--font-size-caption); }
.workflow-latest-run-cell { vertical-align: middle; }
.workflow-latest-run { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 100%; gap: 5px; justify-items: start; overflow-wrap: anywhere; }
.workflow-latest-run > * { min-width: 0; max-width: 100%; }
.workflow-latest-run time { display: flex; flex-wrap: wrap; gap: var(--space-1) 7px; align-items: baseline; color: var(--text-main); font-size: var(--font-size-caption); font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.workflow-latest-run time span + span { padding-left: 7px; border-left: 1px solid var(--line-soft); color: var(--text-muted); }
.workflow-test-cases-cell { vertical-align: middle; }
.workflow-case-list, .workflow-case-overflow-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.workflow-case-chip { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: var(--space-1) 7px; color: var(--accent); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); text-decoration: none; }
.workflow-case-chip:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--line-soft); }
.workflow-case-chip code { overflow: hidden; color: inherit; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.workflow-case-chip .status-badge { padding: 2px 6px; font-size: var(--font-size-caption); }
.workflow-case-chip.unavailable { color: var(--text-muted); cursor: default; }
.workflow-case-overflow { width: 100%; }
.workflow-case-overflow summary { width: max-content; padding: 3px 7px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; list-style: none; }
.workflow-case-overflow summary::-webkit-details-marker { display: none; }
.workflow-case-overflow[open] summary { margin-bottom: 6px; }
.auth-profile-heading { grid-template-columns: auto minmax(0, 1fr) auto; }
.target-auth-profile { display: grid; gap: 14px; margin-top: 14px; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-shell); }
.target-auth-profile-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.authentication-token-test { display: grid; gap: 10px; min-width: 0; }
.authentication-token-test > button { justify-self: start; }
.authentication-token-test .alert { display: grid; gap: 5px; margin: 0; overflow-wrap: anywhere; }
.form-field small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.4; }
.rule-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.4fr) minmax(110px, .7fr) auto; gap: var(--space-2); align-items: center; }
.workflow-input-row { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; padding: var(--space-3); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.workflow-input-variable, .workflow-input-type, .workflow-input-value { display: grid; gap: 5px; min-width: 0; }
.workflow-input-variable { grid-column: span 8; }
.workflow-input-type { grid-column: span 3; }
.workflow-input-value { grid-column: 1 / span 9; margin-top: 3px; }
.workflow-input-secret { grid-column: 10 / span 2; align-self: center; margin-top: 21px; white-space: nowrap; }
.workflow-input-variable > small, .workflow-input-type > small, .workflow-input-value > small { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.workflow-input-value > span { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.35; }
.workflow-input-variable .form-control, .workflow-input-type .form-control, .workflow-input-value .form-control { width: 100%; min-width: 0; }
.workflow-input-remove { grid-column: 12; justify-self: end; }
.variable-picker-trigger { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; width: 100%; min-height: 42px; padding: 7px 10px; color: var(--text-strong); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); text-align: left; cursor: pointer; }
.variable-picker-trigger:hover, .variable-picker-trigger[aria-expanded="true"] { background: var(--surface-shell); border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 9%, transparent); }
.variable-picker-token, .runtime-variable-card > header code { padding: 3px 6px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-compact); font: 700 var(--font-size-dense) ui-monospace, SFMono-Regular, Consolas, monospace; }
.variable-type-badge { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 5px; color: var(--text-main); background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.variable-picker-origin { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-dense); text-overflow: ellipsis; white-space: nowrap; }
.variable-picker-action { color: var(--accent); font-size: var(--font-size-dense); font-weight: 700; white-space: nowrap; }
.variable-picker-panel { display: grid; gap: 10px; margin-top: 3px; padding: 11px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); box-shadow: 0 12px 28px color-mix(in srgb, var(--shadow-color) 11%, transparent); }
.variable-picker-heading { display: grid; gap: 2px; padding-bottom: var(--space-2); border-bottom: 1px solid var(--line-soft); }
.variable-picker-heading strong { font-size: var(--font-size-caption); }
.variable-picker-heading small, .variable-picker-empty { color: var(--text-muted); font-size: var(--font-size-dense); }
.variable-picker-group { display: grid; gap: 7px; }
.variable-picker-group > header { display: flex; align-items: center; justify-content: space-between; color: var(--text-main); }
.variable-picker-group > header strong { font-size: var(--font-size-dense); }
.variable-picker-group > header span { font-size: var(--font-size-dense); }
.variable-picker-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 7px; }
.variable-option { display: grid; gap: 5px; min-width: 0; padding: var(--space-2) 9px; color: var(--text-strong); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); text-align: left; cursor: pointer; }
.variable-option:hover { background: var(--surface-shell); border-color: var(--line-soft); }
.variable-option.selected { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.variable-option-main { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.variable-option-main code { overflow: hidden; color: var(--accent); font-size: var(--font-size-dense); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.variable-option small { color: var(--text-muted); font-size: var(--font-size-caption); }
.variable-custom-option { padding: var(--space-2) 10px; color: var(--text-main); background: var(--surface-card); border: 1px dashed var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); font-weight: 700; text-align: left; cursor: pointer; }
.variable-custom-option:hover { background: var(--surface-shell); border-color: var(--accent); }
/* Variable picker: EditorDialog (Small) with the current choice above the groups. */
.variable-picker-current { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.variable-picker-current > span:first-child { margin-right: auto; color: var(--text-muted); font-size: var(--font-size-dense); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.variable-picker-current code { color: var(--accent); font-size: var(--font-size-dense); font-weight: 700; }
.variable-picker-dialog-body { min-height: 180px; }
.variable-picker-dialog .variable-picker-options { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.variable-picker-dialog .variable-option { min-height: 64px; }
.variable-picker-dialog .release-modal-footer .variable-custom-option { flex: 1; }
.assertion-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); align-items: end; }
.assertion-row > * { min-width: 0; }
.assertion-row > .form-field { margin: 0; }
.extraction-row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px var(--space-2); align-items: end; padding: var(--space-3); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.extraction-control { display: grid; gap: 5px; min-width: 0; }
.extraction-control > small { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.extraction-control .form-control { width: 100%; min-width: 0; }
.extraction-variable { grid-column: span 3; }
.extraction-source { grid-column: span 3; }
.extraction-field-picker { grid-column: span 6; display: grid; gap: 6px; min-width: 0; }
.extraction-strategy { grid-column: span 3; }
.extraction-type { grid-column: span 3; }
.extraction-required { grid-column: span 3; min-height: 38px; align-self: end; }
.extraction-remove { grid-column: 12; justify-self: end; align-self: end; }
.variable-row { grid-template-columns: minmax(180px, 1fr) minmax(120px, .55fr) minmax(220px, 1.35fr) auto auto; align-items: end; }
.variable-field { display: grid; gap: 5px; min-width: 0; }
.variable-field > small { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.variable-field .form-control { width: 100%; min-width: 0; }
.variable-secret { min-height: 42px; align-items: center; white-space: nowrap; }
.variable-remove { min-height: 42px; align-self: end; }
.variables-tab-stack { display: grid; gap: var(--space-4); }
.variable-empty-state { padding: 18px; color: var(--text-muted); background: var(--surface-shell); border: 1px dashed var(--line-soft); border-radius: var(--radius-section); text-align: center; }
.runtime-variable-count { display: grid; place-items: center; min-width: 26px; height: 26px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-pill); font-size: var(--font-size-dense); font-weight: 700; }
.runtime-variable-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 280px)); gap: 7px; justify-content: start; }
.runtime-variable-step-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 340px)); gap: 10px; align-items: start; justify-content: start; }
.runtime-variable-step-group { overflow: hidden; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.runtime-variable-step-group > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: 7px 9px; background: var(--surface-muted); border-bottom: 1px solid var(--line-soft); }
.runtime-variable-step-group > header > div { display: grid; gap: 2px; }
.runtime-variable-step-group > header strong { font-size: var(--font-size-dense); }
.runtime-variable-step-group > header small { color: var(--text-muted); font-size: var(--font-size-dense); }
.runtime-variable-step-group > header .grid-action-icon { width: 26px; min-width: 26px; height: 26px; min-height: 26px; font-size: var(--font-size-dense); }
.runtime-step-order { display: grid; place-items: center; width: 22px; height: 22px; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.runtime-variable-step-group > .runtime-variable-grid { grid-template-columns: 1fr; padding: 6px; }
.runtime-variable-card { display: grid; gap: 5px; min-height: 0; padding: var(--space-2) 9px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); box-shadow: none; }
.runtime-variable-card > header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.runtime-variable-producer { display: grid; gap: var(--space-1); }
.runtime-variable-producer strong { font-size: var(--font-size-caption); }
.runtime-variable-kind { width: fit-content; padding: 1px 5px; color: var(--warning); background: var(--warning-soft); border-radius: var(--radius-pill); font-size: var(--font-size-dense); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.runtime-variable-card > small { overflow: hidden; color: var(--text-muted); font: var(--font-size-dense) ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.runtime-variable-card > footer { display: grid; gap: 3px; padding-top: 5px; border-top: 1px solid var(--line-soft); }
.runtime-variable-card > footer > span { color: var(--text-muted); font-size: var(--font-size-dense); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.runtime-variable-card > footer em { color: var(--text-muted); font-size: var(--font-size-dense); font-style: normal; }
.runtime-variable-consumers { display: flex; flex-wrap: wrap; gap: 3px; }
.runtime-variable-consumers button { padding: 2px 5px; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: var(--radius-compact); font-size: var(--font-size-dense); cursor: pointer; }
.runtime-variable-consumers button:hover { background: var(--accent-soft); }
.form-control.compact { width: 150px; min-height: 32px; padding: 5px var(--space-2); }
.workflow-diagram-panel { overflow: hidden; }
.workflow-diagram { overflow: hidden; padding: 10px 14px 14px; background: var(--surface-card); }
.workflow-diagram-svg { display: block; width: 100%; height: auto; min-width: 0; }
.bpmn-export { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line-soft); }
.workflow-details-body.is-diagram { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.workflow-diagram-panel.workflow-diagram-viewport { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.workflow-diagram-viewport > .panel-header { flex-wrap: wrap; gap: 10px; }
.workflow-diagram-view-controls { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.workflow-diagram-view-controls button.button.secondary[aria-pressed="true" i] { color: var(--text-on-accent); background: var(--accent-solid); }
.workflow-diagram-viewport .workflow-diagram { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.workflow-diagram-viewport .workflow-diagram-svg { width: 1100px; max-width: none; height: auto; }
.workflow-diagram-viewport.is-fitted .workflow-diagram-svg { width: 100%; height: 100%; }
.workflow-diagram-viewport .bpmn-export { min-width: 0; }
.workflow-diagram-viewport .bpmn-export pre { max-height: 120px; overflow: auto; }
.diagram-lane { stroke-width: 1; }
.diagram-lane-logic { fill: var(--surface-muted); stroke: var(--line-soft); }
.diagram-lane-api { fill: var(--surface-muted); stroke: var(--success-line); }
.diagram-lane-title { display: flex; align-items: baseline; justify-content: space-between; color: var(--text-main); font-size: var(--font-size-diagram-small); line-height: 1; }
.diagram-lane-title strong { font-size: var(--font-size-diagram); font-weight: 700; }
.diagram-lane-title span { color: var(--text-muted); font-size: var(--font-size-diagram-small); }
.diagram-flow { fill: none; stroke: var(--accent); stroke-width: 1.05; stroke-linecap: butt; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }
.diagram-flow.conditional { stroke: var(--accent); stroke-dasharray: 4 4; }
.diagram-arrow-head { fill: var(--accent-solid); stroke: none; }
.diagram-node { cursor: pointer; }
.diagram-node rect, .diagram-node path { fill: var(--surface-card); stroke: var(--accent); stroke-width: 1.25; }
.diagram-node.node-apirequest rect { fill: var(--success-soft); stroke: var(--success-line); }
.diagram-node.node-setvariable rect { fill: var(--surface-card); stroke: var(--accent); }
.diagram-node.node-condition path { fill: var(--warning-soft); stroke: var(--warning-line); }
.diagram-node.node-start rect, .diagram-node.node-end rect { fill: var(--success-solid); stroke: var(--success-line); }
.diagram-node.node-errorend rect { fill: var(--danger-solid); stroke: var(--danger-line); }
.diagram-node.selected rect, .diagram-node.selected path { filter: drop-shadow(0 1px 2px #52616f38); stroke: var(--accent); stroke-width: 1.6; }
.diagram-node.invalid rect, .diagram-node.invalid circle, .diagram-node.invalid path { stroke: var(--danger-line); }
.diagram-node text { fill: var(--text-main); font: 12px "Segoe UI", sans-serif; pointer-events: none; }
.diagram-node-label, .diagram-terminal-label { display: flex; height: 100%; flex-direction: column; justify-content: center; color: var(--text-strong); line-height: 1.15; pointer-events: none; }
.diagram-node-label { align-items: center; text-align: center; }
.diagram-node-label.inverse { color: var(--text-on-accent); }
.diagram-node-label.inverse small { color: var(--text-on-accent); }
.node-errorend .diagram-node-label.inverse small { color: var(--text-on-accent); }
.diagram-terminal-label { align-items: flex-start; text-align: left; }
.diagram-terminal-label.align-right { align-items: flex-end; text-align: right; }
.diagram-node-label strong, .diagram-terminal-label strong { font-size: var(--font-size-diagram-small); font-weight: 600; }
.diagram-node-label small, .diagram-terminal-label small { margin-top: 2px; color: var(--text-muted); font-size: var(--font-size-diagram-small); }
.diagram-label { color: var(--text-muted); font-size: var(--font-size-diagram-small); text-align: center; }
.issue-marker { display: inline-flex; align-items: center; justify-content: center; padding: 3px 5px; color: var(--text-on-accent); background: var(--danger-solid); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.validation-list { display: grid; gap: var(--space-2); margin: 0; padding-left: var(--space-5); }
.workflow-validation-list { display: grid; gap: var(--space-3); }
.workflow-validation-item { display: grid; gap: 10px; padding: var(--space-4); background: var(--surface-card); border: 1px solid var(--danger-line); border-left: 4px solid var(--danger-line); border-radius: var(--radius-section); }
.workflow-validation-item > header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.workflow-validation-item > header code { color: var(--danger); font-size: var(--font-size-caption); }
.workflow-validation-item > p { margin: 0; line-height: 1.5; }
.validation-severity { padding: 3px 7px; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; }
.workflow-validation-item dl { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; }
.workflow-validation-item dl > div { display: grid; gap: 2px; }
.workflow-validation-item dt { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; }
.workflow-validation-item dd { margin: 0; }
.workflow-validation-item details p { margin: var(--space-2) 0 0; color: var(--text-main); }
.validation-fix { display: grid; gap: 3px; padding: 10px var(--space-3); color: var(--success); background: var(--surface-muted); border: 1px solid var(--success-line); border-radius: var(--radius-control); }
.validation-fix strong { font-size: var(--font-size-caption); text-transform: uppercase; }
.workflow-run-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: var(--space-4); padding: 14px 17px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.workflow-run-summary span { display: grid; gap: 2px; color: var(--text-main); }
.workflow-run-summary strong { font-size: var(--font-size-caption); text-transform: uppercase; }
.execution-code { max-height: 360px; overflow: auto; padding: 13px; color: var(--text-on-accent); background: var(--accent-solid); border-radius: var(--radius-control); white-space: pre-wrap; word-break: break-word; }
.execution-empty-evidence { display: grid; gap: 3px; padding: var(--space-3) 14px; color: var(--warning); background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-control); }
.execution-empty-evidence strong { font-size: var(--font-size-caption); }
.execution-empty-evidence span { font-size: var(--font-size-caption); }

.remote-desktop-config-section { display: grid; gap: var(--space-3); padding: 14px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.remote-desktop-config-section > header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.remote-desktop-config-section > header.with-actions { grid-template-columns: auto minmax(0, 1fr) auto; }
.remote-desktop-config-section > header.with-actions > .icon-button { justify-self: end; }
.remote-desktop-config-section > header > div { display: grid; gap: 2px; }
.remote-desktop-config-section > header strong { font-size: var(--font-size-small); color: var(--text-strong); }
.remote-desktop-config-section > header small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.4; }
.remote-desktop-section-number { display: grid; width: 28px; height: 28px; place-items: center; color: var(--text-on-accent); background: var(--accent-solid); border-radius: 50%; font-size: var(--font-size-caption); font-weight: 700; }
.remote-desktop-endpoint-preview { display: grid; gap: var(--space-1); padding: 10px var(--space-3); color: var(--success); background: var(--surface-muted); border: 1px solid var(--success-line); border-radius: var(--radius-control); }
.remote-desktop-endpoint-preview span { font-size: var(--font-size-dense); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.remote-desktop-endpoint-preview code { overflow-wrap: anywhere; color: var(--success); }
.remote-desktop-parameters { padding: 0; background: transparent; border: 0; }
.desktop-agent-empty { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: var(--space-3); color: var(--warning); background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-control); }
.desktop-agent-empty > span { display: grid; width: 32px; height: 32px; place-items: center; color: var(--warning); background: var(--warning-soft); border-radius: var(--radius-control); }
.desktop-agent-empty > div { display: grid; gap: 3px; }
.desktop-agent-empty strong { font-size: var(--font-size-caption); }
.desktop-agent-empty small { font-size: var(--font-size-caption); line-height: 1.45; }
.desktop-agent-server-url { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.desktop-agent-server-url code { flex: 1; overflow: hidden; padding: var(--space-2) 10px; color: var(--text-strong); background: var(--surface-card); border: 1px solid var(--warning-line); border-radius: var(--radius-control); font-size: var(--font-size-dense); text-overflow: ellipsis; white-space: nowrap; }
.desktop-agent-server-url .button { flex: 0 0 auto; }
.desktop-agent-one-time-note { display: flex; gap: 5px; align-items: center; margin-top: 5px; color: var(--warning); }
.kiosk-live-preview { display: grid; gap: 7px; margin: 10px 0 0; padding: 9px; background: var(--accent-solid); border: 1px solid var(--accent); border-radius: var(--radius-section); }
.kiosk-live-preview-heading { display: flex; justify-content: space-between; align-items: center; color: var(--text-on-accent); font-size: var(--font-size-caption); font-weight: 700; }
.kiosk-live-preview-heading small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-live-preview-heading .live-dot { color: var(--success); font-size: var(--font-size-caption); }
.kiosk-live-preview-context { display: grid; gap: 3px; padding: 7px 9px; color: var(--text-muted); background: var(--accent-solid); border-radius: var(--radius-compact); font-size: var(--font-size-caption); overflow-wrap: anywhere; }
.kiosk-live-preview-context strong { color: var(--text-on-accent); }
.kiosk-live-preview img { display: block; width: 100%; max-height: 480px; object-fit: contain; background: var(--accent-solid); border-radius: var(--radius-compact); }
.kiosk-live-preview figcaption { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.kiosk-live-preview-waiting { display: flex; gap: var(--space-2); align-items: center; justify-content: center; min-height: 90px; margin-top: 10px; color: var(--text-muted); background: var(--accent-soft); border: 1px dashed var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); }
.desktop-agent-list { display: grid; gap: 6px; }
.local-agent-runtime { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; margin-bottom: 9px; padding: 9px 11px; color: var(--text-main); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.local-agent-runtime > i { margin-top: 2px; color: var(--text-muted); }
.local-agent-runtime > div { display: grid; gap: 2px; }
.local-agent-runtime strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.local-agent-runtime small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.35; }
.local-agent-runtime.running { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.local-agent-runtime.running > i, .local-agent-runtime.running strong { color: var(--success); }
.local-agent-runtime.failed, .local-agent-runtime.agent-executable-missing { background: var(--warning-soft); border-color: var(--warning-line); }
.local-agent-runtime.failed > i, .local-agent-runtime.failed strong, .local-agent-runtime.agent-executable-missing > i, .local-agent-runtime.agent-executable-missing strong { color: var(--warning); }
.desktop-agent-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 11px; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.desktop-agent-card > span { color: var(--text-muted); }
.desktop-agent-card > div { display: grid; gap: 2px; min-width: 0; }
.desktop-agent-card strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.desktop-agent-card small { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.desktop-agent-card b { color: var(--text-muted); font-size: var(--font-size-caption); text-transform: uppercase; }
.desktop-agent-card.online > span, .desktop-agent-card.online > b { color: var(--success); }
.desktop-agent-card.busy > span, .desktop-agent-card.busy > b { color: var(--accent); }
.desktop-agent-card.offline { opacity: .62; }
.anydesk-configuration-button.active { color: var(--success); background: var(--success-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.anydesk-configuration-note,
.anydesk-configuration-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: start; padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.anydesk-configuration-note { color: var(--text-main); background: var(--surface-shell); }
.anydesk-configuration-note > i,
.anydesk-configuration-status > i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: var(--radius-control); }
.anydesk-configuration-note > i { color: var(--accent); background: var(--accent-soft); }
.anydesk-configuration-note div,
.anydesk-configuration-status div { display: grid; gap: 3px; }
.anydesk-configuration-note span,
.anydesk-configuration-status span { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.45; }
.anydesk-configuration-status.connected { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.anydesk-configuration-status.connected > i { background: var(--success-soft); }
.anydesk-configuration-status.connecting { color: var(--accent); background: var(--accent-soft); border-color: var(--line-soft); }
.anydesk-configuration-status.connecting > i { background: var(--accent-soft); }
.anydesk-configuration-preview { display: grid; gap: var(--space-2); margin: 0; padding: 10px; color: var(--text-on-accent); background: var(--accent-solid); border: 1px solid var(--accent); border-radius: var(--radius-surface); }
.anydesk-configuration-preview > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--font-size-caption); }
.anydesk-configuration-preview img { display: block; width: 100%; max-height: 390px; object-fit: contain; background: var(--accent-solid); border-radius: var(--radius-control); }
.anydesk-configuration-modal .release-modal-footer > span { flex: 1; }
.grid-action-icon.blocked { position: relative; color: var(--text-muted); background: var(--surface-muted); opacity: 1; }
.grid-action-icon.blocked:hover { color: var(--text-strong); background: var(--surface-muted); }
.workflow-action-warning { position: absolute; top: -4px; right: -4px; display: grid; width: 15px; height: 15px; place-items: center; color: var(--text-on-accent); background: var(--danger-solid); border: 2px solid var(--line-soft); border-radius: 50%; font-size: var(--font-size-caption); font-weight: 700; line-height: 1; }
/* Labelled run action next to the workflow editor tabs; the "!" marker shows that running is blocked (reason in the title). */
.button.workflow-run-button { position: relative; gap: var(--space-2); }
@media (pointer: coarse) { .button.workflow-run-button { min-height: 44px; } }
.kiosk-flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-3); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.kiosk-flow-toolbar > div { display: grid; gap: 2px; }
.kiosk-flow-toolbar strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.kiosk-flow-toolbar small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-flow-toolbar-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.kiosk-flow-empty { display: grid; justify-items: center; gap: 6px; padding: var(--space-6); color: var(--text-muted); text-align: center; background: var(--surface-card); border: 1px dashed var(--line-soft); border-radius: var(--radius-section); }
.kiosk-flow-empty > i { color: var(--text-muted); font-size: var(--font-size-heading-small); }
.kiosk-flow-empty strong { color: var(--text-main); font-size: var(--font-size-small); }
.kiosk-flow-empty span { max-width: 620px; font-size: var(--font-size-caption); line-height: 1.5; }
.kiosk-ui-action-list { display: grid; gap: 10px; }
.kiosk-ui-action-card { overflow: hidden; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); box-shadow: 0 2px 8px color-mix(in srgb, var(--shadow-color) 4%, transparent); }
.kiosk-ui-action-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px var(--space-3); background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.kiosk-ui-action-card > header > div:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.kiosk-ui-action-card > header strong { overflow: hidden; color: var(--text-strong); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.kiosk-ui-action-card > header small { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.kiosk-action-order { display: grid; width: 27px; height: 27px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); font-weight: 700; }
.kiosk-action-controls { display: flex; gap: var(--space-1); }
.kiosk-action-fields { padding: var(--space-3); }
.kiosk-action-options { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kiosk-click-target { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2) 10px; align-items: end; }
.kiosk-click-target > small { grid-column: 1 / -1; color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-visual-target { display: grid; gap: 10px; }
.kiosk-visual-target > small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.45; }
.kiosk-visual-target-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.kiosk-visual-sample, .kiosk-visual-missing { display: flex; gap: var(--space-3); align-items: center; padding: 10px; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.kiosk-visual-sample img { width: 112px; height: 72px; object-fit: contain; background: var(--accent-solid); border: 1px solid var(--line-soft); border-radius: var(--radius-compact); }
.kiosk-visual-sample > div, .kiosk-visual-missing > div { display: grid; gap: 3px; }
.kiosk-visual-sample strong, .kiosk-visual-missing strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.kiosk-visual-sample small, .kiosk-visual-missing small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.4; }
.kiosk-visual-missing > i { color: var(--text-muted); font-size: var(--font-size-heading-small); }
.kiosk-point-picker { display: grid; gap: 10px; padding: var(--space-3); color: var(--text-on-accent); background: var(--accent-solid); border: 1px solid var(--accent); border-radius: var(--radius-section); }
.kiosk-point-picker > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kiosk-point-picker > header > div { display: grid; gap: 2px; }
.kiosk-point-picker > header > .kiosk-picker-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.kiosk-point-picker > header strong { font-size: var(--font-size-caption); }
.kiosk-point-picker > header strong i { margin-right: 5px; color: var(--accent); }
.kiosk-point-picker > header small, .kiosk-point-picker > small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-point-picker > p { margin: 0; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.45; }
.kiosk-point-picker-surface { position: relative; display: block; overflow: hidden; width: 100%; padding: 0; background: var(--accent-solid); border: 2px solid var(--accent); border-radius: var(--radius-control); cursor: crosshair; }
.kiosk-point-picker-surface.visual-region { user-select: none; touch-action: none; }
.kiosk-point-picker-surface:hover { border-color: var(--line-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shadow-color) 18%, transparent); }
.kiosk-point-picker-surface img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.kiosk-point-picker-surface > span { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; padding: 6px 9px; color: var(--text-on-accent); background: color-mix(in srgb, var(--accent-solid) 82%, transparent); border-radius: var(--radius-compact); font-size: var(--font-size-caption); font-weight: 700; pointer-events: none; }
.kiosk-point-picker-empty { display: flex; gap: 10px; align-items: center; padding: var(--space-4); color: var(--text-muted); background: var(--accent-solid); border: 1px dashed var(--accent); border-radius: var(--radius-control); }
.kiosk-point-picker-empty > i { color: var(--accent); font-size: var(--font-size-section); }
.kiosk-point-picker-empty > div { display: grid; gap: 3px; }
.kiosk-point-picker-empty strong { color: var(--text-on-accent); font-size: var(--font-size-caption); }
.kiosk-point-picker-empty span { font-size: var(--font-size-caption); line-height: 1.4; }
.kiosk-advanced-settings { padding: 10px var(--space-3); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.kiosk-advanced-settings > summary { color: var(--text-main); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; }
.kiosk-advanced-settings[open] > summary { margin-bottom: var(--space-3); }
.kiosk-advanced-settings > .form-grid { margin-bottom: var(--space-3); }
.kiosk-live-progress { display: grid; gap: 10px; padding: 13px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-shell)); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.kiosk-live-progress > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.kiosk-live-progress > header > span { display: grid; width: 32px; height: 32px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-control); }
.kiosk-live-progress > header > div { display: grid; gap: 2px; }
.kiosk-live-progress > header strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.kiosk-live-progress > header small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-live-progress > header > b { color: var(--accent); font-size: var(--font-size-caption); }
.kiosk-live-action-list { display: grid; gap: 5px; }
.kiosk-live-action { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); align-items: center; padding: 7px 9px; background: color-mix(in srgb, var(--surface-card) 75%, transparent); border: 1px solid var(--line-soft); border-radius: var(--radius-control); opacity: .62; }
.kiosk-live-action > span { display: grid; width: 23px; height: 23px; place-items: center; color: var(--text-muted); background: var(--surface-muted); border-radius: 50%; font-size: var(--font-size-caption); font-weight: 700; }
.kiosk-live-action > div { display: grid; gap: 1px; }
.kiosk-live-action strong { color: var(--text-main); font-size: var(--font-size-caption); }
.kiosk-live-action small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-live-action.passed { opacity: .82; }
.kiosk-live-action.passed > span { color: var(--success); background: var(--success-soft); }
.kiosk-live-action.running { opacity: 1; border-color: var(--line-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 10%, transparent); }
.kiosk-live-action.running > span { color: var(--text-on-accent); background: var(--accent-solid); }
.kiosk-execution-result { overflow: hidden; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.kiosk-execution-result > header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 11px 13px; background: var(--accent-soft); border-bottom: 1px solid var(--line-soft); }
.kiosk-execution-result > header > div { display: grid; gap: 2px; }
.kiosk-execution-result > header strong { color: var(--text-strong); font-size: var(--font-size-small); }
.kiosk-execution-result > header small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-result-action-list { display: grid; gap: 1px; }
.kiosk-result-action { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 13px; background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.kiosk-result-action:last-child { border-bottom: 0; }
.kiosk-result-action > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; font-size: var(--font-size-caption); }
.kiosk-result-action.passed > span { color: var(--success); background: var(--success-soft); }
.kiosk-result-action.failed > span { color: var(--danger); background: var(--danger-soft); }
.kiosk-result-action > div { display: grid; gap: 2px; min-width: 0; }
.kiosk-result-action strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.kiosk-result-action small { color: var(--text-muted); font-size: var(--font-size-caption); }
.kiosk-result-action p { margin: 2px 0 0; color: var(--text-main); font-size: var(--font-size-caption); line-height: 1.4; }
.result-row { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(100px, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
@media (max-width: 900px) { .test-case-studio, .workflow-editor-grid, .workflow-run-grid { grid-template-columns: 1fr; } .automation-review-card { position: static; } .human-step-head { display: none; } .human-step-row { grid-template-columns: 38px 1fr; } .human-step-row textarea, .human-step-binding { grid-column: 2; } .human-step-actions { grid-column: 2; } .rule-row:not(.workflow-input-row), .assertion-row, .variable-row { grid-template-columns: 1fr; } .workflow-input-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .workflow-input-variable, .workflow-input-value, .workflow-input-secret { grid-column: 1 / -1; } .workflow-input-secret { margin-top: 0; } .workflow-input-type, .workflow-input-remove { grid-column: auto; } .extraction-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .extraction-variable, .extraction-source, .extraction-field-picker, .extraction-strategy, .extraction-type, .extraction-required, .extraction-remove { grid-column: auto; } .extraction-field-picker { grid-column: 1 / -1; } }
@media (max-width: 760px) { .workflow-tabs { overflow-x: auto; } .workflow-tabs button { flex: 0 0 auto; } .related-test-case-row { grid-template-columns: 42px minmax(0, 1fr); } .related-test-case-status, .related-test-case-row > .button { grid-column: 2; justify-self: start; } .automation-approval-banner { align-items: stretch; flex-direction: column; } .automation-approval-actions .button { width: 100%; } }
@media (max-width: 1100px) { .workflow-filter-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } .workflow-filter-summary { border-left: 0; } }
@media (max-width: 720px) { .workflow-filter-grid { grid-template-columns: 1fr; } .workflow-target-header { flex-direction: column; } .workflow-target-actions { justify-content: space-between; } }
@media (max-width: 560px) { .extraction-row { grid-template-columns: 1fr; } .extraction-field-picker { grid-column: auto; } }

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: var(--space-4) var(--space-4) auto;
    z-index: 10000;
    width: fit-content;
    max-width: min(42rem, calc(100% - 2 * var(--space-4)));
    max-height: calc(100dvh - 2 * var(--space-4));
    overflow: auto;
    margin-inline: auto;
    padding: var(--space-5);
    border: 1px solid var(--danger);
    border-radius: var(--radius-surface);
    background: var(--surface-card);
    color: var(--text-main);
    box-shadow: 0 4px 24px color-mix(in srgb, var(--shadow-color) 25%, transparent);
    overflow-wrap: anywhere;
}
#blazor-error-ui p { margin-block: var(--space-3); }
#blazor-error-ui .reload { white-space: normal; }

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .nav-group-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-group { grid-column: 1 / -1; }
    .nav-group-items > a:has(+ .nav-submenu) { grid-column: 1 / -1; }
    .nav-submenu {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0 0 var(--space-1);
        padding: 0;
        border-left: 0;
    }
    .two-column { grid-template-columns: 1fr; }
    .version-detail-header { align-items: flex-start; display: grid; }
    .version-switcher { justify-content: flex-start; }
    .version-breakdowns { grid-template-columns: 1fr; }
    .version-suite-panel .panel-header { align-items: flex-start; display: grid; }
    .version-suite-actions { justify-content: flex-start; }
    .scenario-workspace { grid-template-columns: 1fr; }
    .scenario-version-sidebar { position: static; grid-row: 1; }
    .version-sidebar-list { max-height: 330px; }
    .editor-card-header { align-items: flex-start; display: grid; }
    .editor-card-header small { max-width: none; text-align: left; }
    .editor-footer { position: static; align-items: flex-start; display: grid; }
    .request-model-preview { grid-template-columns: 1fr; }
    .scenario-card { grid-template-columns: 1fr; align-items: start; }
    .scenario-card-actions { justify-content: flex-start; flex-wrap: wrap; }
    .scenario-type-header {
        grid-template-columns: 1fr;
        grid-template-areas: "identity" "context" "dates" "stats";
        align-items: start;
        padding-left: 52px;
    }
    .scenario-type-header > .scenario-group-dates { justify-self: start; max-width: 100%; min-width: 0; margin-top: 6px; white-space: normal; overflow-wrap: anywhere; }
    .scenario-group-stats { justify-self: start; width: min(100%, 280px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .scenario-list-heading { display: none; }
    .scenario-card-actions { padding-left: 0; border-left: 0; }
    .editor-overview-grid { grid-template-columns: 1fr; }
    .scenario-summary-card,
    .api-test-workbench { grid-template-columns: 1fr; }
    .scenario-summary-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-meta-item { padding: var(--space-2) 10px; border: 0; border-top: 1px solid var(--line-soft); }
    .api-case-inspector { position: static; }
}

@media (max-width: 680px) {
    .content { padding: 22px var(--space-4) 45px; }
    .topbar { padding-inline: var(--space-4); }
    .stats, .form-grid, .parameter-editor, .version-metrics, .editor-grid { grid-template-columns: 1fr; }
    .page-header { display: grid; }
    .page-actions { flex-wrap: wrap; }
    .scenario-browser-toolbar, .scenario-type-header { align-items: flex-start; display: grid; }
    .scenario-type-header > .scenario-group-identity { flex-wrap: wrap; align-items: flex-start; }
    .scenario-group-identity h3 { flex-basis: 100%; }
    .scenario-group-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .editor-card, .editor-card-parameters > .editor-card-header, .advanced-card > summary, .advanced-card > .editor-grid { padding-inline: var(--space-4); }
    .editor-card-parameters > .editor-card-header { margin-inline: 0; }
}

.scenario-browser {
    container-type: inline-size;
}

.scenario-action-hint {
    display: inline-flex;
    flex: 0 0 auto;
}

.scenario-card-actions .scenario-action-hint > .scenario-action-button.button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: var(--radius-control);
}

.scenario-card-actions .scenario-action-button.button.secondary {
    color: var(--text-strong);
    background: var(--surface-muted);
    border: 0;
}

.scenario-card-actions .scenario-action-button.button.secondary:hover {
    background: var(--surface-muted);
}

.scenario-card-actions .scenario-action-button i {
    margin: 0;
    font-size: var(--font-size-small);
}

@container (max-width: 860px) {
    .scenario-list-heading {
        display: none;
    }

    .scenario-card {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "main main main"
            "type priority status"
            "actions actions actions";
        gap: var(--space-3) 18px;
        align-items: center;
        padding: var(--space-4) 18px var(--space-4) 44px;
    }

    .scenario-card-main { grid-area: main; }
    .scenario-card-type { grid-area: type; }
    .scenario-card-priority { grid-area: priority; }
    .scenario-card-status { grid-area: status; }

    .scenario-card-actions {
        grid-area: actions;
        justify-content: flex-start;
        padding-top: 10px;
        padding-left: 0;
        border-top: 1px solid var(--line-soft);
        border-left: 0;
    }
}

@container (max-width: 520px) {
    .scenario-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "main"
            "type"
            "priority"
            "status"
            "actions";
    }
}

/* Scenario editor final refinement: IDE-like density with inline selected test details */
.scenario-editor-page-header,
.scenario-editor-studio {
    width: 100%;
    max-width: 1480px;
}

.scenario-editor-page-header {
    margin-bottom: 10px;
}

.scenario-editor-page-header h1 {
    font-size: clamp(22px, 1.7vw, 28px);
}

.scenario-editor-studio {
    gap: 10px;
}

.scenario-summary-card {
    gap: 10px var(--space-4);
    padding: 14px var(--space-4) var(--space-3);
    border-radius: var(--radius-surface);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.scenario-summary-main {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-3);
}

.scenario-summary-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: var(--radius-section);
    font-size: var(--font-size-section);
}

.scenario-summary-title-row h2 {
    font-size: var(--font-size-heading-small);
}

.scenario-summary-main p {
    margin-top: var(--space-1);
    font-size: var(--font-size-small);
}

.scenario-summary-meta {
    grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.15fr) minmax(90px, .7fr) minmax(210px, 1.6fr) 116px 136px;
    align-items: stretch;
    gap: 0;
    padding-top: 10px;
}

.summary-meta-item {
    padding: 0 14px;
    border-left: 1px solid var(--line-soft);
}

.summary-meta-item strong {
    order: 2;
    font-size: var(--font-size-small);
    line-height: 1.25;
}

.summary-meta-item small {
    order: 1;
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 600;
    line-height: 1.15;
}

.summary-meta-item.metric,
.summary-meta-item.result {
    align-content: center;
    min-height: 48px;
    padding: 6px var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    text-align: center;
}

.summary-meta-item.result {
    background: var(--surface-card);
    border-color: var(--success-line);
}

.summary-meta-item.metric strong,
.summary-meta-item.result strong {
    font-size: var(--font-size-section);
}

.scenario-editor-studio .editor-card {
    border-radius: var(--radius-surface);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.scenario-editor-studio .editor-card-parameters > .editor-card-header {
    min-height: 46px;
    margin: 0 14px;
    padding-top: var(--space-3);
    padding-bottom: var(--space-2);
}

.scenario-editor-studio .editor-card-parameters > .parameter-editor {
    gap: 10px;
    padding: var(--space-3) 14px 14px;
}

.parameter-editor > .api-engine-shell.full,
.api-engine-shell,
.api-endpoint-inspector,
.api-test-workbench,
.api-test-list-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.api-engine-shell {
    display: block;
}

.api-endpoint-inspector {
    padding: var(--space-3) 14px var(--space-2);
    border-radius: var(--radius-surface);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.api-endpoint-command {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.endpoint-command-main {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 0;
}

.endpoint-command-main > .status-badge {
    flex: 0 0 auto;
}

.endpoint-command-main > div {
    min-width: 0;
}

.endpoint-command-main strong {
    display: block;
    overflow: hidden;
    max-width: 100%;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-command-main small {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--font-size-small);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-command-actions {
    display: inline-flex;
    gap: var(--space-2);
    flex: 0 0 auto;
}

.endpoint-command-actions .button {
    min-height: 34px;
    flex-shrink: 0;
}

.endpoint-read-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-7);
    margin-bottom: 10px;
    padding: 0;
    background: transparent;
    border: 0;
}

.endpoint-read-strip span {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    padding: 0;
    border: 0;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    white-space: nowrap;
}

.endpoint-read-strip strong {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.endpoint-sections {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}

.endpoint-section-row {
    border-bottom: 1px solid var(--line-soft);
}

.endpoint-section-row:last-child {
    border-bottom: 0;
}

.endpoint-section-row > summary {
    min-height: 38px;
    padding: 0 var(--space-3);
    font-size: var(--font-size-small);
}

.endpoint-section-row > summary span {
    min-width: 0;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-section-row > summary i {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.endpoint-section-row > summary strong {
    min-width: 30px;
    flex: 0 0 auto;
    text-align: right;
}

.api-test-workbench {
    display: block;
    margin-top: 0;
}

.api-test-list-panel {
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-surface);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow-color) 4%, transparent);
}

.api-workbench-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: var(--space-3);
    align-items: center;
    min-height: 50px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line-soft);
}

.api-workbench-heading h3 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1.2;
}

.api-workbench-heading h3 span {
    color: var(--text-main);
    font-size: var(--font-size-small);
    font-weight: 600;
}

.api-workbench-heading .actions {
    display: inline-flex;
    grid-column: auto;
    gap: var(--space-2);
    flex: 0 0 auto;
    justify-content: flex-start;
}

.api-workbench-heading .actions .button,
.api-mini-stats span {
    min-height: 34px;
}

.api-workbench-heading .api-run-all-button {
    margin-right: var(--space-1);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--shadow-color) 14%, transparent);
}

.api-test-suite-preview {
    min-width: 0;
}

.api-test-suite-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}

.api-test-suite-list li {
    border-bottom: 1px solid var(--line-soft);
}

.api-test-suite-list li:last-child {
    border-bottom: 0;
}

.api-test-suite-list li > button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 14px;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 50px;
    padding: 7px 10px;
    color: var(--text-strong);
    text-align: left;
    background: var(--surface-card);
    border: 0;
    cursor: pointer;
}

.api-test-suite-list li > button:hover {
    background: var(--surface-shell);
}

.api-test-suite-list li.selected > button {
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.api-test-suite-list li > button > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.api-test-suite-list li > button > i {
    color: var(--text-muted);
    font-size: var(--font-size-dense);
}

.api-test-suite-list strong,
.api-test-suite-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-test-suite-list small {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.api-selected-case-log {
    display: grid;
    gap: 10px;
    margin-top: var(--space-1);
}

.api-selected-case-log article {
    display: grid;
    gap: 6px;
}

.api-result-empty {
    margin-top: var(--space-1);
}

.api-mini-stats {
    display: inline-flex;
    gap: var(--space-2);
}

.api-mini-stats span {
    display: grid;
    align-content: center;
    min-width: 72px;
    padding: 3px 10px;
    color: var(--text-main);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    font-size: var(--font-size-dense);
    font-weight: 600;
    letter-spacing: .015em;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

.api-mini-stats strong {
    color: var(--text-strong);
    font-size: var(--font-size-section);
    line-height: 1.1;
}

.api-test-table-head,
.api-test-case-row {
    display: grid;
    grid-template-columns: 32px minmax(280px, 1fr) minmax(110px, 145px) minmax(132px, 180px) minmax(112px, 150px) 44px;
    column-gap: var(--space-3);
    align-items: center;
}

.api-test-table-head {
    min-height: 31px;
    padding: 0 14px;
    color: var(--text-main);
    background: var(--surface-card);
    border-top: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.api-test-case-list {
    display: block;
}

.api-test-case-item {
    position: relative;
    border-bottom: 1px solid var(--line-soft);
}

.api-test-case-item:last-child {
    border-bottom: 0;
}

.api-test-case-row {
    min-height: 55px;
    padding: var(--space-2) 14px;
    background: var(--surface-card);
    cursor: pointer;
    transition: background-color .15s ease;
}

.api-test-case-row:hover {
    background: var(--surface-shell);
}

.api-test-case-row:focus-visible {
    outline: 2px solid var(--line-soft);
    outline-offset: -2px;
}

.api-test-case-item.selected .api-test-case-row {
    background: var(--surface-shell);
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.test-status-icon,
.validation-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex: 0 0 20px;
    font-size: var(--font-size-body);
}

.test-status-icon.positive,
.validation-icon {
    color: var(--success);
}

.test-status-icon.negative {
    color: var(--danger);
}

.api-case-name-cell {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.api-case-name-cell strong {
    overflow: hidden;
    color: var(--text-strong);
    font-size: var(--font-size-body);
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-case-name-cell small,
.api-test-case-row > small {
    overflow: hidden;
    min-width: 0;
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-test-case-row > .status-badge {
    justify-self: start;
    max-width: 100%;
}

.api-row-actions {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.api-row-actions .icon-button.subtle,
.expected-result-row .icon-button,
.icon-button.subtle {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex: 0 0 32px;
}

/* Related-automation actions form one control group and must share a height. */
.relation-actions > .button.small,
.relation-actions > .icon-button.subtle {
    height: 32px;
    min-height: 32px;
}

.api-test-case-details {
    margin: 0 14px var(--space-3) 17px;
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-top: 0;
    border-radius: 0 0 var(--radius-section) var(--radius-section);
    animation: inline-detail-open .16s ease-out;
}

@keyframes inline-detail-open {
    from { opacity: .65; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

.api-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 45px;
    padding: 0 var(--space-3);
}


.api-detail-actions {
    display: inline-flex;
    gap: var(--space-2);
    flex: 0 0 auto;
}

.api-detail-actions .button {
    min-height: 32px;
    flex-shrink: 0;
}

.api-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 60fr) minmax(360px, 40fr);
    min-width: 0;
}

.api-detail-main {
    min-width: 0;
    padding: var(--space-3) 14px;
    border-right: 1px solid var(--line-soft);
}

.api-detail-read-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.detail-read-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: var(--space-2) var(--space-3);
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.detail-read-field:nth-child(3n) {
    border-right: 0;
}

.detail-read-field:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.detail-read-field.wide {
    grid-column: span 1;
}

.detail-read-field strong {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    font-weight: 600;
    line-height: 1.2;
}

.detail-read-field small {
    overflow: hidden;
    min-width: 0;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.35;
    text-overflow: ellipsis;
}

.api-edit-grid {
    gap: 10px var(--space-3);
}

.api-expected-panel {
    min-width: 0;
    padding: var(--space-3) 14px;
}

.expected-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 32px;
    margin-bottom: var(--space-2);
}

.expected-panel-header h4 {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-body);
    line-height: 1.25;
}

.expected-panel-header h4 span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    color: var(--text-main);
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
}

.expected-panel-header .button {
    min-height: 30px;
    flex-shrink: 0;
}

.expected-results-grid {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}

.expected-results-head,
.expected-result-row {
    display: grid;
    grid-template-columns: 30px minmax(120px, 1fr) minmax(96px, .85fr) minmax(120px, 1fr) 36px;
    column-gap: 10px;
    align-items: center;
}

.expected-results-head {
    min-height: 30px;
    padding: 0 10px;
    color: var(--text-main);
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.expected-result-row {
    min-height: 38px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.expected-result-row:last-child {
    border-bottom: 0;
}

.expected-result-row strong,
.expected-result-row span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expected-result-row strong {
    color: var(--text-strong);
    font-size: var(--font-size-small);
    font-weight: 600;
}

.expected-result-row .icon-button {
    justify-self: end;
}

.expected-result-row .icon-button:disabled {
    opacity: .5;
    cursor: default;
}

.empty-inline {
    margin: var(--space-2) 0 0;
    color: var(--text-muted);
    font-size: var(--font-size-small);
}

.button.ghost {
    color: var(--text-strong);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.button.ghost:hover {
    background: var(--surface-muted);
    border-color: var(--line-soft);
}

@media (max-width: 1320px) {
    .scenario-editor-page-header,
    .scenario-editor-studio {
        width: min(100%, calc(100vw - 36px));
    }

    .scenario-summary-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-2) 0;
    }

    .summary-meta-item.metric,
    .summary-meta-item.result {
        text-align: left;
    }

    .api-test-table-head,
    .api-test-case-row {
        grid-template-columns: 30px minmax(220px, 1fr) 104px 128px 106px 38px;
        column-gap: var(--space-2);
    }

    .api-detail-body {
        grid-template-columns: minmax(0, 58fr) minmax(330px, 42fr);
    }

    .expected-results-head,
    .expected-result-row {
        grid-template-columns: 28px minmax(100px, 1fr) minmax(86px, .72fr) minmax(100px, 1fr) 34px;
        column-gap: 7px;
    }
}

@media (max-width: 980px) {
    .api-workbench-heading {
        grid-template-columns: 1fr;
    }

    .api-workbench-heading .actions,
    .api-mini-stats {
        justify-content: flex-start;
    }

    .api-detail-body {
        grid-template-columns: 1fr;
    }

    .api-detail-main {
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .api-detail-read-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-read-field:nth-child(3n) {
        border-right: 1px solid var(--line-soft);
    }

    .detail-read-field:nth-child(2n) {
        border-right: 0;
    }
}

/* Keep these workspace overrides last; the stylesheet contains legacy editor layers above. */
.content:has(.scenario-editor-studio) { width: 100%; max-width: 1680px; padding: 18px 22px 36px; }
.scenario-editor-page-header,
.scenario-editor-studio { width: 100%; max-width: none; }
.scenario-editor-page-header { align-items: center; margin-bottom: var(--space-3); }
.scenario-editor-page-header h1 { font-size: var(--font-size-heading-small); }
.scenario-editor-page-header p { margin-top: 3px; font-size: var(--font-size-caption); }
.scenario-editor-studio { gap: 10px; }
.scenario-editor-studio .api-workspace-card { overflow: visible; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.scenario-editor-studio .api-workspace-card > .parameter-editor { padding: 0; background: transparent; }
.api-workspace-card .api-engine-shell { display: grid; gap: 10px; }
.scenario-summary-card,
.api-endpoint-inspector,
.api-test-list-panel { border-color: var(--line-soft); border-radius: var(--radius-section); box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow-color) 3%, transparent); }
.scenario-summary-card { padding: var(--space-3) 14px 10px; }
.scenario-summary-title-row h1 { margin: 0; color: var(--text-strong); font-size: var(--font-size-section); line-height: 1.2; letter-spacing: -.02em; }
.scenario-summary-actions { display: flex; gap: var(--space-2); }
.scenario-summary-meta { grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.15fr) minmax(90px, .75fr) minmax(180px, 1.5fr) 108px 128px; }
.scenario-summary-meta .summary-meta-item { min-width: 0; }
.summary-meta-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-endpoint-inspector { padding: var(--space-3) 14px 9px; }
.api-workbench-heading { min-height: 48px; }
.api-test-table-head { font-size: var(--font-size-dense); }
.api-test-case-row { min-height: 52px; }
.api-test-case-details { margin: var(--space-2) var(--space-3) var(--space-3) 15px; border-top: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.api-detail-toolbar { min-height: 46px; padding: 0 10px 0 14px; }
.api-detail-tabs { flex: 1 1 auto; align-self: stretch; }
.api-detail-panel { min-width: 0; min-height: 176px; padding: 14px var(--space-4) var(--space-4); }
.scenario-editor-page-header .button,
.scenario-editor-studio .button { gap: 7px; }
.view-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) 14px; max-width: 920px; padding: 2px 6px; }
.view-field-grid > .full { grid-column: 1 / -1; }
.view-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.view-field > strong { color: var(--text-main); font-size: var(--font-size-caption); font-weight: 600; line-height: 17px; }
.read-control { display: flex; align-items: center; width: 100%; min-height: 38px; min-width: 0; padding: var(--space-2) 11px; overflow: hidden; color: var(--text-strong); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-small); line-height: 1.4; text-overflow: ellipsis; }
.read-control.badge-control { padding-block: 6px; }
.read-control.code-control { display: block; min-height: 72px; max-height: 180px; margin: 0; overflow: auto; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; }
.read-control.body-control { min-height: 74px; }
.view-metadata-strip { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 0; margin-top: 2px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.view-metadata-strip > span { display: grid; gap: 5px; min-height: 58px; align-content: center; padding: var(--space-2) 11px; border-right: 1px solid var(--line-soft); }
.view-metadata-strip > span:last-child { border-right: 0; }
.view-metadata-strip strong { color: var(--text-main); font-size: var(--font-size-caption); font-weight: 600; }
.view-metadata-strip small { color: var(--text-strong); font-size: var(--font-size-caption); }
.test-data-view-grid { align-items: start; }
.general-tab-layout { display: grid; grid-template-columns: minmax(0, 920px) minmax(230px, 300px); gap: 18px; align-items: stretch; }
.general-tab-fields { min-width: 0; }
.general-view-grid,
.general-edit-grid { max-width: none; }
.read-control.description-control { min-height: 74px; align-items: flex-start; white-space: pre-wrap; }
.case-audit-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; overflow: hidden; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.case-audit-panel > span { display: grid; gap: 6px; min-height: 76px; align-content: center; padding: 11px var(--space-3); border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.case-audit-panel > span:nth-child(2n) { border-right: 0; }
.case-audit-panel > span:nth-last-child(-n + 2) { border-bottom: 0; }
.case-audit-panel strong { color: var(--text-main); font-size: var(--font-size-caption); font-weight: 600; }
.case-audit-panel small { color: var(--text-strong); font-size: var(--font-size-caption); }
.case-audit-panel.is-disabled { background: var(--surface-muted); border-color: var(--line-soft); }
.case-audit-panel.is-disabled > span { opacity: .62; }
.expected-edit-toolbar { display: flex; justify-content: flex-end; gap: var(--space-2); margin-bottom: var(--space-2); }
.expected-edit-toolbar .form-control { width: 190px; min-height: 32px; padding-block: 5px; }
.metadata-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metadata-column { display: grid; align-content: start; padding: 0 18px; }
.metadata-column:first-child { padding-left: 10px; border-right: 1px solid var(--line-soft); }
.metadata-row { display: grid; grid-template-columns: minmax(118px, .38fr) minmax(0, 1fr); gap: var(--space-4); align-items: center; min-height: 36px; }
.metadata-row strong { color: var(--text-main); font-size: var(--font-size-caption); font-weight: 600; }
.metadata-row small { display: block; min-width: 0; overflow: hidden; color: var(--text-strong); font-size: var(--font-size-small); line-height: 1.35; text-overflow: ellipsis; }
.metadata-row .status-badge { font-size: var(--font-size-caption); }
.endpoint-code-icon { display: inline-grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; color: var(--text-muted); font: 700 11px/1 Consolas, monospace; }
.api-expected-panel { padding: 0; }
.scenario-editor-studio .advanced-card > summary { min-height: 48px; padding: 10px 14px; }
.scenario-editor-studio .advanced-card > summary strong { font-size: var(--font-size-body); }
.scenario-editor-studio .advanced-card > summary small { font-size: var(--font-size-caption); }
.scenario-editor-studio .editor-footer { bottom: 10px; padding: 10px 14px; background: color-mix(in srgb, var(--surface-card) 93%, transparent); border-radius: var(--radius-section); box-shadow: 0 5px 18px color-mix(in srgb, var(--shadow-color) 7%, transparent); }

.advanced-tab-badge { padding: 2px 7px; color: var(--warning); background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.scenario-workspace-run { display: flex; gap: var(--space-3); align-items: center; margin-left: auto; padding-right: 2px; }
.workspace-run-progress { display: grid; gap: var(--space-1); width: 150px; }
.workspace-run-progress > span { display: flex; gap: var(--space-2); align-items: center; justify-content: space-between; color: var(--text-main); font-size: var(--font-size-caption); }
.workspace-run-progress > span strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-run-progress-track { height: 4px; overflow: hidden; background: var(--surface-muted-2); border-radius: var(--radius-pill); }
.workspace-run-progress-track > i { display: block; height: 100%; background: var(--accent-solid); border-radius: inherit; transition: width .2s ease; }
.workspace-last-result { display: flex; gap: 6px; align-items: center; color: var(--text-muted); font-size: var(--font-size-caption); }
.editor-card-header-actions { display: flex; gap: var(--space-3); align-items: center; }
.json-contract-card { padding: 0; overflow: hidden; background: var(--surface-card); }
.json-contract-header { display: flex; gap: var(--space-6); align-items: center; justify-content: space-between; padding: 18px var(--space-5); background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.json-contract-header h2 { margin: 2px 0 var(--space-1); color: var(--text-strong); font-size: var(--font-size-section); }
.json-contract-header p { margin: 0; color: var(--text-muted); font-size: var(--font-size-caption); }
.json-contract-warning { display: inline-flex; gap: 7px; align-items: center; flex: 0 0 auto; padding: 7px 10px; color: var(--warning); background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-control); font-size: var(--font-size-dense); font-weight: 600; }
.json-contract-actions { display: flex; gap: 9px; align-items: center; }
.json-contract-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; min-height: 440px; }
.json-editor-field { display: grid; grid-template-rows: auto 1fr; gap: 10px; min-width: 0; padding: var(--space-4) 18px 18px; }
.json-editor-field + .json-editor-field { border-left: 1px solid var(--line-soft); }
.json-editor-heading { display: grid; gap: 2px; }
.json-editor-heading strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.json-editor-heading small { color: var(--text-muted); font-size: var(--font-size-dense); }
.json-editor.form-control { width: 100%; min-height: 360px; height: 100%; resize: vertical; padding: 14px var(--space-4); color: var(--text-strong); background: var(--surface-shell); border-color: var(--line-soft); font: 12px/1.55 Consolas, "Courier New", monospace; tab-size: 2; white-space: pre; }
.json-editor.form-control:focus { background: var(--surface-card); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--shadow-color) 10%, transparent); }

/* Scenario settings: EditorDialog; sections keep their natural height inside the scrolling body. */
.scenario-settings-backdrop { z-index: 80; }
.scenario-settings-modal-body { grid-auto-rows: max-content; }
.scenario-settings-section { overflow: hidden; background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.scenario-settings-section > header { display: flex; gap: var(--space-2); align-items: baseline; padding: 11px 14px; background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.scenario-settings-section > header strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.scenario-settings-section > header small { color: var(--text-muted); font-size: var(--font-size-caption); }
.scenario-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px var(--space-4); padding: 15px var(--space-4) 17px; }
.scenario-settings-grid.identity-grid { grid-template-columns: minmax(0, 1fr) 130px; }
.scenario-settings-grid .full { grid-column: 1 / -1; }
.scenario-description-input { min-height: 76px; resize: vertical; }
.scenario-active-setting { display: flex; gap: 11px; align-items: flex-start; padding: 11px var(--space-3); color: var(--text-strong); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); cursor: pointer; }
.scenario-active-setting input { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; accent-color: var(--accent-solid); }
.scenario-active-setting > span { display: grid; gap: 2px; }
.scenario-active-setting strong { font-size: var(--font-size-caption); }
.scenario-active-setting small { color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.4; }
.scenario-settings-errors { display: flex; gap: 10px; padding: 11px 13px; color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: var(--radius-control); }
.scenario-settings-errors > i { margin-top: 2px; }
.scenario-settings-errors > div { display: grid; gap: 3px; }
.scenario-settings-errors strong { font-size: var(--font-size-caption); }
.scenario-settings-errors small { font-size: var(--font-size-caption); }

/* Scenario editor is a fixed workspace: only its active panel scrolls. */
body:has(.scenario-editor-studio) { overflow: hidden; background: var(--surface-card); }
body:has(.scenario-editor-studio) .app-shell { height: 100vh; min-height: 0; overflow: hidden; }
.page-shell:has(.scenario-editor-studio) { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; min-height: 0; overflow: hidden; background: var(--surface-card); }
.content:has(.scenario-editor-studio) { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding-bottom: 18px; background: var(--surface-card); }
.content:has(.scenario-editor-studio) > .workspace-page > form { flex: 1 1 auto; min-height: 0; height: auto; margin-bottom: 0; }
.scenario-editor-studio { grid-template-rows: auto auto minmax(0, 1fr); height: 100%; min-height: 0; }
.scenario-editor-studio > .editor-card-parameters { min-height: 0; overflow: auto; background: var(--surface-card); }
.scenario-editor-studio > .scenario-targets-view { min-height: 0; overflow: auto; }
.scenario-editor-studio > .ui-test-history-page { min-height: 0; overflow: auto; background: var(--surface-card); }
.scenario-editor-studio > .api-workspace-card { overflow: auto; }
.scenario-editor-studio .parameter-editor,
.scenario-editor-studio .api-engine-shell { min-height: 0; }
.scenario-editor-studio > .json-contract-card { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; height: 100%; }
.scenario-editor-studio .json-contract-header,
.scenario-editor-studio .json-contract-grid { background: var(--surface-card); }
.scenario-editor-studio .json-contract-grid { min-height: 0; height: 100%; }
.scenario-editor-studio .json-editor-field { min-height: 0; }
.scenario-editor-studio .json-editor.form-control { min-height: 0; height: 100%; }

@media (max-width: 1320px) and (min-width: 1101px) {
    .scenario-summary-meta { grid-template-columns: minmax(100px, 1fr) minmax(135px, 1.15fr) minmax(85px, .7fr) minmax(150px, 1.4fr) 98px 118px; gap: 0; }
    .summary-meta-item.metric, .summary-meta-item.result { text-align: center; }
}

@media (max-width: 1100px) {
    .scenario-summary-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2) 0; }
    .api-detail-toolbar { align-items: stretch; flex-direction: column; padding-top: 6px; }
    .api-detail-actions { align-self: flex-end; padding-bottom: 7px; }
    .metadata-dashboard { grid-template-columns: 1fr; }
    .metadata-column { padding: 0 var(--space-2); }
    .metadata-column:first-child { padding-left: var(--space-2); border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .view-metadata-strip { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .general-tab-layout { grid-template-columns: 1fr; }
    .case-audit-panel { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
    .case-audit-panel > span { min-height: 64px; border-bottom: 0; }
    .case-audit-panel > span:nth-child(2n) { border-right: 1px solid var(--line-soft); }
    .case-audit-panel > span:last-child { border-right: 0; }
    .json-contract-grid { grid-template-columns: 1fr; }
    .json-editor-field + .json-editor-field { border-top: 1px solid var(--line-soft); border-left: 0; }
}

@media (max-width: 680px) {
    .scenario-settings-modal-body { padding: var(--space-3); }
    .scenario-settings-grid,
    .scenario-settings-grid.identity-grid { grid-template-columns: 1fr; }
    .json-contract-actions { align-items: stretch; flex-direction: column; }
}
/* Visual UI layout test studio */
.ui-layout-section-picker { display: none; }
.ui-layout-tab-panel { display: grid; gap: var(--space-3); min-width: 0; }
.ui-layout-setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-layout-setup-grid > .full { grid-column: 1 / -1; }
.ui-layout-tab-intro { padding: 15px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.ui-visual-editor { display: grid; gap: 14px; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); }
.ui-visual-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ui-visual-editor-header > div:first-child { display: grid; gap: 3px; }
.ui-visual-editor-header > div:first-child > span { font-weight: 700; color: var(--text-strong); }
.ui-viewport-grid { display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.ui-viewport-card { display: grid; grid-template-columns: 32px minmax(90px, 1.2fr) minmax(70px, .7fr) auto minmax(70px, .7fr) 32px; gap: var(--space-2); align-items: end; padding: 11px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); box-shadow: 0 3px 10px color-mix(in srgb, var(--shadow-color) 3%, transparent); }
.ui-viewport-card > i { align-self: center; color: var(--accent); font-size: var(--font-size-section); text-align: center; }
.ui-viewport-card label { display: grid; gap: var(--space-1); min-width: 0; }
.ui-viewport-times { align-self: center; padding-bottom: 9px; color: var(--text-muted); }
.ui-icon-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-control); background: var(--surface-muted); color: var(--text-main); cursor: pointer; }
.ui-icon-button:hover { background: var(--surface-muted); color: var(--text-strong); }
.ui-icon-button.danger:hover { background: var(--danger-soft); color: var(--danger); }
.ui-layout-report { display: grid; gap: var(--space-3); margin-top: var(--space-3); min-width: 0; container: ui-report / inline-size; }
.ui-layout-viewport-tab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-width: min(100%, 11rem); }
.ui-layout-viewport-tab > i { font-size: var(--font-size-section); text-align: center; }
.ui-layout-viewport-tab > span { display: grid; }
.ui-layout-viewport-tab small { color: var(--text-muted); font-size: var(--font-size-caption); }
.ui-layout-viewport-tab b { font-size: var(--font-size-caption); }
.ui-layout-viewport-tab.passed b { color: var(--success); }
.ui-layout-viewport-tab.failed b { color: var(--danger); }
.ui-layout-report-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: var(--space-3); align-items: start; }
.ui-layout-screenshot-stage { display: grid; gap: var(--space-2); min-width: 0; }
.ui-step-viewer-controls { display: flex; align-items: end; gap: var(--space-2); min-width: 0; }
.ui-step-viewer-controls .form-field { flex: 1; min-width: 0; }
.ui-step-viewer-controls select { width: 100%; min-width: 0; }
.ui-step-viewer-controls .button { flex: none; min-width: 44px; min-height: 44px; }
.ui-step-viewer-caption { overflow-wrap: anywhere; color: var(--text-strong); }
.ui-layout-screenshot.ui-layout-step-image > img { height: auto; max-height: 620px; object-fit: contain; }
.ui-layout-result-rule.interaction-step { cursor: pointer; min-width: 0; }
.ui-layout-result-rule.interaction-step > div { min-width: 0; overflow-wrap: anywhere; }
.ui-layout-result-rule.interaction-step.selected { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.ui-step-select { padding: 0; border: 0; background: transparent; color: inherit; text-align: start; cursor: pointer; min-height: 44px; }
.ui-step-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ui-layout-screenshot { position: relative; width: 100%; margin-inline: auto; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-muted); box-shadow: 0 9px 24px color-mix(in srgb, var(--shadow-color) 8%, transparent); }
.ui-layout-screenshot > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ui-layout-element-box { position: absolute; z-index: 2; box-sizing: border-box; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent-solid) 9%, transparent); pointer-events: none; }
.ui-layout-element-box.failed { border-color: var(--danger-line); background: color-mix(in srgb, var(--danger-solid) 13%, transparent); }
.ui-layout-element-box > span { position: absolute; top: -20px; left: -2px; max-width: 180px; overflow: hidden; padding: 2px 5px; border-radius: var(--radius-compact) var(--radius-compact) var(--radius-compact) 0; background: var(--accent-solid); color: var(--text-on-accent); font: 700 9px/14px ui-monospace, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.ui-layout-element-box.failed > span { background: var(--danger-solid); }
.ui-layout-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-muted); font-size: var(--font-size-caption); }
.ui-layout-legend span { display: flex; align-items: center; gap: 5px; }
.ui-layout-legend i { width: 12px; height: 9px; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent-solid) 9%, transparent); }
.ui-layout-legend i.failed { border-color: var(--danger-line); background: color-mix(in srgb, var(--danger-solid) 13%, transparent); }
.ui-layout-no-screenshot { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 280px; border: 1px dashed var(--line-soft); border-radius: var(--radius-section); background: var(--surface-shell); color: var(--text-muted); text-align: center; }
.ui-layout-no-screenshot i { font-size: var(--font-size-heading); }
.ui-layout-assertion-results { display: grid; gap: var(--space-2); max-height: 620px; overflow: auto; }
.ui-layout-assertion-results > header { padding: 2px 2px 7px; }
.ui-layout-assertion-results > header > div { display: grid; }
.ui-layout-assertion-results header small { color: var(--text-muted); }
.ui-layout-result-rule { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface-card); overflow-wrap: anywhere; }
.ui-layout-result-rule > i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.ui-layout-result-rule > div { display: grid; gap: 3px; }
.ui-layout-result-rule strong { color: var(--text-strong); font-size: var(--font-size-body); }
.ui-layout-result-rule small { color: var(--text-muted); font-size: var(--font-size-caption); }
.ui-layout-result-rule code { overflow-wrap: anywhere; color: var(--text-main); font-size: var(--font-size-caption); }
.ui-step-screenshot { position: relative; display: block; max-width: 360px; margin-top: 6px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface-muted); }
.ui-step-screenshot img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: cover; object-position: top; }
.ui-step-screenshot.portrait { width: min(100%, 240px); }
.ui-step-screenshot.portrait img { max-height: none; object-fit: contain; }
.ui-step-screenshot span { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 5px; padding: var(--space-1) 7px; color: var(--text-on-accent); background: color-mix(in srgb, var(--accent-solid) 85%, transparent); border-radius: var(--radius-compact); font-size: var(--font-size-caption); font-weight: 700; }
.ui-layout-result-rule.page-health.failed { border-left: 4px solid var(--danger-line); background: var(--surface-shell); }
.ui-layout-check-section { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-1); padding: 11px var(--space-4) var(--space-1); border-top: 1px solid var(--line-soft); background: var(--surface-shell); }
.ui-layout-check-section > div { display: grid; gap: 1px; }
.ui-layout-check-section strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.ui-layout-check-section small { color: var(--text-muted); font-size: var(--font-size-caption); }
.ui-layout-result-rule.element-check strong { font-family: Consolas, monospace; }
.ui-layout-report-notice { padding: 9px 10px; color: var(--text-muted); background: var(--surface-shell); border: 1px dashed var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); }
.ui-layout-result-rule.passed > i { background: var(--success-soft); color: var(--success); }
.ui-layout-result-rule.failed { border-color: var(--danger-line); background: var(--surface-card); }
.ui-layout-result-rule.failed > i { background: var(--danger-soft); color: var(--danger); }
.run-technical-details { margin-top: var(--space-3); }
.run-technical-details > summary { cursor: pointer; color: var(--text-main); font-size: var(--font-size-caption); font-weight: 700; }
.ui-history-visual-report { margin-top: 10px; }
.ui-history-visual-report > summary { display: flex; align-items: center; gap: 7px; cursor: pointer; color: var(--accent); font-size: var(--font-size-caption); font-weight: 700; }
.ui-history-visual-report[open] > summary { margin-bottom: var(--space-2); }

@container ui-report (max-width: 44rem) {
  .ui-layout-report-grid { grid-template-columns: minmax(0, 1fr); }
  .ui-layout-assertion-results { max-height: none; overflow: visible; }
  .ui-run-execution-modal .ui-layout-screenshot-stage { position: static; }
}
@media (max-width: 650px) {
  .ui-layout-setup-grid { grid-template-columns: 1fr; }
  .ui-visual-editor-header { display: grid; }
}

.ui-elements-editor {
  display: grid;
  gap: 10px;
}

.ui-catalog-edit-link {
  width: fit-content;
  margin-top: var(--space-2);
}

.ui-catalog-locator-backdrop {
  z-index: 70;
}

.ui-catalog-promote {
  align-items: flex-start;
  padding-top: var(--space-1);
}

.ui-elements-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.ui-elements-editor-header > div:first-child {
  display: grid;
  gap: 3px;
}

.ui-elements-editor-header > div:first-child > span {
  font-weight: 700;
}

.ui-elements-editor-header .button-row {
  flex-wrap: nowrap;
}

.ui-elements-count {
  padding: 5px 9px;
  color: var(--text-main);
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-caption);
  font-weight: 700;
  white-space: nowrap;
}

.ui-element-actions {
  display: flex;
  gap: var(--space-1);
}

.ui-elements-empty {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 110px;
  padding: var(--space-5);
  color: var(--text-muted);
  text-align: center;
  background: var(--surface-card);
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-section);
}

.ui-elements-empty strong {
  color: var(--text-main);
}

@media (max-width: 1100px) {
  .ui-element-locator {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .ui-element-locator {
    grid-column: auto;
  }
}

.ui-test-history-page {
  container: ui-history / inline-size;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.ui-test-history-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}

.ui-test-history-page-header > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ui-test-history-page-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-size-section);
}

.ui-test-history-page-header p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: var(--font-size-caption);
}

.ui-test-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex: 0 0 auto;
}

.ui-test-live-progress {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  background: var(--surface-shell);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-control);
}

.ui-test-live-progress > header,
.ui-test-live-progress > footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.ui-test-live-progress > header > div {
  display: grid;
  gap: 2px;
}

.ui-test-live-progress > header small,
.ui-test-live-progress > footer {
  color: var(--text-muted);
  font-size: var(--font-size-caption);
}

.ui-test-live-progress > footer {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ui-test-live-progress > footer a {
  margin-left: auto;
  font-weight: 700;
}

.ui-run-execution-body > .ui-test-live-progress {
  gap: 6px;
  padding: 9px var(--space-3);
}

.ui-test-history-workspace {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.ui-run-history-sidebar {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.ui-latest-run-card,
.ui-run-menu-item {
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.ui-latest-run-card {
  display: grid;
  gap: 5px;
  padding: 11px var(--space-3);
  background: linear-gradient(145deg, var(--accent-solid), var(--accent-solid));
  border: 1px solid var(--accent);
  border-radius: var(--radius-section);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow-color) 14%, transparent);
  color: var(--text-on-accent);
}

.ui-latest-run-card:hover,
.ui-latest-run-card.selected {
  border-color: var(--line-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 100%, transparent), 0 7px 20px color-mix(in srgb, var(--shadow-color) 18%, transparent);
}

.ui-latest-run-label,
.ui-latest-run-heading,
.ui-run-menu-topline,
.ui-run-menu-summary,
.ui-run-details-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.ui-latest-run-label {
  justify-content: flex-start;
  color: var(--text-on-accent);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.ui-latest-run-heading strong {
  font-size: var(--font-size-section);
}

.ui-latest-run-card time,
.ui-latest-run-card .ui-run-menu-summary {
  color: var(--text-on-accent);
  font-size: var(--font-size-caption);
}

.ui-run-history-menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--space-1) 1px;
  color: var(--text-muted);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.ui-run-history-menu-heading small {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
}

.ui-run-history-menu {
  display: grid;
  gap: 6px;
}

.ui-run-menu-item {
  display: grid;
  gap: var(--space-1);
  padding: 9px 11px;
  background: var(--surface-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-control);
}

.ui-run-menu-item:hover {
  background: var(--surface-shell);
  border-color: var(--line-soft);
}

.ui-run-menu-item.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.ui-run-menu-topline strong {
  color: var(--text-strong);
  font-size: var(--font-size-body);
}

.ui-run-menu-item time,
.ui-run-menu-summary {
  color: var(--text-muted);
  font-size: var(--font-size-caption);
}

.ui-run-details {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  background: var(--surface-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-section);
}

.ui-run-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line-soft);
}

.ui-run-details-title {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ui-run-details-title h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-size-section);
}

.ui-run-details-header time {
  color: var(--text-muted);
  font-size: var(--font-size-caption);
}

.ui-run-details-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: var(--font-size-caption);
}

.ui-run-details-actions > span {
  padding: 5px 7px;
  background: var(--surface-muted);
  border-radius: var(--radius-compact);
}

.ui-run-details-actions strong {
  color: var(--text-strong);
}

.ui-selected-visual-report {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.ui-selected-visual-report > header {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: var(--font-size-body);
}

.ui-selected-technical-log {
  border-top: 1px solid var(--line-soft);
}

.ui-selected-technical-log > summary {
  padding-top: 10px;
  color: var(--text-main);
  font-size: var(--font-size-body);
  font-weight: 700;
  cursor: pointer;
}

.ui-run-step-list {
  display: grid;
  gap: 5px;
  padding-top: var(--space-2);
}

.ui-run-step-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  padding: 7px var(--space-2);
  background: var(--surface-shell);
  border-radius: var(--radius-control);
  font-size: var(--font-size-caption);
  overflow-wrap: anywhere;
}

.ui-run-history-empty {
  padding: 18px;
  color: var(--text-muted);
  text-align: center;
  background: var(--surface-card);
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-control);
}

@media (max-width: 760px) {

  .scenario-workspace-run {
    width: 100%;
    margin-left: 0;
    padding: var(--space-1);
    border-top: 1px solid var(--line-soft);
  }

  .workspace-run-progress {
    flex: 1 1 auto;
  }
}

@container ui-history (max-width: 48rem) {
  .ui-test-history-page-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ui-run-history-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-run-details-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ui-run-details-actions {
    flex-wrap: wrap;
  }
}

@container ui-history (max-width: 30rem) {
  .ui-run-history-menu {
    grid-template-columns: minmax(0, 1fr);
  }
}

.scenario-card.is-return-focus {
    position: relative;
    z-index: 1;
    outline: 2px solid transparent;
    outline-offset: -2px;
    animation: scenario-return-focus 2.8s ease-out;
}

.scenario-card.is-return-focus:focus {
    outline-color: var(--accent);
}

@keyframes scenario-return-focus {
    0%, 30% {
        background: var(--accent-soft);
        border-color: var(--accent);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--shadow-color) 15%, transparent), 0 10px 24px color-mix(in srgb, var(--shadow-color) 12%, transparent);
    }
    100% {
        background: var(--surface-card);
        border-color: var(--line-soft);
        box-shadow: none;
    }
}

/* Shared surface radii applied to legacy theme layers. */

.panel,
.release-modal,
.endpoint-modal,
.section-edit-modal {
    border-radius: var(--radius-surface) !important;
    background-clip: padding-box;
}

/* An opaque child otherwise paints square corners over a rounded parent. */
.panel > :first-child,
.release-modal > :first-child,
.endpoint-modal > :first-child,
.section-edit-modal > :first-child {
    border-top-left-radius: calc(var(--radius-surface) - 1px);
    border-top-right-radius: calc(var(--radius-surface) - 1px);
}

.panel > :last-child,
.release-modal > :last-child,
.endpoint-modal > :last-child,
.section-edit-modal > :last-child {
    border-bottom-right-radius: calc(var(--radius-surface) - 1px);
    border-bottom-left-radius: calc(var(--radius-surface) - 1px);
}

.panel > .table-wrap:first-child,
.panel > .table-wrap:last-child,
.panel > .result-group:first-child,
.panel > .result-group:last-child {
    overflow: auto;
}

.panel-header,
.panel-body,
.test-case-editor-footer,
.version-sidebar-header,
.version-sidebar-footer,
.workflow-target-header,
.scenario-type-header,
.result-group-header,
.release-modal-header,
.release-modal-body,
.release-modal-footer,
.endpoint-modal-header,
.endpoint-modal-toolbar,
.section-edit-modal-header,
.section-edit-modal-body,
.section-edit-modal-footer {
    background-clip: padding-box;
}

.scenario-type-group,
.version-result-group,
.result-group,
.load-report-summary,
.load-finding-group,
.api-detail-panel,
.api-expected-panel,
.api-test-list-panel,
.case-audit-panel,
.ui-layout-tab-panel,
.api-config-section,
.selected-endpoint-card,
.parameter-editor,
.workflow-auth-card,
.runtime-variable-step-group,
.human-step-list,
.scenario-summary-card,
.api-endpoint-inspector,
.ui-visual-editor {
    border-radius: var(--radius-section) !important;
    background-clip: padding-box;
}

.scenario-type-group,
.version-result-group,
.result-group,
.load-report-summary,
.load-finding-group,
.api-test-list-panel,
.case-audit-panel,
.human-step-list,
.runtime-variable-step-group {
    overflow: hidden;
}

.form-control,
input.form-control,
select.form-control,
textarea.form-control,
.button,
button.button,
.icon-button,
.read-control {
    border-radius: var(--radius-control);
}

/* A component can also carry a section class; the panel contract wins. */
.panel {
    border-radius: var(--radius-surface) !important;
}



@media (prefers-reduced-motion: reduce) {
    .scenario-card.is-return-focus {
        animation: none;
        background: var(--accent-soft);
        border-color: var(--accent);
    }
}

/* A test case key is essential context in the editor and must remain visible. */
.content:has(.test-case-editor-marker) > .page-header > div:first-child { display: grid; gap: .28rem; align-items: start; }

.content:has(.test-case-editor-marker) > .page-header h1 {
    max-width: min(760px, 54vw);
}

.page-header-eyebrow {
    display: inline-flex;
    width: max-content;
    align-items: center;
    min-height: 1.55rem;
    padding: .18rem .55rem;
    color: var(--text-main);
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}

.content:has(.test-case-editor-marker) > .page-header p {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 1.7rem;
    margin: 0;
    padding: .2rem .55rem;
    color: var(--text-main);
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}

@media (max-width: 680px) {
    .content:has(.test-case-editor-marker) > .page-header > div:first-child {
        display: grid;
        gap: .2rem;
    }

    .content:has(.test-case-editor-marker) > .page-header h1 { max-width: 55vw; }
    .content:has(.test-case-editor-marker) > .page-header p { width: max-content; min-height: 1.35rem; padding-block: .1rem; font-size: var(--font-size-caption); }
}

/* Create-from-steps is an EditorDialog wizard that returns to the TestCase. */
.automation-wizard-backdrop { z-index: 95; }
.automation-wizard-progress { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-shell); border-bottom: 1px solid var(--line-soft); }
.automation-wizard-progress > span { display: flex; gap: 7px; align-items: center; justify-content: center; min-height: 47px; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; border-bottom: 2px solid transparent; }
.automation-wizard-progress > span strong { display: grid; width: 21px; height: 21px; place-items: center; color: var(--text-muted); background: var(--surface-muted); border-radius: 50%; font-size: var(--font-size-caption); }
.automation-wizard-progress > span.active { color: var(--text-strong); border-bottom-color: var(--accent); }
.automation-wizard-progress > span.active strong { color: var(--text-on-accent); background: var(--accent-solid); }
.automation-wizard-progress > span.complete { color: var(--success); }
.automation-wizard-progress > span.complete strong { color: var(--text-on-accent); background: var(--success-solid); }
.automation-wizard-modal-body { align-content: start; }
.automation-final-preview-summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 13px 15px; color: var(--text-strong); background: var(--accent-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.automation-final-preview-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--accent); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.automation-final-preview-summary > div { display: grid; gap: 2px; min-width: 0; }
.automation-final-preview-summary small, .automation-final-preview-summary span { color: var(--text-muted); font-size: var(--font-size-caption); }
.automation-final-preview-summary strong { overflow: hidden; color: var(--text-strong); font-size: var(--font-size-small); text-overflow: ellipsis; white-space: nowrap; }
.automation-wizard-modal .automation-preview-heading { padding: 11px 14px; border: 1px solid var(--line-soft); border-bottom: 0; border-radius: var(--radius-surface) var(--radius-surface) 0 0; }
.automation-wizard-modal .automation-preview-heading + .automation-wizard-preview { border-radius: 0 0 var(--radius-surface) var(--radius-surface); }
.automation-wizard-complete { display: grid; gap: 10px; justify-items: center; max-width: 760px; margin: 14px auto; text-align: center; }
.automation-wizard-complete-icon { display: grid; width: 48px; height: 48px; place-items: center; color: var(--text-on-accent); background: var(--success-solid); border-radius: 50%; font-size: var(--font-size-heading-small); box-shadow: 0 10px 24px color-mix(in srgb, var(--shadow-color) 19%, transparent); }
.automation-wizard-complete h3 { margin: 2px 0 0; font-size: var(--font-size-heading-small); }
.automation-wizard-complete p { margin: 0; color: var(--text-muted); }
.automation-wizard-result-grid { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 7px; }
.automation-wizard-result-grid > span { display: grid; gap: var(--space-1); padding: 11px; text-align: left; background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.automation-wizard-result-grid small { color: var(--text-muted); font-size: var(--font-size-caption); text-transform: uppercase; }
.automation-wizard-result-grid strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.automation-wizard-next-step { display: grid; width: 100%; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; padding: var(--space-3) 14px; color: var(--text-main); text-align: left; background: var(--surface-muted); border-radius: var(--radius-section); }
.automation-wizard-next-step > i { margin-top: 2px; color: var(--accent); }
.automation-wizard-next-step > div { display: grid; gap: 2px; }
.automation-wizard-next-step span { color: var(--text-muted); font-size: var(--font-size-caption); }

/* Every TestCase tab uses the same content header and body rhythm. */
.test-case-tab-panel {
    overflow: hidden;
}

.test-case-tab-panel > .test-case-tab-header {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 15px 22px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
}

.test-case-tab-header > div:first-child {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
}

.test-case-tab-header h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: var(--font-size-section);
    font-weight: 700;
    line-height: 1.3;
}

.test-case-tab-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    line-height: 1.35;
}

.test-case-tab-header .test-case-step-heading-actions,
.test-case-tab-header .automation-type-actions {
    display: flex;
    flex: 0 0 auto;
    gap: var(--space-2);
    align-items: center;
    justify-content: flex-end;
}

.test-case-tab-header .button {
    min-height: 38px;
    font-size: var(--font-size-caption);
}

.test-case-tab-panel > .panel-body {
    padding: var(--space-5) 22px;
}

.test-case-tab-panel > .panel-body > .test-case-step-editor:first-child {
    margin-top: 0;
}

@media (max-width: 760px) {
    .automation-wizard-progress > span { font-size: var(--font-size-caption); }
    .automation-wizard-result-grid { grid-template-columns: 1fr; }
    .test-case-tab-panel > .test-case-tab-header { align-items: stretch; flex-direction: column; min-height: 0; padding: 14px var(--space-4); }
    .test-case-tab-header .test-case-step-heading-actions,
    .test-case-tab-header .automation-type-actions { justify-content: flex-start; }
    .test-case-tab-panel > .panel-body { padding: var(--space-4); }
}

/* Compact UI test workbench */
.scenario-summary-card {
    gap: 7px var(--space-3);
    padding: 9px var(--space-3) var(--space-2);
}

.scenario-summary-main {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.scenario-summary-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: var(--radius-control);
    font-size: var(--font-size-section);
}

.scenario-summary-title-row h1 {
    font-size: var(--font-size-section);
    line-height: 1.15;
}

.scenario-summary-title-row .soft-pill {
    padding: 3px 7px;
    font-size: var(--font-size-caption);
}

.scenario-summary-main p {
    overflow: hidden;
    max-width: 680px;
    margin-top: 2px;
    font-size: var(--font-size-caption);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scenario-summary-actions {
    align-items: center;
}

.scenario-summary-actions .button {
    min-height: 32px;
    padding: 6px 10px;
}

.scenario-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding-top: 7px;
}

.scenario-summary-meta .summary-meta-item,
.scenario-summary-meta .summary-meta-item:first-child,
.scenario-summary-meta .summary-meta-item.metric,
.scenario-summary-meta .summary-meta-item.result {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    min-height: 0;
    padding: var(--space-1) var(--space-2);
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--surface-muted);
    text-align: left;
}

.scenario-summary-meta .summary-meta-item.endpoint {
    max-width: min(380px, 32vw);
}

.scenario-summary-meta .summary-meta-item.result {
    background: var(--surface-muted);
}

.scenario-summary-meta .summary-meta-item small {
    order: 1;
    margin: 0;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    white-space: nowrap;
}

.scenario-summary-meta .summary-meta-item strong,
.scenario-summary-meta .summary-meta-item.metric strong,
.scenario-summary-meta .summary-meta-item.result strong {
    order: 2;
    overflow: hidden;
    max-width: 240px;
    font-size: var(--font-size-caption);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scenario-summary-meta .status-badge {
    order: 2;
    min-height: 18px;
    padding: 2px 7px;
    font-size: var(--font-size-caption);
}

.ui-test-studio .scenario-summary-title-row { flex-wrap: wrap; overflow-wrap: anywhere; }
.ui-test-studio .scenario-summary-title-row h1 { font-size: var(--font-size-heading-small); }
.ui-test-studio .scenario-summary-meta .summary-meta-item { max-width: 100%; }
.ui-test-studio .scenario-summary-meta .summary-meta-item :is(small, strong, .status-badge),
.ui-test-studio .scenario-summary-main p { font-size: var(--font-size-caption); }

.parameter-editor.ui-layout-parameter-editor,
.scenario-editor-studio .editor-card-parameters > .ui-layout-parameter-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: var(--space-3);
    min-width: 0;
    container: ui-parameters / inline-size;
    padding: 0;
}
@container ui-parameters (max-width: 48rem) {
    .ui-layout-builder-tabs { border: 0; }
    .ui-layout-builder-tabs > button { display: none; }
    .ui-layout-section-picker { display: block; }
}
.ui-layout-workspace-content, .ui-record-list, .ui-record-body, .ui-config-fields {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}
.ui-layout-workspace-content { container: ui-builder / inline-size; }
.picker-session-details { margin: 0; }
.picker-session-details dd code { user-select: all; }
.ui-layout-workspace-content .form-field { min-width: 0; }
.ui-layout-workspace-content :is(.ui-elements-editor-header, .ui-visual-editor-header, .button-row, .ui-layout-check-section, .actions, .selected-endpoint-card) {
    flex-wrap: wrap;
}
.ui-layout-workspace-content :is(.ui-elements-editor-header, .ui-visual-editor-header, .selected-endpoint-card) > div:first-child {
    flex: 1 1 16rem;
    min-width: 0;
    overflow-wrap: anywhere;
}
.ui-layout-workspace-content :is(.button, .api-operation-row, .ui-elements-empty) {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.ui-config-disclosure, .ui-record, .ui-element-tools {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    background: var(--surface-card);
    overflow-wrap: anywhere;
}
:is(.ui-config-disclosure, .ui-record, .ui-element-tools) > summary {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    color: var(--text-strong);
    font-size: var(--font-size-body);
}
:is(.ui-config-disclosure, .ui-record, .ui-element-tools)[open] > summary {
    border-bottom: 1px solid var(--line-soft);
}
.ui-record-heading, .ui-disclosure-title {
    display: inline-grid;
    vertical-align: middle;
    gap: var(--space-1);
    max-width: calc(100% - 2em);
}
.ui-disclosure-title { font-weight: 600; }
.ui-config-disclosure > summary > small { margin-inline-start: var(--space-2); }
.ui-record-body, .ui-config-fields { padding: var(--space-3) var(--space-4); }
.ui-record { container: ui-record / inline-size; }
.ui-record-body > .ui-element-actions { justify-content: end; }
.ui-config-fields, .ui-layout-setup-grid { grid-template-columns: minmax(0, 1fr); }
.ui-layout-workspace-content .checkbox-field {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}
.ui-layout-workspace-content .checkbox-field input { flex-shrink: 0; }
.ui-viewport-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
}
.ui-viewport-card {
    align-items: end;
    grid-template-columns: auto minmax(0, 1fr) minmax(4rem, .55fr) auto minmax(4rem, .55fr) auto;
}
.ui-layout-workspace-content .ui-viewport-card label > span {
    color: var(--text-main);
    font-size: var(--font-size-field);
    letter-spacing: normal;
    text-transform: none;
}
@container ui-builder (max-width: 34rem) {
    .details-grid.picker-session-details { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-1); }
    .picker-session-details dt:not(:first-child) { margin-top: var(--space-1); }
    .ui-elements-editor-header, .ui-visual-editor-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2);
    }
    .ui-layout-workspace-content .button-row { justify-content: start; }
    .ui-viewport-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
    .ui-viewport-card > i, .ui-viewport-times { display: none; }
    .ui-viewport-card label:first-of-type { grid-column: 1 / -1; }
    .ui-config-disclosure > summary > small { display: block; margin: var(--space-1) 0 0 1em; }
}

.ui-steps-editor {
    min-width: 0;
    container: ui-test-steps / inline-size;
}

.ui-step-workspace {
    display: grid;
    grid-template-columns: clamp(15rem, 29%, 23rem) minmax(0, 1fr);
    align-items: start;
    gap: var(--space-3);
}
.ui-step-order .ui-step-order-header {
    flex-wrap: wrap;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
}
.ui-step-order-header > strong {
    flex: 1 1 6rem;
    font-size: var(--font-size-body);
}
.ui-step-order-header .ui-step-capture {
    min-width: var(--control-height);
    padding-inline: var(--space-1);
}
.ui-step-order-rows {
    max-height: clamp(11rem, 60dvh, 48rem);
    overflow-y: auto;
}
.ui-step-order .workflow-step-row {
    align-items: start;
    padding: var(--space-3);
    border-radius: 0;
    font-size: var(--font-size-body);
    overflow-wrap: anywhere;
}
.ui-step-order .workflow-step-row.selected:not(:focus-visible) {
    outline: 0;
    box-shadow: inset 3px 0 var(--accent);
}
.ui-step-order .workflow-step-row:last-child { border-bottom: 0; }
.ui-step-order .ui-step-mobile-picker { display: none; }
.ui-step-order .workflow-step-content { align-self: center; }
.ui-step-order .workflow-step-meta {
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    line-height: 1.4;
    white-space: normal;
}
.ui-step-order .workflow-step-meta > span { white-space: normal; }

.ui-step-inspector {
    min-width: 0;
    container: ui-step-detail / inline-size;
    overflow-wrap: anywhere;
}

.ui-step-inspector-header,
.ui-step-assertion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.ui-step-inspector-header .ui-step-heading {
    display: grid;
    flex: 1 1 11rem;
    min-width: 0;
    gap: var(--space-1);
}
.ui-step-inspector-header > div > strong { font-size: var(--font-size-section); }
.ui-step-inspector .ui-step-number { color: var(--text-muted); }
.ui-step-inspector .ui-element-actions { align-items: center; flex-wrap: wrap; }

.ui-step-tabs { flex-wrap: wrap; padding-inline: 0; }
.ui-step-panel, .ui-step-assertion-card {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}
.ui-step-panel { padding: var(--space-4); }
.ui-step-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: var(--space-3);
    min-width: 0;
}
.ui-step-fields > .full { grid-column: 1 / -1; }
.ui-step-inspector .check-field {
    min-width: 0;
    white-space: normal;
    line-height: 1.5;
}
.ui-step-inspector .check-field > input { flex-shrink: 0; }
.ui-step-assertion-card {
    padding: var(--space-3);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
}
.ui-step-options { border-top: 1px solid var(--line-soft); }
.ui-step-options > summary { padding-inline: 0; }
.ui-step-options[open] > summary { margin-bottom: var(--space-3); }

@container ui-test-steps (max-width: 44rem) {
    .ui-step-workspace { grid-template-columns: minmax(0, 1fr); }
    .ui-step-order-rows, .ui-step-order-header > strong { display: none; }
    .ui-step-order .ui-step-order-header { border-bottom: 0; }
    .ui-step-order .ui-step-mobile-picker {
        display: block;
        flex: 1 1 7rem;
        min-width: 0;
    }
}

@container ui-step-detail (max-width: 34rem) {
    .ui-step-inspector-header .ui-step-heading { flex-basis: 100%; }
}
@container ui-step-detail (max-width: 28rem) {
    .ui-step-fields { grid-template-columns: minmax(0, 1fr); }
}
@container ui-record (max-width: 28rem) {
    .ui-step-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (pointer: coarse) {
    .ui-layout-parameter-editor :is(.button, .ui-element-actions button, .ui-step-tabs button, summary, .check-field, .ui-layout-builder-tabs > button),
    .ui-test-history-page .button {
        min-height: var(--control-height-readable);
    }
    .ui-layout-parameter-editor :is(.ui-element-actions button, .delete-icon-button, .ui-step-capture) {
        min-width: var(--control-height-readable);
        min-height: var(--control-height-readable);
    }
}

.ui-elements-empty.compact { min-height: 4.5rem; padding: var(--space-3); }

@media (max-width: 48rem), (max-height: 34rem) {
    .content:has(.ui-test-studio) {
        overflow: auto;
        scroll-padding-block: var(--space-3);
    }
    .content:has(.ui-test-studio) > .workspace-page > form { flex: none; }
    .scenario-editor-studio.ui-test-studio {
        height: auto;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
    }
    .ui-test-studio > :is(.editor-card-parameters, .ui-test-history-page, .scenario-targets-view) {
        overflow: visible;
    }
    .ui-test-studio .ui-layout-assertion-results { max-height: none; overflow: visible; }
    .ui-test-studio .scenario-workspace-tabs { flex-wrap: wrap; }
    .ui-test-studio > .json-contract-card { height: auto; }
    .ui-test-studio textarea.json-editor.form-control { min-height: 16rem; }
}

@media (max-width: 980px) {
    .scenario-summary-meta .summary-meta-item.endpoint {
        max-width: 100%;
    }
}

@media (max-width: 620px) {
    .scenario-summary-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .scenario-summary-actions {
        grid-row: 3;
    }

    .scenario-summary-meta {
        grid-column: 1;
    }

}

/* Test case catalog follows the same full-width list pattern as the other test pages. */
.test-case-catalog.catalog-mode {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
}

.test-case-catalog.catalog-mode .test-case-tree {
    position: static;
    max-height: none;
}

.test-case-catalog.catalog-mode .test-case-tree > .panel-header {
    padding: 19px 22px 15px;
}

.test-case-catalog.catalog-mode .test-case-tree > .panel-header > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    align-items: baseline;
}

.test-case-catalog.catalog-mode .test-case-tree > .panel-header > div:first-child {
    flex: 0 0 auto;
    min-width: 190px;
}

.test-case-catalog.catalog-mode .test-case-tree > .panel-header h2 {
    font-size: var(--font-size-section);
    white-space: nowrap;
}

.test-case-catalog.catalog-mode .test-case-tree > .panel-header .test-case-tree-caption {
    margin-left: var(--space-1);
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
}
.test-case-catalog.catalog-mode .test-case-tree > .panel-header > .test-case-automation-summary {
    display: flex;
    grid-template-columns: none;
    gap: var(--space-2);
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.test-case-automation-summary > span,
.test-case-automation-status {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 700;
    white-space: nowrap;
}
.test-case-automation-summary > span strong { font-size: var(--font-size-caption); }
.test-case-automation-summary .automated,
.test-case-automation-status.automated { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.test-case-automation-summary .not-automated,
.test-case-automation-status.not-automated { color: var(--text-muted); background: var(--surface-shell); border-color: var(--line-soft); }
.test-case-automation-summary .validation-invalid { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.test-case-automation-summary .validation-valid { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.test-case-automation-summary .automation-type-count { color: var(--accent); background: var(--accent-soft); border-color: var(--line-soft); }
.test-case-automation-cell {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}
.test-case-automation-status strong { font-size: var(--font-size-caption); }
.test-case-automation-breakdown { display: inline-flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.test-case-automation-breakdown > span {
    display: inline-flex;
    min-height: 24px;
    gap: var(--space-1);
    align-items: center;
    padding: 3px 7px;
    border-radius: var(--radius-control);
    color: var(--text-main);
    background: var(--surface-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
    white-space: nowrap;
}
.test-case-automation-breakdown > span i { color: var(--text-main); }
.test-case-automation-breakdown > span strong { color: var(--text-strong); font-size: var(--font-size-caption); }

.test-case-catalog.catalog-mode .test-case-toolbar {
    grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px) auto;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-4) 22px;
    background: var(--surface-card);
}

.test-case-catalog.catalog-mode .test-case-toolbar .form-control {
    width: 100%;
}

.test-case-catalog.catalog-mode .compact-check {
    min-height: 42px;
    padding: 0 var(--space-1);
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
}

.test-case-catalog.catalog-mode .test-case-folder-list {
    container: case-list / inline-size;
    max-height: none;
    padding: 0;
}

.test-case-client-filter { color: var(--text-main); background-color: var(--surface-card); }

.test-case-client-group + .test-case-client-group { border-top: 1px solid var(--line-soft); }

.test-case-client-group-header {
    display: grid;
    grid-template-columns: 22px 18px minmax(0, 1fr) auto;
    gap: var(--space-2);
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 10px 22px;
    color: var(--text-strong);
    text-align: left;
    background: var(--surface-muted);
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    cursor: pointer;
}

.test-case-client-group-header:hover { background: var(--surface-muted); }
.test-case-client-group-header > strong { overflow: hidden; font-size: var(--font-size-small); text-overflow: ellipsis; white-space: nowrap; }
.test-case-client-group-header > span { min-width: 26px; padding: 3px var(--space-2); color: var(--text-main); text-align: center; background: var(--surface-shell); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.test-case-client-group-chevron { color: var(--text-muted); font-size: var(--font-size-caption); }

.test-case-catalog.catalog-mode .test-case-folder-group + .test-case-folder-group {
    border-top: 1px solid var(--line-soft);
}

.test-case-catalog.catalog-mode .test-case-category-header {
    min-height: 44px;
    padding: 9px 22px 9px calc(22px + min(var(--category-depth, 0), 4) * 20px);
    color: var(--text-main);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--line-soft);
}

.test-case-catalog.catalog-mode .test-case-category-node .test-case-category-node > .test-case-category-header {
    background: var(--surface-shell);
}

.test-case-catalog.catalog-mode .test-case-folder-group h3 {
    min-height: 42px;
    margin: 0;
    padding: var(--space-3) 22px;
    color: var(--text-main);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.test-case-catalog.catalog-mode .test-case-nav-item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, .8fr) minmax(0, 1fr);
    grid-template-areas: "identity title automation audit";
    gap: var(--space-3);
    align-items: center;
    min-height: 70px;
    margin: 0;
    padding: 9px 18px 9px calc(18px + min(var(--category-depth, 0), 4) * var(--space-4));
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
}

.test-case-catalog.catalog-mode .test-case-row .test-case-nav-item {
    border-bottom: 0;
}
.test-case-catalog.catalog-mode .test-case-row { border-bottom: 1px solid var(--line-soft); }
.test-case-catalog.catalog-mode .test-case-row:last-child { border-bottom: 0; }

.test-case-catalog.catalog-mode .test-case-nav-item:hover {
    background: var(--surface-shell);
}

.test-case-catalog.catalog-mode .test-case-nav-item.has-validation-error {
    background: var(--surface-shell);
    box-shadow: inset 2px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent);
}

.test-case-catalog.catalog-mode .test-case-nav-item.has-validation-error:hover {
    background: var(--danger-soft);
}

.test-case-catalog.catalog-mode .test-case-nav-item > .test-case-identity-cell {
    grid-area: identity;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.test-case-catalog.catalog-mode .test-case-nav-item > .test-case-identity-cell code {
    color: var(--accent);
    font-size: var(--font-size-caption);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.test-case-catalog.catalog-mode .test-case-nav-item > .test-case-identity-cell .status-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    font-size: var(--font-size-caption);
}

.test-case-catalog.catalog-mode .test-case-nav-item > .test-case-title-cell {
    grid-area: title;
    display: grid;
    gap: 5px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.test-case-catalog.catalog-mode .test-case-nav-item > .test-case-title-cell > strong {
    color: var(--text-strong);
    font-size: var(--font-size-caption);
    font-weight: 700;
    line-height: 1.35;
}

.test-case-row-meta {
    display: flex;
    gap: 5px var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.test-case-row-meta > span {
    display: inline-flex;
    gap: var(--space-1);
    align-items: center;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 600;
    max-width: 100%;
}

.test-case-row-meta i {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.test-case-row-meta > .test-case-step-validation {
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.test-case-row-meta > .test-case-step-validation.invalid {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: var(--danger-line);
}

.test-case-row-meta > .test-case-step-validation.invalid i { color: var(--danger); }

.test-case-row-meta > .test-case-step-validation.valid {
    color: var(--success);
    background: var(--success-soft);
    border-color: var(--success-line);
}

.test-case-row-meta > .test-case-step-validation.valid i { color: var(--success); }

.test-case-catalog.catalog-mode .test-case-audit-meta {
    grid-area: audit;
    justify-self: end;
    overflow-wrap: anywhere;
}
.test-case-audit-meta { display: grid; gap: 2px; min-width: 0; max-width: 100%; justify-items: end; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.25; }
.test-case-author { display: flex; gap: var(--space-1); align-items: baseline; min-width: 0; max-width: 100%; color: var(--text-main); font-size: var(--font-size-caption); white-space: normal; overflow-wrap: anywhere; }
.test-case-author > i { flex: 0 0 1em; }
.test-case-author > span { min-width: 0; }
.test-case-audit-meta > strong { margin-bottom: 2px; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 600; }
.test-case-audit-meta > span { display: grid; grid-template-columns: 10px auto minmax(0, 1fr); gap: 3px; align-items: center; max-width: 100%; }
.test-case-audit-meta i { width: 10px; color: var(--text-muted); text-align: center; }
.test-case-audit-meta time { color: var(--text-main); font-variant-numeric: tabular-nums; }
.test-case-catalog.catalog-mode .test-case-automation-cell { grid-area: automation; min-width: 0; gap: var(--space-1); }
.test-case-catalog.catalog-mode .test-case-automation-status {
    min-height: 24px;
    padding: 3px 7px;
    font-size: var(--font-size-caption);
}
.test-case-catalog.catalog-mode .test-case-automation-status strong { font-size: var(--font-size-caption); }
.test-case-catalog.catalog-mode .test-case-automation-breakdown > span {
    min-height: 21px;
    padding: 2px 6px;
    font-size: var(--font-size-caption);
}

.test-case-catalog.catalog-mode > .test-case-detail {
    display: none;
}

.test-case-catalog.editor-mode {
    grid-template-columns: minmax(0, 1fr);
}

.test-case-catalog.editor-mode > .test-case-tree {
    display: none;
}

.test-case-scope-strip {
    display: flex;
    gap: var(--space-2);
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: -8px;
}

.test-case-scope-item {
    display: grid;
    min-width: 190px;
    gap: 3px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    background: var(--surface-shell);
}

.test-case-scope-item small {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.test-case-scope-item strong {
    display: flex;
    gap: 7px;
    align-items: center;
    color: var(--text-strong);
    font-size: var(--font-size-caption);
}

.test-case-scope-item i {
    color: var(--accent);
    font-size: var(--font-size-caption);
}

/* Diagram-first business test design */
.business-flow-list { display: grid; }
.business-flow-list-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(190px, auto) auto; gap: 14px; align-items: center; padding: 18px var(--space-5); border-top: 1px solid var(--line-soft); }
.business-flow-list-item:first-child { border-top: 0; }
.business-flow-list-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: var(--radius-surface); color: var(--accent); background: var(--accent-soft); }
.business-flow-list-title { display: flex; gap: 10px; align-items: center; }
.business-flow-list-title code { color: var(--text-muted); font-size: var(--font-size-caption); }
.business-flow-list-item p { margin: 5px 0; color: var(--text-main); }
.business-flow-list-item small { color: var(--text-muted); }
.business-flow-audit-meta { justify-self: end; }

.business-flow-editor-marker { display: none; }
.workspace-page:has(> .has-flow-workspace) {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
}
.workspace-page:has(> .business-flow-editor-grid:not([hidden])) {
    height: 100%;
    overflow: hidden;
}
.workspace-page:has(> .has-flow-workspace) > .breadcrumbs { display: none; }
.workspace-page:has(> .has-flow-workspace) > :is(.business-flow-definition, .business-flow-transitions, .business-flow-preview) { margin: var(--space-3); }
.business-flow-editor-grid {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
}
.business-flow-editor-grid[hidden] { display: none; }
.business-flow-workspace { min-width: 0; min-height: 0; }
.business-flow-canvas > svg {
    --diagram-caption-size: .6875rem;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    cursor: grab;
    touch-action: none;
    user-select: none;
    background-color: var(--surface-shell);
    background-image: radial-gradient(color-mix(in srgb, var(--line-strong) 55%, transparent) 1px, transparent 1px);
    background-size: 20px 20px;
}
.business-flow-canvas > svg.panning { cursor: grabbing; }
.business-flow-canvas > svg.is-overview .business-flow-node { cursor: zoom-in; }
.business-flow-canvas > svg.is-overview :is(.business-flow-edge-hit, .business-flow-edge-label-wrapper) { cursor: grab; }
.business-flow-canvas > svg.is-overview :is(.business-flow-connector, .business-flow-edge-endpoint) { visibility: hidden; }
.business-flow-canvas > svg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.business-flow-edge { fill: none; pointer-events: none; stroke: var(--accent); stroke-width: 1; }
.business-flow-edge-hit { fill: none; cursor: pointer; stroke: transparent; stroke-width: 14; }
.business-flow-edge.selected { stroke-width: 1.8; filter: drop-shadow(0 1px 2px #176da544); }
.business-flow-edge.default { stroke-dasharray: 5 4; }
.business-flow-arrow-head { fill: var(--accent-solid); }
.business-flow-edge-label-wrapper { cursor: pointer; overflow: visible; }
.business-flow-edge-label { overflow: hidden; width: fit-content; max-width: 132px; margin: 2px auto; padding: 2px 5px; border: .75px solid var(--line-soft); border-radius: var(--radius-compact); color: var(--text-main); background: var(--surface-card); font-size: var(--diagram-caption-size); line-height: 1.25; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.business-flow-edge-label.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.business-flow-connection-preview { fill: none; pointer-events: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; }
.business-flow-endpoint-preview { fill: none; pointer-events: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.business-flow-edge-endpoint { fill: var(--surface-card); stroke: var(--accent); stroke-width: 2.5; cursor: move; filter: drop-shadow(0 1px 2px #173b5533); transition: r .12s ease, fill .12s ease; }
.business-flow-edge-endpoint:hover { fill: var(--accent-soft); r: 10; }
.business-flow-canvas svg.moving-endpoint .business-flow-edge-endpoint { pointer-events: none; }
.business-flow-node { cursor: grab; }
.business-flow-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.business-flow-connector { cursor: crosshair; opacity: 0; transition: opacity .14s ease; }
.business-flow-connector-hit { pointer-events: all; }
.business-flow-connector-dot { pointer-events: none; transition: fill .14s ease, r .14s ease; }
.business-flow-node:hover .business-flow-connector, .business-flow-node.selected .business-flow-connector { opacity: 1; }
.business-flow-canvas svg.connecting .business-flow-connector { opacity: .4; }
.business-flow-connector:hover { opacity: 1 !important; }
.business-flow-connector:hover .business-flow-connector-dot { fill: var(--accent-solid); r: 4; }
.business-flow-node.connection-target rect, .business-flow-node.connection-target path { stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 0 5px #2386bd55); }
.business-flow-node.dragging, .business-flow-canvas svg.dragging .business-flow-node.dragging { cursor: grabbing; }
.business-flow-node rect, .business-flow-node path { fill: var(--surface-card); stroke: var(--accent); stroke-width: 1; transition: stroke .15s ease, filter .15s ease; }
.business-flow-node.node-start rect { fill: var(--success-soft); stroke: var(--success-line); }
.business-flow-node.node-end rect { fill: var(--accent-solid); stroke: var(--accent); }
.business-flow-node.node-decision path { fill: var(--warning-soft); stroke: var(--warning-line); }
.business-flow-node.node-outcome rect { fill: var(--surface-shell); stroke: var(--accent); }
.business-flow-node.node-apirequest rect { fill: var(--accent-soft); stroke: var(--accent); }
.business-flow-node.node-uiverification rect { fill: var(--surface-shell); stroke: var(--violet-line); }
.business-flow-node.selected rect, .business-flow-node.selected path { stroke: var(--accent); stroke-width: 1.8; filter: drop-shadow(0 3px 5px #1f3d5a2d); }
.business-flow-node.invalid rect, .business-flow-node.invalid > path { stroke: var(--danger-line) !important; stroke-width: 2 !important; filter: drop-shadow(0 0 5px #c7434f66); }
.business-flow-live-validation { display: grid; gap: 5px; margin: var(--space-2) 18px; padding: var(--space-2) 11px; }
.business-flow-validation-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.business-flow-validation-heading > i { font-size: var(--font-size-section); }
.business-flow-validation-heading > div { display: grid; gap: 2px; }
.business-flow-validation-heading span { color: var(--danger); font-size: var(--font-size-caption); line-height: 1.3; }
.business-flow-validation-list { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--danger-line); }
.business-flow-validation-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 7px 9px; border-radius: var(--radius-control); background: var(--surface-card); }
.business-flow-validation-item > div { display: grid; gap: 3px; }
.business-flow-validation-item strong { font-size: var(--font-size-caption); }
.business-flow-validation-item small { color: var(--danger); line-height: 1.35; }
.business-flow-validation-item small b { color: var(--danger); }
.business-flow-validation-more { padding: 0 0 0 var(--space-6); }
.business-flow-validation-more summary { width: fit-content; color: var(--danger); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; }
.business-flow-validation-more[open] { display: grid; gap: var(--space-1); }
.business-flow-validation-more[open] summary { margin-bottom: 3px; }
.business-flow-issues-list { min-height: 0; overflow: auto; padding: 5px; }
.business-flow-issue-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-2); align-items: start; width: 100%; padding: 9px; border: 0; border-radius: var(--radius-control); color: var(--text-strong); background: transparent; text-align: left; cursor: pointer; }
.business-flow-issue-row:hover, .business-flow-issue-row:focus-visible { background: var(--danger-soft); outline: none; }
.business-flow-issue-row > i { margin-top: 2px; color: var(--danger); text-align: center; }
.business-flow-issue-row > span { display: grid; gap: 3px; }
.business-flow-issue-row strong { font-size: var(--font-size-caption); line-height: 1.35; }
.business-flow-issue-row small { color: var(--danger); font-size: var(--font-size-caption); line-height: 1.35; }
.business-flow-node.coverage-passed rect, .business-flow-node.coverage-passed > path { filter: drop-shadow(0 0 5px #3f9b5480); }
.business-flow-node.coverage-failed rect, .business-flow-node.coverage-failed > path { filter: drop-shadow(0 0 6px #c7434f99); }
.business-flow-node-label { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; color: var(--text-strong); line-height: 1.2; text-align: center; pointer-events: none; }
.node-end .business-flow-node-label { color: var(--text-on-accent); }
.business-flow-node-label strong {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
    font-size: var(--font-size-field-compact);
    font-weight: 600;
    line-height: 1.15;
}
.business-flow-node-label small { margin-top: 1px; color: var(--text-muted); font-size: var(--diagram-caption-size); line-height: 1.1; }
.node-end .business-flow-node-label small { color: var(--accent); }
.node-end.custom-appearance .business-flow-node-label { color: var(--text-strong); }
.node-end.custom-appearance .business-flow-node-label small { color: var(--text-muted); }
.business-flow-inspector { position: sticky; top: 16px; min-width: 0; max-height: calc(100dvh - 32px); overflow: hidden; }
.business-flow-inspector .panel-body.stack { display: grid; grid-template-columns: minmax(0, 1fr); max-height: calc(100dvh - 116px); gap: var(--space-3); overflow-x: hidden; overflow-y: auto; align-items: end; padding: 15px; }
.business-flow-inspector .form-field,
.business-flow-inspector .form-control { min-width: 0; max-width: 100%; }
.business-flow-inspector .panel-body.stack > .button { align-self: end; justify-self: start; }
.business-flow-inspector-primary,
.business-flow-inspector-fields { display: grid; min-width: 0; gap: 11px; }
.business-flow-field-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: var(--space-2); color: var(--text-main); font-size: var(--font-size-small); font-weight: 600; }
.business-flow-field-help { position: relative; flex: 0 0 auto; }
.business-flow-field-help > summary { display: inline-grid; width: 20px; height: 20px; padding: 0; place-items: center; border: 1px solid var(--line-soft); border-radius: 50%; color: var(--accent); background: var(--surface-shell); font-size: var(--font-size-caption); cursor: pointer; list-style: none; }
.business-flow-field-help > summary::-webkit-details-marker { display: none; }
.business-flow-field-help > summary:hover,
.business-flow-field-help > summary:focus-visible,
.business-flow-field-help[open] > summary { border-color: var(--accent); color: var(--text-on-accent); background: var(--accent-solid); outline: none; }
.business-flow-field-help > summary:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--shadow-color) 14%, transparent); }
.business-flow-field-help-popover { position: absolute; z-index: 25; top: 27px; right: 0; display: grid; width: min(440px, calc(100vw - 80px)); gap: 7px; padding: 14px 15px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); color: var(--text-strong); background: var(--surface-card); box-shadow: 0 14px 34px color-mix(in srgb, var(--shadow-color) 17%, transparent); font-size: var(--font-size-caption); font-weight: 400; line-height: 1.45; }
.business-flow-field-help-popover strong { color: var(--text-strong); font-size: var(--font-size-caption); }
.business-flow-field-help-popover p { margin: 0; }
.business-flow-field-help-popover ul { display: grid; gap: 3px; margin: 0; padding-left: 18px; }
.business-flow-field-help-popover code { padding: 1px var(--space-1); border-radius: var(--radius-compact); color: var(--accent); background: var(--accent-soft); font-size: var(--font-size-dense); }
.business-flow-template-options { display: flex; flex-wrap: wrap; gap: 5px; }
.business-flow-field-help-warning { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 7px; margin-top: 3px !important; padding: var(--space-2) 9px; border-radius: var(--radius-control); color: var(--warning); background: var(--warning-soft); }
.business-flow-field-help-warning > i { margin-top: 2px; color: var(--warning); }
.business-flow-connection-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--space-2); align-items: center; padding: 10px var(--space-3); border-radius: var(--radius-control); color: var(--text-main); background: var(--surface-muted); font-size: var(--font-size-caption); }
.business-flow-connection-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-flow-connection-summary i { color: var(--accent); }
.business-flow-inspector-section { display: grid; gap: 10px; margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.business-flow-disclosure { display: block; padding-top: 0; }
.business-flow-disclosure > summary { display: flex; gap: var(--space-2); align-items: center; justify-content: space-between; padding: var(--space-3) 0 var(--space-2); color: var(--text-main); font-size: var(--font-size-caption); font-weight: 700; cursor: pointer; list-style: none; }
.business-flow-disclosure > summary::-webkit-details-marker { display: none; }
.business-flow-disclosure > summary::after { content: "\f078"; color: var(--text-muted); font: 900 10px/1 "Font Awesome 6 Free"; transition: transform .15s ease; }
.business-flow-disclosure[open] > summary::after { transform: rotate(180deg); }
.business-flow-disclosure > summary small { margin-left: auto; color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 600; }
.business-flow-disclosure > .business-flow-appearance-grid,
.business-flow-disclosure > .form-field { margin-top: 3px; padding-bottom: var(--space-1); }
.business-flow-appearance-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.business-flow-color-control { display: grid; grid-template-columns: 42px minmax(0, 1fr) 34px; gap: 7px; align-items: center; }
.business-flow-color-control input[type="color"] { width: 42px; height: 38px; padding: 3px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface-card); cursor: pointer; }
.business-flow-color-control code { overflow: hidden; color: var(--text-main); font-size: var(--font-size-dense); text-overflow: ellipsis; }
.business-flow-color-control .icon-button { width: 34px; height: 34px; }
.business-flow-anchor-values { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.business-flow-line-preview-picker { display: grid; gap: 7px; }
.business-flow-line-preview-picker.compact { gap: 0; }
.business-flow-line-preview-group { display: grid; gap: 3px; }
.business-flow-line-preview-picker.compact .business-flow-line-preview-group { padding: 6px 9px; border-bottom: 1px solid var(--line-soft); }
.business-flow-line-preview-group > strong { color: var(--text-main); font-size: var(--font-size-caption); text-transform: uppercase; letter-spacing: .05em; }
.business-flow-visual-choices { display: grid; gap: var(--space-1); }
.business-flow-visual-choices.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.business-flow-visual-choices.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.business-flow-context-menu .business-flow-visual-choices button,
.business-flow-visual-choices button { display: flex; min-width: 0; min-height: 30px; flex-direction: column; gap: 0; align-items: center; justify-content: center; padding: 2px; border: 1px solid var(--line-soft); border-radius: var(--radius-compact); color: var(--text-muted); background: var(--surface-card); cursor: pointer; }
.business-flow-context-menu .business-flow-visual-choices button:hover,
.business-flow-visual-choices button:hover { border-color: var(--line-soft); background: var(--surface-shell); }
.business-flow-context-menu .business-flow-visual-choices button.active,
.business-flow-visual-choices button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shadow-color) 12%, transparent); }
.business-flow-visual-choices button svg { display: block; width: 100%; max-width: 44px; height: 15px; overflow: visible; }
.business-flow-visual-choices button svg path { fill: none; stroke: var(--line-preview-color); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.business-flow-visual-choices button svg .arrow-head { fill: var(--line-preview-color); stroke: none; }
.business-flow-visual-choices button span { overflow: hidden; max-width: 100%; font-size: var(--font-size-caption); line-height: 9px; text-overflow: ellipsis; white-space: nowrap; }
.business-flow-line-preview-picker.compact .business-flow-visual-choices button { min-height: 28px; }
.business-flow-field-wide { grid-column: 1 / -1; }
.business-flow-inspector .selected-endpoint-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); min-width: 0; padding: 11px var(--space-3); border-radius: var(--radius-section); }
.business-flow-inspector .selected-endpoint-card > div { min-width: 0; }
.business-flow-inspector .selected-endpoint-card h4 { display: block; overflow: hidden; margin: 3px 0 var(--space-1); font-size: var(--font-size-small); line-height: 1.35; overflow-wrap: anywhere; }
.business-flow-inspector .selected-endpoint-card small { overflow: hidden; margin-top: 0; font-size: var(--font-size-dense); text-overflow: ellipsis; white-space: nowrap; }
.business-flow-inspector .selected-endpoint-card .button { align-self: start; padding-inline: 10px; }
.business-flow-context-menu { position: absolute; z-index: 30; display: grid; width: 284px; overflow: hidden; padding: 7px; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); box-shadow: 0 18px 48px color-mix(in srgb, var(--shadow-color) 19%, transparent); }
.business-flow-context-menu header { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 10px; border-bottom: 1px solid var(--line-soft); }
.business-flow-context-menu header span { color: var(--text-strong); font-size: var(--font-size-small); font-weight: 700; }
.business-flow-context-menu header small { color: var(--text-muted); font-size: var(--font-size-caption); text-transform: uppercase; letter-spacing: .06em; }
.business-flow-context-menu button { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-2); align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-control); color: var(--text-strong); background: transparent; text-align: left; cursor: pointer; }
.business-flow-context-menu button:hover, .business-flow-context-menu button:focus-visible { background: var(--accent-soft); outline: none; }
.business-flow-context-menu button > i { color: var(--accent); text-align: center; }
.business-flow-context-menu button > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.business-flow-context-menu button strong { font-size: var(--font-size-caption); }
.business-flow-context-menu button small { overflow: hidden; color: var(--text-muted); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.business-flow-context-menu.object-menu { width: 260px; }
.business-flow-menu-section { display: grid; gap: 6px; padding: var(--space-2) 9px; border-bottom: 1px solid var(--line-soft); }
.business-flow-menu-section > strong { color: var(--text-main); font-size: var(--font-size-caption); text-transform: uppercase; letter-spacing: .06em; }
.business-flow-color-picker { display: flex; gap: 7px; align-items: center; }
.business-flow-context-menu .color-swatch { display: block; width: 18px; height: 18px; padding: 0; border: 2px solid var(--line-soft); border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--swatch-border); }
.business-flow-context-menu .color-swatch:hover, .business-flow-context-menu .color-swatch:focus-visible { background: var(--swatch); box-shadow: 0 0 0 2px var(--swatch-border); }
.business-flow-context-menu .color-swatch.active { box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 100%, transparent), 0 0 0 4px var(--swatch-border); }
.business-flow-choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; }
.business-flow-context-menu .business-flow-choice-row button { display: block; padding: 7px 5px; border: 1px solid var(--line-soft); color: var(--text-main); background: var(--surface-card); font-size: var(--font-size-caption); text-align: center; }
.business-flow-context-menu .business-flow-choice-row button:hover { background: var(--surface-muted); }
.business-flow-context-menu .business-flow-choice-row button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.business-flow-context-menu button.menu-danger { margin-top: 5px; color: var(--danger); }
.business-flow-context-menu button.menu-danger > i { color: var(--danger); }
.business-flow-definition, .business-flow-transitions, .business-flow-preview { margin-top: 0; }
.business-flow-history { display: grid; gap: var(--space-2); padding-top: 14px; border-top: 1px solid var(--line-soft); }
.business-flow-history-row { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; padding: 10px var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface-shell); }
.business-flow-history-row > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.business-flow-history-row small { color: var(--text-muted); }
.business-flow-transition-list { display: grid; gap: 10px; }
.business-flow-routing-actions { display: flex; gap: 10px; align-items: end; }
.business-flow-routing-source { display: grid; gap: var(--space-1); color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; }
.business-flow-routing-source .form-control.compact { width: 190px; min-height: 32px; padding-block: 5px; }
.business-flow-transition-help { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; padding: 10px var(--space-3); color: var(--text-main); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-control); font-size: var(--font-size-caption); }
.business-flow-transition-help > i { color: var(--accent); }
.business-flow-transition-row { display: grid; grid-template-columns: minmax(180px, .8fr) 18px minmax(210px, 1fr) minmax(210px, 1fr) 120px 36px; gap: 10px; align-items: end; padding: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.business-flow-transition-row.direct-transition { grid-template-columns: minmax(180px, .8fr) 18px minmax(210px, 1fr) 140px 36px; }
.business-flow-transition-source { display: grid; min-width: 0; gap: 3px; padding: 7px 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface-shell); }
.business-flow-transition-source small { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.business-flow-transition-source strong { overflow: hidden; color: var(--text-strong); font-size: var(--font-size-caption); text-overflow: ellipsis; white-space: nowrap; }
.business-flow-transition-arrow { align-self: center; color: var(--text-muted); font-size: var(--font-size-caption); }
.business-flow-transition-field { display: grid; min-width: 0; gap: var(--space-1); color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.business-flow-transition-field .form-control { min-width: 0; text-transform: none; letter-spacing: normal; }
.business-flow-fallback-check { align-self: center; min-height: 38px; }
.business-flow-direct-pill { align-self: center; justify-self: start; padding: 6px 9px; color: var(--text-muted); background: var(--surface-muted); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.business-flow-preview { container-type: inline-size; }
.business-flow-preview .panel-header { flex-wrap: wrap; gap: var(--space-2); }
.business-flow-preview .panel-header small { display: block; margin-top: var(--space-1); color: var(--text-muted); }
.generated-path-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.generated-path-card {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    background: var(--surface-card);
    overflow-wrap: anywhere;
}
.generated-path-card > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
    padding: var(--space-2) var(--space-4);
    border-radius: inherit;
    cursor: pointer;
    list-style: none;
}
.generated-path-card > summary::-webkit-details-marker { display: none; }
.generated-path-card > summary:hover { background: var(--surface-muted); }
.generated-path-card > summary > i { color: var(--text-muted); font-size: var(--font-size-caption); }
.generated-path-card[open] > summary {
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    background: var(--accent-soft);
}
.generated-path-card[open] > summary > i { color: var(--accent); transform: rotate(90deg); }
.generated-path-route { color: var(--text-strong); font-size: var(--font-size-body); }
.generated-path-meta, .generated-path-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
    min-width: 0; color: var(--text-muted); font-size: var(--font-size-caption);
}
.generated-path-meta > span:first-child { font-variant-numeric: tabular-nums; }
.generated-path-detail {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3);
    padding: var(--space-4); border-top: 1px solid var(--line-soft);
}
.generated-path-detail h3 { margin: 0; color: var(--text-strong); font-size: var(--font-size-body); }
.generated-path-steps { table-layout: fixed; font-size: var(--font-size-body); }
.generated-path-steps :is(th, td) { padding: var(--space-2) var(--space-3); text-align: start; white-space: normal; }
.generated-path-steps thead th { font-size: var(--font-size-caption); text-transform: none; letter-spacing: normal; }
.generated-path-steps thead th:first-child { width: 4rem; }
.generated-path-steps tbody th { background: transparent; font-variant-numeric: tabular-nums; }
.generated-path-steps tbody tr:last-child th { border-bottom: 0; }
.generated-path-steps td { color: var(--text-main); }
.generated-path-result-label { display: none; }
.generated-path-actions { padding-top: var(--space-2); border-top: 1px solid var(--line-soft); }
.generated-path-actions button { margin-inline-start: auto; }
@container (max-width: 46rem) {
    .generated-path-card > summary {
        grid-template-columns: auto minmax(0, 1fr);
        gap: var(--space-1) var(--space-2);
        padding: var(--space-3);
    }
    .generated-path-meta { grid-column: 2; }
    .generated-path-detail { padding: var(--space-3); }
    .generated-path-steps thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .generated-path-steps, .generated-path-steps tbody { display: block; }
    .generated-path-steps tbody tr {
        display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-2);
        padding-block: var(--space-2); border-top: 1px solid var(--line-soft);
    }
    .generated-path-steps tbody :is(th, td) { padding: 0; border: 0; }
    .generated-path-steps tbody th { grid-row: span 2; }
    .generated-path-result-label { display: block; color: var(--text-muted); font-size: var(--font-size-caption); }
}

@media (min-width: 1101px) {
    .business-flow-inspector { position: static; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; height: 100%; max-height: none; }
    .business-flow-inspector .panel-body.stack { min-height: 0; height: auto; max-height: none; gap: 11px; overflow: auto; padding: 14px 15px; align-content: start; overscroll-behavior: contain; }
}

@media (max-width: 1100px) {
    .business-flow-editor-grid { grid-template-columns: 1fr; }
    .business-flow-inspector { position: static; }
    .business-flow-inspector .panel-body.stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .business-flow-inspector, .business-flow-inspector .panel-body.stack { max-height: none; overflow: visible; }
    .business-flow-transition-row { grid-template-columns: 1fr; }
    .business-flow-transition-row.direct-transition { grid-template-columns: 1fr; }
    .business-flow-transition-arrow { display: none; }
    .business-flow-routing-actions { align-items: stretch; flex-direction: column; }
    .business-flow-routing-source .form-control.compact { width: 100%; }
}

/* Business-flow settings use a roomy EditorDialog so the canvas never gets compressed. The endpoint picker opens above it. */
.business-flow-settings-modal.business-flow-inspector {
    position: relative;
    top: auto;
    width: min(900px, 100%);
    min-width: 0;
    max-height: min(860px, calc(100dvh - 48px));
    grid-template-rows: auto minmax(0, 1fr) auto;
}
.business-flow-settings-tabs { grid-column: 1 / -1; }
.business-flow-settings-modal.business-flow-inspector .panel-body.stack {
    min-height: 0;
    height: auto;
    max-height: none;
    gap: 15px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--space-5) 22px var(--space-6);
    align-content: start;
}
.business-flow-settings-modal .business-flow-inspector-primary {
    grid-template-columns: minmax(170px, .36fr) minmax(0, 1fr);
}
.business-flow-settings-modal .business-flow-inspector-fields {
    grid-template-columns: minmax(150px, .3fr) minmax(0, 1fr);
}
.business-flow-settings-modal .business-flow-inspector-fields > :last-child { grid-column: 1 / -1; }
.business-flow-settings-modal .business-flow-appearance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.business-flow-settings-tab-intro {
    display: flex;
    gap: var(--space-5);
    align-items: end;
    justify-content: space-between;
    padding-bottom: 2px;
}
.business-flow-settings-tab-intro h3 { margin: 3px 0 0; font-size: var(--font-size-section); }
.business-flow-settings-tab-intro > small { max-width: 360px; color: var(--text-muted); text-align: right; }
.business-flow-settings-modal .selected-endpoint-card { padding: 14px var(--space-4); }
.business-flow-settings-modal .selected-endpoint-card h4 { font-size: var(--font-size-section); }
.business-flow-settings-modal .business-flow-disclosure textarea.code { min-height: 210px; resize: vertical; }


@media (max-width: 680px) {
    .business-flow-settings-modal.business-flow-inspector { max-height: calc(100dvh - 16px); }
    .business-flow-settings-modal.business-flow-inspector .panel-body.stack { padding-inline: 14px; }
    .business-flow-settings-modal .business-flow-inspector-primary,
    .business-flow-settings-modal .business-flow-inspector-fields,
    .business-flow-settings-modal .business-flow-appearance-grid { grid-template-columns: 1fr; }
    .business-flow-settings-modal .business-flow-inspector-fields > :last-child { grid-column: auto; }
    .business-flow-settings-tab-intro { align-items: flex-start; flex-direction: column; gap: 6px; }
    .business-flow-settings-tab-intro > small { text-align: left; }
    .business-flow-field-help-popover { position: fixed; top: 72px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 96px); overflow: auto; }
}


@media (max-width: 680px) {
    .business-flow-list-item { grid-template-columns: 42px minmax(0, 1fr); }
    .business-flow-list-item > .business-flow-audit-meta { grid-column: 2; justify-self: start; justify-items: start; }
    .business-flow-list-item > :is(.button, .grid-action-icon) { grid-column: 2; justify-self: start; }
    .business-flow-inspector .panel-body.stack { grid-template-columns: 1fr; }
}

.business-flow-workspace:has([data-view-action="expand"][aria-pressed="true"]) {
    position: fixed;
    z-index: 30;
    inset: 0;
}
body:has(.business-flow-editor-grid:not([hidden]) [data-view-action="expand"][aria-pressed="true"]) :is(.app-shell > .sidebar, .app-shell > .skip-link, .page-shell > .topbar, .business-flow-pagebar) { display: none; }

@media (max-width: 760px) {
    .test-case-catalog.catalog-mode .test-case-toolbar {
        grid-template-columns: 1fr;
    }

    .test-case-catalog.catalog-mode .test-case-tree > .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@container case-list (max-width: 60rem) {
    .test-case-catalog.catalog-mode .test-case-nav-item {
        grid-template-columns: minmax(0, 1fr) minmax(0, 11rem);
        grid-template-areas: "identity audit" "title audit" "automation audit";
        gap: var(--space-1) var(--space-3);
        padding-inline: calc(var(--space-3) + min(var(--category-depth, 0), 3) * var(--space-2)) var(--space-3);
    }
}

@container case-list (max-width: 34rem) {
    .test-case-catalog.catalog-mode .test-case-category-header {
        gap: var(--space-1);
        padding-inline: calc(var(--space-3) + min(var(--category-depth, 0), 2) * var(--space-2)) var(--space-3);
    }

    /* Category actions take their own row under the name, so a narrow list keeps the name readable. */
    .test-case-catalog.catalog-mode .test-case-category-header > .actions { grid-column: 3 / -1; }

    .test-case-catalog.catalog-mode .test-case-nav-item {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "identity" "title" "automation" "audit";
        row-gap: var(--space-2);
    }

    .test-case-catalog.catalog-mode .test-case-audit-meta {
        justify-self: start;
        justify-items: start;
    }
}

/* Unified contract for compact system actions: close, reset, expand, refresh, and similar controls. */
.app-shell button.icon-button:not(.delete-icon-button) {
    appearance: none;
    display: inline-grid;
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    place-items: center;
    color: var(--text-main);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-compact, 8px);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-color) 5%, transparent);
    font-size: var(--font-size-small);
    line-height: 1;
    cursor: pointer;
    transition: color .14s ease, background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .08s ease;
}

.app-shell button.icon-button:not(.delete-icon-button):hover:not(:disabled) {
    color: var(--text-strong);
    background: var(--surface-muted);
    border-color: var(--line-soft);
    box-shadow: 0 2px 5px color-mix(in srgb, var(--shadow-color) 8%, transparent);
}

.app-shell button.icon-button:not(.delete-icon-button):active:not(:disabled) {
    transform: translateY(1px);
    background: var(--surface-muted);
    box-shadow: none;
}

.app-shell button.icon-button:not(.delete-icon-button):focus-visible {
    border-color: var(--accent);
    outline: 3px solid color-mix(in srgb, var(--accent) 14%, transparent);
    outline-offset: 2px;
}

.app-shell button.icon-button:not(.delete-icon-button):disabled {
    opacity: .45;
    cursor: not-allowed;
}

.app-shell button.icon-button:not(.delete-icon-button) > i,
.app-shell button.icon-button:not(.delete-icon-button) > svg {
    pointer-events: none;
}

/* One project-wide control for icon-only destructive actions. */
.delete-icon-button.delete-icon-button {
    display: inline-grid;
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    place-items: center;
    align-self: center;
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-control, 8px);
    box-shadow: none;
    font-size: var(--font-size-small);
    line-height: 1;
    cursor: pointer;
}

.delete-icon-button.delete-icon-button:hover:not(:disabled) {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: var(--danger-line);
}

.delete-icon-button.delete-icon-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--danger-line) 19%, transparent);
    outline-offset: 2px;
}

.delete-icon-button.delete-icon-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* UnsavedChangesIndicator: the status region stays mounted for screen readers;
   while empty it is taken out of flex and grid rows so it adds no gap. */
.unsaved-changes-indicator { display: inline-flex; align-items: center; min-width: 0; }
.unsaved-changes-indicator:empty { position: absolute; }
.release-modal-footer > .unsaved-changes-indicator { margin-inline-end: auto; }
.test-case-source-card {
    display: grid;
    gap: .3rem;
    margin: .8rem 0;
    padding: .85rem var(--space-4);
    border: 1px solid var(--border-color, var(--line-soft));
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-section);
    background: var(--surface-shell);
}

.test-case-source-card strong { color: var(--accent); }
.test-case-source-card small { color: var(--muted, var(--text-muted)); }

.testrail-import-layout {
    display: grid;
    gap: var(--space-4);
}

.testrail-import-hub {
    display: grid;
    gap: var(--space-4);
}

.import-launch-panel {
    display: grid;
    grid-template-columns: minmax(20rem, 1.4fr) minmax(13rem, .7fr) auto;
    gap: var(--space-5);
    align-items: center;
    padding: 1.15rem var(--space-5);
    overflow: hidden;
}

.import-launch-copy {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
}

.import-launch-copy > div { display: grid; gap: .18rem; }
.import-launch-copy h2 { margin: 0; }
.import-launch-copy p { max-width: 43rem; margin: .15rem 0 0; color: var(--muted, var(--text-muted)); }
.import-launch-icon {
    display: grid;
    flex: 0 0 2.75rem;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--accent, var(--text-strong));
    background: var(--surface-muted);
    border-radius: var(--radius-surface);
    font-size: var(--font-size-section);
}

.import-launch-destination {
    display: grid;
    gap: .15rem;
    padding-left: var(--space-5);
    border-left: 1px solid var(--border-color, var(--line-soft));
}

.import-launch-destination > span {
    color: var(--muted, var(--text-muted));
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.import-launch-destination strong { color: var(--text-strong); }
.import-launch-destination small { color: var(--muted, var(--text-muted)); }
.import-launch-action { display: flex; justify-content: flex-end; }
.import-launch-action .button { white-space: nowrap; }

.import-history-panel { overflow: hidden; }
.import-history-header { align-items: center; }
.import-history-header > div { display: grid; gap: .15rem; }
.import-history-header h2 { margin: 0; }
.import-history-header small { color: var(--muted, var(--text-muted)); }
.import-history-table td { vertical-align: middle; }
.import-history-table td:nth-child(1),
.import-history-table td:nth-child(2),
.import-history-table td:nth-child(3),
.import-history-table td:nth-child(5) { display: table-cell; }
.import-history-table td strong,
.import-history-table td small { display: block; }
.import-history-table td small { margin-top: .18rem; color: var(--muted, var(--text-muted)); }
.import-history-table td:last-child { width: 1%; text-align: right; }
.import-history-table td:last-child .button { gap: .45rem; white-space: nowrap; }
.import-history-table .import-history-error { max-width: 21rem; color: var(--danger); }

.import-progress {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0 0 var(--space-4);
    padding: var(--space-1) .35rem;
}

.import-progress > div {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    color: var(--text-muted);
}

.import-progress > div > span {
    display: grid;
    flex: 0 0 1.85rem;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    color: var(--text-muted);
    background: var(--surface-muted);
    border-radius: 50%;
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.import-progress > div > div { display: grid; line-height: 1.2; }
.import-progress strong { color: inherit; font-size: var(--font-size-small); }
.import-progress small { font-size: var(--font-size-caption); }
.import-progress > i { color: var(--text-muted); font-size: var(--font-size-caption); }
.import-progress > div.active { color: var(--accent, var(--text-strong)); }
.import-progress > div.active > span { color: var(--text-on-accent); background: var(--accent, var(--accent-solid)); box-shadow: 0 4px 12px color-mix(in srgb, var(--shadow-color) 15%, transparent); }
.import-progress > div.complete { color: var(--success); }
.import-progress > div.complete > span { color: var(--success); background: var(--success-soft); }

.import-scope-card { overflow: hidden; }
.import-scope-header { min-height: 4.6rem; padding-block: .85rem; }
.import-scope-heading { display: flex; align-items: center; gap: .8rem; }
.import-scope-heading > div { display: grid; gap: .1rem; }
.import-scope-heading h2 { margin: 0; }
.import-scope-heading small { color: var(--muted, var(--text-muted)); }
.import-scope-icon,
.import-target-icon {
    display: grid;
    flex: 0 0 2.35rem;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    color: var(--accent, var(--text-strong));
    background: var(--surface-muted);
    border-radius: var(--radius-section);
}
.import-target-icon { color: var(--success); background: var(--success-soft); }

.import-scope-body { display: grid; gap: .9rem; padding-block: var(--space-4); }
.import-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.import-source-grid .form-field { gap: .35rem; }
.import-source-grid .form-control { min-height: 2.6rem; }
.import-complete-project { margin: -.1rem 0 0; color: var(--text-main); }

.import-target-bar {
    display: grid;
    grid-template-columns: minmax(15rem, 1fr) minmax(12rem, 17rem) auto;
    gap: var(--space-4);
    align-items: end;
    padding: .8rem;
    background: var(--surface-shell);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
}
.import-target-summary,
.import-scope-summary-main { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.import-target-summary > div,
.import-scope-summary-main > div { display: grid; gap: .12rem; min-width: 0; }
.import-target-summary small,
.import-scope-summary-main small,
.import-client-scope > span { color: var(--muted, var(--text-muted)); font-size: var(--font-size-caption); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.import-target-summary strong,
.import-scope-summary-main strong { overflow: hidden; color: var(--text-strong); text-overflow: ellipsis; white-space: nowrap; }
.import-target-summary strong span,
.import-scope-summary-main strong span { color: var(--text-muted); padding: 0 var(--space-1); }
.import-client-scope { display: grid; gap: .3rem; }
.import-client-scope .form-control { min-height: 2.45rem; }
.import-discovery-action { display: grid; justify-items: end; gap: var(--space-1); }
.import-discovery-action small { max-width: 15rem; color: var(--warning); font-size: var(--font-size-caption); text-align: right; }
.import-discovery-action .button { min-height: 2.45rem; white-space: nowrap; }

.import-scope-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    gap: var(--space-4);
    align-items: center;
    min-height: 4.75rem;
    padding: .8rem var(--space-4);
}
.import-scope-summary-card .import-scope-arrow { color: var(--text-muted); }

.import-mapping-disclosure {
    margin-top: var(--space-4);
    overflow: hidden;
    border: 1px solid var(--border-color, var(--line-soft));
    border-radius: var(--radius-section);
    background: var(--surface-card);
}
.import-mapping-disclosure > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: .7rem;
    align-items: center;
    min-height: 4rem;
    padding: .7rem .85rem;
    cursor: pointer;
    list-style: none;
}
.import-mapping-disclosure > summary::-webkit-details-marker { display: none; }
.import-mapping-disclosure > summary:hover { background: var(--surface-shell); }
.import-mapping-disclosure > summary > div { display: grid; gap: .1rem; }
.import-mapping-disclosure > summary small { color: var(--muted, var(--text-muted)); }
.import-mapping-disclosure > summary > i { color: var(--text-muted); transition: transform .16s ease; }
.import-mapping-disclosure[open] > summary > i { transform: rotate(180deg); }
.import-mapping-summary-icon { display: grid; place-items: center; width: 2rem; height: 2rem; color: var(--text-main); background: var(--surface-muted); border-radius: var(--radius-control); }
.import-mapping-content { padding: 0 .85rem .85rem; border-top: 1px solid var(--line-soft); }
.import-selection-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: .85rem; }
.import-selection-footer p { margin: 0; }
.import-selection-footer .actions { display: flex; gap: .55rem; }

.import-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(7rem, 1fr));
    gap: var(--space-2);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
}

.import-steps li {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem .8rem;
    border: 1px solid var(--border, var(--line-soft));
    border-radius: var(--radius-section);
    color: var(--muted, var(--text-muted));
    background: var(--surface, var(--surface-card));
}

.import-steps li strong { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--surface-muted); }
.import-steps li.active { border-color: var(--primary, var(--accent)); color: var(--primary, var(--accent)); }
.import-steps li.complete strong { background: var(--success-soft); color: var(--success); }

.import-case-picker {
    display: grid;
    gap: var(--space-3);
    margin: var(--space-4) 0 1.4rem;
    padding: var(--space-4);
    border: 1px solid var(--border-color, var(--line-soft));
    border-radius: var(--radius-surface);
    background: var(--surface-shell);
}

.import-case-picker-toolbar {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(18rem, 28rem) auto;
    gap: var(--space-3);
    align-items: center;
}

.import-case-picker-toolbar h3,
.import-mapping-title { margin: .15rem 0 0; }
.import-case-picker-toolbar .actions { display: flex; gap: .45rem; justify-content: flex-end; }

.import-case-search {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.5rem;
    padding: 0 var(--space-3);
    border: 1px solid var(--border-color, var(--line-soft));
    border-radius: var(--radius-control);
    background: var(--surface-card);
}

.import-case-search i { color: var(--muted, var(--text-muted)); }
.import-case-search input { width: 100%; border: 0; outline: 0; background: transparent; }

.import-section-list {
    display: grid;
    max-height: 34rem;
    overflow: auto;
    border: 1px solid var(--border-color, var(--line-soft));
    border-radius: var(--radius-section);
    background: var(--surface-card);
}

.import-section-group { border-bottom: 1px solid var(--border-color, var(--line-soft)); }
.import-section-group:last-child { border-bottom: 0; }
.import-section-group > summary {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    min-height: 3.15rem;
    padding: .55rem .8rem .55rem calc(.8rem + var(--section-indent, 0px));
    cursor: pointer;
    list-style: none;
}

.import-section-group > summary::-webkit-details-marker { display: none; }
.import-section-group > summary:hover { background: var(--surface-shell); }
.import-section-group > summary > i { color: var(--warning); }
.import-section-group > summary > span { display: grid; min-width: 0; }
.import-section-group > summary strong,
.import-section-group > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-section-group > summary small { color: var(--muted, var(--text-muted)); }
.import-section-group > summary em { color: var(--muted, var(--text-muted)); font-size: var(--font-size-small); font-style: normal; font-weight: 700; }

.import-section-cases { display: grid; padding: 0 .8rem .55rem calc(3.6rem + var(--section-indent, 0px)); }
.import-case-option {
    display: grid;
    grid-template-columns: auto 4.5rem minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    min-height: 2.4rem;
    padding: .35rem var(--space-2);
    border-radius: var(--radius-control);
    cursor: pointer;
}
.import-case-option:hover { background: var(--surface-shell); }
.import-case-option code { color: var(--muted, var(--text-muted)); }
.import-case-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-mapping-title { margin-top: var(--space-1); }

.integration-settings-layout { display: grid; grid-template-columns: minmax(15rem, .7fr) minmax(25rem, 1.3fr); gap: var(--space-4); }
.integration-connection-list .panel-body { display: grid; gap: .55rem; }
.integration-connection-item { display: grid; gap: var(--space-1); width: 100%; padding: .8rem; border: 1px solid var(--border, var(--line-soft)); border-radius: var(--radius-control); background: var(--surface-card); text-align: left; cursor: pointer; }
.integration-connection-item.active { border-color: var(--primary, var(--accent)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--shadow-color) 1000%, transparent); }
.integration-connection-item span, .integration-connection-item small { overflow-wrap: anywhere; color: var(--muted, var(--text-muted)); }
.integration-security-note { display: flex; gap: .65rem; margin: var(--space-4) 0; padding: .8rem; border-radius: var(--radius-control); background: var(--surface-shell); color: var(--accent); }
.form-guidance { margin: .65rem 0; color: var(--warning); }
.integration-connections-panel .panel-header > .actions { align-items: center; }
.integration-connections-empty { min-height: 20rem; }
.integration-empty-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto var(--space-1); color: var(--accent, var(--text-strong)); background: var(--surface-muted); border-radius: var(--radius-surface); font-size: var(--font-size-heading-small); }
.integration-connection-name { display: flex; align-items: center; gap: .65rem; min-width: 11rem; }
.integration-connection-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2rem; height: 2rem; color: var(--accent, var(--text-strong)); background: var(--surface-muted); border-radius: var(--radius-control); }
.integration-connection-url { display: inline-block; max-width: 19rem; overflow: hidden; color: var(--accent, var(--text-strong)); text-overflow: ellipsis; white-space: nowrap; }
.integration-verification-status { display: grid; justify-items: start; gap: .3rem; }
.integration-verification-status small { color: var(--text-muted); white-space: nowrap; }
.integration-connection-modal { grid-template-rows: auto minmax(0, 1fr) auto; max-width: 56rem; }
.integration-access-section { margin-top: var(--space-4); }
.integration-enabled-check { align-items: flex-start; padding: .85rem var(--space-4); background: var(--surface-shell); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.integration-enabled-check > span { display: grid; gap: .15rem; }
.integration-enabled-check small { color: var(--text-muted); font-weight: 400; }
.test-case-type { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-muted); }
.test-case-source-metadata {
    margin-top: var(--space-4);
    overflow: hidden;
    border: 1px solid var(--border-color, var(--line-soft));
    border-radius: var(--radius-section);
    background: var(--surface-shell);
}

.test-case-source-metadata > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: .7rem;
    align-items: center;
    min-height: 3.75rem;
    padding: .7rem .85rem;
    cursor: pointer;
    list-style: none;
}

.test-case-source-metadata > summary::-webkit-details-marker { display: none; }
.test-case-source-metadata > summary:hover { background: var(--surface-muted); }
.test-case-source-metadata > summary > span:nth-child(2) { display: grid; gap: .08rem; }
.test-case-source-metadata > summary small { color: var(--muted, var(--text-muted)); }
.test-case-metadata-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    color: var(--text-main);
    background: var(--surface-muted);
    border-radius: var(--radius-control);
}

.test-case-metadata-chevron { color: var(--text-muted); transition: transform .16s ease; }
.test-case-source-metadata[open] .test-case-metadata-chevron { transform: rotate(180deg); }
.test-case-metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    padding: .85rem;
    border-top: 1px solid var(--border-color, var(--line-soft));
    background: var(--surface-card);
}

.test-case-metadata-item {
    display: grid;
    gap: .45rem;
    align-content: start;
    min-width: 0;
    padding: var(--space-3);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-control);
    background: var(--surface-card);
}

.test-case-metadata-item > span { display: flex; flex-wrap: wrap; gap: .35rem .55rem; align-items: baseline; }
.test-case-metadata-item code { color: var(--muted, var(--text-muted)); font-size: var(--font-size-caption); }
.test-case-metadata-item > div {
    max-height: 8rem;
    overflow: auto;
    color: var(--text-main);
    font-size: var(--font-size-small);
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

@media (max-width: 760px) {
    .test-case-metadata-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .import-launch-panel { grid-template-columns: 1fr; }
    .import-launch-destination { padding: .85rem 0 0; border-top: 1px solid var(--border-color, var(--line-soft)); border-left: 0; }
    .import-launch-action { justify-content: stretch; }
    .import-launch-action .button { width: 100%; }
    .import-steps { grid-template-columns: 1fr; }
    .import-progress { align-items: flex-start; flex-direction: column; }
    .import-progress > i { display: none; }
    .import-source-grid,
    .import-target-bar,
    .import-scope-summary-card { grid-template-columns: 1fr; }
    .import-scope-summary-card .import-scope-arrow { transform: rotate(90deg); }
    .import-discovery-action { justify-items: stretch; }
    .import-discovery-action small { max-width: none; text-align: left; }
    .import-selection-footer { align-items: stretch; flex-direction: column; }
    .import-selection-footer .actions { flex-wrap: wrap; }
    .integration-settings-layout { grid-template-columns: 1fr; }
    .import-case-picker-toolbar { grid-template-columns: 1fr; }
    .import-case-picker-toolbar .actions { justify-content: flex-start; }
}

.import-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(7rem, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.import-summary-grid > div {
    display: grid;
    gap: .15rem;
    padding: .8rem;
    border: 1px solid var(--border-color, var(--line-soft));
    border-radius: var(--radius-section);
    background: var(--surface-shell);
}

.import-summary-grid strong { font-size: var(--font-size-heading-small); }
.import-summary-grid span { color: var(--muted, var(--text-muted)); }
.import-summary-grid .warning { border-color: var(--warning-line); background: var(--warning-soft); }

@media (max-width: 900px) {
    .import-summary-grid { grid-template-columns: repeat(2, minmax(7rem, 1fr)); }
}
.two-column-grid,
.manual-run-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}
.manual-run-layout > .manual-run-column,
.manual-step-list,
.button-stack,
.evidence-list { display: grid; gap: 14px; }
.manual-run-column { grid-template-columns: minmax(0, 1fr); min-width: 0; align-content: start; overflow-wrap: anywhere; }
.manual-run-column:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 901px) {
    .app-shell:has(.manual-run-layout) { height: 100dvh; min-height: 0; overflow: hidden; }
    .page-shell:has(.manual-run-layout) { display: flex; flex-direction: column; min-height: 0; }
    .page-shell:has(.manual-run-layout) > .topbar { flex-shrink: 0; }
    .content:has(.manual-run-layout),
    .production-shell > main.scrollable-content:has(.manual-run-layout) {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: auto;
    }
    .workspace-page:has(.manual-run-layout) { display: flex; flex-direction: column; flex: 1; min-height: 0; }
    .workspace-page:has(.manual-run-layout) > :not(.manual-run-layout),
    .production-shell > main:has(.manual-run-layout) > :not(.manual-run-layout) { flex-shrink: 0; }
    /* Keep both columns usable when a long header or larger text needs page scrolling. */
    .manual-run-layout { flex: 1 0 min(20rem, 50dvh); min-height: 0; align-items: stretch; }
    .manual-run-layout > .manual-run-column {
        min-height: 0;
        overflow: auto;
        overscroll-behavior-y: contain;
        scrollbar-gutter: stable;
    }
}
.details-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-4); }
.details-grid dt { color: var(--text-muted); font-weight: 600; }
.details-grid dd { margin: 0; }
.manual-step-instructions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.manual-step-instructions small { color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.manual-verdict-buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 14px 0; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence-list { margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.evidence-list li { display: grid; min-width: 0; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); }
.evidence-list small { color: var(--text-muted); }
.evidence-upload { margin-top: var(--space-4); }
.evidence-upload input[type="file"] { min-width: 0; max-width: 100%; }
.runs-list-panel { overflow: hidden; }
.runs-list-toolbar { display: grid; grid-template-columns: minmax(260px, 430px) auto minmax(240px, 1fr); gap: 14px; align-items: center; padding: var(--space-3) 15px; background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.runs-search-field { position: relative; display: block; }
.runs-search-field > i { position: absolute; z-index: 1; top: 50%; left: 13px; color: var(--text-muted); transform: translateY(-50%); pointer-events: none; }
.runs-search-field .form-control { padding-left: 38px; }
.runs-result-count { color: var(--text-muted); font-size: var(--font-size-caption); white-space: nowrap; }
.runs-result-count strong { color: var(--text-strong); }
.runs-toolbar-actions { display: flex; gap: var(--space-2); align-items: center; justify-content: flex-end; }
.runs-filter-button { display: inline-flex; gap: var(--space-2); align-items: center; }
.runs-filter-count { display: grid; min-width: 20px; height: 20px; padding: 0 6px; place-items: center; color: var(--text-on-accent); background: var(--accent-solid); border-radius: var(--radius-pill); font-size: var(--font-size-caption); font-weight: 700; }
.runs-filter-backdrop { position: fixed; z-index: 90; inset: 0; background: var(--overlay); backdrop-filter: blur(2px); }
.runs-filter-drawer { position: absolute; top: 0; right: 0; bottom: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(520px, calc(100vw - 24px)); background: var(--surface-shell); border-left: 1px solid var(--line-soft); box-shadow: -18px 0 44px color-mix(in srgb, var(--shadow-color) 14%, transparent); animation: runs-filter-slide-in .16s ease-out; }
@keyframes runs-filter-slide-in { from { transform: translateX(24px); opacity: .65; } to { transform: translateX(0); opacity: 1; } }
.runs-filter-drawer-header { display: flex; gap: var(--space-4); align-items: flex-start; justify-content: space-between; padding: var(--space-5) 22px 17px; background: var(--surface-card); border-bottom: 1px solid var(--line-soft); }
.runs-filter-drawer-header h2 { margin: 3px 0 var(--space-1); }
.runs-filter-drawer-header p { margin: 0; color: var(--text-muted); font-size: var(--font-size-caption); }
.runs-filter-drawer-body { display: grid; align-content: start; gap: var(--space-5); padding: 18px 22px 26px; overflow: auto; }
.runs-filter-section { display: grid; gap: 10px; }
.runs-filter-drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.runs-filter-wide { grid-column: 1 / -1; }
.runs-filter-drawer-footer { display: flex; gap: 10px; justify-content: space-between; padding: 13px 22px; background: var(--surface-card); border-top: 1px solid var(--line-soft); }
@media (max-width: 900px) {
    .two-column-grid,
    .manual-run-layout,
    .manual-step-instructions { grid-template-columns: 1fr; }
    .runs-list-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
    .runs-result-count { display: none; }
}
@media (max-width: 620px) {
    .runs-list-toolbar { grid-template-columns: 1fr; }
    .runs-toolbar-actions { justify-content: space-between; }
    .runs-filter-drawer { width: 100%; }
    .runs-filter-drawer-grid { grid-template-columns: 1fr; }
    .runs-filter-wide { grid-column: auto; }
}

/* Unified catalog grids: Runs & Results is the visual contract for every main list. */
.data-grid-panel {
    overflow: hidden;
}

/* A backdrop filter makes the panel a containing block for its fixed drawer,
   so overflow clips the drawer to the toolbar/table instead of the viewport. */
.panel:has(> .data-grid-toolbar) {
    backdrop-filter: none;
}

.data-grid-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 430px) auto minmax(240px, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 68px;
    padding: var(--space-3) 15px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
}

.data-grid-search-field {
    position: relative;
    display: block;
    min-width: 0;
}

.data-grid-search-field > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 13px;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    transform: translateY(-50%);
    pointer-events: none;
}

.data-grid-search-field .form-control {
    min-height: 44px;
    padding: 10px 36px 10px 38px;
    border-color: var(--line-soft);
    border-radius: var(--radius-section);
    font-size: var(--font-size-caption);
}

.data-grid-search-field input[type="search"]::-webkit-search-cancel-button {
    opacity: .55;
}

.data-grid-result-count {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    white-space: nowrap;
}

.data-grid-result-count strong {
    color: var(--text-strong);
    font-weight: 700;
}

.data-grid-toolbar-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.data-grid-filter-button {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
    min-height: 40px;
    padding-inline: 15px;
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.data-grid-filter-count {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    place-items: center;
    color: var(--text-on-accent);
    background: var(--accent-solid);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 700;
}

.data-grid-table {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    width: 100%;
    border-collapse: collapse;
    color: var(--text-strong);
    font-size: var(--font-size-small);
    line-height: 1.48;
}

.data-grid-table th,
.data-grid-table td {
    padding: var(--space-3) 14px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}

.data-grid-table th {
    color: var(--text-muted);
    background: var(--surface-shell);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1.35;
    text-transform: uppercase;
}

.data-grid-table th[aria-sort="ascending"],
.data-grid-table th[aria-sort="descending"] {
    color: var(--text-strong);
    background: var(--surface-muted);
}

.data-grid-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
}

.data-grid-sort-button:hover {
    color: var(--text-strong);
}

.data-grid-wrap-headers th,
.data-grid-wrap-headers .data-grid-sort-button {
    white-space: normal;
    overflow-wrap: anywhere;
}

.data-grid-header-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.data-grid-sort-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-compact);
}

.data-grid-sort-button i {
    flex: 0 0 auto;
    width: 9px;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    text-align: center;
}

.data-grid-table th[aria-sort="ascending"] .data-grid-sort-button i,
.data-grid-table th[aria-sort="descending"] .data-grid-sort-button i {
    color: var(--text-strong);
}

.data-grid-table td strong,
.data-grid-table .table-primary-link,
.data-grid-table .run-link {
    color: var(--text-strong);
    font-weight: 700;
}

.data-grid-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-grid-table tbody tr:hover {
    background: var(--surface-shell);
}

.data-grid-filter-backdrop {
    position: fixed;
    z-index: 90;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(2px);
}

.data-grid-filter-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(520px, calc(100vw - 24px));
    background: var(--surface-shell);
    border-left: 1px solid var(--line-soft);
    box-shadow: -18px 0 44px color-mix(in srgb, var(--shadow-color) 14%, transparent);
    animation: data-grid-filter-slide-in .16s ease-out;
}

@keyframes data-grid-filter-slide-in {
    from { opacity: .65; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

.data-grid-filter-drawer-header {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-5) 22px 17px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--line-soft);
}

.data-grid-filter-drawer-header h2 {
    margin: 3px 0 var(--space-1);
    color: var(--text-strong);
    font-size: var(--font-size-heading-small);
}

.data-grid-filter-drawer-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

.data-grid-filter-drawer-body {
    display: grid;
    align-content: start;
    gap: var(--space-5);
    padding: 18px 22px 26px;
    overflow: auto;
}

.data-grid-filter-section {
    display: grid;
    gap: 10px;
}

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

.data-grid-filter-wide {
    grid-column: 1 / -1;
}

.data-grid-filter-context {
    display: grid;
    gap: 3px;
    padding: 11px var(--space-3);
    color: var(--text-muted);
    background: var(--surface-muted);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    font-size: var(--font-size-caption);
}

.data-grid-filter-context > span {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.data-grid-filter-context > strong {
    color: var(--text-strong);
    font-size: var(--font-size-small);
}

.data-grid-filter-drawer-footer {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 13px 22px;
    background: var(--surface-card);
    border-top: 1px solid var(--line-soft);
}

.shared-step-catalog-row,
.business-flow-list-item,
.scenario-list-heading,
.scenario-card {
    font-size: var(--font-size-caption);
}

.scenario-grid-toolbar-panel {
    margin-bottom: var(--space-4);
}

.test-case-tree > .data-grid-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
}

.test-case-tree > .data-grid-toolbar .data-grid-result-count {
    display: none;
}

@media (max-width: 900px) {
    .data-grid-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
    .data-grid-result-count { display: none; }
}

@media (max-width: 620px) {
    .data-grid-toolbar,
    .test-case-tree > .data-grid-toolbar { grid-template-columns: 1fr; }
    .data-grid-toolbar-actions { justify-content: space-between; }
    .data-grid-filter-drawer { width: 100%; }
    .data-grid-filter-drawer-grid { grid-template-columns: 1fr; }
    .data-grid-filter-wide { grid-column: auto; }
}

/* One radius for every button, including scoped component styles and interaction states. */
button,
[role="button"],
input:is([type="button"], [type="submit"], [type="reset"]),
.button,
.icon-button,
.grid-action-icon,
.workflow-back-link {
    border-radius: var(--radius-control) !important;
}

/* Shared button sizing: align action buttons with the standard 34px fields. */
.button,
button.button,
.button.small,
button.button.small,
.test-case-tab-header .button,
.test-case-tab-header button.button {
    box-sizing: border-box;
    gap: 7px;
    height: var(--control-height) !important;
    min-height: var(--control-height) !important;
    padding-block: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.button > i,
button.button > i {
    flex: 0 0 auto;
}

/* Opt in when an action label must remain visible on narrow or zoomed screens.
   Empty-state actions always wrap: their labels are sentences, and the state is often shown on a narrow panel. */
.button.wrap,
button.button.wrap,
.empty-state .button {
    height: auto !important;
    min-height: var(--control-height) !important;
    min-width: 0;
    padding-block: var(--space-2);
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Keep single-line toolbar controls compact while allowing action labels to wrap. */
.compact-toolbar > :is(button.button, select.form-control),
.compact-toolbar > .header-popover-host > .popover-trigger {
    --control-height: var(--control-height-compact);
    --field-height: var(--control-height);
    padding-block: var(--space-1);
    line-height: 1.2;
}

/* Explicit selection variant for catalogs and visual editors. */
.button.choice {
    color: var(--text-strong);
    background: var(--surface-card);
    border: 1px solid var(--line-soft);
    box-shadow: none;
    transform: none;
}
.button.choice:hover { background: var(--surface-muted); border-color: var(--accent); }
.button.choice[aria-pressed="true" i] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.button.choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Compact selection targets in technical diagrams; keep full targets for touch. */
.button.choice.compact {
    min-height: var(--control-height-compact) !important;
    padding-block: var(--space-1);
}
@media (pointer: coarse) {
    .button.choice.compact { min-height: var(--control-height) !important; }
}

/* Inline creation tile used at the insertion point in visual editors. */
.button.add-placeholder { flex-direction: column; gap: var(--space-1); padding: var(--space-4); border: 2px dashed var(--line-soft); color: var(--accent); background: var(--surface-card); box-shadow: none; }
.button.add-placeholder > .add-placeholder-icon { font-size: var(--font-size-metric); font-weight: 400; line-height: 1; }
.button.add-placeholder:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Microsoft identity branding: shared light sign-in button, with wrapping labels. */
.button.microsoft-sign-in.wrap {
    min-height: 41px !important;
    padding: 10px var(--space-3);
    gap: var(--space-3);
    color: #5e5e5e;
    background: #fff;
    border: 1px solid #8c8c8c;
    border-radius: 0;
    box-shadow: none;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: var(--font-size-section);
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    transform: none;
}
.button.microsoft-sign-in.wrap:hover { background: #f3f3f3; border-color: #5e5e5e; }
.button.microsoft-sign-in.wrap:active { background: #e5e5e5; }
.button.microsoft-sign-in.wrap:focus-visible { outline: 2px solid #0067b8; outline-offset: 3px; }
.microsoft-sign-in-logo { flex: 0 0 21px; width: 21px; height: 21px; }
.microsoft-sign-in > span { min-width: 0; }

/* Shared field density. Compact editor variants retain their existing dimensions. */

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
input[type="file"],
select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
    box-sizing: border-box;
    height: max(var(--field-height), 1.75em) !important;
    min-height: max(var(--field-height), 1.75em) !important;
    padding-block: 3px !important;
    font-size: var(--field-font-size) !important;
    line-height: 1.4 !important;
}

/* Keep the native file picker within the same field height at every density. */
input[type="file"] { min-width: 0; max-width: 100%; }
input[type="file"]::file-selector-button {
    height: 100%;
    margin-inline-end: var(--space-2);
    padding: 0 var(--space-2);
    border: 0;
    border-radius: var(--radius-compact);
    color: inherit;
    background: var(--surface-muted-2);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}
input[type="file"]:disabled::file-selector-button { cursor: default; }

.scenario-editor-studio { --field-height: var(--control-height-compact); --field-font-size: var(--font-size-field-compact); }
.version-workspace-picker select,
.relation-picker-toolbar .form-control { --field-height: var(--control-height-compact); --field-font-size: var(--font-size-field-compact); }
.form-control.compact,
.workflow-routing-compact .form-control { --field-height: var(--control-height-dense); --field-font-size: var(--font-size-field-compact); }

textarea.form-control {
    min-height: var(--control-height);
    padding-block: 5px;
    font-size: var(--field-font-size);
    line-height: 1.5;
}
textarea.form-control.code { min-height: 210px; }
textarea.form-control.small-code { min-height: 82px; }
textarea.form-control.compact-textarea { min-height: 76px; }
.scenario-editor-studio textarea.form-control { min-height: 64px; padding-block: 5px; font-size: var(--font-size-caption); }
.scenario-editor-studio textarea.form-control.compact-textarea { min-height: 48px; }
/* Keep full-height JSON workspaces and resizable multiline editors usable. */
textarea.json-editor.form-control { min-height: 350px; font-size: var(--font-size-dense); }
.scenario-editor-studio textarea.json-editor.form-control { min-height: 0; }
/* Short literal values start at one row; rows and vertical resize retain multiline content. */
textarea.form-control.value-textarea { min-height: var(--control-height); resize: vertical; }

/* Opt-in readable forms, including inside the compact scenario studio. */
.form-readable {
    --control-height: var(--control-height-readable);
    --field-height: var(--control-height-readable);
    --field-font-size: 0.875rem;
    font-size: var(--field-font-size);
    line-height: 1.55;
    color: var(--text-strong);
}
.form-readable .form-field { min-width: 0; gap: var(--space-2); }
.form-readable.form-readable .form-field > span,
.form-readable.form-readable .field-label { font-size: var(--field-font-size); line-height: 1.5; color: var(--text-strong); }
.form-readable.form-readable small,
.form-readable.form-readable .form-field > small { font-size: var(--font-size-help); line-height: 1.5; color: var(--text-main); }
.form-readable.form-readable .form-control { width: 100%; min-width: 0; max-width: 100%; }
.form-readable.form-readable textarea.form-control { min-height: 7rem; font-size: var(--field-font-size); padding: var(--space-3); resize: vertical; }
.form-readable.form-readable textarea.form-control.value-textarea { min-height: var(--control-height); }
.form-readable.form-readable .button { font-size: var(--field-font-size); }
.form-readable.form-readable .validation-message { color: var(--danger); font-size: var(--field-font-size); }
.form-readable .editor-item-actions.wrap { margin: 0; }

/* Compact readable forms keep the text size and reduce spacing on pointer-driven screens. */
.form-readable.form-compact { --control-height: 2.25rem; --field-height: var(--control-height); line-height: 1.4; }
.form-readable.form-compact .form-field { gap: var(--space-1); }
.form-readable.form-compact textarea.form-control.value-textarea { padding: var(--space-2); }
.form-readable.form-overview .form-field > span:not(.value-with-unit) { color: var(--text-label); font-size: var(--font-size-help); font-weight: 400; }
/* Editable values in an overview: retain labels and keyboard focus with less visual weight. */
.form-readable .form-control.quiet-control {
    --field-height: 1.75rem;
    color: var(--text-strong);
    font-weight: 600;
    background-color: transparent;
    border-color: transparent;
    border-radius: var(--radius-compact);
    box-shadow: none;
    padding-inline: var(--space-1);
}
.form-readable.form-readable textarea.form-control.quiet-control { padding: var(--space-1); min-height: 3rem; }
.form-readable .form-control.quiet-control:hover { border-color: var(--line-strong); }
.form-readable .form-control.quiet-control:focus { background-color: var(--surface-card); border-color: var(--accent); outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.form-readable .value-with-unit { display: flex; align-items: center; gap: var(--space-1); font-weight: 600; }
.form-readable.form-readable .value-with-unit > input { width: 4.5ch; flex: 0 1 4.5ch; appearance: textfield; }
.form-readable .value-with-unit > input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.form-readable .value-with-unit > span { color: var(--text-strong); }
.scenario-editor-studio.signalr-studio { grid-template-rows: minmax(0, 1fr); }
@media (pointer: coarse) {
    .form-readable.form-compact { --control-height: var(--control-height-readable); }
    .form-readable .form-control.quiet-control { --field-height: var(--control-height-readable); }
}

.step-execution-details { display: grid; gap: 14px; min-width: 0; }
.step-result-toolbar, .step-result-meta, .step-result-check > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.step-result-toolbar { justify-content: space-between; }
.step-result-meta { color: var(--text-main); font-size: var(--font-size-caption); }
.step-execution-details details { min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-control); padding: 10px var(--space-3); }
.step-execution-details summary { cursor: pointer; font-weight: 700; }
.step-execution-details pre {
    margin: var(--space-2) 0 0;
    padding: 10px;
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--surface-shell);
    border-radius: var(--radius-compact);
    font: 12px/1.55 Consolas, monospace;
}
.step-result-error, .step-result-check.failed { border: 1px solid var(--danger-line); background: var(--danger-soft); }
.step-result-error { padding: var(--space-3); border-radius: var(--radius-control); color: var(--danger); }
.step-result-error > code { display: block; margin-top: 6px; }
.step-result-error pre, .step-result-check.failed pre { background: transparent; }
.step-result-tab-error { color: var(--danger); }

.page-header.load-report-page-header { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) 18px; margin-bottom: 10px; }
.page-header.load-report-page-header h1 { font-size: var(--font-size-heading-small); }
.load-report-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px var(--space-5); margin: 0 0 var(--space-3); padding: 5px var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-shell); }
.load-report-tabs { flex: 1 1 auto; flex-wrap: wrap; padding-inline: 0; }
.load-report-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); margin-left: auto; }
.load-report-updated { padding: var(--space-1) 6px; color: var(--text-muted); font-size: var(--font-size-caption); white-space: nowrap; }
.load-live-inspect { border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; background: transparent; cursor: pointer; }
.load-step-report-section { margin-bottom: 18px; }
.load-step-report-section > .panel-header { padding: var(--space-3) 18px; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.load-step-report-info { width: 34px; padding: 0; flex-shrink: 0; }
.load-step-report-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.load-step-report-help { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-sizing: border-box; padding: var(--space-5); overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); color: var(--text-strong); background: var(--surface-card); box-shadow: 0 18px 60px color-mix(in srgb, var(--shadow-color) 30%, transparent); font-size: var(--font-size-small); line-height: 1.6; }
.load-step-report-help::backdrop { background: var(--overlay); }
.load-step-report-help header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.load-step-report-help h3 { margin: 0; font-size: var(--font-size-section); }
.load-step-report-help header button { flex-shrink: 0; }
.load-step-report-help p { margin: var(--space-4) 0 0; }
.load-step-report-table { font-size: var(--font-size-caption); }
.load-step-report-table th { white-space: normal; min-width: 76px; }
.load-step-report-table th:first-child { min-width: 190px; }
.load-step-report-table .has-failures { background: var(--danger-soft); }
.load-step-report-step { cursor: pointer; }
.load-step-report-step:hover, .load-step-report-step.is-expanded { box-shadow: inset 3px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); }
.load-step-report-toggle { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.load-step-report-toggle i { flex: 0 0 10px; font-size: var(--font-size-caption); }
.load-step-report-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-compact); }
.load-step-report-detail-row { background: var(--surface-card); }
.load-step-report-reasons { padding: var(--space-1); }
.load-step-report-reasons summary, .load-iteration-history > summary { cursor: pointer; font-weight: 600; }
.load-step-report-reason { border: 1px solid var(--danger-line); background: var(--surface-shell); border-radius: var(--radius-control); padding: var(--space-3); margin-top: 10px; }
.load-step-report-reason pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow: auto; font: 12px/1.6 Consolas, monospace; }
.load-step-report-links { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 10px 0; }
.load-iteration-dialog .workflow-preview-workspace { grid-template-columns: 300px minmax(0, 1fr); }
.load-iteration-dialog .workflow-preview-step.is-passed { background: var(--accent-soft); }
.load-iteration-dialog .workflow-preview-step.is-failed { background: var(--danger-soft); }
.load-iteration-dialog .workflow-preview-step.selected { box-shadow: inset 4px 0 color-mix(in srgb, var(--shadow-color) 100%, transparent); outline: 1px solid var(--accent); outline-offset: -1px; }
.load-step-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.load-iteration-history { border: 1px solid var(--line-soft); border-radius: var(--radius-section); padding: 14px; margin-bottom: var(--space-3); min-width: 0; }
.load-iteration-history > summary { line-height: 1.8; }
.load-iteration-history pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.load-iteration-fallback { min-height: 0; overflow: auto; }
.load-iteration-error-summary { color: var(--danger); font-size: var(--font-size-caption); margin: var(--space-2) 0 0; max-height: 54px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .load-iteration-dialog .workflow-preview-workspace { grid-template-columns: minmax(0, 1fr); }
}
.step-result-check { display: grid; gap: 6px; padding: 10px; margin-top: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-control); min-width: 0; }
.step-result-check code { overflow-wrap: anywhere; }
.button.load-test-stop { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-line); box-shadow: none; white-space: nowrap; }
.button.load-test-stop:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.load-items-panel td.load-item-outcome { min-width: 140px; vertical-align: top; }
.load-iteration-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--space-4); padding: var(--space-3) 22px; border-top: 1px solid var(--line-soft); color: var(--text-main); font-size: var(--font-size-caption); }
.load-iteration-pagination > span { margin-right: auto; font-variant-numeric: tabular-nums; }
.load-iteration-pagination label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.load-iteration-pagination input, .load-iteration-pagination select { width: 72px; min-height: 32px; padding: var(--space-1) 7px; }
.load-item-outcome-content { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.load-item-outcome-content .status-badge { flex: 0 0 auto; white-space: nowrap; }
.load-items-panel .load-item-duration { white-space: nowrap; font-variant-numeric: tabular-nums; }
.load-item-outcome-content .load-item-duration { display: block; color: var(--text-muted); font-size: var(--font-size-caption); }
.load-item-outcome-content .load-item-error { display: block; margin: 0; max-width: 280px; overflow-wrap: anywhere; white-space: normal; line-height: 1.5; }

.notification-stack {
    position: fixed;
    z-index: 10000;
    top: max(18px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    pointer-events: none;
}
.transient-notification {
    flex: 0 0 auto;
    pointer-events: auto;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 28px;
    align-items: center;
    gap: var(--space-3);
    width: max-content;
    max-width: min(620px, calc(100vw - 32px));
    padding: 14px var(--space-3) 14px 18px;
    border: 1px solid;
    border-radius: var(--radius-surface);
    box-shadow: 0 12px 36px color-mix(in srgb, var(--shadow-color) 15%, transparent);
    font-size: var(--font-size-body);
    line-height: 1.5;
    animation: notification-enter 220ms ease-out both, notification-exit var(--notification-exit) ease-in var(--notification-display) forwards;
}
.transient-notification.success { color: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.transient-notification.error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.transient-notification > i { font-size: var(--font-size-heading-small); }
.transient-notification-content { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.transient-notification-content a { display: block; margin-top: var(--space-1); color: inherit; font-weight: 600; text-decoration: underline; }
.transient-notification.hiding { pointer-events: none; animation: notification-exit var(--notification-exit) ease-in forwards; }
.transient-notification-close { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-compact); color: inherit; background: transparent; cursor: pointer; }
.transient-notification-close:hover { background: transparent; }
.transient-notification-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.connection-check-details { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius-control); }
.connection-check-details > :not(summary) { display: block; margin-top: 6px; }
@keyframes notification-enter {
    from { opacity: 0; transform: translateY(-18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes notification-exit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-18px); }
}
@media (prefers-reduced-motion: reduce) {
    .transient-notification { animation: notification-fade 1ms linear var(--notification-display) forwards; }
    .transient-notification.hiding { animation: notification-fade 1ms linear forwards; }
    @keyframes notification-fade { to { opacity: 0; } }
}

/* Keep the editor shell stable across tabs, loading and empty states. */
.content:has(.load-test-editor-marker) { padding-top: var(--space-3); padding-bottom: var(--space-4); }
.workspace-page:has(.load-test-editor-marker) > .page-header { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-2); }
.workspace-page:has(.load-test-editor-marker) > .page-header > div:first-child { flex: 1; min-width: 0; }
.workspace-page:has(.load-test-editor-marker) > .page-header h1 { font-size: var(--font-size-heading); line-height: 1.25; overflow-wrap: anywhere; }
.workspace-page:has(.load-test-editor-marker) > .page-header .page-actions { gap: var(--space-2); }
.workspace-page:has(.load-test-editor-marker) > .page-header .button { min-height: 32px; padding: 6px var(--space-3); font-size: var(--font-size-caption); }
.workspace-page:has(.load-test-editor-marker) > .load-workspace-tabs { margin-bottom: var(--space-2); }
.workspace-page:has(.load-test-editor-marker) > .load-run-picker { margin-bottom: var(--space-2); }
.workspace-page:has(.load-test-editor-marker) .load-run-picker-row { gap: 6px 10px; }
@media (max-width: 650px) {
    .workspace-page:has(.load-test-editor-marker) > .page-header > div:first-child { flex-basis: 100%; }
    .workspace-page:has(.load-test-editor-marker) > .page-header h1 { font-size: var(--font-size-heading-small); }
}
/* The selected run, live progress and timings share one compact summary. */
.load-run-summary { margin-bottom: 0; container: load-summary / inline-size; }
.load-live-panel.embedded { margin: 0; border: 0; border-radius: var(--radius-surface) var(--radius-surface) 0 0; box-shadow: none; background: transparent; }
.load-live-panel.embedded > .panel-body { padding: var(--space-4) 22px var(--space-3); }
.load-live-panel.embedded .load-live-progress-heading { margin-top: 0; }
.load-live-panel.embedded .load-live-metrics { gap: 10px; margin: var(--space-2) 0 10px; }
.load-live-panel .load-live-metrics.finished.with-cancelled { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.load-live-panel.embedded .load-live-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.load-live-panel.embedded .load-live-metrics strong { font-size: var(--font-size-metric); line-height: 1.2; }
.load-live-panel.embedded .load-live-metrics span { font-size: var(--font-size-caption); white-space: normal; text-align: right; }
.load-live-panel.embedded .load-verification-note { margin: 6px 0; }
.load-live-panel.embedded .load-live-error { max-height: none; overflow: visible; }
.load-live-panel.embedded .load-live-footer { padding-top: var(--space-2); }
.load-run-summary .load-live-panel.embedded > .panel-body { padding: var(--space-3) var(--space-4) var(--space-2); }
.load-run-summary .load-live-stage { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, auto); gap: 3px var(--space-4); align-items: center; }
.load-run-summary .load-live-stage + .load-live-stage { margin-top: var(--space-2); }
.load-run-summary .load-live-stage > .load-live-progress-heading { grid-column: 1; margin: 0; }
.load-run-summary .load-live-stage > .inline-progress { grid-column: 1; height: 5px; align-self: start; }
.load-run-summary .load-live-panel.embedded .load-live-metrics { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.load-run-summary .load-live-panel.embedded .load-live-metrics > div { gap: 7px; padding: 6px 10px; }
.load-run-summary .load-live-panel.embedded .load-live-metrics strong { font-size: var(--font-size-section); }
.load-run-summary .load-live-panel.embedded .load-live-metrics span { font-size: var(--font-size-dense); }
.load-run-summary .load-live-panel.embedded .load-live-footer { padding-top: 6px; }
.load-run-performance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 10px var(--space-4); border-top: 1px solid var(--line-soft); gap: 10px var(--space-3); }
.load-run-performance > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.load-run-performance > div:not(:nth-child(4n+1)) { padding-left: var(--space-3); border-left: 1px solid var(--line-soft); }
.load-run-performance dt { color: var(--text-muted); font-size: var(--font-size-caption); }
.load-run-performance dd { order: -1; margin: 0; color: var(--text-strong); font-size: var(--font-size-section); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.load-run-performance dd small { font-size: var(--font-size-caption); font-weight: 600; color: var(--text-muted); }
.load-run-throughput dd { display: flex; flex-direction: column; gap: 2px; }
.load-run-throughput dd > span { white-space: nowrap; }
.load-run-performance .load-analytics-success dd { color: var(--success); }
.load-run-performance .load-analytics-errors dd { color: var(--danger); }
.load-run-performance .load-analytics-range dd { font-size: var(--font-size-section); min-height: 21.6px; display: flex; align-items: center; overflow-wrap: anywhere; }
.load-run-summary + .load-data-summary { margin: var(--space-2) 0 0; }
.load-run-summary + .load-data-summary > summary { padding: 10px 0; }
.load-overview-stack > .panel > .panel-header { padding: var(--space-3) 22px; flex-wrap: wrap; gap: var(--space-3); }
.load-overview-stack > .panel > .panel-header > .button { flex-shrink: 0; }
.load-overview-execution .load-live-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-6); align-items: center; margin-bottom: 10px; }
.load-overview-execution .load-live-stage > .load-live-progress-heading { grid-column: 1; grid-row: 1; align-self: end; margin: 0 0 7px; }
.load-overview-execution .load-live-stage > .inline-progress { grid-column: 1; grid-row: 2; align-self: start; }
.load-overview-execution .load-live-stage > .load-live-metrics { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.load-overview-execution .load-live-metrics:not(.finished) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 650px) {
    .load-overview-execution .load-live-stage { display: block; }
    .load-overview-execution .load-live-stage > .load-live-metrics { margin-top: var(--space-2); }
    .load-profile-facts > div:not(.load-profile-stat) { grid-column: 1 / -1; }
    .load-overview-run-heading h2 { flex-basis: 100%; }
    .load-run-switcher { flex: 1 1 100%; }
    .load-run-switcher select { width: 100%; }
    .load-run-picker-context { flex: 1 1 auto; }
    .load-live-panel.embedded .load-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-live-panel.embedded .load-live-metrics > div { padding: 10px; }
}
@container load-summary (min-width: 1000px) {
    .load-run-performance { grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(150px, 1.3fr); gap: 10px; }
    .load-run-performance > div:nth-child(n+2) { padding-left: var(--space-3); border-left: 1px solid var(--line-soft); }
}
@container load-summary (max-width: 650px) {
    .load-run-performance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-run-performance > div:nth-child(odd) { border-left: 0; padding-left: 0; }
    .load-run-summary .load-live-stage { display: block; }
    .load-run-summary .load-live-stage > .load-live-progress-heading { margin-bottom: 5px; }
    .load-run-summary .load-live-panel.embedded .load-live-metrics { margin-top: 6px; }
}
.adaptive-flow { padding: 18px; margin: 0 0 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); }
.adaptive-flow-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-bottom: 14px; }
.adaptive-flow-heading h3, .adaptive-flow-details h4 { margin: 0; }
.adaptive-flow ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; gap: 14px; }
.adaptive-flow li { min-width: 0; padding: var(--space-4); background: var(--surface-card); border: 1px solid var(--line-soft); border-radius: var(--radius-section); }
.adaptive-flow-number { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--text-on-accent); background: var(--accent-solid); margin-bottom: 10px; }
.adaptive-flow-details p { margin: 10px 0; font-size: var(--font-size-small); }
.adaptive-flow-details code, .adaptive-flow-details small, .adaptive-flow-details a { display: block; margin-top: var(--space-2); overflow-wrap: anywhere; font-size: var(--font-size-small); }
.adaptive-flow-details code { color: var(--accent); background: var(--surface-muted); padding: 5px; border-radius: var(--radius-compact); }
.adaptive-flow-details small { color: var(--text-muted); }
.load-settings-content .adaptive-flow { padding: 0; margin: 0; border: 0; background: transparent; }
.load-execution-diagram { min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); overflow: hidden; background: var(--surface-card); }
.load-diagram-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-soft); background: var(--surface-card); }
.load-diagram-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-muted); font-size: var(--font-size-caption); }
.load-diagram-key { display: inline-flex; align-items: center; gap: 6px; }
.load-diagram-key::before { content: ""; width: 10px; height: 10px; border-radius: var(--radius-compact); border: 1px solid var(--accent); background: var(--surface-card); }
.load-diagram-key.is-api::before { background: var(--success-soft); border-color: var(--success-line); }
.load-diagram-key.is-control::before { background: var(--warning-soft); border-color: var(--warning-line); }
.load-diagram-canvas { height: clamp(480px, 72vh, 900px); overflow: auto; overscroll-behavior: contain; padding: var(--space-2); }
.load-diagram-canvas .workflow-diagram-svg { width: 1100px; max-width: none; height: auto; }
.load-execution-diagram.is-fitted .load-diagram-canvas { height: auto; }
.load-execution-diagram.is-fitted .workflow-diagram-svg { width: 100%; height: auto; max-height: min(72vh, 900px); }
.load-diagram-toolbar button.button.secondary[aria-pressed="true" i] { color: var(--text-on-accent); background: var(--accent-solid); }
.load-diagram-lane-title { color: var(--text-main); font-size: var(--font-size-section); font-weight: 600; }
.load-diagram-node.is-static { cursor: default; }
.load-diagram-node.node-control rect { fill: var(--warning-soft); stroke: var(--warning-line); }
.load-diagram-node:focus-visible { outline: none; }
.load-diagram-node:focus-visible rect { stroke: var(--accent); stroke-width: 3; }
.load-diagram-node .diagram-node-label strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%; font-size: var(--font-size-section); line-height: 1.25; overflow-wrap: anywhere; }
.adaptive-flow .load-diagram-node .diagram-node-label small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%; margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.3; white-space: pre-line; }
.adaptive-flow .load-diagram-node.node-control .diagram-node-label small { -webkit-line-clamp: 4; }
.adaptive-flow .load-diagram-node .diagram-node-label.inverse small { color: var(--text-on-accent); }
.load-diagram-edge-label { display: inline-block; padding: 3px 5px; background: var(--surface-card); color: var(--text-muted); font-size: var(--font-size-diagram); line-height: 1.3; text-align: center; }
.load-diagram-workflow-link { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: var(--font-size-small); background: var(--surface-card); }
.adaptive-flow .load-diagram-workflow-link a { margin: 0; overflow-wrap: anywhere; }
.adaptive-flow .load-diagram-notice { margin: 0; padding: var(--space-3) var(--space-4); background: var(--warning-soft); color: var(--warning); }
.adaptive-flow-details { margin-top: var(--space-4); }
.adaptive-flow-details > summary { padding: var(--space-3) 0; color: var(--accent); cursor: pointer; font-size: var(--font-size-small); font-weight: 600; }
.adaptive-flow-details[open] > summary { margin-bottom: var(--space-2); }
.load-settings-content .adaptive-flow ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1200px) { .adaptive-flow ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .adaptive-flow ol { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .load-settings-content .adaptive-flow ol { grid-template-columns: 1fr; } }
.adaptive-chart { margin-top: var(--space-4); }
.adaptive-chart svg { display: block; width: 100%; height: auto; font-size: var(--font-size-small); color: var(--text-main); overflow: visible; }
.adaptive-chart svg text { fill: currentColor; }
.adaptive-conclusion { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px var(--space-5); border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-shell); }
.adaptive-conclusion > i { display: grid; place-items: center; width: 34px; height: 34px; margin-top: 2px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: var(--font-size-section); }
.adaptive-conclusion.success { border-color: var(--success-line); background: var(--surface-muted); }
.adaptive-conclusion.success > i { color: var(--success); background: var(--success-soft); }
.adaptive-conclusion.incomplete { border-color: var(--danger-line); background: var(--surface-shell); }
.adaptive-conclusion.incomplete > i { color: var(--danger); background: var(--danger-soft); }
.adaptive-conclusion h3 { margin: 3px 0 6px; color: var(--text-strong); font-size: var(--font-size-section); }
.adaptive-conclusion p { margin: 0; color: var(--text-main); line-height: 1.55; }
.adaptive-result-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-4) 0; }
.adaptive-result-metrics article { display: grid; gap: 7px; min-width: 0; padding: 17px; border: 1px solid var(--line-soft); border-radius: var(--radius-surface); background: var(--surface-card); }
.adaptive-result-metrics article.confirmed { border-color: var(--success-line); background: var(--surface-shell); }
.adaptive-result-metrics span { color: var(--text-muted); font-size: var(--font-size-caption); font-weight: 700; }
.adaptive-result-metrics strong { color: var(--text-strong); font-size: var(--font-size-heading-small); font-variant-numeric: tabular-nums; }
.adaptive-result-metrics article.confirmed strong { color: var(--success); }
.adaptive-result-metrics small { color: var(--text-muted); line-height: 1.4; }
.adaptive-observations { padding: 17px var(--space-5); border-radius: var(--radius-surface); background: var(--surface-shell); }
.adaptive-observations h3 { margin: 0 0 var(--space-3); font-size: var(--font-size-body); }
.adaptive-observations ul { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.adaptive-observations li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; color: var(--text-main); line-height: 1.5; }
.adaptive-observations li > i { margin-top: var(--space-1); color: var(--text-muted); text-align: center; }
.adaptive-observations li:first-child > i { color: var(--success); }
.adaptive-workflow-link { margin: 18px 0; color: var(--text-main); font-size: var(--font-size-small); }
.adaptive-section-heading { display: flex; justify-content: space-between; align-items: end; gap: var(--space-3); margin: 22px 0 10px; }
.adaptive-section-heading h3 { margin: 0 0 var(--space-1); font-size: var(--font-size-section); }
.adaptive-section-heading small { color: var(--text-muted); }
.adaptive-stage-summary table { min-width: 760px; }
.adaptive-stage-summary td, .adaptive-stage-summary th { padding: 10px var(--space-3); }
.adaptive-stage-summary td { font-variant-numeric: tabular-nums; }
.adaptive-stage-summary .adaptive-stage-time { white-space: nowrap; }
.adaptive-stage-summary td small { color: var(--text-muted); }
.adaptive-stage-result { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2); border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text-main); font-size: var(--font-size-caption); font-weight: 700; white-space: nowrap; }
.adaptive-stage-result.success { color: var(--success); background: var(--success-soft); }
.adaptive-stage-result.warning { color: var(--warning); background: var(--warning-soft); }
.adaptive-rps-visual { margin-top: var(--space-5); }
.adaptive-rps-sample:hover { fill: var(--info-solid); }
.adaptive-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--font-size-small); }
.adaptive-small-charts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.adaptive-chart details { margin-top: var(--space-4); }
.adaptive-chart summary { cursor: pointer; font-weight: 600; }
.adaptive-details { padding-top: var(--space-1); border-top: 1px solid var(--line-soft); }
@media (max-width: 1000px) { .adaptive-result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .adaptive-small-charts, .adaptive-result-metrics { grid-template-columns: 1fr; } .adaptive-conclusion { padding: 15px; } }

/* Load report workspace: persistent progress, then focused report sections. */
.load-report-workspace { container: load-report / inline-size; min-width: 0; }
.load-report-workspace [hidden] { display: none !important; }
.load-report-live { margin-bottom: 10px; border-radius: var(--radius-section); box-shadow: none; }
.load-report-live .load-live-panel.embedded > .panel-body { padding: 10px 14px; }
.load-live-embedded-heading { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.load-live-embedded-heading .load-live-indicator { margin-bottom: 0; }
.load-live-embedded-heading > small { color: var(--text-muted); font-size: var(--font-size-caption); }
.load-report-live .load-live-embedded-heading { gap: 6px var(--space-3); margin-bottom: 6px; }
.load-live-summary-content, .load-live-summary-content > .load-live-progress-column { display: contents; }
.load-live-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-2); }
.load-live-summary-grid > .load-http-progress { padding-right: var(--space-5); }
.load-live-summary-grid > .load-live-progress-column { min-width: 0; padding-left: var(--space-5); border-left: 1px solid var(--line-soft); }
.load-report-live .load-live-summary-grid .load-live-stage { display: block; }
.load-report-live .load-live-summary-grid .load-live-progress-heading { gap: 6px var(--space-3); flex-wrap: wrap; margin-bottom: 9px; font-size: var(--font-size-small); }
.load-report-live .load-live-summary-grid .load-live-progress-heading > strong { font-size: var(--font-size-section); }
.load-report-live .load-live-summary-grid .load-live-progress-heading small { font-size: var(--font-size-caption); }
.load-report-live .load-live-summary-grid .inline-progress { height: 7px; }
.load-run-summary .load-live-panel.embedded .load-live-summary-grid .load-live-metrics { margin-top: 10px; gap: 6px; }
.load-run-summary .load-live-panel.embedded .load-live-summary-grid .load-live-metrics > div { padding: 7px 10px; }
.load-run-summary .load-live-panel.embedded .load-live-summary-grid .load-live-metrics strong { font-size: var(--font-size-heading-small); }
.load-run-summary .load-live-panel.embedded .load-live-summary-grid .load-live-metrics span { font-size: var(--font-size-caption); }
.load-http-progress { display: grid; align-content: start; gap: var(--space-2); min-width: 0; color: var(--text-strong); }
.load-http-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px var(--space-3); font-size: var(--font-size-small); font-weight: 600; }
.load-http-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 6px 10px; border-left: 3px solid var(--accent); border-radius: var(--radius-control); background: var(--surface-shell); }
.load-http-total > strong { color: var(--accent); font-size: var(--font-size-metric); line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.load-http-progress small { font-size: var(--font-size-caption); color: var(--text-main); font-weight: 400; }
.load-http-total > strong > small { font-size: var(--font-size-small); }
.load-http-heading > small { padding: 2px 7px; border-radius: var(--radius-compact); background: var(--surface-muted); color: var(--text-main); font-size: var(--font-size-caption); }
.load-http-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--font-size-caption); color: var(--text-main); font-variant-numeric: tabular-nums; }
.load-http-meta > span { white-space: nowrap; }
.load-http-meta b { color: var(--accent); font-weight: 600; }
.load-http-methods { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.load-http-method { --method-accent: var(--text-muted); --method-ink: var(--text-main); --method-tint: var(--surface-muted); display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding: 6px var(--space-2); border-left: 3px solid var(--method-accent); border-radius: var(--radius-compact); background: var(--method-tint); color: var(--method-ink); font-variant-numeric: tabular-nums; }
.load-http-method[data-method="GET"] { --method-accent: var(--warning); --method-ink: var(--warning); --method-tint: var(--warning-soft); }
.load-http-method[data-method="POST"] { --method-accent: var(--info); --method-ink: var(--info); --method-tint: var(--info-soft); }
.load-http-method[data-method="PUT"] { --method-accent: var(--accent); --method-ink: var(--accent); --method-tint: var(--accent-soft); }
.load-http-method[data-method="PATCH"] { --method-accent: var(--violet); --method-ink: var(--violet); --method-tint: var(--violet-soft); }
.load-http-method[data-method="DELETE"] { --method-accent: var(--danger); --method-ink: var(--danger); --method-tint: var(--danger-soft); }
.load-http-method b { padding: 2px var(--space-1); border-radius: var(--radius-compact); background: color-mix(in srgb, var(--surface-card) 70%, transparent); font-size: var(--font-size-caption); letter-spacing: .02em; }
.load-http-method > strong { color: var(--method-ink); font-size: var(--font-size-section); }
.load-http-note { flex-basis: 100%; }
.load-live-summary-grid > .load-http-progress,
.load-report-live .load-live-summary-grid .load-live-generation { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(22px, auto) minmax(46px, auto) auto; align-content: start; align-items: stretch; gap: var(--space-2); }
.load-report-live .load-live-summary-grid .load-live-generation > .load-live-progress-heading { display: flex; align-items: center; margin: 0; font-weight: 600; }
.load-http-heading { min-height: 22px; align-items: center; }
.load-live-summary-grid .load-http-total { min-height: 46px; }
.load-live-progress-total { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--space-3); min-width: 0; min-height: 46px; padding: var(--space-1) var(--space-3) 9px; border-radius: var(--radius-control); background: var(--surface-muted); color: var(--text-strong); }
.load-live-progress-total > strong { font-size: var(--font-size-metric); line-height: 1.15; font-variant-numeric: tabular-nums; }
.load-live-progress-total > strong > span { font-size: var(--font-size-section); font-weight: 600; }
.load-live-progress-total > small { margin-left: auto; font-size: var(--font-size-small); font-weight: 600; }
.load-report-live .load-live-summary-grid .load-live-progress-total > .inline-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; border-radius: 0 0 var(--radius-control) var(--radius-control); }
.load-run-summary .load-live-panel.embedded .load-live-summary-grid .load-live-generation > .load-live-metrics { grid-column: 1; grid-row: 3; margin: 0; align-self: start; }
@container load-report (max-width: 760px) {
    .load-live-summary-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .load-live-summary-grid > .load-http-progress { padding-right: 0; }
    .load-live-summary-grid > .load-live-progress-column { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); }
}
.adaptive-dashboard > .adaptive-dashboard-body:not(:has(> .adaptive-result-metrics)) { grid-template-areas: "chart" "insights" "http" "stages"; }
.load-report-execution-link { display: block; margin: 0 0 0 auto; border: 0; padding: 3px 0; color: var(--accent); background: transparent; font: inherit; font-size: var(--font-size-caption); cursor: pointer; }
.load-report-workspace .load-report-toolbar { padding: 0; border: 0; border-radius: 0; background: transparent; margin-bottom: var(--space-4); }
.load-report-execution { margin: 0 0 var(--space-4); }
.load-report-execution .load-run-performance { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; padding: 18px; border-top: 0; }
.load-report-execution .load-run-performance > div { padding-left: var(--space-3); border-left: 2px solid var(--line-soft); }
.load-report-execution .load-run-performance dt { order: -1; }
.load-report-threads > .panel-body { padding: var(--space-4) 18px; }
.load-report-threads .load-thread-grid { gap: 10px; }
.load-report-threads .load-thread-card { padding: 11px; }
.load-report-context { margin-top: var(--space-4); }
.load-report-context dl { margin: 0; padding: var(--space-1) 18px var(--space-4); }
.load-report-context dl > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2) var(--space-5); border-bottom: 1px solid var(--line-soft); padding: var(--space-3) 0; }
.load-report-context dt { color: var(--text-muted); }
.load-report-context dd { margin: 0; }
.adaptive-dashboard { margin: 0; border: 0; background: transparent; box-shadow: none; container: adaptive-report / inline-size; }
.adaptive-dashboard > .adaptive-dashboard-body { padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "metrics" "chart" "insights" "http" "stages"; gap: 14px; align-items: start; }
.adaptive-insights { grid-area: insights; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adaptive-dashboard .adaptive-result-metrics { grid-area: metrics; margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adaptive-dashboard .adaptive-result-metrics article { padding: 14px var(--space-4); border-radius: var(--radius-section); height: 100%; }
.adaptive-dashboard .adaptive-result-metrics strong { font-size: var(--font-size-heading-small); overflow-wrap: anywhere; }
.adaptive-dashboard .adaptive-conclusion { grid-area: conclusion; grid-template-columns: minmax(0, 1fr); gap: 0; padding: var(--space-4); border-radius: var(--radius-section); border-top: 3px solid var(--accent); }
.adaptive-dashboard .adaptive-conclusion > i { display: none; }
.adaptive-dashboard .adaptive-conclusion h3 { font-size: var(--font-size-section); }
.adaptive-dashboard .adaptive-conclusion p { font-size: var(--font-size-small); }
.adaptive-dashboard .adaptive-observations { grid-area: observations; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.adaptive-dashboard .adaptive-observations li { font-size: var(--font-size-caption); }
.adaptive-dashboard .adaptive-rps-visual { grid-area: chart; align-self: stretch; display: flex; flex-direction: column; min-width: 0; margin: 0; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.adaptive-dashboard .adaptive-section-heading { margin: 0 0 var(--space-3); align-items: center; flex-wrap: wrap; }
.adaptive-dashboard .adaptive-legend { font-size: var(--font-size-caption); gap: var(--space-2) 14px; margin: var(--space-1) 0 var(--space-3); }
.adaptive-dashboard .adaptive-stage-summary { grid-area: stages; min-width: 0; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.adaptive-dashboard .adaptive-stage-summary table { min-width: 650px; }
.adaptive-dashboard .adaptive-stage-summary th:not(:first-child), .adaptive-dashboard .adaptive-stage-summary td:not(:first-child) { text-align: right; }
.load-cache-report { margin: var(--space-4) 0 0; border-radius: var(--radius-section); }
.load-cache-report > summary { padding: 14px 18px; cursor: pointer; font-size: var(--font-size-small); overflow-wrap: anywhere; }
.load-cache-report > summary > * { margin-right: var(--space-3); }
.load-cache-report > summary small { color: var(--text-muted); }
.load-cache-report .load-cache-failed { color: var(--danger); background: var(--danger-soft); }
.load-cache-content { padding: 0 18px var(--space-4); }
.load-cache-content > p { font-size: var(--font-size-small); overflow-wrap: anywhere; }
@container adaptive-report (max-width: 800px) {
    .adaptive-dashboard > .adaptive-dashboard-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "metrics" "chart" "insights" "http" "stages"; }
    .adaptive-dashboard .adaptive-result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container load-report (max-width: 650px) {
    .load-report-execution .load-run-performance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .load-report-live .load-live-stage { display: block; }
    .load-report-live .load-live-metrics { margin-top: var(--space-2); }
}
@container adaptive-report (max-width: 400px) {
    .adaptive-dashboard svg text { font-size: var(--font-size-heading); }
    .adaptive-dashboard .adaptive-result-metrics article { padding: var(--space-3); }
    .adaptive-dashboard .adaptive-result-metrics strong { font-size: var(--font-size-heading-small); }
    .adaptive-dashboard .adaptive-stage-summary, .adaptive-dashboard .adaptive-rps-visual { padding: var(--space-3); }
}
.cache-builder { display: grid; gap: 18px; }
.cache-builder > p { margin: 0; }
.cache-builder-empty { padding: 26px; border: 1px dashed var(--info-line); border-radius: var(--radius-surface); text-align: center; background: var(--surface-shell); }
.cache-builder-empty p { margin: var(--space-2) 0 0; }
.cache-source-card { padding: var(--space-5); border: 1px solid var(--info-line); border-radius: var(--radius-surface); background: var(--surface-card); min-width: 0; }
.cache-source-heading { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-bottom: 18px; }
.cache-source-heading code { color: var(--text-main); overflow-wrap: anywhere; }
.cache-source-heading button { margin-left: auto; }
.cache-source-card > p { margin: var(--space-4) 0 0; overflow-wrap: anywhere; }
.cache-source-card details { margin-top: var(--space-4); }
.cache-source-card details > summary { cursor: pointer; margin-bottom: var(--space-3); }
.cache-preparation-fields { border: 0; margin: 0; padding: 0; min-width: 0; }

.adaptive-dashboard .adaptive-http-summary { grid-area: http; min-width: 0; padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--radius-section); background: var(--surface-card); }
.adaptive-dashboard .adaptive-http-history { grid-area: http; margin: 0; }
.adaptive-http-summary table { min-width: 500px; }
.adaptive-http-summary th, .adaptive-http-summary td { padding: 10px var(--space-3); }
.adaptive-http-summary th:not(:first-child), .adaptive-http-summary td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adaptive-http-summary td small { display: block; color: var(--text-muted); }
.adaptive-http-summary > p { margin: var(--space-3) 0 6px; }

/* The report leads with measured HTTP traffic; workflow pacing stays one click away. */
.adaptive-dashboard .adaptive-result-metrics .http-metric-total { border-top: 3px solid var(--accent); }
.adaptive-dashboard .adaptive-result-metrics .http-metric-post { border-top: 3px solid var(--info-line); }
.adaptive-dashboard .adaptive-result-metrics .http-metric-get { border-top: 3px solid var(--warning-line); }
.adaptive-dashboard summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.adaptive-chart-context { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.adaptive-chart-context > small { color: var(--text-muted); font-size: var(--font-size-caption); }
/* Scale only the plot: a wide report must not enlarge its height or axis labels. */
.adaptive-rate-chart { display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: auto clamp(12rem, 25vh, 16rem) auto; gap: var(--space-3) var(--space-2); padding: var(--space-1) 0; color: var(--text-muted); font-size: var(--font-size-caption); }
.adaptive-rate-unit { grid-column: 2; }
.adaptive-rate-y-axis { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
.adaptive-rate-y-axis span { line-height: 0; white-space: nowrap; }
.adaptive-dashboard .adaptive-rate-chart svg { grid-column: 2; grid-row: 2; width: 100%; height: 100%; min-height: 0; margin: 0; }
.adaptive-rate-x-axis { grid-column: 2; position: relative; height: 1.5em; }
.adaptive-rate-x-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.adaptive-rate-x-axis span:first-child { transform: none; }
.adaptive-rate-x-axis span:last-child { transform: translateX(-100%); }
.adaptive-chart-note { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--font-size-caption); line-height: 1.6; }
.adaptive-dashboard .adaptive-conclusion { margin: 0; }
.adaptive-confirmation-facts { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-7); margin-top: var(--space-3); padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: var(--font-size-caption); color: var(--text-muted); }
.adaptive-confirmation-facts strong { margin-left: 6px; color: var(--text-strong); }
.adaptive-dashboard .adaptive-observations, .adaptive-dashboard .adaptive-http-summary { margin-top: 0; }
.adaptive-dashboard .adaptive-observations > summary, .adaptive-http-summary > summary { font-size: var(--font-size-small); }
.adaptive-http-summary > summary small { margin-left: 10px; color: var(--text-muted); font-weight: 400; }
.adaptive-observations[open] > summary { margin-bottom: 14px; }
.adaptive-disclosure-content { margin-top: 14px; }
.adaptive-disclosure-content > p { margin: var(--space-3) 0 6px; }
@container adaptive-report (max-width: 600px) {
    .adaptive-rps-visual .segmented-control { width: 100%; }
    .adaptive-http-summary > summary small { display: block; margin: var(--space-1) 0 0 var(--space-4); }
}
@container adaptive-report (max-width: 400px) {
    .adaptive-rate-x-axis span:nth-child(even) { visibility: hidden; }
}
@container adaptive-report (max-width: 250px) {
    .adaptive-rate-x-axis span:not(:first-child):not(:last-child) { visibility: hidden; }
}

/* Shared catalog grid and page typography. */
.shared-data-grid {
    min-width: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.shared-data-grid .table-wrap { max-width: 100%; overflow-x: auto; }
.shared-data-grid .data-grid-table { margin: 0; }
.shared-data-grid .data-grid-table th { white-space: nowrap; }
.shared-data-grid .data-grid-table td { line-height: 1.5; }
.shared-data-grid .data-grid-table td small {
    font-family: inherit;
    font-size: var(--font-size-caption);
    line-height: 1.5;
    color: var(--text-muted);
}
.shared-data-grid .data-grid-table td > small,
.shared-data-grid .automated-test-main > small { display: block; margin-top: 3px; }
.shared-data-grid .data-grid-table td:first-child { min-width: 220px; }
.shared-data-grid .data-grid-table td:last-child:has(.grid-action-icon) { white-space: nowrap; }
.shared-data-grid .automated-test-main > a { font-weight: 700; color: var(--text-strong); }
.shared-data-grid .automated-test-main { width: 48%; }
.shared-data-grid .automated-test-actions .grid-row-actions { flex-wrap: nowrap; }
.shared-data-grid .workflow-target-table th:first-child,
.shared-data-grid .workflow-target-table td:first-child { width: calc(var(--control-height) + 2 * var(--space-4)); min-width: calc(var(--control-height) + 2 * var(--space-4)); text-align: center; vertical-align: middle; }
.shared-data-grid .workflow-target-table th:nth-child(6),
.shared-data-grid .workflow-target-table td:nth-child(6) { width: 84px; min-width: 84px; }
.shared-data-grid .workflow-target-table th:nth-child(4),
.shared-data-grid .workflow-target-table td:nth-child(4) { width: 16%; min-width: 160px; }
.shared-data-grid tr.is-return-focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.page-header {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    align-items: flex-start;
    gap: var(--space-5);
}
.page-header h1 { font-family: inherit; font-size: var(--font-size-heading); font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.page-header p { font-family: inherit; font-size: var(--font-size-body); line-height: 1.5; }
.page-header .page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.page-header-main { min-width: 0; }
.page-header-title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.page-header-title h1 { min-width: 0; overflow-wrap: anywhere; }
.page-header-context {
    max-width: 100%;
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-compact);
    color: var(--text-muted);
    background: var(--surface-card);
    font-size: var(--font-size-caption);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
/* Optional second row keeps run status and navigation out of the action group. */
.page-header.page-header-with-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-6);
}
.page-header-with-footer .page-header-main { flex: 1 1 24rem; }
.page-header-with-footer .page-actions { flex: 0 1 auto; min-width: 0; max-width: min(100%, 30rem); justify-content: flex-end; }
.page-header-with-footer .page-actions > .button { max-width: 100%; }
.page-actions-hint {
    flex-basis: 100%;
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    line-height: 1.5;
    text-align: right;
    overflow-wrap: anywhere;
}
/* PageActionsMenu: up to three secondary actions stay next to the primary one, «Ще» lists the rest as menu items.
   At 720 px and below the secondary actions move to the top of the menu, so the header keeps one row. */
.page-actions-secondary { display: contents; }
.page-actions-menu { display: grid; gap: var(--space-1); min-width: 0; }
.page-actions-menu-secondary { display: none; }
.page-actions-menu :is(.button, a.button) {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: var(--control-height);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    text-align: start;
    white-space: normal;
    overflow-wrap: anywhere;
}
.page-actions-menu .button.secondary:hover:not(:disabled) { border-color: transparent; background: var(--surface-muted); }
.page-actions-menu :is(.page-actions-hint, .action-hint) { padding-inline: var(--space-3); color: var(--text-muted); font-size: var(--font-size-caption); text-align: start; }
@media (max-width: 720px) {
    .page-actions-secondary { display: none; }
    .page-actions-menu-secondary { display: grid; gap: var(--space-1); padding-block-end: var(--space-1); border-block-end: 1px solid var(--line-soft); }
}
.page-header-footer {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    min-width: 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--line-soft);
    color: var(--text-muted);
    font-size: var(--font-size-caption);
    line-height: 1.5;
}
.page-header-status { display: grid; gap: var(--space-2); min-width: 0; }
.page-header-status-line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); min-width: 0; }
.page-header-status-line > span, .page-header-status-line time { overflow-wrap: anywhere; }
.page-header-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--control-height);
    color: var(--accent);
    font-weight: 600;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.page-header-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-compact); }
@media (max-width: 960px) {
    .page-header-with-footer .page-actions { max-width: 100%; justify-content: flex-start; }
    .page-header-with-footer .page-actions-hint { text-align: left; }
}
.scenario-browser > .scenario-grid-toolbar-panel { margin-bottom: var(--space-4); }
.scenario-type-header { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
@media (max-width: 720px) {
    .page-header { flex-direction: column; }
    .page-header h1 { font-size: var(--font-size-heading-small); }
    .shared-data-grid .data-grid-table th,
    .shared-data-grid .data-grid-table td { padding: 10px var(--space-3); }
}

/* MetricGrid and MetricCard: shared presentation for dashboard and report summaries. */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: var(--space-4);
    min-width: 0;
    margin: 0 0 var(--space-4);
}
.metric-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-section);
    background: var(--surface-card);
    overflow-wrap: anywhere;
}
/* A balanced six-metric overview keeps paired case types on the same row. */
.metric-grid-balanced { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) {
    .metric-grid-balanced { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .metric-grid-balanced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
    .metric-grid-balanced { grid-template-columns: minmax(0, 1fr); }
}
.metric-card-label,
.metric-card-description {
    color: var(--text-main);
    font-size: var(--font-size-caption);
    line-height: 1.5;
}
.metric-card-label { font-weight: 600; }
.metric-card-value {
    max-width: 100%;
    color: var(--text-strong);
    font-size: var(--font-size-metric);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.metric-card-description { margin-top: auto; }
.metric-card-sortable { position: relative; }
.metric-card-sortable > :is(.metric-card-label, .metric-card-heading) { padding-inline-end: var(--space-5); }
.metric-card-sort {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: var(--space-4);
    border: 0;
    border-radius: inherit !important;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.metric-sort-arrow { font-size: var(--font-size-body); font-weight: 700; line-height: 1.2; }
.metric-card-sort:hover:enabled, .metric-card-sort[aria-pressed="true"] {
    box-shadow: inset 0 0 0 2px var(--metric-color, var(--accent));
    color: var(--metric-color, var(--accent));
}
.metric-card-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.metric-card-sort:disabled { cursor: default; }
.metric-card-sort:disabled .metric-sort-arrow { visibility: hidden; }
.metric-card-sortable > .metric-card-actions { position: relative; }
@media (forced-colors: active) {
    .metric-card-sort[aria-pressed="true"] { border: 2px solid Highlight; }
}
.metric-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); max-width: 100%; }
.metric-card-actions:empty { display: none; }
.inventory-outcomes > div, .inventory-catalog-link { display: flex; align-items: baseline; gap: var(--space-1); }
.inventory-outcomes { display: grid; margin: 0; font-size: var(--font-size-caption); line-height: 1.35; }
.inventory-outcomes > div { justify-content: space-between; gap: var(--space-2); }
.inventory-outcomes dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.inventory-outcomes .passed { color: var(--success); }
.inventory-outcomes .failed { color: var(--danger); }
.inventory-catalog-link { font-size: var(--font-size-caption); align-items: center; }
/* Semantic tones also apply to full dashboard cards, using the same status palette. */
.metric-card.metric-tone-success { --metric-color: var(--success); --metric-background: var(--success-soft); }
.metric-card.metric-tone-danger { --metric-color: var(--danger); --metric-background: var(--danger-soft); }
.metric-card.metric-tone-warning { --metric-color: var(--warning); --metric-background: var(--warning-soft); }
.metric-card.metric-tone-info { --metric-color: var(--info); --metric-background: var(--info-soft); }
.metric-card.metric-tone-violet { --metric-color: var(--violet); --metric-background: var(--violet-soft); }
/* Neutral surface: the tone shows only in the top edge, icon and value, so color keeps its status meaning. */
.metric-grid:not(.metric-grid-inline) > .metric-card {
    border-top-color: var(--metric-color, var(--line-soft));
    background: var(--surface-card);
}
.metric-grid:not(.metric-grid-inline) .metric-card-value { color: var(--metric-color, var(--text-strong)); }
/* Opt-in report cards keep icons, percentages and scales in the shared metric system. */
.metric-card-heading { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-width: 0; }
.metric-card-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--metric-icon-size); width: var(--metric-icon-size); height: var(--metric-icon-size); border-radius: var(--radius-control); color: var(--metric-color, var(--text-muted)); background: var(--metric-background, var(--surface-muted)); font-size: var(--font-size-body); }
.metric-card-heading .metric-card-label { min-width: 0; }
.metric-card-reading { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-3); max-width: 100%; }
.metric-card-reading-detailed { width: 100%; align-items: center; justify-content: space-between; }
.metric-card-note { font-size: var(--font-size-caption); color: var(--metric-color, var(--text-muted)); }
.metric-card-progress { flex-shrink: 0; width: 100%; height: var(--metric-progress-height); overflow: hidden; border-radius: var(--radius-compact); background: var(--surface-muted-2); }
.metric-card-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--metric-color, var(--accent)); }
.metric-grid-emphasized { margin: 0; gap: var(--space-3); }
.metric-grid-emphasized > .metric-card { padding: var(--space-5); gap: var(--space-3); box-shadow: var(--shadow-card); }
.metric-grid-emphasized .metric-card-heading { align-items: flex-start; }
.metric-grid-emphasized .metric-card-value { font-size: var(--font-size-metric-emphasized); letter-spacing: -.035em; }
@media (forced-colors: active) {
    .metric-card-progress { border: 1px solid CanvasText; }
    .metric-card-progress > span { background: Highlight; forced-color-adjust: none; }
}
/* Inline summaries retain the shared metric semantics without dashboard tiles. */
.metric-grid.metric-grid-inline { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; }
.metric-grid-inline > .metric-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1) var(--space-2);
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.metric-grid-inline .metric-card-value { font-size: var(--font-size-body); line-height: 1.5; }
.metric-grid-inline .metric-card-description { flex-basis: 100%; }

/* Compact inline summaries keep labels and counts together in dense lists. */
.metric-grid-inline.metric-grid-compact { gap: var(--space-1) var(--space-2); }
.metric-grid-compact > .metric-card {
    --metric-color: var(--text-muted);
    --metric-background: var(--surface-muted);
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-compact);
    background: var(--metric-background);
    line-height: 1.25;
}
.metric-grid-compact > .metric-tone-success { --metric-color: var(--success); --metric-background: var(--success-soft); }
.metric-grid-compact > .metric-tone-danger { --metric-color: var(--danger); --metric-background: var(--danger-soft); }
.metric-grid-compact > .metric-tone-warning { --metric-color: var(--warning); --metric-background: var(--warning-soft); }
.metric-grid-compact > .metric-tone-info { --metric-color: var(--info); --metric-background: var(--info-soft); }
.metric-grid-compact .metric-card-label { color: var(--metric-color); font-weight: 400; }
.metric-grid-compact .metric-card-value { color: var(--metric-color); font-size: var(--font-size-caption); }

/* Compact numeric pairs retain accessible labels and semantic result colors. */
.metric-grid.metric-grid-ratio { flex-wrap: nowrap; gap: 0; }
.metric-grid-ratio > .metric-card { position: relative; flex-wrap: nowrap; gap: 0; padding: 0; background: transparent; }
.metric-grid-ratio > .metric-card + .metric-card::before { content: "/"; margin-inline: var(--space-1); color: var(--text-muted); }
.metric-grid-ratio .metric-card-value { color: var(--metric-color, var(--text-strong)); }

/* Protocol devices share the application controls and responsive sizing tokens. */
.protocol-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-6); }
.protocol-layout > section, .protocol-simulator { min-width: 0; }
.protocol-layout label { display: block; margin-block: var(--space-2); }
.protocol-simulator .emulator-compartments { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--space-3); }
.protocol-simulator .emulator-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-3); }
.protocol-timeline { padding-inline-start: var(--space-6); }
.protocol-timeline li { margin-block: var(--space-3); overflow-wrap: anywhere; }
.protocol-capability-table { overflow-x: auto; }
.protocol-capability-table td, .protocol-capability-table th { padding: var(--space-2); text-align: left; vertical-align: top; }
.protocol-cell { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-4); min-height: 9rem; text-align: left; }
.protocol-print-job, .protocol-exchange { border: 1px solid var(--line-soft); border-radius: var(--radius-control); padding: var(--space-3); margin-block: var(--space-3); }
.protocol-simulator p, .protocol-simulator strong, .protocol-simulator span,
.protocol-simulator h2, .protocol-simulator h3, .protocol-simulator h4 { overflow-wrap: anywhere; }
.protocol-simulator pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28rem; overflow-y: auto; }
.protocol-label { width: 100%; height: 24rem; border: 1px solid var(--line-soft); }
@media (max-width: 60rem) { .protocol-layout { grid-template-columns: minmax(0, 1fr); } }

/* Shared visual rhythm. Specialized editors keep their layout and touch sizes. */
body { background: var(--surface-page); color: var(--text-main); font-size: var(--font-size-body); line-height: 1.5; }
/* Shared scrollbars for the page, navigation, tables, editors and dialogs.
   Touch and forced-colors users keep their native controls. */
@media (pointer: fine) and (forced-colors: none) {
    * { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }

    @supports selector(::-webkit-scrollbar) {
        /* Standard scrollbar properties otherwise override these pseudo-elements. */
        * { scrollbar-width: auto; scrollbar-color: auto; }
        ::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
        ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-pill); }
        ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
        ::-webkit-scrollbar-button { display: none; }
    }
}
::selection { background: var(--accent-soft); color: var(--text-strong); }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input, select, textarea { color-scheme: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-solid); }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; }

.brand { padding-bottom: 18px; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--radius-control); background: var(--accent-solid); box-shadow: none; }
.nav-menu { --nav-group-duration: 260ms; --nav-group-easing: cubic-bezier(.22, 1, .36, 1); --nav-item-gap: calc(var(--space-1) / 2); --nav-icon-width: 1rem; gap: var(--nav-item-gap); }
.nav-section { min-width: 0; }
.nav-group-panel {
    display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
    transition: grid-template-rows var(--nav-group-duration) var(--nav-group-easing), opacity 160ms ease, visibility 0s linear var(--nav-group-duration);
}
.nav-group-panel.is-expanded { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-group-clip { min-height: 0; overflow: hidden; }
.nav-group-items { display: grid; gap: var(--nav-item-gap); min-width: 0; padding-inline-start: var(--space-3); }
.nav-menu a { grid-template-columns: var(--nav-icon-width) minmax(0, 1fr); gap: var(--space-2); min-height: var(--control-height-compact); padding: var(--space-1) 10px; font-size: var(--font-size-field); font-weight: 600; border-radius: var(--radius-control); color: var(--text-main); }
.nav-menu a > span { min-width: 0; overflow-wrap: anywhere; }
.nav-menu a:focus-visible { outline-offset: -2px; }
.nav-menu a:hover { background: var(--surface-muted); color: var(--text-strong); }
/* The current page is a filled tile; an edge line would bend into a bracket on the rounded corners. */
.nav-menu a.active { color: var(--accent); background: var(--accent-soft); box-shadow: none; font-weight: 600; }
.nav-menu a.active:hover { color: var(--accent-hover); background: var(--accent-soft); }
.nav-menu a i { width: var(--nav-icon-width); color: var(--text-muted); }
.nav-menu a.active i, .nav-group-items > a:has(+ .nav-submenu a.active) i { color: var(--accent); }
.nav-menu .nav-submenu { gap: var(--nav-item-gap); margin-block: var(--nav-item-gap) var(--space-1); }
.nav-menu .nav-submenu a { min-height: var(--control-height-compact); padding-block: var(--space-1); font-size: var(--font-size-caption); }
.nav-menu .nav-submenu a.active { box-shadow: none; }
/* The parent identifies the section; when a child is current, only that child gets a filled tile. */
.nav-group-items > a:has(+ .nav-submenu a.active) { color: var(--accent); background: transparent; box-shadow: none; font-weight: 600; }
.nav-group-items > a:has(+ .nav-submenu):hover { color: var(--accent-hover); background: var(--surface-muted); }
.nav-menu .nav-group {
    display: grid; grid-template-columns: var(--nav-icon-width) minmax(0, 1fr) .75rem; align-items: center; gap: var(--space-2);
    width: 100%; min-height: var(--control-height); margin: 0; padding: var(--space-1) 10px;
    border: 0; border-radius: var(--radius-control); background: transparent; box-shadow: none;
    /* 12 px capitals: a tight tracking keeps the longest group («Адміністрування») on one line. */
    font-family: inherit; font-size: var(--font-size-caption); font-weight: 600; line-height: 1.4; letter-spacing: .02em;
    color: var(--text-muted); text-align: left; cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}
.nav-menu .nav-group > span { min-width: 0; overflow-wrap: anywhere; }
.nav-menu .nav-group-icon { width: var(--nav-icon-width); font-size: var(--font-size-field); text-align: center; }
.nav-menu .nav-group-chevron { font-size: var(--font-size-caption); text-align: center; transition: transform var(--nav-group-duration) var(--nav-group-easing); }
.nav-menu .nav-group[aria-expanded="true"] > .nav-group-chevron { transform: rotate(-180deg); }
.nav-menu .nav-group:hover { background: var(--surface-muted); color: var(--text-strong); }
.nav-menu .nav-group.is-current, .nav-menu .nav-group[aria-expanded="true"] { color: var(--accent); }
.nav-menu .nav-group:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Shown only as the heading of a group flyout in the collapsed menu (MainLayout.razor.css). */
.nav-flyout-title { display: none; }
@media (prefers-reduced-motion: reduce) {
    .nav-group-panel, .nav-menu .nav-group, .nav-menu .nav-group-chevron { transition: none; }
}
@media (pointer: coarse) {
    .nav-menu .nav-group, .nav-menu a, .nav-menu .nav-submenu a { min-height: var(--control-height-readable); }
}
@media (max-width: 600px) {
    .nav-group-items, .nav-menu .nav-submenu { grid-template-columns: minmax(0, 1fr); }
}

.page-header.page-header { gap: var(--space-3) var(--space-5); margin-bottom: var(--space-4); font-family: inherit; }
.page-header.page-header h1 { margin: 0; font-size: var(--font-size-heading); line-height: 1.3; font-weight: 600; letter-spacing: -.025em; color: var(--text-strong); }
.page-header.page-header p { margin-top: var(--space-1); font-size: var(--font-size-field); line-height: 1.55; color: var(--text-muted); }
.page-header .page-actions { gap: var(--space-2); }
.page-header-footer { padding-top: var(--space-3); }
.panel-header h2, .release-modal-header h2, .endpoint-modal-header h2,
.section-edit-modal-header h2 { font-size: var(--font-size-section); font-weight: 600; letter-spacing: -.01em; line-height: 1.4; }
.panel, .stat-card, .breakdown-card, .scenario-type-group, .version-result-group, .scenario-version-sidebar,
.latest-version-run, .live-run-card, .metric-card { box-shadow: var(--shadow-card); backdrop-filter: none; }
.panel-header { padding: var(--space-3) var(--space-4); }
.panel-body { padding: var(--space-4); }
.metric-card { padding: var(--space-4); border-radius: var(--radius-surface); }
.metric-card-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.release-modal, .endpoint-modal, .section-edit-modal { box-shadow: var(--shadow-dialog); }

.button, button.button { font-size: var(--font-size-field); font-weight: 600; border-radius: var(--radius-control); box-shadow: none; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
.button:not(.secondary):not(.danger):not(.ghost):not(.choice):not(.microsoft-sign-in) { box-shadow: none; }
.button:not(.secondary):not(.danger):not(.ghost):not(.choice):not(.microsoft-sign-in):hover:not(:disabled) { background: var(--accent-solid-hover); }
.button.secondary { color: var(--text-main); background: var(--surface-card); border: 1px solid var(--line-strong); }
.button.secondary:hover:not(:disabled) { background: var(--surface-muted); border-color: var(--line-strong); }
.button.danger { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-line); box-shadow: none; }
.button.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.button.ghost { color: var(--text-main); background: transparent; box-shadow: none; }
.button.ghost:hover:not(:disabled) { color: var(--text-strong); background: var(--surface-muted); }
.form-control { border-color: var(--line-strong); border-radius: var(--radius-control); background: var(--surface-card); color: var(--text-strong); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.scenario-editor-studio textarea.form-control { font-size: var(--font-size-field-compact); }
.data-grid-table { font-size: var(--font-size-field); }
.table-wrap { position: relative; min-width: 0; }
.data-grid-table th { color: var(--text-muted); font-weight: 600; background: var(--surface-shell); letter-spacing: .025em; }
.data-grid-table th, .data-grid-table td { padding: 10px var(--space-3); }
.data-grid-toolbar { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
.status-badge, .soft-pill { font-weight: 600; }
/* Status colors: the single effective definition for both themes (the tokens switch with the theme).
   1. .status-<key> serves markup that still writes a status key by hand (Users, sessions, profile).
   2. StatusBadge always adds .status-tone-*, derived from Value or the explicit Tone, never from the label;
      the tone selectors are more specific, so an explicit Tone wins over the key. */
.status-queued, .status-pending, .status-cancelled, .status-not-run, .status-notrun, .status-inactive, .status-skipped { color: var(--text-main); background: var(--surface-muted); }
.status-active, .status-passed, .status-success, .status-badge.status-post { color: var(--success); background: var(--success-soft); }
.status-failed, .status-error, .status-timedout, .status-badge.status-delete { color: var(--danger); background: var(--danger-soft); }
.status-blocked, .status-manual, .status-aborted, .status-interrupted, .status-badge.status-put, .status-badge.status-patch { color: var(--warning); background: var(--warning-soft); }
.status-running, .status-inprogress { color: var(--accent); background: var(--accent-soft); }
.status-completed, .status-badge.status-get { color: var(--info); background: var(--info-soft); }
.status-badge.status-tone-neutral { color: var(--text-main); background: var(--surface-muted); }
.status-badge.status-tone-success { color: var(--success); background: var(--success-soft); }
.status-badge.status-tone-danger { color: var(--danger); background: var(--danger-soft); }
.status-badge.status-tone-warning { color: var(--warning); background: var(--warning-soft); }
.status-badge.status-tone-info { color: var(--info); background: var(--info-soft); }
.status-badge.status-tone-accent { color: var(--accent); background: var(--accent-soft); }
.status-badge.status-tone-violet { color: var(--violet); background: var(--violet-soft); }

.business-flow-node[style*="--node-ink"] .business-flow-node-label,
.business-flow-node[style*="--node-ink"] .business-flow-node-label small { color: var(--node-ink); }
.node-end:not([style*="--node-ink"]) .business-flow-node-label,
.node-end:not([style*="--node-ink"]) .business-flow-node-label small { color: var(--text-on-accent); }

.theme-picker { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; color: var(--text-muted); }
.theme-picker > i { font-size: var(--font-size-body); }
.theme-picker select { --field-height: var(--control-height); --field-font-size: var(--font-size-field); width: max(112px, 8.5em); max-width: 100%; }
.theme-picker-quiet { gap: var(--space-1); }
.theme-picker-quiet > i { font-size: var(--font-size-caption); }
.theme-picker-quiet select { --field-height: var(--control-height-compact); --field-font-size: var(--font-size-caption); }
.theme-picker.theme-picker-quiet select:not([multiple]) { color: var(--text-muted); font-weight: 400; border-color: transparent; background-color: transparent; box-shadow: none; }
.theme-picker.theme-picker-quiet select:hover { border-color: var(--line-soft); background-color: var(--surface-muted); }
.theme-picker.theme-picker-quiet select:focus-visible { border-color: var(--accent); background-color: var(--surface-card); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 10000; transform: translateY(-160%); padding: 10px var(--space-4); background: var(--surface-card); color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-control); }
.skip-link:focus { transform: translateY(0); }

@media (max-width: 720px) {
    .page-header.page-header h1 { font-size: var(--font-size-heading-small); }
    .page-header .page-actions { width: 100%; }
    .page-header .page-actions > .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; height: auto !important; padding-block: 7px; }
    .panel-header, .panel-body { padding: var(--space-3); }
}
@media (pointer: coarse) {
    .theme-picker select { --field-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .button, button.button { transition: none; }
}

/* One grid toolbar and filter drawer across catalogs, reports and journals. */
.data-grid-toolbar > * { min-width: 0; }
.data-grid-filter-drawer-body { overscroll-behavior: contain; }
.data-grid-filter-drawer-body label { display: grid; gap: 6px; min-width: 0; }
.data-grid-filter-drawer-body .compact-check { display: flex; }
.data-grid-filter-drawer-body .form-control { width: 100%; min-width: 0; }
.data-grid-filter-drawer-header p { font-size: var(--field-text-size); }
.data-grid-filter-drawer-footer { padding-bottom: max(13px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.data-grid-filter-drawer-footer .button { white-space: normal; }
.data-grid-scope-note { padding: 0 var(--space-4); }
body:has(.data-grid-filter-backdrop) { overflow: hidden; }
.test-case-tree > .data-grid-toolbar .data-grid-result-count { display: block; }
@media (max-width: 900px) {
    .data-grid-toolbar, .test-case-tree > .data-grid-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
    .data-grid-search-field { grid-column: 1 / -1; }
    .data-grid-result-count { display: block; white-space: normal; }
    .data-grid-toolbar-actions { justify-content: flex-end; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .data-grid-filter-drawer { animation: none; }
}

.data-grid-filter-form { display: contents; }

/* Wrap against the actual panel width, including browser/text zoom and sidebars. */
.data-grid-toolbar { display: flex; flex-wrap: wrap; }
.data-grid-search-field { flex: 1 1 240px; max-width: 430px; }
.data-grid-result-count { flex: 0 1 auto; white-space: normal; }
.data-grid-toolbar-actions { margin-left: auto; flex-wrap: wrap; }
.data-grid-toolbar-field { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); min-width: 0; max-width: 100%; font-size: var(--font-size-field); color: var(--text-muted); }
.data-grid-toolbar-field > .form-control { width: auto; min-width: 0; max-width: 100%; flex: 1 1 auto; }
.panel:has(.data-grid-filter-backdrop) { backdrop-filter: none; }
@media (max-width: 900px) {
    .data-grid-search-field { flex-basis: 100%; max-width: none; }
}

.two-column > .panel, .shared-data-grid { min-width: 0; max-width: 100%; }
@media (max-width: 1100px) { .two-column { grid-template-columns: minmax(0, 1fr); } }

.data-grid-pending-filter { color: var(--text-muted); font-size: var(--field-text-size); }

/* One native dropdown treatment; editor and touch variants keep their field density.
   Arrow longhands are protected from page-level background/padding shorthands. */
select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
    appearance: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background-color: var(--surface-card);
    color: var(--text-strong);
    font-weight: 600;
    padding-left: var(--select-padding-start, 9px);
    padding-right: calc(var(--select-arrow-inset) + var(--select-arrow-width) + 8px) !important;
    background-image: var(--select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right var(--select-arrow-inset) center !important;
    background-size: var(--select-arrow-width) var(--select-arrow-height) !important;
    background-origin: border-box !important;
    text-overflow: ellipsis;
    cursor: pointer;
}
select:not([multiple]):not([size]):focus,
select:not([multiple])[size="1"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
select:disabled { opacity: .6; cursor: not-allowed; }
@media (forced-colors: active) {
    select:not([multiple]):not([size]), select:not([multiple])[size="1"] {
        appearance: auto;
        background-image: none !important;
    }
}

/* A disabled fieldset retains shared editor layout for roles with view access. */
.permission-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Shared form wrapper for view-only permissions. */
.permission-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
