* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 30px 15px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.4;

    color: #222;
    background: #f5f6f7;
}


/******************************************************************************
 * Główny kontener
 ******************************************************************************/

.Container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}


/******************************************************************************
 * Nagłówek
 ******************************************************************************/

h1 {
    margin: 0 0 25px 0;

    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
}


h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
}


/******************************************************************************
 * Grupa
 ******************************************************************************/
.Group {
    margin-bottom: 18px;
    padding: 14px 20px 16px 20px;
}


/******************************************************************************
 * Wiersz formularza
 ******************************************************************************/


.FormRow {
    display: grid;
    grid-template-columns: 210px 120px 70px 1fr;

    align-items: center;

    min-height: 36px;
    margin-bottom: 3px;
}



/******************************************************************************
 * Etykieta
 ******************************************************************************/

.FormRow > label:first-child {
    padding-right: 15px;

    white-space: nowrap;
}


/******************************************************************************
 * Pola liczbowe
 ******************************************************************************/

.FormRow > input[type="text"] {
    width: 120px;
    height: 34px;

    padding: 5px 8px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;

    text-align: right;

    border: 1px solid #bfc5ca;
    border-radius: 4px;

    background: #fff;
}


.FormRow > input[type="text"]:focus {
    outline: none;

    border-color: #6b8daf;

    box-shadow: 0 0 0 2px rgba(70, 110, 150, 0.12);
}


/******************************************************************************
 * Jednostka
 ******************************************************************************/

.FormRow > span {
    padding-left: 10px;

    white-space: nowrap;

    color: #555;
}


/******************************************************************************
 * Radio
 ******************************************************************************/

.RadioGroup {
    grid-column: 2 / 5;

    display: flex;

    align-items: center;

    gap: 22px;
}


.RadioGroup label {
    display: flex;

    align-items: center;

    white-space: nowrap;

    cursor: pointer;
}


.RadioGroup input[type="radio"] {
    margin: 0 6px 0 0;
}


/******************************************************************************
 * Błędy pól
 ******************************************************************************/

.FieldError {
    grid-column: 4;

    margin-top: 2px;

    font-size: 13px;

    color: #b3261e;
}


/******************************************************************************
 * Komunikat ogólny
 ******************************************************************************/

.ErrorMessage {
    margin-bottom: 15px;
    padding: 9px 12px;

    color: #9d211b;

    background: #fff0ef;

    border: 1px solid #e1aaa6;
    border-radius: 4px;
}


/******************************************************************************
 * Przycisk
 ******************************************************************************/

.Buttons button {
    min-width: 105px;
    padding: 7px 22px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 600;

    color: #fff;

    background: #3f6f9f;

    border: 1px solid #345d87;
    border-radius: 4px;

    cursor: pointer;
}


.Buttons button:hover {
    background: #355f89;
}


.Buttons button:active {
    background: #2e5378;
}


/******************************************************************************
 * Tabela wyników
 ******************************************************************************/

.ResultTable {
    display: grid;

    grid-template-columns: 120px 25px 140px 80px;

    row-gap: 8px;

    align-items: center;

    width: max-content;
}


.ResultTable .Number {
    text-align: right;

    font-family: Consolas, "Courier New", monospace;
    font-variant-numeric: tabular-nums;
}


.ResultTable sub {
    font-size: 0.75em;
}


/******************************************************************************
 * Warunki krytyczne
 ******************************************************************************/

.CriticalConditions {
    margin-top: 20px;

    font-size: 13px;

    color: #666;
}


/******************************************************************************
 * Stopka
 ******************************************************************************/

.Footer {
    margin-top: 30px;
    padding-top: 15px;

    font-size: 13px;
    line-height: 1.5;

    color: #666;

    border-top: 1px solid #d8d8d8;
}


.Footer p {
    margin: 0 0 6px 0;
}


.Footer .Version {
    margin-top: 12px;

    text-align: right;

    font-size: 12px;

    color: #999;
}


/******************************************************************************
 * Mniejsze ekrany
 ******************************************************************************/

@media (max-width: 600px) {

    body {
        padding: 15px 10px;
    }


    .Group {
        padding: 18px 15px 20px 15px;
    }


    h1 {
        font-size: 22px;
    }


    .FormRow {
        grid-template-columns: minmax(0, 1fr) 120px 55px;

        column-gap: 0;
    }


    .FormRow > label:first-child {
        white-space: normal;
    }


    .RadioGroup {
        grid-column: 1 / 4;
    }


    .FieldError {
        grid-column: 1 / 4;
    }
}


/******************************************************************************
 * Bardzo wąski ekran
 ******************************************************************************/

@media (max-width: 430px) {

    .FormRow {
        grid-template-columns: minmax(0, 1fr) 105px 50px;
    }


    .FormRow > input[type="text"] {
        width: 105px;
    }


    .ResultTable {
        grid-template-columns: 100px 20px 125px 65px;
    }
}