/* Community — builders, proof and capital. A long page, so it alternates:
   calm editorial on the field, dense data inside slabs. Prefix: cm-. */

.cm-kicker {
  font-size: 0.875rem;
  font-weight: 620;
  color: var(--current);
  margin-bottom: 14px;
}

/* ── hero ──────────────────────────────────── */

.cm-hero .page-hero__plate {
  object-position: 62% 50%;
}

.cm-hero::before {
  background:
    linear-gradient(to top, color-mix(in oklab, var(--bg-deep) 94%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 46%, transparent) 50%, transparent 82%),
    linear-gradient(90deg, color-mix(in oklab, var(--bg-deep) 82%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 40%, transparent) 46%, transparent 66%);
}

[data-theme="dark"] .cm-hero .page-hero__plate {
  filter: brightness(0.5) saturate(0.85);
}

.cm-hero__title {
  max-width: 12ch;
}

.cm-loop {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.cm-loop__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cm-loop__step {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding-inline: 13px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-glass);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--line) 80%, transparent) inset;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color var(--t-med), color var(--t-med), box-shadow var(--t-med);
}

.cm-loop__step.is-active {
  background: var(--ink);
  color: var(--ink-inverse);
  box-shadow: none;
}

.cm-loop__line {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.cm-loop__word {
  display: inline-block;
  min-width: 4.6em;
  font-weight: 700;
  color: var(--ink);
  transition: opacity var(--t-med), transform var(--t-med) var(--ease-out);
}

.cm-loop__word.is-swapping {
  opacity: 0;
  transform: translateY(-4px);
}

.cm-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 560;
}

/* the signal loop, drawn: four stops on a ring and the pearl that travels it */
.cm-orbit {
  position: relative;
  width: 300px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-float), 0 0 0 1px color-mix(in oklab, var(--line) 60%, transparent) inset;
}

.cm-orbit__ring {
  position: absolute;
  inset: 30px;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  overflow: visible;
}

.cm-orbit__track {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
}

.cm-orbit__tick {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 1.5 6;
}

.cm-orbit__nodes circle {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  transition: fill var(--t-med), stroke var(--t-med);
}

.cm-orbit__nodes circle.is-on {
  fill: var(--accent);
  stroke: var(--accent);
}

.cm-orbit__pearl {
  transform-origin: 120px 120px;
  transform: rotate(calc(var(--step, 0) * 90deg));
  transition: transform 1.1s var(--ease-in-out);
}

.cm-orbit__pearl circle {
  fill: #f6eef6;
  stroke: color-mix(in oklab, var(--lilac) 70%, white);
  stroke-width: 1.5;
  filter: drop-shadow(0 3px 6px rgb(11 34 48 / 0.28));
}

.cm-orbit__label {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 640;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color var(--t-med);
}

.cm-orbit__label.is-on {
  color: var(--ink);
}

.cm-orbit__label--n { top: 8px; left: 50%; translate: -50% 0; }
.cm-orbit__label--s { bottom: 8px; left: 50%; translate: -50% 0; }
.cm-orbit__label--e { right: 4px; top: 50%; translate: 0 -50%; writing-mode: vertical-rl; }
.cm-orbit__label--w { left: 4px; top: 50%; translate: 0 -50%; writing-mode: vertical-rl; transform: rotate(180deg); }

.cm-orbit__core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.cm-orbit__core .mark {
  width: 46px;
  height: 46px;
}

@media (max-width: 1100px) {
  .cm-orbit {
    display: none;
  }
}

/* ── portal + proof ────────────────────────── */

.cm-portal__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.cm-portal__card {
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--r-panel);
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, color-mix(in oklab, var(--lilac) 18%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, color-mix(in oklab, var(--held-soft) 80%, transparent), transparent 70%),
    var(--surface);
}

.cm-portal__title {
  max-width: 14ch;
}

.cm-portal__body {
  margin: 20px 0 30px;
  max-width: 48ch;
}

.cm-proof {
  display: grid;
}

.cm-proof__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.cm-proof__item:last-child {
  border-bottom: 1px solid var(--line);
}

.cm-proof__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--current);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

