@scope (#original-content) {

        /* Scoped styles to prevent conflicts with your site's theme */
        .sat-math-formulas-widget {
            --primary-color: #005a9c; /* A deep blue for a scholarly feel */
            --secondary-color: #eef5fa;
            --border-color: #d1e3f0;
            --shadow-color: rgba(0, 0, 0, 0.08);
            --text-color: #333;
            --heading-color: #003d6b;

            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            line-height: 1.7;
            background-color: #fff;
            color: var(--text-color);
            max-width: 900px;
            margin: 2rem auto;
            padding: 2.5rem;
            border-radius: 12px;
            box-shadow: 0 6px 20px var(--shadow-color);
            border: 1px solid var(--border-color);
        }

        .sat-math-formulas-widget .widget-title {
            font-family: Georgia, 'Times New Roman', Times, serif;
            color: var(--heading-color);
            text-align: center;
            margin-top: 0;
            margin-bottom: 2rem;
            font-size: 2.5rem;
            font-weight: 600;
        }

        .sat-math-formulas-widget .controls-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 1.5rem;
            margin-bottom: 2.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 2px solid var(--border-color);
        }

        .sat-math-formulas-widget #formulaSearchInput {
            padding: 0.8rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 1rem;
            flex-grow: 1;
            min-width: 250px;
            transition: border-color 0.3s, box-shadow 0.3s;
        }

        .sat-math-formulas-widget #formulaSearchInput:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2);
        }

        .sat-math-formulas-widget .category-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .sat-math-formulas-widget .filter-btn {
            padding: 0.6rem 1.2rem;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--primary-color);
            background-color: #fff;
            border: 1px solid var(--border-color);
            border-radius: 30px;
            cursor: pointer;
            transition: background-color 0.3s, color 0.3s, transform 0.2s;
        }

        .sat-math-formulas-widget .filter-btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
        }

        .sat-math-formulas-widget .filter-btn.active {
            background-color: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
        }

        .sat-math-formulas-widget .formulas-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 1.5rem;
        }

        .sat-math-formulas-widget .formula-card {
            background-color: var(--secondary-color);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 1.5rem;
            transition: transform 0.3s, box-shadow 0.3s;
            display: flex;
            flex-direction: column;
        }
        
        .sat-math-formulas-widget .formula-card.hidden {
            display: none;
        }

        .sat-math-formulas-widget .formula-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 15px var(--shadow-color);
        }

        .sat-math-formulas-widget .formula-name {
            font-family: Georgia, 'Times New Roman', Times, serif;
            font-size: 1.4rem;
            font-weight: 600;
            color: var(--heading-color);
            margin: 0 0 1rem 0;
        }

        .sat-math-formulas-widget .math-expression {
            background-color: #fff;
            padding: 1.25rem;
            border-radius: 8px;
            border: 1px solid #d1e3f0;
            text-align: center;
            font-size: 1.3em;
            font-weight: 500;
            color: #2c3e50;
            margin-bottom: 1rem;
            flex-grow: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .sat-math-formulas-widget .math-expression .variable {
            font-style: italic;
            color: #c0392b;
        }
        
        .sat-math-formulas-widget .formula-description {
            font-size: 0.95rem;
            color: #555;
        }
        
        /* --- Improved styles for mathematical expressions --- */
        .frac {
            display: inline-flex;
            flex-direction: column;
            vertical-align: middle;
            text-align: center;
            position: relative;
        }
        .frac > span {
            display: block;
            padding: 0.1em 0.3em;
        }
        .frac span.bottom {
            border-top: 1.5px solid #333;
        }
        
        .sqrt {
            display: inline-flex;
            align-items: center;
            vertical-align: middle;
        }
        .sqrt-symbol {
            font-size: 1.8em; /* Scale the radical symbol */
            line-height: 1;
            position: relative;
            top: 0.05em;
        }
        .radicand {
            border-top: 1.5px solid #333;
            padding: 0.2em 0.3em;
            margin-left: -0.2em; /* Pull radicand under the symbol arm */
        }
        /* --- End of improved styles --- */
    
}
