/* ==========================================================================
   Equivalency calculator — shared widget, full page, floating button + modal
   ========================================================================== */

.equiv-shell,
.equiv-shell *,
.equiv-card,
.equiv-card *,
.eqfab,
.eqfab *,
.eqfab-modal,
.eqfab-modal * {
    box-sizing: border-box;
}

.equiv-card [hidden],
.equiv-shell [hidden],
.eqfab-modal[hidden] {
    display: none !important;
}

/* ---------- Program switch (American / British / IB) ---------- */

.equiv-programs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin: 0 0 1rem;
    padding: 5px;
    border-radius: 18px;
    background: #F1F5FA;
}

.equiv-program {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    min-width: 0;
    padding: .6rem .5rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #3B5168;
    text-align: center;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}

.equiv-program strong {
    font-size: .9rem;
    font-weight: 800;
}

.equiv-program small {
    font-size: .7rem;
    font-weight: 600;
    color: #8397AA;
}

.equiv-program:not(:disabled):hover {
    background: #fff;
    color: #0A63C9;
}

.equiv-program.is-active {
    background: linear-gradient(135deg, #0AA0FB, #6F5BFF);
    color: #fff;
    box-shadow: 0 6px 16px rgba(58, 110, 250, .28);
}

.equiv-program.is-active small {
    color: rgba(255, 255, 255, .85);
}

.equiv-program:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.equiv-program:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .22);
}

@media (max-width: 480px) {
    .equiv-program strong {
        font-size: .8rem;
    }

    .equiv-program small {
        font-size: .64rem;
    }
}

.equiv-login-hint {
    margin: .6rem 0 0;
    font-size: .8rem;
    color: #5C7389;
    text-align: center;
}

.equiv-info {
    margin: 0 0 1.25rem;
    padding: .75rem 1rem;
    border-radius: 14px;
    background: #EEF6FF;
    color: #2D4A66;
    font-size: .84rem;
    line-height: 1.6;
}

/* ---------- Full page layout ---------- */

.equiv-page__body {
    padding: 0 0 4rem;
}

.equiv-page__grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

/* The calculator takes the full width (form tables sit side by side); the note card follows it. */
.equiv-aside-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    background: #fff;
    border: 1px solid rgba(31, 59, 100, .08);
    border-radius: 20px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 10px 34px rgba(31, 59, 100, .06);
}

.equiv-aside-card .equiv-disclaimer {
    flex: 1 1 24rem;
    margin: 0;
}

.equiv-aside-link {
    font-weight: 700;
    color: #0A7DF9;
    text-decoration: none;
}

.equiv-aside-link:hover {
    text-decoration: underline;
}

/* ---------- Card ---------- */

.equiv-card {
    background: #fff;
    border: 1px solid rgba(31, 59, 100, .08);
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 10px 34px rgba(31, 59, 100, .06);
    color: #11243A;
}

.equiv-card,
.equiv-form,
.equiv-result {
    scroll-margin-top: 110px;
}

.equiv-card--modal {
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.equiv-card--modal,
.equiv-card--modal .equiv-form,
.equiv-card--modal .equiv-result {
    scroll-margin-top: 0;
}

.equiv-fieldset {
    border: 0;
    margin: 0 0 1.5rem;
    padding: 0;
    min-width: 0;
}

.equiv-fieldset legend {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: auto;
    margin-bottom: .35rem;
    font-size: 1.02rem;
    font-weight: 800;
    color: #11243A;
}

.equiv-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0AA0FB, #6F5BFF);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.equiv-hint {
    margin: 0 0 1rem;
    font-size: .85rem;
    color: #5C7389;
}

.equiv-school-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: .85rem;
}

@media (max-width: 575px) {
    .equiv-school-grid {
        grid-template-columns: 1fr;
    }
}

.equiv-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    color: #3B5168;
}

.equiv-field input,
.equiv-field select,
.equiv-score-input {
    width: 100%;
    height: 46px;
    padding: 0 .85rem;
    border: 1.5px solid #DCE5EF;
    border-radius: 12px;
    background: #F8FBFE;
    color: #11243A;
    font-size: .95rem;
    font-weight: 600;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.equiv-field input:focus,
.equiv-field select:focus,
.equiv-score-input:focus {
    outline: 0;
    border-color: #0A7DF9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .12);
}

.equiv-field input:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* school average toggle (Count School Average: Yes / No) */
.equiv-school-toggle {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    border: 1.5px solid #DCE5EF;
    border-radius: 12px;
    background: #F8FBFE;
}

.equiv-school-toggle__label {
    font-size: .88rem;
    font-weight: 700;
    color: #3B5168;
}

.equiv-school-toggle__options {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* custom radio */
.equiv-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    font-size: .88rem;
    font-weight: 600;
    color: #3B5168;
    cursor: pointer;
    user-select: none;
}

.equiv-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.equiv-radio__box {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #C5D3E2;
    border-radius: 50%;
    background: #fff;
    transition: all .2s;
    flex-shrink: 0;
}

.equiv-radio__box::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform .2s cubic-bezier(.2, .9, .3, 1.4);
}