.cm-proof__item p {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

@media (max-width: 960px) {
  .cm-portal__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Demo Day gallery: a sunken vitrine ────── */

.cm-gallery {
  margin: 0 var(--tank-inset);
  padding-block: var(--section);
  border-radius: var(--r-tank);
  background: var(--surface-2);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.cm-gallery__head .section-head__lede {
  max-width: 58ch;
}

.cm-census {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 24px clamp(32px, 4vw, 64px);
  align-items: end;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cm-census__stat {
  display: grid;
  gap: 8px;
}

.cm-census__value {
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  line-height: 0.86;
  font-weight: 330;
  font-stretch: 86%;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.cm-census__label {
  font-size: 0.875rem;
  font-weight: 560;
  color: var(--ink-2);
}

.cm-census__tracks {
  display: grid;
  gap: 12px;
  align-self: end;
}

.cm-bar {
  display: flex;
  gap: 3px;
  height: 14px;
}

.cm-bar__seg {
  flex: var(--n) 1 0;
  min-width: 6px;
  border-radius: 4px;
  background: var(--tone);
  transform-origin: left;
  animation: cm-grow 900ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 70ms);
}

@keyframes cm-grow {
  from {
    transform: scaleX(0);
  }
}

.cm-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.cm-bar__key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  transition: color var(--t-fast);
}

.cm-bar__key:hover,
.cm-bar__key:focus-visible {
  color: var(--ink);
}

.cm-bar__key::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--tone);
}

.cm-bar__key b {
  font-weight: 640;
  color: var(--ink);
  font-variant-numeric: lining-nums proportional-nums;
}

.cm-sub {
  display: grid;
  gap: 10px;
  margin: clamp(48px, 6vw, 80px) 0 26px;
  max-width: 70ch;
}

.cm-sub .t-body {
  max-width: 64ch;
}

.cm-sub--row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: none;
  margin-bottom: 18px;
}

/* ── project cards ─────────────────────────── */

.cm-feat-grid,
.cm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}

.cm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}

@media (hover: hover) {
  .cm-card:not(.cm-card--skel):hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-float), 0 0 0 1px var(--line) inset;
  }
}

.cm-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--held-soft), color-mix(in oklab, var(--lilac) 26%, var(--surface-2)));
  overflow: hidden;
}

.cm-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transition: transform var(--t-slow) var(--ease-out);
}

@media (hover: hover) {
  a.cm-card__cover:hover img {
    transform: scale(1.03);
  }
}

.cm-card__mono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 700;
  font-stretch: 80%;
  color: color-mix(in oklab, var(--ink) 30%, transparent);
}

