
        /*
         * Color tokens below are pulled from the Myanas theme's own palette
         * (inc/design-tokens.php) instead of a standalone red/cyan scheme, so
         * this tool visually matches the rest of the site. Values are stored
         * as "H S% L%" triplets (the format hsl(var(--x)) / Tailwind's CDN
         * config expects) rather than hex, but they map 1:1 to the theme's
         * colors:
         *   --background      -> --bg-deep
         *   --foreground      -> --text-primary
         *   --card / --muted  -> --bg-surface / --bg-elevated
         *   --primary         -> --cyan-bright (theme.json "Primary")
         *   --accent          -> --coral-bright (theme.json "Accent")
         *   --border / --input -> derived from --text-secondary
         *
         * This block is the dark-mode (default) palette, matching the
         * theme's default state. The light-mode override further down
         * responds to html[data-theme="light"], the same attribute the
         * theme's toggle (myanas_dark_mode_toggle_button) sets.
         */
        .ashraf-elec-calc {
            --background: 224 86% 8%;
            --foreground: 224 100% 97%;
            --card: 222 47% 13%;
            --card-foreground: 224 100% 97%;
            --primary: 173 100% 45%;
            --primary-foreground: 224 86% 8%;
            --accent: 0 100% 58%;
            --accent-foreground: 224 100% 97%;
            --muted: 221 89% 10%;
            --muted-foreground: 225 20% 61%;
            --border: 225 22% 24%;
            --input: 225 22% 24%;
            --ring: 173 100% 45%;
            --radius: 0.75rem;
            color-scheme: dark;
        }
        /* Light mode — mirrors the theme's html[data-theme="light"] palette */
        html[data-theme="light"] .ashraf-elec-calc {
            --background: 200 100% 99%;
            --foreground: 220 49% 8%;
            --card: 0 0% 100%;
            --card-foreground: 220 49% 8%;
            --primary: 177 100% 28%;
            --primary-foreground: 0 0% 100%;
            --accent: 355 84% 62%;
            --accent-foreground: 0 0% 100%;
            --muted: 216 100% 98%;
            --muted-foreground: 217 33% 27%;
            --border: 220 20% 85%;
            --input: 220 20% 85%;
            --ring: 177 100% 28%;
            color-scheme: light;
        }
        .ashraf-elec-calc {
            font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
            color: hsl(var(--foreground));
        }
        /*
         * Browsers don't inherit `color` onto form controls, and since this
         * theme's dark/light mode is a manual data-theme toggle (not
         * prefers-color-scheme), the browser has no way to know it should
         * flip an input's native text color on its own. Without this, inputs
         * kept their default (usually black) text color while --background
         * went dark, making anything typed effectively invisible.
         */
        .ashraf-elec-calc input,
        .ashraf-elec-calc select,
        .ashraf-elec-calc textarea {
            color: hsl(var(--foreground));
        }
        .ashraf-elec-calc input::placeholder,
        .ashraf-elec-calc textarea::placeholder {
            color: hsl(var(--muted-foreground));
            opacity: 1;
        }
        .ashraf-elec-calc h1, .ashraf-elec-calc h2, .ashraf-elec-calc h3 {
            font-family: var(--font-display, 'Inter'), ui-sans-serif, system-ui, sans-serif;
        }
        .ashraf-elec-calc .icon {
            display: inline-block;
            vertical-align: middle;
        }
        .ashraf-elec-calc select.trigger {
            appearance: none;
            -webkit-appearance: none;
            background-image: none;
        }
        /*
         * Tailwind's preflight (base reset) is intentionally disabled for
         * this tool (see tailwind.config.js) so it doesn't strip default
         * heading/list/margin styles from the rest of the site. But that
         * also means plain <button> elements fall back to the browser's
         * own default chrome (solid grey background, borders) unless they
         * carry an explicit bg/border class. This restores a neutral,
         * theme-aware baseline for every button in the tool.
         */
        .ashraf-elec-calc button {
            background: transparent;
            border: none;
            font: inherit;
            color: inherit;
            cursor: pointer;
            -webkit-appearance: none;
            appearance: none;
        }
        .ashraf-elec-calc .faq-panel {
            max-height: 0;
            overflow: hidden;
            transition: max-height .25s ease;
        }
        .ashraf-elec-calc .faq-item.open .faq-panel {
            max-height: 260px;
        }
        .ashraf-elec-calc .faq-item.open .chev {
            transform: rotate(0deg);
            color: hsl(var(--primary));
        }
        .ashraf-elec-calc /* hero illustration animations */
        .hero-sun-rays {
            animation: hero-spin 14s linear infinite;
        }
        @keyframes hero-spin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }
        .ashraf-elec-calc .hero-fade {
            opacity: 0;
            animation: hero-fade-in .6s ease forwards;
        }
        @keyframes hero-fade-in {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        .ashraf-elec-calc .hero-bill-in {
            opacity: 0;
            transform: rotate(-6deg) scale(.96);
            animation: hero-bill .6s ease .25s forwards;
        }
        @keyframes hero-bill {
            from {
                opacity: 0;
                transform: rotate(-6deg) scale(.96);
            }
            to {
                opacity: 1;
                transform: rotate(2deg) scale(1);
            }
        }
        .ashraf-elec-calc .hero-line-draw {
            stroke-dasharray: 1px 1px;
            stroke-dashoffset: 1px;
            animation: hero-draw 1.2s ease .9s forwards;
        }
        @keyframes hero-draw {
            from {
                stroke-dashoffset: 1px;
            }
            to {
                stroke-dashoffset: 0px;
            }
        }
        .ashraf-elec-calc .hero-blink {
            animation: hero-blink 1.8s ease-in-out infinite;
        }
        @keyframes hero-blink {
            0%,
            100% {
                opacity: .5;
            }
            50% {
                opacity: 1;
            }
        }
        .ashraf-elec-calc .hero-float {
            animation: hero-float 3.2s ease-in-out infinite;
        }
        @keyframes hero-float {
            0%,
            100% {
                opacity: .35;
                transform: translateY(0);
            }
            50% {
                opacity: .9;
                transform: translateY(-4px);
            }
        }

        .ashraf-elec-calc .bar-grow {
            transform-origin: left;
            transform: scaleX(0);
            transition: transform .9s cubic-bezier(.4, 0, .2, 1);
            transition-delay: var(--d, 0s);
        }
        .ashraf-elec-calc .bar-grow.in-view {
            transform: scaleX(1);
        }
        /*
         * The "High usage / Top slab" progress bar fill relies on Tailwind's
         * JIT-generated .bg-accent utility. Pinning it here with the theme's
         * own --accent variable guarantees the red fill always renders, even
         * if the Tailwind CDN class isn't available/loaded in time.
         */
        .ashraf-elec-calc .bar-grow.bg-accent {
            background: hsl(var(--accent));
        }
        .ashraf-elec-calc .card-enter {
            opacity: 0;
            transform: translateY(28px);
            transition: opacity .7s ease, transform .7s ease;
            transition-delay: var(--d, 0s);
        }
        .ashraf-elec-calc .card-enter.in-view {
            opacity: 1;
            transform: translateY(0);
        }

        .ashraf-elec-calc /* CTA buttons row */
        .cta-row {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
            padding: 0.5rem 0 0.25rem;
        }
        .ashraf-elec-calc .cta-row .cta-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.55rem 1.4rem;
            border-radius: 9999px;
            font-weight: 600;
            font-size: 0.9rem;
            text-decoration: none;
            transition: all .2s;
            border: 2px solid transparent;
            background: hsl(var(--primary));
            color: hsl(var(--primary-foreground));
            box-shadow: 0 2px 14px hsl(var(--primary) / 0.35);
        }
        .ashraf-elec-calc .cta-row .cta-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 24px hsl(var(--primary) / 0.5);
            filter: brightness(1.05);
        }
        .ashraf-elec-calc .cta-row .cta-btn-outline {
            background: transparent;
            color: hsl(var(--accent));
            border-color: hsl(var(--accent));
            box-shadow: none;
        }
        .ashraf-elec-calc .cta-row .cta-btn-outline:hover {
            background: hsl(var(--accent));
            color: hsl(var(--accent-foreground));
            box-shadow: 0 6px 24px hsl(var(--accent) / 0.35);
        }
        @media (max-width: 480px) {
            .ashraf-elec-calc .cta-row {
                gap: 0.6rem;
            }
            .ashraf-elec-calc .cta-row .cta-btn {
                padding: 0.4rem 1rem;
                font-size: 0.75rem;
                gap: 0.3rem;
            }
            .ashraf-elec-calc .cta-row .cta-btn svg {
                width: 14px;
                height: 14px;
            }
        }

        .ashraf-elec-calc /* ---- Sub-meter styles (minimal, .ashraf-elec-calc uses Tailwind where possible) ---- */
        .submeter-wrap .field input:focus {
            outline: none;
            border-color: hsl(var(--primary));
            box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
        }
        /*
         * "সাব-মিটার যোগ করুন" (add-btn) was relying on Tailwind's
         * bg-accent / text-accent-foreground utilities, which rendered
         * transparent when the Tailwind CDN class wasn't picked up in time.
         * Pinning the colors here with the theme's own variables guarantees
         * a solid red button regardless.
         */
        .ashraf-elec-calc .add-btn {
            background: hsl(var(--accent));
            color: hsl(var(--accent-foreground));
            border: none;
            cursor: pointer;
        }
        .ashraf-elec-calc .add-btn:hover {
            filter: brightness(1.1);
        }
        .ashraf-elec-calc .submeter-wrap .user-row.main-user {
            background: hsl(var(--accent) / 0.1);
            border: 1px solid hsl(var(--accent) / 0.3);
        }
        .ashraf-elec-calc .submeter-wrap .user-row.main-user .name-input, .ashraf-elec-calc .submeter-wrap .user-row.main-user .unit-input {
            background: hsl(var(--muted));
            cursor: not-allowed;
            opacity: .7;
        }
        .ashraf-elec-calc .submeter-wrap .user-badge {
            font-size: .6rem;
            font-weight: 700;
            text-transform: uppercase;
            color: hsl(var(--accent));
            background: hsl(var(--accent) / 0.16);
            padding: 2px 8px;
            border-radius: 20px;
            margin-right: 4px;
        }
        .ashraf-elec-calc .submeter-wrap .submeter-section {
            display: none;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px dashed hsl(var(--border));
        }
        .ashraf-elec-calc .submeter-wrap .submeter-section.visible {
            display: block;
        }
        .ashraf-elec-calc .submeter-wrap .allocation-summary {
            background: hsl(var(--primary) / 0.08);
            border-left: 4px solid hsl(var(--primary));
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 16px;
            font-size: .9rem;
            display: flex;
            flex-wrap: wrap;
            gap: 12px 20px;
        }
        .ashraf-elec-calc .submeter-wrap .allocation-summary .item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .ashraf-elec-calc .submeter-wrap .allocation-summary .item .label {
            color: hsl(var(--muted-foreground));
            font-weight: 500;
        }
        .ashraf-elec-calc .submeter-wrap .allocation-summary .item .value {
            font-weight: 700;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card {
            background: hsl(var(--card));
            border: 1px solid hsl(var(--primary) / 0.4);
            border-radius: 14px;
            padding: 16px 14px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
            transition: transform .15s, box-shadow .15s, border-color .15s;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px hsl(var(--primary) / 0.15);
            border-color: hsl(var(--primary));
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px solid hsl(var(--primary));
            padding-bottom: 6px;
            margin-bottom: 10px;
            flex-shrink: 0;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-header .name {
            font-size: 1rem;
            font-weight: 700;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-header .units {
            font-size: .75rem;
            background: hsl(var(--primary));
            padding: 2px 10px;
            border-radius: 20px;
            color: hsl(var(--primary-foreground));
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .slab-breakdown {
            font-size: .72rem;
            color: hsl(var(--muted-foreground));
            background: hsl(var(--muted));
            padding: 6px 8px;
            border-radius: 6px;
            margin: 0 0 10px 0;
            flex: 1 1 auto;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .slab-breakdown div {
            display: flex;
            justify-content: space-between;
            padding: 1px 0;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .slab-breakdown .slab-total {
            border-top: 1px dashed hsl(var(--border));
            margin-top: 2px;
            padding-top: 2px;
            font-weight: 600;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .lifeline-label {
            font-size: .8rem;
            font-weight: 500;
            background: hsl(var(--accent) / 0.1);
            padding: 6px 8px;
            border-radius: 6px;
            border: 1px solid hsl(var(--accent));
            margin: 0 0 10px 0;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer {
            margin-top: auto;
            padding-top: 8px;
            border-top: 2px solid hsl(var(--border));
            flex-shrink: 0;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer .row {
            display: flex;
            justify-content: space-between;
            font-size: .8rem;
            padding: 3px 0;
            border-bottom: 1px dashed hsl(var(--border));
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer .row:last-child {
            border-bottom: none;
            font-weight: 700;
            font-size: .9rem;
            padding-top: 4px;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer .row .lbl {
            color: hsl(var(--muted-foreground));
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer .row .val {
            font-weight: 600;
            font-variant-numeric: tabular-nums;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer .row .val.positive {
            color: #2dd4bf;
        }
        .ashraf-elec-calc .submeter-wrap .user-result-card .card-footer .row .val.negative {
            color: hsl(var(--accent));
        }
        .ashraf-elec-calc .submeter-wrap .placeholder-note {
            font-size: .9rem;
            color: hsl(var(--muted-foreground));
            text-align: center;
            padding: 20px 10px;
        }
        .ashraf-elec-calc .submeter-wrap .explanation-box {
            margin-top: 16px;
            background: hsl(var(--accent) / 0.06);
            border-radius: 12px;
            padding: 16px 18px;
            border: 1px solid hsl(var(--primary) / 0.2);
        }
        .ashraf-elec-calc .submeter-wrap .explanation-box h4 {
            margin: 0 0 6px;
            font-size: 1rem;
        }
        .ashraf-elec-calc .submeter-wrap .explanation-box p {
            margin: 0 0 8px;
            font-size: .85rem;
            color: hsl(var(--muted-foreground));
        }
        .ashraf-elec-calc .submeter-wrap .explanation-box .calc-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            font-size: .82rem;
            background: hsl(var(--card));
            padding: 10px 12px;
            border-radius: 8px;
            margin: 8px 0;
        }
        .ashraf-elec-calc .submeter-wrap .explanation-box .calc-grid .right {
            text-align: right;
            font-weight: 600;
        }
        .ashraf-elec-calc .submeter-wrap .explanation-box .calc-grid .highlight {
            color: hsl(var(--primary));
        }

        .ashraf-elec-calc /* reset & action button consistency */
        .btn-reset {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            font-weight: 500;
            transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
            transition-duration: 0.15s;
            border: 1px solid hsl(var(--input));
            background: hsl(var(--background));
            height: 2.5rem;
            padding-left: 1rem;
            padding-right: 1rem;
            color: hsl(var(--foreground));
        }
        .ashraf-elec-calc .btn-reset:hover {
            background: hsl(var(--accent) / 0.12);
            border-color: hsl(var(--accent));
        }
        .ashraf-elec-calc .btn-reset svg {
            margin-right: 0.5rem;
        }

        .ashraf-elec-calc .btn-primary-action {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
            transition-duration: 0.15s;
            height: 2.5rem;
            padding-left: 1rem;
            padding-right: 1rem;
            background: hsl(var(--primary));
            color: hsl(var(--primary-foreground));
            font-weight: 600;
            box-shadow: 0 4px 14px hsl(var(--primary) / 0.35);
            border: none;
        }
        .ashraf-elec-calc .btn-primary-action:hover {
            background: hsl(var(--primary) / 0.9);
            box-shadow: 0 6px 20px hsl(var(--primary) / 0.5);
        }
        .ashraf-elec-calc .btn-primary-action svg {
            margin-right: 0.5rem;
        }
    