/**
 * Shared App Chrome — layout shell only (Astra tokens, chrome-owned chrome).
 */

:root {
    --sg-sidebar-width: 256px;
    --sg-sidebar-rail: 72px;
    --sg-row1-height: 60px;
    --sg-row2-height: 44px;
    --sg-cluster-height: 44px;
    --sg-bottom-nav-height: 56px;
    --sg-world-strip-height: 36px;
    --sg-chrome-radius: 14px;
    --sg-chrome-radius-lg: 10px;
    --sg-chrome-radius-md: 8px;
    --sg-chrome-radius-sm: 6px;
    --sg-chrome-primary: var(--ast-global-color-0);
    --sg-chrome-primary-fg: var(--ast-global-color-2, #2c3f42);
    --sg-chrome-hairline: color-mix(in srgb, var(--ast-global-color-0) 16%, var(--ast-global-color-5, #f9f4ee));
    --sg-chrome-card: #fff;
    --sg-sidebar-accent: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 10%, var(--ast-global-color-5, #f9f4ee));
    --sg-sidebar-accent-active: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, var(--ast-global-color-5, #f9f4ee));
    --sg-preview-min-width: 440px;
    --scribigo-safe-area-top: env(safe-area-inset-top, 0px);
}

/* Old agent billing/status row was remounted into Zeile 1. Hide leftovers. */
body.scribigo-app-chrome .scribigo-agent-toolbar,
body.scribigo-app-chrome .scribigo-status-bar,
body.scribigo-app-chrome #scribigoStatus,
body.scribigo-app-chrome #agentStatusBar,
body.scribigo-app-chrome .agent-input-hint,
body.scribigo-app-chrome .scribigo-status-toolbar,
body.scribigo-app-chrome .agent-scribits-toolbar:not(.scribigo-scribits-tank__btn),
body.scribigo-app-chrome .scribigo-scribits-tank__wash,
body.scribigo-app-chrome .agent-scribits-balance .scribigo-quota-gauge,
body.scribigo-app-chrome .scribigo-demo-mode-banner--global {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.scribigo-app-chrome #masthead,
body.scribigo-app-chrome .ast-desktop-header,
body.scribigo-app-chrome .ast-mobile-header-wrap,
body.scribigo-app-chrome .ast-main-header-wrap,
body.scribigo-app-chrome .main-header-bar-wrap {
    display: none !important;
}

.scribigo-app-chrome-shell {
    --sg-sidebar-current: var(--sg-sidebar-width);
}

body.scribigo-app-chrome--site {
    padding-top: var(--scribigo-chrome-bar-height, var(--sg-row1-height));
    padding-left: var(--sg-sidebar-width);
    box-sizing: border-box;
}

body.scribigo-app-chrome--site .scribigo-app-chrome-shell--site {
    position: static;
}

body.scribigo-app-chrome--site .scribigo-app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 99980;
}

body.scribigo-app-chrome--site .scribigo-app-chrome-bar {
    position: fixed;
    top: 0;
    left: var(--sg-sidebar-width);
    right: 0;
    width: auto;
    z-index: 99990;
}

body.admin-bar.scribigo-app-chrome--site {
    padding-top: calc(var(--scribigo-chrome-bar-height, var(--sg-row1-height)) + 32px);
}

body.admin-bar.scribigo-app-chrome--site .scribigo-app-sidebar,
body.admin-bar.scribigo-app-chrome--site .scribigo-app-chrome-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar.scribigo-app-chrome--site {
        padding-top: calc(var(--scribigo-chrome-bar-height, var(--sg-row1-height)) + 46px);
    }

    body.admin-bar.scribigo-app-chrome--site .scribigo-app-sidebar,
    body.admin-bar.scribigo-app-chrome--site .scribigo-app-chrome-bar {
        top: 46px;
    }
}

body.scribigo-app-chrome--agent .scribigo-agent-container,
#scribigo-agent-chat.scribigo-app-chrome-shell {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

body.admin-bar.scribigo-app-chrome--agent .scribigo-agent-container,
body.admin-bar #scribigo-agent-chat.scribigo-app-chrome-shell {
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar.scribigo-app-chrome--agent .scribigo-agent-container,
    body.admin-bar #scribigo-agent-chat.scribigo-app-chrome-shell {
        height: calc(100vh - 46px);
        max-height: calc(100vh - 46px);
    }
}

body.scribigo-app-chrome .scribigo-app-sidebar,
body.scribigo-app-chrome .scribigo-app-chrome-bar,
body.scribigo-app-chrome #scribigoGlobalMenubar,
body.scribigo-app-chrome .scribigo-mobile-navs,
body.scribigo-app-chrome .scribigo-world-strip,
body.scribigo-app-chrome .scribigo-bottom-nav,
body.scribigo-app-chrome .scribigo-more-sheet {
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
}

body.scribigo-app-chrome .scribigo-app-sidebar button,
body.scribigo-app-chrome .scribigo-app-sidebar a:not(.scribigo-app-brand),
body.scribigo-app-chrome .scribigo-app-chrome-bar button,
body.scribigo-app-chrome .scribigo-app-chrome-bar a,
body.scribigo-app-chrome #scribigoGlobalMenubar button,
body.scribigo-app-chrome #scribigoGlobalMenubar a,
body.scribigo-app-chrome .scribigo-mobile-navs button,
body.scribigo-app-chrome .scribigo-mobile-navs a,
body.scribigo-app-chrome .scribigo-world-strip button,
body.scribigo-app-chrome .scribigo-world-strip a,
body.scribigo-app-chrome .scribigo-bottom-nav button,
body.scribigo-app-chrome .scribigo-bottom-nav a,
body.scribigo-app-chrome .scribigo-more-sheet button,
body.scribigo-app-chrome .scribigo-more-sheet a {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: inherit !important;
}

.scribigo-app-sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--sg-sidebar-width);
    width: var(--sg-sidebar-width);
    background: var(--ast-global-color-5, #f9f4ee);
    border-right: 1px solid var(--sg-chrome-hairline);
    overflow: visible;
    box-sizing: border-box;
    padding: 16px 12px;
}

.scribigo-app-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px 20px;
    flex-shrink: 0;
}

.scribigo-app-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--ast-global-color-0, #046bd2);
    text-decoration: none;
}

.scribigo-app-brand__logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.scribigo-app-brand__favicon {
    display: none;
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.scribigo-app-brand > .scribigo-app-brand__favicon:first-child {
    display: block;
}

.scribigo-app-brand__name {
    display: none !important;
}

.scribigo-app-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--sg-chrome-radius-md);
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 16%, white);
    color: var(--ast-global-color-0, #046bd2);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.scribigo-app-brand__logo ~ .scribigo-app-brand__mark {
    display: none;
}

.scribigo-app-sidebar__collapse {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 6px;
    margin: 0;
    border: none !important;
    border-radius: var(--sg-chrome-radius-lg);
    background: transparent !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 70%, transparent) !important;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
    appearance: none;
}

.scribigo-app-sidebar__collapse:hover {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, white);
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-app-sidebar__collapse:disabled {
    opacity: 0.4;
    cursor: default;
}

.scribigo-app-sidebar__collapse-icon--open {
    display: none;
}

.scribigo-chrome-svg {
    display: block;
    flex-shrink: 0;
}

.scribigo-chrome-svg--14 {
    width: 14px;
    height: 14px;
}

.scribigo-chrome-svg--16 {
    width: 16px;
    height: 16px;
}

.scribigo-chrome-svg--18 {
    width: 18px;
    height: 18px;
}

.scribigo-chrome-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.scribigo-app-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.scribigo-app-nav__main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.scribigo-app-nav__group,
.scribigo-app-nav__footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scribigo-app-nav__footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--sg-chrome-hairline);
}

.scribigo-app-nav__item.toolbar-dropdown-trigger {
    width: 100%;
    height: 40px;
    min-height: 0;
    background: transparent;
    border: none;
    border-radius: var(--sg-chrome-radius-lg);
    box-shadow: none;
}

.scribigo-app-nav__world-head {
    padding: 0 12px 6px;
}

.scribigo-app-nav__rule-label,
.scribigo-app-sidebar .rule-label {
    margin: 0 0 2px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--ast-global-color-3, #646970);
}

.scribigo-app-nav__world-meta {
    margin: 0;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 70%, transparent);
}

.scribigo-app-nav__rail-rule {
    display: none;
    height: 0;
    margin: 0 4px 8px;
    border-top: 1px solid var(--sg-chrome-hairline);
}

.scribigo-app-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    min-height: 0;
    padding: 0 12px;
    border: none;
    border-radius: var(--sg-chrome-radius-lg);
    background: transparent;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 80%, transparent);
    font: inherit;
    font-weight: 400;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.2;
}

.scribigo-app-nav__item:hover:not(.is-disabled),
.scribigo-app-nav__item:focus-visible:not(.is-disabled) {
    background: var(--sg-sidebar-accent);
    color: var(--ast-global-color-2, #1d2327);
    filter: none;
}

.scribigo-app-nav__item.is-disabled,
.scribigo-app-nav__item[aria-disabled="true"] {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}

.scribigo-app-nav__item.is-active,
.scribigo-app-nav__item[aria-current="page"] {
    background: var(--sg-sidebar-accent-active);
    color: var(--ast-global-color-2, #1d2327);
    font-weight: 600;
    filter: none;
}

.scribigo-app-nav__item i,
.scribigo-app-nav__item .scribigo-chrome-svg {
    width: 18px;
    height: 18px;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 60%, transparent);
    flex-shrink: 0;
}

.scribigo-app-nav__item.is-active i {
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-app-nav__dropdown {
    position: relative;
    width: 100%;
}

.scribigo-app-nav__footer .toolbar-dropdown-menu,
.scribigo-app-nav__dropdown .toolbar-dropdown-menu,
#toolbarMenuShop,
#toolbarMenuHelp {
    position: absolute;
    left: 0;
    right: auto;
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 6px;
    width: 16rem;
    min-width: 14rem;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 100020;
}

body.scribigo-app-chrome--rail .scribigo-app-nav__footer .toolbar-dropdown-menu,
body.scribigo-app-chrome--rail .scribigo-app-nav__dropdown .toolbar-dropdown-menu,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__footer .toolbar-dropdown-menu,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__dropdown .toolbar-dropdown-menu {
    left: calc(100% + 8px);
    bottom: 0;
    margin-bottom: 0;
}

.scribigo-app-chrome-bar {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    height: var(--sg-row1-height);
    min-height: var(--sg-row1-height);
    max-height: var(--sg-row1-height);
    background: var(--ast-global-color-5, #f9f4ee);
    border-bottom: 1px solid var(--sg-chrome-hairline);
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    z-index: 100010;
    overflow: visible;
    isolation: isolate;
}

.scribigo-app-chrome-bar.scribigo-app-chrome-bar--with-banner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    max-height: none;
}

.scribigo-app-chrome-bar--with-banner .scribigo-global-menubar {
    width: 100%;
    flex-shrink: 0;
}

/*
 * 100010 keeps Zeile-1 dropdowns above page content. Dialog overlays live at
 * 100050; nested info overlays (instruction) at 100060. Lower the bar only
 * while a real modal is open — not for dropdowns.
 */
body.scribigo-app-chrome:has(.sg-dialog:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.scribigo-dialog-overlay:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.scribigo-dialog-overlay--nested:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.scribigo-generic-modal:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.scribigo-download-format-modal:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.agent-paste-dialog-overlay:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.scribigo-analysis-improve-loading-modal:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.comment-edit-dialog-overlay:not([hidden])) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(#sgoLtBaselineOverlay) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.sgo-lt-baseline-overlay) .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.sgo-doc-ready-overlay) .scribigo-app-chrome-bar {
    z-index: 1;
}

/*
 * Driver.js overlay is 99000 / popover 99001. Flatten chrome stacking so the
 * whole bar (and site sidebar / mobile navs) sit under the dim. isolation:
 * isolate plus z-index 100010 was punching the entire Zeile 1 through even
 * when only one control should be highlighted.
 */
body.scribigo-app-chrome.driver-active .scribigo-app-chrome-bar,
body.scribigo-app-chrome:has(.driver-overlay) .scribigo-app-chrome-bar {
    z-index: auto;
    isolation: auto;
}

body.scribigo-app-chrome--site.driver-active .scribigo-app-sidebar,
body.scribigo-app-chrome--site:has(.driver-overlay) .scribigo-app-sidebar,
body.scribigo-app-chrome.driver-active .scribigo-mobile-navs,
body.scribigo-app-chrome:has(.driver-overlay) .scribigo-mobile-navs {
    z-index: auto;
}

body.scribigo-app-chrome .scribigo-dialog-overlay,
body.scribigo-app-chrome .scribigo-generic-modal,
body.scribigo-app-chrome .scribigo-download-format-modal,
body.scribigo-app-chrome .agent-paste-dialog-overlay,
body.scribigo-app-chrome .scribigo-analysis-improve-loading-modal,
body.scribigo-app-chrome .comment-edit-dialog-overlay,
body.scribigo-app-chrome #sgoLtBaselineOverlay,
body.scribigo-app-chrome .sgo-lt-baseline-overlay,
body.scribigo-app-chrome .sgo-doc-ready-overlay {
    z-index: 100050;
}

body.scribigo-app-chrome .scribigo-dialog-overlay--nested,
body.scribigo-app-chrome #instruction-modal {
    z-index: 100060;
}

.scribigo-chrome-menu-toggle,
#toolbarMainMenuToggle {
    display: none !important;
}

