/* assets/community/contribution/contrib.css — leaderboard, badges and activity pages (contribution stream).
   Extends the Workspace design language: reads ONLY the --wk-* tokens from /profile-wk.css (loaded first) and adds
   the few colours the boards need (podium metals), each checked for contrast in reports/contribution/builder-r1.md.
   Everything is scoped under .ct (the <div class="wk ct"> wrapper). Dark-only, like the site chrome and Workspace.
   Never restyles .tpi-author* / .tpi-official-chip (owned by the profiles stream). */

.ct {
  --ct-gold: #FCD34D;     /* 12.9:1 on --wk-surface-1 */
  --ct-silver: #D5DCE6;   /* 12.6:1 */
  --ct-bronze: #F3B98F;   /* 9.9:1  */
  --ct-max: 72rem;
  padding-bottom: var(--wk-s-16);
}
.ct-wrap { max-width: var(--ct-max); margin: 0 auto; padding: var(--wk-s-8) var(--wk-gutter) 0; }
@media (min-width: 640px) { .ct-wrap { padding-left: var(--wk-s-6); padding-right: var(--wk-s-6); } }

/* ---------- headings ---------- */
.ct-hero { max-width: 46rem; margin-bottom: var(--wk-s-6); }
.ct-eyebrow { color: var(--wk-accent-text); font-size: var(--wk-fs-xs); font-weight: var(--wk-fw-semi); letter-spacing: var(--wk-track-caps); text-transform: uppercase; margin-bottom: var(--wk-s-2); }
.ct-title { font-size: var(--wk-fs-xl); line-height: var(--wk-lh-tight); margin-bottom: var(--wk-s-3); }
@media (min-width: 640px) { .ct-title { font-size: var(--wk-fs-2xl); } }
.ct-lede { color: var(--wk-text-2); font-size: var(--wk-fs-md); line-height: var(--wk-lh-base); }
.ct-meta { color: var(--wk-text-3); font-size: var(--wk-fs-sm); margin-top: var(--wk-s-3); }
.ct a.ct-link, .ct-meta a, .ct-note a, .ct-how a, .ct-standing__links a, .ct-more a, .ct-empty a {
  color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.ct-meta a:hover, .ct-note a:hover, .ct-how a:hover, .ct-standing__links a:hover, .ct-more a:hover { color: var(--wk-text); }
.ct :where(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--wk-ring); outline-offset: 2px; border-radius: var(--wk-r-sm); }

/* ---------- cards ---------- */
.ct-standing, .ct-cotm, .ct-board, .ct-how, .ct-panel {
  background: var(--wk-surface-1); border: 1px solid var(--wk-line); border-radius: var(--wk-r-md);
}
.ct-standing { padding: var(--wk-s-5); margin-bottom: var(--wk-s-6); border-color: var(--wk-accent-line); background: linear-gradient(180deg, var(--wk-accent-soft), transparent 70%), var(--wk-surface-1); }
.ct-standing__label { font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); color: var(--wk-text-2); margin-bottom: var(--wk-s-2); font-weight: var(--wk-fw-semi); }
.ct-standing__big { font-size: var(--wk-fs-lg); font-weight: var(--wk-fw-semi); margin-bottom: var(--wk-s-1); }
.ct-standing__pos { font-size: var(--wk-fs-2xl); color: var(--wk-accent-text); margin-right: var(--wk-s-1); font-variant-numeric: tabular-nums; }
.ct-standing__gap { color: var(--wk-text-2); max-width: 44rem; }
.ct-standing p + p { margin-top: var(--wk-s-2); }
.ct-standing__links { font-size: var(--wk-fs-sm); }
/* r7 (design panel r6 M3): a note is PROSE (block: its words and links wrap as one sentence); only the explicit icon form
   is a flex row, and it always wraps its words in ONE <span>, so no text run or link ever becomes its own column */
.ct-note { display: block; color: var(--wk-text-2); font-size: var(--wk-fs-sm); margin-top: var(--wk-s-3); max-width: 46rem; }
.ct-note--icon { display: flex; gap: var(--wk-s-2); align-items: flex-start; }
.ct-note .contrib-icon { flex: none; margin-top: 2px; color: var(--wk-info); }

