        /* Critical CSS - Prevents FOUC */
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background-color: #f9fafb;
            color: #111827;
            margin: 0;
            padding: 0;
            min-height: 100vh;
            opacity: 1;
            font-size: 14px;
            line-height: 1.45;
            font-feature-settings: 'cv11', 'ss01';
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
            transition: opacity 0.3s ease;
        }

        .atlas-shell .workspace-home-card {
            min-height: 188px !important;
            gap: 12px !important;
            padding: 16px 18px !important;
            border-radius: 10px !important;
            border-color: var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) !important;
            background: var(--bg-container) !important;
            justify-content: space-between !important;
        }

        .atlas-shell .workspace-home-card:hover,
        .atlas-shell .workspace-home-card:focus-visible {
            border-color: var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) !important;
            background: color-mix(in srgb, var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) 4%, var(--bg-container)) !important;
        }

        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-icon,
        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-label,
        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-count {
            color: var(--atlas-category-accent, var(--atlas-accent)) !important;
        }

        .atlas-shell .workspace-config-stack .atlas-config-choice-group {
            display: none !important;
        }

        .atlas-shell .workspace-config-stack .atlas-config-llm-group [id$='ProviderSelect'],
        .atlas-shell .workspace-config-stack .atlas-config-llm-group [id$='ModelSelect'] {
            display: block !important;
        }

        .atlas-shell #method-category-section {
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .atlas-shell .workspace-method-discovery,
        .atlas-shell #table-summary-strip {
            display: none !important;
        }

        .light .atlas-shell #methodSelector,
        .light .atlas-shell .workspace-config-stack select:not([multiple]) {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475a72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip {
            display: grid !important;
            grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
            gap: 12px;
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-height: 112px;
            padding: 16px;
            border-radius: 18px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card-label {
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card-value {
            font-size: 1.8rem;
            line-height: 1;
            font-weight: 700;
            color: var(--text-primary);
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card-copy {
            font-size: 0.82rem;
            color: var(--text-secondary);
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card--informational {
            border-color: color-mix(in srgb, #0b7bd9 24%, var(--border-primary));
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card--commercial {
            border-color: color-mix(in srgb, #d97706 24%, var(--border-primary));
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card--transactional {
            border-color: color-mix(in srgb, #0f9f6e 24%, var(--border-primary));
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card--navigational {
            border-color: color-mix(in srgb, #6366f1 24%, var(--border-primary));
        }

        .atlas-shell[data-table-summary-mode="planner"] #table-summary-strip .planner-intent-card--unknown {
            border-color: color-mix(in srgb, var(--text-secondary) 24%, var(--border-primary));
        }

        .light .atlas-shell #methodSelector,
        .light .atlas-shell .workspace-config-stack select:not([multiple]),
        .atlas-shell .workspace-config-stack .atlas-config-control--has-chevron,
        .atlas-shell .workspace-config-stack select:not([multiple]) {
            appearance: none !important;
            -webkit-appearance: none !important;
            background-repeat: no-repeat !important;
            background-position: right 0.9rem center !important;
            background-size: 1rem 1rem !important;
            padding-right: 2.75rem !important;
        }

        .atlas-shell .atlas-config-toggle-card--disabled {
            cursor: default;
            opacity: 0.82;
        }

        .atlas-shell .atlas-config-toggle-card--disabled input {
            cursor: not-allowed;
        }

        .atlas-shell .atlas-action-btn:not(.atlas-action-btn--primary),
        .atlas-shell .workspace-actions-toggle:not(.atlas-action-btn--primary),
        .atlas-shell .results-toolbar-btn:not(.results-toolbar-btn--primary):not(.results-toolbar-btn--danger),
        .atlas-shell #view-data-menu-btn,
        .atlas-shell #columns-toggle-btn,
        .atlas-shell #filter-btn,
        .atlas-shell #ccaSelectAll,
        .atlas-shell #ccaDeselectAll {
            border-color: var(--border-primary) !important;
            background: var(--bg-container) !important;
            color: var(--text-primary) !important;
            box-shadow: none !important;
        }

        .atlas-shell .atlas-action-btn:not(.atlas-action-btn--primary):hover,
        .atlas-shell .workspace-actions-toggle:not(.atlas-action-btn--primary):hover,
        .atlas-shell .results-toolbar-btn:not(.results-toolbar-btn--primary):not(.results-toolbar-btn--danger):hover,
        .atlas-shell #view-data-menu-btn:hover,
        .atlas-shell #columns-toggle-btn:hover,
        .atlas-shell #filter-btn:hover,
        .atlas-shell #ccaSelectAll:hover,
        .atlas-shell #ccaDeselectAll:hover {
            border-color: var(--border-primary) !important;
            background: var(--bg-input) !important;
            color: var(--text-primary) !important;
        }

        .content-library-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 14px;
        }

        .content-library-library-card {
            display: grid;
            gap: 12px;
            padding: 16px;
            border: 1px solid var(--border-primary);
            border-radius: 16px;
            background: var(--bg-container);
            text-align: left;
            transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
        }

        .content-library-library-card:hover {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 24%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 4%, var(--bg-container));
            transform: translateY(-1px);
        }

        .content-library-library-card.is-active {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 42%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-container));
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, transparent);
        }

        .content-library-library-card-top,
        .content-library-library-card-footer {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .content-library-library-card-count,
        .content-library-library-card-footer {
            color: var(--text-secondary);
            font-size: 0.76rem;
        }

        .atlas-module-shell {
            display: grid;
            gap: 20px;
            padding: 24px;
        }

        .atlas-module-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 20px;
        }

        .atlas-module-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
        }

        .atlas-module-page-surface {
            padding: 18px 20px 22px !important;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            gap: 18px;
        }

        .atlas-module-page-surface .workflow-step-helper {
            margin: 0;
            max-width: 44rem;
        }

        .atlas-card {
            border: 1px solid var(--border-primary);
            border-radius: 16px;
            background: var(--bg-container);
            overflow: hidden;
        }

        .atlas-card-header {
            padding: 18px 20px 12px;
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-card-title {
            font-size: 15px;
            font-weight: 750;
            color: var(--text-primary);
        }

        .atlas-card-description {
            margin-top: 4px;
            color: var(--text-muted, var(--text-secondary));
            font-size: 12px;
            line-height: 1.4;
        }

        .atlas-card-body {
            padding: 18px 20px;
        }

        .atlas-module-metric-strip {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
        }

        .atlas-module-metric-card {
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, var(--border-primary));
            border-radius: 16px;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-container)) 0%, var(--bg-container) 100%);
            padding: 18px 20px;
            box-shadow: var(--shadow-sm);
        }

        .atlas-module-metric-value {
            font-size: clamp(1.35rem, 1.8vw, 1.7rem);
            line-height: 1.05;
            font-weight: 800;
            color: var(--text-heading);
            letter-spacing: -0.03em;
        }

        .atlas-module-metric-label {
            margin-top: 10px;
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .atlas-module-metric-note {
            margin-top: 8px;
            font-size: 0.78rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .atlas-module-workspace {
            display: grid;
            gap: 16px;
            align-items: start;
        }

        .atlas-module-column {
            display: flex;
            flex-direction: column;
            gap: 16px;
            min-width: 0;
        }

        .atlas-summary-shell {
            min-height: 100%;
        }

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

        .atlas-summary-item {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            padding: 11px 12px;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-input);
        }

        .atlas-summary-item-label {
            font-size: 0.67rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .atlas-summary-item-value {
            font-size: 0.82rem;
            line-height: 1.45;
            color: var(--text-primary);
            text-align: right;
            word-break: break-word;
        }

        .atlas-summary-empty {
            margin: 0;
            font-size: 0.82rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }

        .atlas-selectable-option {
            display: flex !important;
            align-items: flex-start;
            gap: 10px !important;
            min-height: 46px;
            padding: 12px 14px;
            border: 1px solid var(--border-primary);
            border-radius: 14px;
            background: var(--bg-container);
            transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
        }

        .atlas-selectable-option:hover {
            transform: translateY(-1px);
            background: var(--bg-input);
        }

        .atlas-selectable-option input {
            margin-top: 1px;
            flex: 0 0 auto;
        }

        .atlas-selectable-option--social:hover,
        .atlas-module-shell--social .atlas-selectable-option--social:has(input:checked) {
            border-color: color-mix(in srgb, var(--color-social-media, var(--active-category-accent, var(--text-accent))) 34%, var(--border-primary));
            background: color-mix(in srgb, var(--color-social-media, var(--active-category-accent, var(--text-accent))) 8%, var(--bg-container));
        }

        .atlas-selectable-option--ad:hover,
        .atlas-module-shell--adcopy .atlas-selectable-option--ad:has(input:checked) {
            border-color: color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent, var(--text-accent))) 34%, var(--border-primary));
            background: color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent, var(--text-accent))) 8%, var(--bg-container));
        }

        .atlas-inline-secondary-action {
            min-height: 34px;
        }

        .atlas-grid-2 {
            display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.9fr);
            gap: 20px;
        }

        .atlas-grid-3 {
            display: grid;
            grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr) minmax(320px, 0.9fr);
            gap: 20px;
        }

        .atlas-card-subsection + .atlas-card-subsection {
            margin-top: 18px;
            padding-top: 18px;
            border-top: 1px solid var(--border-primary);
        }

        .atlas-command-bar {
            display: flex;
            align-items: stretch;
            justify-content: space-between;
            gap: 16px;
            border: 1px solid var(--border-primary);
            border-radius: 16px;
            background: var(--bg-container);
            padding: 14px 16px;
        }

        .atlas-results-card {
            border: 1px solid var(--border-primary);
            border-radius: 16px;
            background: var(--bg-container);
            overflow: hidden;
        }

        .atlas-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .atlas-tab {
            min-height: 34px;
            padding: 0 14px;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.78rem;
            font-weight: 650;
        }

        .atlas-tab.is-active {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 42%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, var(--bg-input));
            color: var(--text-primary);
        }

        .atlas-result-pane {
            border: 1px solid var(--border-primary);
            border-radius: 14px;
            background: var(--bg-input-secondary);
            padding: 16px;
        }

        .atlas-shell .workspace-home-card {
            min-height: 188px;
            gap: 12px;
            padding: 16px 18px;
            border-radius: 10px;
            border-color: color-mix(in srgb, var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) 12%, var(--border-primary));
            background: var(--bg-container);
            justify-content: space-between;
        }

        .atlas-shell .workspace-home-card:hover,
        .atlas-shell .workspace-home-card:focus-visible {
            border-color: color-mix(in srgb, var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) 24%, var(--border-primary));
            background: color-mix(in srgb, var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) 4%, var(--bg-container));
        }

        .atlas-shell .workspace-home-card-title {
            font-size: 1rem;
            line-height: 1.18;
            letter-spacing: -0.02em;
        }

        .atlas-shell .workspace-home-card-copy {
            margin-top: auto;
            font-size: 0.84rem;
            line-height: 1.45;
        }

        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-icon,
        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-label,
        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-count {
            color: var(--atlas-category-accent, var(--atlas-accent));
        }

        .atlas-shell .atlas-rail-heading-row {
            align-items: baseline;
        }

        .atlas-shell .atlas-rail-count,
        .atlas-shell .atlas-category-btn-count {
            min-width: 2.5ch;
            text-align: right;
            line-height: 1;
        }

        .atlas-shell .workspace-config-stack .atlas-config-choice-group {
            display: none;
        }

        .atlas-shell .workspace-config-stack .atlas-config-llm-group [id$='ProviderSelect'],
        .atlas-shell .workspace-config-stack .atlas-config-llm-group [id$='ModelSelect'] {
            display: block !important;
        }

        .atlas-shell #method-category-section {
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .atlas-shell .workspace-method-discovery {
            display: none !important;
        }

        .atlas-shell #table-summary-strip {
            display: none !important;
        }

        .atlas-view-menu .workspace-export-menu-list {
            min-width: 170px;
            padding: 8px;
        }

        .atlas-view-menu-list #view-toggle-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            background: transparent;
        }

        .atlas-view-menu-list #view-toggle-group .results-toggle-btn {
            width: 100%;
            justify-content: flex-start;
            border-radius: 10px;
        }

        .atlas-shell .results-toolbar {
            align-items: center;
            flex-wrap: wrap;
        }

        .atlas-shell .results-command-bar {
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-shell .results-table-search-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
        }

        .results-table-controls-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .results-table-controls-row #columns-toggle-wrapper {
            position: static;
        }

        .results-table-controls-row #columns-dropdown {
            left: 0;
            right: auto;
        }

        .atlas-stored-keys-line {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.76rem;
            line-height: 1.45;
        }

        .atlas-stored-keys-line + .atlas-stored-keys-line {
            margin-top: 6px;
        }

        .atlas-stored-keys-line-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #ef4444;
            flex: 0 0 auto;
        }

        .atlas-stored-keys-line.is-ok .atlas-stored-keys-line-dot {
            background: #2fd17b;
            box-shadow: 0 0 0 4px color-mix(in srgb, #2fd17b 12%, transparent);
        }

        .atlas-stored-keys-line.is-missing .atlas-stored-keys-line-dot {
            background: #ef4444;
            box-shadow: 0 0 0 4px color-mix(in srgb, #ef4444 12%, transparent);
        }

.atlas-shell .social-media-surface:not(.atlas-module-page-surface),
.atlas-shell #ad-copy-section > div:not(.atlas-module-page-surface),
.atlas-shell .ai-writer-surface:not(.atlas-module-page-surface) {
    padding: 24px;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

        .atlas-shell .atlas-social-grid .workflow-step-panel,
        .atlas-shell .atlas-ad-grid .workflow-step-panel,
        .atlas-shell .atlas-social-command-bar .workflow-step-panel,
        .atlas-shell .atlas-ad-command-bar .workflow-step-panel,
        .atlas-shell .atlas-social-refine-card .workflow-step-panel {
            padding: 0;
            border: 0;
            background: transparent;
            box-shadow: none;
        }

        .atlas-shell .atlas-social-command-bar .workflow-step-panel,
        .atlas-shell .atlas-ad-command-bar .workflow-step-panel {
            width: 100%;
        }

        .atlas-shell .atlas-social-command-bar .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-command-bar .workflow-step-panel > .content-library-section-heading {
            display: none;
        }

        .atlas-shell .atlas-social-command-bar .grid,
        .atlas-shell .atlas-ad-command-bar .grid {
            margin-top: 0 !important;
        }

        .atlas-shell .atlas-social-results-card .content-library-toolbar,
        .atlas-shell .atlas-ad-results-card .content-library-toolbar {
            margin-bottom: 0;
            padding: 18px 20px;
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-shell .atlas-social-results-card #social-copy-tab-strip,
        .atlas-shell .atlas-ad-results-card #ad-copy-tab-strip {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .atlas-shell .atlas-social-results-card #social-copy-tab-panels,
        .atlas-shell .atlas-ad-results-card #ad-copy-tab-panels {
            display: grid;
            gap: 12px;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-shell {
            gap: 20px;
        }

        .atlas-shell .content-library-module-header {
            padding-bottom: 0;
            margin-bottom: 0;
            border: 0;
        }

        .atlas-shell .content-library-atlas-body {
            margin-top: 4px;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-classic-shell {
            grid-template-columns: 320px minmax(0, 1fr);
            gap: 16px;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-classic-rail-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-selected-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-actions-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-keyword-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-analyses-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-imports-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-pages-card,
        .atlas-shell .atlas-module-shell--libraries .content-library-insights-card {
            border-radius: 16px;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-classic-rail-card .content-library-kicker,
        .atlas-shell .atlas-module-shell--libraries .content-library-selected-card .content-library-kicker {
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-classic-rail-card {
            position: sticky;
            top: 16px;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-actions-card .content-library-toolbar:first-child {
            margin-bottom: 12px;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-actions-card .content-library-toolbar.mt-4 {
            margin-top: 16px !important;
            padding-top: 16px;
            border-top: 1px solid var(--border-primary);
            align-items: flex-end;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-selected-card .content-library-meta {
            justify-content: flex-end;
        }

        .atlas-shell .atlas-module-shell--libraries .content-library-pages-card .content-library-toolbar,
        .atlas-shell .atlas-module-shell--libraries .content-library-insights-card .content-library-toolbar {
            align-items: flex-start;
        }

        .atlas-shell .atlas-module-shell--social {
            --active-category-accent: var(--color-social-media);
        }

        .atlas-shell .atlas-social-workspace {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        }

        .atlas-shell .atlas-social-run-card #social-generate-btn {
            display: inline-flex;
        }

        .atlas-shell .atlas-social-run-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-run-card .workflow-step-panel > .content-library-section-copy {
            display: none;
        }

        .atlas-shell .atlas-social-platforms-card .grid,
        .atlas-shell .atlas-social-output-card .grid,
        .atlas-shell .atlas-ad-angles-card .grid,
        .atlas-shell .atlas-ad-types-card .grid {
            gap: 10px !important;
        }

        .atlas-shell .atlas-social-source-card .workflow-step-panel,
        .atlas-shell .atlas-social-brand-card .workflow-step-panel,
        .atlas-shell .atlas-social-platforms-card .workflow-step-panel,
        .atlas-shell .atlas-social-output-card .workflow-step-panel,
        .atlas-shell .atlas-social-run-card .workflow-step-panel,
        .atlas-shell .atlas-social-refine-card .workflow-step-panel,
        .atlas-shell .atlas-ad-brief-card .workflow-step-panel,
        .atlas-shell .atlas-ad-voice-card .workflow-step-panel,
        .atlas-shell .atlas-ad-angles-card .workflow-step-panel,
        .atlas-shell .atlas-ad-types-card .workflow-step-panel,
        .atlas-shell .atlas-ad-controls-card .workflow-step-panel,
        .atlas-shell .atlas-ad-refine-card .workflow-step-panel {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .atlas-shell .atlas-social-source-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-source-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-social-brand-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-brand-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-social-platforms-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-platforms-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-social-output-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-output-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-social-run-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-run-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-social-refine-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-social-refine-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-ad-brief-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-brief-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-ad-voice-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-voice-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-ad-angles-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-angles-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-ad-types-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-types-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-ad-controls-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-controls-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-ad-refine-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-ad-refine-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-aiw-brief-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-aiw-brief-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-aiw-brand-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-aiw-brand-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-aiw-options-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-aiw-options-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-aiw-controls-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-aiw-controls-card .workflow-step-panel > .content-library-section-copy,
        .atlas-shell .atlas-aiw-refine-card .workflow-step-panel > .content-library-section-heading,
        .atlas-shell .atlas-aiw-refine-card .workflow-step-panel > .content-library-section-copy {
            display: none;
        }

        .atlas-shell .atlas-social-brand-card .grid,
        .atlas-shell .atlas-ad-voice-card .grid {
            gap: 12px !important;
        }

        .atlas-shell .atlas-module-shell--adcopy {
            --active-category-accent: var(--color-ad-copy);
        }

        .atlas-shell .atlas-ad-workspace {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        }

        .atlas-shell .atlas-module-shell--aiwriter {
            --active-category-accent: var(--color-ai-research);
        }

        .atlas-shell .atlas-module-shell--image {
            --active-category-accent: var(--color-image);
        }

        .atlas-shell .atlas-image-workspace {
            grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
        }

        .atlas-shell .atlas-aiw-workspace {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        }

        .atlas-shell .atlas-aiw-brief-card .workflow-step-panel,
        .atlas-shell .atlas-aiw-brand-card .workflow-step-panel,
        .atlas-shell .atlas-aiw-options-card .workflow-step-panel,
        .atlas-shell .atlas-aiw-controls-card .workflow-step-panel,
        .atlas-shell .atlas-aiw-refine-card .workflow-step-panel {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .atlas-shell .atlas-aiw-controls-card #aiw-generate-btn {
            display: inline-flex;
        }

        .atlas-shell .atlas-aiw-options-card .grid,
        .atlas-shell .atlas-aiw-brand-card .grid {
            gap: 12px !important;
        }

        .atlas-shell .atlas-aiw-results-card .content-library-toolbar {
            margin-bottom: 0;
            padding: 18px 20px;
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-shell .atlas-aiw-results-card #aiw-tab-strip {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .atlas-shell .atlas-ad-controls-card #ad-generate-btn {
            display: inline-flex;
        }

        .atlas-shell .atlas-ad-controls-card .workflow-step-panel > .content-library-section-heading {
            display: none;
        }

        .atlas-shell .content-library-layout-tabs-atlas,
        .atlas-shell .content-library-tabs-atlas {
            gap: 8px;
        }

        .atlas-shell .content-library-layout-tabs-atlas .content-library-view-btn,
        .atlas-shell .content-library-tabs-atlas .content-library-view-btn {
            min-height: 34px;
            padding: 0 14px;
            border-radius: 999px;
        }

        .atlas-shell .content-library-field-guide,
        .atlas-shell .ux-card[data-library-view-panel],
        .atlas-shell .content-library-empty,
        .atlas-shell #content-library-detail-form,
        .atlas-shell .content-library-toolbar + .content-library-meta {
            border-radius: 16px;
        }

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

        .atlas-shell .atlas-file-picker-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
            margin-top: 4px;
        }

        .atlas-shell .atlas-file-picker-trigger {
            min-height: 32px;
            display: inline-flex;
            align-items: center;
        }

        .atlas-shell .atlas-file-picker-name {
            color: var(--text-secondary);
            font-size: 0.76rem;
            line-height: 1.4;
            min-width: 0;
            word-break: break-word;
        }

        .atlas-shell .content-library-library-table-wrap,
        .atlas-shell .content-library-pages-wrap > .overflow-x-auto,
        .atlas-shell .content-library-table,
        .atlas-shell .content-library-library-table {
            width: 100%;
        }

        .atlas-shell .content-library-library-table-wrap,
        .atlas-shell .content-library-pages-wrap > .overflow-x-auto {
            border: 1px solid var(--border-primary);
            border-radius: 14px;
            overflow: auto;
            background: var(--bg-container);
        }

        .atlas-shell .content-library-table,
        .atlas-shell .content-library-library-table {
            border-collapse: separate;
            border-spacing: 0;
        }

        .atlas-shell .content-library-table th,
        .atlas-shell .content-library-library-table th {
            position: sticky;
            top: 0;
            z-index: 1;
            background: var(--bg-input-secondary);
            color: var(--text-muted, var(--text-secondary));
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            text-align: left;
            padding: 12px 14px;
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-shell .content-library-table td,
        .atlas-shell .content-library-library-table td {
            padding: 13px 14px;
            border-bottom: 1px solid var(--border-primary);
            color: var(--text-primary);
            font-size: 13px;
            vertical-align: top;
        }

        .atlas-shell .content-library-table tr:hover td,
        .atlas-shell .content-library-library-table tr:hover td {
            background: var(--bg-input-secondary);
        }

        .light .atlas-shell #methodSelector,
        .light .atlas-shell .workspace-config-stack select:not([multiple]) {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475a72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        }

        @media (max-width: 1100px) {
            .atlas-grid-2,
            .atlas-grid-3,
            .atlas-module-header,
            .atlas-command-bar {
                grid-template-columns: 1fr;
                flex-direction: column;
                align-items: stretch;
            }
        }
        
        /* Loading state - hidden until CSS loads */
        .css-loading {
            opacity: 0;
        }
        
        .css-loaded {
            opacity: 1;
        }
        
        /* Base styles */
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-primary);
            margin: 0;
            padding: 0;
            font-size: 14px;
            line-height: 1.45;
            font-feature-settings: 'cv11', 'ss01';
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
        }

        /* Atlas rail fidelity overrides: compact utility-rail layout */
        .atlas-shell #workspace-shell-grid {
            grid-template-columns: 220px minmax(0, 1fr);
        }

        .atlas-config-backdrop {
            display: none;
            position: fixed;
            inset: 45px 0 0 0;
            z-index: 60;
            /* Light dim only — keeps the app readable on small screens */
            background: color-mix(in srgb, var(--bg-body, #0f172a) 12%, transparent);
        }

        .atlas-config-backdrop:not(.hidden) {
            display: block;
        }

        .atlas-shell .workspace-config-rail {
            position: fixed;
            top: 45px;
            right: 0;
            width: 380px;
            min-width: 380px;
            max-width: min(100vw - 8px, 420px);
            height: calc(100vh - 45px);
            z-index: 70;
            border-left: 1px solid var(--border-primary);
            background: var(--bg-container);
            box-shadow: none;
            transform: translateX(0);
            transition: transform 0.2s ease;
        }

        .dark .atlas-shell .workspace-config-rail {
            background: color-mix(in srgb, var(--bg-container) 88%, #020617 12%);
        }

        body.atlas-shell.atlas-rail-closed .workspace-config-rail {
            transform: translateX(100%);
            box-shadow: none;
        }

        .atlas-shell #theme-toggle,
        .atlas-shell #settings-gear-btn {
            width: 36px;
            height: 36px;
            min-height: 36px;
            padding: 0 !important;
            border-radius: 999px !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 0;
        }

        .atlas-shell #theme-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            line-height: 0;
        }

        .atlas-shell #theme-icon svg,
        .atlas-shell #settings-gear-btn svg {
            width: 16px;
            height: 16px;
        }

        .atlas-shell .workspace-main-canvas {
            padding: 20px 30px 34px;
        }

        .atlas-shell .workspace-context-panel {
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            padding: 0 0 2px;
        }

        .atlas-shell .workspace-context-main {
            max-width: 44rem;
        }

        .atlas-shell .workspace-context-copy {
            max-width: 40rem;
        }

        .atlas-shell .workspace-config-stack {
            display: flex;
            flex-direction: column;
            gap: 0;
            height: 100%;
            max-height: 100%;
            min-height: 0;
            padding: 0;
            overflow: hidden;
            background: var(--bg-container);
        }

        .atlas-shell .atlas-config-body-scroll {
            flex: 1 1 auto;
            min-height: 0;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .atlas-shell .workspace-config-resizer {
            flex: 0 0 auto;
        }

        .atlas-shell .workspace-config-dock-header,
        .atlas-shell .atlas-rail-header {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-height: 56px;
            margin: 0;
            padding: 14px 18px;
            border: 0;
            border-bottom: 1px solid var(--border-primary);
            border-radius: 0;
            background: var(--bg-container);
            box-shadow: none;
        }

        .atlas-shell .atlas-rail-title.eyebrow,
        .atlas-shell .workspace-config-dock-header .atlas-rail-title {
            flex: 0 0 auto;
            margin: 0;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .atlas-shell .workspace-config-dock-header > .workspace-switcher-label {
            flex: 1 1 auto;
            margin: 0;
            white-space: nowrap;
        }

        .atlas-shell .atlas-rail-slug,
        .atlas-shell .atlas-config-header-slug {
            flex: 1 1 auto;
            min-width: 0;
            text-align: right;
            color: var(--text-muted, var(--text-secondary));
            font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
            font-size: 12px;
            font-weight: 500;
            letter-spacing: 0.02em;
            text-transform: lowercase;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .atlas-shell .atlas-rail-close,
        .atlas-shell .workspace-config-dock-header .workspace-config-close-btn {
            flex: 0 0 32px;
            width: 32px;
            height: 32px;
            min-width: 32px;
            min-height: 32px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            line-height: 1;
            font-size: 1.1rem;
        }

        .atlas-shell #guest-mode-banner,
        .atlas-shell #use-stored-keys-panel,
        .atlas-shell #method-category-section {
            margin: 0;
            padding: 12px 16px;
            border: 0;
            border-bottom: 1px solid var(--border-primary);
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .atlas-shell #guest-mode-banner,
        .atlas-shell #use-stored-keys-panel {
            padding-bottom: 12px;
        }

        .atlas-shell #method-category-section {
            padding-top: 10px;
            padding-bottom: 10px;
        }

        .atlas-shell #method-category-section .workspace-switcher-label {
            margin-bottom: 4px;
        }

        .atlas-shell #workflow-category-title {
            font-size: 0.92rem;
            line-height: 1.25;
            font-weight: 600;
            letter-spacing: -0.015em;
        }

        .atlas-shell #workflow-category-copy {
            display: none;
        }

        .atlas-shell .workspace-method-discovery {
            margin: 0 0 14px;
            gap: 8px;
        }

        .atlas-shell #api-form {
            margin: 0;
            padding: 12px 16px 12px;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            overflow: visible;
        }

        .atlas-shell #inputsContainer {
            overflow: visible;
            padding: 0;
        }

        .atlas-shell .atlas-config-inline-run {
            display: none !important;
        }

        .atlas-shell .input-section {
            gap: 14px;
            padding-bottom: 18px;
        }

        .atlas-shell .input-section:last-child {
            padding-bottom: 0;
        }

        .atlas-shell .workspace-config-stack textarea,
        .atlas-shell .atlas-config-control--textarea,
        .atlas-shell .atlas-config-control--multi {
            min-height: 120px;
            max-height: 200px;
            resize: vertical;
            overflow-y: auto;
        }

        .atlas-shell .workspace-config-stack .text-xs,
        .atlas-shell .workspace-config-stack p {
            line-height: 1.5;
        }

        .atlas-shell .workspace-config-stack .bg-\[var\(--bg-input\)\],
        .atlas-shell .workspace-config-stack .bg-\[var\(--bg-container\)\] {
            box-shadow: none;
        }

        .atlas-shell .workspace-config-footer,
        .atlas-shell .atlas-rail-footer {
            position: sticky;
            bottom: 0;
            flex: 0 0 auto;
            flex-shrink: 0;
            z-index: 10;
            margin: 0;
            margin-top: auto;
            padding: 12px 16px 14px;
            border: 0;
            border-top: 1px solid var(--border-primary);
            border-radius: 0;
            background: var(--bg-container);
            box-shadow: none;
        }

        .atlas-shell .atlas-rail-footer-meta,
        .atlas-shell .workspace-config-footer-meta {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
            font-size: 12px;
            color: var(--text-muted, var(--text-secondary));
        }

        .atlas-shell .atlas-rail-footer-meta-left {
            min-width: 0;
        }

        .atlas-shell .atlas-rail-footer-last,
        .atlas-shell #workspace-config-last-run {
            flex: 0 0 auto;
            margin: 0;
            font-size: 12px;
            line-height: 1.35;
            text-align: right;
            color: var(--text-muted, var(--text-secondary));
        }

        .atlas-shell .atlas-rail-footer-meta .workspace-switcher-label {
            margin: 0;
        }

        .atlas-shell .atlas-rail-footer-actions,
        .atlas-shell .workspace-config-footer-actions {
            display: grid;
            grid-template-columns: 112px 1fr;
            align-items: center;
            gap: 10px;
            width: 100%;
        }

        .atlas-shell #submit-btn,
        .atlas-shell #workspace-config-reset-btn {
            width: 100%;
            min-width: 0;
        }

        /* Rail Run / Reset: keep a single compact row; avoid grid stretch + ellipsis eating the "Run" label. */
        .atlas-shell .atlas-rail-footer #submit-btn,
        .atlas-shell .atlas-rail-footer #workspace-config-reset-btn,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #submit-btn,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #workspace-config-reset-btn {
            display: inline-flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
            justify-content: center !important;
            align-self: center;
            min-height: 40px;
            max-height: 44px;
            height: auto;
            overflow: visible;
            text-overflow: clip;
        }

        .atlas-shell .atlas-rail-footer #submit-btn span,
        .atlas-shell .atlas-rail-footer #workspace-config-reset-btn span,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #submit-btn span,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #workspace-config-reset-btn span {
            flex: 0 0 auto;
            min-width: 0;
            overflow: visible;
            text-overflow: clip;
            white-space: nowrap;
        }

        .atlas-shell .atlas-rail-footer #submit-btn .atlas-run-btn-inner,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #submit-btn .atlas-run-btn-inner {
            min-width: 0;
        }

        .atlas-shell .atlas-rail-footer #submit-btn svg,
        .atlas-shell .atlas-rail-footer #workspace-config-reset-btn svg,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #submit-btn svg,
        .atlas-shell .workspace-config-footer .workspace-config-footer-actions #workspace-config-reset-btn svg {
            display: block;
            width: 16px !important;
            height: 16px !important;
            min-width: 16px !important;
            min-height: 16px !important;
            max-width: 16px !important;
            max-height: 16px !important;
            flex: 0 0 16px !important;
            flex-shrink: 0 !important;
        }

        .atlas-action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 36px;
            padding: 0 13px;
            border-radius: 9px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 600;
            line-height: 1;
        }

        .atlas-action-btn:hover {
            background: var(--bg-input-secondary);
            border-color: var(--border-secondary);
        }

        .atlas-action-btn svg,
        .atlas-run-btn svg,
        .atlas-rail-footer button svg,
        .atlas-rail-footer-actions .atlas-action-btn svg,
        .atlas-action-btn .atlas-run-btn-idle-icon,
        .atlas-action-btn .atlas-action-btn-icon {
            width: 16px !important;
            height: 16px !important;
            min-width: 16px;
            min-height: 16px;
            max-width: 16px;
            max-height: 16px;
            flex: 0 0 16px;
        }

        .atlas-action-btn--primary {
            border-color: transparent;
            background: var(--text-accent);
            color: #fff;
        }

        .atlas-action-btn--primary:hover {
            background: var(--text-accent-hover);
        }

        .atlas-shell .workspace-config-footer .atlas-action-btn--primary:hover {
            color: #fff;
        }

        .atlas-run-btn-inner {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .atlas-run-btn-inner--busy .atlas-run-btn-spinner {
            width: 14px;
            height: 14px;
            border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
            border-top-color: currentColor;
            border-radius: 999px;
            flex: 0 0 auto;
            animation: atlas-run-spin 0.7s linear infinite;
        }

        .atlas-action-btn--primary .atlas-run-btn-inner--busy .atlas-run-btn-spinner {
            border: 2px solid rgba(255, 255, 255, 0.35);
            border-top-color: #fff;
        }

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

        .atlas-shell .atlas-rail-footer-actions button,
        .atlas-shell .workspace-config-footer .atlas-action-btn,
        .atlas-shell .workspace-config-footer .workspace-primary-action,
        .atlas-shell .workspace-config-footer .workspace-secondary-action {
            min-height: 40px;
            max-height: 44px;
            border-radius: 10px;
            font-size: 0.81rem;
        }

        .atlas-shell .workspace-preview-panel {
            margin: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        /* Page header owns Export / Save; hide duplicate actions in Live output bar (programmatic .click() still works). */
        body.atlas-shell #results-sticky-bar .workspace-export-menu,
        body.atlas-shell #results-sticky-bar #save-results-btn {
            display: none !important;
        }

        body.atlas-shell #results-container.atlas-results-shell {
            display: flex;
            flex-direction: column;
            border-radius: 16px;
        }

        body.atlas-shell .atlas-results-eyebrow {
            margin-bottom: 6px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--text-accent);
        }

        body.atlas-shell .atlas-results-title {
            font-size: 22px;
            font-weight: 750;
            letter-spacing: -0.03em;
        }

        body.atlas-shell .atlas-table-wrap {
            width: 100%;
            max-width: 100%;
            overflow: auto;
            border: 1px solid var(--border-primary);
            border-radius: 14px;
            -webkit-overflow-scrolling: touch;
        }

        body.atlas-shell .atlas-table-wrap .tabulator {
            min-width: 900px;
        }

        body.atlas-shell .atlas-table-wrap .tabulator .tabulator-header {
            position: sticky;
            top: 0;
            z-index: 2;
        }

        body.atlas-shell .atlas-stat-chip,
        body.atlas-shell .table-summary-strip .summary-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 28px;
            padding: 0 10px;
            border: 1px solid var(--border-primary);
            border-radius: 999px;
            background: var(--bg-container);
            font-size: 12px;
            font-weight: 650;
            color: var(--text-secondary);
        }

        body.atlas-shell #raw-wrapper .dashboard-shell {
            display: grid;
            gap: 18px;
            padding: 0 0 8px;
        }

        body.atlas-shell #raw-wrapper .dashboard-surface {
            border: 1px solid var(--border-primary);
            border-radius: 16px;
            background: var(--bg-container);
            overflow: hidden;
        }

        body.atlas-shell #raw-wrapper .dashboard-hero-panel {
            border-radius: 16px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
        }

        body.atlas-shell #raw-wrapper .atlas-results-dashboard,
        body.atlas-shell #raw-wrapper .dashboard-shell.atlas-results-dashboard {
            max-width: 100%;
        }

        .atlas-canvas-utility-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 10px 12px;
            width: 100%;
        }

        .atlas-canvas-utility-actions {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            gap: 8px;
        }

        .atlas-utility-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 32px;
            min-height: 32px;
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-primary);
            font-size: 0.8rem;
            font-weight: 500;
            line-height: 1.2;
            transition: background 0.12s, border-color 0.12s, color 0.12s;
        }

        .atlas-utility-btn:hover {
            background: var(--bg-input);
            border-color: color-mix(in srgb, var(--text-accent) 25%, var(--border-primary));
        }

        .atlas-utility-status {
            display: flex;
            align-items: center;
        }

        .atlas-utility-status .atlas-context-meta {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: color-mix(in srgb, var(--bg-input) 80%, var(--bg-container));
            font-size: 0.75rem;
            color: var(--text-secondary);
            max-width: 100%;
        }

        .atlas-canvas-secondary-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }

        .atlas-shell .atlas-canvas-secondary-row .workspace-actions-toggle {
            min-height: 36px;
            padding: 0 12px;
            border-radius: 9px;
        }

        .atlas-shell #method-category-section > .workspace-switcher-label {
            font-size: 0.92rem;
            line-height: 1.25;
            font-weight: 600;
            letter-spacing: -0.015em;
            text-transform: none;
            color: var(--text-secondary);
        }

        .atlas-shell #workspace-toggle-setup-btn {
            display: none !important;
        }

        .atlas-shell .workspace-rail-card {
            background: transparent;
            box-shadow: none;
            border: 0;
            border-radius: 0;
        }

        .atlas-shell .atlas-config-control--has-chevron,
        .atlas-shell .workspace-config-stack select:not([multiple]) {
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            padding-right: 2.25rem;
        }

        .atlas-shell .results-command-bar .results-toolbar-btn--primary,
        .atlas-shell .results-header .results-toolbar-btn {
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-primary);
            font-size: 0.8rem;
            font-weight: 500;
            border-radius: 8px;
            height: 32px;
            min-height: 32px;
        }

        .atlas-shell .results-command-bar .results-toolbar-btn--primary {
            background: var(--text-accent, #2563eb);
            color: #fff;
            border-color: transparent;
        }

        .atlas-stored-keys-eyebrow {
            display: none;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--text-secondary);
            margin: 0 0 8px;
        }

        .atlas-shell .atlas-stored-keys-eyebrow {
            display: block;
        }

        .atlas-shell #stored-keys-message {
            display: none;
        }

        .atlas-shell #use-stored-keys-panel .atlas-stored-keys-card--show-settings #stored-keys-message {
            display: block;
            margin-top: 6px;
            font-size: 0.72rem;
        }

        .atlas-stored-keys-card {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 8px 10px;
            border: 1px solid var(--border-primary);
            border-radius: 8px;
            background: var(--bg-input);
        }

        .atlas-shell .atlas-stored-keys-lines {
            font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
        }

        .atlas-shell .atlas-stored-keys-title {
            font-size: 0.78rem;
        }

        .atlas-stored-keys-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #2fd17b;
            margin-top: 5px;
            flex: 0 0 auto;
            box-shadow: 0 0 0 4px color-mix(in srgb, #2fd17b 12%, transparent);
        }

        .atlas-stored-keys-card--bad .atlas-stored-keys-dot {
            background: #ef4444;
            box-shadow: 0 0 0 4px color-mix(in srgb, #ef4444 14%, transparent);
        }

        .atlas-stored-keys-title {
            font-size: 0.8rem;
            font-weight: 650;
            color: var(--text-primary);
        }

        .atlas-stored-keys-lines {
            margin-top: 4px;
            line-height: 1.45;
            word-break: break-all;
        }

        .atlas-stored-keys-secondary {
            display: none;
        }

        .atlas-shell .atlas-stored-keys-secondary {
            display: block;
        }

        .atlas-stored-keys-change {
            flex: 0 0 auto;
            padding: 4px 10px;
            font-size: 0.75rem;
            min-height: 0;
        }

        .atlas-shell #atlas-stored-keys-change.atlas-action-btn {
            min-height: 32px;
            padding: 4px 10px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .atlas-workspace-prefs {
            display: none;
        }

        .atlas-shell .atlas-workspace-prefs {
            display: block;
        }

        .atlas-workspace-prefs {
            margin: 0;
            padding: 12px 16px 16px;
            border: 0;
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-shell .atlas-rail-eyebrow {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--text-secondary);
            margin: 0 0 10px;
        }

        .atlas-shell .atlas-config-label,
        .atlas-shell #method-heading,
        .atlas-shell .workspace-config-form-intro .workspace-switcher-label {
            font-size: 0.68rem !important;
            font-weight: 700 !important;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text-secondary) !important;
        }

        .atlas-shell #method-heading {
            font-size: 0.84rem !important;
            font-weight: 600 !important;
            letter-spacing: 0 !important;
            text-transform: none !important;
        }

        .atlas-shell .atlas-config-control--textarea,
        .atlas-shell .atlas-config-control--multi,
        .atlas-shell .workspace-config-stack textarea {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 0.8rem;
        }

        .atlas-shell .atlas-config-control--select,
        .atlas-shell .atlas-config-control--text,
        .atlas-shell .atlas-config-control--number,
        .atlas-shell .atlas-config-control--date,
        .atlas-shell .workspace-config-stack select:not([multiple]) {
            padding: 7px 10px !important;
            min-height: 36px;
            border-radius: 8px;
        }

        .atlas-pref-row {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin: 0 0 8px;
        }

        .atlas-pref-check {
            width: 15px;
            height: 15px;
            border-radius: 3px;
            accent-color: var(--text-accent, #3b82f6);
        }

        .atlas-config-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-top: 0.5rem;
        }

        .atlas-config-field-hint {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 0.68rem;
            color: var(--text-secondary);
        }

        .atlas-shell .workspace-config-form-intro .workspace-switcher-copy {
            display: none;
        }

        .atlas-task-breadcrumb {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 4px;
            text-transform: none;
            font-weight: 500;
            letter-spacing: 0.02em;
        }

        .atlas-breadcrumb-back {
            border: 0;
            background: transparent;
            padding: 0;
            font: inherit;
            color: var(--text-secondary);
            cursor: pointer;
        }

        .atlas-breadcrumb-back:hover {
            color: var(--text-accent, #3b82f6);
        }

        .atlas-breadcrumb-chev {
            width: 12px;
            height: 12px;
            display: block;
            color: var(--text-secondary);
            opacity: 0.7;
        }

        .atlas-breadcrumb-current {
            color: var(--text-primary);
            font-weight: 600;
        }

        .atlas-breadcrumb-current--dim {
            color: var(--text-secondary);
            font-weight: 500;
        }

        .atlas-shell .workspace-context-actions {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .atlas-shell .workspace-context-actions-primary,
        .atlas-shell .workspace-context-actions-core {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }

        .atlas-shell .workspace-icon-action {
            border-radius: 8px;
        }

        .atlas-shell .workspace-config-footer-line {
            font-size: 0.78rem;
            color: var(--text-secondary);
            line-height: 1.4;
        }

        @media (max-width: 1100px) {
            .atlas-shell #workspace-shell-grid,
            .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
                grid-template-columns: 1fr;
            }

            .atlas-shell .workspace-config-rail {
                max-width: min(100vw, 100%);
                width: min(100vw, 100%);
            }
        }

        .hidden {
            display: none !important;
        }

        code,
        pre,
        .mono,
        .font-mono {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
            font-feature-settings: 'cv05', 'ss03';
        }

        body.app-fast-ui button,
        body.app-fast-ui a,
        body.app-fast-ui input,
        body.app-fast-ui select,
        body.app-fast-ui textarea {
            transition-property: background-color, border-color, color, box-shadow !important;
            transition-duration: 0.15s !important;
            transition-timing-function: ease-out !important;
        }

        body.app-fast-ui .hover\:scale-105:hover,
        body.app-fast-ui .hover\:scale-110:hover,
        body.app-fast-ui .active\:scale-95:active {
            transform: none !important;
        }

        .workspace-app-shell {
            width: 100%;
            margin: 0 auto;
            padding: 6px 6px 18px;
        }

        .workspace-topbar {
            position: sticky;
            top: 6px;
            z-index: 40;
            margin-bottom: 8px;
            padding: 8px 12px;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 7%, var(--bg-container)), var(--bg-container));
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, var(--border-primary));
            border-radius: 18px;
            box-shadow:
                0 10px 26px rgba(15, 23, 42, 0.08),
                0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, transparent);
        }

        .workspace-topbar-shell {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
        }

        @media (max-width: 720px) {
            .workspace-topbar-shell {
                grid-template-columns: minmax(0, 1fr);
                grid-template-rows: auto auto auto;
                align-items: stretch;
            }

            .workspace-topbar-brand {
                order: 1;
            }

            .workspace-topbar-nav {
                order: 2;
            }

            .workspace-topbar-actions {
                order: 3;
                justify-content: flex-start;
                flex-wrap: wrap;
            }
        }

        .workspace-topbar-brand {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
            border-radius: 12px;
        }

        .workspace-topbar-brand:hover,
        .workspace-topbar-brand:focus-visible {
            outline: none;
            color: var(--text-primary);
        }

        .workspace-topbar-brand:focus-visible {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 24%, transparent);
        }

        .workspace-app-shell[data-active-category="home"] .workspace-topbar-brand {
            color: var(--text-primary);
        }

        .workspace-topbar-nav {
            min-width: 0;
        }

        .workspace-mode-tabs {
            display: flex;
            align-items: center;
            gap: 5px;
            overflow-x: auto;
            scrollbar-width: none;
        }

        .workspace-mode-tabs::-webkit-scrollbar {
            display: none;
        }

        .workspace-mode-tabs .category-tab {
            min-height: 32px;
            padding: 0 12px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
            text-align: center;
            line-height: 1.2;
            font-size: 0.78rem;
            font-weight: 600;
            white-space: nowrap;
            border-radius: 12px;
            border: 1px solid transparent;
            background: transparent;
            transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
        }

        .workspace-tab-icon {
            width: 15px;
            height: 15px;
            flex-shrink: 0;
            opacity: 0.82;
        }

        .workspace-tab-label {
            min-width: 0;
        }

        .workspace-tab-label-wrap {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }

        .workspace-beta-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 2px 6px;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--category-accent, var(--text-accent)) 34%, transparent);
            background: color-mix(in srgb, var(--category-accent, var(--text-accent)) 12%, var(--bg-container));
            color: color-mix(in srgb, var(--category-accent, var(--text-accent)) 78%, var(--text-primary));
            font-size: 0.58rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            line-height: 1;
            flex-shrink: 0;
        }

        .light .workspace-mode-tabs .category-tab[data-category="single-seo"] {
            --category-accent: #0099D8;
        }

        .light .workspace-mode-tabs .category-tab[data-category="seo-analysis"] {
            --category-accent: #006BFF;
        }

        .light .workspace-mode-tabs .category-tab[data-category="content-auditing"] {
            --category-accent: #6B3CFF;
        }

        .light .workspace-mode-tabs .category-tab[data-category="ai-research"] {
            --category-accent: #00B89C;
        }

        .light .workspace-mode-tabs .category-tab[data-category="content-libraries"] {
            --category-accent: #8A49E8;
        }

        .light .workspace-mode-tabs .category-tab[data-category="social-media"] {
            --category-accent: #E433B6;
        }

        .light .workspace-mode-tabs .category-tab[data-category="image"] {
            --category-accent: #1488d8;
        }

        .light .workspace-mode-tabs .category-tab[data-category="ad-copy"] {
            --category-accent: #ff3c00;
        }

        .light .workspace-mode-tabs .category-tab[data-category="local-prospects"] {
            --category-accent: #CC0033;
        }

        /* Dark: synthwave accents (match CATEGORY_THEME_TOKENS in app-init.js) */
        .dark .workspace-mode-tabs .category-tab[data-category="single-seo"] {
            --category-accent: #38D8FF;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="seo-analysis"] {
            --category-accent: #008CFF;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="content-auditing"] {
            --category-accent: #7A2BFF;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="ai-research"] {
            --category-accent: #00CEB4;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="content-libraries"] {
            --category-accent: #A94DFF;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="social-media"] {
            --category-accent: #D830B0;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="image"] {
            --category-accent: #4cc2ff;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="ad-copy"] {
            --category-accent: #ff7142;
        }

        .dark .workspace-mode-tabs .category-tab[data-category="local-prospects"] {
            --category-accent: #FF2D55;
        }

        .workspace-mode-tab-active {
            background: color-mix(in srgb, var(--category-accent, var(--text-accent)) 13%, var(--bg-container));
            color: var(--text-primary);
            border-color: color-mix(in srgb, var(--category-accent, var(--text-accent)) 42%, var(--border-primary));
            box-shadow:
                inset 0 -2px 0 var(--category-accent, var(--text-accent)),
                0 0 0 1px color-mix(in srgb, var(--category-accent, var(--text-accent)) 14%, transparent),
                0 12px 28px color-mix(in srgb, var(--category-accent, var(--text-accent)) 12%, transparent);
        }

        .workspace-mode-tab-inactive {
            color: var(--text-secondary);
        }

        .workspace-mode-tab-inactive:hover {
            color: var(--text-primary);
            background: color-mix(in srgb, var(--category-accent, var(--text-accent)) 7%, var(--bg-input));
            border-color: color-mix(in srgb, var(--category-accent, var(--text-accent)) 18%, var(--border-primary));
        }

        .dark .workspace-mode-tab-active {
            background: color-mix(in srgb, var(--category-accent, var(--text-accent)) 11%, var(--bg-container));
            border-color: color-mix(in srgb, var(--category-accent, var(--text-accent)) 32%, var(--border-primary));
            box-shadow:
                inset 0 -2px 0 color-mix(in srgb, var(--category-accent, var(--text-accent)) 88%, transparent),
                0 0 0 1px color-mix(in srgb, var(--category-accent, var(--text-accent)) 9%, transparent),
                0 8px 20px color-mix(in srgb, var(--category-accent, var(--text-accent)) 7%, transparent);
        }

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

        .workspace-page-hero {
            display: none;
            margin: 0;
            padding: 0;
        }

        .workspace-page-kicker {
            margin: 0 0 8px;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--text-accent);
        }

        .workspace-page-title {
            margin: 0;
            font-size: clamp(1.65rem, 2.15vw, 2.2rem);
            line-height: 1.02;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-page-copy {
            margin: 6px 0 0;
            max-width: 60rem;
            color: var(--text-secondary);
            font-size: 0.84rem;
            line-height: 1.42;
        }

        .workspace-shell-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(420px, var(--workspace-config-width));
            gap: 14px;
            align-items: start;
        }

        .workspace-shell-grid[data-rail-collapsed="true"] {
            grid-template-columns: minmax(0, 1fr);
        }

        .workspace-shell-grid[data-rail-collapsed="true"] .workspace-config-rail {
            display: none;
        }

        .workspace-main-canvas {
            order: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-width: 0;
        }

        .workspace-config-rail {
            order: 2;
            position: sticky;
            top: 74px;
            align-self: start;
            max-height: calc(100vh - 86px);
            min-width: 0;
            min-height: 0;
        }

        .workspace-config-rail.is-resizing {
            user-select: none;
            cursor: col-resize;
        }

        .workspace-config-stack {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-width: 0;
            max-height: calc(100vh - 86px);
            overflow-y: auto;
            padding-right: 6px;
            scrollbar-gutter: stable both-edges;
        }

        @media (min-width: 1101px) {
            .workspace-config-rail {
                max-height: calc(100vh - 86px);
            }

            .workspace-config-stack {
                max-height: calc(100vh - 86px);
                overflow-y: auto;
                padding-right: 6px;
            }

            .dashboard-shell .tabulator .tabulator-tableholder,
            .dashboard-shell .tabulator .tabulator-tableHolder {
                max-height: none !important;
                overflow-y: visible !important;
            }
        }

        .workspace-config-resizer {
            position: absolute;
            left: -14px;
            top: 14px;
            bottom: 14px;
            width: 18px;
            border: 0;
            background: transparent;
            cursor: col-resize;
            z-index: 3;
        }

        .workspace-config-resizer::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 4px;
            height: 72px;
            border-radius: 999px;
            transform: translate(-50%, -50%);
            background: color-mix(in srgb, var(--text-secondary) 28%, transparent);
            transition: background-color 0.15s ease, box-shadow 0.15s ease;
        }

        .workspace-config-resizer:hover::before,
        .workspace-config-rail.is-resizing .workspace-config-resizer::before {
            background: color-mix(in srgb, var(--text-accent) 55%, transparent);
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-accent) 12%, transparent);
        }

        .workspace-rail-card {
            width: 100%;
            max-width: none !important;
            margin: 0 !important;
            padding: 14px;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 4%, var(--bg-container)), var(--bg-container));
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 12%, var(--border-primary));
            border-radius: 18px;
            box-shadow:
                0 8px 18px rgba(15, 23, 42, 0.05),
                inset 0 1px 0 color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, transparent);
        }

        .workspace-config-dock-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding-top: 10px;
            padding-bottom: 10px;
            background: var(--bg-container);
        }

        .workspace-config-close-btn {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 1.15rem;
            line-height: 1;
            flex-shrink: 0;
        }

        .workspace-config-close-btn:hover {
            background: var(--bg-input-secondary);
            color: var(--text-primary);
        }

        .workspace-config-form-intro {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .workspace-config-divider {
            height: 1px;
            margin: 12px 0 0;
            background: var(--border-primary);
            border: 0;
        }

        .workspace-workflow-catalog {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 12px;
            align-items: stretch;
        }

        @media (min-width: 640px) {
            .workspace-workflow-catalog {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (min-width: 1024px) {
            .workspace-workflow-catalog {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        .workspace-workflow-catalog-row {
            display: flex;
            flex-direction: column;
            min-height: 0;
            border: 1px solid var(--border-primary);
            border-radius: 14px;
            padding: 12px 14px;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-container));
        }

        .workspace-workflow-catalog-row-main {
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            min-height: 0;
        }

        .workspace-workflow-catalog-title {
            margin: 0 0 6px;
            font-size: 0.88rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-workflow-catalog-returns {
            margin: 0 0 10px;
            font-size: 0.76rem;
            line-height: 1.35;
            color: var(--text-secondary);
        }

        .workspace-workflow-catalog-copy {
            margin: 0 0 10px;
            font-size: 0.8rem;
            line-height: 1.38;
            color: var(--text-secondary);
        }

        .workspace-workflow-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin: 0 0 10px;
        }

        .workspace-workflow-badge {
            display: inline-flex;
            align-items: center;
            min-height: 22px;
            padding: 0 8px;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-container));
            color: var(--text-primary);
            font-size: 0.68rem;
            font-weight: 700;
        }

        .workspace-workflow-catalog-label {
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-workflow-catalog-btn {
            width: fit-content;
            margin-top: auto;
            align-self: flex-start;
        }

        .workspace-workflow-catalog-empty {
            margin: 0;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .workspace-empty-state {
            border: 1px dashed color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 28%, var(--border-primary));
            border-radius: 12px;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-container));
            padding: 22px;
            text-align: left;
        }

        .workspace-empty-state-title {
            margin: 0;
            font-size: 1rem;
            font-weight: 800;
            color: var(--text-primary);
        }

        .workspace-empty-state-copy {
            margin: 6px 0 0;
            font-size: 0.86rem;
            color: var(--text-secondary);
            line-height: 1.45;
        }

        .workspace-field-error {
            margin: 6px 0 0;
            padding: 8px 10px;
            border-radius: 10px;
            border: 1px solid color-mix(in srgb, var(--error-border, #dc2626) 42%, var(--border-primary));
            background: color-mix(in srgb, var(--error-bg, #fee2e2) 70%, var(--bg-container));
            color: var(--text-error);
            font-size: 0.78rem;
            font-weight: 700;
            line-height: 1.35;
        }

        .workspace-field-invalid {
            border-color: var(--error-border, #dc2626) !important;
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--error-border, #dc2626) 16%, transparent) !important;
        }

        .workspace-intro-banner {
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 28%, var(--border-primary));
            border-radius: 12px;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-container));
            padding: 14px;
            color: var(--text-secondary);
            font-size: 0.82rem;
            line-height: 1.45;
        }

        .workspace-intro-banner-title {
            margin: 0 0 4px;
            color: var(--text-primary);
            font-weight: 800;
            font-size: 0.9rem;
        }

        .workspace-intro-banner p {
            margin: 0;
        }

        .workspace-export-menu {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .workspace-export-menu-list {
            position: absolute;
            right: 0;
            top: calc(100% + 6px);
            z-index: 80;
            min-width: 190px;
            padding: 6px;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
            box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
        }

        .workspace-export-menu-item {
            width: 100%;
            min-height: 34px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding: 0 10px;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--text-primary);
            font-size: 0.78rem;
            font-weight: 650;
            text-align: left;
        }

        .workspace-export-menu-item:hover:not(:disabled) {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, var(--bg-input));
        }

        .workspace-export-menu-item:disabled {
            cursor: not-allowed;
            opacity: 0.48;
        }

        .workspace-export-controls {
            gap: 6px;
            padding: 4px 4px 8px;
            margin-bottom: 4px;
            border-bottom: 1px solid var(--border-primary);
        }

        .workspace-app-shell[data-active-category] .workspace-actions-toggle:not(:disabled),
        .workspace-app-shell[data-active-category] .workspace-organize-cancel:not(:disabled) {
            border-color: color-mix(in srgb, var(--active-category-accent) 38%, var(--border-primary));
        }

        .workspace-app-shell[data-active-category] .workspace-actions-toggle:not(:disabled):hover,
        .workspace-app-shell[data-active-category] .workspace-organize-cancel:not(:disabled):hover {
            border-color: color-mix(in srgb, var(--active-category-accent) 55%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent) 9%, var(--bg-container));
        }

        .workspace-app-shell[data-active-category] .workspace-organize-save:not(:disabled) {
            background: linear-gradient(135deg, var(--active-category-accent), var(--active-category-accent-hover));
            border-color: color-mix(in srgb, var(--active-category-accent) 80%, #000 0%);
        }

        .workspace-app-shell[data-active-category] .workspace-organize-save:not(:disabled):hover {
            filter: brightness(1.05);
        }

        .workspace-context-panel {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: start;
            padding: 12px 14px;
            background: var(--bg-container);
            border: 1px solid var(--border-primary);
            border-radius: 16px;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
        }

        .workspace-context-main {
            min-width: 0;
        }

        .workspace-context-eyebrow {
            margin: 0 0 6px;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--text-accent);
        }

        .workspace-context-title {
            margin: 0;
            font-size: clamp(0.96rem, 1.15vw, 1.16rem);
            line-height: 1.08;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-context-copy {
            margin: 4px 0 0;
            max-width: 38rem;
            color: var(--text-secondary);
            line-height: 1.35;
            font-size: 0.76rem;
        }

        .workspace-context-status {
            display: none;
        }

        .workspace-context-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            min-width: 0;
        }

        .workspace-home-section {
            display: flex;
            flex-direction: column;
            gap: 28px;
            align-items: flex-start;
            padding: 14px 0 2px;
            text-align: left;
        }

        .workspace-home-panel {
            width: 100%;
            min-width: 0;
            max-width: 1180px;
        }

        .workspace-home-section-title {
            margin: 0 0 12px;
            color: var(--text-primary);
            font-size: 1.02rem;
            line-height: 1.2;
            font-weight: 800;
        }

        .workspace-home-workflow-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
            width: 100%;
        }

        .workspace-home-workspace-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            width: min(100%, 900px);
        }

        .workspace-home-card {
            --home-link-accent: var(--active-category-accent, var(--text-accent));
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            min-width: 0;
            min-height: 58px;
            padding: 13px 15px;
            border: 1px solid color-mix(in srgb, var(--home-link-accent) 28%, var(--border-primary));
            border-radius: 14px;
            background: color-mix(in srgb, var(--home-link-accent) 7%, var(--bg-container));
            color: var(--text-primary);
            text-align: left;
        }

        .workspace-home-card[data-home-category="content-libraries"] {
            --home-link-accent: #8A49E8;
        }

        .workspace-home-card[data-home-category="social-media"] {
            --home-link-accent: #E433B6;
        }

        .workspace-home-card[data-home-category="ad-copy"] {
            --home-link-accent: #ff3c00;
        }

        .dark .workspace-home-card[data-home-category="content-libraries"] {
            --home-link-accent: #A94DFF;
        }

        .dark .workspace-home-card[data-home-category="social-media"] {
            --home-link-accent: #D830B0;
        }

        .dark .workspace-home-card[data-home-category="ad-copy"] {
            --home-link-accent: #ff7142;
        }

        .workspace-home-card:hover,
        .workspace-home-card:focus-visible {
            outline: none;
            border-color: color-mix(in srgb, var(--home-link-accent) 48%, var(--border-primary));
            background: color-mix(in srgb, var(--home-link-accent) 12%, var(--bg-input));
        }

        .workspace-home-card-title {
            display: block;
            color: var(--text-primary);
            font-size: 0.95rem;
            line-height: 1.2;
            font-weight: 800;
        }

        .workspace-home-card-copy {
            display: block;
            margin-top: 4px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            line-height: 1.35;
            font-weight: 600;
        }

        @media (max-width: 1020px) {
            .workspace-home-workflow-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

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

        @media (max-width: 680px) {
            .workspace-home-workflow-grid,
            .workspace-home-workspace-grid {
                grid-template-columns: minmax(0, 1fr);
            }
        }

        .workspace-preview-panel {
            background: var(--bg-container);
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
            overflow: hidden;
        }

        .workspace-preview-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 10px 14px;
            border-bottom: 1px solid var(--border-primary);
            background: var(--bg-input);
        }

        .workspace-preview-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .workspace-preview-kicker {
            display: inline-flex;
            align-items: center;
            padding: 0.3rem 0.68rem;
            border-radius: 999px;
            background: var(--bg-container);
            border: 1px solid var(--border-primary);
            color: var(--text-secondary);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .workspace-preview-tab {
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            padding: 0.5rem 0.9rem;
            background: var(--bg-container);
            color: var(--text-secondary);
            font-size: 0.86rem;
            font-weight: 600;
        }

        .workspace-preview-tab.is-active {
            background: var(--btn-primary-bg);
            border-color: var(--btn-primary-bg);
            color: #fff;
        }

        .workspace-preview-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
        }

        .workspace-preview-action-pill {
            display: inline-flex;
            align-items: center;
            padding: 0.4rem 0.75rem;
            border-radius: 999px;
            background: var(--bg-container);
            border: 1px solid var(--border-primary);
            color: var(--text-secondary);
            font-size: 0.8rem;
            font-weight: 600;
        }

        .workspace-preview-card {
            padding: 14px 16px 16px;
        }

        .workspace-preview-header {
            margin-bottom: 10px;
        }

        .workspace-preview-title {
            margin: 0;
            font-size: 1.06rem;
            line-height: 1.15;
            color: var(--text-primary);
        }

        .workspace-preview-copy {
            margin: 4px 0 0;
            color: var(--text-secondary);
            font-size: 0.82rem;
            line-height: 1.4;
        }

        .workspace-preview-insight-strip {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            margin-bottom: 16px;
        }

        .workspace-preview-insight-card {
            padding: 12px 14px;
            border-radius: 16px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
        }

        .workspace-preview-insight-label {
            display: block;
            margin-bottom: 6px;
            color: var(--text-secondary);
            font-size: 0.76rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .workspace-preview-insight-value {
            color: var(--text-primary);
            font-size: 1.25rem;
            font-weight: 700;
        }

        .workspace-preview-view {
            overflow-x: auto;
        }
        .workspace-preview-state-card {
            display: flex;
            flex-direction: column;
            gap: 16px;
            padding: 18px 20px;
            border: 1px solid color-mix(in srgb, var(--border-primary) 72%, var(--accent-primary) 28%);
            border-radius: 18px;
            background: linear-gradient(180deg, color-mix(in srgb, var(--bg-container) 94%, var(--accent-primary) 6%), var(--bg-container));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }
        .workspace-preview-state-title {
            font-size: 1rem;
            line-height: 1.3;
            font-weight: 700;
            color: var(--text-primary);
        }
        .workspace-preview-state-copy {
            font-size: 0.92rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }
        .workspace-preview-state-list {
            display: grid;
            gap: 8px;
            margin: 0;
            padding: 0 0 0 18px;
            color: var(--text-secondary);
            font-size: 0.88rem;
            line-height: 1.5;
        }
        .workspace-preview-state-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        .workspace-preview-state-note {
            font-size: 0.79rem;
            line-height: 1.45;
            color: var(--text-muted);
        }

        .workspace-preview-sample-table {
            width: 100%;
            min-width: 620px;
            border-collapse: collapse;
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            overflow: hidden;
        }

        .workspace-preview-sample-table th,
        .workspace-preview-sample-table td {
            padding: 12px 14px;
            border-bottom: 1px solid var(--border-primary);
            text-align: left;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        .workspace-preview-sample-table th {
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .workspace-preview-row-chip {
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            background: color-mix(in srgb, var(--text-accent) 10%, var(--bg-container));
            color: var(--text-primary);
            border: 1px solid color-mix(in srgb, var(--text-accent) 20%, var(--border-primary));
            padding: 0.2rem 0.55rem;
            font-size: 0.78rem;
            font-weight: 600;
        }

        .workspace-preview-bars {
            display: grid;
            gap: 12px;
        }

        .workspace-preview-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
            margin-bottom: 16px;
        }

        .workspace-preview-domain-card {
            position: relative;
            padding: 14px 16px;
            border-radius: 18px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            overflow: hidden;
        }

        .workspace-preview-domain-card::before {
            content: "";
            position: absolute;
            inset: 0 0 auto 0;
            height: 3px;
            background: linear-gradient(90deg, var(--text-accent), var(--text-accent-hover));
            opacity: 0.95;
        }

        .workspace-preview-domain-title {
            margin: 0;
            font-size: 0.98rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-preview-domain-subtitle {
            margin: 4px 0 0;
            font-size: 0.78rem;
            color: var(--text-secondary);
        }

        .workspace-preview-domain-stats {
            display: grid;
            gap: 8px;
            margin-top: 12px;
        }

        .workspace-preview-domain-stat {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            padding-top: 8px;
            border-top: 1px solid var(--border-primary);
        }

        .workspace-preview-domain-stat:first-child {
            border-top: 0;
            padding-top: 0;
        }

        .workspace-preview-domain-stat-label {
            font-size: 0.74rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-secondary);
        }

        .workspace-preview-domain-stat-value {
            font-size: 0.96rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-preview-hero-band {
            margin-bottom: 16px;
            padding: 16px 18px;
            border-radius: 18px;
            border: 1px solid color-mix(in srgb, var(--text-accent) 18%, var(--border-primary));
            background: linear-gradient(135deg, color-mix(in srgb, var(--text-accent) 10%, var(--bg-container)), var(--bg-container));
        }

        .workspace-preview-hero-kicker {
            display: block;
            margin-bottom: 6px;
            font-size: 0.74rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-accent);
        }

        .workspace-preview-hero-title {
            margin: 0;
            font-size: 1.05rem;
            line-height: 1.3;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-preview-hero-copy {
            margin: 8px 0 0;
            font-size: 0.84rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .workspace-preview-bar-row {
            display: grid;
            grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto;
            gap: 12px;
            align-items: center;
        }

        .workspace-preview-bar-label,
        .workspace-preview-bar-value {
            font-size: 0.88rem;
            color: var(--text-primary);
            font-weight: 600;
        }

        .workspace-preview-bar-track {
            height: 10px;
            border-radius: 999px;
            background: var(--bg-input);
            overflow: hidden;
        }

        .workspace-preview-bar-fill {
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, var(--btn-primary-bg), var(--text-accent));
        }

        .workspace-main-canvas #content-libraries-section,
        .workspace-main-canvas #status-container {
            margin-top: 0;
            max-width: none;
        }

        .workspace-main-canvas #results-container {
            width: 100%;
            max-width: none;
            border-radius: 18px;
        }

        .workspace-config-stack #method-category-section,
        .workspace-config-stack #api-form {
            width: 100%;
            max-width: none;
            margin: 0;
        }

        .workspace-config-stack select,
        .workspace-config-stack input[type="text"],
        .workspace-config-stack input[type="number"],
        .workspace-config-stack input[type="url"],
        .workspace-config-stack input[type="date"],
        .workspace-config-stack input[type="file"],
        .workspace-config-stack textarea {
            min-height: 40px;
            border-width: 1px;
            border-radius: 12px;
            padding: 0.65rem 0.8rem;
            font-size: 0.82rem;
            box-shadow: none;
        }

        .workspace-config-stack textarea {
            min-height: 108px;
            resize: vertical;
        }

        .workspace-config-filter-grid {
            margin-top: 0.7rem;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.72rem;
        }

        .workspace-form-split {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.85rem;
            margin-top: 0.85rem;
        }

        .workspace-config-inline-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 0.75rem;
            align-items: end;
        }

        .workspace-config-stack #api-form > .mt-8.text-center {
            display: none;
        }

        #guest-mode-banner,
        #use-stored-keys-panel {
            margin-bottom: 0 !important;
            border-radius: 16px;
        }

        #guest-mode-banner,
        #use-stored-keys-panel,
        #method-category-section,
        #api-form,
        .workspace-config-footer {
            scroll-margin-top: 80px;
        }

        .workspace-switcher-label {
            margin: 0 0 4px;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--text-accent);
        }

        .workspace-switcher-title {
            margin: 0;
            font-size: 1.1rem;
            line-height: 1.2;
            font-weight: 700;
            color: var(--text-primary);
        }

        .workspace-switcher-copy {
            margin: 6px 0 0;
            font-size: 0.84rem;
            line-height: 1.42;
            color: var(--text-secondary);
        }

        .workspace-method-discovery {
            margin: 10px 0 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .workspace-method-search-input {
            width: 100%;
            min-height: 38px;
            border-radius: 12px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-input));
            color: var(--text-primary);
            padding: 0.62rem 0.8rem;
            font-size: 0.82rem;
            line-height: 1.3;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
        }

        .workspace-method-search-input::placeholder {
            color: var(--text-secondary);
        }

        .workspace-method-search-input:focus {
            outline: none;
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 42%, var(--border-primary));
            box-shadow:
                0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 20%, transparent),
                0 0 0 5px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, transparent);
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 7%, var(--bg-input));
        }

        .workspace-method-pill-wrap {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .workspace-method-pill-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .workspace-method-pill-label {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .workspace-method-pill-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .workspace-method-pill {
            --method-pill-accent: var(--active-category-accent, var(--text-accent));
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
            max-width: 100%;
            min-height: 30px;
            padding: 0.38rem 0.66rem;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--method-pill-accent) 24%, var(--border-primary));
            background: color-mix(in srgb, var(--method-pill-accent) 10%, var(--bg-input));
            color: var(--text-primary);
            font-size: 0.72rem;
            font-weight: 600;
            transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .workspace-method-pill:hover {
            transform: translateY(-1px);
            background: color-mix(in srgb, var(--method-pill-accent) 14%, var(--bg-input-secondary));
            border-color: color-mix(in srgb, var(--method-pill-accent) 34%, var(--border-primary));
            box-shadow: 0 10px 22px color-mix(in srgb, var(--method-pill-accent) 12%, transparent);
        }

        .workspace-method-pill-meta {
            color: var(--text-secondary);
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .workspace-method-pill-text {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .workspace-method-results {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 8px;
            border-radius: 14px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 14%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 4%, var(--bg-input));
        }

        .workspace-method-results[hidden] {
            display: none !important;
        }

        .workspace-method-result {
            --method-pill-accent: var(--active-category-accent, var(--text-accent));
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            padding: 0.68rem 0.78rem;
            border-radius: 12px;
            border: 1px solid color-mix(in srgb, var(--method-pill-accent) 18%, var(--border-primary));
            background: var(--bg-container);
            color: var(--text-primary);
            text-align: left;
            transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
        }

        .workspace-method-result:hover,
        .workspace-method-result:focus-visible {
            outline: none;
            transform: translateY(-1px);
            background: color-mix(in srgb, var(--method-pill-accent) 8%, var(--bg-container));
            border-color: color-mix(in srgb, var(--method-pill-accent) 32%, var(--border-primary));
            box-shadow: 0 12px 22px color-mix(in srgb, var(--method-pill-accent) 12%, transparent);
        }

        .workspace-method-result-main {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .workspace-method-result-title {
            font-size: 0.8rem;
            font-weight: 700;
            line-height: 1.3;
            color: var(--text-primary);
        }

        .workspace-method-result-copy {
            font-size: 0.72rem;
            line-height: 1.45;
            color: var(--text-secondary);
        }

        .workspace-method-result-tag {
            flex-shrink: 0;
            padding: 0.28rem 0.5rem;
            border-radius: 999px;
            background: color-mix(in srgb, var(--method-pill-accent) 12%, var(--bg-input));
            border: 1px solid color-mix(in srgb, var(--method-pill-accent) 20%, var(--border-primary));
            color: color-mix(in srgb, var(--method-pill-accent) 72%, var(--text-primary));
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .workspace-method-results-empty {
            padding: 0.35rem 0.25rem;
            color: var(--text-secondary);
            font-size: 0.74rem;
            line-height: 1.45;
        }

        .workspace-config-footer {
            position: sticky;
            bottom: 0;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            gap: 10px;
            background: color-mix(in srgb, var(--bg-container) 96%, var(--bg-body));
        }

        .workspace-config-footer-meta {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .workspace-config-footer-actions {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
            align-items: stretch;
            gap: 8px;
            width: 100%;
            flex-shrink: 0;
        }

        .workspace-secondary-action {
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            min-height: 34px;
            padding: 0.45rem 0.8rem;
            background: var(--bg-container);
            color: var(--text-primary);
            font-size: 0.76rem;
            font-weight: 600;
        }

        .workspace-secondary-action:hover {
            background: var(--bg-input);
        }

        @media (max-width: 1320px) {
            .workspace-topbar-shell {
                grid-template-columns: minmax(0, 1fr) auto;
                grid-template-areas:
                    "brand actions"
                    "nav nav";
            }

            .workspace-topbar-brand {
                grid-area: brand;
            }

            .workspace-topbar-nav {
                grid-area: nav;
            }

            .workspace-topbar-actions {
                grid-area: actions;
            }
        }

        @media (max-width: 1100px) {
            .workspace-shell-grid,
            .workspace-shell-grid[data-rail-collapsed="true"] {
                grid-template-columns: 1fr;
            }

            .workspace-config-rail {
                position: static;
                max-height: none;
            }

            .workspace-config-resizer {
                display: none;
            }

            .workspace-config-stack {
                max-height: none;
                overflow: visible;
                padding-right: 0;
            }

            .workspace-shell-grid[data-rail-collapsed="true"] .workspace-config-rail {
                display: block;
            }
        }

        .workspace-app-shell[data-active-category="home"] .workspace-shell-grid[data-rail-collapsed="true"] .workspace-config-rail,
        .workspace-app-shell[data-active-category="content-libraries"] .workspace-shell-grid[data-rail-collapsed="true"] .workspace-config-rail,
        .workspace-app-shell[data-active-category="social-media"] .workspace-shell-grid[data-rail-collapsed="true"] .workspace-config-rail,
        .workspace-app-shell[data-active-category="ad-copy"] .workspace-shell-grid[data-rail-collapsed="true"] .workspace-config-rail {
            display: none;
        }

        @media (max-width: 768px) {
            .workspace-app-shell {
                width: 100%;
                padding: 8px 6px 16px;
            }

            .workspace-topbar {
                top: 6px;
                border-radius: 16px;
            }

            .workspace-topbar-shell {
                gap: 12px;
            }

            .workspace-context-panel {
                grid-template-columns: 1fr;
                padding: 18px;
            }

            .workspace-context-actions {
                width: 100%;
                justify-content: flex-start;
                min-width: 0;
            }

            .workspace-preview-topbar {
                flex-direction: column;
                align-items: flex-start;
            }

            .workspace-preview-bar-row {
                grid-template-columns: 1fr;
            }

            .workspace-rail-card {
                padding: 14px;
                border-radius: 18px;
            }

            .workspace-config-footer {
                position: static;
                flex-direction: column;
                align-items: stretch;
            }

            .workspace-config-footer-actions {
                width: 100%;
                grid-template-columns: 1fr;
            }

            .workspace-config-filter-grid {
                grid-template-columns: 1fr;
            }

            .workspace-config-inline-grid {
                grid-template-columns: 1fr;
            }

            .results-command-bar,
            .results-shell-body {
                padding-inline: 16px;
            }

            .results-header {
                flex-direction: column;
            }

            .results-toolbar {
                justify-content: flex-start;
            }
        }

        /* Theme Variables - Light (Default) */
        :root, .light {
            /* UX Tokens */
            --space-1: 0.25rem;
            --space-2: 0.5rem;
            --space-3: 0.75rem;
            --space-4: 1rem;
            --space-6: 1.5rem;
            --space-8: 2rem;
            --radius-sm: 0.375rem;
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
            --shadow-md: 0 12px 24px rgba(15, 23, 42, 0.08);
            --text-xs: 0.72rem;
            --text-sm: 0.84rem;
            --text-md: 0.96rem;
            --text-lg: 1.08rem;

            /* Backgrounds */
            --workspace-config-width: 480px;
            --bg-body: #F5F7FB;
            --bg-container: #FFFFFF;
            --bg-container-translucent: rgba(255, 255, 255, 0.86);
            --bg-input: #EEF2F8;
            --bg-input-secondary: #E8ECF5;
            --bg-code: #F2F5FA;
            --bg-disabled: #D8DDEA;

            /* Borders */
            --border-primary: rgba(74, 85, 104, 0.10);
            --border-secondary: rgba(74, 85, 104, 0.16);

            /* Text Colors */
            --text-primary: #111827;
            --text-secondary: #5B6475;
            --text-accent: #0099D8;
            --text-accent-hover: #007BB0;
            --text-heading: #0F172A;
            --text-error: #C62828;
            --accent-primary: #0099D8;
            --accent-primary-hover: #007BB0;
            --accent-secondary: #6B3CFF;
            --accent-tertiary: #E433B6;
            --accent-cyan: #00B89C;
            --accent-green: #00B89C;
            --accent-orange: #E97718;
            --active-category-accent: #0099D8;
            --active-category-accent-hover: #007BB0;

            /* Button Colors */
            --btn-primary-bg: #0099D8;
            --btn-primary-hover: #007BB0;
            --btn-copy-bg: #FFFFFF;
            --btn-copy-hover: #EEF2F8;
            --btn-export-bg: #0099D8;
            --btn-export-hover: #007BB0;
            --btn-view-data-bg: #FFFFFF;
            --btn-view-data-hover: #EEF2F8;
            --btn-clear-bg: #FFF4F2;
            --btn-clear-hover: #FFE7E2;

            /* Error Colors */
            --error-bg: #FDECEC;
            --error-border: #F5B5B5;

            /* Tabulator Colors */
            --tabulator-header-bg: #EEF2F8;
            --tabulator-row-bg: #FFFFFF;
            --tabulator-row-even-bg: #F8FAFD;
            --tabulator-border: rgba(74, 85, 104, 0.10);
            --tabulator-text: #111827;
            --tabulator-footer-bg: #EEF2F8;
            --tabulator-pag-button-bg: #FFFFFF;
            --tabulator-pag-button-hover: #E8ECF5;
        }

        /* Dark Theme */
        .dark {
            --workspace-config-width: 480px;
            --bg-body: #0A0614;
            --bg-container: #130A22;
            --bg-container-translucent: rgba(19, 10, 34, 0.84);
            --bg-input: #1A1030;
            --bg-input-secondary: #24163D;
            --bg-code: #0D0718;
            --bg-disabled: #31224C;
            --border-primary: rgba(169, 77, 255, 0.16);
            --border-secondary: rgba(169, 77, 255, 0.26);
            --text-primary: #F4EEFF;
            --text-secondary: #A695D6;
            --text-accent: #28C4E8;
            --text-accent-hover: #18B8E0;
            --text-heading: #FFFFFF;
            --text-error: #FF8A8A;
            --accent-primary: #28C4E8;
            --accent-primary-hover: #18B8E0;
            --accent-secondary: #7A2BFF;
            --accent-tertiary: #D830B0;
            --accent-cyan: #00CEB4;
            --accent-green: #00CEB4;
            --accent-orange: #FF8A2A;
            --active-category-accent: #28C4E8;
            --active-category-accent-hover: #18B8E0;
            --btn-primary-bg: #28C4E8;
            --btn-primary-hover: #18B8E0;
            --btn-copy-bg: #1A1030;
            --btn-copy-hover: #24163D;
            --btn-export-bg: #28C4E8;
            --btn-export-hover: #18B8E0;
            --btn-view-data-bg: #1A1030;
            --btn-view-data-hover: #24163D;
            --btn-clear-bg: #2A1630;
            --btn-clear-hover: #341B3B;
            --error-bg: rgba(255, 90, 90, 0.14);
            --error-border: rgba(255, 138, 138, 0.32);
            --tabulator-header-bg: #1A1030;
            --tabulator-row-bg: #130A22;
            --tabulator-row-even-bg: #1A1030;
            --tabulator-border: rgba(169, 77, 255, 0.16);
            --tabulator-text: #F4EEFF;
            --tabulator-footer-bg: #1A1030;
            --tabulator-pag-button-bg: #24163D;
            --tabulator-pag-button-hover: #2E1C4A;
        }

        /* Primary/export buttons use a bright cyan in dark mode — force dark text for contrast */
        .dark .btn-inverted-text {
            color: #0A0614 !important;
        }

        /* Loading spinner */
        .spinner {
            border: 4px solid rgba(255, 255, 255, 0.2);
            width: 24px; 
            height: 24px; 
            border-radius: 50%;
            border-left-color: #ffffff;
            animation: spin 1s ease infinite;
            will-change: transform;
        }
        
        @keyframes spin { 
            0% { transform: rotate(0deg); } 
            100% { transform: rotate(360deg); } 
        }

        #social-results-status:not(:empty),
        #ad-copy-results-status:not(:empty),
        #prospect-status:not(:empty) {
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            max-width: 100%;
            padding: 0.65rem 0.78rem;
            border: 1px solid color-mix(in srgb, var(--text-accent) 24%, var(--border-primary));
            border-radius: 12px;
            background: color-mix(in srgb, var(--text-accent) 7%, var(--bg-container));
            color: var(--text-primary);
            font-weight: 600;
            line-height: 1.35;
        }

        .results-inline-status {
            margin: 0 0 0.95rem;
        }

        #social-results-status.is-busy::before,
        #ad-copy-results-status.is-busy::before,
        #prospect-status.is-busy::before {
            content: "";
            width: 0.78rem;
            height: 0.78rem;
            flex: 0 0 auto;
            border-radius: 999px;
            border: 2px solid color-mix(in srgb, var(--text-accent) 18%, transparent);
            border-left-color: var(--text-accent);
            animation: spin 0.9s linear infinite;
        }
        
        /* Form elements */
        .input-section { 
            display: none; 
            margin-top: 1.5rem; 
            padding-top: 1.5rem; 
            border-top-width: 1px; 
            border-color: var(--border-primary); 
        }

        .ux-card {
            background: var(--bg-container);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            padding: var(--space-4);
        }

        .ux-title {
            font-size: var(--text-sm);
            font-weight: 700;
            letter-spacing: 0.03em;
            color: var(--text-primary);
            text-transform: uppercase;
        }

        .ux-subtle {
            font-size: var(--text-xs);
            color: var(--text-secondary);
        }

        .status-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.2rem 0.6rem;
            border-radius: 9999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            font-size: var(--text-xs);
            color: var(--text-secondary);
            font-weight: 600;
        }

        .quickstart-btn {
            text-align: left;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-primary);
            border-radius: var(--radius-md);
            padding: var(--space-3);
            font-size: var(--text-sm);
            font-weight: 600;
        }

        .quickstart-btn:hover {
            background: var(--bg-input);
            box-shadow: var(--shadow-sm);
        }
        
        option[disabled] { 
            font-weight: bold; 
            background-color: var(--bg-input-secondary); 
        }

        /* Modal content styles */
        #readme-modal-content h2 { 
            border-bottom: 1px solid var(--border-primary);
            padding-bottom: 0.5rem;
            margin-bottom: 1rem;
            margin-top: 1.25rem;
            font-size: 1.25rem;
            line-height: 1.75rem;
            border-color: var(--border-primary); 
            color: var(--text-accent); 
        }
        
        #readme-modal-content h3 { 
            margin-top: 1.25rem;
            margin-bottom: 0.5rem;
            font-size: 1.125rem;
            line-height: 1.75rem;
            color: var(--text-primary); 
        }
        
        #readme-modal-content p, 
        #readme-modal-content li { 
            color: var(--text-secondary); 
        }
        
        #readme-modal-content a { 
            color: var(--text-accent); 
            text-decoration: underline;
        }
        
        #readme-modal-content a:hover { 
            text-decoration: underline;
        }
        
        #readme-modal-content ul, 
        #readme-modal-content ol { 
            margin-left: 1.25rem;
            list-style-type: disc;
        }
        
        #readme-modal-content ol { 
            list-style-type: decimal;
        }
        
        #readme-modal-content code { 
            background-color: rgba(0, 0, 0, 0.5);
            padding: 0.125rem 0.25rem;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            line-height: 1.25rem;
            color: var(--btn-copy-bg); 
        }
        
        .readme-method { 
            margin-bottom: 1.5rem; 
        }

        /* Tabulator table styles */
        .tabulator {
            border-color: var(--border-primary);
            background-color: var(--bg-container);
            color: var(--text-primary);
        }
        
        /* Sticky header: stays under column labels while scrolling long result tables. */
        .tabulator .tabulator-header {
            position: sticky;
            top: 0;
            z-index: 20;
            background-color: var(--tabulator-header-bg);
            border-bottom-color: var(--border-primary);
            box-shadow: 0 1px 0 color-mix(in srgb, var(--border-primary) 70%, transparent);
        }

        .tabulator .tabulator-header .tabulator-col,
        .tabulator .tabulator-header .tabulator-col-row {
            background-color: var(--tabulator-header-bg);
        }
        
        .tabulator .tabulator-header .tabulator-col {
            color: var(--text-primary);
        }
        
        .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row {
            background-color: var(--tabulator-row-bg);
            color: var(--text-primary);
        }

        .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {
            background-color: var(--tabulator-row-bg);
            color: var(--tabulator-text);
        }
        
        .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-row-even {
            background-color: var(--tabulator-row-even-bg);
        }

        .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-row-even .tabulator-cell {
            background-color: var(--tabulator-row-even-bg);
        }
        
        .tabulator .tabulator-footer {
            background-color: var(--tabulator-footer-bg);
            border-top-color: var(--border-primary);
        }
        
        .tabulator .tabulator-footer .tabulator-paginator button {
            background: var(--tabulator-pag-button-bg);
            color: var(--text-primary);
        }
        
        .tabulator .tabulator-footer .tabulator-paginator button:hover {
            background: var(--tabulator-pag-button-hover);
        }

        .tabulator .tabulator-footer select {
            min-width: 70px;
            padding-right: 1.6rem;
        }

        #table-wrapper {
            /* Only contain horizontal scroll so the wide tables don't bounce into the page,
               but let vertical wheel events propagate so users can scroll past the table. */
            overscroll-behavior-x: contain;
            overscroll-behavior-y: auto;
        }

        .tabulator .tabulator-tableholder,
        .tabulator .tabulator-tableHolder {
            overscroll-behavior-x: contain;
            overscroll-behavior-y: auto;
            touch-action: pan-x pan-y;
        }

        #table-wrapper.table-density-compact .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
            padding-top: 0.35rem;
            padding-bottom: 0.35rem;
        }

        #table-wrapper.table-density-compact .tabulator .tabulator-tableHolder .tabulator-row .tabulator-cell {
            padding-top: 0.3rem;
            padding-bottom: 0.3rem;
            font-size: 0.82rem;
            line-height: 1.15rem;
        }

        #table-wrapper.table-density-comfortable .tabulator .tabulator-tableHolder .tabulator-row .tabulator-cell {
            font-size: 0.9rem;
        }

        .tabulator .tabulator-col.tabulator-frozen,
        .tabulator .tabulator-header .tabulator-col.tabulator-frozen {
            background-color: var(--tabulator-header-bg);
            color: var(--tabulator-text);
            z-index: 8;
        }

        .tabulator .tabulator-cell.tabulator-frozen {
            background-color: var(--tabulator-row-bg);
            color: var(--tabulator-text);
            z-index: 8;
            box-shadow: 1px 0 0 color-mix(in srgb, var(--border-primary) 90%, transparent);
        }

        .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-row-even .tabulator-cell.tabulator-frozen {
            background-color: var(--tabulator-row-even-bg);
        }

        .tabulator .tabulator-tableHolder .tabulator-row.table-row-pinned {
            box-shadow: inset 3px 0 0 var(--text-accent);
        }

        .table-row-actions {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            justify-content: center;
        }

        .table-row-actions button {
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-primary);
            border-radius: 6px;
            padding: 0.15rem 0.4rem;
            font-size: 0.72rem;
            font-weight: 600;
            line-height: 1rem;
        }

        .table-row-actions button:hover {
            background: var(--bg-input-secondary);
        }

        .table-search-hit {
            background: color-mix(in srgb, var(--btn-export-bg) 30%, transparent);
            color: inherit;
            border-radius: 2px;
            padding: 0 1px;
        }

        .workspace-chip {
            display: inline-flex;
            align-items: center;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-secondary);
            border-radius: 9999px;
            padding: 0.1rem 0.5rem;
            font-size: 0.72rem;
            line-height: 1.2;
            white-space: nowrap;
        }

        .workspace-entry-card {
            background: var(--bg-container);
            box-shadow: var(--shadow-sm);
        }

        .workspace-entry-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .workspace-primary-action,
        .workspace-actions-toggle,
        .workspace-organize-cancel,
        .workspace-organize-save {
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            min-height: 34px;
            padding: 0.45rem 0.8rem;
            font-size: 0.76rem;
            font-weight: 600;
            transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
        }

        .workspace-primary-action {
            background: linear-gradient(135deg, var(--active-category-accent, var(--btn-primary-bg)), color-mix(in srgb, var(--active-category-accent-hover, var(--btn-primary-hover)) 80%, #ffffff 0%));
            border-color: color-mix(in srgb, var(--active-category-accent, var(--btn-primary-bg)) 82%, transparent);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            min-height: 34px;
            box-shadow:
                var(--shadow-sm),
                0 12px 26px color-mix(in srgb, var(--active-category-accent, var(--btn-primary-bg)) 18%, transparent);
        }

        .workspace-primary-action:hover {
            background: linear-gradient(135deg, var(--active-category-accent-hover, var(--btn-primary-hover)), color-mix(in srgb, var(--active-category-accent, var(--btn-primary-bg)) 72%, #ffffff 0%));
            border-color: color-mix(in srgb, var(--active-category-accent-hover, var(--btn-primary-hover)) 82%, transparent);
        }

        .workspace-actions-toggle,
        .workspace-organize-cancel {
            background: var(--bg-container);
            color: var(--text-primary);
        }

        .workspace-actions-toggle:hover,
        .workspace-organize-cancel:hover {
            background: var(--bg-input);
        }

        #submit-btn {
            width: 100%;
            min-height: 38px;
            padding-inline: 0.9rem;
            overflow: hidden;
        }

        #submit-btn span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        #submit-btn .spinner {
            flex-shrink: 0;
        }

        .workspace-organize-save {
            background: var(--btn-export-bg);
            border-color: var(--btn-export-bg);
            color: #fff;
        }

        .workspace-organize-save:hover {
            background: var(--btn-export-hover);
            border-color: var(--btn-export-hover);
        }

        .workspace-organize-save:disabled {
            cursor: wait;
            opacity: 0.75;
        }

        .results-command-bar {
            position: sticky;
            top: 0;
            z-index: 20;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 18px;
            background: color-mix(in srgb, var(--bg-container) 97%, var(--bg-body));
            border-bottom: 1px solid var(--border-primary);
        }

        .results-command-group {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .results-command-label {
            font-size: 0.74rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            font-weight: 700;
            color: var(--text-accent);
        }

        .results-shell-body {
            padding: 16px 16px 18px;
        }

        .results-header {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 14px;
            border-bottom: 1px solid var(--border-primary);
        }

        .results-heading-block {
            min-width: 0;
        }

        .results-eyebrow {
            margin: 0 0 8px;
            font-size: 0.66rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--text-accent);
        }

        .results-heading {
            margin: 0;
            font-size: clamp(1.18rem, 1.5vw, 1.55rem);
            line-height: 1.06;
            font-weight: 700;
            color: var(--text-heading);
        }

        .results-toolbar {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 8px;
        }

        .results-toolbar-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            height: 34px;
            min-height: 34px;
            padding: 0 0.8rem;
            border-radius: 12px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-primary);
            font-size: 0.75rem;
            font-weight: 600;
            line-height: 1;
            transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
        }

        .results-toolbar-btn:hover {
            background: var(--bg-input);
            box-shadow: none;
            transform: none;
        }

        .results-toolbar-btn--primary {
            background: var(--btn-primary-bg);
            border-color: var(--btn-primary-bg);
            color: #fff;
        }

        .results-toolbar-btn--primary:hover {
            background: var(--btn-primary-hover);
            border-color: var(--btn-primary-hover);
        }

        .results-toolbar-btn--danger {
            color: var(--text-error);
            border-color: color-mix(in srgb, var(--text-error) 20%, var(--border-primary));
            background: color-mix(in srgb, var(--text-error) 4%, var(--bg-container));
        }

        .results-toolbar-btn--danger:hover {
            background: color-mix(in srgb, var(--text-error) 8%, var(--bg-input));
        }

        .results-segmented-control {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-input);
        }

        .results-toggle-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 30px;
            min-height: 30px;
            padding: 0 0.75rem;
            border: 0;
            border-radius: 9px;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-weight: 700;
            transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
        }

        .results-toggle-btn:hover {
            color: var(--text-primary);
            background: color-mix(in srgb, var(--bg-container) 72%, transparent);
        }

        .results-toggle-btn.is-active {
            background: linear-gradient(135deg, var(--active-category-accent, var(--btn-primary-bg)), color-mix(in srgb, var(--active-category-accent-hover, var(--btn-primary-hover)) 78%, #ffffff 0%));
            color: #fff;
            box-shadow:
                var(--shadow-sm),
                0 10px 24px color-mix(in srgb, var(--active-category-accent, var(--btn-primary-bg)) 16%, transparent);
        }

        #export-controls .export-select {
            height: 44px;
            min-height: 44px;
            border-radius: 12px;
            background: var(--bg-input);
            border-color: var(--border-primary);
            color: var(--text-primary);
            padding-inline: 0.9rem 2.2rem;
            font-size: 0.82rem;
            font-weight: 600;
        }

        #table-ux-toolbar {
            margin-top: 16px;
            border-radius: 16px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            padding: 14px;
        }

        #table-search-input {
            min-height: 44px;
            border-radius: 12px;
            background: var(--bg-container);
            border-color: var(--border-secondary);
        }

        #raw-wrapper pre {
            margin: 0;
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            padding: 18px;
        }

        #table-wrapper {
            margin-top: 16px;
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            background: var(--bg-container);
            overflow: hidden;
        }

        #table-wrapper .tabulator,
        .dashboard-shell .tabulator {
            border: 0;
            background: transparent;
        }

        #table-wrapper .tabulator .tabulator-header,
        .dashboard-shell .tabulator .tabulator-header {
            background: var(--tabulator-header-bg) !important;
            border-bottom: 1px solid var(--border-primary) !important;
        }

        #table-wrapper .tabulator .tabulator-header .tabulator-col,
        .dashboard-shell .tabulator .tabulator-header .tabulator-col {
            background: var(--tabulator-header-bg) !important;
            color: var(--text-secondary) !important;
            border-right: 1px solid color-mix(in srgb, var(--border-primary) 90%, transparent) !important;
            font-size: 0.75rem !important;
            font-weight: 700 !important;
            letter-spacing: 0.08em !important;
            text-transform: uppercase !important;
        }

        #table-wrapper .tabulator .tabulator-header .tabulator-col .tabulator-col-content,
        .dashboard-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
            padding: 14px 16px !important;
        }

        #table-wrapper .tabulator .tabulator-tableholder,
        #table-wrapper .tabulator .tabulator-tableHolder,
        .dashboard-shell .tabulator .tabulator-tableholder,
        .dashboard-shell .tabulator .tabulator-tableHolder {
            background: transparent !important;
        }

        #table-wrapper .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row,
        .dashboard-shell .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row {
            background: var(--tabulator-row-bg) !important;
        }

        #table-wrapper .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-row-even,
        .dashboard-shell .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-row-even {
            background: var(--tabulator-row-even-bg) !important;
        }

        #table-wrapper .tabulator .tabulator-row .tabulator-cell,
        .dashboard-shell .tabulator .tabulator-row .tabulator-cell {
            background: transparent !important;
            color: var(--tabulator-text) !important;
            border-right: 1px solid color-mix(in srgb, var(--border-primary) 85%, transparent) !important;
            border-bottom: 1px solid color-mix(in srgb, var(--border-primary) 92%, transparent) !important;
            padding: 12px 16px !important;
            font-size: 0.9rem !important;
            line-height: 1.45 !important;
        }

        #table-wrapper .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover,
        #table-wrapper .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover .tabulator-cell,
        .dashboard-shell .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover,
        .dashboard-shell .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover .tabulator-cell {
            background-color: color-mix(in srgb, var(--text-accent) 7%, var(--tabulator-row-bg)) !important;
        }

        #table-wrapper .tabulator .tabulator-cell.tabulator-frozen,
        .dashboard-shell .tabulator .tabulator-cell.tabulator-frozen {
            background: var(--tabulator-row-bg) !important;
            color: var(--tabulator-text) !important;
        }

        #table-wrapper .tabulator .tabulator-row.tabulator-row-even .tabulator-cell.tabulator-frozen,
        .dashboard-shell .tabulator .tabulator-row.tabulator-row-even .tabulator-cell.tabulator-frozen {
            background: var(--tabulator-row-even-bg) !important;
        }

        #table-wrapper .tabulator .tabulator-header .tabulator-col.tabulator-frozen,
        .dashboard-shell .tabulator .tabulator-header .tabulator-col.tabulator-frozen {
            background: var(--tabulator-header-bg) !important;
            color: var(--tabulator-text) !important;
        }

        #table-wrapper .tabulator .tabulator-footer,
        .dashboard-shell .tabulator .tabulator-footer {
            padding: 12px 14px;
            background: var(--tabulator-footer-bg) !important;
            border-top: 1px solid var(--border-primary) !important;
        }

        #table-wrapper .tabulator .tabulator-footer .tabulator-paginator button,
        .dashboard-shell .tabulator .tabulator-footer .tabulator-paginator button {
            min-height: 38px;
            padding: 0 12px;
            border: 1px solid var(--border-primary);
            border-radius: 10px;
            background: var(--tabulator-pag-button-bg) !important;
            color: var(--text-primary) !important;
        }

        #table-wrapper .tabulator .tabulator-footer .tabulator-page-size,
        #table-wrapper .tabulator .tabulator-footer select,
        .dashboard-shell .tabulator .tabulator-footer .tabulator-page-size,
        .dashboard-shell .tabulator .tabulator-footer select {
            min-height: 38px;
            border-radius: 10px;
            background: var(--bg-container) !important;
            color: var(--text-primary) !important;
            border: 1px solid var(--border-primary) !important;
        }

        #table-wrapper .tabulator .tabulator-cell button,
        .dashboard-shell .tabulator .tabulator-cell button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 28px;
            padding: 0.2rem 0.65rem;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 0.76rem;
            font-weight: 700;
        }

        #table-wrapper .tabulator .tabulator-cell button:hover,
        .dashboard-shell .tabulator .tabulator-cell button:hover {
            background: color-mix(in srgb, var(--text-accent) 10%, var(--bg-input));
            border-color: color-mix(in srgb, var(--text-accent) 30%, var(--border-primary));
        }

        /* Dark-mode Tabulator overrides — scoped to .dark .tabulator which covers both
           #table-wrapper and .dashboard-shell contexts. Tabulator injects inline styles
           so !important + -webkit-text-fill-color are required to win the cascade. */
        .dark .tabulator,
        .dark .tabulator .tabulator-tableholder,
        .dark .tabulator .tabulator-tableHolder,
        .dark .tabulator .tabulator-table {
            background: var(--tabulator-row-bg) !important;
        }

        .dark .tabulator .tabulator-row {
            background: var(--tabulator-row-bg) !important;
        }

        .dark .tabulator .tabulator-row.tabulator-row-even {
            background: var(--tabulator-row-even-bg) !important;
        }

        .dark .tabulator .tabulator-row .tabulator-cell,
        .dark .tabulator .tabulator-row .tabulator-cell[style] {
            background: var(--tabulator-row-bg) !important;
            color: var(--tabulator-text) !important;
            -webkit-text-fill-color: var(--tabulator-text) !important;
            opacity: 1 !important;
        }

        .dark .tabulator .tabulator-row.tabulator-row-even .tabulator-cell,
        .dark .tabulator .tabulator-row.tabulator-row-even .tabulator-cell[style] {
            background: var(--tabulator-row-even-bg) !important;
        }

        .dark .tabulator .tabulator-row .tabulator-cell * {
            color: inherit !important;
            -webkit-text-fill-color: inherit !important;
            opacity: 1 !important;
        }

        .dark .tabulator .tabulator-header .tabulator-col,
        .dark .tabulator .tabulator-header .tabulator-col * {
            color: var(--text-secondary) !important;
            -webkit-text-fill-color: var(--text-secondary) !important;
        }

        .dark .tabulator .tabulator-cell a {
            color: var(--text-accent-hover) !important;
        }

        .dark .tabulator .tabulator-footer,
        .dark .tabulator .tabulator-footer * {
            color: var(--tabulator-text) !important;
            -webkit-text-fill-color: var(--tabulator-text) !important;
        }

        .dark .tabulator .tabulator-row.tabulator-selected,
        .dark .tabulator .tabulator-row.tabulator-selected .tabulator-cell {
            background: color-mix(in srgb, var(--text-accent) 10%, var(--tabulator-row-bg)) !important;
        }

        .dark .tabulator .tabulator-cell.tabulator-frozen,
        .dark .tabulator .tabulator-row.tabulator-row-even .tabulator-cell.tabulator-frozen {
            color: var(--tabulator-text) !important;
            -webkit-text-fill-color: var(--tabulator-text) !important;
        }

        .dark .tabulator .tabulator-header .tabulator-col.tabulator-frozen {
            background: var(--tabulator-header-bg) !important;
            color: var(--text-secondary) !important;
            -webkit-text-fill-color: var(--text-secondary) !important;
        }

        .dark .tabulator .tabulator-responsive-collapse,
        .dark .tabulator .tabulator-responsive-collapse table,
        .dark .tabulator .tabulator-responsive-collapse tr,
        .dark .tabulator .tabulator-responsive-collapse td {
            background: var(--tabulator-row-bg) !important;
            color: var(--tabulator-text) !important;
        }

        .theme-btn {
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-secondary);
            min-height: 32px;
            padding: 0 10px;
            border-radius: 12px;
            font-size: 0.74rem;
            font-weight: 600;
            transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
        }

        #signup-btn,
        #login-btn,
        #submit-btn-inline,
        #workspace-export-btn,
        #workspace-clear-btn {
            min-height: 32px;
            padding: 0 12px !important;
            border-radius: 12px !important;
            font-size: 0.75rem !important;
            line-height: 1 !important;
        }

        #settings-gear-btn,
        #theme-toggle {
            width: 32px;
            height: 32px;
            min-height: 32px;
            padding: 0 !important;
            border-radius: 12px !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        #settings-gear-btn svg {
            width: 15px;
            height: 15px;
        }

        #theme-icon {
            font-size: 0.95rem;
            line-height: 1;
        }

        #auth-buttons-logged-in > div {
            min-height: 32px;
            padding: 0 10px !important;
            border-radius: 12px !important;
        }

        #user-email {
            font-size: 0.75rem;
            line-height: 1;
        }

        #auth-status-badge {
            padding: 0.22rem 0.45rem !important;
            font-size: 0.64rem !important;
            line-height: 1;
        }

        /* Logged-in / guest pill overlapped "Command Center" beside narrow brand + tabs; email still shows in actions. */
        @media (max-width: 960px) {
            #auth-status-badge {
                display: none !important;
            }
        }

        #settings-dropdown {
            border-radius: 14px;
        }

        #settings-dropdown button {
            font-size: 0.75rem;
            padding: 0.55rem 0.9rem;
        }

        .workspace-tab {
            min-height: 32px;
            padding: 0 12px !important;
            border-radius: 12px !important;
            font-size: 0.75rem !important;
            line-height: 1 !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .workspace-modal-tabs {
            display: flex;
            gap: 0.5rem;
            border-bottom: 1px solid var(--border-primary);
        }

        .workspace-modal-tab {
            border: 0;
            border-bottom: 2px solid transparent;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.86rem;
            font-weight: 700;
            padding: 0.6rem 0.2rem 0.7rem;
            transition: color 0.15s ease, border-color 0.15s ease;
        }

        .workspace-modal-tab:hover,
        .workspace-modal-tab:focus-visible {
            color: var(--text-primary);
            outline: none;
        }

        .workspace-modal-tab.is-active {
            color: var(--text-primary);
            border-bottom-color: var(--text-accent);
        }

        .theme-btn.font-bold {
            background: var(--bg-container);
            color: var(--text-primary);
            border-color: color-mix(in srgb, var(--text-accent) 20%, var(--border-primary));
        }

        .workspace-menu-wrap {
            position: relative;
        }

        .workspace-action-menu {
            position: absolute;
            top: calc(100% + 0.45rem);
            right: 0;
            min-width: 11rem;
            padding: 0.4rem;
            border-radius: 0.85rem;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            box-shadow: var(--shadow-md);
            z-index: 10;
        }

        .workspace-menu-item {
            width: 100%;
            text-align: left;
            border: 0;
            background: transparent;
            color: var(--text-primary);
            border-radius: 0.6rem;
            padding: 0.55rem 0.65rem;
            font-size: 0.83rem;
            transition: background-color 0.15s ease, color 0.15s ease;
        }

        .workspace-menu-item:hover {
            background: var(--bg-input);
        }

        .workspace-menu-item-danger {
            color: var(--text-error);
        }

        .workspace-organize-panel {
            display: flex;
            justify-content: flex-end;
            margin-top: 0.9rem;
            padding-top: 0.9rem;
            border-top: 1px solid var(--border-primary);
        }

        .workspace-organize-inner {
            width: min(100%, 34rem);
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            border-radius: 1rem;
            padding: 0.9rem;
            box-shadow: var(--shadow-sm);
        }

        .workspace-organize-heading {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
        }

        .content-library-shell {
            display: grid;
            gap: 1rem;
            grid-template-columns: minmax(0, 1fr);
        }

        .content-library-classic-shell {
            display: grid;
            grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
            gap: 1rem;
            align-items: start;
        }

        .content-library-classic-rail,
        .content-library-classic-workspace {
            min-width: 0;
        }

        .content-library-classic-workspace {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .content-library-classic-rail-card,
        .content-library-classic-selection-card,
        .content-library-classic-panel,
        .content-library-classic-workspace > #content-library-pages-section {
            border: 1px solid var(--border-primary);
            background:
                linear-gradient(180deg, color-mix(in srgb, var(--bg-container) 92%, #fff) 0%, var(--bg-container) 100%);
            box-shadow: var(--shadow-sm);
        }

        .content-library-page-title {
            margin: 0;
            font-size: clamp(1.35rem, 1.8vw, 1.7rem);
            line-height: 1.08;
            font-weight: 700;
            color: var(--text-heading);
            letter-spacing: -0.02em;
        }

        .content-library-page-copy {
            margin: 0.45rem 0 0;
            max-width: 52rem;
            color: var(--text-secondary);
            font-size: 0.82rem;
            line-height: 1.5;
        }

        #content-libraries-section > div {
            border-radius: 1.1rem !important;
            padding: 1.1rem !important;
            box-shadow: var(--shadow-sm) !important;
        }

        #content-libraries-section > div > .flex.flex-col.lg\:flex-row {
            gap: 0.8rem !important;
            padding-bottom: 0.9rem !important;
            margin-bottom: 1rem !important;
        }

        #content-libraries-section .ux-card {
            border-radius: 0.95rem;
            padding: 0.9rem;
        }

        .content-library-shell.hidden {
            display: none !important;
        }

        .content-library-stack {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .content-library-stack.hidden {
            display: none !important;
        }

        .content-library-classic-rail-header,
        .content-library-classic-selection-header {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.9rem;
        }

        .content-library-classic-rail-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.5rem;
        }

        .content-library-classic-rail-note {
            margin-top: 0.85rem;
            padding: 0.85rem 0.95rem;
            border: 1px solid var(--border-primary);
            border-radius: 0.95rem;
            background: color-mix(in srgb, var(--bg-input-secondary) 80%, var(--bg-container));
        }

        .content-library-requirements {
            display: grid;
            gap: 0.8rem;
        }

        .content-library-requirements--compact {
            gap: 0.7rem;
        }

        .content-library-requirement {
            display: grid;
            gap: 0.35rem;
        }

        .content-library-requirement-label {
            margin: 0;
            font-size: 0.67rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .content-library-token-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem 0.55rem;
        }

        .content-library-token {
            display: inline-flex;
            align-items: center;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--text-primary);
            font-size: 0.74rem;
            font-weight: 700;
            line-height: 1.45;
        }

        .content-library-token:not(:last-child)::after {
            content: '·';
            margin-left: 0.55rem;
            color: var(--text-secondary);
            font-weight: 600;
        }

        .content-library-classic-rail .content-library-list {
            grid-template-columns: 1fr;
        }

        .content-library-classic-selection-card {
            display: flex;
            flex-direction: column;
            gap: 1.1rem;
        }

        .content-library-classic-selection-copy {
            min-width: min(100%, 24rem);
        }

        .content-library-classic-selection-card .content-library-meta {
            margin-top: 0;
        }

        .content-library-classic-summary {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.9rem;
            margin-top: 0.15rem;
        }

        .content-library-classic-metric {
            border: 1px solid var(--border-primary);
            border-radius: 1rem;
            background: color-mix(in srgb, var(--bg-input-secondary) 68%, var(--bg-container));
            padding: 0.95rem 1rem;
            box-shadow: none;
        }

        .content-library-classic-metric-value {
            font-size: 1.42rem;
            line-height: 1.05;
            font-weight: 800;
            color: var(--text-heading);
        }

        .content-library-classic-metric-label {
            margin-top: 0.48rem;
            font-size: 0.69rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .content-library-classic-metric-note {
            margin-top: 0.42rem;
            font-size: 0.74rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .content-library-classic-empty {
            padding: 1.1rem 1.15rem;
            border: 1px dashed color-mix(in srgb, #8a49e8 36%, var(--border-primary));
            border-radius: 1rem;
            background: color-mix(in srgb, #8a49e8 5%, var(--bg-container));
        }

        .content-library-empty-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.5rem;
        }

        .content-library-classic-view-nav {
            margin-bottom: 0;
            padding-top: 0.5rem;
            border-top: 1px solid var(--border-primary);
        }

        .content-library-guided-shell {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .content-library-mode-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.9rem;
            padding: 0 0.15rem;
        }

        .content-library-view-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 0.35rem;
        }

        .content-library-view-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 34px;
            padding: 0 0.95rem;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: color-mix(in srgb, var(--bg-input-secondary) 72%, var(--bg-container));
            color: var(--text-primary);
            font-size: 0.74rem;
            font-weight: 600;
            letter-spacing: 0;
            transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }

        .content-library-view-btn:hover {
            background: var(--bg-input-secondary);
        }

        .content-library-view-btn.is-active {
            border-color: color-mix(in srgb, var(--text-accent) 36%, var(--border-primary));
            background: color-mix(in srgb, var(--text-accent) 16%, var(--bg-input));
            color: var(--text-primary);
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-accent) 22%, transparent);
        }

        .content-library-shell .content-library-view-btn.is-active {
            border-color: color-mix(in srgb, #8a49e8 55%, var(--border-primary));
            background: color-mix(in srgb, #8a49e8 16%, var(--bg-input));
            box-shadow:
                inset 0 -2px 0 color-mix(in srgb, #8a49e8 70%, transparent),
                inset 0 0 0 1px color-mix(in srgb, #8a49e8 20%, transparent);
        }

        .content-library-shell .content-library-view-btn:hover:not(.is-active) {
            border-color: color-mix(in srgb, #8a49e8 35%, var(--border-primary));
            background: color-mix(in srgb, #8a49e8 7%, var(--bg-input));
        }

        .content-library-field-list {
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem 0.55rem;
            padding-left: 0;
            margin: 0;
        }

        .content-library-field-list li {
            margin: 0;
            display: inline-flex;
            align-items: center;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--text-primary);
            font-size: 0.74rem;
            font-weight: 700;
            line-height: 1.45;
        }

        .content-library-field-list li:not(:last-child)::after {
            content: '·';
            margin-left: 0.55rem;
            color: var(--text-secondary);
            font-weight: 600;
        }

        .content-library-field-list code,
        .content-library-token-list code {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            font-size: inherit;
            font-weight: inherit;
            color: inherit;
        }

        .content-library-step-badge {
            display: inline-flex;
            align-items: center;
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.12rem 0.45rem;
            border-radius: 999px;
            margin-left: 0.35rem;
            vertical-align: middle;
            border: 1px solid var(--border-secondary);
            background: var(--bg-input);
            color: var(--text-secondary);
        }

        .content-library-step-badge.is-complete {
            border-color: color-mix(in srgb, var(--btn-export-bg) 55%, var(--border-primary));
            background: color-mix(in srgb, var(--btn-export-bg) 22%, var(--bg-input));
            color: var(--text-primary);
        }

        .content-library-step-badge.is-partial {
            border-color: var(--border-primary);
            background: var(--bg-input-secondary);
            color: var(--text-secondary);
        }

        .content-library-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 0.65rem;
        }

        .content-library-list:has(.content-library-library-table-wrap) {
            display: block;
            width: 100%;
        }

        .content-library-guided-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 0.75rem;
        }

        .content-library-guided-library-card {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.38rem;
            width: 100%;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
            padding: 0.9rem;
            text-align: left;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
        }

        .content-library-guided-library-card:hover {
            border-color: color-mix(in srgb, #8a49e8 35%, var(--border-primary));
            box-shadow: var(--shadow-sm);
        }

        .content-library-guided-library-card.is-active {
            border-color: color-mix(in srgb, #8a49e8 58%, var(--border-primary));
            background: color-mix(in srgb, #8a49e8 8%, var(--bg-container));
            box-shadow:
                inset 0 0 0 1px color-mix(in srgb, #8a49e8 20%, transparent),
                0 10px 22px rgba(15, 23, 42, 0.06);
        }

        .content-library-guided-library-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.3;
        }

        .content-library-guided-library-copy {
            font-size: 0.82rem;
            line-height: 1.45;
            color: var(--text-secondary);
        }

        .content-library-guided-library-meta {
            font-size: 0.74rem;
            line-height: 1.4;
            color: var(--text-secondary);
        }

        .content-library-guided-selection {
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
            padding: 0.95rem;
        }

        .content-library-guided-metrics {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 0.75rem;
        }

        .content-library-guided-metric {
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
            padding: 0.85rem 0.9rem;
        }

        .content-library-guided-metric-value {
            font-size: 1.25rem;
            font-weight: 780;
            color: var(--text-primary);
            line-height: 1.1;
        }

        .content-library-guided-metric-label {
            margin-top: 0.35rem;
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .content-library-guided-metric-note {
            margin-top: 0.45rem;
            font-size: 0.8rem;
            line-height: 1.45;
            color: var(--text-secondary);
        }

        .content-library-guided-review-list {
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
        }

        .content-library-guided-review-item {
            border: 1px solid var(--border-primary);
            border-radius: 10px;
            background: var(--bg-container);
            padding: 0.78rem 0.85rem;
            font-size: 0.86rem;
            line-height: 1.45;
            color: var(--text-primary);
        }

        .content-library-card {
            border: 1px solid var(--border-primary);
            border-radius: 0.95rem;
            background: var(--bg-container);
            padding: 0.85rem;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
            cursor: pointer;
        }

        .content-library-card:hover {
            border-color: var(--text-accent);
            box-shadow: var(--shadow-sm);
        }

        .content-library-analysis-card {
            border: 1px solid var(--border-primary);
            border-radius: 0.95rem;
            background: var(--bg-container);
            padding: 0.9rem;
        }

        .content-library-analysis-group + .content-library-analysis-group {
            margin-top: 1rem;
        }

        .content-library-analysis-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .content-library-analysis-list-item {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
            border: 1px solid var(--border-primary);
            border-radius: 0.95rem;
            background: var(--bg-container);
            padding: 0.85rem 0.95rem;
        }

        .content-library-analysis-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .content-library-card.is-active {
            border-color: var(--text-accent);
            box-shadow: inset 3px 0 0 var(--text-accent);
            background: color-mix(in srgb, var(--bg-container) 88%, var(--bg-input));
        }

        .content-library-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            margin-top: 0.6rem;
        }

        .content-library-meta-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.48rem;
            min-height: 1.75rem;
            padding: 0.22rem 0.66rem;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 7%, var(--bg-input));
            color: var(--text-primary);
            font-size: 0.74rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .content-library-meta-pill-label {
            color: var(--text-secondary);
            font-size: 0.64rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .content-library-meta-pill--tag {
            border-color: var(--border-primary);
            background: var(--bg-input);
        }

        .content-library-card-title,
        .content-library-section-heading,
        .content-library-detail-title {
            margin: 0;
            font-size: 0.98rem;
            line-height: 1.25;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.01em;
            text-transform: none;
        }

        .content-library-cell-title {
            font-size: 0.8rem;
            line-height: 1.35;
            font-weight: 600;
            color: var(--text-primary);
        }

        .content-library-card-copy,
        .content-library-section-copy,
        .content-library-meta-note,
        .content-library-empty-copy,
        .content-library-help,
        .content-library-empty {
            color: var(--text-secondary);
            font-size: 0.78rem;
            line-height: 1.5;
        }

        .content-library-cell-copy {
            color: var(--text-secondary);
            font-size: 0.7rem;
            line-height: 1.45;
        }

        .content-library-micro,
        .content-library-shell .ux-subtle,
        .content-library-shell .workspace-chip,
        .content-library-shell .text-xs {
            font-size: 0.7rem;
            line-height: 1.4;
        }

        .content-library-kicker,
        .content-library-shell .ux-title {
            font-size: 0.66rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .content-library-empty-title {
            margin: 0 0 0.35rem;
            font-size: 0.92rem;
            line-height: 1.25;
            font-weight: 600;
            color: var(--text-primary);
        }

        .content-library-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.65rem;
            align-items: center;
            justify-content: space-between;
        }

        .content-library-classic-shell .workspace-actions-toggle,
        .content-library-classic-shell .workspace-primary-action,
        .content-library-classic-shell .workspace-organize-save,
        .content-library-classic-shell .workspace-organize-cancel {
            min-height: 32px;
        }

        .content-library-help {
            margin: 0;
        }

        .content-library-field-guide {
            border: 1px solid color-mix(in srgb, #8a49e8 28%, var(--border-primary));
            background: color-mix(in srgb, #8a49e8 6%, var(--bg-input));
            border-radius: 0.85rem;
            padding: 0.2rem 0.2rem 0.45rem;
        }

        .content-library-field-guide summary {
            list-style: none;
            cursor: pointer;
            padding: 0.62rem 0.75rem;
            color: var(--text-primary);
            font-size: 0.84rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            border-radius: 0.65rem;
            user-select: none;
        }

        .content-library-field-guide summary::-webkit-details-marker {
            display: none;
        }

        .content-library-field-guide-hint {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-secondary);
            padding: 0.2rem 0.45rem;
            border-radius: 999px;
            border: 1px solid var(--border-secondary);
            background: var(--bg-container);
        }

        .content-library-field-guide[open] .content-library-field-guide-hint-closed {
            display: none;
        }

        .content-library-field-guide[open] .content-library-field-guide-hint-open {
            display: inline !important;
        }

        .content-library-field-guide-content {
            padding: 0 0.8rem 0.2rem;
        }

        .content-library-field-guide dl {
            display: grid;
            grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
            gap: 0.5rem 0.85rem;
            margin: 0;
        }

        .content-library-field-guide dt {
            color: var(--text-primary);
            font-size: 0.76rem;
            font-weight: 600;
        }

        .content-library-field-guide dd {
            color: var(--text-secondary);
            font-size: 0.76rem;
            line-height: 1.5;
            margin: 0;
        }

        .content-library-shell code,
        .content-library-field-guide code,
        .content-library-empty code {
            font-family: inherit !important;
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--text-primary);
            background: color-mix(in srgb, var(--text-accent) 7%, var(--bg-input));
            border: 1px solid color-mix(in srgb, var(--text-accent) 14%, var(--border-primary));
            border-radius: 999px;
            padding: 0.1rem 0.42rem;
            letter-spacing: 0;
        }

        .content-library-shell .content-library-field-list code,
        .content-library-shell .content-library-token-list code,
        .content-library-shell .content-library-field-guide code {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            font-size: inherit;
            font-weight: inherit;
            color: inherit;
        }

        .content-library-shell label {
            font-size: 0.74rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.4rem;
        }

        .content-library-shell input[type="text"],
        .content-library-shell input[type="number"],
        .content-library-shell input[type="file"],
        .content-library-shell textarea,
        .content-library-shell select {
            font-size: 0.8rem;
        }

        .content-library-file-input {
            display: block;
            width: 100%;
            color: var(--text-secondary);
        }

        .content-library-file-input::file-selector-button {
            margin-right: 0.75rem;
            padding: 0.5rem 0.75rem;
            border-radius: 0.5rem;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 0.8rem;
            font-weight: 600;
            line-height: 1.2;
            cursor: pointer;
            transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
        }

        .content-library-file-input:hover::file-selector-button {
            background: color-mix(in srgb, var(--bg-input) 70%, var(--bg-container));
            border-color: var(--border-secondary);
        }

        @media (min-width: 768px) {
            .content-library-guided-keyword-options-grid.is-gsc {
                grid-template-columns: minmax(0, 1fr) !important;
            }
        }

        .content-library-shell select {
            padding-right: 2.85rem;
            background-position: right 0.55rem center;
        }

        .content-library-library-table-wrap {
            border: 1px solid var(--border-primary);
            border-radius: 0.85rem;
            overflow: hidden;
            background: var(--bg-container);
        }

        table.content-library-library-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.78rem;
        }

        .content-library-library-table-wrap {
            border: 0;
            background: transparent;
        }

        table.content-library-library-table,
        table.content-library-library-table tbody {
            display: block;
        }

        table.content-library-library-table thead {
            display: none;
        }

        table.content-library-library-table tbody {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 12px;
        }

        table.content-library-library-table thead {
            background: color-mix(in srgb, #8a49e8 8%, var(--bg-input));
        }

        table.content-library-library-table th,
        table.content-library-library-table td {
            padding: 0.55rem 0.65rem;
            text-align: left;
            border-bottom: 1px solid var(--border-primary);
            vertical-align: top;
        }

        table.content-library-library-table th {
            font-weight: 600;
            color: var(--text-secondary);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        tr.content-library-lib-row {
            display: grid;
            gap: 8px;
            cursor: pointer;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            padding: 14px;
            background: var(--bg-container);
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
            transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
        }

        table.content-library-library-table td {
            display: block;
            padding: 0;
            border-bottom: 0;
        }

        tr.content-library-lib-row:hover {
            background: color-mix(in srgb, #8a49e8 7%, var(--bg-container));
            box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
        }

        tr.content-library-lib-row.is-active {
            background: color-mix(in srgb, #8a49e8 11%, var(--bg-container));
            border-color: #8a49e8;
            box-shadow: inset 3px 0 0 #8a49e8, 0 16px 30px rgba(15, 23, 42, 0.08);
        }

        .content-library-lib-name {
            font-weight: 600;
            color: var(--text-primary);
        }

        .content-library-lib-desc {
            color: var(--text-secondary);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .content-library-lib-meta {
            font-size: 0.68rem;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .social-output-details {
            border: 1px solid var(--border-primary);
            border-radius: 0.85rem;
            padding: 0.65rem 0.85rem;
            background: var(--bg-container);
        }

        .social-output-details > summary {
            cursor: pointer;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--text-primary);
            list-style: none;
        }

        .social-output-details > summary::-webkit-details-marker {
            display: none;
        }

        .social-output-subdetails > summary {
            cursor: pointer;
            font-size: 0.8rem;
            color: var(--text-primary);
            list-style: none;
        }

        .social-output-subdetails > summary::-webkit-details-marker {
            display: none;
        }

        .brand-guidelines-mode-btn.is-active {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 52%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, var(--bg-container));
            color: var(--text-primary);
            box-shadow:
                inset 0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, transparent),
                0 0 0 3px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 14%, transparent);
        }

        .brand-guidelines-scope-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 16px 0 14px;
        }

        .brand-guidelines-scope-btn.is-active {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 52%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, var(--bg-container));
            color: var(--text-primary);
            box-shadow:
                inset 0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, transparent),
                0 0 0 3px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 14%, transparent);
        }

        .brand-guidelines-runtime-intro {
            display: grid;
            gap: 12px;
            margin-bottom: 16px;
        }

        .brand-guidelines-runtime-depth {
            display: grid;
            gap: 6px;
        }

        .brand-guidelines-structured-grid {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            margin-top: 16px;
        }

        .brand-guidelines-field-block--wide {
            grid-column: 1 / -1;
        }

        .brand-guidelines-source-detail {
            margin-top: 18px;
            padding-top: 18px;
            border-top: 1px solid var(--border-primary);
        }

        .brand-guidelines-section-heading {
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-secondary);
            margin-bottom: 10px;
        }

        @media (max-width: 900px) {
            .brand-guidelines-structured-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Social + Ad copy result tabs — must read clearly over .workspace-actions-toggle */
        .social-copy-tab.is-active,
        .ad-copy-tab.is-active {
            color: var(--text-primary);
            font-weight: 700;
        }

        .social-copy-tab.is-active {
            background: linear-gradient(
                180deg,
                color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 18%, var(--bg-container)),
                color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 10%, var(--bg-container))
            );
            border-color: color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 88%, var(--border-primary)) !important;
            box-shadow:
                inset 0 0 0 1px color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 34%, transparent),
                0 0 0 1px color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 72%, transparent),
                0 0 0 4px color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 16%, transparent),
                inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
        }

        .ad-copy-tab.is-active {
            background: linear-gradient(
                180deg,
                color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 20%, var(--bg-container)),
                color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 11%, var(--bg-container))
            );
            border-color: color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 88%, var(--border-primary)) !important;
            box-shadow:
                inset 0 0 0 1px color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 34%, transparent),
                0 0 0 1px color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 72%, transparent),
                0 0 0 4px color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 16%, transparent),
                inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
        }

        .dark .social-copy-tab.is-active {
            background: linear-gradient(
                180deg,
                color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 25%, var(--bg-container)),
                color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 16%, var(--bg-container))
            );
            border-color: color-mix(in srgb, var(--color-social-media, var(--active-category-accent)) 96%, var(--border-primary)) !important;
        }

        .dark .ad-copy-tab.is-active {
            background: linear-gradient(
                180deg,
                color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 28%, var(--bg-container)),
                color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 18%, var(--bg-container))
            );
            border-color: color-mix(in srgb, var(--color-ad-copy, var(--active-category-accent)) 96%, var(--border-primary)) !important;
        }

        .social-copy-tab:not(.is-active),
        .ad-copy-tab:not(.is-active) {
            opacity: 0.88;
        }

        .social-copy-tab:hover:not(.is-active),
        .ad-copy-tab:hover:not(.is-active) {
            border-color: color-mix(in srgb, var(--active-category-accent) 42%, var(--border-primary)) !important;
        }

        .social-copy-tab-panel .social-md-body strong {
            font-weight: 700;
            color: var(--text-primary);
        }

        .image-workflow-surface {
            --color-image-workflow: var(--active-category-accent, #4cc2ff);
            background:
                radial-gradient(circle at top right, color-mix(in srgb, var(--color-image-workflow) 10%, transparent), transparent 40%),
                radial-gradient(circle at top left, color-mix(in srgb, var(--color-image-workflow) 5%, transparent), transparent 32%),
                var(--bg-container);
        }

        .image-module-header {
            align-items: flex-start;
        }

        .image-section-kicker {
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
        }

        .image-section-kicker-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.3rem;
            height: 1.3rem;
            border-radius: 999px;
            background: color-mix(in srgb, var(--active-category-accent) 14%, var(--bg-container));
            color: var(--active-category-accent);
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--active-category-accent) 24%, transparent);
        }

        .image-section-kicker-icon svg {
            width: 0.85rem;
            height: 0.85rem;
        }

        .image-module-metric-card--model .atlas-module-metric-value {
            font-size: clamp(1rem, 1.2vw, 1.2rem);
            line-height: 1.2;
            letter-spacing: -0.02em;
        }

        .image-guideline-panel {
            display: grid;
            gap: 0.9rem;
        }

        .image-guideline-panel {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        .image-guideline-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.65rem;
            align-items: center;
        }

        .image-guideline-grid {
            display: grid;
            gap: 0.85rem;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .image-aspect-ratio-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.65rem;
        }

        .image-option-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.55rem 0.8rem;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 0.84rem;
            font-weight: 600;
            cursor: pointer;
        }

        .image-option-chip input {
            margin: 0;
        }

        .image-prompt-preview-card {
            display: grid;
            gap: 0.55rem;
        }

        .image-run-estimator,
        .image-remix-helper {
            display: grid;
            gap: 0.55rem;
            padding: 0.9rem 1rem;
            border: 1px solid color-mix(in srgb, var(--active-category-accent) 16%, var(--border-primary));
            border-radius: 16px;
            background: color-mix(in srgb, var(--active-category-accent) 4%, var(--bg-input));
        }

        .image-run-estimator-row,
        .image-remix-helper-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.9rem;
        }

        .image-run-estimator-label {
            margin: 0;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: color-mix(in srgb, var(--active-category-accent) 68%, var(--text-secondary));
        }

        .image-run-estimator-value {
            margin: 0.2rem 0 0;
            font-size: 1.35rem;
            line-height: 1.1;
            font-weight: 780;
            color: var(--text-primary);
        }

        .image-run-estimator-copy,
        .image-remix-helper-copy,
        .image-run-estimator-footnote {
            margin: 0;
            font-size: 0.78rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }

        .image-results-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
        }

        .image-results-actions {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            flex-shrink: 0;
        }

        .image-results-grid {
            display: grid;
            gap: 1rem;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        }

        .image-result-card {
            display: grid;
            gap: 0;
            overflow: hidden;
            border: 1px solid color-mix(in srgb, var(--active-category-accent) 22%, var(--border-primary));
            border-radius: 18px;
            background: color-mix(in srgb, var(--active-category-accent) 3%, var(--bg-container));
            box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
        }

        .image-result-card-media {
            aspect-ratio: 1 / 1;
            overflow: hidden;
            background:
                linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent) 9%, var(--bg-input)), var(--bg-input));
            border-bottom: 1px solid color-mix(in srgb, var(--active-category-accent) 18%, var(--border-primary));
        }

        .image-result-card-media-btn {
            width: 100%;
            padding: 0;
            border: 0;
            cursor: zoom-in;
            transition: transform 0.16s ease, filter 0.16s ease;
        }

        .image-result-card-media-btn:hover .image-result-card-img,
        .image-result-card-media-btn:focus-visible .image-result-card-img {
            transform: scale(1.02);
            filter: saturate(1.03);
        }

        .image-result-card-img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            transition: transform 0.16s ease, filter 0.16s ease;
        }

        .image-result-card-body {
            display: grid;
            gap: 0.75rem;
            padding: 1rem;
        }

        .image-result-card-heading-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .image-result-card-actions {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            flex-shrink: 0;
        }

        .image-result-card-title {
            margin: 0;
            font-size: 0.96rem;
            font-weight: 760;
            color: var(--text-primary);
        }

        .image-result-card-meta {
            margin: 0.18rem 0 0;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: color-mix(in srgb, var(--active-category-accent) 70%, var(--text-secondary));
        }

        .image-result-card-copy {
            margin: 0;
            font-size: 0.8rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }

        .image-download-note {
            margin: 0;
            font-size: 0.78rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .image-preview-modal-panel {
            width: min(1080px, 100%);
            max-height: calc(100vh - 2rem);
            display: grid;
            gap: 1rem;
            padding: 1rem;
            border: 1px solid color-mix(in srgb, var(--active-category-accent) 18%, var(--border-primary));
            border-radius: 24px;
            background: var(--bg-container);
            box-shadow: 0 24px 80px rgba(15, 23, 42, 0.38);
        }

        .image-preview-modal-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
        }

        .image-preview-modal-title {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 780;
            color: var(--text-primary);
        }

        .image-preview-modal-meta {
            margin: 0.25rem 0 0;
            font-size: 0.78rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .image-preview-modal-actions {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            flex-shrink: 0;
        }

        .image-preview-close-btn {
            width: 40px;
            height: 40px;
            border: 1px solid var(--border-primary);
            border-radius: 999px;
            background: var(--bg-input);
            color: var(--text-primary);
            font-size: 1.4rem;
            line-height: 1;
        }

        .image-preview-modal-body {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 0;
            overflow: auto;
            border-radius: 18px;
            background: color-mix(in srgb, var(--active-category-accent) 6%, var(--bg-input));
            padding: 0.5rem;
        }

        .image-preview-modal-img {
            max-width: 100%;
            max-height: min(72vh, 920px);
            display: block;
            border-radius: 14px;
            object-fit: contain;
            background: white;
        }

        .image-preview-modal-copy {
            margin: 0;
            font-size: 0.84rem;
            line-height: 1.6;
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-image-results-card .atlas-card-body {
            display: grid;
            gap: 1rem;
        }

        .atlas-shell .image-run-card .workspace-organize-save {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        @media (max-width: 900px) {
            .atlas-shell .atlas-image-workspace {
                grid-template-columns: 1fr;
            }

            .image-guideline-grid {
                grid-template-columns: 1fr;
            }

            .image-results-header,
            .image-preview-modal-header {
                flex-direction: column;
            }

            .image-results-actions,
            .image-preview-modal-actions {
                width: 100%;
                justify-content: flex-start;
            }
        }

        .ad-copy-tab-panel .ad-md-body strong {
            font-weight: 700;
        }

        .social-copy-tab-panel .social-md-body,
        .ad-copy-tab-panel .ad-md-body {
            line-height: 1.7;
        }

        .social-copy-tab-panel .social-md-body > :first-child,
        .ad-copy-tab-panel .ad-md-body > :first-child {
            margin-top: 0;
        }

        .social-copy-tab-panel .social-md-body > :last-child,
        .ad-copy-tab-panel .ad-md-body > :last-child {
            margin-bottom: 0;
        }

        .social-copy-tab-panel .social-md-body p,
        .ad-copy-tab-panel .ad-md-body p {
            margin: 0 0 0.95rem;
        }

        .social-copy-tab-panel .social-md-body h2,
        .social-copy-tab-panel .social-md-body h3,
        .ad-copy-tab-panel .ad-md-body h2,
        .ad-copy-tab-panel .ad-md-body h3 {
            margin: 1.15rem 0 0.55rem;
            color: var(--text-primary);
            line-height: 1.3;
            letter-spacing: -0.01em;
        }

        .social-copy-tab-panel .social-md-body h2,
        .ad-copy-tab-panel .ad-md-body h2 {
            font-size: 1.02rem;
            font-weight: 780;
        }

        .social-copy-tab-panel .social-md-body h3,
        .ad-copy-tab-panel .ad-md-body h3 {
            font-size: 0.86rem;
            font-weight: 760;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: var(--text-secondary);
        }

        .social-copy-tab-panel .social-md-body ul,
        .ad-copy-tab-panel .ad-md-body ul {
            margin: 0 0 0.95rem;
            padding-left: 1.1rem;
        }

        .social-copy-tab-panel .social-md-body li,
        .ad-copy-tab-panel .ad-md-body li {
            margin: 0 0 0.4rem;
        }

        .ad-copy-accordion {
            padding: 0;
            overflow: hidden;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
        }

        .ad-copy-accordion + .ad-copy-accordion {
            margin-top: 0.65rem;
        }

        .ad-copy-accordion[open] {
            border-color: color-mix(in srgb, var(--active-category-accent) 42%, var(--border-primary));
            box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
        }

        .ad-copy-accordion-summary {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            align-items: center;
            gap: 0.75rem;
            min-height: 3.25rem;
            padding: 0.82rem 1rem;
            cursor: pointer;
            color: var(--text-primary);
            list-style: none;
            background: color-mix(in srgb, var(--active-category-accent) 4%, var(--bg-container));
        }

        .ad-copy-accordion-summary::-webkit-details-marker {
            display: none;
        }

        .ad-copy-accordion-title {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.94rem;
            font-weight: 750;
            line-height: 1.25;
        }

        .ad-copy-accordion-action {
            display: inline-flex;
            align-items: center;
            min-height: 1.6rem;
            padding: 0 0.65rem;
            border: 1px solid color-mix(in srgb, var(--active-category-accent) 38%, var(--border-primary));
            border-radius: 999px;
            color: var(--text-secondary);
            font-size: 0.72rem;
            font-weight: 700;
            white-space: nowrap;
        }

        .ad-copy-accordion-action::before {
            content: "View copy";
        }

        .ad-copy-accordion[open] .ad-copy-accordion-action {
            background: color-mix(in srgb, var(--active-category-accent) 12%, var(--bg-container));
            color: var(--text-primary);
        }

        .ad-copy-accordion[open] .ad-copy-accordion-action::before {
            content: "Hide copy";
        }

        .ad-copy-accordion-chevron {
            width: 0.62rem;
            height: 0.62rem;
            border-right: 2px solid var(--text-secondary);
            border-bottom: 2px solid var(--text-secondary);
            transform: rotate(45deg);
            transition: transform 0.15s ease;
        }

        .ad-copy-accordion[open] .ad-copy-accordion-chevron {
            transform: rotate(225deg);
        }

        .ad-copy-accordion-body {
            padding: 1rem;
            border-top: 1px solid var(--border-primary);
            background: var(--bg-input);
        }

        .ad-copy-accordion-actions {
            display: flex;
            justify-content: flex-end;
            padding: 0.8rem 1rem 1rem;
            background: var(--bg-input);
        }

        @media (max-width: 640px) {
            .ad-copy-accordion-summary {
                grid-template-columns: minmax(0, 1fr) auto;
            }

            .ad-copy-accordion-action {
                display: none;
            }
        }

        .workflow-step-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.85rem;
        }

        .workflow-step-helper {
            margin: 0;
            max-width: 54rem;
            font-size: 0.92rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }

        .workflow-step-list {
            display: flex;
            flex-direction: column;
            gap: 0.95rem;
        }

        .workflow-step-card {
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
            overflow: hidden;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
        }

        .workflow-step-card[open] {
            border-color: color-mix(in srgb, var(--active-category-accent) 42%, var(--border-primary));
            box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
        }

        .workflow-step-summary {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.9rem;
            padding: 1rem 1.05rem;
            cursor: pointer;
            list-style: none;
            background: var(--bg-container);
        }

        .workflow-step-summary::-webkit-details-marker {
            display: none;
        }

        .workflow-step-text {
            display: flex;
            flex-direction: column;
            gap: 0.28rem;
            min-width: 0;
        }

        .workflow-step-index {
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--text-accent);
        }

        .workflow-step-title {
            font-size: 1rem;
            font-weight: 760;
            line-height: 1.25;
            color: var(--text-primary);
        }

        .workflow-step-description {
            font-size: 0.84rem;
            line-height: 1.45;
            color: var(--text-secondary);
        }

        .workflow-step-chevron {
            width: 0.7rem;
            height: 0.7rem;
            border-right: 2px solid var(--text-secondary);
            border-bottom: 2px solid var(--text-secondary);
            transform: rotate(45deg);
            transition: transform 0.16s ease;
        }

        .workflow-step-card[open] .workflow-step-chevron {
            transform: rotate(225deg);
        }

        .workflow-step-body {
            padding: 1.05rem;
            border-top: 1px solid var(--border-primary);
            background: var(--bg-container);
        }

        .workflow-step-body > * + * {
            margin-top: 1rem;
        }

        .workflow-step-panel {
            padding: 1rem;
            border: 1px solid var(--border-primary);
            border-radius: 12px;
            background: var(--bg-container);
        }

        .workflow-step-grid {
            display: grid;
            gap: 0.9rem;
        }

        .workflow-step-grid--two {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .workflow-step-footer {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 0.7rem;
            padding-top: 0.2rem;
        }

        @media (max-width: 960px) {
            .workflow-step-grid--two {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 640px) {
            .workflow-step-summary {
                padding: 0.9rem 0.95rem;
            }

            .workflow-step-body,
            .workflow-step-panel {
                padding: 0.9rem;
            }
        }

        .content-library-inline-input {
            width: 100%;
            min-width: 140px;
            border: 1px solid var(--border-secondary);
            border-radius: 10px;
            background: var(--bg-input);
            color: var(--text-primary);
            padding: 0.42rem 0.55rem;
            font-size: 0.76rem;
            line-height: 1.35;
        }

        .content-library-table {
            width: 100%;
            min-width: 1760px;
            border-collapse: collapse;
        }

        .content-library-table th,
        .content-library-table td {
            border-bottom: 1px solid var(--border-primary);
            padding: 0.62rem 0.58rem;
            text-align: left;
            vertical-align: top;
            font-size: 0.78rem;
        }

        .content-library-table th {
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-secondary);
            font-weight: 700;
            background: var(--bg-input);
        }

        .content-library-table td {
            color: var(--text-primary);
            background: var(--bg-container);
        }

        .content-library-table td a {
            color: var(--text-accent);
            text-decoration: none;
        }

        .content-library-table td a:hover {
            text-decoration: underline;
        }

        .content-library-table-wrap {
            border: 1px solid var(--border-primary);
            border-radius: 0.95rem;
            overflow: auto;
            width: 100%;
        }

        .content-library-row-selected td {
            background: color-mix(in srgb, var(--bg-container) 80%, var(--bg-input));
        }

        .content-library-row-selected td:last-child {
            background: color-mix(in srgb, var(--bg-container) 80%, var(--bg-input));
        }

        .content-library-table th:last-child,
        .content-library-table td:last-child {
            position: sticky;
            right: 0;
            z-index: 1;
            box-shadow: -1px 0 0 var(--border-primary);
        }

        .content-library-table th:last-child {
            z-index: 2;
        }

        .content-library-empty {
            border: 1px dashed var(--border-primary);
            border-radius: 0.95rem;
            padding: 1.2rem;
            text-align: center;
            color: var(--text-secondary);
            background: var(--bg-input);
        }

        @media (max-width: 1180px) {
            .content-library-classic-shell {
                grid-template-columns: minmax(0, 1fr);
            }

            .content-library-classic-summary {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 720px) {
            .content-library-classic-summary {
                grid-template-columns: 1fr;
            }
        }

        /* Atlas usability fix pass */
        .atlas-shell {
            --atlas-accent: #10b8ff;
            --atlas-accent-hover: #0697dd;
            --atlas-accent-soft: rgba(16, 184, 255, 0.14);
        }

        .dark .atlas-shell {
            --atlas-accent-soft: rgba(16, 184, 255, 0.18);
        }

        .atlas-shell #auth-status-badge {
            display: none !important;
        }

        .atlas-shell .workspace-preview-panel {
            border: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .atlas-shell[data-atlas-stage="landing"] .workspace-context-panel,
        .atlas-shell[data-atlas-stage="landing"] #atlas-run-status-strip,
        .atlas-shell[data-atlas-stage="special"] .workspace-context-panel,
        .atlas-shell[data-atlas-stage="special"] #atlas-run-status-strip {
            display: none !important;
        }

        .atlas-shell[data-atlas-stage="landing"] .workspace-main-canvas,
        .atlas-shell[data-atlas-stage="special"] .workspace-main-canvas {
            gap: 0;
        }

        .atlas-shell .atlas-topbar-search-kbd {
            letter-spacing: 0.02em;
            text-transform: none;
        }

        .atlas-shell .atlas-topbar-status {
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-weight: 600;
        }

        .atlas-shell .atlas-topbar-status-dot {
            background: #32d67a;
            box-shadow: 0 0 0 4px rgba(50, 214, 122, 0.12);
        }

        .atlas-shell .atlas-category-btn {
            border: 1px solid transparent;
            padding: 9px 10px;
        }

        .atlas-shell .atlas-category-btn-main {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .atlas-shell .atlas-category-btn-icon {
            width: 14px;
            height: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            flex: 0 0 auto;
        }

        .atlas-shell .atlas-category-btn-icon .workspace-tab-icon {
            width: 14px;
            height: 14px;
            opacity: 1;
        }

        .atlas-shell .atlas-category-btn-label {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-icon,
        .atlas-shell .atlas-category-btn.is-active .atlas-category-btn-icon {
            color: var(--atlas-accent);
        }

        .atlas-shell .atlas-category-btn.is-active {
            background: color-mix(in srgb, var(--atlas-accent) 13%, var(--bg-input));
            border-color: color-mix(in srgb, var(--atlas-accent) 24%, var(--border-primary));
            box-shadow: none;
        }

        .atlas-shell .atlas-category-btn-count,
        .atlas-shell .atlas-rail-count {
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-primary-action,
        .atlas-shell .workspace-primary-action,
        .atlas-shell .results-toolbar-btn--primary,
        .atlas-shell .results-toggle-btn.is-active,
        .atlas-shell .workspace-app-shell[data-active-category] .workspace-organize-save:not(:disabled) {
            background: var(--atlas-accent) !important;
            border-color: var(--atlas-accent) !important;
            color: #fff !important;
            box-shadow: none !important;
            filter: none !important;
        }

        .atlas-shell .atlas-primary-action:hover,
        .atlas-shell .workspace-primary-action:hover,
        .atlas-shell .results-toolbar-btn--primary:hover,
        .atlas-shell .workspace-app-shell[data-active-category] .workspace-organize-save:not(:disabled):hover {
            background: var(--atlas-accent-hover) !important;
            border-color: var(--atlas-accent-hover) !important;
        }

        .atlas-shell .atlas-task-pill--accent {
            color: var(--atlas-accent);
            border-color: color-mix(in srgb, var(--atlas-accent) 26%, var(--border-primary));
            background: color-mix(in srgb, var(--atlas-accent) 10%, transparent);
        }

        .atlas-shell .results-segmented-control,
        .atlas-shell #table-ux-toolbar {
            background: color-mix(in srgb, var(--bg-container) 94%, var(--bg-input));
        }

        .atlas-shell #table-wrapper,
        .atlas-shell #table-ux-toolbar,
        .atlas-shell #raw-wrapper pre,
        .atlas-shell #results-container {
            box-shadow: none !important;
        }

        @media (max-width: 1024px) {
            .content-library-shell {
                grid-template-columns: 1fr;
            }

            .content-library-analysis-list-item {
                flex-direction: column;
            }

            .atlas-shell .atlas-social-workspace,
            .atlas-shell .atlas-ad-workspace,
            .atlas-shell .atlas-aiw-workspace {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 640px) {
            .workspace-action-menu {
                left: 0;
                right: auto;
                min-width: 100%;
            }
        }

        .table-summary-strip {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .table-summary-chip {
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-primary);
            border-radius: 9999px;
            padding: 0.35rem 0.7rem;
            font-size: 0.78rem;
            font-weight: 600;
            white-space: nowrap;
        }
        
        /* Tooltip styles */
        .tooltip-container {
            position: relative;
            display: inline-block;
        }
        
        .tooltip-icon {
            display: inline-block;
            width: 14px;
            height: 14px;
            margin-left: 4px;
            border-radius: 50%;
            background-color: var(--text-secondary);
            color: var(--bg-body);
            font-size: 10px;
            line-height: 14px;
            text-align: center;
            cursor: help;
            vertical-align: middle;
        }
        
        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            position: absolute;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--bg-container);
            color: var(--text-primary);
            text-align: center;
            padding: 8px 12px;
            border-radius: 6px;
            border: 1px solid var(--border-primary);
            white-space: nowrap;
            z-index: 1000;
            font-size: 12px;
            max-width: 250px;
            white-space: normal;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: opacity 0.3s, visibility 0.3s;
        }
        
        .tooltip-container:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        /* Sortable table headers */
        .sortable-header {
            cursor: pointer;
            user-select: none;
            position: relative;
            padding-right: 20px;
        }
        
        .sortable-header:hover {
            background-color: var(--bg-input-secondary);
        }
        
        .sort-indicator {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 10px;
            color: var(--text-secondary);
        }
        
        .sort-asc .sort-indicator::after { content: '▲'; }
        .sort-desc .sort-indicator::after { content: '▼'; }
        
        /* Copy button in table */
        .copy-keyword-btn {
            display: inline-block;
            margin-left: 4px;
            opacity: 0;
            transition: opacity 0.2s;
            cursor: pointer;
            font-size: 12px;
        }
        
        tr:hover .copy-keyword-btn {
            opacity: 1;
        }
        
        /* Competitive Analysis Dashboard Grid Constraints */
        .metrics-grid-container {
            display: grid !important;
            width: 100% !important;
            gap: 1rem !important;
            margin-bottom: 1.5rem !important;
            grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        
        .metrics-grid-container > * {
            min-width: 0 !important;
            max-width: 100% !important;
            width: 100% !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
            word-wrap: break-word !important;
            word-break: break-word !important;
        }
        
        /* Ensure grid items don't break out of grid columns */
        .metrics-grid-container > *:not([class*="col-span"]) {
            grid-column: span 1 !important;
        }
        
        /* Ensure heading spans all columns */
        .metrics-grid-container > h4[class*="col-span-full"],
        .metrics-grid-container > h4.w-full {
            grid-column: 1 / -1 !important;
        }
        
        /* Ensure card content doesn't cause expansion */
        .metrics-grid-container > * > * {
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        
        /* Ensure all nested content respects grid constraints */
        .metrics-grid-container > * * {
            min-width: 0 !important;
            max-width: 100% !important;
        }
        
        /* Specifically fix truncate in grid context */
        .metrics-grid-container .truncate {
            min-width: 0 !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
        }
        
        @media (min-width: 768px) {
            .metrics-grid-container {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
        }
        
        /* Manual widescreen toggle (Compare All) */
        .metrics-grid-container.wide {
            grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        }
        
        /* Optional: ensure children stretch to equal heights */
        .metric-card {
            min-height: 380px;
            display: flex;
            flex-direction: column;
        }
        
        /* Semrush-style Dashboard Shared Components */
        .metric-card-hero {
            font-size: 1.75rem;
            font-weight: 700;
            line-height: 1.2;
            color: var(--text-primary);
        }
        @media (min-width: 768px) {
            .metric-card-hero { font-size: 2rem; }
        }
        .metric-card-hero-label {
            font-size: 0.75rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-secondary);
            margin-top: 0.25rem;
        }
        .metric-card-bar {
            height: 6px;
            background: var(--bg-input);
            border-radius: 9999px;
            overflow: hidden;
            margin-top: 0.5rem;
        }
        .metric-card-bar-fill {
            height: 100%;
            border-radius: 9999px;
            background: linear-gradient(90deg, var(--active-category-accent, var(--text-accent)), var(--active-category-accent-hover, var(--text-accent-hover)));
            transition: width 0.2s ease;
        }
        .dashboard-matrix-wrap {
            border: 1px solid var(--border-primary);
            border-radius: 1rem;
            overflow: auto;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent) 4%, var(--bg-container)) 0%, var(--bg-container) 100%);
        }
        .dashboard-matrix-table {
            width: 100%;
            min-width: 760px;
            border-collapse: collapse;
        }
        .dashboard-matrix-table th,
        .dashboard-matrix-table td {
            border-bottom: 1px solid var(--border-primary);
            padding: 0.85rem 0.9rem;
            text-align: left;
            vertical-align: top;
        }
        .dashboard-matrix-table thead th {
            background: color-mix(in srgb, var(--active-category-accent) 8%, var(--bg-input));
            color: var(--text-secondary);
            font-size: 0.76rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }
        .dashboard-matrix-table tbody tr:nth-child(even) td {
            background: color-mix(in srgb, var(--bg-input) 74%, transparent);
        }
        .dashboard-matrix-table tbody tr:last-child td {
            border-bottom: 0;
        }
        .dashboard-matrix-label {
            color: var(--text-primary);
            font-size: 0.84rem;
            font-weight: 700;
        }
        .dashboard-matrix-label-note {
            margin-top: 0.2rem;
            color: var(--text-secondary);
            font-size: 0.75rem;
            line-height: 1.35;
        }
        .dashboard-matrix-value {
            color: var(--text-primary);
            font-size: 0.92rem;
            font-weight: 700;
            line-height: 1.35;
            word-break: break-word;
        }
        .dashboard-matrix-subvalue {
            margin-top: 0.22rem;
            color: var(--text-secondary);
            font-size: 0.74rem;
            line-height: 1.35;
            word-break: break-word;
        }
        .dashboard-inline-chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
        }
        .dashboard-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.28rem 0.7rem;
            border-radius: 9999px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent) 18%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent) 10%, var(--bg-input));
            color: var(--text-primary);
            font-size: 0.75rem;
            font-weight: 700;
            line-height: 1.1;
        }
        .dashboard-chip--brand {
            border-color: color-mix(in srgb, var(--accent-primary) 30%, var(--border-primary));
            background: color-mix(in srgb, var(--accent-primary) 14%, var(--bg-input));
            color: var(--accent-primary-hover);
        }
        .dashboard-chip--success {
            border-color: color-mix(in srgb, var(--accent-green) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--accent-green) 16%, var(--bg-input));
            color: var(--accent-green);
        }
        .dashboard-chip--warning {
            border-color: color-mix(in srgb, var(--accent-orange) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--accent-orange) 16%, var(--bg-input));
            color: var(--accent-orange);
        }
        .dashboard-chip--secondary {
            border-color: color-mix(in srgb, var(--accent-secondary) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--accent-secondary) 16%, var(--bg-input));
            color: var(--accent-secondary);
        }
        .dashboard-chip--tertiary {
            border-color: color-mix(in srgb, var(--accent-tertiary) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--accent-tertiary) 14%, var(--bg-input));
            color: var(--accent-tertiary);
        }
        .dashboard-chip--subtle {
            border-color: var(--border-primary);
            background: var(--bg-input);
            color: var(--text-secondary);
        }
        .dashboard-data-card {
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent) 5%, var(--bg-container)) 0%, var(--bg-container) 100%);
            border: 1px solid color-mix(in srgb, var(--active-category-accent) 16%, var(--border-primary));
            border-radius: 1rem;
            padding: 1rem;
            box-shadow: var(--shadow-sm);
        }
        .dashboard-data-table-wrap {
            border: 1px solid var(--border-primary);
            border-radius: 1rem;
            overflow: auto;
            background: var(--bg-container);
        }
        .dashboard-data-table {
            width: 100%;
            min-width: 760px;
            border-collapse: collapse;
        }
        .dashboard-data-table th,
        .dashboard-data-table td {
            border-bottom: 1px solid var(--border-primary);
            padding: 0.85rem 0.9rem;
            text-align: left;
            vertical-align: top;
        }
        .dashboard-data-table thead th {
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 0.76rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }
        .dashboard-data-table tbody tr:nth-child(even) td {
            background: color-mix(in srgb, var(--bg-input) 72%, transparent);
        }
        .winner-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.125rem 0.5rem;
            font-size: 0.75rem;
            font-weight: 600;
            color: #059669;
            background: rgba(5, 150, 105, 0.15);
            border-radius: 9999px;
        }
        .winner-badge::before {
            content: "🏆";
            font-size: 0.875rem;
        }
        .dashboard-shell-header {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
            padding: 0.85rem 1.1rem;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, var(--border-primary));
            border-radius: 0.75rem;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-container)), var(--bg-container));
        }
        .dashboard-shell-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-heading);
            line-height: 1.25;
        }
        .dashboard-shell-subtitle {
            font-size: 0.82rem;
            color: var(--text-secondary);
        }
        .dashboard-surface {
            border: 1px solid var(--border-primary);
            border-radius: 0.95rem;
            background: var(--bg-container);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }
        .dashboard-surface-primary {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 20%, var(--border-primary));
            box-shadow:
                var(--shadow-sm),
                0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, transparent);
        }
        .dashboard-surface-header {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            padding: 0.85rem 0.95rem 0;
        }
        .dashboard-surface-eyebrow {
            font-size: 0.66rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--active-category-accent, var(--text-accent));
        }
        .dashboard-surface-title {
            margin: 0;
            font-size: 0.9rem;
            line-height: 1.25;
            font-weight: 700;
            color: var(--text-heading);
        }
        .dashboard-surface-copy {
            margin: 0;
            max-width: 78ch;
            font-size: 0.78rem;
            line-height: 1.42;
            color: var(--text-secondary);
        }
        .dashboard-surface-body {
            padding: 0.9rem 0.95rem 0.95rem;
        }
        .dashboard-surface-body.dashboard-surface-body-flush {
            padding: 0;
        }
        .dashboard-hero-panel {
            display: grid;
            gap: 0.85rem;
            padding: 0.95rem 1rem;
            border-radius: 0.95rem;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 22%, var(--border-primary));
            background: linear-gradient(140deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 11%, var(--bg-container)), var(--bg-container));
            box-shadow:
                var(--shadow-sm),
                0 18px 36px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, transparent);
        }
        .dashboard-hero-eyebrow {
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--active-category-accent, var(--text-accent));
        }
        .dashboard-hero-title {
            margin: 0;
            font-size: clamp(1.1rem, 1.55vw, 1.4rem);
            line-height: 1.2;
            font-weight: 800;
            color: var(--text-heading);
        }
        .dashboard-hero-copy {
            margin: 0;
            max-width: 78ch;
            font-size: 0.92rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }
        .dashboard-hero-context {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
        }
        .dashboard-hero-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.38rem 0.72rem;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: color-mix(in srgb, var(--bg-input) 88%, var(--active-category-accent, var(--text-accent)));
            color: var(--text-primary);
            font-size: 0.78rem;
            font-weight: 600;
        }
        .dashboard-hero-chip-label {
            color: var(--text-secondary);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: 0.68rem;
        }
        .dashboard-anchor-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .dashboard-anchor-link {
            display: inline-flex;
            align-items: center;
            min-height: 1.9rem;
            padding: 0.32rem 0.72rem;
            border-radius: 9999px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-input));
            color: var(--text-primary);
            font-size: 0.74rem;
            font-weight: 700;
            text-decoration: none;
        }
        .dashboard-anchor-link:hover {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 12%, var(--bg-input-secondary));
        }
        .dashboard-primary-stack {
            display: grid;
            gap: 1rem;
        }
        .dashboard-summary-grid {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 0.75rem;
        }
        @media (min-width: 768px) {
            .dashboard-summary-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }
        .dashboard-summary-item {
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, var(--border-primary));
            border-radius: 0.95rem;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 7%, var(--bg-container)) 0%, var(--bg-container) 100%);
            padding: 0.9rem 0.95rem;
            box-shadow: var(--shadow-sm);
        }
        .dashboard-summary-value {
            font-size: 1.45rem;
            font-weight: 800;
            line-height: 1.2;
            color: var(--text-heading);
        }
        .dashboard-summary-label {
            margin-top: 0.34rem;
            font-size: 0.7rem;
            font-weight: 800;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }
        .dashboard-highlight-grid {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 0.75rem;
        }
        @media (min-width: 768px) {
            .dashboard-highlight-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }
        .dashboard-highlight-card {
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, var(--border-primary));
            border-radius: 1rem;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, var(--bg-container)) 0%, var(--bg-container) 100%);
            padding: 1rem;
            box-shadow: var(--shadow-sm);
        }
        .dashboard-highlight-label {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .dashboard-highlight-value {
            margin-top: 0.35rem;
            font-size: 1rem;
            font-weight: 700;
            line-height: 1.35;
            color: var(--text-primary);
            word-break: break-word;
        }
        .dashboard-highlight-detail {
            margin-top: 0.45rem;
            font-size: 0.82rem;
            line-height: 1.45;
            color: var(--text-secondary);
        }
        .dashboard-insight-list {
            list-style: disc;
            margin-left: 1.25rem;
            color: var(--text-primary);
            font-size: 0.9rem;
            line-height: 1.45;
        }
        .dashboard-insight-list li + li {
            margin-top: 0.45rem;
        }
        .dashboard-section {
            margin-top: 1.5rem;
            border: 1px solid var(--border-primary);
            border-radius: 0.75rem;
            overflow: hidden;
            background: var(--bg-container);
        }
        .dashboard-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 1rem 1.15rem;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-input));
            border: 0;
            cursor: pointer;
            user-select: none;
            text-align: left;
            font: inherit;
        }
        .dashboard-section-header:hover {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-input-secondary));
        }
        .dashboard-section-header:focus-visible {
            outline: 2px solid var(--active-category-accent, var(--text-accent));
            outline-offset: -2px;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-input-secondary));
        }
        .dashboard-section-header h4 {
            font-size: 0.98rem;
            font-weight: 700;
            color: var(--text-heading);
        }

        .dashboard-section .section-toggle-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.4rem;
            height: 1.4rem;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            font-size: 0.72rem;
            font-weight: 800;
        }
        .dashboard-section-content {
            padding: 1.25rem;
        }
        /* Topic clusters — page analysis table: allow horizontal scroll + wrapped cells (avoid clipped Tabulator) */
        .cci-page-analysis-table-wrap {
            width: 100%;
            max-width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .cci-filter-btn {
            min-height: 1.9rem;
            padding: 0.32rem 0.74rem !important;
            border-radius: 999px !important;
            font-size: 0.74rem !important;
            font-weight: 700 !important;
            box-shadow: none !important;
        }

        .cci-cluster-box {
            display: flex;
            flex-direction: column;
            gap: 0.78rem;
            min-height: 100%;
            padding: 1rem;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, var(--border-primary));
            border-radius: 1rem;
            background: linear-gradient(180deg, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-container)) 0%, var(--bg-container) 100%);
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
        }

        .cci-cluster-box:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .cci-cluster-box:focus-visible {
            outline: 2px solid var(--active-category-accent, var(--text-accent));
            outline-offset: 2px;
        }

        .cci-cluster-box--tone-0 {
            --cluster-accent: var(--text-accent);
        }

        .cci-cluster-box--tone-1 {
            --cluster-accent: #d46cff;
        }

        .cci-cluster-box--tone-2 {
            --cluster-accent: #22c98d;
        }

        .cci-cluster-box--tone-3 {
            --cluster-accent: #f29f43;
        }

        .cci-cluster-box,
        .cci-cluster-box--user {
            border-color: color-mix(in srgb, var(--cluster-accent, var(--active-category-accent, var(--text-accent))) 42%, var(--border-primary));
            background: linear-gradient(180deg, color-mix(in srgb, var(--cluster-accent, var(--active-category-accent, var(--text-accent))) 10%, var(--bg-container)) 0%, var(--bg-container) 100%);
        }

        .cci-cluster-box-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.65rem;
            flex-wrap: wrap;
        }

        .cci-cluster-box-badge,
        .cci-cluster-box-count,
        .cci-cluster-box-tag,
        .cci-cluster-box-more {
            display: inline-flex;
            align-items: center;
            min-height: 1.55rem;
            padding: 0.14rem 0.52rem;
            border-radius: 999px;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .cci-cluster-box-badge {
            border: 1px solid color-mix(in srgb, var(--cluster-accent, var(--active-category-accent, var(--text-accent))) 38%, var(--border-primary));
            background: color-mix(in srgb, var(--cluster-accent, var(--active-category-accent, var(--text-accent))) 14%, var(--bg-input));
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .cci-cluster-box-count {
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-secondary);
        }

        .cci-cluster-box-title {
            font-size: 1rem;
            font-weight: 700;
            line-height: 1.35;
            color: var(--text-heading);
        }

        .cci-cluster-box-description {
            font-size: 0.78rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .cci-cluster-box-meta {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            flex-wrap: wrap;
            font-size: 0.74rem;
        }

        .cci-cluster-box-meta-label {
            font-size: 0.64rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-secondary);
        }

        .cci-cluster-box-meta-value {
            color: var(--text-primary);
            font-weight: 700;
        }

        .cci-cluster-box-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.38rem;
        }

        .cci-cluster-box-tag {
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-primary);
        }

        .cci-cluster-box-more {
            color: var(--text-secondary);
            background: transparent;
            padding-left: 0.08rem;
            padding-right: 0.08rem;
        }
        .cci-page-analysis-table-wrap .tabulator {
            min-width: 72rem;
        }
        .cci-page-analysis-table-wrap .tabulator .tabulator-cell {
            white-space: normal;
            word-break: break-word;
            vertical-align: top;
        }
        .cci-page-analysis-table-wrap .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
            white-space: normal;
            word-break: break-word;
        }
        .dashboard-lazy-placeholder {
            padding: 1rem;
            border: 1px dashed var(--border-primary);
            border-radius: 0.75rem;
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        .dashboard-section.collapsed .dashboard-section-content {
            display: none;
        }
        .dashboard-section.collapsed .section-toggle-icon {
            transform: rotate(-90deg);
        }
        
        /* Ensure parent containers don't cause overflow */
        #competitive-dashboard {
            width: 100% !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        
        #raw-wrapper {
            width: 100% !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
            overflow-x: hidden !important;
        }
        
        #results-container {
            overflow-x: hidden !important;
        }
        
        /* Override any Tailwind classes that might interfere */
        .metrics-grid-container.grid {
            display: grid !important;
        }
        
        /* Force grid behavior even if other classes are present */
        div.metrics-grid-container {
            display: grid !important;
        }
        
        /* Specific fix for Keyword Targeting Analysis grid - 2 columns max */
        #keyword-metrics-grid.metrics-grid-container {
            display: grid !important;
            grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
            width: 100% !important;
            gap: 1rem !important;
        }
        
        @media (min-width: 768px) {
            #keyword-metrics-grid.metrics-grid-container {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
        }
        
        /* Override general .metrics-grid-container > * rules for keyword-metrics-grid children */
        #keyword-metrics-grid.metrics-grid-container > div {
            grid-column: span 1 !important;
            min-width: 0 !important;
            max-width: 100% !important;
            width: 100% !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
        }
        
        /* Ensure metric-card inside keyword-metrics-grid respects grid cell */
        #keyword-metrics-grid .metric-card {
            width: 100% !important;
            max-width: 100% !important;
        }
        
        /* Specific fix for Individual URL Summaries grid - same as Keyword Targeting Analysis (2 columns) */
        #url-metrics-grid {
            display: grid !important;
            grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
            width: 100% !important;
            gap: 1rem !important;
        }
        
        @media (min-width: 768px) {
            #url-metrics-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
        }
        
        #url-metrics-grid > h4 {
            grid-column: 1 / -1 !important;
        }
        
        #url-metrics-grid > div {
            grid-column: span 1 !important;
            min-width: 0 !important;
            max-width: 100% !important;
            width: 100% !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
            word-wrap: break-word !important;
            word-break: break-word !important;
        }
        
        /* Force all content inside URL boxes to respect grid constraints */
        #url-metrics-grid > div > * {
            max-width: 100% !important;
            min-width: 0 !important;
            box-sizing: border-box !important;
        }
        
        /* Ensure SVG charts don't break layout */
        #url-metrics-grid > div svg {
            max-width: 100% !important;
            height: auto !important;
        }
        
        /* Ensure all text content wraps */
        #url-metrics-grid > div p,
        #url-metrics-grid > div div {
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            max-width: 100% !important;
        }
        
        /* Specifically fix ranking keywords to prevent grid breakage */
        #url-metrics-grid > div .break-words {
            word-break: break-word !important;
            overflow-wrap: anywhere !important;
            hyphens: auto !important;
        }
        
        /* Ensure ranking keywords container doesn't expand */
        #url-metrics-grid > div > div > div.space-y-1 {
            min-width: 0 !important;
            max-width: 100% !important;
            overflow: hidden !important;
        }
        
        /* Modern UI Enhancements */
        select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
            background-position: right 0.65rem center;
            background-repeat: no-repeat;
            background-size: 1.35em 1.35em;
            padding-right: 2.75rem;
        }
        
        select:focus {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%230284c7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
        }
        
        .dark select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
        }
        
        .dark select:focus {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2338bdf8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
        }

        #export-controls .export-select {
            max-width: 100%;
            line-height: 1.2;
        }
        
        /* Smooth transitions for all interactive elements */
        input, select, button, textarea {
            transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
        }
        
        /* Better focus states */
        input:focus, select:focus, textarea:focus {
            outline: 2px solid var(--text-accent);
            outline-offset: 1px;
        }
        
        /* Subtle hover effects for cards */
        section[aria-labelledby] {
        }
        
        /* Improved button states */
        button:not(:disabled):hover {
            opacity: 0.9;
        }

        button:not(:disabled):active {
            opacity: 0.8;
        }
        
        /* Better spacing for form elements */
        .input-section label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }
        
        /* Modern card hover effect */
        .bg-\[var\(--bg-container\)\] {
            transition: box-shadow 0.2s ease;
        }

        .bg-\[var\(--bg-container\)\]:hover {
            box-shadow: var(--shadow-md);
        }
        
        /* Loading skeleton states */
        .skeleton {
            background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-input-secondary) 50%, var(--bg-input) 75%);
            background-size: 200% 100%;
            animation: loading 1.5s ease-in-out infinite;
            border-radius: 0.5rem;
        }
        
        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        .skeleton-text {
            height: 1rem;
            margin-bottom: 0.5rem;
        }
        
        .skeleton-title {
            height: 1.5rem;
            width: 60%;
            margin-bottom: 1rem;
        }
        
        .skeleton-button {
            height: 2.5rem;
            width: 120px;
            border-radius: 0.5rem;
        }
        
        /* Suppress all transitions during theme switch to avoid mass-repaint jank */
        .theme-switching,
        .theme-switching * {
            transition: none !important;
            animation: none !important;
        }

        /* Theme toggle button styles */
        #theme-toggle {
            position: relative;
        }
        
        #theme-toggle:hover {
            transform: rotate(15deg);
        }
        
        /* Improved button styles in results */
        #results-container button {
            transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
        }

        #results-container button:hover {
            transform: none;
            box-shadow: none;
        }

        #results-container button:active {
            transform: none;
        }
        
        /* Fix CCI filter button hover states */
        .cci-filter-btn.text-white {
            background-color: var(--text-accent) !important;
            color: white !important;
        }
        
        .cci-filter-btn.text-white:hover {
            background-color: var(--text-accent-hover) !important;
            color: white !important;
            opacity: 0.9;
        }
        
        .cci-filter-btn:not(.text-white):hover {
            background-color: var(--bg-container) !important;
            color: var(--text-primary) !important;
        }
        
        /* Ensure primary intent column shows full text on hover */
        .tabulator .tabulator-cell[title] {
            cursor: help;
        }
        
        .tabulator .tabulator-cell .truncate {
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .social-media-surface {
            box-shadow: 0 0 24px -8px color-mix(in srgb, var(--active-category-accent, #00FFC6) 28%, transparent);
        }

        .ilb-mapped-details summary {
            list-style: none;
        }

        .ilb-mapped-details summary::-webkit-details-marker {
            display: none;
        }

        /* Atlas /v2 shell */
        .dark .atlas-shell {
            --workspace-config-width: 360px;
            --bg-body: #0b0d12;
            --bg-container: #111318;
            --bg-container-translucent: rgba(17, 19, 24, 0.88);
            --bg-input: #171a21;
            --bg-input-secondary: #1d212a;
            --bg-code: #0f1218;
            --bg-disabled: #252a34;
            --border-primary: rgba(255, 255, 255, 0.08);
            --border-secondary: rgba(255, 255, 255, 0.14);
            --text-primary: #f5f7fb;
            --text-secondary: #9da7b8;
            --text-heading: #ffffff;
            --text-error: #ff9797;
            --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.18);
            --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.28);
        }

        .light .atlas-shell {
            --workspace-config-width: 360px;
            --bg-body: #f4f6fb;
            --bg-container: #ffffff;
            --bg-container-translucent: rgba(255, 255, 255, 0.88);
            --bg-input: #f4f6fb;
            --bg-input-secondary: #ebeff6;
            --bg-code: #eef2f7;
            --bg-disabled: #d9e0eb;
            --border-primary: rgba(15, 23, 42, 0.08);
            --border-secondary: rgba(15, 23, 42, 0.14);
            --text-primary: #0f172a;
            --text-secondary: #5b6475;
            --text-heading: #020617;
            --text-error: #b42318;
            --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.06);
            --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.12);
        }

        .atlas-shell {
            background:
                radial-gradient(circle at top center, color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, transparent), transparent 34%),
                var(--bg-body);
        }

        .atlas-shell .workspace-app-shell {
            max-width: 1920px;
            padding: 14px 18px 24px;
        }

        .atlas-shell .workspace-topbar {
            top: 12px;
            margin-bottom: 14px;
            padding: 10px 14px;
            border-radius: 18px;
            background: color-mix(in srgb, var(--bg-container) 92%, transparent);
            backdrop-filter: blur(20px);
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 14%, var(--border-primary));
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
        }

        .atlas-shell .workspace-topbar-shell {
            grid-template-columns: auto minmax(320px, 560px) auto auto;
            gap: 14px;
        }

        .atlas-shell .workspace-topbar-brand {
            gap: 12px;
            min-height: 44px;
            padding-inline: 4px;
        }

        .atlas-shell .workspace-topbar-brand .text-\[11px\] {
            font-size: 0.68rem !important;
            letter-spacing: 0.14em !important;
        }

        .atlas-topbar-nav-hidden {
            display: none !important;
        }

        .atlas-topbar-search-wrap {
            position: relative;
            display: flex;
            align-items: center;
            min-width: 0;
        }

        .atlas-topbar-search-input {
            width: 100%;
            min-height: 42px;
            border-radius: 12px;
            border: 1px solid var(--border-primary);
            background: color-mix(in srgb, var(--bg-input) 92%, var(--bg-container));
            color: var(--text-primary);
            padding: 0 88px 0 14px;
            font-size: 0.92rem;
            outline: none;
        }

        .atlas-topbar-search-input:focus {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 46%, var(--border-primary));
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, transparent);
        }

        .atlas-topbar-search-kbd {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 42px;
            height: 24px;
            padding: 0 8px;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-secondary);
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .atlas-topbar-status {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            font-size: 0.76rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .atlas-topbar-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #2fd17b;
            box-shadow: 0 0 0 4px rgba(47, 209, 123, 0.12);
        }

        .atlas-shell #workspace-shell-grid {
            grid-template-columns: 236px minmax(0, 1fr) minmax(320px, var(--workspace-config-width));
            gap: 0;
            align-items: stretch;
            min-height: calc(100vh - 108px);
            border: 1px solid var(--border-primary);
            border-radius: 22px;
            background: color-mix(in srgb, var(--bg-container) 92%, transparent);
            overflow: hidden;
            box-shadow: var(--shadow-md);
        }

        .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
            grid-template-columns: 236px minmax(0, 1fr);
        }

        .atlas-left-rail {
            order: 1;
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 16px 12px 12px;
            background: color-mix(in srgb, var(--bg-container) 94%, transparent);
            border-right: 1px solid var(--border-primary);
            min-width: 0;
            overflow: auto;
        }

        .atlas-rail-section {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .atlas-rail-section--saved {
            padding-top: 4px;
            border-top: 1px solid var(--border-primary);
        }

        .atlas-rail-heading,
        .atlas-rail-heading-row {
            color: var(--text-secondary);
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .atlas-rail-heading-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .atlas-rail-count {
            color: var(--text-secondary);
            font-size: 0.72rem;
            font-weight: 700;
            font-family: 'JetBrains Mono', ui-monospace, monospace;
        }

        .atlas-category-nav,
        .atlas-rail-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .atlas-category-btn,
        .atlas-rail-item,
        .atlas-rail-footer-btn {
            width: 100%;
            border: 0;
            background: transparent;
            color: var(--text-primary);
            text-align: left;
            border-radius: 12px;
            padding: 10px 12px;
        }

        .atlas-category-btn,
        .atlas-rail-footer-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 0.88rem;
            font-weight: 700;
        }

        .atlas-category-btn:hover,
        .atlas-rail-item:hover,
        .atlas-rail-footer-btn:hover {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--bg-input));
        }

        .atlas-category-btn.is-active {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 12%, var(--bg-input));
            color: var(--text-primary);
            box-shadow: inset 2px 0 0 var(--active-category-accent, var(--text-accent));
        }

        .atlas-category-btn-count {
            color: var(--text-secondary);
            font-size: 0.74rem;
            font-family: 'JetBrains Mono', ui-monospace, monospace;
        }

        .atlas-rail-item {
            display: flex;
            flex-direction: column;
            gap: 3px;
            padding: 9px 10px;
            border: 1px solid transparent;
        }

        .atlas-rail-item:hover {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, var(--border-primary));
        }

        .atlas-rail-item-title {
            color: var(--text-primary);
            font-size: 0.88rem;
            font-weight: 700;
            line-height: 1.25;
        }

        .atlas-rail-item-copy,
        .atlas-rail-empty {
            color: var(--text-secondary);
            font-size: 0.76rem;
            line-height: 1.4;
        }

        .atlas-shell .workspace-main-canvas {
            order: 2;
            gap: 14px;
            padding: 18px 22px 26px;
            background: color-mix(in srgb, var(--bg-body) 70%, var(--bg-container));
            min-height: 0;
        }

        /* Do not override .workspace-config-rail / .workspace-config-stack here: position: sticky + max-height
           was winning over the fixed overlay rail and clipped the Run/Reset footer. */

        .atlas-shell .workspace-config-resizer {
            left: -9px;
            width: 12px;
        }

        .atlas-shell .workspace-config-resizer::before {
            width: 3px;
            height: 58px;
        }

        .atlas-shell .workspace-rail-card,
        .atlas-shell .workspace-context-panel,
        .atlas-shell .workspace-preview-panel,
        .atlas-shell #results-container {
            border-radius: 18px;
            border-color: var(--border-primary);
            background: var(--bg-container);
            box-shadow: var(--shadow-sm);
        }

        .atlas-shell .workspace-config-dock-header,
        .atlas-shell .workspace-config-footer {
            background: transparent;
            border-color: var(--border-primary);
        }

        .atlas-shell .workspace-context-panel {
            gap: 14px;
            padding: 18px 20px;
        }

        .atlas-task-breadcrumb {
            margin-bottom: 10px;
            color: var(--text-secondary);
            font-size: 0.76rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .atlas-shell .atlas-task-breadcrumb {
            text-transform: none;
            font-weight: 500;
            letter-spacing: 0.02em;
        }

        .atlas-context-secondary-actions {
            display: inline-flex;
            align-items: center;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-secondary);
            font-size: 0.76rem;
            font-weight: 700;
        }

        .atlas-shell .workspace-context-title {
            font-size: clamp(1.65rem, 2vw, 2.4rem);
            line-height: 1.02;
            letter-spacing: -0.03em;
        }

        .atlas-shell .workspace-context-copy {
            max-width: 48rem;
            font-size: 1rem;
            line-height: 1.5;
        }

        .atlas-run-status-strip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 18px;
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            background: var(--bg-container);
            box-shadow: var(--shadow-sm);
        }

        .atlas-run-status-main {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .atlas-run-status-dot {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: color-mix(in srgb, var(--text-secondary) 80%, transparent);
            flex: 0 0 auto;
        }

        .atlas-run-status-strip[data-state="busy"] .atlas-run-status-dot {
            background: var(--active-category-accent, var(--text-accent));
            box-shadow: 0 0 0 5px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 14%, transparent);
        }

        .atlas-run-status-strip[data-state="complete"] .atlas-run-status-dot {
            background: #2fd17b;
            box-shadow: 0 0 0 5px rgba(47, 209, 123, 0.12);
        }

        .atlas-run-status-title {
            color: var(--text-primary);
            font-size: 0.95rem;
            font-weight: 800;
        }

        .atlas-run-status-copy,
        .atlas-run-status-meta {
            color: var(--text-secondary);
            font-size: 0.82rem;
        }

        .atlas-run-status-side {
            flex-shrink: 0;
        }

        .atlas-shell .workspace-home-section {
            gap: 18px;
            padding-top: 0;
        }

        .atlas-shell .workspace-home-panel {
            max-width: none;
        }

        .atlas-shell .workspace-home-workflow-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
        }

        .atlas-shell .workspace-home-workspace-grid {
            width: 100%;
            max-width: none;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
        }

        .atlas-shell .workspace-home-card,
        .atlas-shell .workspace-workflow-catalog-row {
            min-height: 176px;
            justify-content: space-between;
            padding: 18px;
            border-radius: 18px;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-container));
            box-shadow: var(--shadow-sm);
        }

        .atlas-shell .workspace-home-card-title,
        .atlas-shell .workspace-workflow-catalog-title {
            font-size: 1.05rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .atlas-shell .workspace-home-card-copy,
        .atlas-shell .workspace-workflow-catalog-copy {
            font-size: 0.88rem;
        }

        .atlas-shell .workspace-preview-card,
        .atlas-shell .results-shell-body {
            padding: 18px 20px 22px;
        }

        .atlas-shell .results-command-bar {
            padding: 14px 18px;
            background: color-mix(in srgb, var(--bg-container) 94%, var(--bg-input));
        }

        .atlas-shell .results-heading {
            font-size: clamp(1.4rem, 1.8vw, 1.9rem);
            letter-spacing: -0.03em;
        }

        .atlas-shell #table-wrapper,
        .atlas-shell #raw-wrapper pre,
        .atlas-shell #table-ux-toolbar {
            border-radius: 16px;
        }

        @media (max-width: 1400px) {
            .atlas-shell .workspace-topbar-shell {
                grid-template-columns: auto minmax(260px, 1fr) auto;
            }

            .atlas-topbar-status {
                display: none;
            }
        }

        @media (max-width: 1180px) {
            .atlas-shell #workspace-shell-grid,
            .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
                grid-template-columns: minmax(0, 1fr) minmax(300px, var(--workspace-config-width));
            }

            .atlas-left-rail {
                display: none;
            }

            .atlas-topbar-nav-hidden {
                display: block !important;
            }

            .atlas-shell .workspace-topbar-shell {
                grid-template-columns: minmax(0, 1fr) auto;
                grid-template-areas:
                    "brand actions"
                    "search search"
                    "nav nav";
            }

            .atlas-shell .workspace-topbar-brand {
                grid-area: brand;
            }

            .atlas-shell .atlas-topbar-search-wrap {
                grid-area: search;
            }

            .atlas-shell .workspace-topbar-nav {
                grid-area: nav;
            }

            .atlas-shell .workspace-topbar-actions {
                grid-area: actions;
            }
        }

        @media (max-width: 1100px) {
            .atlas-shell #workspace-shell-grid,
            .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
                grid-template-columns: 1fr;
            }

            .atlas-shell .workspace-config-rail {
                position: static;
                border-left: 0;
                border-top: 1px solid var(--border-primary);
            }

            .atlas-shell .workspace-config-stack {
                max-height: none;
            }
        }

        @media (max-width: 768px) {
            .atlas-shell .workspace-app-shell {
                padding: 8px 10px 18px;
            }

            .atlas-shell .workspace-main-canvas {
                padding: 14px;
            }

            .atlas-shell .workspace-home-workflow-grid,
            .atlas-shell .workspace-home-workspace-grid {
                grid-template-columns: minmax(0, 1fr);
            }

            .atlas-shell .workspace-context-panel,
            .atlas-run-status-strip {
                padding: 14px 16px;
            }

            .atlas-run-status-strip,
            .atlas-shell .workspace-context-actions {
                flex-direction: column;
                align-items: flex-start;
            }

            .atlas-shell .workspace-topbar-shell {
                gap: 10px;
            }
        }

        /* Atlas refinement pass: flatter shell, denser landing canvas, lower-cost theme swaps */
        .dark .atlas-shell {
            --workspace-config-width: 336px;
            --atlas-panel-lo: oklch(0.19 0.008 260);
            --atlas-panel-hi: oklch(0.24 0.008 260);
            --bg-body: oklch(0.17 0.008 260);
            --bg-container: oklch(0.21 0.008 260);
            --bg-container-translucent: color-mix(in oklch, oklch(0.21 0.008 260) 96%, transparent);
            --bg-input: oklch(0.19 0.008 260);
            --bg-input-secondary: oklch(0.24 0.008 260);
            --bg-code: oklch(0.14 0.008 260);
            --bg-disabled: oklch(0.24 0.01 260);
            --border-primary: oklch(0.30 0.01 260);
            --border-secondary: oklch(0.26 0.008 260);
            --text-primary: oklch(0.97 0.005 260);
            --text-secondary: oklch(0.72 0.01 260);
            --text-heading: oklch(0.97 0.005 260);
            --shadow-sm: none;
            --shadow-md: none;
        }

        .light .atlas-shell {
            --workspace-config-width: 336px;
            --atlas-panel-lo: oklch(0.985 0.003 260);
            --atlas-panel-hi: oklch(0.975 0.004 260);
            --bg-body: oklch(0.985 0.003 90);
            --bg-container: oklch(1 0 0);
            --bg-container-translucent: color-mix(in oklch, oklch(1 0 0) 96%, transparent);
            --bg-input: oklch(0.975 0.004 260);
            --bg-input-secondary: oklch(0.985 0.003 260);
            --bg-code: oklch(0.975 0.004 260);
            --bg-disabled: oklch(0.94 0.004 260);
            --border-primary: oklch(0.90 0.005 260);
            --border-secondary: oklch(0.94 0.004 260);
            --text-primary: oklch(0.18 0.01 260);
            --text-secondary: oklch(0.42 0.01 260);
            --text-heading: oklch(0.18 0.01 260);
            --shadow-sm: none;
            --shadow-md: none;
        }

        .atlas-shell {
            background: var(--bg-body);
        }

        .atlas-shell .workspace-app-shell {
            max-width: none;
            min-height: 100vh;
            padding: 0;
        }

        .atlas-shell .workspace-topbar {
            position: sticky;
            top: 0;
            margin: 0;
            padding: 0 14px;
            border-radius: 0;
            border: 0;
            border-bottom: 1px solid var(--border-primary);
            background: var(--atlas-panel-lo, var(--bg-container));
            backdrop-filter: none;
            box-shadow: none;
        }

        .atlas-shell .workspace-topbar-shell {
            min-height: 44px;
            grid-template-columns: auto minmax(300px, 520px) minmax(0, 1fr) auto;
            gap: 12px;
        }

        .atlas-shell .workspace-topbar-brand {
            min-height: 44px;
            padding: 0;
            gap: 10px;
        }

        .atlas-brand-mark {
            width: 22px;
            height: 22px;
            display: inline-grid;
            place-items: center;
            border-radius: 6px;
            background: var(--active-category-accent, var(--text-accent));
            color: #fff;
            font-size: 0.75rem;
            font-weight: 800;
            line-height: 1;
        }

        .atlas-brand-copy {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .atlas-brand-title {
            color: var(--text-primary);
            font-size: 0.94rem;
            font-weight: 700;
            line-height: 1;
        }

        .atlas-brand-tag {
            color: var(--text-secondary);
            font-family: 'JetBrains Mono', ui-monospace, monospace;
            font-size: 0.65rem;
            padding: 2px 6px;
            border-radius: 4px;
            border: 1px solid var(--border-primary);
            line-height: 1;
        }

        .atlas-shell .atlas-topbar-search-wrap {
            max-width: 520px;
        }

        .atlas-shell .atlas-topbar-search-input {
            min-height: 34px;
            border-radius: 8px;
            padding: 0 76px 0 12px;
            font-size: 0.82rem;
            background: var(--atlas-panel-hi, var(--bg-input));
        }

        .atlas-shell .atlas-topbar-search-kbd {
            min-width: 38px;
            height: 20px;
            font-size: 0.62rem;
            border-radius: 6px;
            background: color-mix(in srgb, var(--bg-container) 88%, var(--bg-input));
        }

        .atlas-shell .workspace-topbar-actions {
            gap: 8px;
        }

        .atlas-shell #workspace-shell-grid {
            min-height: calc(100vh - 45px);
            grid-template-columns: 220px minmax(0, 1fr) minmax(300px, var(--workspace-config-width));
            gap: 0;
            border: 0;
            border-radius: 0;
            background: var(--bg-body);
            box-shadow: none;
        }

        .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
            grid-template-columns: 220px minmax(0, 1fr);
        }

        .atlas-left-rail,
        .atlas-shell .workspace-config-rail {
            background: var(--atlas-panel-lo, var(--bg-container));
        }

        .atlas-left-rail {
            padding: 14px 8px 10px;
            border-right: 1px solid var(--border-primary);
        }

        .atlas-shell .workspace-main-canvas {
            padding: 22px 28px 40px;
            background: var(--bg-body);
            gap: 16px;
        }

        .atlas-shell .workspace-config-rail {
            border-left: 1px solid var(--border-primary);
        }

        .atlas-shell .workspace-config-stack {
            min-height: 0;
        }

        .atlas-shell .workspace-rail-card,
        .atlas-shell .workspace-context-panel,
        .atlas-shell .workspace-preview-panel,
        .atlas-shell #results-container,
        .atlas-shell #table-wrapper,
        .atlas-shell #table-ux-toolbar,
        .atlas-shell #raw-wrapper pre {
            border-radius: 10px;
            box-shadow: none;
        }

        .atlas-shell .workspace-context-panel,
        .atlas-shell .workspace-preview-panel,
        .atlas-shell #results-container {
            border-color: var(--border-primary);
            background: var(--bg-container);
        }

        .atlas-shell .workspace-context-panel {
            padding: 18px 20px;
            gap: 16px;
        }

        .atlas-shell .workspace-context-title {
            font-size: clamp(1.72rem, 1.28rem + 0.95vw, 2.02rem);
            line-height: 1.04;
            letter-spacing: -0.028em;
            font-weight: 600;
        }

        .atlas-shell .workspace-context-copy {
            max-width: 48rem;
            font-size: 0.86rem;
            line-height: 1.55;
        }

        .atlas-shell .workspace-actions-toggle,
        .atlas-shell .workspace-primary-action,
        .atlas-shell .workspace-organize-cancel,
        .atlas-shell .workspace-organize-save,
        .atlas-shell .workspace-secondary-action,
        .atlas-shell .results-toolbar-btn {
            min-height: 32px;
            padding: 0.45rem 0.82rem;
            border-radius: 8px;
            box-shadow: none;
        }

        .atlas-shell .workspace-primary-action,
        .atlas-primary-action {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 32px;
            padding: 0.45rem 0.82rem;
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 650;
            line-height: 1.1;
            text-align: center;
            background: var(--active-category-accent, var(--btn-primary-bg));
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--btn-primary-bg)) 82%, transparent);
            color: #fff;
        }

        .atlas-shell .workspace-primary-action:hover,
        .atlas-primary-action:hover {
            background: var(--active-category-accent-hover, var(--btn-primary-hover));
            border-color: color-mix(in srgb, var(--active-category-accent-hover, var(--btn-primary-hover)) 82%, transparent);
        }

        .atlas-ghost-action {
            min-height: 32px;
            padding: 0.45rem 0.82rem;
            border-radius: 8px;
            border: 1px solid var(--border-primary);
            background: transparent;
            color: var(--text-primary);
            font-size: 0.8rem;
            font-weight: 650;
        }

        .atlas-ghost-action:hover {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 6%, var(--bg-input));
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, var(--border-primary));
        }

        .atlas-shell .workspace-preview-card {
            padding: 0;
        }

        .atlas-shell .workspace-preview-header,
        .atlas-shell .workspace-preview-insight-strip {
            display: none;
        }

        .atlas-landing-canvas,
        .atlas-task-ready {
            display: flex;
            flex-direction: column;
            gap: 18px;
            padding: 18px 20px 22px;
        }

        .atlas-landing-hero {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 24px;
        }

        .atlas-landing-hero-main {
            flex: 1;
            min-width: 0;
        }

        .atlas-landing-eyebrow,
        .atlas-section-copy,
        .atlas-stat-label {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            color: var(--text-secondary);
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .atlas-landing-title,
        .atlas-task-ready-title {
            margin: 0;
            color: var(--text-heading);
            font-size: clamp(2rem, 2.6vw, 2.7rem);
            line-height: 0.98;
            letter-spacing: -0.045em;
            font-weight: 780;
        }

        .atlas-landing-copy,
        .atlas-task-ready-copy {
            margin: 10px 0 0;
            max-width: 44rem;
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.55;
        }

        .atlas-landing-actions,
        .atlas-task-ready-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px;
        }

        .atlas-shell .workspace-preview-state-actions,
        .atlas-shell .atlas-task-ready-actions {
            align-items: stretch;
        }

        .atlas-stat-strip {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            border: 1px solid var(--border-primary);
            border-radius: 10px;
            overflow: hidden;
            background: color-mix(in srgb, var(--bg-container) 96%, var(--bg-input));
        }

        .atlas-stat-strip--compact {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .atlas-stat-card {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 0;
            padding: 16px 18px;
            border-right: 1px solid var(--border-primary);
        }

        .atlas-stat-card:last-child {
            border-right: 0;
        }

        .atlas-stat-value {
            color: var(--text-primary);
            font-size: 1.5rem;
            line-height: 1;
            letter-spacing: -0.04em;
            font-weight: 760;
            word-break: break-word;
        }

        .atlas-stat-detail {
            color: var(--text-secondary);
            font-size: 0.78rem;
            line-height: 1.35;
        }

        .atlas-section-head {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 14px;
        }

        .atlas-section-head--compact {
            margin-top: 6px;
        }

        .atlas-section-title {
            margin: 0;
            color: var(--text-primary);
            font-size: 1.05rem;
            font-weight: 760;
            letter-spacing: -0.02em;
        }

        .atlas-inline-filter input {
            width: 280px;
            min-height: 34px;
            border-radius: 8px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            color: var(--text-primary);
            padding: 0 12px;
            font-size: 0.8rem;
            outline: none;
        }

        .atlas-inline-filter input:focus {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 42%, var(--border-primary));
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 12%, transparent);
        }

        .atlas-task-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
        }

        .atlas-task-card {
            display: flex;
            flex-direction: column;
            gap: 14px;
            min-height: 210px;
            border-radius: 10px;
            border: 1px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 8%, var(--border-primary));
            background: color-mix(in srgb, var(--bg-container) 96%, var(--bg-input) 4%);
            color: var(--text-primary);
            padding: 16px 18px;
            text-align: left;
        }

        .atlas-task-card:hover,
        .atlas-task-row:hover {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 26%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-container));
        }

        .atlas-task-card-top,
        .atlas-task-card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .atlas-task-card-pill-row,
        .atlas-task-card-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .atlas-task-pill,
        .atlas-task-tag {
            display: inline-flex;
            align-items: center;
            min-height: 20px;
            padding: 0 7px;
            border-radius: 6px;
            border: 1px solid var(--border-primary);
            color: var(--text-secondary);
            font-size: 0.66rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .atlas-task-pill--accent {
            color: var(--active-category-accent, var(--text-accent));
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 12%, transparent);
        }

        .atlas-task-card-meta,
        .atlas-task-card-footer {
            color: var(--text-secondary);
            font-size: 0.75rem;
        }

        .atlas-task-card-body {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 0;
        }

        .atlas-task-card-title {
            margin: 0;
            color: var(--text-primary);
            font-size: 1rem;
            line-height: 1.18;
            letter-spacing: -0.02em;
            font-weight: 760;
        }

        .atlas-task-card-copy {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.84rem;
            line-height: 1.45;
        }

        .atlas-task-card-link {
            color: var(--active-category-accent, var(--text-accent));
            font-weight: 700;
        }

        .atlas-task-list {
            border: 1px solid var(--border-primary);
            border-radius: 10px;
            overflow: hidden;
            background: color-mix(in srgb, var(--bg-container) 98%, var(--bg-input));
        }

        .atlas-task-row {
            width: 100%;
            display: grid;
            grid-template-columns: 14px minmax(0, 1fr) 180px 18px;
            align-items: center;
            gap: 14px;
            padding: 13px 16px;
            border-bottom: 1px solid var(--border-primary);
            background: transparent;
            color: var(--text-primary);
            text-align: left;
        }

        .atlas-task-row:last-child {
            border-bottom: 0;
        }

        .atlas-task-row-dot {
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 68%, transparent);
        }

        .atlas-task-row-main {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }

        .atlas-task-row-title {
            font-size: 0.92rem;
            font-weight: 720;
            letter-spacing: -0.01em;
        }

        .atlas-task-row-copy,
        .atlas-task-row-tags,
        .atlas-task-row-arrow,
        .atlas-empty-state {
            color: var(--text-secondary);
            font-size: 0.8rem;
            line-height: 1.4;
        }

        .atlas-empty-state {
            padding: 24px;
            border: 1px dashed var(--border-primary);
            border-radius: 10px;
            background: var(--bg-input);
        }

        .atlas-task-ready-hero {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 18px;
            border: 1px solid var(--border-primary);
            border-radius: 10px;
            background: color-mix(in srgb, var(--bg-container) 97%, var(--bg-input));
        }

        .atlas-config-empty-state {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 0;
            background: transparent;
            border: 0;
        }

        .atlas-config-card {
            border: 1px solid var(--border-primary);
            border-radius: 10px;
            background: color-mix(in srgb, var(--bg-container) 98%, var(--bg-input));
            padding: 14px;
        }

        .atlas-config-empty-title {
            margin: 6px 0 4px;
            color: var(--text-primary);
            font-size: 1rem;
            font-weight: 760;
            letter-spacing: -0.02em;
        }

        .atlas-config-empty-copy {
            margin: 0;
            color: var(--text-secondary);
            font-size: 0.82rem;
            line-height: 1.45;
        }

        .atlas-config-metric-list,
        .atlas-config-library-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .atlas-config-metric {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            color: var(--text-secondary);
            font-size: 0.8rem;
        }

        .atlas-config-metric strong {
            color: var(--text-primary);
            font-size: 0.82rem;
            font-weight: 720;
        }

        .atlas-config-chain-btn {
            margin-top: 10px;
        }

        @media (max-width: 1400px) {
            .atlas-task-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 1180px) {
            .atlas-shell .workspace-topbar-shell {
                grid-template-columns: minmax(0, 1fr) auto;
            }

            .atlas-shell #workspace-shell-grid,
            .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
                grid-template-columns: minmax(0, 1fr) minmax(300px, var(--workspace-config-width));
            }

            .atlas-left-rail {
                display: none;
            }

            .atlas-landing-hero,
            .atlas-section-head {
                flex-direction: column;
                align-items: flex-start;
            }

            .atlas-canvas-utility-actions {
                flex-wrap: wrap;
            }
        }

        @media (max-width: 960px) {
            .atlas-stat-strip,
            .atlas-stat-strip--compact {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

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

            .atlas-task-row {
                grid-template-columns: 14px minmax(0, 1fr) 18px;
            }

            .atlas-task-row-tags {
                display: none;
            }
        }

        @media (max-width: 768px) {
            .atlas-shell .workspace-main-canvas {
                padding: 16px;
            }

            .atlas-shell .workspace-config-rail {
                border-left: 0;
                border-top: 1px solid var(--border-primary);
            }

            .atlas-landing-canvas,
            .atlas-task-ready {
                padding: 14px 16px 18px;
            }

            .atlas-landing-title,
            .atlas-task-ready-title {
                font-size: 1.8rem;
            }

            .atlas-inline-filter input {
                width: min(100%, 280px);
            }
        }

        /* Atlas fidelity pass: typography consistency + neutral result surfaces */
        .atlas-shell,
        .atlas-shell button,
        .atlas-shell input,
        .atlas-shell select,
        .atlas-shell textarea,
        .atlas-shell .tabulator,
        .atlas-shell .tabulator * {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            font-feature-settings: 'cv11', 'ss01';
        }

        .atlas-shell code,
        .atlas-shell pre,
        .atlas-shell .mono,
        .atlas-shell .font-mono,
        .atlas-shell .atlas-brand-tag,
        .atlas-shell .atlas-task-pill,
        .atlas-shell .atlas-task-tag,
        .atlas-shell .atlas-category-btn-count,
        .atlas-shell .atlas-rail-count,
        .atlas-shell .results-command-label,
        .atlas-shell .tabulator .tabulator-header .tabulator-col {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
        }

        .dark .atlas-shell {
            --tabulator-header-bg: #181d26;
            --tabulator-row-bg: #121720;
            --tabulator-row-even-bg: #151b25;
            --tabulator-border: rgba(255, 255, 255, 0.08);
            --tabulator-text: #edf2fb;
            --tabulator-footer-bg: #181d26;
            --tabulator-pag-button-bg: #121720;
            --tabulator-pag-button-hover: #1b2230;
        }

        .light .atlas-shell {
            --tabulator-header-bg: oklch(0.975 0.004 260);
            --tabulator-row-bg: oklch(1 0 0);
            --tabulator-row-even-bg: color-mix(in oklch, oklch(1 0 0) 78%, oklch(0.975 0.004 260));
            --tabulator-border: oklch(0.90 0.005 260);
            --tabulator-text: oklch(0.18 0.01 260);
            --tabulator-footer-bg: oklch(0.975 0.004 260);
            --tabulator-pag-button-bg: oklch(1 0 0);
            --tabulator-pag-button-hover: oklch(0.975 0.004 260);
        }

        .atlas-task-pill--ai {
            color: #00b89c;
            border-color: color-mix(in srgb, #00b89c 38%, var(--border-primary));
            background: color-mix(in srgb, #00b89c 14%, transparent);
        }

        .atlas-task-pill--places {
            color: #f59e0b;
            border-color: color-mix(in srgb, #f59e0b 38%, var(--border-primary));
            background: color-mix(in srgb, #f59e0b 14%, transparent);
        }

        .atlas-shell #results-container {
            overflow: hidden;
        }

        .atlas-shell .results-command-bar {
            top: 0;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-primary);
            background: color-mix(in oklch, var(--bg-container) 94%, var(--atlas-panel-hi, var(--bg-input)));
        }

        .atlas-shell .results-command-label,
        .atlas-shell .results-eyebrow {
            color: var(--active-category-accent, var(--text-accent));
            font-size: 0.68rem;
            letter-spacing: 0.14em;
        }

        .atlas-shell .results-shell-body,
        .atlas-shell .atlas-results-body {
            padding: 0 20px 20px;
        }

        .atlas-shell .results-header,
        .atlas-shell .atlas-results-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 18px 20px;
            border-bottom: 1px solid var(--border-primary);
        }

        .atlas-shell .results-heading {
            font-size: clamp(1.52rem, 1.18rem + 0.9vw, 1.9rem);
            line-height: 1.04;
            font-weight: 600;
            letter-spacing: -0.03em;
        }

        .atlas-shell .results-toolbar {
            gap: 10px;
        }

        .atlas-shell .results-toolbar-btn,
        .atlas-shell .results-toggle-btn {
            border-radius: 8px;
            min-height: 30px;
            font-size: 0.72rem;
            font-weight: 700;
            box-shadow: none;
        }

        .atlas-shell .results-segmented-control {
            padding: 2px;
            border-radius: 10px;
            background: var(--bg-input);
        }

        .atlas-shell .results-toggle-btn.is-active {
            background: var(--active-category-accent, var(--btn-primary-bg));
            color: #fff;
            box-shadow: none;
        }

        .atlas-shell #table-ux-toolbar {
            margin: 16px 18px 0;
            padding: 12px 14px;
            border-radius: 10px;
            background: color-mix(in srgb, var(--bg-container) 98%, var(--bg-input));
        }

        .atlas-shell #table-search-input {
            min-height: 38px;
            border-radius: 8px;
            background: var(--bg-body);
            border-color: var(--border-primary);
        }

        .atlas-shell #table-wrapper {
            margin: 14px 18px 18px;
            border-radius: 10px;
            border-color: var(--border-primary);
            background: color-mix(in srgb, var(--bg-container) 98%, var(--bg-input));
            overflow-x: auto;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-header,
        .atlas-shell .dashboard-shell .tabulator .tabulator-header {
            background: var(--tabulator-header-bg) !important;
            border-bottom: 1px solid var(--tabulator-border) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-header .tabulator-col,
        .atlas-shell .dashboard-shell .tabulator .tabulator-header .tabulator-col {
            background: var(--tabulator-header-bg) !important;
            color: color-mix(in srgb, var(--text-secondary) 92%, transparent) !important;
            border-right: 1px solid color-mix(in srgb, var(--tabulator-border) 90%, transparent) !important;
            font-size: 0.68rem !important;
            font-weight: 700 !important;
            letter-spacing: 0.12em !important;
            text-transform: uppercase !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-header .tabulator-col .tabulator-col-content,
        .atlas-shell .dashboard-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
            padding: 14px 14px !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-row .tabulator-cell,
        .atlas-shell .dashboard-shell .tabulator .tabulator-row .tabulator-cell {
            color: var(--tabulator-text) !important;
            border-right: 0 !important;
            border-bottom: 1px solid color-mix(in srgb, var(--tabulator-border) 92%, transparent) !important;
            padding: 13px 14px !important;
            font-size: 0.82rem !important;
            line-height: 1.45 !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover,
        .atlas-shell #table-wrapper .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover .tabulator-cell,
        .atlas-shell .dashboard-shell .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover,
        .atlas-shell .dashboard-shell .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row:hover .tabulator-cell {
            background-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 6%, var(--tabulator-row-bg)) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-footer,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer {
            background: var(--tabulator-footer-bg) !important;
            border-top: 1px solid var(--tabulator-border) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-paginator button,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-paginator button {
            min-height: 32px;
            border-radius: 8px;
            background: var(--tabulator-pag-button-bg) !important;
            border-color: color-mix(in srgb, var(--tabulator-border) 90%, transparent) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-footer select,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer select {
            min-height: 32px;
            border-radius: 8px;
            background: var(--bg-body) !important;
            border-color: color-mix(in srgb, var(--tabulator-border) 90%, transparent) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-cell button,
        .atlas-shell .dashboard-shell .tabulator .tabulator-cell button {
            min-height: 24px;
            padding: 0.15rem 0.55rem;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 700;
        }

        /* Atlas final override pass */
        .atlas-shell {
            --atlas-accent: var(--active-category-accent, #10b8ff);
            --atlas-accent-hover: var(--active-category-accent-hover, #0697dd);
        }

        .atlas-shell #auth-status-badge {
            display: none !important;
        }

        .atlas-shell .atlas-brand-mark {
            width: 22px;
            height: 22px;
            border-radius: 6px;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.02em;
        }

        .atlas-shell .atlas-brand-copy {
            gap: 10px;
        }

        .atlas-shell .atlas-brand-title {
            font-size: 0.94rem;
            font-weight: 600;
            letter-spacing: -0.01em;
        }

        .atlas-shell .atlas-brand-tag {
            display: none !important;
        }

        .atlas-shell .workspace-preview-panel {
            border: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .atlas-shell[data-atlas-stage="landing"] .workspace-context-panel,
        .atlas-shell[data-atlas-stage="landing"] #atlas-run-status-strip,
        .atlas-shell[data-atlas-stage="special"] .workspace-context-panel,
        .atlas-shell[data-atlas-stage="special"] #atlas-run-status-strip {
            display: none !important;
        }

        .atlas-shell[data-atlas-stage="landing"] .workspace-main-canvas,
        .atlas-shell[data-atlas-stage="special"] .workspace-main-canvas {
            gap: 0;
        }

        .atlas-shell .atlas-topbar-search-kbd {
            letter-spacing: 0.02em;
            text-transform: none;
            min-width: 34px;
            height: 22px;
            padding: 0 7px;
            border-radius: 6px;
            font-size: 0.64rem;
            font-weight: 600;
        }

        .atlas-shell .atlas-topbar-status-dot {
            background: #32d67a;
            box-shadow: 0 0 0 4px rgba(50, 214, 122, 0.12);
        }

        .atlas-shell .atlas-category-btn {
            border: 1px solid transparent;
            border-radius: 6px;
            padding: 7px 10px;
        }

        .atlas-shell .atlas-category-btn-main {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .atlas-shell .atlas-category-btn-icon {
            width: 14px;
            height: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            flex: 0 0 auto;
        }

        .atlas-shell .atlas-category-btn-icon .workspace-tab-icon {
            width: 14px;
            height: 14px;
            opacity: 1;
        }

        .atlas-shell .atlas-category-btn-label {
            font-size: 0.81rem;
            font-weight: 550;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .atlas-shell .atlas-category-btn:not(.is-active) .atlas-category-btn-label {
            font-weight: 500;
        }

        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-icon,
        .atlas-shell .atlas-category-btn.is-active .atlas-category-btn-icon {
            color: var(--atlas-accent);
        }

        .atlas-shell .atlas-category-btn:hover {
            background: var(--atlas-panel-hi, var(--bg-input));
        }

        .atlas-shell .atlas-category-btn.is-active {
            background: color-mix(in oklch, var(--atlas-accent) 12%, var(--bg-container));
            border-color: color-mix(in oklch, var(--atlas-accent) 20%, var(--border-primary));
            box-shadow: none;
        }

        .atlas-shell .atlas-group-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: -2px;
        }

        .atlas-shell .atlas-group-tab {
            min-height: 32px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.01em;
        }

        .atlas-shell .atlas-group-tab:hover {
            border-color: color-mix(in srgb, var(--atlas-group-accent, var(--active-category-accent, var(--atlas-accent))) 30%, var(--border-primary));
            color: var(--text-primary);
            background: color-mix(in srgb, var(--atlas-group-accent, var(--active-category-accent, var(--atlas-accent))) 8%, var(--bg-input));
        }

        .atlas-shell .atlas-group-tab.is-active {
            border-color: color-mix(in srgb, var(--atlas-group-accent, var(--active-category-accent, var(--atlas-accent))) 50%, var(--border-primary));
            color: var(--text-primary);
            background: color-mix(in srgb, var(--atlas-group-accent, var(--active-category-accent, var(--atlas-accent))) 14%, var(--bg-input));
            box-shadow: inset 0 -2px 0 var(--atlas-group-accent, var(--active-category-accent, var(--atlas-accent)));
        }

        .atlas-shell .atlas-primary-action,
        .atlas-shell .workspace-primary-action,
        .atlas-shell .results-toolbar-btn--primary,
        .atlas-shell .results-toggle-btn.is-active,
        .atlas-shell .workspace-app-shell[data-active-category] .workspace-organize-save:not(:disabled) {
            background: var(--atlas-accent) !important;
            border-color: var(--atlas-accent) !important;
            color: #fff !important;
            box-shadow: none !important;
            filter: none !important;
        }

        .atlas-shell .atlas-primary-action:hover,
        .atlas-shell .workspace-primary-action:hover,
        .atlas-shell .results-toolbar-btn--primary:hover,
        .atlas-shell .workspace-app-shell[data-active-category] .workspace-organize-save:not(:disabled):hover {
            background: var(--atlas-accent-hover) !important;
            border-color: var(--atlas-accent-hover) !important;
        }

        .atlas-shell .atlas-task-pill--accent {
            color: var(--atlas-accent);
            border-color: color-mix(in srgb, var(--atlas-accent) 26%, var(--border-primary));
            background: color-mix(in srgb, var(--atlas-accent) 10%, transparent);
        }

        .atlas-shell .atlas-task-card {
            border-color: color-mix(in srgb, var(--atlas-card-accent, var(--active-category-accent, var(--atlas-accent))) 12%, var(--border-primary));
            background: var(--bg-container);
        }

        .atlas-shell .atlas-task-card:hover,
        .atlas-shell .atlas-task-row:hover {
            border-color: color-mix(in oklch, var(--atlas-card-accent, var(--active-category-accent, var(--atlas-accent))) 24%, var(--border-primary));
            background: color-mix(in oklch, var(--atlas-card-accent, var(--active-category-accent, var(--atlas-accent))) 4%, var(--bg-container));
        }

        .atlas-shell .atlas-task-card .atlas-task-pill--accent {
            color: var(--atlas-card-accent, var(--active-category-accent, var(--atlas-accent)));
            border-color: color-mix(in srgb, var(--atlas-card-accent, var(--active-category-accent, var(--atlas-accent))) 28%, var(--border-primary));
            background: color-mix(in srgb, var(--atlas-card-accent, var(--active-category-accent, var(--atlas-accent))) 12%, transparent);
        }

        .atlas-shell .atlas-landing-title,
        .atlas-shell .atlas-task-ready-title {
            font-size: clamp(1.72rem, 1.35rem + 0.8vw, 1.875rem) !important;
            line-height: 1.15 !important;
            letter-spacing: -0.022em !important;
            font-weight: 600 !important;
            width: min(100%, 700px);
            max-width: 700px;
            text-wrap: balance;
        }

        .atlas-shell .atlas-landing-copy,
        .atlas-shell .atlas-task-ready-copy {
            margin-top: 8px;
            max-width: 42rem;
            font-size: 0.88rem;
            line-height: 1.5;
        }

        .atlas-shell .atlas-landing-actions,
        .atlas-shell .atlas-task-ready-actions {
            gap: 10px;
            flex-wrap: wrap;
        }

        .atlas-shell .atlas-landing-actions .atlas-primary-action,
        .atlas-shell .atlas-landing-actions .atlas-ghost-action,
        .atlas-shell .atlas-task-ready-actions .atlas-primary-action,
        .atlas-shell .atlas-task-ready-actions .atlas-ghost-action,
        .atlas-shell .workspace-preview-state-actions .workspace-primary-action,
        .atlas-shell .workspace-preview-state-actions .workspace-secondary-action {
            min-height: 34px;
            padding: 0 15px;
            font-size: 0.76rem;
            font-weight: 600;
            border-radius: 10px;
        }

        .atlas-shell .results-toolbar-btn-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            flex: 0 0 auto;
        }

        .atlas-shell .results-toolbar-btn-icon svg {
            width: 14px;
            height: 14px;
        }

        .atlas-shell .results-toolbar-btn-label {
            display: inline-flex;
            align-items: center;
        }

        .atlas-shell .prospect-view-tabs {
            gap: 10px;
            margin-bottom: 14px;
        }

        .atlas-shell .prospect-view-tabs .atlas-group-tab {
            min-height: 30px;
            padding: 0 14px;
        }

        .atlas-shell #api-form > .mt-8.text-center {
            display: none !important;
        }

        .atlas-shell .workspace-config-form-intro,
        .atlas-shell .workspace-config-divider {
            display: none;
        }

        .atlas-shell .workspace-config-stack {
            padding-bottom: 12px;
            overflow-x: hidden;
            scroll-padding-bottom: 140px;
        }

        .atlas-shell .workspace-config-stack,
        .atlas-shell .workspace-config-stack > *,
        .atlas-shell #api-form,
        .atlas-shell #inputsContainer,
        .atlas-shell .input-section,
        .atlas-shell .input-section > * {
            min-width: 0;
            max-width: 100%;
            box-sizing: border-box;
        }

        .atlas-shell #api-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-height: 0;
        }

        .atlas-shell #inputsContainer {
            margin-top: 0 !important;
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding-bottom: 120px;
        }

        .atlas-shell .input-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .atlas-shell .workspace-config-stack input[type="text"],
        .atlas-shell .workspace-config-stack input[type="number"],
        .atlas-shell .workspace-config-stack input[type="url"],
        .atlas-shell .workspace-config-stack input[type="date"],
        .atlas-shell .workspace-config-stack input[type="file"],
        .atlas-shell .workspace-config-stack textarea,
        .atlas-shell .workspace-config-stack select {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        .atlas-shell .workspace-config-stack p,
        .atlas-shell .workspace-config-stack label,
        .atlas-shell .workspace-config-stack .workspace-switcher-copy,
        .atlas-shell .workspace-config-stack .workspace-intro-banner,
        .atlas-shell .workspace-config-stack .workspace-empty-state,
        .atlas-shell .workspace-config-stack .workspace-chip,
        .atlas-shell .workspace-config-stack code,
        .atlas-shell .atlas-config-empty-copy,
        .atlas-shell .atlas-config-metric,
        .atlas-shell .atlas-config-metric span,
        .atlas-shell .atlas-config-card {
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .atlas-shell .workspace-config-footer {
            position: sticky !important;
            bottom: 0 !important;
            inset-inline: 0 !important;
            z-index: 10 !important;
            order: 99;
            align-self: stretch;
            flex-shrink: 0;
            overflow: visible;
            width: 100%;
            max-width: 100%;
            margin-top: auto;
            padding: 12px 16px 14px;
            border-top: 1px solid var(--border-primary);
            background: var(--bg-container);
        }

        .atlas-shell .atlas-rail-footer-meta,
        .atlas-shell .workspace-config-footer-meta {
            gap: 10px 12px;
        }

        .atlas-shell .atlas-rail-footer-actions,
        .atlas-shell .workspace-config-footer-actions {
            grid-template-columns: 112px 1fr;
            align-items: center;
        }

        .atlas-shell .atlas-rail-footer-actions .atlas-action-btn,
        .atlas-shell .atlas-rail-footer-actions button,
        .atlas-shell .workspace-config-footer .atlas-action-btn,
        .atlas-shell .workspace-config-footer .workspace-secondary-action,
        .atlas-shell .workspace-config-footer .workspace-primary-action {
            min-height: 40px;
            max-height: 44px;
            border-radius: 10px;
            white-space: nowrap;
            line-height: 1.2;
            padding: 0 13px;
            text-align: center;
            justify-content: center;
        }

        .atlas-shell #method-recent-wrap {
            display: none !important;
        }

        .atlas-shell .atlas-config-label {
            margin: 0 0 0.2rem;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-config-note {
            margin: 0;
            font-size: 0.8rem;
            line-height: 1.55;
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-config-control {
            width: 100%;
            max-width: 100%;
            min-height: 44px;
            padding: 0.78rem 0.95rem;
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            background: color-mix(in oklch, var(--bg-container) 86%, var(--bg-input) 14%);
            color: var(--text-primary);
            box-shadow: none;
        }

        .atlas-shell .atlas-config-control::placeholder {
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-config-control:focus {
            outline: none;
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 42%, var(--border-primary));
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 12%, transparent);
            background: var(--bg-container);
        }

        .atlas-shell .atlas-config-control--textarea {
            min-height: 132px;
            max-height: 240px;
            resize: vertical;
            overflow-y: auto;
            line-height: 1.48;
        }

        .atlas-shell .atlas-config-control--multi {
            min-height: 132px;
            height: 132px;
        }

        .atlas-shell .atlas-config-hidden-select {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            margin: -1px !important;
            padding: 0 !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }

        .atlas-shell .atlas-config-llm-group {
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
        }

        .atlas-shell .atlas-config-llm-group [id$='ProviderSelect'],
        .atlas-shell .atlas-config-llm-group [id$='ModelSelect'] {
            display: none !important;
        }

        .atlas-shell .atlas-config-choice-group {
            display: flex;
            flex-wrap: wrap;
            gap: 0.55rem;
        }

        .atlas-shell .atlas-config-choice {
            min-height: 38px;
            padding: 0 0.95rem;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-container);
            color: var(--text-secondary);
            font-size: 0.78rem;
            font-weight: 650;
            line-height: 1;
            transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
        }

        .atlas-shell .atlas-config-choice:hover {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 26%, var(--border-primary));
            color: var(--text-primary);
        }

        .atlas-shell .atlas-config-choice.is-active {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 52%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 10%, var(--bg-container));
            color: var(--text-primary);
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 18%, transparent);
        }

        .atlas-shell .atlas-config-choice--model {
            min-height: 34px;
            font-size: 0.74rem;
        }

        .atlas-shell .atlas-config-toggle-card,
        .atlas-shell .atlas-config-callout {
            width: 100%;
            max-width: 100%;
            padding: 0.9rem 1rem;
            border: 1px solid var(--border-primary);
            border-radius: 18px;
            background: color-mix(in oklch, var(--bg-container) 94%, var(--bg-input) 6%);
            overflow: hidden;
        }

        .atlas-shell .atlas-config-toggle-card {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            gap: 0.8rem;
            align-items: start;
            cursor: pointer;
        }

        .atlas-shell .atlas-config-toggle-card-body {
            display: flex;
            flex-direction: column;
            gap: 0.28rem;
            min-width: 0;
        }

        .atlas-shell .atlas-config-callout-body {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            margin-top: 0.85rem;
            min-width: 0;
        }

        .atlas-shell .atlas-config-toggle-card-title,
        .atlas-shell .atlas-config-callout-title {
            font-size: 0.84rem;
            font-weight: 700;
            line-height: 1.35;
            color: var(--text-primary);
        }

        .atlas-shell .atlas-config-toggle-card-copy,
        .atlas-shell .atlas-config-callout-copy {
            font-size: 0.75rem;
            line-height: 1.5;
            color: var(--text-secondary);
        }

        .atlas-shell .atlas-config-toggle-card--sample {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 24%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 6%, var(--bg-container));
        }

        .atlas-shell .atlas-config-callout--sample {
            border-color: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 24%, var(--border-primary));
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 6%, var(--bg-container));
        }

        .atlas-shell .atlas-config-subdivider {
            width: 100%;
            height: 1px;
            background: var(--border-primary);
            margin: 0.1rem 0;
        }

        .atlas-shell .atlas-config-nested {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-left: 10px;
            padding: 0.95rem 0 0 1rem;
            border-left: 2px solid color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 16%, var(--border-primary));
        }

        .atlas-shell .atlas-config-card,
        .atlas-shell #method-category-section,
        .atlas-shell #api-form {
            border-radius: 22px;
        }

        .atlas-shell .atlas-topbar-search-input {
            min-height: 40px;
            padding: 0 72px 0 14px;
            font-size: 0.79rem;
            font-weight: 500;
        }

        .atlas-shell .atlas-landing-eyebrow,
        .atlas-shell .atlas-section-copy,
        .atlas-shell .atlas-stat-label,
        .atlas-shell .atlas-rail-heading,
        .atlas-shell .atlas-rail-heading-row {
            font-size: 0.67rem;
            font-weight: 700;
            letter-spacing: 0.11em;
        }

        .atlas-shell .atlas-eyebrow-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            color: var(--active-category-accent, var(--atlas-accent));
            flex: 0 0 auto;
        }

        .atlas-shell .atlas-eyebrow-icon .workspace-tab-icon {
            width: 14px;
            height: 14px;
            opacity: 1;
        }

        .atlas-shell .atlas-stat-value {
            font-size: 1.38rem;
            font-weight: 600;
            letter-spacing: -0.03em;
        }

        .atlas-shell .atlas-section-title {
            font-size: 1rem;
            font-weight: 600;
            letter-spacing: -0.015em;
        }

        .atlas-shell .atlas-task-card {
            min-height: 188px;
            gap: 12px;
        }

        .atlas-shell .atlas-task-pill,
        .atlas-shell .atlas-task-tag {
            font-size: 0.63rem;
            font-weight: 600;
        }

        .atlas-shell .atlas-task-card-meta,
        .atlas-shell .atlas-task-card-footer {
            font-size: 0.72rem;
        }

        .atlas-shell .atlas-task-card-title {
            font-size: 0.95rem;
            line-height: 1.28;
            letter-spacing: -0.015em;
            font-weight: 600;
        }

        .atlas-shell .atlas-task-card-copy {
            font-size: 0.8rem;
            line-height: 1.45;
        }

        .atlas-shell .atlas-task-card-link {
            font-weight: 600;
        }

        .atlas-shell .atlas-task-row-title {
            font-size: 0.88rem;
            font-weight: 550;
            letter-spacing: -0.01em;
        }

        .atlas-shell .atlas-task-row-copy,
        .atlas-shell .atlas-task-row-tags,
        .atlas-shell .atlas-task-row-arrow,
        .atlas-shell .atlas-empty-state {
            font-size: 0.76rem;
            line-height: 1.42;
        }

        .atlas-shell .atlas-rail-count,
        .atlas-shell .atlas-category-btn-count {
            font-size: 0.68rem;
            font-weight: 600;
        }

        .atlas-shell .atlas-rail-item-title {
            font-size: 0.82rem;
            font-weight: 500;
            line-height: 1.3;
        }

        .atlas-shell .atlas-rail-item-copy,
        .atlas-shell .atlas-rail-empty {
            font-size: 0.73rem;
            line-height: 1.38;
        }

        .atlas-shell .workspace-switcher-title,
        .atlas-shell .atlas-config-empty-title {
            font-size: 0.92rem;
            font-weight: 600;
            letter-spacing: -0.015em;
        }

        .atlas-shell .workspace-switcher-copy,
        .atlas-shell .atlas-config-empty-copy {
            font-size: 0.78rem;
            line-height: 1.42;
        }

        .atlas-shell .atlas-config-metric {
            font-size: 0.76rem;
        }

        .atlas-shell .atlas-config-metric strong {
            font-size: 0.78rem;
            font-weight: 600;
        }

        .atlas-shell[data-atlas-stage="task"] #workspace-run-request-btn,
        .atlas-shell[data-atlas-stage="results"] #workspace-run-request-btn {
            display: none;
        }

        .atlas-shell .atlas-intent-label {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid var(--border-primary);
            background: var(--bg-input);
            font-size: 0.74rem;
            font-weight: 600;
            line-height: 1.1;
            white-space: nowrap;
        }

        .atlas-shell .atlas-intent-label--informational {
            color: #0b7bd9;
            border-color: color-mix(in srgb, #0b7bd9 28%, var(--border-primary));
            background: color-mix(in srgb, #0b7bd9 10%, var(--bg-container));
        }

        .atlas-shell .atlas-intent-label--commercial {
            color: #d97706;
            border-color: color-mix(in srgb, #d97706 28%, var(--border-primary));
            background: color-mix(in srgb, #d97706 10%, var(--bg-container));
        }

        .atlas-shell .atlas-intent-label--navigational {
            color: #6366f1;
            border-color: color-mix(in srgb, #6366f1 28%, var(--border-primary));
            background: color-mix(in srgb, #6366f1 10%, var(--bg-container));
        }

        .atlas-shell .atlas-intent-label--transactional,
        .atlas-shell .atlas-intent-label--local {
            color: #0f9f6e;
            border-color: color-mix(in srgb, #0f9f6e 28%, var(--border-primary));
            background: color-mix(in srgb, #0f9f6e 10%, var(--bg-container));
        }

        .atlas-shell #results-container {
            border-radius: 24px;
            border-color: var(--border-primary);
            background: var(--bg-container);
        }

        .atlas-shell .results-command-bar {
            padding: 16px 20px;
        }

        .atlas-shell .results-shell-body {
            padding: 18px 20px 22px;
        }

        .atlas-shell #table-ux-toolbar,
        .atlas-shell #table-wrapper,
        .atlas-shell #raw-wrapper pre {
            border-radius: 22px;
            border-color: var(--border-primary);
            background: var(--bg-container);
        }

        .atlas-shell #table-wrapper {
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
        }

        .atlas-shell #table-wrapper .tabulator,
        .atlas-shell .dashboard-shell .tabulator {
            min-width: 100%;
            background: var(--bg-container) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-header,
        .atlas-shell .dashboard-shell .tabulator .tabulator-header {
            background: color-mix(in oklch, var(--bg-container) 72%, var(--bg-input) 28%) !important;
            border-bottom: 1px solid var(--border-primary) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-header .tabulator-col,
        .atlas-shell .dashboard-shell .tabulator .tabulator-header .tabulator-col {
            background: transparent !important;
            color: var(--text-secondary) !important;
            font-size: 0.73rem !important;
            font-weight: 800 !important;
            letter-spacing: 0.11em !important;
            text-transform: uppercase !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-header .tabulator-col .tabulator-col-content,
        .atlas-shell .dashboard-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
            padding: 15px 18px !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-row,
        .atlas-shell .dashboard-shell .tabulator .tabulator-row {
            background: var(--bg-container) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-row.tabulator-row-even,
        .atlas-shell .dashboard-shell .tabulator .tabulator-row.tabulator-row-even {
            background: color-mix(in oklch, var(--bg-container) 82%, var(--bg-input) 18%) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-row .tabulator-cell,
        .atlas-shell .dashboard-shell .tabulator .tabulator-row .tabulator-cell {
            padding: 14px 18px !important;
            color: var(--text-primary) !important;
            font-size: 0.84rem !important;
            line-height: 1.45 !important;
            border-right: 1px solid color-mix(in oklch, var(--border-primary) 90%, transparent) !important;
            border-bottom: 1px solid color-mix(in oklch, var(--border-primary) 94%, transparent) !important;
            overflow: visible !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-tableholder,
        .atlas-shell #table-wrapper .tabulator .tabulator-tableHolder,
        .atlas-shell .dashboard-shell .tabulator .tabulator-tableholder,
        .atlas-shell .dashboard-shell .tabulator .tabulator-tableHolder {
            background: transparent !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-row:hover,
        .atlas-shell #table-wrapper .tabulator .tabulator-row:hover .tabulator-cell,
        .atlas-shell .dashboard-shell .tabulator .tabulator-row:hover,
        .atlas-shell .dashboard-shell .tabulator .tabulator-row:hover .tabulator-cell {
            background: color-mix(in srgb, var(--active-category-accent, var(--text-accent)) 5%, var(--bg-container)) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-footer,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer {
            padding: 14px 18px !important;
            background: color-mix(in oklch, var(--bg-container) 74%, var(--bg-input) 26%) !important;
            border-top: 1px solid var(--border-primary) !important;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-paginator,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-paginator {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-paginator button,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-paginator button,
        .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-page-size,
        .atlas-shell #table-wrapper .tabulator .tabulator-footer select,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-page-size,
        .atlas-shell .dashboard-shell .tabulator .tabulator-footer select {
            min-height: 38px;
            border-radius: 14px;
            background: var(--bg-container) !important;
            border-color: var(--border-primary) !important;
            color: var(--text-primary) !important;
        }

        .atlas-shell .table-row-actions {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            min-width: 132px;
            justify-content: flex-end;
        }

        .atlas-shell #table-wrapper .tabulator .tabulator-cell button,
        .atlas-shell .dashboard-shell .tabulator .tabulator-cell button,
        .atlas-shell .table-row-actions button {
            min-height: 30px;
            padding: 0.18rem 0.7rem;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 700;
            background: color-mix(in oklch, var(--bg-container) 72%, var(--bg-input) 28%);
            border: 1px solid var(--border-primary);
            color: var(--text-primary);
        }

        .atlas-shell .atlas-variant-nav {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.55rem;
        }

        .atlas-shell .atlas-variant-nav .content-library-view-btn {
            min-height: 32px;
            padding-inline: 0.9rem;
        }

        .atlas-shell .results-segmented-control,
        .atlas-shell #table-ux-toolbar,
        .atlas-shell #table-wrapper,
        .atlas-shell #raw-wrapper pre,
        .atlas-shell #results-container {
            box-shadow: none !important;
        }

        .light .atlas-shell .atlas-stat-strip,
        .light .atlas-shell .atlas-task-list,
        .light .atlas-shell .atlas-task-ready-hero,
        .light .atlas-shell .atlas-config-card,
        .light .atlas-shell .workspace-context-panel,
        .light .atlas-shell .workspace-preview-panel,
        .light .atlas-shell #results-container,
        .light .atlas-shell #table-wrapper,
        .light .atlas-shell #table-ux-toolbar,
        .light .atlas-shell #raw-wrapper pre {
            background: var(--bg-container);
        }

        .light .atlas-shell .atlas-inline-filter input,
        .light .atlas-shell .atlas-topbar-search-input {
            background: var(--atlas-panel-hi, var(--bg-input));
        }

        .light .atlas-shell .atlas-config-toggle-card,
        .light .atlas-shell .atlas-config-callout,
        .light .atlas-shell .workspace-config-footer,
        .light .atlas-shell #method-category-section,
        .light .atlas-shell #api-form {
            background: #fff;
        }

        .light .atlas-shell .atlas-config-control,
        .light .atlas-shell .workspace-method-search-input,
        .light .atlas-shell #methodSelector {
            background: color-mix(in srgb, #ffffff 92%, var(--bg-input) 8%);
        }

        @media (min-width: 1200px) {
            .atlas-shell #social-step-flow,
            .atlas-shell #ad-step-flow {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 1rem;
                align-items: start;
            }

            .atlas-shell #social-step-1,
            .atlas-shell #social-step-2,
            .atlas-shell #social-step-3,
            .atlas-shell #ad-step-1,
            .atlas-shell #ad-step-2,
            .atlas-shell #ad-step-3 {
                grid-column: span 1;
            }

            .atlas-shell #social-step-4 {
                grid-column: 1 / span 2;
            }

            .atlas-shell #social-step-5 {
                grid-column: 3;
            }

            .atlas-shell #ad-step-4 {
                grid-column: 1 / -1;
            }
        }

        @media (max-width: 1180px) {
            .atlas-shell .atlas-topbar-nav-hidden {
                display: block !important;
            }

            .atlas-shell .workspace-topbar-shell {
                grid-template-columns: minmax(0, 1fr) auto;
                grid-template-areas:
                    "brand actions"
                    "search search"
                    "nav nav";
                align-items: stretch;
                gap: 10px;
                padding-block: 10px;
            }

            .atlas-shell .workspace-topbar-brand {
                grid-area: brand;
            }

            .atlas-shell .atlas-topbar-search-wrap {
                grid-area: search;
                max-width: none;
            }

            .atlas-shell .workspace-topbar-nav {
                grid-area: nav;
                display: block;
                min-width: 0;
            }

            .atlas-shell .workspace-topbar-actions {
                grid-area: actions;
                justify-content: flex-end;
            }

            .atlas-shell .workspace-mode-tabs {
                gap: 6px;
                overflow-x: auto;
                padding-bottom: 2px;
            }

            .atlas-shell .workspace-mode-tabs .category-tab {
                min-height: 34px;
                padding: 0 11px;
                border-radius: 999px;
                border: 1px solid var(--border-primary);
                background: var(--bg-container);
                color: var(--text-secondary);
            }

            .atlas-shell .workspace-mode-tabs .workspace-mode-tab-active {
                background: color-mix(in oklch, var(--active-category-accent, var(--atlas-accent)) 10%, var(--bg-container));
                color: var(--active-category-accent, var(--atlas-accent));
                border-color: color-mix(in oklch, var(--active-category-accent, var(--atlas-accent)) 24%, var(--border-primary));
                box-shadow: none;
            }

            .atlas-shell .workspace-mode-tabs .workspace-mode-tab-inactive {
                color: var(--text-secondary);
            }

            .atlas-shell .workspace-mode-tabs .workspace-mode-tab-inactive:hover {
                background: var(--atlas-panel-hi, var(--bg-input));
                border-color: var(--border-primary);
            }
        }

        @media (max-width: 960px) {
            .atlas-shell,
            .atlas-shell .workspace-app-shell {
                overflow-x: hidden;
            }

            .atlas-shell #workspace-shell-grid,
            .atlas-shell #workspace-shell-grid[data-rail-collapsed="true"] {
                grid-template-columns: minmax(0, 1fr);
            }

            .atlas-shell .workspace-config-rail {
                order: 2;
                position: static;
                top: auto;
                right: auto;
                left: auto;
                width: 100%;
                min-width: 0;
                max-width: 100%;
                height: auto;
                min-height: 0;
                max-height: none;
                transform: none !important;
                box-shadow: none;
                border-left: 0;
                border-top: 1px solid var(--border-primary);
            }

            body.atlas-shell.atlas-rail-closed .workspace-config-rail {
                display: none;
            }

            .atlas-shell .atlas-config-backdrop {
                display: none !important;
            }

            .atlas-shell .workspace-config-resizer {
                display: none;
            }

            .atlas-shell .workspace-config-stack {
                height: auto;
                max-height: none;
                min-height: 0;
                overflow: visible;
                padding: 14px 12px 18px;
            }

            .atlas-shell .atlas-config-body-scroll {
                overflow: visible;
            }

            .atlas-shell .workspace-config-footer,
            .atlas-shell .atlas-rail-footer {
                position: static !important;
            }

            .atlas-shell .workspace-config-footer-actions {
                grid-template-columns: 1fr;
            }

            .atlas-shell .workspace-main-canvas,
            .atlas-shell .workspace-context-panel,
            .atlas-shell .workspace-preview-panel,
            .atlas-shell #results-container,
            .atlas-shell #table-ux-toolbar,
            .atlas-shell #table-wrapper,
            .atlas-shell #raw-wrapper pre {
                min-width: 0;
                max-width: 100%;
            }

            .atlas-shell .workspace-main-canvas {
                padding: 16px 16px 28px;
            }

            .atlas-shell .workspace-topbar {
                padding: 0 12px;
            }

            .atlas-shell .workspace-topbar-shell {
                flex-wrap: wrap;
                row-gap: 10px;
            }

            .atlas-shell .workspace-topbar-nav {
                order: 3;
                width: 100%;
                overflow-x: auto;
                padding-bottom: 2px;
            }

            .atlas-shell .workspace-mode-tabs {
                width: max-content;
                min-width: max-content;
            }

            .atlas-inline-filter {
                width: 100%;
            }

            .atlas-inline-filter input {
                width: 100%;
            }
        }

        @media (max-width: 640px) {
            .atlas-shell .workspace-config-footer-actions {
                grid-template-columns: 1fr;
            }

            .atlas-shell .workspace-config-footer .workspace-secondary-action,
            .atlas-shell .workspace-config-footer .workspace-primary-action {
                min-height: 40px;
                white-space: normal;
            }

            .atlas-shell .workspace-config-footer .workspace-config-footer-actions .workspace-secondary-action,
            .atlas-shell .workspace-config-footer .workspace-config-footer-actions .workspace-primary-action {
                white-space: nowrap;
            }

            .atlas-shell #table-wrapper {
                margin: 12px 10px 16px;
                border-radius: 8px;
            }

            .atlas-shell #table-wrapper .tabulator,
            .atlas-shell .dashboard-shell .tabulator {
                min-width: 860px;
            }

            .atlas-shell #table-ux-toolbar {
                margin-top: 12px;
                padding: 10px;
            }

            .atlas-shell .results-shell-body {
                padding: 12px 10px 16px;
            }

            .atlas-shell .results-toolbar {
                gap: 6px;
            }

            .atlas-shell .results-toolbar-btn {
                min-height: 30px;
                padding: 0.4rem 0.68rem;
                font-size: 0.72rem;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-header .tabulator-col .tabulator-col-content,
            .atlas-shell .dashboard-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
                padding: 10px 10px !important;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-row .tabulator-cell,
            .atlas-shell .dashboard-shell .tabulator .tabulator-row .tabulator-cell {
                padding: 10px 10px !important;
                font-size: 0.74rem !important;
                line-height: 1.35 !important;
            }

            .atlas-shell .table-row-actions {
                flex-wrap: wrap;
                justify-content: flex-start;
                gap: 0.3rem;
                min-width: 118px;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-cell button,
            .atlas-shell .dashboard-shell .tabulator .tabulator-cell button,
            .atlas-shell .table-row-actions button {
                min-height: 22px;
                padding: 0.08rem 0.45rem;
                font-size: 0.66rem;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-footer,
            .atlas-shell .dashboard-shell .tabulator .tabulator-footer {
                padding: 10px !important;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-paginator,
            .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-paginator {
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: flex-start;
                gap: 6px;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-paginator button,
            .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-paginator button {
                min-width: 0;
                padding-inline: 10px;
            }

            .atlas-shell #table-wrapper .tabulator .tabulator-footer .tabulator-page-size,
            .atlas-shell #table-wrapper .tabulator .tabulator-footer select,
            .atlas-shell .dashboard-shell .tabulator .tabulator-footer .tabulator-page-size,
            .atlas-shell .dashboard-shell .tabulator .tabulator-footer select {
                min-width: 68px;
                width: auto;
            }
        }

        .atlas-shell .workspace-home-card {
            min-height: 188px !important;
            gap: 12px !important;
            padding: 16px 18px !important;
            border-radius: 10px !important;
            border-color: var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) !important;
            background: var(--bg-container) !important;
            justify-content: space-between !important;
        }

        .atlas-shell .workspace-home-card:hover,
        .atlas-shell .workspace-home-card:focus-visible {
            border-color: var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) !important;
            background: color-mix(in srgb, var(--atlas-card-accent, var(--home-link-accent, var(--active-category-accent, var(--text-accent)))) 4%, var(--bg-container)) !important;
        }

        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-icon,
        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-label,
        .atlas-shell .atlas-category-btn:hover .atlas-category-btn-count {
            color: var(--atlas-category-accent, var(--atlas-accent)) !important;
        }

        .atlas-shell .workspace-config-stack .atlas-config-choice-group {
            display: none !important;
        }

        .atlas-shell .workspace-config-stack .atlas-config-llm-group [id$='ProviderSelect'],
        .atlas-shell .workspace-config-stack .atlas-config-llm-group [id$='ModelSelect'] {
            display: block !important;
        }

        .atlas-shell #method-category-section {
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .atlas-shell .workspace-method-discovery,
        .atlas-shell #table-summary-strip {
            display: none !important;
        }

        .light .atlas-shell #methodSelector,
        .light .atlas-shell .workspace-config-stack select:not([multiple]) {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475a72' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
        }