.scribigo-chrome-menu-toggle:hover,
.scribigo-chrome-menu-toggle.menu-open,
.scribigo-chrome-menu-toggle.active {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, white);
    border-color: var(--ast-global-color-0, #046bd2);
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-global-menubar {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    flex-shrink: 0;
    padding: 8px 12px;
    box-sizing: border-box;
    min-width: 0;
    height: var(--sg-row1-height);
    min-height: var(--sg-row1-height);
    max-height: var(--sg-row1-height);
}

@media (min-width: 1024px) {
    .scribigo-global-menubar {
        padding: 8px 20px;
    }
}

.scribigo-row1-left,
.scribigo-row1-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.scribigo-row1-left {
    flex: 1 1 auto;
}

.scribigo-row1-right {
    flex: 1 1 auto;
    justify-content: flex-end;
    justify-self: end;
    gap: 12px;
    max-width: 100%;
}

.scribigo-row1-cluster {
    display: flex;
    align-items: center;
    min-width: 0;
    height: var(--sg-cluster-height);
    overflow: visible;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: #fff;
    box-sizing: border-box;
}

/* Stage can still serve row-1 without the cluster wrapper until PHP refreshes. */
.scribigo-row1-left:not(:has(.scribigo-row1-cluster)) {
    display: flex;
    align-items: center;
    min-width: 0;
    height: var(--sg-cluster-height);
    overflow: visible;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: #fff;
    box-sizing: border-box;
}

.scribigo-row1-left:not(:has(.scribigo-row1-cluster)) .scribigo-order-switcher {
    border-left: 1px solid var(--sg-chrome-hairline);
}

.scribigo-row1-cluster__rule {
    width: 1px;
    align-self: stretch;
    flex-shrink: 0;
    background: var(--sg-chrome-hairline);
}

.scribigo-new-order {
    display: flex;
    align-items: center;
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

.scribigo-row1-cluster .toolbar-dropdown-trigger,
.scribigo-row1-cluster .scribigo-new-order__primary,
.scribigo-row1-cluster .scribigo-new-order__split,
.scribigo-row1-cluster .scribigo-order-switcher__trigger {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
}

.scribigo-new-order__primary,
.scribigo-new-order__split {
    background: var(--sg-chrome-primary);
    color: #fff;
    font-weight: 500;
}

.scribigo-new-order__primary {
    gap: 8px;
    padding: 0 14px;
    border-top-left-radius: var(--sg-chrome-radius);
    border-bottom-left-radius: var(--sg-chrome-radius);
}

.scribigo-new-order__primary i,
.scribigo-new-order__primary svg {
    width: 16px;
    height: 16px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    fill: currentColor;
}

.scribigo-new-order__primary .menu-label {
    color: #fff;
}

.scribigo-new-order__split {
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 0;
    border-left-color: color-mix(in srgb, #fff 25%, transparent);
}

.scribigo-new-order__split i,
.scribigo-new-order__split svg {
    width: 16px;
    height: 16px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    fill: currentColor;
}

.scribigo-new-order__primary:hover,
.scribigo-new-order__split:hover,
.scribigo-new-order__primary.menu-open,
.scribigo-new-order__split.menu-open,
.scribigo-new-order__primary.active,
.scribigo-new-order__split.active {
    background: color-mix(in srgb, var(--sg-chrome-primary) 88%, black);
    border-color: transparent;
    color: #fff;
}

.scribigo-new-order__split:hover,
.scribigo-new-order__split.menu-open,
.scribigo-new-order__split.active {
    border-left-color: color-mix(in srgb, #fff 25%, transparent);
}

.scribigo-new-order__primary:hover i,
.scribigo-new-order__primary:hover svg,
.scribigo-new-order__primary:hover .menu-label,
.scribigo-new-order__split:hover i,
.scribigo-new-order__split:hover svg,
.scribigo-new-order__primary.menu-open i,
.scribigo-new-order__primary.menu-open svg,
.scribigo-new-order__primary.menu-open .menu-label,
.scribigo-new-order__split.menu-open i,
.scribigo-new-order__split.menu-open svg,
.scribigo-new-order__primary.active i,
.scribigo-new-order__primary.active svg,
.scribigo-new-order__split.active i,
.scribigo-new-order__split.active svg {
    color: #fff;
    fill: currentColor;
}

.scribigo-split-chevs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    opacity: 0.9;
}

.scribigo-split-chevs i {
    font-size: 14px;
}

.scribigo-order-switcher {
    display: flex;
    align-items: center;
    min-width: 18.75rem;
    flex: 1 1 200px;
    max-width: 420px;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

.scribigo-order-switcher__trigger {
    width: 100%;
    max-width: 100%;
    height: 100%;
    gap: 10px;
    padding: 0 14px;
    background: transparent;
    color: inherit;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 0;
    border-top-right-radius: var(--sg-chrome-radius);
    border-bottom-right-radius: var(--sg-chrome-radius);
}

.scribigo-order-switcher__trigger:hover,
.scribigo-order-switcher__trigger.menu-open,
.scribigo-order-switcher__trigger.active {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, white);
    border-color: transparent;
    color: inherit;
}

.scribigo-order-switcher__badge {
    display: none !important;
}

.scribigo-order-switcher__copy {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
    line-height: 1.25;
}

.scribigo-order-switcher__title,
.scribigo-order-switcher__empty,
.scribigo-order-switcher__meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scribigo-order-switcher__title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.scribigo-order-switcher__title[hidden],
.scribigo-order-switcher__meta[hidden] {
    display: none !important;
}

.scribigo-order-switcher__empty,
.scribigo-order-switcher__meta {
    color: var(--ast-global-color-3, #646970);
    font-size: 0.6875rem;
    line-height: 1.35;
}

.scribigo-order-switcher__meta {
    margin-top: 1px;
}

.scribigo-order-switcher__chevs {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--ast-global-color-3, #646970);
    opacity: 0.85;
}

.scribigo-row1-billing {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
}

.scribigo-scribits-tank {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 7.5rem;
    max-width: 14rem;
    height: var(--sg-cluster-height);
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
    overflow: hidden;
    position: relative;
}

.scribigo-scribits-tank[data-tank-bar="0"] {
    min-width: 0;
}

.scribigo-scribits-tank__wash {
    display: none !important;
}

.scribigo-scribits-tank__btn,
.scribigo-scribits-tank .agent-scribits-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 3px 6px;
    width: 100%;
    height: 100%;
    padding: 5px 10px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.scribigo-scribits-tank__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 100%;
}

.scribigo-scribits-tank__icon {
    width: 14px;
    height: 14px;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ast-global-color-0, #046bd2);
    flex-shrink: 0;
}

.scribigo-scribits-tank__count,
.scribigo-scribits-tank #agentScribitsBalance,
.scribigo-scribits-tank .agent-scribits-balance {
    white-space: nowrap;
    font-weight: 500;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.scribigo-scribits-tank__gauge,
.scribigo-scribits-tank .scribigo-quota-gauge--compact {
    display: block;
    width: 100%;
    height: 4px;
    min-height: 4px;
    max-height: 4px;
    flex: 1 0 100%;
    position: relative;
    z-index: 1;
    line-height: 0;
}

.scribigo-scribits-tank .scribigo-quota-gauge__track {
    display: block;
    height: 4px;
    min-height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ast-global-color-3, #646970) 16%, #fff);
}

.scribigo-scribits-tank .scribigo-quota-gauge__fill {
    left: 0;
    right: auto;
    width: calc(var(--fill-ratio, 0) * 100%);
    transform: none;
    transform-origin: 0% 50%;
    background: var(--ast-global-color-0, var(--sg-chrome-primary));
    border-radius: inherit;
}

.scribigo-scribits-tank .scribigo-quota-gauge.is-warning .scribigo-quota-gauge__fill {
    background: #d4a72c;
}

.scribigo-scribits-tank .scribigo-quota-gauge.is-danger .scribigo-quota-gauge__fill {
    background: #dc3545;
}

.scribigo-scribits-tank[data-tank-bar="0"] .scribigo-scribits-tank__gauge,
.scribigo-scribits-tank[data-tank-bar="0"] .scribigo-quota-gauge {
    display: none !important;
}

.scribigo-scribits-tank .scribigo-quota-gauge__sections {
    display: none !important;
}

.scribigo-scribits-tank .agent-scribits-help-btn {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: auto;
    height: auto;
}

.scribigo-scribits-tank .agent-scribits-buy-btn {
    display: none !important;
}

.scribigo-scribits-tank .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    border: 0;
}

body:not(.logged-in) #scribigoScribitsTank,
body:not(.logged-in) .scribigo-scribits-tank {
    display: none !important;
}

.scribigo-profile-menu {
    position: relative;
    margin-right: 0;
    min-width: 0;
    max-width: 14rem;
    flex: 0 1 auto;
}

.scribigo-profile-menu--guest {
    max-width: 22rem;
    flex: 0 0 auto;
}

.scribigo-profile-menu__trigger {
    height: var(--sg-cluster-height);
    min-height: 0;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: #fff;
}

/* Clone of .scribigo-new-order__primary (standalone: full radius, not split). */
.scribigo-profile-menu__trigger--login {
    min-width: 44px;
    gap: 8px;
    padding: 0 16px;
    background: var(--sg-chrome-primary);
    color: #fff;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--sg-chrome-radius);
}

.scribigo-profile-menu__trigger--login i,
.scribigo-profile-menu__trigger--login svg {
    width: 16px;
    height: 16px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    fill: currentColor;
}

.scribigo-profile-menu__login-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #fff;
}

.scribigo-profile-menu__login-label--short {
    display: none;
}

.scribigo-profile-menu__trigger:hover,
.scribigo-profile-menu__trigger.menu-open,
.scribigo-profile-menu__trigger.active {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, white);
    border-color: var(--sg-chrome-hairline);
    color: inherit;
}

.scribigo-profile-menu__trigger--login:hover,
.scribigo-profile-menu__trigger--login.menu-open,
.scribigo-profile-menu__trigger--login.active,
.scribigo-profile-menu__trigger--login:focus-visible {
    background: color-mix(in srgb, var(--sg-chrome-primary) 88%, black);
    border-color: transparent;
    color: #fff;
}

.scribigo-profile-menu__trigger--login:hover i,
.scribigo-profile-menu__trigger--login:hover svg,
.scribigo-profile-menu__trigger--login:hover .scribigo-profile-menu__login-label,
.scribigo-profile-menu__trigger--login:focus-visible i,
.scribigo-profile-menu__trigger--login:focus-visible svg,
.scribigo-profile-menu__trigger--login:focus-visible .scribigo-profile-menu__login-label,
.scribigo-profile-menu__trigger--login.menu-open i,
.scribigo-profile-menu__trigger--login.menu-open svg,
.scribigo-profile-menu__trigger--login.menu-open .scribigo-profile-menu__login-label,
.scribigo-profile-menu__trigger--login.active i,
.scribigo-profile-menu__trigger--login.active svg,
.scribigo-profile-menu__trigger--login.active .scribigo-profile-menu__login-label {
    color: #fff;
    fill: currentColor;
}

.scribigo-profile-menu__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--sg-chrome-radius-lg);
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 18%, white);
    color: var(--ast-global-color-0, #046bd2);
    font-weight: 600;
    flex-shrink: 0;
}

.scribigo-profile-menu__copy {
    display: none;
    min-width: 0;
    max-width: 11rem;
    overflow: hidden;
    line-height: 1.25;
    text-align: left;
}

.scribigo-profile-menu__name,
.scribigo-profile-menu__tariff {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scribigo-profile-menu__name {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.scribigo-profile-menu__tariff {
    color: var(--ast-global-color-3, #646970);
    font-size: 0.6875rem;
    line-height: 1.35;
}

.scribigo-profile-menu__heading {
    padding: 10px 12px 8px;
    line-height: 1.25;
}

.scribigo-profile-menu__heading strong {
    display: block;
}

.scribigo-profile-menu__heading span {
    display: block;
    color: var(--ast-global-color-3, #646970);
    font-weight: 400;
}

.scribigo-chrome-legacy-menus[hidden] {
    display: none !important;
}

.toolbar-dropdown {
    position: relative;
}

.toolbar-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    height: var(--sg-cluster-height);
    min-height: 0;
    background: #fff;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    font-weight: 500 !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    color: var(--ast-global-color-2, #1d2327);
    cursor: pointer;
    font-family: inherit !important;
    box-shadow: none;
    outline: none;
    line-height: 1.2;
}

.toolbar-dropdown-trigger:hover,
.toolbar-dropdown-trigger.menu-open,
.toolbar-dropdown-trigger.active {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, white);
    border-color: var(--sg-chrome-hairline);
    color: inherit;
}

.toolbar-dropdown-trigger.is-disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

.toolbar-dropdown-menu,
.toolbar-dropdown-submenu,
.dropdown-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 14rem;
    background: #fff;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 4px;
    overflow: hidden;
}

#toolbarMenuAccount {
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    min-width: 16rem;
    margin-top: 4px;
    padding: 4px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100020;
    overflow: hidden;
}

#toolbarMenuAccount .dropdown-item {
    padding: 8px 12px;
}

#toolbarMenuAccount .scribigo-profile-menu__pane[hidden] {
    display: none !important;
}

#toolbarMenuAccount .scribigo-profile-menu__drill .submenu-arrow,
#toolbarMenuAccount .scribigo-profile-menu__back i {
    margin-left: auto;
}

#toolbarMenuHelpProfile {
    position: static;
    display: block;
    left: auto;
    top: auto;
    margin: 0;
    padding: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background: transparent;
}

#toolbarSubmenuRecentOrders {
    display: flex;
    flex-direction: column;
    top: 100%;
    left: 0;
    right: auto;
    width: min(520px, calc(100vw - 24px));
    min-width: 18.75rem;
    max-width: min(520px, calc(100vw - 24px));
    box-sizing: border-box;
    max-height: min(24rem, calc(100vh - 96px));
    overflow: hidden;
    padding: 0;
    z-index: 100020;
}

.scribigo-row1-right .toolbar-dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-weight: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    color: var(--ast-global-color-2, #1d2327);
    background: transparent;
    border: none;
    border-radius: var(--sg-chrome-radius-sm);
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit !important;
    font-size: inherit !important;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1.25;
}

.dropdown-item i,
.dropdown-item .scribigo-chrome-svg {
    width: 16px;
    height: 16px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-item span {
    font-size: inherit !important;
}

.scribigo-order-switcher__list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(20rem, calc(100vh - 160px));
    overflow-x: hidden;
    overflow-y: auto;
}

.scribigo-order-switcher__item {
    align-items: flex-start;
    gap: 8px;
    white-space: normal;
    padding: 10px 14px;
    border-radius: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--sg-chrome-hairline) 70%, transparent);
}

.scribigo-order-switcher__item.is-current {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, white);
}

.scribigo-order-switcher__item:last-child {
    border-bottom: 0;
}

.scribigo-order-switcher__check {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1;
    color: transparent;
}

.scribigo-order-switcher__item.is-current .scribigo-order-switcher__check {
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-order-switcher__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.scribigo-order-switcher__item-title,
.scribigo-order-switcher__item-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: none;
}

