.math-formula {
    --math-formula-border: #d7dee8;
    --math-formula-surface: #ffffff;
    --math-formula-alt: #f8fafc;
    --math-formula-text: #0f172a;
    --math-formula-muted: #526171;
    --math-formula-accent: #1d4ed8;
    --math-formula-info: #0f766e;
    --math-formula-warning: #b45309;
    --math-formula-danger: #b91c1c;
    --math-formula-success: #166534;
    color: var(--math-formula-text);
    display: grid;
    gap: 0.85rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

.math-formula__hero,
.math-formula__panel {
    border: 1px solid var(--math-formula-border);
    border-radius: 1rem;
    background: var(--math-formula-surface);
}

.math-formula__hero {
    padding: 0.8rem 0.9rem;
}

.math-formula__panel {
    padding: 0.8rem;
}

.math-formula__layout > [class*='col-'] {
    min-width: 0;
}

.math-formula__editable-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.math-formula__formula-stack {
    display: grid;
    gap: 0.8rem;
}

.math-formula__formula-section {
    min-width: 0;
}

.math-formula__formula-stack--split .math-formula__formula-section {
    padding: 0.8rem;
    border: 1px solid var(--math-formula-border);
    border-radius: 0.9rem;
    background: var(--math-formula-alt);
}

.math-formula__formula-section-header {
    margin-bottom: 0.45rem;
}

.math-formula__formula-section-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
}

.math-formula__formula-render {
    padding: 0.5rem 0;
}

