#open-btn .icon {}

.chat-inner .submit-btn.strip-button .icon {
    color: rgb(255, 255, 255) !important;
}

.chat-inner .strip-button .icon {
    color: rgb(170, 170, 170);
}

.chat-input-area .strip-button .label {
    display: none;
}

body {
    --outline-gutter: 16px;
    --outline-indent: 16px;
    --rule-choices-max-h: 20vh;
}

.template-flex {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 20px;
    flex-wrap: wrap;
}

.outline-container {
    font-size: 0.9em;
    padding-left: 8px;
    position: relative;
    left: 0px !important;
}

.outline-container ul {
    list-style: none;
    padding: 0px;
    margin: 0px;
}

.outline-container ul ul {
    margin-left: var(--outline-indent);
    transition: height 0.22s ease;

    &.toc-grid-container {
        grid-template-columns: 1fr;
        width: 95%;
        margin: 1.5em auto 0px;

        & .toc-part-heading {
            font-size: 1.1em;
            position: relative;
            left: -18px;
            border-bottom: 1px solid var(--fg-fade);
            padding: 5px 0px 2px;
            margin: 2em 0px 0px;

            &:first-child {
                margin: 0px;
            }
        }

        & .toc-number {
            display: none;
        }
    }
}

.outline-item-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 2px 0px;
    padding: 2px 2px 2px 0px;
    cursor: pointer;
    position: relative;
    left: 0px !important;
}

.outline-item-wrapper.active .outline-label {
    background-color: var(--header-bg);
    color: var(--header-fg);
    text-shadow: black 0px 0px 3px;
    box-shadow: var(--box-shadow);
    /* border: 1px solid #ffffff; */
}

.toggle-arrow {
    width: var(--outline-gutter);
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-arrow::before {
    content: "";
    width: 0px;
    height: 0px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--fg);
    transition: transform 0.2s ease-in-out;
}

.outline-label {
    flex: 1 1 0%;
    padding: 3px 5px;
    word-break: break-word;
    border-radius: 8px;
    corner-shape: squircle;
    position: relative;
}

.outline-item-wrapper:not(:has(.toggle-arrow)) .outline-label {
    margin-left: var(--outline-gutter);
}

.active .toggle-arrow::before {}

li {
    &:not(.collapsed)>.outline-item-wrapper>.toggle-arrow::before {
        transform: rotate(90deg);
    }

    /* Resting state only — the actual open/close transition is JS-driven
       (Report.prototype._animateOutlineList in chat.js animates height via
       inline style) so it can measure the real content height first. A nested
       <ul> can't get its own wrapper for a pure-CSS animation because every <li>
       in this tree is display:contents (see .toc-section-list), flattened into
       one CSS grid — an extra element would break that flattening. */
    &.collapsed>ul {
        height: 0px;
        overflow: hidden;
    }
}

.outline-loading {
    padding: 10px;
    font-style: italic;
    color: rgb(136, 136, 136);
}

.error-box.notification-flash {
    animation: notification-flash-pulse 1.2s ease-out;
}

@keyframes notification-flash-pulse {
    0% {
        box-shadow: 0 0 0 3px var(--error-color, #ff4444);
    }

    100% {
        box-shadow: 0 0 0 3px transparent;
    }
}

/* ── Staleness surface ─────────────────────────────────────────────────────
   A report version whose downstream steps were left STALE by an amend edit shows
   a banner + "Re-run stale steps" button (chat.js _buildStaleBanner), and each
   deferred step is wrapped by the backend in .analysis-step-stale. Amber accent,
   theme-aware via the .dark/.medium/.light variable cascade. */
.stale-refresh-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, #f5a623 55%, transparent);
    background: color-mix(in srgb, #f5a623 12%, transparent);
    color: var(--fg);
    font-size: 0.9em;
}

.stale-refresh-message {
    flex: 1 1 240px;
    min-width: 0;
}

.stale-refresh-btn {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, #f5a623 70%, transparent);
    background: color-mix(in srgb, #f5a623 22%, transparent);
    color: var(--fg);
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}

.stale-refresh-btn:hover:not(:disabled) {
    background: color-mix(in srgb, #f5a623 34%, transparent);
}

.stale-refresh-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Per-step stale marker. The backend also inlines a fallback badge (workflow.py
   _replay_cached_fragments); this themed accent layers on top of the wrapper. */
.analysis-step-stale {
    border-left: 3px solid color-mix(in srgb, #f5a623 70%, transparent);
    background: color-mix(in srgb, #f5a623 6%, transparent);
    border-radius: 4px;
}

.chat-header {
    flex-direction: column;
    width: 100%;
    display: grid;
    min-height: 0px;
    overflow: hidden;
    grid-template-rows: min-content 1fr !important;
}

.chat-prompt,
.chat-reply {
    padding: 0px;
    line-height: 1.5;
    overflow-wrap: break-word;
    color: rgb(211, 211, 211);
    width: 100%;
    margin: 3px 3px 3px 0;
    text-shadow: var(--text-shadow);
    text-align: end;
    /* padding-right: 50px; */
}

.chat-reply {
    align-self: flex-start;
    padding-top: 0px;
    align-items: start;
    justify-content: space-between;
    display: block !important;
}

.interim-reply-placeholder {
    padding: 0px;
    line-height: 1.5;
    overflow-wrap: break-word;
    color: rgb(176, 176, 176);
    opacity: 0.8;
    width: 100%;
    margin: 3px 0px;
}

.assistant-turn-container[data-has-transcript="true"] .chat-reply-content,
.assistant-turn-container[data-has-transcript="true"] .interim-reply-placeholder {
    display: none !important;
}

.proposed-actions-container {
    display: flex;
    gap: 5px 1px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: scroll;
}

.proposed-actions-container.collapsing {
    overflow: hidden;
    transition: height 0.28s ease, margin 0.28s ease, padding 0.28s ease, opacity 0.22s ease;
}

.chat-input-area .proposed-actions-container.input-bar-chips {
    margin: 0px 0px 0px;
    padding: 0 0 4px;
}

/* The bottom icon-only buttons (attach/mic/send) hide their .label via the
   blanket .chat-input-area .strip-button .label rule above; proposed-action
   chips share .strip-button but need their label visible. */
.chat-input-area .proposed-action-btn .label {
    display: inline;
    font-size: .95em;
}

.proposed-action-btn {
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0px;
    /* max-width: 100px; */
    /* text-wrap: wrap; */
    height: min-content !important;
    /* width: min-content !important; */
    background: color-mix(var(--extreme-bg), transparent) !important;
    box-shadow: 1px 1px 3px var(--shadow-shade);
    padding: 3px !important;
    border: 1px solid var(--extreme-bg);
    font-size: .8em !important;
    border-radius: 10px !important;
    /* corner-shape: squircle; */
    /* background: var(--ghost) !important; */
    /* color: #eee !important; */










































































































































































































































































































































































    & .icon {
        vertical-align: top !important;
        align-self: self-start;
        /* display: none; */
        height: 15px !important;
        width: 15px !important;
    }





    &.chosen {
        background: rgba(255, 255, 255, 0.133);
    }
}

.chat-prompt {
    justify-content: flex-end;
    padding: 3px 8px 1px !important;
    background: #ffffff11;
    border-radius: 10px;
    corner-shape: squircle;
    width: fit-content;
    /* box-shadow: 1px 1px 3px #00000055, 0 0 1px #ffffff33 inset; */
    margin: 1em 5px 1em 0;
    /* text-decoration: double; */
    font-style: italic;
}

.chat-text-area {
    &::placeholder {
        color: rgb(153, 153, 153);
    }

    &:focus-visible {
        outline: none;
    }

    font-family: var(--font-family-main);
    /* font-size: 15px; */
    field-sizing: content;
    background: transparent;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    resize: none;
    color: var(--fg);
    width: 100%;
    height: 100%;
    min-height: 100px;
    margin: 0px 4px;
}

.chat-input-area:focus-within {
    border: 1px solid rgba(255, 255, 255, 0.333);
}

.chat-input-area {
    position: relative;
    inset: 0;
    border-radius: var(--window-radius);
    padding: 8px 4px 3px;
    grid-column: 1 / -1;
    border: 1px solid rgba(255, 255, 255, 0.133);
    color: white;
    bottom: 1em;
    background: radial-gradient(farthest-side at 90px 0px, rgba(255, 255, 255, 0.063), rgba(0, 0, 0, 0)) rgba(255, 255, 255, 0.02);
    box-shadow: var(--box-shadow-dramatic);
    corner-shape: squircle;
    transition: border-color .5s;
    /* background-color: var(--bg); */
    max-width: 100%;

















    &::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 1px;
        background: transparent;
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        z-index: 2;
        opacity: 0;
        --gradient-angle: 135deg;
        transition: opacity 0.5s ease, --gradient-angle 0.5s cubic-bezier(0, 0, 0.58, 1);
        corner-shape: squircle;
    }

    &.loading-active {
        border-color: transparent !important;

        &::after {
            --gradient-angle: 195deg;
            transition: opacity 0.5s ease, --gradient-angle 0.5s cubic-bezier(0.42, 0, 1, 1);
            background: linear-gradient(var(--gradient-angle), #A23CF8, #FC8450);
            animation: spin-gradient-smooth 1.5s linear infinite;
            animation-delay: 0.5s;
        }

        &.loading-visible::after {
            opacity: 0.8;
        }
    }
}

@keyframes spin-gradient-smooth {
    from {
        --gradient-angle: 195deg;
    }

    to {
        --gradient-angle: 555deg;
    }
}

.panes-as-tabs .reply-area {
    & .pane-buttons {
        margin-bottom: 0px;
    }

    & .panes-content {}
}

.strip {
    position: sticky;
    display: flex;
    flex-flow: wrap;
    top: 0px;
    z-index: 10;
    width: 100%;
    justify-content: center;
    border-radius: var(--pill-radius);
    filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 0px 1px);
    gap: 3px;
    color: rgb(238, 238, 238);

    &::after {
        height: 3px;
        width: 100%;
        background: linear-gradient(rgba(0, 0, 0, 0.067), transparent);
        border-top: 1px solid rgba(0, 0, 0, 0.333);
    }

    & .logo {
        cursor: pointer;
        position: relative;
        top: 3px;
        width: 4em;
        height: 4em;
        opacity: 1;
        margin: -4px -5px 0px 5px;
    }
}

.settings-footer {
    & .strip-button {
        padding: 1em;
    }
}

.chat-buttons {
    & .strip-button {
        border-radius: 50%;
        corner-shape: unset;
    }
}

.strip-button {
    display: flex;
    text-decoration: none;
    align-items: center;
    background: transparent;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    color: inherit;
    padding: 0px 5px;
    cursor: pointer;
    border-radius: var(--window-radius);
    margin: 0px 2px;
    height: 24px;
    corner-shape: squircle;

    &:hover {
        box-shadow: rgba(255, 255, 255, 0.333) 0px 0px 5px;
    }
}

& .icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

& .label {
    margin-left: 4px;
    /* white-space: nowrap; */
    font-size: 0.8rem;
}

&.primary-button {
    background-color: var(--header-bg);
}

.dictate-btn.recording {
    animation: 1.5s ease 0s infinite normal none running pulse-orange;
    color: orange !important;
}

.chat-inner .strip-button.dictate-button.recording .icon {}

.dictate-btn.recording .icon {
    filter: drop-shadow(orange 0px 0px 5px);
}

@keyframes pulse-orange {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(orange 0px 0px 5px);
        color: var(--fg) !important;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.live-api-btn {
    border-radius: 50%;
}

.live-api-btn.recording {
    animation: 1.5s ease 0s infinite normal none running pulse-red;
    border-radius: 50%;
}

.live-api-btn.recording .icon {
    filter: drop-shadow(rgb(255, 59, 48) 0px 0px 5px);
    border-radius: 50%;
}

.live-api-btn.recording .label {
    color: rgb(255, 59, 48);
    font-weight: bold;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(rgba(255, 59, 48, 0.9) 0px 0px 8px);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.strip .strip-button .label {
    font-size: 0.7rem;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px;
    width: min-content;
    max-width: 50px;

    & span {
        height: 8px;
        width: 8px;
        float: left;
        margin: 1px;
        background-color: rgb(158, 158, 161);
        display: block;
        border-radius: 50%;
        opacity: 0.4;
        animation: 1s ease-in-out 0s infinite normal none running typing-fade;

        &:nth-of-type(1) {
            animation-delay: 0s;
        }

        &:nth-of-type(2) {
            animation-delay: 0.2s;
        }

        &:nth-of-type(3) {
            animation-delay: 0.4s;
        }
    }
}

.thinking-plan-container {
    margin: 8px 0px;
    padding-left: 8px;
    border-left: 2px solid var(--fg-fade);
}

.thinking-plan-step {
    font-size: 0.85em;
    margin-bottom: 4px;
    color: var(--fg-lighter);
}

.thinking-plan-step .step-number {
    font-weight: bold;
    margin-right: 4px;
}

.thinking-items-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.thinking-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.micro-display-switch {
    background: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    color: var(--fg-fade);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.micro-display-switch:hover {
    color: var(--fg);
    transform: scale(1.1);
}

.micro-display-switch svg {
    width: 14px;
    height: 14px;
}

.thinking-item-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drilldown-prose-section {
    font-size: 0.9em;
    line-height: 1.6;
}

.fragment-building {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg-lighter);
    font-style: italic;
}

.fragment-building.small {
    font-size: 0.85em;
}

.spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-style: solid;
    border-right-color: rgba(255, 255, 255, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.3);
    border-image: initial;
    border-top-color: var(--fg);
    border-radius: 50%;
    animation: 0.8s linear 0s infinite normal none running spin;
    display: inline-block;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.chat-inner {
    position: relative;
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-left: var(--sidebar-padding);
    overflow: scroll;
    mask-image: linear-gradient(transparent 0px, black 3px);

    &::before {
        content: "";
        position: absolute;
        inset: 0px;
        pointer-events: none;
        border-radius: inherit;
        opacity: 0.3;
        z-index: 199;
        box-shadow: rgba(255, 255, 255, 0.333) 0px 0px 20px inset;
        display: none;
    }
}

.chat-wrapper {
    position: relative;
    display: grid;
    overflow: scroll;
}

.chat-element-enter {
    max-height: 0px;
    opacity: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(10px);
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.chat-element-enter-active {
    max-height: 9999vh;
    opacity: 1;
    transform: translateY(0px);
}

.display-switch {
    position: relative;
    color: var(--fg);
    font-family: inherit;
    font-size: 1em;
    border-radius: 10px;
    box-sizing: border-box;
    cursor: pointer;
    padding: 8px 4px;
    transition: background-color 0.2s, border-color 0.2s;
    height: min-content;
    box-shadow: var(--box-shadow);
    min-width: min(40%, 8em);
    text-shadow: var(--text-shadow);
    display: flow-root;
    text-align: left;
    background: var(--ds-bg);
    border: var(--ds-border);
    corner-shape: squircle;
    justify-self: flex-start;

    &:hover,
    &.active:hover {
        border-color: var(--fg);
    }

    &.active {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.08);





        & .switch-input {
            &:checked+.switch-slider {
                background-color: var(--extreme-bg);
                border: 1px solid rgba(255, 255, 255, 0.19);
                box-shadow: rgba(0, 0, 0, 0.8) 0px 0px 1px;
            }
        }

        & .switch-slider {
            &::before {
                transform: translateX(14px);
            }
        }
    }
}

.switch-name {
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0px 0px 0px 92px;
    width: auto;
    text-shadow: var(--text-shadow);
    font-size: 0.85em;
    line-height: 1.2;
}

.chat-reply .switch-toggle-container {
    display: flex;
}

.switch-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    float: right;
    margin-bottom: 4px;
    margin-left: 8px;
}

.switch-toggle-container {
    display: flex;
    justify-content: flex-start;
    height: auto;
}

.display-switch .detail-image {}

.display-switch-thumbnail {
    float: left;
    width: 86px;
    /* margin-right: 12px; */
    overflow: hidden;
    border-radius: var(--pill-radius);
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-shrink: 0;
}

.display-switch-thumbnail img {
    border-radius: var(--pill-radius);
    box-shadow: rgba(0, 0, 0, 0.533) 2px 2px 2px;
    margin: 2px 0px 4px;
    width: 100%;
}

.display-switch.variant-minimal .display-switch-thumbnail {
    display: none;
}

.display-switch.variant-minimal {
    padding: 6px 12px;
    min-height: auto;
}

.display-switch.variant-minimal .switch-name {
    margin-top: 0px;
}

.display-switch.variant-inline {
    background: transparent;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0px 4px;
    min-width: auto;
    margin: 0px;
}

.display-switch.variant-inline .display-switch-thumbnail {
    display: none;
}

.display-switch.variant-inline .switch-name {
    margin: 0px;
    font-weight: 500;
}

.display-switch.variant-accent {
    border: 1px solid var(--fg-accent);
    background: var(--bg-hover);
}

.switch-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 16px;
    pointer-events: none;
}

.switch-input {
    opacity: 0;
    width: 0px;
    height: 0px;

    &:checked+.switch-slider {
        background-color: rgb(182, 182, 182);
        border: 1px solid rgb(206, 206, 206);

        &::before {
            transform: translateX(14px);
            background: var(--fg);
            /* border: 1px; */
        }
    }
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0px;
    transition: 0.4s;
    border-radius: var(--bump-radius);
    box-shadow: rgba(0, 0, 0, 0.267) 0px 0px 9px inset;
    border: 1px solid rgba(255, 255, 255, 0.1);



    &::before {
        position: absolute;
        content: "";
        height: calc(100% - 0px);
        width: 15px;
        left: 1px;
        bottom: 0px;
        transition: 0.4s;
        border-radius: var(--bump-radius);
        background: color-mix(var(--fg), transparent 0%);
        /* box-shadow: black -1px -1px 3px inset; */
    }
}

.display-switches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 5px;
    clear: both;
    padding: 0px 10px 10px 0px;
}

.panes-as-cards-container {
    & .detail-select-button {
        min-width: fit-content;
        color: var(--fg);
        padding: 0.5em 0px;
        background: rgb(233, 233, 233);

        & .button-description {
            color: inherit;
            width: 100%;
            height: 8em;
            background: radial-gradient(farthest-side at 20% 0px, rgba(255, 255, 255, 0.082), rgba(0, 0, 0, 0));
            padding: 1em;
        }
    }

    & .button-text-container {
        margin: 0px;
        height: 2.5em;
        width: 100%;
        border-bottom: 0.5px solid rgba(255, 255, 255, 0.2);
        padding: 0.2em 1em;
    }

    & .button-title {
        font-size: 1.1em;
        font-weight: 900;
    }

    & .button-description {
        font-size: 1.1em;
        line-height: 1.4em;
        padding-top: 1.2em;
        grid-column: span 2;
        margin-top: 0px;
    }

    margin-right: 0px;
}

.dark .pane-card-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pane-card-wrapper {
    display: block;
    margin: var(--pill-radius);
    transition: transform 1s ease-in-out;
    border-radius: var(--pill-radius);
    border: 1px solid rgba(0, 0, 0, 0.063);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.23) 40%, rgba(255, 255, 255, 0.4) 100%);

    & .detail-select-button {
        border-radius: inherit;
        grid-template-columns: auto;
        flex-basis: 100%;
        margin: 0px;
        min-width: 100%;
        min-height: 100%;
        display: flex;
        flex-wrap: wrap;
        width: 100% !important;
    }

    &:hover {
        box-shadow: rgba(0, 0, 0, 0.667) 0px 0px 2px;
    }
}

.pane-title {
    font-size: 1.4rem;
    color: var(--fg);
}

.pane-description {
    margin: 1em 0px;
    line-height: 1.5;
    font-size: 0.9rem;
}



.panes-panel-raw {
    display: none;
    padding: 10px;
    overflow: auto;
}

.pane-interface-container[data-view-mode="raw"] .panes-panel-raw {
    display: block;
    opacity: 1;
}



.master-tool-content {
    flex-direction: column;
    flex-grow: 1;
    display: flex;
    row-gap: 3px;
    justify-content: center;
    margin-top: ;
    margin-right: ;
    margin-bottom: ;
    padding: 0px;
    border-radius: 0px;
    color: var(--sidebar-header-color);
    margin-left: -6px;
}

.chat-buttons::before {
    --gradient-direction: to top;
}

.master-tool-content::before {
    --gradient-direction: to bottom;
}

.chat-buttons::before,
.master-tool-content::before {
    position: absolute;
    inset: 0px;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(var(--gradient-direction), color-mix(in srgb, var(--shell-deep-background), transparent 10%) 20%, color-mix(in srgb, var(--shell-deep-background), transparent 100%) 100%);
    mask-image: linear-gradient(var(--gradient-direction), black 0%, black 50%, transparent 100%);
}

.icon {
    transition: width 1s ease-in-out, stroke-width 1s linear, height 1s ease-in-out;
    display: inline-block;
    /* vertical-align: middle; */
    fill: none;
    stroke: currentcolor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    height: 16px;
}

.icon[fill="currentColor"] {
    fill: currentcolor;
    stroke: none;
}

.pane-button:hover {
    background: var(--hover-bg);
}

.logs-and-details-container {}

.logs-container {
    position: absolute;
    inset: 0px;
}

.chat-buttons,
.master-tool-content {}

.paper {
    background-color: var(--main-bg-color);
    border-radius: 5px;
    padding: 0px;
    box-sizing: border-box;
    z-index: -2;

    & .pane-button {
        color: rgb(51, 51, 51);

        &:hover {
            background-color: rgb(238, 238, 238);
        }

        &.active {
            color: white;

            &:hover {
                background-color: rgb(17, 17, 17);
                color: white;
            }
        }
    }
}

.paper-inner {
    border-radius: inherit;
    display: grid;
    max-height: 100%;
    flex: 1 1 100%;
    grid-area: 1 / 1 / -1 / -1;
    z-index: 999;
    height: 100%;
    min-height: 0px;
    min-width: 0px;
    overflow: clip;
    box-shadow: rgba(0, 0, 0, 0.8) 0px 0px 10px;
    background: var(--bg);
    transition: margin 0.2s ease-in-out;
    position: relative;
    corner-shape: squircle;
}

.panel-visible .paper-inner {
    margin-right: 10px;
}

.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    max-width: 100vw;
    min-width: 100vw;
}

.split {
    width: 100vw;
}

#the-container {
    position: fixed;
    padding: var(--report-container-padding);
    border-radius: 0px;
    grid-template-columns: 100fr 0px 0fr;
    background: radial-gradient(farthest-side at var(--left-panel-width) 0px, #ffffff20, rgba(0, 0, 0, 0));
    box-shadow: rgb(255, 255, 255) 0px 0px 1px inset;
    corner-shape: squircle;
}

.sidebar {
    display: none;
    background-color: var(--omnicolor);
    padding-right: 0px;
    filter: drop-shadow(rgba(0, 0, 0, 0.2) 2px 0px 1px);
    font-size: 14px;
    margin: 0px;
    min-width: var(--sidebar-width);
}

.navigation {
    position: absolute;
    width: 100%;
    margin-right: 20px;
    padding-left: 10px;
    padding-right: 10px;
}

.plot-notes {
    margin-bottom: 10px;
}

.under-plot {
    padding-bottom: 10px;
    display: none;
}

.content {
    flex: 1 1 0%;
    border-radius: inherit;
    display: grid;
    min-height: 0px;
    min-width: 0px;
    grid-area: 1 / -1;
    corner-shape: squircle;
}

.tree {
    --spacing: 1rem;
    --radius: 0px;
    padding: 0px;

    & li {
        margin-bottom: 2px;
        display: block;
        position: relative;
        padding-left: calc(2 * var(--spacing) - var(--radius) - 2px);
        cursor: pointer;
        margin-top: 5px;
    }

    & a {
        text-decoration: none;
        color: white;
        border-radius: 5px;
        margin-right: 15px;
        margin-left: 0px;
        max-width: calc(100% - 5px);
        padding: 4px;
        border: 1px transparent;

        &:hover {
            background-color: var(--omnicolor-lighter-4);
        }

        &.activelink {
            background-color: var(--omnicolor-lighter-2);
            border: 1px solid var(--white-alpha-10);
        }
    }

    & ul {
        display: none;
        padding-left: 0px;
    }

    & .folder {
        transition: margin-bottom 500ms;
        border-radius: 5px;

        &.open {
            background-color: var(--white-alpha-03);
            margin-bottom: 20px;
            padding-right: 10px;
            border-top: 1px solid rgba(252, 255, 255, 0.3);
            transition: 0.3s;
            padding-bottom: 4px;

            &>ul {
                display: block;
            }

            &>.list-symbol::before {
                content: "";
            }
        }

        & .list-symbol::before {
            content: "";
            display: inline-block;
            font-size: 10px;
            width: 1em;
            position: relative;
            left: 10px;
        }

        & .closed>.list-symbol::before {
            content: "";
        }
    }

    &>li {
        margin-top: 10px;
        padding-left: 10px;
        max-width: 100%;
        padding-top: 5px;
    }
}

.content-container {
    height: 100%;
    border-radius: inherit;
    padding: 0px;
    min-height: 0px;
    min-width: 0px;
    grid-template-rows: min-content auto;
    display: none;
    corner-shape: squircle;

    &.active {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
}

.outline-entry-container {
    background-color: var(--omnicolor-lighter-2);
    border: 1px solid var(--white-alpha-10);
}

.info-box {
    background-color: rgb(233, 236, 239);
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
    color: rgb(73, 80, 87);
    font-size: 0.9rem;
    width: 75%;
}

.list-symbol {
    font-size: 10px;
    display: inline-block;
    margin-left: -1.3em;
    position: absolute;
    top: 0.7em;
    width: 10px;
    color: white;

    & .custom-multiselect {
        position: relative;
        display: inline-block;
        font-size: 14px;

        & .dropdown-toggle {
            background: rgb(245, 245, 245);
            border: 1px solid rgb(221, 221, 221);
            padding: 6px 8px;
            border-radius: 4px;
            cursor: pointer;

            &:focus {
                outline: none;
            }
        }

        & .dropdown-menu {
            position: absolute;
            z-index: 9999;
            background: white;
            border: 1px solid rgb(204, 204, 204);
            box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 8px;
            margin-top: 6px;
            padding: 6px;
            min-width: 160px;
            max-height: 220px;
            overflow: auto;

            & label {
                display: block;
                padding: 4px 6px;
                cursor: pointer;
            }
        }

        & .multiselect-options {
            display: flex;
            flex-direction: column;
        }
    }
}

.raw-data-table {
    font-size: 13px;

    & td {}
}

.cell-wrapper-must-see.clipped-content-container {}

.clipped-content-container {
    position: relative;
    max-height: var(--max-cell-height);
    transition: max-height 0.5s ease-in-out;

    &::before {
        position: absolute;
        inset: 0px;
        box-shadow: 0 0 1px var(--bg) inset;
        z-index: 2;
    }
}

.detail-field-table,
.list-of-structs-table {
    width: 100%;
    border-collapse: collapse;
    padding: 3px;
    font-size: 14px;

    & td,
    & th {
        padding: 8px;
        text-align: left;
        vertical-align: top;
    }
}

.list-of-structs-table {
    & th {
        background-color: var(--omnicolor-lighter-1);
        color: white;
    }

    & .dtrg-group th {
        color: rgb(34, 34, 34);
        font-size: 1.2em;
    }
}

.tabs-container {
    font-family: sans-serif;
    display: grid;
    border-radius: 0px;
    height: 100%;
    min-height: 0px;
    min-width: 0px;
    grid-template-rows: min-content 1fr;
    margin-top: 10px;
}

.tabs-container-vertical-tabs {
    display: grid;
    grid-template-columns: 175px 1fr;
    gap: 10px;
    max-height: 100%;
    grid-template-rows: 1fr;
}

.tab-buttons {
    clear: both;
}

#tabs-top>.tab-buttons {
    background-color: rgb(216, 216, 216);
}

.reply-area .pane-buttons {
    border-bottom: 1px solid var(--navigation-highlight-color);
    margin: 10px 0px;
    overflow: clip;
}

.panes-as-tabs .reply-area .pane-buttons {
    opacity: 1;
}

.tab-button-heading {
    margin: 0.4em;
    color: white;
    display: none;
    font-size: 2.5em !important;
    padding: 5px !important;
    border-bottom: 0px !important;

    &.active {
        display: unset;
        z-index: 99;
        opacity: 1;
        visibility: visible;
    }
}