.equiv-radio input:checked + .equiv-radio__box {
    border-color: #0A7DF9;
    background: #0A7DF9;
}

.equiv-radio input:checked + .equiv-radio__box::after {
    transform: scale(1);
}

.equiv-radio input:focus-visible + .equiv-radio__box {
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .18);
}

.equiv-school-body {
    transition: opacity .2s ease;
}

.equiv-school-body[hidden] {
    display: none !important;
}

/* custom checkbox */
.equiv-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0;
    font-size: .88rem;
    font-weight: 600;
    color: #3B5168;
    cursor: pointer;
    user-select: none;
}

.equiv-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.equiv-check__box {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid #C5D3E2;
    border-radius: 7px;
    background: #fff;
    transition: all .2s;
    flex-shrink: 0;
}

.equiv-check__box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .2s cubic-bezier(.2, .9, .3, 1.4);
}

.equiv-check input:checked + .equiv-check__box {
    border-color: #0A7DF9;
    background: #0A7DF9;
}

.equiv-check input:checked + .equiv-check__box::after {
    transform: rotate(45deg) scale(1);
}

.equiv-check input:focus-visible + .equiv-check__box {
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .18);
}

/* ---------- Form sections (laid out like the MoE application form) ---------- */

/* "How it's counted" summary above the form */
.equiv-rules {
    display: flex;
    gap: .7rem;
    margin: 0 0 1.25rem;
    padding: .85rem 1rem;
    border: 1.5px solid #D6E6FA;
    border-radius: 14px;
    background: #F5F9FF;
    color: #2D4A66;
}

.equiv-rules svg {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: #0A7DF9;
    flex-shrink: 0;
}

.equiv-rules strong {
    display: block;
    margin-bottom: .15rem;
    font-size: .88rem;
    font-weight: 800;
    color: #11243A;
}

.equiv-rules p {
    margin: 0;
    font-size: .84rem;
    line-height: 1.65;
}

/* the counting rule of one section, under its title */
.equiv-sec__rule {
    position: relative;
    margin: 0 0 .6rem;
    padding-inline-start: 1rem;
    font-size: .8rem;
    line-height: 1.55;
    color: #4E6680;
}

.equiv-sec__rule::before {
    content: '';
    position: absolute;
    top: .5em;
    inset-inline-start: .2rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0A7DF9;
}

.equiv-form {
    container: equiv-form / inline-size;
}

/* two tables per line when there is room; wide sections take the whole line */
.equiv-sections {
    display: grid;
    gap: 0 1.25rem;
    align-items: start;
}

@container equiv-form (min-width: 680px) {
    .equiv-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.equiv-sec {
    --equiv-row-cols: 30px minmax(0, 1fr) auto 64px 38px;
    margin-bottom: 1.25rem;
}

.equiv-sec--wide {
    grid-column: 1 / -1;
}

.equiv-fieldset .equiv-sec__head {
    flex-wrap: wrap;
    width: 100%;
    line-height: 1.45;
}

.equiv-sec__title {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 1 auto;
    min-width: 0;
}

.equiv-sec__cashin {
    font-size: .74rem;
    font-weight: 600;
    color: #5C7389;
    line-height: 1.25;
    margin-top: .15rem;
}

.equiv-sec__scale {
    padding: .2rem .6rem;
    border-radius: 999px;
    background: #F1F5FA;
    color: #5C7389;
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}

.equiv-sec__count {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #FFF4DE;
    color: #8A5A00;
    font-size: .74rem;
    font-weight: 800;
    line-height: 24px;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.equiv-sec__count.is-done {
    background: #EAF8F0;
    color: #117A43;
}

.equiv-sec__table {
    overflow: hidden;
    border: 1.5px solid #E1E9F2;
    border-radius: 16px;
    background: #fff;
}

.equiv-sec__cols {
    display: grid;
    grid-template-columns: var(--equiv-row-cols);
    gap: .75rem;
    padding: .55rem .75rem;
    background: #F1F6FC;
    color: #5C7389;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.equiv-sec__cols span:nth-child(3) {
    min-width: 96px;
}

.equiv-sec__cols span:nth-child(4) {
    text-align: center;
}

.equiv-sec__add {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .6rem;
    padding: .45rem .85rem;
    border: 1.5px dashed #B9CDE3;
    border-radius: 999px;
    background: transparent;
    color: #0A63C9;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.equiv-sec__add:hover {
    border-color: #0A7DF9;
    background: #F2F8FF;
}

.equiv-sec__add:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .2);
}

.equiv-sec__add svg {
    width: 14px;
    height: 14px;
}

