/* NA7N Community — staff-only synthetic pilot. RTL / LTR responsive. */
:root{--cm-ink:#20313b;--cm-muted:#586772;--cm-purple:#67428a;--cm-border:#e3e6eb;--cm-mist:#f4faf9;--cm-sea:#087b88;--cm-soft:#f6f2fa}
.cm-page{color:var(--cm-ink);font-family:inherit;max-width:1140px;margin:0 auto;padding:16px max(4vw,18px) 84px}
.cm-page *, .cm-page *::before,.cm-page *::after{box-sizing:border-box}
.cm-hero{margin:20px auto 28px;padding:clamp(25px,4vw,56px);border:1px solid #e8dff0;border-radius:28px;background:linear-gradient(125deg,#f9f6fc 0%,#f0faf9 100%);display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,.65fr);align-items:center;gap:26px}
.cm-eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--cm-purple);background:white;padding:7px 14px;font-weight:700;border:1px solid #eee5f6;border-radius:999px;font-size:13px}
.cm-hero h1{font-size:clamp(32px,4vw,50px);margin:14px 0 10px;line-height:1.25;color:#302144}
.cm-lead{font-size:clamp(16px,2vw,19px);line-height:1.95;margin:0 0 17px}
.cm-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.cm-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 20px;border-radius:12px;text-decoration:none;border:1px solid #7d598f;background:var(--cm-purple);color:#fff;font-weight:750;font-size:15px;cursor:pointer;font-family:inherit;line-height:1.5}
.cm-button:hover{filter:brightness(.96);color:#fff}
.cm-button:focus-visible,.cm-filter:focus-visible,.cm-topic:focus-visible,.cm-icon-button:focus-visible{outline:3px solid #3c8dd5;outline-offset:3px}
.cm-button.alt{background:#fff;color:var(--cm-purple)}
.cm-button[disabled],.cm-button:disabled{cursor:not-allowed;opacity:.67;filter:none}
.cm-hero-art{display:flex;flex-direction:column;gap:11px;align-items:stretch}
.cm-quote{background:rgba(255,255,255,.87);border:1px solid #e4e7eb;border-radius:17px;padding:17px 19px;box-shadow:0 7px 22px rgba(42,43,78,.035);font-size:16px;font-weight:650;line-height:1.7}
.cm-quote:nth-child(2){margin-inline-start:26px}
.cm-quote span{display:block;font-size:12px;color:var(--cm-muted);font-weight:500;margin-bottom:5px}
.cm-caution{display:flex;gap:12px;padding:15px 18px;border-radius:14px;background:#fff7ed;border:1px solid #f1dfb9;font-size:14px;line-height:1.8;color:#684e2c;margin-bottom:28px}
.cm-caution strong{display:block}
.cm-caution-symbol{font-size:22px;flex:none}
.cm-grid{display:grid;grid-template-columns:minmax(0,1fr) 278px;gap:26px;align-items:start}
.cm-main-column{min-width:0}
.cm-panel{background:#fff;border:1px solid var(--cm-border);border-radius:20px;padding:22px;margin-bottom:18px;box-shadow:0 6px 22px rgba(38,41,62,.025)}
.cm-section-title{font-size:clamp(22px,2.7vw,29px);line-height:1.4;margin:0 0 7px;color:#2e2440}
.cm-section-sub{font-size:14px;color:var(--cm-muted);margin:0 0 19px;line-height:1.8}
.cm-searchbox{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #cbd5dd;border-radius:14px;padding:0 15px}
.cm-searchbox:focus-within{outline:2px solid #98b8bc;outline-offset:1px}
.cm-searchbox svg{flex:none;width:19px;height:19px;color:#758892}
.cm-searchbox input{border:0;background:transparent;min-height:49px;width:100%;font:inherit;color:#2a3e45;outline:0}
.cm-filters{display:flex;flex-wrap:wrap;gap:8px;margin:17px 0 3px}
.cm-filter{background:#f9fafb;border:1px solid #dfe4e8;border-radius:999px;padding:9px 15px;cursor:pointer;font:inherit;font-size:13px;color:#354b54;white-space:nowrap}
.cm-filter[aria-pressed=true]{background:#e9e0f1;color:var(--cm-purple);border-color:#b99fca;font-weight:750}
.cm-result-count{color:var(--cm-muted);font-size:13px;margin:0 0 13px}
.cm-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.cm-topic{display:flex;flex-direction:column;text-align:start;background:#fff;border:1px solid var(--cm-border);padding:21px 18px;border-radius:17px;min-height:210px;color:var(--cm-ink);font:inherit;cursor:pointer;transition:border-color .18s,transform .18s,box-shadow .18s;box-shadow:0 6px 18px rgba(23,31,43,.035)}
.cm-topic:hover{border-color:#a48ab6;transform:translateY(-2px);box-shadow:0 8px 24px rgba(36,25,57,.08)}
.cm-tag{display:inline-flex;align-self:flex-start;padding:5px 11px;background:#edf7f7;color:#086d7c;border-radius:999px;font-size:12px;font-weight:700}
.cm-topic h3{font-size:19px;line-height:1.6;color:#2d2550;margin:14px 0 10px}
.cm-topic p{color:#596976;margin:0 0 15px;line-height:1.75;font-size:14px}
.cm-topic .cm-more{font-weight:750;color:var(--cm-sea);font-size:13px;margin-top:auto}
.cm-sidebar{position:sticky;top:88px}
.cm-sidebar h3{font-size:19px;margin:0 0 12px}
.cm-sidebar p,.cm-sidebar li{line-height:1.9;font-size:14px;color:var(--cm-muted)}
.cm-sidebar ul{padding-inline-start:21px;margin:7px 0 17px}
.cm-state{color:var(--cm-muted);font-size:14px;line-height:1.9;margin:16px 0}
.cm-detail{background:#f6fafb;border:1px solid #dce8e9;border-radius:20px;padding:23px;margin-top:21px}
.cm-detail[hidden],.cm-dialog[hidden],.cm-ai-modal[hidden]{display:none!important}
.cm-detail-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cm-detail h2{font-size:clamp(22px,2.7vw,28px);margin:12px 0;line-height:1.5;color:#2d2550}
.cm-detail p{font-size:16px;line-height:2;color:#364b53;white-space:pre-line}
.cm-icon-button{background:transparent;border:1px solid #bfc9d1;border-radius:10px;padding:5px 11px;cursor:pointer;color:#314d59;font:inherit}
.cm-detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:17px}
.cm-post-meta{color:#687883;font-size:12px;line-height:1.8;margin-top:6px}
.cm-comment{border-block-start:1px solid #dfe6e8;padding:13px 3px;margin-top:12px}
.cm-comment p{font-size:14px;margin:5px 0}
.cm-form-row{display:grid;gap:5px;margin-bottom:14px}
.cm-form-row label{font-weight:750;font-size:14px}
.cm-form-row input,.cm-form-row textarea,.cm-form-row select{width:100%;border:1px solid #ccd1d8;border-radius:10px;padding:11px 13px;font:inherit;background:white;color:#283842}
.cm-form-row textarea{min-height:130px;resize:vertical;line-height:1.8}
.cm-form-hint{font-size:12px;color:#617381;line-height:1.8}
.cm-dialog{position:fixed;inset:0;z-index:10000;background:rgba(14,24,31,.65);display:grid;place-items:center;padding:16px;overflow:auto}
.cm-dialog-body{background:#fff;box-shadow:0 20px 70px rgba(14,24,31,.2);border-radius:20px;padding:24px;max-width:620px;width:100%;max-height:calc(100dvh - 36px);overflow:auto}
.cm-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.cm-dialog-head h2{margin:0 0 12px;font-size:23px}
.cm-empty{grid-column:1/-1;padding:22px;text-align:center;color:var(--cm-muted);background:#fbfcfd;border:1px dashed #d1d7de;border-radius:16px}
.cm-ai{position:fixed;inset-inline-end:20px;bottom:23px;z-index:40}
.cm-ai button{background:#ecf5f4;color:#344d56;border:1px solid #c4dcda;padding:11px 17px;display:flex;gap:11px;align-items:center;border-radius:100px;box-shadow:0 7px 25px rgba(28,44,56,.1);font:inherit;font-weight:750;cursor:not-allowed}
.cm-ai button span{font-size:11px;color:#6d7c82;font-weight:600}
.cm-live-label{display:inline-flex;border-radius:8px;background:#fcf1da;color:#755319;font-size:12px;padding:4px 8px;font-weight:650}
.cm-mod-status{display:inline-flex;border-radius:7px;padding:4px 8px;background:#faf0d7;color:#705421;font-size:12px}
.cm-reply-list{margin-top:18px}
.cm-page a:not(.cm-button){color:#087884}
.cm-page a:hover{text-decoration:underline}
[dir=ltr] .cm-topic{text-align:left}
@media(max-width:940px){.cm-hero{grid-template-columns:1fr}.cm-hero-art{display:none}.cm-grid{grid-template-columns:1fr}.cm-sidebar{position:static;display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.cm-sidebar .cm-panel{margin:0}}
@media(max-width:600px){.cm-page{padding:8px 14px 85px}.cm-hero{padding:25px 20px;border-radius:20px;margin-top:9px}.cm-topic-grid{grid-template-columns:1fr}.cm-topic{min-height:unset}.cm-sidebar{grid-template-columns:1fr}.cm-panel{padding:17px}.cm-ai{inset-inline-end:10px;bottom:12px}.cm-ai button{font-size:13px;padding:8px 12px}.cm-quote:nth-child(2){margin:0}}
@media(prefers-reduced-motion:reduce){.cm-topic{transition:none}.cm-topic:hover{transform:none}}

/* Authenticated-members-only community screen. Fail closed until auth.getUser succeeds. */
html:not(.cm-member-access) #site-content,
html:not(.cm-member-access) .cm-ai,
html:not(.cm-member-access) .cm-dialog,
html:not(.cm-member-access) .na7n-breadcrumb,
html:not(.cm-member-access) .na7n-context { display:none!important; }
html.cm-member-access #cm-member-gate { display:none!important; }
.cm-member-gate{width:min(680px,92vw);margin:54px auto 76px;padding:clamp(24px,5vw,46px);border:1px solid #e3d9ef;border-radius:26px;box-shadow:0 8px 30px rgba(45,34,64,.06);background:linear-gradient(130deg,#faf7fd,#f2faf9);text-align:center}
.cm-gate-mark{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;font-size:27px;color:#65428b;background:#fff;border:1px solid #e6dbea;margin:0 auto 18px}
.cm-member-gate h1{font-size:clamp(25px,4vw,35px);line-height:1.5;color:#342348;margin:0 0 13px}
.cm-member-gate p{font-size:16px;color:#4d5865;line-height:1.9}
.cm-member-gate .cm-actions{justify-content:center;margin-top:20px}
.cm-member-gate .cm-gate-status{font-size:13px;color:#765d83;min-height:22px}
.cm-member-gate .cm-gate-note{font-size:13px;color:#76677b;margin-top:23px}
@media(max-width:600px){.cm-member-gate{margin:28px auto 70px;padding:24px 19px}.cm-member-gate .cm-actions{flex-direction:column}.cm-member-gate .cm-button{width:100%}}

/* Standalone community topic reader. No in-page jump when opening a card. */
.cm-topic{display:flex;text-decoration:none!important}
.cm-topic:hover{text-decoration:none!important}
.cm-topic:hover h3{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.cm-topic-view{max-width:830px;padding-top:10px}
.cm-topic-back-nav{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:13px 0 20px;font-size:14px}
.cm-topic-back-nav a{color:#67428a;font-weight:750;text-decoration:none}
.cm-topic-back-nav a:hover{text-decoration:underline}
.cm-topic-article{padding:clamp(22px,4vw,42px);border-radius:24px;border:1px solid #e4e3e9;background:#fff;box-shadow:0 7px 25px rgba(28,36,60,.04)}
.cm-topic-article h1{color:#302144;font-size:clamp(25px,4vw,36px);line-height:1.45;margin:14px 0 6px;overflow-wrap:anywhere}
.cm-topic-content{padding:9px 0 16px}
.cm-topic-content p{color:#334954;white-space:pre-line;font-size:clamp(16px,2.1vw,19px);line-height:2.05;margin:0;overflow-wrap:anywhere}
.cm-topic-article .cm-detail-actions{border-top:1px solid #eee9f2;padding-top:19px;gap:9px}
.cm-topic-article .cm-detail-actions .cm-button{font-size:14px;min-height:41px}
.cm-topic-replies{margin-top:20px}
.cm-topic-replies h2{font-size:clamp(22px,3vw,28px);margin:0 0 5px;color:#302144}
.cm-topic-comment{border-color:#e4e8ec}
.cm-topic-comment .cm-post-meta{margin:0;color:#77838b;font-size:12px}
.cm-topic-comment p{white-space:pre-line;overflow-wrap:anywhere}
.cm-topic-comment .cm-button{font-size:12px;min-height:36px}
.cm-topic-guidance{background:#f2f7f7;border:1px solid #dce7e6;border-radius:14px;margin:22px 0;padding:18px 21px;color:#3b5660;font-size:14px;line-height:1.8}
.cm-topic-guidance p{margin:6px 0 0;font-size:14px;color:#526974}
body.na7n-topic-page .na7n-context{display:none!important}
@media(max-width:600px){
  .cm-topic-article{padding:20px 17px;border-radius:17px}
  .cm-topic-back-nav{margin:8px 0 17px}
  .cm-topic-view .cm-ai{bottom:10px}
}

/* Keep the discussion list visible sooner on small screens. */
@media(max-width:600px){
  .cm-hero{margin:6px 0 16px;padding:20px 18px}
  .cm-hero h1{font-size:32px;margin:10px 0 6px}
  .cm-hero .cm-lead{font-size:16px;line-height:1.7;margin-bottom:8px}
  .cm-hero .cm-actions{margin-top:14px}
  .cm-caution{padding:10px 12px;margin-bottom:18px;font-size:12px;gap:8px;line-height:1.6}
  .cm-caution-symbol{font-size:17px}
  .cm-caution strong{font-size:13px}
}

/* Lead with the primary community action instead of a distant secondary card. */
.cm-hero-actions{margin-top:20px;align-items:center}
.cm-hero-actions .cm-button{min-height:49px;padding:11px 24px;text-align:center}
.cm-hero-status{color:#67428a;font-size:13px;line-height:1.8;margin:10px 0 0}
.cm-hero-status:empty{display:none}
.cm-privacy-reminder{font-size:13px;line-height:1.7;color:#5b6871;margin:0 4px 18px}
@media(max-width:600px){
  .cm-hero-actions{display:flex;flex-direction:column;align-items:stretch}
  .cm-hero-actions .cm-button{width:100%;min-height:46px}
  .cm-hero-status{text-align:center}
  .cm-privacy-reminder{margin:0 2px 14px;font-size:12px}
}

/* Dedicated member-only discussion composer: mobile-first, no nested selection modal. */
.cm-compose-page{max-width:800px;margin-inline:auto}
.cm-compose-hero{margin:10px 0 21px}
.cm-compose-hero h1{color:#302144;font-size:clamp(28px,4.5vw,40px);line-height:1.4;margin:12px 0 4px}
.cm-compose-hero p{font-size:16px;color:#52636e;line-height:1.9;margin:0}
.cm-compose-page .cm-panel{padding:clamp(19px,3.5vw,34px)}
.cm-compose-page .cm-form-row{margin-bottom:21px;gap:8px}
.cm-compose-page .cm-form-row label{color:#352648;font-size:16px}
.cm-compose-page .cm-form-row input,.cm-compose-page .cm-form-row textarea{padding:13px 15px;border-radius:12px;font-size:16px}
.cm-compose-page .cm-form-row textarea{min-height:180px}
.cm-compose-page .cm-form-hint{margin:0;font-size:12px}
.cm-compose-page .cm-actions{margin-top:18px}
.cm-compose-page .cm-actions .cm-button{min-width:156px}
.cm-compose-page .cm-privacy-reminder{background:#f4faf9;border:1px solid #dceae8;border-radius:12px;padding:14px;margin:8px 0 14px;color:#405b5a}
.cm-compose-page #cm-create-preview-box h2{font-size:21px}
.cm-compose-page #cm-create-preview-box h3{font-size:19px;line-height:1.5;margin:10px 0}
.cm-compose-page #cm-create-preview-box p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9}
.cm-create-success{border-color:#d3e7dc}
.cm-create-success h2{color:#28564b;font-size:26px}
.cm-create-success p{line-height:1.9}
.cm-topic-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
@media(max-width:600px){
 .cm-compose-hero{margin:4px 0 15px}
 .cm-compose-page .cm-panel{padding:18px 16px}
 .cm-compose-page .cm-actions{flex-direction:column}
 .cm-compose-page .cm-actions .cm-button{width:100%}
}

/* Report dialog and moderator review queue for post-publication moderation. */
.cm-report-reasons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.cm-report-reasons .cm-button{white-space:normal;min-height:54px;padding:10px 13px;text-align:center}
.cm-report-item{padding:17px 0;border-bottom:1px solid #e3e8ed}
.cm-report-item:last-child{border-bottom:0}
.cm-report-item .cm-post-meta{margin-bottom:8px}
.cm-report-excerpt{font-size:15px;line-height:1.8;color:#334953;overflow-wrap:anywhere;white-space:pre-wrap}
.cm-report-link{font-size:14px;font-weight:700;text-decoration:underline}
.cm-report-item .cm-detail-actions{margin-top:12px}
.cm-report-item .cm-button{min-height:38px;padding:7px 11px;font-size:13px}
@media(max-width:600px){.cm-report-reasons{grid-template-columns:1fr}.cm-report-reasons .cm-button{width:100%}}

/* Hidden member-only panels and post-publish links must remain hidden despite button display rules. */
.cm-page [hidden],.cm-member-gate[hidden],.cm-dialog[hidden]{display:none!important}