.tab-buttons-heading {
    display: flex;
    position: sticky;
    color: white;
    border-radius: inherit;
    box-shadow: rgba(0, 0, 0, 0.8) 0px 0px 3px, rgb(255, 255, 255) 0px 0px 2px inset;
    border: 1px solid var(--shell-deep-background);
}

.tab-buttons-base {
    display: flex;
    border-bottom: 1px solid rgb(189, 177, 212);
    position: relative;
}

.tab-buttons-detail {
    border-bottom: 1px solid var(--border-color-medium);
}

.tab-buttons-level1 {
    background-color: rgb(219, 229, 242);
    margin-left: 0px;
    border-top-width: medium;
    border-top-style: none;
    border-top-color: currentcolor;
    border-radius: 4px;
    padding: 2px 0px 4px;
    box-shadow: unset;
}

.tab-buttons-vertical-tabs {
    padding: 0.5em 5px 5px 7px;
    border-right: 1px solid var(--ghost);
    overflow: scroll;
}

.tab-button {
    cursor: pointer;
    background: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 4px 16px;
}

.pane-button.active:hover {}

.pane-button {
    cursor: pointer;
    background: transparent;
    font-size: 0.95em;
    color: var(--fg);
    padding: 3px 5px;
    margin: 1px 3px;
    border-radius: var(--pill-radius);
    height: min-content;
    flex-grow: 1;
    position: relative;
    border: 1px solid transparent;

    &::after {
        content: " ";
        height: 2px;
        width: 100%;
        background: var(--custom-bg-color);
        box-shadow: rgb(255, 255, 255) 0px 0px 1px;
        position: absolute;
        bottom: -2px;
        left: 0px;
        border-top: 1px solid rgb(255, 255, 255);
        display: none;
    }

    &.active {
        background: var(--nav-bg);
        border: 1px solid var(--fg-fade);
        color: white;
    }
}

.pane-buttons {
    margin-bottom: 1em;
    font-size: 14px;
}

.tab-button-base {
    padding: 6px 15px 3px;
    border-bottom: 3px solid transparent;
    margin-bottom: 0px;
    color: white;

    &:hover {
        background-color: var(--border-color-light);
    }

    &.active {
        border-bottom-color: rgb(218, 48, 92);
        font-weight: bold;
    }
}

.tab-button-detail {
    margin: 5px 5px 0px 0px;
    border-bottom: 3px solid transparent;
    padding: 5px 8px 2px;

    &:hover {
        background-color: var(--border-color-light);
    }

    &.active {
        border-bottom-color: var(--nav-bg);
    }
}

.tab-button-level1 {
    border-bottom: 2px solid transparent;
    border-radius: 6px;
    margin: 2px 5px 0px;
    padding: 4px 10px 2px;
    filter: drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 0.1px);
    background-color: rgb(255, 255, 255);

    &:hover {
        background-color: rgb(250, 250, 250);
    }

    &.active {
        font-weight: 500;
        background-color: rgb(218, 48, 92);
        filter: drop-shadow(rgba(0, 0, 0, 0.5) 1px 1px 0.5px);
        color: white;
    }
}

.tab-button-vertical-tabs {
    border-radius: var(--pill-radius);
    background-color: rgb(253, 253, 253);
    width: 100%;
    margin: 0px 6px 6px 0px;

    &:hover {
        background-color: rgb(250, 250, 250);
    }

    &.active {
        background-color: var(--nav-bg);
        box-shadow: rgba(0, 0, 0, 0.3) 3px 3px 3px;
        color: white;

        &:hover {
            transform: translate(-2px, -2px);
        }
    }
}

.tab-content {
    display: grid;
    height: 100%;
    min-height: 100%;
    min-width: 0px;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;

    & h2 {
        padding-bottom: 10px;
        font-size: 1.3em;

        &:not(:first-of-type) {
            margin-top: 3em;
        }
    }
}

a {
    & h2 {
        font-size: 1.4em;

        &:first-of-type {
            margin-top: 1em;
        }
    }
}

.panes-as-tabs {
    & .panes-content>.pane-wrapper {
        display: none;
        width: 100%;

        &.active {
            display: grid;
            z-index: 2;
        }
    }

    & .panes-panel {
        display: grid;
    }
}

.panes-panel[data-view-mode="grid"] {
    grid-template-columns: subgrid;
}

.panes-panel {
    animation: 0.1s ease-in 0s 1 normal none running fadeIn;
    position: relative;

    &.active {
        z-index: unset;
        animation: 0.1s ease-in 0s 1 normal none running fadeIn;
    }

    &::before {
        content: attr(data-title);
        position: absolute;
        top: -1.5em;
        left: 0px;
        font-weight: bold;
        font-size: 1em;
        margin-bottom: 0.5rem;
        opacity: 0;
        pointer-events: none;
    }
}

td a {
    word-break: break-all;
}

.search-summary {
    & .field-values-table::before {
        content: "Filters are applied to this list";
        display: none;
    }
}

.highlights {
    top: 0px;
    right: 0px;
    display: flex;
    grid-template-columns: repeat(1, 1fr);
    height: min-content;
    border-radius: var(--pill-radius);
    flex-grow: 1;
    flex-shrink: 1;

    & .box {
        font-size: 14px;

        & h1 {
            font-size: 15px;
            text-align: center;
            margin-bottom: 4px;
            display: none;
        }
    }

    & .field-values-table {
        margin: 0px;
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
        padding: 0px;
    }
}

.dark .highlights .field-values-name {
    background: rgba(255, 255, 255, 0.067);
}

.dark .field-values-name {
    background: rgba(255, 255, 255, 0.03);
}

.identifier-section {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: var(--window-radius);
    background: var(--header-bg);
    corner-shape: squircle;
    box-shadow: var(--box-shadow);
    /* border: 1px solid rgb(255, 255, 255); */
}

.identifier-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.identifier-item:last-child {
    margin-bottom: 0px;
}

.identifier-label {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fg-fade, #aaa);
    margin-bottom: 4px;
}

.identifier-value {
    font-size: 1.2em;
    font-weight: 600;
    color: rgb(255, 255, 255);
    word-break: break-word;
    text-shadow: black 0px 0px 3px;
}

.goto-content .infogrid .field-values-name {
    padding: 8px;
    width: 100%;
    height: 100%;
}

.field-values-table {
    border-radius: var(--pill-radius);
    margin-bottom: 5px;
    display: grid;
    font-size: 0.9em;
    gap: 0.3em;
    grid-template-columns: min-content 1fr;

    & .field-values-row:first-child {
        border-top-width: medium;
        border-top-style: none;
        border-top-color: currentcolor;
    }

    & .field-values-row {
        display: grid;
        grid-column: span 2;
        grid-template-columns: subgrid;
        column-gap: 5px;
    }

    & .field-values-name {
        margin: 0px;
        display: inline-block;
        padding: 4px 1px 4px 4px;
        border-radius: 0px;
    }

    & .field-values-row:first-child .field-values-name {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }

    & .field-values-row:last-child .field-values-name {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    & .field-values-value {
        padding: 2px 5px;
        display: inline-block;

        & ul {
            margin: 0px;
            padding: 0px;
        }
    }
}

.field-values-value-wrapper {}

/* Composite column value: a self-contained 2-column mini-grid of the constituent
   fragment columns (name -> value) rendered inside the single composite row. */
.field-values-composite-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 8px;
    align-items: baseline;
}

.field-values-composite-name {
    font-size: 0.82em;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.field-values-composite-value {
    min-width: 0;
    word-break: break-word;
}

.field-value-link {
    color: var(--link-color);
    text-decoration: none;
    word-break: break-all;

    &:hover {
        text-decoration: underline;
    }
}

.field-value-image-link {
    display: inline-block;
}

.field-value-image {
    display: block;
    object-fit: cover;
    border-radius: var(--window-radius, 6px);
}

.detail-title {
    font-size: 1.3em;
    float: left;
    border-radius: var(--window-radius);
    position: sticky;
    top: 0px;
    z-index: 1;
    color: var(--bg);
    padding: 0.5em 0.7em;
    text-shadow: black 0px 0px 3px;
    margin: 3px;
    box-shadow: rgba(0, 0, 0, 0.267) 1px 1px 2px;
    background: var(--fg);
}

.legend-title {
    font-size: 0.75em;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 4px;
    width: 100%;
}

.legend-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7em, 1fr));
    flex-wrap: wrap;
    gap: 0.2em 0px;
    justify-content: normal;
}

.legend-color-indicator {
    min-width: 0.8em;
    width: 0.8em;
    display: inline-block;
    position: relative;
    top: 2px;
    margin-right: 2px;
    border-radius: 50%;
    height: 0.8em;
}

.legend-text {
    display: inline;
    font-size: 0.8em;
    padding: 0px;
    align-content: start;
}

.legend-component {
    display: inline-flex;
    margin-right: 5px;
    padding: 0px 3px 3px;
    line-height: normal;
    min-width: 0px;
    flex-shrink: 1;
}

.legend-continuous-container {
    width: 100%;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px;
}

.legend-size-container {
    width: 100%;
}

.legend-size-items {
    grid-template-columns: none;
    display: flex;
    align-items: flex-end;
}

.legend-size-component {
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.legend-size-swatch circle {
    fill: none;
    stroke: var(--fg);
    stroke-width: 1px;
}

.legend-continuous-container svg {
    display: block;
}

.legend-continuous-container svg g rect {
    filter: drop-shadow(0 0 1px var(--fg));
}

.dynamic-embed-container {
    opacity: 0;
    transition: opacity 300ms ease-in-out;

    &.loaded {
        opacity: 1;
        height: 100%;
        width: 100%;
        overflow: scroll;
        justify-content: center;
    }
}

.analytic-content-title {
    font-weight: bold;
    /* text-align: center; */
    max-width: 30em;
    justify-self: center;
    margin-bottom: 5px;
    /* max-width: 3em; */
    font-size: 1.1em;
}

.analytic-content {
    border-radius: var(--pill-radius);
    clear: both;
    margin: 1.5em 3em;

    & .view-switch-btn {
        color: rgb(51, 51, 51);
    }

    & .panes-as-cards-container {
        color: rgb(51, 51, 51);
    }

    & .detail-list-header {
        font-weight: 700;
    }

    & .detail-list-item:hover {}
}

.analytic-scroll-wrapper {
    position: relative;
    width: 100%;
    isolation: isolate;
    box-sizing: border-box;
}

.analytic-scroll-wrapper::before {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    left: 1px;
    width: 10px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.analytic-scroll-wrapper::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    right: 1px;
    width: 10px;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.analytic-scroll-wrapper.has-left-shadow::before {
    opacity: 1;
}

.analytic-scroll-wrapper.has-right-shadow::after {
    opacity: 1;
}

.highlights.dark .infobox {
    background: rgb(221, 221, 221);

    & .infogrid {
        font-weight: bold;
        color: var(--bg);
    }
}

.highlights.silver .infobox {
    background: rgb(241, 241, 241);

    & .infogrid {
        color: rgb(85, 85, 85);
        text-shadow: none;
        border-top: 1px solid rgba(0, 0, 0, 0.02);
        background: radial-gradient(farthest-side at 20% 0px, rgba(255, 255, 255, 0.333), rgba(0, 0, 0, 0));
    }

    & h1 {
        background: rgb(74, 40, 97);
        color: white;
        margin: 1em;
    }
}

.infobox {
    float: right;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.145);
    box-shadow: color-mix(var(--bg), blue 15%) 0px 0px 15px;
    border-radius: 20px;
    corner-shape: squircle;
    /* background: rgb(245 245 245); */

    & h1 {
        font-weight: 700;
        font-family: var(--font-family-main);
        padding: 5px;
        font-size: 18px;
        text-align: center;
        border-radius: inherit;
        margin: 5px;
    }

    & p {
        font-weight: 400;
    }

    & .info-key-takeaways {
        & li {
            line-height: 1.4;
            position: relative;
            padding-left: 1.5em;
            margin-bottom: 1em;

            &::before {
                counter-increment: my-counter 1;
                content: counter(my-counter);
                font-size: 1.1em;
                position: absolute;
                left: 0px;
                top: 0px;
            }
        }

        & ol {
            list-style-type: none;
            padding-left: 0px;
            counter-reset: my-counter 0;
            margin: 0px;
            display: inline-block;
        }
    }
}

.plotly-xaxis-container {
    max-width: 100%;
    min-width: 100%;
    z-index: 99999;
}

.paper-title {
    display: none;
    font-size: 36px;
    font-weight: 600;
    margin: 30px 0px 20px 10px;
}

.category-table {
    border-collapse: collapse;
    margin: 20px 0px;

    & th {
        background-color: rgb(68, 68, 68);
        font-weight: 600;
        color: white;
        filter: drop-shadow(rgba(0, 0, 0, 0.1) 2px 2px 2px);
        padding: 5px;
    }

    & td {
        padding: 6px;
        filter: drop-shadow(rgba(0, 0, 0, 0.1) 1px 1px 1px);
        background: white;
        border-bottom: 1px solid var(--border-color-light);
    }
}

.category-table-name {
    font-weight: 500;
    filter: drop-shadow(rgba(0, 0, 0, 0.1) 1px 1px 1px);
    border-bottom: 1px solid white;
}

.outline-number {
    display: inline-block;
}

.outline-text {
    display: inline-block;
}

.outline-entry {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px;
    width: 100%;
    padding-right: 20px;
}

.html-block {
    display: block;
    height: 100%;
    overflow: scroll;
}

.split-detail {
    border-radius: var(--window-radius);
    padding-top: 0px;
}

.split-master {
    width: min-content;
    overflow-y: scroll;
    display: grid;
    border-radius: var(--window-radius);
    box-shadow: white 0px 0px 4px inset;
    color: rgb(111, 111, 111);
    align-content: start;
    min-height: 0px;
    min-width: 0px;
    max-height: 100%;
}

.global-modal-detail {
    background-color: var(--main-bg-color);
    padding: var(--detail-window-padding);
    border-radius: 3px;
    margin: 10px 5px 5px;
    position: fixed;
    right: 10px;
    top: 10px;
    width: 40vw;
    height: 100vh;
    z-index: 100;
    overflow: scroll;
    box-shadow: rgba(31, 38, 135, 0.37) 0px 8px 32px 0px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#global-modal-background {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 9900;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(1px);
}

#global-modal-wrapper {
    background-color: var(--bg);
    border-radius: var(--pill-radius);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 20px;
    width: 96vw;
    height: 95vh;
    top: 2vh;
    left: 2vw;
    overflow: clip;
    display: flex;
    flex-direction: column;
}

#inner-title-bar {
    display: grid;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0px;
    max-height: fit-content;
    z-index: 10;
    grid-template-columns: auto 100px;
    color: white;
}

.modal-title {
    font-weight: bold;
    font-size: 1.2em;
}

.annotations-close-button {
    background: transparent;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    cursor: pointer;
    color: rgb(102, 102, 102);
    padding: 0px;
    position: absolute;
    right: 5px;
    top: 5px;
    font-size: 20px;

    &:hover {
        color: white;
    }
}

.modal-close-button {
    background: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    color: var(--fg-fade);
    padding: 0px;
    float: right;
    top: 0px;
    margin-left: 50px;
    height: 100%;
    position: sticky;

    &:hover {
        color: var(--fg);
    }

    .modal-content & {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }
}

#global-modal-events {
    max-height: 100%;
    display: flex;
    grid-template-rows: auto 1fr;
    height: 100%;
    flex-direction: row-reverse;
}

.tab-content-base p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;

    & strong {
        font-weight: 600;
    }
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 1;
    /* Without this, a wide-breakout child (see [data-width-hint="wide"] below) can
       inflate this box past whatever width its own parent actually gives it in each
       embedding (tab-panel-detail, assistant-reply, main report view, ...) - flex
       items default to min-width:auto (never shrink below content's intrinsic
       width) unless told otherwise. */
    min-width: 0;
}

.layout-body {
    max-width: 650px;
}

.assistant-reply .layout-body {
    max-width: unset;
}

.tab-content-detail li {
    line-height: 1.3;
}

.search-summary-title {
    font-weight: 800;
    text-align: center;
    padding-top: 0px;
    font-size: 0.9em;
    margin-bottom: 5px;
    color: var(--fg);
}

.source-annotations {
    background-color: var(--annotation-light);
}

.toggle-annotation-btn {
    padding: 2px 8px 2px 6px;
    border: 0px;
    border-radius: var(--pill-radius);
    cursor: pointer;
    display: grid;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
    z-index: 99999;
    grid-template-columns: repeat(2, auto);
    width: max-content;
    max-width: 200px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.067);

    &:hover {
        box-shadow: rgba(255, 255, 255, 0.333) 0px 0px 7px inset, rgba(0, 0, 0, 0.667) 0px 0px 3px;
    }

    & svg {
        width: 1em;
        height: 1em;
        vertical-align: middle;
        flex-shrink: 0;
    }
}

.annotations-title-bar {
    position: relative;
    height: min-content;
    display: block;
    text-align: center;
    border-radius: inherit;

    & .icon {
        width: 32px;
        height: 32px;
        fill: currentcolor;
    }
}

.annotations-visible,
.annotations-hidden {
    & .icon-show {
        display: inline-block;
    }

    & .icon-hide {
        display: none;
    }
}

.field-values-table {
    & .annotation-reference {
        border-bottom-width: medium !important;
        border-bottom-style: none !important;
        border-bottom-color: currentcolor !important;
    }
}

.annotation-reference {
    border-radius: 2px;
    border-bottom: 0.3em solid transparent;

    &.visible {
        cursor: pointer;
        border-bottom: 0.3em solid transparent;
        border-top: 0.2em solid transparent;

        &:hover {
            background-color: var(--annotation-medium);
            border-bottom: .3em solid var(--annotation-medium);
            color: #333;
        }
    }

    &.active {
        background-color: var(--annotation-dark);
        border-bottom: .3em solid var(--annotation-dark);
        filter: drop-shadow(var(--fg) 0px 0px .5px);
        border-top: .2em solid var(--annotation-dark);

        &:hover {
            filter: drop-shadow(rgb(0, 0, 0) 0px 0px 1.5px);
            background-color: var(--annotation-dark);
            border-bottom: .3em solid var(--annotation-dark);
        }
    }
}

.annotation-toolbar {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    min-height: 20px;
    min-width: 20px;
    background-color: green;
}

.analytic-content {
    margin: 0px;
    padding: 0px;
}

.annotation-panel {
    overflow-y: scroll;
    line-height: 1.5em;
    font-size: 14px;
    color: var(--text-color-light);
    height: 100vh;
    padding: 0px;
    background: transparent;

    & h3 {
        font-size: 1em;
        font-weight: 500;
    }

    & p {
        font-weight: 400;
    }

    & .analytic-scroll-wrapper {
        margin-top: 0px;
    }

    & .analytic-content-title {}

    & .under-plot {
        margin: 0px;
        padding: 0px;
    }

    & .legend-box {
        margin-bottom: 0px;
    }

    & h1 {
        margin-top: 0px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding-bottom: 5px;
        background-color: yellow;
        text-align: center;
        font-size: 22px;
    }

    & .plotly-embed-container {
        background-color: transparent;
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
        border-radius: 3px;
    }

    & hr {
        border: 0.5px solid rgba(0, 0, 0, 0.05);
        margin-top: 1.5em;
        margin-bottom: 1.5em;
        display: none;
    }

    & ul {
        padding-left: 1.5em;
        margin: 0px;
    }

    & h2 {
        font-size: 1em;
    }
}

.annotation-panel-inner {
    width: 100%;
    background-color: transparent;
    border-radius: inherit;
    --bg: var(--anno-bg);
    --anno-bg: var(--shell-void);
    display: grid;
    grid-template-rows: min-content 1fr;
    min-height: 0px;
    min-width: 0px;
}

.annotation-body {
    padding: 0px 10px 0px 0px;

    & .layout-wrapper {
        display: block;
        min-height: 0px;
        max-height: 100%;
    }
}

body {
    --border-color: #ccc;
    --primary-color: #d1d1d1;
    --search-bg: #ffffff;
    --dtable-search-icon-color: #babdc1;
    --sidebar-heading-top: 10px;
    --bg-darker: var(--shell-void);
    --sidebar-header-color: #fff;
}

.annotation-source-category {
    font-weight: 700;
    margin: 1em 0px 10px;
    display: none;
}

.annotation-segment-mini-header {
    padding: 0px;
    font-weight: 400;
    display: list-item;
    list-style-type: disc;
    margin: 0px 0px 0px 20px;
    line-height: 1;
}

.reference-category-table {
    display: grid;
    grid-template-columns: repeat(2, auto);
}

.reference-category {
    grid-column: span 2;
    font-weight: 600;
    font-size: 24px;
    margin: 1em 0px;
}

.reference-link {
    margin: 0px 1em 1em 0px;
    padding: 5px;
    border-bottom: 1px solid var(--border-color-light);
    font-style: italic;
}

.reference-info {
    margin-bottom: 1em;
    border-bottom: 1px solid var(--border-color-light);
}

.grid {
    display: grid;
    grid-template-columns: min-content auto;
    width: 100%;
    height: 100%;
    grid-template-rows: 1fr;
    min-height: 0px;
    min-width: 0px;
    max-height: 100%;
}

.gutter-col {
    grid-row: 1 / -1;
    cursor: col-resize;
}

.gutter-col-1 {
    grid-column: 2;
}

.layout-wrapper {
    container-type: inline-size;
}

.reply-box {
    & .report-layout {
        margin: 0px;

        & .layout-wrapper {
            padding: 0px;
        }
    }
}

.report-layout {
    overflow-y: scroll;
    margin: 0px 1em;
    display: grid;

    & .layout-wrapper {
        padding: 1em;
    }

    & .infobox {
        & h1 {
            background-color: var(--bg);
            margin: 1em;
            border-radius: var(--pill-radius);
        }
    }
}

.layout {
    & .highlights {
        background-color: transparent;
    }

    display: block;
    max-height: 100%;
    overflow-y: scroll;
}

.tab-panel {
    grid-area: 1 / 1;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    height: 100%;
    display: grid;
    min-height: 0px;
    min-width: 0px;

    &.active {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
}

.tab-panel-detail .layout-wrapper {
    padding: 1em 0px 0px;
}

.tabs-container-level1 {
    margin: 1em;
}

.exec-summary {
    display: block;
    max-width: 30em;
    line-height: 1.6em;
    margin: 3em auto;

    & p {
        margin-bottom: 1.4em;
    }

    &::first-letter {
        font-size: 5em;
        float: left;
        margin-right: 0.1em;
        line-height: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 5px 15px;
    max-width: 400px;
    width: 90%;
    position: relative;
    text-align: center;
    border: 1px solid rgb(136, 136, 136);
    padding: 20px 40px 40px;
}

#loginBtn.action-button {
    background-color: rgb(0, 123, 255);
    color: white;
    font-size: 1.2em;
    padding: 12px 24px;
}

.service-section button {
    border: 1px solid var(--border-color-light);
    cursor: pointer;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-button {
    color: rgb(170, 170, 170);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;

    &:hover,
    &:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

#app-view {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex: 1 1 100%;
    background-color: var(--bg);
    box-shadow: rgb(0, 0, 0) 0px 0px 3px inset;
    background: linear-gradient(to top, rgb(0 0 0 / 45%) 0px, transparent 50vh, transparent)
}

body.super-light #app-view {
    box-shadow: none;
    background: none;
}

body.super-light {
    --super-light-sidebar-bg: #e4e4e4;
    --super-light-header-bg: #fff;

    .switch-slider {
        box-shadow: color-mix(var(--shadow-shade), transparent) 0px 0px 4px inset;
        background-color: var(--extreme-bg);
        border: 1px solid var(--shadow-shade);
        box-shadow: none;
    }

    .chat-prompt {
        background-color: #0000000f;
        text-shadow: 0 0 2px #fff;
        /* background-color:#ffffff88 */
    }

    .strip {
        filter: drop-shadow(0 0 1px white);
    }

    .chat-wrapper::before {
        background: radial-gradient(50% 100% at 50% 0px, rgb(255 255 255 / 71%), rgba(0, 0, 0, 0))
    }

    .mac-btn.maximize {
        /* background-color: #00000014; */
    }

    .mac-btn.maximize .icon-wrapper svg {
        /* color: #333!important; */
        border: 1px solid var(--fg);
        border-radius: 50%;
    }

    .lineage-history-btn {
        /* color: #333; */
    }

}

#report-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
}

.purchase-button {
    background: var(--fg);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 0.2em 0.4em 0.1em;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.3) 1px 1px 1px;
    margin: 0px 2px 2px 0px;
    color: var(--bg);

    & .icon {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
        vertical-align: middle;
    }

    & .label {
        padding-right: 5px;
        vertical-align: middle;
    }

    &:hover {
        box-shadow: rgb(85, 85, 85) 1px 1px 0.5px;
    }
}

.detail-list-item {
    position: relative;
    align-items: center;
    cursor: pointer;
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    transition: background-color 0.2s;
    font-size: 0.9em;

    &.selected {
        background-color: rgb(240, 240, 240);
    }

    .analytic-content & {
        &:hover {}
    }

    & .detail-image {
        flex-shrink: 0;
    }

    &:hover {}

    &:last-child {
        border-bottom-width: medium;
        border-bottom-style: none;
        border-bottom-color: currentcolor;
    }
}

.response-box {
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    overflow: scroll;
    color: var(--text-color-light);
    position: relative;
    grid-area: 1 / -1;
    corner-shape: squircle;
    border-radius: var(--window-radius);
    background-color: var(--bg);

    &.show-diffs-only .config-row:not(.diff-highlight) {
        display: none;
    }

    &.scroll-shadow::before {
        background: radial-gradient(farthest-side at 50% 0px, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
        height: 3px;
        border: 0px;
    }

    & .pane-interface-container {
        /* padding: 1em 0 1em 1em; */
        border-radius: var(--pill-radius);
    }
}

.chat-buttons .dialog-button {
    filter: drop-shadow(black 0px 0px 3px);
}

.dialog-button {
    display: inline;
    background: transparent;
    border: 1px solid transparent;
    padding: var(--dialog-button-padding);
    cursor: pointer;
    border-radius: 5px;
    margin: var(--chat-button-margin);
    vertical-align: middle;
    color: var(--text-color-light);
    max-height: fit-content;
    font-size: 0.8rem;

    & .icon {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
        vertical-align: middle;
    }

    & .label {
        padding-right: 5px;
        vertical-align: middle;
        padding-left: 1px;
    }

    &:hover {
        background-color: rgba(255, 255, 255, 0.133);
        box-shadow: rgb(238, 238, 238) 0px 0px 3px;
    }
}

.submit-btn {
    background-color: var(--header-bg);
    border-radius: 50%;
    padding: 0px;
    justify-content: center;
    /* box-shadow: rgba(124, 124, 124, 0.867) 0px 0px 9px, rgb(255, 255, 255) 0px 0px 1px inset; */
    position: relative;
    bottom: 2px;
    margin-left: 7px;
    transform: scale(1.1);
    color: white !important;
    width: 26px !important;
    box-shadow: 0 0 15px #ffffff;

    &:hover {
        box-shadow: rgba(255, 255, 255, 0.867) 0px 0px 9px, rgb(255, 255, 255) 0px 0px 1px inset;
    }

    &:disabled {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
        background-color: var(--header-bg) !important;
        color: rgba(255, 255, 255, 0.5) !important;
    }

    &:disabled:hover {
        box-shadow: none;
        background-color: var(--header-bg);
    }
}

.account-menu {
    position: absolute;
    background-color: var(--shell-void);
    color: var(--text-color-light);
    box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 12px, rgba(255, 255, 255, 0.667) 0px 0px 1px inset;
    border-radius: 3px;
    z-index: 1000;
    display: none;
    min-width: 175px;
    overflow: hidden;
    padding: 5px 10px 5px 5px;

    & .strip-button {
        margin: 5px 2px;
        width: 100%;
    }
}

.generate-control-strip-padding {
    height: var(--strip-width);
    background-color: var(--shell-deep-background);
    display: none;
}

.reply-area {
    --navigation-highlight-color: #ffffff22;
    display: flex;
    flex-direction: column;
    padding: 0px;
    flex-grow: 1;
    width: 100%;
    position: relative;
    inset: 0px;
    border-radius: 5px;
    corner-shape: squircle;
    margin: 15px 0px 0px;


    .slow-animation & {
        overflow: clip;
    }

    & h3 {
        border-radius: 3px;
        font-size: 15px;
        padding: 3px 5px;
        box-shadow: rgba(0, 0, 0, 0.1) 0.5px 0.5px 0.5px;
        font-weight: 700;
    }
}

.reply-wrapper {
    flex: 1 1 0%;
    min-height: 0px;
    width: 100%;
    margin: 0px;
    border-radius: inherit;
    text-shadow: var(--text-shadow);
    display: grid;


    .slow-animation .master-controls & {
        overflow: clip;
    }

    &.scroll-shadow::before {
        height: 5px;
        border-radius: inherit;
        background: radial-gradient(farthest-side at 50% 0px, rgba(46, 46, 46, 0.3), rgba(0, 0, 0, 0));
    }

    &.scroll-shadow::after {
        height: 10px;
        background: none;
    }
}

.chat-buttons {
    display: flex;
    justify-content: flex-end;
    bottom: 0px;
    border-radius: inherit;
    flex-shrink: 0;
    grid-template-columns: 1fr max-content max-content;
    gap: 0px;
    width: 100%;
    background: transparent;
    color: var(--fg);
    padding: 0px 4px;
}

.detail-image {
    margin: 0px;
}

.user {
    justify-content: end !important;
    text-align: end;
}

.useragent {
    font-size: 13px;
    padding: .8em 5px 0.3em;
    color: var(--fg-fade);
    display: none;
}

.step {
    margin-left: 20px;
    border-left: 2px solid rgb(208, 224, 255);
}

.config {
    margin-top: 15px;
    border: 1px dashed rgb(204, 204, 204);
    border-radius: 4px;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    height: min-content;
    border-radius: var(--window-radius);

    & h3 {
        margin: 0px;
        font-size: 1.1em;
    }

    & h2 {
        color: white;
    }
}

#template-detail-container {
    height: fit-content;
    min-height: 100%;
    display: block;
    background-color: var(--bg);
    border-radius: var(--window-radius);

    & .placeholder {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        color: rgb(136, 136, 136);
        font-size: 1.1em;
    }
}