.equiv-subj {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto 38px;
    gap: .75rem;
    align-items: center;
    padding: .7rem .7rem .7rem 1rem;
    border: 1.5px solid #E6EEF6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(31, 59, 100, .04);
    transition: border-color .2s, background .2s;
    animation: equivRowIn .32s cubic-bezier(.2, .9, .3, 1.2) both;
}

[dir="rtl"] .equiv-subj {
    padding: .7rem 1rem .7rem .7rem;
}

/* form rows: a table line instead of a floating card */
.equiv-row,
[dir="rtl"] .equiv-row {
    grid-template-columns: var(--equiv-row-cols);
    min-height: 60px;
    padding: .55rem .75rem;
    border: 0;
    border-top: 1px solid #E6EEF6;
    border-radius: 0;
    box-shadow: none;
}

.equiv-row:first-child {
    border-top: 0;
}

.equiv-row > .equiv-row__num { grid-column: 1; }
.equiv-row > .equiv-row__subject { grid-column: 2; }
.equiv-row > .equiv-subj__control { grid-column: 3; min-width: 96px; }
.equiv-row > .equiv-subj__pct { grid-column: 4; min-width: 0; }
.equiv-row > .equiv-subj__remove { grid-column: 5; grid-row: 1; }
.equiv-row > .equiv-subj__msg { grid-column: 2 / -1; }

.equiv-row__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #F1F5FA;
    color: #5C7389;
    font-size: .78rem;
    font-weight: 800;
}

.equiv-row.is-ok .equiv-row__num {
    background: #17A55B;
    color: #fff;
}

.equiv-row__subject {
    min-width: 0;
}

