/* DUNO feed, new look (4 Dec 2026). Loaded from header.php after the themes and before duno-mobile.css.
   Styles only: posts are printed with the same HTML as before.
   To switch back: remove the feed-v2.css line in header.php. */

/* ---------- the post card ---------- */
body .card.post.post { position: relative; padding: 0; margin: 0 0 14px; border: 0; border-radius: 16px; background: var(--card); overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 20, 25, .04), 0 8px 24px rgba(15, 20, 25, .05); transition: box-shadow .2s ease; }
[data-theme="dark"] body .card.post.post { box-shadow: none; border: 1px solid var(--line); }
@media (hover: hover) { body .card.post.post:hover { box-shadow: 0 1px 2px rgba(15, 20, 25, .05), 0 12px 32px rgba(15, 20, 25, .08); } }

/* header: photo, name, one quiet line under it */
body .post .post-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 16px 16px 0; margin: 0; }
body .post .post-head { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; margin: 0; padding: 0; }
body .post .post-head .post-av { flex: none; position: relative; display: block; line-height: 0; }
body .post .post-head .post-av .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--field); }
body .post .post-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
body .post .post-line1 { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; min-width: 0; line-height: 1.25; }
body .post .post-author { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
body .post .post-author:hover { text-decoration: underline; }
body .post .lvl-chip { padding: 1px 7px; border: 0; border-radius: 999px; background: var(--field); color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .01em; }
body .post .post-in { color: var(--faint); font-size: .82rem; }
body .post .group-tag { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--nc, var(--brand)) 11%, var(--card)); color: var(--nc, var(--brand)) !important;
  font-size: .78rem; font-weight: 700; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .post .post-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font-size: .82rem; line-height: 1.3; color: var(--muted); min-width: 0; }
body .post .post-sub .headline { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .post .post-sub .sep { color: var(--faint); }
body .post .post-sub a { color: inherit; }
body .post .post-views { display: inline-flex; align-items: center; gap: 4px; }
body .post .post-top > .post-menu > summary { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); margin: -4px -6px 0 0; }
body .post .post-top > .post-menu > summary:hover { background: var(--hover); color: var(--ink); }

/* the words */
body .post .post-body { margin: 0; padding: 12px 16px 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
body .post .post-body a, body .post .post-body .hashtag { color: var(--brand); font-weight: 600; text-decoration: none; }
body .post .post-body a:hover { text-decoration: underline; }

/* photos, videos, link cards, reposts: rounded, inside the card */
body .post .post-image, body .post .post-video, body .post .video-wrap { display: block; margin: 12px 16px 0; border-radius: 12px; overflow: hidden; background: var(--field); line-height: 0; }
body .post .post-gallery { margin: 12px 16px 0; border-radius: 16px; overflow: hidden; gap: 3px; line-height: 0; }
body .post .post-gallery .pg-item img { width: 100%; height: 100%; object-fit: cover; }
body .post .post-image img { width: 100%; height: auto; max-height: 560px; object-fit: cover; display: block; border-radius: 0; margin: 0; }
body .post .link-card { display: flex; flex-direction: column; margin: 12px 16px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--soft, var(--card)); color: var(--ink); text-decoration: none !important; transition: border-color .15s ease; }
body .post .link-card:hover { border-color: var(--brand); }
body .post .link-card .lc-img { display: block; aspect-ratio: 1.91 / 1; background: var(--field); line-height: 0; }
body .post .link-card .lc-img { width: 100% !important; height: auto !important; max-width: none; flex: none; }
body .post .link-card .lc-img img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; display: block; border-radius: 0; }
body .post .link-card .lc-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; min-width: 0; }
body .post .link-card .lc-site { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
body .post .link-card .lc-title { font-size: .96rem; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body .post .repost-embed { margin: 12px 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft, transparent); }
body .post .repost-embed .post-head { gap: 10px; }
body .post .repost-embed .post-av .avatar { width: 32px; height: 32px; }
body .post .repost-embed .post-body { padding: 8px 0 0; font-size: .96rem; }
body .post .repost-embed .post-image { margin: 10px 0 0; }
body .post .repost-embed .repost-open { display: inline-block; margin-top: 8px; font-size: .84rem; font-weight: 650; }

/* polls */
body .post .poll { margin: 12px 16px 0; display: grid; gap: 8px; }
body .post .poll-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; font-weight: 600; cursor: pointer; }
body .post .poll-opt.result { cursor: default; border-color: transparent; background: var(--field); }
body .post .poll-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--brand) 20%, transparent); border-radius: 14px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
body .post .poll-label, body .post .poll-pct { position: relative; }
body .post .poll-pct { font-weight: 800; font-variant-numeric: tabular-nums; }
body .post .poll-foot { margin-top: 2px; }

