        /* Base CSS for the Calculator */
        :root {
            --primary-color: #3f51b5; /* Indigo */
            --accent-color: #ff9800; /* Amber */
            --background-color: #f4f4f4;
            --card-background: #ffffff;
            --text-color: #333;
            --border-radius: 10px;
            --shadow-light: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
        }

        header {
            background-color: var(--primary-color);
            color: white;
            padding: 25px 0;
            text-align: center;
            box-shadow: var(--shadow-light);
        }

        header h1 {
            margin: 0;
            font-size: 2em;
        }

        main {
            padding: 20px;
            max-width: 950px;
            margin: 30px auto;
        }

        .calculator-section {
            background-color: var(--card-background);
            padding: 30px;
            margin-bottom: 30px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-light);
        }

        .calculator-section h2 {
            color: var(--primary-color);
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 12px;
            margin-top: 0;
            font-size: 1.6em;
        }

        .form-group {
            margin-bottom: 20px;
            display: flex;
            flex-direction: column;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #555;
            font-size: 1.1em;
        }

        select, input[type="number"], input[type="text"] {
            width: 100%;
            padding: 12px;
            border: 1px solid #ccc;
            border-radius: 6px;
            box-sizing: border-box;
            font-size: 1.1em;
            transition: border-color 0.3s;
        }

        select:focus, input:focus {
            border-color: var(--accent-color);
            outline: none;
        }
        
        select {
            -webkit-appearance: none; 
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f51b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 10px top 50%;
            background-size: 14px;
            padding-right: 30px;
        }

        /* NEW STYLES for Measurement Mode */
        .mode-switch-group {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .mode-switch-group button {
            flex: 1;
            padding: 10px 15px;
            border: 2px solid var(--primary-color);
            background-color: transparent;
            color: var(--primary-color);
            font-weight: bold;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .mode-switch-group button.active {
            background-color: var(--primary-color);
            color: white;
            box-shadow: var(--shadow-light);
        }

        .mode-switch-group button:hover:not(.active) {
            background-color: #e8eaf6;
        }

        .results-article {
            background-color: #e8eaf6; 
            padding: 25px;
            border-radius: var(--border-radius);
            border-left: 6px solid var(--primary-color);
            margin-top: 30px;
        }

        .results-article h3 {
            color: var(--primary-color);
            margin-top: 0;
            font-size: 1.4em;
            margin-bottom: 15px;
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 15px;
        }
        
        .results-article span {
            font-weight: bold;
            color: var(--accent-color);
            display: block;
            font-size: 1.4em;
            margin-top: 5px;
        }

        .error-message {
            color: #d32f2f; 
            font-style: italic;
            margin-top: -10px;
            margin-bottom: 10px;
            font-size: 0.9em;
        }
        
        /* FAQ Styles for better presentation */
        .faq-list {
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .faq-list dt {
            font-weight: bold;
            color: var(--primary-color);
            margin-top: 15px;
            padding-bottom: 5px;
            border-bottom: 1px dashed #ccc;
        }
        .faq-list dd {
            margin-left: 0;
            padding-left: 0;
            margin-bottom: 10px;
        }

        /* Responsive Design */
        @media (min-width: 768px) {
            .input-group-grid {
                display: grid;
                grid-template-columns: 1.5fr 1fr 1.5fr; 
                gap: 20px;
            }

            #measurement-inputs {
                display: grid;
                grid-template-columns: 1fr 1fr; 
                gap: 20px;
            }
        }
