/* Multi-user foundries: public shell, foundry pages, community, sign-up */

.public-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--gutter); border-bottom: 1px solid var(--border-strong); }
.public-page { padding-top: var(--space-7); }

.vis-badge { position: absolute; top: var(--space-3); right: var(--space-3); display: inline-flex; align-items: center; gap: var(--space-1); padding: 0.125rem var(--space-2); border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wide); background: rgba(6, 6, 7, 0.78); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); backdrop-filter: blur(6px); }

.owner-line { display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--space-3); }
.owner-line strong { color: var(--text); font-weight: var(--fw-semibold); }
.owner-link { display: inline-flex; margin-top: var(--space-2); }
.owner-link:hover strong { text-decoration: underline; }
.comment-author-link { color: inherit; }
.comment-author-link:hover { text-decoration: underline; }

.foundry-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; margin-bottom: var(--space-8); }
.foundry-head-text .page-title { margin-top: var(--space-2); }
.foundry-head .page-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.foundry-note { margin-bottom: var(--space-6); }
@media (max-width: 760px) {
    .foundry-head { grid-template-columns: auto minmax(0, 1fr); }
    .foundry-head .page-actions { grid-column: 1 / -1; }
}

.community-section { margin-bottom: var(--space-9); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--space-4); }
.member-card { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); min-width: 0; }
.member-card:hover { background: var(--surface-hover); }
.member-card-text { display: flex; flex-direction: column; min-width: 0; }
.member-card-name { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card-sub { color: var(--text-faint); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.count-badge { margin-left: auto; min-width: 1.25rem; padding: 0 var(--space-1); text-align: center; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold, 700); background: var(--gold); color: #0b0b0c; }

.scope-switch { margin-bottom: var(--space-5); }

.check { display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; margin-top: var(--space-5); }
.check input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-top: 0.125rem; flex: none; accent-color: var(--accent); }
.check .hint { display: block; margin-top: var(--space-1); }

.code-chip { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: var(--fs-sm); padding: 0.0625rem var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.person-actions .btn-sm { white-space: nowrap; }

@keyframes app-fade-in { from { opacity: 0; } to { opacity: 1; } }
#app > :not(.boot) { animation: app-fade-in 0.5s ease-out both; }
@media (prefers-reduced-motion: reduce) { #app > :not(.boot) { animation: none; } }

.boot { transition: opacity 0.4s ease-out; }
.boot.boot-out { opacity: 0; }

.px :is(.project-card-media, .update-card-media, .featured-media, .hero-media, .side-photo, .project-cover):not(:has(.ba)) img {
    scale: 1.4;
    translate: 0 calc(var(--py, 0) * 1%);
    will-change: translate;
}
.px .page-header > * { translate: 0 calc(var(--hy, 0) * 1px); }

/* Home on phones */
@media (max-width: 760px) {
    .hero-media, .hero-fallback { min-height: 0; height: 11rem; }
    .hero-media .secure-img { position: absolute; inset: 0; }
    .hero-content { padding: var(--space-5) var(--gutter) var(--space-6); }
    .hero-kicker { font-size: 0.6875rem; letter-spacing: 0.14em; line-height: 1.5; }
    .hero-kicker::before { width: 1.25rem; }
    .hero-content > .hero-title { margin-block: var(--space-4) var(--space-4); }
    .hero-tagline { letter-spacing: 0.2em; font-size: 0.75rem; margin-top: var(--space-3); }
    .hero-text { max-width: none; margin-top: var(--space-3); }
    .hero-actions { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-5); }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile { min-height: 8rem; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
    .tile:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, 0.14); }
    .tile:nth-child(-n+2) { border-top: 0; }
    .tile-body { padding: var(--space-4); gap: var(--space-1); }
    .tile-icon { width: 1.5rem; height: 1.5rem; margin-bottom: var(--space-1); }
    .tile-label { font-size: var(--fs-base); }
    .tile-text { font-size: var(--fs-xs); line-height: 1.35; }
    .tile-link { display: none; }

    .update-grid {
        display: flex;
        gap: var(--space-3);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        margin-inline: calc(var(--gutter) * -1);
        padding-inline: var(--gutter);
        padding-bottom: var(--space-2);
        scrollbar-width: none;
    }
    .update-grid::-webkit-scrollbar { display: none; }
    .update-card { flex: 0 0 84%; scroll-snap-align: start; }
    .update-card-top { padding: var(--space-4); }
    .update-card-media { aspect-ratio: 3 / 2; }

    .dash .grid-cards {
        display: flex;
        gap: var(--space-3);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        margin-inline: calc(var(--gutter) * -1);
        padding-inline: var(--gutter);
        padding-bottom: var(--space-2);
        scrollbar-width: none;
    }
    .dash .grid-cards::-webkit-scrollbar { display: none; }
    .dash .grid-cards > * { flex: 0 0 82%; scroll-snap-align: start; min-width: 0; }
}

/* ---------------------------------------------------------------------------
   Messages
   --------------------------------------------------------------------------- */
.icon-btn-badged { position: relative; }
.icon-badge { position: absolute; top: 0.125rem; right: 0.125rem; margin: 0; min-width: 1rem; font-size: 0.625rem; line-height: 1rem; }
.friend-tile-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }

