/* News and Organizations pages. */
.cm-page {
    --cm-navy: #001035;
    --cm-ink: #111942;
    --cm-muted: #5b6480;
    --cm-line: #dfe3ee;
    --cm-blue: #316cff;
    --cm-gold: #ffd700;
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 4rem;
    color: var(--cm-ink);
}

.cm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.cm-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cm-blue); }
.cm-title { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.1; margin: 0.2rem 0 0; text-wrap: balance; }
.cm-lede { color: var(--cm-muted); max-width: 60ch; margin-top: 0.5rem; }
.cm-back { display: inline-block; margin-bottom: 1rem; font-size: 0.85rem; font-weight: 700; color: var(--cm-muted); }
.cm-back:hover { color: var(--cm-blue); }

.cm-card { background: #fff; border: 1px solid var(--cm-line); border-radius: 16px; box-shadow: 0 2px 8px rgba(7, 10, 18, 0.05); }
.cm-pad { padding: 1.25rem; }
.cm-section-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cm-muted); margin: 0 0 0.85rem; }
.cm-empty { padding: 2.5rem 1rem; text-align: center; color: var(--cm-muted); }
.cm-stack > * + * { margin-top: 1rem; }

.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 40px; padding: 0.5rem 1.1rem; border-radius: 9999px; border: 1px solid transparent; background: var(--cm-navy); color: #fff; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.cm-btn:hover { background: #0a2a7a; }
.cm-btn:active { transform: translateY(1px); }
.cm-btn:focus-visible, .cm-input:focus-visible, .cm-chip:focus-visible { outline: 3px solid rgba(49, 108, 255, 0.45); outline-offset: 2px; }
.cm-btn-ghost { background: #fff; color: var(--cm-ink); border-color: var(--cm-line); }
.cm-btn-ghost:hover { background: #f1f4fb; }
.cm-btn-danger { background: #fff; color: #b42318; border-color: #f3c9c4; }
.cm-btn-danger:hover { background: #fdf0ee; }
.cm-btn-sm { min-height: 32px; padding: 0.25rem 0.8rem; font-size: 0.76rem; }

.cm-input { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--cm-line); border-radius: 10px; background: #fff; font: inherit; font-size: 0.92rem; color: var(--cm-ink); }
.cm-label { display: block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cm-muted); margin-bottom: 0.3rem; }
.cm-form-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cm-form-grid .cm-wide { grid-column: 1 / -1; }

.cm-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cm-chip { padding: 0.35rem 0.85rem; border-radius: 9999px; border: 1px solid var(--cm-line); background: #fff; font-size: 0.8rem; font-weight: 700; color: var(--cm-muted); }
.cm-chip:hover { color: var(--cm-ink); }
.cm-chip.is-active { background: var(--cm-navy); border-color: var(--cm-navy); color: #fff; }
.cm-tag { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 9999px; background: #eef2ff; color: #2847b8; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.cm-tag-gold { background: #fff6cc; color: #7a5c00; }
.cm-tag-muted { background: #f1f3f8; color: var(--cm-muted); }

/* News */
.news-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.news-card { display: flex; flex-direction: column; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(7, 10, 18, 0.1); }
.news-card.is-lead { grid-column: 1 / -1; }
.news-thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: linear-gradient(135deg, #001035, #1b3a9c); }
.news-thumb-blank { display: grid; place-items: center; color: rgba(255, 255, 255, 0.5); font-weight: 800; letter-spacing: 0.2em; font-size: 0.75rem; }
.news-body { padding: 1rem 1.1rem 1.2rem; }
.news-date { font-size: 0.75rem; font-weight: 700; color: var(--cm-muted); }
.news-headline { font-size: 1.1rem; font-weight: 800; line-height: 1.25; margin: 0.3rem 0 0.4rem; text-wrap: balance; }
.news-card.is-lead .news-headline { font-size: clamp(1.3rem, 3vw, 1.9rem); }
.news-summary { color: var(--cm-muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 760px) {
    .news-card.is-lead { flex-direction: row; }
    .news-card.is-lead .news-thumb { width: 55%; aspect-ratio: auto; min-height: 300px; }
    .news-card.is-lead .news-body { display: flex; flex-direction: column; justify-content: center; padding: 2rem; }
}
.article { max-width: 760px; margin: 0 auto; }
.article-cover { width: 100%; border-radius: 16px; margin: 1.25rem 0; max-height: 460px; object-fit: cover; }
.article-body { font-size: 1.05rem; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }

/* Organizations */
.org-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.org-card { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.1rem; transition: transform 0.2s, box-shadow 0.2s; }
.org-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(7, 10, 18, 0.1); }
.org-logo { width: 52px; height: 52px; flex: none; border-radius: 14px; object-fit: cover; background: var(--cm-navy); color: var(--cm-gold); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.org-logo-lg { width: 84px; height: 84px; border-radius: 20px; font-size: 1.9rem; }
.org-name { font-weight: 800; font-size: 1.02rem; line-height: 1.2; }
.org-desc { color: var(--cm-muted); font-size: 0.88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.org-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; font-weight: 700; color: var(--cm-muted); }
.org-row { display: flex; align-items: center; gap: 0.8rem; }
.org-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; padding: 1.5rem; }
.org-header-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.org-layout { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 880px) { .org-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.person { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; }
.person + .person { border-top: 1px solid #eef0f6; }
.person-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; background: #e6eaf5; color: var(--cm-ink); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; }
.person-name { font-weight: 700; font-size: 0.92rem; line-height: 1.2; }
.person-sub { font-size: 0.76rem; color: var(--cm-muted); }
.person-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.person-actions form { display: flex; gap: 0.35rem; }
.person-actions .cm-input { width: auto; padding: 0.25rem 0.5rem; font-size: 0.78rem; }
.post-item + .post-item { border-top: 1px solid #eef0f6; margin-top: 1rem; padding-top: 1rem; }
.post-item h3 { font-weight: 800; font-size: 1rem; }
.post-item p { white-space: pre-line; overflow-wrap: anywhere; color: #2c3457; font-size: 0.93rem; margin-top: 0.3rem; }
details.cm-card > summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 800; list-style: none; }
details.cm-card > summary::-webkit-details-marker { display: none; }
details.cm-card > summary::after { content: "+"; float: right; font-size: 1.2rem; line-height: 1; }
details.cm-card[open] > summary::after { content: "–"; }

@media (prefers-reduced-motion: reduce) {
    .news-card, .org-card, .cm-btn { transition: none; }
}
