/* ===== Studio UX ===== */

/* Hide Alpine elements until the framework hydrates. */
[x-cloak] { display: none !important; }

/* ----- Hero (legacy classes kept for non-dashboard pages) ----- */
.studio-hero {
    margin: 8px 0 28px;
    padding: 0;
}
.studio-hero-eyebrow {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.studio-hero-title {
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px;
    background: linear-gradient(180deg, #fff 0%, #cfd0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.studio-hero-sub {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 56ch;
}

/* ===================================================================
   ==  Command launcher (Mission control) — sidebar-less dashboard
   == ================================================================ */

.cmd-page {
    --accent: 139,92,246;
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Keep legacy class working for old views still inside studio/base.html. */
.cmd-shell {
    --accent: 139,92,246;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 12px;
}

/* ----- Hero ----- */
.cmd-hero {
    text-align: center;
    margin-top: 18px;
}
.cmd-eyebrow {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: rgba(255,255,255,0.42);
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 16px;
}
.cmd-headline {
    font-size: 44px;
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.0;
    margin: 0 0 12px;
    background: linear-gradient(180deg, #fff 0%, #c2c4d8 80%, #888a9c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cmd-subline {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 52ch;
    margin: 0 auto;
    line-height: 1.5;
    transition: opacity 200ms ease;
}

/* ----- Glass panel ----- */
.cmd-panel {
    position: relative;
    padding: 28px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(28,28,38,0.92) 0%, rgba(16,16,22,0.92) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 0 0 1px rgba(0,0,0,0.4),
        0 40px 80px -30px rgba(0,0,0,0.7),
        0 60px 120px -60px rgba(139,92,246,0.5);
    overflow: hidden;
}
.cmd-panel-aura {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 360px;
    background: radial-gradient(closest-side, rgba(var(--accent),0.32) 0%, rgba(var(--accent),0.10) 35%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    transition: background 240ms ease;
    z-index: 0;
}
.cmd-panel-noise {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 4px 4px, 7px 7px;
    background-position: 0 0, 2px 3px;
    mix-blend-mode: overlay;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}
.cmd-panel > * { position: relative; z-index: 1; }

/* ----- Task pills row ----- */
.cmd-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 22px;
}
.cmd-pill {
    --pill-accent: 139,92,246;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cmd-pill--purple  { --pill-accent: 139,92,246; }
.cmd-pill--blue    { --pill-accent: 59,130,246; }
.cmd-pill--emerald { --pill-accent: 16,185,129; }
.cmd-pill--amber   { --pill-accent: 245,158,11; }
.cmd-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--pill-accent), 0.55);
    box-shadow: 0 0 8px rgba(var(--pill-accent), 0.6);
}
.cmd-pill:hover:not(:disabled) {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-color: rgba(var(--pill-accent), 0.35);
    transform: translateY(-1px);
}
.cmd-pill.is-active {
    color: #fff;
    background:
        linear-gradient(180deg, rgba(var(--pill-accent),0.18) 0%, rgba(var(--pill-accent),0.08) 100%);
    border-color: rgba(var(--pill-accent), 0.55);
    box-shadow:
        0 0 0 1px rgba(var(--pill-accent), 0.30) inset,
        0 0 24px rgba(var(--pill-accent), 0.35),
        0 6px 18px -8px rgba(var(--pill-accent), 0.55);
}
.cmd-pill.is-active .cmd-pill-dot {
    background: rgba(var(--pill-accent), 1);
    box-shadow:
        0 0 0 3px rgba(var(--pill-accent), 0.18),
        0 0 14px rgba(var(--pill-accent), 0.9);
    animation: cmdPulse 2.4s ease-in-out infinite;
}
.cmd-pill:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
@keyframes cmdPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}
/* Drive the active accent into the panel aura via parent state. */
.cmd-shell:has(.cmd-pill--purple.is-active)  { --accent: 139,92,246; }
.cmd-shell:has(.cmd-pill--blue.is-active)    { --accent: 59,130,246; }
.cmd-shell:has(.cmd-pill--emerald.is-active) { --accent: 16,185,129; }
.cmd-shell:has(.cmd-pill--amber.is-active)   { --accent: 245,158,11; }

/* Page-level accent: tracks the active task-deck card. */
.cmd-page:has(.task-card--purple.is-active)  { --accent: 139,92,246; }
.cmd-page:has(.task-card--blue.is-active)    { --accent: 59,130,246; }
.cmd-page:has(.task-card--emerald.is-active) { --accent: 16,185,129; }
.cmd-page:has(.task-card--amber.is-active)   { --accent: 245,158,11; }
.cmd-page:has(.task-card--rose.is-active)    { --accent: 244,63,94; }

/* ----- The big bar ----- */
.cmd-form { display: flex; flex-direction: column; gap: 18px; }

.cmd-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 18px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.30) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 12px 40px -16px rgba(0,0,0,0.7);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.cmd-bar:focus-within {
    border-color: rgba(var(--accent), 0.55);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.06) inset,
        0 0 0 4px rgba(var(--accent), 0.10),
        0 18px 60px -16px rgba(var(--accent), 0.30);
}
.cmd-bar-leading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(var(--accent), 0.85);
    margin-right: 10px;
}
.cmd-bar-kbd {
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 2px 0 rgba(0,0,0,0.4);
}
.cmd-bar-input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.005em;
    padding: 0;
}
.cmd-bar-input::placeholder {
    color: rgba(255,255,255,0.30);
}
.cmd-bar-input:focus { outline: 0; }

/* Native select — read like a text input, with explicit option styling so the
   open dropdown overlay is legible regardless of OS theme. */
.cmd-bar--select .cmd-bar-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.55)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 28px;
    font-weight: 500;
    letter-spacing: -0.005em;
    cursor: pointer;
}
/* The native overlay that opens on click — force a clean light-on-dark-text
   palette so options are readable on every browser / OS theme. */
.cmd-bar select option,
.cmd-bar select optgroup,
.studio-form select option,
.filter-select option {
    background: #ffffff;
    color: #14141c;
    font-weight: 500;
    padding: 8px 10px;
}
.cmd-bar select option:checked,
.studio-form select option:checked,
.filter-select option:checked {
    background: #ede9fe;     /* purple-100 — selected highlight */
    color: #14141c;
    font-weight: 600;
}
.cmd-bar select option:disabled,
.studio-form select option:disabled,
.filter-select option:disabled {
    color: #6b6b80;
    background: #f4f4f7;
}

/* No-target (commit) variant */
.cmd-bar--static { cursor: default; }
.cmd-bar-static {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
}

/* ----- Persistent suggestion panel ----- */
.cmd-suggest {
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.18) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}
.cmd-suggest-body { padding: 8px; max-height: 280px; overflow-y: auto; }
.cmd-suggest-header {
    padding: 6px 10px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cmd-suggest-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.35);
}
.cmd-suggest-items {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.cmd-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
    position: relative;
}
.cmd-suggest-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 25%;
    bottom: 25%;
    width: 2px;
    border-radius: 2px;
    background: rgba(var(--accent), 0.85);
    opacity: 0;
    transition: opacity 140ms ease;
}
.cmd-suggest-item:hover,
.cmd-suggest-item.is-active {
    background: rgba(255,255,255,0.04);
}
.cmd-suggest-item:hover::before,
.cmd-suggest-item.is-active::before {
    opacity: 1;
}
.cmd-suggest-name {
    font-size: 14px;
    color: rgba(255,255,255,0.92);
    padding-left: 8px;
}
.cmd-suggest-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cmd-suggest-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
}
.cmd-suggest-stage {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
}
/* Highlighted completion blurb — surfaces the best prefix match as a
   click-or-Tab-to-fill callout above the regular results list.
   NOTE: uses plain rgba() (not color-mix) so it renders on older browsers
   too — the pill must always be visible when the backend surfaces one. */
.cmd-suggest-completion {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 10px;
    padding: 12px 14px;
    border: 1px solid rgba(139, 92, 246, 0.85);
    border-radius: 12px;
    background:
        linear-gradient(180deg,
            rgba(139, 92, 246, 0.22) 0%,
            rgba(139, 92, 246, 0.10) 100%);
    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.18),
        0 6px 18px rgba(139, 92, 246, 0.18);
    cursor: pointer;
    text-align: left;
    color: rgba(255,255,255,0.95);
    font: inherit;
    transition: transform 140ms ease, box-shadow 140ms ease;
    animation: completionPulseIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cmd-suggest-completion:hover,
