.community-board {
  margin-block: clamp(28px, 5.6vw, 76px);
  color: var(--pm-color-text);
}

.community-board :is(h2, h3) {
  color: var(--pm-color-navy);
  overflow-wrap: anywhere;
}

.community-board h2 { font-size: var(--pm-type-section-title); line-height: 1.25; }
.community-board h3 { font-size: var(--pm-type-card-title); line-height: 1.4; }

.community-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(24px, 3.5vw, 44px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pm-color-border);
}

.community-nav a, .community-button {
  display: inline-flex;
  min-height: var(--pm-target-min);
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--pm-radius-pill);
  color: var(--pm-color-navy);
  font-size: .925rem;
  font-weight: 700;
  text-align: center;
}

.community-nav [aria-current="page"], .community-nav a:hover {
  background: var(--pm-color-blue-subtle);
  color: var(--pm-color-blue-hover);
}

.community-nav .community-blog {
  margin-left: auto;
  color: var(--pm-color-text-secondary);
}

#community-notice-count {
  min-width: 22px;
  padding-inline: 5px;
  border-radius: var(--pm-radius-pill);
  background: var(--pm-color-blue-hover);
  color: var(--pm-color-text-on-navy);
  font-size: .73rem;
  text-align: center;
}

.community-toolbar, .community-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.community-toolbar {
  justify-content: space-between;
  margin-bottom: var(--pm-space-24);
}

.community-button {
  border: 1px solid var(--pm-color-border);
  background: var(--pm-color-surface);
  overflow-wrap: anywhere;
}

.community-button:hover { border-color: var(--pm-color-blue); color: var(--pm-color-blue-hover); }
.community-button-primary {
  border-color: var(--pm-color-blue);
  background: var(--pm-color-blue);
  color: var(--pm-color-text-on-navy);
}
.community-button-primary:hover { background: var(--pm-color-blue-hover); color: var(--pm-color-text-on-navy); }
.community-button:disabled { opacity: .55; }

.community-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, .8fr)) minmax(160px, 1.3fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: var(--pm-space-24);
  padding: var(--pm-space-16);
  border-radius: var(--pm-radius-panel);
  background: var(--pm-color-surface);
}

.community-filters label, .community-form label:not(.community-target-option), .community-dialog label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.community-filters label > span, .community-form label > span, .community-field-label {
  color: var(--pm-color-text);
  font-size: .9rem;
  font-weight: 700;
}

.community-board :is(input, select, textarea):not([type="checkbox"], .community-editor-select),
.community-dialog textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--pm-target-min);
  padding-block: 8px;
  padding-inline: 11px var(--pm-select-padding-end, 11px);
  border: 1px solid var(--pm-color-border);
  border-radius: var(--pm-radius-card);
  background-color: var(--pm-color-surface);
  color: var(--pm-color-text);
  font: inherit;
}

.community-board :is(input, select, textarea):focus-visible,
.community-dialog textarea:focus-visible {
  outline: 2px solid var(--pm-color-blue);
  outline-offset: 2px;
}

.community-board textarea, .community-dialog textarea { resize: vertical; }
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pm-space-16);
  margin: 0;
}

.community-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: clip;
  border-radius: var(--pm-radius-card);
  background: var(--pm-color-surface);
}

