.post-composer {
    margin: 28px 0;
    padding: 22px;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    background: #f8fafb;
}

.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 11px;
    border: 1px solid #bcc5ce;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}

.community-feed {
    margin-top: 32px;
}

.community-post {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    background: #ffffff;
}

.post-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.community-post h3 {
    margin: 0 0 8px;
}

.post-details,
.comment-details {
    margin: 0 0 12px;
    color: #5f6b76;
    font-size: 0.9rem;
}

.post-body,
.comment-body {
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comments {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #d8dee4;
}

.comment {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 7px;
    background: #f4f6f8;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-form {
    margin-top: 18px;
}

.content-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.content-actions form {
    margin: 0;
}

.edit-button,
.small-edit-button,
.cancel-button {
    display: inline-block;
    border-radius: 6px;
    background: #5d6b78;
    color: white;
    text-decoration: none;
}

.edit-button {
    padding: 9px 13px;
}

.small-edit-button {
    padding: 7px 10px;
}

.cancel-button {
    padding: 11px 18px;
}

.edit-button:hover,
.small-edit-button:hover,
.cancel-button:hover {
    background: #44515d;
}

.danger-button,
.small-danger-button {
    border: 0;
    border-radius: 6px;
    background: #b4232c;
    color: white;
    cursor: pointer;
}

.danger-button {
    padding: 9px 13px;
}

.small-danger-button {
    padding: 7px 10px;
}

.danger-button:hover,
.small-danger-button:hover {
    background: #8f1820;
}

.edit-card {
    max-width: 720px;
}

.edit-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 650px) {
    .post-heading,
    .comment {
        flex-direction: column;
    }

    .content-actions {
        align-self: flex-start;
    }
}

.profile-actions {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.member-card .profile-actions {
    display: block;
    margin-top: 1.5rem;
    padding-top: 0.25rem;
    margin-bottom: 0;
}

/* PUBLIC COMMUNITY COMPACT/WIDE LAYOUT */
.community-main {
    width: min(1500px, 96%);
}

.community-policy-line {
    margin: 0 0 8px;
    padding: 0;
    color: #334155;
}

.community-intro {
    margin: 0 0 18px;
}

.community-feed {
    margin-top: 20px;
}

.community-post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.community-post-grid .community-post {
    margin-top: 0;
    min-width: 0;
}

@media (max-width: 980px) {
    .community-post-grid {
        grid-template-columns: 1fr;
    }
}

/* PUBLIC COMMUNITY SEARCH */
.community-search {
    margin: 14px 0 22px;
    max-width: 900px;
}

.community-search label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #243447;
}

.community-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.community-search-row input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #bcc5ce;
    border-radius: 6px;
    font: inherit;
}

.search-results-section {
    margin-top: 24px;
}

.search-result-count {
    color: #5f6b76;
}

.search-result-preview {
    max-height: 12em;
    overflow: hidden;
}

.search-result-link {
    margin: 18px 0 0;
}

@media (max-width: 650px) {
    .community-search-row {
        flex-direction: column;
    }
}