.template-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 3px;
    flex: 1 1 320px;
    min-width: 280px;
    padding: 0px;

    & label {
        font-weight: bold;
        margin-bottom: -8px;
        font-size: 0.9em;
    }

    & input[type="text"],
    & textarea {
        width: 100%;
        padding: 8px;
        border-radius: 3px;
        box-sizing: border-box;
        color: var(--fg);
    }

    & input[type="text"]: disabled {
        cursor: not-allowed;
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
    }

    & textarea {
        resize: vertical;
        font-family: var(--font-family-main);
        font-size: 0.9rem;
        background: rgb(238, 238, 238);
        box-shadow: rgb(255, 255, 255) 0px 0px 3px;
        color: var(--fg);
    }
}

.button-primary {
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    background-color: transparent;
}

.button-danger {
    background-color: var(--nav-bg);
    color: white;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;

    &:hover {
        background-color: rgb(200, 35, 51);
    }
}

.detail-image.glass-effect {
    justify-content: center;
    align-items: center;
    border-radius: var(--pill-radius);
    padding: 0px;
    position: relative;
    inset: 0px;
    corner-shape: squircle;
}

.detail-image-placeholder {
    background-color: rgb(13, 0, 89);
    color: rgb(239, 239, 239);
    font-weight: bold;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 50px inset;
    font-size: 40px !important;
    width: 60px !important;
    height: 35px !important;
    border-radius: 10px;
    corner-shape: squircle;
}

.detail-image-thumbnail {
    box-shadow: var(--box-shadow);
    max-width: 90px;
}

.detail-select-button {
    border-radius: 5px;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: left;
    text-align: center;
    margin: 2px 0px 8px;
    background-color: transparent;

    &:hover {}

    &.active {
        background-color: rgba(240, 241, 255, 0.3);
        border: 1px solid rgba(240, 241, 255, 0.15);
    }
}

.chat-attachment {
    margin: 2px 1em;

    & svg.icon {
        height: 16px;
        width: 16px;
        margin-right: 4px;
    }
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding-bottom: 0.5em;
    border-bottom: 1px dashed rgb(224, 224, 224);
    margin-bottom: 16px;

    &:last-child {
        border-bottom-width: medium;
        border-bottom-style: none;
        border-bottom-color: currentcolor;
    }
}

.field-label {
    font-weight: bold;
    margin: 0px;
    font-size: 0.9em;
}

.field-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

input[type="number"] {
    padding: 3px;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    border-radius: var(--pill-radius);
    width: 6em;
}

.detail-wrapper {
    padding: 0px;
    border-radius: var(--window-radius);
    display: grid;
    flex-grow: 1;
    transition: opacity 0.2s ease-in-out;
    overflow: scroll;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0px;
    corner-shape: squircle;

    &.visible {
        opacity: 1;
    }
}

.report-paper {
    margin: 0px auto;
    padding: 10px 20px 0px;
    max-width: 100%;
    position: relative;
    border-radius: 5px;
    background-color: var(--bg);
    height: min-content;

    & .field-group {
        margin-bottom: 18px;
        display: grid;
        gap: 15px;
        align-items: start;
        grid-template-columns: subgrid;
        grid-column: span 2;
    }

    & .field-label-container {
        display: flex;
        align-items: center;
    }

    & .field-label {}

    & .field-value,
    & .field-value-container {
        color: rgb(85, 85, 85);
    }

    & .third-party-logo {
        width: 18px;
        height: 18px;
        vertical-align: middle;
    }
}

.toc-grid-container {
    grid-template-columns: max-content max-content 1fr;
    column-gap: 2px;
    align-items: start;
    padding: 0.5em;
}

.toc-section-list,
.toc-section-list li {
    display: contents;
}

.toc-part-heading {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    font-weight: 600;
    padding: 5px 0px;
    margin-top: 10px;
}

.toc-part-heading .toc-number {
    grid-column: 1;
}

.toc-part-heading .toc-text {
    grid-column: 2 / -1;
}

.toc-link {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 2 / -1;
    text-decoration: none;
    color: var(--fg);
    padding: 4px 0px;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.toc-link:hover,
.toc-link.selected {}

.toc-link .toc-number {
    grid-column: 1;
}

.toc-link .toc-text {
    grid-column: 2;
}

.report-sections-container {
    margin-top: 20px;
}

.report-section {
    &:first-child {
        margin-top: 0px;
        padding-top: 0px;
        border-top-width: medium;
        border-top-style: none;
        border-top-color: currentcolor;
    }
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 500;
}

.button-title {
    text-align: left;
}

.button-description {
    text-align: left;
    display: inline;
}

.button-text-container {
    text-align: left;
    margin-left: 8px;
    padding: 5px 2px 2px 0px;
}

.purchase-price {
    margin: 5px 1em;
    font-size: 0.9em;
}

.product-comparison-grid {
    gap: 0px 10px;
    margin: 0px 10px;
    padding: 10px 0px;
    font-family: var(--font-family-main);
    overflow-x: scroll;
    max-width: 100%;
    border-radius: 8px;
}

.product-comparison-column {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: 1 / -1;

    &.categories {
        position: sticky;
        left: 0px;
        z-index: 1;
    }
}

.product-comparison-column--preset {
    border-radius: var(--window-radius);
    box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 4px;
    background-color: var(--extreme-bg);
    border: 2px solid transparent;
    cursor: pointer;
    corner-shape: squircle;

    &:hover {
        box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    }

    &.active {
        box-shadow: var(--scroll-shadow-bg) 0 0 3px;
        border-color: var(--header-bg);
    }
}

.product-comparison-cell {
    position: relative;

    &:not(:last-child) {}
}

.product-comparison-cell-header--category:not(:last-child) {
    border-bottom: 1px solid red;
}

.product-comparison-cell-header {
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    padding: 10px 0px;
}

.product-comparison-cell-header--category {
    border-width: medium !important;
    border-style: none !important;
    border-color: currentcolor !important;
    border-image: initial !important;
}

.product-comparison-provider-group-top {
    display: grid;
    border-bottom: 1px solid rgb(119, 119, 119);
    grid-template-columns: 20px 1fr;
    gap: 2px 8px;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 1px;
}

.product-comparison-provider-group {
    display: grid;
    grid-template-columns: 1fr;
    padding-bottom: 1px;
    margin-bottom: 10px;
}

.product-comparison-provider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-fade);

    & svg {
        display: block;
    }
}

.product-comparison-provider-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-fade);
}

.product-comparison-source-list {
    font-size: 0.9em;
    color: var(--fg);
    padding-left: 28px;

    & sup {
        font-size: 0.7em;
        margin-left: 2px;
        color: rgb(153, 153, 153);
        font-weight: normal;
    }

    & div {
        & sup {
            color: transparent;
            display: none;
        }

        &:hover sup {
            color: unset;
        }
    }
}

.pane-interface-container .panes-panel {
    display: block;
    justify-content: flex-start;
    width: 100%;
}

.panes-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    justify-content: stretch;
}

.panes-content>.pane-wrapper {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
}

.panes-content>.pane-wrapper>.panes-panel {
    display: grid;
    grid-column: 1 / -1;
}

.panel-group {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    margin-bottom: 20px;
    align-items: start;
}

.panel-header-wrapper {
    grid-column: span 1;
    min-width: 0px;
    padding-left: 5px;
}

.panel-group>.panes-panel {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: subgrid;
}

.detail-select-button {
    grid-column: span 2;
    height: 100%;
    min-height: 80px;
}

.pane-interface-container[data-view-mode="list"] .panes-panel-list {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: var(--pane-grid-template, repeat(var(--num-pane-columns), auto));
}

html:not(:has(.pane-interface-container)) .pane-interface-container {
    & .panes-panel {
        margin-top: 2em;
        background-color: var(--white-alpha-03);
        border: 1px solid rgba(255, 255, 255, 0.04);

        &::before {
            opacity: 1;
        }
    }
}

.reply-content {}

.dialog {
    --fg: #eee;
    --active-fg: var(--fg);
    --active-bg: var(--shell-background);
    --nav-bg: color-mix(in srgb, var(--nav-bg-base), black 20%);
    --hover-bg: color-mix(in srgb, var(--bg), white 5%);
    --hover-fg: white;
    --active-hover-fg: white;
    --active-hover-bg: color-mix(in srgb, var(--bg), white 25%);
    --fg-fade: #444;
    --fg-fade-active: #999;
    --bg-fade-active: color-mix(in srgb, var(--bg), white 10%);
    color: var(--fg);
}

.dark {
    --plot-shade: #00000088;
    --ds-bg: radial-gradient(140px circle at 0 0, #ffffff11, transparent);
    --bg: var(--shell-void);
    --scroll-shadow-bg: #000000;
    --border-highlight: #ffffff22;
    --extreme-bg: #0000004a;
    --fg: #ddd;
    --active-fg: var(--fg);
    --active-bg: var(--shell-background);
    --nav-bg: color-mix(in srgb, var(--nav-bg-base), black 20%);
    --hover-bg: color-mix(in srgb, var(--bg), white 5%);
    --hover-fg: white;
    --active-hover-fg: white;
    --active-hover-bg: color-mix(in srgb, var(--bg), white 25%);
    --fg-fade: #747474;
    --fg-fade-active: #fff;
    --bg-fade-active: transparent;
    color: var(--fg);
    --highlight-bg: #0f7a73;
    --highlight-opacity: .3;
    --default-marker-color: #888;
    --ghost: #393535;
    --shadow-scale: 1px;
    --shadow-shade: #00000033;
    --text-shadow: 0 0 1px #000000;
    --box-shadow: #000000aa 1px 1px 2px;
    --box-shadow-dramatic: 0 0 20px #000000aa;
    --ds-border: .5px solid #b6b6b62b;
    --border-color: #262626;
    --link-color: #e07830;
    --bool-true-color: #6cb88a;
    --bool-false-color: #c96b6b;
}

.medium {
    --bg: rgb(246 246 246);
    --extreme-bg: white;
    --fg: #4b4b4b;
    --active-fg: #ccc;
    --border-highlight: #ffffff77;
    --active-bg: color-mix(var(--header-bg), var(--bg) 80%);
    --nav-bg: color-mix(in srgb, var(--nav-bg-base), black 20%);
    --hover-bg: color-mix(in srgb, var(--bg), white 30%);
    --hover-fg: var(--fg);
    --active-hover-bg: color-mix(in srgb, var(--bg), white 25%);
    --fg-fade: #444;
    --fg-fade-active: #999;
    --bg-fade-active: color-mix(in srgb, var(--bg), white 10%);
    background-color: var(--bg);
    color: var(--fg);
    --highlight-bg: #0f7a73;
    --highlight-opacity: .05;
    --default-marker-color: #fb9400;
    --shadow-scale: 1px;
    --shadow-shade: #00000055;
    --text-shadow: none;
    --box-shadow: #00000022 3px 3px 3px;
    --box-shadow-dramatic: 0 0 20px #000000aa;
    --ds-bg: radial-gradient(60px circle at 0 0, #fff, #e2e2e2);
    --ds-border: unset;
    --scroll-shadow-bg: #aaa;
    --bool-true-color: #4c8f68;
    --bool-false-color: #b2504f;
    --plot-shade: #00000033;
}

.light {
    --plot-shade: #00000033;
    --scroll-shadow-bg: #000000aa;
    --extreme-bg: white;
    --border-highlight: #ffffff99;
    --fg: rgb(79 78 78);
    --bg: rgb(251 251 251);
    --nav-bg: var(--nav-bg-base);
    --active-fg: white;
    --active-bg: var(--shell-background);
    --active-hover-fg: white;
    --active-hover-bg: black;
    --hover-bg: #cfcfcf;
    --hover-fg: black;
    --fg-fade: #c0c0c0;
    --fg-fade-active: #222;
    --bg-fade-active: transparent;
    --border-color: #d5d5d5;
    color: var(--fg);
    --highlight-bg: #0f7a73;
    --highlight-opacity: .05;
    --default-marker-color: #fb9400;
    --ghost: #0000000a;
    --accent-bg: var(--nav-bg);
    --shadow-scale: .5px;
    --shadow-shade: #00000044;
    --text-shadow: 1px 1px 2px white;
    --box-shadow: #00000044 1px 1px 2px;
    --box-shadow-dramatic: 0 0 15px #a8a8a8aa;
    --ds-bg: radial-gradient(140px circle at 0 0, #fff, #efefef);
    --ds-border: 1px solid #00000011;
    --link-color: #c05a10;
    --bool-true-color: #3f7a56;
    --bool-false-color: #a2453f;
}

#total-view {
    display: flex;
    background: var(--bg);
    --bg: #00000033;
}

.summary-grid-container {
    display: grid;
    grid-template-columns: repeat(var(--num-categories, auto-fit), minmax(100px, 1fr));
    gap: 6px;
}

.grid-header-cell {
    font-weight: bold;
    margin-bottom: 12px;
    padding: 0px 4px 6px;
    border-bottom: 1px solid var(--border-color-light);
    font-size: 14px;
    text-align: center;
    color: rgb(51, 51, 51);
}

.summary-grid-column {
    padding: 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    margin-bottom: 2em;
    background-blend-mode: soft-light;
}

.source-name {
    padding-left: 1em;
    text-indent: -1em;
}

.no-sources {
    font-size: 0.9em;
    color: rgb(102, 102, 102);
}

.section-tab-container {
    background-color: rgb(255, 255, 255);
    height: 100%;
    display: grid;
    grid-template-rows: min-content 1fr;
    border-left: 1px solid rgb(221, 221, 221);
    border-right: 1px solid rgb(221, 221, 221);
    padding: 2px;
}

.section-tab-nav {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--accent-bg);
    padding: 3px 10px;
    border-radius: 3px;
    position: relative;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px inset;

    &::before {
        content: "";
        position: absolute;
        inset: 0px;
        z-index: 20;
        background: linear-gradient(350deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.07) 48%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 98%, rgba(0, 0, 0, 0.2) 100%);
        pointer-events: none;
        border-radius: inherit;
        display: none;
    }
}

.section-tab-sub-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid rgb(221, 221, 221);
    padding-left: 0px;
}

.section-tab-button {
    padding: 3px 5px;
    cursor: pointer;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    background-color: transparent;
    font-weight: 600;
    color: white;
    position: relative;
    transition: color 0.2s, border-color 0.2s;
    margin: 2px 0.5em;

    &.active {
        font-weight: 600;
        background-color: white;
        border-radius: 3px;
        color: var(--accent-bg);
        z-index: 20;
    }

    .section-tab-sub-nav & {
        color: var(--accent-bg);
        font-size: 0.9em;
        padding: 2px 12px;

        &.active {
            background-color: white;
            margin: 2px;
            border-radius: 0px;
            border-bottom: 2px solid var(--accent-bg);
        }
    }
}

.section-tab-content,
.section-tab-sub-content {
    padding: 1em;
    border-bottom: 1px solid rgb(221, 221, 221);
    border-top-width: medium;
    border-top-style: none;
    border-top-color: currentcolor;
    border-radius: 0px 0px 3px 3px;
    display: grid;
    grid-template-areas: "content";
}

.section-tab-panel {
    grid-area: content;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    display: flex;
    flex-direction: column;

    & .section-tab-sub-content {
        padding: 5px 0px;
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
    }

    &.active {
        opacity: 1;
        pointer-events: auto;
        z-index: 1;
    }
}

.report-logo {
    padding: 0.5em 0.2em 0.2em;
    background-color: var(--header-bg);
    text-shadow: black 0px 0px 5px;
    color: rgb(238, 238, 238);
    corner-shape: squircle;
    background-color: color-mix(var(--shell-void), black 15%);
    /* border: none; */
}

body.super-light .report-logo.light {
    background-color: var(--bg);
    color: var(--fg);
    text-shadow: var(--text-shadow);
}

body.super-light .report-logo.light .product-title {
    color: var(--fg);
}

.report-top {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: inherit;
    top: 0px;

    & .product-title {
        font-size: 2.5em;
        margin: 0.2em 0.5em;
        font-weight: 500;
        text-align: center;
        border-radius: inherit;
    }
}

h1.product-title {
    margin: 0;
    /* text-shadow: red 1px 1px 4px; */
    color: rgb(238, 238, 238);
    font-size: var(--header-font-size, 1.8em);
    font-weight: 200;
    line-height: var(--header-line-height, 1.2);
    /* color: var(--fg); */
    /* text-shadow: var(--extreme-bg) 2px 2px 4px; */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
}

.header-actions {
    grid-area: actions;
    display: flex;
    gap: 10px;
    align-items: center;
    align-self: flex-start;
    margin-top: calc(((var(--header-line-height) * var(--header-font-size)) / 2) - (var(--mac-btn-size) / 2));
}

.header-actions .pane-view-switcher {
    margin-left: 0px;
}

.report-divider {
    height: 3px;
    border-radius: 3px;
    margin-bottom: 2em;
    background-color: var(--accent-bg);
}

.report-wrapper {
    color: var(--fg);
    border-radius: 0px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg);
    corner-shape: squircle;
}

.split.grid {
    display: grid;
    position: fixed;
    height: 100vh;
    overflow-x: visible !important;

    &>.master-controls,
    &>.response-box {
        min-width: 0px;
        position: relative;
        /* --bg: #000; */
        /* background: #0000004a; */
        max-width: 100%;
    }
}

#paper,
#the-annotation-panel {
    min-width: 0px;
    overflow: hidden;
}

#paper {
    display: grid;
    min-height: 0px;
    min-width: 0px;
    background-color: transparent;
}

.annotation-body-title {
    text-align: center;
    font-weight: 600;
    margin: 20px 0px;
    text-shadow: var(--text-shadow);
    text-decoration: underline;
}

.tab-buttons-level0 {
    position: relative;
    border-radius: 0px;
    padding: 3px 0px 1px;
    margin-top: 0px;
}

.tab-button-level0 {
    margin: 0px 0px 3px 12px;
    padding: 3px 8px 2px;
    font-size: 0.9em;
    border: 1px solid transparent;
    border-radius: var(--pill-radius);

    &.active {
        box-shadow: rgba(255, 255, 255, 0.333) 0px 0px 10px;
        background: var(--nav-bg);
        color: var(--active-hover-fg);
    }

    &.active:hover {
        background-color: var(--nav-bg);
        box-shadow: white 0px 0px 5px;
    }

    &:not(:first-child)::before {
        content: " ";
        border-left: 1px solid rgba(0, 0, 0, 0.2);
        position: absolute;
        min-width: 2px;
        height: 30%;
        bottom: 0px;
        margin-left: -15px;
        display: none;
    }

    &:first-child {
        margin-left: 1em;
    }

    &:hover {
        color: var(--hover-fg);
        background: var(--hover-bg);
    }
}

.tab-buttons-level2 {
    border-radius: inherit;
    padding: 3px 0px 1px;
    margin-top: 1em;
    border-bottom: 1px solid rgb(221, 221, 221);
}

.tab-button-level2 {
    margin: 0px 0px -2px 5px;
    padding: 4px 8px 2px;
    font-size: 0.9em;

    &.active {
        border-bottom: 3px solid var(--nav-bg);

        &:hover {
            box-shadow: rgba(255, 255, 255, 0.667) 0px 0px 5px;
        }
    }

    &:hover {}
}

.split-master-inner {
    width: min-content;
    border-radius: inherit;
    padding: 0px;
    margin: 5px 3px 0px;
}

.segment-html p {
    line-height: 1.3em;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    word-break: break-word;
}

#sf-modal-background {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    transition: opacity 0.2s ease-in-out;
}

#sf-modal-background.hidden {
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0);
}

.dark #sf-modal-background.visible {
    background: rgba(0, 0, 0, 0.4);

}

#sf-modal-background.visible {
    opacity: 1;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.125);




    @starting-style {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
    }
}

.sf-modal-content {
    backdrop-filter: blur(5px);
    border-radius: var(--window-radius);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 0.5px solid rgba(255, 255, 255, 0.533);
    box-shadow: rgba(0, 0, 0, 0.667) 0px 0px 10px;
    background-color: var(--bg);
    corner-shape: squircle;
}

.sf-filter-pane-wrapper {
    display: contents;
}

.sf-modal-header {
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem 0px;
    color: var(--fg);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    display: none;

    & h2 {
        margin: 0px;
        font-size: 1rem;
        text-shadow: var(--bg) 0px 0px 3px;
        font-weight: 400;
    }
}

.sf-modal-close {
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    padding: 0px;
    line-height: 1;
    color: var(--fg);
    margin-right: -7px;
}

.sf-modal-body {
    padding: .5rem 1rem 1rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5em;
}

.sf-filter-pane {
    border-radius: var(--pill-radius);
    padding: 0px;
    border: 1px solid rgb(255, 255, 255);
    background: rgb(248, 248, 255);
    box-shadow: rgba(0, 0, 0, 0.46) 1px 1px 2px;

    & h3 {
        font-size: 0.9em;
        margin-top: 0px;
        margin-bottom: 0.5rem;
        font-weight: 700;
        background-color: rgba(0, 0, 0, 0.05);
        padding: 8px 10px;
        border-radius: 3px;
    }
}

.sf-options-container {
    max-height: 250px;
    overflow-y: auto;
    padding: 0px 10px 5px;
    font-size: 0.8em;
}

.sf-filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
    cursor: pointer;
    font-size: 0.8rem;

    & input[type="checkbox"] {
        margin-right: 0.5rem;
        flex-shrink: 0;
    }
}

.sf-option-label {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1em;
}

.sf-option-count {
    margin-left: 0.5rem;
    background-color: rgb(239, 239, 239);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.pane-header-container {
    display: flex;
    justify-content: end;
    align-items: baseline;
    position: sticky;
    top: 0px;
    z-index: 3;
    /* margin-bottom: 5px; */
    border-radius: var(--pill-radius);

    & .pane-buttons {
        margin-bottom: 0px;
        display: flex;
        max-width: 100%;
        flex-flow: row-reverse wrap;
        padding: 1px 0px;
    }
}

.panes-as-panels-container & {
    justify-content: flex-end;
    border-bottom: 1px solid var(--white-alpha-10);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.button-icon-container {
    flex-shrink: 0;
    width: 0px;
    display: none;
}

.pane-view-switcher {
    display: flex;
    padding-right: 8px;
    margin: 0px;
    height: min-content;
    transition: opacity 0.2s ease-in-out;
}

.chat-reply .pane-view-switcher {
    margin-left: unset;
}

.pane-interface-container.toolbar-hover-only .pane-view-switcher {
    opacity: 0;
    pointer-events: none;
}

.pane-interface-container.toolbar-hover-only:hover .pane-view-switcher {
    opacity: 1;
    pointer-events: auto;
}

.view-switch-btn {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 0px;
    border-radius: var(--pill-radius);
    color: var(--fg-fade);
    margin-bottom: 0px;
    height: min-content;

    &:hover {
        opacity: 1;
        background-color: var(--white-alpha-10);
    }

    &.active {
        color: var(--fg);

        & svg {
            background-color: var(--white-alpha-20);
            /* padding: 2px; */
            border-radius: 3px;
        }
    }

    & svg {
        width: 14px;
        height: 14px;
        fill: currentcolor;
        margin: 0px;
        padding: 2px 0 0;
        /* transform: scale(.5); */
    }

    .analytic-content & {
        color: rgb(51, 51, 51);
    }
}

.panes-panel-grid,
.panes-panel-minimize,
.panes-panel-list,
.panes-panel-grid,
.panes-panel-raw,
.display-switches-grid {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.pane-interface-container {
    position: relative;

    & .display-switches-grid {
        display: none;
    }

    &[data-view-mode="list"] .panes-panel-list {
        display: grid;
        opacity: 1;
        gap: 5px;
    }

    &[data-view-mode="list"] .split-list-outer {
        display: grid;
        opacity: 1;
    }

    &[data-view-mode="grid"] .panes-panel-grid,
    &[data-view-mode="grid"] .display-switches-grid {
        display: grid;
        opacity: 1;
        grid-column: 1 / -1;
    }

    &[data-view-mode="minimize"] .panes-panel-minimize {
        display: grid;
        opacity: 1;
    }

    & .panes-panel-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1em;
        padding: 1em;
        display: none;
        opacity: 0;
    }

    & .panes-panel-list {}
}

.detail-list-header {
    font-size: 0.9em;
    font-weight: 500;
    padding-top: 1em;
    margin-bottom: 3px;

    &,
    & .detail-list-item {
        align-items: center;
        padding: 8px;
        display: grid;
        grid-template-columns: subgrid;
        grid-column: 1 / -1;
    }

    &.super-header-row {
        /* padding-top: 1.5em; */
        padding-bottom: 0px;
        margin-bottom: -0.5em;
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--fg-fade);
        align-items: stretch;

        & .super-header-cell {
            display: flex;
            align-items: center;
            justify-content: center;
            border-top: 1px solid color-mix(in srgb, var(--bg), var(--fg) 30%);
            padding: 4px;
            font-weight: 600;
            width: 100%;
            background-color: var(--ghost);
            color: color-mix(in srgb, var(--bg), var(--fg) 70%);
            border-top-left-radius: var(--window-radius);
            border-top-right-radius: var(--window-radius);
            corner-shape: squircle;
            font-size: .95em;
            text-align: center;
        }
    }
}
}

.detail-list-cell {
    display: flex;

    & .clipped-content-container {
        width: 100%;
    }

    /* .detail-list-header/.detail-list-item set place-items: start, so cells
               shrink-wrap their content instead of stretching across the grid column —
               text-align alone has no room to work with. justify-self positions the
               (still content-sized) cell within its column track; text-align still
               matters for the frozen/split layout below, where cells DO stretch. */
    &.cell-align-center {
        justify-self: center;

        & .cell-value {
            text-align: center;
        }
    }

    &.cell-align-right {
        justify-self: end;

        & .cell-value {
            text-align: right;
        }
    }
}

/* Split-panel frozen column layout — hidden by default, shown in list view like panes-panel-list */
.split-list-outer {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    grid-template-columns: auto 1fr;
    align-items: start;
    width: 100%;
    row-gap: 5px;
}

/* Frozen panel (column 1): subgrid rows from outer grid, clips overflow */