.scribigo-order-switcher__item-title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.scribigo-order-switcher__item-meta {
    margin-top: 1px;
    color: var(--ast-global-color-3, #646970);
    font-size: 0.6875rem;
    line-height: 1.35;
}

.scribigo-order-switcher__footer {
    flex-shrink: 0;
    padding: 8px;
    border-top: 1px solid var(--sg-chrome-hairline);
}

.scribigo-order-switcher__all {
    width: 100%;
}

.scribigo-order-switcher__loading {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
    white-space: normal;
}

.dropdown-item.is-active,
.dropdown-item[aria-current="page"] {
    background: var(--sg-sidebar-accent-active);
    font-weight: 600 !important;
}

.dropdown-item.is-active i {
    color: var(--ast-global-color-0, #046bd2);
}

.dropdown-item:hover:not(:disabled):not(.is-disabled) {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, white);
    color: var(--ast-global-color-0, #046bd2);
}

.dropdown-item.is-disabled,
.dropdown-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dropdown-separator {
    height: 1px;
    background: var(--sg-chrome-hairline);
    margin: 4px -4px;
}

.menu-shortcut {
    margin-left: auto;
    font-size: 0.6875rem;
    font-family: monospace;
    color: var(--ast-global-color-7, #94a3b8);
}

.has-submenu {
    position: relative;
}

.has-submenu:not(.is-disabled):hover > .dropdown-submenu {
    display: block;
}

.dropdown-submenu {
    left: 100%;
    top: 0;
    z-index: 1001;
}

.scribigo-mobile-navs {
    display: none;
    flex-direction: column;
    flex-shrink: 0;
}

.scribigo-world-strip {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 8px;
    min-height: var(--sg-world-strip-height);
    background: var(--ast-global-color-5, #f9f4ee);
    border-bottom: 1px solid var(--sg-chrome-hairline);
    overflow-x: auto;
}

.scribigo-world-strip[hidden] {
    display: none !important;
}

.scribigo-world-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 8px;
    border: none;
    border-radius: var(--sg-chrome-radius);
    background: transparent;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 72%, transparent);
    text-decoration: none;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}

.scribigo-world-strip__item i {
    width: 14px;
    height: 14px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 55%, transparent);
}

.scribigo-world-strip__item:hover:not(.is-disabled),
.scribigo-world-strip__item:focus-visible:not(.is-disabled) {
    background: var(--sg-sidebar-accent);
    color: var(--ast-global-color-2, #1d2327);
}

.scribigo-world-strip__item.is-disabled,
.scribigo-world-strip__item[aria-disabled="true"] {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}

.scribigo-world-strip__item.is-active {
    background: var(--sg-sidebar-accent-active);
    color: var(--ast-global-color-2, #1d2327);
    font-weight: 600;
}

.scribigo-world-strip__item.is-active i {
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-bottom-nav {
    display: none;
}

.scribigo-more-sheet[hidden] {
    display: none !important;
}

.scribigo-more-sheet.is-open {
    display: block;
}

.scribigo-more-sheet__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 100010;
}

.scribigo-more-sheet__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100011;
    max-height: 70vh;
    overflow: auto;
    background: var(--ast-global-color-5, #f9f4ee);
    border-top: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius) var(--sg-chrome-radius) 0 0;
    padding: 16px 12px 12px;
}

.scribigo-more-sheet__group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.scribigo-more-sheet__group[hidden] {
    display: none !important;
}

.scribigo-more-sheet__heading {
    margin: 0 12px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ast-global-color-3, #646970);
}

.scribigo-more-sheet .scribigo-app-nav__item,
.scribigo-more-sheet .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: var(--sg-chrome-radius);
    background: transparent;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 80%, transparent);
    font: inherit;
    font-weight: 400;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.scribigo-more-sheet .scribigo-app-nav__item:hover,
.scribigo-more-sheet .scribigo-app-nav__item:focus-visible,
.scribigo-more-sheet .dropdown-item:hover,
.scribigo-more-sheet .dropdown-item:focus-visible {
    background: var(--sg-sidebar-accent);
    color: var(--ast-global-color-2, #1d2327);
}

.scribigo-more-sheet .scribigo-app-nav__item.is-active,
.scribigo-more-sheet .scribigo-app-nav__item[aria-current="page"],
.scribigo-more-sheet .dropdown-item.is-active,
.scribigo-more-sheet .dropdown-item[aria-current="page"] {
    background: var(--sg-sidebar-accent-active);
    color: var(--ast-global-color-2, #1d2327);
    font-weight: 600;
}

.scribigo-more-sheet .scribigo-app-nav__item.is-active i,
.scribigo-more-sheet .dropdown-item.is-active i {
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-more-sheet .scribigo-app-nav__item i,
.scribigo-more-sheet .dropdown-item i {
    width: 18px;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 60%, transparent);
}

.scribigo-scribits-tank__short {
    display: none;
    white-space: nowrap;
    font-weight: 500;
}

.sg-overview {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 32px 28px 56px;
    overflow: visible;
    height: auto;
    box-sizing: border-box;
    border: none;
    box-shadow: none;
    background: transparent;
    cursor: default;
    font-size: 0.875rem;
}

.sg-overview > section {
    width: 100%;
}

.sg-overview__hero {
    display: grid;
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--sg-chrome-hairline);
}

@media (min-width: 800px) {
    .sg-overview__hero {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }
}

.sg-overview__hero-copy {
    min-width: 0;
    text-align: left;
}

.sg-overview__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.sg-overview--guest .sg-overview__presets,
.sg-overview--guest .sg-overview__others,
.sg-overview--guest .sg-overview__order,
.sg-overview--guest .sg-overview__offers,
.sg-overview--guest .sg-overview__findings,
#scribigo-agent-chat.is-guest-welcome .sg-overview__presets,
#scribigo-agent-chat.is-guest-welcome .sg-overview__others,
#scribigo-agent-chat.is-guest-welcome .sg-overview__order,
#scribigo-agent-chat.is-guest-welcome .sg-overview__offers,
#scribigo-agent-chat.is-guest-welcome .sg-overview__findings {
    display: none !important;
}

.sg-overview--guest .sg-overview__hero {
    border-bottom: none;
    padding-bottom: 0;
}

@media (min-width: 800px) {
    .sg-overview__hero-actions {
        justify-content: flex-end;
        align-self: end;
    }
}

.sg-overview__date {
    margin: 0 0 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--ast-global-color-3, #646970);
}

.sg-overview__hello {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.sg-overview__lead,
.sg-overview__presets-lead,
.sg-overview__tile-desc {
    margin: 0;
    color: var(--ast-global-color-3, #646970);
    font-size: 0.875rem;
}

.sg-overview__order,
.sg-overview__others,
.sg-overview__presets,
.sg-overview__offers,
.sg-overview__demo-preview {
    margin-top: 32px;
}

.sg-overview__offers {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    column-gap: 16px;
    row-gap: 12px;
}

.sg-overview__offers > .sg-overview__offers-title,
.sg-overview__offers > #sgOverviewOffersTitle {
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    order: 0;
    margin: 0;
}

@media (max-width: 720px) {
    .sg-overview__offers {
        flex-direction: column;
        flex-wrap: nowrap;
    }
}

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

/* Child display:flex would otherwise override UA [hidden] { display:none }. */
.sg-overview__offers > [hidden],
.sg-overview__offers > .is-hidden,
.sg-overview__offers > :empty {
    display: none !important;
}

.sg-overview__offers > #agentDetectionPrompt { order: 1; }
.sg-overview__offers > #agentLtBaselinePrompt { order: 2; }
.sg-overview__offers > #agentXrayPrompt { order: 3; }
.sg-overview__offers > #agentAudioStudioPrompt { order: 4; }
.sg-overview__offers > #sgOverviewDemoPreview { order: 5; }

.sg-overview__offers > .sg-overview__demo-preview,
.sg-overview__offers > .scribigo-overview-nudge,
.sg-overview__offers > .scribigo-chat-top-prompt,
.sg-overview__offers > .scribigo-lt-baseline-prompt,
.sg-overview__offers > .scribigo-lt-baseline-prompt:last-child {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-self: stretch;
    min-width: 0;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    margin-top: 0;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 720px) {
    .sg-overview__offers > .sg-overview__demo-preview,
    .sg-overview__offers > .scribigo-overview-nudge,
    .sg-overview__offers > .scribigo-chat-top-prompt,
    .sg-overview__offers > .scribigo-lt-baseline-prompt,
    .sg-overview__offers > .scribigo-lt-baseline-prompt:last-child {
        flex: 1 1 auto;
        width: 100%;
    }
}

.sg-overview__offers .sg-overview__offer-rule {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--ast-global-color-3, #646970);
}

.sg-overview__offers .sg-demo-preview-offer,
.sg-overview__offers .scribigo-lt-baseline-prompt__inner,
.sg-overview__offers .scribigo-detection-prompt__inner,
.sg-overview__offers .scribigo-xray-prompt__inner,
.sg-overview__offers .scribigo-audio-studio-prompt__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-content: flex-start;
    flex: 1 1 auto;
    align-self: stretch;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100%;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0, #046bd2) 18%, var(--sg-chrome-hairline, #e5e7eb));
    border-radius: 8px;
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 5%, var(--sg-chrome-card, #fff));
    color: inherit;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sg-overview__offers .scribigo-lt-baseline-prompt__inner:hover,
.sg-overview__offers .scribigo-detection-prompt__inner:hover,
.sg-overview__offers .scribigo-xray-prompt__inner:hover,
.sg-overview__offers .scribigo-audio-studio-prompt__inner:hover {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 10%, var(--sg-chrome-card, #fff));
}

.sg-overview__offers .sg-demo-preview-offer {
    border-color: color-mix(in srgb, #6366f1 26%, #e5e7eb);
    background: color-mix(in srgb, #6366f1 7%, #fff);
}

.sg-overview__offers .sg-demo-preview-offer:hover {
    background: color-mix(in srgb, #6366f1 13%, #fff);
}

.sg-overview__offers .scribigo-lt-baseline-prompt__text {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

.sg-overview__offers .scribigo-lt-baseline-prompt__text i {
    display: none;
}

.sg-overview__offers .scribigo-xray-prompt__benefit,
.sg-overview__offers .scribigo-xray-prompt__pack-list {
    margin-left: 0;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

.sg-overview__offers .scribigo-xray-prompt__benefit {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, #fff);
    color: inherit;
    font-weight: 400;
}

.sg-overview__offers .sg-demo-preview-offer__kicker,
.sg-overview__offers .sg-demo-preview-offer__body {
    flex: 0 1 auto;
    width: 100%;
}

.sg-overview__offers .sg-demo-preview-offer__body {
    flex: 1 1 auto;
}

.sg-overview__offers .sg-demo-preview-offer__actions,
.sg-overview__offers .scribigo-lt-baseline-prompt__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 14px;
    width: auto;
    max-width: 100%;
    margin-top: auto;
}

.sg-overview__offers .sg-demo-preview-offer__action {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    margin-top: auto;
}

.sg-overview__offers .sg-demo-preview-cta,
#scribigo-agent-chat .sg-overview__offers .sg-demo-preview-cta.wp-block-button__link,
.sg-overview__offers .scribigo-lt-baseline-prompt__btn,
.sg-overview__offers .scribigo-lt-baseline-prompt__btn--primary,
#scribigo-agent-chat .sg-overview__offers .scribigo-lt-baseline-prompt__btn.wp-block-button__link {
    display: inline-flex;
    flex: 0 0 auto;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    min-width: 0;
    color: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
    text-transform: none;
    box-shadow: none;
}

.sg-overview__offers .scribigo-lt-baseline-prompt__btn,
.sg-overview__offers .scribigo-lt-baseline-prompt__btn--primary,
#scribigo-agent-chat .sg-overview__offers .scribigo-lt-baseline-prompt__btn.wp-block-button__link {
    background: var(--ast-global-color-0, #046bd2);
    border: 1px solid var(--ast-global-color-0, #046bd2);
}

.sg-overview__offers .scribigo-lt-baseline-prompt__btn:hover:not(:disabled),
.sg-overview__offers .scribigo-lt-baseline-prompt__btn--primary:hover:not(:disabled),
#scribigo-agent-chat .sg-overview__offers .scribigo-lt-baseline-prompt__btn.wp-block-button__link:hover:not(:disabled) {
    background: var(--ast-global-color-8, #035aa8);
    color: #fff;
    border-color: var(--ast-global-color-8, #035aa8);
}

.sg-overview__offers .sg-demo-preview-cta,
#scribigo-agent-chat .sg-overview__offers .sg-demo-preview-cta.wp-block-button__link {
    background: #6366f1;
    border: 1px solid #4f46e5;
}

.sg-overview__offers .sg-demo-preview-cta:hover,
#scribigo-agent-chat .sg-overview__offers .sg-demo-preview-cta.wp-block-button__link:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.sg-overview__offers .scribigo-lt-baseline-prompt__btn--ghost,
.sg-overview__offers .scribigo-lt-baseline-prompt__btn.ast-outline-button {
    background: transparent;
    color: var(--ast-global-color-0, #046bd2);
    border: 1px solid var(--sg-chrome-hairline, #e5e7eb);
    border-radius: 6px;
}

.sg-overview__offers .scribigo-lt-baseline-prompt__btn--ghost:hover:not(:disabled),
.sg-overview__offers .scribigo-lt-baseline-prompt__btn.ast-outline-button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 8%, #fff);
    color: var(--ast-global-color-0, #046bd2);
}

.sg-overview__offers .scribigo-xray-prompt__inner--dual-offer .scribigo-lt-baseline-prompt__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    gap: 8px;
}

.sg-overview__offers .scribigo-xray-prompt__inner--dual-offer .scribigo-lt-baseline-prompt__actions .scribigo-lt-baseline-prompt__btn,
#scribigo-agent-chat .sg-overview__offers .scribigo-xray-prompt__inner--dual-offer .scribigo-lt-baseline-prompt__btn.wp-block-button__link {
    flex: 1 1 7.5rem;
    align-self: stretch;
    width: auto !important;
    min-width: 0;
    border-radius: 6px;
}

.sg-overview__offers .scribigo-xray-prompt__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    width: 100%;
}

.sg-overview__offers .sg-demo-preview-offer__dismiss,
.sg-overview__offers .scribigo-chat-top-prompt__dont-show,
#scribigo-agent-chat .sg-overview__offers .scribigo-chat-top-prompt__dont-show,
.sg-overview__offers a.scribigo-chat-top-prompt__dont-show {
    display: inline-flex;
    flex: 0 0 auto;
    align-self: flex-start;
    align-items: center;
    width: max-content !important;
    max-width: 100%;
    margin-top: auto;
    margin-right: 8px;
    margin-bottom: 8px;
    margin-left: 4px;
    padding: 8px 6px 4px 6px;
    border: 0;
    background: none;
    box-shadow: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ast-global-color-3, #646970);
    text-align: left;
    text-decoration: underline;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.sg-overview__offers .sg-demo-preview-offer__dismiss:hover,
.sg-overview__offers .scribigo-chat-top-prompt__dont-show:hover,
.sg-overview__offers a.scribigo-chat-top-prompt__dont-show:hover {
    color: inherit;
}

.sg-overview__offers .scribigo-lt-baseline-prompt__close {
    top: 10px;
    right: 10px;
}

.sg-overview__findings {
    margin-top: 12px;
}

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

.sg-overview__analyses {
    margin-top: 12px;
}

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

button.sg-overview__all-orders {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.sg-overview__findings-panel {
    display: grid;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
}

@media (min-width: 800px) {
    .sg-overview__findings-panel {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }
}

.sg-overview__findings-copy {
    min-width: 0;
}

#previewDropZone.sg-overview .sg-overview__findings-panel p,
.sg-overview.preview-placeholder .sg-overview__findings-panel p,
#previewDropZone.sg-overview .sg-overview__offers p,
.sg-overview.preview-placeholder .sg-overview__offers p {
    margin-bottom: 0;
}

#previewDropZone.sg-overview .sg-overview__findings-eyebrow,
.sg-overview.preview-placeholder .sg-overview__findings-eyebrow,
.sg-overview__findings-eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--ast-global-color-3, #646970);
}

#previewDropZone.sg-overview .sg-overview__findings-counts,
.sg-overview.preview-placeholder .sg-overview__findings-counts,
.sg-overview__findings-counts {
    margin: 4px 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: inherit;
    white-space: normal;
    overflow-wrap: break-word;
}

#previewDropZone.sg-overview .sg-overview__findings-kinds,
#previewDropZone.sg-overview .sg-overview__findings-done,
#previewDropZone.sg-overview .sg-overview__findings-hint,
.sg-overview.preview-placeholder .sg-overview__findings-kinds,
.sg-overview.preview-placeholder .sg-overview__findings-done,
.sg-overview.preview-placeholder .sg-overview__findings-hint,
.sg-overview__findings-kinds,
.sg-overview__findings-done,
.sg-overview__findings-hint {
    margin: 2px 0 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--ast-global-color-3, #646970);
    white-space: normal;
    overflow-wrap: break-word;
}

.sg-overview__findings-counts[hidden],
.sg-overview__findings-kinds[hidden],
.sg-overview__findings-done[hidden],
.sg-overview__findings-hint:empty {
    display: none !important;
}

.sg-overview__findings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: start;
}

#sgOverviewOpenFindings {
    white-space: nowrap;
}

.sg-overview h3,
.sg-overview__presets-lead,
.sg-overview__lead,
.sg-overview__hello,
.sg-overview__date,
.sg-overview__order-title,
.sg-overview__order-mode,
.sg-overview__order-meta,
.sg-overview__order-rule,
.sg-overview__findings-eyebrow,
.sg-overview__findings-counts,
.sg-overview__findings-kinds,
.sg-overview__findings-done,
.sg-overview__findings-hint,
.sg-overview__tile-label,
.sg-overview__tile-desc {
    text-align: left !important;
}

.sg-overview h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
}

.sg-overview__order-panel {
    display: grid;
    gap: 16px;
    margin-top: 12px;
    padding: 20px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
}

@media (min-width: 800px) {
    .sg-overview__order-panel {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

.sg-overview__order-copy {
    min-width: 0;
}

.sg-overview__order-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
}

.sg-overview__order-actions-row,
.sg-overview__order-actions-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 14px;
    width: max-content;
    max-width: 100%;
}

.sg-overview__order-actions-links {
    gap: 8px 16px;
}

#sgOverviewStopPlan,
#sgOverviewAbortPlan,
#sgOverviewResumePlan,
#sgOverviewOpenOrder {
    white-space: nowrap;
}

#sgOverviewStopPlan[hidden],
#sgOverviewAbortPlan[hidden],
#sgOverviewResumePlan[hidden] {
    display: none !important;
}

#scribigo-agent-chat .sg-overview #sgOverviewOpenOrder.wp-block-button__link {
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
    color: #fff;
}

#scribigo-agent-chat .sg-overview #sgOverviewOpenOrder.wp-block-button__link:hover,
#scribigo-agent-chat .sg-overview #sgOverviewOpenOrder.wp-block-button__link:focus-visible {
    background-color: color-mix(in srgb, var(--ast-global-color-0, var(--sg-chrome-primary)) 88%, black);
    color: #fff;
}

#scribigo-agent-chat .sg-overview #sgOverviewSettings,
#scribigo-agent-chat .sg-overview .sg-overview__order-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: var(--sg-chrome-radius-md);
    background: transparent;
    box-shadow: none;
    color: var(--ast-global-color-3, #646970);
    font: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

#scribigo-agent-chat .sg-overview #sgOverviewSettings:hover,
#scribigo-agent-chat .sg-overview .sg-overview__order-settings:hover {
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff);
    color: var(--ast-global-color-2, #1d2327);
}

#scribigo-agent-chat .sg-overview #sgOverviewSettings:focus-visible,
#scribigo-agent-chat .sg-overview .sg-overview__order-settings:focus-visible,
#scribigo-agent-chat .sg-overview .sg-overview__order-action-link:focus-visible,
#scribigo-agent-chat .sg-overview #sgOverviewDeleteOrder:focus-visible,
#scribigo-agent-chat .sg-overview #sgOverviewCloseOrder:focus-visible {
    outline: 2px solid var(--ast-global-color-0, var(--sg-chrome-primary));
    outline-offset: 2px;
}

