/* X-Ray panel chrome — store-driven renderer (scribigo-xray-panel.js); sg-satz-* layout. */

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-bible,
#sgBibleToolbarMount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    width: auto;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}

#scribigo-agent-chat:not([data-preview-tab="bible"]) #agentPreviewToolbar .toolbar-group-bible,
#scribigo-agent-chat:not([data-preview-tab="bible"]) #sgBibleToolbarMount {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar > :not(.toolbar-group-bible):not(.toolbar-group-feedback):not(#agentChatFileInput) {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentPreviewToolbar > .toolbar-group-search {
    display: flex !important;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    overflow: visible;
    white-space: normal;
    min-height: calc(var(--sg-z2-h, 32px) + 12px);
    height: auto;
    max-height: none;
    container-type: inline-size;
    container-name: sg-xray-toolbar;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tabs {
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    white-space: nowrap;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress {
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
}

.sg-xray-chrome-progress-count-compact {
    display: none;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-toolbar-actions {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-feedback,
#scribigo-agent-chat[data-preview-tab="bible"] #sgToolbarFeedbackMount {
    flex: 0 0 auto;
    margin-left: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-xray-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tool.is-active {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, white);
    border-color: var(--ast-global-color-0, #046bd2);
    color: var(--ast-global-color-0, #046bd2);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tool.is-active i {
    opacity: 1;
}

#sgBibleToolbarMount .sg-satz-chrome-brand,
#scribigo-agent-chat[data-preview-tab="bible"] .sg-satz-chrome-brand {
    display: none !important;
}

/* Docked bible wizard: hide the chat column unless the user opened Chat. */
#scribigo-agent-chat:not(.scribigo-agent--float)[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) .scribigo-agent-chat-area.is-collapsed,
#scribigo-agent-chat:not(.scribigo-agent--float)[data-preview-tab="bible"][data-xray-step="build"] .scribigo-agent-chat-area.is-collapsed,
#scribigo-agent-chat[data-preview-tab="bible"] .scribigo-agent-findings-area,
#scribigo-agent-chat[data-preview-tab="bible"] #sgXrayFindingsToggle,
#scribigo-agent-chat[data-preview-tab="bible"] #agentPanelBtn {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) .scribigo-agent-preview-area,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] .scribigo-agent-preview-area,
#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentBiblePanel,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentBiblePanel {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
}

#agentXrayWorkflowHost.sg-xray-workflow {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 24px 16px;
    background-color: var(--sg-satz-canvas, var(--sg-cream, #F6F1E8));
    background-image: var(--sg-app-hero-bg-image, var(--sg-hero-bg-image));
    background-size: var(--sg-hero-bg-size, 96px 96px);
    background-repeat: repeat;
    background-position: top left;
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
}

/* Quote/confirm: freeze host scroll so absolute overlay covers the full visible host. */
#agentXrayWorkflowHost.sg-xray-workflow.is-quoting {
    overflow: hidden !important;
}

#agentXrayWorkflowHost.sg-xray-workflow[hidden] {
    display: none !important;
}

#agentXrayWorkflowHost .sg-satz-tab-panel {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Prep/info/analyses: host is the single scroll container (overview + CTA + details). */
#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentXrayWorkflowHost.sg-xray-workflow,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="analyses"] #agentXrayWorkflowHost.sg-xray-workflow {
    overflow-x: hidden;
    overflow-y: auto;
}

#agentXrayWorkflowHost .sg-satz-tab-panel.is-active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentXrayWorkflowHost .sg-satz-tab-panel.is-active,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="analyses"] #agentXrayWorkflowHost .sg-satz-tab-panel.is-active {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
}

#agentXrayWorkflowHost .sg-xray-status-overview,
#agentXrayWorkflowHost .sg-xray-primary-action,
#agentXrayWorkflowHost .sg-xray-type-picker {
    flex: 0 0 auto;
}

/* Match Buchsatz CTAs: button.ast-button#satz-specimen-stale-refresh (≈145×36). */
#agentXrayWorkflowHost .ast-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    gap: 0.35rem;
    min-height: 36px;
    height: 36px;
    padding: 0.55rem 1rem;
    border-radius: var(--sg-chrome-radius-sm, 6px);
    font-size: 0.88rem;
    font-weight: 500;
    font-synthesis: none;
    letter-spacing: normal;
    line-height: 1.2;
    cursor: pointer;
    background: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    border: 1px solid var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    color: #fff;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
}