/* actions: soft pills with their numbers */
body .post .post-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 8px; margin: 14px 16px 0; padding: 0 0 14px; border: 0; }
body .post .post-vote, body .post .post-vote:has(.pv-up.on) { display: inline-flex; align-items: center; gap: 0; height: 38px; padding: 0 3px; margin: 0; border: 0; border-radius: 999px; background: var(--field); }
body .post .post-vote .pv-btn { width: 36px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; transition: transform .1s ease, background-color .15s ease, color .15s ease; }
body .post .post-vote .pv-btn:hover { background: var(--press); }
body .post .post-vote .pv-btn:active { transform: scale(.86); }
body .post .post-vote .pv-btn svg { width: 19px; height: 19px; }
body .post .post-vote .pv-score { min-width: 16px; padding: 0 2px; text-align: center; font-size: .88rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
body .post .post-vote:has(.pv-up.on) { background: color-mix(in srgb, #ff3366 12%, var(--card)); }
body .post .post-vote .pv-up.on, body .post .post-vote .pv-up.on:hover { color: #ff3366; background: transparent; }
body .post .post-vote:has(.pv-up.on) .pv-score { color: #e11d48; }
body .post .post-vote:has(.pv-down.on) { background: color-mix(in srgb, #6a5cff 13%, var(--card)); }
body .post .post-vote .pv-down.on { color: #6a5cff; background: transparent; }
body .post .post-actions .btn-comment, body .post .post-actions .btn-repost, body .post .post-actions .btn-share, body .post .post-actions .btn-save, body .post .post-actions .btn-react {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-width: 38px; height: 38px; min-height: 38px; padding: 0 14px; margin: 0; flex: 0 0 auto;
  border: 0 !important; border-radius: 999px !important; background: var(--field) !important; color: var(--ink-2) !important; font: inherit; font-size: .88rem !important; font-weight: 650 !important; text-decoration: none !important; cursor: pointer; transition: background-color .15s ease, transform .1s ease, color .15s ease; }
body .post .post-actions .btn-comment:hover, body .post .post-actions .btn-repost:hover, body .post .post-actions .btn-share:hover, body .post .post-actions .btn-save:hover { background: var(--press) !important; color: var(--ink) !important; }
body .post .post-actions .btn-comment:active, body .post .post-actions .btn-repost:active, body .post .post-actions .btn-share:active, body .post .post-actions .btn-save:active { transform: scale(.95); }
body .post .post-actions svg { width: 19px; height: 19px; flex: none; }
body .post .post-actions .act-n { font-weight: 800; font-variant-numeric: tabular-nums; }
body .post .post-actions .btn-share { margin-left: auto; }
body .post .post-actions .btn-share span, body .post .post-actions .btn-save span, body .post .post-actions .btn-repost span { display: none; }
body .post .post-actions .btn-share, body .post .post-actions .btn-save, body .post .post-actions .btn-repost { padding: 0; width: 38px; }
body .post .post-actions .btn-repost:has(.act-n), body .post .post-actions .btn-share:has(.act-n) { width: auto; padding: 0 12px; }
body .post .post-actions .btn-save.active { color: var(--brand) !important; background: var(--brand-50) !important; }
body .post .post-actions .btn-repost.active { color: #0e9f6e !important; background: color-mix(in srgb, #0e9f6e 12%, var(--card)) !important; }

/* who liked it */
body .post .post-stats, body .post .post-actions + .post-stats { display: flex; align-items: center; gap: 8px; margin: -4px 0 0; padding: 0 16px 12px; font-size: .82rem; color: var(--muted); }
body .post .post-stats button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
body .post .post-stats button:hover .stat-txt { text-decoration: underline; color: var(--ink); }
body .post .post-stats .pv-faces { display: inline-flex; }
body .post .post-stats .pv-faces .avatar { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); margin-left: -8px; object-fit: cover; }
body .post .post-stats .pv-faces .avatar:first-child { margin-left: 0; }
body .post .post-stats .sh { display: none; }                                   /* the heart is in the button above */
body .post .post-stats .btn-voters.has-liked .stat-txt { display: none; }        /* "+8 points" is replaced by "Liked by amara and 7 others" (duno-ui.js) */
body .post .post-stats .stat-liked { color: var(--muted); }
body .post .post-stats .stat-liked b { color: var(--ink); font-weight: 650; }
body .post .post-stats button:hover .stat-liked { color: var(--ink); }
body .post .post-stats .btn-voters.down { display: none; }                       /* a score below zero is shown in the button only */
body .post .post-stats:not(:has(.btn-voters.up, .btn-reposters)) { display: none; }

/* comments under a post */
body .post .post-comments-preview { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--line-2); background: color-mix(in srgb, var(--soft, var(--field)) 60%, var(--card)); }
body .post .post-comments-preview .pc-top { margin: 0 0 8px; }
body .post .post-comments-preview .pc-more { font-size: .86rem; font-weight: 650; color: var(--muted); text-decoration: none; }
body .post .post-comments-preview .pc-more:hover { color: var(--brand); }
body .post .comment { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; padding: 0; }
body .post .comment .comment-av .avatar { width: 32px; height: 32px; border-radius: 50%; }
body .post .comment-main { min-width: 0; flex: 1 1 auto; }
body .post .comment-bubble { display: inline-block; max-width: 100%; padding: 8px 12px 9px; border: 0; border-radius: 4px 16px 16px 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); }
body .post .comment-head { display: flex; align-items: center; gap: 6px; margin: 0 0 1px; }
body .post .comment-head .post-author { font-size: .88rem; }
body .post .comment-text { font-size: .94rem; line-height: 1.4; overflow-wrap: anywhere; }
body .post .comment-actions { display: flex; align-items: center; gap: 12px; margin: 3px 0 0 4px; font-size: .76rem; color: var(--muted); }
body .post .held-note { margin: 12px 16px 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, #e8a100 12%, var(--card)); font-size: .86rem; }

/* a pinned "From duno" post keeps its flag */
body .founder-feature { border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
body .founder-feature .card.post.post { margin-bottom: 0; box-shadow: none; }
body .founder-flag { padding: 10px 16px 0; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); display: flex; align-items: center; gap: 6px; }

/* ---------- the box you write in ---------- */
body.sx form.composer, body .card.composer { border: 0; border-radius: 16px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(15, 20, 25, .04), 0 8px 24px rgba(15, 20, 25, .05); }
body form.composer .composer-row textarea, body form.composer textarea { border-radius: 22px; background: var(--field); border: 1px solid transparent; }
body form.composer textarea:focus { background: var(--card); border-color: var(--brand); box-shadow: var(--ring); }

/* ---------- feed tabs: one calm bar that stays with you ---------- */
body.sx .tl > .main-col > .tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 999px; background: var(--card); box-shadow: 0 1px 2px rgba(15, 20, 25, .04), 0 4px 14px rgba(15, 20, 25, .04); overflow-x: auto; scrollbar-width: none; }
body.sx .tl > .main-col > .tabs::-webkit-scrollbar { display: none; }
body.sx .tl > .main-col > .tabs .tab { flex: 1 0 auto; justify-content: center; text-align: center; min-height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px !important; background: transparent; color: var(--muted); font-weight: 650; font-size: .92rem; }
body.sx .tl > .main-col > .tabs .tab:hover { color: var(--ink); background: var(--hover); }
body.sx .tl > .main-col > .tabs .tab.active, body.sx .tl > .main-col > .tabs .tab.active:hover { background: var(--ink); color: var(--card) !important; }

/* ---------- small cards around the feed ---------- */
body.sx .tl > .main-col > .card:not(.post):not(.composer), body.sx .sx-stories { border-radius: 16px; }
body .qotd, body .card.qotd { border: 0; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--card)), var(--card) 65%); }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body.sx .card.post.post, [data-theme="dark"] body.sx .card.post.post { margin: 0 10px 10px; border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 20, 25, .05), 0 4px 16px rgba(15, 20, 25, .05); }
  body.sx .founder-feature { margin: 0 10px 10px; }
  body.sx .founder-feature .card.post.post { margin: 0; }
  body.sx form.composer, body.sx .tl > .main-col > .composer, body.sx .sx-stories, body.sx .tl > .main-col > .card:not(.post), body.sx .pm-feed { margin: 0 10px 10px; border-radius: 16px; }
  body.sx .sx-stories { padding: 10px 0; }
  body.sx .tl > .main-col > .tabs { margin: 0 10px 10px; padding: 4px; position: sticky; top: calc(var(--header-h, 52px) + env(safe-area-inset-top, 0px) + 6px); z-index: 20; transition: top .22s ease; }
  html.nav-up body.sx .tl > .main-col > .tabs { top: 6px; }
  body.sx .tl > .main-col > .tabs .tab { flex: 0 0 auto; padding: 0 14px; }
  body .post .post-top { padding: 14px 14px 0; }
  body .post .post-body { padding: 10px 14px 0; font-size: 1rem; }
  body .post .post-image, body .post .post-gallery, body .post .post-video, body .post .video-wrap, body .post .link-card, body .post .repost-embed, body .post .poll { margin-left: 14px; margin-right: 14px; }
  body .post .post-actions { margin: 12px 14px 0; padding-bottom: 12px; gap: 6px; }
  body .post .post-actions .btn-comment span { display: none; }
  body .post .post-actions .btn-comment { padding: 0 12px; }
  body .post .post-stats, body .post .post-actions + .post-stats { padding: 0 14px 10px; }
  body .post .post-comments-preview { padding: 10px 14px 12px; }
  body .post .post-sub .headline { max-width: 52vw; }
}