.equiv-row__subject strong {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    color: #11243A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equiv-row__select {
    width: 100%;
    height: 44px;
    padding: 0 2.2rem 0 .85rem;
    border: 1.5px solid #DCE5EF;
    border-radius: 12px;
    background: #F8FBFE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C7389' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center / 14px;
    color: #11243A;
    font-size: .92rem;
    font-weight: 700;
    text-overflow: ellipsis;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

[dir="rtl"] .equiv-row__select {
    padding: 0 .85rem 0 2.2rem;
    background-position: left .75rem center;
}

.equiv-row.is-empty .equiv-row__select {
    color: #8397AA;
    font-weight: 600;
}

.equiv-row__select option {
    color: #11243A;
}

.equiv-row__select option:disabled {
    color: #A6B4C3;
}

.equiv-row.is-locked {
    background: #F7F9FC;
    border-style: dashed;
}

.equiv-row.is-locked .equiv-row__subject,
.equiv-row.is-locked .equiv-subj__control {
    opacity: .5;
}

.equiv-row.is-locked select,
.equiv-row.is-locked input,
.equiv-row.is-locked .equiv-seg__btn {
    cursor: not-allowed;
}

.equiv-sec__note {
    margin: .6rem 0 0;
    padding: .5rem .75rem;
    border-radius: 10px;
    background: #FFF6E5;
    color: #8A5A00;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.5;
}

.equiv-row__select:focus {
    outline: 0;
    border-color: #0A7DF9;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .12);
}

.equiv-row.is-ok {
    border-color: #E6EEF6;
}

.equiv-row.is-empty > .equiv-subj__control {
    display: none;
}

/*
 * Stacked row: the score control gets its own line under the subject.
 * Always for long grade pickers, for grade buttons in half-width tables, and for every row on phones.
 */
.equiv-row.is-wide > .equiv-row__subject { grid-column: 2 / 4; grid-row: 1; }
.equiv-row.is-wide > .equiv-subj__pct { grid-column: 4; grid-row: 1; }
.equiv-row.is-wide > .equiv-subj__control { grid-column: 2 / -1; grid-row: 2; min-width: 0; }

/*
 * Row layouts by table width. Set by JS (ResizeObserver) instead of container queries:
 * Chrome loses the layout of an inline-size container in this form when the rows below it change.
 */
.is-lt600 .equiv-sec__cols,
.is-lt600 .equiv-row,
[dir="rtl"] .is-lt600 .equiv-row {
    --equiv-row-cols: 26px minmax(0, 1fr) auto 60px 34px;
}

.is-lt600 .equiv-row,
[dir="rtl"] .is-lt600 .equiv-row {
    gap: .5rem .6rem;
    min-height: 0;
    padding: .6rem .65rem;
}

.is-lt600 .equiv-row > .equiv-subj__pct { padding: .3rem .2rem; font-size: .78rem; }
.is-lt600 .equiv-row > .equiv-subj__remove { justify-self: end; width: 34px; height: 34px; }

.is-lt600 .equiv-row.is-seg > .equiv-row__subject { grid-column: 2 / 4; grid-row: 1; }
.is-lt600 .equiv-row.is-seg > .equiv-subj__pct { grid-column: 4; grid-row: 1; }
.is-lt600 .equiv-row.is-seg > .equiv-subj__control { grid-column: 2 / -1; grid-row: 2; min-width: 0; }

.is-lt600 .equiv-row.is-seg .equiv-seg {
    display: flex;
    width: 100%;
}

.is-lt600 .equiv-row.is-seg .equiv-seg__btn {
    flex: 1;
    min-width: 0;
}

.is-lt440 .equiv-sec__cols span:nth-child(3) {
    visibility: hidden;
}

/* subject gets the whole first line; score and % share the second */
.is-lt440 .equiv-row > .equiv-row__subject,
.is-lt440 .equiv-row.is-seg > .equiv-row__subject,
.is-lt440 .equiv-row.is-wide > .equiv-row__subject { grid-column: 2 / 5; grid-row: 1; }
.is-lt440 .equiv-row.is-empty > .equiv-row__subject { grid-column: 2 / -1; }
.is-lt440 .equiv-row > .equiv-subj__control,
.is-lt440 .equiv-row.is-seg > .equiv-subj__control,
.is-lt440 .equiv-row.is-wide > .equiv-subj__control { grid-column: 1 / 4; grid-row: 2; min-width: 0; }
.is-lt440 .equiv-row > .equiv-subj__pct,
.is-lt440 .equiv-row.is-seg > .equiv-subj__pct,
.is-lt440 .equiv-row.is-wide > .equiv-subj__pct { grid-column: 4 / -1; grid-row: 2; }

.is-lt440 .equiv-row .equiv-score__input {
    flex: 1;
    width: auto;
}

.is-lt440 .equiv-row__subject strong {
    white-space: normal;
}

/* letter grades on one line, numeric grades (9–4) on the next */
.is-lt480 .equiv-row .equiv-seg__sep {
    flex-basis: 100%;
    height: 0;
    margin: 0;
}

.equiv-subj__pct {
    min-width: 58px;
    padding: .3rem .6rem;
    border-radius: 999px;
    background: #EAF8F0;
    color: #117A43;
    font-size: .85rem;
    font-weight: 800;
    text-align: center;
    animation: equivPop .3s cubic-bezier(.2, .9, .3, 1.5) both;
}

.equiv-subj__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9AAABB;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.equiv-subj__remove:hover {
    background: #FFF1F1;
    color: #E5484D;
}

.equiv-subj__remove svg {
    width: 16px;
    height: 16px;
}

.equiv-subj__msg {
    grid-column: 1 / -1;
    margin: -.25rem 0 0;
    font-size: .8rem;
    font-weight: 700;
}

.equiv-subj.is-ok {
    border-color: #BFE3CD;
}

.equiv-subj.is-warn,
.equiv-subj.is-dup {
    border-color: #F5D58A;
    background: #FFFCF3;
}

.equiv-subj.is-warn .equiv-subj__msg,
.equiv-subj.is-dup .equiv-subj__msg {
    color: #9A6200;
}

.equiv-subj.is-dup .equiv-subj__pct {
    background: #FFF1D6;
    color: #9A6200;
    text-decoration: line-through;
}

.equiv-subj.is-error {
    border-color: #F5B5B5;
    background: #FFF8F8;
}

.equiv-subj.is-error .equiv-subj__msg {
    color: #C53030;
}

.equiv-subj.is-error .equiv-score__input {
    border-color: #E5484D;
}

/* number score with "/ max" suffix */
.equiv-score {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.equiv-score__input {
    width: 96px;
    height: 44px;
    padding: 0 .75rem;
    border: 1.5px solid #DCE5EF;
    border-radius: 12px;
    background: #F8FBFE;
    color: #11243A;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.equiv-score__input::-webkit-outer-spin-button,
.equiv-score__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.equiv-score__input::placeholder {
    font-size: .8rem;
    font-weight: 600;
    color: #A3B3C3;
}

.equiv-score__input:focus {
    outline: 0;
    border-color: #0A7DF9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(10, 125, 249, .12);
}

.equiv-score__max {
    font-size: .82rem;
    font-weight: 700;
    color: #8397AA;
    white-space: nowrap;
}

/* tap buttons for AP 1–5 and GCE A*–E */
.equiv-seg {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #F1F5FA;
}

.equiv-seg__btn {
    min-width: 38px;
    height: 36px;
    padding: 0 .5rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #3B5168;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s, transform .15s;
}

.equiv-seg__sep {
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: #D3DEEA;
}

.equiv-seg__btn:hover {
    background: #fff;
    color: #0A63C9;
}

.equiv-seg__btn:active {
    transform: scale(.92);
}

.equiv-seg__btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(10, 125, 249, .3);
}

.equiv-seg__btn[aria-checked="true"] {
    background: linear-gradient(135deg, #0AA0FB, #6F5BFF);
    color: #fff;
    box-shadow: 0 4px 12px rgba(58, 110, 250, .3);
}

.equiv-field,
.equiv-subj {
    scroll-margin: 120px 0 24px;
}

.equiv-card--modal .equiv-field,
.equiv-card--modal .equiv-subj {
    scroll-margin: 12px 0;
}

@media (max-width: 767px) {
    .equiv-field input,
    .equiv-score__input,
    .equiv-row__select {
        font-size: 16px;
    }
}


.equiv-error {
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: #FFF1F1;
    color: #C53030;
    font-size: .88rem;
    font-weight: 600;
}

.equiv-error ul,
.equiv-notes {
    margin: .5rem 0 0;
    padding-inline-start: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
}

.equiv-notes {
    margin: 0 0 1.25rem;
    padding: .75rem 1rem .75rem 2rem;
    border-radius: 12px;
    background: #FFF8E6;
    color: #8A5A00;
    font-size: .85rem;
}

[dir="rtl"] .equiv-notes {
    padding: .75rem 2rem .75rem 1rem;
}

.equiv-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0AA0FB 0%, #0A7DF9 50%, #6F5BFF 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px -10px rgba(10, 125, 249, .65);
    transition: background-position .5s, transform .2s, box-shadow .2s;
}

.equiv-submit:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -10px rgba(111, 91, 255, .6);
}

.equiv-submit svg {
    width: 20px;
    height: 20px;
}

.equiv-submit:disabled {
    cursor: wait;
    opacity: .85;
}

.equiv-submit.is-loading svg {
    animation: equivSpin .9s linear infinite;
}

/* ---------- Toolbar, undo, live feedback, status ---------- */

.equiv-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.equiv-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 38px;
    padding: 0 .95rem;
    border: 1.5px solid #DCE5EF;
    border-radius: 999px;
    background: #fff;
    color: #3B5168;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.equiv-chip-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.equiv-chip-btn:hover {
    border-color: #0A7DF9;
    background: #F2F8FF;
    color: #0A7DF9;
    transform: translateY(-1px);
}