.chat { display: grid; grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr); gap: var(--space-5); height: calc(100dvh - var(--space-8) - var(--space-11)); min-height: 26rem; }
.chat-side, .chat-main { min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-side { overflow-y: auto; }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-3); }
.chat-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.chat-side-pad { padding: var(--space-3) var(--space-5) var(--space-5); }
.chat-side-label { padding: var(--space-5) var(--space-5) var(--space-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.chat-live { font-size: var(--fs-xs); color: var(--text-faint); }
.chat-live-off { color: var(--status-warn); }

.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); color: inherit; text-decoration: none; border-left: 2px solid transparent; }
.chat-row:hover { background: var(--surface-hover); }
.chat-row.active { background: var(--accent-soft); border-left-color: var(--accent); }
.chat-row-text { display: flex; flex-direction: column; min-width: 0; gap: 0.125rem; }
.chat-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.chat-row-name { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-when { flex: none; font-size: var(--fs-xs); color: var(--text-faint); }
.chat-row-preview { font-size: var(--fs-sm); color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread .chat-row-preview { color: var(--text); font-weight: var(--fw-semibold); }

.chat-placeholder { flex: 1; display: grid; place-items: center; padding: var(--space-6); overflow-y: auto; }
.chat-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.chat-head-text { flex: 1; min-width: 0; }
.chat-back { display: none; }

.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-5); display: flex; flex-direction: column; gap: 2px; }
.chat-more, .chat-empty { text-align: center; margin: var(--space-3) 0; }
.chat-day { display: flex; justify-content: center; margin: var(--space-5) 0 var(--space-3); }
.chat-day span { font-size: var(--fs-xs); color: var(--text-faint); letter-spacing: 0.04em; }

.chat-msg { display: flex; align-items: center; gap: var(--space-1); max-width: 100%; }
.chat-msg.group-start { margin-top: var(--space-3); }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.theirs { align-self: flex-start; }
.chat-bubble { max-width: min(34rem, 80vw); padding: var(--space-2) var(--space-4); background: color-mix(in srgb, var(--surface-raised) 97%, white); border: 0; }
.chat-msg.mine .chat-bubble { text-align: right; }
.chat-msg.theirs .chat-meta { text-align: left; }
.chat-text { display: block; white-space: pre-wrap; overflow-wrap: break-word; line-height: 1.45; }
.chat-meta { display: block; margin-top: 0.125rem; font-size: 0.6875rem; opacity: 0.65; text-align: right; }
.chat-delete { opacity: 0; width: 2rem; height: 2rem; }
.chat-msg:hover .chat-delete, .chat-delete:focus-visible { opacity: 1; }
@media (hover: none) { .chat-delete { display: none; } }

.chat-composer { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
.chat-composer .textarea { scrollbar-width: none; flex: 1; min-width: 0; min-height: 2.75rem; max-height: 10rem; resize: none; padding-block: var(--space-3); }
.chat-composer .btn { min-height: 2.75rem; }
.chat-error { flex-basis: 100%; }
.chat-locked { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-sm); }
.chat-locked a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
    .chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--header-height) - var(--bottom-nav-height) - var(--space-6) - var(--space-9)); }
    .chat-open .chat-side, .chat:not(.chat-open) .chat-main { display: none; }
    .chat-back { display: inline-grid; }
    .chat-send-label { display: none; }
    .chat-bubble { max-width: 85vw; }
}
.chat-seen { margin-left: 0.25rem; }
.shell:not(.sidebar-pinned) .sidebar-panel:not(:hover):not(:has(:focus-visible)) .nav-link .count-badge { opacity: 1; position: absolute; top: 0.375rem; left: 2.375rem; margin: 0; min-width: 1rem; font-size: 0.625rem; line-height: 1rem; }

