.grc-calculator {
    width: 100%;
    max-width: 680px;
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.45;
}

.grc-calculator *,
.grc-calculator *::before,
.grc-calculator *::after {
    box-sizing: border-box;
}

.grc-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr);
    gap: 12px;
    margin-bottom: 20px;
}

.grc-controls label,
.grc-controls span {
    display: block;
    min-width: 0;
}

.grc-controls span {
    margin-bottom: 5px;
    font-weight: 700;
}

.grc-controls select,
.grc-controls input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid #b8b8b8;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font: inherit;
}

.grc-recipe-title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.grc-recipe-output {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.grc-recipe-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: collapse;
    table-layout: auto;
}

.grc-recipe-table th,
.grc-recipe-table td {
    min-width: 0;
    padding: 11px 8px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.grc-recipe-table th {
    text-align: left;
    font-weight: 700;
    border-bottom-width: 2px;
}

.grc-recipe-table th:first-child,
.grc-recipe-table td:first-child {
    width: auto;
    overflow-wrap: anywhere;
    word-break: normal;
}

.grc-recipe-table th:last-child,
.grc-recipe-table td:last-child {
    width: 1%;
    min-width: max-content;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

.grc-method-wrap,
.grc-notes-wrap {
    margin-top: 20px;
}

.grc-method-wrap h3,
.grc-notes-wrap h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.grc-method,
.grc-notes {
    white-space: pre-line;
}

.grc-empty {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

@media (max-width: 520px) {
    .grc-calculator {
        font-size: 15px;
    }

    .grc-controls {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .grc-recipe-title {
        font-size: 1.3rem;
    }

    .grc-recipe-table th,
    .grc-recipe-table td {
        padding: 10px 6px;
    }
}