.equiv-chip-btn--danger:hover {
    border-color: #E5484D;
    background: #FFF1F1;
    color: #E5484D;
}

.equiv-chip-btn--danger:hover svg {
    animation: equivSpinBack .6s ease;
}

.equiv-undo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: -.5rem 0 1.25rem;
    padding: .65rem .65rem .65rem 1rem;
    border-radius: 14px;
    background: #11243A;
    color: #fff;
    font-size: .86rem;
    font-weight: 600;
}

.equiv-undo.is-visible {
    animation: equivResultIn .3s ease both;
}

.equiv-undo button {
    height: 32px;
    padding: 0 .9rem;
    border: 0;
    border-radius: 999px;
    background: #FFC53D;
    color: #11243A;
    font-weight: 800;
    cursor: pointer;
}

.equiv-school-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.equiv-school-avg {
    padding: .3rem .8rem;
    border-radius: 999px;
    background: #EAF4FF;
    color: #0A63C9;
    font-size: .84rem;
    font-weight: 600;
}

.equiv-kbd-hint {
    margin: .6rem 0 0;
    font-size: .76rem;
    color: #8397AA;
}

@media (hover: none) {
    .equiv-kbd-hint {
        display: none;
    }
}

.equiv-status {
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border: 1.5px solid #E6EEF6;
    border-radius: 16px;
    background: #F9FBFE;
    transition: border-color .25s, background .25s;
}

.equiv-status.is-ready {
    border-color: #BFE3CD;
    background: #F2FBF6;
}

.equiv-status.is-warn {
    border-color: #F5D58A;
    background: #FFFAEE;
}

.equiv-status.is-flash {
    animation: equivShake .45s ease;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .35);
}

.equiv-status__chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: .5rem;
    margin-bottom: .65rem;
}

.equiv-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .45rem .3rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #E6EEF6;
    color: #8397AA;
    transition: color .2s, box-shadow .2s;
}

.equiv-stat small {
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}

.equiv-stat strong {
    font-size: 1.05rem;
    font-weight: 900;
}

.equiv-stat.is-on {
    color: #0A63C9;
    box-shadow: inset 0 0 0 1.5px #9CC3F2;
}

.equiv-status__text {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    color: #3B5168;
}

.equiv-status.is-ready .equiv-status__text {
    color: #117A43;
}

.equiv-status.is-warn .equiv-status__text {
    color: #8A5A00;
}

.equiv-result.is-stale .equiv-result__hero,
.equiv-result.is-stale .equiv-table-wrap {
    opacity: .5;
    filter: grayscale(.4);
    transition: opacity .3s, filter .3s;
}

.equiv-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

/* ---------- Result ---------- */

.equiv-result {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #DCE5EF;
    outline: 0;
}