.ct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--wk-s-2); min-height: var(--wk-hit); padding: 0 var(--wk-s-4);
  border-radius: var(--wk-r-sm); background: var(--wk-accent); color: var(--wk-text-on-accent); font-weight: var(--wk-fw-semi);
  box-shadow: var(--wk-inset-top); border: 1px solid transparent; transition: background-color var(--wk-dur-fast) var(--wk-ease); cursor: pointer; font-size: var(--wk-fs-base);
}
.ct a.ct-btn { color: var(--wk-text-on-accent); }
.ct-btn:hover { background: var(--wk-accent-hover); }
.ct-btn--ghost, .ct a.ct-btn--ghost { background: transparent; color: var(--wk-text); border-color: var(--wk-control-line); box-shadow: none; }
.ct-btn--ghost:hover { background: var(--wk-hover); }
.ct-btn--small { min-height: var(--wk-hit-sm); padding: 0 var(--wk-s-3); font-size: var(--wk-fs-sm); }
.ct-btn + .ct-btn { margin-left: var(--wk-s-2); }
/* critic r3 L4: a CTA pair is a wrapping flex row with a gap, so the second button never starts 8 px in when it wraps */
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wk-s-2); }
.ct-actions .ct-btn + .ct-btn { margin-left: 0; }
.ct-standing .ct-actions { margin-top: var(--wk-s-4); }   /* r6: the one-click link form sat flush under its sentence */
.ct-progress--ready { color: var(--wk-text); }

/* integration r2 (design panel H2): the badges page invitation for a member whose own prompts already count */
.ct-invite { padding: var(--wk-s-5); margin-bottom: var(--wk-s-6); max-width: 46rem; border: 1px solid var(--wk-accent-line); border-radius: var(--wk-r-md);
  background: linear-gradient(180deg, var(--wk-accent-soft), transparent 75%), var(--wk-surface-1); }
.ct-invite__h { font-size: var(--wk-fs-md); font-weight: var(--wk-fw-semi); margin-bottom: var(--wk-s-2); }
.ct-invite__p { color: var(--wk-text-2); margin-bottom: var(--wk-s-3); }
.ct-invite__p strong { color: var(--wk-text); }

/* ---------- contributor of the month ---------- */
.ct-cotm { display: flex; gap: var(--wk-s-4); align-items: center; padding: var(--wk-s-5); margin-bottom: var(--wk-s-6);
  border-color: rgba(252, 211, 77, 0.45); background: radial-gradient(40rem 12rem at 0% 0%, rgba(252, 211, 77, 0.10), transparent 70%), var(--wk-surface-1); }
.ct-cotm__art { flex: none; }
.ct-cotm__title { font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); color: var(--ct-gold); font-weight: var(--wk-fw-semi); margin-bottom: var(--wk-s-1); }
.ct-cotm__who { font-size: var(--wk-fs-lg); font-weight: var(--wk-fw-semi); }
.ct-cotm__who a { color: var(--wk-text); text-decoration: underline; text-decoration-color: rgba(252, 211, 77, 0.5); text-underline-offset: 3px; }
.ct-cotm__facts { color: var(--wk-text-2); font-size: var(--wk-fs-sm); margin-top: var(--wk-s-1); }
@media (max-width: 479px) { .ct-cotm { align-items: flex-start; } .ct-cotm__art svg { width: 48px; height: 48px; } }

/* ---------- period tabs ---------- */
.ct-tabs { display: flex; gap: var(--wk-s-1); padding: var(--wk-s-1); margin-bottom: var(--wk-s-5); background: var(--wk-surface-1); border: 1px solid var(--wk-line); border-radius: var(--wk-r-md); width: max-content; max-width: 100%; overflow-x: auto; }
.ct-tab { display: flex; flex-direction: column; justify-content: center; min-height: var(--wk-hit); padding: var(--wk-s-1) var(--wk-s-4); border-radius: var(--wk-r-sm); color: var(--wk-text-2); font-weight: var(--wk-fw-medium); white-space: nowrap; line-height: 1.25; }
.ct-tab:hover { color: var(--wk-text); background: var(--wk-hover); }
.ct-tab[aria-current="page"] { background: var(--wk-surface-3); color: var(--wk-text); box-shadow: inset 0 0 0 1px var(--wk-line-strong); }
.ct-tab__sub { font-size: var(--wk-fs-xs); color: var(--wk-text-3); font-weight: var(--wk-fw-regular); }
@media (max-width: 479px) { .ct-tabs { width: 100%; } .ct-tab { flex: 1 1 0; padding: var(--wk-s-1) var(--wk-s-2); align-items: center; text-align: center; } }

