/* Feed post spacing on an 8-point grid. Loaded last, so it settles the post and news-card
   spacing that styles.css, workspace.css and compact-system.css each set differently.

   One left edge: everything in a post starts 16px in on phones and 24px in on wider screens.
   Values that look odd (2px, -12px, 6px) make up for invisible space inside a 44px tap target
   or a 24px icon, so the gap you see matches the one named in the comment. */

#app { --post-side: 16px; }
@media (min-width: 768px) { #app { --post-side: 24px; } }

/* Post header: 16px above (after the divider), avatar → name 12px, header → image 12px. */
#app .post-head { min-height: 0; padding: 16px calc(var(--post-side) - 8px) 12px var(--post-side); gap: 12px; }
#app .post-who { gap: 2px; }
/* The menu button and Track chip keep their tap size but don't make the header taller than the avatar. */
#app .post-head > :is(.icon-btn, .track-chip) { margin-block: -8px; }

/* Photos and news squares sit on the same 16/24px edge as the text. */
#app .post-media { margin: 0 var(--post-side); border-radius: 12px; }
#app .market-news-card { margin: 0 var(--post-side) 2px; }
#app .market-news-card.has-square { margin-bottom: 2px; }
#app .news-published-square { display: block; width: 100%; height: auto; border-radius: 12px; }

/* Date / Read on Mint row: 16px under the image's source line (the square keeps ~14px of
   its own margin below that line), and 12px above the action icons. The link keeps a 44px
   tap target without pushing the row apart. */
#app .market-news-footer { gap: 8px 16px; }
#app .has-square .market-news-footer { padding: 2px 0 0; }
#app .market-news-footer a { min-height: 44px; margin-block: -12px; }

/* Text-only news card: source tag → headline 8px, headline → date row 16px.
   Headline 22px on phones, 24px wider, line height 1.25, at most 3 lines. */
#app .market-news-card:not(.has-square) { padding: 16px; }
#app .market-news-card:not(.has-square) h3 {
  margin: 8px 0 16px; font-size: 22px; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
@media (min-width: 768px) { #app .market-news-card:not(.has-square) h3 { font-size: 24px; } }

/* Body and actions. Icons line up with the 16/24px edge (each button has 4px of side padding).
   Icon → count 4px; between icon groups 20px (12px gap + 4px padding either side). */
#app .post-body { padding: 0 var(--post-side) 6px; gap: 8px; }
#app .post .post-body { padding: 0 var(--post-side) 6px; gap: 8px; }
#app .post-actions { gap: 12px; margin: 0 0 0 -4px; padding: 0; }
#app .post .post-actions { gap: 12px; margin: 0 0 0 -4px; padding: 0; }
#app .post-actions .icon-action { padding: 8px 4px; gap: 4px; }
#app .post-actions .save-post { margin-right: -4px; }
#app .post:not(:has(.post-media)) .post-text { margin-top: 0; }

/* End of post → next post: 16px (the icons' own 10px plus 6px), the divider, then 16px. */
#app .post-list { gap: 0; }
#app .card.post { margin: 0; border-width: 0 0 1px; border-style: solid; border-color: var(--border); border-radius: 0; }