.equiv-result.is-visible {
    animation: equivResultIn .5s cubic-bezier(.2, .9, .3, 1.1) both;
}

.equiv-result__hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: radial-gradient(circle at 0 0, rgba(10, 160, 251, .12), transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(111, 91, 255, .12), transparent 55%),
                #F7FAFE;
}

.equiv-ring {
    position: relative;
    width: 128px;
    height: 128px;
    flex-shrink: 0;
}

.equiv-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.equiv-ring__track,
.equiv-ring__bar {
    fill: none;
    stroke-width: 10;
}

.equiv-ring__track {
    stroke: #E3EBF4;
}

.equiv-ring__bar {
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1);
}

.equiv-ring__value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    direction: ltr;
    font-size: 1.85rem;
    font-weight: 900;
    color: #11243A;
    font-variant-numeric: tabular-nums;
}

.equiv-ring__value small {
    font-size: .9rem;
    font-weight: 800;
    color: #5C7389;
}

.equiv-result__meta {
    flex: 1;
    min-width: 200px;
}

.equiv-result__meta p {
    margin: 0 0 .4rem;
    font-size: .9rem;
    color: #3B5168;
}

.equiv-result__title {
    font-size: 1.1rem !important;
    font-weight: 800;
    color: #11243A !important;
}

.equiv-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    background: #EEF1FF;
    color: #3B3F9E;
}

.equiv-badge--scientific {
    background: #E7F9EF;
    color: #117A43;
}

.equiv-badge--literary {
    background: #F1ECFF;
    color: #5B3FD1;
}

.equiv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.equiv-badge[hidden] {
    display: none;
}

.equiv-badge--grade {
    background: #FFF4DE;
    color: #8A5A00;
}

.equiv-result__subtitle {
    margin: 0 0 .75rem;
    font-size: .95rem;
    font-weight: 800;
    color: #11243A;
}

.equiv-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid #E6EEF6;
    border-radius: 14px;
}

.equiv-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: .88rem;
}

.equiv-table th,
.equiv-table td {
    padding: .65rem .85rem;
    text-align: start;
    border-bottom: 1px solid #EEF3F8;
}

.equiv-table th {
    background: #F7FAFE;
    font-size: .78rem;
    font-weight: 800;
    color: #5C7389;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.equiv-table tr:last-child td {
    border-bottom: 0;
}

.equiv-pct {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 8px;
    background: #EAF4FF;
    color: #0A63C9;
    font-weight: 800;
}

.equiv-options-details {
    margin-bottom: 1rem;
    border: 1px solid #E6EEF6;
    border-radius: 14px;
    padding: .75rem 1rem;
}

.equiv-options-details summary {
    cursor: pointer;
    font-weight: 800;
    color: #11243A;
}

.equiv-options-list {
    list-style: none;
    margin: .75rem 0 0;
    padding: 0;
}

.equiv-options-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem .6rem;
    border-radius: 10px;
    font-size: .86rem;
}

.equiv-options-list li.is-best {
    background: #EAF4FF;
    font-weight: 700;
    color: #0A63C9;
}

.equiv-disclaimer {
    margin: 0 0 1rem;
    font-size: .8rem;
    line-height: 1.55;
    color: #6B8095;
}