.cmd-suggest-completion:focus-visible {
    outline: 0;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 4px rgba(139, 92, 246, 0.28),
        0 8px 22px rgba(139, 92, 246, 0.28);
}
.cmd-suggest-completion-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: rgba(0,0,0,0.30);
    color: #c4b5fd;
    flex-shrink: 0;
}
.cmd-suggest-completion-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.cmd-suggest-completion-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cmd-suggest-completion-typed {
    color: rgba(255,255,255,0.55);
    font-weight: 500;
}
.cmd-suggest-completion-suffix {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(139, 92, 246, 0.70);
}
.cmd-suggest-completion-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cmd-suggest-completion-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
    white-space: nowrap;
}
.cmd-suggest-completion-hint kbd {
    display: inline-block;
    padding: 2px 7px;
    margin-right: 4px;
    border-radius: 5px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.16);
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 11px;
    color: #ffffff;
}
@keyframes completionPulseIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ----- Multi-select panels (fetch / enrich / commit launchers) ----- */
.multi-select {
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.18) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}
.multi-select-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.multi-select-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.55);
    flex: 1;
    min-width: 0;
}
.multi-select-counter {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
}
.multi-select-link {
    background: transparent;
    border: 0;
    padding: 4px 6px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 140ms ease, color 140ms ease;
}
.multi-select-link:hover { background: rgba(255,255,255,0.06); color: #fff; }

.multi-select-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.multi-select-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 140ms ease;
}
.multi-select-row:hover { background: rgba(255,255,255,0.04); }
.multi-select-row input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--accent-purple);
    flex-shrink: 0;
    cursor: pointer;
}
.multi-select-row input[disabled] + .multi-select-row-body {
    opacity: 0.5;
}
.multi-select-row-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.multi-select-row-name {
    font-size: 14px;
    color: rgba(255,255,255,0.92);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.multi-select-row-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.multi-select-pill {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
}
.multi-select-pill--approved  { border-color: rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.multi-select-pill--extracted { border-color: rgba(245, 158, 11, 0.45); color: #fcd34d; }
.multi-select-pill--enriched  { border-color: rgba(139, 92, 246, 0.45); color: #c4b5fd; }
.multi-select-pill--pending   { border-color: rgba(99, 102, 241, 0.45); color: #a5b4fc; }

.multi-select-empty {
    padding: 18px 14px;
    text-align: center;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
}
.multi-select-empty a { color: var(--accent-purple); }

/* ----- Ingestion Review (full-page review/edit + approve) ----- */
.ing-review { max-width: 1200px; margin: 0 auto; }

.ing-review-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    margin-bottom: 18px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 80% 120% at 10% 0%, rgba(139,92,246,0.18) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}
.ing-review-hero-body { flex: 1; min-width: 0; }
.ing-review-back {
    display: inline-block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.ing-review-back:hover { color: var(--text-primary); }
.ing-review-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin: 0 0 8px;
}
.ing-review-pills { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ing-status-pill,
.ing-confidence-pill,
.ing-source-pill {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
}
.ing-status-pill--extracted    { border-color: rgba(99, 102, 241, 0.45); color: #a5b4fc; }
.ing-status-pill--enriched     { border-color: rgba(139, 92, 246, 0.45); color: #c4b5fd; }
.ing-status-pill--needs_review { border-color: rgba(245, 158, 11, 0.45); color: #fcd34d; }
.ing-status-pill--approved     { border-color: rgba(16, 185, 129, 0.55); color: #6ee7b7; }
.ing-status-pill--imported     { border-color: rgba(96, 165, 250, 0.55); color: #93c5fd; }
.ing-status-pill--rejected     { border-color: rgba(239, 68, 68, 0.55);  color: #fca5a5; }
.ing-confidence-pill--high     { border-color: rgba(16, 185, 129, 0.55); color: #6ee7b7; }
.ing-confidence-pill--medium   { border-color: rgba(245, 158, 11, 0.55); color: #fcd34d; }
.ing-confidence-pill--low      { border-color: rgba(239, 68, 68, 0.55);  color: #fca5a5; }
.ing-review-meta { font-size: 12px; color: var(--text-muted); }
.ing-review-hero-actions { display: flex; gap: 8px; flex-shrink: 0; }

.ing-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 16px;
}
.ing-review-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px 18px;
}
.ing-review-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.ing-review-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.ing-review-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* Any field whose control is a textarea spans both columns — captures
   description / differentiator / notes / key_products / market_*. */
.ing-review-field:has(textarea) { grid-column: 1 / -1; }
.ing-review-field input[type="text"],
.ing-review-field input[type="number"],
.ing-review-field input[type="url"],
.ing-review-field input[type="date"],
.ing-review-field input[type="email"],
.ing-review-field select,
.ing-review-field textarea {
    width: 100%;
    padding: 7px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
}
.ing-review-field textarea { font-family: inherit; resize: vertical; }
.ing-review-field textarea.studio-mono {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
}
.ing-review-field input:focus,
.ing-review-field select:focus,
.ing-review-field textarea:focus {
    outline: 0;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}
.studio-helptext { font-size: 11px; color: var(--text-muted); }
.studio-error    { font-size: 12px; color: #fca5a5; }

.ing-review-source-pre {
    max-height: 360px;
    overflow: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.ing-review-footer {
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: sticky;
    bottom: 12px;
    z-index: 5;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
}
.ing-review-footer-group { display: flex; gap: 8px; justify-content: flex-end; }

.ing-review-status-bar {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 12px;
    align-items: center;
}
.ing-review-status-bar form { display: inline-flex; }
.ing-review-reject { color: #fca5a5; }

.cmd-suggest-empty {
    padding: 18px 14px;
    text-align: center;
}
.cmd-suggest-empty-headline {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-bottom: 6px;
}
.cmd-suggest-empty-hint {
    color: rgba(255,255,255,0.45);
    font-size: 12px;
}
.cmd-suggest-empty kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 11px;
}

/* ----- Inline options (toggle switch) ----- */
.cmd-options { padding: 0 4px; }
.cmd-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
}
.cmd-option input { display: none; }
.cmd-option-track {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 180ms ease, border-color 180ms ease;
}
.cmd-option-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), background 180ms ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.cmd-option input:checked + .cmd-option-track {
    background: rgba(var(--accent), 0.6);
    border-color: rgba(var(--accent), 0.7);
}
.cmd-option input:checked + .cmd-option-track .cmd-option-thumb {
    transform: translateX(14px);
    background: #fff;
}

/* ----- Launch CTA ----- */
.cmd-launch {
    --launch: 139,92,246;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 56px;
    margin-top: 4px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid rgba(var(--launch), 0.55);
    background:
        radial-gradient(120% 200% at 50% -50%, rgba(255,255,255,0.18) 0%, transparent 50%),
        linear-gradient(180deg, rgba(var(--launch), 0.95) 0%, rgba(var(--launch), 0.78) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 -10px 30px -10px rgba(0,0,0,0.4) inset,
        0 14px 32px -10px rgba(var(--launch), 0.55),
        0 24px 60px -20px rgba(var(--launch), 0.45);
    transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cmd-launch--purple  { --launch: 139,92,246; }
.cmd-launch--blue    { --launch: 59,130,246; }
.cmd-launch--emerald { --launch: 16,185,129; }
.cmd-launch--amber   { --launch: 245,158,11; }
.cmd-launch::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-18deg);
    transition: left 700ms ease;
}
.cmd-launch:hover:not(:disabled)::after { left: 130%; }
.cmd-launch:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.22) inset,
        0 -10px 30px -10px rgba(0,0,0,0.4) inset,
        0 18px 40px -10px rgba(var(--launch), 0.65),
        0 30px 80px -20px rgba(var(--launch), 0.55);
}
.cmd-launch:active:not(:disabled) { transform: translateY(0); }
.cmd-launch:disabled { opacity: 0.4; cursor: not-allowed; }
.cmd-launch-label   { font-weight: 500; }
.cmd-launch-target  { opacity: 0.7; font-weight: 400; }
.cmd-launch-arrow   { display: inline-flex; transition: transform 220ms ease; margin-left: auto; }
.cmd-launch:hover:not(:disabled) .cmd-launch-arrow { transform: translateX(4px); }

/* ----- Live runs + bench belt ----- */
.cmd-belt {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-top: 4px;
}
.cmd-belt-col {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(22,22,30,0.7) 0%, rgba(15,15,22,0.7) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.03) inset,
        0 18px 30px -20px rgba(0,0,0,0.6);
}
.cmd-belt-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.cmd-belt-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.35);
}
.cmd-belt-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-family: 'SF Mono', Menlo, monospace;
}
.cmd-belt-feed { max-height: 220px; overflow-y: auto; }
.cmd-belt-bench {
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.cmd-belt-bench-count {
    font-size: 44px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(180deg, #fff 0%, #aab0c5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cmd-belt-bench-text { color: rgba(255,255,255,0.55); font-size: 13px; line-height: 1.45; }

/* Recompose the existing task-runs table inside the belt feed */
.cmd-belt-feed .studio-task-table {
    background: transparent;
    border: none;
    width: 100%;
    border-collapse: collapse;
}
.cmd-belt-feed .studio-task-table th { display: none; }
.cmd-belt-feed .studio-task-table td {
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cmd-belt-feed .studio-task-table td:first-child { color: rgba(255,255,255,0.8); }

/* ----- Launcher responsive ----- */
@media (max-width: 880px) {
    .cmd-headline { font-size: 30px; }
    .cmd-panel { padding: 20px; border-radius: 18px; }
    .cmd-belt  { grid-template-columns: 1fr; }
    .cmd-launch { height: 52px; }
}

/* ===================================================================
   ==  Horizontal task deck — 5 glossy color-coded cards
   == ================================================================ */

.task-deck {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}
@media (max-width: 960px) {
    .task-deck { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .task-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.task-card {
    --c1: 139,92,246;       /* gradient stop 1 */
    --c2: 167,139,250;      /* gradient stop 2 */
    --c3: 196,181,253;      /* gradient stop 3 (highlight) */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px 16px 16px;
    min-height: 200px;
    border-radius: 18px;
    border: 1px solid rgba(var(--c1), 0.30);
    background:
        linear-gradient(180deg, rgba(var(--c1), 0.18) 0%, rgba(var(--c1), 0.04) 60%, rgba(0,0,0,0.30) 100%),
        linear-gradient(180deg, rgba(22,22,30,0.95) 0%, rgba(15,15,22,0.95) 100%);
    color: rgba(255,255,255,0.92);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.06) inset,
        0 12px 36px -16px rgba(var(--c1), 0.45),
        0 24px 80px -20px rgba(0,0,0,0.7);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 220ms ease;
}
.task-card-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(var(--c3), 0.32) 0%, transparent 55%),
        radial-gradient(80% 60% at -10% 110%, rgba(var(--c2), 0.20) 0%, transparent 60%);
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 220ms ease;
}
.task-card-shine {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 26%),
        radial-gradient(40% 30% at 70% 0%, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.task-card > * { position: relative; z-index: 1; }

/* Per-accent palettes */
.task-card--purple  { --c1:139,92,246;  --c2:167,139,250; --c3:196,181,253; }
.task-card--blue    { --c1:59,130,246;  --c2:96,165,250;  --c3:147,197,253; }
.task-card--emerald { --c1:16,185,129;  --c2:52,211,153;  --c3:110,231,183; }
.task-card--amber   { --c1:245,158,11;  --c2:251,191,36;  --c3:253,224,71;  }
.task-card--rose    { --c1:244,63,94;   --c2:251,113,133; --c3:253,164,175; }

.task-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 100%),
        rgba(var(--c1), 0.30);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.95);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 6px 16px -6px rgba(var(--c1), 0.55);
    margin-bottom: 4px;
}
.task-card-icon svg { width: 18px; height: 18px; }

.task-card-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
}
.task-card-tagline {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: #fff;
}
.task-card-desc {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255,255,255,0.62);
    margin-top: 6px;
}
.task-card-lock {
    position: absolute;
    bottom: 10px;
    left: 14px;
    font-size: 10px;
    font-family: 'SF Mono', Menlo, monospace;
    color: rgba(255,255,255,0.4);
}

.task-card:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: rgba(var(--c1), 0.55);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 20px 44px -16px rgba(var(--c1), 0.6),
        0 36px 100px -20px rgba(0,0,0,0.7);
}
.task-card:hover:not(:disabled) .task-card-bg { opacity: 1; }

.task-card.is-active {
    border-color: rgba(var(--c1), 0.85);
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.14) inset,
        0 0 0 1px rgba(var(--c1), 0.6) inset,
        0 22px 50px -16px rgba(var(--c1), 0.75),
        0 0 60px -10px rgba(var(--c1), 0.55),
        0 36px 100px -20px rgba(0,0,0,0.7);
}
.task-card.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 16%; right: 16%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, transparent, rgba(var(--c1),0.85), transparent);
    box-shadow: 0 0 18px rgba(var(--c1), 0.9);
}
.task-card:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: 0 10px 20px -12px rgba(0,0,0,0.6);
}
.task-card:disabled .task-card-bg { opacity: 0.4; }