.dock { position: fixed; right: var(--space-5); bottom: 0; z-index: 40; display: flex; align-items: flex-end; gap: var(--space-3); pointer-events: none; }
.dock > * { pointer-events: auto; }
.dock-wins { display: flex; align-items: flex-end; gap: var(--space-3); }
.dock-win, .dock-list { width: 17rem; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-bottom: 0; box-shadow: var(--shadow-lg); }
.dock-win:not(.min) { height: 23rem; max-height: calc(100dvh - var(--space-9)); }
.dock-list { width: 13.5rem; }
.dock-list.open { height: 23rem; max-height: calc(100dvh - var(--space-9)); }
.dock-win-head, .dock-list-head { display: flex; align-items: center; gap: var(--space-1); min-height: 2.75rem; padding-right: var(--space-1); background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.dock-win-head.unread { background: var(--accent-soft); }
.dock-win-title, .dock-list-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: none; border: 0; color: inherit; font: inherit; font-weight: var(--fw-semibold); text-align: left; cursor: pointer; }
.dock-list-head { flex: none; width: 100%; padding-right: var(--space-3); }
.dock-list-title, .dock-win-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-online-count { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--fs-xs); font-weight: var(--fw-regular, 400); color: var(--text-muted); }
.dock-who { position: relative; display: inline-flex; flex: none; }
.presence-dot { position: absolute; right: -1px; bottom: -1px; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--status-ok); border: 2px solid var(--surface); }
.presence-dot.static { position: static; border: 0; width: 0.5rem; height: 0.5rem; }
.dock-win .count-badge, .dock-list-head .count-badge { margin-left: 0; }
.dock-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-3); display: flex; flex-direction: column; gap: 2px; }
.dock-log .chat-msg { max-width: 85%; }
.dock-log .chat-bubble { max-width: none; padding: var(--space-2) var(--space-3); font-size: 0.8125rem; }
.dock-center { flex: 1; display: grid; place-items: center; }
.dock-composer { display: flex; align-items: flex-end; gap: var(--space-1); flex-wrap: wrap; padding: var(--space-2); border-top: 1px solid var(--border); }
.dock-composer .textarea { scrollbar-width: none; flex: 1; min-width: 0; min-height: 2.25rem; font-size: 0.8125rem; max-height: 6rem; resize: none; padding-block: var(--space-2); }
.dock-list-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: var(--space-2); }
.dock-pad { padding: var(--space-3) var(--space-4); font-size: var(--fs-sm); }
.dock-row { width: 100%; background: none; border-top: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; cursor: pointer; padding: var(--space-2) var(--space-4); }
.dock-row.offline { opacity: 0.65; }
.dock .chat-side-label { padding: var(--space-3) var(--space-4) var(--space-1); }
@media (max-width: 900px) { .dock { display: none; } }

