/* v11 — ghost mode, global giving, gifted checks + team logos, moving checkmarks, joy. */

/* ── moving checkmarks: the seal turns slowly under a still check, with a soft glint ── */
.mark .v-seal, .mark-org > path:first-of-type, .mark-founder > path:first-of-type { transform-box: fill-box; transform-origin: center; animation: seal-turn 9s linear infinite; }
.mark-founder > path:first-of-type { animation-duration: 14s; }
.mark { animation: mark-glint 3.6s ease-in-out infinite; }
.mark-plus { animation-delay: -1.2s; } .mark-org { animation-delay: -2.4s; }
@keyframes seal-turn { to { transform: rotate(360deg); } }
@keyframes mark-glint {
  0%, 70%, 100% { filter: none; transform: none; }
  80% { filter: brightness(1.35) drop-shadow(0 0 2px currentColor); transform: scale(1.12); }
  88% { filter: brightness(1.1); transform: scale(0.98); }
}
.mark-premium { color: #0f9d63; } .mark-plus { color: #7446ea; } .mark-org { color: #d9a21b; } .mark-founder { color: #e5a223; }
.mark .v-check { stroke-dasharray: 20; stroke-dashoffset: 0; animation: check-draw 3.6s ease-in-out infinite; }
@keyframes check-draw { 0%, 74% { stroke-dashoffset: 0; } 78% { stroke-dashoffset: 20; } 90%, 100% { stroke-dashoffset: 0; } }

/* ── ghost mode ────────────────────────────────────────── */
.avatar-ghost { display: inline-grid; place-items: center; border-radius: 50%; background: linear-gradient(150deg, #2b3340, #141b22); color: #e6ecea; flex: none; }
:root[data-theme="light"] .avatar-ghost, :root:not([data-theme]) .avatar-ghost { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.avatar-ghost svg { animation: ghost-float 3s ease-in-out infinite; }
@keyframes ghost-float { 50% { transform: translateY(-2px); } }
.post-author.is-ghost { cursor: default; }
.post-ghost-note, .ghost-note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: var(--r-m); background: color-mix(in srgb, #2b3340 10%, var(--sunk)); color: var(--ink-2); font-size: var(--t-xs); }
.ghost-note { margin-top: 8px; font-size: var(--t-s); }
.ghost-note svg, .post-ghost-note svg { flex: none; margin-top: 1px; }
.tool-ghost.is-on { background: #2b3340; color: #fff; }
.composer.is-ghost { border-color: color-mix(in srgb, #2b3340 50%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #2b3340 6%, var(--surface)), var(--surface)); }
.menu-note { display: flex; align-items: center; gap: 6px; padding: 6px 12px; }

/* ── giving in any currency ────────────────────────────── */
.funded-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border-radius: var(--r-m); background: var(--overlap-soft); color: var(--overlap); }
.support-form select, .ep-support select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; }
.need-nums .muted { font-weight: 400; }

/* ── gifted checks, teams, founder tools ──────────────── */
.perks { display: grid; gap: 12px; margin-bottom: 18px; }
.perks .section-title { margin: 6px 0 0; }
.perk { padding: 16px 18px; display: grid; gap: 10px; }
.perk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.perk-head .h3 { display: inline-flex; align-items: center; gap: 8px; }
.perk-row { display: flex; gap: 14px; align-items: flex-start; }
.perk-row > div { display: grid; gap: 4px; }
.perk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.perk-invite { border: 1px solid color-mix(in srgb, var(--marigold) 60%, var(--line-soft)); background: linear-gradient(140deg, var(--marigold-soft), var(--surface) 65%); }
.perk-founder { border: 1px solid color-mix(in srgb, var(--marigold) 45%, var(--line-soft)); background: linear-gradient(140deg, color-mix(in srgb, var(--cobalt) 8%, var(--surface)), var(--surface) 55%, color-mix(in srgb, var(--marigold) 10%, var(--surface))); }
.perk-list { display: grid; gap: 6px; }
.perk-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.perk-list li > span:not(.avatar):not(.seat) { display: grid; flex: 1; min-width: 0; }
.perk-empty { border: 1px dashed var(--line); border-radius: var(--r-m); padding: 8px 10px !important; }
.perk-empty > .small { flex: 1; }
.seat { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); color: var(--ink-3); }
.founder-form { display: grid; gap: 10px; justify-items: start; }
.founder-form .is-picked { border-color: var(--cobalt); color: var(--cobalt); }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; pointer-events: none; }
.radio-chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.radio-chip:has(input:focus-visible) { box-shadow: var(--focus); }
.pick-person .search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); }
.pick-person .search input { flex: 1; border: 0; min-height: 42px; background: none; outline: none; color: var(--ink); }
.pp-list { display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; }
.pp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: var(--r-m); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pp-row:hover { background: var(--sunk); }
.pp-row > span:not(.avatar) { display: grid; flex: 1; min-width: 0; }

/* team member: the organization's little logo next to their name */
.avatar-xs { width: 16px; height: 16px; font-size: 0.45rem; border-radius: 4px; }
.aff-mark { display: inline-flex; margin-left: 4px; vertical-align: -2px; }
.aff-mark .avatar { border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.works-at { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; padding: 4px 12px 4px 4px; border-radius: var(--r-pill); background: var(--marigold-soft); color: var(--ink); text-decoration: none; font-size: var(--t-s); }
.works-at .avatar { border-radius: 8px; width: 26px; height: 26px; font-size: 0.6rem; }
.org-team { padding: 14px 18px; margin-top: 14px; display: grid; gap: 10px; }
.org-team-list { display: flex; flex-wrap: wrap; gap: 14px; }
.org-team-list a { display: grid; justify-items: center; gap: 4px; color: var(--ink); text-decoration: none; }

/* ── joy: reactions, confetti, streaks, caught up, calm ── */
.reactions-row { display: flex; flex-wrap: wrap; gap: 6px; }
.react-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: var(--paper); font: inherit; font-size: var(--t-s); cursor: pointer; transition: transform 160ms var(--ease-spring, ease), border-color var(--dur); }
.react-chip span { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.react-chip:hover { transform: translateY(-1px) scale(1.05); }
.react-chip.is-mine { border-color: var(--cobalt); background: var(--cobalt-soft); }
.react-wrap { position: relative; display: inline-flex; }
.react-pop { position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 20; display: flex; gap: 2px; padding: 5px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-2); transform: translateX(-50%); animation: pop-in 220ms var(--ease-spring, ease) both; }
.react-pop[hidden] { display: none; }
.react-pop button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 1.35rem; cursor: pointer; transition: transform 160ms var(--ease-spring, ease); }
.react-pop button:hover, .react-pop button:focus-visible { transform: scale(1.3) translateY(-3px); background: var(--sunk); }
@keyframes pop-in { from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.85); } to { opacity: 1; transform: translateX(-50%); } }
.confetti-layer { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.confetti-layer i { position: absolute; display: block; }
.float-emoji { position: fixed; z-index: 200; pointer-events: none; font-size: 1.6rem; }
.streak-card { background: linear-gradient(150deg, color-mix(in srgb, #ff7a2e 14%, var(--surface)), var(--surface) 70%); }
.streak-flame { display: inline-block; animation: flame 1.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes flame { 50% { transform: scale(1.15) rotate(-6deg); } }
.streak-fact { color: #d4621b; }
.caught-up { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 18px; margin-top: 4px; }
.caught-up-art { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: #fff; background: var(--grad-brand); animation: pop 520ms var(--ease-spring, ease) both; }
.caught-up-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (max-width: 720px) { .post-list > .caught-up { margin: 12px 16px; } }

/* Calm mode: no scores. Likes, views, followers and reaction counts disappear. */
:root[data-calm] .post-actions .act > span, :root[data-calm] .react-chip span, :root[data-calm] .post-stamp,
:root[data-calm] .profile-facts li:has(strong):not(.streak-fact), :root[data-calm] [data-views] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .mark, .mark .v-seal, .mark-org > path, .mark-founder > path, .mark .v-check, .avatar-ghost svg, .streak-flame { animation: none !important; }
}
:root[data-motion="reduce"] .mark, :root[data-motion="reduce"] .mark * { animation: none !important; }

/* founder of several organizations */
.owns-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.owns-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--t-s); transition: transform 160ms var(--ease-spring, ease), border-color var(--dur); }
.owns-chip:hover { transform: translateY(-1px); border-color: var(--cobalt); }
.owns-chip > span:not(.avatar) { display: grid; line-height: 1.2; }
.owns-chip .avatar { border-radius: 8px; width: 26px; height: 26px; }
.founded-by { background: var(--cobalt-soft, var(--sunk)); }
.founded-by .avatar { border-radius: 50%; }
.works-at { width: fit-content; max-width: 100%; justify-self: start; align-self: flex-start; }

/* profile heading: org logo tag beside the name */
.profile-name .aff-m { margin-left: 8px; vertical-align: 0.05em; }
.profile-name .aff-m .avatar { width: 26px; height: 26px; border-radius: 7px; }
.owns-label { font-size: var(--t-s); color: var(--ink-2); font-weight: 600; }
/* people at an organization */
.org-team-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.org-team-head .h3 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.org-team-list { display: grid !important; gap: 4px; }
.org-person { display: flex !important; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: var(--r-m); color: var(--ink); text-decoration: none; }
.org-person:hover { background: var(--sunk); }
.org-person > span:not(.avatar):not(.role-tag) { display: grid; flex: 1; min-width: 0; justify-items: start; }
.role-tag { flex: none; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; background: var(--sunk); color: var(--ink-2); }
.role-founder { background: var(--marigold-soft); color: color-mix(in srgb, var(--marigold) 70%, var(--ink)); }
.role-cofounder { background: var(--cobalt-soft); color: var(--cobalt); }
.role-select { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-s); }
.checkout-org .label { font-weight: 600; font-size: var(--t-s); }
