/* Acwise Models tab (Evaluator v2) scope.
 *
 * Every --ds-* token resolves to the app tokens in style.css (one-theme pass,
 * 2026-11-12): Plus Jakarta Sans for text and figures (tabular numerals, no
 * monospace), the app grays, controls 32px / 8px radius, cards 10px radius.
 * The Inter + IBM Plex Mono fonts and the 2/4/6px radii are retired. State
 * colors stay for state only (a failed run, an error), never as a verdict.
 * Namespaced under `.ds-scope`; the Models tab container opts in.
 */

.ds-scope {
    /* ─── Color: brand ─── */
    --ds-accent:           var(--primary-color, #1E3A5F);
    --ds-accent-hover:     var(--primary-dark, #162D4A);
    --ds-accent-soft:      rgba(30, 58, 95, 0.06);

    /* ─── Color: grays (app tokens) ─── */
    --ds-fg:               var(--text-primary, #1F2937);
    --ds-fg-muted:         var(--text-secondary, #4B5563);
    --ds-fg-subtle:        var(--text-muted, #6B7280);
    --ds-fg-faint:         var(--text-muted, #6B7280);
    /* Aliases older markup in evaluator_v2.js reads. */
    --ds-text:             var(--ds-fg);
    --ds-text-muted:       var(--ds-fg-subtle);

    --ds-bg:               var(--bg-card, #FFFFFF);
    --ds-bg-subtle:        var(--bg-input, #F5F7FA);
    --ds-bg-hover:         var(--bg-hover, #F3F4F6);

    --ds-border:           var(--border-color, #E5E7EB);
    --ds-border-strong:    var(--border-color, #E5E7EB);

    /* ─── Color: state (errors only; success/warn are neutral) ─── */
    --ds-success:          var(--text-secondary, #4B5563);
    --ds-success-soft:     var(--bg-input, #F5F7FA);
    --ds-warn:             var(--text-secondary, #4B5563);
    --ds-warn-soft:        var(--bg-input, #F5F7FA);
    --ds-danger:           var(--error-color, #DC2626);
    --ds-danger-soft:      var(--bg-input, #F5F7FA);

    /* ─── Type (the app font; figures use tabular numerals) ─── */
    --ds-font-ui:          var(--font-body, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    --ds-font-mono:        var(--font-body, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);

    --ds-text-xs:          11.5px;
    --ds-text-sm:          12px;
    --ds-text-base:        13px;
    --ds-text-md:          13px;
    --ds-text-lg:          15px;
    --ds-text-xl:          20px;
    --ds-text-2xl:         26px;

    --ds-leading-tight:    1.2;
    --ds-leading-normal:   1.45;

    /* ─── Spacing (4px grid) ─── */
    --ds-space-1:          4px;
    --ds-space-2:          8px;
    --ds-space-3:          12px;
    --ds-space-4:          16px;
    --ds-space-5:          20px;
    --ds-space-6:          24px;
    --ds-space-8:          32px;

    /* ─── Radius (kit: controls 8px, cards 10px) ─── */
    --ds-radius-sm:        var(--radius-control, 8px);
    --ds-radius-md:        var(--radius-control, 8px);
    --ds-radius-lg:        var(--radius-card, 10px);
    --ds-radius-pill:      999px;

    /* Borders > shadows. The kit popover shadow for popovers/modals. */
    --ds-shadow-popover:   0 8px 24px rgba(15, 23, 42, 0.12);

    color: var(--ds-fg);
    font-family: var(--ds-font-ui);
    font-size: var(--ds-text-base);
    line-height: var(--ds-leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tabular figures for any numeric column / metric */
.ds-scope .ds-num,
.ds-scope .ds-mono {
    font-family: var(--ds-font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ─── Layout primitives ─── */

.ds-scope .ds-page {
    padding: var(--ds-space-6);
    max-width: 1280px;
    margin: 0 auto;
}

.ds-scope .ds-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ds-space-5);
}

.ds-scope .ds-page-header h1 {
    margin: 0;
    font-size: var(--ds-text-xl);
    font-weight: 600;
    color: var(--ds-fg);
    letter-spacing: -0.01em;
}

.ds-scope .ds-page-header .ds-eyebrow {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.ds-scope .ds-section {
    margin-bottom: var(--ds-space-6);
}

.ds-scope .ds-section-title {
    font-size: var(--ds-text-sm);
    font-weight: 600;
    color: var(--ds-fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 var(--ds-space-3) 0;
}

/* ─── Card ─── */

.ds-scope .ds-card {
    background: var(--ds-bg);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    overflow: hidden;
}

.ds-scope .ds-card-padded {
    padding: var(--ds-space-4);
}

/* ─── Buttons ─── */

.ds-scope .ds-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    height: 32px;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: var(--ds-font-ui);
    font-size: var(--ds-text-base);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--ds-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 100ms ease, border-color 100ms ease, color 100ms ease;
    user-select: none;
    white-space: nowrap;
}

.ds-scope .ds-btn:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
}

.ds-scope .ds-btn-primary {
    background: var(--ds-accent);
    color: #FFFFFF;
    border-color: var(--ds-accent);
}
.ds-scope .ds-btn-primary:hover { background: var(--ds-accent-hover); border-color: var(--ds-accent-hover); }

.ds-scope .ds-btn-secondary {
    background: var(--ds-bg);
    color: var(--ds-fg);
    border-color: var(--ds-border-strong);
}
.ds-scope .ds-btn-secondary:hover { background: var(--ds-bg-hover); }

.ds-scope .ds-btn-ghost {
    background: transparent;
    color: var(--ds-fg-muted);
    border-color: transparent;
}
.ds-scope .ds-btn-ghost:hover { background: var(--ds-bg-hover); color: var(--ds-fg); }

.ds-scope .ds-btn-sm { padding: 0 10px; font-size: var(--ds-text-sm); }

.ds-scope .ds-btn-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ─── Input ─── */

.ds-scope .ds-input {
    display: block;
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    padding: 0 10px;
    font-family: var(--ds-font-ui);
    font-size: var(--ds-text-base);
    color: var(--ds-fg);
    background: var(--ds-bg);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-md);
    transition: border-color 100ms ease, box-shadow 100ms ease;
}
.ds-scope .ds-input:focus {
    outline: none;
    border-color: var(--ds-accent);
    box-shadow: 0 0 0 3px var(--ds-accent-soft);
}
.ds-scope .ds-input::placeholder { color: var(--ds-fg-faint); }

.ds-scope .ds-select {
    /* Same surface as input — caller picks <select> tag */
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2394A3B8' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

/* ─── Stat strip ─── */

.ds-scope .ds-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: var(--ds-border);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    overflow: hidden;
}

.ds-scope .ds-stat {
    background: var(--ds-bg);
    padding: var(--ds-space-3) var(--ds-space-4);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ds-scope .ds-stat-label {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ds-scope .ds-stat-value {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-lg);
    font-weight: 600;
    color: var(--ds-fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.ds-scope .ds-stat-sub {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
}

/* ─── Run row (recent runs list) ─── */

.ds-scope .ds-run-list {
    display: flex;
    flex-direction: column;
}

.ds-scope .ds-run-row {
    display: grid;
    /* Three cells: score (fixed) | name+meta (flex) | actions (auto-sized) */
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: var(--ds-space-3);
    padding: 10px var(--ds-space-4);
    background: var(--ds-bg);
    border-bottom: 1px solid var(--ds-border);
    text-decoration: none;
    color: inherit;
    transition: background 80ms ease;
    cursor: pointer;
}
/* Stacks the property name and the meta sub-row (location · template · duration)
   inside grid column 2 so actions on the right line up cleanly. */
.ds-scope .ds-run-namecol {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ds-scope .ds-run-row:last-child { border-bottom: 0; }
.ds-scope .ds-run-row:hover { background: var(--ds-bg-hover); }

.ds-scope .ds-run-score {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-md);
    font-weight: 600;
    color: var(--ds-fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    text-align: left;
}
.ds-scope .ds-run-name {
    font-weight: 500;
    color: var(--ds-fg);
    font-size: var(--ds-text-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ds-scope .ds-run-time {
    font-size: var(--ds-text-sm);
    color: var(--ds-fg-subtle);
    font-variant-numeric: tabular-nums;
    font-family: var(--ds-font-mono);
}
.ds-scope .ds-run-status {
    font-size: var(--ds-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid transparent;
}
.ds-scope .ds-run-status.is-complete { color: var(--ds-success); border-color: var(--ds-success); background: var(--ds-success-soft); }
.ds-scope .ds-run-status.is-failed   { color: var(--ds-danger);  border-color: var(--ds-danger);  background: var(--ds-danger-soft);  }
.ds-scope .ds-run-status.is-running  { color: var(--ds-accent);  border-color: var(--ds-accent);  background: var(--ds-accent-soft); }

.ds-scope .ds-run-arrow {
    color: var(--ds-fg-faint);
    width: 14px;
    height: 14px;
}

/* ─── Active run banner ─── */

.ds-scope .ds-active-banner {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    padding: var(--ds-space-4);
    background: var(--ds-bg);
    border: 1px solid var(--ds-accent);
    border-left: 3px solid var(--ds-accent);
    border-radius: var(--ds-radius-md);
}
.ds-scope .ds-active-spinner {
    width: 14px; height: 14px;
    border: 2px solid var(--ds-border);
    border-top-color: var(--ds-accent);
    border-radius: 50%;
    animation: ds-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }
.ds-scope .ds-active-label {
    font-size: var(--ds-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--ds-accent);
}
.ds-scope .ds-active-name {
    font-weight: 600;
    color: var(--ds-fg);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ds-scope .ds-active-step { font-size: var(--ds-text-sm); color: var(--ds-fg-muted); }
.ds-scope .ds-active-elapsed {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-sm);
    color: var(--ds-fg-subtle);
    font-variant-numeric: tabular-nums;
}

/* ─── Modal ─── */

.ds-scope .ds-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8vh;
}
.ds-scope .ds-modal {
    background: var(--ds-bg);
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-popover);
    width: 560px;
    max-width: calc(100vw - 32px);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ds-scope .ds-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ds-space-4);
    border-bottom: 1px solid var(--ds-border);
}
.ds-scope .ds-modal-header h2 {
    margin: 0;
    font-size: var(--ds-text-lg);
    font-weight: 600;
}
.ds-scope .ds-modal-body { padding: var(--ds-space-4); overflow-y: auto; }
/* Neutral notice (the run receipt): one look whatever the counts say. */
.ds-scope .ds-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: var(--ds-bg-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    color: var(--ds-fg);
    font-size: var(--ds-text-sm);
}
.ds-scope .ds-notice-sub { font-size: var(--ds-text-xs); margin-top: 2px; color: var(--ds-fg-muted); }
.ds-scope .ds-notice-x {
    background: transparent; border: none; color: var(--ds-fg-muted);
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px;
}
/* Neutral chip (source labels, the Issues flag). */
.ds-scope .ds-chip {
    display: inline-flex; align-items: center;
    font-size: var(--ds-text-xs); font-weight: 600;
    padding: 1px 8px; border-radius: var(--ds-radius-pill);
    background: var(--ds-bg-subtle); color: var(--ds-fg-muted);
    border: 1px solid var(--ds-border);
    white-space: nowrap; font-family: inherit;
}
button.ds-chip { cursor: pointer; }
.ds-scope .ds-btn-danger { background: var(--ds-danger); color: #FFFFFF; border-color: var(--ds-danger); }
.ds-scope .ds-btn-danger:hover { filter: brightness(0.92); }
.ds-scope .ds-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--ds-space-2);
    padding: var(--ds-space-3) var(--ds-space-4);
    border-top: 1px solid var(--ds-border);
    background: var(--ds-bg-subtle);
}

.ds-scope .ds-deal-pick-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    max-height: 280px;
    overflow-y: auto;
}
.ds-scope .ds-deal-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px var(--ds-space-3);
    border-bottom: 1px solid var(--ds-border);
    cursor: pointer;
    background: var(--ds-bg);
    transition: background 80ms ease;
}
.ds-scope .ds-deal-pick:last-child { border-bottom: 0; }
.ds-scope .ds-deal-pick:hover { background: var(--ds-bg-hover); }
.ds-scope .ds-deal-pick.is-selected { background: var(--ds-accent-soft); }
.ds-scope .ds-deal-pick.is-disabled { color: var(--ds-fg-faint); cursor: not-allowed; }
.ds-scope .ds-deal-pick.is-disabled:hover { background: var(--ds-bg); }

.ds-scope .ds-deal-pick-name {
    font-size: var(--ds-text-base);
    color: var(--ds-fg);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ds-scope .ds-deal-pick-meta {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
}

.ds-scope .ds-form-row {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-1);
    margin-bottom: var(--ds-space-3);
}
.ds-scope .ds-form-row label {
    font-size: var(--ds-text-xs);
    font-weight: 600;
    color: var(--ds-fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ds-scope .ds-checkbox-row {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    font-size: var(--ds-text-base);
    color: var(--ds-fg);
    cursor: pointer;
}
.ds-scope .ds-checkbox-row input[type="checkbox"] {
    width: 14px; height: 14px;
    accent-color: var(--ds-accent);
    cursor: pointer;
}

/* Empty state */
.ds-scope .ds-empty {
    padding: var(--ds-space-6);
    text-align: center;
    color: var(--ds-fg-subtle);
    font-size: var(--ds-text-sm);
}

/* ─── Sub-nav (tabs inside a screen) ─── */

.ds-scope .ds-subnav {
    display: flex;
    gap: var(--ds-space-1);
    border-bottom: 1px solid var(--ds-border);
    margin-bottom: var(--ds-space-5);
}
.ds-scope .ds-subnav-tab {
    padding: 8px 14px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--ds-fg-muted);
    font-family: var(--ds-font-ui);
    font-size: var(--ds-text-base);
    font-weight: 500;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 80ms ease, border-color 80ms ease;
}
.ds-scope .ds-subnav-tab:hover { color: var(--ds-fg); }
.ds-scope .ds-subnav-tab.is-active {
    color: var(--ds-accent);
    border-bottom-color: var(--ds-accent);
}

/* ─── Drawer (right-side panel) ─── */

.ds-scope .ds-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: 9998;
    opacity: 0;
    transition: opacity 160ms ease;
}
.ds-scope .ds-drawer-backdrop.is-open { opacity: 1; }

.ds-scope .ds-drawer {
    position: fixed; top: 0; bottom: 0; right: 0;
    width: 560px;
    max-width: calc(100vw - 32px);
    background: var(--ds-bg);
    box-shadow: var(--ds-shadow-popover);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.ds-scope .ds-drawer.is-open { transform: translateX(0); }
.ds-scope .ds-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ds-space-4) var(--ds-space-5);
    border-bottom: 1px solid var(--ds-border);
}
.ds-scope .ds-drawer-title {
    font-size: var(--ds-text-md);
    font-weight: 600;
    color: var(--ds-fg);
    margin: 0;
}
.ds-scope .ds-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--ds-space-5);
}

/* Drawer content blocks */
.ds-scope .ds-drawer-block {
    margin-bottom: var(--ds-space-5);
}
.ds-scope .ds-drawer-block-title {
    font-size: var(--ds-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--ds-fg-muted);
    margin: 0 0 var(--ds-space-2) 0;
}
.ds-scope .ds-kv {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 6px var(--ds-space-3);
    font-size: var(--ds-text-base);
}
.ds-scope .ds-kv dt {
    color: var(--ds-fg-subtle);
    font-weight: 400;
}
.ds-scope .ds-kv dd {
    margin: 0;
    color: var(--ds-fg);
    font-variant-numeric: tabular-nums;
}

/* Score lockup in drawer */
.ds-scope .ds-score-lockup {
    display: flex;
    align-items: baseline;
    gap: var(--ds-space-2);
    padding: var(--ds-space-3) var(--ds-space-4);
    background: var(--ds-bg-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
}
.ds-scope .ds-score-lockup .ds-score-big {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-2xl);
    font-weight: 600;
    color: var(--ds-fg);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.ds-scope .ds-score-lockup .ds-score-source {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
    font-family: var(--ds-font-mono);
}

/* Sub-score breakdown rows */
.ds-scope .ds-extras {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--ds-border);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    overflow: hidden;
}
.ds-scope .ds-extra-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 8px var(--ds-space-3);
    background: var(--ds-bg);
    font-size: var(--ds-text-base);
}
.ds-scope .ds-extra-label { color: var(--ds-fg-muted); }
.ds-scope .ds-extra-value {
    font-family: var(--ds-font-mono);
    font-weight: 600;
    color: var(--ds-fg);
    font-variant-numeric: tabular-nums;
}

/* ─── Data Sources health grid ─── */

.ds-scope .ds-source-summary {
    display: flex;
    gap: var(--ds-space-2);
    margin-bottom: var(--ds-space-4);
    flex-wrap: wrap;
}
.ds-scope .ds-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--ds-radius-sm);
    font-size: var(--ds-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--ds-border);
    background: var(--ds-bg);
    color: var(--ds-fg-muted);
}
.ds-scope .ds-source-pill .ds-num-inline {
    font-family: var(--ds-font-mono);
    color: var(--ds-fg);
}

.ds-scope .ds-source-group {
    margin-bottom: var(--ds-space-5);
}
.ds-scope .ds-source-group-title {
    font-size: var(--ds-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--ds-fg-muted);
    margin: 0 0 var(--ds-space-2) 0;
}

.ds-scope .ds-source-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: var(--ds-space-3);
    padding: 10px var(--ds-space-4);
    background: var(--ds-bg);
    border-bottom: 1px solid var(--ds-border);
}
.ds-scope .ds-source-row:last-child { border-bottom: 0; }
.ds-scope .ds-source-row .ds-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ds-fg-faint);
}
.ds-scope .ds-source-row.is-ok       .ds-dot { background: var(--ds-success); }
.ds-scope .ds-source-row.is-warn     .ds-dot { background: var(--ds-warn); }
.ds-scope .ds-source-row.is-fail     .ds-dot { background: var(--ds-danger); }
.ds-scope .ds-source-row.is-disabled .ds-dot { background: var(--ds-fg-faint); }
.ds-scope .ds-source-row.is-unknown  .ds-dot { background: var(--ds-fg-faint); }

.ds-scope .ds-source-name {
    font-size: var(--ds-text-base);
    font-weight: 500;
    color: var(--ds-fg);
}
.ds-scope .ds-source-detail {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
    margin-top: 2px;
}
.ds-scope .ds-source-metric {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ─── Catalog ─── */

.ds-scope .ds-catalog-group {
    margin-bottom: var(--ds-space-4);
}
.ds-scope .ds-catalog-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--ds-space-3);
    padding: 8px var(--ds-space-4);
    background: var(--ds-bg);
    border-bottom: 1px solid var(--ds-border);
    align-items: center;
}
.ds-scope .ds-catalog-row:last-child { border-bottom: 0; }
.ds-scope .ds-catalog-name { color: var(--ds-fg); }
.ds-scope .ds-catalog-row.is-gap .ds-catalog-name { color: var(--ds-fg-subtle); font-style: italic; }
.ds-scope .ds-catalog-sources {
    font-size: var(--ds-text-xs);
    color: var(--ds-fg-subtle);
    text-align: right;
    font-family: var(--ds-font-mono);
}
.ds-scope .ds-catalog-row.is-gap .ds-catalog-sources {
    color: var(--ds-warn);
    font-style: italic;
}