.bell { position: relative; }
.bell-scrim { position: fixed; inset: 0; z-index: 44; background: none; border: 0; padding: 0; cursor: default; }
.bell-panel {
    position: fixed; z-index: 45; display: flex; flex-direction: column; white-space: normal; text-transform: none; letter-spacing: 0; font-family: var(--font-body, inherit);
    background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
}
.bell-desktop .bell-panel { position: absolute; top: calc(100% + var(--space-2)); right: 0; width: 22rem; max-height: min(30rem, calc(100dvh - var(--space-11))); }
.bell-bar .bell-panel { top: var(--header-height); left: 0; right: 0; max-height: calc(100dvh - var(--header-height) - var(--bottom-nav-height)); border-inline: 0; border-top: 0; }
.bell-panel { --bell-head-h: 3.25rem; animation: bell-in 0.4s ease-out backwards; }
.bell-panel.closing { animation: bell-out 0.34s ease-in forwards; pointer-events: none; }
@keyframes bell-in {
    from { opacity: 0; clip-path: inset(0 0 calc(100% - var(--bell-head-h)) 100%); animation-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1); }
    42% { clip-path: inset(0 0 calc(100% - var(--bell-head-h)) 0); animation-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1); }
    to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes bell-out {
    from { opacity: 1; clip-path: inset(0 0 0 0); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.3); }
    58% { clip-path: inset(0 0 calc(100% - var(--bell-head-h)) 0); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.3); }
    to { opacity: 0; clip-path: inset(0 0 calc(100% - var(--bell-head-h)) 100%); }
}
@media (prefers-reduced-motion: reduce) { .bell-panel, .bell-panel.closing { animation-duration: 0.01s; } }
.bell-head { box-sizing: border-box; height: var(--bell-head-h); display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.bell-title { flex: 1; margin: 0; font-size: var(--fs-md); }
.bell-markall { font-size: var(--fs-xs); padding-inline: var(--space-3); }
.bell-markall:disabled { opacity: 0.4; pointer-events: none; }
.bell-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.bell-empty { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-8) var(--space-5); color: var(--text-faint); }
.bell-empty .icon { width: 1.75rem; height: 1.75rem; }
.bell-empty p { margin: 0; font-size: var(--fs-sm); }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-item { border-bottom: 1px solid var(--border); border-left: 2px solid transparent; }
.bell-item:last-child { border-bottom: 0; }
.bell-item.unread { background: var(--accent-soft); border-left-color: var(--accent); }
.bell-item-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); background: none; border: 0; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.bell-item-main:hover { background: var(--surface-hover); }
.bell-icon { display: grid; place-items: center; width: 2rem; height: 2rem; background: var(--surface-raised); border-radius: 50%; color: var(--text-muted); }
.bell-item-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.bell-item-line { font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.bell-item.unread .bell-item-line { font-weight: var(--fw-semibold); }
.bell-item-when { font-size: var(--fs-xs); color: var(--text-faint); }
.bell-dot { width: 0.5rem; height: 0.5rem; margin-top: 0.375rem; border-radius: 50%; background: var(--accent); }
.bell-actions { display: flex; gap: var(--space-2); padding: 0 var(--space-4) var(--space-3) calc(var(--space-4) + 2rem + var(--space-3)); }
.bell-action { min-height: 2rem; padding-inline: var(--space-3); font-size: var(--fs-xs); }

.bell-float { display: none; }
@media (min-width: 901px) {
    .bell-float { display: block; position: fixed; top: var(--space-5); right: var(--space-6); z-index: 35; }
    .bell-float .bell > .icon-btn { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
    .bell-float .bell > .icon-btn:hover { background: var(--surface-hover); }
    .bell-float .icon-badge { top: -0.25rem; right: -0.25rem; }
}

.tabs[role="tablist"] { margin-top: var(--space-6); }
.tabs button.tab { background: none; border: 0; font: inherit; cursor: pointer; }

.feed-strip-wrap { margin-bottom: var(--space-7); }
.feed-strip { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-3); scroll-snap-type: x proximity; scrollbar-width: thin; }
.feed-strip-tile { position: relative; flex: none; width: 11rem; aspect-ratio: 4 / 5; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md, var(--radius-sm)); overflow: hidden; background: var(--surface-raised); cursor: pointer; scroll-snap-align: start; }
.feed-strip-tile:hover { border-color: var(--gold); }
.feed-strip-tile .secure-img, .feed-strip-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-strip-label { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-5) var(--space-3) var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: #fff; text-align: left; background: linear-gradient(transparent, rgba(6, 6, 7, 0.85)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: var(--space-7); align-items: start; }
@media (max-width: 960px) { .feed-layout { grid-template-columns: minmax(0, 1fr); } .feed-side { display: none; } .feed-strip-tile { width: 8.5rem; } }
.feed-side { position: sticky; top: var(--space-6); }
.feed-makers { display: flex; flex-direction: column; gap: var(--space-3); }

.feed { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.feed-item { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.feed-who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; color: inherit; }
.feed-who:hover .feed-who-name { text-decoration: underline; }
.feed-who-text { display: flex; flex-direction: column; min-width: 0; }
.feed-who-name { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-verb { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-faint); font-size: var(--fs-sm); }
.feed-time { color: var(--text-faint); font-size: var(--fs-sm); white-space: nowrap; }

.feed-hero { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-raised); }
.feed-hero .secure-img, .feed-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-hero .status { position: absolute; left: var(--space-3); top: var(--space-3); }

.feed-media { display: grid; gap: var(--space-2); grid-template-columns: 1fr; }
.feed-media-tile { position: relative; padding: 0; border: 0; cursor: pointer; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-raised); aspect-ratio: 4 / 3; }
.feed-media-tile .secure-img, .feed-media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.feed-media-tile:hover img { transform: scale(1.03); }
.feed-media[data-count="1"] .feed-media-tile { aspect-ratio: 16 / 10; }
.feed-media[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.feed-media[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 10; }
.feed-media[data-count="3"] .feed-media-tile { aspect-ratio: auto; }
.feed-media[data-count="3"] .feed-media-tile:first-child { grid-row: 1 / span 2; }
.feed-media-more { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-xl, 1.5rem); font-weight: var(--fw-semibold); color: #fff; background: rgba(6, 6, 7, 0.6); }

.feed-body { display: flex; flex-direction: column; gap: var(--space-2); color: inherit; }
.feed-title { margin: 0; }
.feed-body:hover .feed-title { color: var(--gold); }
.feed-text { margin: 0; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feed-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.feed-foot { display: flex; align-items: center; gap: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border); flex-wrap: wrap; }
.feed-project { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-muted); font-size: var(--fs-sm); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-project:hover { color: var(--text); }
.feed-progress { flex: 1 1 6rem; min-width: 6rem; }
.feed-stats { display: inline-flex; gap: var(--space-4); color: var(--text-faint); font-size: var(--fs-sm); }
.feed-sentinel { min-height: 3rem; display: grid; place-items: center; }