/* ===================================================================
   ==  Vertical workflow steps
   == ================================================================ */

.wf-section { display: flex; flex-direction: column; gap: 12px; }

.wf-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 2px;
}
.wf-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(var(--accent), 0.12);
    border: 1px solid rgba(var(--accent), 0.30);
    color: rgba(var(--accent), 1);
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
}
.wf-step-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.5);
}
.wf-step-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin-left: auto;
    font-style: italic;
}
.wf-step-link {
    font-size: 11px;
    color: rgba(var(--accent), 0.85);
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.wf-step-link:hover { color: rgba(var(--accent), 1); text-decoration: underline; }

/* Tighter spacing for the input + suggest pair under steps */
.cmd-page .cmd-form { gap: 12px; }
.cmd-page .cmd-suggest { margin-top: -4px; }

/* ===================================================================
   ==  Closest comps tray
   == ================================================================ */

.comps-tray {
    padding: 14px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(22,22,30,0.55) 0%, rgba(15,15,22,0.55) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    min-height: 80px;
}
.comps-anchor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}
.comps-anchor-label { text-transform: uppercase; letter-spacing: 0.14em; }
.comps-anchor-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(var(--accent), 0.12);
    border: 1px solid rgba(var(--accent), 0.30);
    color: rgba(255,255,255,0.85);
    text-transform: none;
    letter-spacing: 0;
}

.comps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.comp-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.comp-chip:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(var(--accent), 0.4);
    transform: translateY(-1px);
}
.comp-chip.is-pinned {
    background:
        linear-gradient(180deg, rgba(var(--accent),0.12) 0%, rgba(var(--accent),0.03) 100%);
    border-color: rgba(var(--accent), 0.55);
}
.comp-chip-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.comp-chip-logo img { width: 100%; height: 100%; object-fit: cover; }
.comp-chip-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.comp-chip-name {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comp-chip-meta { display: flex; gap: 6px; font-size: 10px; color: rgba(255,255,255,0.45); }
.comp-chip-stage {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
}
.comp-chip-funding { font-family: 'SF Mono', Menlo, monospace; }
.comp-chip-add,
.comp-chip-pinned {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.65);
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 160ms ease;
}
.comp-chip-add:hover {
    background: rgba(var(--accent), 0.20);
    border-color: rgba(var(--accent), 0.55);
    color: #fff;
}
.comp-chip-pinned {
    background: rgba(var(--accent), 0.20);
    border-color: rgba(var(--accent), 0.55);
    color: #fff;
    cursor: default;
}

.comps-empty {
    padding: 18px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

/* ===================================================================
   ==  Bench rail (horizontal pinned cards)
   == ================================================================ */

.bench-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    /* scrollbar inherits the global Apple-style floating treatment from style.css */
}

.bench-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 36px 10px 10px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(22,22,30,0.7) 0%, rgba(15,15,22,0.7) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    min-width: 220px;
    transition: border-color 160ms ease, transform 160ms ease;
    flex-shrink: 0;
}
.bench-card:hover {
    border-color: rgba(var(--accent), 0.4);
    transform: translateY(-1px);
}
.bench-card-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.bench-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.bench-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bench-card-name {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bench-card-meta { font-size: 10px; color: rgba(255,255,255,0.45); }
.bench-card-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255,255,255,0.35);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 140ms ease;
}
.bench-card-x:hover {
    background: rgba(244,63,94,0.15);
    border-color: rgba(244,63,94,0.4);
    color: #fb7185;
}
.bench-empty {
    padding: 18px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    border: 1px dashed rgba(255,255,255,0.10);
    border-radius: 12px;
    width: 100%;
}

/* ===================================================================
   ==  Bench search & add (live autocomplete on the bench page)
   == ================================================================ */

.bench-search-section { display: flex; flex-direction: column; gap: 10px; }

.bench-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 14px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.30) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 8px 24px -12px rgba(0,0,0,0.6);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.bench-search:focus-within {
    border-color: rgba(139,92,246,0.55);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.06) inset,
        0 0 0 4px rgba(139,92,246,0.10),
        0 18px 60px -16px rgba(139,92,246,0.30);
}
.bench-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: rgba(139,92,246,0.85);
    margin-right: 8px;
}
.bench-search-input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    padding: 0;
}
.bench-search-input::placeholder { color: rgba(255,255,255,0.32); }
.bench-search-kbd {
    margin-left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
}

