.mnfgt-wrap {
    margin: 24px 0;
}

.mnfgt-form {
    background: #ffffff;
    border: 1px solid #d9dee7;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.mnfgt-form h2 {
    margin: 0 0 8px;
    font-size: 1.65rem;
    line-height: 1.2;
}

.mnfgt-form p {
    margin: 0 0 18px;
    color: #4b5565;
}

.mnfgt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mnfgt-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mnfgt-field-full {
    grid-column: 1 / -1;
}

.mnfgt-field label {
    font-weight: 600;
    color: #182230;
}

.mnfgt-field input,
.mnfgt-field textarea,
.mnfgt-field select {
    width: 100%;
    border: 1px solid #c8d0dc;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}

.mnfgt-field textarea {
    resize: vertical;
    min-height: 120px;
}

.mnfgt-field input:focus,
.mnfgt-field textarea:focus,
.mnfgt-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.mnfgt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.mnfgt-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.mnfgt-feedback {
    display: none;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.mnfgt-feedback.is-loading {
    display: block;
    background: #eff6ff;
    color: #1d4ed8;
}

.mnfgt-feedback.is-error {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
}

.mnfgt-feedback.is-success {
    display: none;
}

.mnfgt-results,
.mnfgt-stack {
    margin-top: 20px;
}

.mnfgt-stack {
    display: grid;
    gap: 16px;
}

.mnfgt-result-card {
    border: 1px solid #d9dee7;
    border-radius: 16px;
    padding: 18px;
    background: #fafcff;
}

.mnfgt-result-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.mnfgt-result-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.mnfgt-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mnfgt-result-meta span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e5eefc;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 600;
}

.mnfgt-result-body h2,
.mnfgt-result-body h3,
.mnfgt-result-body h4 {
    margin: 1.1em 0 0.55em;
}

.mnfgt-result-body h2:first-child,
.mnfgt-result-body h3:first-child,
.mnfgt-result-body h4:first-child,
.mnfgt-result-body p:first-child,
.mnfgt-result-body ul:first-child {
    margin-top: 0;
}

.mnfgt-result-body p,
.mnfgt-result-body ul {
    margin: 0 0 0.9em;
}

.mnfgt-result-body ul,
.mnfgt-links-list {
    padding-left: 1.2rem;
}

.mnfgt-links-list li + li {
    margin-top: 8px;
}

@media (max-width: 767px) {
    .mnfgt-form {
        padding: 18px;
    }

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


.mnfgt-inline-card {
    background: #f8fbff;
    border: 1px solid #d7e3ef;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 0 18px;
}

.mnfgt-inline-card h3 {
    margin: 0 0 8px;
    color: #21497a;
}

.mnfgt-inline-card p {
    margin: 0 0 12px;
}

.mnfgt-inline-warning {
    background: #fffaf1;
    border-color: #f0d7a6;
}

.mnfgt-profile-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.mnfgt-profile-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}

.mnfgt-profile-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin-bottom: 4px;
}

.mnfgt-match-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.mnfgt-match-card .mnfgt-result-body p:last-child {
    margin-bottom: 0;
}


.mnfgt-export-bar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}

.mnfgt-button-secondary {
    background: #5d9a4e;
    border-color: #5d9a4e;
    color: #ffffff;
}

.mnfgt-button-secondary:hover,
.mnfgt-button-secondary:focus {
    background: #5d9a4e;
    border-color: #5d9a4e;
    color: #ffffff;
    opacity: 0.96;
}

.mnfgt-match-grid {
    display: grid;
    gap: 16px;
}


.mnfgt-button:hover,
.mnfgt-button:focus {
    opacity: 0.96;
}

.mnfgt-button-outline {
    background: #ffffff;
    color: #182230;
    border: 1px solid #c8d0dc;
}

.mnfgt-flow {
    display: grid;
    gap: 20px;
}

.mnfgt-flow-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mnfgt-step-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d9dee7;
    border-radius: 14px;
    background: #ffffff;
    color: #182230;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.mnfgt-step-button.is-active {
    border-color: #5d9a4e;
    box-shadow: 0 0 0 3px rgba(93, 154, 78, 0.15);
}