/* ---------- boards ---------- */
.ct-boards { display: grid; gap: var(--wk-s-5); }
@media (min-width: 1024px) { .ct-boards { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.ct-board { padding: var(--wk-s-5) var(--wk-s-4); }
@media (min-width: 640px) { .ct-board { padding: var(--wk-s-5); } }
.ct-board__head { margin-bottom: var(--wk-s-4); }
.ct-board__head h2 { font-size: var(--wk-fs-lg); }
.ct-board__sub { color: var(--wk-text-2); font-size: var(--wk-fs-sm); margin-top: var(--wk-s-1); }
.ct-empty { color: var(--wk-text-2); padding: var(--wk-s-4); border: 1px dashed var(--wk-line-strong); border-radius: var(--wk-r-sm); }
.ct-list { display: flex; flex-direction: column; gap: var(--wk-s-1); }
.ct-row { display: grid; grid-template-columns: 2rem 40px minmax(0, 1fr) auto; gap: var(--wk-s-3); align-items: center; padding: var(--wk-s-3) var(--wk-s-2); border-radius: var(--wk-r-sm); }
.ct-row + .ct-row { border-top: 1px solid var(--wk-line); border-radius: 0; }
.ct-pos { font-variant-numeric: tabular-nums; font-weight: var(--wk-fw-semi); color: var(--wk-text-2); text-align: center; font-size: var(--wk-fs-md); }
.ct-row--p1 .ct-pos { color: var(--ct-gold); }
.ct-row--p2 .ct-pos { color: var(--ct-silver); }
.ct-row--p3 .ct-pos { color: var(--ct-bronze); }
.ct-row--top .ct-pos { font-size: var(--wk-fs-lg); }
.ct-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: var(--wk-fw-semi); font-size: var(--wk-fs-md);
  color: var(--ct-acc, var(--wk-accent-text)); background: color-mix(in srgb, var(--ct-acc, #a5b4fc) 16%, var(--wk-surface-2)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ct-acc, #a5b4fc) 55%, transparent); width: 40px; height: 40px; flex: none; }
.ct-avatar--credited { color: var(--wk-text-3); background: var(--wk-surface-2); box-shadow: inset 0 0 0 1px var(--wk-line-strong); }
.ct-who { min-width: 0; }
.ct-who__name { font-weight: var(--wk-fw-semi); font-size: var(--wk-fs-md); overflow-wrap: anywhere; }
.ct-who__name a { color: var(--wk-text); }
.ct-who__name a:hover { color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.ct-who__sub { display: flex; flex-wrap: wrap; gap: 0 var(--wk-s-2); color: var(--wk-text-3); font-size: var(--wk-fs-sm); }
.ct-handle { color: var(--wk-text-2); }
.ct-facts { color: var(--wk-text-3); }
.ct-who .contrib-badges { margin-top: var(--wk-s-1); }
.ct-score { text-align: right; white-space: nowrap; color: var(--wk-text-2); font-size: var(--wk-fs-sm); }
.ct-score strong { color: var(--wk-text); font-size: var(--wk-fs-lg); font-variant-numeric: tabular-nums; font-weight: var(--wk-fw-semi); }
.ct-chip { display: inline-block; padding: 0 var(--wk-s-2); border-radius: var(--wk-r-pill); border: 1px solid var(--wk-line-strong); color: var(--wk-text-2); font-size: var(--wk-fs-xs); font-weight: var(--wk-fw-medium); vertical-align: 2px; line-height: 1.5; }
.ct-more { margin-top: var(--wk-s-3); font-size: var(--wk-fs-sm); }
.ct-board--credited .ct-note { margin-top: var(--wk-s-4); }
@media (max-width: 479px) {
  .ct-row { grid-template-columns: 1.5rem 36px minmax(0, 1fr) auto; gap: var(--wk-s-2); padding: var(--wk-s-3) 0; }
  .ct-avatar { width: 36px !important; height: 36px !important; }
  .ct-facts { width: 100%; }
}

/* critic r4 L1: the members column carries the month's pulse under its list, and the long credited list shows its top
   names with the rest behind a native disclosure, so neither desktop column runs on alone beside an empty one */
.ct-col { display: grid; gap: var(--wk-s-5); align-content: start; min-width: 0; }
.ct-reveal { margin-top: var(--wk-s-1); }
.ct-reveal__summary { display: flex; align-items: center; gap: var(--wk-s-2); min-height: var(--wk-hit); padding: 0 var(--wk-s-2); border-top: 1px solid var(--wk-line);
  color: var(--wk-accent-text); font-weight: var(--wk-fw-medium); cursor: pointer; list-style: none; }
.ct-reveal__summary::-webkit-details-marker { display: none; }
.ct-reveal__summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--wk-dur-fast) var(--wk-ease); margin: 0 4px 0 2px; }
.ct-reveal[open] > .ct-reveal__summary::before { transform: rotate(45deg); }
.ct-reveal__summary:hover { color: var(--wk-text); }
.ct-reveal[open] > .ct-reveal__summary { margin-bottom: var(--wk-s-1); }

.ct-pulse { padding: var(--wk-s-5); border-radius: var(--wk-r-md); border: 1px solid var(--wk-line);
  background: radial-gradient(28rem 10rem at 100% 0%, rgba(240, 71, 107, 0.10), transparent 70%), radial-gradient(24rem 10rem at 0% 100%, var(--wk-accent-soft), transparent 70%), var(--wk-surface-1); }
.ct-pulse__h { font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); color: var(--wk-text-2); font-weight: var(--wk-fw-semi); }
.ct-pulse__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wk-s-3); margin: var(--wk-s-3) 0 0; }
@media (min-width: 480px) { .ct-pulse__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* integration r9 (design r8 L6): zero tiles are not printed, so the grid follows the tile count (never one stranded tile) */
.ct-pulse__stats[data-ct-pulse-n="1"] { grid-template-columns: minmax(0, 12rem); }
.ct-pulse__stats[data-ct-pulse-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ct-pulse__stats[data-ct-pulse-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ct-pulse__stats > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: var(--wk-s-3); border-radius: var(--wk-r-sm); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.ct-pulse__stats dt { color: var(--wk-text-2); font-size: var(--wk-fs-xs); }
.ct-pulse__stats dd { margin: 0; color: var(--wk-text); font-size: var(--wk-fs-xl); font-weight: var(--wk-fw-semi); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ct-pulse__story { list-style: none; margin: var(--wk-s-4) 0 0; padding: 0; display: grid; gap: var(--wk-s-2); }
.ct-pulse__story li { display: flex; align-items: flex-start; gap: 10px; color: var(--wk-text-2); }
.ct-pulse__story li svg { flex: none; margin-top: 3px; color: var(--ct-gold); }
.ct-pulse__story li > span { min-width: 0; overflow-wrap: anywhere; }
.ct-pulse__story strong { color: var(--wk-text); font-weight: var(--wk-fw-semi); }
.ct-pulse__fine { margin-top: var(--wk-s-3); font-size: var(--wk-fs-xs); color: var(--wk-text-2); }

/* ---------- how it works ---------- */
.ct-how { padding: var(--wk-s-6) var(--wk-s-4); margin-top: var(--wk-s-6); }
@media (min-width: 640px) { .ct-how { padding: var(--wk-s-6); } }
.ct-how h2 { font-size: var(--wk-fs-lg); margin-bottom: var(--wk-s-2); }
.ct-how h3 { font-size: var(--wk-fs-md); margin: var(--wk-s-6) 0 var(--wk-s-2); }
.ct-how > p { color: var(--wk-text-2); max-width: 46rem; }
.ct-how > p + p, .ct-how ul + p { margin-top: var(--wk-s-4); }
.ct-points { width: 100%; max-width: 46rem; border-collapse: collapse; margin-top: var(--wk-s-4); font-size: var(--wk-fs-base); }
.ct-points th, .ct-points td { text-align: left; padding: var(--wk-s-2) var(--wk-s-3); border-bottom: 1px solid var(--wk-line); vertical-align: top; }
.ct-points thead th { color: var(--wk-text-3); font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); font-weight: var(--wk-fw-semi); }
.ct-points tbody th { font-weight: var(--wk-fw-regular); color: var(--wk-text); }
.ct-points td { color: var(--wk-text-2); font-variant-numeric: tabular-nums; }
.ct-rules { display: flex; flex-direction: column; gap: var(--wk-s-2); max-width: 46rem; color: var(--wk-text-2); }
.ct-rules li { padding-left: var(--wk-s-4); position: relative; }
.ct-rules li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--wk-accent-text); }
.ct-rules strong { color: var(--wk-text); font-weight: var(--wk-fw-semi); }

/* ---------- badges (shared renderers) ---------- */
.contrib-badges { display: flex; flex-wrap: wrap; gap: var(--wk-s-2, 0.5rem); list-style: none; margin: 0; padding: 0; }
.contrib-badges--compact { gap: 4px; }
.contrib-badges__item { display: inline-flex; align-items: center; gap: 6px; }
.contrib-badges__name { font-size: var(--wk-fs-sm, 0.8125rem); color: var(--wk-text-2, #B6B9CC); }
/* design panel L5: the tier numeral that survives small sizes (sits on the medallion's lower-right rim) */
.contrib-badges__item--tiered { position: relative; }
.contrib-badges--compact .contrib-badges__item--tiered { padding-right: 4px; }
.contrib-badges__tier { position: absolute; right: -3px; bottom: -3px; min-width: 14px; height: 14px; padding: 0 2px; border-radius: 7px;
  background: var(--wk-surface-3); border: 1px solid var(--wk-line-strong); color: var(--wk-text);
  font-size: 9px; line-height: 12px; font-weight: 600; text-align: center; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.contrib-badges__item:not(.contrib-badges__item--tiered) .contrib-badges__tier { display: none; }
.contrib-badge-art { display: block; flex: none; }
.contrib-mark { display: inline-flex; vertical-align: middle; margin-left: 2px; }
a.contrib-mark:hover svg circle { stroke: #F5B83D; }
a.contrib-mark:focus-visible { outline: 2px solid var(--wk-ring, #A78BFA); outline-offset: 1px; }
.contrib-flair { display: inline-flex; vertical-align: middle; margin-left: 6px; }

/* ---------- badges page ---------- */
.ct-badge-grid { display: grid; gap: var(--wk-s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .ct-badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ct-badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ct-badge { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--wk-s-4); padding: var(--wk-s-5); background: var(--wk-surface-1); border: 1px solid var(--wk-line); border-radius: var(--wk-r-md); scroll-margin-top: calc(var(--wk-nav-h, 64px) + 1rem); }
.ct-badge:target { border-color: var(--wk-accent-line); box-shadow: 0 0 0 1px var(--wk-accent-line); }
.ct-badge--earned { border-color: var(--wk-accent-line); }
.ct-badge__art { position: relative; }
.ct-badge__art--locked svg { filter: grayscale(1) brightness(0.72); opacity: 0.6; }
.ct-badge h2 { font-size: var(--wk-fs-md); }
.ct-badge__cat { font-size: var(--wk-fs-xs); color: var(--wk-text-3); text-transform: uppercase; letter-spacing: var(--wk-track-caps); font-weight: var(--wk-fw-semi); }
.ct-badge__desc { color: var(--wk-text-2); font-size: var(--wk-fs-sm); margin-top: var(--wk-s-1); }
.ct-tiers { display: flex; flex-wrap: wrap; gap: var(--wk-s-1); margin-top: var(--wk-s-3); }
.ct-tier { display: inline-flex; align-items: center; gap: 4px; padding: 2px var(--wk-s-2); border-radius: var(--wk-r-pill); font-size: var(--wk-fs-xs); border: 1px solid var(--wk-line-strong); color: var(--wk-text-2); }
.ct-tier--done { border-color: var(--wk-success-line); background: var(--wk-success-soft); color: var(--wk-success); }
.ct-progress { margin-top: var(--wk-s-3); font-size: var(--wk-fs-sm); color: var(--wk-text-2); }
.ct-bar { height: 6px; border-radius: 999px; background: var(--wk-surface-3); overflow: hidden; margin-top: var(--wk-s-1); }
.ct-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--wk-accent), var(--wk-accent-2)); border-radius: inherit; }
.ct-badge form { margin-top: var(--wk-s-3); }
.ct-vis { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wk-s-2) var(--wk-s-3); }
.ct-vis__state { font-size: var(--wk-fs-sm); color: var(--wk-text-2); }
.ct-switch { display: inline-flex; align-items: center; gap: var(--wk-s-2); min-height: var(--wk-hit-sm); padding: 0 var(--wk-s-3); border-radius: var(--wk-r-sm); border: 1px solid var(--wk-control-line); color: var(--wk-text); font-size: var(--wk-fs-sm); background: transparent; cursor: pointer; }
.ct-switch:hover { background: var(--wk-hover); }
.ct-flash { padding: var(--wk-s-3) var(--wk-s-4); border-radius: var(--wk-r-sm); margin-bottom: var(--wk-s-5); border: 1px solid var(--wk-success-line); background: var(--wk-success-soft); color: var(--wk-text); }
.ct-flash--error { border-color: var(--wk-danger-line); background: var(--wk-danger-soft); }

/* ---------- activity page ---------- */
.ct-activity { max-width: 46rem; }
.ct-activity__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--wk-s-3); margin-bottom: var(--wk-s-4); }
.ct-activity__count { color: var(--wk-text-2); font-size: var(--wk-fs-sm); }
.ct-group-h { font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); color: var(--wk-text-3); font-weight: var(--wk-fw-semi); margin: var(--wk-s-5) 0 var(--wk-s-2); }
.ct-feed { display: flex; flex-direction: column; gap: var(--wk-s-2); }
.ct-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--wk-s-3); padding: var(--wk-s-4); background: var(--wk-surface-1); border: 1px solid var(--wk-line); border-radius: var(--wk-r-md); position: relative; }
.ct-item--unread { border-color: var(--wk-accent-line); background: linear-gradient(90deg, var(--wk-accent-soft), transparent 55%), var(--wk-surface-1); }
.ct-item__icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--wk-surface-3); color: var(--wk-text-2); }
.ct-item__icon--art { background: none; border: 0; width: 36px; height: 36px; }
.ct-item__icon--art svg { display: block; }
.ct-tone-success .ct-item__icon { color: var(--wk-success); background: var(--wk-success-soft); }
.ct-tone-reception .ct-item__icon { color: #FF9EB5; background: rgba(240, 71, 107, 0.14); }
.ct-tone-honour .ct-item__icon { color: var(--ct-gold); background: rgba(252, 211, 77, 0.12); }
.ct-tone-warn .ct-item__icon { color: var(--wk-warn); background: var(--wk-warn-soft); }
.ct-item__title { font-weight: var(--wk-fw-semi); font-size: var(--wk-fs-md); overflow-wrap: anywhere; }
.ct-item__body { color: var(--wk-text-2); margin-top: 2px; overflow-wrap: anywhere; }
/* integration r10 (design panel r9 L1): the appeal / report address in a notification is a real link (one tap on a phone) */
.ct-item__body a.ct-item__link { color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: from-font; }
.ct-item__body a.ct-item__link:hover { color: var(--wk-text); }
.ct-item__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wk-s-2) var(--wk-s-3); margin-top: var(--wk-s-2); font-size: var(--wk-fs-sm); color: var(--wk-text-3); }
.ct-item__new { display: inline-flex; align-items: center; gap: 4px; color: var(--wk-accent-text); font-weight: var(--wk-fw-semi); }
.ct-item__new::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wk-accent-text); }
.ct-item form { display: inline; }
.ct-linkbtn { background: none; border: 0; padding: 0; color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; min-height: 24px; }
.ct-linkbtn:hover { color: var(--wk-text); }
.ct .ct-item__foot a { color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* the first-upvote moment: a warm, specific highlight about THEIR prompt. One soft entrance, the halos breathe out
   once and the sparks settle; all of it off under prefers-reduced-motion. No confetti, no sound, no ticking counters. */
.ct-moment { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--wk-s-5); align-items: start; padding: var(--wk-s-6) var(--wk-s-6); margin-bottom: var(--wk-s-5);
  border-radius: var(--wk-r-lg); border: 1px solid rgba(240, 71, 107, 0.45);
  background: radial-gradient(30rem 14rem at 0% 0%, rgba(240, 71, 107, 0.2), transparent 70%), radial-gradient(22rem 12rem at 100% 100%, rgba(124, 58, 237, 0.14), transparent 70%), var(--wk-surface-1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 22px 48px -26px rgba(240, 71, 107, 0.5); animation: ct-in var(--wk-dur-slow) var(--wk-ease) both; }
.ct-moment--save { border-color: rgba(244, 63, 94, 0.4); }
.ct-moment__art { display: flex; justify-content: center; padding-top: var(--wk-s-1); }
.ct-moment__art svg { display: block; width: 112px; height: 112px; overflow: visible; }
.ct-moment__eyebrow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); color: #FF9EB5; font-weight: var(--wk-fw-semi); }
.ct-moment__eyebrow time { color: var(--wk-text-2); font-weight: var(--wk-fw-regular, 400); letter-spacing: normal; text-transform: none; }
.ct-moment__title { font-size: var(--wk-fs-lg); font-weight: var(--wk-fw-semi); line-height: var(--wk-lh-tight); margin-top: var(--wk-s-2); overflow-wrap: anywhere; text-wrap: balance; }
@media (min-width: 640px) { .ct-moment__title { font-size: var(--wk-fs-2xl, 1.75rem); } }
.ct-moment__lede { color: var(--wk-text); margin-top: var(--wk-s-2); max-width: 40rem; }
.ct-moment__facts { display: flex; flex-wrap: wrap; gap: var(--wk-s-2); margin: var(--wk-s-4) 0 0; padding: 0; list-style: none; }
.ct-moment__facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); color: var(--wk-text-2); font-size: var(--wk-fs-sm); font-variant-numeric: tabular-nums; }
.ct-moment__facts li strong { color: var(--wk-text); font-weight: var(--wk-fw-semi); }
.ct-moment__facts li:first-child { background: rgba(240, 71, 107, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 158, 181, 0.4); color: #FFD1DC; }
.ct-moment--save .ct-moment__facts li:first-child { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); color: var(--wk-text-2); }
.ct-moment--save .ct-moment__facts li:nth-child(2) { background: rgba(240, 71, 107, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 158, 181, 0.4); color: #FFD1DC; }
.ct-moment__fine { margin-top: var(--wk-s-2); font-size: var(--wk-fs-xs); color: var(--wk-text-2); }
.ct-moment__did { margin: var(--wk-s-4) 0 0; padding: var(--wk-s-3) 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: var(--wk-s-2); }
.ct-moment__did li { display: flex; align-items: center; gap: 10px; color: var(--wk-text); }
.ct-moment__did li > span:last-child { min-width: 0; }
.ct-moment__did svg { flex: none; }
.ct-moment__rank { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 1.75rem; padding: 0 8px; border-radius: 999px; background: var(--ct-gold); color: #2A1A00; font-weight: 700; font-variant-numeric: tabular-nums; }
/* integration r6 (design panel r5 H1): an own, unranked name shows its points, never a gold rank chip */
.ct-moment__rank--pts { background: transparent; color: var(--ct-gold); box-shadow: inset 0 0 0 1px rgba(252, 211, 77, 0.55); white-space: nowrap; }
.ct-inline-form { display: inline; margin: 0; }
.ct .ct-link--button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--wk-accent-text); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; min-height: 24px; }
.ct .ct-link--button:hover { color: var(--wk-text); }
/* "What it counts towards" (critic r3: tell the member what the upvote unlocked next): the next place, and the next tier
   of the reception badge it feeds, as a slim meter that fills once on arrival (static under reduced motion). */