.bench-search-results {
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.18) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    min-height: 60px;
}
.bench-search-head {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bench-search-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.40);
}
.bench-search-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 360px;
    overflow-y: auto;
}
.bench-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 120ms ease;
}
.bench-search-item:hover {
    background: rgba(255,255,255,0.04);
}
.bench-search-item.is-pinned {
    background:
        linear-gradient(180deg, rgba(139,92,246,0.10) 0%, rgba(139,92,246,0.02) 100%);
}
.bench-search-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.bench-search-logo img { width: 100%; height: 100%; object-fit: cover; }
.bench-search-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bench-search-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}
.bench-search-name:hover { color: rgba(139,92,246,1); }
.bench-search-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.50);
}
.bench-search-tag {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.bench-search-stage {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.bench-search-funding { font-family: 'SF Mono', Menlo, monospace; }

.bench-search-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background:
        radial-gradient(120% 200% at 50% -50%, rgba(255,255,255,0.18) 0%, transparent 50%),
        linear-gradient(180deg, rgba(139,92,246,0.95) 0%, rgba(124,58,237,0.95) 100%);
    border: 1px solid rgba(139,92,246,0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 180ms ease;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 8px 20px -8px rgba(139,92,246,0.55);
}
.bench-search-add:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.22) inset,
        0 12px 24px -8px rgba(139,92,246,0.7);
}
.bench-search-add svg { display: block; }

.bench-search-pinned {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16,185,129,0.16);
    border: 1px solid rgba(16,185,129,0.40);
    color: #6ee7b7;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bench-search-empty {
    padding: 18px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bench-search-empty strong {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
}
.bench-search-empty span {
    color: rgba(255,255,255,0.45);
    font-size: 12px;
}

/* ----- Legacy launch-panel classes left in place (unused on dashboard) ----- */
.launch-panel {
    position: relative;
    margin-bottom: 40px;
    padding: 28px;
    border-radius: 18px;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(139,92,246,0.10), transparent 50%),
        radial-gradient(100% 100% at 100% 0%, rgba(59,130,246,0.06), transparent 60%),
        linear-gradient(180deg, rgba(22,22,31,0.95) 0%, rgba(17,17,24,0.95) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 30px 80px -40px rgba(139,92,246,0.35),
        0 8px 24px rgba(0,0,0,0.45);
    overflow: hidden;
}
.launch-panel-glow {
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 240px;
    background: radial-gradient(60% 60% at 50% 0%, rgba(139,92,246,0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.launch-panel > * { position: relative; z-index: 1; }

/* Task chip strip */
.launch-task-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}
.launch-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    text-align: left;
    transition: all 180ms ease;
    cursor: pointer;
    min-height: 64px;
}
.launch-chip:hover:not(:disabled) {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}
.launch-chip:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.launch-chip-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}
.launch-chip-tagline {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}
.launch-chip.is-active {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.20);
    box-shadow: 0 0 0 1px rgba(139,92,246,0.35) inset, 0 8px 20px -10px rgba(139,92,246,0.5);
}
.launch-chip--purple.is-active   { box-shadow: 0 0 0 1px rgba(139,92,246,0.45) inset, 0 8px 20px -10px rgba(139,92,246,0.55); }
.launch-chip--blue.is-active     { box-shadow: 0 0 0 1px rgba(59,130,246,0.45)  inset, 0 8px 20px -10px rgba(59,130,246,0.55); }
.launch-chip--emerald.is-active  { box-shadow: 0 0 0 1px rgba(16,185,129,0.45)  inset, 0 8px 20px -10px rgba(16,185,129,0.55); }
.launch-chip--amber.is-active    { box-shadow: 0 0 0 1px rgba(245,158,11,0.45)  inset, 0 8px 20px -10px rgba(245,158,11,0.55); }

/* Form rows */
.launch-form { display: flex; flex-direction: column; gap: 16px; }
.launch-row { display: flex; flex-direction: column; gap: 8px; }
.launch-row--checkbox { margin-top: -4px; }
.launch-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}
.launch-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.launch-input::placeholder { color: var(--text-muted); }
.launch-input:focus {
    outline: none;
    border-color: rgba(139,92,246,0.55);
    box-shadow: 0 0 0 4px rgba(139,92,246,0.10);
}

.launch-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 2px 0;
}
.launch-hint--quiet { font-style: italic; opacity: 0.8; }

.launch-check { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; }

/* Autocomplete combobox */
.launch-combo { position: relative; }
.launch-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(20,20,28,0.96);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
}
.launch-suggest-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.launch-suggest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 120ms ease;
}
.launch-suggest-item:hover,
.launch-suggest-item.is-active {
    background: rgba(255,255,255,0.06);
}
.launch-suggest-name { font-size: 14px; color: var(--text-primary); }
.launch-suggest-meta { font-size: 11px; color: var(--text-muted); }
.launch-suggest-empty {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.launch-suggest-empty-label { font-size: 13px; color: var(--text-primary); }
.launch-suggest-empty-hint  { font-size: 12px; color: var(--text-muted); }
.launch-suggest-empty kbd {
    background: rgba(255,255,255,0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 11px;
}

/* Submit */
.launch-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.launch-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    border-radius: 10px;
    border: 1px solid rgba(139,92,246,0.5);
    background: linear-gradient(180deg, rgba(139,92,246,0.95) 0%, rgba(124,58,237,0.95) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.005em;
    cursor: pointer;
    transition: all 150ms ease;
    box-shadow: 0 6px 20px -6px rgba(139,92,246,0.6);
}
.launch-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px -6px rgba(139,92,246,0.7);
}
.launch-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.launch-submit-arrow { font-size: 16px; line-height: 1; transition: transform 150ms ease; }
.launch-submit:hover .launch-submit-arrow { transform: translateX(2px); }

/* ----- Guide cards (read-only references below the launcher) ----- */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.guide-card {
    position: relative;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(22,22,31,0.7) 0%, rgba(17,17,24,0.7) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}
.guide-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(140% 80% at 0% 0%, var(--_glow, rgba(139,92,246,0.10)) 0%, transparent 60%);
    pointer-events: none;
}
.guide-card--purple  { --_glow: rgba(139,92,246,0.10); }
.guide-card--blue    { --_glow: rgba(59,130,246,0.10); }
.guide-card--emerald { --_glow: rgba(16,185,129,0.10); }
.guide-card--amber   { --_glow: rgba(245,158,11,0.10); }
.guide-card--bench   { --_glow: rgba(139,92,246,0.06); }
.guide-card--locked  { opacity: 0.45; }
.guide-card-key {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.guide-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}
.guide-card-lock {
    display: inline-block;
    margin-top: 10px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'SF Mono', Menlo, monospace;
}
.guide-card-cta {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-purple);
    font-size: 12px;
}

/* Section heading */
.studio-section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

/* ----- Responsive launcher ----- */
@media (max-width: 880px) {
    .launch-task-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .launch-panel { padding: 20px; }
    .studio-hero-title { font-size: 26px; }
}

.studio-shell {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 64px;
}

.studio-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.studio-sidebar-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.studio-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.studio-nav-link {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.studio-nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.studio-nav-link.active {
    background: var(--accent-purple-dim);
    color: var(--text-primary);
}

.studio-sidebar-user {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
}

.studio-username { color: var(--text-primary); margin-bottom: 4px; }

.studio-main { min-width: 0; }

/* ----- Header ----- */
.studio-header {
    margin-bottom: 24px;
}
.studio-header h1 { font-size: 28px; margin-bottom: 4px; }
.studio-header p  { color: var(--text-secondary); }

.studio-header--split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

/* ----- Capabilities grid ----- */
.studio-capabilities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.studio-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex; flex-direction: column; gap: 8px;
}
.studio-card--locked { opacity: 0.55; }
.studio-card-title { font-weight: 600; font-size: 16px; }
.studio-card-desc { color: var(--text-secondary); font-size: 13px; flex: 1; }
.studio-locked-pill {
    align-self: flex-start;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 4px 8px;
    border-radius: 4px;
}

/* ----- Sections ----- */
.studio-section { margin-bottom: 32px; }
.studio-section h2 { font-size: 18px; margin-bottom: 12px; }
.studio-section h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em;
                     color: var(--text-muted); margin-bottom: 12px; }

.studio-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

/* ----- Forms ----- */
.studio-form {
    background: var(--bg-card);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-width: 640px;
}
.studio-form--wide { max-width: 100%; }
.studio-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.studio-field--inline { flex-direction: row; align-items: center; gap: 8px; }
.studio-field--compact { margin-bottom: 8px; }
.studio-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.studio-field input[type="text"],
.studio-field input[type="url"],
.studio-field input[type="number"],
.studio-field input[type="date"],
.studio-field input[type="password"],
.studio-field select,
.studio-field textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font: inherit;
    width: 100%;
}
.studio-field textarea { resize: vertical; min-height: 80px; }

.studio-form-actions { display: flex; gap: 8px; margin-top: 16px; }

.studio-inline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 720px) { .studio-inline-grid { grid-template-columns: 1fr; } }

.studio-help { padding: 12px; background: var(--bg-elevated); border-radius: 6px; font-size: 13px; }
.studio-help code { background: var(--bg-secondary); padding: 2px 4px; border-radius: 3px; }
.studio-help ul { margin: 6px 0 0 20px; }
.studio-mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; }