.mnfgt-step-button.is-complete .mnfgt-step-number,
.mnfgt-step-button.is-active .mnfgt-step-number {
    background: #5d9a4e;
    color: #ffffff;
}

.mnfgt-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #182230;
    font-weight: 700;
    flex: 0 0 30px;
}

.mnfgt-step-text {
    font-weight: 600;
    line-height: 1.3;
}

.mnfgt-flow-step[hidden] {
    display: none !important;
}

.mnfgt-flow-nav-row,
.mnfgt-flow-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 767px) {
    .mnfgt-flow-progress {
        grid-template-columns: 1fr;
    }
}

.mnfgt-writer-app {
    display: grid;
    gap: 18px;
}

.mnfgt-writer-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.mnfgt-writer-progress {
    min-width: 120px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f6f9f5;
    border: 1px solid #d8e6d3;
    text-align: center;
}

.mnfgt-writer-progress strong {
    display: block;
    font-size: 1.1rem;
    color: #22451c;
}

.mnfgt-writer-progress span {
    display: block;
    font-size: 12px;
    color: #5b6b58;
}

.mnfgt-writer-workspace {
    display: grid;
    gap: 18px;
}

.mnfgt-writer-charity-grid textarea {
    min-height: 88px;
}

.mnfgt-writer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mnfgt-writer-toolbar .mnfgt-button {
    margin-top: 0;
}

.mnfgt-writer-saved-state {
    font-size: 14px;
    color: #4b5565;
}

.mnfgt-writer-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.mnfgt-writer-shell > * {
    min-width: 0;
}

.mnfgt-writer-nav {
    display: grid;
    gap: 10px;
    position: sticky;
    top: 16px;
    align-self: start;
}

.mnfgt-writer-content {
    min-width: 0;
}

.mnfgt-writer-nav-button {
    width: 100%;
    max-width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d9dee7;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #182230;
    white-space: normal;
    word-break: break-word;
    box-sizing: border-box;
}

.mnfgt-writer-nav-button span,
.mnfgt-writer-nav-button small {
    display: block;
    max-width: 100%;
}

.mnfgt-writer-nav-button small {
    color: #64748b;
}

.mnfgt-writer-nav-button.is-active {
    border-color: #5d9a4e;
    box-shadow: 0 0 0 3px rgba(93, 154, 78, 0.12);
}

.mnfgt-writer-textarea {
    width: 100%;
    border: 1px solid #c8d0dc;
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 220px;
    resize: vertical;
    box-sizing: border-box;
}

.mnfgt-writer-textarea:focus {
    outline: none;
    border-color: #5d9a4e;
    box-shadow: 0 0 0 3px rgba(93, 154, 78, 0.15);
}

.mnfgt-writer-review-card .mnfgt-export-bar {
    margin-bottom: 10px;
}

@media (max-width: 1100px) {
    .mnfgt-writer-shell {
        grid-template-columns: 1fr;
    }

    .mnfgt-writer-nav {
        position: static;
    }
}

@media (max-width: 767px) {
    .mnfgt-writer-header {
        flex-direction: column;
    }
}

.mnfgt-flow-nav-row .mnfgt-button,
.mnfgt-flow-result-actions .mnfgt-button {
    margin-top: 0;
}


.mnfgt-writer-finish-card {
    margin-top: 20px;
}

.mnfgt-writer-finish-note {
    font-weight: 600;
    color: #21497a;
}

.mnfgt-writer-finish-textbox {
    width: 100%;
    min-height: 220px;
    border: 1px solid #d7e3ef;
    border-radius: 12px;
    padding: 14px 16px;
    box-sizing: border-box;
    background: #ffffff;
    color: #182230;
    resize: vertical;
    line-height: 1.6;
}

.mnfgt-writer-finish-textbox:focus {
    outline: none;
    border-color: #5d9a4e;
    box-shadow: 0 0 0 3px rgba(93, 154, 78, 0.15);
}
