:root{
  --bg:#f4f7fb;--surface:#fff;--surface-2:#f8fafc;--surface-3:#eef2f7;
  --ink:#172033;--muted:#667085;--subtle:#98a2b3;--line:#e4e7ec;
  --brand:#3157d5;--brand-strong:#2545b8;--brand-soft:#eef2ff;
  --nav:#111827;--nav-2:#182233;--success:#15803d;--danger:#c0263d;
  --warning:#a16207;--radius:16px;--radius-sm:11px;
  --shadow-sm:0 1px 2px rgba(16,24,40,.04),0 1px 3px rgba(16,24,40,.08);
  --shadow:0 14px 34px rgba(16,24,40,.10);--max:1200px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);line-height:1.5}button,input,textarea{font:inherit}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:var(--brand)}:focus-visible{outline:3px solid rgba(49,87,213,.22);outline-offset:2px}img{max-width:100%}
/* Shared buttons and forms */
.primary-btn,.send-button,.auth-card button,.sidebar-actions button,.modal-card>div>button{border:0;border-radius:var(--radius-sm);background:var(--brand);color:#fff;padding:11px 16px;font-weight:800;box-shadow:0 1px 2px rgba(16,24,40,.12);transition:.18s ease}.primary-btn:hover,.send-button:hover,.auth-card button:hover,.sidebar-actions button:hover{background:var(--brand-strong);transform:translateY(-1px)}.primary-btn:disabled,button:disabled{opacity:.55;cursor:not-allowed;transform:none}.secondary-btn,.sidebar-actions .secondary{background:#344054!important;color:#fff}.eyebrow{display:inline-block;font-size:11px;letter-spacing:.14em;font-weight:900;color:var(--brand);text-transform:uppercase}.backlink{display:inline-flex;align-items:center;gap:6px;color:#475467;text-decoration:none;font-weight:750;margin-bottom:14px}.backlink:hover{color:var(--brand)}
/* Messaging shell */
.app-shell{height:100dvh;display:grid;grid-template-columns:320px minmax(0,1fr);background:var(--surface)}.sidebar{background:linear-gradient(180deg,var(--nav),#0c1320);color:#fff;display:flex;flex-direction:column;min-width:0;border-right:1px solid rgba(255,255,255,.06)}.sidebar-header,.chat-header{min-height:72px;display:flex;align-items:center;padding:0 20px}.sidebar-header{justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.08)}.brand-lockup{display:flex;align-items:center;gap:11px;min-width:0}.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#5f7df0,var(--brand));display:grid;place-items:center;font-weight:900;box-shadow:0 8px 22px rgba(49,87,213,.34)}.sidebar-header strong{font-size:16px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-header small{display:block;color:#98a2b3;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-button{width:38px;height:38px;border-radius:10px;color:#d0d5dd;text-decoration:none;display:grid;place-items:center;font-size:18px;background:rgba(255,255,255,.06)}.icon-button:hover{background:rgba(255,255,255,.12);color:#fff}.sidebar-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:16px}.sidebar-actions button{padding:10px 12px}.community-nav-button{grid-column:1/-1;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08);color:#fff;text-decoration:none;text-align:center;padding:10px;border-radius:var(--radius-sm);font-weight:800}.community-nav-button:hover{background:rgba(255,255,255,.13)}.conversation-list{overflow:auto;padding:0 9px 12px}.conversation{width:100%;border:0;background:transparent;color:#fff;display:flex;gap:11px;text-align:left;padding:11px;border-radius:12px;margin:2px 0;transition:.15s}.conversation:hover,.conversation.active{background:rgba(255,255,255,.09)}.avatar{width:42px;height:42px;flex:0 0 42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#6d8af2,#3658d0);font-weight:850;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}.conversation-copy{min-width:0;display:flex;flex-direction:column;justify-content:center}.conversation-copy strong,.conversation-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-copy strong{font-size:14px}.conversation-copy small{color:#98a2b3;margin-top:2px;font-size:12px}.sidebar-empty{padding:28px 18px;color:#98a2b3;text-align:center}.chat-panel{min-width:0;display:grid;grid-template-rows:72px minmax(0,1fr) auto;background:var(--surface)}.chat-header{border-bottom:1px solid var(--line);background:rgba(255,255,255,.92);backdrop-filter:blur(12px);justify-content:space-between}.chat-header h1{font-size:17px;margin:0}.chat-header p{margin:2px 0 0;color:var(--muted);font-size:12px}.chat-status{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px}.status-dot{width:8px;height:8px;border-radius:50%;background:#22c55e}.mobile-menu{display:none;border:0;background:var(--surface-3);border-radius:10px;width:40px;height:40px;font-size:20px;margin-right:11px}.messages{overflow:auto;padding:26px clamp(16px,3vw,38px);display:flex;flex-direction:column;gap:14px;background:linear-gradient(180deg,#f8fafc,#f5f7fb)}.empty-state{margin:auto;text-align:center;color:var(--muted);max-width:340px}.empty-icon{width:68px;height:68px;border-radius:22px;margin:0 auto 14px;display:grid;place-items:center;font-size:30px;background:var(--brand-soft);box-shadow:var(--shadow-sm)}.empty-state h2{color:var(--ink);margin:0 0 4px;font-size:20px}.empty-state p{margin:0}.message{max-width:min(72%,720px)}.message.mine{align-self:flex-end}.message.theirs{align-self:flex-start}.message-meta{display:flex;gap:8px;align-items:center;font-size:11px;color:var(--muted);margin:0 7px 4px}.message.mine .message-meta{justify-content:flex-end}.bubble{background:#fff;border:1px solid var(--line);border-radius:17px 17px 17px 5px;padding:10px 13px;box-shadow:var(--shadow-sm);overflow-wrap:anywhere}.mine .bubble{background:var(--brand);color:#fff;border-color:var(--brand);border-radius:17px 17px 5px 17px}.bubble a{color:inherit;text-decoration:underline}.message-image{display:block;max-width:390px;width:100%;margin-top:8px;border-radius:12px}.composer{position:relative;display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:9px;align-items:end;padding:13px 18px calc(13px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}.composer textarea{resize:none;max-height:140px;border:1px solid #d0d5dd;border-radius:14px;padding:10px 13px;outline:none;min-height:42px;background:#fff}.composer textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(49,87,213,.10)}.composer-icon{border:0;background:var(--surface-3);border-radius:11px;width:42px;height:42px;font-size:19px;color:#344054}.composer-icon:hover{background:#e4e9f2}.attach{display:grid;place-items:center;cursor:pointer}.attach input{display:none}.send-button{height:42px;padding:10px 17px}.upload-preview{position:absolute;left:108px;bottom:63px;font-size:12px;background:#fff;padding:6px 9px;border-radius:8px;box-shadow:var(--shadow)}.upload-preview:empty{display:none}.emoji-picker{position:absolute;left:18px;bottom:68px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:8px;display:grid;grid-template-columns:repeat(6,36px);box-shadow:var(--shadow)}.emoji-picker button{border:0;background:transparent;font-size:20px;padding:5px;border-radius:8px}.emoji-picker button:hover{background:var(--surface-3)}
/* Modal */
.modal{position:fixed;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px;z-index:50}.modal.hidden{display:none}.modal-card{position:relative;width:min(560px,100%);max-height:min(86dvh,780px);overflow:auto;background:#fff;border-radius:20px;padding:26px;box-shadow:0 30px 90px rgba(15,23,42,.32)}.modal-close{position:absolute;right:14px;top:12px;border:0;background:var(--surface-3);font-size:24px;width:36px;height:36px;border-radius:10px}.modal-card h2{margin:0 44px 18px 0;font-size:22px}.modal-card label,.auth-card label{display:block;font-weight:750;margin:14px 0 6px;color:#344054;font-size:13px}.modal-card input,.auth-card input,.modal-card textarea,.reply-form textarea{width:100%;padding:11px 12px;border:1px solid #d0d5dd;border-radius:11px;margin-top:6px;background:#fff;color:var(--ink)}.modal-card input:focus,.auth-card input:focus,.modal-card textarea:focus,.reply-form textarea:focus{border-color:var(--brand);outline:0;box-shadow:0 0 0 3px rgba(49,87,213,.10)}.user-results{max-height:270px;overflow:auto;margin:12px 0}.user-row{display:flex!important;align-items:center;gap:10px;padding:10px;margin:0!important;border-bottom:1px solid var(--line)}.user-row input{width:auto!important;margin:0!important}.user-row span{display:flex;flex-direction:column}.user-row small{color:var(--muted)}
/* Authentication */
.auth-page{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 10%,#e7edff 0,transparent 34%),radial-gradient(circle at 85% 85%,#e7f5f1 0,transparent 34%),#f7f9fc}.auth-card{width:min(450px,100%);background:#fff;border:1px solid rgba(228,231,236,.85);border-radius:24px;padding:34px;box-shadow:0 24px 80px rgba(16,24,40,.12)}.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:26px}.auth-brand .brand-mark{color:#fff}.auth-card h1{margin:0;font-size:29px;letter-spacing:-.02em}.auth-card>p{color:var(--muted);margin:7px 0 20px}.auth-card button{width:100%;margin-top:18px;padding:12px}.auth-switch{text-align:center;font-size:14px}.alert{background:#fff1f3;color:#9f1239;border:1px solid #fecdd3;padding:11px 12px;border-radius:11px;margin-top:16px}
/* Community application shell */
.community-page{background:var(--bg)}.community-topbar{height:68px;background:rgba(17,24,39,.97);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(20px,calc((100vw - var(--max))/2));position:sticky;top:0;z-index:30;box-shadow:0 1px 0 rgba(255,255,255,.06)}.community-topbar .brand{color:#fff;text-decoration:none;font-size:17px;font-weight:900;display:flex;align-items:center;gap:9px}.community-topbar .brand:before{content:none;display:none}.community-topbar nav{display:flex;align-items:center;gap:5px}.community-topbar nav a{color:#b8c0cf;text-decoration:none;font-weight:750;font-size:13px;padding:9px 12px;border-radius:9px}.community-topbar nav a:hover,.community-topbar nav a.active{color:#fff;background:rgba(255,255,255,.09)}.community-wrap{width:min(var(--max),calc(100% - 32px));margin:0 auto;padding:34px 0 54px}.community-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,520px);align-items:end;gap:34px;margin:10px 0 28px}.community-hero h1,.community-banner h1,.original-post h1{font-size:clamp(30px,4.5vw,46px);line-height:1.07;letter-spacing:-.035em;margin:5px 0 10px}.community-hero p,.community-banner p{color:var(--muted);margin:0;max-width:680px}.community-search{display:flex;width:100%;box-shadow:var(--shadow-sm);border-radius:13px}.community-search input{flex:1;min-width:0;border:1px solid #d0d5dd;border-right:0;border-radius:13px 0 0 13px;padding:12px 14px;background:#fff}.community-search input:focus{outline:0;border-color:var(--brand)}.community-search button{border:0;background:var(--brand);color:#fff;font-weight:800;padding:12px 18px;border-radius:0 13px 13px 0}.community-grid,.thread-list{display:grid;gap:13px}.community-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.community-card,.thread-card{display:flex;gap:16px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px;text-decoration:none;color:inherit;box-shadow:var(--shadow-sm);transition:.18s ease}.community-card:hover,.thread-card:hover{border-color:#b8c5ef;box-shadow:0 10px 28px rgba(16,24,40,.08);transform:translateY(-2px)}.community-card h2,.thread-card h2{font-size:17px;line-height:1.3;margin:0 0 5px;letter-spacing:-.01em}.community-card p,.thread-card p{margin:0 0 8px;color:#475467;font-size:14px}.community-card small,.thread-card small,.community-banner small{color:var(--muted);font-size:12px}.community-avatar{width:50px;height:50px;flex:0 0 50px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(145deg,#eef2ff,#dfe6ff);color:var(--brand);font-weight:900;font-size:20px;border:1px solid #d9e0fb}.community-avatar.large{width:72px;height:72px;font-size:28px;border-radius:20px}.community-banner{display:flex;align-items:center;gap:19px;background:#fff;border-radius:21px;padding:24px;border:1px solid var(--line);margin:6px 0 22px;box-shadow:var(--shadow-sm)}.grow{flex:1;min-width:0}.vote-stat{width:64px;flex:0 0 64px;text-align:center;background:var(--surface-2);border:1px solid var(--line);border-radius:13px;padding:9px 6px}.vote-stat strong{display:block;font-size:19px}.vote-stat span{font-size:11px;color:var(--muted)}.empty-card{padding:42px;background:#fff;border:1px dashed #cfd5df;border-radius:17px;text-align:center;color:var(--muted)}.check-row{display:flex!important;align-items:flex-start;gap:9px}.check-row input{width:auto!important;margin:3px 0 0!important}.blocked-badge{display:inline-flex;align-items:center;background:#fff1f3;color:#a8122d;border:1px solid #fecdd3;border-radius:999px;padding:9px 13px;font-weight:800;font-size:12px}
/* Thread */
.thread-layout{width:min(var(--max),calc(100% - 32px));margin:0 auto;padding:28px 0 54px;display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:22px}.original-post,.highlights,.reply-form,.side-card,.rules-card,.rules-summary,.moderation-notice{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow-sm)}.original-post{margin:0 0 17px}.thread-original-body{font-size:17px;line-height:1.72;color:#344054;margin:16px 0 20px}.original-post small{color:var(--muted)}.highlights{margin-bottom:17px;background:linear-gradient(180deg,#fffdf6,#fff);border-color:#f0df9f}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.section-heading h2{margin:3px 0 11px;font-size:21px}.section-heading>span{font-size:12px;color:var(--warning);font-weight:800}.highlight-item{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:13px;align-items:center;border-top:1px solid #eee5c5;padding:13px 0;text-decoration:none;color:inherit}.highlight-item strong{font-size:13px;color:#9a6700}.highlight-item blockquote{margin:0;color:#344054;font-size:14px;line-height:1.45}.highlight-item>span{font-size:12px;color:var(--brand);font-weight:800}.posts{display:grid;gap:11px}.reply-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px;scroll-margin-top:86px;box-shadow:var(--shadow-sm)}.reply-card header,.reply-card footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.reply-card header strong{font-size:13px}.reply-card header a{color:var(--subtle);text-decoration:none;font-size:12px}.reply-body{padding:13px 0 15px;line-height:1.65;color:#344054}.reply-card footer{justify-content:flex-start;flex-wrap:wrap}.like-btn,.reply-link,.edit-btn,.flag-btn{border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:7px 10px;font-weight:800;font-size:12px;color:#475467}.like-btn:hover,.reply-link:hover,.edit-btn:hover{background:var(--surface-3)}.like-btn.liked{background:#fff1f3;color:#b42342;border-color:#fecdd3}.flag-btn{background:#fff;border-color:transparent;color:#b42342;margin-left:auto}.flag-btn:hover{background:#fff1f3}.reply-form{margin-top:17px}.reply-form h2{margin:0 0 11px;font-size:20px}.reply-form .primary-btn{margin-top:11px}.thread-side{position:relative}.side-card{position:sticky;top:88px;display:grid;gap:4px;padding:16px}.side-card h3{margin:0 0 7px;padding:0 8px;font-size:14px}.side-card a{color:#475467;text-decoration:none;padding:8px 9px;border-radius:9px;font-size:12px;font-weight:700}.side-card a:hover{background:var(--surface-3);color:var(--brand)}.reply-card.flash{animation:flashPost 1.6s}@keyframes flashPost{0%,100%{box-shadow:var(--shadow-sm)}20%,70%{box-shadow:0 0 0 4px rgba(250,204,21,.55)}}.post-actions{margin-top:16px;display:flex;gap:8px}.rules-card,.rules-summary{margin:17px 0}.rules-summary{background:#fafbfc}.rules-summary p,.rules-card div{line-height:1.65;color:#475467}.moderation-notice{margin-top:17px;background:#fff1f3;border-color:#fecdd3;color:#9f1239;font-weight:800}.my-post-card{align-items:flex-start}.my-post-card a{display:inline-block;margin-right:12px;color:var(--brand);font-weight:800;text-decoration:none}.edit-note{font-size:12px;color:var(--muted);font-weight:700}
/* Mobile */
@media(max-width:900px){.community-grid{grid-template-columns:1fr}.community-hero{grid-template-columns:1fr;gap:18px}.thread-layout{grid-template-columns:1fr}.thread-side{order:-1}.side-card{position:static;display:flex;overflow:auto;white-space:nowrap;padding:10px}.side-card h3{display:none}.side-card a{background:var(--surface-2);flex:0 0 auto}.community-banner{align-items:flex-start;flex-wrap:wrap}.community-banner .primary-btn,.community-banner .blocked-badge{margin-left:91px}}
@media(max-width:760px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;inset:0 14% 0 0;z-index:40;transform:translateX(-105%);transition:.22s ease;box-shadow:22px 0 50px rgba(0,0,0,.25)}.sidebar.open{transform:none}.mobile-menu{display:grid;place-items:center}.chat-status{display:none}.message{max-width:88%}.composer{padding:10px 10px calc(10px + env(safe-area-inset-bottom));grid-template-columns:auto auto minmax(0,1fr) auto}.send-button{width:42px;padding:0;font-size:0}.send-button:after{content:"➜";font-size:18px}.messages{padding:16px 13px}.community-topbar{padding:0 13px;height:62px}.community-topbar nav{gap:1px}.community-topbar nav a{padding:8px 9px;font-size:12px}.community-topbar nav a:last-child{display:none}.community-wrap,.thread-layout{width:min(100% - 22px,var(--max));padding-top:22px}.community-hero h1,.community-banner h1,.original-post h1{font-size:30px}.community-banner{padding:18px}.community-avatar.large{width:58px;height:58px;flex-basis:58px;border-radius:17px}.community-banner .primary-btn,.community-banner .blocked-badge{margin-left:0;width:100%;justify-content:center}.thread-card{align-items:flex-start;padding:15px}.vote-stat{width:54px;flex-basis:54px}.highlight-item{grid-template-columns:56px minmax(0,1fr)}.highlight-item>span{grid-column:2}.original-post,.highlights,.reply-form,.side-card,.rules-card,.rules-summary,.moderation-notice{padding:17px}.flag-btn{margin-left:0}.auth-card{padding:26px 22px;border-radius:20px}}
@media(max-width:480px){.community-topbar .brand{font-size:0}.community-topbar .brand:before{font-size:13px}.community-topbar nav a{padding:8px}.community-search button{padding:11px 13px}.composer-icon{width:38px;height:40px}.send-button{width:40px}.composer{gap:6px}.emoji-picker{left:8px;grid-template-columns:repeat(6,34px)}.message{max-width:94%}.community-card{padding:15px}.community-avatar{width:44px;height:44px;flex-basis:44px}.reply-card footer{gap:6px}}
.follow-btn{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:.55rem .85rem;font-weight:700;cursor:pointer}.follow-btn.following{background:#eef2ff;border-color:#818cf8;color:#3730a3}.notification-card{display:block;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1rem 1.1rem;margin:.75rem 0;color:inherit;text-decoration:none}.notification-card.unread{border-left:5px solid #4f46e5;background:#f8faff}.notification-card p{margin:.4rem 0;color:#475569}.account-shell{max-width:900px;margin:0 auto;padding:2rem 1rem}.empty-state{padding:2rem;background:#fff;border:1px solid #e2e8f0;border-radius:16px;color:#64748b}
/* Link previews */
.link-preview-card{display:grid;grid-template-columns:minmax(140px,220px) minmax(0,1fr);margin:14px 0 18px;border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--surface);color:inherit;text-decoration:none;box-shadow:var(--shadow-sm);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.link-preview-card:hover{transform:translateY(-2px);border-color:#b8c5ef;box-shadow:0 12px 30px rgba(16,24,40,.10)}.link-preview-card>img{width:100%;height:100%;min-height:150px;object-fit:cover;background:var(--surface-3)}.link-preview-copy{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:16px 18px}.link-preview-copy small{font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:var(--brand);margin-bottom:5px}.link-preview-copy strong{font-size:17px;line-height:1.32;color:var(--ink);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.link-preview-copy>span{font-size:13px;line-height:1.5;color:var(--muted);margin-top:7px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.link-preview-copy em{font-size:11px;font-style:normal;color:var(--subtle);margin-top:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reply-card .link-preview-card{grid-template-columns:120px minmax(0,1fr);margin-top:0}.reply-card .link-preview-card>img{min-height:120px}.reply-card .link-preview-copy{padding:13px 15px}.reply-card .link-preview-copy strong{font-size:15px}
@media(max-width:600px){.link-preview-card,.reply-card .link-preview-card{grid-template-columns:1fr}.link-preview-card>img,.reply-card .link-preview-card>img{height:180px;min-height:0}.link-preview-copy{padding:14px 15px}.link-preview-copy strong{font-size:15px}}
/* Member profiles and post identity */
.post-author-row{display:flex;align-items:center;gap:10px;min-width:0}.post-author-row>div{display:flex;flex-direction:column;min-width:0}.post-author-row small{font-size:11px;color:var(--muted)}.post-avatar-link{display:flex;flex:0 0 auto}.post-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid var(--line);background:var(--surface-3)}.avatar-initial,.avatar-anonymous{display:grid;place-items:center;font-weight:900;color:var(--brand);background:var(--brand-soft)}.avatar-anonymous{color:#667085;background:#f2f4f7}.post-author-name{font-size:14px;font-weight:900;color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.post-author-name:hover{color:var(--brand);text-decoration:underline}.original-post>.post-author-row{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}.profile-shell{width:min(1100px,calc(100% - 32px));margin:0 auto;padding:32px 0 60px}.profile-hero{display:flex;align-items:center;gap:22px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:26px;box-shadow:var(--shadow-sm);margin-bottom:22px}.profile-hero h1{margin:3px 0;font-size:32px}.profile-hero p{margin:0 0 14px;color:var(--muted)}.profile-avatar-xl{width:108px;height:108px;border-radius:28px;object-fit:cover;border:1px solid var(--line);background:var(--surface-3)}.profile-initial{display:grid;place-items:center;font-size:42px;font-weight:900;color:var(--brand);background:var(--brand-soft)}.profile-edit-link{display:inline-flex;text-decoration:none}.profile-columns{display:grid;grid-template-columns:1fr 1.25fr;gap:22px}.profile-panel,.profile-edit-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow-sm)}.profile-panel h2{margin:3px 0 14px}.profile-group-list,.profile-thread-list{display:grid;gap:10px}.profile-group-list a,.profile-thread-list a{display:flex;flex-direction:column;gap:3px;padding:14px;border:1px solid var(--line);border-radius:13px;text-decoration:none;color:inherit;background:var(--surface-2)}.profile-group-list a:hover,.profile-thread-list a:hover{border-color:#b8c5ef;background:#fff}.profile-group-list span,.profile-thread-list small{color:var(--muted);font-size:12px}.profile-thread-list span{font-size:12px;color:var(--brand);font-weight:800;margin-top:4px}.profile-edit-shell{width:min(680px,calc(100% - 28px));margin:0 auto;padding:32px 0}.profile-edit-card h1{margin:4px 0 18px}.profile-edit-card form{display:grid;gap:16px}.profile-edit-card label{font-weight:800;font-size:13px}.profile-edit-card input{width:100%;margin-top:7px;border:1px solid var(--line);border-radius:11px;padding:11px}.profile-edit-card label small{display:block;color:var(--muted);font-weight:500;margin-top:5px}.profile-avatar-preview{width:96px;height:96px;border-radius:24px;object-fit:cover}.success-alert{padding:12px;border-radius:10px;background:#ecfdf3;color:#166534;margin-bottom:14px}@media(max-width:760px){.profile-columns{grid-template-columns:1fr}.profile-hero{align-items:flex-start;padding:19px}.profile-avatar-xl{width:76px;height:76px;border-radius:20px}.profile-hero h1{font-size:25px}.post-avatar{width:36px;height:36px}}
/* Chat and community branding */
.chat-panel{grid-template-rows:auto 72px minmax(0,1fr) auto}.chat-brand-hero{position:relative;height:clamp(150px,24vw,280px);overflow:hidden;background:linear-gradient(135deg,#182230,#344054)}.chat-brand-hero.hidden{display:none}.chat-brand-banner{width:100%;height:100%;object-fit:cover;display:block}.chat-brand-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,15,28,.08),rgba(8,15,28,.55))}.chat-brand-logo{position:absolute;left:clamp(18px,3vw,38px);bottom:18px;width:clamp(70px,9vw,104px);height:clamp(70px,9vw,104px);border-radius:22px;object-fit:cover;background:#fff;border:4px solid #fff;box-shadow:0 12px 30px rgba(0,0,0,.26)}.brand-edit{position:absolute;right:20px;top:18px;border:1px solid rgba(255,255,255,.5);background:rgba(17,24,39,.72);backdrop-filter:blur(8px);color:#fff;border-radius:10px;padding:9px 13px;font-weight:800}.icon-button.light{border:1px solid var(--line);background:#fff;color:var(--ink)}.community-cover{position:relative;height:clamp(170px,25vw,310px);border-radius:22px;overflow:hidden;margin:6px 0 0;background:linear-gradient(135deg,#172033,#394968)}.community-cover>img{width:100%;height:100%;object-fit:cover}.community-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.04),rgba(0,0,0,.50))}.community-cover-edit{position:absolute;z-index:2;top:16px;right:16px}.community-banner.has-cover{margin-top:-58px;position:relative;z-index:3;width:calc(100% - 34px);margin-left:auto;margin-right:auto}.community-logo-image{width:72px;height:72px;object-fit:cover;border-radius:20px;border:1px solid #d9e0fb;background:#fff}.branding-preview-note,.form-help{color:var(--muted);font-size:13px;margin-top:-4px}
@media(max-width:760px){.chat-brand-hero{height:170px}.chat-brand-logo{bottom:13px}.brand-edit{top:12px;right:12px}.community-cover{height:180px;border-radius:16px}.community-banner.has-cover{margin-top:-38px;width:calc(100% - 14px)}.community-logo-image{width:58px;height:58px;border-radius:17px}}
/* Public chat activity homepage */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.public-home-wrap{padding-top:44px}.public-home-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,520px);align-items:end;gap:42px;padding:34px;border:1px solid var(--line);border-radius:26px;background:linear-gradient(135deg,#fff 0%,#f7f9ff 60%,#eef2ff 100%);box-shadow:var(--shadow-sm);overflow:hidden;position:relative}.public-home-hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-110px;top:-145px;background:rgba(49,87,213,.08)}.public-home-hero>div,.public-home-hero>form{position:relative;z-index:1}.public-home-hero h1{font-size:clamp(34px,5vw,58px);line-height:1;letter-spacing:-.045em;margin:7px 0 14px;max-width:680px}.public-home-hero p{margin:0;color:var(--muted);font-size:16px;max-width:660px}.public-chat-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:34px 2px 16px}.public-chat-heading h2{font-size:24px;letter-spacing:-.025em;margin:0}.public-chat-heading p{color:var(--muted);margin:3px 0 0;font-size:13px}.sort-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;color:#475467;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:800}.sort-chip:before{content:"↓";color:var(--brand)}.public-chat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.public-chat-card{display:block;overflow:hidden;text-decoration:none;color:inherit;background:#fff;border:1px solid var(--line);border-radius:21px;box-shadow:var(--shadow-sm);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.public-chat-card:hover{transform:translateY(-3px);border-color:#b8c5ef;box-shadow:0 18px 40px rgba(16,24,40,.10)}.public-chat-cover{height:148px;position:relative;overflow:hidden;background:linear-gradient(135deg,#172033,#344b73)}.public-chat-cover.no-cover:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 22% 18%,rgba(110,137,242,.48),transparent 33%),radial-gradient(circle at 82% 92%,rgba(49,87,213,.42),transparent 35%)}.public-chat-cover img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .25s ease}.public-chat-card:hover .public-chat-cover img{transform:scale(1.025)}.public-chat-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,13,24,.04),rgba(7,13,24,.44))}.activity-pill{position:absolute;right:13px;top:13px;z-index:2;color:#fff;background:rgba(17,24,39,.76);border:1px solid rgba(255,255,255,.25);backdrop-filter:blur(9px);border-radius:999px;padding:6px 10px;font-size:11px;font-weight:850}.public-chat-content{display:flex;gap:15px;padding:0 19px 20px}.public-chat-logo{width:64px;height:64px;flex:0 0 64px;border-radius:18px;object-fit:cover;background:#fff;border:4px solid #fff;box-shadow:0 7px 18px rgba(16,24,40,.16);margin-top:-28px;position:relative;z-index:3}.public-chat-initial{display:grid;place-items:center;background:linear-gradient(145deg,#eef2ff,#dce4ff);color:var(--brand);font-size:25px;font-weight:950}.public-chat-copy{min-width:0;flex:1;padding-top:14px}.public-chat-title-row{display:flex;align-items:center;gap:12px}.public-chat-title-row h3{font-size:19px;line-height:1.25;letter-spacing:-.02em;margin:0;flex:1}.public-chat-title-row>span{color:var(--brand);font-size:18px;font-weight:900;transition:transform .18s ease}.public-chat-card:hover .public-chat-title-row>span{transform:translateX(3px)}.public-chat-copy>p{color:#475467;font-size:13px;line-height:1.55;min-height:41px;margin:7px 0 13px}.public-chat-stats{display:flex;flex-wrap:wrap;gap:7px 13px;color:var(--muted);font-size:11px;font-weight:700}.public-chat-stats span{position:relative}.public-chat-stats span+span:before{content:"·";position:absolute;left:-8px;color:#c0c6d1}.public-chat-empty{grid-column:1/-1;display:grid;gap:4px}.public-chat-empty strong{color:var(--ink);font-size:17px}.public-chat-empty span{color:var(--muted)}
@media(max-width:900px){.public-home-hero{grid-template-columns:1fr;gap:22px}.public-chat-grid{grid-template-columns:1fr}}
@media(max-width:760px){.public-home-wrap{padding-top:22px}.public-home-hero{padding:24px 20px;border-radius:20px}.public-home-hero h1{font-size:37px}.public-chat-heading{align-items:center;margin-top:26px}.sort-chip{display:none}.public-chat-cover{height:126px}.public-chat-content{padding-left:15px;padding-right:15px}.public-chat-logo{width:58px;height:58px;flex-basis:58px;border-radius:16px}.home-public-page .community-topbar nav a:nth-child(3),.home-public-page .community-topbar nav a:nth-child(4){display:none}}
@media(max-width:480px){.public-home-hero{padding:22px 16px}.public-home-hero h1{font-size:33px}.public-chat-heading h2{font-size:21px}.public-chat-cover{height:112px}.public-chat-content{gap:12px}.public-chat-copy>p{min-height:0}.public-chat-stats{gap:5px 12px}}

/* Shared legal footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, .24);
  background: #0f172a;
  color: #cbd5e1;
}
.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  font-size: .88rem;
}
.site-footer-links,
.site-footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer a {
  color: #f8fafc;
  font-weight: 700;
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus-visible { text-decoration: underline; }
.footer-divider { color: #64748b; }
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-page .auth-card { flex: 0 0 auto; }
.auth-page .site-footer { width: 100%; margin-top: auto; }
.chat-panel + .site-footer { display: none; }
body:not(.auth-page) { min-height: 100vh; }

/* Legal pages */
.legal-page { background: #f4f7fb; }
.legal-wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}
.legal-hero { margin-bottom: 24px; }
.legal-hero h1 { margin: 8px 0 8px; font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: -.04em; }
.legal-hero p { margin: 0; color: #64748b; }
.legal-card {
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
  padding: clamp(24px, 5vw, 54px);
  color: #334155;
  line-height: 1.75;
}
.legal-card > p:first-child { font-size: 1.08rem; color: #1e293b; }
.legal-card h2 { margin: 38px 0 10px; color: #0f172a; font-size: 1.35rem; letter-spacing: -.015em; }
.legal-card h3 { margin: 23px 0 7px; color: #1e293b; font-size: 1rem; }
.legal-card p { margin: 0 0 15px; }
.legal-card ul { margin: 10px 0 20px; padding-left: 24px; }
.legal-card li { margin: 7px 0; }

@media (max-width: 700px) {
  .site-footer-inner { align-items: flex-start; flex-direction: column; gap: 13px; }
  .site-footer-brand { gap: 9px; }
  .legal-wrap { padding-top: 34px; }
  .legal-card { border-radius: 16px; }
}

.identity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-top:24px}.identity-card{position:relative;overflow:hidden;min-height:190px;padding:72px 18px 18px;border:1px solid #dbe3ee;border-radius:18px;background:#fff;text-align:left;cursor:pointer}.identity-card.selected{outline:3px solid #2563eb;border-color:#2563eb}.identity-bg{position:absolute;inset:0 0 auto;width:100%;height:85px;object-fit:cover}.identity-thumb{position:relative;display:block;width:58px;height:58px;border-radius:15px;object-fit:cover;border:3px solid #fff;box-shadow:0 6px 18px rgba(15,23,42,.15);margin-bottom:10px}.identity-card strong,.identity-card small{position:relative;display:block}.message-sender-avatar{width:24px;height:24px;border-radius:8px;object-fit:cover;display:inline-flex;align-items:center;justify-content:center;margin-right:6px;vertical-align:middle}.message-meta{display:flex;align-items:center;gap:5px}.message-meta time{margin-left:auto}

.first-run-card{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 24px;padding:24px;border:1px solid #f2c94c;border-radius:18px;background:#fff9df;box-shadow:0 10px 30px rgba(17,24,39,.08)}
.first-run-card h1{margin:.25rem 0 .4rem;font-size:clamp(1.45rem,3vw,2rem)}
.first-run-card p{margin:0;max-width:720px;color:#4b5563}
@media(max-width:720px){.first-run-card{align-items:stretch;flex-direction:column}.first-run-card .primary-btn{text-align:center}}

/* Nested discussion branches */
.threaded-posts{display:block}.thread-node{position:relative;margin:0 0 11px}.thread-children{position:relative;margin:11px 0 0 26px;padding-left:22px}.thread-children:before{content:"";position:absolute;left:0;top:-11px;bottom:20px;width:2px;background:#d9e0ea;border-radius:2px}.thread-children>.thread-node{position:relative}.thread-children>.thread-node:before{content:"";position:absolute;left:-22px;top:27px;width:18px;height:16px;border-left:2px solid #d9e0ea;border-bottom:2px solid #d9e0ea;border-bottom-left-radius:11px;pointer-events:none}.thread-children>.thread-node:last-child:after{content:"";position:absolute;left:-22px;top:45px;bottom:-12px;width:4px;background:var(--bg,#f6f8fb);pointer-events:none}.replying-to{margin:11px 0 -4px;padding:7px 10px;border-left:3px solid #c7d2fe;background:#f7f8ff;border-radius:0 8px 8px 0;color:#667085;font-size:12px}.replying-to a{font-weight:800;color:var(--brand);text-decoration:none}.reply-context{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 11px;padding:10px 12px;background:#f5f7ff;border:1px solid #d9e0ff;border-left:4px solid var(--brand);border-radius:10px}.reply-context[hidden]{display:none}.reply-context>div{min-width:0;display:grid;gap:2px}.reply-context strong{font-size:13px}.reply-context [data-reply-excerpt]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#667085;font-size:12px}.reply-context button{flex:0 0 auto;width:30px;height:30px;border:0;border-radius:8px;background:#e8ecf8;color:#475467;font-size:20px;line-height:1;cursor:pointer}.reply-context button:hover{background:#dce3f5}.thread-depth-4 .thread-children{margin-left:0;padding-left:18px}.thread-depth-4 .thread-children>.thread-node:before{left:-18px;width:14px}
@media(max-width:700px){.thread-children{margin-left:10px;padding-left:14px}.thread-children:before{left:0}.thread-children>.thread-node:before{left:-14px;width:11px;height:13px;top:25px}.thread-children>.thread-node:last-child:after{left:-14px;top:40px}.thread-node .reply-card{padding:14px}.replying-to{font-size:11px}.thread-depth-3 .thread-children,.thread-depth-4 .thread-children{margin-left:0;padding-left:12px}.thread-depth-3 .thread-children>.thread-node:before,.thread-depth-4 .thread-children>.thread-node:before{left:-12px;width:9px}}

/* v19 inline editing, reporting, and restricted rich-text formatting */
.formatted-large{font-size:1.5em;line-height:1.35}.formatted-small{font-size:.8em;line-height:1.45}.format-editor{position:relative}.format-editor textarea{width:100%;resize:vertical}.format-toolbar{display:flex;align-items:center;gap:6px;margin:8px 0 0;padding:7px;border:1px solid var(--line);border-radius:10px;background:#fff;opacity:.62;transition:opacity .16s ease,box-shadow .16s ease}.format-toolbar.selection-active{opacity:1;box-shadow:var(--shadow-sm)}.format-toolbar button{min-width:38px;height:34px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--ink);font-weight:800;cursor:pointer}.format-toolbar button:hover{background:#fff;border-color:#aebbe9}.format-help{display:block;margin-top:6px;color:var(--muted);font-size:12px}.inline-edit-panel{display:grid;gap:10px;margin:12px 0;padding:14px;border:1px solid #b9c5ee;border-radius:14px;background:#f8faff}.inline-edit-panel label{display:grid;gap:6px;font-size:12px;font-weight:800}.inline-edit-panel input,.inline-edit-panel textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px;background:#fff;font:inherit}.inline-edit-actions{display:flex;justify-content:flex-end;gap:8px}.editing-hidden{display:none}.flag-popover{position:absolute;z-index:1000;width:min(320px,calc(100vw - 24px));padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 18px 55px rgba(16,24,40,.20)}.flag-popover.hidden{display:none}.flag-popover form{display:grid;gap:10px}.flag-popover strong{font-size:15px}.flag-popover p{margin:0;color:var(--muted);font-size:12px}.flag-popover label{display:grid;gap:6px;font-size:12px;font-weight:800}.flag-popover select{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px;background:#fff}.flag-popover form>div{display:flex;justify-content:flex-end;gap:8px}.danger-btn{border:0;border-radius:9px;padding:9px 12px;background:#b42318;color:#fff;font-weight:800;cursor:pointer}.flag-btn.flagged{opacity:.6;pointer-events:none}.secondary-btn{border:1px solid var(--line);border-radius:9px;padding:9px 12px;background:#fff;color:var(--ink);font-weight:800;cursor:pointer}
@media(max-width:640px){.format-toolbar{overflow-x:auto}.inline-edit-actions{flex-direction:column-reverse}.inline-edit-actions button{width:100%}.flag-popover{position:fixed!important;left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto}}
/* v20 community images and sharing */
.content-image-link{display:block;margin:14px 0;text-decoration:none}.content-image{display:block;width:auto;max-width:100%;max-height:720px;border-radius:14px;border:1px solid var(--line);object-fit:contain;background:#f5f7fa}.share-btn{border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:7px 10px;font-weight:800;font-size:12px;color:#475467}.share-btn:hover{background:var(--surface-3)}.image-upload-row{display:grid;gap:6px;margin-top:12px;font-weight:800;color:#344054}.image-upload-row input[type=file]{border:1px dashed #cbd5e1;border-radius:12px;padding:11px;background:#fff}.image-upload-row small{font-weight:500;color:var(--muted)}

/* v21 post enhancements and external-link confirmation */
.enhancement-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 0;padding-top:10px;border-top:1px solid var(--line)}
.enhancement-bar>span{font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.enhancement-button{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:10px;padding:8px 11px;background:var(--surface-2);color:var(--ink);font-weight:800}
.enhancement-button:hover,.enhancement-button[aria-expanded="true"]{background:var(--brand-soft);border-color:#aebbe9;color:var(--brand-strong)}
.enhancement-icon{font-size:18px;line-height:1}
.image-drop-panel{margin-top:10px}.image-drop-panel[hidden]{display:none}
.image-drop-zone{position:relative;display:grid;place-items:center;gap:5px;min-height:145px;padding:22px;border:2px dashed #b8c2d6;border-radius:14px;background:#fafbff;text-align:center;cursor:pointer;transition:border-color .15s ease,background .15s ease,transform .15s ease}
.image-drop-zone:hover,.image-drop-zone.drag-over{border-color:var(--brand);background:var(--brand-soft);transform:translateY(-1px)}
.image-drop-zone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.image-drop-zone strong{font-size:15px}.image-drop-zone span,.image-drop-zone small{color:var(--muted);font-weight:500}.image-file-status{margin-top:7px;color:var(--success);font-size:13px;font-weight:800}
.external-link-modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.72);backdrop-filter:blur(4px)}
.external-link-modal.hidden{display:none}.external-link-dialog{position:relative;width:min(620px,100%);padding:30px;border-radius:22px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.3)}
.external-link-dialog h2{margin:6px 0 8px;font-size:clamp(1.55rem,4vw,2.2rem)}.external-link-dialog p{margin:0 0 20px;color:var(--muted)}
.external-link-close{position:absolute;right:14px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:#eef2f7;color:#344054;font-size:25px;line-height:1}
.external-url-label{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;color:#475467}.external-url-value{margin:8px 0 20px;padding:14px;border:1px solid #d7deea;border-radius:12px;background:#f8fafc;overflow-wrap:anywhere;color:#172033;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px}
.external-link-continue{display:block;padding:15px 18px;border-radius:12px;background:var(--brand);color:#fff;text-align:center;text-decoration:none;font-weight:900;font-size:16px}.external-link-continue:hover{background:var(--brand-strong);color:#fff}
.external-link-cancel{display:block;width:100%;margin-top:10px;padding:11px;border:0;background:transparent;color:var(--muted);font-weight:800}
@media(max-width:640px){.external-link-dialog{padding:24px 18px;border-radius:18px}.image-drop-zone{min-height:125px;padding:17px}}


/* v22 production stability: prevent narrow-screen overflow and keep account controls reachable. */
html,body{max-width:100%;overflow-x:hidden}
.community-page{min-width:0}
.community-topbar{height:auto;min-height:68px;gap:14px;padding-top:10px;padding-bottom:10px}
.community-topbar .brand{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.community-topbar nav{min-width:0;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px}
.community-topbar nav a{white-space:nowrap}
.thread-layout,.community-wrap,.public-home-wrap{min-width:0;max-width:100%}
.thread-main,.thread-side,.original-post,.reply-card,.reply-form{min-width:0}
.post-actions,.reply-card footer{flex-wrap:wrap}
.image-file-status.error{color:var(--danger);font-weight:800}
.image-drop-zone{touch-action:manipulation}
.image-drop-zone input[type=file]{font-size:16px}
.logout-link{border:1px solid rgba(255,255,255,.22)!important;background:rgba(255,255,255,.08);border-radius:9px}
@media(max-width:760px){
  .community-topbar{align-items:flex-start;padding-left:14px;padding-right:14px}
  .community-topbar nav{gap:3px;max-width:72%;justify-content:flex-end}
  .community-topbar nav a{padding:7px 8px;font-size:12px}
  .thread-layout{display:block!important;width:100%!important;padding-left:12px!important;padding-right:12px!important}
  .thread-side{display:none!important}
  .original-post,.reply-card,.reply-form,.highlights,.rules-card{width:100%;max-width:100%;overflow:hidden}
  .post-actions button,.reply-card footer button{min-height:38px}
  .content-image{width:100%;height:auto;max-height:none}
}
@media(max-width:480px){
  .community-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto}
  .community-topbar nav{max-width:none}
  .community-topbar nav a:not(.logout-link):nth-child(n+4){display:none}
}

/* v23 community administration */
.community-admin-link{white-space:nowrap}.admin-wrap{max-width:1180px}.admin-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:8px 0 22px}.admin-heading h1{font-size:clamp(30px,4vw,44px);margin:5px 0 8px}.admin-heading p{margin:0;color:var(--muted)}.admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:18px;margin-bottom:18px}.admin-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow-sm)}.admin-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.admin-card h2{margin:0 0 5px;font-size:20px}.admin-card p{margin:0;color:var(--muted);font-size:14px}.brand-admin-preview{height:210px;border-radius:15px;overflow:hidden;position:relative;background:#eef2f6;margin-bottom:15px}.brand-admin-banner{width:100%;height:100%;object-fit:cover;display:block}.brand-admin-banner.empty{background:linear-gradient(135deg,#172033,#52627d)}.brand-admin-logo{position:absolute;left:18px;bottom:16px;width:72px;height:72px;border:4px solid #fff;border-radius:20px;object-fit:cover;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.22)}.brand-admin-logo.fallback{display:grid;place-items:center;font-size:26px;font-weight:900;color:var(--brand)}.member-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid var(--line)}.member-row:first-of-type{border-top:0}.member-identity{display:flex;align-items:center;gap:11px;min-width:0}.member-identity img,.member-identity>span{width:44px;height:44px;border-radius:13px;object-fit:cover;display:grid;place-items:center;background:#eef2ff;color:var(--brand);font-weight:900;flex:0 0 auto}.member-identity strong,.member-identity small{display:block}.member-identity small{color:var(--muted);margin-top:2px}.member-actions form,.member-action-stack,.role-form{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.small{padding:7px 10px!important;font-size:12px!important}.danger{color:#b42318!important;border-color:#f3b8b2!important;background:#fff!important}.empty-inline{padding:18px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);text-align:center}.notice{padding:12px 15px;border-radius:12px;margin:0 0 16px;font-weight:700}.notice.success{background:#ecfdf3;color:#067647;border:1px solid #abefc6}.notice.error{background:#fef3f2;color:#b42318;border:1px solid #fecdca}.member-table-wrap{overflow:auto}.member-table{width:100%;border-collapse:collapse;min-width:850px}.member-table th,.member-table td{text-align:left;padding:12px 10px;border-top:1px solid var(--line);vertical-align:middle}.member-table th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.member-identity.compact img,.member-identity.compact>span{width:38px;height:38px;border-radius:11px}.role-pill,.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;background:#eef2f6;color:#344054;font-size:12px;font-weight:800;text-transform:capitalize}.status-pending{background:#fffaeb;color:#b54708}.status-approved{background:#ecfdf3;color:#067647}.status-blocked{background:#fef3f2;color:#b42318}.blocked-note{display:block;color:#b42318;margin-top:4px}.role-form select{width:auto;min-width:110px;padding:7px 9px}.member-action-stack{min-width:190px}
@media(max-width:850px){.admin-grid{grid-template-columns:1fr}.admin-heading{align-items:flex-start;flex-direction:column}.member-row{align-items:flex-start;flex-direction:column}.member-actions{width:100%}.member-actions form{width:100%}.member-actions button{flex:1}.brand-admin-preview{height:170px}}

.math-check{border:0;padding:0;margin:1rem 0}.math-check legend{font-weight:700;margin-bottom:.65rem}.math-answer-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}.math-answer-button{min-height:48px;font-size:1rem;font-weight:800}.success{padding:12px 14px;border-radius:10px;background:#e9f8ef;color:#176b3a;margin:1rem 0}@media(max-width:480px){.math-answer-buttons{gap:.45rem}.math-answer-button{min-height:52px}}

/* v27 discussion-card media */
.thread-card-image{width:96px;height:76px;flex:0 0 96px;object-fit:cover;border-radius:13px;border:1px solid var(--line);background:var(--surface-2)}
.thread-card.has-image{align-items:center}
@media(max-width:760px){.thread-card-image{width:82px;height:70px;flex-basis:82px}.thread-card.has-image{align-items:flex-start}}
@media(max-width:440px){.thread-card.has-image{display:grid;grid-template-columns:74px minmax(0,1fr);gap:12px}.thread-card-image{width:74px;height:68px;flex-basis:auto}.thread-card.has-image .grow{min-width:0}}

/* v29 Community brand */
.brand,.auth-brand{display:flex;align-items:center;gap:10px;text-decoration:none}.brand-copy{display:flex;flex-direction:column;line-height:1}.brand-copy strong{font-size:1.05rem}.brand-copy small{font-size:.68rem;font-weight:500;opacity:.68;margin-top:3px}.brand-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:#3157d5;color:#fff;font-weight:800;font-size:1.2rem}

.legal-agreement{display:flex!important;align-items:flex-start;gap:.7rem;margin:1rem 0;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:#f8fafc;font-size:14px;line-height:1.45}.legal-agreement input{width:18px!important;height:18px;margin:2px 0 0;flex:0 0 auto}.legal-agreement a{font-weight:700}

/* Chat experience patch v42 */
.conversation-title-row{display:flex;align-items:center;gap:6px;min-width:0}.conversation-title-row strong{min-width:0;flex:1}.contact-online-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.16),0 0 10px rgba(34,197,94,.85);flex:0 0 auto}.online-glow{box-shadow:0 0 0 2px #22c55e,0 0 14px rgba(34,197,94,.8),inset 0 0 0 1px rgba(255,255,255,.18)!important}.conversation-avatar{object-fit:cover}.unread-badge{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.status-dot{background:#98a2b3}.status-dot.online{background:#22c55e;box-shadow:0 0 10px rgba(34,197,94,.9)}.new-messages-button{position:sticky;top:10px;align-self:center;z-index:5;border:0;border-radius:999px;background:#111827;color:#fff;padding:8px 14px;font-weight:800;box-shadow:0 8px 24px rgba(17,24,39,.25);cursor:pointer}.new-messages-button.hidden{display:none}.deleted-message{opacity:.72}.message-edited{font-size:10px;color:inherit;opacity:.65}.messages{min-height:0}.conversation-list{min-height:0}


/* v43 full-height chat hotfix. Keep this block after all legacy chat rules. */
html:has(body.chat-page-body),
body.chat-page-body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
}

body.chat-page-body .app-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.chat-page-body .sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.chat-page-body .conversation-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

body.chat-page-body .chat-panel {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

body.chat-page-body .chat-brand-hero,
body.chat-page-body .chat-header,
body.chat-page-body .composer {
    flex: 0 0 auto;
}

body.chat-page-body .messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

body.chat-page-body .site-footer {
    display: none !important;
}

@media (max-width: 760px) {
    body.chat-page-body .app-shell {
        height: 100svh;
        height: 100dvh;
    }

    body.chat-page-body .chat-panel {
        height: 100%;
    }

    body.chat-page-body .messages {
        padding-bottom: 18px;
    }
}

/* v46: profile link only in the currently open direct-chat header */
.chat-header-identity{min-width:0}
.chat-profile-link{display:inline-flex;align-items:center;gap:.75rem;min-width:0;color:inherit;text-decoration:none}
.chat-profile-link.disabled{pointer-events:none;cursor:default}
.chat-profile-avatar{width:42px;height:42px;flex:0 0 42px;border-radius:50%;display:grid;place-items:center;background:#e5e7eb;background-size:cover;background-position:center;font-weight:800;color:#111827}
.chat-profile-avatar.has-image{color:transparent}
.chat-profile-link:not(.disabled):hover h1{text-decoration:underline}
.chat-profile-link span:last-child{min-width:0}
.chat-profile-link h1,.chat-profile-link p{margin:0}


/* Community chat typing indicator patch v48 */
.typing-indicator{
  flex:0 0 auto;
  min-height:28px;
  padding:5px 20px 4px;
  border-top:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-size:12px;
  font-style:italic;
}
.typing-indicator.hidden{display:none}
.typing-indicator::after{content:'…';display:inline-block;min-width:14px;animation:typingPulse 1.1s infinite}
@keyframes typingPulse{0%,100%{opacity:.25}50%{opacity:1}}
@media(max-width:760px){.typing-indicator{padding-left:13px;padding-right:13px}}

/* v49 chat settings */
.chat-settings-card{max-width:640px;max-height:min(90dvh,820px);overflow:auto}
.chat-settings-section{padding:1rem 0;border-top:1px solid var(--border,#e5e7eb)}
.chat-settings-section:first-of-type{border-top:0}
.chat-settings-section h3{margin:0 0 .75rem;font-size:1rem}
.chat-member-list{display:grid;gap:.5rem;margin-bottom:1rem}
.chat-member-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem .75rem;border:1px solid var(--border,#e5e7eb);border-radius:12px}
.chat-member-person{display:flex;align-items:center;gap:.7rem;min-width:0}
.chat-member-person img,.chat-member-person>span{width:36px;height:36px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#e5e7eb;font-weight:700;flex:0 0 auto}
.chat-member-person div{display:grid;min-width:0}
.chat-member-person strong,.chat-member-person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.small{padding:.4rem .65rem;font-size:.82rem}
.form-error{margin:.75rem 0;padding:.75rem;border-radius:10px;background:#fee2e2;color:#991b1b}
.add-chat-member{width:100%;text-align:left}

/* v50 global external-link confirmation */
.external-link-eyebrow{margin:0 0 4px!important;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:var(--brand)}
.external-domain-value{margin:8px 0 18px;padding:12px 14px;border-radius:12px;background:#eef4ff;color:#163b75;font-weight:900;overflow-wrap:anywhere}
button.external-link-continue{width:100%;border:0;cursor:pointer;font:inherit}
.external-link-dialog:focus{outline:none}

/* v51 total unread badge */
.unread-menu-button{position:relative}.total-unread-badge{position:absolute;top:-7px;right:-8px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;font-weight:800;line-height:20px;text-align:center;box-shadow:0 0 0 2px #fff}.total-unread-badge.hidden{display:none}

/* v54 chat image viewer. Preserves v52 typing, unread, presence and settings rules. */
.message-image-button{display:block;width:100%;margin-top:10px;padding:0;border:0;border-radius:14px;background:transparent;overflow:hidden;cursor:zoom-in;text-align:left}
.message-image-button:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:3px}
.chat-image-modal{position:fixed;inset:0;z-index:3200;display:grid;place-items:center;padding:20px;background:rgba(3,7,18,.88);backdrop-filter:blur(5px)}
.chat-image-modal.hidden{display:none}
.chat-image-dialog{position:relative;display:flex;flex-direction:column;align-items:center;max-width:min(1200px,96vw);max-height:94dvh}
.chat-image-dialog img{display:block;max-width:min(1200px,96vw);max-height:86dvh;width:auto;height:auto;object-fit:contain;border-radius:14px;box-shadow:0 30px 100px rgba(0,0,0,.55)}
.chat-image-close{position:absolute;z-index:1;top:10px;right:10px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(15,23,42,.82);color:#fff;font-size:30px;line-height:1;cursor:pointer}
.chat-image-caption{max-width:90vw;margin-top:10px;color:#fff;font-size:13px;overflow-wrap:anywhere;text-align:center}
@media(max-width:640px){.chat-image-modal{padding:10px}.chat-image-dialog img{max-width:96vw;max-height:82dvh}.external-link-dialog{max-height:90dvh;overflow:auto}}

/* v56 combined unread navigation badge */
.main-message-nav-link{position:relative;display:inline-flex!important;align-items:center;gap:6px}
.main-message-count{position:absolute;top:-9px;right:-11px;display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;line-height:1;box-shadow:0 0 0 2px #fff;z-index:3}
.main-message-count[hidden]{display:none!important}
@media(max-width:720px){.main-message-count{top:-7px;right:-8px;min-width:19px;height:19px;font-size:10px;box-shadow:0 0 0 2px var(--surface,#fff)}}


/* Discussion/reply image editing */
.current-edit-image{display:grid;gap:10px;margin:12px 0;padding:12px;border:1px solid #e5e7eb;border-radius:14px;background:#f8fafc}
.current-edit-image img{display:block;max-width:220px;max-height:160px;border-radius:10px;object-fit:cover}
.inline-edit-panel .image-drop-zone{margin-top:12px}


/* Conversation-list avatar containment fix */
.conversation .avatar.avatar-wrapper {
    position: relative;
    display: block;
    width: 46px;
    height: 46px;
    min-width: 46px;
    max-width: 46px;
    flex: 0 0 46px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 50%;
    box-sizing: border-box;
    line-height: 46px;
}

.conversation .avatar-wrapper .avatar-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.conversation .avatar-wrapper img.conversation-avatar {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: none;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
}

.conversation .avatar-wrapper.image-failed img.conversation-avatar {
    display: none;
}

/* v59 subscription communities + restored UI polish */
.subscription-rate-field{transition:.18s ease}.money-input{display:flex;align-items:center;max-width:220px;border:1px solid var(--border,#d0d5dd);border-radius:12px;background:#fff;overflow:hidden}.money-input>span{padding:0 0 0 14px;font-size:18px;font-weight:800;color:#475467}.money-input input{border:0!important;box-shadow:none!important;margin:0!important;padding-left:7px!important}.subscription-admin-card{background:linear-gradient(180deg,#fff,#f8fbff);border-color:#cbdcf8}.subscription-settings-form{display:grid;gap:14px}.subscription-modal-card{max-width:520px}.subscription-price{display:flex;align-items:baseline;gap:7px;margin:18px 0}.subscription-price strong{font-size:48px;line-height:1;font-weight:900;letter-spacing:-.045em;color:#111827}.subscription-price span{color:#667085;font-weight:700}.subscription-price.compact strong{font-size:34px}.subscription-benefits{display:grid;gap:10px;margin:20px 0;padding:0;list-style:none}.subscription-benefits li{position:relative;padding-left:27px;color:#344054}.subscription-benefits li:before{content:'✓';position:absolute;left:0;top:0;width:19px;height:19px;display:grid;place-items:center;border-radius:50%;background:#dcfce7;color:#15803d;font-size:12px;font-weight:900}.primary-btn.full{display:flex;width:100%;justify-content:center}.subscription-paywall{margin:24px 0;padding:34px;border:1px solid #c9d8f5;border-radius:20px;background:linear-gradient(145deg,#f8fbff,#eef4ff);text-align:center;box-shadow:0 14px 36px rgba(49,87,213,.08)}.subscription-paywall-icon{width:50px;height:50px;margin:0 auto 14px;display:grid;place-items:center;border-radius:14px;background:#3157d5;color:white;font-weight:900;font-size:22px}.subscription-paywall h2{margin:6px 0 8px;font-size:clamp(24px,4vw,34px);letter-spacing:-.03em}.subscription-paywall p{max-width:620px;margin:0 auto;color:#667085;line-height:1.6}.subscription-paywall .subscription-price{justify-content:center}.subscribe-community-btn{white-space:nowrap}
/* restored global-nav containment */
.community-global-nav,.community-global-nav *{box-sizing:border-box}.community-global-nav{width:100%;min-height:58px;position:relative;z-index:10020;background:#111827;border-bottom:1px solid rgba(255,255,255,.09);color:#fff;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.community-global-inner{width:100%;max-width:1440px;min-height:58px;margin:0 auto;padding:8px 16px;display:flex;align-items:center;gap:16px}.community-global-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;min-width:max-content}.community-global-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#2563eb;color:#fff;font-weight:900;font-size:18px}.community-global-brand-copy{display:flex;flex-direction:column;line-height:1.05}.community-global-brand-copy strong{font-size:14px}.community-global-brand-copy small{margin-top:4px;color:#94a3b8;font-size:10px}.community-global-links{margin-left:auto;display:flex;align-items:center;gap:4px}.community-global-link{display:flex;align-items:center;min-height:38px;padding:0 13px;border-radius:9px;color:#cbd5e1;text-decoration:none;font-size:14px;font-weight:700;white-space:nowrap}.community-global-link:hover,.community-global-link:focus-visible{background:#1f2937;color:#fff;outline:none}.community-global-link.active{background:#2563eb;color:#fff}.community-global-divider{width:1px;height:24px;margin:0 4px;background:#334155}.community-global-link.logout{color:#fca5a5}.community-global-menu{display:none;margin-left:auto;width:42px;height:42px;padding:9px;border:1px solid #334155;border-radius:10px;background:#1f2937;color:#fff;cursor:pointer}.community-global-menu span{display:block;width:100%;height:2px;margin:4px 0;border-radius:2px;background:currentColor}.community-global-nav.open .community-global-menu span:nth-child(1){transform:translateY(6px) rotate(45deg)}.community-global-nav.open .community-global-menu span:nth-child(2){opacity:0}.community-global-nav.open .community-global-menu span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
@media(max-width:760px){.community-global-inner{min-height:56px;padding:8px 12px}.community-global-menu{display:block}.community-global-links{display:none;position:absolute;top:calc(100% + 6px);left:8px;right:8px;margin:0;padding:8px;flex-direction:column;align-items:stretch;gap:4px;border:1px solid #334155;border-radius:14px;background:#111827;box-shadow:0 18px 45px rgba(0,0,0,.35)}.community-global-nav.open .community-global-links{display:flex}.community-global-link{width:100%;min-height:44px;padding:0 14px}.community-global-divider{width:100%;height:1px;margin:4px 0}.subscription-paywall{padding:24px 18px}.subscription-price strong{font-size:40px}}


/* Community profile v61 */
.profile-shell-v2{padding-top:28px}
.profile-hero-v2{position:relative;align-items:center;gap:24px;padding:28px;background:linear-gradient(180deg,#fff 0%,#fbfcff 100%)}
.profile-avatar-wrap{position:relative;flex:0 0 auto}
.profile-avatar-wrap .profile-avatar-xl{display:block}
.profile-avatar-wrap .profile-avatar-xl[hidden]{display:none}
.profile-presence{position:absolute;right:5px;bottom:5px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;background:#98a2b3;box-shadow:0 2px 6px rgba(16,24,40,.16)}
.profile-presence.online{background:#12b76a}
.profile-identity{min-width:0;flex:1}
.profile-identity h1{overflow-wrap:anywhere}
.profile-meta-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin:8px 0 16px;color:var(--muted);font-size:13px}
.profile-meta-row span{display:inline-flex;align-items:center;gap:6px}
.profile-meta-row span+span:before{content:'•';margin-right:8px;color:#c5cad3}
.profile-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.profile-actions form{margin:0}
.secondary-btn.profile-posts-link{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 16px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-weight:800;text-decoration:none}
.secondary-btn.profile-posts-link:hover{border-color:#b8c5ef;background:#666;color:#fff}
.profile-columns-v2{grid-template-columns:minmax(0,.92fr) minmax(0,1.35fr)}
.profile-section-heading{align-items:center;margin-bottom:14px}
.profile-section-heading h2{margin:3px 0 0}
.profile-count{display:grid;place-items:center;min-width:34px;height:34px;padding:0 9px;border-radius:999px;background:var(--brand-soft);color:var(--brand);font-size:13px;font-weight:900}
.profile-empty{padding:28px 14px;border:1px dashed var(--line);border-radius:13px;background:var(--surface-2);color:var(--muted);text-align:center}
.profile-group-list-v2 a.profile-community-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 13px}
.profile-community-icon{position:relative;width:46px;height:46px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:var(--brand-soft);color:var(--brand);font-weight:900;font-size:17px}
.profile-community-icon img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#fff;z-index:1}
.profile-community-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.profile-community-title{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.profile-community-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-community-copy>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12px}
.profile-row-arrow{color:var(--brand);font-weight:900}
.profile-subscription-badge{display:inline-flex!important;align-items:center;min-height:21px;padding:0 7px;border:1px solid #d6bcfa;border-radius:999px;background:#f4ebff;color:#6941c6!important;font-size:10px!important;font-weight:900;line-height:1;text-transform:uppercase;letter-spacing:.03em}
.profile-thread-topline{display:flex;align-items:center;justify-content:space-between;gap:10px}
.profile-thread-list-v2 a{padding:15px 16px}
.profile-thread-list-v2 strong{line-height:1.35}
.message-avatar-link{display:inline-flex;flex:0 0 auto;border-radius:50%;text-decoration:none}
.message-avatar-link:hover .message-sender-avatar{outline:2px solid var(--brand-soft);outline-offset:2px}
@media(max-width:760px){
  .profile-shell-v2{width:min(100% - 20px,1100px);padding-top:18px}
  .profile-hero-v2{display:grid;grid-template-columns:76px minmax(0,1fr);gap:15px;padding:18px}
  .profile-meta-row{gap:5px 10px}
  .profile-meta-row span+span:before{display:none}
  .profile-actions{grid-column:1/-1}
  .profile-actions .primary-btn,.profile-actions .secondary-btn,.profile-actions form{flex:1 1 auto}
  .profile-actions form .primary-btn{width:100%}
  .profile-columns-v2{grid-template-columns:1fr;gap:16px}
  .profile-panel{padding:17px}
  .profile-community-copy>span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}

/* =========================================================
   Profile v62 - visual profile, scrolling cover, ranked content
   ========================================================= */
.profile-page-v62{background:#f6f8fb;color:var(--ink)}
.profile-shell-v62{width:min(1180px,calc(100% - 28px));margin:24px auto 64px}
.profile-cover{position:relative;height:clamp(250px,34vw,430px);overflow:hidden;border-radius:24px 24px 0 0;background:#111827;box-shadow:0 20px 55px rgba(15,23,42,.13)}
.profile-cover-track,.profile-cover-slide{position:absolute;inset:0}
.profile-cover-slide{opacity:0;background-size:cover;background-position:center;transform:scale(1.025);transition:opacity .8s ease,transform 6s ease}
.profile-cover-slide.active{opacity:1;transform:scale(1)}
.profile-cover-default{background:radial-gradient(circle at 78% 20%,rgba(37,99,235,.5),transparent 30%),linear-gradient(135deg,#0f172a,#1d4ed8 65%,#0f172a)}
.profile-cover-shade{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(15,23,42,.02) 20%,rgba(15,23,42,.12) 58%,rgba(15,23,42,.55) 100%);pointer-events:none}
.profile-cover-dots{position:absolute;right:20px;bottom:18px;display:flex;gap:7px;z-index:3}
.profile-cover-dots button{width:8px;height:8px;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.5);cursor:pointer;transition:.2s}
.profile-cover-dots button.active{width:24px;background:#fff}
.profile-summary-v62{position:relative;display:grid;grid-template-columns:auto 1fr auto;gap:20px;align-items:end;margin-top:-1px;padding:0 28px 24px;background:#fff;border:1px solid var(--line);border-top:0;border-radius:0 0 24px 24px;box-shadow:0 20px 55px rgba(15,23,42,.08)}
.profile-avatar-block{position:relative;margin-top:-58px;z-index:4}
.profile-avatar-v62{width:132px;height:132px;border-radius:30px;object-fit:cover;border:5px solid #fff;background:#eef2ff;box-shadow:0 12px 30px rgba(15,23,42,.18)}
.profile-avatar-v62.profile-initial{display:grid;place-items:center;font-size:48px;font-weight:900;color:var(--brand)}
.profile-avatar-block .profile-presence{position:absolute;right:6px;bottom:7px;width:20px;height:20px;border:4px solid #fff;border-radius:50%;background:#98a2b3}
.profile-avatar-block .profile-presence.online{background:#22c55e}
.profile-summary-copy{padding-top:20px;min-width:0}
.profile-summary-copy h1{margin:4px 0 3px;font-size:clamp(30px,4vw,42px);letter-spacing:-.035em;line-height:1.04}
.profile-summary-copy p{margin:0;color:var(--muted);font-size:14px}
.profile-actions-v62{display:flex;gap:9px;align-items:center;padding-bottom:4px}.profile-actions-v62 form{margin:0}
.profile-stats-v62{display:grid;grid-template-columns:repeat(4,1fr);margin:18px 0 34px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-sm);overflow:hidden}
.profile-stats-v62>div{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:104px;padding:18px;border-left:1px solid var(--line)}
.profile-stats-v62>div:first-child{border-left:0}.profile-stats-v62 strong{font-size:28px;line-height:1;font-weight:900;color:#111827}.profile-stats-v62 span{margin-top:7px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:#667085}
.profile-content-section-v62{margin-top:34px}.profile-section-title-v62{display:flex;justify-content:space-between;align-items:end;margin-bottom:14px}.profile-section-title-v62 h2{margin:3px 0 3px;font-size:25px;letter-spacing:-.025em}.profile-section-title-v62 p{margin:0;color:var(--muted);font-size:14px}
.profile-community-grid-v62{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.profile-community-card-v62{display:grid;grid-template-columns:150px 1fr;min-height:150px;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:#fff;color:inherit;text-decoration:none;box-shadow:var(--shadow-sm);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.profile-community-card-v62:hover{transform:translateY(-2px);border-color:#b8c5ef;box-shadow:0 14px 34px rgba(15,23,42,.1)}
.profile-community-media-v62{position:relative;min-height:150px;background:#e8eefb;overflow:hidden;display:grid;place-items:center;font-size:42px;font-weight:900;color:var(--brand)}.profile-community-media-v62 img{width:100%;height:100%;object-fit:cover}.profile-community-media-v62 small{position:absolute;top:10px;left:10px;padding:5px 8px;border-radius:999px;background:rgba(17,24,39,.78);color:#fff;font-size:10px;font-weight:800}
.profile-community-card-copy-v62{padding:18px;min-width:0}.profile-community-card-copy-v62 h3{margin:0 0 7px;font-size:18px}.profile-community-card-copy-v62 p{margin:0;color:#667085;font-size:13px;line-height:1.5}.profile-community-card-copy-v62>div{display:flex;gap:14px;margin-top:14px;color:#475467;font-size:11px;font-weight:800}
.profile-thread-grid-v62{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.profile-thread-card-v62{overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;color:inherit;text-decoration:none;box-shadow:var(--shadow-sm);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.profile-thread-card-v62:hover{transform:translateY(-2px);border-color:#b8c5ef;box-shadow:0 14px 34px rgba(15,23,42,.1)}
.profile-thread-media-v62{height:205px;background:#e8eefb;display:grid;place-items:center;overflow:hidden;font-size:54px;font-weight:900;color:var(--brand)}.profile-thread-media-v62 img{width:100%;height:100%;object-fit:cover}.profile-thread-copy-v62{padding:18px}.profile-thread-meta-v62{display:flex;gap:8px;align-items:center;margin-bottom:8px;color:#667085;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}.profile-thread-meta-v62 small{padding:4px 7px;border-radius:999px;background:#eef2ff;color:#3157d5;font-size:9px}.profile-thread-copy-v62 h3{margin:0 0 8px;font-size:19px;line-height:1.25}.profile-thread-copy-v62 p{margin:0;color:#667085;font-size:13px;line-height:1.55}.profile-thread-stats-v62{display:flex;gap:15px;margin-top:15px;color:#475467;font-size:12px;font-weight:800}.profile-empty-v62{padding:26px;border:1px dashed #cbd5e1;border-radius:16px;background:#fff;color:#667085;text-align:center}
.profile-edit-shell-v62{width:min(940px,calc(100% - 28px));padding:28px 0 60px}.profile-edit-card-v62{padding:0;overflow:hidden}.profile-edit-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:26px 28px;border-bottom:1px solid var(--line)}.profile-edit-heading h1{margin:3px 0 5px}.profile-edit-heading p{margin:0;color:var(--muted)}.profile-edit-section{display:grid;grid-template-columns:260px 1fr;gap:30px;padding:28px;border-bottom:1px solid var(--line)}.profile-edit-section-copy h2{margin:0 0 6px;font-size:18px}.profile-edit-section-copy p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.profile-edit-fields{display:grid;gap:16px}.profile-edit-fields label{font-size:13px;font-weight:800}.profile-edit-fields input[type=text],.profile-edit-fields input:not([type]){width:100%}.profile-header-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-header-edit-tile{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.profile-header-edit-tile img{display:block;width:100%;aspect-ratio:16/7;object-fit:cover}.profile-header-edit-tile span{display:flex;align-items:center;gap:7px;padding:9px 11px;font-size:12px}.profile-header-empty{padding:18px;border:1px dashed #cbd5e1;border-radius:13px;background:#f8fafc;color:#667085;font-size:13px}.profile-edit-save{display:flex;justify-content:flex-end;padding:22px 28px}
@media(max-width:800px){.profile-shell-v62{width:min(100% - 16px,1180px);margin-top:10px}.profile-cover{height:260px;border-radius:18px 18px 0 0}.profile-summary-v62{grid-template-columns:auto 1fr;padding:0 18px 20px;border-radius:0 0 18px 18px}.profile-avatar-v62{width:96px;height:96px;border-radius:24px}.profile-avatar-block{margin-top:-42px}.profile-summary-copy{padding-top:14px}.profile-actions-v62{grid-column:1/-1;padding:0}.profile-stats-v62{grid-template-columns:repeat(2,1fr)}.profile-stats-v62>div:nth-child(3){border-left:0;border-top:1px solid var(--line)}.profile-stats-v62>div:nth-child(4){border-top:1px solid var(--line)}.profile-community-grid-v62,.profile-thread-grid-v62{grid-template-columns:1fr}.profile-edit-section{grid-template-columns:1fr;gap:16px}.profile-header-edit-grid{grid-template-columns:1fr}}
@media(max-width:520px){.profile-cover{height:210px}.profile-summary-v62{grid-template-columns:1fr;align-items:start}.profile-avatar-block{margin-top:-52px}.profile-summary-copy{padding-top:0}.profile-actions-v62{grid-column:auto;flex-wrap:wrap}.profile-community-card-v62{grid-template-columns:110px 1fr}.profile-thread-media-v62{height:175px}.profile-edit-heading{padding:20px;flex-direction:column}.profile-edit-section{padding:20px}.profile-edit-save{padding:18px 20px}.profile-stats-v62 strong{font-size:24px}}
.profile-follow-button.following{background:#eef2ff;border-color:#c7d2fe;color:#3730a3}.profile-follow-button:disabled{opacity:.65;cursor:wait}

/* Profile editor v63: multi-image drop zone */
.profile-edit-alert{margin:18px 28px 0}.profile-header-upload-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:#f8fafc;font-size:12px;color:var(--muted)}.profile-header-upload-summary strong{color:var(--ink);font-size:13px}.profile-header-edit-tile{display:block}.profile-header-tile-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px}.profile-header-tile-actions>span{font-size:12px;color:var(--muted);font-weight:700}.profile-header-delete,.profile-header-preview-meta button{border:0;background:transparent;color:#b42318;font:inherit;font-weight:800;cursor:pointer;padding:5px 7px;border-radius:7px}.profile-header-delete:hover,.profile-header-preview-meta button:hover{background:#fef3f2}.profile-header-dropzone{position:relative;min-height:164px;border:2px dashed #b8c5ef;border-radius:18px;background:linear-gradient(180deg,#f8faff,#f4f7ff);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:15px;padding:28px;cursor:pointer;transition:border-color .15s ease,background .15s ease,transform .15s ease}.profile-header-dropzone:hover,.profile-header-dropzone:focus-visible,.profile-header-dropzone.is-dragging{border-color:var(--brand);background:#eef3ff;outline:none}.profile-header-dropzone.is-dragging{transform:scale(1.005)}.profile-header-dropzone.has-selection{border-style:solid}.profile-header-dropzone.is-full{cursor:default;border-color:#d0d5dd;background:#f8fafc}.profile-header-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.profile-header-drop-main{display:grid;gap:5px}.profile-header-drop-main strong{font-size:17px;color:var(--ink)}.profile-header-drop-main span{font-size:13px;color:var(--muted)}.profile-header-browse{margin:0!important}.profile-header-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-header-preview-card{overflow:hidden;border:1px solid #b8c5ef;border-radius:14px;background:#fff}.profile-header-preview-card img{display:block;width:100%;aspect-ratio:16/7;object-fit:cover}.profile-header-preview-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px}.profile-header-preview-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted)}.profile-header-upload-error{padding:10px 12px;border-radius:10px;background:#fef3f2;color:#b42318;font-size:12px;font-weight:700}.profile-header-help{display:block;color:var(--muted);line-height:1.45}
@media(max-width:800px){.profile-header-preview-grid{grid-template-columns:1fr}.profile-header-dropzone{min-height:145px;padding:22px 16px}.profile-header-upload-summary{align-items:flex-start;flex-direction:column;gap:3px}}

.secondary-btn{ background-color:#eee !important; color:#666 !important;}
.secondary-btn:hover{ background-color:#444 !important; color:#fff !important;}