:root {
    --main: #2A9D9F;
    --mainDark: #1F7F81;
    --light: #F6FBFB;
    --card: #ffffff;
    --border: #E3EEEE;
    --text: #1F2D2E;
    --muted: #6F8A8B;
    --danger: #B42318;
    --priorityBg: #E9FAF7;
    --priorityBorder: #72C8BD;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: var(--light);
    color: var(--text);
    line-height: 1.45;
}

header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--mainDark);
}

.logo-box {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--main), var(--mainDark));
    border-radius: 8px;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero {
    margin-bottom: 18px;
}

h1 {
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.description {
    color: var(--muted);
    max-width: 780px;
}

.top-info-box {
    margin-bottom: 24px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card {
    background: var(--card);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(25, 55, 65, 0.04);
}

.card-title {
    font-size: 22px;
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--muted);
    font-weight: 600;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--main);
    box-shadow: 0 0 0 3px rgba(42, 157, 159, 0.12);
}

.field-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

button {
    background: var(--main);
    border: none;
    padding: 14px 16px;
    width: 100%;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

button:hover {
    background: var(--mainDark);
}

button:active {
    transform: translateY(1px);
}

.form-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 14px;
    color: var(--danger);
}

.results-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.dot,
.badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-g1 {
    background: #178a42;
}

.dot-g2 {
    background: #9be56d;
}

.dot-g3 {
    background: #f1c40f;
}

.dot-g4 {
    background: #e67e22;
}

.dot-g5 {
    background: #e74c3c;
}

.dot-g6 {
    background: #8b0000;
}

.info-box,
.note-box,
.priority-info {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
}

.info-box {
    background: #fbffff;
    color: var(--text);
    background: #E9FAF7;
    border: 1px solid #2A9D9F;
    color: #1F7F81;
    font-weight: 600;
}

.note-box {
    background: #fcfefe;
    color: var(--muted);
    margin-top: 18px;
    border: 1px solid #2A9D9F;
}

.priority-info {
    background: var(--priorityBg);
    border-color: var(--priorityBorder);
    color: #175c55;
    margin-top: 18px;
}

.hidden {
    display: none;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.result-item.priority {
    background: var(--priorityBg);
    border-color: var(--priorityBorder);
    box-shadow: 0 0 0 1px rgba(114, 200, 189, 0.15);
}

.result-left {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    min-width: 0;
}

.result-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-name {
    font-weight: 700;
    font-size: 15px;
}

.result-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.priority-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 11px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 999px;
    background: #d6f4ee;
    color: #0f6b61;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.result-value {
    text-align: right;
    white-space: nowrap;
}

.result-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.result-unit {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

footer {
    margin-top: 50px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.itmbot-link {
    color: var(--muted);
    text-decoration: none;
}

.itmbot-link:hover {
    color: var(--mainDark);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    main {
        padding: 28px 16px;
    }

    h1 {
        font-size: 26px;
    }

    .card {
        padding: 18px;
    }

    .result-item {
        flex-direction: column;
    }

    .result-value {
        text-align: left;
    }
}

.results-highlight {
    animation: flashResult 1s ease;
}

@keyframes flashResult {
    0% {
        background: #E9FAF7;
    }

    100% {
        background: white;
    }
}