.num {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ==========================================================================
   Floating action button
   ========================================================================== */

.eqfab {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1040;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(24px) scale(.6);
    transition: opacity .45s ease, transform .55s cubic-bezier(.2, .9, .3, 1.35);
    pointer-events: none;
}

.eqfab.is-ready {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.eqfab.is-ready.is-hidden {
    opacity: 0;
    transform: scale(.4) rotate(-20deg);
    pointer-events: none;
}

/* Nothing keeps animating on a button that is hidden behind the pop-up. */
.eqfab.is-hidden *,
.eqfab.is-hidden *::before,
.eqfab.is-hidden *::after {
    animation-play-state: paused !important;
}

@media (pointer: coarse) {
    .eqfab.is-ready.is-typing {
        opacity: 0;
        transform: translateY(24px) scale(.6);
        pointer-events: none;
    }
}

.eqfab__btn {
    position: relative;
    width: 66px;
    height: 66px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.eqfab__btn:focus-visible {
    outline: 3px solid rgba(10, 125, 249, .45);
    outline-offset: 4px;
}

.eqfab__core {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(140deg, #0AA0FB 0%, #0A7DF9 45%, #6F5BFF 100%);
    box-shadow: 0 14px 30px -8px rgba(10, 125, 249, .7),
                inset 0 2px 0 rgba(255, 255, 255, .35),
                inset 0 -6px 14px rgba(40, 20, 140, .25);
    animation: eqfabFloat 3.2s ease-in-out infinite;
    transition: transform .3s cubic-bezier(.2, .9, .3, 1.4), box-shadow .3s;
    overflow: hidden;
}

/*
 * The shine is a wide strip that slides across the button (clipped by the round core). It used to
 * move its background-position, which cannot run on the GPU and kept every page with the button
 * repainting; a transform does the same sweep for free.
 */
.eqfab__core::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250%;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-90%);
    animation: eqfabShine 4.5s ease-in-out infinite;
    pointer-events: none;
}

.eqfab__btn:hover .eqfab__core {
    transform: scale(1.1) rotate(-8deg);
    box-shadow: 0 18px 36px -8px rgba(111, 91, 255, .75),
                inset 0 2px 0 rgba(255, 255, 255, .35),
                inset 0 -6px 14px rgba(40, 20, 140, .25);
}

.eqfab__btn:active .eqfab__core {
    transform: scale(.94);
}

.eqfab__ring {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 50%;
    border: 2px solid rgba(10, 160, 251, .55);
    animation: eqfabPulse 2.6s cubic-bezier(.2, .6, .3, 1) infinite;
}

.eqfab__ring--2 {
    animation-delay: 1.3s;
    border-color: rgba(111, 91, 255, .5);
}

.eqfab__icon {
    position: relative;
    width: 34px;
    height: 34px;
}

.eqfab__body {
    fill: rgba(255, 255, 255, .14);
    stroke: #fff;
    stroke-width: 2;
}

.eqfab__screen {
    fill: #fff;
}

.eqfab__cursor {
    fill: #0A7DF9;
    animation: eqfabBlink 1s steps(1) infinite;
}

.eqfab__key {
    fill: #fff;
    transform-box: fill-box;
    transform-origin: center;
    animation: eqfabKey 2.8s ease-in-out infinite;
}

.eqfab__key--1 { animation-delay: 0s; }
.eqfab__key--5 { animation-delay: .25s; }
.eqfab__key--3 { animation-delay: .5s; }
.eqfab__key--4 { animation-delay: .75s; }
.eqfab__key--2 { animation-delay: 1s; }
.eqfab__key--6 { animation-delay: 1.25s; }
.eqfab__key--7 { animation-delay: 1.5s; }
.eqfab__key--8 { animation-delay: 1.75s; fill: #FFC53D; }

.eqfab__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2.5px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFC53D, #FF8A1F);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(255, 138, 31, .5);
    animation: eqfabBadge 3.6s ease-in-out infinite;
}

.eqfab__tip {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: .6rem .95rem;
    border-radius: 14px;
    background: #fff;
    color: #11243A;
    white-space: nowrap;
    box-shadow: 0 14px 34px -10px rgba(17, 36, 58, .35);
    opacity: 0;
    transform: translate(-10px, -50%);
    transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1.3);
    pointer-events: none;
}

.eqfab__tip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 2px;
    transform: translateY(-50%) rotate(45deg);
}

.eqfab__tip strong {
    font-size: .88rem;
    font-weight: 800;
}

.eqfab__tip small {
    font-size: .75rem;
    color: #5C7389;
}

.eqfab__btn:hover + .eqfab__tip,
.eqfab__btn:focus-visible + .eqfab__tip {
    opacity: 1;
    transform: translate(0, -50%);
}

.eqfab.is-ready .eqfab__tip {
    animation: eqfabPeek 4.2s 1s ease backwards;
}

@media (max-width: 575px) {
    .eqfab {
        left: 16px;
        bottom: 16px;
    }

    .eqfab__btn {
        width: 58px;
        height: 58px;
    }

    .eqfab__icon {
        width: 30px;
        height: 30px;
    }

    .eqfab__tip small {
        display: none;
    }
}

/* ==========================================================================
   Modal
   ========================================================================== */

html.eqfab-lock,
html.eqfab-lock body {
    overflow: hidden !important;
}

.eqfab-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* A plain dark veil: blurring the whole page behind it had to be redone on every frame. */
.eqfab-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 22, 40, .72);
    opacity: 0;
    transition: opacity .3s ease;
}

.eqfab-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(780px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 40px 90px -20px rgba(9, 22, 40, .55);
    opacity: 0;
    transform: translate(-40px, 40px) scale(.92);
    transform-origin: bottom left;
    transition: opacity .3s ease, transform .4s cubic-bezier(.2, .9, .3, 1.15);
}

.eqfab-modal.is-open .eqfab-modal__backdrop {
    opacity: 1;
}

.eqfab-modal.is-open .eqfab-modal__dialog {
    opacity: 1;
    transform: none;
}

.eqfab-modal__head {
    position: relative;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.25rem 1.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #0AA0FB 0%, #0A7DF9 45%, #6F5BFF 100%);
    color: #fff;
    flex-shrink: 0;
}

.eqfab-modal__head::before,
.eqfab-modal__head::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    pointer-events: none;
}

.eqfab-modal__head::before {
    width: 180px;
    height: 180px;
    top: -90px;
    inset-inline-end: 40px;
}