.cm-card__badges {
  position: absolute;
  inset: 10px 10px auto 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.cm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding-inline: 9px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 620;
  white-space: nowrap;
  color: #0b2230;
  background: rgb(255 255 255 / 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgb(11 34 48 / 0.12);
}

.cm-pill--award {
  background: #0b2230;
  color: #f3f6f6;
}

.cm-pill--finalist {
  background: color-mix(in oklab, var(--current) 92%, black);
  color: #fff;
}

.cm-medal {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--medal, #c9a14a) 70%);
}

.cm-medal--1 { --medal: #d9a93a; }
.cm-medal--2 { --medal: #a9b8c2; }
.cm-medal--3 { --medal: #c08353; }
.cm-medal--0 { --medal: var(--accent); }

.cm-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 16px;
}

.cm-card__name {
  font-size: 1.0625rem;
  font-weight: 640;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cm-card__name a:hover {
  color: var(--link);
}

.cm-card__team {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.cm-card__line {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cm-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.cm-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: 8px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 540;
  color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.cm-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.cm-card__track {
  margin-right: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
}

.cm-card__link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding-inline: 11px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line) inset;
  transition: box-shadow var(--t-fast), background-color var(--t-fast);
}

.cm-card__link:hover {
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  background: var(--surface-2);
}

.cm-card__soon {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* investor view */
.cm-brief {
  margin-top: 4px;
  border-top: 1px solid var(--line-soft);
}

.cm-brief summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 0 3px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 620;
  color: var(--link);
}

.cm-brief summary::-webkit-details-marker {
  display: none;
}

.cm-brief summary .icon {
  transition: transform var(--t-med) var(--ease-out);
}

.cm-brief[open] summary .icon {
  transform: rotate(180deg);
}

.cm-brief__note {
  font-weight: 460;
  color: var(--ink-3);
}

.cm-brief dl {
  display: grid;
  gap: 10px;
  margin: 10px 0 4px;
}

.cm-brief dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.cm-brief dt {
  font-size: 0.8125rem;
  font-weight: 620;
  color: var(--ink-3);
}

.cm-brief dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.cm-brief__docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cm-brief__docs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding-inline: 10px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--link);
  background: var(--held-soft);
}

.cm-brief__docs .icon {
  width: 14px;
  height: 14px;
}

/* the champion takes two columns and lays out sideways */
.cm-card--lead {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.cm-card--lead .cm-card__cover {
  aspect-ratio: auto;
  min-height: 340px;
}

/* the cover fills its column; the image never sets the row height (zh posters are portrait) */
.cm-card--lead .cm-card__cover img {
  position: absolute;
  inset: 0;
}

.cm-card--lead .cm-card__body {
  padding: 22px 24px;
}

.cm-card--lead .cm-card__name {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 660;
  font-stretch: 88%;
  letter-spacing: -0.025em;
}

.cm-card--lead .cm-card__line {
  -webkit-line-clamp: 5;
  font-size: 0.9688rem;
}

.cm-card--skel {
  min-height: 300px;
}

/* toolbar shared by the gallery and the resource list */
.cm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 22px;
}

.cm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cm-gallery .chip--outline {
  background: var(--surface);
  box-shadow: none;
}

.cm-gallery .chip--button[aria-pressed="true"] {
  background: var(--ink);
}

.cm-search {
  position: relative;
  flex: 0 1 320px;
  min-width: 220px;
}

.cm-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-3);
  pointer-events: none;
}

.cm-search__input {
  min-height: 42px;
  padding-left: 40px;
  border-radius: var(--r-pill);
  background: var(--surface);
}

.cm-signals .cm-search__input {
  background: var(--surface);
}

.cm-count {
  color: var(--ink-3);
}

.cm-empty {
  border-radius: var(--r-card);
  background: var(--surface);
}

@media (max-width: 1000px) {
  .cm-feat-grid,
  .cm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cm-census {
    grid-template-columns: auto auto;
  }

  .cm-census__tracks {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .cm-feat-grid,
  .cm-grid {
    grid-template-columns: 1fr;
  }

  .cm-card--lead {
    grid-column: auto;
    display: flex;
  }

  .cm-card--lead .cm-card__cover {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .cm-search {
    flex-basis: 100%;
  }
}

/* ── start here: four steps that climb ─────── */

.cm-path {
  --rise: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  padding-top: calc(var(--rise) * 3 + 16px);
}

.cm-step {
  position: relative;
  padding: 30px 8px 0 0;
  margin-top: calc(var(--rise) * var(--down, 0));
}

.cm-step:nth-child(1) { --down: 0; margin-top: 0; }
.cm-step:nth-child(1) { transform: translateY(0); }

.cm-path .cm-step:nth-child(1) { margin-top: calc(var(--rise) * 3 * -1 + var(--rise) * 3); }

.cm-step:nth-child(1) { top: 0; }
.cm-step:nth-child(2) { top: calc(var(--rise) * -1); }
.cm-step:nth-child(3) { top: calc(var(--rise) * -2); }
.cm-step:nth-child(4) { top: calc(var(--rise) * -3); }

/* the tide line under each step, carried across the gap and down to the last one */
.cm-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: calc(var(--gutter) * -1);
  height: 1px;
  background: var(--line-strong);
}

.cm-step:last-child::before {
  right: 0;
  background: linear-gradient(90deg, var(--line-strong), var(--accent));
}

.cm-step + .cm-step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: var(--rise);
  background: var(--line-strong);
}

.cm-step__n {
  position: absolute;
  top: -15px;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  font-size: 0.8125rem;
  font-weight: 640;
}

.cm-step:last-child .cm-step__n {
  background: var(--accent);
  color: #0b2230;
  box-shadow: none;
}

.cm-step h3 {
  margin-bottom: 8px;
}

.cm-step p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 30ch;
}

