/* The community (docs/posts.md), laid out like a social timeline (the shell: x.css): post cards between hairlines,
   a post's page with its version in large type and tabs below, profiles with a banner, the composer, search and
   notifications. Every page fills the middle column; its header is .x-head. */

.ps-page [hidden], .st-bar [hidden] { display: none !important; }
.ps-pad { padding: 12px 16px; }
.ps-sec-h { padding: 12px 16px; font-size: 20px; font-weight: 800; line-height: 24px; }
.ps-tabs-wrap { border-bottom: 1px solid var(--line); }
.ps-page .empty { margin: 16px; background: none; border: 0; font-size: 15px; padding: 32px 16px; }
.ps-page > .notice { margin: 12px 16px; }

/* the older column wrappers some pages still use (they fill the column now) */
.ps-col { width: 100%; min-width: 0; display: flex; flex-direction: column; }
.ps-cols { display: block; }
.ps-rail { display: flex; flex-direction: column; }
.ps-h1 { font-size: 20px; font-weight: 700; padding: 12px 16px; }

/* buttons in the timeline's manner */
.btn-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--s3); color: var(--ink); }
.btn-outline:hover { background: var(--hover); }
:root[data-theme="light"] .btn-outline { box-shadow: inset 0 0 0 1px #cfd9de; }
.ps-follow { height: 34px; padding: 0 16px; font-size: 15px; font-weight: 700; border: 0; border-radius: 999px; cursor: pointer; }
.ps-follow[aria-pressed="false"] { background: var(--ink); color: var(--canvas); }
.ps-follow[aria-pressed="false"]:hover { filter: brightness(0.9); background: var(--ink); color: var(--canvas); }
.ps-follow[aria-pressed="true"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--s3); }
.ps-follow[aria-pressed="true"]:hover { color: var(--crit); background: var(--crit-wash); box-shadow: inset 0 0 0 1px var(--crit); }
.ps-more-btn { width: 34px; height: 34px; margin: -7px -8px -7px 0; flex: none; border: 0; border-radius: 999px; background: none; color: var(--ink-3); display: inline-grid; place-items: center; cursor: pointer; }
.ps-more-btn svg { width: 18px; height: 18px; }
.ps-more-btn:hover { background: var(--reply-wash); color: var(--reply); }
.ps-round { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--s3); color: var(--ink); }
.ps-round[aria-pressed="true"] { color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* avatars */
.ps-avatar { width: 40px; height: 40px; font-size: 16px; background: var(--accent-wash); color: var(--accent-ink); }
.ps-avatar.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.ps-avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.ps-avatar-xl { width: 134px; height: 134px; font-size: 52px; box-shadow: 0 0 0 4px var(--canvas); background: var(--s2); color: var(--accent-ink); }

/* ------------------------------------------------------------------ the feed */
.ps-feed .x-head { border-bottom: 1px solid var(--line); }
.ps-newpill { position: sticky; top: calc(var(--top-h) + 64px); z-index: 11; display: block; margin: 8px auto -44px; border: 0; border-radius: 999px; padding: 8px 18px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
.ps-intro { padding: 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ps-intro h2 { font-size: 20px; font-weight: 800; }
.ps-intro .btn { margin-top: 6px; }
.ps-list { display: flex; flex-direction: column; }
.ps-more { border-bottom: 0; }
.ps-loadmore { display: block; width: 100%; padding: 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--accent-ink); font: inherit; cursor: pointer; }
.ps-loadmore:hover { background: var(--hover); }
.ps-end { text-align: center; padding: 24px 16px 40px; }
.ps-empty { margin-top: 12px; }

/* the composer: avatar, a large borderless box, who can see it, the tools and the button */
.ps-cp { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 16px 8px; border-bottom: 1px solid var(--line); }
.ps-cp-main { min-width: 0; display: flex; flex-direction: column; }
.ps-cp-title { width: 100%; border: 0; outline: none; background: none; resize: none; overflow: hidden; color: var(--ink); font: inherit; font-size: 20px; line-height: 28px; padding: 6px 0; min-height: 40px; }
.ps-cp-title::placeholder { color: var(--ink-3); }
.ps-cp.is-big .ps-cp-title { min-height: 96px; }
.ps-cp-topicrow { display: flex; align-items: center; gap: 4px; padding: 2px 0 6px; }
.ps-cp-topic { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--accent-ink); font: inherit; padding: 4px 0; }
.ps-cp-topic::placeholder { color: var(--ink-4); }
.ps-cp-hash { color: var(--accent-ink); font-weight: 700; font-size: 17px; line-height: 1; }
.ps-cp-visline { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 2px 0 10px -6px; padding: 2px 6px; border-radius: 999px; color: var(--accent-ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.ps-cp-visline:hover { background: var(--accent-wash); }
.ps-cp-visline svg { width: 16px; height: 16px; stroke-width: 2; }
.ps-cp-vis { appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; outline: none; }
.ps-cp-vis option { color: var(--ink); background: var(--s1); }
.ps-cp-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.ps-cp-tools { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.ps-cp-tool { width: 34px; height: 34px; border-radius: 999px; border: 0; background: none; display: inline-grid; place-items: center; color: var(--accent-ink); cursor: pointer; }
.ps-cp-tool:hover { background: var(--accent-wash); }
.ps-cp-tool svg { width: 20px; height: 20px; }
.ps-cp-post { height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--canvas); font: inherit; font-weight: 700; cursor: pointer; }
.ps-cp-post:hover { filter: brightness(0.9); }
.ps-cp-post[disabled] { opacity: 0.5; cursor: default; }
.ps-cp .mk-form-err:empty { display: none; }
.ps-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; counter-reset: step; flex-wrap: wrap; }
.ps-steps li { counter-increment: step; font-size: 13px; color: var(--ink-3); padding: 6px 12px; border-radius: 999px; background: var(--s2); }
.ps-steps li::before { content: counter(step) ". "; }
.ps-steps li.is-current { background: var(--accent-wash); color: var(--accent-ink); font-weight: 700; }
.ps-steps li.is-done { color: var(--ink-2); }
.ps-compose .ps-pad.stack { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.ps-wf-new { align-items: flex-start; gap: 8px; }
.ps-wfs { display: flex; flex-direction: column; }
.ps-wf { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ps-wf-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--s2); display: grid; place-items: center; color: var(--accent-ink); flex: none; }
.ps-wf-ic svg { width: 20px; height: 20px; }
.ps-wf-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ------------------------------------------------------------------ a post card */
.ps-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding: 12px 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--t-1); }
.ps-card:hover { background: var(--hover); }
.ps-ctx { grid-column: 1 / -1; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center; margin: -2px 0 6px; }
.ps-ctx-ic { justify-self: end; color: var(--accent-ink); display: inline-grid; }
.ps-ctx-ic svg { width: 16px; height: 16px; stroke-width: 2; }
.ps-ctx-text { justify-self: start; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.ps-card-av { align-self: start; }
.ps-card-main { min-width: 0; display: flex; flex-direction: column; }
.ps-card-top { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.ps-byline { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 4px; flex-wrap: nowrap; font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; }
.ps-name { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; min-width: 2em; max-width: 65%; flex: 0 0 auto; }
.ps-name:hover { text-decoration: underline; }
.ps-handle, .ps-when, .ps-dot { color: var(--ink-3); }
.ps-handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 100 auto; }
.ps-when { flex: none; }
.ps-when:hover { text-decoration: underline; }
.ps-card-link { display: flex; flex-direction: column; gap: 2px; color: inherit; margin-top: 2px; }
.ps-title { font-size: 15px; font-weight: 700; line-height: 20px; }
.ps-conclusion { font-size: 15px; line-height: 20px; color: var(--ink); overflow-wrap: anywhere; }
:lang(zh) .ps-conclusion, :lang(zh) .ps-title { line-height: 22px; }

/* the latest version, boxed like an embedded post */
.ps-latest { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 16px; color: inherit; transition: background var(--t-1); }
.ps-latest:hover { background: var(--hover); }
.ps-latest-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ps-change { font-size: 14px; line-height: 19px; color: var(--ink-2); }
.ps-latest-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; color: var(--ink-3); }
.ps-seq { background: var(--s2); color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 700; }
.ps-state { font-size: 12px; font-weight: 700; }
.ps-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; display: inline-block; vertical-align: 1px; }
.ps-state[data-state="updating"]::before { animation: ps-pulse 1.4s ease-in-out infinite; }
@keyframes ps-pulse { 50% { opacity: 0.25; } }