/* ----- Tables ----- */
.studio-table {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.studio-table th, .studio-table td {
    text-align: left;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-subtle);
}
.studio-table th { color: var(--text-muted); font-weight: 500; text-transform: uppercase;
                   letter-spacing: 0.05em; font-size: 11px; }
.studio-table tr:last-child td { border-bottom: none; }
.studio-table tr:hover td { background: var(--bg-card-hover); }

.studio-row-actions { white-space: nowrap; }
.studio-row--flash { animation: rowFlash 1.2s ease-out; }
@keyframes rowFlash {
    0%   { background: var(--accent-emerald-dim); }
    100% { background: transparent; }
}
.studio-row--editing { background: var(--bg-secondary); }

.studio-toolbar { margin-bottom: 16px; display: flex; gap: 8px; }

.studio-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}
.studio-mute { color: var(--text-muted); font-size: 13px; }
.studio-error { color: #ef4444; font-size: 12px; margin-top: 4px; }

/* ----- Status & pills ----- */
.studio-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-elevated);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}
.studio-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.studio-status--pending  { background: var(--accent-amber-dim); color: var(--accent-amber); }
.studio-status--started  { background: var(--accent-blue-dim);  color: var(--accent-blue); }
.studio-status--success  { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.studio-status--committed { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.studio-status--approved { background: var(--accent-blue-dim); color: var(--accent-blue); }
.studio-status--enriched { background: var(--accent-purple-dim); color: var(--accent-purple); }
.studio-status--extracted { background: var(--bg-elevated); color: var(--text-secondary); }
.studio-status--needs_review { background: var(--accent-amber-dim); color: var(--accent-amber); }
.studio-status--imported { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.studio-status--rejected { background: rgba(239,68,68,0.15); color: #ef4444; }
.studio-status--failure  { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ----- Chips ----- */
.studio-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.studio-chip:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.studio-chip.is-active {
    background: var(--accent-purple-dim);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

/* ----- Segmented control (layout switcher) ----- */
.studio-segmented {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.studio-segmented-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    transition: var(--transition);
}
.studio-segmented-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.studio-segmented-btn.is-active { background: var(--accent-purple-dim); color: var(--text-primary); }

.studio-bench-controls { display: flex; gap: 8px; align-items: center; }

.bench-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 150ms ease;
}
.bench-export-btn:hover {
    background: rgba(16,185,129,0.14);
    border-color: rgba(16,185,129,0.50);
    color: #6ee7b7;
}
.bench-export-btn svg { display: block; }

/* ----- Bench layouts ----- */
.studio-bench-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.studio-bench-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}
.studio-bench-card-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.studio-bench-card-body { display: grid; grid-template-columns: 1fr 2fr; gap: 4px 12px; font-size: 13px; }
.studio-bench-card-body dt { color: var(--text-muted); }
.studio-bench-card-body dd { color: var(--text-primary); }

.studio-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.studio-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}
.studio-tile-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase;
                     letter-spacing: 0.05em; margin-bottom: 8px; }
.studio-tile-value { font-size: 24px; font-weight: 600; color: var(--text-primary); }
.studio-tile-detail { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* ----- Toasts & bench counter ----- */
.studio-toasts {
    position: fixed;
    top: 80px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    pointer-events: none;
}
.studio-toast {
    pointer-events: auto;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    box-shadow: var(--shadow-md);
    /* Two-stage: slide+fade in, hold for 3s, then sweep out. fill-mode forwards
       so the toast stays invisible after the sweep until JS removes it. */
    animation:
        toastIn  220ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
        toastOut 420ms 3s cubic-bezier(0.4, 0, 0.7, 0.2) forwards;
    will-change: transform, opacity;
}
@keyframes toastIn  {
    from { transform: translateX(28px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0)    scale(1);    opacity: 1; }
    to   { transform: translateX(40px) scale(0.96); opacity: 0; }
}
.studio-toast--ok      { border-color: var(--accent-emerald); }
.studio-toast--error   { border-color: #ef4444; color: #ef4444; }
.studio-toast--pending { border-color: var(--accent-purple); }
.studio-toast--pending::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--accent-purple);
    animation: toastPulse 900ms ease-in-out infinite;
    vertical-align: middle;
}
@keyframes toastPulse {
    0%, 100% { opacity: 1;   transform: scale(1);   }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

/* Task completion popup — swoop-away animation */
.task-completion-popup {
    position: fixed;
    bottom: 32px;
    right: 24px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(34,197,94,0.95) 0%, rgba(16,185,129,0.95) 100%);
    border: 1px solid rgba(34,197,94,0.5);
    border-radius: var(--radius-md);
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(34,197,94,0.25);
    z-index: 1001;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.task-completion-popup.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: suitUp 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.task-completion-popup:hover {
    background: linear-gradient(135deg, rgba(34,197,94,1) 0%, rgba(16,185,129,1) 100%);
    transform: translateY(-2px) scale(1);
    box-shadow: 0 15px 50px rgba(34,197,94,0.35);
}

.popup-icon {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popup-title {
    font-weight: 600;
    font-size: 13px;
}

.popup-action {
    font-size: 12px;
    opacity: 0.9;
}

@keyframes suitUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    60% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bench-pill { display: inline-flex; align-items: center; }
.bench-counter {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-purple-dim);
    border: 1px solid var(--accent-purple);
    font-size: 12px;
    color: var(--text-primary);
}

/* ----- Children rows in research editor ----- */
.studio-children {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.studio-child-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.studio-row-delete {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 0 4px;
}
.studio-row-delete:hover { color: #ef4444; }

.studio-add-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin-top: 8px; }

/* ----- Inline field editor (startup detail page) ----- */
.studio-inline-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.studio-inline-edit-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: var(--transition);
}
.studio-inline-field:hover .studio-inline-edit-btn { opacity: 1; }
.studio-inline-edit-btn:hover { color: var(--accent-purple); border-color: var(--accent-purple); }
.studio-inline-edit-form { display: flex; gap: 6px; align-items: center; }
.studio-inline-edit-form input,
.studio-inline-edit-form select,
.studio-inline-edit-form textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
}

/* ----- Detail page action bar ----- */
.studio-detail-actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ----- Snapshot list ----- */
.studio-snapshot-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.studio-snapshot-list li {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

/* ----- Login card ----- */
.studio-login-card {
    max-width: 420px;
    margin: 80px auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
}
.studio-login-card h1 { font-size: 24px; margin-bottom: 4px; }

/* ===================================================================
   ==  Account pages (signup / profile / logout-confirm / password-*)
   == ================================================================ */

.account-page {
    --accent: 139,92,246;
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}
.account-card {
    position: relative;
    padding: 32px;
    border-radius: 24px;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(var(--accent),0.08), transparent 55%),
        linear-gradient(180deg, rgba(22,22,30,0.92) 0%, rgba(15,15,22,0.92) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 30px 70px -30px rgba(0,0,0,0.7),
        0 60px 120px -60px rgba(var(--accent), 0.40);
}
.account-card--narrow { max-width: 480px; margin: 0 auto; }
.account-card--centered { text-align: center; }
.account-card-head { margin-bottom: 24px; }

.account-eyebrow {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.45);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 14px;
}
.account-title {
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.022em;
    line-height: 1.1;
    margin: 0 0 6px;
    background: linear-gradient(180deg, #fff 0%, #c2c4d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.account-sub {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}
.account-help {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
    line-height: 1.5;
}

.account-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.account-form .studio-field input,
.account-form .studio-field select {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    width: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.account-form .studio-field input:focus,
.account-form .studio-field select:focus {
    outline: none;
    border-color: rgba(var(--accent), 0.55);
    box-shadow: 0 0 0 4px rgba(var(--accent), 0.10);
}

.account-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.account-actions--split { justify-content: space-between; }
.account-actions--centered { justify-content: center; }

.account-section {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 24px;
    margin-top: 24px;
}
.account-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.45);
    margin: 0 0 14px;
    font-weight: 500;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.account-tile {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.account-tile-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.4);
}
.account-tile-value {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.0;
    background: linear-gradient(180deg, #fff 0%, #aab0c5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.account-tile-foot {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}

.account-links { display: flex; gap: 10px; flex-wrap: wrap; }

.account-celebrate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(16,185,129,0.18) 0%, rgba(16,185,129,0.04) 100%);
    border: 1px solid rgba(16,185,129,0.40);
    color: #34d399;
    margin: 0 auto 14px;
    box-shadow: 0 0 40px -10px rgba(16,185,129,0.50);
}

.account-flash { margin-bottom: 16px; }

.account-foot {
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    text-align: center;
}
.account-foot a { color: rgba(var(--accent), 1); }
.account-foot a:hover { text-decoration: underline; }

/* ===================================================================
   ==  User menu in the top navbar
   == ================================================================ */

/* ----- Studio navbar dropdown ----- */
.studio-menu { position: relative; display: inline-flex; align-items: center; }
/* Trigger is a <button> (not <a>) so click toggles the menu instead of
   navigating away. Reset native button chrome and mirror the navbar-links
   typography so it lines up visually with the surrounding nav items. */
.studio-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* Native button reset */
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    /* Match .navbar-links a */
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: rgba(255,255,255,0.65);
    transition: all var(--transition);
}
.studio-menu-trigger:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}
.studio-menu-trigger.active {
    color: #fff;
    background:
        linear-gradient(180deg, rgba(139,92,246,0.18) 0%, rgba(139,92,246,0.06) 100%);
    box-shadow:
        0 0 0 1px rgba(139,92,246,0.30) inset,
        0 1px 0 rgba(255,255,255,0.08) inset;
}
.studio-menu-trigger svg {
    opacity: 0.65;
    transition: transform 180ms ease, opacity 180ms ease;
}
.studio-menu-trigger[aria-expanded="true"] svg {
    transform: rotate(180deg);
    opacity: 1;
}
/* Hover bridge — eliminates the dead zone between trigger and panel
   so the menu doesn't snap shut when the cursor crosses the gap. */
.studio-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 12px;
}
.studio-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    background: #14141c;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 24px 48px rgba(0,0,0,0.55),
        0 0 0 1px rgba(0,0,0,0.5);
    padding: 6px;
    /* z-index bumped above .studio-toasts (1000) and .modal-overlay (1000)
       which could otherwise overlap the dropdown's screen area when toasts
       are visible. pointer-events: auto is defensive against any inherited
       pointer-events: none from ancestors. */
    z-index: 1100;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.studio-menu-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #f0f0f5;
    text-decoration: none;
    /* Defensive — make sure no ancestor rule (e.g. transient
       pointer-events:none from a transitioning toast) blocks the click. */
    pointer-events: auto;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}