#agentXrayWorkflowHost .ast-button:hover:not(:disabled) {
    filter: brightness(0.95);
}

#agentXrayWorkflowHost .ast-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#agentXrayWorkflowHost .ast-button.ast-outline {
    background: var(--sg-chrome-card, #fff);
    border: 1px solid var(--sg-chrome-hairline, color-mix(in srgb, var(--ast-global-color-0, #046bd2) 16%, var(--ast-global-color-5, #f9f4ee)));
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #2c3f42));
    font-weight: 500;
    filter: none;
}

#agentXrayWorkflowHost .ast-button.ast-outline:hover:not(:disabled) {
    border-color: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    color: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    filter: none;
    background: color-mix(in srgb, var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2)) 8%, #fff);
}

#agentXrayWorkflowHost .sg-satz-source-action .ast-button {
    width: 100%;
    max-width: 16.5rem;
    min-height: 36px;
    height: 36px;
    margin: 0;
}

#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentBibleContent,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="analyses"] #agentBibleContent,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost.is-build-status ~ #agentBibleContent,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost.is-status-loading ~ #agentBibleContent,
#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentXrayWorkflowHost.is-status-loading ~ #agentBibleContent,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="analyses"] #agentXrayWorkflowHost.is-status-loading ~ #agentBibleContent {
    display: none !important;
}

/* 01 Vorbereitung (internal build): pipeline progress only — never the kartei / empty / marketing shell. */
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentBibleContent > .scribigo-bible-view,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentBibleContent > .scribigo-bible-empty-state {
    display: none !important;
}

/* 02 Nachschlagewerk: kartei only — never 01 progress / empty / marketing. */
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentBibleContent > .scribigo-bible-build-progress,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentBibleContent > .scribigo-bible-empty-state {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost:not(.is-outdated):not(.is-build-status):not(.is-status-loading) {
    display: none !important;
}

/* 02 Nachschlagewerk: kartei owns the column — prep host never competes for height/width. */
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentXrayWorkflowHost,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentXrayWorkflowHost.is-outdated,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentXrayWorkflowHost.is-status-loading,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentXrayWorkflowHost.is-kartei-wait {
    display: none !important;
    flex: 0 0 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentBibleContent {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentBibleContent > .scribigo-bible-view,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="kartei"] #agentBibleContent > .sbv-content {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentXrayWorkflowHost,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="analyses"] #agentXrayWorkflowHost {
    display: flex !important;
    flex-direction: column;
}

#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost.is-outdated,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost.is-build-status,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost.is-status-loading,
#scribigo-agent-chat[data-preview-tab="bible"]:is([data-xray-step="prep"], [data-xray-step="info"]) #agentXrayWorkflowHost.is-status-loading,
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="analyses"] #agentXrayWorkflowHost.is-status-loading {
    display: block !important;
}

/* Build-step outdated hint: compact chrome only (kartei never shows the prep host). */
#scribigo-agent-chat[data-preview-tab="bible"][data-xray-step="build"] #agentXrayWorkflowHost.is-outdated {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    overflow: visible;
    padding: 8px 0 12px;
    background: transparent;
}

#agentXrayWorkflowHost .sg-xray-obligation-pane {
    margin: 0;
    padding: 0;
}

#agentXrayWorkflowHost .sg-xray-update-hint {
    position: relative;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 0 0 12px;
    padding: 12px 16px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    box-shadow: var(--sg-satz-card-shadow, none);
    pointer-events: auto;
}

#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__body {
    margin: 0;
    flex: 1 1 16rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #2c3f42));
}

#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta,
#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta:hover,
#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta:focus,
#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta:focus-visible,
#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta:active {
    flex: 0 0 auto;
    align-self: center;
    height: auto;
    min-height: 36px;
    color: #fff !important;
    background: var(--ast-global-color-0, #046bd2);
}

#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta:hover:not(:disabled),
#agentXrayWorkflowHost .sg-xray-update-hint .sg-findings-update-hint__cta:focus-visible:not(:disabled) {
    background: var(--ast-global-color-8, #035aa8);
    color: #fff !important;
    filter: none;
}

#agentXrayWorkflowHost .sg-xray-intro {
    margin: 0 0 16px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
}

#agentXrayWorkflowHost .sg-xray-intro.is-loading {
    opacity: 0.92;
}

