/* =====================================================================
   Community — feed & clubs (static/community/cm-feed.css)

   Slice A's own styles: the composer, the welcome checklist, the sidebar
   bits that are not shared panels, the club directory and a club's header,
   and the intro page for visitors. Linked from {% block cm_head %} of
   hub.html, club.html, clubs.html and intro.html, after community.css.

   RULES (the same as community.css)
   - Every class here starts with `cm-feed-`; shared primitives (.cm-panel,
     .cm-subtabs, .cm-post, .cm-empty …) are reused, never restyled.
   - Tokens from ctg-ui.css only; logical properties only.
   - Selectors start with `.cm `, so ties with ctg-ui (`.ctg .x`) and
     community.css land here: this file loads last.
   ===================================================================== */

/* ---------- 1. Composer ------------------------------------------------- */
.cm .cm-feed-composer { padding: 14px 16px; }
.cm .cm-feed-opener {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px;
  padding: 6px; padding-inline-end: 14px; border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--surface-2); color: var(--text-3); font: inherit; font-size: 15px; text-align: start;
  cursor: text; transition: border-color .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease);
}
.cm .cm-feed-opener:hover { border-color: var(--primary); background: var(--surface); }
.cm .cm-feed-opener:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cm .cm-feed-opener[hidden] { display: none; }
.cm .cm-feed-opener .cm-avatar { flex: none; }
.cm .cm-feed-opener__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm .cm-feed-opener__icons { flex: none; display: inline-flex; gap: 12px; font-size: 15px; }
.cm .cm-feed-opener__icons .fa-circle-question { color: var(--sky); }
.cm .cm-feed-opener__icons .fa-spell-check { color: var(--amber); }
.cm .cm-feed-opener__icons .fa-image { color: var(--green); }
@media (max-width: 420px) { .cm .cm-feed-opener__icons { display: none; } }

.cm .cm-feed-form[hidden] { display: none; }
.cm .cm-feed-form__top { margin-block-end: 12px; }

.cm .cm-feed-kinds {
  display: flex; flex-wrap: wrap; gap: 8px; min-width: 0;
  margin: 0 0 12px; padding: 0; border: 0;
}
.cm .cm-feed-kind { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
/* The real radio stays in the page (keyboard, forms, screen readers); only
   its look is replaced by the pill next to it. */
.cm .cm-feed-kind input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.cm .cm-feed-kind__box {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding-inline: 13px;
  border: 1px solid var(--border-2); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font-size: 13.5px; font-weight: 700; white-space: nowrap;
  transition: background .13s var(--ease), border-color .13s var(--ease), color .13s var(--ease);
}
.cm .cm-feed-kind__box i { font-size: 13px; color: var(--text-3); }
.cm .cm-feed-kind:hover .cm-feed-kind__box { border-color: var(--primary); }
.cm .cm-feed-kind input:checked + .cm-feed-kind__box {
  background: var(--primary-50); border-color: var(--primary); color: var(--primary-700);
}
.cm .cm-feed-kind input:checked + .cm-feed-kind__box i { color: var(--primary); }
.cm .cm-feed-kind input:focus-visible + .cm-feed-kind__box { outline: 2px solid var(--primary); outline-offset: 2px; }

.cm .cm-feed-field { margin: 0; }
.cm .cm-feed-text { min-height: 128px; font-size: 15.5px; line-height: 1.58; resize: vertical; }

.cm .cm-feed-attached {
  display: flex; align-items: baseline; gap: 8px; margin-block-start: 10px;
  padding-block: 7px; padding-inline: 12px 6px; border-radius: var(--r); background: var(--amber-bg);
  font-size: 13px; line-height: 1.45; color: var(--text);
}
.cm .cm-feed-attached[hidden] { display: none; }
.cm .cm-feed-attached > i { color: var(--amber); font-size: 12px; }
.cm .cm-feed-attached__k {
  flex: none; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--amber);
}
.cm .cm-feed-attached__t { flex: 1 1 auto; min-width: 0; }
.cm .cm-feed-attached__x { flex: none; width: 30px; height: 30px; justify-content: center; padding: 0; align-self: center; }
.cm .cm-feed-attached__x[hidden] { display: none; }