#scribigo-agent-chat .sg-overview #sgOverviewSettings i {
    font-size: 0.95rem;
    line-height: 1;
}

#scribigo-agent-chat .sg-overview .sg-overview__order-action-link,
#scribigo-agent-chat .sg-overview #sgOverviewDeleteOrder,
#scribigo-agent-chat .sg-overview #sgOverviewCloseOrder {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: flex-end;
    width: max-content !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
}

#scribigo-agent-chat .sg-overview .sg-overview__order-action-link--danger,
#scribigo-agent-chat .sg-overview #sgOverviewDeleteOrder {
    color: #dc3545;
}

#scribigo-agent-chat .sg-overview .sg-overview__order-action-link--danger:hover,
#scribigo-agent-chat .sg-overview .sg-overview__order-action-link--danger:focus-visible,
#scribigo-agent-chat .sg-overview #sgOverviewDeleteOrder:hover,
#scribigo-agent-chat .sg-overview #sgOverviewDeleteOrder:focus-visible {
    color: color-mix(in srgb, #dc3545 82%, black);
    background: none;
}

#scribigo-agent-chat .sg-overview .sg-overview__order-action-link--muted,
#scribigo-agent-chat .sg-overview #sgOverviewCloseOrder {
    color: var(--ast-global-color-3, #646970);
}

#scribigo-agent-chat .sg-overview .sg-overview__order-action-link--muted:hover,
#scribigo-agent-chat .sg-overview .sg-overview__order-action-link--muted:focus-visible,
#scribigo-agent-chat .sg-overview #sgOverviewCloseOrder:hover,
#scribigo-agent-chat .sg-overview #sgOverviewCloseOrder:focus-visible {
    color: var(--ast-global-color-2, #1d2327);
    background: none;
}

#toolbarDropdownSettings.is-loading,
#toolbarDropdownSettings[aria-busy="true"],
#sgOverviewSettings.is-loading,
#sgOverviewSettings[aria-busy="true"],
#chatSettingsBtn.is-loading,
#chatSettingsBtn[aria-busy="true"],
#agentBibleTabSettingsBtn.is-loading,
#agentBibleTabSettingsBtn[aria-busy="true"],
.scribigo-detection-prompt__inner.is-loading,
.scribigo-detection-prompt__inner[aria-busy="true"] {
    cursor: wait;
}

#previewDropZone.sg-overview .sg-overview__order-copy .sg-overview__order-title,
.sg-overview.preview-placeholder .sg-overview__order-copy .sg-overview__order-title {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#previewDropZone.sg-overview .sg-overview__order-copy .sg-overview__order-meta,
.sg-overview.preview-placeholder .sg-overview__order-copy .sg-overview__order-meta {
    margin: 2px 0 0;
    color: var(--ast-global-color-3, #646970);
    font-size: 0.875rem;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#previewDropZone.sg-overview .sg-overview__order-copy .sg-overview__order-plan,
.sg-overview.preview-placeholder .sg-overview__order-copy .sg-overview__order-plan,
.sg-overview__order-plan,
#previewDropZone.sg-overview .sg-overview__order-copy .sg-overview__order-mode,
.sg-overview.preview-placeholder .sg-overview__order-copy .sg-overview__order-mode,
.sg-overview__order-mode {
    margin: 4px 0 0;
    color: var(--ast-global-color-3, #646970);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
}

.sg-overview__order-plan[hidden],
.sg-overview__order-xray[hidden],
.sg-overview__order-mode[hidden] {
    display: none !important;
}

#previewDropZone.sg-overview .sg-overview__order-rule,
.sg-overview.preview-placeholder .sg-overview__order-rule,
#previewDropZone.sg-overview .sg-overview__order-link .sg-overview__order-title,
.sg-overview.preview-placeholder .sg-overview__order-link .sg-overview__order-title,
#previewDropZone.sg-overview .sg-overview__order-link .sg-overview__order-meta,
.sg-overview.preview-placeholder .sg-overview__order-link .sg-overview__order-meta,
#previewDropZone.sg-overview .sg-overview__order-link-title,
.sg-overview.preview-placeholder .sg-overview__order-link-title,
#previewDropZone.sg-overview .sg-overview__order-link-meta,
.sg-overview.preview-placeholder .sg-overview__order-link-meta {
    color: inherit;
}

.sg-overview__order-progress {
    margin-top: 12px;
}

.sg-overview__order-progress-track {
    height: 6px;
    border-radius: 3px;
    background: var(--ast-global-color-7, #e8e8e8);
    overflow: hidden;
}

.sg-overview__order-progress-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: var(--ast-global-color-0);
    transition: width 0.5s;
}

.sg-overview__order-progress-label {
    margin: 6px 0 0;
    font-size: 0.875rem;
    color: var(--ast-global-color-3, #646970);
}

.sg-overview__orders-grid {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.sg-overview__all-orders {
    display: inline-block;
    margin-top: 12px;
    color: var(--ast-global-color-0);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.sg-overview__all-orders:hover,
.sg-overview__all-orders:focus-visible {
    color: var(--ast-global-color-0);
    text-decoration: underline;
}

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

@media (min-width: 960px) {
    .sg-overview__orders-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sg-overview__order-link {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background 0.15s ease;
}

.sg-overview__order-link:hover,
.sg-overview__order-link:focus-visible {
    background: color-mix(in srgb, var(--sg-chrome-card, #fff) 90%, #000);
    color: inherit;
    filter: none;
}

.sg-overview__order-link.has-docu-flat,
.scribigo-order-switcher__item.has-docu-flat {
    border-left: 3px solid #ff9800;
}

.sg-overview__docu-flat-badge,
.scribigo-order-switcher__flat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
}

.sg-overview__docu-flat-badge i {
    margin-right: 3px;
    font-size: 0.65rem;
}

.scribigo-order-switcher__flat-badge {
    margin: 6px 0 0;
}

.sg-overview__deletion-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin: 10px 0 0;
    border-radius: 6px;
    font-size: 0.75rem;
}

.sg-overview__deletion-info.scribigo-deletion-normal {
    background-color: #f0f4f8;
    color: #64748b;
}

.sg-overview__deletion-info.scribigo-deletion-warning {
    background-color: #fff3cd;
    color: #856404;
}

.sg-overview__deletion-info.scribigo-deletion-overdue {
    background-color: #f8d7da;
    color: #721c24;
}

.sg-overview__deletion-info.scribigo-deletion-protected {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.sg-overview__order-link .sg-overview__order-rule:empty,
.sg-overview__order-link .sg-overview__order-meta:empty {
    display: none;
}

#previewDropZone.sg-overview .sg-overview__order-rule,
.sg-overview.preview-placeholder .sg-overview__order-rule,
.sg-overview__order-rule {
    margin: 0;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ast-global-color-3, #646970);
}

.sg-overview__order-link .sg-overview__order-rule {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#previewDropZone.sg-overview .sg-overview__order-link .sg-overview__order-title,
.sg-overview.preview-placeholder .sg-overview__order-link .sg-overview__order-title,
#previewDropZone.sg-overview .sg-overview__order-link-title,
.sg-overview.preview-placeholder .sg-overview__order-link-title,
.sg-overview__order-link .sg-overview__order-title,
.sg-overview__order-link-title {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#previewDropZone.sg-overview .sg-overview__order-link .sg-overview__order-meta,
.sg-overview.preview-placeholder .sg-overview__order-link .sg-overview__order-meta,
#previewDropZone.sg-overview .sg-overview__order-link-meta,
.sg-overview.preview-placeholder .sg-overview__order-link-meta,
.sg-overview__order-link .sg-overview__order-meta,
.sg-overview__order-link-meta {
    margin: 4px 0 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--ast-global-color-3, #646970);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-overview__presets-lead {
    margin-bottom: 12px;
}

.sg-overview__tiles {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.sg-overview__tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff);
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background 0.15s ease;
}

.sg-overview__tile:hover,
.sg-overview__tile:focus-visible {
    background: color-mix(
        in srgb,
        color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff) 90%,
        #000
    );
    color: inherit;
    filter: none;
}

.sg-overview__tile i {
    color: var(--ast-global-color-0);
    font-size: 1rem;
}

.sg-overview__tile-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.sg-overview__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.sg-overview__action button {
    width: 100%;
}

.sg-dialog[hidden] {
    display: none;
}

.sg-dialog {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sg-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 32, 0.42);
}

.sg-dialog__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(32rem, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    padding: 18px 20px 16px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
    box-shadow: 0 16px 40px rgba(16, 24, 32, 0.18);
}

.sg-dialog__panel--card {
    width: min(560px, 100%);
}

#scribigo-agent-chat .sg-dialog__title,
.sg-dialog__title {
    margin: 0;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

#scribigo-agent-chat .sg-dialog__desc,
.sg-dialog__desc {
    margin: 0;
    padding: 0;
    color: var(--ast-global-color-3, #646970);
    font-size: 0.875rem;
}

#scribigo-agent-chat .sg-dialog__desc:empty {
    display: none;
}

#scribigo-agent-chat .sg-dialog__panel > .sg-dialog__steps,
.sg-dialog__steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    margin-inline: 0;
    padding: 0;
    padding-inline-start: 0;
    list-style: none;
    list-style-type: none;
    font-size: 0.75rem;
    color: var(--ast-global-color-3, #646970);
}

#scribigo-agent-chat .sg-dialog__steps li,
.sg-dialog__steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

#scribigo-agent-chat .sg-dialog__steps li::marker {
    content: none;
}

.sg-dialog__steps li:not(:last-child)::after {
    content: "→";
    color: var(--ast-global-color-3, #646970);
    font-weight: 400;
}

.sg-dialog__steps li.is-current span {
    font-weight: 600;
    color: var(--ast-global-color-2, #1d2327);
}

.sg-dialog__dropzone {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 32px 16px;
    border: 1px dashed var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 55%, #fff);
    background-image: none;
    box-shadow: none;
    cursor: pointer;
    color: inherit;
    font: inherit;
    filter: none;
    transform: none;
}

#scribigo-agent-chat .sg-dialog__dropzone:hover,
#scribigo-agent-chat .sg-dialog__dropzone:focus-visible {
    border-color: color-mix(in srgb, var(--sg-chrome-hairline) 65%, var(--ast-global-color-3, #646970));
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 72%, #fff);
    background-image: none;
    color: inherit;
    box-shadow: none;
    filter: none;
    transform: none;
}

.sg-dialog__dropzone.is-dragover,
#scribigo-agent-chat .sg-dialog__dropzone.is-dragover {
    border-color: color-mix(in srgb, var(--sg-chrome-hairline) 50%, var(--ast-global-color-3, #646970));
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 82%, #fff);
    background-image: none;
    color: inherit;
}

.sg-dialog__dropzone i {
    color: var(--ast-global-color-0);
    font-size: 1.25rem;
}

.sg-dialog__drop-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.sg-dialog__drop-hint {
    font-size: 0.75rem;
    color: var(--ast-global-color-3, #646970);
}

.sg-dialog__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

/* Astra primary / secondary for Übersicht + start/command dialogs */
#scribigo-agent-chat .sg-overview .wp-block-button__link,
#scribigo-agent-chat .sg-dialog .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 10px 18px;
    border: none;
    border-radius: var(--sg-chrome-radius);
    background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
    background-image: none;
    color: #fff;
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
}

#scribigo-agent-chat .sg-overview .wp-block-button__link:hover,
#scribigo-agent-chat .sg-overview .wp-block-button__link:focus-visible,
#scribigo-agent-chat .sg-dialog .wp-block-button__link:hover,
#scribigo-agent-chat .sg-dialog .wp-block-button__link:focus-visible {
    background-color: color-mix(in srgb, var(--ast-global-color-0, var(--sg-chrome-primary)) 88%, black);
    background-image: none;
    color: #fff;
    filter: none;
}

#sgOverviewNewOrder,
#sgOverviewOpenOrder,
#sgStartDialogFileBtn,
#scribigo-agent-chat .sg-dialog__actions .wp-block-button__link,
#sgOverviewNewOrder i,
#sgOverviewNewOrder svg,
#sgOverviewOpenOrder i,
#sgOverviewOpenOrder svg,
#sgStartDialogFileBtn i,
#sgStartDialogFileBtn svg,
#scribigo-agent-chat .sg-overview .wp-block-button__link i,
#scribigo-agent-chat .sg-overview .wp-block-button__link svg,
#scribigo-agent-chat .sg-dialog .wp-block-button__link i,
#scribigo-agent-chat .sg-dialog .wp-block-button__link svg,
#scribigo-agent-chat .sg-dialog__actions .wp-block-button__link i,
#scribigo-agent-chat .sg-dialog__actions .wp-block-button__link svg {
    color: #fff;
    fill: currentColor;
}

#sgOverviewNewOrder:hover,
#sgOverviewNewOrder:focus-visible,
#sgOverviewOpenOrder:hover,
#sgOverviewOpenOrder:focus-visible,
#sgStartDialogFileBtn:hover,
#sgStartDialogFileBtn:focus-visible,
#scribigo-agent-chat .sg-dialog__actions .wp-block-button__link:hover,
#scribigo-agent-chat .sg-dialog__actions .wp-block-button__link:focus-visible,
#sgOverviewNewOrder:hover i,
#sgOverviewNewOrder:hover svg,
#sgOverviewOpenOrder:hover i,
#sgOverviewOpenOrder:hover svg,
#sgStartDialogFileBtn:hover i,
#sgStartDialogFileBtn:hover svg,
#scribigo-agent-chat .sg-overview .wp-block-button__link:hover i,
#scribigo-agent-chat .sg-overview .wp-block-button__link:hover svg,
#scribigo-agent-chat .sg-dialog .wp-block-button__link:hover i,
#scribigo-agent-chat .sg-dialog .wp-block-button__link:hover svg {
    color: #fff;
    fill: currentColor;
}

#scribigo-agent-chat .sg-overview .ast-outline-button,
#scribigo-agent-chat .sg-dialog .ast-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 10px 18px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: transparent;
    background-image: none;
    color: inherit;
    box-shadow: none;
    font: inherit;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
}

#scribigo-agent-chat .sg-overview .ast-outline-button:hover,
#scribigo-agent-chat .sg-overview .ast-outline-button:focus-visible,
#scribigo-agent-chat .sg-dialog .ast-outline-button:hover,
#scribigo-agent-chat .sg-dialog .ast-outline-button:focus-visible {
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff);
    color: inherit;
    filter: none;
}

#sgCommandCardDialogBody .modes-preview-card {
    margin: 0;
}

/* Command-card confirmation: merge panel + card into one chrome dialog */
#sgCommandCardDialog .sg-dialog__panel--card:has(> #sgCommandCardDialogBody > .command-card) {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

#sgCommandCardDialogBody:has(> .command-card) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#sgCommandCardDialogBody > .command-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 18px 20px 16px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
}

#sgCommandCardDialogBody > .command-card > * {
    margin-top: 0 !important;
    margin-left: 0 !important;
}

#sgCommandCardDialogBody > .command-card .cc-header {
    align-items: flex-start;
    gap: 12px;
}

#sgCommandCardDialogBody > .command-card .cc-icon-wrap {
    border-radius: var(--sg-chrome-radius-md);
}

#sgCommandCardDialogBody > .command-card .cc-status-text {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cc-color, #0969da) 12%, transparent);
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

#sgCommandCardDialogBody > .command-card .cc-label {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

#sgCommandCardDialogBody > .command-card > div:not(.cc-header):not([id^="costConfirmControls_"]):not([id^="costCancelOnly_"]) {
    color: var(--ast-global-color-3, #646970);
    font-size: 0.875rem;
    line-height: 1.45;
}

#sgCommandCardDialogBody > .command-card [id^="costAmountBox_"],
#sgCommandCardDialogBody > .command-card [id^="flatrateQuota"],
#sgCommandCardDialogBody > .command-card [id^="accessDenied_"],
#sgCommandCardDialogBody > .command-card [id^="webSearchNotice_"],
#sgCommandCardDialogBody > .command-card [id^="costInsufficient_"],
#sgCommandCardDialogBody > .command-card [id^="documentFlatQuota"],
#sgCommandCardDialogBody > .command-card [id^="languageToolQuota"] {
    border-radius: var(--sg-chrome-radius-lg) !important;
}

