/* ===== GENERATOR FUEL RUNTIME AND COST CALCULATOR ===== */

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    background: #ffffff;
    color: #222222;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

[hidden] {
    display: none !important;
}

button,
input,
select {
    font: inherit;
}

.tool-container {
    max-width: 760px;
    margin: 0;
    padding: 20px;
}

.tool-header {
    padding-bottom: 28px;
    border-bottom: 2px solid #252525;
}

.tool-header h1 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.2;
}

.tool-header p {
    max-width: 720px;
    margin: 0;
    color: #4b4b4b;
    font-size: 1.05rem;
}

.calculator-section,
.results-section,
.info-section {
    padding-top: 30px;
}

.calculator-section h2,
.results-section h2,
.info-section h2 {
    margin: 0 0 18px;
    line-height: 1.25;
}

.subheading {
    margin-top: 34px !important;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field {
    min-width: 0;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    line-height: 1.35;
}

.field input,
.field select {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #9a9a9a;
    border-radius: 5px;
    background: #ffffff;
    color: #222222;
}

.field input:focus,
.field select:focus {
    border-color: #222222;
    outline: 2px solid #222222;
    outline-offset: 1px;
}

.field-note {
    margin: 12px 0 0;
    color: #555555;
    font-size: 0.94rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

button {
    min-height: 50px;
    padding: 11px 20px;
    border: 2px solid #222222;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
}

#calculateButton {
    background: #222222;
    color: #ffffff;
}

#clearButton {
    background: #ffffff;
    color: #222222;
}

#calculateButton:hover {
    background: #404040;
}

#clearButton:hover {
    background: #f1f1f1;
}

button:focus-visible {
    outline: 3px solid #777777;
    outline-offset: 3px;
}

.error-message {
    min-height: 24px;
    margin-top: 14px;
    color: #a40000;
    font-weight: 700;
}

.results-section {
    margin-top: 18px;
    border-top: 2px solid #252525;
}

.results {
    border-top: 2px solid #252525;
    border-bottom: 2px solid #252525;
}

.result-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 0;
    border-bottom: 1px solid #c4c4c4;
}

.result-row:last-child {
    border-bottom: 0;
}

.result-row span {
    color: #444444;
}

.result-row strong {
    text-align: right;
}

.result-note {
    margin: 14px 0 0;
    color: #555555;
    font-size: 0.94rem;
}

.info-section {
    margin-top: 34px;
    border-top: 2px solid #252525;
}

.info-section h2:not(:first-child) {
    margin-top: 30px;
}

.info-section p {
    margin: 0 0 18px;
    color: #444444;
}

.formula {
    margin: 22px 0;
    padding: 16px;
    border-left: 5px solid #222222;
    background: #f2f2f2;
    font-weight: 700;
}

@media (max-width: 620px) {
    .tool-container {
        width: min(100% - 24px, 760px);
        padding: 24px 0 45px;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .button-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button-row button {
        width: 100%;
    }
}

@media (max-width: 440px) {
    .result-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .result-row strong {
        text-align: left;
    }
}