.frozen-panel {
    grid-column: 1;
    display: grid;
    grid-template-rows: subgrid;
    overflow: hidden;
    background: var(--ghost);
    border-radius: var(--window-radius);
    corner-shape: squircle;
    /* box-shadow: var(--box-shadow); */
    /* margin: -5px 3px 3px; */
    padding-top: 5px;
    /* max-width: 100px; */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid color-mix(var(--bg), var(--fg) 30%);
    border-right: none;
}

.frozen-panel .detail-list-header,
.frozen-panel .frozen-row {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    /* align-items: center; */
    padding: 8px;
    font-size: 0.9em;
}

/* The frozen column's width can shrink below a single word's natural width
   (see syncSplitColumnWidths in panes.js). Without this, a word wider than the
   column overflows past .frozen-panel's `overflow: hidden` and gets silently
   clipped (e.g. "Massachusetts" losing "usetts") instead of wrapping. Only
   break a word when it doesn't fit on its own line -- normal space-wrapping
   still wins whenever possible. */
.frozen-panel .cell-value {
    overflow-wrap: break-word;
}

.frozen-panel .detail-list-header {
    padding: 0px;
    margin: 1px;
    border-bottom: 1px solid color-mix(in srgb, var(--bg), var(--fg) 30%);
}

.frozen-row {
    cursor: pointer;
}

.frozen-row.row-hover:not(.focused-item):not(.selected-item),
.frozen-row:hover:not(.focused-item):not(.selected-item),
.split-list-outer .detail-list-item.row-hover:not(.focused-item):not(.selected-item),
.split-list-outer .detail-list-item:hover:not(.focused-item):not(.selected-item) {
    background-color: var(--ghost) !important;
    --hover-bg: var(--ghost);
}


.frozen-row.focused-item {
    background: var(--header-bg);
    color: white;
    border: 1px solid var(--header-bg);
    border-radius: var(--pill-radius) 0 0 var(--pill-radius);
    font-size: 0.9em;
}

.frozen-row.focused-item * {
    color: white !important;
}

.frozen-row.selected-item {
    background-color: var(--hover-bg) !important;
    border-left: 4px solid var(--primary-color) !important;
}

/* Scrollable wrapper (column 2): passes outer subgrid rows down to panes-panel-list */
.split-list-outer>.scroll-shadow-x-wrapper {
    grid-column: 2;
    grid-row: 1 / -1;
    display: grid;
    grid-template-rows: subgrid;
    overflow: hidden;
    border-radius: var(--window-radius);
    corner-shape: squircle;
    margin-bottom: 3px;
    /* max-width: 400px; */
}

/* When a super-header row is present, frozenList's visible box starts one row
   lower than this wrapper's (see panes.js gridRow comment), so the edge shadow
   must be pushed down by that row's height or it bleeds above frozenList's top
   edge. --shadow-top-offset is set from panes.js once the super-header row is
   measured; it's a no-op (0px) when there's no super header. */
.split-list-outer>.scroll-shadow-x-wrapper::before,
.split-list-outer>.scroll-shadow-x-wrapper::after {
    top: var(--shadow-top-offset, 0px);
}

.split-list-outer .panes-panel-list {
    grid-row: 1 / -1;
    display: grid;
    grid-template-rows: subgrid;
    overflow-x: auto;
}

.split-list-outer .detail-list-item {
    border-radius: 0 var(--pill-radius) var(--pill-radius) 0;
    transition: none;
}

.split-list-outer .detail-list-item.focused-item {
    background: var(--header-bg);
    border-color: var(--header-bg);
}

.split-list-outer .detail-list-item.selected-item {
    border-left: none !important;
}

.list-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 10px;
}

.analytic-content-inner {
    border-radius: var(--pill-radius);
    display: grid;
}

.pane-create-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--nav-bg);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    z-index: 10;

    &:hover {
        transform: scale(1.05);
        box-shadow: rgba(0, 0, 0, 0.3) 0px 6px 15px;
    }

    & svg {
        width: 28px;
        height: 28px;
    }
}

.panes-as-panels-container {
    & .pane-buttons {
        display: none;
    }

    & .panes-panel {
        margin-top: 0px;
    }
}

.panel-group {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;

    & .panel-header {
        width: 100%;
        padding: 8px 0px;
        background-color: transparent;
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
        color: inherit;
        font-size: 1em;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
        display: flex;
        transition: background-color 0.2s;

        &::after {
            content: "⭣";
            font-size: 0.8em;
            transition: transform 0.2s ease-in-out;
            margin-left: 5px;
            font-weight: 900;
        }
    }

    &:hover .panel-header {}

    &.collapsed {
        &>.panel-header::after {
            transform: rotate(-90deg);
        }

        &>.panes-panel {
            display: none;
        }
    }
}

.item-desc-container {
    display: grid;
    grid-template-columns: min-content 1fr;
    gap: 5px;
    max-height: var(--row-max-height, 250px);
    overflow: hidden;
}

.item-desc-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
}

.item-desc-header {
    font-weight: bold;

    &::after {
        content: ":";
    }
}

.item-desc-value {}

.table-analytic-panes {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.table-analytic-panes .panels-content-wrapper {
    flex: 1;
    min-height: 0;
    overflow: auto;
    position: relative;
    inset: 0px;
}

.pane-subtitle {
    padding: 0px 12px 10px;
    font-size: 0.9em;
}

.related-terms {
    & .panel-group {
        &:not(:first-child) .detail-list-header {
            display: none;
        }

        & .panel-header {
            font-size: 1em;
        }
    }

    & .pane-subtitle {
        margin: 0px;
    }
}

.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-display {
    border: 1px solid var(--border-color-medium);
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    min-height: 32px;
    font-size: 0.9em;
}

.custom-select-popup {
    position: absolute;
    top: 100%;
    left: 0px;
    width: 100%;
    z-index: 1000;
    background: white;
    border: 1px solid var(--border-color-medium);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 5px;
    max-height: 300px;
    overflow-y: auto;
}

.select-group {
    border-bottom: 1px solid rgb(238, 238, 238);
}

.provider-group-label {
    padding: 4px 8px;
    font-weight: bold;
    background: rgb(249, 249, 249);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.custom-select-option {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9em;
}

.custom-select-option:hover {
    background: rgb(240, 240, 240);
}

.select-icon svg,
.group-icon svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.hierarchical-form {
    padding: 0px 0px 0px 10px;
}

.form-field-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    align-items: center;
    margin-bottom: 0.5em;
}

.complex-field-wrapper {
    padding: 5px 0px;
    border-radius: 4px;
}

.field-type-label {
    font-size: 0.9em;
    color: rgb(102, 102, 102);
}

.list-editor-container {
    position: relative;
    display: flex;
    transition: 0.7s ease-in-out;
    border-radius: var(--pill-radius);
    border: 1px solid rgb(204, 204, 204);
    height: 100%;
}

.list-collapsed {
    height: auto;
    min-height: 50px;
    flex-direction: row;
}

.list-expanded {
    flex-direction: row;
}

.list-master-pane {
    padding: 5px;
    overflow-y: auto;
    transition: width 0.3s;
    border: 2px solid var(--nav-bg);
    border-radius: var(--pill-radius);
}

.list-collapsed .list-master-pane {
    width: 100%;
}

.list-expanded .list-master-pane {
    width: 15em;
    position: relative;
    border: 2px solid var(--accent-bg);
    border-radius: var(--pill-radius);
    display: flex;
    flex-direction: column;
    align-items: end;
}

.list-detail-pane {
    overflow-y: auto;
    transition: width 0.3s;
    max-height: 50vh;
}

.list-collapsed .list-detail-pane {
    display: none;
}

.list-expanded .list-detail-pane {
    flex-grow: 1;
    display: block;
}

.list-items-wrapper {
    list-style: none;
    flex-grow: 1;
}

.list-collapsed .list-items-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-right: 30px;
    width: fit-content;
}

.list-expanded .list-items-wrapper {
    display: block;
    width: 100%;
}

.list-item {
    cursor: pointer;
    display: grid;
    justify-content: space-between;
    font-size: 0.9em;
    grid-template-columns: 20px 1fr 32px;
    height: fit-content;
}

.list-collapsed .list-item {
    border-radius: 3px;
    padding: 2px 6px;
}

.list-expanded .list-item {
    padding: 4px 0px 4px 8px;
}

.list-expanded .list-item.selected {
    background-color: rgb(247, 247, 247);
}

.list-item-icon {
    margin: 1px 5px 0px 0px;
    display: inline-flex;
}

.list-item-icon svg {
    width: 14px;
    height: 14px;
}

.list-item-delete {
    background: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    cursor: pointer;
    margin: 0px;
    padding: 0px;
    color: rgb(162, 12, 12);
}

.list-item-delete:hover {
    opacity: 0.5;
    color: rgb(162, 12, 12);
    filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 0px 1px);
}

.list-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px;
    border-bottom: 1px solid var(--ghost);
    margin-top: 10px;
    position: sticky;
    top: 0px;
}

.list-group-header:first-child {
    margin-top: 0px;
}

.list-group-title {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-fade);
}

.list-group-add-btn {
    background: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--fg);
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
    font-size: 1.2em;
    line-height: 1;
}

.list-group-add-btn:hover {
    opacity: 1;
    background-color: var(--hover-bg);
}

.grouped-list-editor .list-master-pane {
    display: block;
    padding: 0px;
}

.grouped-list-editor .list-items-wrapper {
    padding: 5px 0px;
}

.section-description {
    padding: 15px 20px;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.5;
}

.description-line {
    margin-bottom: 4px;
}

.description-line b {
    color: var(--fg-fade);
}

.section-grouped-list-container {
    height: calc(100% - 100px);
    min-height: 400px;
}

.list-item-delete svg {
    width: 16px;
    height: 16px;
}

.list-add-floating {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-bg);
    color: white;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    cursor: pointer;
    display: flex;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px;
    z-index: 5;
    position: sticky;
    float: right;
    bottom: 0px;
}

.list-add-floating:hover {
    background-color: var(--color-action-hover);
}

.list-add-floating svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.complex-field-summary {
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 0px;
    padding: 5px 0px;
    border-radius: 4px;
    margin-right: 0px;
}

.complex-chevron {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.25s ease, opacity 0.15s ease, color 0.15s ease;
    width: 16px;
    height: 16px;
    /* Muted at rest so a row of these reads as quiet affordances, not decoration. */
    color: var(--fg, rgba(255, 255, 255, 0.4));
    opacity: 0.55;
}

/* Render as a thin outlined stroke, not the default solid-filled polyline wedge. */
.complex-chevron svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Firm up only when the user is actually on the expandable row. */
.complex-field-summary:hover .complex-chevron,
.product-comparison-cell-category:hover .complex-chevron {
    opacity: 1;
}

.complex-chevron.rotated {
    transform: rotate(90deg);
}

.complex-field-details {
    display: none;
    margin-left: 20px;
    margin-top: 10px;
    border-left: 2px solid rgb(238, 238, 238);
    padding-left: 10px;
}

.complex-field-details.visible {
    display: block;
}

.strip-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.list-none-message {
    padding: 5px 0px;
    color: rgb(136, 136, 136);
    font-style: italic;
}

.simple-field-input {
    width: 100%;
}

.simple-field-input:disabled {
    color: rgb(102, 102, 102);
    background-color: rgb(245, 245, 245);
}

input[type="text"] {
    width: calc(100% - 20px);
    padding: 3px;
    margin-bottom: 3px;
    border-radius: var(--pill-radius);
    font-size: 0.9em;
    resize: both;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
}

.list-item:hover .list-item-delete {
    opacity: 1;
    pointer-events: all;
}

.list-item-delete {
    opacity: 0;
    pointer-events: none;
}

.report-master-detail-wrapper {
    display: flex;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgb(221, 221, 221);
}

.report-master-pane {
    flex: 0 0 25em;
    overflow-y: auto;
    border-right: 1px solid rgb(238, 238, 238);
    padding: 0px 10px 30px 0px;

    & .toc-link {
        font-size: 0.9em;
        padding: 3px 5px;
        border-left: 5px solid transparent;
        margin: 2px;
    }

    &.toc-grid-container {
        padding: 3px;
    }
}

.report-detail-pane {
    flex: 1 1 0%;
    overflow-y: auto;
    position: relative;
}

.toc-link.selected {
    background-color: color-mix(in srgb, var(--nav-bg), transparent 95%);
    border-left: 5px solid var(--nav-bg);
}

.vocab-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
    max-width: 900px;
    width: 90%;
}

.vocab-modal-body {
    flex: 1 1 0%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.vocab-grid-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.vocab-row {
    display: grid;
    grid-template-columns: 60px 1.5fr 2fr;
    border-bottom: 1px solid rgb(238, 238, 238);
    align-items: center;
}

.vocab-cell {
    padding: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vocab-cell-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.vocab-header {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    position: sticky;
    top: 0px;
    z-index: 10;
    background-color: rgb(255, 255, 255);
    font-weight: bold;
    border-bottom: 2px solid rgb(221, 221, 221);
}

.vocab-data-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.vocab-data-row:hover {
    background-color: rgb(245, 245, 245);
}

.vocab-data-row.selected {
    background-color: rgba(0, 123, 255, 0.08);
}

.vocab-provider-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vocab-provider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.sf-modal-footer {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0px;
    height: 0px;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0px;
    background-color: rgb(204, 204, 204);
    transition: 0.4s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    transition: 0.4s;
}

input:checked+.slider {}

input:focus+.slider {
    background-color: var(--ghost);
}

input:checked+.slider::before {
    transform: translateX(14px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round::before {
    border-radius: 50%;
}

.log-section {
    margin-left: 20px;
    border-left: 2px solid rgb(238, 238, 238);
    padding-left: 10px;
    margin-bottom: 10px;
}

.log-heading {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.log-chevron {
    transition: transform 0.2s;
}

.log-content {
    display: none;
}

.log-section.expanded .log-content {
    display: block;
}

.log-section.expanded .log-chevron {
    transform: rotate(90deg);
}

.loading-spinner-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgb(136, 136, 136);
}

.product-comparison-cell {
    display: flex;
    flex-direction: column;
}

.cell-collapsed-view,
.cell-expanded-view {
    overflow: hidden;
}

.product-comparison-cell:not(.expanded) .cell-collapsed-view {
    max-height: 500px;
    opacity: 1;
    padding: 4px 8px;
    margin-bottom: 0px;
}

.product-comparison-cell:not(.expanded) .cell-expanded-view {
    max-height: 0px;
    opacity: 0;
    padding-top: 0px;
    padding-bottom: 0px;
    border-bottom: 0px;
}

.product-comparison-cell.expanded .cell-collapsed-view {
    max-height: 0px;
    opacity: 0;
    padding-top: 0px;
    padding-bottom: 0px;
    margin: 0px;
}

.product-comparison-cell.expanded .cell-expanded-view {
    max-height: 500px;
    opacity: 1;
}

.cell-collapsed-view {
    font-size: 0.9em;
}

.cell-collapsed-view.clickable-summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cell-collapsed-view.clickable-summary:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

.expand-link {
    color: rgb(0, 102, 204);
    text-decoration: underline;
    cursor: pointer;
}

.cell-collapsed-view.no-sources {
    color: rgb(153, 153, 153);
    font-style: italic;
    cursor: default;
}

.no-sources-expanded {
    color: rgb(153, 153, 153);
    font-style: italic;
    padding: 8px;
}

.product-comparison-cell-category {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 0px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.9em;
    text-align: left;
    padding: 0px 10px 10px 0px;
}

.product-comparison-cell.row-hover {
    background-color: rgb(245, 249, 255) !important;
}

.product-comparison-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgb(238, 238, 238);
}

.footer-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-action-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-radius: 8px;
    gap: 1em;
}

.purchase-price-large {
    font-size: 1.5em;
    font-weight: bold;
}

.ai-summary-text {
    margin: 0.5em 0px 1em;
    font-size: 0.9rem;
    line-height: 1.5;
}

body {
    background-color: var(--shell-void);
}

.analytic-scroll-wrapper {
    position: relative;
    display: block;
    z-index: 1;
    border-radius: var(--pill-radius);
    overflow: hidden;
    margin: 10px 0px;
    height: 100%;
    min-height: 0;
    min-width: 0;
}

.analytic-scroll-wrapper .analytic-content {
    max-width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
}

.annotation-panel .analytic-scroll-wrapper .analytic-content {}

.analytic-scroll-wrapper::before,
.analytic-scroll-wrapper::after {
    content: "";
    position: absolute;
    top: 0px;
    bottom: 0px;
    width: 7px;
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.analytic-scroll-wrapper::before {
    left: 0px;
    background: radial-gradient(farthest-side at 0% 50%, var(--scroll-shadow-bg), rgba(0, 0, 0, 0));
    border-left: 2px solid var(--scroll-shadow-bg);
    --scroll-shadow-bg: #eee;
}

.analytic-scroll-wrapper::after {
    right: 0px;
    background: radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow-bg), rgba(0, 0, 0, 0));
}

.analytic-content-switcher-wrapper {
    position: relative;
    width: 100%;
}

.analytic-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    /* margin-bottom: 8px; */
    padding: 2px 4px 0;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.05); */
}

.analytic-caption {
    /* color: color-mix(var(--fg), var(--bg)); */
    font-size: 0.85em;
    line-height: 1.4;
    max-width: 48em;
    margin-top: -2px;
    /* text-shadow: 0 0 var(--extreme-bg); */
}

.analytic-edit-btns {
    display: flex;
    gap: 2px;
    align-items: center;

    .icon {
        height: 13px;
        width: 13px;
    }
}

.analytic-permanent-btns {
    display: flex;
    align-items: center;
    /* gap: 9px; */
}

.analytic-variation-btns {
    display: flex;
    align-items: center;
    color: color-mix(var(--fg), var(--bg) 50%);
    border-radius: var(--window-radius);
    margin-left: 10px;
    border-left: 1p;
    overflow: clip;
    padding: 1px 2px;
    /* gap: 9px; */
    corner-shape: squircle;
    position: relative;
}

.variation-slider {
    position: absolute;
    top: 1px;
    bottom: 1px;
    border-radius: var(--window-radius);
    background: var(--bg);
    box-shadow: var(--box-shadow);
    pointer-events: none;
    transition: left 0.2s cubic-bezier(0.4, 0, 0.2, 1), width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: left, width;
    z-index: 0;
    corner-shape: squircle;
}

.analytic-variation-btns .analytic-edit-btn {
    position: relative;
    z-index: 1;
}

.analytic-edit-btn {
    opacity: 0;
    transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    padding: 3px 5px 0px;
    /* color: var(--fg); */
    display: flex;
    align-items: center;
    /* gap: 0px; */
    border-radius: 50%;
    color: color-mix(var(--fg), transparent 20%);
}

.analytic-edit-btn:hover {
    background: transparent;
}

.analytic-content-wrapper:not(:hover) .analytic-edit-btns {
    opacity: 0;
}

.dark {
    .analytic-content-wrapper:hover .analytic-variation-btns {
        background: var(--extreme-bg);
        box-shadow: var(--box-shadow) inset;
        /* opacity:1; */

        /* box-shadow: var(--box-shadow) inset, 0 0 2px color-mix(var(--fg),var(--bg)); */
        .analytic-edit-btn {
            color: color-mix(var(--fg), var(--bg));

            &.active {
                color: var(--fg);
            }
        }
    }
}

.light {
    .analytic-content-wrapper:hover .analytic-variation-btns {
        background: var(--ghost);
        box-shadow: 1px 1px 1px var(--shadow-shade) inset;

        .analytic-edit-btn {
            color: color-mix(var(--fg), var(--bg));

            &.active {
                background: var(--bg);
                color: var(--fg);
            }
        }

    }
}

.analytic-content-wrapper:hover .analytic-edit-btn,
.analytic-content-wrapper.mode-panel-open .analytic-edit-btn {
    opacity: 1;
}

.analytic-edit-btns-divider {
    align-self: stretch;
    width: 1px;
    margin: 0 4px;
    background: var(--ghost, rgba(255, 255, 255, 0.12));
}

.analytic-edit-btn.analytic-format-icon-btn.active {
    background: transparent;
    box-shadow: none;
    color: var(--fg);
}

.popup-button-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-group-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(136, 136, 136);
    margin: 8px 0px 4px;
    padding-right: 1em;
}

.popup-group-items {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2px;
}

/* The filter panel stacks the packed checklist grid (built by
           ChecklistPacker, same DOM/CSS as the Discovery/Sources panel) on top
           of the free-text "Other criteria" box below it. */
.popup-filter-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-filter-col-label {
    font-weight: bold;
    margin-bottom: 4px;
}

.popup-filter-other-criteria {
    margin-top: 0;
    width: 100%;
}

.popup-filter-other-input {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 2.4em;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 0.85em;
    color: var(--fg);
    background: var(--input-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.18));
    border-radius: 4px;
}

.analytic-toolbar-btn {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    text-align: left;
    transition: 0.2s;
    background: transparent;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    margin: 0px;
}

.analytic-toolbar-btn:hover {
    background: var(--hover-bg);
    color: var(--hover-fg);
}

.analytic-toolbar-btn.active {
    background: var(--active-bg);
    color: var(--active-fg);
    border: 1px solid rgba(255, 255, 255, 0.125);
    box-shadow: rgba(0, 0, 0, 0.46) 0px 0px 3px, rgba(0, 0, 0, 0.46) 0px 0px 1px inset;

    & svg {
        width: 16px;
        height: 16px;
    }
}

.analytic-toolbar-btn span.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.analytic-toolbar-btn span.icon-wrapper svg {
    width: 14px;
    height: 14px;
}

.analytic-toolbar-btn[data-tier="alternative"] span.icon-wrapper {
    background: red;
    border-radius: 3px;
}

.popup-ai-modify {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    display: flex;
    align-items: flex-start;
}

.popup-ai-modify textarea {
    width: 100%;
    min-height: 80px;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    border-radius: var(--pill-radius);
    padding: 10px 50px 10px 10px;
    color: var(--fg);
    resize: none;
    height: 100%;
}

.popup-ai-modify textarea:focus {
    outline: none;
    border-color: var(--active-bg);
    box-shadow: rgba(0, 123, 255, 0.25) 0px 0px 0px 2px;
}

.popup-ai-submit-btn {
    background: var(--fg);
    color: var(--bg);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 5px;
    right: 5px;
    height: 30px;
    width: 30px;
}

.popup-ai-submit-btn:hover {
    filter: brightness(1.1);
}

.popup-ai-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.popup-ai-status {
    margin-top: 8px;
    font-size: 0.85em;
    color: rgb(136, 136, 136);
    text-align: center;
    min-height: 1.2em;
    position: absolute;
    right: 0px;
    bottom: 0px;
    display: none;
}

.popup-ai-status.error {
    color: rgb(255, 68, 68);
}

.analytic-variant-content {
    display: grid;
    grid-template-columns: minmax(200px, auto);
    grid-area: 1 / -1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.analytic-variant-content.active {
    opacity: 1;
}

.analytic-variant-content.hidden {
    display: none !important;
}

.panes-content {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
}

.panes-panel-list {
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
}

.detail-list-header,
.detail-list-item {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    place-items: start;
    position: relative;
    padding: 4px;
}

.detail-list-item:hover::before {
    content: "";
    --offset: 0px;
    height: calc(100% + 2 * var(--offset));
    width: calc(100% + 2 * var(--offset));
    left: calc(-1 * var(--offset));
    top: calc(-1 * var(--offset));
    background-color: var(--hover-bg);
    border-radius: var(--pill-radius);
    z-index: -1;
    box-shadow: rgba(0, 0, 0, 0.267) 0px 0px 1px;
    position: absolute;
}

.detail-list-cell:nth-child(2) {}

.related-terms {
    & .panel-header-wrapper:hover {
        color: rgb(51, 51, 51);
    }

    & div.pane-subtitle {
        padding-left: 0px;
    }
}

.content-title {
    background-color: var(--header-bg);
    padding: 1em 10rem 0.5em 1em;
    position: sticky;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    font-size: 1.8em;
    height: min-content;
    text-shadow: rgb(0, 0, 0) 1px 1px 4px;
    color: rgb(238, 238, 238);
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    corner-shape: squircle;
    display: none;
}

.detail-wrap {
    border-radius: inherit;
    padding: 0px;
    overflow-y: scroll;
    overscroll-behavior: contain;
    height: 100%;
    display: flex;
    flex-flow: column;
    flex-grow: 1;
    flex-shrink: 1;
    min-height: 0px;
    min-width: 0px;
}

.detail-wrap-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    flex-grow: 1;
}

.goto {
    background-color: var(--bg);
    color: var(--fg);
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goto-container {}

.dark .goto-content .field-values-name {}

.light .goto-content .field-values-name {
    background-color: rgba(0, 0, 0, 0.04);
}

.goto-content {
    --hover-bg: color-mix(color-mix(in srgb, var(--nav-bg-base), black 20%), transparent 10%);

    & .field-values-name {
        border-radius: 0px;
        padding: 10px;
    }

    & .field-values-value {
        margin: 0px 5px;
        padding-top: 10px;
    }

    & .field-values-table {}
}

.search-summary .field-values-table {
    margin-bottom: 10px;
    background-color: white;

    & .field-values-name,
    & .field-values-value {
        font-size: 0.85em;
    }

    & .field-values-name {
        font-weight: bold;
    }
}

.field-values-row {}

.field-values-name,
.field-values-value {
    display: table-cell;
    padding: 4px;
    vertical-align: top;
}

.field-values-name {
    font-weight: 600;
    padding-right: 10px;
}

.multi-label-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0px;
    margin: 0px;
}

.multi-label-item {
    display: inline-block;
    height: min-content;
    margin: 0px;
}

.dark .custom-color-pill {
    background: color-mix(var(--custom-bg-color), var(--bg));
    box-shadow: var(--box-shadow), 0 0 1px #ffffff33 inset;
}

.field-values-composite-value .custom-color-pill {
    padding: 0 5px;
}

.custom-color-pill {
    color: var(--custom-fg-color, var(--fg));
    background: var(--custom-bg-color, transparent);
    padding: 2px 5px;
    width: fit-content;
    height: min-content;
    border-radius: 5px;
    corner-shape: squircle;
    box-shadow: 2px 2px 2px var(--shadow-shade), 0 0 1px #ffffff inset;





    & li,
    &: is(li) {
        margin: 0px 0.5em 0.2em 0px;
        display: inline-block;
    }

    & ul {}

    --custom-shadow-color: color-mix(color-mix(in srgb, var(--custom-bg-color) 0%, var(--scroll-shadow-bg)), transparent 70%);
    text-shadow: none;
}

.field-values-list .custom-color-pill {
    margin: 0 5px 5px 0
}

.analytic-name-tooltip {
    display: none;
    position: fixed;
    z-index: 10000;
    background-color: rgb(34, 34, 34);
    color: rgb(255, 255, 255);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 2px 8px;
    font-family: sans-serif;
    line-height: 1.2;
}

.annotation-body {
    counter-reset: item-counter 0;
    display: grid;
    grid-template-rows: 100%;
    min-height: 0px;
    min-width: 0px;

    & .tab-buttons {
        display: none;
    }

    & .analytic-content-wrapper {
        border-radius: var(--pill-radius);
        padding: 0px;
        margin: 2px;
    }

    & .scroll-shadow {
        &::before {
            height: 0.5em;
            background: radial-gradient(farthest-side at 50% 0px, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
        }

        &::after {
            height: 0.5em;
            background: radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
        }
    }

    & table.dataTable {
        &>thead {
            top: 0px;
            color: rgb(51, 51, 51);

            & th {
                position: sticky;
                top: 0px;
                border-width: medium;
                border-style: none;
                border-color: currentcolor;
                border-image: initial;
                border-radius: inherit;
                padding-top: 4px;
                padding-bottom: 4px;
                font-weight: 600;
            }
        }

        &>tbody>tr {
            &>* {
                border-left-width: medium;
                border-left-style: none;
                border-left-color: currentcolor;
                cursor: pointer;
                border-bottom-width: medium;
                border-bottom-style: none;
                border-bottom-color: currentcolor;
            }

            &:hover>* {
                background-color: rgba(255, 255, 255, 0.067);
                border-bottom-width: 0px;
                border-bottom-style: solid;
                box-shadow: none;
            }

            &.selected>* {
                color: white;
                box-shadow: none;
                background-color: rgba(255, 255, 255, 0.2);
            }

            &.selected> :first-child {}

            &> :first-child {}

            &>td {
                vertical-align: top;
            }
        }
    }

    & .clipped-content-container {
        max-height: unset;
        counter-increment: item-counter 1;
        position: relative;
        padding-left: 2.1em;

        &::before {
            content: counter(item-counter) "";
            position: absolute;
            left: 0px;
            font-size: 1.1em;
            font-weight: bold;
            top: 0.1em;
        }
    }

    & .detail-wrap {
        padding: 0px;
    }

    & .detail-title {
        display: none;
    }

    & table.dataTable>thead {
        display: none;
    }

    & .search-container {
        display: none;
    }

    & .search-section {
        display: none;
    }
}

.infogrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, auto));
    gap: 1em;
    padding: 1em;
    border-top: 1px solid rgba(255, 255, 255, 0.333);
}