.cm .cm-feed-note {
  display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 0;
  padding: 10px 12px; border-radius: var(--r); background: var(--sky-bg);
  font-size: 13.5px; line-height: 1.5; color: var(--text);
}
.cm .cm-feed-note[hidden] { display: none; }
.cm .cm-feed-note i { margin-block-start: 3px; color: var(--sky); }

/* The AI helper: quiet, clearly labelled, and only ever private. */
.cm .cm-feed-assist { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-block-start: 10px; }
.cm .cm-feed-assist[hidden] { display: none; }
.cm .cm-feed-assist__btn i { color: var(--purple); }
.cm .cm-feed-assist__btn[aria-busy="true"] { cursor: progress; }
.cm .cm-feed-assist__small { font-size: 12.5px; color: var(--text-3); }
.cm .cm-feed-suggest {
  flex: 1 1 100%; margin-block-start: 4px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--purple) 22%, var(--border));
  border-inline-start: 3px solid var(--purple); border-radius: var(--r);
  background: color-mix(in srgb, var(--purple-bg) 55%, var(--surface));
}
.cm .cm-feed-suggest[hidden] { display: none; }
.cm .cm-feed-suggest__title {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--purple);
}
.cm .cm-feed-suggest__note { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.cm .cm-feed-suggest__note:empty { display: none; }
.cm .cm-feed-suggest__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cm .cm-feed-suggest__list:empty { display: none; }
.cm .cm-feed-sugg {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 9px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.cm .cm-feed-sugg__fix { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.cm .cm-feed-sugg__fix del { color: var(--rose); text-decoration-thickness: 1.5px; }
.cm .cm-feed-sugg__fix ins { color: var(--green); font-weight: 700; text-decoration: none; }
.cm .cm-feed-sugg__arrow { margin-inline: 6px; color: var(--text-3); }
.cm .cm-feed-sugg__why { grid-column: 1; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.cm .cm-feed-sugg__apply { grid-column: 2; grid-row: 1 / span 2; }
.cm .cm-feed-sugg.is-stale .cm-feed-sugg__fix { opacity: .6; }
@media (max-width: 420px) {
  .cm .cm-feed-sugg { grid-template-columns: minmax(0, 1fr); }
  .cm .cm-feed-sugg__apply { grid-column: 1; grid-row: auto; justify-self: start; }
}

.cm .cm-feed-more { margin-block-start: 12px; border-block-start: 1px solid var(--surface-3); }
.cm .cm-feed-more > summary {
  display: inline-flex; align-items: center; gap: 8px; margin-block-start: 8px; padding: 6px 10px;
  margin-inline-start: -10px; border-radius: 9px; list-style: none; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--text-2);
}
.cm .cm-feed-more > summary::-webkit-details-marker { display: none; }
.cm .cm-feed-more > summary::after {
  content: ""; width: 7px; height: 7px; margin-inline-start: 2px;
  border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .15s var(--ease);
}
.cm .cm-feed-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.cm .cm-feed-more > summary:hover { background: var(--surface-3); color: var(--text); }
.cm .cm-feed-more > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cm .cm-feed-more > summary i { color: var(--text-3); }
.cm .cm-feed-more__body {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding-block: 10px 4px;
}
.cm .cm-feed-more__body > .field { margin: 0; min-width: 0; }
.cm .cm-feed-more__body > [hidden] { display: none; }
.cm .cm-feed-who, .cm .cm-feed-photo-field { grid-column: 1 / -1; }
.cm .cm-feed-who { min-width: 0; padding: 0; border: 0; }
.cm .cm-feed-who legend { float: none; width: auto; padding: 0; }
.cm .cm-feed-radio {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-inline-end: 18px;
  min-height: 36px; font-size: 14px; color: var(--text); cursor: pointer;
}
.cm .cm-feed-radio input { margin: 0; }
.cm .cm-feed-radio:has(input:disabled) { color: var(--text-3); cursor: not-allowed; }
.cm .cm-feed-radio__small { font-size: 12.5px; color: var(--text-3); }
.cm .cm-feed-photo-field input[type="file"] { padding-block: 8px; }
.cm .cm-feed-photo {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 10px 0 0;
}
.cm .cm-feed-photo[hidden] { display: none; }
.cm .cm-feed-photo img {
  display: block; max-width: min(100%, 280px); max-height: 210px; object-fit: cover;
  border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2);
}
@media (max-width: 620px) { .cm .cm-feed-more__body { grid-template-columns: minmax(0, 1fr); } }

/* The post button stays reachable while a long text is being written on a
   phone: the row sticks to the bottom of the screen, above the home bar. */
.cm .cm-feed-submit {
  position: sticky; inset-block-end: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin: 12px -16px -14px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-block-start: 1px solid var(--surface-3);
  border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg);
}
.cm .cm-feed-submit__hint {
  display: flex; align-items: center; gap: 7px; margin: 0; min-width: 0;
  font-size: 12.5px; color: var(--text-3);
}
.cm .cm-feed-submit__hint a { color: var(--primary); font-weight: 650; }
.cm .cm-feed-submit__hint a:hover { text-decoration: underline; }
.cm .cm-feed-submit__buttons { display: flex; gap: 8px; margin-inline-start: auto; }
.cm .cm-feed-submit__buttons [hidden] { display: none; }
.cm .cm-feed-submit [data-cm-submit][aria-busy="true"] { cursor: progress; opacity: .75; }
.cm .cm-feed-composer .cm-form-error { margin-block-start: 12px; }
@media (max-width: 560px) {
  .cm .cm-feed-composer { padding: 12px 14px; }
  .cm .cm-feed-submit { margin-inline: -14px; margin-block-end: -12px; padding-inline: 14px; }
  .cm .cm-feed-submit__hint { flex: 1 1 100%; }
  .cm .cm-feed-submit__buttons { flex: 1 1 100%; }
  .cm .cm-feed-submit__buttons .btn { flex: 1 1 0; }
}

/* A member who must accept new guidelines sees this instead of the form. */
.cm .cm-feed-reaccept { display: flex; align-items: flex-start; gap: 14px; }
.cm .cm-feed-reaccept__icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary); font-size: 16px;
}
.cm .cm-feed-reaccept .cm-panel__body { margin-block: 4px 12px; }

