/* =========================================================
   Addition Style
========================================================= */
.f { 
        display: inline-table; 
        text-align: center; 
        vertical-align: 40%; 
        margin: 0 0.1rem; 
        border-collapse: collapse;
        text-indent:0; 
        /* line-height: 1; */
    }
    .f::before, .f::after { content: none; }
    .f u, .f em {
        display: table-row;
        text-align: center;
    }
    .f u { text-decoration: none; }
    .f em { font-style: normal; }
    .f u { 
        border-bottom: 0.1em solid currentColor; 
        font-size: 90%; 
        line-height: 140%;
    }
    .f em { 
        font-size: 90%; 
        line-height: 140%; 
    }
    .f em:before, .f em:after, .f strong:before, .f strong:after { content: "\2005";    }  /* 2005=unicode 1/4 em space  */

    /* =========================================================
   Two Column Layout (Image Left, Text Right)
========================================================= */
.calculator-two-column {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.calculator-col-img {
    flex: 0 0 220px;
    width: 220px;
    border-radius: 8px;
    overflow: hidden;
}

.calculator-col-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.calculator-col-text {
    flex: 1;
    min-width: 260px;
}

.calculator-col-text h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 2.4rem;
    color: var(--text-color);
}

.calculator-col-text p {
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .calculator-two-column {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .calculator-col-img {
        width: 100%;
        max-width: 240px;
    }
}

.math-container {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.2rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.frac {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            margin: 0 0.5rem;
        }

        .num {
            border-bottom: 1.5px solid var(--text-main);
            padding: 0 0.3rem;
            line-height: 1.2;
        }

        .den {
            padding: 0 0.3rem;
            line-height: 1.2;
        }

        .operator {
            font-weight: bold;
            color: var(--text-muted);
            margin: 0 0.3rem;
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
        }
        .textcenter {
  display: inline-table;;
  align-items: center;
}
.operation {
    font-weight: 600;
    color: var(--primary);
    font-size: 2rem;
}
.sub-op {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
    display: block;
}

        /* =========================================
           PURE CSS TABS LOGIC
           ========================================= */
        .calculatorcontainer {
            background-color: var(--card-bg);
            max-width: 900px;
            width: 100%;
        }   

        /* 1. radio button bawaan HTML */
        input[name="tab-group"] {
            display: none;
        }

        /* 2. Container tab */
        .tab-buttons {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 2rem;
            border-bottom: 1px solid var(--border);
            padding-bottom: 1.5rem;
        }

        /* 3. Style label button */
        .btn-tab {
            background-color: #F3F4F6;
            color: var(--text-muted);
            border: 1px solid var(--border);
            padding: 0.75rem 1.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.2s;
            min-width: 120px;
            text-align: center;
        }

        .btn-tab:hover {
            background-color: #E5E7EB;
            color: var(--text-main);
        }

        /* 4. (label) "checked" */
        #tab1:checked ~ .tab-buttons label[for="tab1"],
        #tab2:checked ~ .tab-buttons label[for="tab2"],
        #tab3:checked ~ .tab-buttons label[for="tab3"] {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
        }

        /* 5. hide default */
        .tab-content {
            display: none;
            animation: fadeIn 0.4s ease-in-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* 6. div radio button */
        #tab1:checked ~ .tab-content-wrapper .content-1,
        #tab2:checked ~ .tab-content-wrapper .content-2,
        #tab3:checked ~ .tab-content-wrapper .content-3 {
            display: block;
        }

        /* =========================================
           STYLE (PLACEHOLDER)
           ========================================= */
        .empty-state {
            color: var(--text-muted);
            background: #F9FAFB;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .tab-buttons {
                flex-direction: column;
                align-items: stretch;
            }
        }