:root {
    --brand-green: #86BC25;
    --brand-green-ink: #4f7314;
    --brand-bg-light: #F5F5F5;
    --brand-black: #282728;
    --theme-header-bg: #F5F5F5;
    --theme-sidebar-bg: #F5F5F5;
    --theme-main-bg: #F5F5F5;
    --theme-shell-border: #E6E6E6;
    --theme-shell-surface: #F5F5F5;
    --theme-shell-surface-hover: #E8E8EC;
    --theme-shell-text-primary: #18181B;
    --theme-shell-text-secondary: #52525B;
    --theme-shell-text-muted: #71717A;
    --accent: var(--brand-green);
    --badge-warn-color: #B45309;
    --badge-ok-color: #0E5A3A;
    --badge-danger-color: #DC2626;
    --font-display: "Open Sans", sans-serif;
    --font-mono: monospace, monospace;
    --app-footer-height: 2.5rem;
}

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html {
    font-size: 13px;
}

@media (min-width: 1200px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1300px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1400px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 1500px) {
    html {
        font-size: 17px;
    }
}

@media (min-width: 1600px) {
    html {
        font-size: 18px;
    }
}

@media (min-width: 1700px) {
    html {
        font-size: 19px;
    }
}

@media (min-width: 1800px) {
    html {
        font-size: 20px;
    }
}

@media (min-width: 1900px) {
    html {
        font-size: 20.5px;
    }
}

@media (min-width: 2000px) {
    html {
        font-size: 21px;
    }
}

@media (min-width: 2100px) {
    html {
        font-size: 21.5px;
    }
}

@media (min-width: 2200px) {
    html {
        font-size: 22px;
    }
}

@media (min-width: 2300px) {
    html {
        font-size: 22.5px;
    }
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: "Open Sans", sans-serif;
    color: #0F0B0B;
}

h1:focus {
    outline: none;
}

.fs-edit-menu-popover,
.fs-edit-menu-popover>.mud-list {
    border-radius: 0.8rem !important;
}

/*Overwrrites default values of min-width: 56px*/
.mud-list-item-icon {
    min-width: 2rem !important;
}

.fs-edit-menu-popover {
    border: 2px solid gray;
}

