/* Communities (communities/ app). The home page reuses static/app/college-os.css (.cos-*) and adds the hero cards and the
   join search here; community pages build on static/app/classes.css (.kc-*). Buttons keep the site's navbar colours,
   titles are centred, no black panels. */

/* ── home: community cards over the hero artwork (they sit exactly over the artwork's own six cards) ── */
.cm-art { position: relative; container-type: inline-size; }
.cm-card { position: absolute; display: flex; align-items: center; gap: 4%; padding: 1% 1.2%; border-radius: 1.6cqw; overflow: hidden;
  background: linear-gradient(135deg, rgba(43, 30, 120, .97), rgba(30, 20, 92, .97)); border: 1.5px solid rgba(196, 176, 255, .75);
  box-shadow: 0 0 2.4cqw rgba(139, 92, 246, .55), inset 0 0 1.4cqw rgba(168, 85, 247, .25); color: #fff !important; text-decoration: none !important;
  transition: transform .2s, box-shadow .2s; z-index: 2; }
.cm-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #e9d5ff, 0 0 3cqw rgba(217, 70, 239, .7); }
.cm-card img { width: 40%; height: 100%; object-fit: cover; border-radius: 1cqw; flex: none; }
.cm-card span { min-width: 0; display: flex; flex-direction: column; }
.cm-card b { font: 900 2.05cqw/1.12 'Nunito', system-ui, sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-card small { font: 700 1.75cqw/1.2 'Nunito', system-ui, sans-serif; color: #ddd6fe; margin-top: .3cqw; }
.cm-card-1 { left: 6.1%; top: 4.2%; width: 23.6%; height: 18.6%; }
.cm-card-2 { left: .7%; top: 35.3%; width: 23%; height: 18.6%; }
.cm-card-3 { left: 6.4%; top: 66.2%; width: 23.7%; height: 18.2%; }
.cm-card-4 { left: 64.5%; top: 3.2%; width: 22.3%; height: 17.8%; }
.cm-card-5 { left: 76%; top: 28%; width: 23.6%; height: 17.8%; }
.cm-card-6 { left: 73.5%; top: 62.9%; width: 23.8%; height: 17.8%; }

/* join card: search + selects */
.cm-find { position: relative; margin: 6px 0 8px; }
.cm-q { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; background: #f5f3ff; color: #1d1747; }
.cm-q svg { width: 18px !important; height: 18px !important; color: #5b3fd6; }
.cm-q input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 9px 0; font: 700 14.5px 'Nunito', sans-serif; color: #1d1747; }
.cm-suggest, .cm-near { margin-top: 6px; max-height: 260px; overflow: auto; border-radius: 12px; background: #fff; color: #1d1747; box-shadow: 0 10px 30px rgba(20, 10, 70, .35); }
.cm-suggest { position: absolute; left: 0; right: 0; z-index: 20; }
.cm-suggest a, .cm-near a { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding: 8px 12px; border-bottom: 1px solid #eee9ff; color: #1d1747 !important; }
.cm-suggest a:hover, .cm-near a:hover { background: #f3efff; }
.cm-suggest a span, .cm-near a span { grid-row: span 2; font-size: 18px; align-self: center; text-align: center; }
.cm-suggest b, .cm-near b { font-size: 14px; } .cm-suggest small, .cm-near small { color: #6b6396; font-weight: 700; font-size: 12px; }
.cm-suggest p, .cm-near p { margin: 0; padding: 10px 12px; font-weight: 700; font-size: 13.5px; text-align: center; }
.cm-near-light { box-shadow: 0 2px 10px rgba(40, 20, 120, .12); }
.cm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cm-two > *, .cm-three > * { min-width: 0; } .cos-join-form select { width: 100%; min-width: 0; }
.cm-three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.cm-join-acts { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 6px; }
.cm-join-acts .cos-btn { margin: 0; padding: 11px 14px; }
.cm-small { font-size: 12.5px; font-weight: 600; color: #cfc8f5; margin: 8px 0 0; text-align: center; }
.cm-small a { color: #f0abfc !important; text-decoration: underline !important; }
.cm-dark { color: #3d3570; } .kc .cm-small, .cm-space .cm-small { color: #5b5385; }
.cm-unis b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm .cos-auto a { text-decoration: none; }
.cm-tiles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1500px) { .cm-tiles { grid-template-columns: repeat(2, 1fr); } }

/* ── the directory under the home, and shared bits ── */
.cm-dir .cm-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.cm-dir .cm-cols .kc-box { margin: 0; }
.cm-form { display: flex; flex-direction: column; gap: 8px; }
.cm-form input, .cm-form select, .cm-form textarea, .cm-inline input, .cm-inline select, .cm-composer input, .cm-composer select, .cm-composer textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid #ddd5fb; border-radius: 10px; background: #fff; font: 600 14px 'Nunito', system-ui, sans-serif; color: #1d1747; }
.cm-form .kc-btn { align-self: center; }
.cm-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.cm-inline input { flex: 1 1 160px; width: auto; } .cm-inline select { width: auto; }
.cm-check { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.cm-check input { width: auto !important; }
.cm-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-weight: 700; }
.cm-credit { margin: 14px 0 0; text-align: center; font-size: 11.5px; color: #8a83b8; }
.cm-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3000; max-width: min(92vw, 520px);
  padding: 12px 20px; border-radius: 14px; background: linear-gradient(135deg, #6d4cf5, #9b4de0); color: #fff; font-weight: 800; text-align: center;
  box-shadow: 0 10px 30px rgba(60, 30, 160, .4); }
.cm-toast.bad { background: linear-gradient(135deg, #e0435e, #c2367f); }

/* ── a community's page ── */
.cm-space { width: 100%; max-width: 1480px; margin: 0 auto 40px; }
.cm-head { position: relative; border-radius: 22px; overflow: hidden; margin-bottom: 12px; color: #fff; text-align: center;
  background: radial-gradient(600px 300px at 80% 20%, rgba(217, 70, 239, .45), transparent 70%), linear-gradient(135deg, #3a2ca8, #6d4cf5 45%, #0a8fe8); }
.cm-head.has-cover { background: linear-gradient(180deg, rgba(40, 24, 120, .25), rgba(40, 24, 120, .85)), var(--cm-cover) center / cover no-repeat; }
.cm-head-in { padding: 28px 22px 20px; }
.cm-head h1 { margin: 6px 0 4px; font: 900 clamp(26px, 3vw, 40px)/1.1 'Nunito', system-ui, sans-serif; color: #fff; text-shadow: 0 2px 8px rgba(20, 10, 60, .35); }
.cm-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-weight: 800; font-size: 13px; }
.cm-where, .cm-places { margin: 4px 0; font-weight: 700; color: #ede9ff; } .cm-places { font-size: 13px; }
.cm-where a { color: #fff !important; text-decoration: underline !important; }
.cm-head .kc-stats { justify-content: center; margin: 10px 0 6px; } .cm-head .kc-stats span { color: #fff; background: rgba(255, 255, 255, .16); }
.cm-head-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; }
.cm-head-acts .kc-btn.soft { background: rgba(255, 255, 255, .2); color: #fff !important; border-color: rgba(255, 255, 255, .45); }
.cm-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; justify-content: center; flex-wrap: wrap; }
.cm-tabs a { white-space: nowrap; padding: 8px 16px; border-radius: 999px; background: #fff; font-weight: 800; font-size: 14px; color: #3b2a8f !important;
  box-shadow: 0 1px 6px rgba(40, 20, 120, .12); text-decoration: none !important; }
.cm-tabs a.on { background: linear-gradient(135deg, #6d4cf5, #c44ee6); color: #fff !important; }
.cm-tabs em { font-style: normal; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #ff4f6d; color: #fff; font-size: 12px; }
.cm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.cm-main > .kc-box, .cm-main > article { margin: 0 0 12px; }
.cm-side { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 12px; }
.cm-side .kc-box { margin: 0; }
.cm-mini h3 { margin: 0 0 8px; font: 900 16px 'Nunito', sans-serif; text-align: center; color: #1d1747; }
.cm-mini p { margin: 4px 0; text-align: center; }
.cm-mini .kc-btn { display: block; margin: 8px auto 0; text-align: center; }
.cm-more { display: block; margin-top: 8px; text-align: center; font-weight: 800; color: #5b3fd6 !important; }
.cm-code b, .cm-code-big { font: 900 20px 'Nunito', monospace; letter-spacing: 2px; color: #5b3fd6; }
.cm-due { display: flex; justify-content: space-between; gap: 8px; text-align: left !important; font-size: 13.5px; }
.cm-due.paid span { color: #17784a; } .cm-due span { font-weight: 800; color: #b5520f; }
.cm-up { display: block; padding: 6px 0; border-top: 1px solid #eee9ff; text-align: center; } .cm-up b { display: block; color: #1d1747; } .cm-up small { color: #6b6396; font-weight: 700; }
.cm-pinned { display: flex; flex-direction: column; align-items: center; margin: 0 0 12px; padding: 12px 16px; border-radius: 16px; text-align: center;
  background: linear-gradient(135deg, #fff3d6, #ffe4f1); color: #6b3d00 !important; box-shadow: 0 2px 10px rgba(180, 110, 0, .15); }
.cm-pinned small { color: #8a6a3a; font-weight: 700; }
.cm-empty { text-align: center; padding: 26px; }

/* join box */
.cm-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.cm-way { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 14px; border-radius: 16px; background: #f6f3ff; border: 1.5px solid #e4dcff; }
.cm-way b { font-size: 15.5px; color: #1d1747; } .cm-way small { color: #5b5385; font-weight: 600; }
.cm-way input, .cm-way select { width: 100%; padding: 8px 10px; border: 1.5px solid #ddd5fb; border-radius: 10px; font: 600 14px 'Nunito', sans-serif; }
.cm-way .cm-inline input { flex: 1 1 100px; }

/* composer + posts */
.cm-composer { display: flex; flex-direction: column; gap: 8px; }
.cm-composer h2 { margin: 0; }
.cm-kinds { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cm-kinds label { position: relative; margin: 0; cursor: pointer; } .cm-kinds input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cm-kinds span { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #f1edff; font-weight: 800; font-size: 13px; color: #3b2a8f; }
.cm-kinds input:checked + span { background: linear-gradient(135deg, #6d4cf5, #c44ee6); color: #fff; }
.cm-kinds input:focus-visible + span { outline: 2px solid #6d4cf5; outline-offset: 2px; }
.cm-composer-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.cm-composer-foot input[name=sponsored] { width: 220px; }
.cm-file { cursor: pointer; margin: 0; }
.cm-post { padding: 14px 16px; }
.cm-post.pinned { border: 2px solid #c4b5fd; } .cm-post.cm-k-alert { border: 2px solid #ff8a9a; } .cm-post.cm-k-notice { border: 2px solid #f4b400; }
.cm-post.sponsored { background: linear-gradient(135deg, #fffaf0, #fff); border: 1.5px dashed #f4b400; }
.cm-post-head { display: flex; align-items: center; gap: 10px; }
.cm-post-head > div { flex: 1; min-width: 0; } .cm-post-head b { display: block; color: #1d1747; } .cm-post-head small { color: #6b6396; font-weight: 700; }
.cm-avatar, .cm-post-head img { width: 42px !important; height: 42px !important; border-radius: 50%; object-fit: cover; flex: none; }
.cm-avatar-sp, .cm-tk-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff3d6; font-size: 20px; flex: none; }
.cm-post h3 { margin: 10px 0 4px; font: 900 18px 'Nunito', sans-serif; color: #1d1747; }
.cm-body { margin: 6px 0; white-space: normal; line-height: 1.5; color: #2b2550; overflow-wrap: anywhere; }
.cm-price { margin: 6px 0; font: 900 20px 'Nunito', sans-serif; color: #17784a; }
.cm-when { margin: 6px 0; font-weight: 800; color: #5b3fd6; }
.cm-img { display: block; max-width: 100%; max-height: 520px; margin: 8px auto; border-radius: 14px; object-fit: contain; }
.cm-poll { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.cm-opt { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 9px 14px; border: 1.5px solid #ddd5fb; border-radius: 12px; cursor: pointer;
  font: 800 14px 'Nunito', sans-serif; color: #1d1747; background: linear-gradient(90deg, #ece6ff var(--pct), #fff var(--pct)); text-align: left; }
.cm-opt.mine { border-color: #6d4cf5; } .cm-opt:disabled { cursor: default; } .cm-poll small { text-align: center; color: #6b6396; font-weight: 700; }
.cm-post-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee9ff; }
.cm-act { border: 0; padding: 7px 14px; border-radius: 999px; background: #f4f1ff; font: 800 13.5px 'Nunito', sans-serif; color: #3b2a8f; cursor: pointer; list-style: none; }
.cm-act.on { background: linear-gradient(135deg, #6d4cf5, #c44ee6); color: #fff; }
.cm-act::-webkit-details-marker { display: none; }
.cm-more-menu { position: relative; } .cm-more-menu > div { position: absolute; right: 0; bottom: 110%; z-index: 5; display: flex; flex-direction: column; min-width: 180px;
  padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(20, 10, 70, .25); }
.cm-more-menu > div button { border: 0; background: none; padding: 8px 10px; text-align: left; font: 700 14px 'Nunito', sans-serif; border-radius: 8px; cursor: pointer; }
.cm-more-menu > div button:hover { background: #f4f1ff; }
.cm-comments { margin-top: 6px; } .cm-comments p { margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: #f8f6ff; font-size: 14px; }
.cm-comments small { color: #8a83b8; font-weight: 700; } .cm-comments form { margin-top: 6px; }

/* help desk, services, people, manage */
.cm-filter { justify-content: center; margin: 0 0 12px; } .cm-filter a.on { background: linear-gradient(135deg, #6d4cf5, #c44ee6); color: #fff !important; }
.cm-ticket.st-open { border-left: 5px solid #ff4f6d; } .cm-ticket.st-working { border-left: 5px solid #f4b400; } .cm-ticket.st-done { border-left: 5px solid #12b886; }
.cm-details-box summary { cursor: pointer; text-align: center; list-style: none; } .cm-details-box[open] summary { margin-bottom: 10px; }
.cm-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cm-service { margin: 0 !important; text-align: center; } .cm-service header { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cm-service header b { font-size: 17px; color: #1d1747; } .cm-stars { margin: 6px 0; font-weight: 800; color: #9a6a00; }
.cm-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cm-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f8f6ff; color: inherit !important; text-decoration: none !important; }
.cm-person > span:not(.sf-ini) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .cm-person > span:not(.sf-ini) b { color: #1d1747; } .cm-person small { color: #6b6396; font-weight: 700; }
.cm-req { flex-wrap: wrap; justify-content: center; } .cm-req > span:not(.sf-ini) { flex: 1 1 calc(100% - 60px); }
.cm-req .kc-btn { flex: 0 0 auto; padding: 7px 16px; }
.cm-table-wrap { overflow-x: auto; } .cm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-table th, .cm-table td { padding: 8px; border-bottom: 1px solid #eee9ff; text-align: left; } .cm-table th { color: #5b5385; }
.cm-row-acts { display: flex; flex-wrap: wrap; gap: 4px; } .cm-row-acts .kc-btn { padding: 5px 10px; font-size: 12.5px; }
.cm-due-box { margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: #f8f6ff; } .cm-due-box summary { cursor: pointer; font-weight: 700; }
.cm-paid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; margin: 10px 0; }
.cm-paid label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; margin: 0; }
.cm-log { list-style: none; padding: 0; margin: 0; font-size: 13.5px; } .cm-log li { padding: 6px 0; border-bottom: 1px solid #eee9ff; } .cm-log small { color: #8a83b8; }
.cm-file-row { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13.5px; text-align: center; }
.cm-details > summary { list-style: none; cursor: pointer; display: block; margin: 8px auto 0; text-align: center; } .cm-details[open] > summary { margin-bottom: 8px; }
.cm-staff-row { padding: 12px 0; border-bottom: 1px solid #eee9ff; display: flex; flex-direction: column; gap: 6px; }
.cm-staff-row .cm-inline { justify-content: flex-start; }

@media (max-width: 1100px) { .cm-grid { grid-template-columns: 1fr; } .cm-side { position: static; } .cm-dir .cm-cols { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .cm-two, .cm-three { grid-template-columns: 1fr; } .cm-head-in { padding: 20px 14px 16px; } .cm-tabs { flex-wrap: nowrap; justify-content: flex-start; } }

/* a small text button inside a sentence (join card: "Show it here") */
.cm-link { background: none; border: 0; padding: 0; color: #6d28d9; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* ═════ Society Office (communities/templates/communities/_office*.html) ═════ */
.of-head h2 { text-align: center; }
.of-trust { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.of-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; background: #ede9fe; color: #5b21b6; }
.of-pill.ok { background: #dcfce7; color: #166534; }
.of-pill.warn { background: #fef3c7; color: #92400e; }
.of-pill.bad { background: #fee2e2; color: #b91c1c; }
.of-bad { color: #b91c1c; }
.of-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.of-tabs a { padding: 6px 14px; border-radius: 999px; background: #f3f0ff; color: #4c1d95; font-weight: 800; text-decoration: none; font-size: 14px; }
.of-tabs a.on { background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; }
.of-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.of-card { background: #fff; border-radius: 16px; padding: 14px; text-align: center; box-shadow: 0 6px 20px rgba(76, 29, 149, .08); border: 1px solid #ede9fe; }
.of-card small { display: block; color: #6b7280; font-weight: 700; }
.of-card b { display: block; font-size: 24px; color: #3b0764; margin-top: 4px; }
.of-card em { display: block; font-style: normal; color: #6b7280; font-size: 13px; }
.of-card.in b { color: #15803d; } .of-card.out b { color: #b45309; } .of-card.warn b { color: #b91c1c; }
.of-upi { font-size: 17px !important; word-break: break-all; }
.of-table { display: grid; gap: 4px; }
.of-tr { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #faf8ff; align-items: center; text-align: center; }
.of-th { background: #ede9fe; font-weight: 800; color: #4c1d95; }
.of-tr span:first-child { text-align: left; }
.of-seat, .of-line, .of-doc, .of-tl { text-align: center; margin: 6px 0; }
.of-doc small, .of-tl small { display: block; color: #6b7280; }
.of-rules { max-width: 720px; margin: 0 auto; padding-left: 20px; line-height: 1.6; }
.of-entry { border: 1px solid #ede9fe; border-radius: 14px; padding: 10px 12px; margin: 8px 0; background: #fff; }
.of-entry.s-pending { border-color: #fcd34d; background: #fffbeb; }
.of-entry.s-rejected { opacity: .7; background: #fef2f2; }
.of-entry-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.of-seq { font-weight: 900; color: #7c3aed; background: #f3f0ff; border-radius: 8px; padding: 2px 8px; }
.of-what small { display: block; color: #6b7280; }
.of-amt { font-weight: 900; font-size: 17px; color: #3b0764; white-space: nowrap; }
.of-amt.in { color: #15803d; } .of-amt.out { color: #b45309; }
.of-entry-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 13px; color: #6b7280; }
.of-entry-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.of-q { background: #faf8ff; border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.of-q.open { background: #fff7ed; }
.of-q p { margin: 2px 0; } .of-q small { color: #6b7280; }
.of-a { color: #166534; }
.of-form { max-width: 720px; margin: 8px auto; }
.of-file { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 2px dashed #c4b5fd; border-radius: 12px; font-weight: 700; color: #5b21b6; cursor: pointer; }
.of-file input { max-width: 200px; }
.of-filter { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.of-due { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #fef2f2; margin: 4px 0; }
.of-due.win { background: #dcfce7; font-weight: 800; }
.of-bar { height: 10px; border-radius: 999px; background: #ede9fe; overflow: hidden; margin: 6px 0; }
.of-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #ec4899); border-radius: 999px; }
.of-opt { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; gap: 10px; align-items: center; margin: 6px 0; }
.of-units { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.of-unit { padding: 4px 10px; border-radius: 8px; background: #f3f0ff; color: #4c1d95; font-weight: 700; border: 0; font-size: 13px; }
.of-pre { white-space: pre-wrap; text-align: left; background: #faf8ff; border-radius: 10px; padding: 10px; }
.of-decision { border-bottom: 1px solid #ede9fe; padding: 8px 0; text-align: center; }
.of-post { border: 1px solid #ede9fe; border-radius: 12px; padding: 10px; margin: 8px 0; }
.of-post legend { font-weight: 900; color: #4c1d95; padding: 0 6px; width: auto; font-size: 16px; }
.of-cand { display: block; padding: 6px 4px; }
.of-cand small { display: block; color: #6b7280; margin-left: 22px; }
.of-result { margin: 10px 0; text-align: center; }
.of-check { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.of-link { align-items: center; }
.of-fin { border: 1px dashed #c4b5fd; }
@media (max-width: 640px) { .of-tr { grid-template-columns: 1.4fr 1fr 1fr 1fr; font-size: 13px; } .of-opt { grid-template-columns: 1fr; } }

.of-unit.on { background: #16a34a; color: #fff; }

.of-tr.of-over { background: #fee2e2; }

/* office headings: centred and calmer; bill runs; pages */
.cm-space .kc-box > h3 { font-size: 20px; text-align: center; margin: 0 0 10px; }
.cm-space .of-ballot h3, .cm-space .of-election h3 { font-size: 19px; }
.of-run { display: block; font-size: 12px; font-weight: 700; color: #6b7280; text-align: right; }
.of-pages { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 10px; font-weight: 700; }
.of-entry-acts { justify-content: flex-end; margin-top: 4px; }
.of-entry-acts details { display: inline-block; }
.of-entry-acts .kc-btn, .of-entry-acts summary.kc-btn { padding: 3px 12px; font-size: 13px; min-height: 0; box-shadow: none; }
.of-entry-acts details[open] { display: block; width: 100%; }
.of-entry { padding: 8px 12px; }

/* The walkthrough video (communities/_video.html): a centred player over the page, brand gradient frame, never black panels */
.cm-watch { white-space: nowrap; }
.cm-watch small { opacity: .8; font-weight: 700; margin-left: 4px; }
.cm-video { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 22px; overflow: hidden;
    background: linear-gradient(135deg, #7b2ff7, #f107a3); box-shadow: 0 24px 80px rgba(40, 10, 90, .45); }
.cm-video:not([open]) { display: none !important; }   /* the site's own dialog styles show closed dialogs */
.cm-video::backdrop { background: rgba(30, 14, 70, .55); backdrop-filter: blur(4px); }
.cm-video-in { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cm-video-head { display: flex; align-items: center; justify-content: center; position: relative; }
.cm-video-head h2 { margin: 0; padding: 0 46px; color: #fff; font-size: 18px; font-weight: 900; text-align: center; }
.cm-video-x { position: absolute; right: 0; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .22); color: #fff;
    font-size: 16px; font-weight: 900; cursor: pointer; }
.cm-video video { width: 100%; max-height: calc(100vh - 170px); border-radius: 14px; background: #2a1458; display: block; }
.cm-video .cm-small { color: #fff; opacity: .92; margin: 0; }