@media (max-width: 900px) {
  .cm-path {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 16px;
    padding-left: 48px;
  }

  .cm-step {
    top: 0 !important;
    padding: 2px 0 0;
  }

  .cm-step::before,
  .cm-step + .cm-step::after {
    display: none;
  }

  .cm-step__n {
    top: 0;
    left: -48px;
  }

  .cm-path::before {
    content: "";
  }
}

/* ── latest signals ────────────────────────── */

.cm-res-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}

.cm-res {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 24px 24px 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

.cm-res__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--held-soft);
  color: var(--current);
}

.cm-res__title {
  font-size: 1.125rem;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.cm-res__body {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.cm-res__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.cm-res-empty {
  padding: 28px 0;
  color: var(--ink-3);
}

@media (max-width: 1000px) {
  .cm-res-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cm-res-grid {
    grid-template-columns: 1fr;
  }
}

/* ── knowledge hub: a raised slab ──────────── */

.cm-kb {
  margin: 0 var(--tank-inset);
  padding-block: var(--section-tight) var(--section-tight);
  border-radius: var(--r-tank);
  background: var(--surface);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.cm-wiki {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: clamp(28px, 4vw, 44px);
  border-radius: var(--r-panel);
  background:
    radial-gradient(ellipse 60% 120% at 100% 50%, color-mix(in oklab, var(--held-soft) 70%, transparent), transparent 70%),
    var(--bg);
}

.cm-wiki__copy {
  max-width: 64ch;
}

.cm-wiki__copy p {
  margin-top: 8px;
  color: var(--ink-2);
}

.cm-kb__tabs {
  margin-bottom: 18px;
}

.cm-kb__status {
  margin-bottom: 18px;
  color: var(--ink-3);
}

.cm-kb__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  min-height: 300px;
}

.cm-kcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--bg);
  min-width: 0;
}

.cm-kcard--skel {
  min-height: 210px;
  background: var(--bg);
}

.cm-kcard__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
}

.cm-kcard__type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cm-kcard__type::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone, var(--current));
}