.search-section {
    background: rgb(238, 238, 238);
    border: 1px solid rgb(221, 221, 221);
    padding: 5px;
    border-radius: var(--pill-radius);
    margin: 3px;
}

.horizontal-detail {
    border-radius: var(--window-radius);
    padding: 5px 5px 0px;
    display: grid;
    min-height: 0px;
    min-width: 0px;
    corner-shape: squircle;
    margin: 8px;
    box-shadow: rgba(0, 0, 0, 0.333) 0px 0px 3px;
    border: 1px solid var(--fg-fade);
}

@container (min-width: 55em) {
    .highlights {
        float: right;
        max-width: min(50%, 40em);
        margin: 0px 1em 1em 1.5em;
    }
}

.tab-content-wrapper {
    min-width: 0px;
    min-height: 0px;
}

#the-annotation-panel {
    min-height: 0px;
    min-width: 0px;
    display: grid;
    grid-template-rows: min-content 1fr;
    height: 100%;
    container: annotation-container / inline-size;
    border-radius: inherit;
    corner-shape: squircle;
}

.source-annotation-body {
    min-height: 0px;
    min-width: 0px;
    display: grid;
    height: 100%;
    overflow: scroll;
}

/* Per-observation "show sources" selector: a single-value custom dropdown that
           wraps long observation text (a native <select> cannot), showing one observation
           at a time with its focused analytic rendered below. */
.obs-selector {
    position: relative;
    margin-bottom: 12px;
}

.obs-selector-trigger {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--bg);
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    cursor: pointer;
    corner-shape: squircle;
}

.obs-selector-trigger:hover {
    border-color: var(--primary-color, #0f52ba);
}

.obs-selector-label {
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
}

.obs-selector-caret {
    flex: 0 0 auto;
    /* line-height: 1.4; */
    /* opacity: 0.6; */
    width: 20px;
    height: 20px;
    font-size: 2em;
}

.obs-selector-menu {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 260px;
    overflow-y: auto;
    /* border: 1px solid var(--border-color, #d0d0d0); */
    border-radius: 10px;
    background: var(--extreme-bg);
    box-shadow: var(--box-shadow-dramatic);
    corner-shape: squircle;
}

.obs-selector-menu[hidden] {
    display: none;
}

.obs-selector-option {
    padding: 8px 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #ececec);
}

.obs-selector-option:last-child {
    border-bottom: none;
}

.obs-selector-option:hover {
    background: var(--hover-color, rgba(15, 82, 186, 0.08));
}

.obs-selector-option.selected {
    background: var(--header-bg);
    /* font-weight: 600; */
    /* box-shadow: var(--box-shadow-dramatic); */
    color: white;
    text-shadow: 0 0 1px black;

}

.obs-selector-analytic {
    margin-top: 12px;
}

.obs-selector-empty {
    margin-top: 8px;
    font-size: 0.9em;
    color: var(--text-muted, #666);
}

.source-annotation-with-evidence-panels {
    display: grid;
    min-height: 0px;
    min-width: 0px;
    grid-template-rows: min-content 1fr;
}

.source-annotation-with-evidence-flow {}

.elaboration-observation {
    border-top: 1px solid rgba(255, 255, 255, 0.333);
}

.tab-panel.tab-panel-detail {
    display: block;
}

#the-container>.gutter-col {
    position: relative;
    left: -10px !important;
}

.sidebar-logo {
    --logo-height: 32px;
    font-size: 22px;
    text-align: left;
    max-height: var(--logo-height);
    border-radius: 10px;
    display: flex;
    width: min-content;
    min-height: 50px;
    filter: drop-shadow(rgb(0, 0, 0) 0px 0px 2px);
    position: fixed;
}

.sidebar-logo svg {
    height: var(--logo-height);
    width: var(--logo-height);
    display: none;
}

.sidebar-logo svg .outer,
.sidebar-logo svg .inner {
    transform-origin: 50px 50px;
    transition: transform 0.4s ease-in-out, stroke-dasharray 0.4s ease-in-out, stroke-width 0.4s ease-in-out;
}

.sidebar-logo svg .outer {
    transform: rotate(45deg) scale(1, 1);
    stroke-dasharray: 60, 0;
}

.sidebar-logo svg .inner {
    transform: rotate(45deg) scale(1, 1) translateY(0px);
    stroke-dasharray: 30, 0;
}

.sidebar-collapsed:not(.sidebar-floating) .sidebar-logo svg .outer {
    transform: rotate(0deg);
    stroke-dasharray: 60, 60;
    stroke-width: 6;
}

.sidebar-collapsed:not(.sidebar-floating) .sidebar-logo svg {
    transform: scale(0.6) translate(2px);
    transition: scale 0.9s ease-in-out, color 0.3s ease-in-out;
}

.sidebar-collapsed:not(.sidebar-floating) .sidebar-logo svg .inner {
    transform: rotate(0deg) scaleX(2) translateY(15px);
    stroke-dasharray: 30, 90;
    stroke-width: 6;
}

.sidebar-text {
    position: absolute;
    font-weight: 500;
    transition: max-width 0.2s ease-in-out, width 0.2s ease-in-out, opacity 0.2s ease-in-out;
    width: 100%;
    top: 0px;
    opacity: 0;
    left: 41px;
}

.sidebar-logo-image {
    vertical-align: middle;
    position: fixed;
    height: 30px;
    pointer-events: none;
    left: 8px;
    top: 5px;
    filter: drop-shadow(rgba(0, 0, 0, 0.333) 0px 0px 3px);
}

.logo-letters-wrapper {
    position: absolute;
    inset: 0px;
    z-index: 1;
    filter: drop-shadow(rgb(0, 0, 0) 0px 0px 1px);
    display: none;
}

.logo-waves-wrapper {
    position: absolute;
    inset: 0px;
    z-index: 2;
    filter: drop-shadow(rgba(0, 0, 0, 0.4) 0px 2px 4px);
    display: none;
}

.logo-layer {
    position: absolute;
    inset: 0px;
    transition: background-color 0.2s ease-in-out;
}

.logo-letters {
    background-color: rgb(255, 255, 255);
}

.logo-waves {
    background-color: rgb(255, 59, 48);
    display: none;
}

.sidebar-logo .sidebar-logo {
    left: 10px;
    top: 10px;
}

.sidebar-header {
    justify-content: flex-start;
    gap: 10px 5000px;
    flex-wrap: wrap;
    margin: 0px;
    z-index: 1;
    display: block;
    top: 0px;
    padding-bottom: 5px;
    padding-top: calc(5px + var(--sidebar-heading-top));
    padding-left: var(--sidebar-padding);
    background: radial-gradient(200px at 32% 0px, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
}

.sidebar-header .sidebar-logo {
    display: none;
}

.embedded-field-name {
    font-weight: bold;
    text-decoration: underline;
    margin-right: 10px;
}

details.debug-details {
    margin-top: 15px;
    font-family: monospace;
    font-size: 11px;
}

details.debug-details>summary {
    cursor: pointer;
    margin-bottom: 5px;
    font-weight: bold;
    outline: none;
}

.debug-stats {
    padding: 10px;
    border: 1px dashed rgb(204, 204, 204);
    font-size: 11px;
    font-family: monospace;
    line-height: 1.4;
}

.debug-stats hr {
    margin: 5px 0px;
    border-width: 1px 0px 0px;
    border-style: solid none none;
    border-color: rgb(221, 221, 221) currentcolor currentcolor;
    border-image: initial;
}

.debug-stats ul {
    margin: 2px 0px 0px 15px;
    padding: 0px;
    list-style-type: disc;
}

.switch-container {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 16px;
    margin-right: 8px;
}

.switch-container input {
    opacity: 0;
    width: 0px;
    height: 0px;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0px;
    background-color: var(--fg-fade);
    transition: 0.4s;
    border-radius: 34px;
}

.slider-circle {
    position: absolute;
    height: 14px;
    width: 15px;
    left: 3px;
    bottom: 1px;
    background-color: var(--bg);
    transition: 0.4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    padding: 2px;
    box-shadow: 0 0 1px var(--fg);
}

.switch-container input:checked+.slider {}

.switch-container input:checked+.slider .slider-circle {
    transform: translateX(14px);
}

.segmented-control {
    display: inline-flex;
    background: var(--black-alpha-10);
    padding: 4px;
    border-radius: 10px;
    width: min-content;
    gap: 2px;
    corner-shape: squircle;
}

body.night-mode .segmented-control {
    background: var(--white-alpha-10);
}

.segmented-control .segment {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.segmented-control input {
    display: none;
}

.segmented-control span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: var(--text-color-dark);
    user-select: none;
    corner-shape: squircle;
}

.segmented-control span svg {
    width: 18px;
    height: 18px;
}

body.night-mode {
    .report-logo {
        background-color: #0000002e;
        box-shadow: 0 0 5px #ffffff22;
        box-shadow: 0 0 2px #000000;
    }
}

body.night-mode .segmented-control span {
    color: var(--text-color-light);
}

.segmented-control input:checked+span {
    background: var(--color-action-blue);
    color: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.g.xy {
    filter: drop-shadow(rgba(0, 0, 0, 0.333) 2px 2px 3px);
}

.master-controls .master-inner-wrapper::after {
    position: absolute;
    right: calc(-1 * var(--shadow-width));
    content: " ";
    height: 100%;
    width: var(--shadow-width);
    z-index: 1;
    --shadow-width: 4px;
}

.gutter.gutter-col.gutter-col-1::after {
    position: absolute;
    right: calc(-1 * var(--shadow-width));
    content: " ";
    height: 100%;
    width: var(--shadow-width);
    background: linear-gradient(to right, rgba(0, 0, 0, .25) 0, transparent) var(--shadow-width);
    z-index: 1;
    --shadow-width: 4px;
    display: none;
}

.pane-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    /* height: 8px; */
}

.pane-view-switcher {
    display: flex;
    /* gap: 2px; */
}

.pane-pagination-slot {
    display: flex;
    align-items: center;
}

.pane-pagination {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.8em;
    gap: 8px;
    margin: 0px;
}

[data-view-mode="minimize"] .pane-pagination {
    display: none !important;
}

.pane-pagination button {
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    font-weight: 900;
    border-radius: var(--pill-radius);
    padding: 0px;
    background: none;
}

.pane-pagination button:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.05);
}

.pane-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
    background-color: transparent;
    border-color: rgba(0, 0, 0, 0.1);
}

.pagination-info {}

.plot-and-legend {
    display: flex;
    flex-flow: wrap;
}

.hide-scrollbar {
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding: 4px 1.2em 3px 0px;
    transition: background-color 0.2s;

    &:first-child {
        padding-left: 4px;
    }
}

.sortable-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sortable-header {
    --sort-icon-updown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
    --sort-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 15 7-7 7 7'/%3E%3C/svg%3E");
}

.sortable-header::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 11px;
    height: 11px;
    transform: translateY(-50%);
    background-color: currentColor;
    opacity: 0;
    -webkit-mask-image: var(--sort-icon-updown);
    mask-image: var(--sort-icon-updown);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: opacity 0.15s ease;
}

.sortable-header:not(.sort-asc):not(.sort-desc):hover::after {
    opacity: 0.45;
}

.sortable-header.sort-asc::after,
.sortable-header.sort-desc::after {
    width: 9px;
    height: 9px;
    opacity: 0.85;
    -webkit-mask-image: var(--sort-icon-chevron);
    mask-image: var(--sort-icon-chevron);
}

.sortable-header.sort-desc::after {
    transform: translateY(-50%) rotate(180deg);
}

.detail-list-header {
    padding: 0px;
    margin: 1px;
    border-bottom: 1px solid color-mix(in srgb, var(--bg), var(--fg) 30%);
}

.goto-button-container {
    display: flex;
    gap: 8px;
    justify-content: end;
    border-top: 1px solid rgba(255, 255, 255, 0.133);
    padding-top: 5px;
}

.detail-list-item.focused-item {
    background: var(--header-bg);
    color: white;
    border: 1px solid var(--header-bg);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    corner-shape: squircle;
}

.detail-list-item.focused-item * {
    color: white !important;
}

.sidebar-header::after {
    content: " ";
    position: absolute;
    right: -10px;
    width: calc(100% + 90px);
    height: 10px;
    bottom: 0px;
}

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    transition: border-color 0.2s, opacity 0.2s cubic-bezier(0.87, 0, 0.13, 1);
    border: 1px solid var(--fg);
    box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 16px;
    /* transform: translate(0px, -1px); */
    box-shadow: rgba(0, 0, 0, 0.2) 0 0 5px;
    /* corner-shape: squircle; */
    box-shadow: none;
}

.back-logo {
    position: fixed;
    top: calc(-6px + var(--sidebar-heading-top));
    left: calc(-20px+var(--sidebar-padding));
    z-index: 999;
    --fg: var(--sidebar-header-color);
    transition: left 0.2s ease-in-out;
    display: none;

    &.sidebar-collapsed:not(.sidebar-floating) {
        left: -8px;
        --bg: #aaa !important;
        color: rgb(170, 170, 170) !important;

        & .sidebar-text {
            width: 0px;
            max-width: 0px;
            opacity: 0;
        }
    }

    & .sidebar-logo {}
}

.pin-toggle-btn {
    display: none;
    position: absolute;
    z-index: 900;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 0px;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1;
    opacity: 0;
    box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 3px;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
    transform: translateX(calc(100% - 2px));
    height: 22px;
    width: 22px;
    color: var(--fg);
    right: -15px;
    top: 10px;
    border-radius: 50%;
    background: transparent;

    & .icon {}

    &:focus {
        outline: none;
    }
}

.sidebar-floating .pin-toggle-btn {
    opacity: 1;
}

.collapse-toggle-btn {
    position: absolute;
    z-index: 900;
    background: transparent;
    color: rgb(119, 119, 119);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 2px;
    cursor: pointer;
    border-bottom-right-radius: 3px;
    border-top-right-radius: 3px;
    font-size: 0.8em;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
    transform: translateX(calc(100% + 3px));
    height: 8px;
    width: 22px;
    right: 8px;
    top: -1px;
    filter: drop-shadow(black 0px 0px 3px);
    display: none;
}

.sidebar-collapsed .collapse-toggle-btn {
    opacity: 0;
}

pin-toggle-btn:hover,
.collapse-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.333);
    color: rgb(0, 0, 0);
    border-radius: 50%;
}

.master-controls {
    display: grid;
    flex-shrink: 1;
    width: 100%;
    height: 100vh;
    overflow-x: hidden !important;
    max-width: 100%;
}

.master-controls.sidebar-collapsed {
    overflow: visible;
}

.sidebar-collapsed .master-inner-wrapper {
    background-color: transparent;
    /* No transform transition: the popup appears/disappears instantly (no slide). */
    transition: background 3.35s;

    &::after {
        opacity: 0;
    }
}

.sidebar-floating .master-inner-wrapper {
    background: var(--bg);
    transition: background 0.35s;

    &::after {
        opacity: 1;
    }
}

body.super-light .master-controls:not(.sidebar-collapsed) .master-inner-wrapper.light {
    background: var(--bg);

    .chat-input-area {
        border: 1px solid white;
        background-color: #ffffff44
    }
}

.master-inner-wrapper.light {
    .strip {
        color: var(--fg);
    }

    .master-tool-content {
        color: var(--fg);
    }

    #select.strip-button.active {
        color: var(--fg);
    }

    .chat-input-area {
        color: var(--fg);
    }

    .master-tool-content::before,
    .chat-buttons::before {
        background: none;
    }

    .collapse-toggle-btn:hover {
        background-color: color-mix(in srgb, var(--fg), transparent 85%);
    }
}

.chat-wrapper.light {

    .chat-prompt,
    .chat-reply {
        color: var(--fg);
    }

    .interim-reply-placeholder {
        color: var(--fg-fade-active);
    }

    .thinking-process-summary {
        color: color-mix(in srgb, var(--fg), transparent 30%);
    }

    .thinking-process-summary:hover {
        background: color-mix(in srgb, var(--fg), transparent 95%);
    }

    .thinking-label {
        color: color-mix(in srgb, var(--fg), transparent 20%);
    }

    .thinking-children {
        border-left-color: color-mix(in srgb, var(--fg), transparent 90%);
    }

    .thinking-item {
        background: color-mix(in srgb, var(--fg), transparent 95%);
    }

    .thinking-mini-progress {
        background: color-mix(in srgb, var(--fg), transparent 90%);
    }

    .thinking-spinner {
        border-color: var(--fg) color-mix(in srgb, var(--fg), transparent 80%) color-mix(in srgb, var(--fg), transparent 80%);
    }

    .thinking-scroll-container {
        scrollbar-color: color-mix(in srgb, var(--fg), transparent 90%) transparent;

        &::-webkit-scrollbar-thumb {
            background: color-mix(in srgb, var(--fg), transparent 90%);
        }
    }

    .detail-image-placeholder {
        background-color: var(--nav-bg);
        color: var(--active-fg);
    }

    .display-switch.active {
        background-color: color-mix(in srgb, var(--fg), transparent 90%);
        border-color: color-mix(in srgb, var(--fg), transparent 88%);
    }
}

.master-inner-wrapper {
    max-height: 100vh;
    flex-direction: column;
    display: grid;
    overflow-x: visible;
    grid-template-rows: 1fr min-content;
    position: relative;
    inset: 0px;
    max-width: 100%;
}

.master-inner-wrapper .chat-header,
.master-inner-wrapper .chat-inner {
    display: grid;
    position: relative;
    overflow: hidden scroll;
    height: 100%;
}

.master-controls.sidebar-collapsed .master-inner-wrapper {
    position: absolute;
    top: 0px;
    left: 0px;
    /* hidden state stays flush so translateX(-100%) fully clears it */
    width: 300px;
    transform: translateX(-100%);
    z-index: 499;
    padding-right: 8px;
    /* Popup-menu look: detached card, all corners rounded. */
    border-radius: var(--window-radius);
    corner-shape: squircle;
}

.master-controls.sidebar-floating {
    z-index: 500;
}

.master-controls.sidebar-floating .master-inner-wrapper {
    transform: translateX(0px);
    box-shadow: rgba(0, 0, 0, 0.45) 5px 0px 20px;
}

.master-controls .master-inner-wrapper::after {
    content: " ";
    position: absolute;
    right: calc(-1 * var(--sidebar-padding));
    width: 0px;
    height: 100%;
    border-radius: 0 0 var(--pill-radius) 0;
    display: none;
}

.whitebox {}

.back-logo {
    &.sidebar-collapsed:not(.sidebar-floating) .sidebar-logo {
        color: rgb(187, 187, 187);
    }
}

.dark .annotation-list a {
    color: var(--link-color);
}

.annotation-source-background {}

a.inline-datum-link {
    /* color: #ffaa35; */
    /* color: #d68f2d; */
    color: var(--link-color);
}

a.inline-figure-link {
    color: var(--link-color);
    cursor: pointer;
    white-space: nowrap;
}

@container (0px <=width <=400px) {

    .analytic-content-title,
    .d3-axis-title {
        display: none;
    }
}

.export-options {
    & .button-icon-container {
        display: unset;
        margin: 0px;
        padding: 0px 10px 10px;

        & svg {
            height: 100%;
            width: 100%;
        }
    }

    & .button-text-container {
        width: calc(100% - 5em);
        margin-left: 3em;
    }

    & .button-title {}

    & .detail-image.glass-effect::before {
        background: transparent;
    }
}

.tab-buttons.tab-buttons-gradient {
    padding-top: 1em;
    --bg: var(--header-bg);
    --fg: #eee;
    display: none;
}

.cell-wrapper-standard {
    max-height: var(--row-max-height, 75px);
    overflow: hidden;
}

.cell-wrapper-must-see {}

.tab-content-vertical-tabs {
    overflow: scroll;
    position: relative;
}

.button-metadata {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.main-content {
    border-radius: var(--window-radius);
    overflow: hidden;
    padding: 0px;
    display: grid;
    position: relative;
    grid-area: 1 / -1;
    box-shadow: rgb(0, 0, 0) 0px 0px 20px;
    corner-shape: squircle;
    background: var(--bg);
}

body.super-light .main-content {
    box-shadow: rgba(0, 0, 0, 0.32) 0px 0px 9px;
}

.main-content-wrapper {
    max-height: 100vh;
    padding: 8px 8px 8px 0px;
    display: grid;
    corner-shape: squircle;
    border-radius: var(--window-radius);
}

.comparison-container {
    display: grid;
    grid-area: 1 / -1;
}

.product-comparison-wrapper {
    display: grid;
    grid-area: 1 / -1;
}

.assistant-reply {
    width: 100%;

    & .report-layout {
        margin: 0px;
    }

    & .layout-wrapper {
        padding: 0px;
    }

    & .layout {
        padding: 0px;
    }
}

.detail-list-cell ul {
    margin: 0px;
    padding-inline-start: 1em;
}

.chat-input-label {
    display: none;
}

.settings-container {
    padding: 10px 20px 20px;
    min-width: 450px;
    max-width: 650px;

    & h2 {
        margin-top: 0px;
        margin-bottom: 20px;
        font-size: 1.4rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 12px;
        color: var(--fg);
    }
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    & label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    & .description {
        margin: 0px 0px 12px;
        font-size: 0.85rem;
        color: var(--fg-muted);
        line-height: 1.4;
    }

    & textarea {
        width: 100%;
        padding: 12px;
        background: var(--bg-input);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--fg);
        font-family: Inter, system-ui, sans-serif;
        font-size: 0.95rem;
        line-height: 1.5;
        resize: vertical;
        outline: none;
        transition: border-color 0.2s;

        &:focus {
            border-color: rgba(255, 255, 255, 0.3);
        }
    }

    & input[type="number"] {
        width: 60px;
        padding: 4px 8px;
        background: var(--bg-input);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        color: var(--fg);
        font-family: Inter, system-ui, sans-serif;
        font-size: 0.95rem;
        outline: none;
        transition: border-color 0.2s;

        &:focus {
            border-color: rgba(255, 255, 255, 0.3);
        }
    }

    & .setting-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;

        &:last-child {
            margin-bottom: 0px;
        }

        & .row-label {
            font-size: 0.9em;
            color: var(--fg-muted);
        }
    }
}

.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* ── Connected Data Sources section in Settings ─────────────────── */
.settings-section {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    & .section-header h3 {
        font-size: 1rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        margin: 0 0 6px;
        color: var(--fg);
    }

    & .section-header .description {
        font-size: 0.85rem;
        color: var(--fg-muted);
        margin: 0 0 20px;
        line-height: 1.5;
    }
}

.mcp-catalog-loading .placeholder {
    font-size: 0.9rem;
    color: var(--fg-muted);
}

.mcp-tier-section {
    margin-bottom: 28px;
}

.mcp-tier-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 14px;
}

/* OAuth integration cards */
.mcp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.mcp-server-card {
    background: var(--bg-card, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, background 0.2s;

    &.connected {
        border-color: rgba(72, 199, 142, 0.4);
        background: rgba(72, 199, 142, 0.05);
    }

    .mcp-card-header {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mcp-server-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        object-fit: contain;
    }

    .mcp-server-icon-placeholder {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
    }

    .mcp-card-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mcp-card-name {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--fg);
    }

    .mcp-card-footer {
        display: flex;
        gap: 8px;
    }
}

.mcp-status-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg-muted);

    &.connected {
        background: rgba(72, 199, 142, 0.15);
        color: #48c78e;
    }
}

.mcp-btn-connect,
.mcp-btn-disconnect,
.mcp-btn-save-keys,
.mcp-btn-remove-smithery {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--fg);

    &:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    &:disabled {
        opacity: 0.5;
        cursor: wait;
    }
}

.mcp-btn-connect {
    border-color: rgba(99, 179, 237, 0.5);
    color: #63b3ed;

    &:hover {
        background: rgba(99, 179, 237, 0.1);
    }
}

.mcp-btn-disconnect,
.mcp-btn-remove-smithery {
    border-color: rgba(252, 129, 129, 0.4);
    color: #fc8181;

    &:hover {
        background: rgba(252, 129, 129, 0.1);
    }
}

/* Smithery API-key items */
.mcp-api-key-item {
    background: var(--bg-card, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;

    &.configured {
        border-color: rgba(72, 199, 142, 0.4);
    }

    .mcp-apikey-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
    }

    .mcp-apikey-row {
        margin-bottom: 10px;

        & label {
            display: block;
            font-size: 0.8rem;
            color: var(--fg-muted);
            margin-bottom: 4px;
        }

        & input {
            width: 100%;
        }
    }

    .mcp-apikey-footer {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }
}

/* ── Unified connector catalog (search + categories + grid) ───────── */
.connector-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.connector-search {
    width: 100%;
    max-width: 420px;
}

.connector-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.connector-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.connector-filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin-right: 4px;
}

.connector-chip {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--fg-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.connector-chip:hover {
    color: var(--fg);
    border-color: var(--fg-muted);
}

.connector-chip.active {
    background: rgba(72, 199, 142, 0.15);
    border-color: rgba(72, 199, 142, 0.5);
    color: #48c78e;
}

.connector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.connector-card {
    .connector-kind-badge {
        display: inline-block;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--fg-muted);
    }

    .mcp-card-header {
        align-items: flex-start;
    }

    .mcp-status-pill {
        margin-left: auto;
    }

    .connector-card-desc {
        font-size: 0.8rem;
        line-height: 1.35;
        color: var(--fg-muted);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .connector-card-cats {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .connector-cat-chip {
        font-size: 0.68rem;
        padding: 1px 7px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        color: var(--fg-muted);
    }

    .mcp-card-footer {
        margin-top: auto;
    }
}

.connector-empty {
    padding: 24px 0;
    text-align: center;
    color: var(--fg-muted);
}

/* ── Disabled (unconfigured) choices in clarification card ────────── */
.multistage-rule-choice.disabled-unconfigured {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    /* border: 1px dashed rgba(255, 255, 255, 0.2); */
    /* display: grid; */





    .multistage-gear-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 11px;
        height: 11px;
        flex-shrink: 0;
        color: var(--fg-muted);















        & svg {
            width: 14px;
            height: 14px;
        }
    }
}

.multistage-rule-choice.locked-required {
    cursor: default;
    pointer-events: none;
    opacity: 0.85;

    .multistage-lock-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        margin-left: auto;
        color: var(--fg-muted);
        opacity: 0.6;

        & svg {
            width: 11px;
            height: 11px;
        }
    }
}



.clipped-content-container.is-expanded {
    max-height: none !important;
}

.clipped-content-container .clip-toggle-btn {
    position: absolute;
    bottom: 0px;
    width: 16px;
    height: 16px;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    color: var(--bg);
    cursor: pointer;
    display: none;
    z-index: 10;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease-in-out, background 0.2s;
    padding: 1px;
    margin-left: auto;
    border-radius: 50%;
    box-shadow: 0 3px 5px var(--shadow-shade);
    justify-self: center;
    margin-bottom: 3px;
    background: var(--fg);
}

/* Only shown while hovering the cell it belongs to, so clipped tables
           aren't covered in distracting always-on chevrons. */
.clipped-content-container.is-clipped .clip-toggle-btn {
    display: flex;
    opacity: 0;
}

.clipped-content-container.is-clipped:hover .clip-toggle-btn {
    opacity: 1;
}