/* ---------- 2. Above the feed: filter, older pages ---------------------- */
.cm .cm-feed-filter {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-inline-start: 4px solid var(--accent);
}
.cm .cm-feed-filter__main { min-width: 0; flex: 1 1 260px; }
.cm .cm-feed-filter__k {
  display: flex; align-items: center; gap: 7px; margin: 0;
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.cm .cm-feed-filter__t { margin: 4px 0 0; font-size: 15px; line-height: 1.5; font-weight: 650; color: var(--text); }
.cm .cm-feed-older {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0;
  font-size: 13.5px; color: var(--text-2);
}
.cm .cm-feed-older i { color: var(--text-3); }
.cm .cm-feed-older a { color: var(--primary); font-weight: 700; }
.cm .cm-feed-older a:hover { text-decoration: underline; }

/* ---------- 3. Welcome checklist ----------------------------------------- */
.cm .cm-feed-welcome {
  background: linear-gradient(180deg, color-mix(in srgb, var(--green-bg) 60%, var(--surface)) 0%, var(--surface) 70%);
}
.cm .cm-feed-welcome .cm-panel__head { margin-block-end: 8px; }
.cm .cm-feed-welcome__close { width: 34px; justify-content: center; padding: 0; margin-inline-end: -8px; }
.cm .cm-feed-welcome__progress { display: flex; align-items: center; gap: 12px; margin-block-end: 12px; }
.cm .cm-feed-welcome__count { flex: none; margin: 0; font-size: 12.5px; font-weight: 750; color: var(--text-2); }
.cm .cm-feed-welcome__progress .ctg-bar { flex: 1 1 auto; height: 6px; }
.cm .cm-feed-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cm .cm-feed-step { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.cm .cm-feed-step + .cm-feed-step { border-block-start: 1px solid var(--surface-3); }
.cm .cm-feed-step__mark {
  flex: none; width: 26px; height: 26px; margin-block-start: 1px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--border-2);
  font-size: 12px; font-weight: 800; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.cm .cm-feed-step.is-done .cm-feed-step__mark { background: var(--green); border-color: var(--green); color: #fff; font-size: 11px; }
.cm .cm-feed-step__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm .cm-feed-step__title { font-size: 14.5px; font-weight: 750; line-height: 1.35; color: var(--text); }
.cm a.cm-feed-step__title { color: var(--primary-700); }
.cm a.cm-feed-step__title:hover { color: var(--primary); text-decoration: underline; }
.cm .cm-feed-step.is-done .cm-feed-step__title { color: var(--text-3); font-weight: 650; }
.cm .cm-feed-step__hint { font-size: 13px; line-height: 1.45; color: var(--text-3); }

/* ---------- 4. Sidebar bits ----------------------------------------------- */
.cm .cm-feed-me__hint {
  display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 9px 10px;
  border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 1.45;
}
.cm .cm-feed-me__hint i { margin-block-start: 3px; color: var(--primary); }
.cm .cm-feed-me__hint a { color: var(--primary-700); font-weight: 650; }
.cm .cm-feed-me__hint a:hover { text-decoration: underline; }
.cm .cm-feed-prompt-card__how { margin: 6px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.cm .cm-feed-prompt-card .btnrow { align-items: center; gap: 8px 14px; }
.cm .cm-feed-side__sub {
  margin: 14px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
}
.cm .cm-feed-minis { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.cm .cm-feed-mini { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cm .cm-feed-mini__emoji {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-bg); font-size: 16px;
}
.cm .cm-feed-mini__name {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.cm .cm-feed-mini__name:hover { color: var(--primary); }
.cm .cm-feed-helpers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cm .cm-feed-helper { display: flex; align-items: center; gap: 10px; }
.cm .cm-feed-helper .cm-chip { flex: 1 1 auto; }
.cm .cm-feed-helper .cm-count { background: var(--green-bg); color: var(--green); }
/* The club whose page this is, among "My clubs". */
.cm .cm-side .chip[aria-current="page"], .cm .cm-strip .chip[aria-current="page"] {
  border-color: var(--primary); background: var(--primary-50); color: var(--primary-700);
}

/* ---------- 5. Join toggle (directory, club page, sidebar) ------------- */
.cm .cm-feed-join { flex: none; min-width: 84px; }
.cm .cm-feed-join[aria-pressed="false"] {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.cm .cm-feed-join[aria-pressed="false"]:hover { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }
.cm .cm-feed-join[aria-pressed="true"] { background: var(--surface); border-color: var(--border-2); color: var(--text-2); }
.cm .cm-feed-join[aria-pressed="true"]:hover { background: var(--surface-3); color: var(--text); }
.cm .cm-feed-join[aria-pressed="true"] .cm-feed-join__off,
.cm .cm-feed-join[aria-pressed="false"] .cm-feed-join__on { display: none; }
.cm .cm-feed-join .cm-feed-join__on { color: var(--green); }
.cm .cm-feed-join[aria-busy="true"] { cursor: progress; opacity: .7; }
.cm .cm-feed-join--lg { height: 42px; min-width: 128px; padding-inline: 18px; }

/* ---------- 6. Club directory --------------------------------------------- */
.cm .cm-feed-clubs {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}
.cm .cm-feed-clubs__empty { grid-column: 1 / -1; }
.cm .cm-feed-club {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr);
  grid-template-areas: "emoji main" "emoji join"; gap: 10px 14px; align-content: start;
  padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.cm .cm-feed-club:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.cm .cm-feed-club:focus-within { border-color: var(--accent); }
.cm .cm-feed-club:has(.cm-feed-join[aria-pressed="true"]) {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-bg) 55%, var(--surface)) 0%, var(--surface) 55%);
}
.cm .cm-feed-club__emoji {
  grid-area: emoji; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-bg); font-size: 22px;
}
.cm .cm-feed-club__main { grid-area: main; min-width: 0; }
.cm .cm-feed-club__name { margin: 0; font-size: 15.5px; font-weight: 780; letter-spacing: -.01em; line-height: 1.3; }
.cm .cm-feed-club__name a { color: var(--text); }
.cm .cm-feed-club__name a:hover { color: var(--accent); }
/* The name's link covers the card; the Join button is lifted above it. */
.cm .cm-feed-club__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cm .cm-feed-club__name a:focus-visible { outline: none; }
.cm .cm-feed-club:has(.cm-feed-club__name a:focus-visible) { box-shadow: 0 0 0 3px var(--primary-100); border-color: var(--primary); }
.cm .cm-feed-club__desc { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.cm .cm-feed-club__meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0;
  font-size: 12.5px; font-weight: 650; color: var(--text-3);
}
.cm .cm-feed-club__stat { display: inline-flex; align-items: center; gap: 6px; }
.cm .cm-feed-club__stat .cm-n { color: var(--text-2); font-variant-numeric: tabular-nums; }
.cm .cm-feed-club .cm-feed-join { grid-area: join; justify-self: start; position: relative; z-index: 1; }

/* ---------- 7. A club's header -------------------------------------------- */
.cm .cm-feed-back { margin-block-end: 12px; }
.cm .cm-feed-clubhead {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px 18px; margin-block-end: 22px;
  padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, var(--accent-bg) 0%, var(--surface) 72%);
}
.cm .cm-feed-clubhead__emoji {
  flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow-sm); font-size: 32px;
}
.cm .cm-feed-clubhead__main { flex: 1 1 280px; min-width: 0; }
.cm .cm-feed-clubhead__name { margin: 2px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--text); }
.cm .cm-feed-clubhead__desc { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.cm .cm-feed-clubhead__actions { flex: none; align-self: center; }
@media (max-width: 560px) {
  .cm .cm-feed-clubhead { padding: 16px; gap: 12px 14px; margin-block-end: 16px; }
  .cm .cm-feed-clubhead__emoji { width: 52px; height: 52px; font-size: 26px; border-radius: 15px; }
  .cm .cm-feed-clubhead__name { font-size: 23px; }
  .cm .cm-feed-clubhead__main { flex-basis: calc(100% - 66px); }
  .cm .cm-feed-clubhead__actions { flex: 1 1 100%; }
  .cm .cm-feed-clubhead__actions .cm-feed-join { width: 100%; }
}

/* ---------- 8. Intro (visitors and people who have not joined) ------------ */
.cm .cm-feed-hero {
  margin-block-end: 20px; padding: 30px 30px 24px;
  border: 1px solid var(--primary-100); border-radius: var(--r-xl);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--amber-bg) 80%, transparent) 0%, transparent 55%),
    linear-gradient(160deg, var(--primary-50) 0%, var(--surface) 65%);
  box-shadow: var(--shadow-sm);
}
.cm .cm-feed-hero--quiet { background: var(--surface); border-color: var(--border); }
.cm .cm-feed-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.cm .cm-feed-hero__text { min-width: 0; }
/* Two small cards on the right: what a correction and a question look like. */
.cm .cm-feed-sample { display: none; }
@media (min-width: 900px) {
  .cm .cm-feed-hero:has(.cm-feed-sample) { grid-template-columns: minmax(0, 1fr) 250px; align-items: center; }
  .cm .cm-feed-sample { display: grid; gap: 12px; }
}
.cm .cm-feed-sample__card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); transform: rotate(-1.5deg);
}
.cm .cm-feed-sample__card--tilt { transform: rotate(1.5deg); margin-inline-start: 18px; }
.cm .cm-feed-sample__text { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 650; color: var(--text); }
.cm .cm-feed-sample__text del { color: var(--rose); }
.cm .cm-feed-sample__text ins { color: var(--green); text-decoration: none; font-weight: 800; }
.cm .cm-feed-sample__why { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.cm .cm-feed-sample__why i { color: var(--green); }
.cm .cm-feed-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--primary);
}
.cm .cm-feed-hero h1 { margin: 0; max-width: 18ch; font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--text); }
.cm .cm-feed-hero--quiet h1 { max-width: none; font-size: 28px; }
.cm .cm-feed-hero__lead { margin: 14px 0 0; max-width: 60ch; font-size: 16.5px; line-height: 1.6; color: var(--text-2); }
.cm .cm-feed-hero__cta { margin-block-start: 20px; }
.cm .cm-feed-hero__small { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.cm .cm-feed-hero__counts {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 16px 0 0;
  font-size: 13.5px; font-weight: 700; color: var(--text-2);
}
.cm .cm-feed-hero__counts i { margin-inline-end: 4px; color: var(--primary); }
.cm .cm-feed-hero__links { margin-block-start: 18px; }
@media (max-width: 560px) {
  .cm .cm-feed-hero { padding: 22px 18px 18px; margin-block-end: 16px; }
  .cm .cm-feed-hero h1 { font-size: 27px; }
  .cm .cm-feed-hero--quiet h1 { font-size: 23px; }
  .cm .cm-feed-hero__lead { font-size: 15.5px; }
  .cm .cm-feed-hero__cta .btn { flex: 1 1 100%; }
}

.cm .cm-feed-intro__h { margin: 8px 0 12px; font-size: 18px; font-weight: 800; letter-spacing: -.015em; color: var(--text); }
.cm .cm-feed-values {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.cm .cm-feed-value {
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.cm .cm-feed-value h3 { margin: 12px 0 4px; font-size: 15.5px; font-weight: 780; letter-spacing: -.01em; color: var(--text); }
.cm .cm-feed-value p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
@media (max-width: 620px) { .cm .cm-feed-values { grid-template-columns: minmax(0, 1fr); } }

.cm .cm-feed-ai, .cm .cm-feed-minor { display: flex; align-items: flex-start; gap: 14px; }
.cm .cm-feed-ai .cm-panel__body + .cm-panel__body, .cm .cm-feed-minor .cm-panel__body { margin-block-start: 8px; }
.cm .cm-feed-ai .cm-panel__title { margin-block-end: 6px; }
.cm .cm-feed-minor .btn { margin-block-start: 14px; }

.cm .cm-feed-how {
  list-style: none; counter-reset: cm-feed-step; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.cm .cm-feed-how li {
  counter-increment: cm-feed-step; position: relative; padding-block: 16px; padding-inline: 58px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.cm .cm-feed-how li::before {
  content: counter(cm-feed-step); position: absolute; inset-inline-start: 16px; inset-block-start: 16px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 13.5px; font-weight: 800;
}
.cm .cm-feed-how h3 { margin: 4px 0 4px; font-size: 15px; font-weight: 780; color: var(--text); }
.cm .cm-feed-how p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
@media (max-width: 760px) { .cm .cm-feed-how { grid-template-columns: minmax(0, 1fr); } }

.cm .cm-feed-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm .cm-feed-checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--text); }
.cm .cm-feed-checks i { margin-block-start: 4px; font-size: 12px; color: var(--green); }

.cm .cm-feed-intro__clubs { list-style: none; margin: 0; padding: 0; }
.cm .cm-feed-intro__clubs .chip { height: 34px; }

.cm .cm-feed-final {
  display: flex; flex-direction: column; align-items: center; gap: 14px; margin-block-start: 4px;
  padding: 26px 20px; text-align: center; border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--primary-50) 0%, var(--surface-2) 100%);
}
.cm .cm-feed-final h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.cm .cm-feed-final .btnrow { justify-content: center; }

/* ---------- 9. Motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .cm .cm-feed-opener, .cm .cm-feed-kind__box, .cm .cm-feed-club, .cm .cm-feed-more > summary::after { transition: none; }
  .cm .cm-feed-sample__card { transform: none; }
}
