.nwhe {
    --nwhe-red: #9e1b32;
    --nwhe-dark: #741326;
    --nwhe-text: #24272b;
    --nwhe-border: #c9ced4;
    --nwhe-background: #f3f4f5;

    max-width: 1180px;
    margin: 24px auto;
    padding: 20px;
    color: var(--nwhe-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

.nwhe,
.nwhe * {
    box-sizing: border-box;
}

.nwhe header {
    padding: 24px;
    margin-bottom: 24px;
    color: #fff;
    background: var(--nwhe-red);
    border-radius: 12px;
}

.nwhe header h2,
.nwhe header h3,
.nwhe header p {
    color: inherit;
}

.nwhe-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.nwhe-nav a {
    padding: 10px 14px;
    border: 1px solid var(--nwhe-border);
    border-radius: 7px;
    color: var(--nwhe-dark);
    background: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nwhe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}

.nwhe-card {
    padding: 20px;
    margin: 12px 0;
    border: 1px solid var(--nwhe-border);
    border-top: 4px solid var(--nwhe-red);
    border-radius: 10px;
    background: #fff;
    overflow-wrap: anywhere;
}

.nwhe-card h3,
.nwhe-card h4 {
    margin-top: 0;
}

.nwhe-form {
    display: grid;
    gap: 16px;
    max-width: 780px;
    margin: 20px 0;
    padding: 20px;
    background: var(--nwhe-background);
    border-radius: 10px;
}

.nwhe-form label,
.nwhe-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.nwhe-form input:not([type="checkbox"]):not([type="hidden"]),
.nwhe-form select,
.nwhe-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #767676;
    border-radius: 5px;
    background: #fff;
    color: var(--nwhe-text);
    font: inherit;
}

.nwhe-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 7px;
    vertical-align: middle;
}

.nwhe-form fieldset {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--nwhe-border);
}

.nwhe-form fieldset label {
    margin-bottom: 15px;
}

.nwhe button {
    min-height: 44px;
    width: fit-content;
    max-width: 100%;
    padding: 10px 20px;
    border: 2px solid var(--nwhe-red);
    border-radius: 6px;
    background: var(--nwhe-red);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nwhe button:hover {
    background: var(--nwhe-dark);
    border-color: var(--nwhe-dark);
}

.nwhe a:focus-visible,
.nwhe button:focus-visible,
.nwhe input:focus-visible,
.nwhe select:focus-visible,
.nwhe textarea:focus-visible,
.nwhe summary:focus-visible {
    outline: 3px solid #145ba8;
    outline-offset: 3px;
}

.nwhe-notice {
    padding: 15px;
    border-left: 5px solid var(--nwhe-red);
    background: #fff;
    color: var(--nwhe-text);
}

.nwhe-number {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 700;
}

.nwhe pre {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .nwhe {
        padding: 10px;
    }

    .nwhe header,
    .nwhe-card,
    .nwhe-form {
        padding: 15px;
    }

    .nwhe-nav a {
        flex: 1 1 140px;
    }

    .nwhe button {
        width: 100%;
    }
}