.math-formula__formula-section--editable {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.math-formula__formula-section--original .math-formula__formula-render {
    display: grid;
    align-items: center;
    justify-items: center;
    min-width: 0;
}

.math-formula__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.math-formula__panel-title {
    margin: 0;
    font-size: 1.05rem;
}

.math-formula__result-symbol,
.math-formula__variable-symbol {
    color: var(--math-formula-muted);
    font-weight: 600;
}

.math-formula__inline-latex {
    display: inline-block;
    min-height: 1.25rem;
    line-height: 1.2;
    padding-block: 0.08em;
    overflow: visible;
    vertical-align: middle;
}

.js [data-math-formula-inline-latex][data-math-formula-inline-state="pending"] {
    color: transparent;
}

.math-formula__equation-box {
    min-width: 0;
    width: 100%;
    padding: 0.6rem 0.3rem;
    border: 1px solid var(--math-formula-border);
    border-radius: 0.9rem;
    background: var(--math-formula-surface);
}

.math-formula__equation-scroll {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.math-formula__equation-line {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: max-content;
    margin-inline: auto;
}

.math-formula__formula-render--editable {
    min-height: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.math-formula__formula-stack--split .math-formula__formula-section-header {
    margin-bottom: 0.3rem;
}

.math-formula__formula-stack--split .math-formula__equation-box {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.math-formula__formula-stack--split .math-formula__formula-render {
    padding-top: 0;
    padding-bottom: 0;
}

.math-formula__editable-expression {
    display: inline-block;
    padding: 0.18rem 0.1rem;
    color: var(--math-formula-text);
    pointer-events: none;
}

.math-formula__editable-expression .ML__mathlive {
    display: inline-block;
    width: auto;
    max-width: 100%;
    font-size: clamp(1.2rem, 2.1vw, 1.7rem);
    pointer-events: none;
}

.math-formula__result-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.math-formula__result-equals {
    color: var(--math-formula-text);
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    font-weight: 600;
}

.math-formula__editable-slot {
    --math-formula-slot-width: 2.8ch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    position: relative;
    z-index: 1;
    margin: 0 0.16em;
    transform: translateY(-0.03em);
    pointer-events: auto;
}

.math-formula__editable-input,
.math-formula__editable-select {
    width: var(--math-formula-slot-width);
    min-width: 2.2rem;
    max-width: 4.8rem;
    min-height: 1.5rem;
    border: 1px solid var(--math-formula-border);
    border-radius: 0.45rem;
    background: #fff;
    color: var(--math-formula-text);
    box-sizing: border-box;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.05;
    padding: 0.12rem 0.38rem;
    text-align: center;
    transition: border-color 140ms ease,
    outline-color 140ms ease,
    background-color 140ms ease;
    pointer-events: auto;
}

.math-formula__editable-slot.is-select {
    padding-right: 0.14rem;
}

.math-formula__editable-slot.is-slider {
    padding-inline: 0.14rem;
    gap: 0.32rem;
}

.math-formula__editable-slot.is-derived {
    pointer-events: none;
}

.math-formula__editable-slot.is-select::after {
    content: "";
    position: absolute;
    right: 0.32rem;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    color: var(--math-formula-muted);
    pointer-events: none;
    transform: translateY(-62%) rotate(45deg);
}

.math-formula__editable-slot.is-select-custom::after {
    display: none;
}

.math-formula__editable-input::placeholder {
    color: var(--math-formula-muted);
    opacity: 1;
    font-weight: 500;
}

.math-formula__editable-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 2.8rem;
    max-width: 5.6rem;
    text-align-last: center;
    padding-left: 0.34rem;
    padding-right: 0.82rem;
}

.math-formula__editable-slot.is-select-custom .math-formula__editable-input--custom {
    width: min(5.8rem, max(4.4rem, var(--math-formula-slot-width)));
    min-width: 4.4rem;
    max-width: 5.8rem;
    padding-right: 0.82rem;
}

.math-formula__editable-input--custom[hidden] {
    display: none;
}

.math-formula__editable-slot.is-select-custom.is-select-custom-active .math-formula__editable-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.math-formula__editable-slot.is-select-custom.is-select-custom-active .math-formula__editable-input--custom {
    position: relative;
    z-index: 1;
}

.math-formula__editable-select-toggle {
    position: absolute;
    right: 0.08rem;
    top: 50%;
    width: 1.2rem;
    height: calc(100% - 0.18rem);
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: var(--math-formula-muted);
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 2;
}

.math-formula__editable-select-toggle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translate(-50%, -62%) rotate(45deg);
}

.math-formula__editable-select-toggle:focus-visible {
    outline: 2px solid rgba(191, 219, 254, 0.9);
    outline-offset: 1px;
}

.math-formula__editable-slider {
    width: clamp(4.8rem, 8vw, 6.8rem);
    min-width: 4.8rem;
    max-width: 6.8rem;
    height: 1.35rem;
    margin: 0;
    accent-color: var(--math-formula-accent);
    cursor: pointer;
}

.math-formula__editable-slider-symbol,
.math-formula__editable-slider-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.15rem;
    padding: 0.08rem 0.38rem;
    border: 1px solid var(--math-formula-border);
    border-radius: 999px;
    background: #f8fbff;
    color: var(--math-formula-text);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.math-formula__editable-slider-symbol {
    max-width: 4.2rem;
    overflow: hidden;
}

.math-formula__editable-slider-value {
    min-width: 2.6rem;
}

.math-formula__editable-slot.is-slider:not(.is-panel) {
    gap: 0.24rem;
}

.math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider {
    width: 4.6rem;
    min-width: 4.6rem;
    max-width: 4.6rem;
    height: 1.18rem;
}

.math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-symbol {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--math-formula-muted);
    font-size: 0.56rem;
    font-weight: 600;
}

.math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-symbol .ML__mathlive,
.math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-symbol mjx-container[jax="SVG"] {
    font-size: 0.78rem;
}

.math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-value {
    min-width: 2.1rem;
    min-height: 0.92rem;
    padding: 0.02rem 0.3rem;
    border-color: #d7e2f1;
    background: #fff;
    color: var(--math-formula-muted);
    font-size: 0.58rem;
    font-weight: 700;
}

.math-formula__editable-input:focus,
.math-formula__editable-select:focus,
.math-formula__editable-slider:focus {
    border-color: var(--math-formula-accent);
    outline: 2px solid rgba(191, 219, 254, 0.9);
    outline-offset: 1px;
}

.math-formula__editable-slot:not(.is-empty):not(.is-invalid) .math-formula__editable-input,
.math-formula__editable-slot:not(.is-empty):not(.is-invalid) .math-formula__editable-select {
    border-color: #bfd0e4;
    background: #f8fbff;
}

.math-formula__editable-slot:not(.is-empty):not(.is-invalid) .math-formula__editable-slider {
    filter: saturate(1.08);
}

.math-formula__editable-slot.is-derived .math-formula__editable-input {
    background: var(--math-formula-alt);
    border-style: dashed;
    color: var(--math-formula-text);
}

.math-formula__editable-slot.is-derived.is-empty .math-formula__editable-input {
    color: var(--math-formula-muted);
}

.math-formula__editable-slot.is-derived:not(.is-empty):not(.is-invalid) .math-formula__editable-input {
    background: #eff6ff;
    border-color: #93c5fd;
    border-style: solid;
    color: var(--math-formula-accent);
}

.math-formula__editable-slot.is-fraction {
    margin-inline: 0.05em;
}

.math-formula__editable-slot.is-fraction .math-formula__editable-input,
.math-formula__editable-slot.is-fraction .math-formula__editable-select {
    min-height: 1.35rem;
    border-radius: 0.4rem;
    padding: 0.08rem 0.34rem;
    font-size: 0.75rem;
}

.math-formula__editable-slot.is-fraction .math-formula__editable-slider {
    width: 4.4rem;
    min-width: 4.4rem;
    max-width: 4.4rem;
}

.math-formula__editable-slot.is-fraction .math-formula__editable-slider-symbol,
.math-formula__editable-slot.is-fraction .math-formula__editable-slider-value {
    min-height: 1.05rem;
    padding-inline: 0.28rem;
    font-size: 0.62rem;
}

.math-formula__editable-slot.is-script {
    transform: translateY(-0.42em);
    margin-left: 0.08em;
    margin-right: -0.02em;
}

.math-formula__editable-slot.is-script .math-formula__editable-input,
.math-formula__editable-slot.is-script .math-formula__editable-select {
    min-width: 1.45rem;
    max-width: 2.6rem;
    min-height: 1.1rem;
    border-radius: 0.35rem;
    font-size: 0.62rem;
    line-height: 1;
    padding: 0.05rem 0.22rem;
}

.math-formula__editable-slot.is-script .math-formula__editable-slider {
    width: 2.7rem;
    min-width: 2.7rem;
    max-width: 2.7rem;
    height: 1rem;
}

.math-formula__editable-slot.is-script .math-formula__editable-slider-symbol,
.math-formula__editable-slot.is-script .math-formula__editable-slider-value {
    min-height: 0.92rem;
    padding-inline: 0.22rem;
    font-size: 0.54rem;
}

.math-formula__editable-slot.is-script.is-select::after {
    right: 0.22rem;
    width: 0.3rem;
    height: 0.3rem;
}

.math-formula__editable-slot.is-root-index {
    transform: translateY(-0.62em);
    margin-left: 0.18em;
    margin-right: -0.22em;
}

.math-formula__editable-slot.is-root-index .math-formula__editable-input,
.math-formula__editable-slot.is-root-index .math-formula__editable-select {
    min-width: 1.3rem;
    max-width: 2.2rem;
    min-height: 1rem;
    border-radius: 0.3rem;
    font-size: 0.58rem;
    padding: 0.03rem 0.18rem;
}

.math-formula__editable-slot.is-root-index .math-formula__editable-slider {
    width: 2.2rem;
    min-width: 2.2rem;
    max-width: 2.2rem;
    height: 0.95rem;
}

.math-formula__editable-slot.is-root-index .math-formula__editable-slider-symbol,
.math-formula__editable-slot.is-root-index .math-formula__editable-slider-value {
    min-height: 0.82rem;
    padding-inline: 0.2rem;
    font-size: 0.5rem;
}

.math-formula__editable-slot.is-root-index.is-select::after {
    right: 0.18rem;
    width: 0.24rem;
    height: 0.24rem;
}

.math-formula__editable-slot.is-radicand {
    margin-left: 0.08em;
    margin-right: 0.06em;
}

.math-formula__editable-slot.is-invalid .math-formula__editable-input,
.math-formula__editable-slot.is-invalid .math-formula__editable-select {
    border-color: #fca5a5;
    background: #fff7f7;
}

.math-formula__editable-slot.is-invalid .math-formula__editable-slider {
    filter: saturate(0.7);
}

.math-formula__mathlive-render {
    min-width: 0;
}

.math-formula__mathlive-render--block {
    display: block;
}

.math-formula__mathlive-render--inline {
    display: inline-block;
}

.math-formula__mathlive-render::part(content) {
    text-align: center;
}

.math-formula__mathlive-render::part(container) {
    justify-content: center;
}

.math-formula__formula-render--svg mjx-container[jax="SVG"],
.math-formula__result-render mjx-container[jax="SVG"] {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

.math-formula__formula-render--svg mjx-container[jax="SVG"] {
    margin: 0;
}

.math-formula mjx-assistive-mml,
.math-formula .MJX_Assistive_MathML {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.math-formula__variables-grid {
    display: grid;
    gap: 0.15rem;
    padding: 0;
}

.math-formula__variables-stack {
    display: grid;
    gap: 1rem;
}

.math-formula__variable-group {
    display: grid;
    gap: 0.55rem;
}

.math-formula__variable-group + .math-formula__variable-group {
    padding-top: 0.95rem;
    border-top: 1px solid var(--math-formula-border);
}

.math-formula__variable {
    display: grid;
    gap: 0.25rem;
    padding: 0.18rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.math-formula__variable--external {
    display: grid;
    row-gap: 0.35rem;
    container-type: inline-size;
}

.math-formula__variable--result-separated {
    margin-bottom: 0.45rem;
    padding-bottom: 0.85rem;
    position: relative;
}

.math-formula__variable--result-separated::after {
    content: "";
    display: block;
    width: clamp(4.5rem, 24%, 7.5rem);
    max-width: 100%;
    height: 1px;
    margin-top: 0.75rem;
    background: rgba(184, 199, 219, 0.18);
    border-radius: 999px;
}

.math-formula__variable-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.math-formula__variable--external .math-formula__variable-help,
.math-formula__variable--external .math-formula__messages--variable {
    grid-column: 1 / -1;
}

.math-formula__variable--external .math-formula__variable-line {
    flex: 1 1 0;
    min-width: 0;
}

.math-formula__variable.is-invalid {
    color: var(--math-formula-danger);
}

.math-formula__variable-line,
.math-formula__empty {
    margin: 0;
    color: var(--math-formula-text);
    line-height: 1.45;
}

.math-formula__variable-line {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: start;
    gap: 0.28rem;
    font-size: 0.98rem;
    min-width: 0;
}

.math-formula__variable-line > .math-formula__variable-content:only-child {
    grid-column: 1 / -1;
}

.math-formula__variable-symbol {
    color: var(--math-formula-text);
    font-size: 1rem;
    font-weight: 700;
}

.math-formula__result-symbol mjx-container[jax="SVG"],
.math-formula__variable-symbol mjx-container[jax="SVG"],
.math-formula__summary-symbol mjx-container[jax="SVG"],
.math-formula__result-symbol .math-formula__mathlive-render,
.math-formula__variable-symbol .math-formula__mathlive-render,
.math-formula__summary-symbol .math-formula__mathlive-render {
    margin: 0;
}

.math-formula__result-symbol mjx-container[jax="SVG"],
.math-formula__variable-symbol mjx-container[jax="SVG"],
.math-formula__summary-symbol mjx-container[jax="SVG"] {
    display: inline-block;
    overflow: visible;
    vertical-align: middle;
}

.math-formula__variable-separator {
    color: var(--math-formula-text);
    font-weight: 700;
}

.math-formula__variable-label {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.math-formula__variable-selection {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.45rem;
    border: 1px solid var(--math-formula-border);
    border-radius: 999px;
    background: #f8fbff;
    color: var(--math-formula-muted);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.math-formula__variable-help {
    margin: 0;
    color: var(--math-formula-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.math-formula__variable-content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.18rem 0.45rem;
    min-width: 0;
}

.math-formula__variable-control {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.math-formula__variable--external .math-formula__variable-control {
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    max-width: 100%;
}

[data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
    align-items: start;
    column-gap: 0.85rem;
}

[data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row > .math-formula__variable-line {
    min-width: 0;
}

[data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row > .math-formula__variable-control {
    width: min(100%, 16rem);
    min-width: 12rem;
    margin-left: 0;
}

[data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row > .math-formula__variable-control .math-formula__editable-slot.is-panel {
    width: 100%;
}

@container (max-width: 29rem) {
    .math-formula__variable-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .math-formula__variable-control {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin-left: 0;
        justify-content: flex-start;
    }

    [data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row {
        grid-template-columns: 1fr;
    }

    [data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row > .math-formula__variable-control {
        width: 100%;
        min-width: 0;
    }

    .math-formula__editable-slot.is-panel {
        width: 100%;
        max-width: none;
    }
}

.math-formula__variable-unit {
    color: var(--math-formula-muted);
    font-size: 0.9rem;
    display: inline;
    white-space: nowrap;
}

.math-formula__result-render {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 2rem;
}

.math-formula__result-render .math-formula__mathlive-render {
    font-size: inherit;
}

.math-formula__calculate-button {
    margin-bottom: 0.75rem;
    padding: 0.6rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    cursor: pointer;
}

.math-formula__messages {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
}

.math-formula__messages--global {
    margin-top: 0.75rem;
}

.math-formula__messages--formula-validation {
    margin-top: 0.75rem;
}

.math-formula__hero-messages {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    overflow-x: clip;
    overflow-y: visible;
}

.math-formula__message {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.8rem;
    border-radius: 0.75rem;
    background: var(--math-formula-alt);
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.math-formula__message--formula-validation-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 0.55rem;
    background: #fff7f7;
}

.math-formula__message-prefix {
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

.math-formula__message-symbol,
.math-formula__message-symbol-text {
    font-weight: 700;
}

.math-formula__message-prefix-separator {
    font-weight: 700;
    margin-right: 0.22rem;
}

.math-formula__message-text {
    min-width: 0;
}

.math-formula__message--info {
    color: var(--math-formula-info);
}

.math-formula__message--warning {
    color: var(--math-formula-warning);
}

.math-formula__message--danger {
    color: var(--math-formula-danger);
}

.math-formula__message--success {
    color: var(--math-formula-success);
}

.math-formula__editable-slot.is-panel {
    display: inline-block;
    width: min(100%, 13.5rem);
    margin: 0;
    transform: none;
}

.math-formula__editable-slot.is-panel.is-select-custom {
    width: min(100%, 15rem);
}

.math-formula__editable-slot.is-panel.is-select {
    padding-right: 0;
}

.math-formula__editable-slot.is-panel:not(.is-select):not(.is-derived) {
    width: min(100%, 9.5rem);
}

.math-formula__editable-slot.is-panel.is-slider {
    width: min(100%, 13.5rem);
}

.math-formula__editable-slot.is-panel.is-slider {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
}

.math-formula__editable-slot.is-panel .math-formula__editable-input,
.math-formula__editable-slot.is-panel .math-formula__editable-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 2.2rem;
    padding: 0.32rem 0.62rem;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: left;
}

.math-formula__editable-slot.is-panel .math-formula__editable-slider {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 1.75rem;
}

.math-formula__editable-slot.is-panel .math-formula__editable-slider-value {
    flex: 0 0 auto;
    min-width: 3.4rem;
}

.math-formula__editable-slot.is-panel.is-select-custom .math-formula__editable-input--custom {
    padding-right: 1.75rem;
}

.math-formula__editable-slot.is-panel.is-select-custom .math-formula__editable-select-toggle {
    right: 0.28rem;
}

.math-formula__editable-slot.is-panel.is-select::after {
    right: 0.72rem;
}

@media (max-width: 48rem) {
    .math-formula__hero,
    .math-formula__panel {
        padding: 0.75rem;
    }

    .math-formula__editable-expression .ML__mathlive {
        font-size: clamp(1.05rem, 5vw, 1.35rem);
    }

    .math-formula__editable-slot {
        margin-inline: 0.1em;
    }

    .math-formula__editable-input,
    .math-formula__editable-select {
        min-width: 1.7rem;
        max-width: 2.8rem;
        min-height: 1.35rem;
        padding: 0.08rem 0.24rem;
        font-size: 0.72rem;
    }

    .math-formula__editable-slider {
        width: 3.9rem;
        min-width: 3.9rem;
        max-width: 3.9rem;
        height: 1.2rem;
    }

    .math-formula__editable-slider-symbol,
    .math-formula__editable-slider-value {
        min-height: 1rem;
        padding-inline: 0.26rem;
        font-size: 0.58rem;
    }

    .math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider {
        width: 3.7rem;
        min-width: 3.7rem;
        max-width: 3.7rem;
        height: 1.05rem;
    }

    .math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-symbol {
        font-size: 0.5rem;
    }

    .math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-symbol .ML__mathlive,
    .math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-symbol mjx-container[jax="SVG"] {
        font-size: 0.68rem;
    }

    .math-formula__editable-slot.is-slider:not(.is-panel) .math-formula__editable-slider-value {
        min-width: 1.9rem;
        min-height: 0.82rem;
        padding-inline: 0.22rem;
        font-size: 0.52rem;
    }

    .math-formula__editable-slot.is-fraction .math-formula__editable-input,
    .math-formula__editable-slot.is-fraction .math-formula__editable-select {
        min-height: 1.2rem;
        padding: 0.05rem 0.2rem;
        font-size: 0.68rem;
    }

    .math-formula__editable-slot.is-fraction .math-formula__editable-slider {
        width: 3.5rem;
        min-width: 3.5rem;
        max-width: 3.5rem;
    }

    .math-formula__editable-slot.is-script .math-formula__editable-input,
    .math-formula__editable-slot.is-script .math-formula__editable-select {
        min-width: 1.05rem;
        max-width: 1.7rem;
        min-height: 0.95rem;
        padding: 0.02rem 0.12rem;
        font-size: 0.54rem;
    }

    .math-formula__editable-slot.is-script .math-formula__editable-slider {
        width: 2rem;
        min-width: 2rem;
        max-width: 2rem;
        height: 0.85rem;
    }

    .math-formula__editable-slot.is-root-index .math-formula__editable-input,
    .math-formula__editable-slot.is-root-index .math-formula__editable-select {
        min-width: 0.95rem;
        max-width: 1.45rem;
        min-height: 0.85rem;
        padding: 0.01rem 0.08rem;
        font-size: 0.5rem;
    }

    .math-formula__editable-slot.is-root-index .math-formula__editable-slider {
        width: 1.65rem;
        min-width: 1.65rem;
        max-width: 1.65rem;
        height: 0.8rem;
    }

    .math-formula__variables-grid {
        grid-template-columns: 1fr;
        padding: 0.35rem 0.45rem;
    }

    .math-formula__variable--external {
        display: grid;
        column-gap: 0;
    }

    .math-formula__variable--external .math-formula__variable-control {
        justify-content: flex-start;
    }

    .math-formula__variable-line {
        font-size: 0.94rem;
    }

    .math-formula__editable-slot.is-panel .math-formula__editable-input,
    .math-formula__editable-slot.is-panel .math-formula__editable-select {
        min-height: 2.1rem;
        padding: 0.28rem 0.58rem;
        font-size: 0.88rem;
    }

    .math-formula__editable-slot.is-panel .math-formula__editable-slider {
        height: 1.6rem;
    }

    .math-formula__editable-slot.is-panel .math-formula__editable-slider-value {
        min-width: 3rem;
    }
}

@media (max-width: 40rem) {
    .math-formula__variable-row {
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .math-formula__variable-content {
        row-gap: 0.28rem;
    }

    .math-formula__variable-selection {
        flex-basis: 100%;
        width: fit-content;
        max-width: 100%;
    }

    .math-formula__variable--external .math-formula__variable-control {
        margin-left: 0;
    }

    [data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row {
        grid-template-columns: 1fr;
    }

    [data-math-formula-auxiliary-variables] > .math-formula__variable--external > .math-formula__variable-row > .math-formula__variable-control {
        width: 100%;
        min-width: 0;
    }
}
