/* Flat pastel capsules; the desktop ticker shares the action row. */
.capsule-footer {
  --capsule-blue:#526d9e;
  --capsule-blue-wash:linear-gradient(115deg,#f2effc,#edf3ff);
  --capsule-blue-hover:linear-gradient(115deg,#e8e5f7,#e3edfc);
  --capsule-views:linear-gradient(115deg,#edf5ff,#f0f3ff);
  --capsule-solid:linear-gradient(115deg,#e9f2ff,#eeeafb);
  --capsule-on-solid:#52658d;
  --capsule-solid-hover:linear-gradient(115deg,#e2edff,#e7e1f7);
  --capsule-soft:linear-gradient(115deg,#f0f5fd,#f8eff6);
  --capsule-name:linear-gradient(115deg,#e6edfc,#eee5f6);
  --capsule-rose:#9b5775;
  --capsule-rose-wash:linear-gradient(115deg,#fff0f5,#f6eefb);
  --capsule-liked:linear-gradient(115deg,#fbe4ef,#eee4f9);
  --capsule-on-liked:#945071;
  container:article-footer / inline-size;
}
html[data-theme="dark"] .capsule-footer {
  --capsule-blue:#aac2ee;
  --capsule-blue-wash:linear-gradient(115deg,#283c59,#3d3555);
  --capsule-blue-hover:linear-gradient(115deg,#344d6d,#4c4269);
  --capsule-views:linear-gradient(115deg,#263c59,#354361);
  --capsule-solid:linear-gradient(115deg,#d3e1f5,#ddd8f1);
  --capsule-on-solid:#223146;
  --capsule-solid-hover:linear-gradient(115deg,#e1eaf8,#e8e2f6);
  --capsule-soft:linear-gradient(115deg,#253444,#342d43);
  --capsule-name:linear-gradient(115deg,#334662,#463d5d);
  --capsule-rose:#efbfd1;
  --capsule-rose-wash:linear-gradient(115deg,#482e40,#423451);
  --capsule-liked:linear-gradient(115deg,#f0d5e0,#e1d4ef);
  --capsule-on-liked:#332237;
}
.feed-card .article-feed-footer.capsule-footer { display:block; margin-top:14px; padding-top:10px; }
.article-page .article-bottom.capsule-footer { display:block; padding-top:12px; }
.capsule-footer .capsule-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.capsule-footer .article-stats { display:contents; }
.capsule-footer .icon { width:15px; height:15px; flex-shrink:0; }
.capsule-footer :is(.capsule-views,.capsule-chip,.read-post) { position:relative; isolation:isolate; background:transparent; border:0; border-radius:999px; }
.capsule-footer :is(.capsule-views,.capsule-chip,.read-post)::before { content:""; position:absolute; z-index:-1; inset:0; border-radius:inherit; background:var(--capsule-fill); pointer-events:none; }
.capsule-footer .capsule-views { --capsule-fill:var(--capsule-views); display:flex; flex:0 0 auto; align-items:center; justify-content:center; gap:5px; min-height:32px; padding:5px 10px; color:var(--capsule-blue); white-space:nowrap; }
.capsule-footer .capsule-view-icon { display:grid; place-items:center; width:15px; height:15px; flex-shrink:0; color:inherit; }
.capsule-view-copy { display:flex; align-items:baseline; gap:5px; }
.capsule-view-copy strong { font-size:12px; font-weight:500; line-height:1.4; font-variant-numeric:tabular-nums; }
.capsule-view-copy small { font-size:11px; line-height:1.5; color:inherit; }
.capsule-footer .capsule-chip { --capsule-fill:var(--capsule-blue-wash); display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; gap:6px; min-width:64px; min-height:32px; padding:5px 10px; color:var(--capsule-blue); font-size:12px; font-weight:400; line-height:1.6; white-space:nowrap; text-decoration:none; }
.capsule-footer .capsule-count { min-width:0; padding:0; font-size:12px; font-weight:500; font-variant-numeric:tabular-nums; text-align:center; }
.capsule-footer .article-like { --capsule-fill:var(--capsule-rose-wash); color:var(--capsule-rose); }
.capsule-footer .article-like.liked { --capsule-fill:var(--capsule-liked); color:var(--capsule-on-liked); }
.capsule-footer .article-like.liked .icon { fill:currentColor; }
.capsule-footer .read-post { --capsule-fill:var(--capsule-solid); display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; gap:8px; min-height:32px; margin-left:auto; padding:5px 12px; color:var(--capsule-on-solid); font-size:12px; font-weight:500; line-height:1.6; white-space:nowrap; text-decoration:none; }
.capsule-footer .capsule-read-short { display:none; }
.capsule-feed-layout { display:grid; grid-template-columns:max-content max-content max-content minmax(0,1fr) max-content; align-items:center; gap:8px; }
.capsule-feed-layout > .capsule-toolbar { display:contents; }
.capsule-feed-layout .capsule-views { grid-column:1; grid-row:1; }
.capsule-feed-layout .capsule-comments { grid-column:2; grid-row:1; }
.capsule-feed-layout .article-like { grid-column:3; grid-row:1; }
.capsule-feed-layout .read-post { grid-column:5; grid-row:1; margin:0; }
.capsule-footer .comment-strip { display:block; grid-column:4; grid-row:1; min-width:0; margin:0; padding:0; border-radius:0; background:transparent; }
.capsule-footer .comment-viewport { --comment-row-height:32px; width:100%; border-radius:999px; background:var(--capsule-soft); }
.capsule-footer .comment-slide { display:block; }
.capsule-comment-row { display:flex; align-items:center; gap:6px; width:100%; height:100%; padding:0 8px; color:var(--text); text-decoration:none; }
.capsule-comment-identity { display:flex; align-items:center; flex:0 1 auto; gap:5px; min-width:0; height:24px; padding:2px 7px 2px 2px; border-radius:999px; background:var(--capsule-name); }
.capsule-comment-avatar { display:flex; flex:0 0 20px; align-items:center; justify-content:center; width:20px; height:20px; }
.capsule-comment-avatar .comment-avatar { display:grid; place-items:center; width:20px; height:20px; flex-shrink:0; margin:0; border:0; border-radius:50%; background:var(--capsule-blue-wash); color:var(--capsule-blue); font-size:10px; }
.capsule-comment-avatar .comment-avatar img { width:100%; height:100%; object-fit:cover; }
.capsule-comment-name { flex:0 1 auto; min-width:0; max-width:5em; height:20px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:500; line-height:20px; color:var(--capsule-blue); }
.capsule-comment-row .comment-line { flex:1 1 0%; width:auto; min-width:0; height:20px; font-size:12px; line-height:20px; }
.capsule-footer .comment-ticker-item { display:block; width:max-content; min-height:0; padding:0; font-size:12px; line-height:20px; color:inherit; white-space:nowrap; }
.capsule-footer .comment-strip-empty { grid-column:4; grid-row:1; min-width:0; margin:0; padding:0; border-radius:0; background:transparent; font-size:12px; color:var(--muted); }
.capsule-ending { display:flex; align-items:center; gap:8px; margin-bottom:6px; font-size:12px; line-height:1.8; color:var(--muted); }
.capsule-ending::before { content:""; width:14px; height:2px; flex-shrink:0; border-radius:2px; background:var(--capsule-blue-wash); }
.capsule-footer .article-detail-actions { width:100%; margin-left:0; justify-content:flex-start; }
.capsule-footer .article-detail-actions .capsule-views { margin-right:auto; }
@media (hover:hover) and (pointer:fine) {
  .capsule-footer .capsule-comments:hover { --capsule-fill:var(--capsule-blue-hover); }
  .capsule-footer .article-like:hover { --capsule-fill:var(--capsule-liked); color:var(--capsule-on-liked); }
  .capsule-footer .read-post:hover { --capsule-fill:var(--capsule-solid-hover); }
  .capsule-footer .comment-viewport:hover { background:var(--capsule-blue-wash); }
  .capsule-footer .comment-strip-empty:hover { color:var(--capsule-blue); }
}
@container article-footer (max-width:580px) {
  .capsule-feed-layout { display:block; }
  .capsule-feed-layout > .capsule-toolbar { display:flex; }
  .capsule-feed-layout .read-post { margin-left:auto; }
  .capsule-footer .comment-strip,.capsule-footer .comment-strip-empty { margin-top:6px; }
  .capsule-footer .comment-strip-empty { display:block; padding:3px 0; }
  .capsule-footer .comment-viewport { --comment-row-height:36px; }
}
@container article-footer (max-width:480px) {
  .capsule-footer .capsule-toolbar { gap:4px; }
  .capsule-footer .capsule-views { gap:4px; padding:5px 7px; }
  .capsule-view-copy small,.capsule-footer .capsule-action-label,.capsule-footer .article-like-label { display:none; }
  .capsule-footer .capsule-chip { min-width:58px; padding:5px 7px; gap:4px; }
  .capsule-footer .read-post { min-width:58px; padding:5px 7px; gap:4px; }
  .capsule-footer .capsule-read-full { display:none; }
  .capsule-footer .capsule-read-short { display:inline; }
  .capsule-footer .capsule-chip .icon { width:14px; height:14px; }
}
@media (pointer:coarse) {
  .capsule-footer :is(.capsule-views,.capsule-chip,.read-post) { min-height:44px; }
  .capsule-footer :is(.capsule-views,.capsule-chip,.read-post)::before { inset:6px 0; }
  .capsule-footer .comment-viewport { --comment-row-height:44px; }
  .capsule-footer .comment-strip-empty { min-height:44px; display:flex; align-items:center; }
}
