/* feed: uses the tokens in /app.css. */

/* ── Feed cards: activity line and latest comments ─────────────────────── */
.fc-activity { margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.fc-activity a { color: var(--ink-2); font-weight: 700; }
.fc-activity a.fc-ago { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.post-foot.fc { display: grid; gap: 4px; }
.fc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; line-height: 1.4; }
.fc-bar .small { font-variant-numeric: tabular-nums; }
.fc-all { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--deep); padding: 4px 8px; margin-left: -8px; border-radius: 8px; transition: background-color var(--dur-1); }
.fc-all:hover { background: var(--sunken); text-decoration: none; }
.fc-comment { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; transition: background-color var(--dur-1); }
.fc-comment:hover { background: var(--bg); }
.fc-comment .fc-comment:hover { background: var(--sunken); }
.fc-avatar, .fc-avatar .avatar { width: 34px; height: 34px; }
.fc-avatar { display: block; }
.fc-main { min-width: 0; }
.fc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.4; }
.fc-name { font-weight: 700; color: var(--deep); font-size: 14.5px; }
.fc-time { font-variant-numeric: tabular-nums; }
.fc-text { margin-top: 2px; font-size: 14.5px; line-height: 1.55; color: var(--ink); max-height: calc(1.55em * 3); overflow: hidden; overflow-wrap: anywhere; }
.fc-text.open { max-height: none; }
.fc-text p { margin: 0 0 .35em; }
.fc-text img, .fc-text figure { display: none; }
.fc-more { border: 0; background: none; padding: 0; margin: 2px 0 0; font: 700 13.5px/1.4 Lato, sans-serif; color: var(--blue); cursor: pointer; }
.fc-more:hover { text-decoration: underline; }
.fc-photo { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; line-height: 1.4; }
.fc-main > .reactions { margin: 8px 0 0; }
.fc-main > .reactions .chip { min-height: 26px; padding: 2px 8px; font-size: 12.5px; }
.fc-main > .reactions .chip .emo { font-size: 13.5px; }
.fc-reply { margin: 8px 0 0 -8px; padding-left: 14px; grid-template-columns: 28px minmax(0, 1fr); box-shadow: inset 2px 0 0 var(--line-strong); border-radius: 0 12px 12px 0; }
.fc-reply .fc-avatar, .fc-reply .fc-avatar .avatar { width: 28px; height: 28px; font-size: 11px; }
.fc-reply .fc-text { max-height: calc(1.55em * 2); }
.fc-reply .fc-text.open { max-height: none; }

/* ── Featured: compact cards, at most three in view ────────────────────── */
.featured-head { font-size: 19px; line-height: 1.3; margin: 0 0 10px; }
.featured-row { grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px; padding: 2px 2px 6px; }
.featured-card { flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; min-height: 84px; }
.featured-thumb { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--sunken); display: grid; place-items: center; color: var(--saffron); }
.featured-thumb svg { width: 22px; height: 22px; }
.featured-card .featured-thumb img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.featured-body { padding: 0; min-width: 0; gap: 3px; line-height: 1.4; }
.featured-body strong { font-size: 14.5px; line-height: 1.4; }
.featured-body .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 960px) {
  .featured-row { grid-auto-columns: minmax(250px, 78%); }
}

/* ── Lesson: outline | lesson | comments on wide screens ───────────────── */
@media (min-width: 1500px) {
  .main > .lesson-layout.with-rail { max-width: 1840px; grid-template-columns: 280px minmax(0, 1fr) clamp(360px, 24vw, 460px); gap: 24px; }
  .lesson-layout > .lesson-col { display: contents; }
  .lesson-layout > .rail { grid-column: 1; grid-row: 1; }
  .lesson-layout .lesson { grid-column: 2; grid-row: 1; min-width: 0; }
  .lesson-layout .comments { grid-column: 3; grid-row: 1; margin: 0; position: sticky; top: calc(var(--top) + 20px); max-height: calc(100vh - var(--top) - 40px); display: flex; flex-direction: column; padding: 20px 20px 16px; overflow: hidden; }
  .lesson-layout .comments > h2 { flex: none; margin: 0 0 8px; }
  .lesson-layout .comments > .comments-off { flex: none; }
  .lesson-layout .comment-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin: 0 -20px; padding: 0 20px; order: 1; }
  .lesson-layout .comments > #more { order: 2; flex: none; margin: 10px 0 0; align-self: center; }
  .lesson-layout .comments > .composer { order: 3; flex: none; margin: 12px -20px 0; padding: 14px 20px 0; border-top: 1px solid var(--line); }
  .lesson-layout .comments > .composer textarea { min-height: 0; }
  .lesson-layout .comment .reactions, .lesson-layout .comment-body, .lesson-layout .comment-actions, .lesson-layout .replies, .lesson-layout .reply-form { margin-left: 0; }
  .lesson-layout .comment-list > .comment:first-child { border-top: 0; }
}
@media (min-width: 1500px) {
  .main > .lesson-layout.with-rail:not(:has(.comments)) { grid-template-columns: 280px minmax(0, 1fr); max-width: 1380px; }
}
