/* Faith profile pages. All selectors stay inside the module's own content root. */
#patriam-content.ui.container:has(.faith-profiles) { width: min(1440px, calc(100% - 4rem)) !important; margin-inline: auto !important; }
.faith-profiles { --fp-text: #ece7dc; --fp-muted: #c2c6ca; --fp-gold: #e2b665; --fp-border: rgba(216,160,62,.28); color: var(--fp-text); width: 100%; max-width: 1440px; margin: 2.5rem auto 4rem; overflow-wrap: anywhere; }
.faith-profiles *, .faith-profiles *::before, .faith-profiles *::after { box-sizing: border-box; }
.faith-profiles h1, .faith-profiles h2, .faith-profiles h3 { font-family: Jost, sans-serif; color: var(--fp-text); line-height: 1.25; }
.faith-profiles h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: .2rem 0 .7rem; }
.faith-profiles h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); margin: 0 0 .7rem; }
.faith-profiles h3 { font-size: 1.15rem; margin: 0 0 .8rem; }
.faith-profiles p { line-height: 1.65; }
.faith-profiles a { color: var(--fp-gold); }
.faith-profiles code { color: #f1d9a6; background: #20251f; border-radius: 3px; padding: .1rem .3rem; white-space: normal; }
.faith-profiles .ui.button { margin: 0; white-space: normal; line-height: 1.35; }
.faith-profiles :is(a, button, input, textarea):focus-visible { outline: 2px solid var(--fp-gold); outline-offset: 4px; }
.faith-profiles .ui.button, .faith-profiles .fp-open { min-height: 44px; min-width: 44px; }
.fp-muted, .fp-field-help { color: var(--fp-muted); }
.fp-eyebrow { color: #d8a03e; font-family: Jost, sans-serif; font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; margin: 0 0 .6rem; }
.fp-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.fp-heading > div { min-width: 0; }
.fp-heading p:not(.fp-eyebrow) { max-width: 76ch; margin: 0; }
.fp-actions, .fp-bottom-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.fp-panel { background: #101720; border: 1px solid var(--fp-border); border-radius: 12px; padding: clamp(1.1rem, 2.3vw, 2rem); min-width: 0; }
.fp-search { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; margin: 0 0 1.3rem; }
.fp-search .field { width: min(420px, 100%); margin: 0 !important; }
.faith-profiles .ui.form .field > label { color: var(--fp-text); font-size: 1rem; line-height: 1.5; margin-bottom: .5rem; }
.faith-profiles .ui.form :is(input[type=text], input[type=search], textarea) { color: var(--fp-text); background: #0b1017; border: 1px solid #626055; border-radius: 6px; width: 100%; min-height: 44px; line-height: 1.5; font-family: inherit; font-size: 1rem; padding: .8rem; }
.faith-profiles .ui.form textarea { resize: vertical; min-height: 110px; }
.faith-profiles .ui.form :is(input, textarea):focus { border-color: var(--fp-gold); background: #0b1017; color: var(--fp-text); }
.fp-count { color: var(--fp-muted); margin: 0 0 1.2rem; }
.fp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.fp-card { display: flex; flex-direction: column; gap: .8rem; }
.fp-card-top { display: flex; gap: .6rem; align-items: flex-start; justify-content: space-between; }
.fp-card-top h2 { margin: 0; }
.fp-card-top h2 a { text-decoration: none; }
.fp-card-top h2 a:hover { text-decoration: underline; }
.fp-tag, .fp-profile-tag { color: var(--fp-muted); font-size: .85rem; font-weight: 600; letter-spacing: .08em; white-space: nowrap; }
.fp-tag { border: 1px solid #626055; border-radius: 4px; padding: .25rem .45rem; }
.fp-summary { color: var(--fp-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; max-height: 9em; margin: 0; }
.fp-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--fp-border); font-size: .9rem; }
.fp-card-footer span:first-child { color: var(--fp-muted); }
.fp-empty { margin: 0; color: var(--fp-muted); }
.fp-mine { max-width: 820px; margin-inline: auto; }
.fp-candidate { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: 1rem 0; margin: 1rem 0; border-block: 1px solid var(--fp-border); font-family: Jost, sans-serif; font-size: 1.2rem; }
.fp-pagination { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.fp-pagination span { color: var(--fp-muted); }
.fp-profile { max-width: 980px; margin-inline: auto; }
.fp-profile-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.2rem; border-bottom: 1px solid var(--fp-border); }
.fp-profile-heading h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); margin: 0 0 .35rem; }
.fp-profile-tag { margin: 0; }
.fp-leader { color: var(--fp-muted); margin: 1.2rem 0 0; }
.fp-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.fp-badge { display: inline-block; border: 1px solid #626055; border-radius: 100px; padding: .35rem .8rem; color: var(--fp-text); background: #1b222c; font-size: .83rem; font-weight: 600; line-height: 1.4; }
.fp-badge-public { color: #bfe0c6; border-color: #526f5a; background: #15251c; }
.fp-badge-restricted { color: #ecc1ba; border-color: #835b56; background: #291b1b; }
.fp-content-section { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--fp-border); }
.fp-content-section:first-of-type { border-top: 0; padding-top: 0; }
.fp-content-section h3 { color: var(--fp-gold); }
.fp-prose { white-space: pre-wrap; line-height: 1.75; overflow-wrap: anywhere; max-width: 76ch; }
.fp-updated { border-top: 1px solid var(--fp-border); padding-top: 1.3rem; margin-top: 2rem; color: var(--fp-muted); font-size: .85rem; }
.fp-bottom-actions { max-width: 980px; margin: 1.3rem auto 0; }
.fp-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr); gap: 1.3rem; align-items: start; }
.fp-editor-layout > div, .fp-editor-sidebar { min-width: 0; }
.fp-editor-sidebar { display: grid; gap: 1.2rem; }
.fp-editor-sidebar p { margin: 0 0 1rem; }
.fp-editor-sidebar .ui.button { width: 100%; }
.fp-optional { color: var(--fp-muted); font-size: .85rem; font-weight: 400; }
.fp-field-help { font-size: .9rem; margin: .3rem 0 .9rem; }
.fp-editor-form > .field { margin: 1.5rem 0 2rem !important; }
.fp-editor-form h3 { padding-top: 1.3rem; border-top: 1px solid var(--fp-border); }
.fp-section-list { display: grid; gap: 1.2rem; margin: 1.3rem 0; }
.fp-edit-section { min-width: 0; border: 1px solid var(--fp-border); border-radius: 8px; padding: 1.1rem; }
.fp-edit-section legend { width: auto; padding: 0 .3rem; color: var(--fp-gold); font-family: Jost, sans-serif; font-weight: 600; }
.fp-edit-section .field:last-child { margin-bottom: 0 !important; }
.fp-editor-buttons { display: flex; gap: .7rem; flex-wrap: wrap; padding-top: 1.2rem; border-top: 1px solid var(--fp-border); }
.fp-confirm-intro { max-width: 980px; margin: 0 auto 1.3rem; }
.fp-confirm-intro p:last-child { margin-bottom: 0; }
.fp-preview-label { max-width: 980px; margin: 0 auto .7rem; color: var(--fp-gold); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.fp-confirm-actions { max-width: 980px; margin: 1.3rem auto 0; }
.fp-confirm-actions form { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.fp-staff-list { display: grid; gap: .8rem; }
.fp-staff-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1.5rem; }
.fp-staff-row h2 { font-size: 1.2rem; margin: 0; }
.fp-staff-row p { margin: .2rem 0 0; font-size: .88rem; }
.fp-open { display: inline-flex; align-items: center; gap: .5rem; }
@media (max-width: 1060px) {
    .fp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-editor-layout { grid-template-columns: minmax(0, 1fr); }
    .fp-editor-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-staff-row { grid-template-columns: minmax(0, 1fr) auto; }
    .fp-staff-row .fp-open { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    #patriam-content.ui.container:has(.faith-profiles) { width: calc(100% - 2rem) !important; }
    .faith-profiles { margin-top: 1.7rem; }
    .fp-grid, .fp-editor-sidebar { grid-template-columns: minmax(0, 1fr); }
    .fp-search .field { width: 100%; }
    .fp-card-top { flex-direction: column; }
    .fp-staff-row { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
    .fp-staff-row .fp-open { grid-column: auto; }
    .fp-edit-section { padding: .9rem; }
}