.studio-menu-item:hover,
.studio-menu-item:focus-visible {
    background: rgba(139, 92, 246, 0.18);
    color: #fff;
    outline: none;
}
.studio-menu-item-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
}
.studio-menu-item-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0;
}
.studio-menu-item:hover .studio-menu-item-hint,
.studio-menu-item:focus-visible .studio-menu-item-hint {
    color: rgba(255,255,255,0.75);
}

.user-menu { position: relative; }
.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}
.user-menu-trigger:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.20);
}
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #14141c;                   /* solid — no blur fade-through */
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 24px 48px rgba(0,0,0,0.55),
        0 0 0 1px rgba(0,0,0,0.5);
    padding: 6px;
    z-index: 200;
    display: flex;
    flex-direction: column;
}
.user-menu-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #f0f0f5;                        /* near-white, high contrast */
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.003em;
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
}
.user-menu-item:hover,
.user-menu-item:focus {
    background: rgba(139,92,246,0.18);
    color: #fff;
    outline: none;
}
.user-menu-item--danger { color: #fca5a5; }
.user-menu-item--danger:hover,
.user-menu-item--danger:focus {
    background: rgba(244,63,94,0.18);
    color: #fecaca;
}
.user-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 2px;
}

.navbar-cta {
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(139,92,246,0.95) 0%, rgba(124,58,237,0.95) 100%);
    color: #fff !important;
    box-shadow: 0 6px 18px -6px rgba(139,92,246,0.55);
}
.navbar-cta:hover { transform: translateY(-1px); }

/* ----- Buttons (small variant) reusing existing palette ----- */
.btn-sm { font-size: 12px; padding: 4px 10px; }
.btn-link {
    background: transparent;
    border: none;
    color: var(--accent-purple);
    padding: 4px 8px;
    font-size: 13px;
}
.btn-link:hover { text-decoration: underline; }

/* ----- Responsive sidebar ----- */
@media (max-width: 880px) {
    .studio-shell { grid-template-columns: 1fr; }
    .studio-sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .studio-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ===== Bench market-map board ===== */
/* Board on the left, company cockpit docked right. (The old vertical search
   rail is gone — selection now lives in the horizontal strip above.) */
.bench-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
    margin-bottom: 28px;
}
@media (max-width: 1100px) {
    .bench-workspace { grid-template-columns: 1fr; }
}

.bench-board-section {
    min-height: 420px;
}

.bench-board-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.bench-board-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.bench-board-empty {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 44px 24px;
    text-align: center;
    background: rgba(139, 92, 246, 0.03);
}
.bench-board-empty h4 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.bench-board-empty p {
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 420px;
    margin: 0 auto;
}

.bench-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-flow: dense; /* refill freed cells — no stranded gaps */
    gap: 12px;
    align-items: start;
}

.bench-board-segment {
    position: relative;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.006)),
        var(--bg-secondary);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), var(--shadow-1);
    overflow: hidden;
    animation: mm-fade-up 380ms var(--ease-out) both;
}

.bench-board-segment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(139, 92, 246, 0.06);
}

.bench-board-segment-name {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.bench-board-segment-name:hover { background: rgba(255,255,255,0.05); }
.bench-board-segment-name:focus {
    outline: 1px solid var(--ring);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.bench-board-segment-name--static { padding: 4px 6px; }
.bench-board-segment-name::placeholder { color: var(--text-muted); text-transform: none; letter-spacing: 0; }

.bench-board-segment-count {
    font-size: 0.66rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent-purple-dim);
    color: #c4b5fd;
    flex-shrink: 0;
}

.bench-board-segment-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.bench-board-segment-delete:hover {
    color: #f87171;
    background: rgba(244, 63, 94, 0.12);
}

.bench-board-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
    padding: 12px;
    min-height: 76px; /* empty segments stay droppable */
}

/* ── Tiles: logo-first, light backdrop (same language as the positioning
   logo map), grab cursor + spring hover ─────────────────────────────── */
.bench-tile {
    position: relative;
    border-radius: var(--radius-md);
    cursor: grab;
    animation: mm-scale-in 300ms var(--ease-out) both;
    transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-med) var(--ease-out);
}
.bench-tile:active { cursor: grabbing; }
.bench-tile:hover {
    transform: translateY(-2px);
    z-index: 2;
}

.bench-tile-face {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 8 / 5;
    padding: 8px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #ffffff 0%, #eef0f6 100%);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}
.bench-tile:hover .bench-tile-face {
    box-shadow: var(--shadow-2), 0 0 18px -4px rgba(139, 92, 246, 0.45);
}
.bench-tile-face img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.bench-tile-wordmark {
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #23233a;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bench-tile-name {
    display: block;
    margin-top: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--dur-fast) var(--ease-out);
}
.bench-tile:hover .bench-tile-name { color: var(--text-secondary); }

.bench-tile-open,
.bench-tile-remove {
    position: absolute;
    top: 3px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 5px;
    background: rgba(10, 10, 16, 0.82);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    z-index: 3;
}
.bench-tile-open  { left: 3px; }
.bench-tile-remove { right: 3px; }
.bench-tile:hover .bench-tile-open,
.bench-tile:hover .bench-tile-remove { display: inline-flex; }
.bench-tile-open:hover   { background: var(--accent-purple); color: #fff; }
.bench-tile-remove:hover { background: #e11d48; color: #fff; }

/* Drag states */
.bench-tile--ghost { opacity: 0.35; }
.bench-tile--chosen .bench-tile-face,
.bench-tile--drag .bench-tile-face {
    box-shadow: var(--shadow-3), 0 0 24px -4px rgba(139, 92, 246, 0.6);
}
.bench-board-tiles.bench-drag-over { background: rgba(139, 92, 246, 0.05); }

/* Search items double as drag sources — hint it. */
.bench-search-item:not(.is-pinned) { cursor: grab; }
.bench-search-item.bench-tile--ghost {
    opacity: 0.9;
    border-radius: var(--radius-md);
    outline: 1px dashed var(--accent-purple);
}

/* Compare section head */
.bench-compare-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.bench-compare-head h3 { margin: 0; }
.bench-subhead {
    margin: 16px 0 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Unsorted dock ──────────────────────────────────────────────────────
   Lives below the board so segments own the map real estate. Hidden when
   empty; is-drop-ready (during a drag) makes it a visible drop target;
   is-collapsed rolls the tiles up but keeps the header. */
.bench-board-tray {
    margin-top: 14px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
    transition: border-color var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out);
}
.bench-board-tray.is-empty { display: none; }

.bench-board-tray.is-drop-ready {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.06);
    box-shadow: 0 0 24px -8px rgba(139, 92, 246, 0.4);
}

.bench-board-tray-head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
}
.bench-board-tray-head:hover { color: var(--text-primary); }

.bench-board-tray-chevron {
    flex-shrink: 0;
    transition: transform var(--dur-med) var(--ease-out);
}
.bench-board-tray.is-collapsed .bench-board-tray-chevron { transform: rotate(-90deg); }

