.community-page { background: #fff; color: #16263a; font-family: var(--m2a-font-sans, 'Google Sans Flex', system-ui, Arial, sans-serif); }
.cm-main { box-sizing: border-box; width: min(1040px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 80px; }
.cm-eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5a6b78; }
.cm-main h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.cm-lead { max-width: 640px; margin: 18px 0 0; font-size: 19px; line-height: 1.6; color: #263847; text-wrap: pretty; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin: 44px 0 0; }
.cm-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px; border: 1px solid #dce3e5; border-radius: 18px; background: #fff; }
.cm-card img, .cm-letter { width: 36px; height: 36px; }
.cm-letter { display: grid; place-items: center; border-radius: 9px; background: #5865f2; color: #fff; font-weight: 700; }
.cm-card h2 { margin: 8px 0 0; font-size: 22px; font-weight: 650; }
.cm-card p { margin: 0; font-size: 18px; line-height: 1.65; color: #35353b; text-wrap: pretty; }
.cm-soon { margin-top: auto; padding: 4px 12px; border: 1px dashed #b9c5c2; border-radius: 999px; background: #f3f6f4; color: #48655a; font-size: 14px; font-weight: 600; }
.cm-note { margin: 56px 0 0; padding-top: 28px; border-top: 1px solid #dce3e5; }
.cm-note h2 { margin: 0 0 8px; font-size: 22px; font-weight: 650; }
.cm-note p { max-width: 640px; margin: 0; font-size: 18px; line-height: 1.65; color: #35353b; }
.cm-note a { color: #2f6f5c; font-weight: 600; }
.cm-footer { padding: 28px 0 40px; border-top: 1px solid #edf1f0; text-align: center; font-size: 14px; color: #5a6b78; }

/* Open sections share the documentation's text hierarchy and rules. */
.community-page { color: var(--m2a-text, #303740); }
.cm-main :is(h1, h2), .cm-eyebrow { color: var(--m2a-ink, #17212b); }
.cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; margin-top: 40px; }
.cm-card { padding: 24px 0 0; border: 0; border-top: 1px solid var(--m2a-line, #dde3e6); border-radius: 0; gap: 12px; }
.cm-card h2 { margin: 0; }
.cm-card p, .cm-lead, .cm-note p { color: var(--m2a-text, #303740); }
.cm-soon { margin-top: 4px; border: 0; border-radius: 4px; padding: 3px 9px; color: var(--m2a-muted, #4c5965); background: var(--m2a-soft, #f6f8f9); }
.cm-note { margin-top: 48px; padding-top: 24px; border-color: var(--m2a-line, #dde3e6); }
.cm-note a { color: var(--m2a-link, #205fbd); text-underline-offset: 3px; }
@media (max-width: 600px) {
  .cm-main { padding-top: 40px; }
  .cm-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Group QR codes: a framed card with the group name beneath. */
.cm-card { scroll-margin-top: 96px; }
.cm-qr {
  box-sizing: border-box; width: 100%; max-width: 288px; margin: 6px 0 0; padding: 14px;
  border: 1px solid var(--m2a-line, #dde3e6); border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(23, 33, 43, .04), 0 16px 40px -28px rgba(23, 33, 43, .22);
}
.cm-qr img { display: block; width: 100%; height: auto; border-radius: 8px; }
.cm-qr figcaption { margin: 10px 0 0; font-size: 14px; font-weight: 650; line-height: 1.4; text-align: center; color: var(--m2a-ink, #17212b); }
.cm-card .cm-qr-note { margin: 2px 0 0; max-width: 360px; font-size: 14px; line-height: 1.6; color: var(--m2a-muted, #4c5965); }
.cm-card:target .cm-qr { border-color: #07c160; }
@media (max-width: 600px) {
  .cm-qr { max-width: 260px; }
}
/* Invite link (Discord): a pill button in the platform colour. */
.cm-join {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 11px 20px;
  border-radius: 999px; background: #5865f2; color: #fff; font-size: 16px; font-weight: 650; line-height: 1;
  text-decoration: none; box-shadow: 0 6px 20px -10px rgba(88, 101, 242, .7);
}
.cm-join:hover { background: #4752c4; }
.cm-join:focus-visible { outline: 2px solid #4752c4; outline-offset: 3px; }
.cm-join img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.cm-card .cm-join img { width: 18px; height: 18px; }

/* Secondary destinations follow the same open two-column grid as the groups. */
.cm-next-links { display:grid; grid-template-columns:1fr 1fr; gap:48px; margin-top:40px; padding:28px 0; border-top:1px solid #dce3e5; border-bottom:1px solid #dce3e5; }
.cm-next-links>a { display:block; padding:0; text-decoration:none; }
.cm-next-links h2 { display:flex; align-items:baseline; justify-content:flex-start; gap:12px; margin:0 0 8px; font-size:21px; line-height:1.4; font-weight:600; color:#205fbd; }
.cm-next-links h2 span { font-size:20px; font-weight:400; }
.cm-next-links p { margin:0; font-size:17px; line-height:1.6; color:#354853; text-wrap:pretty; }
.cm-next-links>a:hover h2 { color:#17478c; text-decoration:underline; text-underline-offset:5px; }
.cm-contact { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 24px; padding:24px 0 0; }
.cm-contact h2 { margin:0; font-size:18px; font-weight:600; }
.cm-contact a { color:#205fbd; font-size:18px; text-underline-offset:4px; overflow-wrap:anywhere; }
.cm-qr>a { display:block; }
.cm-main a:focus-visible { outline:2px solid #205fbd; outline-offset:4px; }
@media(max-width:600px) { .cm-next-links { grid-template-columns:1fr; gap:24px; } }

/* Match all four community entry points, including the Discord invitation. */
.cm-card-heading { display:flex; align-items:center; gap:12px; min-height:36px; }
.cm-card-heading h2 { margin:0; }
.cm-card .cm-card-description { min-height:60px; }
.cm-qr { width:288px; max-width:100%; margin-top:6px; }
.cm-qr>a { height:300px; display:flex; align-items:center; justify-content:center; }
.cm-qr img { width:100%; height:100%; object-fit:contain; }
.cm-qr figcaption { min-height:40px; display:flex; align-items:center; justify-content:center; margin-top:12px; }
.cm-card .cm-join { margin:2px 0 0; padding:0; border-radius:0; background:none; box-shadow:none; color:#205fbd; font-size:16px; font-weight:600; line-height:1.6; text-decoration:underline; text-underline-offset:4px; }
.cm-card .cm-join img { filter:none; }
.cm-card .cm-join:hover { background:none; color:#17478c; }
@media(max-width:600px) { .cm-card .cm-card-description { min-height:0; } }
