/* ProfoundSyntax member-created Community page — route-scoped styles.
   Loaded only on ps_community_space taxonomy routes. */

.ps-community-space-page { padding-top: 42px; padding-bottom: 64px; }
.ps-community-space-hero {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at 86% 8%, rgba(229,43,67,.18), transparent 28%),
        linear-gradient(135deg, #11181e, #0c1115 72%);
    box-shadow: 0 20px 50px rgba(0,0,0,.24);
}
.ps-community-space-hero-topline,
.ps-community-space-meta-row,
.ps-community-space-identity-row,
.ps-community-space-section-heading {
    display: flex;
    align-items: center;
}
.ps-community-space-hero-topline { justify-content: space-between; gap: 16px; }
.ps-community-space-kicker {
    color: #ff6a7e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ps-community-space-visibility {
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    color: #d7dfe4;
    font-size: 11px;
    font-weight: 800;
}
.ps-community-space-identity-row { gap: 16px; margin-top: 22px; align-items: flex-start; }
.ps-community-space-mark {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    flex: 0 0 62px;
    border-radius: 50%;
    background: #e52b43;
    color: #fff;
    font-weight: 900;
}
.ps-community-space-identity-copy { min-width: 0; }
.ps-community-space-identity-copy h1 { margin: 0; color: #f7fafc; font-size: clamp(32px, 5vw, 58px); line-height: 1; overflow-wrap: anywhere; }
.ps-community-space-meta-row { flex-wrap: wrap; gap: 9px 18px; margin-top: 12px; color: #8d9aa4; font-size: 12px; }
.ps-community-space-meta-row strong { color: #d7e0e5; }
.ps-community-space-description { max-width: 920px; margin: 22px 0 0; color: #cbd4da; font-size: 16px; line-height: 1.75; white-space: pre-line; }
.ps-community-space-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,330px); gap: 24px; margin-top: 24px; align-items: start; }
.ps-community-space-main,
.ps-community-space-side-card {
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 18px;
    background: #11171c;
}
.ps-community-space-main { padding: 24px; min-width: 0; }
.ps-community-space-section-heading { justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid rgba(148,163,184,.14); }
.ps-community-space-section-heading h2 { margin: 6px 0 0; color: #f3f7f9; font-size: 24px; }
.ps-community-space-sidebar { min-width: 0; }
.ps-community-space-side-card { padding: 22px; }
.ps-community-space-side-card h2 { margin: 0 0 18px; color: #f2f6f8; font-size: 18px; }
.ps-community-space-facts { display: grid; gap: 14px; margin: 0; }
.ps-community-space-facts div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(148,163,184,.10); }
.ps-community-space-facts dt { color: #82909a; }
.ps-community-space-facts dd { margin: 0; text-align: right; color: #d8e0e5; }
.ps-community-space-facts a { color: #ff7184; }
.ps-community-space-created-by { margin: 18px 0 0; color: #8b98a2; font-size: 12px; }
.ps-community-space-empty { padding: 56px 20px; text-align: center; color: #8c99a3; }
.ps-community-space-empty .dashicons { width: auto; height: auto; font-size: 34px; color: #e52b43; }
.ps-community-space-empty h3 { margin: 14px 0 6px; color: #edf2f5; font-size: 20px; }
.ps-community-space-empty p { max-width: 560px; margin: 0 auto; line-height: 1.6; }
.ps-community-space-thread-list { display: grid; gap: 14px; margin-top: 20px; }
.ps-community-space-thread-card { padding: 18px; border: 1px solid rgba(148,163,184,.13); border-radius: 14px; background: #0e1418; }
.ps-community-space-thread-card h3 { margin: 0; font-size: 18px; }
.ps-community-space-thread-card h3 a { color: #f0f5f7; }
.ps-community-space-thread-card p { margin: 10px 0 0; color: #a9b4bc; line-height: 1.6; }
.ps-community-space-thread-meta { display: flex; gap: 12px; margin-top: 7px; color: #7e8b95; font-size: 11px; }

@media (max-width: 900px) {
    .ps-community-space-layout { grid-template-columns: 1fr; }
    .ps-community-space-sidebar { order: -1; }
}
@media (max-width: 600px) {
    .ps-community-space-page { padding-top: 20px; }
    .ps-community-space-hero { padding: 22px 18px; border-radius: 16px; }
    .ps-community-space-hero-topline { align-items: flex-start; }
    .ps-community-space-identity-row { gap: 12px; }
    .ps-community-space-mark { width: 48px; height: 48px; flex-basis: 48px; font-size: 12px; }
    .ps-community-space-main { padding: 18px; }
    .ps-community-create-success-actions { flex-direction: column-reverse; }
    .ps-community-create-success-actions .ps-button { width: 100%; justify-content: center; text-align: center; }
}


/* v0.23.105.8 — public /c/{slug}/ theme-shell integration.
   The taxonomy template must participate in the theme's ps-site-main drawer
   offset. Keep page content inside a normal ps-container child so the left
   drawer never compresses/overlaps the Community content. */
body.ps-member-community-space {
    background: var(--ps-bg, #0b0d12);
}
.ps-community-space-shell {
    min-width: 0;
    overflow-x: clip;
}
.ps-community-space-shell > .ps-community-space-page {
    width: min(calc(100% - 36px), 1460px);
    max-width: 1460px;
    margin-inline: auto;
}
@media (max-width: 1280px) {
    .ps-community-space-shell > .ps-community-space-page {
        width: min(calc(100% - 28px), 1180px);
    }
}
@media (max-width: 600px) {
    .ps-community-space-shell > .ps-community-space-page {
        width: min(calc(100% - 18px), 100%);
    }
}

/* v0.23.105.11 — lifecycle notices + owner/local Community Rules workspace. */
.ps-community-space-hero-actions,
.ps-community-rules-actions,
.ps-community-rules-form-actions,
.ps-community-space-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ps-community-space-hero-actions { margin-top: 22px; }
.ps-community-space-side-actions { margin-top: 18px; flex-direction: column; }
.ps-community-space-side-actions a { color: #ff7184; }
.ps-community-lifecycle-notice,
.ps-community-rules-notice {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(229,43,67,.28);
    border-radius: 14px;
    background: rgba(229,43,67,.08);
    color: #dce5ea;
    display: grid;
    gap: 6px;
}
.ps-community-lifecycle-notice strong { color: #ff7a8d; }
.ps-community-rules-notice.is-success {
    border-color: rgba(53,204,124,.30);
    background: rgba(53,204,124,.08);
}
.ps-community-rules-editor,
.ps-community-rules-list {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 18px;
    background: #11171c;
}
.ps-community-rules-editor h2,
.ps-community-rules-list h2 { margin-top: 0; color: #f3f7f9; }
.ps-community-rule-editor-list,
.ps-community-rules-items { display: grid; gap: 14px; }
.ps-community-rule-editor-card,
.ps-community-rule-card {
    margin: 0;
    padding: 18px;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 14px;
    background: #0e1418;
}
.ps-community-rule-editor-card legend { padding: 0 6px; color: #ff7184; font-weight: 800; }
.ps-community-rule-editor-card label { display: grid; gap: 6px; margin-top: 10px; color: #b7c2c9; }
.ps-community-rule-editor-card input,
.ps-community-rule-editor-card textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 10px;
    background: #0a1014;
    color: #edf3f6;
    padding: 10px 12px;
}
.ps-community-rule-card h3 { margin: 0 0 8px; color: #f4f7f9; }
.ps-community-rule-card p { margin: 0; color: #adb8c0; line-height: 1.65; }
.ps-community-rules-form-actions { justify-content: flex-end; margin-top: 18px; }
@media (max-width: 600px) {
    .ps-community-space-hero-actions .ps-button,
    .ps-community-rules-actions .ps-button,
    .ps-community-rules-form-actions .ps-button { width: 100%; justify-content: center; text-align: center; }
    .ps-community-rules-editor,
    .ps-community-rules-list { padding: 18px; }
}

/* v0.23.105.12 — owner toolbox + owner settings workspace. */
.ps-community-owner-tools-card { margin-bottom: 16px; }
.ps-community-owner-tools-card p { margin: 10px 0 0; color: #9da9b1; line-height: 1.6; font-size: 13px; }
.ps-community-owner-tool-links { display: grid; gap: 9px; margin-top: 16px; }
.ps-community-owner-tool-links .ps-button { width: 100%; justify-content: center; text-align: center; }
.ps-community-owner-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,330px); gap: 24px; margin-top: 24px; align-items: start; }
.ps-community-owner-layout > .ps-community-rules-editor { margin-top: 0; }
.ps-community-owner-form { display: grid; gap: 18px; }
.ps-community-owner-form > label { display: grid; gap: 7px; color: #bec8ce; font-weight: 700; }
.ps-community-owner-form textarea,
.ps-community-owner-form select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 10px;
    background: #0a1014;
    color: #edf3f6;
    padding: 11px 12px;
}
.ps-community-owner-form small { color: #83929c; font-weight: 400; line-height: 1.5; }
.ps-community-owner-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.ps-community-owner-form-grid label { display: grid; gap: 7px; color: #bec8ce; font-weight: 700; }
.ps-community-owner-participation-help { width: 100%; max-width: none; margin: 12px 0 0; padding: 14px 16px; box-sizing: border-box; border: 1px solid rgba(148,163,184,.13); border-radius: 12px; background: #0d1317; }
.ps-community-owner-participation-help p { width: 100%; max-width: none; margin: 0; color: #8f9da6; font-size: 13px; line-height: 1.65; }
.ps-community-owner-participation-help p + p { margin-top: 8px; }
.ps-community-owner-identity-lock { padding: 15px 16px; border: 1px solid rgba(148,163,184,.15); border-radius: 13px; background: #0d1317; }
.ps-community-owner-identity-lock strong { display: block; color: #f0f5f7; }
.ps-community-owner-identity-lock > span { display: inline-block; margin-top: 7px; color: #ff7184; font-weight: 800; }
.ps-community-owner-identity-lock p { margin: 7px 0 0; color: #8e9ba4; line-height: 1.55; }
@media (max-width: 900px) { .ps-community-owner-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ps-community-owner-form-grid { grid-template-columns: 1fr; } }

/* v0.23.105.13 — Community-specific posting foundation. */
.ps-community-thread-submit-notice {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 13px;
    background: #11171c;
    color: #b9c4cb;
    line-height: 1.55;
}
.ps-community-thread-submit-notice.is-success {
    border-color: rgba(53,204,124,.32);
    background: rgba(53,204,124,.08);
    color: #d7f5e5;
}
.ps-community-space-empty-action { margin-top: 18px !important; }
.ps-community-space-empty-action .ps-button { display: inline-flex; }

/* v0.23.105.14 — membership, private locked shell, owner member management. */
.ps-community-membership-inline-form { display: inline-flex; margin: 0; }
.ps-community-private-lock {
    margin-top: 22px;
    padding: 28px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 18px;
    background: #11171c;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.ps-community-private-lock .dashicons {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(229,43,67,.12);
    color: #ff7184;
    font-size: 24px;
}
.ps-community-private-lock h2 { margin: 4px 0 8px; color: #f4f7f9; }
.ps-community-private-lock p { margin: 0; color: #a8b4bc; line-height: 1.65; max-width: 760px; }
.ps-community-space-private-summary { max-width: 850px; color: #aeb9c0; }
.ps-community-members-workspace { display: grid; gap: 20px; margin-top: 24px; }
.ps-community-members-panel {
    padding: 22px;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 18px;
    background: #11171c;
}
.ps-community-members-count {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 12px;
    background: #0c1216;
    color: #f3f7f9;
}
.ps-community-member-list { display: grid; gap: 10px; margin-top: 16px; }
.ps-community-member-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid rgba(148,163,184,.13);
    border-radius: 13px;
    background: #0d1317;
}
.ps-community-member-identity h3 { margin: 0; font-size: 15px; }
.ps-community-member-identity h3 a { color: #edf3f6; text-decoration: none; }
.ps-community-member-identity p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ps-community-member-role,
.ps-community-member-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148,163,184,.1);
    color: #aab6bd;
    font-size: 11px;
    font-weight: 800;
}
.ps-community-member-role { background: rgba(229,43,67,.12); color: #ff8393; }
.ps-community-member-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-community-member-actions form { margin: 0; }
.ps-community-members-empty { padding: 24px 14px; }
@media (max-width: 700px) {
    .ps-community-private-lock { padding: 20px; flex-direction: column; }
    .ps-community-member-row { align-items: stretch; flex-direction: column; }
    .ps-community-member-actions,
    .ps-community-member-actions form,
    .ps-community-member-actions .ps-button { width: 100%; }
    .ps-community-member-actions .ps-button { justify-content: center; text-align: center; }
    .ps-community-membership-inline-form,
    .ps-community-membership-inline-form .ps-button { width: 100%; }
    .ps-community-membership-inline-form .ps-button { justify-content: center; text-align: center; }
}


.ps-community-space-hero.has-community-appearance { --ps-community-accent: #e52b43; --ps-community-accent-text: #fff; }
.ps-community-space-hero.has-community-appearance { border-color: color-mix(in srgb, var(--ps-community-accent) 38%, transparent); }
.ps-community-space-hero.has-community-appearance .ps-community-space-kicker { color: var(--ps-community-accent); }
.ps-community-space-hero.has-community-appearance .ps-community-space-mark {
    background: var(--ps-community-accent);
    color: var(--ps-community-accent-text);
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.16);
}
.ps-community-space-hero.has-community-appearance .ps-community-space-hero-actions .ps-button-primary {
    background: var(--ps-community-accent);
    border-color: var(--ps-community-accent);
    color: var(--ps-community-accent-text);
}
.ps-community-space-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ps-community-space-banner {
    height: clamp(150px, 22vw, 290px);
    margin: -30px -30px 26px;
    overflow: hidden;
    background: #0a1014;
    border-bottom: 1px solid rgba(148,163,184,.14);
}
.ps-community-space-banner img { width: 100%; height: 100%; display: block; object-fit: cover; transform-origin: center; }
.ps-community-appearance-editor {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(148,163,184,.15);
    border-radius: 16px;
    background: #0d1317;
}
.ps-community-appearance-heading h3 { margin: 5px 0 7px; color: #f1f5f7; font-size: 20px; }
.ps-community-appearance-heading p,
.ps-community-appearance-preview-help { margin: 0; color: #8f9ca5; line-height: 1.55; }
.ps-community-appearance-preview { overflow: hidden; border: 1px solid rgba(148,163,184,.16); border-radius: 15px; background: #10171c; }
.ps-community-appearance-preview-banner { height: 150px; overflow: hidden; background: linear-gradient(135deg, rgba(229,43,67,.18), rgba(14,20,24,.9)); }
.ps-community-appearance-preview-banner img { width: 100%; height: 100%; display: block; object-fit: cover; transform-origin: center; }
.ps-community-appearance-preview-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #eef3f5; }
.ps-community-appearance-preview-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--ps-community-accent); color: var(--ps-community-accent-text); font-weight: 900; }
.ps-community-appearance-preview-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ps-community-appearance-upload-grid,
.ps-community-appearance-control-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.ps-community-appearance-upload,
.ps-community-appearance-control-grid > label { display: grid; gap: 7px; padding: 14px; border: 1px solid rgba(148,163,184,.13); border-radius: 13px; background: #0a1014; color: #bec8ce; font-weight: 700; }
.ps-community-appearance-upload input[type="file"] { width: 100%; color: #aeb9c0; font-weight: 400; }
.ps-community-appearance-upload small,
.ps-community-appearance-control-grid small { color: #83929c; font-weight: 400; line-height: 1.5; }
.ps-community-appearance-remove { display: flex !important; align-items: center; gap: 8px; margin-top: 4px; color: #aeb9c0; font-weight: 500 !important; }
.ps-community-appearance-control-grid input[type="color"] { width: 58px; height: 38px; padding: 2px; border: 1px solid rgba(148,163,184,.24); border-radius: 9px; background: #0d1317; }
.ps-community-appearance-control-grid input[type="range"] { width: 100%; accent-color: var(--ps-community-accent, #e52b43); }
.ps-community-appearance-control-grid output { color: #ff7184; font-size: 12px; font-weight: 800; }
@media (max-width: 600px) {
    .ps-community-space-banner { margin: -22px -18px 22px; height: 150px; }
    .ps-community-appearance-upload-grid,
    .ps-community-appearance-control-grid { grid-template-columns: 1fr; }
}

/* v0.23.105.20: first-contribution review + Community member standing. */
.ps-community-member-posting-state { background: rgba(82, 196, 129, .1); color: #9ce3b8; }
.ps-community-member-posting-state.is-revoked { background: rgba(245, 158, 11, .11); color: #f7c66d; }
.ps-community-member-posting-state.is-unreviewed { background: rgba(99, 142, 255, .11); color: #a9c1ff; }
.ps-community-first-review-list { display: grid; gap: 16px; margin-top: 18px; }
.ps-community-first-review-card {
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 16px;
    background: #0d1317;
    overflow: hidden;
}
.ps-community-first-review-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.ps-community-first-review-header h3 { margin: 8px 0 4px; color: #f3f7f9; font-size: 18px; line-height: 1.35; }
.ps-community-first-review-header p { margin: 0; color: #9ba8b0; font-size: 13px; }
.ps-community-first-review-header a { color: #dbe7ed; }
.ps-community-first-review-content {
    padding: 20px;
    color: #d8e1e6;
    line-height: 1.7;
    max-height: 520px;
    overflow: auto;
    overflow-wrap: anywhere;
}
.ps-community-first-review-content > :first-child { margin-top: 0; }
.ps-community-first-review-content > :last-child { margin-bottom: 0; }
.ps-community-first-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(148,163,184,.12);
}
.ps-community-first-review-actions form { margin: 0; }
.ps-community-space-hero-actions .ps-button.is-disabled { opacity: .72; cursor: default; pointer-events: none; }
@media (max-width: 700px) {
    .ps-community-first-review-header { padding: 16px; }
    .ps-community-first-review-content { padding: 16px; max-height: 420px; }
    .ps-community-first-review-actions { padding: 14px 16px 16px; }
    .ps-community-first-review-actions,
    .ps-community-first-review-actions form,
    .ps-community-first-review-actions .ps-button { width: 100%; }
    .ps-community-first-review-actions .ps-button { justify-content: center; text-align: center; }
}

/* v0.23.105.29 — owner Community rename policy/workspace. */
.ps-community-rename-editor {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(148,163,184,.14);
}
.ps-community-rename-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 16px 0 10px;
    padding: 13px 15px;
    border: 1px solid rgba(148,163,184,.15);
    border-radius: 12px;
    background: #0d1317;
    color: #9ba8b0;
}
.ps-community-rename-current strong { color: #ff7184; font-size: 15px; }
.ps-community-rename-policy,
.ps-community-rename-retention,
.ps-community-rename-history,
.ps-community-rename-override,
.ps-community-rename-locked { color: #8e9ba4; line-height: 1.55; }
.ps-community-rename-override { color: #c8d6dd; }
.ps-community-rename-form { display: grid; gap: 14px; margin-top: 16px; }
.ps-community-rename-form > label:not(.ps-community-rename-confirm) { display: grid; gap: 7px; color: #bec8ce; font-weight: 700; }
.ps-community-rename-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 10px;
    background: #0a1014;
    color: #edf3f6;
    padding: 11px 12px;
}
.ps-community-rename-form small { color: #83929c; font-weight: 400; line-height: 1.5; }
.ps-community-rename-status { min-height: 20px; color: #8e9ba4; font-size: 13px; }
.ps-community-rename-status[data-state="valid"] { color: #7ce0a8; }
.ps-community-rename-status[data-state="error"] { color: #ff8998; }
.ps-community-rename-confirm { display: flex; align-items: flex-start; gap: 9px; color: #aeb9c0; line-height: 1.5; font-size: 13px; }
.ps-community-rename-confirm input { margin-top: 3px; }
.ps-community-rename-form .ps-button { justify-self: start; }
.ps-community-rename-locked { margin-top: 14px; padding: 13px 15px; border: 1px solid rgba(148,163,184,.15); border-radius: 12px; background: #0d1317; }
.ps-community-rename-locked p { margin: 0; }
@media (max-width: 600px) {
    .ps-community-rename-current { align-items: flex-start; flex-direction: column; }
    .ps-community-rename-form .ps-button { width: 100%; justify-content: center; }
}