.bench-board-tray-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bench-board-tray-hint {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.bench-board-tray-tiles {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    border-top: 1px dashed var(--border-subtle);
}
.bench-board-tray.is-collapsed .bench-board-tray-tiles { display: none; }
.bench-board-tray.is-drop-ready.is-collapsed .bench-board-tray-tiles { display: grid; }

/* ===== Bench board: nested subsegments ===== */
.bench-board-segment-grip {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    cursor: grab;
    flex-shrink: 0;
    padding: 2px;
    border-radius: 4px;
}
.bench-board-segment-grip:hover { color: var(--text-secondary); background: rgba(255,255,255,0.06); }
.bench-board-segment-grip:active { cursor: grabbing; }

.bench-board-segment-addsub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.bench-board-segment-addsub:hover {
    color: #c4b5fd;
    background: var(--accent-purple-dim);
}
/* One level max: nested segments never offer "+ sub". */
.bench-board-segment--sub .bench-board-segment-addsub { display: none; }

.bench-board-subsegments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
    transition: padding var(--dur-med) var(--ease-out), min-height var(--dur-med) var(--ease-out);
}
.bench-board-subsegments:not(:empty) { padding: 0 10px 10px; }

/* While a segment is being dragged, empty sub-zones open up as visible
   drop targets ("drop here to nest"). */
body.bench-seg-dragging .bench-board-subsegments {
    min-height: 44px;
    padding: 6px 10px 10px;
    border-radius: var(--radius-md);
    outline: 1px dashed color-mix(in srgb, var(--accent-purple) 45%, transparent);
    outline-offset: -6px;
}
body.bench-seg-dragging .bench-board-segment--sub .bench-board-subsegments {
    min-height: 0;
    padding: 0;
    outline: none;
}

.bench-board-segment--sub {
    border: 1px solid color-mix(in srgb, var(--accent-purple) 22%, transparent);
    border-left: 3px solid var(--accent-purple);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.07), rgba(18, 18, 28, 0.5) 55%);
    box-shadow: none;
    animation: none;
}
.bench-board-segment--sub .bench-board-segment-head {
    padding: 6px 8px 6px 10px;
    background: transparent;
    border-bottom: 1px solid color-mix(in srgb, var(--accent-purple) 14%, transparent);
}
.bench-board-segment--sub .bench-board-segment-name {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}
.bench-board-segment--sub .bench-board-tiles {
    padding: 10px;
    min-height: 60px;
}

.bench-board-segment--ghost {
    opacity: 0.45;
    outline: 2px dashed var(--accent-purple);
    outline-offset: 2px;
}

/* ===== Bench board: resizable segment width + nest-target clarity ===== */
.bench-board-segment-resize {
    position: absolute;
    top: 0;
    right: -7px;
    bottom: 0;
    width: 14px;
    cursor: ew-resize;
    z-index: 4;
}
.bench-board-segment-resize::after {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 6px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background var(--dur-fast) var(--ease-out);
}
.bench-board-segment-resize:hover::after,
.bench-board-segment.is-resizing .bench-board-segment-resize::after {
    background: var(--accent-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}
.bench-board-segment--sub .bench-board-segment-resize { display: none; }

body.bench-resizing { cursor: ew-resize; user-select: none; }
.bench-board-segment.is-resizing {
    outline: 1px dashed var(--ring);
    outline-offset: 2px;
}

/* Nest zones: while a segment drags, every eligible sub-zone shows a
   labelled slot; the one the drop would land in lights up. Between-card
   positions show no label — that's a reorder. */
body.bench-seg-dragging .bench-board-subsegments::before {
    content: 'Drop to nest as sub-segment';
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-muted);
    padding: 4px 0 2px;
}
body.bench-seg-dragging .bench-board-segment--sub .bench-board-subsegments::before { content: none; }
.bench-board-subsegments.is-nest-target {
    outline: 2px dashed var(--accent-purple) !important;
    outline-offset: -4px;
    background: rgba(139, 92, 246, 0.08);
}
.bench-board-subsegments.is-nest-target::before {
    color: #c4b5fd;
}

/* Width caps on smaller screens so large spans never overflow the grid. */
@media (max-width: 1100px) {
    .bench-board { grid-template-columns: repeat(2, 1fr); }
    .bench-board-segment { grid-column: span 1 !important; }
    .bench-board-segment[data-span="3"],
    .bench-board-segment[data-span="4"],
    .bench-board-segment[data-span="5"],
    .bench-board-segment[data-span="6"] { grid-column: span 2 !important; }
    .bench-board-segment-resize { display: none; }
}
@media (max-width: 640px) {
    .bench-board { grid-template-columns: 1fr; }
    .bench-board-segment { grid-column: span 1 !important; }
}

/* Floating copy of a segment while fallback-dragging it. */
.bench-board-segment--lifted {
    opacity: 0.92;
    transform: rotate(1.2deg);
    box-shadow: var(--shadow-3), 0 0 30px -6px rgba(139, 92, 246, 0.5);
    max-width: 320px;
}

/* ── Data provider API rows (profile page) ──────────────────────────────── */
.api-provider-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.api-provider-row {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.api-provider-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.api-provider-name {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.92);
    margin-bottom: 2px;
}
.api-provider-help {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}
.api-provider-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.api-provider-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.studio-field--inline .studio-input {
    width: 100%;
    padding: 8px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.02em;
}
.studio-field--inline .studio-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.studio-pill--ok {
    background: rgba(52, 211, 153, 0.12);
    color: rgba(167, 243, 208, 0.95);
    border-color: rgba(52, 211, 153, 0.28);
}

/* ── Live task-runs panel ────────────────────────────────────────────────── */
.task-runs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.task-run {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    color: inherit;
    text-decoration: none;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.task-run:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
}
.task-run--pending, .task-run--started {
    border-left: 3px solid rgba(251, 191, 36, 0.7);
}
.task-run--success  { border-left: 3px solid rgba(52, 211, 153, 0.7); }
.task-run--failure  { border-left: 3px solid rgba(248, 113, 113, 0.75); }
.task-run--review   {
    background: rgba(251, 191, 36, 0.06);
    border-color: rgba(251, 191, 36, 0.28);
}
.task-run--review:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.5);
}
.task-run-main { flex: 1 1 auto; min-width: 0; }
.task-run-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.task-run-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.92);
    font-weight: 500;
}
.task-run-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    border: 1px solid transparent;
}
.task-run-status--pending, .task-run-status--started {
    background: rgba(251, 191, 36, 0.14);
    color: rgba(253, 224, 71, 0.95);
    border-color: rgba(251, 191, 36, 0.28);
}
.task-run-status--success {
    background: rgba(52, 211, 153, 0.14);
    color: rgba(167, 243, 208, 0.95);
    border-color: rgba(52, 211, 153, 0.28);
}
.task-run-status--failure {
    background: rgba(248, 113, 113, 0.14);
    color: rgba(254, 202, 202, 0.95);
    border-color: rgba(248, 113, 113, 0.32);
}
.task-run-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.06em;
    font-weight: 600;
    text-transform: uppercase;
}
.task-run-pill--review {
    background: rgba(251, 191, 36, 0.18);
    color: rgba(253, 224, 71, 1);
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.task-run-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 6px;
}
.task-run-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.62);
    line-height: 1.45;
}
.task-run-hint--error { color: rgba(254, 202, 202, 0.92); }

.task-run-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-size: 12px;
    font-weight: 600;
    color: rgba(196, 181, 253, 1);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 120ms ease, transform 120ms ease;
}
.task-run:hover .task-run-cta {
    background: rgba(139, 92, 246, 0.24);
}
.task-run:hover .task-run-cta-arrow {
    transform: translateX(2px);
}
.task-run-cta-arrow {
    transition: transform 120ms ease;
    display: inline-block;
}
.task-run--review .task-run-cta {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
    color: rgba(253, 224, 71, 1);
}
.task-run--review:hover .task-run-cta {
    background: rgba(251, 191, 36, 0.25);
}
.task-run--pending .task-run-cta, .task-run--started .task-run-cta {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.7);
}

/* ===================================================================
   ==  Bench selection strip (horizontal search + suggested cards)
   == ================================================================ */

.bench-picker-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}
.bench-picker-head h3 { margin: 0; flex-shrink: 0; }
.bench-search--strip { flex: 1; min-width: 0; height: 46px; }

.bench-strip { min-height: 40px; }
.bench-strip .bench-search-head {
    padding: 0 2px 8px;
    border-bottom: 0;
}
.bench-strip .bench-search-empty {
    padding: 14px;
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
}

.bench-strip-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 10px;
}
.bench-strip-divider::before,
.bench-strip-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.bench-strip-divider span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.38);
    white-space: nowrap;
}

/* The strip itself: one horizontal, snap-scrolling row of cards. */
.bench-pick-list {
    list-style: none;
    margin: 0;
    padding: 4px 2px 10px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 232px;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    /* scrollbar inherits the global floating treatment from style.css */
}

