.community-page {
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.community-page-head,
.community-toolbar-row,
.community-news-meta,
.community-topic-meta,
.community-post-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.community-page-head {
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.community-page-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.community-page-head p {
  max-width: 52rem;
  margin: .7rem 0 0;
  color: #9fb0c6;
}

.community-filter-panel,
.community-news-card,
.community-news-article,
.community-forum-category,
.community-board-panel,
.community-topic-panel,
.community-forum-post,
.community-editor {
  border: 1px solid rgba(80, 178, 235, .25);
  background: rgba(4, 16, 31, .82);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .2);
}

.community-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: .9rem;
}

.community-filter-panel input,
.community-filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: .6rem .8rem;
  border: 1px solid rgba(80, 178, 235, .3);
  border-radius: .55rem;
  color: #eef8ff;
  background: rgba(2, 9, 22, .92);
}

.community-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 0 0 1.5rem;
}

.community-category-pill,
.community-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 .75rem;
  border: 1px solid rgba(80, 178, 235, .28);
  border-radius: 999px;
  color: #dff8ff;
  background: rgba(5, 30, 52, .72);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}

.community-category-pill.active {
  border-color: #38bdf8;
  color: #fff;
  background: rgba(14, 116, 144, .52);
}

.community-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.community-news-card {
  overflow: hidden;
  border-radius: 1rem;
}

.community-news-card img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.community-news-card-placeholder {
  display: grid;
  aspect-ratio: 16 / 8;
  place-items: center;
  color: rgba(219, 242, 255, .7);
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, .28), transparent 38%), #07182a;
  font-weight: 900;
  letter-spacing: .12em;
}

.community-news-card-body {
  padding: 1.1rem;
}

.community-news-card h2 {
  margin: .6rem 0;
  color: #fff;
  font-size: 1.35rem;
}

.community-news-card h2 a,
.community-board-name,
.community-topic-title {
  color: inherit;
  text-decoration: none;
}

.community-news-card p {
  margin: 0 0 1rem;
  color: #9fb0c6;
  line-height: 1.6;
}

.community-news-meta,
.community-topic-meta {
  color: #8fa2bb;
  font-size: .82rem;
}

.community-news-article {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 1rem;
}

.community-news-cover {
  width: 100%;
  max-height: 540px;
  margin: 1.5rem 0;
  border-radius: .85rem;
  object-fit: cover;
}

.community-rich-content {
  color: #d9e5f1;
  font-size: 1.04rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.community-rich-content h2,
.community-rich-content h3 {
  margin: 1.8rem 0 .7rem;
  color: #fff;
}

.community-rich-content blockquote {
  margin: 1.2rem 0;
  padding: .85rem 1rem;
  border-left: 4px solid #38bdf8;
  color: #c8d8e7;
  background: rgba(14, 116, 144, .16);
}

.community-rich-content a {
  color: #5ed8ff;
}

.community-rich-content code {
  padding: .1rem .3rem;
  border-radius: .3rem;
  color: #a5f3fc;
  background: rgba(8, 47, 73, .7);
}

.community-media {
  margin: 1.4rem 0;
}

.community-media img,
.community-video-frame {
  width: 100%;
  border-radius: .75rem;
}

.community-media img {
  max-height: 680px;
  object-fit: contain;
  background: #020916;
}

.community-media figcaption {
  margin-top: .45rem;
  color: #8fa2bb;
  font-size: .86rem;
}

.community-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.community-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.community-forum-category {
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  overflow: hidden;
}

.community-forum-category-head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(80, 178, 235, .18);
  background: rgba(8, 47, 73, .52);
}

.community-forum-category-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.3rem;
}

.community-forum-category-head p {
  margin: .3rem 0 0;
  color: #9fb0c6;
}

.community-board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px minmax(150px, .35fr);
  gap: .8rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(80, 178, 235, .12);
}

.community-board-row:last-child {
  border-bottom: 0;
}