#sgCommandCardDialogBody > .command-card [id^="costConfirmControls_"] > div:last-child,
#sgCommandCardDialogBody > .command-card [id^="costCancelOnly_"] > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-list {
    max-height: min(40vh, 320px);
    overflow: auto;
}

#sgCommandCardDialogBody > .command-card .task-plan-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

#sgCommandCardDialogBody > .command-card .task-plan-item-remove {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 2px 4px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #9a6700 !important;
}

#sgCommandCardDialogBody > .command-card button:not(.task-plan-item-remove),
#sgCommandCardDialogBody > .command-card a[href][style*="padding"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 10px 18px !important;
    border-radius: var(--sg-chrome-radius) !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    filter: none !important;
}

#sgCommandCardDialogBody > .command-card button[style*="background: white"],
#sgCommandCardDialogBody > .command-card button[style*="background:white"] {
    border: 1px solid var(--sg-chrome-hairline) !important;
    background: transparent !important;
    color: inherit !important;
    font-weight: 500 !important;
}

#sgCommandCardDialogBody > .command-card button[style*="background: white"]:hover,
#sgCommandCardDialogBody > .command-card button[style*="background: white"]:focus-visible,
#sgCommandCardDialogBody > .command-card button[style*="background:white"]:hover,
#sgCommandCardDialogBody > .command-card button[style*="background:white"]:focus-visible {
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff) !important;
    color: inherit !important;
}

#sgCommandCardDialogBody > .command-card button[style*="background: var(--cc-color)"],
#sgCommandCardDialogBody > .command-card button[style*="background: var(--ast-global-color-0)"] {
    border: none !important;
    background: var(--cc-color, var(--ast-global-color-0)) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

#sgCommandCardDialogBody > .command-card button[style*="background: var(--cc-color)"]:hover,
#sgCommandCardDialogBody > .command-card button[style*="background: var(--cc-color)"]:focus-visible,
#sgCommandCardDialogBody > .command-card button[style*="background: var(--ast-global-color-0)"]:hover,
#sgCommandCardDialogBody > .command-card button[style*="background: var(--ast-global-color-0)"]:focus-visible {
    background: color-mix(in srgb, var(--cc-color, var(--ast-global-color-0)) 88%, black) !important;
    color: #fff !important;
    opacity: 1 !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-btn--confirm {
    border: none !important;
    background: var(--cc-color, var(--ast-global-color-0)) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-btn--confirm:hover,
#sgCommandCardDialogBody > .command-card .task-plan-btn--confirm:focus-visible {
    background: color-mix(in srgb, var(--cc-color, var(--ast-global-color-0)) 88%, black) !important;
    color: #fff !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-btn--run-all {
    border: 1px solid var(--cc-color, var(--ast-global-color-0)) !important;
    background: transparent !important;
    color: var(--cc-color, var(--ast-global-color-0)) !important;
    font-weight: 500 !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-btn--cancel {
    border: 1px solid var(--sg-chrome-hairline) !important;
    background: transparent !important;
    color: inherit !important;
    font-weight: 500 !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-btn--run-all:hover,
#sgCommandCardDialogBody > .command-card .task-plan-btn--run-all:focus-visible {
    background: color-mix(in srgb, var(--cc-color, var(--ast-global-color-0)) 12%, #fff) !important;
    color: var(--cc-color, var(--ast-global-color-0)) !important;
}

#sgCommandCardDialogBody > .command-card .task-plan-btn--cancel:hover,
#sgCommandCardDialogBody > .command-card .task-plan-btn--cancel:focus-visible {
    background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 70%, #fff) !important;
    color: inherit !important;
}

#scribigo-agent-chat[data-preview-tab="overview"] #agentPreviewToolbar {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="overview"] .scribigo-agent-chat-area,
#scribigo-agent-chat[data-preview-tab="overview"] #chatWizardOverlay,
#scribigo-agent-chat[data-preview-tab="overview"] #chatModesOverlay,
#scribigo-agent-chat[data-preview-tab="overview"] .scribigo-agent-resize-handle {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="overview"] .scribigo-agent-preview-area {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    border-left: none;
}

#scribigo-agent-chat[data-preview-tab="overview"] #agentPreviewContent {
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
}

#scribigo-agent-chat[data-preview-tab="overview"] #previewDropZone,
#previewDropZone.sg-overview[data-overview="1"] {
    display: block;
    width: 100%;
    max-width: 72rem;
    height: auto;
    max-height: none;
    margin: 0 auto;
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
    cursor: default;
    pointer-events: auto;
}

#scribigo-agent-chat[data-preview-tab="overview"] #previewDropZone:hover,
#scribigo-agent-chat[data-preview-tab="overview"] #previewDropZone.drag-over,
#previewDropZone.sg-overview[data-overview="1"]:hover,
#previewDropZone.sg-overview[data-overview="1"].drag-over,
#previewDropZone.sg-overview[data-overview="1"]:hover svg,
#previewDropZone.sg-overview[data-overview="1"].drag-over svg,
#previewDropZone.sg-overview[data-overview="1"].drag-over p {
    border: none;
    box-shadow: none;
    background: transparent;
    color: inherit;
    transform: none;
    opacity: inherit;
    filter: none;
}

#scribigo-agent-chat[data-preview-tab="overview"] #agentPreview {
    display: none !important;
}

#scribigo-agent-chat:not([data-preview-tab="overview"]) #previewDropZone {
    display: none;
}

#scribigo-agent-chat:not([data-preview-tab="overview"]) #agentPreview {
    display: block !important;
}

#scribigo-agent-chat[data-preview-tab="overview"] .toolbar-group-view-switcher {
    display: none !important;
}

.toolbar-group-view-switcher {
    display: none !important;
}

body.scribigo-app-chrome--rail.scribigo-app-chrome--site {
    padding-left: var(--sg-sidebar-rail);
}

body.scribigo-app-chrome--rail.scribigo-app-chrome--site .scribigo-app-chrome-bar {
    left: var(--sg-sidebar-rail);
}

body.scribigo-app-chrome--rail .scribigo-app-sidebar,
.scribigo-app-sidebar.is-rail {
    flex-basis: var(--sg-sidebar-rail);
    width: var(--sg-sidebar-rail);
    padding: 16px 8px;
}

body.scribigo-app-chrome--rail .scribigo-app-sidebar__header,
.scribigo-app-sidebar.is-rail .scribigo-app-sidebar__header {
    flex-direction: column;
    justify-content: center;
    padding: 0 0 20px;
}

body.scribigo-app-chrome--rail .scribigo-app-brand,
.scribigo-app-sidebar.is-rail .scribigo-app-brand {
    justify-content: center;
    overflow: hidden;
    max-width: 100%;
}

body.scribigo-app-chrome--rail .scribigo-app-brand__logo,
.scribigo-app-sidebar.is-rail .scribigo-app-brand__logo {
    display: none;
}

body.scribigo-app-chrome--rail .scribigo-app-brand__favicon,
.scribigo-app-sidebar.is-rail .scribigo-app-brand__favicon {
    display: block;
}

body.scribigo-app-chrome--rail .scribigo-app-brand__logo ~ .scribigo-app-brand__mark,
.scribigo-app-sidebar.is-rail .scribigo-app-brand__logo ~ .scribigo-app-brand__mark {
    display: inline-flex;
}

body.scribigo-app-chrome--rail .scribigo-app-nav__world-head,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__world-head,
body.scribigo-app-chrome--rail .scribigo-app-nav__item span,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__item span,
body.scribigo-app-chrome--rail .scribigo-app-sidebar__collapse-icon--close,
.scribigo-app-sidebar.is-rail .scribigo-app-sidebar__collapse-icon--close {
    display: none;
}

body.scribigo-app-chrome--rail .scribigo-app-nav__rail-rule,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__rail-rule {
    display: block;
}

body.scribigo-app-chrome--rail .scribigo-app-sidebar__collapse-icon--open,
.scribigo-app-sidebar.is-rail .scribigo-app-sidebar__collapse-icon--open {
    display: inline-flex;
}

body.scribigo-app-chrome--rail .scribigo-app-nav__item,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__item {
    justify-content: center;
    padding: 0;
}

@media (max-width: 1279px) and (min-width: 768px) {
    :root {
        --sg-sidebar-width: var(--sg-sidebar-rail);
    }

    body.scribigo-app-chrome--site {
        padding-left: var(--sg-sidebar-rail);
    }

    body.scribigo-app-chrome--site .scribigo-app-chrome-bar {
        left: var(--sg-sidebar-rail);
    }

    .scribigo-app-sidebar {
        flex-basis: var(--sg-sidebar-rail);
        width: var(--sg-sidebar-rail);
        padding: 16px 8px;
    }

    .scribigo-app-sidebar__header {
        flex-direction: column;
        justify-content: center;
        padding: 0 0 20px;
    }

    .scribigo-app-brand {
        justify-content: center;
        overflow: hidden;
        max-width: 100%;
    }

    .scribigo-app-brand__logo {
        display: none;
    }

    .scribigo-app-brand__favicon {
        display: block;
    }

    .scribigo-app-brand__logo ~ .scribigo-app-brand__mark {
        display: inline-flex;
    }

    .scribigo-app-nav__world-head,
    .scribigo-app-nav__item span,
    .scribigo-app-sidebar__collapse-icon--close {
        display: none;
    }

    .scribigo-app-nav__rail-rule {
        display: block;
    }

    .scribigo-app-sidebar__collapse-icon--open {
        display: inline-flex;
    }

    .scribigo-app-nav__item {
        justify-content: center;
        padding: 0;
    }

    .scribigo-order-switcher {
        max-width: 220px;
        min-width: 0;
    }
}

@media (min-width: 768px) {
    body.scribigo-app-chrome .scribigo-chrome-menu-toggle,
    body.scribigo-app-chrome #toolbarMainMenuToggle {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .scribigo-profile-menu__copy {
        display: block;
    }
}

@media (max-width: 767px) {
    body.scribigo-app-chrome--site {
        padding-left: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    body.scribigo-app-chrome--site.scribigo-app-chrome--strip-hidden {
        padding-bottom: 0;
    }

    body.scribigo-app-chrome--site .scribigo-app-sidebar {
        display: none;
    }

    body.scribigo-app-chrome--site .scribigo-app-chrome-bar {
        position: sticky;
        top: 0;
        left: 0;
        z-index: 99990;
    }

    body.admin-bar.scribigo-app-chrome--site {
        padding-top: 0;
    }

    body.admin-bar.scribigo-app-chrome--site .scribigo-app-chrome-bar {
        top: 46px;
    }

    body.admin-bar.scribigo-app-chrome--site .scribigo-mobile-navs {
        top: calc(46px + var(--scribigo-chrome-bar-height, var(--sg-row1-height)));
    }

    #scribigo-agent-chat.scribigo-app-chrome-shell {
        flex-direction: column;
    }

    #scribigo-agent-chat .scribigo-app-sidebar {
        display: none;
    }

    .scribigo-chrome-menu-toggle,
    #toolbarMainMenuToggle {
        display: none !important;
    }

    /* Leaked top/transform from host loading or structure backdrop must not lift Zeile 1. */
    body.scribigo-app-chrome #scribigoAppChrome,
    body.scribigo-app-chrome #scribigoGlobalMenubar,
    body.scribigo-app-chrome #scribigoMobileNavs {
        transform: none;
    }

    body.scribigo-app-chrome #scribigoAppHostLoading,
    body.scribigo-app-chrome .scribigo-structure-backdrop {
        transform: none;
    }

    .scribigo-mobile-navs {
        display: flex;
        position: relative;
        z-index: 99984;
        width: 100%;
        box-sizing: border-box;
        background: var(--ast-global-color-5, #f9f4ee);
    }

    body.scribigo-app-chrome--site .scribigo-mobile-navs {
        position: sticky;
        top: var(--scribigo-chrome-bar-height, var(--sg-row1-height));
    }

    .scribigo-world-strip {
        display: flex;
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        z-index: auto;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        border-top: none;
        border-bottom: 1px solid var(--sg-chrome-hairline);
    }

    .scribigo-world-strip[hidden] {
        display: none !important;
    }

    .scribigo-bottom-nav,
    .scribigo-app-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        z-index: auto;
        min-height: 44px;
        height: var(--sg-bottom-nav-height);
        background: var(--ast-global-color-5, #f9f4ee);
        border-top: none;
        border-bottom: 1px solid var(--sg-chrome-hairline);
        justify-content: space-around;
        align-items: stretch;
    }

    .scribigo-bottom-nav__item,
    .scribigo-app-bottom-nav .scribigo-bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
        min-width: 0;
        min-height: 44px;
        height: 100%;
        padding: 6px 2px;
        border: none;
        border-radius: 0;
        background: transparent;
        color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 80%, transparent);
        font: inherit;
        font-size: 0.6875rem;
        font-weight: 400;
        text-decoration: none;
        cursor: pointer;
    }

    .scribigo-bottom-nav__item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .scribigo-bottom-nav__item i {
        width: 18px;
        height: 18px;
        font-size: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 60%, transparent);
    }

    .scribigo-bottom-nav__item:hover:not(.is-disabled),
    .scribigo-bottom-nav__item:focus-visible:not(.is-disabled),
    .scribigo-bottom-nav__item.is-active:not(.is-disabled) {
        background: var(--sg-sidebar-accent);
        color: var(--ast-global-color-2, #1d2327);
    }

    .scribigo-bottom-nav__item.is-disabled,
    .scribigo-bottom-nav__item[aria-disabled="true"] {
        opacity: 0.38;
        cursor: default;
        pointer-events: none;
    }

    .scribigo-bottom-nav__item.is-active {
        background: var(--sg-sidebar-accent-active);
        font-weight: 600;
    }

    .scribigo-bottom-nav__item:hover i,
    .scribigo-bottom-nav__item:focus-visible i,
    .scribigo-bottom-nav__item.is-active i {
        color: var(--ast-global-color-0, #046bd2);
    }

    .scribigo-bottom-nav img,
    .scribigo-bottom-nav .trp-flag-image {
        display: none !important;
    }

    .scribigo-new-order__primary .menu-label,
    .scribigo-profile-menu__copy,
    .scribigo-scribits-tank__count,
    .scribigo-scribits-tank #agentScribitsBalance,
    .agent-flatrate-btn__label {
        display: none;
    }

    .scribigo-scribits-tank__short {
        display: inline;
    }

    .scribigo-order-switcher {
        min-width: 0;
        max-width: none;
        flex: 1 1 auto;
    }

    .scribigo-order-switcher__meta {
        display: none;
    }

    #scribigo-agent-chat {
        padding-bottom: 0;
    }

    body.scribigo-app-chrome--strip-hidden #scribigo-agent-chat {
        padding-bottom: 0;
    }
}

.scribigo-app-sidebar button,
.scribigo-app-sidebar a,
#scribigoAppChrome button,
#scribigoAppChrome a,
#scribigoGlobalMenubar button,
#scribigoGlobalMenubar a,
.scribigo-world-strip button,
.scribigo-world-strip a,
.scribigo-app-bottom-nav button,
.scribigo-app-bottom-nav a {
    min-height: 0;
    line-height: inherit;
}

#scribigoAppChrome .toolbar-dropdown-trigger:active,
#scribigoGlobalMenubar .toolbar-dropdown-trigger:active,
.scribigo-app-sidebar .toolbar-dropdown-trigger:active {
    transform: none;
}

.scribigo-scribits-tank:hover {
    background: color-mix(in srgb, var(--ast-global-color-3, #646970) 16%, var(--sg-chrome-card, #fff));
}

/* Explicit chrome controls. Do not use all:revert here — :not(#id) made it
   beat later cluster/primary rules and left padding/height at UA defaults. */
body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar,
body.scribigo-app-chrome #scribigoGlobalMenubar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    height: var(--sg-row1-height);
    min-height: var(--sg-row1-height);
    max-height: var(--sg-row1-height);
    padding: 8px 12px;
    box-sizing: border-box;
    background: transparent;
    border: none;
}

@media (min-width: 1024px) {
    body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar,
    body.scribigo-app-chrome #scribigoGlobalMenubar {
        padding: 8px 20px;
    }
}