.bench-pick {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* .bench-search-item centers; stretch so rows fill the card */
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.008)),
        var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), var(--shadow-sm);
    cursor: pointer;
    transition: border-color 160ms var(--ease-out),
                transform 160ms var(--ease-out),
                box-shadow 160ms var(--ease-out);
    animation: mm-fade-up 380ms var(--ease-out) both;
    animation-delay: calc(min(var(--pick-i, 0), 8) * 40ms);
}
.bench-pick:hover {
    border-color: rgba(139,92,246,0.45);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        0 12px 28px -14px rgba(139,92,246,0.35),
        var(--shadow-md);
}
.bench-pick.is-pinned {
    background:
        linear-gradient(180deg, rgba(139,92,246,0.10), rgba(139,92,246,0.02)),
        var(--bg-secondary);
    border-color: rgba(139,92,246,0.28);
}

.bench-pick-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bench-pick-logo {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.bench-pick-logo img { width: 100%; height: 100%; object-fit: cover; }
.bench-pick-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bench-pick-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bench-pick-name:hover { color: rgba(167,139,250,1); }
.bench-pick-focus {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bench-pick-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 999px;
    background:
        radial-gradient(120% 200% at 50% -50%, rgba(255,255,255,0.18) 0%, transparent 50%),
        linear-gradient(180deg, rgba(139,92,246,0.95) 0%, rgba(124,58,237,0.95) 100%);
    border: 1px solid rgba(139,92,246,0.55);
    color: #fff;
    cursor: pointer;
    transition: transform 160ms var(--ease-spring), box-shadow 160ms ease;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 8px 18px -8px rgba(139,92,246,0.55);
}
.bench-pick-add:hover {
    transform: scale(1.1);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.22) inset,
        0 10px 22px -8px rgba(139,92,246,0.7);
}
.bench-pick-add svg { display: block; }

.bench-pick-pinned {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(16,185,129,0.16);
    border: 1px solid rgba(16,185,129,0.40);
    color: #6ee7b7;
}

.bench-pick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.bench-pick-stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bench-pick-stat dt {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.35);
}
.bench-pick-stat dd {
    margin: 0;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================================================================
   ==  Bench cockpit (business detail behind the map)
   == ================================================================ */

.bench-cockpit-section {
    position: sticky;
    top: 84px;
}
@media (max-width: 1100px) {
    .bench-cockpit-section { position: static; }
}

.bench-cockpit-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: mm-fade-up 360ms var(--ease-out) both;
}

.bench-cockpit-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.40);
}

.bench-cockpit-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bench-cockpit-logo {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.bench-cockpit-logo img { width: 100%; height: 100%; object-fit: cover; }
.bench-cockpit-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bench-cockpit-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bench-cockpit-name:hover { color: rgba(167,139,250,1); }
.bench-cockpit-taxonomy {
    font-size: 11px;
    color: rgba(255,255,255,0.50);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bench-cockpit-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 140ms ease;
}
.bench-cockpit-close:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
}

.bench-cockpit-placement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 11.5px;
    color: rgba(255,255,255,0.60);
}
.bench-cockpit-placement--placed {
    background: rgba(16,185,129,0.10);
    border-color: rgba(16,185,129,0.30);
    color: #6ee7b7;
}
.bench-cockpit-placement--add {
    justify-content: space-between;
    margin: 0;
}

.bench-cockpit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
}
.bench-cockpit-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.005)),
        rgba(0,0,0,0.25);
    border: 1px solid var(--border-subtle);
}
.bench-cockpit-metric dt {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.38);
}
.bench-cockpit-metric dd {
    margin: 0;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}
.bench-cockpit-metric small {
    font-size: 10px;
    color: rgba(255,255,255,0.42);
}

.bench-cockpit-sizing {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: rgba(255,255,255,0.75);
}
.bench-cockpit-sizing dfn {
    font-style: normal;
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.38);
    margin-right: 4px;
}

.bench-cockpit-block h5 {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.45);
}
.bench-cockpit-products {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.bench-cockpit-products li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 10px;
    border-left: 2px solid rgba(139,92,246,0.35);
}
.bench-cockpit-products strong {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}
.bench-cockpit-products span {
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(255,255,255,0.55);
}

.bench-cockpit-customers {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.70);
}
.bench-cockpit-sectors {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.bench-cockpit-sectors li {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(59,130,246,0.10);
    border: 1px solid rgba(59,130,246,0.25);
    font-size: 10.5px;
    color: rgba(147,197,253,0.9);
}
.bench-cockpit-sectors em {
    font-style: normal;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    color: rgba(255,255,255,0.75);
    margin-left: 4px;
}

.bench-cockpit-edge {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255,255,255,0.65);
}

.bench-cockpit-coverage {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bench-cockpit-coverage-bar {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
}
.bench-cockpit-coverage-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--gradient-brand);
    transition: width 650ms var(--ease-out);
}
.bench-cockpit-coverage-label {
    font-size: 10.5px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    color: rgba(255,255,255,0.50);
    white-space: nowrap;
}

.bench-cockpit-hint {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: rgba(255,255,255,0.45);
}

.bench-cockpit-empty {
    padding: 22px 16px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,0.10);
    border-radius: var(--radius-lg);
}
.bench-cockpit-empty h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin: 0 0 6px;
}
.bench-cockpit-empty p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: rgba(255,255,255,0.45);
}

.bench-cockpit-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.bench-cockpit-foot a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(167,139,250,1);
    text-decoration: none;
}
.bench-cockpit-foot a:hover { text-decoration: underline; }
.bench-cockpit-provenance {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.38);
    text-align: right;
}

/* The tile currently open in the cockpit gets a ring on the board. */
.bench-tile.is-inspected .bench-tile-face {
    box-shadow:
        0 0 0 2px rgba(139,92,246,0.85),
        0 0 18px -2px rgba(139,92,246,0.45);
}
.bench-tile.is-inspected .bench-tile-name { color: rgba(196,181,253,1); }

/* ===================================================================
   ==  Bench comparison table (Compare › Table layout)
   == ================================================================ */

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.bench-table-wrap {
    max-height: 600px;
    overflow: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-2);
}

.bench-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.bench-table th,
.bench-table td {
    text-align: left;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
    vertical-align: middle;
}

/* Sticky header */
.bench-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: saturate(1.2);
}

/* Sticky company column (top-left cell sits above both) */
.bench-th-company,
.bench-td-company {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    box-shadow: 1px 0 0 var(--border-subtle);
}
.bench-th-company { z-index: 4; background: var(--bg-elevated); }

.bench-table tbody tr:last-child td { border-bottom: none; }
.bench-table tbody tr { transition: background 120ms ease; }
.bench-table tbody tr:hover td { background: var(--bg-card-hover); }
.bench-table tbody tr:hover .bench-td-company { background: var(--bg-card-hover); }

/* Company cell — logo + name + focus/category */
.bench-td-co {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    min-width: 0;
}
.bench-td-logo {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgba(255,255,255,0.7);
    font-size: 10px;
    font-weight: 600;
}
.bench-td-logo img { width: 100%; height: 100%; object-fit: cover; }
.bench-td-co-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bench-td-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
    transition: color 120ms ease;
}
.bench-td-co:hover .bench-td-name { color: rgba(167,139,250,1); }
.bench-td-sub {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

/* Numeric (money) columns — right-aligned, monospace, aligned digits.
   Scoped under .bench-table so it out-specifies the base `.bench-table th/td`. */
.bench-table .bench-col--num { text-align: right; }
.bench-num {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Long prose columns — clamp with a hover tooltip */
.bench-table .bench-col--text { white-space: normal; min-width: 200px; max-width: 320px; }
.bench-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    line-height: 1.4;
}

.bench-td-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(167,139,250,1);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}
.bench-td-link:hover { text-decoration: underline; }
.bench-td-link svg { opacity: 0.7; }

.bench-cell-empty { color: var(--text-muted); }

/* Remove action — icon, revealed on row hover */
.bench-table .bench-th-actions,
.bench-table .bench-td-actions { width: 40px; text-align: center; padding-left: 4px; padding-right: 10px; }
.bench-td-actions form { margin: 0; }
.bench-row-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all 130ms ease;
}
.bench-table tbody tr:hover .bench-row-remove { opacity: 1; }
.bench-row-remove:hover {
    background: rgba(244,63,94,0.14);
    border-color: rgba(244,63,94,0.4);
    color: #fb7185;
}
.bench-row-remove:focus-visible { opacity: 1; outline: 2px solid rgba(139,92,246,0.6); outline-offset: 1px; }

.bench-table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 24px;
    text-align: center;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(139,92,246,0.03);
}
.bench-table-empty svg { color: var(--text-muted); margin-bottom: 2px; }
.bench-table-empty strong { font-family: var(--font-display); font-size: 0.98rem; color: var(--text-primary); }
.bench-table-empty span { font-size: 12.5px; color: var(--text-muted); max-width: 360px; }