.cm-kcard__title {
  font-size: 1.0625rem;
  font-weight: 640;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.cm-kcard__summary {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.cm-kcard__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.cm-kcard__metrics dt {
  display: inline;
  color: var(--ink-3);
  font-weight: 560;
}

.cm-kcard__metrics dt::after {
  content: " ";
}

.cm-kcard__metrics dd {
  display: inline;
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.cm-kcard__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.cm-kcard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cm-kcard__cta {
  font-size: 0.875rem;
  font-weight: 600;
}

.cm-kb__note {
  grid-column: 1 / -1;
  padding: 40px 0;
  color: var(--ink-2);
}

.cm-kb__pager {
  justify-content: center;
  gap: 16px;
  margin-top: 26px;
}

.cm-kb__page {
  min-width: 5ch;
  text-align: center;
  color: var(--ink-2);
}

@media (max-width: 1000px) {
  .cm-kb__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cm-kb__grid {
    grid-template-columns: 1fr;
  }
}

/* ── open-source atlas: four quadrants ─────── */

.cm-atlas__map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.cm-stack {
  padding: clamp(24px, 3vw, 40px) clamp(4px, 2vw, 36px) clamp(24px, 3vw, 40px) 0;
  background: var(--bg);
}

.cm-stack:nth-child(even) {
  padding-left: clamp(20px, 3vw, 44px);
}

.cm-stack__title {
  font-size: var(--fs-h3);
  font-weight: 640;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.cm-stack__list {
  display: grid;
  gap: 12px;
}

.cm-stack__list li {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.cm-stack__list code {
  font-size: 0.8125rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

@media (max-width: 760px) {
  .cm-atlas__map {
    grid-template-columns: 1fr;
  }

  .cm-stack,
  .cm-stack:nth-child(even) {
    padding-left: 0;
  }
}

/* ── VC matching ───────────────────────────── */

.cm-vc__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.cm-vc__copy .t-lede {
  margin: 16px 0 28px;
}

.cm-vc__card {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 26px 28px 28px;
  border-radius: var(--r-card);
  background: var(--surface);
}

.cm-vc__card p {
  color: var(--ink-2);
  margin-bottom: 6px;
}

.cm-vc__steps {
  display: grid;
}

.cm-vc__step {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.cm-vc__step:last-child {
  border-bottom: 1px solid var(--line);
}

.cm-vc__n {
  font-size: 2.6rem;
  line-height: 0.9;
  font-weight: 330;
  font-stretch: 86%;
  letter-spacing: -0.04em;
  color: var(--ink-3);
}

.cm-vc__step h3 {
  margin-bottom: 6px;
}

.cm-vc__step p {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

@media (max-width: 960px) {
  .cm-vc__grid {
    grid-template-columns: 1fr;
  }

  .cm-vc__step {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}

/* ── join: two doors on the reef ───────────── */

.cm-join {
  position: relative;
  margin: 0 var(--tank-inset) var(--section-tight);
  border-radius: var(--r-tank);
  overflow: clip;
  isolation: isolate;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.cm-join__plate {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* the reef frames the edges; the words and doors sit over the open water in the middle */
.cm-join::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 46% 52% at 50% 26%, color-mix(in oklab, var(--bg-deep) 78%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 40%, transparent) 62%, transparent 100%),
    linear-gradient(to bottom, color-mix(in oklab, var(--bg-deep) 34%, transparent), transparent 40%, color-mix(in oklab, var(--bg-deep) 30%, transparent));
}

[data-theme="dark"] .cm-join__plate {
  filter: brightness(0.42) saturate(0.85);
}

[data-theme="dark"] .cm-join::before {
  background:
    radial-gradient(ellipse 50% 56% at 50% 28%, rgb(5 17 25 / 0.82) 0%, rgb(5 17 25 / 0.45) 64%, transparent 100%),
    linear-gradient(to bottom, rgb(5 17 25 / 0.5), rgb(5 17 25 / 0.2) 50%, rgb(5 17 25 / 0.5));
}

.cm-join__inner {
  display: grid;
  justify-items: center;
  gap: clamp(36px, 5vw, 64px);
  padding-block: clamp(64px, 9vw, 128px);
}

.cm-join__head {
  text-align: center;
  display: grid;
  justify-items: center;
}

.cm-join__title {
  max-width: 14ch;
}

.cm-join__body {
  margin-top: 18px;
  max-width: 50ch;
  font-size: var(--fs-body-l);
  line-height: 1.55;
  color: var(--ink);
  opacity: 0.86;
}

.cm-join__doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  width: 100%;
  max-width: 1060px;
}

.cm-door {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: var(--r-panel);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-float), 0 0 0 1px color-mix(in oklab, var(--line) 60%, transparent) inset;
}

.cm-door__qr {
  width: 148px;
  height: 148px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(11 34 48 / 0.08) inset;
}

.cm-door__qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cm-door__mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  align-self: start;
  border-radius: 20px;
  background: #5865f2;
  color: #fff;
}

.cm-door__mark .icon {
  width: 34px;
  height: 34px;
}

.cm-door__label {
  font-size: 0.8125rem;
  font-weight: 640;
  color: var(--current);
  margin-bottom: 4px;
}

.cm-door__copy > p:not(.cm-door__label) {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.cm-door__invite code {
  font-size: 0.8125rem;
}

.cm-door .btn {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .cm-join__doors {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .cm-door {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-orbit__pearl,
  .cm-bar__seg {
    transition: none;
    animation: none;
  }
}

/* phones: the copy spans the full width, so the veil does too */
@media (max-width: 640px) {
  .cm-hero::before {
    background: linear-gradient(to bottom, color-mix(in oklab, var(--bg-deep) 74%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 86%, transparent) 40%, color-mix(in oklab, var(--bg-deep) 94%, transparent) 100%);
  }

  [data-theme="dark"] .cm-hero::before {
    background: linear-gradient(to bottom, rgb(5 17 25 / 0.72) 0%, rgb(5 17 25 / 0.86) 40%, rgb(5 17 25 / 0.94) 100%);
  }
}

.cm-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* Chinese headings break at phrase boundaries (punctuation, spaces, <wbr>), never inside a
   word; a phrase wider than the line still wraps rather than overflowing. */
:lang(zh) main :is(h1, h2, h3, h4) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:lang(zh) .cm-hero__title {
  max-width: 10em;
}

:lang(zh) .cm-portal__title {
  max-width: 9em;
}