body.scribigo-app-chrome #scribigoGlobalMenubar > .scribigo-row1-left,
body.scribigo-app-chrome #scribigoGlobalMenubar > .scribigo-row1-right {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    float: none;
    transform: none;
    min-width: 0;
    max-height: var(--sg-cluster-height);
}

body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-billing,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu {
    min-width: 0;
    max-height: var(--sg-cluster-height);
    flex: 0 1 auto;
}

body.scribigo-app-chrome #scribigoAppChrome button:not(.dropdown-item):not(.submenu-trigger),
body.scribigo-app-chrome #scribigoGlobalMenubar button:not(.dropdown-item):not(.submenu-trigger),
body.scribigo-app-chrome #scribigoAppChrome .toolbar-dropdown-trigger,
body.scribigo-app-chrome #scribigoGlobalMenubar .toolbar-dropdown-trigger {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    margin: 0;
    height: var(--sg-cluster-height);
    min-height: 0;
    min-width: 0;
    gap: 8px;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.2;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    background-image: none;
    box-shadow: none;
    outline: none;
    cursor: pointer;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-row1-cluster .toolbar-dropdown-trigger,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-cluster .toolbar-dropdown-trigger,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-left:not(:has(.scribigo-row1-cluster)) .toolbar-dropdown-trigger {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
}

body.scribigo-app-chrome #scribigoNewOrderBtn,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
    color: #fff;
    border: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
    line-height: 1.2;
}

body.scribigo-app-chrome #scribigoNewOrderBtn,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary {
    gap: 8px;
    padding: 0 16px;
    border-top-left-radius: var(--sg-chrome-radius);
    border-bottom-left-radius: var(--sg-chrome-radius);
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split {
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 0;
    border-left-color: color-mix(in srgb, #fff 25%, transparent);
}

body.scribigo-app-chrome #scribigoNewOrderBtn:hover,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary:hover,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split:hover,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary.menu-open,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split.menu-open,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary:hover,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split:hover,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary.menu-open,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split.menu-open {
    background-color: color-mix(in srgb, var(--ast-global-color-0, var(--sg-chrome-primary)) 88%, black);
    color: #fff;
    border-color: transparent;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split:hover,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split.menu-open,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split:hover,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split.menu-open {
    border-left-color: color-mix(in srgb, #fff 25%, transparent);
}

body.scribigo-app-chrome #scribigoNewOrderBtn i,
body.scribigo-app-chrome #scribigoNewOrderBtn svg,
body.scribigo-app-chrome #scribigoNewOrderBtn .menu-label,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary i,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary svg,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__primary .menu-label,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split i,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-new-order__split svg,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary i,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary svg,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary .menu-label,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split i,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__split svg {
    color: #fff;
    fill: currentColor;
}

body.scribigo-app-chrome .scribigo-order-switcher__badge {
    display: none !important;
}

body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__trigger,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-order-switcher__trigger {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    background-color: transparent;
    border: 1px solid transparent;
    color: inherit;
    padding: 0 14px;
    gap: 10px;
    border-radius: 0;
    border-top-right-radius: var(--sg-chrome-radius);
    border-bottom-right-radius: var(--sg-chrome-radius);
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-order-switcher__title,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-order-switcher__empty,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__title,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__empty {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    line-height: 1.25;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-order-switcher__meta,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__meta {
    font-size: 0.6875rem !important;
    font-weight: 400 !important;
    line-height: 1.35;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-order-switcher__item-title,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__item-title {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    line-height: 1.25;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-order-switcher__item-meta,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__item-meta {
    font-size: 0.6875rem !important;
    font-weight: 400 !important;
    line-height: 1.35;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger {
    height: var(--sg-cluster-height);
    min-height: 0;
    padding: 4px 12px 4px 4px;
    gap: 10px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background-color: var(--sg-chrome-card);
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: var(--sg-cluster-height);
    min-height: 0;
    min-width: 44px;
    gap: 8px;
    padding: 0 16px;
    background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--sg-chrome-radius);
    box-shadow: none;
    line-height: 1.2;
    font-weight: 500 !important;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login:hover,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login:focus-visible,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login.menu-open,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login.active,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login:hover,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login:focus-visible,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login.menu-open,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login.active {
    background-color: color-mix(in srgb, var(--ast-global-color-0, var(--sg-chrome-primary)) 88%, black);
    color: #fff;
    border-color: transparent;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login i,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login svg,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login .scribigo-profile-menu__login-label,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login i,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login svg,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login .scribigo-profile-menu__login-label {
    color: #fff;
    fill: currentColor;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login i,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login svg,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login i,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login svg {
    width: 16px;
    height: 16px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__trigger--login .scribigo-profile-menu__login-label,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login .scribigo-profile-menu__login-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.2;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__name,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__name {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    line-height: 1.25;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-profile-menu__tariff,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__tariff {
    font-size: 0.6875rem !important;
    font-weight: 400 !important;
    line-height: 1.35;
}

body.scribigo-app-chrome #scribigoAppChrome #toolbarMainMenuToggle,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarMainMenuToggle {
    display: none !important;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-row1-cluster,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-cluster,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-left:not(:has(.scribigo-row1-cluster)) {
    align-items: center;
    overflow: visible;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-row1-cluster,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-cluster,
body.scribigo-app-chrome #scribigoAppChrome .scribigo-scribits-tank,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank,
body.scribigo-app-chrome #scribigoScribitsTank {
    height: var(--sg-cluster-height);
    min-height: 0;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    box-shadow: none;
    background-color: var(--sg-chrome-card);
    box-sizing: border-box;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-scribits-tank,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank,
body.scribigo-app-chrome #scribigoScribitsTank {
    align-items: center;
    min-width: 7.5rem;
    background-color: var(--sg-chrome-card, #fff);
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-scribits-tank__btn,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__btn,
body.scribigo-app-chrome #scribigoScribitsTank .scribigo-scribits-tank__btn,
body.scribigo-app-chrome #scribigoScribitsTank .agent-scribits-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 3px 6px;
    height: 100%;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-scribits-tank__gauge,
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__gauge,
body.scribigo-app-chrome #scribigoScribitsTank .scribigo-quota-gauge--compact {
    height: 4px;
    min-height: 4px;
    max-height: 4px;
    flex: 1 0 100%;
}

body.scribigo-app-chrome #scribigoAppChrome .scribigo-scribits-tank[data-tank-bar="0"],
body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank[data-tank-bar="0"],
body.scribigo-app-chrome #scribigoScribitsTank[data-tank-bar="0"] {
    min-width: 0;
}

body.scribigo-app-chrome #scribigoAppChrome #agentFlatrateActivateBtn,
body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 16rem;
    height: var(--sg-cluster-height);
    min-height: 0;
    padding: 0 12px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    box-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: none;
    animation: none;
    transition: none;
}

body.scribigo-app-chrome #scribigoAppChrome #agentFlatrateActivateBtn i,
body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn i {
    font-size: 14px;
    width: 16px;
    height: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    flex: 0 0 auto;
}

body.scribigo-app-chrome #scribigoAppChrome #agentFlatrateActivateBtn.agent-flatrate-available,
body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn.agent-flatrate-available {
    background: #10b981;
    border-color: #059669;
    color: #fff;
}

body.scribigo-app-chrome #scribigoAppChrome #agentFlatrateActivateBtn.agent-flatrate-available:hover:not(:disabled),
body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn.agent-flatrate-available:hover:not(:disabled) {
    background: #059669;
    border-color: #047857;
    color: #fff;
    transform: none;
}

.scribigo-app-sidebar .scribigo-app-nav__item,
.scribigo-app-sidebar .scribigo-app-nav__item.toolbar-dropdown-trigger {
    all: revert;
    appearance: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 0 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: var(--sg-chrome-radius-lg) !important;
    background: transparent !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 80%, transparent) !important;
    font: inherit !important;
    font-weight: 400 !important;
    text-align: left !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.scribigo-app-sidebar .scribigo-app-nav__item i {
    width: 18px !important;
    height: 18px !important;
    font-size: 15px !important;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 60%, transparent) !important;
}

.scribigo-app-sidebar .scribigo-app-nav__item:hover:not(.is-disabled),
.scribigo-app-sidebar .scribigo-app-nav__item:focus-visible:not(.is-disabled) {
    background: var(--sg-sidebar-accent) !important;
    color: var(--ast-global-color-2, #1d2327) !important;
    font-weight: 400 !important;
    filter: none !important;
}

.scribigo-app-sidebar .scribigo-app-nav__item.is-disabled,
.scribigo-app-sidebar .scribigo-app-nav__item[aria-disabled="true"] {
    opacity: 0.38 !important;
    cursor: default !important;
    pointer-events: none !important;
}

.scribigo-app-sidebar .scribigo-app-nav__item.is-active,
.scribigo-app-sidebar .scribigo-app-nav__item[aria-current="page"] {
    background: var(--sg-sidebar-accent-active) !important;
    color: var(--ast-global-color-2, #1d2327) !important;
    font-weight: 600 !important;
    filter: none !important;
}

.scribigo-app-sidebar .scribigo-app-nav__item.is-active i,
.scribigo-app-sidebar .scribigo-app-nav__item[aria-current="page"] i {
    color: var(--ast-global-color-0, #046bd2) !important;
}

.scribigo-app-sidebar .scribigo-app-sidebar__collapse {
    display: inline-flex !important;
    width: 30px !important;
    height: 30px !important;
    padding: 6px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 70%, transparent) !important;
}

.scribigo-app-sidebar {
    border-right: 1px solid var(--sg-chrome-hairline) !important;
}

body.scribigo-app-chrome--rail .scribigo-app-sidebar .scribigo-app-nav__item,
.scribigo-app-sidebar.is-rail .scribigo-app-nav__item {
    justify-content: center !important;
    padding: 0 !important;
}

@media (max-width: 1279px) and (min-width: 768px) {
    .scribigo-app-sidebar .scribigo-app-nav__item,
    .scribigo-app-sidebar .scribigo-app-nav__item.toolbar-dropdown-trigger {
        justify-content: center !important;
        padding: 0 !important;
    }
}

/* Two-ID locks so later .toolbar-dropdown-trigger rules cannot split the cluster. */
body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarClipboardPaste,
body.scribigo-app-chrome #scribigoGlobalMenubar #menuRecentOrders {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: 1px solid transparent;
}

body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn {
    padding: 0 16px;
    gap: 8px;
    line-height: 1.2;
    background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
    color: #fff;
    border-radius: 0;
    border-top-left-radius: var(--sg-chrome-radius);
    border-bottom-left-radius: var(--sg-chrome-radius);
}

body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarClipboardPaste {
    justify-content: center;
    width: 44px;
    min-width: 44px;
    padding: 0;
    background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
    color: #fff;
    border-radius: 0;
    border-left-color: color-mix(in srgb, #fff 25%, transparent);
}

body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn i,
body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn svg,
body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn .menu-label,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarClipboardPaste i,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarClipboardPaste svg {
    color: #fff;
    fill: currentColor;
}

body.scribigo-app-chrome #scribigoGlobalMenubar #menuRecentOrders {
    padding: 0 14px;
    gap: 10px;
    background-color: transparent;
    color: inherit;
    border-radius: 0;
    border-top-right-radius: var(--sg-chrome-radius);
    border-bottom-right-radius: var(--sg-chrome-radius);
}

/* Beat later agent-chat 44px / border:none locks on the same IDs. */
body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar #scribigoNewOrderBtn,
body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar #toolbarClipboardPaste,
body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar #menuRecentOrders {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
}

body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar #toolbarClipboardPaste {
    border-left-color: color-mix(in srgb, #fff 25%, transparent);
}

body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarDropdownAccount {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: var(--sg-cluster-height);
    padding: 4px 12px 4px 4px;
    gap: 10px;
    background-color: var(--sg-chrome-card);
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
}

/* Beat later left:0 dropdown rules so the chip menu aligns end (Dummy-like). */
body.scribigo-app-chrome #scribigoAppChrome #toolbarMenuAccount,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarMenuAccount {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 16rem;
    margin-top: 4px;
    padding: 4px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100020;
    overflow: hidden;
}

body.scribigo-app-chrome #scribigoAppChrome #toolbarSubmenuRecentOrders,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarSubmenuRecentOrders {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    display: flex;
    flex-direction: column;
    width: min(520px, calc(100vw - 24px));
    min-width: 18.75rem;
    max-width: min(520px, calc(100vw - 24px));
    box-sizing: border-box;
    max-height: min(24rem, calc(100vh - 96px));
    margin-top: 4px;
    padding: 0;
    overflow: hidden;
    z-index: 100020;
}

/* Dummy rounded-xl (~14px) on chrome popups — not WP 3px / not cluster radius. */
body.scribigo-app-chrome #scribigoAppChrome .toolbar-dropdown-menu,
body.scribigo-app-chrome #scribigoAppSidebar .toolbar-dropdown-menu,
body.scribigo-app-chrome #scribigoGlobalMenubar .toolbar-dropdown-menu,
body.scribigo-app-chrome #scribigoAppChrome .toolbar-dropdown-submenu,
body.scribigo-app-chrome #scribigoAppSidebar .toolbar-dropdown-submenu,
body.scribigo-app-chrome #scribigoGlobalMenubar .toolbar-dropdown-submenu,
body.scribigo-app-chrome #scribigoAppChrome .dropdown-submenu,
body.scribigo-app-chrome #scribigoAppSidebar .dropdown-submenu,
body.scribigo-app-chrome #scribigoGlobalMenubar .dropdown-submenu,
body.scribigo-app-chrome #toolbarMenuShop,
body.scribigo-app-chrome #toolbarMenuHelp,
body.scribigo-app-chrome #toolbarMenuAccount,
body.scribigo-app-chrome #toolbarSubmenuRecentOrders {
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    background: #fff;
}

body.scribigo-app-chrome #scribigoAppChrome #toolbarMenuAccount,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarMenuAccount,
body.scribigo-app-chrome #toolbarMenuAccount {
    overflow: hidden;
}

body.scribigo-app-chrome #scribigoAppChrome #toolbarSubmenuRecentOrders,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarSubmenuRecentOrders,
body.scribigo-app-chrome #toolbarSubmenuRecentOrders {
    overflow: hidden;
}

body.scribigo-app-chrome #toolbarMenuAccount #toolbarMenuHelpProfile,
body.scribigo-app-chrome #scribigoAppChrome #toolbarMenuHelpProfile,
body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarMenuHelpProfile {
    position: static;
    inset: auto;
    display: block;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background: transparent;
}

/* ===== Scheibe 2: Zeile 2 + schwebende Werkbank-Panels ===== */

.scribigo-chrome-hidden-controls[hidden] {
    display: none !important;
}

#agentPreviewToolbar.scribigo-context-toolbar {
    --sg-z2-h: 32px;
    gap: 8px;
    padding: 6px 12px;
    flex-wrap: wrap;
    align-items: center;
}

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-actions,
#agentPreviewToolbar.scribigo-context-toolbar .review-toolbar {
    padding: 0;
    gap: 2px;
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 0;
    height: auto;
    box-shadow: none;
}

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-review {
    display: flex;
    align-items: center;
    gap: 6px;
}

#agentPreviewToolbar.scribigo-context-toolbar .scribigo-context-label,
#agentPreviewToolbar.scribigo-context-toolbar .menu-label {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
}

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-action-btn,
#agentPreviewToolbar.scribigo-context-toolbar .toolbar-dropdown-trigger,
#agentPreviewToolbar.scribigo-context-toolbar .review-btn {
    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;
    transform: none;
}

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-action-btn:hover:not(.is-disabled),
#agentPreviewToolbar.scribigo-context-toolbar .toolbar-action-btn.active,
#agentPreviewToolbar.scribigo-context-toolbar .toolbar-dropdown-trigger:hover:not(.is-disabled),
#agentPreviewToolbar.scribigo-context-toolbar .toolbar-dropdown-trigger.menu-open,
#agentPreviewToolbar.scribigo-context-toolbar .toolbar-dropdown-trigger.active,
#agentPreviewToolbar.scribigo-context-toolbar .review-btn: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 .toolbar-dropdown-trigger:active,
#agentPreviewToolbar.scribigo-context-toolbar .review-btn:active {
    transform: none;
}

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-action-btn:not(:has(.scribigo-context-label)):not(:has(.menu-label)),
#agentPreviewToolbar.scribigo-context-toolbar .review-btn,
#agentPreviewToolbar.scribigo-context-toolbar #searchBtn,
#agentPreviewToolbar.scribigo-context-toolbar #toolbarDropdownSettings,
#agentPreviewToolbar.scribigo-context-toolbar .scribigo-split-btn__chev {
    width: var(--sg-z2-h);
    min-width: var(--sg-z2-h);
    padding: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .scribigo-split-btn {
    display: flex;
    align-items: center;
    position: relative;
}