.eqfab-modal__head::after {
    width: 110px;
    height: 110px;
    bottom: -60px;
    inset-inline-end: -20px;
}

.eqfab-modal__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
    flex-shrink: 0;
}

.eqfab-modal__icon svg {
    width: 26px;
    height: 26px;
}

.eqfab-modal__titles {
    position: relative;
    flex: 1;
    min-width: 0;
}

.eqfab-modal__titles h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.eqfab-modal__titles p {
    margin: .15rem 0 0;
    font-size: .82rem;
    color: rgba(255, 255, 255, .85);
}

.eqfab-modal__close {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .3s;
    flex-shrink: 0;
}

.eqfab-modal__close:hover {
    background: rgba(255, 255, 255, .3);
    transform: rotate(90deg);
}

.eqfab-modal__close svg {
    width: 18px;
    height: 18px;
}

.eqfab-modal__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.eqfab-modal__full {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-size: .85rem;
    font-weight: 700;
    color: #0A7DF9;
    text-decoration: none;
}

.eqfab-modal__full:hover {
    text-decoration: underline;
}

@media (max-width: 575px) {
    .eqfab-modal {
        align-items: flex-end;
        padding: 0;
    }

    .eqfab-modal__dialog {
        width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 26px 26px 0 0;
        transform: translateY(100%);
    }

    .eqfab-modal__head {
        padding: 1.1rem 1.1rem;
    }

    .eqfab-modal__body {
        padding: 1.1rem;
    }
}

/* ---------- Keyboard open: the sheet follows the visible area above the keyboard ---------- */

.eqfab-modal.is-keyboard {
    inset: auto 0;
    top: var(--eqfab-vv-top, 0px);
    height: var(--eqfab-vv-height, 100%);
    align-items: stretch;
    padding: 0;
}

.eqfab-modal.is-keyboard .eqfab-modal__dialog {
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
    transition: opacity .3s ease;
}

.eqfab-modal.is-keyboard .eqfab-modal__head {
    gap: .6rem;
    padding: .5rem .75rem;
}

.eqfab-modal.is-keyboard .eqfab-modal__head::before,
.eqfab-modal.is-keyboard .eqfab-modal__head::after,
.eqfab-modal.is-keyboard .eqfab-modal__icon,
.eqfab-modal.is-keyboard .eqfab-modal__titles p,
.eqfab-modal.is-keyboard .eqfab-modal__full,
.eqfab-modal.is-keyboard .equiv-kbd-hint,
.eqfab-modal.is-keyboard .equiv-toolbar,
.eqfab-modal.is-keyboard .equiv-hint {
    display: none;
}

.eqfab-modal.is-keyboard .eqfab-modal__titles h2 {
    font-size: .98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eqfab-modal.is-keyboard .eqfab-modal__close {
    width: 34px;
    height: 34px;
}

.eqfab-modal.is-keyboard .eqfab-modal__body {
    padding: .75rem .85rem 1.25rem;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes eqfabFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -5px; }
}

@keyframes eqfabPulse {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.75); opacity: 0; }
}

@keyframes eqfabShine {
    0%, 60% { transform: translateX(-90%); }
    100% { transform: translateX(60%); }
}

@keyframes eqfabBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes eqfabKey {
    0%, 100% { opacity: .55; transform: scale(1); }
    8% { opacity: 1; transform: scale(1.35); }
    16% { opacity: .55; transform: scale(1); }
}

@keyframes eqfabBadge {
    0%, 70%, 100% { transform: scale(1) rotate(0); }
    76% { transform: scale(1.25) rotate(-14deg); }
    82% { transform: scale(1.1) rotate(12deg); }
    88% { transform: scale(1.15) rotate(-6deg); }
}

@keyframes eqfabPeek {
    0% { opacity: 0; transform: translate(-10px, -50%); }
    10%, 85% { opacity: 1; transform: translate(0, -50%); }
    100% { opacity: 0; transform: translate(-10px, -50%); }
}

@keyframes equivRowIn {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes equivPop {
    from { opacity: 0; transform: scale(.5); }
    to { opacity: 1; transform: none; }
}

@keyframes equivFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@keyframes equivResultIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes equivSpin {
    to { transform: rotate(360deg); }
}

@keyframes equivSpinBack {
    to { transform: rotate(-360deg); }
}

@keyframes equivShake {
    0%, 100% { translate: 0 0; }
    20%, 60% { translate: -6px 0; }
    40%, 80% { translate: 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .eqfab *,
    .eqfab,
    .eqfab-modal *,
    .equiv-card * {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}

.equiv-core { margin-top: 16px; }
.equiv-core__toggle { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.equiv-core__body { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 10px; }
.equiv-core__field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.equiv-core__field select { padding: 8px 10px; border-radius: 8px; border: 1px solid #d0d5dd; background: #fff; }
.equiv-core__points { margin: 0; }
