/* ═══════════════════════════════════════════
           BASE
        ═══════════════════════════════════════════ */
        body {
            background: #000814;
            color: #e0e8ff;
            font-family: 'Exo 2', sans-serif;
            min-height: 100vh;
        }

        .calc-page {
            padding: 70px 20px 80px;
        }

        .page-hero {
            text-align: center;
            padding: 50px 20px 50px;
        }

        .page-hero h2 {
            font-size: 46px;
            font-weight: 700;
            color: #ff9800;
            letter-spacing: -1px;
            margin-bottom: 10px;
        }

        .page-hero p {
            color: #7a8bb0;
            font-size: 18px;
        }

        /* ═══════════════════════════════════════════
           CALCULATOR TABS
        ═══════════════════════════════════════════ */
        .calc-tabs {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-bottom: 44px;
        }

        .ctab {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 22px;
            border: 1.5px solid #1e3a5f;
            background: transparent;
            color: #7a8bb0;
            border-radius: 40px;
            font-size: 15px;
            font-family: 'Exo 2', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s;
        }

        .ctab:hover {
            border-color: #ff9800;
            color: #ff9800;
        }

        .ctab.active {
            background: linear-gradient(135deg, #ff9800, #ff5722);
            border-color: transparent;
            color: #fff;
            box-shadow: 0 4px 20px rgba(255, 152, 0, 0.35);
        }

        .ctab .icon {
            font-size: 18px;
        }

        /* ═══════════════════════════════════════════
           PANELS
        ═══════════════════════════════════════════ */
        .calc-panel {
            display: none;
        }

        .calc-panel.active {
            display: block;
            animation: fadeUp 0.35s ease;
        }

        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(18px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ═══════════════════════════════════════════
           SHARED CARD
        ═══════════════════════════════════════════ */
        .calc-card {
            background: #060f1e;
            border: 1px solid #0f2540;
            border-radius: 20px;
            max-width: 620px;
            margin: 0 auto;
            padding: 38px 40px 44px;
            box-shadow: 0 0 60px rgba(0, 100, 255, 0.08);
        }

        .calc-card h3 {
            font-size: 22px;
            font-weight: 700;
            color: #ff9800;
            margin-bottom: 6px;
        }

        .calc-card .desc {
            color: #5a6e90;
            font-size: 14px;
            margin-bottom: 28px;
        }

        /* ═══════════════════════════════════════════
           DISPLAY (standard calc)
        ═══════════════════════════════════════════ */
        .display-wrap {
            background: #020a14;
            border: 1px solid #0f2540;
            border-radius: 14px;
            padding: 16px 20px;
            margin-bottom: 20px;
            text-align: right;
            min-height: 88px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
        }

        .display-expr {
            font-family: 'Share Tech Mono', monospace;
            font-size: 14px;
            color: #3a5a80;
            min-height: 20px;
            word-break: break-all;
        }

        .display-val {
            font-family: 'Share Tech Mono', monospace;
            font-size: 38px;
            color: #e0f0ff;
            letter-spacing: -1px;
            word-break: break-all;
        }

        /* ═══════════════════════════════════════════
           BUTTON GRID (standard)
        ═══════════════════════════════════════════ */
        .btn-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .btn-grid button {
            font-family: 'Exo 2', sans-serif;
            font-size: 18px;
            font-weight: 600;
            padding: 18px 0;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.15s;
        }

        .btn-grid button:active {
            transform: scale(0.94);
        }

        .btn-num {
            background: #0d1e30;
            color: #c8d8f0;
        }

        .btn-num:hover {
            background: #152a42;
        }

        .btn-op {
            background: #0d1e30;
            color: #ff9800;
        }

        .btn-op:hover {
            background: #1a2f45;
        }

        .btn-fn {
            background: #0a1828;
            color: #00aaff;
            font-size: 14px;
        }

        .btn-fn:hover {
            background: #0f2035;
        }

        .btn-eq {
            background: linear-gradient(135deg, #ff9800, #ff5722);
            color: #fff;
            grid-column: span 2;
        }

        .btn-eq:hover {
            opacity: 0.88;
        }

        .btn-clear {
            background: #1a0a00;
            color: #ff9800;
        }

        .btn-clear:hover {
            background: #2a1000;
        }

        /* ═══════════════════════════════════════════
           FORM-BASED CALCULATORS
        ═══════════════════════════════════════════ */
        .field-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-bottom: 14px;
        }

        .field-group.single {
            grid-template-columns: 1fr;
        }

        .field-group.triple {
            grid-template-columns: 1fr 1fr 1fr;
        }

        label.field-label {
            display: block;
            color: #5a7090;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
        }

        input.calc-input,
        select.calc-input {
            width: 100%;
            background: #020a14;
            border: 1px solid #0f2540;
            border-radius: 10px;
            padding: 12px 16px;
            color: #c8d8f0;
            font-family: 'Share Tech Mono', monospace;
            font-size: 16px;
            outline: none;
            transition: border-color 0.2s;
        }

        input.calc-input:focus,
        select.calc-input:focus {
            border-color: #ff9800;
        }

        select.calc-input option {
            background: #020a14;
        }

        .btn-calculate {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, #ff9800, #ff5722);
            color: #fff;
            border: none;
            border-radius: 12px;
            font-family: 'Exo 2', sans-serif;
            font-size: 17px;
            font-weight: 700;
            cursor: pointer;
            margin-top: 18px;
            transition: 0.2s;
            letter-spacing: 0.5px;
        }

        .btn-calculate:hover {
            opacity: 0.88;
            transform: translateY(-1px);
        }

        /* Result box */
        .result-box {
            display: none;
            margin-top: 24px;
            background: #020a14;
            border: 1px solid #0f2540;
            border-left: 4px solid #ff9800;
            border-radius: 0 12px 12px 0;
            padding: 20px 22px;
        }

        .result-box.visible {
            display: block;
            animation: fadeUp 0.3s ease;
        }

        .result-box .r-label {
            font-size: 12px;
            color: #3a5a80;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 6px;
        }

        .result-box .r-val {
            font-family: 'Share Tech Mono', monospace;
            font-size: 26px;
            color: #ff9800;
            font-weight: bold;
        }

        .result-box .r-steps {
            margin-top: 14px;
            border-top: 1px solid #0f2540;
            padding-top: 12px;
        }

        .result-box .r-steps p {
            font-size: 14px;
            color: #7a90b0;
            line-height: 1.8;
            font-family: 'Share Tech Mono', monospace;
        }

        .result-box .r-steps span {
            color: #00aaff;
        }

        /* Divider between form sections */
        .section-divider {
            border: none;
            border-top: 1px solid #0f2540;
            margin: 26px 0;
        }

        /* ═══════════════════════════════════════════
           UNIT CONVERTER — two-col layout
        ═══════════════════════════════════════════ */
        .converter-row {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: end;
            gap: 12px;
            margin-bottom: 14px;
        }

        .arrow-btn {
            padding: 12px 14px;
            background: #0d1e30;
            border: 1px solid #0f2540;
            border-radius: 10px;
            color: #ff9800;
            font-size: 20px;
            cursor: pointer;
            transition: 0.2s;
            margin-bottom: 0;
        }

        .arrow-btn:hover {
            background: #152a42;
        }

        /* ═══════════════════════════════════════════
           MATRIX CALC
        ═══════════════════════════════════════════ */
        .matrix-wrap {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .matrix-block {
            text-align: center;
        }

        .matrix-block .m-title {
            color: #00aaff;
            font-size: 13px;
            font-weight: 700;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .matrix-grid {
            display: inline-grid;
            gap: 6px;
        }

        .matrix-grid input {
            width: 58px;
            background: #020a14;
            border: 1px solid #0f2540;
            border-radius: 8px;
            padding: 8px;
            color: #c8d8f0;
            font-family: 'Share Tech Mono', monospace;
            font-size: 15px;
            text-align: center;
            outline: none;
            transition: border-color 0.2s;
        }

        .matrix-grid input:focus {
            border-color: #ff9800;
        }

        .matrix-op {
            display: flex;
            align-items: center;
            font-size: 32px;
            color: #ff9800;
            padding: 0 4px;
            margin-top: 28px;
        }

        .matrix-result-grid {
            display: inline-grid;
            gap: 6px;
            pointer-events: none;
        }

        .matrix-result-grid span {
            width: 58px;
            height: 36px;
            background: #0d1e30;
            border: 1px solid #0f2540;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Share Tech Mono', monospace;
            font-size: 15px;
            color: #ff9800;
        }

        /* ═══════════════════════════════════════════
           STAT CALCULATOR
        ═══════════════════════════════════════════ */
        .stat-results {
            display: none;
            margin-top: 24px;
            display: none;
        }

        .stat-results.visible {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            animation: fadeUp 0.3s ease;
        }

        .stat-chip {
            background: #020a14;
            border: 1px solid #0f2540;
            border-radius: 12px;
            padding: 14px 18px;
        }

        .stat-chip .sc-label {
            font-size: 12px;
            color: #3a5a80;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 4px;
        }

        .stat-chip .sc-val {
            font-family: 'Share Tech Mono', monospace;
            font-size: 22px;
            color: #ff9800;
        }

        /* ═══════════════════════════════════════════
           EQUATION SOLVER (quadratic)
        ═══════════════════════════════════════════ */
        .eq-display {
            background: #020a14;
            border: 1px solid #0f2540;
            border-radius: 12px;
            padding: 14px 20px;
            text-align: center;
            font-family: 'Share Tech Mono', monospace;
            font-size: 22px;
            color: #00aaff;
            margin-bottom: 22px;
            letter-spacing: 1px;
        }

        /* ═══════════════════════════════════════════
           ERROR
        ═══════════════════════════════════════════ */
        .err {
            color: #ff9800 !important;
            font-size: 16px !important;
        }

        /* ═══════════════════════════════════════════
           RESPONSIVE
        ═══════════════════════════════════════════ */
        @media (max-width: 600px) {
            .calc-card {
                padding: 24px 18px 30px;
            }

            .btn-grid button {
                font-size: 16px;
                padding: 16px 0;
            }

            .field-group {
                grid-template-columns: 1fr;
            }

            .field-group.triple {
                grid-template-columns: 1fr 1fr;
            }

            .stat-results.visible {
                grid-template-columns: 1fr;
            }

            .page-hero h2 {
                font-size: 32px;
            }

            .converter-row {
                grid-template-columns: 1fr;
            }

            .arrow-btn {
                display: none;
            }
        }