#agentPreviewToolbar.scribigo-context-toolbar .scribigo-split-btn__chev {
    width: 24px;
    min-width: 24px;
}

#agentPreviewToolbar.scribigo-context-toolbar #searchBtn .scribigo-context-label,
#agentPreviewToolbar.scribigo-context-toolbar #searchBtn .menu-label {
    display: none !important;
}

#agentPreviewToolbar #toolbarSearch,
#agentPreviewToolbar #toolbarSearch.toolbar-search {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    width: auto;
    max-width: max-content;
    height: var(--sg-z2-h);
    min-height: var(--sg-z2-h);
    margin: 0;
    padding: 0;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

#agentPreviewToolbar #toolbarSearch .search-input-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 11.5rem;
    min-width: 8rem;
    max-width: 14rem;
}

#agentPreviewToolbar #toolbarSearch #searchInput {
    box-sizing: border-box;
    width: 100%;
    height: var(--sg-z2-h) !important;
    min-height: var(--sg-z2-h) !important;
    max-height: var(--sg-z2-h);
    padding: 0 32px 0 8px !important;
    font-size: 0.8125rem;
    line-height: 1;
    background: #fff;
    border: 1px solid var(--ast-border-color);
    border-radius: 3px;
    box-shadow: none;
}

#agentPreviewToolbar #toolbarSearch .search-controls,
#agentPreviewToolbar #toolbarSearch .search-nav-compact {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    flex-grow: 0;
    flex-shrink: 0;
    width: auto;
    height: var(--sg-z2-h);
    margin: 0;
    padding: 0;
    gap: 2px;
    background: transparent;
    border: none;
    box-shadow: none;
}

#agentPreviewToolbar #toolbarSearch .search-nav-btn,
#agentPreviewToolbar #toolbarSearch .search-option,
#agentPreviewToolbar #toolbarSearch #searchClearBtn,
#agentPreviewToolbar #toolbarSearch #searchPrevBtn,
#agentPreviewToolbar #toolbarSearch #searchNextBtn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sg-z2-h);
    min-width: var(--sg-z2-h);
    max-width: var(--sg-z2-h);
    height: var(--sg-z2-h);
    min-height: var(--sg-z2-h);
    max-height: var(--sg-z2-h);
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    box-shadow: none;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    color: var(--ast-global-color-3);
    cursor: pointer;
    transform: none;
}

#agentPreviewToolbar #toolbarSearch .search-nav-btn:hover,
#agentPreviewToolbar #toolbarSearch .search-option:hover,
#agentPreviewToolbar #toolbarSearch #searchClearBtn:hover,
#agentPreviewToolbar #toolbarSearch #searchPrevBtn:hover,
#agentPreviewToolbar #toolbarSearch #searchNextBtn: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);
    box-shadow: none;
    transform: none;
}

#agentPreviewToolbar #toolbarSearch .search-option:has(input:checked) {
    background: color-mix(in srgb, var(--ast-global-color-0) 15%, white);
    border-color: var(--ast-global-color-0);
    color: var(--ast-global-color-0);
}

#agentPreviewToolbar #toolbarSearch .search-option input[type="checkbox"]:checked + span,
#agentPreviewToolbar #toolbarSearch .search-option input[type="checkbox"]:checked + span i {
    color: inherit;
}

#agentPreviewToolbar #toolbarSearch .search-nav-btn i,
#agentPreviewToolbar #toolbarSearch .search-option i,
#agentPreviewToolbar #toolbarSearch #searchClearBtn i,
#agentPreviewToolbar #toolbarSearch #searchPrevBtn i,
#agentPreviewToolbar #toolbarSearch #searchNextBtn i {
    font-size: inherit;
    line-height: 1;
    color: inherit;
}

#agentPreviewToolbar #toolbarSearch #searchClearBtn {
    position: absolute;
    top: 0;
    right: 0;
    transform: none;
}

#agentPreviewToolbar #toolbarSearch #searchCounter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: var(--sg-z2-h);
    padding: 0 4px;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: #656d76;
    text-align: center;
    white-space: nowrap;
}

#agentPreviewToolbar #toolbarSearch #searchCounter.is-error {
    color: #d1242f;
}

#agentPreviewToolbar #toolbarSearch #searchCounter.is-loading {
    color: var(--ast-global-color-3, #656d76);
    min-width: 1.75rem;
}

#scribigo-agent-chat:not([data-preview-tab="bible"]) #agentBibleRebuildBtn {
    display: none !important;
}

#agentPreviewToolbar .toolbar-separator.is-empty {
    display: none !important;
}

#agentPreviewToolbar.scribigo-context-toolbar .dropdown-arrow {
    font-size: 0.625rem;
    margin: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar #agentSelectionCounter {
    display: flex;
    align-items: center;
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: color-mix(in srgb, var(--ast-global-color-0) 10%, white);
    color: var(--ast-global-color-0);
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0) 40%, white);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    line-height: 1;
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip-body {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 5px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: default;
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip.is-all .selection-chip-body {
    cursor: pointer;
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip.is-all:hover {
    background: color-mix(in srgb, var(--ast-global-color-0) 16%, white);
    border-color: var(--ast-global-color-0);
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip-close {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0 4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    opacity: 0.7;
    cursor: pointer;
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip-close[hidden] {
    display: none;
}

#agentPreviewToolbar.scribigo-context-toolbar .selection-chip-close:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--ast-global-color-0) 12%, white);
}

#scribigo-agent-chat[data-preview-tab="versions"] #agentPreviewToolbar,
#scribigo-agent-chat[data-preview-tab="audio"]:not([data-audio-view="studio"]) #agentPreviewToolbar,
#scribigo-agent-chat[data-preview-tab="analysis"]:not([data-analysis-view="detail"]) #agentPreviewToolbar {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="audio"][data-audio-view="studio"] #agentPreviewToolbar {
    display: flex !important;
}

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

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

#agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-audio {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

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

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-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;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-tab:hover,
#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-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-audio-toolbar-scribits {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    flex: 0 1 auto;
    min-width: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits[hidden] {
    display: none !important;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--sg-z2-h);
    min-height: var(--sg-z2-h);
    max-height: var(--sg-z2-h);
    padding: 0 10px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
    box-sizing: border-box;
    min-width: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__icon {
    width: 13px;
    height: 13px;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ast-global-color-0, #046bd2);
    flex-shrink: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__count {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    color: var(--ast-global-color-2, #1d2327);
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__unit {
    font-size: 0.6875rem;
    font-weight: 400;
    line-height: 1;
    color: var(--ast-global-color-3, #646970);
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__words {
    font-size: 0.6875rem;
    font-weight: 400;
    line-height: 1;
    color: var(--ast-global-color-3, #646970);
    white-space: nowrap;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--sg-z2-h);
    min-height: var(--sg-z2-h);
    max-height: var(--sg-z2-h);
    padding: 0 10px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
    color: var(--ast-global-color-0, #046bd2);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

#agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__buy: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);
}

@media (max-width: 1100px) {
    #agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__words {
        display: none;
    }
}

@media (max-width: 860px) {
    #agentPreviewToolbar.scribigo-context-toolbar .sg-audio-toolbar-scribits__unit {
        display: none;
    }
}

#scribigo-agent-chat.scribigo-app-chrome-shell[data-audio-view="studio"]:has(#sgAudioToolbarMount .sg-audio-tabs) #agentAudioContent .sg-audio-tabs {
    display: none !important;
}

/* Audio: only the full pane scrolls — scrollbar on the far right, Zeile 2 stays above. */
#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioPanel {
    width: 100%;
    max-width: none;
    overflow: hidden;
}

#scribigo-agent-chat[data-preview-tab="audio"] .scribigo-agent-preview-area {
    border-color: var(--sg-chrome-hairline);
    box-shadow: none;
    background: var(--sg-chrome-card, #fff);
}

#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioContent {
    width: 100%;
    max-width: none;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
}

#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioContent > * {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioContent .sg-audio-studio,
#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioContent .sg-audio-billing-gate,
#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioContent .sg-audio-empty,
#scribigo-agent-chat[data-preview-tab="audio"] #agentAudioContent .sg-audio-loading {
    overflow: visible !important;
}

#scribigo-agent-chat.scribigo-app-chrome-shell[data-preview-tab="audio"] .sg-audio-header h2 {
    display: none;
}

#scribigo-agent-chat[data-preview-tab="analysis"][data-analysis-view="detail"] #agentPreviewToolbar {
    display: flex !important;
}

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

#scribigo-agent-chat.scribigo-app-chrome-shell #agentAnalysisPanel > .analysis-toolbar {
    display: none !important;
}

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

#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar,
#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar.toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 0;
    height: auto;
    box-shadow: none;
}

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

#agentPreviewToolbar.scribigo-context-toolbar .analysis-view-tab,
#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar .toolbar-btn,
#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar .toolbar-btn-icon {
    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;
    transform: none;
    color: var(--ast-global-color-3);
}

#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar .toolbar-btn:not(:has(.scribigo-context-label)),
#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar .toolbar-btn-icon {
    width: var(--sg-z2-h);
    min-width: var(--sg-z2-h);
    padding: 0;
}

#agentPreviewToolbar.scribigo-context-toolbar .analysis-view-tab:hover:not(.is-disabled),
#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar .toolbar-btn:hover:not(.is-disabled),
#agentPreviewToolbar.scribigo-context-toolbar .analysis-view-tab.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 .analysis-view-tab-badge {
    min-width: 16px;
    height: 16px;
    margin-left: 2px;
    padding: 0 4px;
    font-size: 10px;
}

#agentPreviewToolbar.scribigo-context-toolbar .analysis-toolbar-title {
    margin-left: 4px;
}

/* Analysen: list-first under chrome (Zeile 2 only in detail). Floating card like workbench. */
#scribigo-agent-chat.scribigo-app-chrome-shell[data-preview-tab="analysis"] .scribigo-chrome-main {
    background: var(--ast-global-color-5, #f8f8f8);
}

