/* Agent Satz — chrome-app tokens (mirror Audio; beat Astra white button text) */
#agentSatzContent,
.scribigo-satz-root,
.scribigo-satz-panel--chrome,
.scribigo-satz-panel {
    --sg-satz-primary: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    --sg-satz-text: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #2c3f42));
    --sg-satz-muted: var(--ast-global-color-3, #646970);
    --sg-satz-surface: var(--sg-chrome-card, #fff);
    /* Same muted canvas as chrome rail / sidebar (teal-tinted color-5). */
    --sg-satz-canvas: var(--sg-sidebar-accent, color-mix(in srgb, var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2)) 10%, var(--ast-global-color-5, #f9f4ee)));
    /* Ink-mixed border: Astra hairline (primary@16% on white) is ~1.1:1 — too faint for cards/chips.
       ~28% ink ≈ mid gray-blue that stays on-brand while clearing ~2.5–3:1 vs white. */
    --sg-satz-border: color-mix(in srgb, var(--sg-satz-text) 28%, var(--sg-satz-surface));
    --sg-satz-tint: color-mix(in srgb, var(--sg-satz-primary) 6%, var(--sg-satz-surface));
    --sg-satz-tint-strong: color-mix(in srgb, var(--sg-satz-primary) 12%, var(--sg-satz-surface));
    /* Very light ink lift off the shaded canvas — not Material elevation. */
    --sg-satz-card-shadow: 0 1px 2px color-mix(in srgb, var(--sg-satz-text) 8%, transparent),
        0 4px 12px color-mix(in srgb, var(--sg-satz-text) 5%, transparent);
}

#agentSatzContent,
.scribigo-satz-root {
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    /* clip (not hidden): hidden still creates a scrollport; focus on abspos
       switch inputs was scrolling this box and jumping chrome to top=-576. */
    overflow: hidden;
    overflow: clip;
    overflow-anchor: none;
    padding-bottom: 0;
}

#agentSatzContent {
    display: flex;
    flex-direction: column;
    background: var(--sg-satz-canvas, var(--ast-global-color-5, #f9f4ee));
}

.scribigo-satz-panel--chrome,
.scribigo-satz-panel {
    --sg-satz-pad-x: 24px;
    --sg-satz-pad-y: 8px;
    /* Footer stays full-bleed; Back/Next inset to clear site overlays. */
    --sg-satz-footer-safe-left: 16px;
    --sg-satz-footer-safe-right: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--sg-satz-pad-y) var(--sg-satz-pad-x) 0;
    background: var(--sg-satz-canvas, var(--sg-sidebar-accent, var(--ast-global-color-5, #f9f4ee)));
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
    font: 14px/1.45 system-ui, sans-serif;
}

#agentSatzContent .scribigo-satz-panel--chrome {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.scribigo-satz-empty.preview-placeholder,
#agentSatzContent .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 280px;
    padding: 48px 24px;
    text-align: center;
    color: #6e7781;
}

#agentSatzContent .preview-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
}

#agentSatzContent .preview-placeholder p {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: var(--sg-chrome-primary-fg, #2c3f42);
}

.scribigo-satz-sub {
    margin: 16px 0 6px;
    font-size: 1rem;
}

.scribigo-satz-expert > .scribigo-satz-sub:first-child,
.sg-satz-export-card > .scribigo-satz-sub:first-child,
.sg-satz-export-card-head .scribigo-satz-sub {
    margin-top: 0;
}

.scribigo-satz-lead,
.scribigo-satz-hint {
    margin: 0 0 12px;
    color: var(--ast-global-color-3, #656d76);
    font-size: 13px;
}

.scribigo-satz-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin-bottom: 4px;
}

.scribigo-satz-field span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.scribigo-satz-field--wide {
    grid-column: 1 / -1;
}

.scribigo-satz-input--impressum {
    min-height: 10.5em;
    line-height: 1.35;
    resize: vertical;
}

.sg-satz-impressum-block {
    margin: 12px 0 16px;
}

.sg-satz-impressum-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.sg-satz-impressum-label {
    font-size: 12px;
    font-weight: 600;
}

.sg-satz-cover-field {
    margin: 8px 0 16px;
}

.sg-satz-cover-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.sg-satz-cover-preview img {
    width: 72px;
    height: 112px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--sg-chrome-hairline, #d8cfc2);
    background: #f4efe6;
}

.sg-satz-cover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scribigo-satz-input,
.scribigo-satz-select {
    box-sizing: border-box;
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--sg-chrome-hairline, #d8cfc2);
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

#agentSatzContent .scribigo-satz-panel .ast-button,
.scribigo-satz-panel .ast-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    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;
}

.scribigo-satz-panel .ast-button:hover:not(:disabled) {
    filter: brightness(0.95);
}

.scribigo-satz-panel .ast-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#agentSatzContent .scribigo-satz-panel .ast-button.ast-outline,
.scribigo-satz-panel .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;
    font-synthesis: none;
    letter-spacing: normal;
}

.scribigo-satz-panel .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);
}

.sg-satz-header {
    margin: 0 0 8px;
}

.sg-satz-header[hidden] {
    display: none !important;
}

.sg-satz-wizard-nav,
#agentSatzContent #sgSatzWizardNav.sg-satz-chrome-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    box-sizing: border-box;
    width: calc(100% + (2 * var(--sg-satz-pad-x, 24px)));
    max-width: none;
    flex: 0 0 auto;
    margin: 0 calc(-1 * var(--sg-satz-pad-x, 24px)) 0;
    padding: 12px 0;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--sg-satz-text, #2c3f42) 8%, var(--sg-satz-canvas, var(--ast-global-color-5, #f9f4ee)));
    position: relative;
    z-index: 3;
}

.sg-satz-wizard-nav[hidden] {
    display: none !important;
}

#sgSatzWizardBack {
    grid-column: 1;
    justify-self: start;
    margin-left: max(var(--sg-satz-pad-x, 24px), var(--sg-satz-footer-safe-left, 72px));
    margin-right: 0;
}

.sg-satz-footer-end {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    justify-self: end;
    min-width: 0;
    margin-left: 0;
    margin-right: max(var(--sg-satz-pad-x, 24px), var(--sg-satz-footer-safe-right, 80px));
}

#sgSatzWizardNext,
#sgSatzWizardOverview {
    margin-left: 0;
}

.sg-satz-footer-links {
    display: none;
    grid-column: 2;
    align-items: center;
    justify-content: center;
    gap: 18px;
    justify-self: center;
    min-width: 0;
}

@media (min-width: 760px) {
    .sg-satz-footer-links {
        display: flex;
    }
}

#agentSatzContent #sgSatzWizardNav.is-footer-wrap.sg-satz-chrome-footer,
#sgSatzWizardNav.is-footer-wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 10px max(16px, var(--sg-satz-footer-safe-right, 16px)) 12px max(16px, var(--sg-satz-footer-safe-left, 16px));
}

#agentSatzContent #sgSatzWizardNav.is-footer-wrap #sgSatzWizardBack,
#sgSatzWizardNav.is-footer-wrap #sgSatzWizardBack {
    grid-column: 1;
    grid-row: 1;
    margin-left: 0;
    justify-self: start;
}

#agentSatzContent #sgSatzWizardNav.is-footer-wrap .sg-satz-footer-end,
#sgSatzWizardNav.is-footer-wrap .sg-satz-footer-end {
    grid-column: 2;
    grid-row: 1;
    margin-right: 0;
    justify-self: end;
}

#agentSatzContent #sgSatzWizardNav.is-footer-wrap .sg-satz-footer-links,
#sgSatzWizardNav.is-footer-wrap .sg-satz-footer-links {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
}

.sg-satz-footer-link,
.sg-satz-chrome-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 2px 0;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.sg-satz-footer-link:hover,
.sg-satz-chrome-link:hover {
    color: color-mix(in srgb, var(--sg-chrome-primary, #046bd2) 82%, #000);
}

#sgSatzWizardBack[hidden],
#sgSatzWizardNext[hidden] {
    display: none !important;
}

.sg-satz-wizard-title {
    grid-column: 2;
    margin: 0;
    text-align: center;
    line-height: 1.25;
    pointer-events: none;
}

.sg-satz-template-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: 8px 0 16px;
}

.sg-satz-layout-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
}

.sg-satz-layout-label {
    font-size: 12px;
    font-weight: 600;
}

.sg-satz-template-name {
    width: 200px;
}

.sg-satz-tab-panels {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overflow-anchor: none;
    overscroll-behavior: contain;
    padding-bottom: 16px;
}

.sg-satz-tab-panel {
    padding-bottom: 8px;
}

/* Expert Buchdaten / Layout: boxed cards like Audio panels + X-Ray chrome. */
.sg-satz-tab-panel[data-satz-pane="buch"],
.sg-satz-tab-panel[data-satz-pane="layout"] {
    padding: 0 0 12px;
    background: transparent;
    border-radius: 12px;
}

.sg-satz-expert-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sg-satz-tab-panel[data-satz-pane="layout"] .sg-satz-expert-stack {
    margin-top: 0;
}

.sg-satz-expert-card {
    margin: 0;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text) 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-satz-expert-card > .scribigo-satz-sub,
