.community {
  --cm-accent: #d189fc;
  --cm-border: #353039;
  --cm-soft: #c2bac9;
  background: #0c0b0e;
  color: #faf8fc;
}
.community .cm-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.community-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--cm-border);
  background: #161219;
}
.community-hero::before, .community-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}
.community-hero::before {
  left: 38%;
  background-size: cover;
  background-position: center 58%;
}
.forum-hero::before { background-image: url("../assets/ocean.webp"); }
.careers-hero::before { background-image: url("../assets/garage.webp"); }
.community-hero::after {
  background: linear-gradient(90deg, #141017 25%, #141017eb 42%, #141017aa 54%, #14101712 80%),
              linear-gradient(0deg, #0d0b0e88, transparent 35%);
}
.community-intro { padding-block: clamp(3rem, 6vw, 6.5rem); }
.community h1, .community h2, .community h3 { margin: 0; line-height: 1.05; }
.community h1 {
  font: 900 clamp(3rem, 7.3vw, 8rem)/1 var(--font-heading);
  letter-spacing: -.019em;
  text-transform: uppercase;
}
.community h2 { font-size: clamp(1.85rem, 3.2vw, 3.5rem); letter-spacing: -.015em; }
.community h3 { font-size: clamp(1.25rem, 2vw, 2rem); letter-spacing: -.012em; }
.community-intro > p {
  max-width: 30em;
  margin: 1.2rem 0 1.6rem;
  color: #e3dbe7;
  font-size: clamp(1rem, 1.15vw, 1.15rem);
}
.cm-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  padding: .85rem 1.4rem;
  background: var(--cm-accent);
  color: #160c1b;
  border: 0;
  border-radius: 8px;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
}

.cm-primary img { width: 19px; height: 19px; filter: brightness(0); }
.board, .departments { padding-block: clamp(2.7rem, 5vw, 5.5rem); }
.board-head, .cm-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; }
.community :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  padding: .78rem .95rem;
  background: #151317;
  color: #fff;
  font: inherit;
  border: 1px solid #534a58;
  border-radius: 6px;
}
.community :is(input, textarea):focus-visible, .community select:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 2px; }
.community :is(input, textarea)::placeholder { color: #b6aeba; }
.community textarea { resize: vertical; min-height: 6rem; }
.search-label { width: min(100%, 19rem); }
.cm-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.8rem 0 1.5rem; }
.cm-filters button {
  background: transparent;
  color: #ccc4d2;
  border: 1px solid var(--cm-border);
  border-radius: 99px;
  font-size: .9rem;
  padding: .45rem .95rem;
}
.cm-filters button[aria-pressed="true"] { background: #f2edf5; color: #18121d; border-color: #f2edf5; }

.cm-topic { border-top: 1px solid var(--cm-border); }
.cm-topic:last-child { border-bottom: 1px solid var(--cm-border); }
.cm-topic summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1rem;
  align-items: center;
  gap: 1.3rem;
  padding: 1.35rem .3rem;
  list-style: none;
  cursor: pointer;
}
.cm-topic summary::-webkit-details-marker { display: none; }
.cm-topic summary::after {
  content: "";
  width: .5rem;
  height: .5rem;
  border: solid #d5b9e3;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cm-topic[open] summary::after { transform: rotate(225deg); }
.cm-topic summary strong { display: block; font-size: clamp(1.1rem, 1.7vw, 1.45rem); letter-spacing: -.009em; overflow-wrap: anywhere; }

.cm-count, .cm-note, .cm-post small { font-size: .86rem; color: var(--cm-soft); }
.cm-note { margin: 1.4rem 0 0; }
.cm-note a { text-decoration: underline; }
.cm-discussion { max-width: 50rem; padding: 0 .3rem 1.7rem; }
.cm-discussion p { margin: .45rem 0 .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-discussion > a { color: #dfaffc; text-decoration: underline; text-underline-offset: .18em; }
.cm-post { margin: 1.1rem 0; border-left: 2px solid #765387; padding: .25rem 1rem; }
.cm-post b { overflow-wrap: anywhere; }
.cm-form { display: grid; gap: 1rem; }
.cm-form label { display: grid; gap: .35rem; font-weight: 700; font-size: .92rem; }
.cm-form :is(input, textarea, select) { font-size: 1rem; font-weight: 500; }
.cm-reply { max-width: 39rem; margin-top: 1.15rem; }
.cm-message { color: #e5befa; margin: 0; }
.cm-message:empty { display: none; }
.cm-dialog { width: min(92%, 35rem); max-height: 90vh; overflow-y: auto; padding: 1.6rem; color: #fff; background: #201b23; border: 1px solid #675c70; border-radius: 10px; }
.cm-dialog::backdrop { background: #070509be; }
.cm-dialog-head { margin-bottom: 1.35rem; }
.cm-dialog h2 { font-size: 1.9rem; }
.cm-close { background: transparent; color: white; padding: .2rem .6rem; font-size: 1.6rem; border: 1px solid var(--cm-border); border-radius: 6px; }
.cm-section-lead { color: var(--cm-soft); max-width: 40rem; margin: .85rem 0 1.75rem; }
.dept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dept-grid article { display: flex; flex-flow: column; align-items: flex-start; padding: clamp(1.25rem, 2.5vw, 2.4rem); background: #171419; border: 1px solid var(--cm-border); border-top: 2px solid #9264a7; border-radius: 8px; }
.dept-grid p { color: var(--cm-soft); line-height: 1.6; flex-grow: 1; }
.dept-grid a { color: #e4b5ff; text-decoration: underline; text-underline-offset: .2em; font-size: .94rem; font-weight: 800; }
.application { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 8%; padding-block: clamp(2.2rem, 4vw, 4.2rem) clamp(3rem, 6vw, 6rem); border-top: 1px solid var(--cm-border); scroll-margin-top: 1.25rem; }
@media(max-width:760px) {
  .dept-grid, .application { grid-template-columns: 1fr; }
  .application { gap: 1rem; }
  .board-head { align-items: flex-start; flex-direction: column; }
  .search-label { width: 100%; }
  .community-hero::before { left: 0; background-position: 75% center; }
  .community-hero::after { background: linear-gradient(90deg, #110e16f2, #151217bf 65%, #15121766); }
}
@media(max-width:430px) {
  .cm-topic summary { grid-template-columns: minmax(0, 1fr) 1rem; gap: .6rem; }
  .cm-topic summary .cm-count { grid-row: 2; }
  .cm-topic summary::after { grid-column: 2; grid-row: 1; }
}