.community-board-row.is-child {
  padding-left: calc(1.15rem + var(--board-depth, 1) * 1.3rem);
  background: rgba(3, 18, 33, .35);
}

.community-board-name {
  color: #eef8ff;
  font-size: 1.05rem;
  font-weight: 800;
}

.community-board-description,
.community-board-stat {
  color: #8fa2bb;
  font-size: .84rem;
}

.community-board-stat strong {
  display: block;
  color: #dff8ff;
}

.community-board-panel,
.community-topic-panel {
  border-radius: 1rem;
  overflow: hidden;
}

.community-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 190px;
  gap: .8rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(80, 178, 235, .12);
}

.community-topic-row:last-child {
  border-bottom: 0;
}

.community-topic-title {
  color: #eef8ff;
  font-weight: 800;
}

.community-forum-post {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  margin-bottom: 1rem;
  border-radius: .85rem;
  overflow: hidden;
}

.community-post-author {
  padding: 1rem;
  border-right: 1px solid rgba(80, 178, 235, .18);
  color: #dff8ff;
  background: rgba(8, 47, 73, .32);
}

.community-post-body {
  min-width: 0;
  padding: 1rem 1.15rem;
}

.community-post-state {
  padding: .8rem;
  border: 1px dashed rgba(248, 113, 113, .45);
  border-radius: .5rem;
  color: #fecaca;
  background: rgba(127, 29, 29, .2);
}

.community-pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.5rem;
}

.community-empty-state {
  padding: 2rem;
  border: 1px dashed rgba(80, 178, 235, .32);
  border-radius: .85rem;
  color: #9fb0c6;
  text-align: center;
}

.community-editor {
  overflow: hidden;
  border-color: #cbd5e1;
  border-radius: .75rem;
  background: #fff;
  box-shadow: none;
}

.community-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .65rem;
  border-bottom: 1px solid #dbe3ee;
  background: #f8fafc;
}

.community-editor-toolbar button {
  min-width: 36px;
  min-height: 34px;
  padding: .3rem .55rem;
  border: 1px solid #cbd5e1;
  border-radius: .38rem;
  color: #172033;
  background: #fff;
  font-size: .82rem;
  font-weight: 700;
}

.community-editor-toolbar button:hover,
.community-editor-toolbar button:focus-visible {
  border-color: #0284c7;
  outline: none;
  background: #e0f2fe;
}

.community-editor-surface {
  min-height: 320px;
  max-height: 70vh;
  padding: 1rem;
  color: #172033;
  background: #fff;
  line-height: 1.65;
  overflow-y: auto;
}

.community-editor-surface:focus {
  outline: 3px solid rgba(14, 165, 233, .22);
  outline-offset: -3px;
}

.community-editor-surface figure {
  padding: .75rem;
  border: 1px solid #cbd5e1;
  border-radius: .6rem;
  background: #f8fafc;
}

.community-editor-surface .community-video-frame iframe {
  pointer-events: none;
}

.community-video-placeholder > div:first-child {
  padding: 2rem 1rem;
  border-radius: .45rem;
  color: #0c4a6e;
  background: #e0f2fe;
  text-align: center;
}

.community-editor-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .75rem;
  border-top: 1px solid #dbe3ee;
  color: #64748b;
  background: #f8fafc;
  font-size: .78rem;
}

.community-admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1rem;
}

.community-admin-table td {
  vertical-align: middle;
}

@media (max-width: 1000px) {
  .community-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-board-row,
  .community-topic-row {
    grid-template-columns: minmax(0, 1fr) 80px 130px;
  }

  .community-board-row > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 700px) {
  .community-news-grid,
  .community-filter-panel,
  .community-forum-post {
    grid-template-columns: 1fr;
  }

  .community-board-row,
  .community-topic-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-board-stat {
    display: inline-flex;
    gap: .35rem;
  }

  .community-post-author {
    border-right: 0;
    border-bottom: 1px solid rgba(80, 178, 235, .18);
  }

  .community-editor-surface {
    min-height: 240px;
  }
}
