.nhc,
.nhc * {
    box-sizing: border-box;
}

.nhc {
    --nhc-bg: #ffffff;
    --nhc-soft: #f6f3ef;
    --nhc-soft-2: #fbfaf8;
    --nhc-border: #e5ded6;
    --nhc-text: #211b17;
    --nhc-muted: #776d64;
    --nhc-strong: #6d4d34;
    --nhc-accent: #9b6a45;
    --nhc-accent-soft: #ead8c9;
    --nhc-warning-bg: #fff6de;
    --nhc-warning-border: #f0c56c;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    color: var(--nhc-text);
    font-family: inherit;
}

.nhc__head {
    padding: 28px;
    margin-bottom: 18px;
    border: 1px solid var(--nhc-border);
    border-radius: 24px;
    background: linear-gradient(135deg, var(--nhc-soft), var(--nhc-bg));
}

.nhc__eyebrow {
    margin: 0 0 8px;
    color: var(--nhc-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nhc__title {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
}

.nhc__lead {
    max-width: 790px;
    margin: 0;
    color: var(--nhc-muted);
    font-size: 17px;
    line-height: 1.55;
}

.nhc__form,
.nhc__result {
    display: grid;
    gap: 18px;
}

.nhc__panel,
.nhc__summary-card,
.nhc__layout-wrap,
.nhc__details {
    border: 1px solid var(--nhc-border);
    border-radius: 22px;
    background: var(--nhc-bg);
    box-shadow: 0 10px 30px rgba(72, 52, 35, .06);
}

.nhc__panel,
.nhc__layout-wrap,
.nhc__details {
    padding: 20px;
}

.nhc__panel--main {
    background: var(--nhc-soft-2);
}

.nhc__panel-title,
.nhc__layout-head h3,
.nhc__details h3 {
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.25;
}

.nhc__switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    margin-bottom: 16px;
    border: 1px solid var(--nhc-border);
    border-radius: 18px;
    background: #fff;
}

.nhc__switch button,
.nhc__quick button {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.nhc__switch button {
    padding: 8px 18px;
    background: transparent;
    color: var(--nhc-strong);
}

.nhc__switch button.is-active {
    color: #fff;
    background: linear-gradient(135deg, #7a5033, #b9835b);
}

.nhc__switch button:hover,
.nhc__switch button:focus-visible,
.nhc__quick button:hover,
.nhc__quick button:focus-visible {
    border-color: var(--nhc-accent);
    outline: none;
}

.nhc__switch button:active,
.nhc__quick button:active {
    transform: translateY(1px);
}

.nhc__grid {
    display: grid;
    gap: 14px;
}

.nhc__grid--main {
    grid-template-columns: 1fr 1.2fr 1.2fr;
}

.nhc__field {
    display: grid;
    gap: 7px;
}

.nhc__field span {
    color: var(--nhc-muted);
    font-size: 13px;
    line-height: 1.25;
}

.nhc__field input,
.nhc__field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--nhc-border);
    border-radius: 14px;
    background: #fff;
    color: var(--nhc-text);
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.nhc__field select {
    cursor: pointer;
}

.nhc__field input:focus,
.nhc__field select:focus {
    border-color: var(--nhc-accent);
    box-shadow: 0 0 0 4px rgba(155, 106, 69, .13);
}

.nhc__quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.nhc__quick span {
    color: var(--nhc-muted);
    font-size: 13px;
    font-weight: 700;
}

.nhc__quick button {
    padding: 7px 12px;
    border-color: var(--nhc-border);
    background: #fff;
    color: var(--nhc-strong);
}

.nhc__quick button:hover,
.nhc__quick button:focus-visible {
    background: var(--nhc-accent-soft);
}

.nhc__summary {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
}

.nhc__summary-card {
    display: grid;
    gap: 5px;
    padding: 18px;
}

.nhc__summary-card--primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #7a5033, #b9835b);
}

.nhc__summary-card span {
    color: inherit;
    opacity: .78;
    font-size: 14px;
}

.nhc__summary-card strong {
    font-size: clamp(25px, 4vw, 40px);
    line-height: 1;
}

.nhc__summary-card small {
    color: inherit;
    opacity: .72;
    font-size: 13px;
}

.nhc__warnings {
    padding: 14px 16px;
    border: 1px solid var(--nhc-warning-border);
    border-radius: 18px;
    background: var(--nhc-warning-bg);
    color: #6e4a0a;
    line-height: 1.5;
}

.nhc__warnings p {
    margin: 0;
}

.nhc__warnings p + p {
    margin-top: 7px;
}

.nhc__layout-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.nhc__layout-head h3,
.nhc__details h3 {
    margin-bottom: 0;
}

.nhc__layout-head p {
    max-width: 590px;
    margin: 0;
    color: var(--nhc-muted);
    font-size: 14px;
    line-height: 1.45;
}

.nhc__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--nhc-border);
    border-radius: 18px;
    background: #fffdfb;
}

.nhc__table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.nhc__table th,
.nhc__table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--nhc-border);
    text-align: left;
    vertical-align: top;
}

.nhc__table th {
    color: var(--nhc-muted);
    background: var(--nhc-soft-2);
    font-size: 13px;
    font-weight: 800;
}

.nhc__table td {
    font-size: 14px;
    line-height: 1.35;
}

.nhc__table tr:last-child td {
    border-bottom: 0;
}

.nhc__table tr.is-current td {
    background: var(--nhc-accent-soft);
    color: #402a1b;
    font-weight: 800;
}

.nhc__muted {
    color: var(--nhc-muted);
}

.nhc__details-list {
    display: grid;
    gap: 10px;
}

.nhc__detail {
    padding: 12px 0;
    border-bottom: 1px solid var(--nhc-border);
}

.nhc__detail:last-child {
    border-bottom: 0;
}

.nhc__detail strong {
    display: block;
    margin-bottom: 4px;
}

.nhc__detail span {
    display: block;
    color: var(--nhc-muted);
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .nhc__grid--main {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .nhc__field--wide {
        grid-column: 1 / -1;
    }

    .nhc__summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .nhc__head,
    .nhc__panel,
    .nhc__layout-wrap,
    .nhc__details {
        border-radius: 18px;
        padding: 16px;
    }

    .nhc__lead {
        font-size: 15px;
    }

    .nhc__switch {
        display: grid;
        width: 100%;
    }

    .nhc__grid--main,
    .nhc__summary {
        grid-template-columns: 1fr;
    }

    .nhc__field--wide {
        grid-column: auto;
    }

    .nhc__quick {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .nhc__quick span {
        grid-column: 1 / -1;
    }

    .nhc__quick button {
        width: 100%;
        text-align: center;
    }

    .nhc__layout-head {
        display: grid;
        justify-content: stretch;
    }

    .nhc__table-wrap {
        margin-left: -4px;
        margin-right: -4px;
    }
}

@media (max-width: 380px) {
    .nhc__quick {
        grid-template-columns: 1fr;
    }

    .nhc__summary-card strong {
        font-size: 28px;
    }
}