.clipped-content-container .clip-toggle-btn:hover {
    background: var(--hover-bg, #333);
    color: white;
}

.clipped-content-container .clip-toggle-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.clipped-content-container.is-expanded .clip-toggle-btn svg {
    transform: rotate(180deg);
}

.clipped-content-container.is-expanded .clip-toggle-btn {
    position: relative;
    background: transparent;
    height: 20px;
}

.paper-inner::before {
    position: absolute;
    content: " ";
    height: 100%;
    width: 100%;
    box-shadow: rgba(255, 255, 255, 0.125) 1px 1px 1px inset;
    z-index: 1;
    border-radius: var(--window-radius);
    pointer-events: none;
    corner-shape: squircle;
}

.main-content::before {
    position: absolute;
    content: " ";
    height: 100%;
    width: 100%;
    box-shadow: rgba(255, 255, 255, .4) 0px 0px 3px inset;
    z-index: 1;
    border-radius: var(--window-radius);
    corner-shape: squircle;
    pointer-events: none;
}

.legend-continuous-canvas-wrapper {
    border-radius: var(--pill-radius);
    border: 1px solid rgb(0, 0, 0);
    margin: 0px 0px 5px;
    box-shadow: rgba(0, 0, 0, 0.2) 4px 4px 4px;

    & canvas {
        width: 100%;
        height: 20px;
        display: block;
        border-radius: var(--pill-radius);
    }
}

.popup-ai-modify-inner {
    width: 100%;
    display: block;
    border: 1px solid var(--fg-fade);
    border-radius: var(--pill-radius);
    position: relative;
}

.response-area>.pane-interface-container {
    padding: 0px;
}

.sidebar-floating .master-inner-wrapper {
    background-color: var(--bg);
}

.multi-report-tab-btn {
    transition: opacity 0.2s, background-color 0.2s;
    color: var(--fg);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    box-shadow: rgba(0, 0, 0, 0.667) 3px 3px 3px;
    height: 100%;
    border-radius: var(--pill-radius);
    background: transparent;
    padding: 0px;
}

.multi-report-tab-btn.active {
    background-color: var(--fg);

    & .detail-image {
        box-shadow: white 0px 0px 3px;
    }
}

.standard-pane-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden !important;
}

.standard-pane-header {
    --header-font-size: 1.8em;
    --header-line-height: 1.2;
    --mac-btn-size: 18px;
    --header-pad-top: 0.5em;
    --header-pad-bottom: .2em;
    --header-left-pad-bottom: 8px;
    padding: var(--header-pad-top) 1em var(--header-pad-bottom);
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
    box-shadow: var(--extreme-bg) 0px 0px 1px inset;
    border-top-left-radius: var(--window-radius);
    border-top-right-radius: var(--window-radius);
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.header-left {
    display: flex;
    align-items: flex-start;
    gap: 1.5em;
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: var(--header-left-pad-bottom);
}

.header-controls-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    /* Stretch to the header row's full height (title may wrap to 2
               lines) so the top/bottom padding below stay pinned to the
               header's real edges instead of just this column's own content
               height. */
    align-self: stretch;
    /* Vertically centers the mac-buttons row within the title's first
               line of text. */
    --controls-top-offset: calc(((var(--header-line-height) * var(--header-font-size)) / 2) - (var(--mac-btn-size) / 2));
    padding-top: var(--controls-top-offset);
    /* Mirrors the top offset so the last control (history button) sits
               the same distance from the header's bottom edge as the first
               control (maximize button) sits from its top edge, accounting
               for the header's own asymmetric top/bottom padding. */
    padding-bottom: calc(var(--header-pad-top) - var(--header-pad-bottom) - var(--header-left-pad-bottom) + var(--controls-top-offset));
}