/* the action row: comments, versions, like, send data … bookmark, share */
.ps-actions { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 4px -8px 0; max-width: calc(100% + 16px); }
.ps-act { display: inline-flex; align-items: center; gap: 2px; height: 34px; min-width: 34px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; transition: color var(--t-1), background var(--t-1); }
.ps-act svg { width: 19px; height: 19px; }
.ps-act .num { min-width: 1ch; padding-left: 2px; }
.ps-act-gap { width: 50px; }
.ps-act-right { display: inline-flex; align-items: center; }
.ps-reply:hover { color: var(--reply); background: var(--reply-wash); }
.ps-vers:hover { color: var(--ver); background: var(--ver-wash); }
.ps-like:hover, .ps-like[aria-pressed="true"] { color: var(--like); }
.ps-like:hover { background: var(--like-wash); }
.ps-like[aria-pressed="true"] svg { fill: currentColor; }
.ps-contrib:hover { color: var(--accent-ink); background: var(--accent-wash); }
.ps-mark:hover, .ps-share:hover, .ps-sub:hover { color: var(--reply); background: var(--reply-wash); }
.ps-mark[aria-pressed="true"] { color: var(--reply); }
.ps-mark[aria-pressed="true"] svg { fill: currentColor; }
.ps-sub[aria-pressed="true"] { color: var(--accent-ink); }