.sg-satz-expert-card-title,
.sg-satz-expert-card .sg-satz-source-actions-title {
    margin: 0 0 8px;
    color: var(--sg-satz-text, #2c3f42);
    font-size: 1.08rem;
    font-weight: 680;
    line-height: 1.3;
}

.sg-satz-expert-card-head {
    position: relative;
    display: block;
    margin: 0 0 8px;
    padding-right: 1.6rem;
    min-height: 1.4em;
}

.sg-satz-expert-card-head > .scribigo-satz-sub,
.sg-satz-expert-card-head > .sg-satz-expert-card-title {
    margin: 0;
}

.sg-satz-card-busy {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    transform: translateY(-50%);
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    font-size: 0.92rem;
    line-height: 1;
    pointer-events: none;
}

.sg-satz-card-busy[hidden] {
    display: none;
}

.sg-satz-expert-card > .sg-satz-section-lead,
.sg-satz-expert-card > .scribigo-satz-hint.sg-satz-section-lead {
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.sg-satz-expert-card .scribigo-satz-grid {
    margin: 4px 0 0;
}

.sg-satz-tab-panel[data-satz-pane="buch"] .scribigo-satz-field,
.sg-satz-tab-panel[data-satz-pane="layout"] .scribigo-satz-field {
    gap: 8px;
    margin-bottom: 6px;
}

.sg-satz-tab-panel[data-satz-pane="buch"] .scribigo-satz-field > span,
.sg-satz-tab-panel[data-satz-pane="layout"] .scribigo-satz-field > span,
.sg-satz-expert-card .sg-satz-impressum-label,
.sg-satz-expert-card .sg-satz-layout-label,
.sg-satz-expert-card .sg-satz-field-label {
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.4;
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-tab-panel[data-satz-pane="buch"] .scribigo-satz-input,
.sg-satz-tab-panel[data-satz-pane="layout"] .scribigo-satz-input,
.sg-satz-tab-panel[data-satz-pane="buch"] .scribigo-satz-select,
.sg-satz-tab-panel[data-satz-pane="layout"] .scribigo-satz-select {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.95rem;
    border-radius: var(--sg-chrome-radius-sm, 6px);
}

.sg-satz-tab-panel[data-satz-pane="buch"] .scribigo-satz-hint,
.sg-satz-tab-panel[data-satz-pane="layout"] .scribigo-satz-hint {
    font-size: 0.875rem;
    line-height: 1.5;
}

.sg-satz-tab-panel[data-satz-pane="buch"] .scribigo-satz-check,
.sg-satz-tab-panel[data-satz-pane="layout"] .scribigo-satz-check {
    font-size: 0.95rem;
    gap: 10px;
}

.sg-satz-expert-card .sg-satz-impressum-block {
    margin: 18px 0 8px;
}

.sg-satz-expert-card .sg-satz-cover-field {
    margin: 16px 0 0;
}

.sg-satz-expert-card .sg-satz-font-panel-head {
    font-size: 0.95rem;
}

.sg-satz-expert-card .sg-satz-tracking-val {
    font-size: 0.8125rem;
}

.sg-satz-headings-card .scribigo-satz-headings {
    margin-top: 4px;
    border-top: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #eee));
}

.sg-satz-expert-card .sg-satz-headings-filter {
    font-size: 0.9rem;
    color: var(--sg-satz-muted, #646970);
}

.sg-satz-expert-card.sg-satz-source-actions {
    margin: 0;
    padding: 22px 24px 24px;
    background: var(--sg-satz-surface, #fff);
    box-shadow: var(--sg-satz-card-shadow, none);
}

#agentSatzContent .sg-satz-expert-card.sg-satz-activity-card,
.scribigo-satz-panel .sg-satz-expert-card.sg-satz-activity-card {
    background:
        linear-gradient(
            165deg,
            var(--sg-satz-tint, #f6f8fa) 0%,
            color-mix(in srgb, var(--sg-satz-primary, #046bd2) 5%, var(--sg-satz-surface, #fff)) 100%
        );
    border-color: color-mix(in srgb, var(--sg-satz-primary, #046bd2) 32%, var(--sg-satz-border, #b8c0c7));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--sg-satz-primary, #046bd2) 10%, transparent);
}

.sg-satz-expert-card.sg-satz-source-actions:not(.sg-satz-prep-card) .sg-satz-source-actions-grid {
    grid-template-columns: minmax(0, 1fr);
}

.sg-satz-expert-card .sg-satz-source-action {
    padding: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Re-upload similarity note — end of Buchdaten/Export scroll content (not sticky). */
#agentSatzContent .sg-satz-page-footnotes {
    margin-top: 32px;
    margin-bottom: 0;
    padding: 12px 0 4px;
    flex: 0 0 auto;
}

#agentSatzContent .sg-satz-tab-panel[hidden] .sg-satz-page-footnotes {
    /* Inactive panes stay out of a11y / visual tree with the pane. */
    display: none;
}

.sg-satz-export-checklist,
.sg-satz-export-card {
    margin: 0 0 12px;
    padding: 14px 16px 12px;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: 8px;
    background: #fff;
}

.sg-satz-export-card:last-of-type {
    margin-bottom: 12px;
}

.sg-satz-export-expert {
    margin: 8px 0 14px;
    padding: 16px 18px;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: 8px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 5%, #fff);
}

.sg-satz-export-expert-lead {
    margin-bottom: 10px;
}

.sg-satz-export-expert .ast-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.sg-satz-source-actions {
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: 8px;
    background: var(--sg-satz-tint, #f7f9fb);
}

.sg-satz-source-actions-title {
    margin: 0 0 10px;
    color: var(--sg-satz-text, #2c3f42);
    font-size: 0.95rem;
    font-weight: 680;
    line-height: 1.35;
}

.sg-satz-source-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sg-satz-source-action {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: 7px;
    background: var(--sg-satz-surface, #fff);
}

.sg-satz-source-action-copy {
    flex: 1 1 auto;
}

.sg-satz-source-action-title {
    margin: 0 0 4px;
    color: var(--sg-satz-text, #2c3f42);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
}

.sg-satz-source-action .scribigo-satz-hint {
    margin: 0;
    line-height: 1.45;
}

.sg-satz-source-action-button {
    display: flex;
    align-items: flex-end;
}

#agentSatzContent .sg-satz-source-action .ast-button,
.scribigo-satz-panel .sg-satz-source-action .ast-button {
    width: 100%;
    max-width: 16.5rem;
    min-height: 36px;
    margin: 0;
    background-color: var(--sg-satz-surface, #fff);
    background-image: none;
    border-color: var(--sg-satz-border, #b8c0c7);
    color: var(--sg-satz-text, #2c3f42);
}

#agentSatzContent .sg-satz-source-action .ast-button:hover:not(:disabled),
#agentSatzContent .sg-satz-source-action .ast-button:focus-visible,
.scribigo-satz-panel .sg-satz-source-action .ast-button:hover:not(:disabled),
.scribigo-satz-panel .sg-satz-source-action .ast-button:focus-visible {
    background-color: var(--sg-satz-tint-strong, #edf4fa);
    border-color: var(--sg-satz-primary, #046bd2);
    color: var(--sg-satz-primary, #046bd2);
}

.sg-satz-expert-card.sg-satz-prep-card {
    margin-bottom: 12px;
    padding: 12px 14px 14px;
}

.sg-satz-prep-card > .sg-satz-section-lead,
.sg-satz-prep-card > .scribigo-satz-hint.sg-satz-section-lead {
    margin: 0 0 8px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.sg-satz-prep-grid {
    margin-top: 0;
    gap: 8px;
}

.sg-satz-prep-action {
    padding: 8px 10px;
    gap: 6px;
}

.sg-satz-prep-action .sg-satz-source-action-title {
    margin: 0;
    font-size: 0.84rem;
}

.sg-satz-prep-action .scribigo-satz-hint {
    font-size: 0.78rem;
    line-height: 1.35;
}

.sg-satz-prep-action-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.sg-satz-prep-utils {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.sg-satz-prep-quote-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sg-satz-prep-quote-controls {
    display: flex;
    flex: 1 1 10rem;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.sg-satz-prep-quote-field {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.sg-satz-prep-quote-row .sg-satz-prep-quote-select {
    width: 100%;
}

.sg-satz-prep-quote-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    color: var(--sg-satz-primary, #046bd2);
}

.sg-satz-prep-quote-spinner[hidden] {
    display: none;
}

#agentSatzContent .sg-satz-prep-quote-row .ast-button,
.scribigo-satz-panel .sg-satz-prep-quote-row .ast-button {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}

#agentSatzContent .sg-satz-prep-quote-row .sg-satz-prep-settings,
.scribigo-satz-panel .sg-satz-prep-quote-row .sg-satz-prep-settings {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    justify-content: center;
}

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

.sg-satz-prep-progress {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sg-satz-prep-mirror,
#satzPrepCommandMirror.wizard-mirror {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
    border-top: none;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

#satzPrepCommandMirror .command-card,
#satzPrepCommandMirror .task-plan-card,
#satzPrepCommandMirror .wizard-mirror-pending,
#satzPrepCommandMirror .version-restore-marker {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    margin: 0;
    box-sizing: border-box;
}

#satzPrepCommandMirror .version-restore-marker {
    min-height: 0;
    opacity: 0.85;
}

#satzPrepCommandMirror .version-restore-marker.is-restore-blocked {
    opacity: 0.55;
}

.sg-satz-prep-action.is-running {
    border-color: color-mix(in srgb, var(--sg-satz-primary, #046bd2) 40%, var(--sg-satz-border, #b8c0c7));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--sg-satz-primary, #046bd2) 18%, transparent);
}

.sg-satz-headings-card.is-processing-locked {
    position: relative;
    opacity: 0.55;
    pointer-events: none;
}

.sg-satz-headings-card.is-processing-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: color-mix(in srgb, var(--sg-satz-surface, #fff) 28%, transparent);
}

.sg-satz-prep-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--sg-satz-primary, #046bd2);
    background: var(--sg-satz-tint-strong, #edf4fa);
    border: 1px solid color-mix(in srgb, var(--sg-satz-primary, #046bd2) 24%, transparent);
}

.sg-satz-prep-quote-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--sg-satz-muted, #646970);
}

.sg-satz-prep-quote-select {
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--sg-satz-border, #b8c0c7);
    border-radius: 6px;
    background: var(--sg-satz-surface, #fff);
    color: var(--sg-satz-text, #2c3f42);
    font: inherit;
}

.sg-satz-unlock {
    margin: 0 0 14px;
    padding: 16px 18px 14px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: 8px;
    background:
        linear-gradient(165deg, var(--sg-satz-tint, #f6f8fa) 0%, var(--sg-satz-surface, #fff) 72%);
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-unlock--complete {
    padding: 0;
    overflow: hidden;
    background: var(--sg-satz-surface, #fff);
}

.sg-satz-unlock-success {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #18794e 46%, var(--sg-satz-surface, #fff));
    border-radius: 8px;
    background: color-mix(in srgb, #18794e 7%, var(--sg-satz-surface, #fff));
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-unlock:not(.sg-satz-unlock--complete) .sg-satz-unlock-success {
    margin: 0 0 16px;
}

.sg-satz-unlock-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 0;
    border-radius: 50%;
    background: #18794e;
    color: #fff;
    font-size: 0.8rem;
}

.sg-satz-unlock-success-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3px 12px;
    min-width: 0;
}

.sg-satz-unlock-success-title {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--sg-satz-text, #2c3f42);
    font-size: 1rem;
    font-weight: 680;
    line-height: 1.35;
}

.sg-satz-unlock-success-copy,
.sg-satz-unlock-success-direction {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--sg-satz-text, #2c3f42);
    line-height: 1.4;
}

.sg-satz-unlock-success-direction {
    color: var(--sg-satz-muted, #646970);
    font-size: 0.86rem;
    font-weight: 600;
}

.sg-satz-unlock-success-reupload {
    grid-column: 1;
    margin: 5px 0 0;
    max-width: 42em;
}

.sg-satz-unlock-success-content > .sg-satz-reupload-cta {
    grid-column: 2;
    margin-top: 5px;
}

.sg-satz-unlock-success-content .sg-satz-reupload-cta,
.sg-satz-reupload-note .sg-satz-reupload-cta {
    margin-top: 2px;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    text-decoration: none;
    background-color: var(--sg-chrome-card, #fff);
    background-image: none;
    border: 1px solid var(--sg-chrome-hairline, #d8d3cc);
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #2c3f42));
}

.sg-satz-unlock-success-content .sg-satz-reupload-cta:hover,
.sg-satz-unlock-success-content .sg-satz-reupload-cta:focus-visible,
.sg-satz-reupload-note .sg-satz-reupload-cta:hover,
.sg-satz-reupload-note .sg-satz-reupload-cta:focus-visible {
    background-color: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff);
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #2c3f42));
}

.sg-satz-reupload-note {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 14px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: var(--sg-chrome-radius-sm, 7px);
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 42%, #fff);
}

.sg-satz-reupload-note .scribigo-satz-hint {
    flex: 1 1 16rem;
    margin: 0;
    max-width: 42em;
}

.sg-satz-unlock-reupload {
    font-weight: 600;
}

.sg-satz-unlock-kicker {
    margin: 0 0 6px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--sg-chrome-ink, #2c2418) 72%, transparent);
}

.sg-satz-unlock-lead {
    margin: 0 0 12px;
    max-width: 42em;
}

.sg-satz-unlock-offers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.sg-satz-unlock-offer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 12px 10px;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: 7px;
    background: #fff;
}

.sg-satz-unlock-offer-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
}

.sg-satz-unlock-offer-body {
    margin: 0;
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--sg-chrome-ink, #2c2418) 78%, transparent);
}

.sg-satz-unlock-offer-price {
    margin: 2px 0 4px;
    font-size: 1.05rem;
    font-weight: 650;
}

.sg-satz-unlock-offer-actions .ast-button {
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.sg-satz-export-card--preview {
    border-style: dashed;
}

.sg-satz-unlock-micro {
    margin: 8px 0 0;
}

.sg-satz-export-checklist-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.sg-satz-export-checklist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sg-satz-export-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    line-height: 1.35;
}

.sg-satz-export-check i {
    flex: 0 0 auto;
    margin-top: 0.15em;
    font-size: 0.92rem;
}

.sg-satz-export-check--ok i {
    color: #1a7f37;
}

.sg-satz-export-check--warn i {
    color: #e6a700;
}

.sg-satz-export-check--error i {
    color: #cf222e;
}

.sg-satz-export-check--info i {
    color: var(--sg-satz-primary, #046bd2);
}

.sg-satz-export-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sg-satz-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 6px;
}

.sg-satz-retain {
    margin-top: 8px;
}

.scribigo-satz-expert {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.sg-satz-radio-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 8px 0 12px;
}

.sg-satz-radio-option .scribigo-satz-hint {
    margin: 0 0 8px 24px;
}

.sg-satz-radio-option .scribigo-satz-hint[hidden] {
    display: none !important;
}

.scribigo-satz-status-wrap {
    margin: 8px 0 12px;
}

.scribigo-satz-status {
    margin: 0;
}

.scribigo-satz-status.is-ok {
    color: #1a7f37;
    font-weight: 600;
}

.scribigo-satz-status.is-bad {
    color: #d63638;
    font-weight: 600;
}

.scribigo-satz-status.is-busy {
    color: var(--ast-global-color-0, #e86202);
}

.scribigo-satz-status.is-warn {
    color: #9a6700;
    font-weight: 600;
}

.sg-satz-report-link {
    display: inline;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ast-global-color-0, #0274be);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

.scribigo-satz-status-wrap .sg-satz-report-link {
    display: inline-block;
}

.scribigo-satz-warnings .sg-satz-report-link {
    display: inline-block;
    margin: 10px 0 0;
    font-size: inherit;
}

.scribigo-satz-warnings .sg-satz-warnings-title {
    margin: 0 0 6px;
    font-weight: 600;
    color: inherit;
}

.scribigo-satz-warnings .sg-satz-warnings-intro {
    margin: 0 0 8px;
    color: inherit;
}

.scribigo-satz-warnings > ul {
    margin: 0;
}

.sg-satz-manuscript-notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(154, 103, 0, 0.35);
    background: rgba(154, 103, 0, 0.08);
}

.sg-satz-manuscript-notice-text {
    margin: 0;
    flex: 1 1 auto;
}

#agentSatzContent .scribigo-satz-panel .sg-satz-manuscript-notice-ok.ast-button,
.scribigo-satz-panel .sg-satz-manuscript-notice-ok.ast-button {
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 14px;
    min-height: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.scribigo-satz-warnings {
    margin: 0 0 12px;
    padding-left: 18px;
    color: #9a6700;
}

.scribigo-satz-expert[hidden],
.sg-satz-tab-panel[hidden] {
    display: none !important;
}

.scribigo-satz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px 18px;
    margin: 16px 0;
}

.sg-satz-paper-format {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.sg-satz-paper-dims[hidden] {
    display: none !important;
}

/* Live typeface / small-caps previews under selects */
@font-face {
    font-family: 'Libertinus Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/libertinus-serif/files/libertinus-serif-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Libertinus Serif';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/libertinus-serif/files/libertinus-serif-latin-600-normal.woff2') format('woff2');
}

.sg-satz-font-select {
    font-size: 1rem;
}

.sg-satz-font-preview {
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--sg-chrome-hairline, rgba(40, 32, 24, 0.14));
    background: #fffef9;
    font-size: 1.35rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #1c1916;
    min-height: 2.4em;
    display: flex;
    align-items: center;
}

.sg-satz-font-preview.is-template {
    opacity: 0.92;
}

.sg-satz-smcp-preview.is-smcp {
    font-variant: small-caps;
    font-feature-settings: "smcp" 1;
    letter-spacing: 0.04em;
}

.sg-satz-fonts-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    width: 100%;
}

.sg-satz-font-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px 14px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text) 14%, var(--sg-satz-surface, #fff));
    border-radius: 10px;
    background: color-mix(in srgb, var(--sg-satz-surface, #fff) 96%, transparent);
}

.sg-satz-font-panel-head {
    margin: 0;
    padding: 0 0 2px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-font-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.sg-satz-font-panel .scribigo-satz-field,
.sg-satz-font-panel .scribigo-satz-field--wide,
.sg-satz-font-panel .sg-satz-tracking-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.sg-satz-font-panel .scribigo-satz-select,
.sg-satz-font-panel .scribigo-satz-input,
.sg-satz-font-panel .sg-satz-tracking {
    width: 100%;
    max-width: 100%;
}

.sg-satz-font-panel .sg-satz-tracking-range {
    flex: 1 1 auto;
    min-width: 0;
}

.sg-satz-font-panel .sg-satz-font-preview {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 4.75rem;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    overflow: hidden;
    box-sizing: border-box;
}

.sg-satz-impressum-preview {
    font-size: 0.85rem;
    min-height: 2.4em;
}

@media (min-width: 672px) {
    .sg-satz-split--layout .sg-satz-fonts-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.scribigo-satz-headings {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--sg-chrome-hairline, #eee);
}

.scribigo-satz-headings.is-hiding-lower .scribigo-satz-heading[data-level="3"],
.scribigo-satz-headings.is-hiding-lower .scribigo-satz-heading[data-level="4"],
.scribigo-satz-headings.is-hiding-lower .scribigo-satz-heading[data-level="5"],
.scribigo-satz-headings.is-hiding-lower .scribigo-satz-heading[data-level="6"] {
    display: none;
}

.sg-satz-headings-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 0 0 10px;
}

.sg-satz-headings-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.875rem;
    color: var(--ast-global-color-3, #6b7280);
    cursor: pointer;
    user-select: none;
}

.scribigo-satz-heading {
    display: grid;
    /* main | level | role | A | recto | ¶ */
    grid-template-columns: minmax(0, 1fr) auto minmax(6.5rem, 7.25rem) auto auto auto;
    gap: 4px 8px;
    align-items: center;
    padding: 5px 6px;
    border: 0;
    border-bottom: 1px solid var(--sg-chrome-hairline, #eee);
    border-radius: 0;
    background: transparent;
    margin-left: calc((var(--satz-heading-level, 1) - 1) * 12px);
    transition: background-color 0.12s ease;
}

.scribigo-satz-heading:hover,
.scribigo-satz-heading:focus-within {
    background: color-mix(in srgb, var(--ast-global-color-5, #f5f5f5) 72%, transparent);
}

.scribigo-satz-heading[data-level="1"] { --satz-heading-level: 1; }
.scribigo-satz-heading[data-level="2"] { --satz-heading-level: 2; }
.scribigo-satz-heading[data-level="3"] { --satz-heading-level: 3; }
.scribigo-satz-heading[data-level="4"] { --satz-heading-level: 4; }
.scribigo-satz-heading[data-level="5"] { --satz-heading-level: 5; }
.scribigo-satz-heading[data-level="6"] { --satz-heading-level: 6; }

.scribigo-satz-heading.is-inline {
    /* main | level | toc label | ¶ */
    grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.scribigo-satz-heading .satz-role {
    width: auto;
    min-width: 0;
    min-height: 1.75rem;
    padding: 2px 6px;
    font-size: 0.8125rem;
    line-height: 1.25;
}

.scribigo-satz-heading--h1 .scribigo-satz-heading-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.scribigo-satz-heading--h2 .scribigo-satz-heading-title {
    font-size: 0.98rem;
    font-weight: 600;
}

.scribigo-satz-heading--h3 .scribigo-satz-heading-title,
.scribigo-satz-heading--h4 .scribigo-satz-heading-title,
.scribigo-satz-heading--h5 .scribigo-satz-heading-title,
.scribigo-satz-heading--h6 .scribigo-satz-heading-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: color-mix(in srgb, var(--ast-global-color-0, #0274be) 82%, #334155);
}

.scribigo-satz-heading-level,
.scribigo-satz-heading .scribigo-heading-level-step__badge {
    flex-shrink: 0;
    padding: 1px 5px;
    background: var(--ast-global-color-5, #f8f8f8);
    color: var(--ast-global-color-3, #6b7280);
    border-radius: 3px;
    font-size: 0.6875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 500;
}

.scribigo-satz-heading .scribigo-heading-level-step {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.scribigo-satz-heading .scribigo-heading-level-step__badge {
    min-width: 1.7em;
    text-align: center;
    line-height: 1.4;
}

.scribigo-satz-heading .scribigo-heading-level-step__btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sg-chrome-hairline, #e5e7eb);
    border-radius: 3px;
    background: var(--ast-global-color-5, #f8f8f8);
    color: var(--ast-global-color-2, #1f2937);
    box-shadow: none;
    font: inherit;
    font-size: 0.8rem;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
}

.scribigo-satz-heading .scribigo-heading-level-step__btn:hover:not(:disabled) {
    background: #fff;
    color: var(--ast-global-color-2, #1f2937);
}

.scribigo-satz-heading .scribigo-heading-level-step__btn:focus-visible {
    outline: 2px solid var(--ast-global-color-0, #0274be);
    outline-offset: 1px;
}

.scribigo-satz-heading .scribigo-heading-level-step__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.scribigo-satz-heading-to-para {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sg-chrome-hairline, #e5e7eb);
    border-radius: 3px;
    background: var(--ast-global-color-5, #f8f8f8);
    color: var(--ast-global-color-3, #6b7280);
    box-shadow: none;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.scribigo-satz-heading-to-para:hover {
    background: #fff;
    color: var(--ast-global-color-2, #1f2937);
}

.scribigo-satz-heading-to-para:focus-visible {
    outline: 2px solid var(--ast-global-color-0, #0274be);
    outline-offset: 1px;
}

.scribigo-satz-heading-to-para i {
    font-size: 0.7rem;
}

.scribigo-satz-heading-toc-label {
    font-size: 12px;
    color: var(--ast-global-color-3, #6b7280);
    white-space: nowrap;
}

.scribigo-satz-heading.is-not-outlined .scribigo-satz-heading-toc-label {
    opacity: 0.7;
}

.scribigo-satz-initiale,
.scribigo-satz-start-recto {
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
}

.scribigo-satz-flag {
    position: relative;
    justify-content: center;
    gap: 0;
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0;
    border-radius: 4px;
    color: #9ca3af;
}

.scribigo-satz-flag .scribigo-satz-flag-glyph {
    opacity: 0.45;
    filter: grayscale(1);
    transition: opacity 0.12s ease, filter 0.12s ease, color 0.12s ease;
}

.scribigo-satz-flag:hover {
    color: #6b7280;
    background: color-mix(in srgb, var(--ast-global-color-5, #f3f4f6) 80%, transparent);
}

.scribigo-satz-flag:hover .scribigo-satz-flag-glyph {
    opacity: 0.65;
}

.scribigo-satz-flag:has(input:checked) {
    color: var(--ast-global-color-0, #0274be);
}

.scribigo-satz-flag:has(input:checked) .scribigo-satz-flag-glyph {
    opacity: 1;
    filter: none;
}

.scribigo-satz-flag:has(input:focus-visible) {
    outline: 2px solid var(--ast-global-color-0, #0274be);
    outline-offset: 1px;
}

.scribigo-satz-flag input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.scribigo-satz-flag-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8rem;
    line-height: 1;
    pointer-events: none;
}

.scribigo-satz-flag-glyph--initiale {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    font-weight: 700;
    font-style: italic;
}

.scribigo-satz-heading.is-excluded {
    opacity: 0.62;
}

.scribigo-satz-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.scribigo-satz-heading-include {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
}

.scribigo-satz-heading-title,
#agentSatzContent .scribigo-satz-heading-title,
.scribigo-satz-panel .scribigo-satz-heading-title {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: var(--ast-global-color-0, #0274be);
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 0;
}

.scribigo-satz-heading-title:hover,
.scribigo-satz-heading-title:active,
.scribigo-satz-heading-title:focus,
#agentSatzContent .scribigo-satz-heading-title:hover,
#agentSatzContent .scribigo-satz-heading-title:active,
#agentSatzContent .scribigo-satz-heading-title:focus,
.scribigo-satz-panel .scribigo-satz-heading-title:hover,
.scribigo-satz-panel .scribigo-satz-heading-title:active,
.scribigo-satz-panel .scribigo-satz-heading-title:focus {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: var(--ast-global-color-0, #0274be);
    text-decoration: none;
}

.scribigo-satz-heading-title:focus-visible {
    outline: 2px solid var(--ast-global-color-0, #0274be);
    outline-offset: 2px;
}

.sg-satz-radio-option.is-disabled {
    opacity: 0.55;
}

.sg-satz-radio-option.is-disabled input:disabled {
    cursor: not-allowed;
}

.sg-satz-erstzeileneinzug {
    margin-top: 0.85rem;
}

.sg-satz-fill-check {
    margin: 8px 0 4px;
    font-weight: 600;
}

#satz-kapitel-format {
    max-width: 14rem;
    margin: 0 0 8px;
}

#satz-kapitel-format-wrap[hidden] {
    display: none !important;
}

.sg-satz-typo {
    margin: 12px 0 4px;
}

.sg-satz-typo .scribigo-satz-sub {
    margin-top: 18px;
}

.sg-satz-layout-section {
    margin: 36px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--sg-chrome-hairline, #e6ddd0);
}

.sg-satz-expert-card.sg-satz-layout-section {
    margin: 0;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text) 14%, var(--sg-satz-surface, #fff));
    border-top: 1px solid color-mix(in srgb, var(--sg-satz-text) 14%, var(--sg-satz-surface, #fff));
}

.sg-satz-layout-preview + .sg-satz-layout-section {
    border-top: 0;
    padding-top: 0;
}

.sg-satz-layout-preview + .sg-satz-expert-stack > .sg-satz-layout-section:first-child {
    border-top: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    padding-top: 22px;
}

.sg-satz-layout-section > .scribigo-satz-sub {
    margin: 0 0 10px;
}

.sg-satz-section-lead,
.sg-satz-field-label {
    margin: 0 0 14px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--ast-global-color-3, #656d76);
}

.sg-satz-field-label {
    font-weight: 600;
    color: inherit;
}

.sg-satz-layout-section .scribigo-satz-check {
    margin: 10px 0;
}

.sg-satz-layout-section .scribigo-satz-grid {
    margin-top: 0;
    justify-items: stretch;
}

.sg-satz-layout-section .scribigo-satz-field {
    width: 14rem;
    max-width: 100%;
}

.sg-satz-layout-section .scribigo-satz-select,
.sg-satz-layout-section .scribigo-satz-input {
    width: 14rem;
    max-width: 100%;
}

.sg-satz-layout-section .scribigo-satz-field--wide {
    width: 100%;
    max-width: 100%;
}

.sg-satz-layout-section .scribigo-satz-field--wide .scribigo-satz-select,
.sg-satz-layout-section .scribigo-satz-field--wide .scribigo-satz-input {
    width: 14rem;
    max-width: 100%;
}

.sg-satz-tracking--compact {
    justify-content: flex-start;
    max-width: 14rem;
}

.sg-satz-tracking--compact .sg-satz-zeilen-input,
.sg-satz-layout-section .sg-satz-zeilen-input {
    flex: 0 0 14rem;
    width: 14rem;
    max-width: 100%;
}

.sg-satz-headings-bulk {
    margin: 0 0 12px;
    padding: 8px 0 10px;
    border: 0;
    border-bottom: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: 0;
    background: transparent;
}

.sg-satz-headings-bulk-lead {
    margin: 0 0 10px;
}

.sg-satz-headings-bulk-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.sg-satz-headings-bulk-checks .scribigo-satz-check {
    gap: 8px;
}

.sg-satz-headings-bulk-checks .scribigo-satz-flag-glyph {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--ast-global-color-0, #0274be);
    opacity: 0.9;
}

.sg-satz-headings-bulk-checks .scribigo-satz-flag-glyph--initiale {
    font-size: 0.95rem;
}

.sg-satz-fine {
    margin: 36px 0 12px;
    padding: 14px 16px;
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: 8px;
    background: color-mix(in srgb, #f7f1e7 55%, #fff);
}

.sg-satz-fine-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.sg-satz-fine-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sg-satz-fine-summary-title {
    font-size: 1rem;
    font-weight: 700;
}

.sg-satz-fine-chevron {
    flex: 0 0 auto;
    width: 0.5em;
    height: 0.5em;
    margin-inline-end: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: 0.55;
    transition: transform 0.15s ease;
}

.sg-satz-fine[open] .sg-satz-fine-chevron {
    transform: rotate(45deg);
}

.sg-satz-fine-summary-lead {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--ast-global-color-3, #656d76);
    font-weight: 400;
}

.sg-satz-fine[open] .sg-satz-fine-summary {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sg-chrome-hairline, #e6ddd0);
}

.sg-satz-fine-sub {
    margin: 16px 0 8px;
    font-size: 0.95rem;
    font-weight: 650;
}

.sg-satz-fine-body > .sg-satz-fine-sub:first-child {
    margin-top: 0;
}

.sg-satz-tracking-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    min-width: 0;
    margin: 12px 0 4px;
    padding: 2px 0 4px;
}

.sg-satz-tracking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

#agentSatzContent .sg-satz-toggle-line-label-row,
#agentSatzContent .sg-satz-tracking-label-row,
.sg-satz-toggle-line-label-row,
.sg-satz-tracking-label-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    column-gap: 12px;
    row-gap: 0;
    width: max-content;
    max-width: 100%;
    min-width: 0;
}

#agentSatzContent .sg-satz-tracking-label-row > label,
#agentSatzContent .sg-satz-tracking-label-row .sg-satz-tracking-label,
.sg-satz-tracking-label-row > label,
.sg-satz-tracking-label-row .sg-satz-tracking-label {
    flex: 0 0 auto;
    width: auto;
}

#agentSatzContent .sg-satz-toggle-line-label,
.sg-satz-toggle-line-label {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
}

#agentSatzContent .sg-satz-help,
.sg-satz-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text) 22%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-satz-text) 6%, var(--sg-satz-surface, #fff));
    color: var(--sg-satz-muted, #646970);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    flex: 0 0 auto;
    pointer-events: auto;
}

.sg-satz-help:hover,
.sg-satz-help:focus-visible {
    color: var(--sg-satz-text, #2c3f42);
    border-color: color-mix(in srgb, var(--sg-satz-text) 38%, transparent);
    outline: none;
}

.sg-satz-help:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--sg-satz-primary, #046bd2) 28%, transparent);
}

.sg-satz-tracking-label {
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 550;
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-tracking,
#agentSatzContent .sg-satz-tracking,
#agentSatzContent .sg-satz-tracking-wrap {
    border: 0;
    box-shadow: none;
    background: transparent;
    outline: none;
}

.sg-satz-tracking {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.sg-satz-tracking-nudge {
    appearance: none;
    display: grid;
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--sg-satz-muted, #646970);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.sg-satz-tracking-nudge:hover {
    background: transparent;
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-tracking-range,
#agentSatzContent .sg-satz-tracking input[type="range"],
#agentSatzContent .sg-satz-tracking input[type="range"].sg-satz-tracking-range,
#agentSatzContent .scribigo-satz-panel .sg-satz-tracking input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, #e8edf2);
    accent-color: var(--sg-satz-text, #2c3f42);
    box-shadow: none;
    outline: none;
    color: var(--sg-satz-text, #2c3f42);
    cursor: pointer;
}

#agentSatzContent .sg-satz-tracking input[type="range"]::-webkit-slider-runnable-track,
.sg-satz-tracking input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, #e8edf2);
    box-shadow: none;
}

#agentSatzContent .sg-satz-tracking input[type="range"]::-webkit-slider-thumb,
.sg-satz-tracking input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--sg-satz-text, #2c3f42);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--sg-satz-text, #2c3f42) 22%, #fff);
    cursor: grab;
}

#agentSatzContent .sg-satz-tracking input[type="range"]::-moz-range-track,
.sg-satz-tracking input[type="range"]::-moz-range-track {
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, #e8edf2);
    box-shadow: none;
}

#agentSatzContent .sg-satz-tracking input[type="range"]::-moz-range-thumb,
.sg-satz-tracking input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--sg-satz-text, #2c3f42);
    box-shadow: none;
    cursor: grab;
}

#agentSatzContent .sg-satz-tracking input[type="range"]::-moz-focus-outer {
    border: 0;
}

.sg-satz-tracking-val {
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    font-weight: 550;
    min-width: 3.4em;
    text-align: right;
    color: var(--ast-global-color-3, #656d76);
    white-space: nowrap;
}

.scribigo-satz-pill {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fff4d5;
    color: #7a5a00;
}

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: var(--sg-z2-h);
    height: var(--sg-z2-h);
    min-height: var(--sg-z2-h);
    max-height: var(--sg-z2-h);
    padding: 0 8px;
    gap: 6px;
    margin: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    box-shadow: none;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    line-height: 1;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: var(--ast-global-color-3);
    cursor: pointer;
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab i {
    font-size: 0.82rem;
    opacity: 0.85;
}

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab:disabled,
#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab.is-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab:disabled:hover,
#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab.is-disabled:hover {
    background: transparent;
    border-color: transparent;
    color: var(--ast-global-color-3);
}

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-toolbar-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-toolbar-actions.has-sep {
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid var(--sg-chrome-hairline, #e6ddd0);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tool {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: var(--sg-z2-h);
    height: var(--sg-z2-h);
    min-height: var(--sg-z2-h);
    max-height: var(--sg-z2-h);
    padding: 0 8px;
    gap: 6px;
    margin: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    box-shadow: none;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    line-height: 1;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none;
    color: var(--ast-global-color-3);
    cursor: pointer;
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tool i {
    font-size: 0.82rem;
    opacity: 0.85;
}

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

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-template-name {
    width: 160px;
    min-height: var(--sg-z2-h, 36px);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-save-state {
    font-size: 0.75rem;
    color: var(--ast-global-color-3);
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-save-state.is-saving {
    color: var(--ast-global-color-0, #e86202);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-toolbar__field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-toolbar__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ast-global-color-3);
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-toolbar .scribigo-satz-select {
    min-width: 200px;
    width: auto;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-toolbar .ast-button {
    min-height: var(--sg-z2-h);
    height: var(--sg-z2-h);
    max-height: var(--sg-z2-h);
    padding: 0 14px;
}

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

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

.sg-satz-info {
    max-width: none;
    margin-inline: 0;
}

.sg-satz-info-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 600;
}

.sg-satz-wizard-nav .sg-satz-wizard-title {
    margin: 0;
}

.sg-satz-info-lead,
.sg-satz-info-value {
    margin: 0 0 12px;
    font-size: 0.98rem;
    line-height: 1.5;
}

.sg-satz-info-value {
    color: var(--ast-global-color-3, #656d76);
}

.sg-satz-info-card {
    border: 1px solid var(--sg-chrome-hairline, #e6ddd0);
    border-radius: var(--sg-chrome-radius, 14px);
    background: #fff;
    padding: 16px 18px;
    margin: 0 0 14px;
}

.sg-satz-info-card--standard,
.sg-satz-info-card--expert {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 5%, #fff);
}

.sg-satz-info-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.sg-satz-info-card p {
    margin: 0;
}

.sg-satz-info-card--expert p {
    margin-bottom: 10px;
}

.sg-satz-info-card .sg-satz-info-limits-intro {
    margin-bottom: 8px;
}

.sg-satz-info-list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 6px;
}

.sg-satz-info-list li {
    font-size: 0.95rem;
    line-height: 1.4;
}

.sg-satz-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.sg-satz-cta-row--end {
    justify-content: flex-end;
}

.sg-satz-info-beta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, #fff);
}

.sg-satz-info-beta p {
    margin: 0;
}

.sg-satz-info-beta-ff,
.sg-satz-info-beta .sg-ff-host {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    position: relative;
}

.sg-satz-info-beta .sg-ff {
    width: 100%;
}

.sg-satz-info-beta .sg-ff__bar {
    justify-content: flex-start;
}

.sg-satz-info-beta .sg-ff__form {
    position: static;
    width: 100%;
    max-width: 28rem;
    margin-top: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sg-satz-info-start {
    margin-top: 28px;
}

.sg-satz-tab-panel[data-satz-pane="export"] .sg-satz-info-beta {
    margin-bottom: 28px;
}

.sg-satz-familie-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
    padding: 0.3rem;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: var(--sg-chrome-radius, 14px);
    background: var(--sg-satz-surface, #fff);
}

.sg-satz-familie-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--sg-chrome-radius, 14px);
    padding: 6px 14px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    font-synthesis: none;
    line-height: 1.2;
    /* Astra sets `button { color: #fff }` — must set readable ink explicitly (cf. Audio chips). */
    color: var(--sg-satz-muted, var(--ast-global-color-3, #646970));
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.sg-satz-familie-btn:hover {
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
    background: var(--sg-satz-tint, color-mix(in srgb, var(--sg-satz-primary, #046bd2) 5%, #fff));
}

.sg-satz-familie-btn.is-active {
    border-color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    background: var(--sg-satz-tint-strong, color-mix(in srgb, var(--sg-satz-primary, #046bd2) 12%, #fff));
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
}

.sg-satz-familie-btn:focus-visible {
    outline: 2px solid var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    outline-offset: 2px;
}

.sg-satz-genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin: 0 0 18px;
}

.sg-satz-genre-card {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: 10px;
    background: var(--sg-satz-surface, #fff);
    /* Beat Astra white button text (same as Audio voice cards). */
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
    cursor: pointer;
    text-align: center;
    font: inherit;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.sg-satz-genre-card:hover {
    border-color: color-mix(in srgb, var(--sg-satz-primary, var(--ast-global-color-0, #046bd2)) 45%, var(--sg-satz-border, #e6ddd0));
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
}

.sg-satz-genre-card.is-selected {
    border-color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    background: var(--sg-satz-tint, color-mix(in srgb, var(--sg-satz-primary, #046bd2) 6%, #fff));
    box-shadow: 0 0 0 1px var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
}

.sg-satz-genre-card:focus-visible {
    outline: 2px solid var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    outline-offset: 2px;
}

.sg-satz-genre-thumb,
.sg-satz-preview-page {
    display: block;
    width: 100%;
    aspect-ratio: var(--sg-satz-page-ratio, 13 / 21);
    object-fit: contain;
    object-position: top center;
    border-radius: 4px;
    background: #fff;
    border: 1px solid rgba(40, 32, 24, 0.22);
    box-shadow: 0 2px 8px rgba(40, 32, 24, 0.10);
    image-rendering: auto;
    image-rendering: smooth;
}

.sg-satz-genre-thumb-stack {
    position: relative;
    display: block;
    width: 100%;
}

.sg-satz-genre-thumb-stack > .sg-satz-genre-thumb--kapitel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    opacity: 0;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .sg-satz-genre-card:hover .sg-satz-genre-thumb--kapitel {
        opacity: 1;
    }
}

.sg-satz-genre-card:focus-visible .sg-satz-genre-thumb--kapitel {
    opacity: 1;
}

.sg-satz-genre-thumb.is-placeholder,
.sg-satz-preview-page.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #8a7d6b;
    font-size: 12px;
    text-align: center;
}

.sg-satz-genre-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
}

.sg-satz-genre-card.is-selected .sg-satz-genre-name {
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
}

.sg-satz-vorlage-pair,
.sg-satz-specimen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0 16px;
}

.sg-satz-specimen-book {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    width: 100%;
}

.sg-satz-specimen-stage {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.sg-satz-specimen-book .sg-satz-specimen {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.sg-satz-specimen-nav {
    flex: 0 0 auto;
    min-width: 2.5em;
    width: 2.5em;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.2rem;
    line-height: 1;
}

#agentSatzContent .scribigo-satz-panel .ast-button.sg-satz-specimen-nav,
.scribigo-satz-panel .ast-button.sg-satz-specimen-nav {
    min-width: 2.5em;
    width: 2.5em;
    padding: 0.45rem 0;
}

.sg-satz-specimen--large,
.sg-satz-specimen--spread {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 16px;
    padding: 14px 16px 10px;
    background:
        linear-gradient(
            90deg,
            #e4d8c6 0%,
            #f7f1e7 38%,
            #d8cbb8 49.5%,
            #cbbba4 50%,
            #d8cbb8 50.5%,
            #f7f1e7 62%,
            #e4d8c6 100%
        );
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(80, 60, 40, 0.1);
}

.sg-satz-specimen-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 52rem;
    margin: 8px auto 16px;
    box-sizing: border-box;
}

.sg-satz-specimen-frame .sg-satz-specimen {
    margin: 0;
}

.sg-satz-specimen-stage .sg-satz-specimen {
    margin: 0;
}

.sg-satz-specimen-stale {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px;
    box-sizing: border-box;
    background: rgba(255, 250, 244, 0.78);
    text-align: center;
    border-radius: 6px;
}

.sg-satz-specimen-frame.is-empty-preview .sg-satz-specimen-stale {
    background: rgba(255, 250, 244, 0.88);
}

.sg-satz-specimen-stale[hidden] {
    display: none;
}

.sg-satz-specimen-stale-text {
    margin: 0;
    max-width: 28em;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--sg-chrome-primary-fg, #2c3f42);
}

.sg-satz-specimen-page {
    margin: 0;
    padding: 6px;
    background: #fffef8;
    border: 1px solid #d4c7b4;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(40, 28, 16, 0.12);
}

.sg-satz-specimen-page--verso {
    box-shadow: 3px 0 10px rgba(40, 28, 16, 0.08);
}

.sg-satz-specimen-page--recto {
    box-shadow: -3px 0 10px rgba(40, 28, 16, 0.08);
}

.sg-satz-specimen .sg-satz-preview-page {
    object-fit: contain;
    object-position: top center;
    image-rendering: auto;
    width: 100%;
    height: auto;
    aspect-ratio: var(--sg-satz-page-ratio, 13 / 21);
    display: block;
    background: #fffef8;
}

.sg-satz-specimen-page.is-empty {
    opacity: 0.38;
    background: #efe6d6;
    box-shadow: none;
}

.sg-satz-specimen-page.is-empty .sg-satz-preview-page {
    visibility: hidden;
}

.sg-satz-specimen-page figcaption {
    margin-top: 6px;
    min-height: 1.25em;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}

.sg-satz-specimen-pager-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    /* Match book stage between << / >> nav buttons */
    padding: 6px calc(2.5em + 12px) 0;
    margin: 0;
    min-height: 1.75rem;
}

.sg-satz-specimen-pager-row[hidden] {
    display: none;
}

.sg-satz-specimen-pager {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 0;
    min-width: 0;
    flex: 0 1 auto;
}

.sg-satz-specimen-pager[hidden] {
    display: none;
}

.sg-satz-specimen-pager-page {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--sg-chrome-muted, #6b655c);
    white-space: nowrap;
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
}

.sg-satz-specimen-pager-page > span,
.sg-satz-specimen-page-word,
.sg-satz-specimen-page-of,
#satz-specimen-page-of {
    display: inline-block;
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    width: auto;
    min-width: 0;
}

.sg-satz-specimen-page-input,
#agentSatzContent .scribigo-satz-panel .sg-satz-specimen-page-input,
.scribigo-satz-panel .scribigo-satz-input.sg-satz-specimen-page-input {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 3.25rem;
    min-width: 3.25rem;
    max-width: 3.5rem;
    height: 1.875rem;
    margin: 0;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    border-radius: 3px;
    /* No spinner / scroll-step — type a page number instead */
    -moz-appearance: textfield;
    appearance: textfield;
}

.sg-satz-specimen-page-input::-webkit-outer-spin-button,
.sg-satz-specimen-page-input::-webkit-inner-spin-button,
#agentSatzContent .scribigo-satz-panel .sg-satz-specimen-page-input::-webkit-outer-spin-button,
#agentSatzContent .scribigo-satz-panel .sg-satz-specimen-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sg-satz-zeilen-input {
    flex: 0 0 auto;
    width: 14rem;
    max-width: 100%;
}

.sg-satz-specimen-download {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 12px;
}

.sg-satz-specimen-download[hidden] {
    display: none;
}

.sg-satz-split--layout .sg-satz-layout-preview {
    margin: 0;
    width: 100%;
    align-items: stretch;
    padding: 20px;
}

.sg-satz-split--layout .sg-satz-layout-preview .sg-satz-specimen-status {
    max-width: none;
}

.sg-satz-layout-preview .sg-satz-specimen-status {
    align-self: stretch;
    width: 100%;
    max-width: 52rem;
    margin: 0 auto 8px;
    box-sizing: border-box;
}

.sg-satz-user-bar {
    margin: 28px 0 16px;
    padding-top: 8px;
    border-top: 1px solid var(--sg-chrome-hairline, #e6ddd0);
}

.sg-satz-expert-card.sg-satz-user-bar {
    margin: 0;
    padding: 22px 24px 24px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
}

/* Beat theme `.entry-content ul { padding-left: 20px }` so chips align with section headings/grids. */
.scribigo-satz-panel .sg-satz-user-templates,
.sg-satz-user-bar .sg-satz-user-templates {
    list-style: none;
    margin: 0 0 10px;
    margin-inline: 0;
    padding: 0;
    padding-inline-start: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scribigo-satz-panel .sg-satz-user-templates > li,
.sg-satz-user-bar .sg-satz-user-tpl-row {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sg-satz-user-tpl {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    background: var(--sg-satz-surface, #fff);
    border-radius: 999px;
    padding: 4px 12px;
    font: inherit;
    font-weight: 500;
    color: var(--sg-satz-muted, var(--ast-global-color-3, #646970));
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.sg-satz-user-tpl:hover {
    color: var(--sg-satz-text, var(--sg-chrome-primary-fg, #2c3f42));
    border-color: color-mix(in srgb, var(--sg-satz-primary, var(--ast-global-color-0, #046bd2)) 45%, var(--sg-satz-border, #e6ddd0));
}

.sg-satz-user-tpl.is-active {
    border-color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    background: var(--sg-satz-tint-strong, color-mix(in srgb, var(--sg-satz-primary, #046bd2) 10%, #fff));
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    font-weight: 600;
}

.sg-satz-user-tpl-del {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    box-shadow: none;
    color: var(--ast-global-color-3, #6b6b6b);
    cursor: pointer;
    line-height: 1;
}

.sg-satz-user-tpl-del i {
    font-size: 0.72rem;
    opacity: 0.7;
}

.sg-satz-user-tpl-del:hover {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, white);
    border-color: transparent;
    color: var(--ast-global-color-0, #046bd2);
}

.sg-satz-user-tpl-del:hover i {
    opacity: 1;
}

@media (max-width: 720px) {
    .sg-satz-source-actions-grid,
    .sg-satz-prep-utils {
        grid-template-columns: 1fr;
    }

    .sg-satz-expert-card,
    .sg-satz-expert-card.sg-satz-layout-section,
    .sg-satz-expert-card.sg-satz-user-bar,
    .sg-satz-expert-card.sg-satz-source-actions {
        padding: 16px 14px 18px;
    }

    .sg-satz-expert-stack {
        gap: 14px;
    }

    .sg-satz-source-action-button .ast-button {
        max-width: none;
    }

    .sg-satz-unlock-success {
        grid-template-columns: 1fr;
    }

    .sg-satz-unlock-success-icon {
        display: none;
    }

    .sg-satz-unlock-success-content {
        grid-template-columns: 1fr;
    }

    .sg-satz-unlock-success-content > .sg-satz-reupload-cta {
        grid-column: 1;
        justify-self: start;
    }

    /* Keep one compact row (avoid ~89px stacked rows in the narrow agent pane). */
    .scribigo-satz-heading {
        grid-template-columns: minmax(0, 1fr) auto minmax(5.5rem, 6.5rem) auto auto auto;
        gap: 4px 6px;
        padding: 4px 4px;
    }

    .scribigo-satz-heading.is-inline {
        grid-template-columns: minmax(0, 1fr) auto auto auto;
    }

    .scribigo-satz-heading .satz-role {
        max-width: 6.5rem;
        min-width: 0;
    }

    .scribigo-satz-heading-main {
        grid-column: auto;
        min-width: 0;
    }

    .scribigo-satz-panel--chrome,
    .scribigo-satz-panel {
        --sg-satz-pad-x: 16px;
        --sg-satz-pad-y: 8px;
        --sg-satz-footer-safe-left: 16px;
        --sg-satz-footer-safe-right: 16px;
        padding: var(--sg-satz-pad-y) var(--sg-satz-pad-x) 0;
    }

    #agentSatzContent,
    .scribigo-satz-root {
        padding-bottom: 0;
    }

    .sg-satz-specimen--large,
    .sg-satz-specimen--spread,
    .sg-satz-vorlage-pair {
        grid-template-columns: 1fr 1fr;
    }

    .sg-satz-specimen-book {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sg-satz-specimen-book .sg-satz-specimen-stage {
        flex: 1 1 100%;
        order: -1;
    }

    .sg-satz-specimen-book .sg-satz-specimen {
        flex: 1 1 auto;
        min-width: 0;
    }

    .sg-satz-specimen-pager-row {
        padding-inline: 0;
    }

    .sg-satz-genre-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .sg-satz-genre-card {
        padding: 8px;
    }
}

/* Lovable-adapted chrome: Stage tokens, not a pixel clone. */
.sg-satz-eyebrow {
    margin: 0 0 6px;
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sg-satz-page-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-page-lead {
    margin: 8px 0 0;
    max-width: 40rem;
    color: var(--sg-satz-muted, var(--ast-global-color-3, #656d76));
    font-size: 0.92rem;
    line-height: 1.5;
}

.sg-satz-page-head {
    margin: 0 0 10px;
}

.sg-satz-surface {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: var(--sg-chrome-radius, 14px);
    background: var(--sg-satz-surface, #fff);
    box-shadow: var(--sg-satz-card-shadow, none);
}

.sg-satz-split,
.sg-satz-tab-panel,
.sg-satz-tab-panels {
    width: 100%;
    max-width: none;
}

#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    container-type: inline-size;
    container-name: sg-satz-toolbar;
}

#agentSatzContent input.sg-satz-tracking-range {
    min-height: 0;
    height: 4px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: color-mix(in srgb, var(--sg-satz-text, #2c3f42) 14%, #e8edf2);
    accent-color: var(--sg-satz-text, #2c3f42);
}

.sg-satz-split {
    display: grid;
    gap: 16px;
}

.sg-satz-split--layout {
    align-items: start;
}

@media (min-width: 900px) {
    .sg-satz-split--info {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: stretch;
    }

    .sg-satz-split--buch {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .sg-satz-split--buch > .sg-satz-span-2 {
        grid-column: 1 / -1;
    }

    .sg-satz-split--prep {
        grid-template-columns: 0.85fr 1.15fr;
        align-items: start;
    }

    .sg-satz-split--layout {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
        gap: 16px;
    }

    .sg-satz-split--export {
        grid-template-columns: 0.72fr 1.28fr;
        align-items: start;
    }

    .sg-satz-split--layout .sg-satz-layout-preview {
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        max-height: calc(100dvh - 13.5rem);
        min-height: 0;
        overflow: hidden;
    }

    .sg-satz-split--layout .sg-satz-specimen-frame {
        flex: 1 1 auto;
        min-height: 0;
        max-height: min(36rem, calc(100dvh - 22rem));
        overflow: hidden;
        margin-bottom: 8px;
    }

    .sg-satz-split--layout .sg-satz-specimen--large .sg-satz-preview-page {
        max-height: min(28rem, calc(100dvh - 28rem));
    }
}

.sg-satz-split-side,
.sg-satz-split-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.sg-satz-book-intro {
    display: flex;
    min-height: 180px;
    max-width: 28rem;
    margin: 8px 0 18px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: var(--sg-chrome-radius-sm, 6px);
    background: color-mix(in srgb, var(--sg-satz-tint, #f7f9fb) 55%, #fff);
    text-align: center;
}

.sg-satz-book-intro span {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sg-satz-book-intro i {
    margin-top: 6px;
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    font-style: italic;
}

.sg-satz-book-intro b {
    margin-top: 1.6rem;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sg-satz-muted, #646970);
}

.sg-satz-info-hero {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.sg-satz-info-hero .sg-satz-cta-row {
    margin-top: auto;
}

.sg-satz-info-meta {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: var(--sg-chrome-radius-sm, 6px);
    background: color-mix(in srgb, var(--sg-satz-tint, #f7f9fb) 60%, #fff);
}

.sg-satz-info-meta-row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.6rem;
    margin: 0;
}

.sg-satz-info-meta-row dt {
    margin: 0;
    color: var(--sg-satz-muted, #646970);
    font-size: 0.75rem;
    font-weight: 650;
}

.sg-satz-info-meta-row dd {
    margin: 0;
    min-width: 0;
    font-size: 0.92rem;
}

.sg-satz-info-meta-row--blurb {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0.35rem;
}

.sg-satz-info-meta-blurb {
    color: var(--sg-satz-text, #2c3f42);
    line-height: 1.45;
}

.sg-satz-info-docmeta {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.sg-satz-info-blurb {
    margin: 0;
}

.sg-satz-info-blurb-label {
    margin: 0 0 0.35rem;
    color: var(--sg-satz-muted, #646970);
    font-size: 0.75rem;
    font-weight: 650;
}

.sg-satz-info-blurb-text {
    margin: 0;
    max-height: 12.5rem;
    overflow: auto;
    color: var(--sg-satz-text, #2c3f42);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sg-satz-info-card--standard > p + p,
.sg-satz-info-card--standard > p + .sg-satz-info-suitable,
.sg-satz-info-card--standard > .sg-satz-info-suitable + p {
    margin-top: 1.15rem;
}

.sg-satz-info-suitable {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 1.15rem 0 0;
    color: #2f7d4a;
    font-size: 0.88rem;
}

.sg-satz-info-suitable i {
    margin-top: 3px;
}

.sg-satz-info-card .sg-satz-info-value {
    margin-top: 1.15rem;
    font-size: 0.88rem;
    line-height: 1.45;
}

.sg-satz-page-clusters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--sg-satz-text) 12%, var(--sg-satz-surface, #fff));
}

.sg-satz-page-cluster {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.sg-satz-page-cluster-toggles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.sg-satz-page-cluster .sg-satz-tracking-wrap {
    margin: 0;
    padding: 0;
}

.sg-satz-chapter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px 18px;
    align-items: start;
}

.sg-satz-chapter-grid > * {
    min-width: 0;
    align-self: stretch;
    margin-top: 0;
}

.sg-satz-chapter-grid .sg-satz-toggle-line {
    min-height: 2.9rem;
}

.sg-satz-chapter-grid .sg-satz-toggle-line-copy {
    min-width: 0;
}

.sg-satz-chapter-grid .sg-satz-toggle-line-label {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-satz-chapter-grid .sg-satz-tracking-wrap {
    margin: 0;
    padding: 0;
}

.sg-satz-chapter-grid .scribigo-satz-field,
.sg-satz-chapter-grid .sg-satz-tracking-wrap > .scribigo-satz-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.sg-satz-chapter-grid .scribigo-satz-field > span:not(.sg-satz-tracking-label-row) {
    display: block;
    min-height: 1.25em;
    line-height: 1.25;
    margin: 0;
}

.sg-satz-margins-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 672px) {
    .sg-satz-split--layout .sg-satz-page-cluster-toggles,
    .sg-satz-split--layout .sg-satz-page-cluster--einzug,
    .sg-satz-split--layout .sg-satz-margins-grid,
    .sg-satz-split--layout .sg-satz-chapter-grid,
    .sg-satz-split--layout .sg-satz-kopf-grid,
    .sg-satz-split--layout .sg-satz-layout-section .scribigo-satz-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: stretch;
        margin-top: 0;
    }

    .sg-satz-split--layout .sg-satz-page-cluster--einzug {
        display: grid;
        align-items: start;
        gap: 12px 16px;
    }

    .sg-satz-split--layout .sg-satz-page-clusters {
        margin-top: 1rem;
    }

    .sg-satz-split--layout .sg-satz-margins-grid .scribigo-satz-field,
    .sg-satz-split--layout .sg-satz-chapter-grid .scribigo-satz-field,
    .sg-satz-split--layout .sg-satz-chapter-grid .scribigo-satz-select,
    .sg-satz-split--layout .sg-satz-chapter-grid .scribigo-satz-input,
    .sg-satz-split--layout .sg-satz-layout-section .scribigo-satz-grid .scribigo-satz-field,
    .sg-satz-split--layout .sg-satz-layout-section .scribigo-satz-grid .scribigo-satz-select {
        width: 100%;
        max-width: none;
    }
}

.sg-satz-info-list {
    list-style: none;
    padding-left: 0;
}

.sg-satz-info-list li {
    position: relative;
    padding-left: 1rem;
}

.sg-satz-info-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
}

#agentSatzContent .sg-satz-switch,
.scribigo-satz-panel--chrome .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;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    cursor: pointer;
}

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

.sg-satz-switch-ui {
    display: block;
    width: 2.1rem;
    height: 1.2rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sg-satz-text) 18%, var(--sg-satz-surface, #fff));
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    position: relative;
    pointer-events: none;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.sg-satz-switch-ui::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: transform 0.16s ease;
}

.sg-satz-switch input:checked + .sg-satz-switch-ui {
    background: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    border-color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
}

.sg-satz-switch input:checked + .sg-satz-switch-ui::after {
    transform: translateX(0.88rem);
}

.sg-satz-switch input:focus-visible + .sg-satz-switch-ui {
    outline: 2px solid var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    outline-offset: 2px;
}

.sg-satz-switch input:disabled + .sg-satz-switch-ui {
    opacity: 0.45;
}

.sg-satz-toggle-line {
    display: flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text) 14%, var(--sg-satz-surface, #fff));
    border-radius: 8px;
    background: color-mix(in srgb, var(--sg-satz-surface, #fff) 96%, transparent);
    font-size: 0.82rem;
    pointer-events: none;
}

.sg-satz-toggle-line-copy {
    min-width: 0;
    flex: 1 1 auto;
    pointer-events: none;
}

.sg-satz-toggle-line.is-disabled,
.sg-satz-tracking-wrap.is-disabled,
.scribigo-satz-field.is-disabled {
    opacity: 0.55;
}

.sg-satz-tracking-wrap.is-disabled .sg-satz-tracking-range,
.sg-satz-tracking-wrap.is-disabled .sg-satz-tracking-nudge,
.scribigo-satz-field.is-disabled select,
.scribigo-satz-field.is-disabled input {
    cursor: not-allowed;
}

.sg-satz-toggle-line-label {
    font-weight: 600;
}

.sg-satz-toggle-line-hint {
    display: block;
    margin-top: 2px;
    color: var(--sg-satz-muted, #646970);
    font-weight: 400;
    font-size: 0.75rem;
}

.sg-satz-headings-bulk-checks {
    display: grid;
    gap: 10px;
}

@media (min-width: 640px) {
    .sg-satz-headings-bulk-checks {
        grid-template-columns: 1fr 1fr;
    }
}

.sg-satz-task-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--sg-satz-text) 14%, var(--sg-satz-surface, #fff));
    border-radius: 8px;
    background: color-mix(in srgb, var(--sg-satz-surface, #fff) 96%, transparent);
}

.sg-satz-task-index {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    flex: none;
    place-items: center;
    border-radius: 50%;
    background: var(--sg-satz-tint-strong, color-mix(in srgb, var(--sg-satz-primary, #046bd2) 12%, #fff));
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    font-size: 0.68rem;
    font-weight: 700;
}

.sg-satz-prep-card {
    padding: 22px 24px 24px;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: var(--sg-chrome-radius, 14px);
    background: var(--sg-satz-surface, #fff);
    box-shadow: var(--sg-satz-card-shadow, none);
}

.sg-satz-prep-tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.sg-satz-prep-document {
    margin-top: 0.25rem;
}

.sg-satz-prep-utils {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sg-satz-heading-row.scribigo-satz-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-left: calc((var(--satz-heading-level, 1) - 1) * 1.4rem);
    padding: 12px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--sg-satz-text) 10%, var(--sg-satz-surface, #fff));
    background: color-mix(in srgb, var(--sg-satz-surface, #fff) 88%, var(--sg-satz-tint, #f7f9fb));
}

.sg-satz-heading-spinner {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    transform: translateY(-50%);
    color: var(--sg-satz-primary, var(--ast-global-color-0, #046bd2));
    pointer-events: none;
}

.sg-satz-headings-card {
    position: relative;
}

.sg-satz-headings-card.is-heading-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: color-mix(in srgb, var(--sg-satz-surface, #fff) 22%, transparent);
    pointer-events: none;
}

.sg-satz-headings-card.is-heading-busy,
.sg-satz-heading-row.is-busy {
    opacity: 0.78;
}

.sg-satz-heading-row {
    position: relative;
}

.scribigo-satz-headings {
    overflow: hidden;
    padding: 0.4rem 0.55rem 0.55rem 0.85rem;
    border: 1px solid var(--sg-satz-border, var(--sg-chrome-hairline, #e6ddd0));
    border-radius: var(--sg-chrome-radius-sm, 6px);
}

.scribigo-satz-heading-main {
    min-width: 0;
    flex: 1 1 10rem;
}

.scribigo-satz-heading-meta {
    margin: 2px 0 0;
    font-size: 0.72rem;
    color: var(--sg-satz-muted, #646970);
}

.sg-satz-tab-panel[data-satz-pane="buch"],
.sg-satz-tab-panel[data-satz-pane="layout"],
.sg-satz-tab-panel[data-satz-pane="ueberschriften"],
.sg-satz-tab-panel[data-satz-pane="export"],
.sg-satz-tab-panel[data-satz-pane="info"] {
    padding: 0 0 12px;
    background: transparent;
}

.sg-satz-tab-panel[data-satz-pane="vorlage"] {
    background: transparent;
}

#sgSatzWizardBack[hidden],
#sgSatzWizardNext[hidden],
#sgSatzWizardOverview[hidden] {
    display: none !important;
}

.sg-satz-chrome-footer #sgSatzWizardBack .fas {
    margin-right: 0.25rem;
}

/* Numbered step pills in Zeile-2, Stage colors. */
#agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-satz,
#sgSatzToolbarMount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    width: auto;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-mark {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: none;
    place-items: center;
    border-radius: var(--sg-chrome-radius-sm, 6px);
    background: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
    color: #fff;
    font-weight: 700;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 0.4rem;
    line-height: 1.2;
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-brand-kicker {
    font-size: 0.78rem;
    font-weight: 650;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-brand-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
    font-size: 0.72rem;
    color: var(--ast-global-color-3, #646970);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 6px;
    overflow: visible;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 7%, #fff);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab {
    height: auto;
    min-height: 0;
    max-height: none;
    min-width: 0;
    padding: 0.5rem 0.9rem;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ast-global-color-3, #646970);
    font-size: 0.75rem !important;
    font-weight: 550 !important;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab-num {
    font-weight: 700;
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #1d2327));
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab.is-active {
    background: color-mix(in srgb, var(--sg-chrome-primary, #046bd2) 16%, #fff);
    border-color: transparent;
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #1d2327));
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab.is-active .sg-satz-tab-num {
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #1d2327));
}

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-copy {
    display: block;
    text-align: right;
    line-height: 1.2;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ast-global-color-3, #646970);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-count {
    font-size: 0.8rem;
    font-weight: 650;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-track {
    width: 5.5rem;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, #fff);
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: var(--sg-chrome-primary, var(--ast-global-color-0, #046bd2));
}

@container sg-satz-toolbar (max-width: 900px) {
    .sg-satz-chrome-progress-label {
        display: none;
    }

    .sg-satz-tab {
        padding: 0.4rem 0.55rem;
    }

    .sg-satz-tabs {
        gap: 4px;
        padding: 4px;
    }

    .sg-satz-chrome-progress-track {
        width: 4rem;
    }

    .toolbar-group-feedback,
    #sgToolbarFeedbackMount {
        flex: 1 1 100%;
        justify-content: flex-end;
        margin-left: auto;
    }
}

@media (max-width: 900px) {
    #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-chrome-progress-label {
        display: none;
    }

    #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab,
    #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tab {
        padding: 0.4rem 0.55rem;
    }

    #scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-feedback,
    #scribigo-agent-chat[data-preview-tab="satz"] #sgToolbarFeedbackMount {
        flex: 1 1 100%;
        justify-content: flex-end;
    }
}

#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar .sg-satz-tab-label,
#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tab-label,
#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-chrome-brand-copy,
#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-chrome-progress-copy {
    display: inline !important;
}

#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-chrome-brand-copy,
#scribigo-agent-chat[data-preview-tab="satz"] #agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-chrome-progress-copy {
    display: flex !important;
}

#agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tab {
    width: auto;
    min-width: 0;
    padding: 0.5rem 0.85rem;
}

#agentPreviewToolbar.scribigo-context-toolbar.is-icon-labels .sg-satz-tab-num {
    display: inline;
}