#scribigo-agent-chat.scribigo-app-chrome-shell[data-preview-tab="analysis"] #agentAnalysisPanel {
    width: auto;
    margin: 8px 12px 12px;
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius, 12px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    background: var(--sg-chrome-card, #fff);
    overflow: hidden;
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-history {
    padding: 12px 14px 16px;
    gap: 8px;
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-history__title {
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #1f2937));
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item,
#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item {
    border: 1px solid var(--sg-chrome-hairline);
    border-radius: var(--sg-chrome-radius);
    background: var(--sg-chrome-card, #fff);
    padding: 12px 16px;
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item[data-openable="1"]:hover,
#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item:hover:not(.version-item--baseline):not(.version-item--current) {
    background: color-mix(in srgb, var(--sg-chrome-card, #fff) 90%, #000);
    border-color: var(--sg-chrome-hairline);
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item--outdated {
    border-color: color-mix(in srgb, #9a6700 28%, var(--sg-chrome-hairline));
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item-delete {
    border-radius: var(--sg-chrome-radius-sm);
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item--current {
    border-color: color-mix(in srgb, var(--sg-chrome-primary) 55%, white);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sg-chrome-primary) 7%, #fff), #fff 72%);
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item--current:hover {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sg-chrome-primary) 11%, #fff), #fff 72%);
    border-color: color-mix(in srgb, var(--sg-chrome-primary) 55%, white);
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item--baseline {
    background:
        linear-gradient(135deg, rgba(180, 83, 9, 0.07), #fff 72%);
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item--baseline:hover {
    background:
        linear-gradient(135deg, rgba(180, 83, 9, 0.11), #fff 72%);
    border-color: color-mix(in srgb, #b45309 28%, var(--sg-chrome-hairline));
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item--baseline.version-item--current {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sg-chrome-primary) 7%, #fff), rgba(180, 83, 9, 0.06) 100%);
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item--baseline.version-item--current:hover {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sg-chrome-primary) 11%, #fff), rgba(180, 83, 9, 0.08) 100%);
    border-color: color-mix(in srgb, var(--sg-chrome-primary) 55%, white);
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item .sg-overview__order-title,
#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item .sg-overview__order-title {
    color: var(--sg-chrome-primary-fg, var(--ast-global-color-2, #1f2937));
}

#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item .sg-overview__order-rule,
#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item .sg-overview__order-rule,
#scribigo-agent-chat.scribigo-app-chrome-shell .analysis-item .sg-overview__order-meta,
#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item .sg-overview__order-meta,
#scribigo-agent-chat.scribigo-app-chrome-shell .history-item__metrics {
    color: var(--ast-global-color-3, #646970);
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item__btn {
    height: var(--sg-z2-h, 32px);
    min-height: var(--sg-z2-h, 32px);
    max-height: var(--sg-z2-h, 32px);
    border-radius: 3px;
}

#scribigo-agent-chat.scribigo-app-chrome-shell #agentVersionsContent .version-item__btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--sg-chrome-primary) 12%, white);
    border-color: var(--sg-chrome-primary);
    color: var(--sg-chrome-primary);
}

#scribigo-agent-chat:not([data-preview-tab="overview"]) .scribigo-agent-wrapper {
    gap: 12px;
    padding: 8px 12px 12px;
    background: var(--ast-global-color-5, #f8f8f8);
}

#scribigo-agent-chat:not([data-preview-tab="overview"]) .scribigo-agent-chat-area {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--ast-border-color, #e5e7eb);
    background: #fff;
    overflow: hidden;
}

#scribigo-agent-chat:not([data-preview-tab="overview"]) .scribigo-agent-preview-area {
    border-radius: 12px;
    border: 1px solid var(--ast-border-color, #e5e7eb);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    border-left: 1px solid var(--ast-border-color, #e5e7eb);
}

.scribigo-agent-panel-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    flex-shrink: 0;
    min-width: 0;
    padding: 6px 8px;
    border-bottom: 1px solid var(--sg-chrome-hairline, var(--ast-border-color, #e5e7eb));
    background: var(--ast-global-color-5, #f8f8f8);
}

.scribigo-agent-panel-tabs,
.scribigo-bible-view.is-kartei-mobile .sbv-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 6px 8px;
    border-bottom: 1px solid var(--ast-border-color, #e5e7eb);
    background: var(--ast-global-color-5, #f8f8f8);
}

.scribigo-agent-panel-toolbar .scribigo-agent-panel-tabs {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    background: transparent;
}

.scribigo-agent-review-filters {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 1 auto;
    margin-left: auto;
}

.scribigo-agent-review-filters[hidden] {
    display: none !important;
}

.scribigo-agent-review-filters .review-inbox-toolbar-filters {
    padding: 0;
    border: 0;
    background: transparent;
    gap: 6px;
    flex-wrap: nowrap;
}

.scribigo-agent-review-filters .review-inbox-status-tabs {
    padding: 2px;
    border: 1px solid var(--sg-chrome-hairline, var(--ast-border-color, #e5e7eb));
    border-radius: var(--sg-chrome-radius, 8px);
    background: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 5%, #fff);
}

.scribigo-agent-review-filters .review-inbox-status-tab {
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
}

.scribigo-agent-review-filters .review-inbox-status-tab.is-active {
    background: #fff;
    color: var(--ast-global-color-2, #1d2327);
    box-shadow: none;
}

.scribigo-agent-review-filters .review-inbox-bulk-btn,
.scribigo-agent-review-filters .review-inbox-scope-clear {
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    border-color: var(--sg-chrome-hairline, var(--ast-border-color, #e5e7eb));
    background: #fff;
}

@media (max-width: 767px) {
    .scribigo-agent-panel-toolbar {
        flex-wrap: wrap;
    }

    .scribigo-agent-review-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .scribigo-agent-review-filters .review-inbox-bulk-actions {
        display: none;
    }
}

.scribigo-agent-panel-tab {
    width: auto !important;
    min-width: 0;
    padding: 0 10px !important;
    gap: 6px;
    height: 32px;
}

.scribigo-agent-panel-tab__label {
    font-size: 0.8125rem;
    font-weight: 500;
}

.scribigo-structure-panel[hidden] {
    display: none !important;
}

.scribigo-structure-panel {
    display: none;
    flex-direction: column;
    width: 320px;
    min-width: 220px;
    max-width: 80%;
    height: 100%;
    min-height: 0;
    position: relative;
    flex-shrink: 0;
}

.scribigo-structure-panel.is-open {
    display: flex;
}

.scribigo-structure-panel__card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--ast-border-color, #e5e7eb);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.scribigo-structure-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ast-border-color, #e5e7eb);
    flex-shrink: 0;
}

.scribigo-structure-panel__header h3 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ast-global-color-2, #1f2937);
    display: flex;
    align-items: center;
    gap: 8px;
}

.scribigo-structure-panel__header .toc-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--ast-global-color-3, #6b7280);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 1rem;
}

.scribigo-structure-panel__header .toc-close-btn:hover {
    background: var(--ast-global-color-5, #f8f8f8);
    color: var(--ast-global-color-2, #1f2937);
}

.scribigo-structure-panel__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px 12px;
}

.scribigo-toc-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    margin-bottom: 2px;
    border-radius: 3px;
    cursor: pointer;
}

.scribigo-toc-entry:hover {
    background: var(--ast-global-color-5, #f8f8f8);
}

.scribigo-toc-entry__para,
.scribigo-toc-entry__level {
    flex-shrink: 0;
    font-family: monospace;
    font-weight: 600;
    border-radius: 3px;
}

.scribigo-toc-entry__para {
    min-width: 36px;
    padding: 2px 6px;
    background: var(--ast-global-color-0, #046bd2);
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
}

.scribigo-toc-entry__level {
    padding: 1px 5px;
    background: var(--ast-global-color-5, #f8f8f8);
    color: var(--ast-global-color-3, #6b7280);
    font-size: 0.6875rem;
}

.scribigo-toc-entry__title {
    flex: 1;
    font-size: 0.875rem;
    color: var(--ast-global-color-2, #1f2937);
    line-height: 1.4;
}

.scribigo-toc-empty {
    color: var(--ast-global-color-3, #6b7280);
    text-align: center;
    padding: 24px 12px;
    margin: 0;
}

.scribigo-toc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    padding: 16px 8px;
    box-sizing: border-box;
    text-align: center;
}

.scribigo-toc-empty-state__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 18rem;
}

.scribigo-toc-empty-state__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ast-global-color-2, #1f2937);
}

.scribigo-toc-empty-state__hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ast-global-color-3, #6b7280);
}

.scribigo-toc-empty-state .scribigo-lt-baseline-prompt__btn {
    margin-top: 0.15rem;
    white-space: normal;
}

.scribigo-structure-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
}

.scribigo-structure-resize-handle:hover,
.scribigo-structure-resize-handle.resizing {
    background: var(--ast-global-color-0, #046bd2);
}

.scribigo-panel-edge-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 21;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--ast-border-color, #e5e7eb);
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: #fff;
    color: var(--ast-global-color-3, #6b7280);
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
    line-height: 0;
}

.scribigo-panel-edge-toggle--start {
    right: auto;
    left: 0;
    border-right: 1px solid var(--ast-border-color, #e5e7eb);
    border-left: none;
    border-radius: 0 6px 6px 0;
}

.scribigo-panel-edge-toggle:hover,
.scribigo-panel-edge-toggle:focus-visible {
    background: color-mix(in srgb, var(--ast-global-color-0, #046bd2) 12%, white);
    color: var(--ast-global-color-0, #046bd2);
}

.scribigo-panel-edge-toggle i {
    font-size: 0.75rem;
}

#scribigo-agent-chat .scribigo-agent-chat-area.is-collapsed,
.scribigo-agent-chat-area.is-collapsed,
.scribigo-structure-panel.is-collapsed {
    display: none !important;
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#scribigo-agent-chat .scribigo-agent-chat-area.is-collapsed .scribigo-panel-edge-toggle,
.scribigo-agent-chat-area.is-collapsed .scribigo-panel-edge-toggle,
.scribigo-structure-panel.is-collapsed .scribigo-panel-edge-toggle {
    display: none !important;
}

.scribigo-agent-chat-area.is-collapsed .scribigo-agent-resize-handle,
.scribigo-structure-panel.is-collapsed .scribigo-structure-resize-handle {
    display: none !important;
}

.scribigo-structure-backdrop {
    display: none;
}

#scribigo-agent-chat:not([data-preview-tab="preview"]):not([data-preview-tab="translate"]):not([data-preview-tab="document"]):not([data-preview-tab="chat"]) #scribigoStructurePanel,
#scribigo-agent-chat[data-preview-tab="overview"] #scribigoStructurePanel,
#scribigo-agent-chat:not([data-preview-tab="preview"]):not([data-preview-tab="translate"]):not([data-preview-tab="document"]):not([data-preview-tab="chat"]) .scribigo-structure-backdrop,
#scribigo-agent-chat[data-preview-tab="overview"] .scribigo-structure-backdrop {
    display: none !important;
}

#scribigo-agent-chat[data-preview-tab="bible"] #agentBiblePanel,
#scribigo-agent-chat[data-preview-tab="bible"] #agentBibleContent,
#scribigo-agent-chat[data-preview-tab="bible"] .scribigo-bible-view {
    min-width: 0;
}

#agentContentViewBtn {
    display: none;
}

#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-agent-preview-area {
    position: relative;
    min-width: var(--sg-preview-min-width, 440px);
}

#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-structure-panel.is-open {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86%) !important;
    max-width: none;
    min-width: 0;
    z-index: 24;
    padding: 0;
}

#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-structure-panel.is-open .scribigo-structure-panel__card {
    border-radius: 0 var(--sg-chrome-radius-md, 8px) var(--sg-chrome-radius-md, 8px) 0;
    box-shadow: 8px 0 24px color-mix(in srgb, var(--ast-global-color-2, #1d2327) 16%, transparent);
}

#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-structure-panel__header .toc-close-btn {
    display: inline-flex;
}

#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-structure-resize-handle,
#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-panel-edge-toggle {
    display: none !important;
}

#scribigo-agent-chat.scribigo-layout--toc-overlay .scribigo-structure-backdrop.is-open {
    display: block;
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 28%, transparent);
    z-index: 23;
}

@media (max-width: 767px) {
    #scribigo-agent-chat:not([data-preview-tab="overview"]) .scribigo-agent-wrapper {
        position: relative;
        padding: 0;
        gap: 0;
    }

    #scribigo-agent-chat:not([data-preview-tab="overview"]) .scribigo-agent-chat-area,
    #scribigo-agent-chat:not([data-preview-tab="overview"]) .scribigo-agent-preview-area {
        border-radius: 0;
        box-shadow: none;
    }

    #scribigo-agent-chat.scribigo-app-chrome-shell[data-preview-tab="analysis"] #agentAnalysisPanel {
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .scribigo-structure-panel.is-open {
        position: absolute;
        inset: 0;
        width: auto !important;
        max-width: none;
        min-width: 0;
        z-index: 20;
        padding: 0;
    }

    .scribigo-structure-panel.is-open .scribigo-structure-panel__card {
        border-radius: 0;
        box-shadow: none;
    }

    .scribigo-structure-resize-handle,
    .scribigo-panel-edge-toggle {
        display: none !important;
    }

    .scribigo-structure-panel__header .toc-close-btn {
        display: inline-flex;
    }

    .scribigo-agent-chat-area.is-collapsed,
    .scribigo-structure-panel.is-collapsed {
        display: none !important;
        flex: 0 0 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        overflow: hidden !important;
    }

    #agentContentViewBtn {
        display: none !important;
    }

    #agentPanelBtn {
        display: none !important;
    }

    .scribigo-structure-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 9999;
    }

    .scribigo-agent-panel-tab__label {
        display: none;
    }

    #agentPreviewToolbar.scribigo-context-toolbar .scribigo-context-label,
    #agentPreviewToolbar.scribigo-context-toolbar .menu-label {
        display: none;
    }
}

/* <768 row-1 collapse + unified mobile nav. High specificity beats agent-chat locks. */
@media (max-width: 1600px) {
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu:not(.scribigo-profile-menu--guest) .scribigo-profile-menu__copy,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu:not(.scribigo-profile-menu--guest) .scribigo-profile-menu__trigger .menu-label {
        display: none;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu:not(.scribigo-profile-menu--guest) {
        max-width: 3.25rem;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarDropdownAccount,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu:not(.scribigo-profile-menu--guest) .scribigo-profile-menu__trigger {
        padding: 4px !important;
        gap: 0 !important;
    }
}

@media (max-width: 1100px) {
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__login-label--full {
        display: none;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__login-label--short {
        display: inline;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu--guest {
        max-width: 10rem;
    }
}

@media (max-width: 1400px) {
    body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn .agent-flatrate-btn__label {
        display: none;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn i {
        font-size: 14px;
        width: 16px;
        height: 16px;
    }

}

@media (max-width: 767px) {
    body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar,
    body.scribigo-app-chrome #scribigoGlobalMenubar {
        grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
        gap: 6px;
        padding: 8px;
        overflow: visible;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-left,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-right,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-cluster,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-billing {
        min-width: 0;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-right,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-row1-billing {
        gap: 6px;
        flex: 0 1 auto;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn,
    body.scribigo-app-chrome #scribigoAppChrome #scribigoGlobalMenubar #scribigoNewOrderBtn,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary {
        width: 36px;
        min-width: 36px;
        padding: 0 !important;
        gap: 0 !important;
        justify-content: center;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #scribigoNewOrderBtn .menu-label,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-new-order__primary .menu-label,
    body.scribigo-app-chrome #scribigoNewOrderBtn .menu-label {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        font-size: 0 !important;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarClipboardPaste {
        width: 36px;
        min-width: 36px;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher,
    body.scribigo-app-chrome #scribigoGlobalMenubar #menuRecentOrdersContainer {
        min-width: 0 !important;
        max-width: none;
        flex: 1 1 auto;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #menuRecentOrders {
        padding: 0 8px !important;
        gap: 4px !important;
        min-width: 0;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__copy,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__title,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__empty,
    body.scribigo-app-chrome #scribigoGlobalMenubar #agentDocumentTitle,
    body.scribigo-app-chrome #scribigoGlobalMenubar #agentDocumentName {
        display: block;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-order-switcher__meta,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu:not(.scribigo-profile-menu--guest) .scribigo-profile-menu__copy,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu:not(.scribigo-profile-menu--guest) .scribigo-profile-menu__trigger .menu-label,
    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__count,
    body.scribigo-app-chrome #scribigoGlobalMenubar #agentScribitsBalance,
    body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn .agent-flatrate-btn__label {
        display: none !important;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__short {
        display: inline !important;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank,
    body.scribigo-app-chrome #scribigoScribitsTank {
        flex: 0 1 auto;
        min-width: 5.5rem;
        max-width: 7.5rem;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank[data-tank-bar="0"],
    body.scribigo-app-chrome #scribigoScribitsTank[data-tank-bar="0"] {
        min-width: 0;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__btn,
    body.scribigo-app-chrome #scribigoScribitsTank .scribigo-scribits-tank__btn {
        padding: 4px 8px;
        gap: 3px 6px;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__icon {
        display: none;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-scribits-tank__gauge,
    body.scribigo-app-chrome #scribigoScribitsTank .scribigo-quota-gauge--compact {
        width: 100%;
        height: 4px;
        min-height: 4px;
        max-height: 4px;
        flex: 1 0 100%;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn,
    body.scribigo-app-chrome #scribigoAppChrome #agentFlatrateActivateBtn {
        width: 36px;
        min-width: 36px;
        padding: 0 !important;
        justify-content: center;
        font-size: 0;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #agentFlatrateActivateBtn i {
        font-size: 14px;
        width: 16px;
        height: 16px;
        color: inherit;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarDropdownAccount {
        width: 40px;
        min-width: 40px;
        padding: 4px !important;
        gap: 0 !important;
        justify-content: center;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu--guest {
        max-width: 9rem;
        flex: 0 0 auto;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__trigger--login {
        width: auto;
        min-width: 44px;
        padding: 0 16px !important;
        gap: 8px !important;
        justify-content: center;
        border-radius: var(--sg-chrome-radius);
        background-color: var(--ast-global-color-0, var(--sg-chrome-primary));
        color: #fff;
        border-color: transparent;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__login-label--full {
        display: none;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar .scribigo-profile-menu__login-label--short {
        display: inline;
    }

    body.scribigo-app-chrome #scribigoGlobalMenubar #toolbarSubmenuRecentOrders {
        min-width: 16rem;
    }

    body.scribigo-app-chrome--flat-in-more #agentFlatrateActivateBtn {
        display: none !important;
    }

    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item,
    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item.is-active,
    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item:hover,
    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item:focus-visible {
        background: transparent;
        color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 80%, transparent);
        filter: none;
    }

    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item:hover:not(.is-disabled),
    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item:focus-visible:not(.is-disabled) {
        background: var(--sg-sidebar-accent);
        color: var(--ast-global-color-2, #1d2327);
    }

    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item.is-active {
        background: var(--sg-sidebar-accent-active);
        color: var(--ast-global-color-2, #1d2327);
        font-weight: 600;
    }

    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item i {
        color: color-mix(in srgb, var(--ast-global-color-2, #1d2327) 60%, transparent);
    }

    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item:hover i,
    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item:focus-visible i,
    body.scribigo-app-chrome #scribigoBottomNav .scribigo-bottom-nav__item.is-active i {
        color: var(--ast-global-color-0, #046bd2);
    }

    #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-structure.is-mobile-switcher #agentContentViewBtn,
    #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-structure.is-mobile-switcher #agentPanelBtn {
        display: inline-flex !important;
    }

    #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-structure.is-mobile-switcher {
        flex: 1 1 auto;
        min-width: 0;
        padding: 2px;
        border: 1px solid var(--sg-chrome-hairline);
        border-radius: var(--sg-chrome-radius);
        background: color-mix(in srgb, var(--ast-global-color-5, #f9f4ee) 88%, #fff);
    }

    #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-structure .scribigo-mobile-pane-btn {
        flex: 1 1 0;
        min-width: 0;
        height: 32px;
        padding: 0 6px !important;
        justify-content: center;
        gap: 4px;
    }

    #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-structure .scribigo-context-label {
        display: inline !important;
        font-size: 0.6875rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #agentPreviewToolbar.scribigo-context-toolbar .toolbar-group-structure .scribigo-mobile-pane-btn.active {
        background: var(--sg-sidebar-accent-active);
        color: var(--ast-global-color-2, #1d2327);
    }

    #scribigo-agent-chat.scribigo-mobile-pane--content .scribigo-agent-preview-area,
    #scribigo-agent-chat.scribigo-mobile-pane--assistant .scribigo-agent-chat-area,
    #scribigo-agent-chat.scribigo-mobile-pane--structure .scribigo-structure-panel.is-open {
        display: flex !important;
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 100% !important;
        max-height: none !important;
    }

    #scribigo-agent-chat.scribigo-mobile-pane--content .scribigo-agent-chat-area,
    #scribigo-agent-chat.scribigo-mobile-pane--content .scribigo-structure-panel,
    #scribigo-agent-chat.scribigo-mobile-pane--assistant .scribigo-agent-preview-area,
    #scribigo-agent-chat.scribigo-mobile-pane--assistant .scribigo-structure-panel,
    #scribigo-agent-chat.scribigo-mobile-pane--structure .scribigo-agent-chat-area,
    #scribigo-agent-chat.scribigo-mobile-pane--structure .scribigo-agent-preview-area {
        display: none !important;
    }

    #scribigo-agent-chat.scribigo-mobile-pane--structure .scribigo-structure-panel.is-open {
        position: relative;
        inset: auto;
        z-index: auto;
    }

    #scribigo-agent-chat.scribigo-mobile-pane--assistant .scribigo-agent-chat-area,
    #scribigo-agent-chat.scribigo-mobile-pane--content .scribigo-agent-preview-area {
        position: relative;
    }
}