.mac-window-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mac-btn {
    width: var(--mac-btn-size);
    height: var(--mac-btn-size);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mac-btn.close {
    background-color: rgb(255, 95, 86);
    display: none;
}

.mac-btn.minimize {
    background-color: rgb(255, 189, 46);
    display: none;
}

.mac-btn.maximize {
    position: relative;
    /* background-color: #28c840; */
    /* border: 1px solid rgba(0, 0, 0, 0.18); */
}

.mac-btn.maximize .icon-wrapper {
    position: absolute;
    width: 14px;
    height: 14px;
    top: calc(50% - 7px);
    left: calc(50% - 7px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.mac-btn.maximize .icon-wrapper svg {
    width: 100%;
    height: 100%;
    /* color: rgb(0, 0, 0); */
    /* color: white; */
}

.mac-btn.maximize .expand-icon-wrapper {
    opacity: 1;
    pointer-events: auto;
}

.mac-btn.maximize .sidebar-icon-wrapper {
    opacity: 0;
    pointer-events: none;
}

#app-view.sidebar-collapsed .mac-btn.maximize .expand-icon-wrapper {
    opacity: 0;
    pointer-events: none;
}

#app-view.sidebar-collapsed .mac-btn.maximize .sidebar-icon-wrapper {
    opacity: 1;
    pointer-events: auto;
}

.mini-pane-content {
    flex: 1 1 0%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.standard-pane-content {
    flex: 1 1 0%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.standard-pane-content.split-view {
    display: grid;
    grid-template-columns: 250px 5px 1fr;
    overflow: hidden;
    transition: grid-template-columns 0.2s ease;
}

.standard-pane-content.split-view.outline-collapsed {
    grid-template-columns: calc(1em + 28px) 0px 1fr;
}

.standard-pane-content.split-view.outline-collapsed .outline-content-wrapper {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.report-outline-side {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto 1fr;
    grid-area: 1 / 1;
    overflow: hidden;
    border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.outline-toggle-btn {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0.5em 0 0 14px;
    border: none;
    background: var(--bg);
    color: var(--fg);
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.outline-toggle-btn:hover {
    background: color-mix(in srgb, var(--fg) 20%, transparent);
}

.outline-toggle-btn svg {
    width: 14px;
    height: 14px;
}

.outline-toggle-label {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    align-items: center;
    font-size: 0.85em;
    color: var(--fg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.15s ease;
    margin-left: 6px;
    margin-top: 0.5em;
}

.standard-pane-content.split-view.outline-collapsed .outline-toggle-label {
    opacity: 0;
}

.outline-content-wrapper {
    grid-row: 2;
    grid-column: 1 / -1;
    overflow-y: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.report-main-side {
    grid-area: 1 / 3;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-title {
    position: absolute;
    inset: 5px;
    z-index: 20;
    pointer-events: none;
    border-radius: var(--pill-radius);
    font-weight: bold;
    color: white;
    font-size: 1em;
    box-sizing: border-box;
    corner-shape: squircle;
    text-shadow: var(--text-shadow);
    padding: 0px;
    text-align: left;
}

#template-image-slot .detail-image,
.template-image-slot .detail-image {
    height: 100px;
    width: 100%;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    max-height: 100px;
    margin: 0px;
    flex: 0 0 auto;
}

#template-image-slot,
.template-image-slot {
    width: 120px;
    position: relative;
    max-height: 60px;
    overflow: clip;
    top: 0px;
    height: min-content;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.333);
    border-radius: var(--pill-radius);
    corner-shape: squircle;
    background-color: var(--background);

    & .detail-image-placeholder {
        display: none;
    }

    &::before {
        content: "  ";
        position: absolute;
        inset: 0px;
        z-index: 20;
        pointer-events: none;
        border-radius: var(--pill-radius);
        font-weight: bold;
        padding: 10px;
        color: white;
        font-size: 1.6em;
        width: 100%;
        box-sizing: border-box;
    }

    &::after {
        content: "";
        position: absolute;
        inset: 0px;
        opacity: 1;
        z-index: 10;
        pointer-events: none;
        border-radius: var(--pill-radius);
    }

    & .detail-image img {
        display: block;
        width: 100%;
    }
}

.back-logo {
    &.sidebar-collapsed {}
}

.sidebar-collapsed .master-inner-wrapper::after {
    content: " ";
    position: absolute;
    height: 100%;
    border-radius: 0 0 var(--pill-radius) 0;
    box-shadow: rgba(0, 0, 0, 0.333) 2px 2px 2px;
    background-color: var(--shell-void) !important;
}

.detail-image img {
    display: block;
    width: 90px;
}

.hamburger-btn {
    position: relative;
    width: 18px;
    height: 18px;
    background-image: initial;
    background-position: initial;
    background-size: initial;
    background-repeat: initial;
    background-attachment: initial;
    background-origin: initial;
    background-clip: initial;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    border-radius: var(--pill-radius);
    z-index: 10;
    cursor: pointer;
    color: var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.hamburger-btn:hover {
    transform: scale(1.1);
    background-color: var(--bg);
    box-shadow: 1px 1px 3px var(--fg);
}

.display-switch:hover .hamburger-btn,
.detail-list-item:hover .hamburger-btn {
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    z-index: 10001;
    padding: 4px 0px;
    border-radius: 6px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 4px 15px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s, transform 0.15s;
    overflow: hidden;
    background-color: var(--bg);
    color: var(--fg);
}

.dropdown-menu.visible {
    opacity: 1;
    transform: translateY(0px);
}

.menu-item {
    width: 100%;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    text-align: left;
    color: var(--fg);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85em;
    font-family: inherit;
    white-space: nowrap;
}

.menu-item:hover {
    background: var(--white-alpha-10);
    color: var(--active-fg);
}

.menu-item svg,
.menu-item .icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.chat-input-area-wrapper {
    /* background: linear-gradient(to bottom, transparent, var(--bg) 1em); */
    overflow-x: visible;
    position: relative;
    padding: 8px 0px 8px 8px;
    max-height: 50vh;
}

/* Hover-action dropdown panel anchored to the analytic card button */
.analytic-mode-panel {
    position: fixed;
    z-index: 200;
    background: var(--bg);
    border: 1px solid color-mix(in srgb, var(--fg), transparent 80%);
    border-radius: var(--window-radius);
    corner-shape: squircle;
    box-shadow: var(--box-shadow-dramatic);
    padding: 8px;
    max-height: 50vh;
    overflow-y: auto;
    min-width: 220px;
    color: var(--fg);
}

.analytic-mode-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.8em;
    opacity: 0.6;
}

.analytic-mode-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fg);
    opacity: 0.6;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.analytic-mode-close-btn svg {
    width: 100%;
    height: 100%;
}

.analytic-mode-close-btn:hover {
    opacity: 1;
}

/* Format / Layout / Filters sit in a 3-column grid, each sizing to content. */
.popup-settings-content {
    display: grid;
    grid-template-columns: repeat(1, auto);
    gap: 8px 24px;
    align-items: start;
    padding: 3px 0;
}

/* Perspectives / "Focus on": column stack of toggle + group rows. */
.popup-settings-content[data-mode="perspective"] {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* "Modify with chat": single full-width column, not the content-sized format grid. */
.popup-settings-content[data-mode="modify"] {
    display: block;
}

/* Widen the panel when showing perspectives */
.analytic-mode-panel:has(.popup-settings-content[data-mode="perspective"]) {
    min-width: 380px;
    max-width: 560px;
}

/* "Modify with chat" panel: a text box, tappable example prompts, and an OK button. */
.analytic-mode-panel:has(.popup-settings-content[data-mode="modify"]) {
    min-width: 320px;
    max-width: 420px;
}

.popup-modify-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.popup-modify-input {
    min-height: 3.2em;
}

.popup-modify-examples-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.55;
    margin-top: 2px;
}

.popup-modify-examples {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-modify-example {
    text-align: left;
    width: 100%;
    padding: 2px 8px;
    font-family: inherit;
    font-size: 0.82em;
    line-height: 1;
    /* color: var(--link-color); */
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-style: italic;
}

.popup-modify-example:hover {
    background: color-mix(in srgb, var(--accent, var(--fg)), transparent 82%);
    border-color: color-mix(in srgb, var(--accent, var(--fg)), transparent 60%);
}

.popup-modify-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.popup-modify-ok-btn {
    padding: 6px 18px;
    font-family: inherit;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--on-accent, #fff);
    background: var(--accent, #4a7dff);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.popup-modify-ok-btn:hover {
    opacity: 0.9;
}

.popup-modify-ok-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Active state for the sidebar toggle hover button (only visible while hovering) */
.analytic-content-wrapper:hover .analytic-split-toggle-btn.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

#snackbar-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    align-items: center;
}

.snackbar {
    pointer-events: auto;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 20px;
    color: rgb(255, 255, 255);
    font-size: 14px;
    font-weight: 500;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 8px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 300px;
}

.snackbar.visible {
    opacity: 1;
    transform: translateY(0px) scale(1);
}

.snackbar-message {
    flex-grow: 1;
}

.snackbar-offline {
    min-width: unset;
    padding: 10px 16px;
    font-size: 13px;
}

.offline-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: currentcolor;
    border-radius: 50%;
    display: inline-block;
    animation: 2s ease-in-out 0s infinite normal none running offline-pulse;
}

@keyframes offline-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

.snackbar-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    border-radius: 6px;
    color: rgb(77, 163, 255);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    text-transform: uppercase;
    transition: background 0.2s;
}

.snackbar-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.snackbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.snackbar-icon svg {
    width: 100%;
    height: 100%;
}

.reply-area>.useragent:first-child,
.reply-area>.assistant-turn-container:first-child .useragent {
    padding-top: 10px;
    margin: 0px;
}

.strip-button .label {}

.strip-button .icon {
    padding: 2px;
    width: 20px;
    height: 20px;
}

.submit-btn {}

.chat-wrapper::before {
    position: sticky;
    inset: 0px;
    height: 6px;
    content: " ";
    z-index: 900;
    background: radial-gradient(50% 100% at 50% 0px, rgb(0 0 0 / 51%), rgba(0, 0, 0, 0));
}

.thinking-process-details {
    margin: 8px 0px;
    overflow: hidden;
    transition: 0.3s;
}

.thinking-process-summary {
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    list-style: none;
}

.thinking-process-summary::-webkit-details-marker {
    display: none;
}

.thinking-process-summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.thinking-summary-icon {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.thinking-summary-icon.rotated {
    transform: rotate(90deg);
}

.thinking-plan-icon {
    display: none;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.thinking-process-details.finalized .thinking-plan-icon {
    display: inline-flex;
}

.thinking-summary-icon svg {
    width: 100%;
    height: 100%;
}

.thinking-scroll-container {
    max-height: 15em;
    overflow: hidden auto;
    padding: 0px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.thinking-process-details.finalized .thinking-scroll-container {
    max-height: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    opacity: 0;
}

.thinking-process-details.finalized[open] .thinking-scroll-container {
    max-height: 20vh;
    opacity: 1;
}

.thinking-process-details.finalized.collapsing .thinking-scroll-container {
    max-height: 0px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    opacity: 0 !important;
}

.thinking-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.thinking-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.thinking-tree-root {
    font-family: var(--font-family-mono, monospace);
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
}

.thinking-node {
    margin-top: 6px;
    position: relative;
    opacity: 0;
    transform: translateY(5px);
    animation: 0.3s ease 0s 1 normal forwards running thinking-node-in;
}

@keyframes thinking-node-in {
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.thinking-header {
    display: flex;
    align-items: flex-start;
}

.thinking-children {
    margin-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 12px;
}

.thinking-label {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    flex: 1 1 0%;
    min-width: 0px;
    gap: 8px;
}

.thinking-step-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0px;
}

.thinking-mini-progress {
    width: 30px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    flex-shrink: 0;
    overflow: hidden;
}

.thinking-mini-progress-fill {
    height: 100%;
    background: rgb(129, 199, 132);
    transition: width 0.3s;
}

.thinking-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-width: 2px;
    border-style: solid;
    border-color: rgb(255, 255, 255) rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2);
    border-image: initial;
    border-radius: 50%;
    animation: 0.8s linear 0s infinite normal none running thinking-spin;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.thinking-check-icon {
    width: 12px;
    height: 12px;
    color: rgb(129, 199, 132);
    margin-right: 8px;
    display: inline-flex;
}

.thinking-summary-icon .thinking-spinner {
    margin-right: 0px;
}

.thinking-check-icon svg {
    width: 100%;
    height: 100%;
}

.thinking-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin-right: 4px;
    vertical-align: middle;
    transition: transform 0.2s;
    color: rgba(255, 255, 255, 0.4);
}

.thinking-toggle-icon svg {
    width: 10px;
    height: 10px;
    stroke: currentcolor;
    stroke-width: 2.5;
    fill: none;
}

.thinking-node.collapsed .thinking-header .thinking-toggle-icon {
    transform: rotate(0deg);
}

.thinking-node.expanded .thinking-header .thinking-toggle-icon {
    transform: rotate(90deg);
}

.thinking-node.collapsed>.thinking-children {
    display: none;
}

.thinking-status-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: 0.2s;
}

.thinking-status-icon.completed {
    border-color: transparent;
    background-color: transparent;
    color: rgb(129, 199, 132);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.thinking-status-icon.completed svg {
    width: 12px;
    height: 12px;
    stroke: rgb(129, 199, 132);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.thinking-status-icon.running {
    border-color: transparent;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.thinking-status-icon.running .thinking-spinner {
    width: 12px;
    height: 12px;
    margin-right: 0px;
    border-width: 2px;
    vertical-align: top;
}

.thinking-status-icon.error {
    border-color: transparent;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.non-task-log {
    display: none !important;
}

@keyframes thinking-spin {
    100% {
        transform: rotate(360deg);
    }
}

.standard-pane-content::before {
    content: " ";
    width: 100%;
    height: 6px;
    position: absolute;
    background: linear-gradient(#000 0px, transparent);
    top: 0px;
    z-index: 9;
    opacity: .1;
}

#select.strip-button.active {
    background: rgb(255, 245, 0);
    color: var(--bg);
    text-shadow: white 0px 0px 3px;
    box-shadow: rgba(0, 0, 0, 0.467) 0px 0px 6px;
    border-radius: 6px;
    corner-shape: squircle;
}

.outline-level-1.outline-item-wrapper {
    font-weight: 700;
    margin-bottom: 0px;
}

.outline-level-2.outline-item-wrapper {}

.outline-level-2 .toggle-arrow {
    transform: scale(0.9);
}

.outline-level-3plus .toggle-arrow {
    transform: scale(0.9);
}

.outline-level-3plus.outline-item-wrapper {
    margin-top: 0px;
    margin-bottom: 0px;
    font-weight: 400;
}

.expandable:hover>.outline-item-wrapper .outline-label {}

.outline-item-wrapper {}

.fragment-content-area {
    display: grid;
    grid-template-rows: 1fr;
    /* minmax(0,1fr): the single column gets a 0 minimum instead of min-content, so
               wide nowrap content (e.g. the multistage card rows) can't inflate it past the
               pane. */
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    overflow-y: auto;
    height: 100%;
    padding: 5px;
}

.fragment-wrapper {
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Continuous-document mode: the report content pane stacks every leaf section
           into ONE scroll container (.fragment-content-area is the sole scroller).
           Scope the fixes to .fragment-content-area.continuous so the global .layout
           rule (reused by inline assistant-reply reports and tab-panel-detail) and the
           one-fragment-at-a-time swap layout are left untouched. */
.fragment-content-area.continuous {
    /* Stack every leaf as a normal block so each flows at its NATURAL height into
               the single .fragment-content-area scroller. The base rule is display:grid
               with grid-template-rows:1fr — with several stacked children that collapses
               to equal-height rows the content overflows (the overlapping-pieces bug).
               Block layout can't force equal rows, and block children don't inflate the
               pane on wide content, so the grid's minmax(0,1fr) workaround isn't needed. */
    display: block;
}

.fragment-content-area.continuous .fragment-wrapper {
    height: auto;
    display: block;
}

/* A tabbed leaf (fragment-wrapper containing a fragment-tabs-header) is exempt from
   the block/natural-height stacking above: it should fill the pane like it does in
   tab-swap mode, with its own header pinned and only its active tab's content
   scrolling, rather than flowing header+content into the outer document scroll. */
.fragment-content-area.continuous .fragment-wrapper:has(.fragment-tabs-header) {
    height: 100%;
    display: flex;
    overflow: hidden;
}

.fragment-content-area.continuous .layout {
    max-height: none;
    overflow-y: visible;
}

/* In the continuous document the Highlights box is a right-hand sidebar for its top-level
   section: floated right with a fixed width so the section's own content (subsection
   headings, body text, figures) flows in a column to its left. Float on .highlights
   itself, NOT .infobox -- .highlights is display:flex, and CSS ignores `float` on a flex
   ITEM (.infobox is one), so floating the inner box is a no-op; the outer .highlights div
   is a normal block (its own parent, .layout or .doc-branch-highlights, is display:block)
   so floating it works. Cleared at the next top-level heading (see the data-doc-level
   "0"/"1" rules below) so it never bleeds into the following section. */
.fragment-content-area.continuous .highlights {
    float: right;
    width: 320px;
    max-width: 40%;
    margin: 0 16px 16px 24px;
}

/* Figures embedded in report prose: the title row defaults to left-aligned (it's also
   used by the narrow detail-pane widget, where left alignment is correct), and the plot
   itself is only centered as a side effect of the chart JS's own auto-margins (narrow
   charts, e.g. a 2-category bar, look adrift under a left-aligned title in the wide
   prose column). Center both so the figure reads as one aligned unit. */
.fragment-content-area.continuous .analytic-title-row {
    /* align-items: center; */
    text-align: center;
}

.fragment-content-area.continuous .analytic-content-inner {
    /* justify-items: center; */
}

.fragment-content-area.continuous .segment-html>h2 {
    scroll-margin-top: 8px;
    /* Embedded prose headings are the DEEPEST level in the body hierarchy —
               tree-node section headings (.doc-section-heading) sit above them. */
    font-size: 1.05em;
}

/* Tree-node section headings (docs/continuous_report_headings_numbering_handoff.md
           #1/#2): one per document-plan entry, inserted before its content by
           _renderContinuousDocument. Real h1/h2/h3 tags (capped depth), sized/indented by
           data-doc-level rather than the tag itself so unbounded tree depth doesn't run
           out of heading levels. */
.fragment-content-area.continuous .doc-section-heading {
    margin: 28px 0 12px;
    font-weight: 600;
    /* color: var(--fg); */
    scroll-margin-top: 8px;
}

.fragment-content-area.continuous>.doc-section-heading:first-child {
    margin-top: 0;
}

.fragment-content-area.continuous .doc-section-heading[data-doc-level="0"] {
    font-size: 2.5em;
    /* padding-bottom: 8px; */
    border-bottom: 4px solid var(--fg);
    margin: 4em 0 3em;
    /* background: var(--ghost); */
    /* padding: 10px 5px; */
    /* text-align: center; */
    /* border-radius: 10px; */
    corner-shape: squircle;
    /* box-shadow: 0 0 3px var(--shadow-shade); */
    /* background: linear-gradient(to bottom, var(--ghost), transparent); */
}

.fragment-content-area.continuous .doc-section-heading[data-doc-level="1"] {
    font-size: 1.8em;
    margin: 2em 0 1em;
    border-bottom: 3px solid var(--fg);
}

.fragment-content-area.continuous .doc-section-heading[data-doc-level="2"] {
    font-size: 1.12em;
    margin-left: 24px;
    color: var(--fg, rgba(255, 255, 255, 0.75));
}

/* Only a TRUE top-level section heading (data-doc-top, set in
   _getOrCreateDocSectionHeading via the same uuid === topUuid identity check as
   _sectionShowsHighlights) clears the previous top-level section's floated Highlights
   sidebar. data-doc-level (tree depth) can't drive this clear: depth 1 means "the top
   section" only when a 'Report' wrapper is present and means "an immediate subsection"
   (which must flow BESIDE the current section's box, not below it) when it isn't. */
.fragment-content-area.continuous .doc-section-heading[data-doc-top="1"] {
    clear: both;
}

/* Outline numbering (#2) prefixed onto every tree-node label. */
.outline-number {
    /* color: var(--fg, rgba(255, 255, 255, 0.5)); */
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}

.fragment-tabs-content {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.fragment-tab-panel {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
}

.dataset-rendering-context {
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.strip .strip-button {
    border-radius: var(--window-radius);
    corner-shape: squircle;
    padding: 0px;
    margin: 0px 8px;
}

body.night-mode .chat-input-area {
    box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 8px !important;
}

body.night-mode .dark {
    --border-color: transparent;
    /* --bg: #0000004a; */
    /* background: #0000004a; */
}

body.night-mode .report-outline-side {
    background: rgba(0, 0, 0, 0.04);
}

body.night-mode .main-content {
    box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 8px !important;
}

body.night-mode .report-outline-side {
    border-right: 1px solid rgba(0, 0, 0, 0.133) !important;
}

body.night-mode {
    & .standard-pane-content::before {
        height: 2px;
    }
}

.night-mode .infobox {
    background: var(--complement-bg);
    color: white;
    box-shadow: rgba(0, 0, 0, 0.533) 0px 0px 2px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.variant-side-panel {
    flex: 0 0 calc(40% - 7.5px);
    height: 100%;
    /* The report content pane is now one continuous auto-height scroll (no
               fixed-height iframe/card to bound the split row against), so a bare
               height:100% can stretch the panel as tall as whatever the main content
               happens to render. Cap it so it always scrolls internally instead. */
    max-height: 80vh;
    min-height: 0;
    min-width: 0px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    display: flex;
    flex-direction: column;
    border-radius: var(--window-radius);
    corner-shape: squircle;
    position: relative;
}

/* Inside a fixed-height fragment-tab-panel the 80vh cap is unnecessary and
   prevents the panel from filling the available grid-track height. */
.fragment-tab-panel .variant-side-panel {
    max-height: 100%;
}

.side-panel-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    z-index: 10;
    transition: color 0.15s, background 0.15s;
}

.side-panel-close-btn:hover {
    color: var(--text-color, rgba(255, 255, 255, 0.9));
    background: var(--hover-bg, rgba(255, 255, 255, 0.08));
}

.variant-side-panel-content {
    overflow: auto;
    padding: 15px;
    flex: 1;
    min-height: 0;
}

/* An analytic embedded in a side panel (PageViewer extracted-data items AND the
           drill/detail flow) renders the full .analytic-content-wrapper. Force it and its
           inner content to track the panel width so it resizes with the panel / split
           gutter instead of overflowing at its natural (e.g. 900px) render width. Any
           residual table overflow still scrolls inside the existing overflow-x:auto.
           Note: this only sizes content to the (already-widened) outer wrapper - the
           actual breakout past .layout-body's 650px cap happens one level up, via
           [data-width-hint="wide"] above, which toggleSwitcherSplitMode() (common.js)
           sets on the outer wrapper whenever this side panel is open. */
.variant-side-panel-content .analytic-content-wrapper,
.variant-side-panel-content .analytic-content,
.variant-side-panel-content .analytic-content-inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.variant-side-panel-content table {
    width: 100%;
}

/* An analytic rendered INSIDE a side panel keeps its modify toolbar
           (format/filter/focus/versions) — you can still reformat an analytic while it's
           embedded. Hide ONLY the split-toggle ("show as side panel") button and any nested
           side panel, so we never get a variant-side-panel within a variant-side-panel. */
.variant-side-panel .analytic-split-toggle-btn {
    display: none !important;
}

.variant-side-panel .variant-side-panel {
    display: none !important;
}

.analytic-content-switcher-wrapper[data-detail-mode="split"] {
    grid-template-columns: minmax(0, 1fr) 6px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    height: 100%;
    min-height: 0;
    display: grid !important;
    gap: 0px !important;
}

.analytic-content-switcher-wrapper[data-detail-mode="split"]> :first-child {
    grid-area: 1 / 1;
    min-width: 0px;
    flex: 0 0 auto !important;
}

.analytic-content-switcher-wrapper .analytic-split-gutter {
    grid-area: 1 / 2;
    cursor: col-resize;
    background: transparent;
    position: relative;
    z-index: 10;
    display: none;
}

.analytic-content-switcher-wrapper[data-detail-mode="split"]>.analytic-split-gutter {
    display: block;
}

.analytic-content-switcher-wrapper .analytic-split-gutter::after {
    content: " ";
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 2px;
    width: 2px;
    background-color: var(--border-color, rgba(255, 255, 255, 0.15));
    transition: background-color 0.2s;
}

.analytic-content-switcher-wrapper .analytic-split-gutter:hover::after {
    background-color: var(--accent-color, #0f52ba);
}

.analytic-content-switcher-wrapper[data-detail-mode="split"]>.variant-side-panel {
    grid-area: 1 / 3;
    min-width: 25em;
    flex: 0 0 auto !important;
    /* width: 50%; */
}

.analytic-title-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

/* Two-column primary/covariate picker: col 1 (primary) sizes to content, col 2
   (covariates) fills the remaining width. */
.perspective-picker-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 3px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 4px;
}

/* Column heading, shared by both columns of the picker. */
.perspective-col-heading {
    padding: 0 4px 2px;
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--fg), transparent 45%);
}

/* Column 1: primary — single-select vertical list (radio-like, not chip-styled). */
.perspective-primary-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 100px;
}

.perspective-primary-item {
    padding: 4px 8px;
    font-size: 0.82em;
    border-radius: 5px;
    cursor: pointer;
    color: var(--fg);
    white-space: nowrap;
    transition: background 0.12s;
}

.perspective-primary-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.perspective-primary-item.selected {
    background: color-mix(in srgb, var(--fg), transparent 82%);
    font-weight: 600;
}

/* Column 2: covariates — heading stacked above a flex-wrap multi-select chip row. */
.perspective-covariate-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perspective-covariate-chips {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 3px;
}

.perspective-covariate-item {
    padding: 4px 10px;
    text-align: left;
    font-size: 0.82em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    color: var(--fg);
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
}

.perspective-covariate-item:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Still used by the Versions tab's single-select branch list (.version-node.active). */
.perspective-covariate-item.active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* Multi-select state for the Aggregations picker's covariate chips — distinct from
   .active above, which is the Versions tab's single-select state on the same base class. */
.perspective-covariate-item.selected {
    background: color-mix(in srgb, var(--fg), transparent 70%);
    border-color: color-mix(in srgb, var(--fg), transparent 40%);
    font-weight: 600;
}

/* Versions tab: branch tree of lineage entries. Taller than the flat
           perspective list and dims in-progress (no permanent_id) entries. */
.version-tree {
    max-height: 220px;
}

.version-node.pending {
    opacity: 0.5;
    cursor: default;
    font-style: italic;
}

.version-node.pending:hover {
    background: none;
}

.analytic-lineage-container {
    align-self: center;
}

.lineage-history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
    width: var(--mac-btn-size);
    height: var(--mac-btn-size);
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: none;
    cursor: pointer;
    color: #5c4400;
    opacity: 1;
    transition: filter 0.15s;
    flex-shrink: 0;
    border: 1px solid var(--fg);
    border-radius: 50%;
}

.lineage-history-btn:hover {
    filter: brightness(1.08);
}

.lineage-history-btn.open {
    filter: brightness(0.92);
}

.lineage-history-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.lineage-history-btn svg {
    border: 1px solid var(--fg);
    border-radius: 50%;
}

.lineage-history-dropdown {
    position: fixed;
    z-index: 10050;
    background: var(--bg, white);
    border: 1px solid color-mix(in srgb, var(--fg, #000), transparent 82%);
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.18) 0px 4px 20px, rgba(0, 0, 0, 0.08) 0px 1px 4px;
    max-width: 400px;
    min-width: 160px;
    overflow: hidden;
    padding: 4px 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s;
    pointer-events: none;
}

.lineage-history-dropdown.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lineage-history-item {
    display: block;
    width: 100%;
    padding: 7px 14px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.85em;
    font-family: Outfit, Inter, sans-serif;
    color: var(--fg, rgb(51, 51, 51));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
    box-sizing: border-box;
}

.lineage-history-item:hover:not(:disabled) {
    background: color-mix(in srgb, var(--fg, #000), transparent 92%);
}

.lineage-history-item.active {
    background: color-mix(in srgb, var(--fg, #000), transparent 88%);
    font-weight: 500;
}

.lineage-history-item:disabled {
    opacity: 0.45;
    cursor: default;
    font-style: italic;
}

.main-content.dark::before {
    box-shadow: rgb(255, 255, 255) 0px 0px 1px inset;
}

body.night-mode {
    & .variant-side-panel {
        background-color: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.133);
        box-shadow: rgba(0, 0, 0, 0.333) 0px 0px 3px;
    }

    & .identifier-section {
        border: 1px solid rgba(255, 255, 255, 0.325);
        box-shadow: rgba(0, 0, 0, 0.96) 0px 0px 2px;
    }

    & .submit-btn {
        box-shadow: rgba(0, 0, 0, 0.267) 0px 0px 10px;

        &:hover {
            box-shadow: rgba(255, 255, 255, 0.867) 0px 0px 12px;
        }
    }
}

.storefront-container {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
    padding: 24px;
    height: calc(100% - 60px);
    overflow: hidden;
    box-sizing: border-box;
}

.storefront-catalog-col {
    overflow-y: auto;
    padding-right: 8px;
}

.storefront-catalog-title {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.storefront-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.storefront-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border-radius: 12px;
    transition: transform 0.2s, border-color 0.2s;
    min-height: 180px;
}

.storefront-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.storefront-card-title {
    margin-bottom: 6px;
}

.storefront-card-desc {
    font-size: 0.9em;
    line-height: 1.4;
}

.storefront-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.storefront-card-price {
    font-weight: bold;
    font-size: 16px;
}

.storefront-card-add-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.storefront-cart-col {
    overflow-y: auto;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}

.storefront-cart-header {
    margin-bottom: 20px;
}

.storefront-cart-title {
    font-size: 18px;
    font-weight: 600;
}

.storefront-cart-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.storefront-cart-empty {
    color: var(--fg, rgba(255, 255, 255, 0.4));
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

.storefront-cart-item {
    display: flex;
    align-items: start;
    padding: 12px 0px;
    gap: 1em;
}

.storefront-cart-item-info {
    flex-grow: 1;
    margin-right: 12px;
}

.storefront-cart-item-name {
    font-size: 13px;
    font-weight: 500;
}

.storefront-cart-item-price {
    font-size: 0.9em;
}

.storefront-qty-controls {
    display: grid;
    align-items: center;
    gap: 8px;
    height: 100%;
    grid-template-columns: 1fr 1fr 1fr;
}

.storefront-qty-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
}

.storefront-qty-btn:hover {
    background: var(--hover-bg);
}

.storefront-qty-val {
    font-size: 13px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

.storefront-cart-summary {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.storefront-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.storefront-total-label {
    font-size: 14px;
    font-weight: 500;
}

.storefront-total-val {
    font-weight: bold;
}

.storefront-checkout-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    background: rgb(16, 185, 129);
    color: white;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.storefront-checkout-btn:hover:not(:disabled) {
    background: rgb(5, 150, 105);
}

.storefront-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 480px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 12px 30px;
    backdrop-filter: blur(16px);
    color: var(--fg, #ffffff);
    font-family: inherit;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0px) scale(1);
}

.toast-notification.hide {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
}

.toast-notification.success {
    background: rgba(16, 185, 129, 0.12);
    border-width: 1px 1px 1px 4px;
    border-style: solid;
    border-color: rgba(16, 185, 129, 0.25) rgba(16, 185, 129, 0.25) rgba(16, 185, 129, 0.25) rgb(16, 185, 129);
    border-image: initial;
}

.toast-notification.success .toast-icon {
    color: rgb(16, 185, 129);
}

.toast-notification.canceled {
    background: rgba(245, 158, 11, 0.12);
    border-width: 1px 1px 1px 4px;
    border-style: solid;
    border-color: rgba(245, 158, 11, 0.25) rgba(245, 158, 11, 0.25) rgba(245, 158, 11, 0.25) rgb(245, 158, 11);
    border-image: initial;
}

.toast-notification.canceled .toast-icon {
    color: rgb(245, 158, 11);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.toast-icon .icon {
    width: 100%;
    height: 100%;
    stroke-width: 2.5;
}

.toast-message {
    flex-grow: 1;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    color: var(--fg, rgba(255, 255, 255, 0.5));
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    border-radius: 4px;
}

.toast-close:hover {
    color: var(--fg, #ffffff);
    background: rgba(255, 255, 255, 0.05);
}

.toast-close:active {
    transform: scale(0.9);
}

.tab-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color, #ccc);
    margin-bottom: 10px;
}

.tab-btn {
    padding: 3px 16px;
    cursor: pointer;
    border-width: medium medium 2px;
    border-style: none none solid;
    border-color: currentcolor currentcolor transparent;
    border-image: initial;
    background: transparent;
}

.tab-btn.active {
    border-bottom: 2px solid var(--header-bg);
}

.tab-content-fields,
.tab-content-deep-dive {
    display: none;
}

.tab-content-fields.active,
.tab-content-deep-dive.active {
    display: block;
}

.process-analytic-card {
    background: rgba(30, 30, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 8px 32px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.process-analytic-card .analytic-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.process-analytic-card .analytic-title {
    margin: 0px;
    font-size: 1.4em;
    font-family: Outfit, sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, rgb(0, 198, 255), rgb(0, 114, 255)) text;
    -webkit-text-fill-color: transparent;
}

.process-analytic-card .analytic-description {
    margin: 0px;
    color: rgb(170, 170, 170);
    font-size: 0.95em;
    line-height: 1.4;
    font-family: Inter, sans-serif;
}

.process-analytic-card .analytic-content-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.process-analytic-card .analytic-media-col {
    flex: 1 1 0%;
    min-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: rgba(0, 0, 0, 0.3) 0px 6px 20px;
    background: rgb(12, 12, 15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.process-analytic-card .analytic-media-col img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.process-analytic-card .analytic-info-col {
    flex: 1.2 1 0%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.process-analytic-card .analytic-subtitle {
    margin: 0px 0px 12px;
    font-size: 1.1em;
    color: rgb(255, 255, 255);
    font-family: Outfit, sans-serif;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.process-analytic-card .analytic-scroll-area {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 8px;
}

.anchor-fact-item {
    margin-bottom: 16px;
}

.anchor-fact-desc {
    color: rgb(224, 224, 224);
    font-size: 0.95em;
    line-height: 1.5;
    font-family: Outfit, sans-serif;
}

.anchor-fact-quote {
    color: rgb(136, 136, 136);
    font-size: 0.85em;
    font-style: italic;
    margin-top: 4px;
}

.visual-analytic-card {}

.visual-analytic-card .analytic-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.visual-view-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: Inter, sans-serif;
}

.visual-gallery-item {
    width: 100%;
    margin-bottom: 16px;
}

.visual-zoom-view {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.visual-zoom-view img {
    position: absolute;
    max-width: none;
}

.visual-full-view {
    display: none;
    position: relative;
    width: 100%;
    border-radius: 8px;
}

.visual-full-view img {
    width: 100%;
    display: block;
}

.visual-bb-overlay {
    position: absolute;
    border: 3px solid rgb(255, 81, 47);
    box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 0px 9999px;
    pointer-events: none;
}

.visual-observations-list {
    color: rgb(224, 224, 224);
    font-family: Inter, sans-serif;
    padding-left: 20px;
    margin: 0px;
}

.visual-observations-list li {
    margin-bottom: 8px;
}

/* Claim full width even when the host container is a shrink-to-fit / centering
           flex context (e.g. the report's .dynamic-embed-container.loaded), which
           would otherwise collapse the pages column. */
.document-viewer-mount-point {
    width: 100%;
}

.document-viewer-card {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* The pages render as one continuous, scrollable document. The vertical
           scroll happens on the analytic's own .analytic-content (height:100%;
           overflow:auto) once the switcher is height-bounded in JS (fitHeight), so
           the pages column itself is plain block content. */
.document-viewer-pages {
    min-width: 0;
    padding-right: 4px;
}

/* Header row (page selector + fullscreen) inside the shared side panel.
           Right padding leaves room for the panel's absolute close (×) button. */
.document-viewer-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding-right: 24px;
    margin-bottom: 12px;
}

.document-viewer-page-select {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--hover-bg);
    color: var(--fg);
    font-family: Inter, sans-serif;
    font-size: 0.9em;
    cursor: pointer;
}

.document-viewer-fullscreen-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--hover-bg);
    color: var(--fg);
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.document-viewer-fullscreen-btn:hover {
    background: var(--hover-bg);
}

/* The selector + pinned doc-level items stay put; only per-page items scroll. */
.document-viewer-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

/* Fullscreen: float the whole analytic (PDF + side panel) over the app at
           ~99vw x 99vh. Applied to the outer analytic wrapper so the shared
           variant-side-panel travels with it; JS (fitHeight) sizes the switcher. */
.analytic-content-wrapper.document-viewer-fullscreen {
    position: fixed;
    /* inset:0 fills the real viewport via the fixed containing block — no
               vh/vw (unreliable inside an auto-height iframe) and no JS sizing. */
    inset: 0;
    z-index: 99999;
    background: var(--bg);
    border-radius: var(--window-radius, 10px);
    corner-shape: squircle;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
}

.analytic-content-wrapper.document-viewer-fullscreen>.analytic-content-switcher-wrapper {
    flex: 1 1 auto;
    min-height: 0;
}

.document-viewer-page {
    width: 100%;
    margin-bottom: 24px;
}

.document-viewer-page-label {
    color: var(--fg-fade);
    font-family: Inter, sans-serif;
    font-size: 0.8em;
    margin-bottom: 6px;
}

.document-viewer-page>img {
    width: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 2px 8px;
}

/* Per-page (and document-level) extracted items, rendered under each page. */
.document-viewer-page-items {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-viewer-doc-items {
    margin: 0 0 24px;
}

.document-viewer-annotation {
    color: var(--fg);
    font-family: Inter, sans-serif;
    border-left: 2px solid var(--border-color);
    padding-left: 12px;
}

.document-viewer-annotation[data-kind="anchor"] {
    border-left-color: rgba(120, 170, 255, 0.55);
}

.document-viewer-annotation-title {
    margin: 0px 0px 8px;
    font-size: 1em;
}

.document-viewer-annotation-desc {
    margin: 0 0 8px;
    color: var(--fg-fade-active);
}

/* Collapsible extracted-data / process blocks. */
.document-viewer-expandable {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-left-width: 2px;
    border-radius: 6px;
    padding: 0;
}

.document-viewer-expandable[data-kind="table"] {
    border-left-color: rgba(120, 220, 170, 0.55);
}

.document-viewer-expandable[data-kind="process"] {
    border-left-color: rgba(230, 180, 120, 0.55);
}

.document-viewer-annotation-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-family: Inter, sans-serif;
}

.document-viewer-annotation-summary::-webkit-details-marker {
    display: none;
}

.document-viewer-annotation-summary::before {
    content: "▸";
    color: var(--fg-fade);
    font-size: 0.8em;
    transition: transform 0.15s ease;
}

.document-viewer-expandable[open]>.document-viewer-annotation-summary::before {
    transform: rotate(90deg);
}

.document-viewer-annotation-tag {
    text-transform: uppercase;
    font-size: 0.65em;
    letter-spacing: 0.06em;
    color: var(--fg-fade);
}

.document-viewer-annotation-summary .document-viewer-annotation-title {
    margin: 0;
    font-weight: 600;
}

.document-viewer-annotation-body {
    padding: 0 12px 12px;
    overflow-x: auto;
}

.document-viewer-process-image img {
    max-width: 320px;
    width: 100%;
    border-radius: 6px;
    margin-bottom: 8px;
}

.document-viewer-table-preview {
    overflow-x: auto;
}

/* Visuals inside the viewer have no zoom/full toggle, so force the full view
           (with its bounding-box overlay) visible. */
.document-viewer-annotation-body .visual-full-view {
    display: block;
    margin-bottom: 8px;
}

.document-viewer-annotation-body .visual-observations-list {
    margin-top: 8px;
}

.anchor-analytic-container {
    margin: 24px 0px;
    border-radius: 8px;
}

.anchor-analytic-container h4 {
    margin: 0px 0px 16px;
}

.anchor-analytic-container p {
    font-size: 0.95em;
    margin-bottom: 20px;
}

.anchor-image-wrapper {
    margin: 10px;
    text-align: center;
    box-shadow: 0 0 2px var(--scroll-shadow-bg);
    border-radius: var(--window-radius);
    overflow: clip;
    corner-shape: squircle;
    position: relative;

    &::before {
        content: " ";
        inset: 0px;
        position: absolute;
        box-shadow: white 0px 0px 1px inset;
        z-index: 2;
    }
}

.anchor-image,
.process-image {
    max-width: 100%;
    max-height: 400px;
    cursor: zoom-in;
    transition: transform 0.3s;
    border-radius: var(--window-radius);
    overflow: clip;
    corner-shape: squircle;
}

.process-image {
    object-fit: contain;
}

.process-image:hover {
    transform: scale(1.03);
}

.anchor-fact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.anchor-fact-bullet {
    font-weight: bold;
    flex-shrink: 0;
}

.anchor-fact-text {
    font-size: 0.9em;
    line-height: 1.5;
}

.process-step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    transition: transform 0.2s;
}

.process-step-num {
    background: linear-gradient(135deg, rgb(255, 81, 47), rgb(221, 36, 118));
    color: rgb(255, 255, 255);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0;
    box-shadow: rgba(221, 36, 118, 0.4) 0px 4px 10px;
}

.process-step-text {
    color: rgb(224, 224, 224);
    font-size: 0.95em;
    line-height: 1.5;
    font-family: Outfit, sans-serif;
}

.process-analytic-card {
    background: rgba(30, 30, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 8px 32px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.process-analytic-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.process-analytic-header h3 {
    margin: 0px;
    font-size: 1.4em;
    font-family: Outfit, sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, rgb(0, 198, 255), rgb(0, 114, 255)) text;
    -webkit-text-fill-color: transparent;
}

.process-analytic-header p {
    margin: 0px;
    color: rgb(170, 170, 170);
    font-size: 0.95em;
    line-height: 1.4;
    font-family: Inter, sans-serif;
}

.process-analytic-body {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.process-analytic-image-container {
    flex: 1 1 0%;
    min-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: rgba(0, 0, 0, 0.3) 0px 6px 20px;
    background: rgb(12, 12, 15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.process-analytic-image-caption {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    color: rgb(255, 255, 255);
    font-size: 0.85em;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: Inter, sans-serif;
}

.process-analytic-steps {
    flex: 1.2 1 0%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.process-analytic-steps h4 {
    margin: 0px 0px 12px;
    font-size: 1.1em;
    color: rgb(255, 255, 255);
    font-family: Outfit, sans-serif;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.process-steps-scroll {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 8px;
}

#tap-fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#tap-fullscreen-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.process-wrapper {
    margin: 20px 0px;
    text-align: center;
}

.process-wrapper h4 {
    margin-bottom: 10px;
    color: var(--fg);
}

.process-wrapper .caption {
    font-size: 0.9em;
    color: var(--fg);
    margin-top: 8px;
}

.clarification-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.multistage-clarification {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    padding: 8px;
}

.clarification-container:hover {}

.clarification-question {}

.clarification-question h4 {}

.clarification-tabs {}

.clarification-tab-btn {}

.clarification-tab-btn::before {}

.clarification-tab-btn:hover {}

.clarification-tab-btn:hover::before {}

.clarification-tab-btn.active {}

.clarification-tab-pane {}

@keyframes fade-slide-up {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.methodology-wrapper {}

.methodology-wrapper::-webkit-scrollbar {}

.methodology-wrapper::-webkit-scrollbar-thumb {}

.amend-footer {}

.amend-textarea {}

.amend-textarea:focus {}

.amend-textarea::placeholder {}

.amend-actions {}

.amend-btn,
.select-btn {}

.amend-btn {}

.amend-btn:hover {}

.amend-btn:active {}

.select-btn {}

.select-btn:hover {}

.select-btn:active {}

.clarification-container.resolved {}

.resolved-banner {}

@keyframes pulse-green {}

.analytic-content-wrapper {
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
}

/* A figure that wants more horizontal space than the default report column
   (a table variation, or any figure shown in the "Show as side panel" split
   view - see data-width-hint writers in common.js). 100cqi reads off
   .layout-wrapper's container-type:inline-size, so it breaks out of both
   .layout-body's 650px prose cap and the floated .highlights box - clear
   is needed here (not on the nested .analytic-content) because this element
   is the one that establishes its own block-formatting context via
   display:grid.
   Scoped to descend from .layout-body deliberately: that's the only place a
   650px cap actually exists to escape. .analytic-content-wrapper is reused
   as bare markup in other embeddings too (e.g. annotation panels, which wrap
   it directly with no .layout-wrapper/.layout-body in between) - in those
   contexts there is no container-query ancestor for 100cqi to resolve
   against at all, so an unscoped rule would fall back to sizing against the
   viewport instead of the real local container. Requiring .layout-body makes
   the rule a no-op there, which is correct: there's no cap to escape either. */
.layout-body .analytic-content-wrapper[data-width-hint="wide"] {
    clear: both;
    width: 100cqi;
    max-width: 100cqi;
}

.lazy-analytic-placeholder {
    height: 100%;
}

.product-comparison-cell[data-category="Description"] .source-name {
    padding: 0px 5px;
    text-indent: 0px;
}

.fragment-tabs-header {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--ghost);

    & .ui-button {
        color: var(--fg);
        background-color: var(--bg);
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
        margin: 5px 3px;
        padding: 1px 10px;
        border-radius: var(--pill-radius);
        corner-shape: squircle;

        &.active {
            color: var(--header-fg);
            background-color: var(--header-bg);
        }
    }
}

.field-values-value-wrapper {
    padding: 10px 5px;

    & ul {
        margin: 0px;
        padding: 0px;
        gap: 10px;
    }

    &.has-eval {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: flex-start;
    }

    & .field-values-eval-base {
        flex: 0 0 auto;
    }

    & .field-values-eval-text {
        flex: 1 1 0%;
        min-width: 200px;
    }
}

.quantity-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: fit-content;
}

.quantity-badge-item {
    display: flex;
    flex-direction: column;
    width: 4em;
    position: relative;
}

.quantity-badge-bar-track {
    width: 100%;
    height: 200px;
    border-radius: 20px;
    margin-bottom: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    max-width: 5em;
    margin-left: auto;
    margin-right: auto;
    background-color: rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.3) 5px 5px 5px;
    cursor: pointer;
    corner-shape: squircle;
}

.quantity-badge-bar-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: height 0.3s;
    box-shadow: rgba(0, 0, 0, 0.333) 0px 0px 1px inset;
    justify-content: end;
    border-radius: inherit;
    corner-shape: squircle;
}

.quantity-badge-bar-upper-wrapper {
    height: 100%;
    position: relative;
}

.quantity-badge-bar-upper {
    background-color: var(--item-color, #666);
    width: 100%;
    height: var(--item-bar-percent, 0%);
    position: absolute;
    bottom: 0px;
}

.quantity-badge-bar-lower {
    flex-shrink: 0;
    background-color: var(--item-color, #666);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-badge-label {
    flex-grow: 1;
    font-weight: 700;
    white-space: normal;
    padding: 0.2em;
    text-align: center;
    width: 100%;
}

.quantity-badge-notes {
    flex-grow: 1;
    margin-bottom: 4px;
    white-space: normal;
    border-radius: 5px;
    padding: 0.2em;
    text-align: center;
    width: 100%;
}

.quantity-badge-value {
    background-color: rgb(255, 255, 255);
    color: rgb(51, 51, 51);
    font-weight: 700;
    font-size: 1.1em;
    border-radius: 20px;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: var(--shadow-shade) 1px 1px 1px;
    z-index: 2;
    corner-shape: squircle;
}

.simple-badge-container {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 12px;
    padding: 5px;
    text-align: center;
    height: min-content;
}

/* Shared colored-badge card: a squircle pill with a darkened header strip over a
   large value, glossed via .custom-color-pill's ::before. Reused by Simple Badges
   and KPI Card so the two families stay visually identical. */
.simple-badge-item.custom-color-pill,
.kpi-card-item.custom-color-pill {
    background: var(--custom-bg-color);
    border-radius: 12px;
    corner-shape: squircle;
    cursor: pointer;
    color: white;
    font-weight: bold;
    text-shadow: rgba(0, 0, 0, 0.55) 0px 1px 4px;
    box-shadow: color-mix(in srgb, black 35%, transparent) 3px 4px 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

/* Flow badges left-to-right, wrapping onto new rows; a fixed height keeps every
   badge the same size regardless of label/value length. */
.simple-badge-item.custom-color-pill {
    flex: 0 1 160px;
    min-width: 128px;
    max-width: 220px;
    height: 118px;
}

.simple-badge-item.custom-color-pill.has-image {
    flex-direction: row;
}

.simple-badge-image-col {
    flex: 0 0 30%;
    align-self: stretch;
}

.simple-badge-image-col img {
    display: block;
}

/* The value fills the card below the header so every badge is the same height. */
.simple-badge-content,
.kpi-card-content {
    flex: 1 1 70%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.simple-badge-identifiers,
.kpi-card-label {
    font-size: 0.9em;
    background-color: rgba(0, 0, 0, 0.16);
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.192);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.simple-badge-identifier+.simple-badge-identifier {
    margin-top: 4px;
}

.simple-badge-value,
.kpi-card-value {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7em;
    font-weight: 700;
    line-height: 1;
    padding: 6px 14px;
    min-height: 0;
}

.simple-badge-value.long-text {
    font-size: 1.05em;
    font-weight: 500;
    word-break: break-word;
}

.kpi-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 5px;
}

/* KPI Card is the reductive single-headline badge, so give it a larger footprint
   and a bigger number than the multi-badge Simple Badges grid. */
.kpi-card-item.custom-color-pill {
    flex: 0 1 240px;
    min-width: 200px;
    max-width: 340px;
    min-height: 150px;
}

/* KPI Card headers wrap (the label is the whole story), unlike the fixed-height
   Simple Badge identifier strip which stays single-line + ellipsis. */
.kpi-card-label {
    font-weight: 600;
    text-align: center;
    white-space: normal;
    text-overflow: clip;
}

.kpi-card-value {
    font-size: 3.4em;
    white-space: nowrap;
}

.clipped-content-container .custom-color-pill {
    margin: 0px 5px 5px 0px;
}

.welcome {
    grid-template-rows: min-content 1fr;
}

.welcome-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    color: var(--fg);
}

.welcome-empty-state-icon {
    width: 48px;
    height: 48px;
    /* color: var(--fg, rgba(255, 255, 255, 0.5)); */
}

.welcome-empty-state-icon svg {
    width: 100%;
    height: 100%;
}

.welcome-empty-state-title {
    font-size: 1.2em;
    font-weight: 700;
    /* color: var(--fg, #eee); */
}

.welcome-empty-state-subtitle {
    font-size: 0.95em;
    font-weight: 400;
    /* color: var(--fg, rgba(255, 255, 255, 0.5)); */
}

.multistage-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
    min-width: 0;
    /* gap: 20px; */
    /* padding: 20px 24px; */
    /* max-width: 900px; */
    margin: 0px;
    /* background-color: var(--extreme-bg); */
    /* padding: 1em 40px; */
    border-radius: 10px;
    corner-shape: squircle;
    /* border: 5px solid var(--header-bg); */
    /* box-shadow: 0 0 5px var(--shadow-shade), 0 0 20px #ffffff inset; */
}

.multistage-top-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 8px;
    width: 100%;
}

.multistage-effort-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 1px solid var(--fg-fade);
}

.multistage-effort-label {
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fg-fade);
    white-space: nowrap;
}

.multistage-effort-dropdown {
    position: relative;
    min-width: 150px;
    max-width: 260px;
    flex: 0 1 auto;
}

.multistage-effort-trigger {
    width: fit-content;
    padding: 0;
    border-radius: 0;
    border: none;
    background: none;
    color: var(--fg);
    font-size: 0.9em;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    box-shadow: none;
}

.multistage-effort-trigger:after {
    content: "▼";
    font-size: 0.8em;
    margin-left: 8px;
}

.multistage-effort-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: var(--extreme-bg);
    border: 1px solid var(--fg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.multistage-effort-menu.open {
    display: flex;
}

.multistage-effort-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--fg);
    border-bottom: 1px solid var(--fg);
    transition: background 0.2s;
}

.multistage-effort-option:last-child {
    border-bottom: none;
}

.multistage-effort-option:hover {
    background: var(--nav-bg);
    color: white;
}

.multistage-effort-content {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: baseline;
}

.multistage-effort-name {
    font-weight: 600;
}

.multistage-stages-container {
    --multistage-gap: 16px;
    /* Vertical stack of funnel rows; each row is a .multistage-stage-row. */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 0;
    row-gap: 32px;
    /* vertical room between rows for the inter-row braces */
    column-gap: var(--multistage-gap);
    width: 100%;
    filter: drop-shadow(1px 1px 3px var(--scroll-shadow-bg));
    filter: drop-shadow(var(--box-shadow));
    /* fill: green; */
    /* stroke: red; */
    /* stroke: yellow !important; */
}

/* One funnel layer: cards laid out left→right, never wrapping. */
.multistage-stage-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    /* equal card heights within a row */
    column-gap: var(--multistage-gap);
    max-width: 100%;
}

.multistage-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    /* color: var(--fg, #94a3b8); */
    font-size: 1.5em;
    flex-shrink: 0;
    color: var(--fg);

}

.multistage-connection-line {
    stroke: var(--fg-fade);
    stroke-width: 1px;
}

.multistage-connection-arrowhead {
    fill: var(--fg);
}

.multistage-stage-card {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: max(30%, 300px);
    position: relative;
    z-index: 1;
    grid-template-rows: min-content min-content 1fr;
    /* display: grid; */
    border-radius: 20px;
    padding: 0;
    transition: box-shadow 0.2s;
    background-color: var(--extreme-bg);
    color: var(--fg);
    /* border: 1px solid color-mix(in srgb, var(--fg), transparent 85%); */
    /* border: 1px solid var(--custom-bg-color); */
    --custom-bg-color: var();
    corner-shape: squircle;
    /* color: #eee; */
}

.multistage-stage-info {
    align-items: flex-start;
    margin-bottom: 0;
    text-align: left;
    padding: 8px 10px 6px;
}

.multistage-options-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
    width: 100%;
    display: none;
}

.multistage-stage-name {
    font-size: .9em;
    font-weight: 700;
    min-width: 100%;
    display: block;
}

.multistage-info-intent {
    font-size: .85em;
    color: var(--fg);
    padding: 4px 0 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.multistage-option-btn {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--fg-fade);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
    cursor: pointer;
    text-align: left;
    transition: 0.15s;
    position: relative;
    overflow: hidden;
    color: var(--fg);
    border-radius: 10px;
    corner-shape: squircle;
    min-height: 3em;
    width: 100%;
    font-size: .8em;
}

.multistage-option-btn:hover {
    background: rgba(255, 255, 255, 0.07);
}

.multistage-option-btn.active {
    /* background: var(--header-bg); */
    color: white;
    border-color: #ffffff11;
    border-radius: 10px;
}

.multistage-option-btn.has-stripe {
    /* padding-left: 18px; */
}

.multistage-option-text {
    line-height: 1.4;
    z-index: 1;
}

.multistage-stripe-container {
    position: absolute;
    left: 0px;
    top: 0px;
    bottom: 0px;
    width: 0px;
    display: flex;
    flex-direction: column;
    transform: translate(0px, 0px);
    box-shadow: 0 0 1px var(--bg);
}

.multistage-checklist-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: start;
    padding: 0 12px;
}

.multistage-checklist-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}



.multistage-checklist-container {
    /* --fg: #aaa; */


    .multistage-rule-group {
        /* background: #ffffff11; */
        /* box-shadow: 0 0 2px #00000055; */
        /* padding: 8px; */
    }
}

.multistage-rule-group {
    display: grid;
    /* grid-template-columns: auto 1fr; */
    row-gap: 0;
    column-gap: 8px;
    margin-bottom: 8px;
    border-radius: 10px;
    corner-shape: squircle;
    padding: 0;
    grid-template-rows: min-content 1fr;
    width: auto;
}

/* Per-dataset Sources: one cluster wraps a dataset's subgroups under a label. */
.multistage-dataset-cluster {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 6px 8px;
    border-radius: 12px;
    corner-shape: squircle;
    /* border: 1px solid #ffffff1a; */
    /* background: #ffffff08; */
}

/* Master/detail dataset switcher: a scrollable rail of dataset names next
           to a detail pane showing only the active dataset's subgroups. It's
           itself a flex item of .multistage-checklist-container (a row), so
           it needs flex-grow to actually fill the available width — without
           it, the default flex-basis:auto/flex-grow:0 makes it shrink-to-fit
           its own content and never re-expand when more space frees up. */
.multistage-dataset-master-detail {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
}

.multistage-dataset-rail {
    flex: 0 0 140px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
    border-right: 1px solid #ffffff1a;
}

.multistage-dataset-rail-item {
    padding: 7px 10px;
    border-radius: 8px;
    corner-shape: squircle;
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.7;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

/* Subtle set-off between the "All" union tab and the real dataset tabs. */
.multistage-dataset-rail-divider {
    flex: 0 0 auto;
    height: 1px;
    margin: 4px 2px;
    background: var(--ghost);
}

.multistage-dataset-rail-item:hover {
    background: #ffffff0d;
    opacity: 0.9;
}

.multistage-dataset-rail-item.active {
    background: var(--header-bg);
    color: white;
    opacity: 1;
}

.multistage-dataset-detail {
    flex: 1;
    min-width: 0;
}

/* When a dataset-cluster pane hosts packChecklistGroups() output
           (master/detail view), lay its .multistage-checklist-col children
           out in a row instead of the default column stacking. The pane is
           narrower than the full-width checklist container (it shares space
           with the dataset rail), so columns wrap onto additional rows
           instead of overflowing or being squeezed unreadably thin. */
.multistage-dataset-cluster.is-packed {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: start;
}

.multistage-dataset-cluster.is-packed>.multistage-checklist-col {
    flex: 1 1 190px;
    min-width: 190px;
}

/* Rule groups inside a cluster shouldn't add their own bottom margin (the
           cluster's gap handles spacing). */
.multistage-dataset-cluster .multistage-rule-group {
    margin-bottom: 0;
}

.multistage-rule-choices-container {
    display: grid;
    grid-template-columns: min-content 1fr;
    /* grid-column: 1 / -1; */
    row-gap: 8px;
    /* display: flex; */
    cursor: pointer;
    padding: 0 5px 0;
    max-height: var(--rule-choices-max-h);
    overflow: auto;
    overscroll-behavior-y: auto;
    /* padding: 5px; */
    /* display: flex; */
    /* column-gap: 4px; */
}

.multistage-rule-title {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
    font-size: 0.8em;
    /* font-weight: 500; */
    /* color: var(--fg); */
    text-transform: uppercase;
    /* letter-spacing: 0.05em; */
    /* margin-bottom: 4px; */
    /* text-shadow: 0 0 2px black; */
    /* border-bottom: 1px solid #ffffff55; */
    background: var(--ghost);
    padding: 3px 5px 3px;
    height: min-content;
    margin: 1em 0 0;
    border-radius: 5px;
    box-shadow: var(--box-shadow);
}

.multistage-rule-choice {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    align-items: center;
    font-size: 0.8em;
    /* color: #eee; */
    transition: opacity 0.2s;
    /* text-shadow: 0 0 2px black; */
    font-weight: 300;
    /* color: #ddd; */
    color: var(--fg);
    /* display: flex; */
    grid-template-columns: min-content 1fr;
    column-gap: 4px;
}

.multistage-rule-choice-name {
    white-space: nowrap;
    /* overflow: hidden; */
    text-overflow: ellipsis;
    max-width: 45ch;
    display: block;
}

.multistage-rule-choice.inactive {
    /* opacity: 0.9; */
}

.multistage-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: .9em;
    height: .9em;
    border-radius: 50%;
    border: 1px solid color-mix(var(--fg), var(--bg));
    transition: 0.2s;
    background: transparent;
    flex-shrink: 0;
    fill-color: black;
    /* corner-shape: squircle; */
    /* stroke: red; */
    /* fill: green; */
    overflow: hidden;
}

.multistage-rule-choice.active .multistage-check-icon {
    /* background: white; */
    border-color: var(--fg);
}

.multistage-check-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--bg);
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transform: scale(0.5);
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--fg);
}

.multistage-rule-choice.active .multistage-check-icon svg,
.multistage-check-icon.active svg {
    opacity: 1;
    transform: scale(1);
}

/* Third ("partial") value for the "All" union tab: the checkmark stays
           hidden (the row isn't .active) and an indeterminate dash is shown for a
           choice selected in some — but not all — datasets. */
.multistage-rule-choice.partial .multistage-check-icon {
    position: relative;
    border-color: var(--fg);
}

.multistage-rule-choice.partial .multistage-check-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 2px;
    border-radius: 1px;
    background: var(--fg);
    transform: translate(-50%, -50%);
}

.value-bool-icon {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: 0;
}

.value-bool-icon.true {
    /* background: color-mix(in srgb, var(--bool-true-color) 14%, transparent); */
}

.value-bool-icon.false {
    /* background: color-mix(in srgb, var(--bool-false-color) 12%, transparent); */
}

.value-bool-icon svg {
    width: 1.2em;
    height: 1.2em;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.value-bool-icon.true svg {
    stroke: var(--bool-true-color);
}

.value-bool-icon.false svg {
    stroke: var(--bool-false-color);
}

.multistage-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.multistage-approve-header {
    display: flex;
    padding: 0 0 14px 0;
}

.multistage-approve-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.multistage-approve-caption {
    font-size: 0.85em;
    color: var(--fg-fade);
}

.multistage-approve-controls {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--fg-fade);
    border-radius: 8px;
    corner-shape: squircle;
    background: var(--extreme-bg);
    box-shadow: var(--box-shadow);
}

/* Corners rounded per-segment (not via overflow:hidden on the cluster) so the
   effort dropdown's absolutely-positioned menu isn't clipped by its parent. */
.multistage-approve-controls> :first-child {
    border-radius: 8px 0 0 8px;
}

.multistage-approve-controls> :last-child {
    border-radius: 0 8px 8px 0;
}

.multistage-approve-controls> :only-child {
    border-radius: 8px;
}

.chat-prompt,
.text-portion {
    padding: 0px 5px;
    font-size: .95em;
    /* background: #ffffff11; */
    /* border-radius: 10px; */
    /* corner-shape: squircle; */
    /* width: fit-content; */
    text-align: left;
}

.chat-prompt {
    max-width: 80%;

}

.has-debug-tooltip {
    position: relative;
    overflow: visible !important;
}

.debug-intent-hover-box {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(30, 30, 30);
    color: rgb(166, 226, 46);
    padding: 8px;
    border: 1px solid rgb(68, 68, 68);
    border-radius: 4px;
    z-index: 1000;
    white-space: pre-wrap;
    text-align: left;
    font-size: 11px;
    min-width: 250px;
    box-shadow: rgba(0, 0, 0, 0.5) 0px 4px 12px;
    pointer-events: none;
}

.has-debug-tooltip:hover .debug-intent-hover-box {
    display: block;
}

.chat-reply-content:not(:first-child) .live-api-transcript {
    margin-top: 1em;
}

.multistage-check-icon svg polyline {
    stroke: var(--bg);
}

.multistage-segmented-btn.active:hover {
    background: var(--header-bg)
}

.multistage-rule-choice {
    padding: 0 4px 0 0
}

.multistage-rule-choice:hover {
    background: #ffffff22;
    border-radius: 10px;
    corner-shape: squircle;
}

/* ── Synthesis Visual Renderer ────────────────────────────────────── */

/* Horizontal pipeline row: chips + op-node + output chip */
.synth-visual-block {
    padding: 10px 4px 4px;
}

.synth-pipeline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.synth-pipeline-inputs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    /* box-shadow: var(--box-shadow); */
}

.synth-pipeline-chip {
    background: var(--ghost);
    /* border: 1px solid var(--fg-fade); */
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--fg);
    letter-spacing: 0.01em;
    box-shadow: var(--box-shadow);
    /* corner-shape: squircle; */
    text-shadow: 0 0 3px var(--bg);
}

.synth-pipeline-chip.output {
    border-color: rgba(255, 255, 255, 0.45);
    /* background: rgba(255, 255, 255, 0.12); */
    /* color: rgba(255, 255, 255, 0.95); */
}

.synth-pipeline-arrow {
    display: flex;
    align-items: center;
    opacity: 0.45;
    flex-shrink: 0;
    color: var(--fg, #eee);
}

.synth-pipeline-arrow svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transform: rotate(90deg);
}

.synth-pipeline-op-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 12px;
    background: var(--ghost);
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: default;
    transition: background 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--box-shadow);
}

.synth-pipeline-op-node:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.55);
}