/* ------------------------------------------------------------------ a post's page */
.ps-detail { padding: 12px 16px 0; }
.ps-d-top { display: flex; align-items: center; gap: 8px; }
.ps-d-top > a:first-child { margin-right: 4px; }
.ps-d-names { display: flex; flex-direction: column; min-width: 0; line-height: 20px; }
.ps-d-names > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: none; }
.ps-ptitle { font-size: 23px; line-height: 28px; font-weight: 800; letter-spacing: -0.01em; margin-top: 12px; overflow-wrap: anywhere; }
.ps-d-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.ps-topic { color: var(--accent-ink); font-size: 15px; }
.ps-version { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.ps-big { font-size: 17px; line-height: 24px; overflow-wrap: anywhere; }
:lang(zh) .ps-big { line-height: 27px; }
.ps-sec { display: flex; flex-direction: column; gap: 10px; }
.ps-sec-title { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.ps-body { line-height: 1.6; font-size: 15px; }
.ps-chart { border: 1px solid var(--line-2); border-radius: 16px; padding: 12px; min-height: 120px; }
.ps-actions-lg { margin: 0; padding: 4px 0; border-bottom: 1px solid var(--line); max-width: none; }
.ps-actions-lg .ps-act svg { width: 22px; height: 22px; }
.ps-detail + .ps-tabs-wrap { margin-top: 0; }


/* comments: the reply box, then replies like posts */
.ps-comments { gap: 0; }
.ps-composer { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ps-composer-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ps-compose-input { width: 100%; border: 0; outline: none; background: none; resize: none; overflow: hidden; color: var(--ink); font: inherit; font-size: 17px; line-height: 24px; padding: 8px 0; min-height: 40px; }
.ps-compose-input::placeholder { color: var(--ink-3); }
.ps-composer-bar { display: flex; justify-content: flex-end; }
.ps-replying { color: var(--accent-ink); }
.ps-clist { display: flex; flex-direction: column; }
.ps-thread { border-bottom: 1px solid var(--line); }
.ps-comment { padding: 12px 16px 4px; }
.ps-comment-in { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.ps-comment-body { white-space: pre-wrap; line-height: 20px; margin: 2px 0; overflow-wrap: anywhere; }
.ps-comment-acts { display: flex; gap: 8px; margin-left: -8px; }
.ps-comment-acts .ps-act span { font-size: 13px; }
.ps-del:hover { color: var(--crit); background: var(--crit-wash); }
.ps-quote { color: var(--accent-ink); }

/* the author's panel */
.ps-manage-wrap { display: flex; flex-direction: column; }
.ps-manage { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
/* a post with nothing published yet, to its author: what the last update found and the ways on */
.ps-draft { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 16px; }
.ps-draft p { margin: 0; }
.ps-draft-acts { justify-content: center; margin-top: 8px; }
.ps-m-sec { border-top: 1px solid var(--line); padding-top: 12px; }
.ps-manage > .ps-m-sec:first-of-type { border-top: 0; padding-top: 0; }
.ps-runs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ps-manage .label .select { margin-top: 6px; width: 100%; }
.ps-edit { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ps-edit summary { cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.ps-edit .stack { margin-top: 8px; }

/* ------------------------------------------------------------------ people */
.ps-banner { height: 200px; background: linear-gradient(120deg, var(--accent-wash), rgba(63, 213, 174, 0.35) 45%, var(--s2)); }
.ps-person { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.ps-person-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: -79px; min-height: 79px; }
.ps-person-top > :last-child { margin-top: 79px; display: flex; gap: 8px; align-items: center; }
.ps-person-top .ps-more-btn { width: 34px; height: 34px; margin: 0; box-shadow: inset 0 0 0 1px var(--s3); color: var(--ink); }
.ps-person-names { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ps-person-name { font-size: 20px; font-weight: 800; line-height: 24px; }
.ps-follows-you { font-size: 12px; background: var(--s2); color: var(--ink-3); }
.ps-bio { line-height: 20px; }
.ps-person-meta { display: flex; align-items: center; gap: 4px; color: var(--ink-3); }
.ps-person-meta svg { width: 18px; height: 18px; }
.ps-person-counts { display: flex; gap: 20px; color: var(--ink-3); }
.ps-count strong { color: var(--ink); font-weight: 700; margin-right: 2px; }
:lang(zh) .ps-count strong { margin: 0 2px; }
.ps-mylinks { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.ps-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--s3); font-size: 14px; font-weight: 600; }
.ps-chip:hover { background: var(--hover); }
.ps-chip svg { width: 16px; height: 16px; }
.ps-profile .ps-tabs-wrap { margin-top: 4px; }
.ps-people { display: flex; flex-direction: column; }
.ps-personrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; }
.ps-personrow:hover { background: var(--hover); }
.ps-personrow-names { display: flex; flex-direction: column; min-width: 0; line-height: 20px; }
.ps-personrow-names > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-personrow-bio { color: var(--ink); white-space: normal !important; }

/* ------------------------------------------------------------------ search, notifications, archive */
.ps-search-row { padding: 6px 16px; }
.ps-searchbar { flex: 1; }
.ps-explore-sec { border-bottom: 1px solid var(--line); }
.ps-explore-sec .x-box-row { padding: 12px 16px; }
.ps-notifs { list-style: none; padding: 0; margin: 0; }
.ps-notif-in { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; }
a.ps-notif-in:hover { background: var(--hover); }
.ps-notif.is-unread .ps-notif-in { background: var(--accent-wash); }
.ps-notif-ic { justify-self: end; color: var(--accent-ink); }
.ps-notif-ic svg { width: 26px; height: 26px; stroke-width: 1.8; }
.ps-notif-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 20px; }
.ps-archive { display: flex; flex-direction: column; }
.ps-archive-link { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); color: inherit; }
.ps-archive-link:hover { background: var(--hover); }
.ps-archive-link svg { width: 20px; height: 20px; color: var(--ink-3); }

@media (max-width: 700px) {
  .ps-feed > .ps-cp { display: none; }
  .ps-banner { height: 130px; }
  .ps-avatar-xl { width: 84px; height: 84px; font-size: 34px; }
  .ps-person-top { margin-top: -50px; min-height: 50px; }
  .ps-person-top > :last-child { margin-top: 50px; }
  .ps-act-gap { width: 24px; }
  .ps-actions { gap: 0; }
}
.ps-tabs-wrap { scroll-margin-top: calc(var(--top-h) + 53px); }
@media (min-width: 1001px) { .ps-explore-who { display: none; } }

/* ------------------------------------------------------------------ reading a version: Axon's own pieces */


/* reading an older version, or a newer one has come: a slim bar under the header that stays */
.ps-old, .ps-progress { position: sticky; top: calc(var(--top-h) + 54px); z-index: 9; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 14px; animation: ps-drop 0.28s var(--ease) both; }
.ps-old-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); }
.ps-old-ic svg { width: 17px; height: 17px; }
.ps-old-text { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.ps-old-text strong { font-size: 14px; }
.ps-old-text span { font-size: 13px; color: var(--ink-3); }
.ps-old-acts { flex: none; display: inline-flex; gap: 8px; }
.ps-old-btn { flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background var(--t-1), transform 0.12s; }
.ps-old-btn:hover { background: var(--hover); }
.ps-old-btn svg { width: 15px; height: 15px; margin-right: 5px; }
.ps-old-btn.is-primary { background: var(--ink); color: var(--canvas); box-shadow: none; }
.ps-old-btn.is-primary:hover { filter: brightness(0.9); }
.ps-progress { background: color-mix(in srgb, var(--accent) 12%, var(--canvas)); }
.ps-live { flex: none; position: relative; width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; background: var(--accent); }
.ps-live::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); animation: ps-ring 1.6s var(--ease) infinite; }
@keyframes ps-ring { from { transform: scale(0.5); opacity: 0.9; } to { transform: scale(1.4); opacity: 0; } }
@keyframes ps-drop { from { transform: translateY(-8px); opacity: 0; } }



/* a long text, folded */
.ps-foldbox { display: flex; flex-direction: column; gap: 6px; }
.ps-fold { --fold-h: 320px; position: relative; }
.ps-fold.is-folded { max-height: var(--fold-h); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.ps-fold-bar { display: flex; align-items: baseline; gap: 10px; }
.ps-fold-btn { padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ps-fold-btn:hover { text-decoration: underline; }
.ps-fold-min { font-size: 13px; color: var(--ink-3); }
.ps-comment .ps-fold { --fold-h: 120px; }
.ps-comment .ps-fold-btn { font-size: 14px; }

/* the body reads like an article: a little more air, headings that stand apart */
.ps-body { font-size: 16px; line-height: 1.65; color: var(--ink); }
.ps-body h1, .ps-body h2, .ps-body h3 { font-size: 17px; line-height: 24px; font-weight: 800; margin: 18px 0 6px; }
.ps-body > :first-child, .ps-body > div > :first-child { margin-top: 0; }
.ps-body p { margin: 0 0 10px; }
.ps-body ul, .ps-body ol { margin: 0 0 10px; padding-left: 22px; }
.ps-body li { margin: 3px 0; }
.ps-body li::marker { color: var(--accent-ink); }
.ps-body strong { font-weight: 700; }
.ps-body a { color: var(--accent-ink); }
:lang(zh) .ps-body { line-height: 1.8; }

/* sources: numbered rows in one box, the first three shown */
.ps-sources .ps-sec-title { display: flex; align-items: center; gap: 6px; }
.ps-sec-n { padding: 0 7px; border-radius: 999px; background: var(--s2); color: var(--ink-2); font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.ps-evidence { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; }
.ps-ev { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 10px 12px; transition: background var(--t-1); }
.ps-ev + .ps-ev { border-top: 1px solid var(--line); }
.ps-ev:hover { background: var(--hover); }
.ps-ev-n { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--s2); color: var(--ink-2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ps-ev-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ps-ev-title { font-size: 15px; font-weight: 600; line-height: 20px; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
a.ps-ev-title:hover { color: var(--accent-ink); text-decoration: underline; }
.ps-ev-meta { font-size: 13px; color: var(--ink-3); }
.ps-ev-snip { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ps-more-link { align-self: flex-start; padding: 2px 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ps-more-link:hover { text-decoration: underline; }

/* when it was published, then where it came from, as chips */
.ps-vhead { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 14px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.ps-vhead-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; }
.ps-vhead-top .cap { font-size: 13px; }
.ps-provs { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-prov { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12.5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ps-prov svg { width: 13px; height: 13px; flex: none; color: var(--ink-3); }
.ps-prov-use .cap, .ps-prov-use .ctb-use { font-size: inherit; color: inherit; }
.ps-version { gap: 14px; }

/* comments as conversations: a line joins a comment to its replies, through the avatars' column */
.ps-thread .ps-comment.is-reply { padding-left: 16px; }
.ps-comment { position: relative; }
.ps-comment.has-kids::before, .ps-comment.is-reply:not(.is-last)::before { content: ""; position: absolute; left: 35px; top: 56px; bottom: -8px; width: 2px; background: var(--s3); border-radius: 1px; }
.ps-thread.has-replies .ps-comment.is-reply:not([hidden]) + .ps-more-replies { margin-top: -4px; }
.ps-more-replies { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center; width: 100%; padding: 6px 16px 12px; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.ps-more-replies:hover { background: var(--hover); }
.ps-more-line { display: flex; justify-content: center; height: 20px; }
.ps-more-line::before { content: ""; width: 2px; height: 100%; background: repeating-linear-gradient(to bottom, var(--s3) 0 3px, transparent 3px 6px); }

@keyframes ps-in { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 700px) {
  .ps-old, .ps-progress { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .ps-old-text { flex-basis: calc(100% - 44px); }
  .ps-old-btn { height: 30px; padding: 0 12px; font-size: 13px; }
  .ps-old-acts { margin-left: auto; }
  .ps-old-text { flex-basis: auto; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-page *, .ps-page *::before, .ps-page *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ the small answers to a press */
.ps-act svg { transition: transform 0.15s var(--ease); }
.ps-act:active svg { transform: scale(0.86); }
.ps-act.is-pop svg { animation: ps-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.ps-like { position: relative; }
.ps-like.is-pop::before { content: ""; position: absolute; left: 7px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid var(--like); animation: ps-burst 0.5s ease-out forwards; pointer-events: none; }
.ps-actions-lg .ps-like.is-pop::before { left: 6px; width: 26px; height: 26px; margin-top: -13px; }
.ps-act .num { display: inline-block; }
.ps-act.is-roll-up .num { animation: ps-roll-up 0.3s var(--ease); }
.ps-act.is-roll-down .num { animation: ps-roll-down 0.3s var(--ease); }
@keyframes ps-pop { 0% { transform: scale(0.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes ps-burst { from { transform: scale(0.3); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; border-width: 0; } }
@keyframes ps-roll-up { from { transform: translateY(60%); opacity: 0; } }
@keyframes ps-roll-down { from { transform: translateY(-60%); opacity: 0; } }
.btn:active, .ps-follow:active, .ps-cp-post:active, .ps-old-btn:active, .ps-chip:active { transform: scale(0.97); }
.ps-follow, .ps-cp-post, .ps-chip { transition: transform 0.12s var(--ease), background var(--t-1), filter var(--t-1); }

/* "Following" offers "Unfollow" under the pointer */
.ps-follow[aria-pressed="true"][data-hover]:hover > span { display: none; }
.ps-follow[aria-pressed="true"][data-hover]:hover::after { content: attr(data-hover); }


/* cards arrive gently; the list waits with shimmering cards */
.ps-list > .ps-card { animation: ps-in 0.24s var(--ease) both; }
.ps-list > .ps-card:nth-child(2) { animation-delay: 0.03s; }
.ps-list > .ps-card:nth-child(3) { animation-delay: 0.06s; }
.ps-list > .ps-card:nth-child(4) { animation-delay: 0.09s; }
.ps-list > .ps-card:nth-child(n + 5) { animation-delay: 0.12s; }
.ps-sk-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ps-sk-av { width: 40px; height: 40px; border-radius: 50%; }
.ps-sk-lines { display: flex; flex-direction: column; gap: 8px; }
.ps-sk-l { display: block; height: 12px; border-radius: 6px; }
.ps-sk-box { display: block; height: 64px; border-radius: 16px; margin-top: 4px; }

/* a tab's panel fades in when chosen */
.ps-panel { animation: ps-in 0.2s var(--ease) both; }

/* new posts: a pill that drops in */
.ps-newpill:not([hidden]) { display: flex; align-items: center; gap: 6px; width: fit-content; animation: ps-drop 0.3s var(--ease) both; }
.ps-newpill svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* ------------------------------------------------------------------ a living record: now, since you looked, how it got here */
/* where it stands: "now" (or, on an old version, "then") */
.ps-stand { margin-top: 14px; padding: 14px 16px 12px; border-radius: 20px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); animation: ps-in 0.24s var(--ease) both; }
.ps-stand.is-now { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--canvas)), var(--canvas) 85%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, var(--line)); }
.ps-stand-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-3); }
.ps-stand-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.ps-stand.is-then .ps-stand-label { color: var(--ink-2); letter-spacing: 0.02em; text-transform: none; font-size: 13px; }
.ps-stand .ps-live { width: 8px; height: 8px; margin: 0 2px; }
.ps-stand-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-stand .ps-big { margin-top: 8px; font-size: 21px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
:lang(zh) .ps-stand .ps-big { line-height: 32px; letter-spacing: 0; }
.ps-stand-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.ps-stand-note-k { flex: none; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--accent-wash); color: var(--accent-ink); font-size: 12px; font-weight: 800; line-height: 22px; }
.ps-stand-note.is-quiet { align-items: center; font-size: 14px; color: var(--ink-3); }
.ps-stand-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--ink-3); }
.ps-stand-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.ps-stand-meta svg { width: 14px; height: 14px; }

/* what happened since you looked (or after this old version): the changes in one short line each, then and now */
.ps-since { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 14px 16px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line-2); animation: ps-in 0.28s var(--ease) 0.04s both; }
.ps-since-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.ps-since-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.ps-since.is-then .ps-since-ic { background: var(--s2); color: var(--ink-2); }
.ps-since-ic svg { width: 14px; height: 14px; stroke-width: 2.4; }
.ps-since-title { font-size: 16px; line-height: 22px; font-weight: 800; }
.ps-since-n { font-size: 14px; color: var(--ink-3); }
.ps-since-list { list-style: none; margin: 0 0 0 12px; padding: 0; border-left: 2px solid var(--accent-wash); display: flex; flex-direction: column; }
.ps-since.is-then .ps-since-list { border-left-color: var(--s3); }
.ps-since-item a { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 5px 8px 5px 14px; border-radius: 0 10px 10px 0; color: inherit; transition: background var(--t-1); }
.ps-since-item a::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--canvas); }
.ps-since-item a:hover { background: var(--hover); }
.ps-since-when { min-width: 44px; font-size: 13px; line-height: 21px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-since-text { font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }
.ps-since-quiet { display: flex; align-items: center; gap: 8px; padding: 4px 8px 2px 14px; font-size: 13px; color: var(--ink-3); }
.ps-since-more { padding: 0 0 4px 14px; }
.ps-since-same { font-size: 14px; color: var(--ink-3); }

/* then beside now: two conclusions, the figures that moved marked lightly */
.ps-tn { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 6px; margin-top: 2px; }
.ps-tn-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--s1); color: inherit; transition: background var(--t-1), transform 0.12s var(--ease); }
.ps-tn-card:hover { background: var(--hover); }
.ps-tn-card:active { transform: scale(0.99); }
.ps-tn-card.is-then { color: var(--ink-2); }
.ps-tn-card.is-now { background: color-mix(in srgb, var(--accent) 9%, var(--canvas)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); }
.ps-tn-card.is-now:hover { background: color-mix(in srgb, var(--accent) 14%, var(--canvas)); }
.ps-tn-card.is-solo { margin-top: 2px; }
.ps-tn-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ps-tn-label strong { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--ink-2); }
.ps-tn-card.is-now .ps-tn-label strong { color: var(--accent-ink); }
.ps-tn-text { font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ps-tn-arrow { display: grid; place-items: center; color: var(--ink-4); }
.ps-tn-arrow svg { width: 16px; height: 16px; stroke-width: 2.2; }
.ps-num { padding: 0 1px; border-radius: 3px; background: linear-gradient(transparent 60%, color-mix(in srgb, var(--accent) 32%, transparent) 60%); color: inherit; font-weight: 800; }
.ps-num.is-was { background: none; font-weight: 700; text-decoration: underline dotted color-mix(in srgb, var(--ink-3) 70%, transparent); text-underline-offset: 3px; }

/* checks that found nothing: a few small beats */
.ps-beats { display: inline-flex; align-items: center; gap: 3px; }
.ps-beats i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: 0.5; animation: ps-beat 2.4s ease-in-out infinite; }
.ps-beats i:nth-child(2) { animation-delay: 0.15s; }
.ps-beats i:nth-child(3) { animation-delay: 0.3s; }
.ps-beats i:nth-child(4) { animation-delay: 0.45s; }
.ps-beats i:nth-child(5) { animation-delay: 0.6s; }
.ps-beats b { margin-left: 2px; font-size: 11px; font-weight: 700; color: var(--ink-3); }
@keyframes ps-beat { 0%, 60%, 100% { transform: scale(1); opacity: 0.45; } 25% { transform: scale(1.7); opacity: 1; } }

/* the version's reasoning follows "now" and "since" */
.ps-stand ~ .ps-version, .ps-since ~ .ps-version { padding-top: 16px; }

/* how it got here: one node per change on a line, the quiet checks between them as beats */
.ps-story { gap: 6px; padding: 18px 0 10px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 60px); }
.ps-story-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.ps-story-title { font-size: 20px; line-height: 26px; font-weight: 800; }
.ps-story-sum { font-size: 13px; color: var(--ink-3); }
.ps-st { list-style: none; margin: 0 -8px; padding: 0; }
.ps-st > li { position: relative; }
.ps-st > li[hidden] { display: none; }
.ps-st > li::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--s3); }
.ps-st > li:first-child::before { top: 22px; }
.ps-st > li.ps-st-node:last-child::before { bottom: auto; height: 22px; }
.ps-st > li.ps-st-quiet::before, .ps-st > li.ps-st-gap::before { background: repeating-linear-gradient(to bottom, var(--s3) 0 3px, transparent 3px 6px); }
.ps-st > li.ps-st-quiet.is-tail::before { -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.ps-st-row { position: relative; width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px; gap: 10px; padding: 10px 8px; border: 0; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--t-1); }
.ps-st-row:hover { background: var(--hover); }
.ps-st-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ps-st-dot { position: relative; z-index: 1; justify-self: center; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--canvas); box-shadow: inset 0 0 0 2.5px var(--ink-4); transition: transform var(--t-1) var(--ease); }
.ps-st-row:hover .ps-st-dot { transform: scale(1.2); }
.ps-st-node.is-first .ps-st-dot { box-shadow: inset 0 0 0 2.5px var(--ink-3); }
.ps-st-node.is-seen .ps-st-dot { background: var(--ink-2); box-shadow: 0 0 0 4px var(--s2); }
.ps-st-node.is-here:not(.is-now) .ps-st-dot { background: var(--ink); box-shadow: 0 0 0 5px var(--s2); }
.ps-st-node.is-now .ps-st-dot { width: 16px; height: 16px; margin-top: 4px; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-wash); }
.ps-st-node.is-here .ps-st-row { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ps-st-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-st-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; line-height: 20px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ps-st-v { color: var(--ink-4); }
.ps-st-tag { height: 20px; padding: 0 8px; border-radius: 999px; background: var(--s2); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 20px; white-space: nowrap; }
.ps-st-tag.is-now { background: var(--accent); color: var(--on-accent); }
.ps-st-tag.is-seen { background: var(--ink); color: var(--canvas); }
.ps-st-tag.is-here { background: var(--accent-wash); color: var(--accent-ink); }
.ps-st-concl { font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ps-st-node.is-now .ps-st-concl { font-weight: 800; }
.ps-st-note { font-size: 14px; line-height: 20px; color: var(--ink-3); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ps-st-node.is-open .ps-st-note { display: block; }
.ps-st-caret { align-self: start; margin-top: 2px; color: var(--ink-4); transition: transform var(--t-1) var(--ease), color var(--t-1); }
.ps-st-caret svg { width: 16px; height: 16px; transform: rotate(90deg); }
.ps-st-row:hover .ps-st-caret { color: var(--ink-2); }
.ps-st-row[aria-expanded="true"] .ps-st-caret { transform: rotate(180deg); }
.ps-st-detail { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0 8px 10px 46px; padding: 12px 14px; border-radius: 14px; background: var(--s1); animation: ps-in 0.2s var(--ease) both; }
.ps-st-gist { font-size: 14px; line-height: 21px; color: var(--ink-2); overflow-wrap: anywhere; }
.ps-st-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.ps-st-foot .cap { display: inline-flex; align-items: center; gap: 4px; }
.ps-st-foot svg { width: 13px; height: 13px; }
.ps-st-open { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.ps-st-open:hover { text-decoration: underline; }
.ps-st-open svg { width: 15px; height: 15px; }
.ps-st-quiet { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 0 8px 4px; font-size: 13px; color: var(--ink-3); }
.ps-st-quiet .ps-beats { position: relative; z-index: 1; flex-direction: column; justify-self: center; gap: 3px; padding: 3px 0; background: var(--canvas); }
.ps-st-quiet .ps-beats b { margin: 1px 0 0; font-size: 10px; }
.ps-st-gap-btn { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 6px 8px; border: 0; border-radius: 14px; background: none; color: var(--accent-ink); font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.ps-st-gap-btn:hover { background: var(--hover); }
.ps-st-gap-dots { position: relative; z-index: 1; justify-self: center; display: flex; flex-direction: column; gap: 3px; padding: 3px 0; background: var(--canvas); }
.ps-st-gap-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4); }
.ps-st-gap-btn:hover .ps-st-gap-dots { background: transparent; }

/* a card's trail: its last few changes, the last one now */
.ps-trail { list-style: none; display: flex; align-items: center; min-width: 0; margin: 2px 0 0; padding: 0; overflow: hidden; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.ps-trail-step { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
.ps-trail-step + .ps-trail-step::before { content: ""; flex: none; width: 14px; height: 1.5px; margin: 0 0 0 6px; background: var(--s3); }
.ps-trail-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.ps-trail-step.is-seen .ps-trail-dot { background: var(--ink-4); }
.ps-trail-step.is-now { flex-shrink: 0; max-width: 50%; color: var(--ink); font-weight: 700; }
.ps-trail-step.is-now .ps-trail-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.ps-trail-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-trail-more { flex: none; margin-right: 6px; color: var(--ink-4); }

@media (max-width: 700px) {
  .ps-stand .ps-big { font-size: 19px; line-height: 26px; }
  .ps-tn { grid-template-columns: minmax(0, 1fr); }
  .ps-tn-arrow { height: 14px; transform: rotate(90deg); }
  .ps-trail-step.is-now { max-width: 60%; }
}