#blazor-error-ui {
    background: lightyellow;
    color: black;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: rgb(240, 240, 240);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.app-top-header {
    background-color: var(--theme-header-bg) !important;
    color: var(--theme-shell-text-primary) !important;
    position: relative !important;
    border-top: 4px solid var(--brand-green) !important;
    border-bottom: 1px solid var(--theme-shell-border) !important;
    height: var(--mud-appbar-height) !important;
    min-height: var(--mud-appbar-height) !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.mud-tooltip-root.mud-tooltip-inline {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.mud-tooltip {
    z-index: 1500 !important;
}

.mud-layout {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    background-color: var(--mud-palette-background) !important;
    display: flex !important;
    flex-direction: column !important;
}

.mud-main-content {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto;
    padding: 0 !important;
}

.mud-main-content.portal-main-content {
    padding-top: var(--mud-appbar-height) !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    height: calc(100vh - var(--app-footer-height, 2.5rem)) !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}

.portal-container {
    padding: 2rem 2.5rem !important;
    max-width: 90rem !important;
    margin: 0 auto !important;
}

.mud-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    height: var(--mud-appbar-height) !important;
    width: 100% !important;
}

.mud-toolbar > * {
    pointer-events: auto;
}

.mud-toolbar .mud-input {
    min-width: 12rem !important;
    max-width: 15rem !important;
    background-color: white !important;
    border-radius: .5rem !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
}

.edit-entity-button:first-child {
    border-radius: 4px 4px 0 0 !important;
}

.edit-entity-button {
    border-bottom: 1px solid !important;
    background-color: #F5F5F4 !important;
}

.edit-entity-button:last-child {
    border-radius: 0 0 4px 4px !important;
    border-bottom: 0px !important;
}

.mud-input-helper-text.mud-input-error {
    font-size: 0.7rem;
}

.dialog-background-title {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E5E5E5;
}

header {
    pointer-events: none;
}

.oss-button {
    color: #68b631;
    border: 1px solid #68b631;
    height: auto;
    white-space: normal;
    word-wrap: break-word;
    padding: .8em 2em;
    font-size: .8em;
    line-height: 1.2;
    cursor: pointer;
    -moz-transition: .1s ease;
    -o-transition: .1s ease;
    -webkit-transition: 1s ease;
    transition: .1s ease;
}

    .oss-button:hover {
        color: #fff;
        background-color: #68b631;
    }

.version-number {
    left: 2rem;
}

.tooltip {
    height: 100% !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0.5rem !important;
}

.mud-breadcrumbs {
    font-size: .9rem;
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    padding: 0;
}

.mud-breadcrumbs .mud-breadcrumb-item {
    position: relative;
}

/* Breadcrumb tooltip */
.mud-breadcrumbs .mud-breadcrumb-item::before {
    content: attr(data-tooltip);
    color: var(--mud-palette-dark-text);
    background-color: var(--mud-palette-grey-darker);
    border-radius: var(--mud-default-borderradius);
    position: absolute;
    top: 1.6rem;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    font-weight: 500;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.4em;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mud-breadcrumb-separator {
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mud-stepper .mud-stepper-nav .mud-step {
    padding: 1rem;
}

.breadcrumb-separator {
    min-width: 0.3rem !important;
}

.breadcrumb-container :not(:last-child):hover {
    text-decoration: underline;
}

.breadcrumb-container> :last-child {
    pointer-events: none;
}

.project-view-buttons {
    position: absolute !important;
    left: 50%;
    transform: translateX(-50%) !important;
    top: 3.175rem;
    padding: 0 0.2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .25rem;
    padding: .2rem;
    height: 2.15rem;
}

.project-view-button {
    border-left: none !important;
    height: fit-content !important;
    width: 5rem;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-transform: none !important;
}

    .project-view-button:hover {
        background-color: transparent !important;
    }

    .project-view-button.active .name {
        border-bottom: .1rem solid rgba(134, 188, 37, 1) !important;
        font-weight: 700 !important;
        background-image: none;
    }

.name {
    font-size: .8rem;
    border: .1rem solid transparent;
    margin: 0.3rem 0.5rem !important;
}

.add-future-state-menu {
    border-radius: .3rem;
}

    .add-future-state-menu .mud-list {
        border-radius: .3rem;
        border: 1px solid #999;
        padding: .1rem .15rem .1rem .15rem;
    }

    .add-future-state-menu .mud-list-item {
        padding-top: .6rem;
        padding-bottom: .6rem;
    }

        .add-future-state-menu .mud-list-item:not(:last-of-type) {
            border-bottom: 1px solid #999;
        }

        .add-future-state-menu .mud-list-item .mud-list-item-text {
            margin: 0;
        }

            .add-future-state-menu .mud-list-item .mud-list-item-text .mud-typography {
                font-size: .8rem;
                display: flex;
                justify-content: space-between;
            }

.entity-filter-item .mud-list-item-icon {
    min-width: 2rem !important;
}

.mud-list-item.entity-filter-item {
    padding-left: .5rem !important;
    padding-right: .5rem !important;
    padding-top: .3rem !important;
    padding-bottom: .3rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    
}

.mud-tab {
    text-transform: none !important;
}

.mud-grid-spacing-xs-6 {
    width: calc(100% + 1rem);
    margin-left: -1rem;
    margin-top: -1rem;
}

    .mud-grid-spacing-xs-6 > .mud-grid-item {
        padding-left: 1rem;
        padding-top: 1rem;
    }

@keyframes slideUp {
    from {
        bottom: -100%;
    }

    to {
        bottom: 3rem;
    }
}

@keyframes slideDown {
    from {
        bottom: 1rem;
    }

    to {
        bottom: -100%;
    }
}

.required {
    color: #f44336;
}

.spinner {
    border: .6rem solid rgba(128, 128, 128, 0.2);
    border-top: .6rem solid var(--mud-palette-secondary, #86BC24);
    border-radius: 50%;
    width: 5rem;
    height: 5rem;
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 40vh auto auto auto;
}

.loading-progress circle {
    fill: none;
    stroke: #86BC24;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #86BC24;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(40vh + 3.3rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.export-menu {
    border-radius: .3rem;
}

.export-menu .mud-list {
    border-radius: .3rem;
    border: 1px solid #999;
    padding: .1rem .15rem .1rem .15rem;
}

.export-menu .mud-list-item {
    padding-top: .6rem;
    padding-bottom: .6rem;
}

.export-menu .mud-list-item:not(:last-of-type) {
    border-bottom: 1px solid #999;
}

.export-menu .mud-list-item .mud-list-item-text {
    margin: 0;
}

.export-menu .mud-list-item .mud-list-item-text .mud-typography {
    font-size: .8rem;
    display: flex;
    justify-content: space-between;
}

.export-menu .mud-list-item .mud-list-item-text .mud-typography span {
    flex-grow: 1;
    margin-left: .5rem;
    margin-right: 1.2rem;
}

.close-drawer-button {
    width: 1.5rem;
    height: .5rem;
}

.close-drawer-button>* {
    text-transform: none;
}

.export-drawer-button {
    width: 1.5rem;
    height: .5rem;
}

.export-drawer-button>* {
    text-transform: none;
}

.export-snap-report-button {
    background-color: #86BC24;
    color: #000000;
    height: 2.2rem !important;
    max-height: 2.2rem !important;
    width: 14rem !important;
    border-radius: 0.275rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-snap-report-button:hover {
    background-color: #86BC24;
    color: #000000;
}

.snap-index-marker {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1.2rem;
    height: 1rem;
    font-size: .7rem;
    background-color: #000000;
    color: #FFFFFF;
    pointer-events: none;
}

.arrow {
    pointer-events: none;
    cursor: pointer;
    stroke-width: .15rem;
    filter: drop-shadow(0 0 .05rem white);
    fill: none;
}

    .arrow.contrast {
        pointer-events: none;
        stroke: white;
        stroke-width: .3rem;
        stroke-dasharray: none;
    }

.arrow.dashed {
    stroke-dasharray: 8, 4;
}

.arrow__path {
    fill: none;
    pointer-events: stroke;
}

    .arrow__path:hover {
        stroke-width: .3rem;
        filter: drop-shadow(0 0 .1rem white);
    }

.arrow__head line {
    stroke-dasharray: none;
    stroke-width: .15rem;
}

.icon-capsule {
    filter: drop-shadow(0 .1rem 0 rgb(0, 0, 0, .1));
}

.screenshot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 15000;
    pointer-events: none;
    transition: background-color 0.25s ease-in-out;
}

.terms-dialog .mud-dialog-title {
    padding: .795rem 1.195rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E5E5E5;
    font-family: "Open Sans", sans-serif;
    position: sticky;
    top: 0;
}

.terms-dialog .mud-dialog-title h6 {
    color: black;
    font-size: 1.475rem;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* flows editor styling */
.flow-editor-menu {
    color: white;
    position: absolute;
    width: fit-content;
    height: fit-content;
    background-color: black;
    border: 1px solid white;
    border-radius: 0.25rem;
    padding: 0.6rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 9999;
    overflow-y: auto;
    max-height: 15rem;
}

.flow-editor-menu-option {
    padding: .2rem .3rem;
    font-size: .7rem;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-radius: .1rem;
}

    .flow-editor-menu-option:hover {
        background-color: #53565A
    }

    .flow-editor-menu-option :first-child {
        margin-right: 1rem;
    }

    .flow-editor-menu-option :last-child {
        /*margin-left: 3rem;*/
    }

.flow-editor-menu-divider {
    border-top: 1px solid #5C5C5C;
    margin: 0rem 0.3rem;
}

.flow-editor-link-option {
    color: white;
    font-size: .8rem;
    padding: 5px;
    cursor: pointer;
}

.joint-element {
    cursor: pointer;
    stroke-linejoin: bevel; /* (aka round) to prevents bounding box expansion caused by acute angle miter joins */
}

/* Visual indicator for elements in a group selection */
.joint-element.group-selected {
    outline: red dashed 2px;
    outline-offset: -1px;
}

/* Visual indicator for DrawnLine elements in a group selection */
.joint-type-drawnline.group-selected > [joint-selector="line"] {
    outline: red dashed 2px;
}

.not-allowed {
    cursor: not-allowed;
}

.flex-col-reverse {
    display: flex;
    flex-direction: column-reverse;
}

/* Example of applying style to Joint.JS type: DrawnRectangle shape */
/*.joint-type-drawnrectangle rect:first-of-type:hover {*/
    /*stroke-width: 6;*/
    /*padding: .2rem;*/
    /*cursor: move;*/
/*}*/

/* Gray the text on hover for textbox and callout shapes */
/*.joint-type-textbox text:hover, .joint-type-callout text:hover {*/
/*    fill: #53565A;*/
/*}*/
/* -------------------- */

.app-version {
    position: absolute;
    right: 1rem;
    color: #000000;
}

/* Theme */
:root {
    --deloitte-green: #86BC25;
    --app-gauge-track: #EAE7E0;
    --app-widget-bg: #ffffff;
    --app-w-pill-ok-bg: #E5F1EA;
    --app-w-pill-ok-fg: #0E5A3A;
    --app-w-pill-ok-dot: #107A4A;
    --app-w-fill-safe: #107A4A;
    --app-w-lever-neutral-bg: #E4E1DA;
    --app-w-lever-inbeat-bg: #EFF7EC;
    --app-w-lever-inbeat-border: #CCE5C2;
    --app-w-accent-danger: #C62A12;
    --app-w-accent-warn: #B5811C;
    --app-w-accent-ok: #107A4A;
    --app-w-accent-ink: #4F7314;
    --app-w-fill-danger: #e55a3c;
    --app-w-pill-danger-bg: #FBE9E7;
    --app-w-pill-danger-fg: #8A1B0B;
    --app-w-pill-danger-dot: #8A1B0B;
    /* Editorial design-system group — orange-red danger tone (#B85614) */
    --app-w-accent-danger-editorial: #B85614;
    --app-w-pill-danger-bg-editorial: #FBF0E8;
    --app-w-pill-danger-fg-editorial: #8A3B0B;
    --app-w-pill-danger-dot-editorial: #C4611A;
    /* Editorial ok / warn match the defaults in light; dark mutes them (below). */
    --app-w-accent-ok-editorial: #107A4A;
    --app-w-accent-warn-editorial: #B5811C;
    --app-w-pill-ok-fg-editorial: #0E5A3A;
    --app-w-pill-ok-dot-editorial: #107A4A;
    --app-w-pill-warn-fg-editorial: #7A4D00;
    --app-w-pill-warn-dot-editorial: #B5811C;
    --app-w-lever-inbeat-row: #DDEBD3;
    --app-w-pill-warn-bg: #FBF1DC;
    --app-w-pill-warn-fg: #7A4D00;
    --app-w-pill-warn-dot: #B5811C;
    --app-w-tint-ok: #EEF6F1;
    --app-w-tint-warn: #FBF1DC;
    --app-w-tint-danger: #FBE9E7;
    --app-widget-surface-sunken: #FAFAFA;
    --app-widget-surface-raised: #F4F4F6;
    --app-strip: #F4F4F5;
    --app-widget-border-soft: #E2E2E2;
    --app-w-heat-0-bg: var(--app-widget-bg);
    --app-w-heat-0-ink: var(--widget-text-primary);
    --app-w-heat-1-bg: #FBEDE9;
    --app-w-heat-1-ink: #1A1A1A;
    --app-w-heat-2-bg: #F7D8D0;
    --app-w-heat-2-ink: #1A1A1A;
    --app-w-heat-3-bg: #F1B9AB;
    --app-w-heat-3-ink: #1A1A1A;
    --app-w-heat-4-bg: #E89281;
    --app-w-heat-4-ink: #FFFFFF;
    --app-w-heat-5-bg: #D55F46;
    --app-w-heat-5-ink: #FFFFFF;
    --app-w-border-dashed: #D9D6CF;
    --app-widget-border: #E2E2E6;
    /* Taxable Income widget group — §174 category, NOL lifecycle, and GBC
       credit-type palettes (data encoding; values mirror the React index.css) */
    --app-w-btn-active-fg: #ffffff;
    --app-w-sec174-dom: #0076A8;
    --app-w-sec174-for: #7c3aed;
    --app-w-sec174-beat: #C32F27;
    --app-w-sec174-sec59e: #946000;
    --app-w-sec174-cy: #ED8B00;
    --app-w-nol-used: #5C851A;
    --app-w-nol-expired: #66686B;
    --app-w-gbc-rd: #1D5FD8;
    --app-w-gbc-ce: #127A34;
    --app-w-gbc-other: #6E45D0;
    /* Info accent — Tax-TI stage + net-income rows (Book→Tax→E&P walk) */
    --app-w-accent-info: #0E7490;
    --app-w-tint-info: #E0F2F7;
    /* Categorical data palette — CAMT AFSI driver identities (w-data-1 = danger) */
    --app-w-data-2: #c97832;
    --app-w-data-3: #6e52b8;
    --app-w-data-4: #2d9066;
    --app-w-data-5: #0F6C97;
    /* 6 (teal) — the BIE trend's ATI-ceiling series. Clears 4.5:1 as text on the
       light card (5.02:1), which the old #00A3A1 did not. */
    --app-w-data-6: #0E7C7A;
    /* FTC §904(d) basket palette + chart accents (light) */
    --app-w-ftc-bk-passive: #2a52b0;
    --app-w-ftc-bk-general: #196b30;
    --app-w-ftc-bk-gilti: #6d28d9;
    --app-w-ftc-bk-branch: #8b1a1a;
    --app-w-ftc-bk-treaty: #555555;
    --app-w-ftc-unused: #2a52b0;
    /* Jurisdiction palette (light) — per-country accents for the widgets that encode a country
       as colour. Data encoding: the colour IS the jurisdiction's identity. Read as row-label
       TEXT on the card, so light takes the saturated 600-level hues that hold up on white. */
    --app-w-juris-us: #2563eb;
    --app-w-juris-germany: #059669;
    --app-w-juris-france: #d97706;
    --app-w-juris-uk: #7c3aed;
    --app-w-juris-japan: #0891b2;
    --app-w-juris-ireland: #dc2626;
    --app-w-juris-singapore: #9333ea;
    /* FDDEI §904 sourcing palette (light) — how foreign-derived income sources,
       which is a different read from the FTC credit baskets above: "US Source"
       is foreign-derived for §250 but US-source for §904. */
    --app-w-basket-us-source: #7c3aed;
    --app-w-basket-general: #059669;
    --app-w-basket-passive: #0a7ea4;
    --app-w-basket-treaty: #6b7280;
    --app-w-chart-track: color-mix(in srgb, #000 5%, transparent);
    --app-w-tax-cit: #2563eb;
    /* Inclusions widget group — §951A HTE zones + §956/§954(b)(3) identities (light) */
    --app-w-hte-nearpass: #5A8A1A;
    --app-w-accent-negative: #B52020;
    --app-w-incl-s956: #7C3AED;
    --app-w-incl-subf: #2563EB;
    --app-w-incl-ep: #BE185D;
    /* Entity Navigator — ETR heat ramp, 21% as the neutral midpoint (light). Data
       encoding, and also used as the ETR value TEXT, so every step clears AA on the
       light card. A loss jurisdiction has no rate and falls back to the muted token. */
    --app-w-etr-vlow: #046A38;
    --app-w-etr-low: #047857;
    --app-w-etr-mid: #4f7314;
    --app-w-etr-high: #A86200;
    --app-w-etr-vhigh: #C32F27;
    /* Entity Navigator — US tax-classification chips. Data encoding, rendered as a
       filled chip with white text, so these stay dark in both themes (no .mud-dark-mode
       override): contrast is against the chip's own label, not the card. */
    --app-w-enttype-uscorp: #0E5A3A;
    --app-w-enttype-cfc: #1A4FA0;
    --app-w-enttype-dre: #5B3A9E;
    --app-w-enttype-branch: #7A4D00;
    --app-w-enttype-partnership: #0E6E6E;
    /* Entity Navigator — intercompany payment types (light). Read as TEXT on the card,
       so unlike the chips above these do get a brightened dark-theme variant. */
    --app-w-ic-interest: #6D28D9;
    --app-w-ic-royalty: #0369A1;
    --app-w-ic-services: #A65A00;
    --app-w-ic-dividend: #047857;
    /* Scenario identity palette — strategy trajectory lines (light: darkened for
       AA text on white). Data encoding: each color IS a strategy's identity. */
    --app-w-scenario-current: #5E6573;
    --app-w-scenario-s1: #557A17;
    --app-w-scenario-s2: #0B7BA8;
    --app-w-scenario-s3: #8A6D12;
    --app-w-scenario-s4: #7C3AED;
    /* Provision Impact Timeline — 7-series categorical palette. Data encoding:
       each color IS a provision's identity, and doubles as legend/tooltip text,
       so every value clears AA on the light widget surface. */
    --app-w-ptl-beat: #9A4E29;
    --app-w-ptl-camt: #6F5C9E;
    --app-w-ptl-163j: #946A10;
    --app-w-ptl-gilti: #3F6FA3;
    --app-w-ptl-ftc: #C42A2A;
    --app-w-ptl-fdii: #0E6A3A;
    --app-w-ptl-net: #6E45D0;
    /* Range-slider tones — filled portion + empty track. Deliberately neutral:
       an in-widget control is not a CTA. */
    --app-w-slider-accent: #c2c2ca;
    --app-w-slider-track: #e2e2e6;
    /* Input field background (sunken) */
    --app-input-sunken: #F5F5F8;
    --app-toggle-accent-ink: #4f7314;
    --app-toggle-accent-soft: rgba(134, 188, 37, 0.16);
    --app-toggle-border: #E6E6E6;
    --app-toggle-text-secondary: #52525b;
}

.mud-dark-mode {
    --app-gauge-track: #1F2C42;
    --app-widget-bg: #191b1e;
    --app-w-pill-ok-bg: #0E2A1E;
    --app-w-pill-ok-fg: #7BD9A8;
    --app-w-pill-ok-dot: #7BD9A9;
    --app-w-fill-safe: #7BD9A9;
    --app-w-lever-neutral-bg: #15223A;
    --app-w-lever-inbeat-bg: #0E2A1E;
    --app-w-lever-inbeat-border: #1F4D38;
    --app-w-accent-ok: #7BD9A8;
    /* Dark keeps the bright brand green — it clears AA on the dark card unmodified. */
    --app-w-accent-ink: #86BC25;
    --app-toggle-accent-ink: #86EB22;
    --app-toggle-accent-soft: rgba(134, 235, 34, 0.18);
    --app-toggle-border: #444444;
    --app-toggle-text-secondary: #CACACA;
    --app-w-accent-danger: #FF8B6F;
    --app-w-accent-warn: #F2C464;
    --app-w-fill-danger: #FF8B6F;
    --app-w-pill-danger-bg: #3A1410;
    --app-w-pill-danger-fg: #FFB7A6;
    --app-w-pill-danger-dot: #FFB7A6;
    /* Editorial design-system group — muted orange-red danger tone */
    --app-w-accent-danger-editorial: #E89A6E;
    --app-w-pill-danger-bg-editorial: #3A2210;
    --app-w-pill-danger-fg-editorial: #E89A6E;
    --app-w-pill-danger-dot-editorial: #E89A6E;
    /* The prototype's muted editorial ok / warn, so bars and pills sit back on the dark card. */
    --app-w-accent-ok-editorial: #74C49A;
    --app-w-accent-warn-editorial: #D4AF61;
    --app-w-pill-ok-fg-editorial: #74C49A;
    --app-w-pill-ok-dot-editorial: #74C49A;
    --app-w-pill-warn-fg-editorial: #D4AF61;
    --app-w-pill-warn-dot-editorial: #D4AF61;
    --app-w-lever-inbeat-row: #163826;
    --app-w-pill-warn-bg: #3A2A0E;
    --app-w-pill-warn-fg: #F2C464;
    --app-w-pill-warn-dot: #F2C464;
    --app-w-tint-ok: #7BD9A814;
    --app-w-tint-warn: #F2C4641A;
    --app-w-tint-danger: #FF8B6F1A;
    --app-widget-surface-sunken: #000C0D;
    --app-widget-surface-raised: #191B1E;
    --app-strip: #222426;
    --app-widget-border-soft: #2A2526;
    --app-w-heat-0-bg: var(--widget-bg);
    --app-w-heat-0-ink: var(--widget-text-primary);
    --app-w-heat-1-bg: #2A1B1E;
    --app-w-heat-1-ink: #F0EEE8;
    --app-w-heat-2-bg: #3A1E22;
    --app-w-heat-2-ink: #F0EEE8;
    --app-w-heat-3-bg: #54221E;
    --app-w-heat-3-ink: #FFD9CC;
    --app-w-heat-4-bg: #7A2E1F;
    --app-w-heat-4-ink: #FFD9CC;
    --app-w-heat-5-bg: #A33B22;
    --app-w-heat-5-ink: #FFE6DC;
    --app-w-border-dashed: #2A3854;
    --app-widget-border: #191B1E;
    /* Taxable Income widget group — dark-theme palette */
    --app-w-btn-active-fg: #18181c;
    --app-w-sec174-dom: #4BA3D4;
    --app-w-sec174-for: #A78BFA;
    --app-w-sec174-beat: #E8736B;
    --app-w-sec174-sec59e: #F2A93D;
    --app-w-sec174-cy: #F2A93D;
    --app-w-nol-used: #A3D36B;
    --app-w-nol-expired: #B0B2B5;
    --app-w-gbc-rd: #5B9BF0;
    --app-w-gbc-ce: #4FC275;
    --app-w-gbc-other: #A98BEA;
    /* Info accent — Tax-TI stage + net-income rows (Book→Tax→E&P walk) */
    --app-w-accent-info: #67E8F9;
    --app-w-tint-info: rgba(103, 232, 249, 0.10);
    /* Categorical data palette — CAMT AFSI driver identities (w-data-1 = danger) */
    --app-w-data-2: #e09848;
    --app-w-data-3: #9378d4;
    --app-w-data-4: #4db88a;
    /* 5 (blue) — see the light block. Clears 4.5:1 on the dark card (7.34:1). */
    --app-w-data-5: #5FB3D9;
    /* 6 (teal) — see the light block. Clears 4.5:1 on the dark card (8.63:1). */
    --app-w-data-6: #4FC9C6;
    /* FTC §904(d) basket palette + chart accents (dark) */
    --app-w-ftc-bk-passive: #6E8FE0;
    --app-w-ftc-bk-general: #4FB877;
    --app-w-ftc-bk-gilti: #A98BF5;
    --app-w-ftc-bk-branch: #E0796E;
    --app-w-ftc-bk-treaty: #9CA3AD;
    --app-w-ftc-unused: #7A98D4;
    /* Jurisdiction palette (dark) — see the light block. Dark sits in the same calmer band as the
       scenario palette so seven country labels read against the near-black card without punching
       out of it. */
    --app-w-juris-us: #7aa8e6;
    --app-w-juris-germany: #6fb37a;
    --app-w-juris-france: #e0a755;
    --app-w-juris-uk: #a594d4;
    --app-w-juris-japan: #6cb2c4;
    --app-w-juris-ireland: #d4857d;
    --app-w-juris-singapore: #b58ad8;
    /* FDDEI §904 sourcing palette (dark) — see the light block. */
    --app-w-basket-us-source: #a78bfa;
    --app-w-basket-general: #34d399;
    --app-w-basket-passive: #38bdf8;
    --app-w-basket-treaty: #9ca3af;
    --app-w-chart-track: color-mix(in srgb, #fff 18%, transparent);
    --app-w-tax-cit: #60a5fa;
    /* Inclusions widget group — §951A HTE zones + §956/§954(b)(3) identities (dark) */
    --app-w-hte-nearpass: #A3D95E;
    --app-w-accent-negative: #E08080;
    --app-w-incl-s956: #B794F6;
    --app-w-incl-subf: #7AA2F7;
    --app-w-incl-ep: #F472B6;
    /* Entity Navigator — ETR heat ramp (dark: brightened for the dark canvas). See
       the light block. */
    --app-w-etr-vlow: #4db88a;
    --app-w-etr-low: #34D399;
    --app-w-etr-mid: #9dcb54;
    --app-w-etr-high: #F2A93B;
    --app-w-etr-vhigh: #F1746A;
    /* Entity Navigator — intercompany payment types (dark). The tax-type chips are
       deliberately absent here; see the light block. */
    --app-w-ic-interest: #B794F6;
    --app-w-ic-royalty: #5FB3D9;
    --app-w-ic-services: #F2A93B;
    --app-w-ic-dividend: #4FB877;
    /* Scenario identity palette — strategy trajectory lines (dark: brightened
       for the dark canvas) */
    --app-w-scenario-current: #9CA3AF;
    --app-w-scenario-s1: #A3D36B;
    --app-w-scenario-s2: #5CC8F5;
    --app-w-scenario-s3: #F0CF6A;
    --app-w-scenario-s4: #C4A5FC;
    /* Provision Impact Timeline — 7-series categorical palette (dark: brightened
       so each series still clears AA as legend text on the near-black canvas) */
    --app-w-ptl-beat: #D99873;
    --app-w-ptl-camt: #A99AD6;
    --app-w-ptl-163j: #D4AF61;
    --app-w-ptl-gilti: #7FAAD9;
    --app-w-ptl-ftc: #E08080;
    --app-w-ptl-fdii: #74C49A;
    --app-w-ptl-net: #B69CF0;
    /* Range-slider tones — the empty track must clear the near-black canvas,
       so it sits lighter than the divider. */
    --app-w-slider-accent: #6f7480;
    --app-w-slider-track: #3c4049;
    /* Input field background (sunken) */
    --app-input-sunken: #3A3A3A;
}

/* ── Editorial design-system danger tone ──
   Mirrors the React index.css [data-widget-redesign] editorial token scope:
   this widget group uses an orange-red danger accent (#B85614 light /
   #E89A6E dark) instead of the default red (#C62A12 / #FF8B6F), and in dark
   mode mutes its ok and warn tones (#74C49A / #D4AF61). The override is set
   on the widget root so it (and its charts/pills) win over the inherited
   .widget-card value. Widgets outside this list (e.g. beat-w010)
   intentionally keep the default tones. */
[data-widget-redesign="exec-tax-provision"],
[data-widget-redesign="ftc-editorial"],
[data-widget-redesign="fdii-editorial"],
[data-widget-redesign="beat-w011"],
[data-widget-redesign="beat-w015"],
[data-widget-redesign="beat-w049"],
[data-widget-redesign="beat-w112"],
[data-widget-redesign="beat-w130"],
[data-widget-redesign="beat-w132"] {
    --w-accent-danger: var(--app-w-accent-danger-editorial);
    --w-pill-danger-bg: var(--app-w-pill-danger-bg-editorial);
    --w-pill-danger-fg: var(--app-w-pill-danger-fg-editorial);
    --w-pill-danger-dot: var(--app-w-pill-danger-dot-editorial);
    --w-accent-ok: var(--app-w-accent-ok-editorial);
    --w-accent-warn: var(--app-w-accent-warn-editorial);
    --w-pill-ok-fg: var(--app-w-pill-ok-fg-editorial);
    --w-pill-ok-dot: var(--app-w-pill-ok-dot-editorial);
    --w-pill-warn-fg: var(--app-w-pill-warn-fg-editorial);
    --w-pill-warn-dot: var(--app-w-pill-warn-dot-editorial);
}


/* Specific toggles styling */
.dense-toggles-popover .mud-list-item, .dense-toggles-popover .mud-list-item-text, .dense-toggles-popover .mud-typography {
    font-size: 0.6875rem !important;
}


.mini-expand-icon .mud-expand-panel-icon { transform: scale(0.65); transform-origin: center right; }


.fs-top-action .mud-icon-button, .fs-bottom-action .mud-icon-button { width: 24px !important; height: 24px !important; }
.fs-top-action .mud-icon-root, .fs-bottom-action .mud-icon-root { font-size: 14px !important; width: 14px !important; height: 14px !important; }


.btn-primary-action {
    background-color: var(--brand-green) !important;
    color: #000000 !important;
    text-transform: none !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

.btn-primary-action:disabled,
.btn-primary-action.mud-disabled {
    background-color: #e0e0e0 !important;
    color: #9e9e9e !important;
}


/* AI Chat Drawer Global Styles */
.mud-drawer.mud-drawer-persistent.ai-chat-drawer,
.mud-drawer.mud-drawer-mini.ai-chat-drawer {
    position: absolute !important;
    top: var(--mud-appbar-height) !important;
    bottom: var(--app-footer-height, 2.5rem) !important;
    height: auto !important;
    border-right: 1px solid var(--theme-shell-border) !important;
    background-color: var(--theme-sidebar-bg) !important;
    overflow-x: hidden !important;
}