.community-card:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
.community-card-cover {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 9;
  background-color: var(--pm-color-blue-subtle);
}
.community-card-cover:empty {
  isolation: isolate;
  background-image: linear-gradient(135deg, var(--pm-color-blue-subtle), var(--pm-color-page));
}
.community-card-cover:empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/community-emblem.png") center / auto 68% no-repeat;
  opacity: .18;
  mix-blend-mode: multiply;
}
.community-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.community-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--pm-space-8);
  padding: var(--pm-space-16);
}
.community-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.community-card-dates { margin-top: auto; }
.community-card-copy .community-muted { word-break: keep-all; }
.community-meta, .community-muted, .community-status {
  color: var(--pm-color-text-secondary);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.community-meta { color: var(--pm-color-blue-hover); font-weight: 700; }
.community-status { font-weight: 700; }
.community-status[data-urgent="true"] { color: var(--pm-color-blue-hover); }
.community-paginator { margin-top: var(--pm-space-24); text-align: center; }

.community-list { display: grid; gap: 8px; margin: 0; }
.community-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 24px;
  padding: var(--pm-space-16) var(--pm-space-24);
  border-radius: var(--pm-radius-card);
  background: var(--pm-color-surface);
}
.community-row a { overflow-wrap: anywhere; }
.community-row a:hover, .community-file-list a:hover { text-decoration: underline; }
.community-row-meta { display: grid; align-content: center; gap: 4px; text-align: right; }
.community-row-copy { display: grid; gap: 4px; }

.community-detail, .community-form {
  display: grid;
  gap: var(--pm-space-24);
  padding: clamp(16px, 4vw, 36px);
  border-radius: var(--pm-radius-panel);
  background: var(--pm-color-surface);
}

.community-detail { max-width: 60rem; margin-inline: auto; }
.community-form { max-width: 72rem; margin-inline: auto; }
.community-detail-header, .community-form-header { display: grid; gap: var(--pm-space-8); }
.community-detail-facts, .community-receipts {
  display: grid;
  gap: var(--pm-space-8);
  padding: var(--pm-space-16);
  border-radius: var(--pm-radius-card);
  background: var(--pm-color-page);
}

.community-detail-facts > :is(p, dl) { margin: 0; overflow-wrap: anywhere; }
.community-detail-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; }
.community-detail-facts dt { font-weight: 700; }
.community-detail-facts dd { margin: 0; }
.community-detail-image {
  width: 100%;
  max-height: 530px;
  object-fit: contain;
  border-radius: var(--pm-radius-card);
  background: var(--pm-color-page);
}
.community-receipts ul, .community-file-list { display: grid; gap: 8px; margin: 0; }
.community-receipts li, .community-file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  overflow-wrap: anywhere;
}
.community-file-list a { color: var(--pm-color-blue-hover); }
.community-file-list .community-button { min-height: var(--pm-target-min); }

.community-fields, .community-fields-pair {
  display: grid;
  min-width: 0;
  gap: var(--pm-space-12);
  margin: 0;
  padding: 0;
  border: none;
}

.community-fields-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#community-event-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#community-target-campuses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  max-height: 230px;
  gap: 4px 14px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--pm-color-border);
  border-radius: var(--pm-radius-card);
}
.community-target-option {
  display: flex;
  min-height: var(--pm-target-min);
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
}
.community-target-option input { margin: 0; flex-shrink: 0; }

.community-feedback, .community-empty {
  padding: var(--pm-space-16);
  border-radius: var(--pm-radius-card);
  background: var(--pm-color-surface);
}
.community-feedback { margin-bottom: var(--pm-space-16); }
.community-feedback[data-kind="error"] { color: #922836; }
.community-empty { color: var(--pm-color-text-secondary); }

.community-dialog {
  width: min(calc(100% - 32px), 30rem);
  max-height: calc(100% - 32px);
  padding: var(--pm-space-24);
  border: 1px solid var(--pm-color-border);
  border-radius: var(--pm-radius-panel);
  background: var(--pm-color-surface);
  color: var(--pm-color-text);
}
.community-dialog::backdrop { background: rgb(8 30 74 / .58); }
.community-dialog form { display: grid; gap: var(--pm-space-16); }

@media (max-width: 920px) {
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-search { grid-column: span 2; }
}

@media (max-width: 620px) {
  .community-grid, .community-row, .community-fields-pair, #community-event-fields { grid-template-columns: 1fr; }
  .community-row { padding: var(--pm-space-16); }
  .community-row-meta { text-align: left; }
  .community-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-filters :is(.community-search, button) { grid-column: 1 / -1; }
  .community-nav .community-blog { margin-left: 0; }
}
