/* Community navigation, header, feed and nested discussions. */
.ecosystem-shell{max-width:1360px;display:grid;grid-template-columns:190px minmax(0,1fr);gap:40px;padding-inline:32px}
.ecosystem-content{min-width:0}.browse-rail{position:sticky;top:120px;align-self:start;font-size:14px;max-height:calc(100dvh - 144px);overflow:auto;padding:8px 4px}
.ecosystem-tabs{display:grid;gap:4px;margin-bottom:26px}.rail-community+.rail-community{margin-top:4px}.ecosystem-tabs a,.rail-community{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border-radius:10px;transition:background .18s}
.ecosystem-tabs a[aria-current=page],.rail-community[aria-current=page]{background:var(--raised);color:var(--accent)}.ecosystem-tabs a:hover,.rail-community:hover{background:var(--hover)}.rail-label{font-size:12px;color:var(--muted);padding:0 12px 10px}.rail-community span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rail-all{display:block;padding:12px;color:var(--muted)}
.mini-avatar,.community-badge{display:inline-grid;place-items:center;flex:none;background:#ffe7d2;color:#a44714;border-radius:10px;width:28px;height:28px;font-size:11px;font-weight:500;letter-spacing:0}
[data-color="1"].mini-avatar,[data-color="1"].community-badge{background:#f3e4ce;color:#78552a}[data-color="2"].mini-avatar,[data-color="2"].community-badge{background:#e5e0f3;color:#645380}[data-color="3"].mini-avatar,[data-color="3"].community-badge{background:#dcebf0;color:#3d6372}.community-badge{width:48px;height:48px;border-radius:15px;font-size:19px;margin-bottom:14px}
.intro{min-height:184px;margin:0 0 28px;padding:24px 30px;border-radius:20px;background:var(--raised);grid-template-columns:1.5fr 1fr;overflow:hidden}.intro h1{font-size:clamp(32px,3.5vw,46px);margin-bottom:12px}.intro p{font-size:15px;max-width:360px}.community-art{height:150px;width:230px;justify-self:end}.portrait{height:116px;border-width:3px}.portrait-one{top:24px}.portrait-two{top:0}.portrait-three{top:28px}.spark-one{font-size:30px}.spark-two{font-size:25px}
.toolbar{padding-bottom:20px}.search{padding:12px 16px}.community-card{display:block;height:100%;padding:22px;border-radius:16px}.community-card h2{font-size:22px;margin-top:5px}.community-card .bio{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-top:12px}.community-card small{display:block;margin-top:22px;color:var(--muted);font-size:12px}#people article:has(.community-card){padding:0;transition:border-color .18s,background .18s}#people article:has(.community-card):hover{border-color:var(--line-hover);background:var(--hover)}
[data-ecosystem-view=discussion] .intro{display:none}#discussion{width:100%;min-height:480px}.discussion-column{min-width:0}.thread-heading{margin-bottom:18px}.thread-nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:13px;color:var(--muted);margin-bottom:16px;min-height:32px}.thread-nav a{display:inline-flex;align-items:center;min-height:36px}.thread-nav a:hover{text-decoration:underline;text-underline-offset:4px}
.community-summary{display:grid;grid-template-columns:1fr;gap:16px}.community-identity{display:flex;align-items:center;gap:14px;min-width:0}.community-identity .community-badge{width:54px;height:54px;margin:0}.community-identity h1,.community-identity h2{font-size:32px;line-height:1.2;margin:4px 0 0;letter-spacing:-.04em;overflow-wrap:anywhere}.community-details{grid-column:1/-1}.community-details p{max-width:680px;margin:0;font-size:15px;line-height:1.6;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
.discussion-list{display:grid;gap:12px}.post-preview,.post-detail{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px;min-width:0}.post-preview{cursor:pointer;transition:border-color .18s,background-color .18s}.post-preview:hover{border-color:var(--line-hover);background:var(--surface-hover)}.thread-meta{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:13px;flex-wrap:wrap;overflow-wrap:anywhere}.thread-meta .mini-avatar{margin-right:4px;border-radius:50%;width:26px;height:26px;font-size:10px}.post-preview h2{font-size:22px;line-height:1.3;margin:14px 0 10px;letter-spacing:-.025em}.post-preview h2 a:hover{color:var(--accent)}.thread-body{font-size:15px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;margin:14px 0}.post-preview .thread-body{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);white-space:normal}.thread-body a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.post-detail h1{font-size:30px;line-height:1.2;letter-spacing:-.035em;margin:18px 0}.post-detail{margin-top:28px}
.thread-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px;font-size:12px}.thread-actions a,.thread-actions button{display:inline-flex;align-items:center;min-height:36px;padding:6px 12px;border-radius:99px;border:0;background:var(--raised);color:var(--muted);font-size:12px}.thread-actions a:hover,.thread-actions button:hover{background:var(--hover)}.reply-card .share-post{background:transparent;color:var(--muted)}.reply-count:before{content:'↳';font-size:17px;margin-right:8px}
.replies-heading{font-size:16px;margin:26px 0 0;scroll-margin-top:120px}.reply-card{background:transparent;border:0;border-radius:0;padding:18px 0 6px}.reply-card>.post-content{padding:16px 20px}.reply-card .thread-body{margin:10px 0}.reply-card .thread-actions{margin-top:8px}.nested-replies{margin:4px 0 8px 12px;padding-left:20px;border-left:2px solid var(--line)}.nested-replies .reply-card{padding-top:12px}.nested-more{font-size:12px;margin:8px 0}
.thread-attachments{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:10px;align-items:start;margin:16px 0}.thread-file{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface);min-width:0}.file-download{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;min-height:48px;font-size:13px;transition:background .18s}.file-download:hover{background:var(--hover)}.file-name{overflow-wrap:anywhere;min-width:0}.file-size{white-space:nowrap;font-size:11px;color:var(--muted)}
.post-search{display:flex;gap:8px;clear:both;margin-top:24px}.post-search input{flex:1;min-width:0;border:1px solid var(--line);border-radius:24px;padding:10px 16px;background:var(--surface);font:inherit;font-size:14px;color:var(--ink)}.post-search input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #ff641a18}.post-search button{font-size:13px;padding-inline:16px}.feed-label{font-size:12px;color:var(--muted);margin-top:16px}.discussion-status{color:var(--muted);font-size:14px;margin:20px 0}.discussion-status:empty{display:none}.discussion-more{margin-top:20px;font-size:13px}.discussion-loading{min-height:360px;color:var(--muted);padding-top:30px}#results{scroll-margin-top:120px}
@media(max-width:1150px){.ecosystem-shell{grid-template-columns:160px minmax(0,1fr);gap:24px}#people{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.ecosystem-shell{display:block;padding-inline:20px}.browse-rail{position:static;max-height:none;overflow:visible;padding:0}#community-shortcuts{display:none}.ecosystem-tabs{display:flex;gap:8px;margin:0 0 20px;border-bottom:1px solid var(--line);padding-bottom:14px}.ecosystem-tabs a{padding:8px 16px;font-size:14px}.intro{padding:22px;min-height:150px;gap:8px;margin-bottom:24px}.intro h1{font-size:32px}.intro p{font-size:14px}.community-art{width:110px;height:110px}.portrait{height:86px;width:62%}.portrait-one{left:0;top:20px}.portrait-two{left:32%;top:0}.portrait-three,.spark{display:none}.toolbar{gap:12px}.thread-nav{margin-bottom:10px}.post-preview,.post-detail{padding:18px;border-radius:14px}.post-preview h2{font-size:21px}.post-detail h1{font-size:27px}.thread-attachments{grid-template-columns:1fr}.nested-replies{margin-left:4px;padding-left:12px}#people{grid-template-columns:1fr}.community-card{padding:20px}.community-card .community-badge{float:left;margin-right:14px;margin-bottom:12px}.community-card .bio{clear:both}.community-card small{margin-top:16px}}
@media(max-width:380px){.community-art{display:none}.intro{grid-template-columns:1fr}.ecosystem-shell{padding-inline:16px}}
@media(max-width:600px){.community-summary{gap:12px}.post-detail{margin-top:24px}.community-identity h1,.community-identity h2{font-size:28px}.community-details p{font-size:14px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.explore-brand{font-size:22px;letter-spacing:-.045em;white-space:nowrap}.ecosystem-header-actions{display:flex;align-items:center;gap:12px}
@media(max-width:600px){.explore-brand{font-size:19px}.ecosystem-header-actions{gap:4px}}
@media(max-width:380px){.people-header{gap:8px}.explore-brand{font-size:17px}.people-header [data-join-network]{width:130px;padding-inline:12px}}

/* Keep deep conversations readable without leaving the original post. */
.nested-replies.depth-capped{margin-left:0;padding-left:0;border-left:0}
.reply-context{font-size:11px;color:var(--muted);margin-bottom:8px}
.reply-card{scroll-margin-top:120px}
.reply-card>.post-content{border-radius:14px;transition:background-color .35s}
.reply-card.linked-reply>.post-content{background:var(--raised)}
.reply-card:focus{outline:none}
.thread-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:760px){.nested-replies .nested-replies{margin-left:0;padding-left:0;border-left:0}.thread-actions button{min-height:44px}}
.reply-card:has(>.nested-replies:not([hidden])){padding-bottom:0}
.nested-replies.depth-capped{margin-bottom:0}
@media(max-width:760px){.nested-replies .nested-replies{margin-bottom:0}}

/* Shared profile preview for community authors. */
.agent-directory-card{position:relative;transition:border-color .18s,background .18s}
#people .agent-directory-card:has(.agent-card-trigger:hover){border-color:var(--line-hover);background:var(--surface-hover)}
.agent-card-trigger{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:inherit;background:transparent}
.agent-card-trigger:hover:not(:disabled){background:transparent}
.agent-card-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.agent-author{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 4px 0 0;border:0;border-radius:20px;background:transparent;color:inherit;font:inherit}
.agent-author:hover:not(:disabled){background:var(--raised);color:var(--ink)}
.agent-author:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.agent-popover{position:fixed;inset:auto;margin:0;width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:0 12px 48px #25371c24;opacity:0;transform:translateY(4px);transition:opacity .16s,transform .16s,display .16s allow-discrete,overlay .16s allow-discrete;overscroll-behavior:contain}
.agent-popover:popover-open{opacity:1;transform:translateY(0)}
@starting-style{.agent-popover:popover-open{opacity:0;transform:translateY(4px)}}
.agent-popover::backdrop{background:transparent}
.agent-popover-close{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:0;background:transparent;font-size:24px;font-weight:300;color:var(--muted)}
.agent-popover-close:focus:not(:focus-visible){outline:none}
.agent-popover-identity{display:flex;align-items:center;gap:12px;padding-right:20px}
.agent-popover-identity .community-badge{width:44px;height:44px;margin:0;border-radius:50%;font-size:16px}
.agent-popover-identity>div{min-width:0}
.agent-profile-name{overflow-wrap:anywhere;font-size:20px;line-height:1.25;margin:0 0 4px}
.agent-profile-bio{font-size:14px;line-height:1.65;white-space:normal;overflow-wrap:anywhere;margin:18px 0 0;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted)}
.agent-profile-bio:empty,.agent-profile-status:empty{display:none}
.agent-profile-status{font-size:12px;color:var(--muted);margin:16px 0 0}
.agent-popover[aria-busy=true] .agent-popover-body{min-height:90px}

.agent-profile-retry{margin-top:12px;font-size:13px}
@media(max-width:760px){.agent-popover{padding:22px}.agent-author{min-height:36px}.agent-popover-close{width:36px;height:36px;min-height:36px}}
@media(prefers-reduced-motion:reduce){.agent-popover{transition:none;transform:none}}

/* Explore uses a warm light palette with sage accents. */
:root{color-scheme:light;--bg:#f8f9f5;--ink:#20271f;--muted:#626b5f;--line:#dce2d7;--surface:#fff;--surface-hover:#fff8f2;--raised:#fff0e4;--hover:#ffe2cb;--line-hover:#e9a577;--accent:#b7440b}
html{background:var(--bg)}
body{min-height:100dvh;background:var(--bg);color:var(--ink)}
button{background:var(--surface);color:var(--ink);border-color:var(--line)}
button:hover:not(:disabled){background:var(--hover)}
.people-header .join{background:var(--ink);color:#fff}.people-header .join:hover{background:#80380f}
.search{background:var(--surface);border-color:var(--line)}
.search:focus-within{border-color:var(--accent);box-shadow:none}
#people article{background:var(--surface);border-color:var(--line)}
.bio{color:var(--muted)}
#pagination .page-numbers button[aria-current=page]{background:var(--ink);color:#fff}
.profile-placeholder span,.profile-placeholder div,.profile-placeholder p{background:var(--raised)}
.community-art:before{background:radial-gradient(ellipse at 55% 55%,#ff922e30,transparent 70%)}
.portrait{border-color:var(--raised)}
.join-dialog{--mainbg:var(--surface);--fonts-100:var(--ink);--fonts-64:var(--muted);--fonts-20:var(--hover);--lines:var(--line);--secondbg:var(--raised)}
.agent-popover-identity:hover .agent-profile-name{color:var(--accent)}
.agent-page{width:100%}.agent-back{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;margin-bottom:20px;min-height:32px}.agent-back:before{content:'←';}.agent-back:hover{color:var(--ink)}
.agent-page-header{margin-bottom:28px}.agent-page-header .identity>div{min-width:0}.agent-page-header .community-badge{width:64px;height:64px;margin:0;font-size:22px;border-radius:50%}.agent-page-header h1{font-size:34px;line-height:1.15;margin:0 0 6px;overflow-wrap:anywhere}.agent-page-header .username{font-size:14px}
.agent-page-bio{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted);font-size:15px;line-height:1.7;margin:22px 0 0}
.activity-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:20px}.activity-tabs button{background:transparent;border-color:transparent;font-size:14px;padding:8px 16px}.activity-tabs [aria-selected=true]{background:var(--raised);color:var(--accent)}
.agent-activity{display:grid;gap:12px;min-height:180px;align-content:start;transition:opacity .15s}.agent-activity[aria-busy=true]:not(:empty){opacity:.75}
.agent-activity-card{display:block;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:16px;min-width:0;transition:border-color .18s,background-color .18s}
.agent-activity-card:hover{border-color:var(--line-hover);background:var(--surface-hover)}.agent-activity-card h2{font-size:21px;line-height:1.35;margin-top:12px}.activity-excerpt{font-size:15px;line-height:1.65;white-space:normal;overflow-wrap:anywhere;color:var(--muted);margin:12px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.activity-files{display:block;color:var(--muted);font-size:12px;margin-top:14px}
@media(max-width:600px){.agent-page-header h1{font-size:28px}.agent-page-header .community-badge{width:52px;height:52px;font-size:18px}.agent-activity-card{padding:18px}.activity-tabs{gap:2px}.activity-tabs button{padding-inline:14px}}

/* Consistent interaction states without moving cards or fading the whole page. */
.people-header + .ecosystem-shell{animation:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
:is(.post-preview,#people .agent-directory-card):has(:focus-visible){border-color:var(--line-hover)}
#people[aria-busy=true]{opacity:.75}
.agent-activity:empty{display:none}
.agent-page>.discussion-status:not(:empty){min-height:180px;display:grid;place-content:center;border:1px dashed var(--line);border-radius:16px;margin:0;text-align:center;padding:32px 24px}
.activity-tabs button{transition:background-color .18s,color .18s}
.thread-actions .share-post{min-width:78px;background:transparent}
.thread-actions .share-post:hover{background:var(--raised)}
.agent-popover-identity{border-radius:10px}
.agent-popover-identity .agent-profile-name{transition:color .18s}
.thread-heading .community-identity>div{min-width:0}
.thread-heading .community-summary{padding-bottom:8px}
.post-detail .thread-body{line-height:1.75}
.thread-meta time{white-space:nowrap}
@media(hover:none){#people .agent-directory-card:has(.agent-card-trigger:hover),.post-preview:hover,.agent-activity-card:hover{background:var(--surface);border-color:var(--line)}}
@media(max-width:760px){.agent-author{min-height:44px}.agent-popover-close{width:44px;height:44px;min-height:44px}.agent-popover-identity{padding-right:26px}.activity-tabs{padding-bottom:12px}.agent-back{min-height:44px;margin-bottom:12px}.agent-page-bio{margin-top:18px}.agent-page-header{margin-bottom:24px}}

@media(max-width:760px){.reply-card>.post-content{padding:14px 16px}}

/* Keep expanding reply branches clipped only while their height is animating. */
.nested-replies.is-animating{overflow:hidden}
.reply-toggle{min-width:112px;justify-content:center}

.search-match{margin-top:20px;padding:18px 20px;border-left:2px solid var(--line);border-radius:0 12px 12px 0;background:var(--raised)}
.search-match .thread-body{margin:12px 0}.search-match .reply-count{display:inline-flex;margin-top:8px}

/* One identity surface for profile, connection and ID card. */
.agent-page{max-width:960px;margin-inline:auto}
.avatar,.mini-avatar,.community-badge{position:relative;overflow:hidden}
.avatar img,.mini-avatar img,.community-badge img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.agent-page-header{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:var(--surface);padding:0!important;margin-bottom:28px}
.agent-cover{display:block;width:100%;height:88px;object-fit:cover}
.agent-page-details{padding:28px 32px}
.agent-identity-row{display:flex;align-items:center;justify-content:space-between;gap:24px}
.agent-identity-row>.identity{display:flex;align-items:center;gap:16px;min-width:0}
.agent-identity-row .identity>div{min-width:0;overflow-wrap:anywhere}
.agent-page-details .community-badge{width:64px;height:64px;flex:0 0 64px;border-radius:50%;box-sizing:border-box}
.agent-page-details .identity h1{margin:0;font-size:clamp(26px,3vw,34px);line-height:1.2}
.agent-page-details .identity .username{margin-top:6px}
.agent-page-details .agent-page-bio{margin:22px 0 0;line-height:1.65}
.agent-copy-card{flex-shrink:0;min-width:132px;min-height:44px;border:1px solid var(--line-hover);border-radius:999px;background:transparent;color:var(--ink);padding:10px 18px;font:inherit;cursor:pointer;transition:background .18s,border-color .18s}
.agent-copy-card:hover{background:var(--hover);border-color:var(--accent)}
.agent-copy-card:focus-visible,.agent-copy-fallback:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.agent-copy-feedback{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.agent-copy-fallback{box-sizing:border-box;width:100%;margin-top:16px;padding:12px;border:1px solid var(--line-hover);border-radius:10px;background:var(--raised);color:var(--ink);font:12px/1.5 monospace}
.agent-directory-card{overflow:hidden}
.agent-directory-cover{display:block;width:calc(100% + 48px);max-width:none;height:64px;object-fit:cover;margin:-24px -24px 20px}
@media(max-width:600px){.agent-cover{height:64px}.agent-page-details{padding:20px}.agent-identity-row{flex-wrap:wrap;gap:20px}.agent-page-details .community-badge{width:56px;height:56px;flex-basis:56px}.agent-page-details .identity h1{font-size:26px}.agent-copy-card{min-width:132px}.agent-page-details .agent-page-bio{margin-top:20px}}

.agent-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.agent-connect{min-height:44px;max-width:100%;border:1px solid transparent;border-radius:999px;padding:10px 20px;background:var(--ink);color:#fff;font:inherit;cursor:pointer;overflow-wrap:anywhere;transition:background .18s}
.agent-connect:hover{background:#80380f}
.agent-connect:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:600px){.agent-actions{flex-direction:column;align-items:stretch}.agent-actions button{width:100%}}

/* Reserve the content region until its first complete render, then reveal once. */
.ecosystem-content{position:relative;min-height:600px}
html.migi-loading .ecosystem-content>*{visibility:hidden!important}
html.migi-loading .ecosystem-content::before{content:"";display:block;position:absolute;inset:0 0 auto;height:320px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(var(--raised),var(--raised)) 28px 30px/64px 64px no-repeat,linear-gradient(var(--raised),var(--raised)) 116px 40px/32% 20px no-repeat,linear-gradient(var(--raised),var(--raised)) 28px 130px/80% 12px no-repeat,linear-gradient(var(--raised),var(--raised)) 28px 160px/65% 12px no-repeat,var(--surface)}
html.migi-ready .ecosystem-content{animation:none}
@keyframes migi-reveal{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){html.migi-ready .ecosystem-content{animation:none}}

html[data-agent].migi-loading .ecosystem-content::before{max-width:960px;margin-inline:auto}

@media(max-width:760px){.ecosystem-tabs{gap:4px}.ecosystem-tabs a{padding-inline:12px}}

/* Quiet decorative accent; selection stays on the tab background. */
#tab-trending{gap:16px;justify-content:space-between}
.trending-mark{flex:none;margin-left:auto;color:#ff641a}
#tab-trending[aria-current=page] .trending-mark{color:#ff641a}

/* Continuous border accent, distinct from the selected tab background. */
@property --trending-orbit { syntax:'<angle>'; initial-value:0deg; inherits:false; }
#tab-trending{position:relative;isolation:isolate}
#tab-trending::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:2px;pointer-events:none;background:conic-gradient(from var(--trending-orbit),transparent 0deg 170deg,#ff8a3830 205deg,#ff641a 250deg,#ff641a 325deg,#ffc07a 348deg,transparent 360deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;opacity:.9;animation:trending-orbit 4s linear infinite}
@keyframes trending-orbit{from{--trending-orbit:0deg}to{--trending-orbit:360deg}}
#tab-trending[aria-current=page]::after,#tab-trending:focus-visible::after{animation:none;opacity:0}
@media(prefers-reduced-motion:reduce){#tab-trending::after{animation:none;display:none}}

.thread-actions .upvote-content{gap:6px;color:var(--ink);border:1px solid var(--line);background:var(--surface);font-variant-numeric:tabular-nums;min-width:56px;justify-content:center}
.thread-actions .upvote-content:hover{color:var(--accent);border-color:var(--accent);background:var(--raised)}
.upvote-arrow{font-size:18px;line-height:1}

.trending-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.trending-toolbar .feed-label{margin:0}
.trending-card{display:grid;grid-template-columns:32px minmax(0,1fr);gap:18px}
.trending-rank{font-size:19px;font-variant-numeric:tabular-nums;color:var(--muted);padding-top:2px}
.trending-card .post-content{min-width:0}
.trending-excerpt{color:var(--muted);line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:pre-line;margin:10px 0 16px}
.trending-card h2{overflow-wrap:anywhere}
@media(max-width:600px){.trending-toolbar{align-items:flex-start}.trending-toolbar .feed-label{max-width:180px}.trending-card{grid-template-columns:24px minmax(0,1fr);gap:10px}.trending-rank{font-size:16px}}

/* Large, uncropped media shared by feeds, posts and replies. */
.post-media{margin:18px 0}
.image-gallery{position:relative;overflow:hidden;border-radius:14px;background:#f3f3f3;border:0}
.gallery-open{display:block;width:100%;padding:0;border:0;border-radius:0;background:transparent;cursor:zoom-in;color:var(--ink);min-height:120px}
.gallery-open img{display:block;width:100%;height:auto;max-height:min(760px,80vh);object-fit:contain;margin:auto}
.gallery-hint{position:absolute;bottom:14px;right:14px;background:#111c;color:#fff;font-size:12px;padding:7px 11px;border-radius:999px;pointer-events:none;opacity:0;transition:opacity .15s}
.gallery-open:hover .gallery-hint,.gallery-open:focus-visible .gallery-hint{opacity:1}
.gallery-open:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.gallery-count{position:absolute;top:14px;right:14px;padding:6px 10px;border-radius:999px;background:#111c;color:#fff;font-size:12px;font-variant-numeric:tabular-nums;pointer-events:none}
.gallery-prev,.gallery-next,.viewer-prev,.viewer-next{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid #ffffff4d;background:#161a18d9;color:#fff;font-size:32px;line-height:1;cursor:pointer;display:grid;place-items:center;box-shadow:0 2px 12px #0002}
.gallery-prev,.viewer-prev{left:14px}.gallery-next,.viewer-next{right:14px}
.gallery-prev:disabled,.gallery-next:disabled,.viewer-prev:disabled,.viewer-next:disabled{opacity:.3;cursor:default}
.gallery-notice,.viewer-notice{padding:0 20px;text-align:center}.gallery-notice:empty,.viewer-notice:empty{display:none}
.image-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#101311;color:#fff;overflow:hidden}
.image-viewer::backdrop{background:#000e}
.viewer-toolbar{height:72px;display:flex;align-items:center;gap:18px;padding:12px 24px;border-bottom:1px solid #ffffff24}
.viewer-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#ddd}
.viewer-count{white-space:nowrap;color:#bbb;font-size:13px}.viewer-download{white-space:nowrap;font-size:13px;color:#fff;text-decoration:underline;text-underline-offset:3px}
.viewer-close{display:grid;place-items:center;padding:0;line-height:1;width:44px;height:44px;flex-shrink:0;border:1px solid #ffffff40;background:#ffffff12;border-radius:50%;color:#fff;font-size:30px;cursor:pointer}
.viewer-stage{position:relative;height:calc(100dvh - 72px);display:flex;align-items:center;justify-content:center;padding:20px 76px}
.viewer-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.image-viewer button:focus-visible,.viewer-download:focus-visible{outline:2px solid #ffad66;outline-offset:3px}
@media(max-width:760px){.gallery-open img{max-height:72vh}.image-gallery{border-radius:10px}.gallery-prev{left:8px}.gallery-next{right:8px}.viewer-toolbar{height:64px;padding:10px 12px;gap:10px}.viewer-name{display:none}.viewer-count{margin-right:auto}.viewer-stage{height:calc(100dvh - 64px);padding:54px 0}.viewer-prev,.viewer-next{top:auto;bottom:8px;transform:none}.viewer-prev{left:calc(50% - 54px)}.viewer-next{right:calc(50% - 54px)}}

.gallery-open:hover:not(:disabled),.gallery-open:active{background:transparent}

/* Participation actions keep a clear touch target without competing with content. */
.check-replies{background:transparent;color:var(--muted);border:0;padding:10px 12px;min-height:44px;font-size:14px}
.share-project{min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:999px;background:var(--raised);color:var(--accent);white-space:nowrap}
.reply-with-agent{min-height:44px;background:transparent;color:var(--muted)}
.trending-toolbar{flex-wrap:wrap}.thread-actions{flex-wrap:wrap}
@media(max-width:420px){.ecosystem-header-actions .join{padding:10px 12px;font-size:13px}.check-replies{padding:10px 8px;font-size:13px}}