.synth-pipeline-op-node svg {
    width: 22px;
    height: 22px;
    /* color: var(--fg); */
}

.synth-pipeline-op-label {
    font-size: 10px;
    font-weight: 600;
    /* color: var(--fg); */
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* Vertical separator between ShapingPipeline and IterationCard */
.synth-section-divider {
    height: 1px;
    background: var(--ghost);
    margin: 10px 0;
}

/* Nested iteration card */
.synth-iteration-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 4px;
}

.synth-iteration-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    background: var(--ghost);
    /* border-bottom: 1px solid var(--ghost); */
    font-weight: 600;
    font-size: 12.5px;
    /* color: rgba(255, 255, 255, 0.95); */
    border-radius: 20px;
    corner-shape: squircle;
    /* width: 100%; */
    box-shadow: var(--box-shadow);
}

.synth-iteration-header svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
}

.synth-iteration-body {
    padding: 10px 14px 10px 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    margin-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.synth-iteration-op-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fg, rgba(255, 255, 255, 0.55));
}

.synth-iteration-op-row svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    flex-shrink: 0;
}

.synth-visual-empty {
    display: none;
}

/* Multi-Select Styles */
.multi-select-checkbox {
    cursor: pointer;
}

.grid-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border-radius: 4px;
    border: 1.5px solid var(--fg-secondary, rgba(255, 255, 255, 0.35));
    background-color: var(--bg);
    box-shadow: rgba(0, 0, 0, 0.267) 0px 0px 4px;
    transition: background-color 0.15s, border-color 0.15s;
}

.grid-checkbox:hover {
    border-color: var(--fg);
}

.grid-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.grid-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.list-checkbox {
    width: 16px;
    height: 16px;
}

.detail-list-item.selected-item {
    background-color: var(--hover-bg) !important;
    border-left: 4px solid var(--primary-color) !important;
}

.display-switch.selected-item {
    border: 2px solid var(--primary-color) !important;
    background-color: var(--hover-bg) !important;
}

.bulk-actions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--bg-card, var(--bg));
    border: 1px solid var(--border-color, #ccc);
    border-radius: 50px;
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    min-width: 450px;
}

.bulk-actions-count {
    font-weight: 600;
    font-size: 14px;
}

.bulk-actions-buttons {
    display: flex;
    gap: 8px;
}

.bulk-action-btn,
.bulk-action-cancel {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bulk-action-btn svg {
    width: 16px;
    height: 16px;
}

body {
    /* font-family: "Inter"; */
}

.chat-prompt-wrapper {
    /* background: #ffffff11; */
    /* border-radius: 10px; */
    corner-shape: squircle;
    /* justi: space-between; */
    display: flex;
    flex-direction: row-reverse;
}

/* Spotlight layout: a full-width graph pane with the focused node's
           detail laid out directly underneath. The block grows with its content
           and the page scrolls — nothing is clipped, no internal scroll regions. */
.multistage-split-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    position: relative;
    isolation: isolate;
    min-height: 400px;
    border-radius: var(--window-radius);
    corner-shape: squircle;
    padding-right: 1em;
}

.multistage-graph-pane {
    padding: 3em 0;
}

/* ── Spotlight highlight ──────────────────────────────────────────────
           The focused node lifts and gains a themed ring. The other nodes keep
           their normal appearance (no dimming). */
.multistage-stages-container .multistage-stage-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.multistage-stage-card.spotlight-focus {
    box-shadow: 0 0 20px var(--extreme-bg);
    z-index: 2;
}

/* ── Detail panel (directly underneath the graph) ─────────────────────
           Hidden until a node is focused; then it simply flows below the graph
           in normal document flow, so tall content extends the page rather than
           clipping the graph. */
.multistage-detail-drawer {
    display: none;
    /* border-top: 1px solid #88888833; */
    /* border-radius: 8px; */
    /* box-shadow: var(--box-shadow); */
}

.multistage-detail-drawer.open {
    display: block;
}

.multistage-detail-drawer-header {
    display: flex;
    justify-content: flex-end;
    padding: 4px 4px 0;
}

.multistage-detail-drawer-close {
    background: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
}

.multistage-detail-drawer-close:hover {
    background: #00000033;
    color: var(--fg);
}

.multistage-detail-pane-inner {
    /* background-color: var(--extreme-bg); */
    /* padding: 8px; */
    border-radius: inherit;
    corner-shape: squircle;
}

.multistage-detail-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
    color: white;
    background-color: var(--custom-bg-color);
    padding: 5px 10px;
    border-radius: 10px;
    corner-shape: squircle;
    box-shadow: var(--box-shadow);
}

.multistage-detail-desc {
    margin-bottom: 16px;
    font-size: 0.9em;
    color: var(--fg);
}

/* Merged stages (see STAGE_MERGE_TARGET in chat.js) sit side by side in
           one details pane instead of stacking. */
.multistage-detail-columns {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;
}

.multistage-detail-column {
    flex: 0 1 auto;
    min-width: 0;
}

/* When a stage has only one column (not a merged stage), stretch it to fill
   the full available panel width so the checklist packer sees the real
   container width and can choose multiple columns when height warrants it.
   Merged stages (multiple siblings) keep the content-determined flex: 0 1 auto. */
.multistage-detail-columns>.multistage-detail-column:only-child {
    flex-grow: 1;
}

.multistage-detail-column-merged {
    border-left: 1px solid #88888833;
    padding-left: 1em;
    margin-left: 20px;
}

.multistage-detail-subtitle {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.85em;
    color: var(--fg);
}

.multistage-stage-card.active-stage-card {
    /* border: violet; */
    box-shadow: 0 0 20px var(--extreme-bg);
    /* background-color: var(--custom-bg-color); */
    filter: unset;
    /* cursor: pointer; */
}

.multistage-stage-card {
    cursor: pointer;
}

.multistage-stage-card:hover {
    /* transform: scale(1.03); */
}

/* Transient affordance shown on an analytic that a deep link scrolled to.
           Added by Report._loadAnalyticWithFocus and auto-removed after ~2.5s. */
.analytic-deep-link-target {
    animation: analytic-deep-link-pulse 2.5s ease-out 1;
    border-radius: 8px;
}

@keyframes analytic-deep-link-pulse {
    0% {
        box-shadow: 0 0 0 0 var(--accent-color, #4a90e2), 0 0 0 4px rgba(74, 144, 226, 0.35);
    }

    60% {
        box-shadow: 0 0 0 2px var(--accent-color, #4a90e2), 0 0 0 8px rgba(74, 144, 226, 0.12);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0), 0 0 0 0 rgba(74, 144, 226, 0);
    }
}

.multistage-run-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: green;
    color: #fff;
    border: none;
    padding: 5px 1em;
    margin: 0;
    border-radius: var(--window-radius);
    cursor: pointer;
    font-weight: 600;
    transition: filter 0.2s;
    box-shadow: var(--box-shadow), 0 0 10px #ffffff22 inset;
    corner-shape: squircle;
    /* border: 1px solid #ffffff; */
}

.multistage-run-btn:hover {
    filter: brightness(1.08);
}

.ui-button {
    cursor: pointer;
}

.mapjs-container {
    box-shadow: 0 0 9px var(--shadow-shade);
    border: 1px solid color-mix(var(--fg), transparent);
    /* box-shadow:var(--box-shadow); */
    margin: 5px;
    /* padding:2px; */
    border-radius: var(--window-radius);
    corner-shape: squircle;
    overflow: clip;
}

.mac-btn,
.lineage-history-btn {
    /* background: var(--ghost); */
    /* border: 1px solid color-mix(var(--fg), var(--bg)); */
    /* box-shadow: 1px 1px 1px color-mix(var(--shadow-shade), var(--bg) 80%); */
    color: color-mix(var(--fg), var(--bg));
    background: var(--fg);
    color: #eee;
    background: color-mix(var(--header-bg), transparent 0%);
    /* filter: drop-shadow(2px 4px 6px black); */
    box-shadow: 0 0 3px var(--shadow-shade);
    border: 0px solid black;
    /* padding: 1px; */
    background: none;
    color: var(--fg);
}

/* value_numeric clarification control (scalar / [min,max] range). Rendered inside a
   .multistage-rule-choices-container in place of the checkbox choices. */
.multistage-numeric-control {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
}

.multistage-numeric-input {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    font: inherit;
    font-size: 0.8em;
    padding: 4px 6px;
    color: var(--fg);
    background: var(--extreme-bg);
    border: 1px solid color-mix(var(--fg), var(--bg) 90%) !important;
    border-radius: 4px;
    placeholder-color: red;
    /* box-shadow: var(--box-shadow); */
}

.multistage-numeric-input:focus {
    outline: none;
    border-color: var(--accent, #6ea8fe);
}

.multistage-numeric-input::placeholder {
    color: color-mix(var(--fg), var(--ghost) 70%);
}

/* Simple queued Question card (buildSimpleQuestionCard) — styled to look like the
   multistage rule-group/choice chips, but on its own class names (sq-*) so the two
   UIs can diverge independently. */
.sq-rule-group {
    display: grid;
    row-gap: 0;
    column-gap: 8px;
    margin-bottom: 12px;
    border-radius: 10px;
    corner-shape: squircle;
    padding: 0;
    grid-template-rows: min-content 1fr;
    width: auto;
}

.sq-rule-title {
    display: block;
    font-size: 0.8em;
    text-transform: uppercase;
    background: var(--ghost);
    padding: 3px 5px 3px;
    height: min-content;
    margin: 1em 0 0;
    border-radius: 5px;
    box-shadow: var(--box-shadow);
}

.sq-choices-container {
    display: flex;
    flex-direction: column;
    row-gap: 6px;
    padding: 0 5px 0;
    max-height: var(--rule-choices-max-h);
    overflow: auto;
    overscroll-behavior-y: auto;
}

/* Make each choice read as a distinct, selectable control. The simple card renders
   no check-icon, so selection state lives entirely on the row (.active/.inactive). */
.sq-choice {
    display: block;
    padding: 8px 10px;
    border: 1px solid #ffffff22;
    border-radius: 8px;
    corner-shape: squircle;
    cursor: pointer;
    font-size: 0.8em;
    color: var(--fg);
    transition: background 0.15s, border-color 0.15s;
}

.sq-choice:hover {
    background: #ffffff14;
    border-color: #ffffff44;
}

.sq-choice.active {
    border-color: var(--accent, #6ea8fe);
    background: color-mix(in srgb, var(--accent, #6ea8fe) 18%, transparent);
}

.sq-choice-label {
    display: block;
    font-size: 0.9em;
    font-weight: 500;
}

.sq-choice-desc {
    display: block;
    margin-top: 2px;
    font-size: 0.8em;
    font-weight: 300;
    line-height: 1.35;
    color: var(--fg);
}

.sq-numeric-input {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    font: inherit;
    font-size: 0.8em;
    padding: 4px 6px;
    color: var(--fg);
    background: var(--extreme-bg);
    border: 1px solid color-mix(var(--fg), var(--bg) 90%) !important;
    border-radius: 4px;
}

.sq-numeric-input:focus {
    outline: none;
    border-color: var(--accent, #6ea8fe);
}

.sq-numeric-input::placeholder {
    color: color-mix(var(--fg), var(--ghost) 70%);
}

/* Submit button: its own gradient/color (inspired by .multistage-run-btn) rather
   than a shared class, plus sizing so it doesn't stretch to full card width. */
.simple-question-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgb(99, 102, 241), rgb(139, 92, 246));
    color: rgb(255, 255, 255);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: filter 0.2s;
    align-self: flex-start;
    width: auto;
    padding: 8px 20px;
    border-radius: 8px;
    corner-shape: squircle;
    margin-top: 4px;
}

.simple-question-submit:hover {
    filter: brightness(1.08);
}

.simple-question-text-input {
    /* width: 100%; */
    font: inherit;
    font-size: 0.9em;
    padding: 6px 8px;
    color: #eee;
    background: var(--extreme-bg);
    border: 1px solid #ffffff33;
    border-radius: 4px;
    resize: vertical;
    border: 1px solid color-mix(var(--fg), var(--bg) 90%);
    margin: 5px;
}

.simple-question-text-input:focus {
    outline: none;
    border-color: var(--accent, #6ea8fe);
}

.simple-question-text-input::placeholder {
    color: #ffffff66;
}

.simple-question-error {
    color: #f87171;
    font-size: 0.85em;
    margin: 6px 0;
}

.multistage-numeric-dash {
    color: var(--fg);
    font-weight: 600;
}

.toc-section-list .outline-item-wrapper.outline-level-1 {
    border-top: 1px solid var(--ghost);
    margin-top: 10px;

    /* background:var(--header-bg); */
    /* border-radius:5px; */
    /* corner-shape:squircle; */
    /* box-shadow:var(--box-shadow); */
    .toggle-arrow {
        display: none
    }

}

.toc-section-list {
    ul ul {
        margin-left: 20px !important;
    }

    ul {
        margin-left: 0 !important;
    }
}

/* --- Report playbook detail pane (picker → detail) --- */
#playbook-detail-container .standard-pane-content {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.playbook-description {
    font-size: 0.95rem;
    opacity: 0.9;
}

.playbook-synthesis {
    font-size: 0.9rem;
    opacity: 0.85;
}

.playbook-workstreams h4 {
    margin: 0 0 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.playbook-workstreams ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playbook-workstreams li {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.08);
}

.playbook-lens {
    opacity: 0.7;
    font-size: 0.85rem;
}

.playbook-ws-purpose {
    margin-top: 4px;
    font-size: 0.82rem;
    opacity: 0.7;
}

.playbook-run-form,
.playbook-lock {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.06);
}

.playbook-run-form label {
    font-size: 0.85rem;
    opacity: 0.85;
}

.playbook-param-input {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(127, 127, 127, 0.3);
    background: var(--input-bg, transparent);
    color: inherit;
}

.playbook-run-form .button-primary,
.playbook-lock .button-primary {
    align-self: flex-start;
    margin-top: 6px;
}


.mapjs-container::before {
    inset: 0;
    position: absolute;
    content: " ";
    width: 100%;
    height: 100%;
    z-index: 1000;
    /* background:red; */
    /* box-shadow: 0 0 50px var(--extreme-bg) inset; */
    /* border: 1px solid color-mix(var(--fg), transparent); */
    /* box-shadow:0 0 3px var(--fg) inset; */
    border-radius: inherit;
    margin: 5px;
    corner-shape: squircle;
    pointer-events: none;
}

.d3-bars-group {
    /* --shadow-shade:black; */
    filter: drop-shadow(2px 2px 3px var(--plot-shade))
}

.analytic-permanent-btns .analytic-edit-btn {
    color: color-mix(var(--fg), transparent 20%);
    ;
}

.analytic-variation-btns .analytic-edit-btn {
    color: color-mix(var(--fg), transparent 20%);
    /* padding: 3px 5px 0; */
    /* background-color: green; */
    corner-shape: squircle;
}

.popup-modify-example::before {
    content: "- "
}

/* Document View Styles */
.multistage-document-section {

    /* margin: 24px 16px; */
    /* padding: 24px; */
    /* border-radius: 12px; */
    .plan-section {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .multistage-document-title {
        font-size: 2rem;
        font-weight: 600;
        margin: 0;
        margin-bottom: 12px;
    }

    .multistage-document-subtitle {
        font-size: 1.5rem;
        font-weight: 500;
        margin: 2em 0;
        border-bottom: 3px solid var(--fg);
        padding-bottom: 8px;
    }

    .document-mode-pane {
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        max-height: none !important;
        overflow: visible;
    }

    /* Effort Segmented Control */
    .multistage-effort-segmented-container {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }

    .multistage-effort-segmented {
        display: flex;
        background-color: color-mix(in srgb, var(--fg) 10%, transparent);
        border-radius: 8px;
        padding: 4px;
        width: fit-content;
    }

    .multistage-effort-segment {
        background: transparent;
        border: none;
        color: var(--fg);
        padding: 2px 8px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.9em;
        font-weight: 500;
        transition: background-color 0.2s, box-shadow 0.2s;
    }

    .multistage-effort-segment:hover {
        background-color: color-mix(in srgb, var(--fg) 10%, transparent);
    }

    .multistage-effort-segment.active {
        background-color: var(--bg);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .multistage-effort-description {
        font-size: 0.9em;
        color: color-mix(in srgb, var(--fg) 60%, transparent);
        padding-left: 4px;
    }

    .multistage-approve-container {
        display: flex;
        justify-content: flex-end;
        margin-top: 16px;
    }

    .multistage-stage-card {
        cursor: pointer;
    }
}

.multistage-document-title {
    font-size: 2em;
}

.multistage-stages-container svg {
    /* stroke:red;
    fill:blue; */

}