/*  Tabs  */
.modo-tab {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--color-border, #e5e7eb);
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.modo-tab:hover {
    border-color: #2563eb;
    color: black;
}

.modo-tab-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.modo-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/*  Entrada visual de fracción  */
.frac-input-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.frac-num,
.frac-den {
    width: 72px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.3rem 0.4rem;
    border: 2px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    background: var(--color-bg, #fff);
    color: var(--color-text, #111827);
    font-family: inherit;
    transition: border-color .18s;
    -moz-appearance: textfield;
}

.frac-num:focus,
.frac-den:focus {
    border-color: #2563eb;
    outline: none;
}

.frac-num::-webkit-inner-spin-button,
.frac-den::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.frac-line {
    width: 72px;
    height: 3px;
    background: var(--color-text, #111827);
    border-radius: 2px;
}

/*  Símbolo operación  */
.op-simbol {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
    user-select: none;
}

/*  Resultado visual  */
.frac-result-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
}

.frac-res-num,
.frac-res-den {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-align: center;
    min-width: 60px;
}

.frac-result-wrap .frac-line {
    background: #2563eb;
}

/*  Paso a paso  */
.paso-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: var(--color-bg-subtle, #f9fafb);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text, #374151);
}

.paso-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.paso-txt code {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.88rem;
}