.ct-moment__next { margin-top: var(--wk-s-4); padding: var(--wk-s-3) var(--wk-s-4); border-radius: var(--wk-r-md, 12px); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); display: grid; gap: var(--wk-s-2); }
.ct-moment__next-h { font-size: var(--wk-fs-xs); text-transform: uppercase; letter-spacing: var(--wk-track-caps); color: var(--wk-text-2); font-weight: var(--wk-fw-semi); }
.ct-moment__next-line { display: flex; align-items: flex-start; gap: 8px; color: var(--wk-text); font-size: var(--wk-fs-sm); }
.ct-moment__next-line svg { flex: none; margin-top: 2px; color: var(--ct-gold); }
.ct-moment__next-line strong { font-variant-numeric: tabular-nums; }
.ct-moment__next-badge { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; }
.ct-moment__next-badge svg { display: block; }
.ct-bar--slim { height: 4px; margin-top: 6px; max-width: 18rem; }
.ct-moment__next .ct-bar > span { transform-origin: left center; }
@keyframes ct-fill { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) { .ct-moment__next .ct-bar > span { animation: ct-fill 900ms var(--wk-ease) 700ms both; } }
.ct-moment__actions { margin-top: var(--wk-s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--wk-s-2) var(--wk-s-3); }
.ct-moment__actions form { display: inline; }
.ct-moment__actions .ct-btn + .ct-btn { margin-left: 0; }
.ct-moment__dismiss { min-height: var(--wk-hit-sm); padding: 0 var(--wk-s-1); }
@keyframes ct-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ct-breathe { 0% { transform: scale(0.7); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes ct-spark { 0% { transform: scale(0) rotate(-45deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.ct-burst__halo, .ct-burst__spark { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .ct-burst__halo--1 { animation: ct-breathe 600ms var(--wk-ease) 150ms both; }
  .ct-burst__halo--2 { animation: ct-breathe 700ms var(--wk-ease) 250ms both; }
  .ct-burst__halo--3 { animation: ct-breathe 800ms var(--wk-ease) 350ms both; }
  .ct-burst__spark { animation: ct-spark 500ms var(--wk-ease) 600ms both; }
}
@media (prefers-reduced-motion: reduce) { .ct-moment { animation: none; } .ct * { transition: none !important; } }
@media (max-width: 479px) {
  .ct-moment { grid-template-columns: 1fr; padding: var(--wk-s-5) var(--wk-s-4); }
  .ct-moment__art { justify-content: flex-start; }
  .ct-moment__art svg { width: 88px; height: 88px; }
}
.ct-anchor { scroll-margin-top: calc(var(--wk-nav-h, 64px) + 1rem); }
.ct-anchor:target { outline: 1px solid var(--wk-accent-line); outline-offset: 6px; border-radius: var(--wk-r-sm); }
.ct-pager { display: flex; justify-content: center; margin-top: var(--wk-s-5); }

/* forced colours: keep boundaries visible */
@media (forced-colors: active) {
  .ct-row, .ct-item, .ct-badge, .ct-standing, .ct-board, .ct-how, .ct-moment, .ct-pulse, .ct-tab[aria-current="page"] { border: 1px solid CanvasText; }
  .ct-item__new::before { background: CanvasText; }
}

/* integration r2 (design panel M4): Activity inside the Workspace frame. The frame (.wk-shell / .wk-main) supplies width,
   gutters and the rail; the page keeps its own reading width and drops the stand-alone page padding. */
.ct--in-workspace .ct-wrap--ws { max-width: none; margin: 0; padding-left: 0; padding-right: 0; display: block; }
.ct--in-workspace .ct-wrap--ws > * { max-width: 52rem; }
@media (max-width: 1023px) { .ct--in-workspace .ct-wrap--ws { padding-bottom: calc(var(--wk-bottombar-h, 4rem) + var(--wk-s-8)); } }

/* design panel L6: launch-day badge notes as one card */
.ct-group-badges { list-style: none; margin: var(--wk-s-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--wk-s-2) var(--wk-s-4); }
.ct-group-badges li { display: inline-flex; align-items: center; gap: var(--wk-s-2); color: var(--wk-text); font-size: var(--wk-fs-sm); }
/* integration r5 (design panel L2): text for the compact badge list, read by assistive tech, not shown */
.contrib-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* r7 (design panel r6 L1): the points chip keeps its padding beside a long sentence and sits on its first line */
.ct-moment__did .ct-moment__rank--pts { flex: none; align-self: flex-start; }
/* r7 (design panel r6 M1): a result line with an icon and a sentence (Activity's link confirmation) */
.ct-flash--ok { display: flex; gap: var(--wk-s-2); align-items: flex-start; }
.ct-flash--ok > .contrib-icon { flex: none; margin-top: 3px; color: var(--wk-success, var(--wk-accent-text)); }
.ct-flash--ok > p { margin: 0; }
.ct-flash[tabindex="-1"]:focus-visible, [data-ct-focus]:focus-visible { outline: 2px solid var(--wk-ring); outline-offset: 3px; }
/* r7 (privacy panel r6 M-3): badges a moderator removed, with the reason and the appeal route (owner only) */
.ct-removed { margin-top: var(--wk-s-6); padding: var(--wk-s-4); border: 1px solid var(--wk-line-strong); border-radius: var(--wk-r-md, 10px); background: var(--wk-surface-2); }
.ct-removed h2 { font-size: var(--wk-fs-md); margin-bottom: var(--wk-s-2); }
.ct-removed__list { display: flex; flex-direction: column; gap: var(--wk-s-2); color: var(--wk-text-2); max-width: 46rem; }
.ct-removed__list strong { color: var(--wk-text); }
.ct-removed__note { display: block; margin-top: var(--wk-s-1); padding-left: var(--wk-s-3); border-left: 2px solid var(--wk-line-strong); color: var(--wk-text); }
