:root {
            --primary: #2563eb;
            --primary-light: #dbeafe;
            --primary-dark: #1d4ed8;
            --text-dark: #1e3a8a;
            --surface: #ffffff;
            --bg: #eff6ff;
            --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
        }

        

        

        

        

        

        

        

        

        

        body {
            background-color: var(--bg);
            transition: background-color 0.3s, color 0.3s;
        }

        .tool-page .tool-container {
            max-width: 900px;
            background: var(--surface);
            border-radius: 24px;
            box-shadow: 0 20px 40px -5px rgba(37, 99, 235, 0.1), 0 10px 20px -5px rgba(37, 99, 235, 0.04);
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.8);
        }

        .tool-cover {
            height: 200px;
            position: relative;
            background-color: var(--primary-light);
            /* Optimized local WebP background image */
            background-image: url('images/percentage_cover.webp');
            background-size: cover;
            background-position: center;
        }

        .tool-cover::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 1));
        }

        .tool-header {
            text-align: center;
            padding: 0 2rem 2rem;
            position: relative;
            z-index: 1;
            margin-top: -60px;
        }

        .tool-header .icon-wrapper {
            background: white;
            width: 80px;
            height: 80px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
            color: var(--primary);
            box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.8);
        }

        .tabs-header {
            display: flex;
            background: #f1f5f9;
            padding: 0.5rem;
            border-radius: 16px;
            margin: 0 2rem 2rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .tab-btn {
            flex: 1;
            min-width: 120px;
            padding: 0.8rem;
            border: none;
            background: transparent;
            font-family: var(--font-heading);
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 12px;
            font-size: 0.9rem;
        }

        .tab-btn:hover {
            color: var(--primary);
            background: rgba(255, 255, 255, 0.5);
        }

        .tab-btn[aria-selected="true"] {
            background: white;
            color: var(--primary);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            font-weight: 700;
        }

        .calc-panel {
            padding: 0 2rem 2rem;
            display: none;
        }

        .calc-panel.active {
            display: block;
            animation: fadeIn 0.3s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .formula-row {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 2rem;
            background: #f8fafc;
            padding: 2rem;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            position: relative;
        }

        .formula-text {
            font-size: 1.2rem;
            font-weight: 600;
            color: #334155;
        }

        .input-val {
            width: 140px;
            padding: 0.8rem;
            border: 2px solid #cbd5e1;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--primary-dark);
            text-align: center;
            transition: all 0.2s;
        }

        .input-val:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
            background: white;
        }

        .result-display {
            text-align: center;
            margin-top: 2rem;
            padding: 2rem;
            background: #eff6ff;
            border-radius: 16px;
            border: 1px solid #bfdbfe;
        }

        .result-value {
            font-size: 3rem;
            font-weight: 800;
            color: var(--primary-dark);
            font-family: var(--font-heading);
            line-height: 1;
            margin-bottom: 0.5rem;
        }

        .result-label {
            font-size: 1rem;
            color: #60a5fa;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 1px;
        }

        .clear-btn {
            display: block;
            margin: 1rem auto 0;
            background: transparent;
            border: 1px solid #cbd5e1;
            color: #64748b;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .clear-btn:hover {
            background: #f1f5f9;
            color: #334155;
            border-color: #94a3b8;
        }

        .seo-article {
            max-width: 900px;
            margin: 3rem auto;
            padding: 2.5rem;
            background: var(--surface);
            border-radius: 24px;
            box-shadow: 0 20px 40px -5px rgba(37, 99, 235, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.8);
            color: #334155;
            line-height: 1.8;
            font-family: var(--font-heading);
        }

        .seo-article h2 {
            color: var(--text-dark);
            font-size: 1.8rem;
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            font-weight: 700;
        }

        .seo-article h3 {
            color: var(--primary);
            font-size: 1.4rem;
            margin-top: 2rem;
            margin-bottom: 0.8rem;
            font-weight: 600;
        }

        .seo-article p {
            margin-bottom: 1.2rem;
            font-size: 1.05rem;
        }

        .seo-article ul {
            margin-bottom: 1.5rem;
            padding-left: 1.5rem;
        }

        .seo-article li {
            margin-bottom: 0.5rem;
            font-size: 1.05rem;
        }

        .seo-article strong {
            color: var(--text-dark);
        }

        .footer {
            margin-top: 4rem;
            text-align: center;
            color: #94a3b8;
        }

        .toast-notification {
            position: fixed;
            bottom: 24px;
            right: 24px;
            background: #334155;
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 0.9rem;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.3s, transform 0.3s;
            pointer-events: none;
            z-index: 1000;
        }

        .toast-notification.show {
            opacity: 1;
            transform: translateY(0);
        }