#agentXrayWorkflowHost .sg-xray-intro .sg-satz-page-head {
    margin: 0;
}

#agentXrayWorkflowHost .sg-xray-intro .sg-satz-page-lead {
    max-width: 42rem;
}

#agentXrayWorkflowHost .sg-xray-status-loading-body,
#agentXrayWorkflowHost .sg-panel-loading.sg-xray-status-loading-body {
    min-height: 200px;
    padding: 8px 0 24px;
    background: transparent;
}

.sg-xray-load-progress,
#agentXrayWorkflowHost .sg-xray-load-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    text-align: center;
}

.sg-xray-load-progress--compact {
    max-width: 22rem;
    gap: 8px;
}

.sg-xray-load-progress-cta {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.sg-xray-load-progress-hint {
    margin: 0;
}

.sg-xray-load-bar {
    position: relative;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 99px;
    background: color-mix(in srgb, var(--sg-chrome-primary, #046bd2) 14%, var(--sg-satz-surface, #fff));
}

.sg-xray-load-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    border-radius: 99px;
    background: var(--sg-chrome-primary, #046bd2);
    animation: sg-xray-load-indet 1.15s ease-in-out infinite;
}

@keyframes sg-xray-load-indet {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

#sgOverviewOrderProgress.is-store-loading {
    display: block;
}

#sgOverviewOrderProgress.is-store-loading .sg-overview__order-progress-bar {
    width: 40% !important;
    animation: sg-xray-load-indet 1.15s ease-in-out infinite;
}

#sgCommandCardDialogBody .sg-xray-load-progress {
    padding: 24px 16px;
}

.sg-xray-urgent {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #b42318 28%, #fff);
    border-radius: var(--sg-chrome-radius-sm, 8px);
    background: color-mix(in srgb, #b42318 8%, #fff);
}

.sg-xray-urgent h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #8a1c13;
}

.sg-xray-urgent p {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.sg-xray-urgent--type {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sg-xray-type-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sg-xray-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.sg-xray-chip-caption {
    margin: 8px 0 0;
    font-size: 0.78rem;
}

.sg-xray-chip {
    appearance: none;
    border: 1px solid var(--sg-satz-border, color-mix(in srgb, var(--sg-satz-text, #2c3f42) 28%, #fff));
    border-radius: 999px;
    padding: 4px 10px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    color: var(--sg-satz-text, inherit);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
}

.sg-xray-chip.is-active {
    background: var(--sg-satz-tint-strong, color-mix(in srgb, var(--sg-satz-primary, #046bd2) 12%, #fff));
    border-color: color-mix(in srgb, var(--sg-satz-primary, #046bd2) 35%, var(--sg-satz-surface, #fff));
}

.sg-xray-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sg-xray-chip--included {
    cursor: default;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, #fff);
}

.sg-xray-chip--report {
    font-style: italic;
}

.sg-xray-type-error {
    margin: 0;
    width: 100%;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #8a1f11;
}

.sg-xray-analyses-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sg-xray-row-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sg-xray-row-check {
    flex-shrink: 0;
    margin-top: 0.2em;
    color: #15803d;
    font-size: 0.85rem;
}

.sg-xray-state {
    margin: 0 0 2px;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--ast-global-color-3, #646970);
}

.sg-xray-state--done,
.sg-xray-state--ready {
    color: #15803d;
}

.sg-xray-state--running,
.sg-xray-state--queued {
    color: #a16207;
}

.sg-xray-state--stale {
    color: #b45309;
}

.sg-xray-state--locked {
    color: #64748b;
}

.sg-satz-task-row.is-locked {
    opacity: 0.72;
}

.sg-satz-task-row.is-locked .sg-satz-source-action-button,
.sg-satz-task-row.is-locked .sg-satz-source-action-button .ast-button {
    pointer-events: auto;
}

.sg-satz-task-row.is-state-running .sg-satz-source-action-title,
.sg-satz-task-row.is-state-queued .sg-satz-source-action-title {
    font-weight: 650;
}

.sg-xray-analyses-list {
    margin: 10px 0 0;
    padding: 16px 20px 18px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
    text-align: left;
}

.sg-xray-list-title {
    margin: 0 0 2px;
    font-size: 0.9rem;
    text-align: left;
}

.sg-xray-analyses-list > .scribigo-satz-hint {
    margin: 0 0 10px;
    text-align: left;
}

.sg-xray-analyses-list-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    align-items: stretch;
    margin-top: 0;
    text-align: left;
}

.sg-xray-analysis-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
    text-align: left;
}

.sg-xray-analysis-tile.is-locked {
    opacity: 0.72;
}

.sg-xray-tile-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    min-width: 0;
    text-align: left;
}

.sg-xray-tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.sg-xray-tile-title {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0;
    min-width: 0;
    color: var(--sg-satz-text, #2c3f42);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
}

.sg-xray-tile-label {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-language: de;
    -webkit-locale: "de-DE";
}

#agentXrayWorkflowHost button.sg-xray-tile-info,
.sg-xray-tile-info {
    appearance: none;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0, #046bd2) 28%, #fff);
    border-radius: 999px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, #fff);
    color: var(--ast-global-color-0, #046bd2);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
    cursor: pointer;
}

.sg-xray-tile-info:hover,
.sg-xray-tile-info:focus-visible {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 16%, #fff);
    border-color: var(--ast-global-color-0, #046bd2);
}

.sg-xray-analysis-tile.is-hint-open .sg-xray-tile-info {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 16%, #fff);
    border-color: var(--ast-global-color-0, #046bd2);
}

.sg-xray-tile-hint-layer {
    position: fixed;
    z-index: 10050;
    box-sizing: border-box;
    max-width: min(320px, calc(100vw - 24px));
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: 8px;
    background: #fff;
    color: var(--sg-satz-text, #2c3f42);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--sg-satz-text, #2c3f42) 16%, transparent);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
}

.sg-xray-tile-hint-layer[hidden] {
    display: none !important;
}

.sg-xray-tile-action {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    width: 100%;
}

#agentXrayWorkflowHost .sg-xray-analysis-tile .ast-button {
    width: auto;
    max-width: none;
    min-width: 0;
}

#agentXrayWorkflowHost .sg-xray-analyses,
#agentXrayWorkflowHost .sg-xray-analyses-card,
#agentXrayWorkflowHost .sg-xray-analyses-card .sg-satz-task-row {
    text-align: left;
}

#agentXrayWorkflowHost .sg-xray-analyses-card .sg-satz-task-row {
    padding: 10px 12px;
    gap: 10px;
}

.sg-xray-more-options {
    margin: 2px 0 0;
    padding: 12px 16px 14px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
}

.sg-xray-more-options > summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    list-style: none;
}

.sg-xray-more-options > summary::-webkit-details-marker {
    display: none;
}

.sg-xray-more-options-title {
    margin: 10px 0 0;
    font-size: 0.82rem;
    font-weight: 600;
}

.sg-xray-summary-refresh {
    display: flex;
    justify-content: flex-start;
}

.sg-xray-cta-hint {
    margin-top: 6px;
}

.sg-xray-analysis-tile .sg-xray-cta-hint {
    margin-top: 2px;
    font-size: 0.75rem;
    line-height: 1.35;
}

.sg-xray-chapters .scribigo-satz-heading,
#agentXrayWorkflowHost .sg-xray-chapters .scribigo-satz-heading.sg-satz-heading-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    padding: 8px 4px;
    box-sizing: border-box;
}

.sg-xray-chapters .scribigo-satz-heading.is-off {
    opacity: 0.55;
}

.sg-xray-chapters .scribigo-satz-heading-main,
.sg-xray-chapters .scribigo-satz-heading-title {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-xray-chapters .sg-xray-chapter-meta {
    flex-shrink: 0;
    min-width: 0;
    font-size: 0.75rem;
    color: var(--ast-global-color-3, #646970);
    white-space: nowrap;
}

.sg-xray-outdated-story {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #b45309 28%, #fff);
    border-radius: var(--sg-chrome-radius-sm, 8px);
    background: color-mix(in srgb, #b45309 8%, #fff);
}

.sg-xray-outdated-story--page {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.sg-xray-outdated-story-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #8a1c13;
}

.sg-xray-outdated-action-lead {
    margin: 0 0 8px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.sg-xray-outdated-story .ast-button {
    margin: 0 0 8px;
}

.sg-xray-outdated-chapters-label {
    margin: 4px 0 6px;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ast-global-color-3, #646970);
}

.sg-xray-outdated-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sg-xray-outdated-row {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid color-mix(in srgb, #b45309 18%, #fff);
    border-radius: 999px;
    background: color-mix(in srgb, #b45309 6%, #fff);
    font-size: 0.8rem;
    line-height: 1.35;
}

#agentBiblePanel .admin-xray-metrics-links,
#agentXrayWorkflowHost .admin-xray-metrics-links,
#agentBibleContent .admin-xray-metrics-links {
    display: none !important;
}

#agentXrayWorkflowHost .sg-satz-expert-card.sg-satz-activity-card {
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
}

#agentXrayWorkflowHost .sg-satz-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 2.1rem;
    align-self: center;
    width: 2.1rem;
    height: 1.2rem;
    max-width: 2.1rem;
    max-height: 1.2rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

#agentXrayWorkflowHost .sg-satz-switch input,
#agentXrayWorkflowHost .sg-satz-switch input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    box-sizing: border-box;
    width: 2.1rem;
    height: 1.2rem;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
}

@media (max-width: 720px) {
    #agentXrayWorkflowHost.sg-xray-workflow {
        padding: 12px 12px 8px;
    }
}

#agentBiblePanel #sgXrayWizardNav {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    flex: 0 0 0 !important;
    pointer-events: none !important;
}

/* Single-row X-Ray chrome. Match Buchsatz density, but never wrap (tablet toolbar is often
   ~868px while the viewport is still >900px — use container + viewport queries). */
@container sg-xray-toolbar (max-width: 1024px) {
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-label,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab-label,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-toolbar-actions .sg-satz-tab-label,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-count {
        display: none;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-chrome-progress-count-compact {
        display: block;
        font-size: 0.8rem;
        font-weight: 650;
        white-space: nowrap;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab {
        padding: 0.35rem 0.5rem;
        gap: 0;
        width: auto;
        min-width: 0;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tabs,
    #scribigo-agent-chat[data-preview-tab="bible"] #sgBibleToolbarMount {
        flex-wrap: nowrap;
        gap: 4px;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-track {
        width: 4rem;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-toolbar-actions .sg-satz-tool {
        padding: 0;
        width: var(--sg-z2-h, 32px);
        min-width: var(--sg-z2-h, 32px);
        gap: 0;
    }
}

@container sg-xray-toolbar (max-width: 767px) {
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-copy,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-chrome-progress-count-compact {
        display: none;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab {
        padding: 0.28rem 0.4rem;
        min-width: 1.7rem;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-track {
        width: 2.75rem;
        height: 4px;
    }
}

@media (max-width: 1024px) {
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-label,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab-label,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-toolbar-actions .sg-satz-tab-label,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-count {
        display: none;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-chrome-progress-count-compact {
        display: block;
        font-size: 0.8rem;
        font-weight: 650;
        white-space: nowrap;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tab {
        width: auto;
        min-width: 0;
        padding: 0.35rem 0.5rem;
        gap: 0;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tabs,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tabs,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-bible,
    #scribigo-agent-chat[data-preview-tab="bible"] #sgBibleToolbarMount {
        flex-wrap: nowrap;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-track {
        width: 4rem;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-toolbar-actions .sg-satz-tool {
        padding: 0;
        width: var(--sg-z2-h, 32px);
        min-width: var(--sg-z2-h, 32px);
        gap: 0;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-feedback,
    #scribigo-agent-chat[data-preview-tab="bible"] #sgToolbarFeedbackMount {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar {
        min-height: calc(var(--sg-z2-h, 32px) + 12px);
        height: auto;
        max-height: none;
        padding: 6px 8px;
        gap: 6px;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-copy,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-xray-chrome-progress-count-compact {
        display: none;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab,
    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tab {
        width: auto;
        min-width: 1.7rem;
        padding: 0.28rem 0.4rem;
        gap: 0;
    }

    #scribigo-agent-chat[data-preview-tab="bible"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-track {
        width: 2.75rem;
        height: 4px;
    }
}

#agentXrayWorkflowHost .sg-xray-status-overview,
.sg-xray-status-overview {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
    visibility: visible;
    min-height: 3rem;
    height: auto;
    opacity: 1;
}

#agentXrayWorkflowHost .sg-xray-status-overview[hidden] {
    display: flex !important;
}

.sg-xray-obligation-banner {
    display: none !important;
}

.sg-xray-obligation-label {
    font-size: 1.05rem;
    font-weight: 700;
}

.sg-xray-obligation-message {
    font-size: 0.95rem;
    line-height: 1.45;
}

.sg-xray-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
}

.sg-xray-status-label {
    font-weight: 650;
    min-width: 9rem;
}

#agentXrayWorkflowHost .sg-xray-primary-action {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 24px;
    min-height: 4.75rem;
}

#agentXrayWorkflowHost .sg-xray-primary-action > .ast-button {
    flex: 0 1 auto;
}

#agentXrayWorkflowHost .sg-xray-primary-action > .scribigo-satz-hint {
    flex: 1 1 100%;
    margin: 0;
}

/*
 * Quote/confirm progress: opaque covering overlay on #agentXrayWorkflowHost
 * (above overview, CTA, details). Not is-status-loading — layout stays flex.
 */
#agentXrayWorkflowHost > .sg-xray-quote-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px 20px;
    margin: 0;
    border-radius: 0;
    pointer-events: auto;
    /* Solid canvas — no see-through of overview/CTA/details underneath. */
    background-color: var(--sg-satz-canvas, var(--sg-cream, #F6F1E8));
    background-image: var(--sg-app-hero-bg-image, var(--sg-hero-bg-image));
    background-size: var(--sg-hero-bg-size, 96px 96px);
    background-repeat: repeat;
    background-position: top left;
}

#agentXrayWorkflowHost:not(.is-quoting) > .sg-xray-quote-overlay {
    display: none !important;
    pointer-events: none;
}

#agentXrayWorkflowHost .sg-xray-quote-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 22rem;
    text-align: center;
}

#agentXrayWorkflowHost .sg-xray-quote-overlay .sg-panel-loading__spinner {
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
}

#agentXrayWorkflowHost .sg-xray-quote-overlay .sg-xray-load-bar {
    width: min(100%, 14rem);
}

.sg-xray-primary-btn {
    min-height: 48px;
    height: auto;
    padding: 12px 22px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

body.xray-shop #agentXrayWorkflowHost .sg-xray-primary-btn {
    background: var(--wine, var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2))) !important;
    border-color: var(--gold, var(--wine, var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2)))) !important;
    color: #fff !important;
}

.sg-xray-secondary-btn {
    min-height: 40px;
    padding: 10px 18px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    background: transparent !important;
    color: var(--sg-chrome-primary-fg, #2c3f42) !important;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0) !important;
    box-shadow: none !important;
}

.sg-xray-tertiary-btn {
    min-height: 36px;
    padding: 8px 14px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    background: transparent !important;
    color: var(--sg-chrome-muted, #6b7280) !important;
    border: 1px dashed var(--sg-chrome-hairline, #e6ddd0) !important;
    box-shadow: none !important;
}

.sg-xray-details-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.sg-xray-details-region {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 16px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
    flex: 0 0 auto;
}

#agentXrayWorkflowHost .sg-xray-details-region[open] {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.sg-xray-details-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--sg-satz-text, #2c3f42);
}

.sg-xray-details-summary::-webkit-details-marker {
    display: none;
}

.sg-xray-details-summary::before {
    content: '';
    width: 0.45em;
    height: 0.45em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

.sg-xray-details-region[open] > .sg-xray-details-summary::before {
    transform: rotate(45deg);
}

.sg-xray-prep-details {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px 16px;
    box-sizing: border-box;
}

/* Prep details: no nested scrollbar — host scrolls overview + CTA + details. */
#agentXrayWorkflowHost .sg-xray-details-region[open] > .sg-xray-prep-details {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.sg-xray-prep-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.sg-xray-details-col {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sg-xray-details-col--toc,
#agentXrayWorkflowHost .sg-xray-chapters.sg-satz-expert-card {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

#agentXrayWorkflowHost .sg-xray-chapters.sg-satz-expert-card {
    box-sizing: border-box;
}

#agentXrayWorkflowHost .sg-xray-chapters .scribigo-satz-headings {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    max-height: none;
}

#agentXrayWorkflowHost .sg-xray-details-col--analyses {
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
    max-height: none;
}

.sg-xray-details-col-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.sg-xray-check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
    cursor: pointer;
    pointer-events: auto;
}

.sg-xray-check-row.is-inactive {
    opacity: 0.55;
    cursor: default;
}

.sg-xray-check-row input {
    margin-top: 0.2em;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    pointer-events: auto;
    cursor: pointer;
}

.sg-xray-check-row--summary {
    font-weight: 650;
}

.sg-xray-check-status {
    margin-left: auto;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1.6;
    white-space: nowrap;
    color: #475569;
    background: #f1f5f9;
}

.sg-xray-check-status:empty {
    display: none;
}

.sg-xray-check-status--current {
    color: #166534;
    background: #dcfce7;
}

.sg-xray-check-status--stale,
.sg-xray-check-status--failed,
.sg-xray-check-status--too_short {
    color: #9a3412;
    background: #ffedd5;
}

.sg-xray-run-error {
    margin: 0 0 8px;
}

.sg-xray-check-status--running {
    color: #1e40af;
    background: #dbeafe;
}

.sg-xray-pack-master {
    padding: 8px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, #fff);
}

#agentXrayWorkflowHost .sg-satz-switch.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    .sg-xray-prep-details-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.sg-xray-hidden-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    font-weight: 600;
}

.sg-xray-hidden-option-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sg-xray-gesamt {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--sg-satz-surface, var(--sg-chrome-card, #fff));
    border: 1px solid color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, var(--sg-satz-surface, #fff));
    box-shadow: var(--sg-satz-card-shadow, none);
}

.sg-xray-gesamt-copy,
.sg-xray-step-progress-copy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.sg-xray-abort-btn {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 650;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, #b42318 35%, #fff);
    background: color-mix(in srgb, #b42318 8%, #fff);
    color: #b42318;
    cursor: pointer;
}

.sg-xray-abort-btn:hover:not(:disabled) {
    background: color-mix(in srgb, #b42318 16%, #fff);
}

.sg-xray-abort-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.sg-xray-primary-btn.sg-xray-abort-btn {
    border-color: color-mix(in srgb, #b42318 45%, #fff);
    background: #b42318;
    color: #fff;
}

.sg-xray-gesamt-label {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.sg-xray-gesamt-pct,
.sg-satz-chrome-progress-count {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.sg-xray-gesamt-track,
.sg-xray-step-progress-track {
    height: 8px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, #eef1f4);
    overflow: hidden;
}

.sg-xray-gesamt-bar,
.sg-xray-step-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--ast-global-color-0, #046bd2);
    transition: width 0.35s ease-out;
}

.sg-xray-gesamt-eta {
    margin: 2px 0 0;
    font-size: 0.82rem;
    font-weight: 550;
    color: color-mix(in srgb, var(--sg-satz-text, #2c3f42) 72%, #fff);
}

.sg-xray-step-progress-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sg-xray-step-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sg-xray-step-progress-label {
    font-size: 0.86rem;
}

.sg-xray-step-progress-pct {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: #4b5563;
}

.sg-xray-step-progress.is-pending {
    opacity: 0.55;
}

.sg-xray-step-progress.is-current .sg-xray-step-progress-label {
    font-weight: 650;
}

.sg-xray-step-progress.is-done .sg-xray-step-progress-bar {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 70%, #22c55e);
}

.sg-xray-step-progress.is-failed .sg-xray-step-progress-bar {
    background: #b91c1c;
}

.sg-xray-step-progress.is-failed .sg-xray-step-progress-pct {
    color: #b91c1c;
}

.sg-xray-step-progress.is-skipped .sg-xray-step-progress-bar {
    background: color-mix(in srgb, #9ca3af 55%, var(--ast-global-color-0, #046bd2));
}

.sg-xray-row-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.sg-xray-row-progress-pct,
.task-plan-item-progress-pct {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: #4b5563;
}

.sg-xray-row-progress-track,
.task-plan-item-progress-track {
    height: 6px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, #eef1f4);
    overflow: hidden;
}

.sg-xray-row-progress-bar,
.task-plan-item-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--ast-global-color-0, #046bd2);
    transition: width 0.35s ease-out;
}

#agentBibleBuildProgressBar {
    transition: width 0.35s ease-out;
}


/* R57: Manuskript-Typ-Umschalter bricht mobil um statt rechts rauszulaufen */
.sg-xray-urgent--type,
#agentXrayWorkflowHost .sg-xray-urgent--type {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.sg-xray-type-picker,
#agentXrayWorkflowHost .sg-xray-type-picker {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}
.sg-xray-type-picker > .scribigo-satz-hint,
.sg-xray-type-picker > .sg-xray-type-error {
    flex: 1 1 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
.sg-xray-chip {
    max-width: 100%;
    white-space: normal;
}
.sg-xray-urgent--type > .sg-xray-type-picker {
    flex: 1 1 100%;
}
.scribigo-bible-empty-state .scribigo-lt-baseline-prompt__btn,
.scribigo-bible-empty-state .sbv-build-progress-inner {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
}
