/* Shared commentary and community components; legacy plugin CSS uses a different root. */
.smc .smc-community-width {
  max-width: 1280px;
}

.smc .smc-community {
  min-width: 0;
}

.smc .smc-community h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.2;
}

.smc .smc-community h2 a {
  text-decoration: none;
  color: var(--smc-ink);
}

.smc .smc-community h2 a:hover {
  color: var(--smc-acc);
}

.smc .smc-community h2+*,
.smc .smc-community>*+* {
  margin-top: 24px;
}

.smc .smc-commentary-list {
  display: grid;
  gap: 28px;
  margin-block: 32px;
}

.smc .smc-community-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--smc-line);
  border-radius: var(--smc-radius);
  background: var(--smc-card);
}

.smc .smc-community-card>* {
  margin: 0;
}

.smc .smc-commentary-filters {
  gap: 8px;
}

.smc .smc-commentary-entry {
  display: block;
  padding: 0;
  overflow: hidden;
}

.smc .smc-commentary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 20px;
}

.smc .smc-commentary-heading {
  min-width: 0;
}

.smc .smc-commentary-heading h2 {
  font-size: clamp(24px, 2.2vw, 30px);
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.smc .smc-commentary-heading .smc-community-meta-row {
  gap: 6px 16px;
}

.smc .smc-commentary-format {
  color: var(--smc-acc);
  font: 500 12px/1.5 var(--smc-mono);
}

.smc .smc-community .chip.smc-commentary-access {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font: 600 11px/1.5 var(--smc-body);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  flex: 0 0 auto;
}

.smc .smc-commentary-body {
  padding: 0 24px 24px;
}

.smc .smc-commentary-excerpt .smc-commentary-readmore {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
}

.smc .smc-commentary-entry .smc-prose {
  font-size: 17px;
  line-height: 1.7;
}

.smc .smc-commentary-entry .smc-prose> :first-child {
  margin-top: 0;
}

/* Symbol wrappers keep the same paragraph rhythm as unwrapped commentary. */
.smc .smc-commentary-entry .smc-prose [data-symbols]>*+* {
  margin-top: 16px;
}

.smc .smc-commentary-preview {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.smc .smc-commentary-thumbnail {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--smc-line);
  border-radius: 8px;
  background: var(--smc-alt);
}

.smc .smc-commentary-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.smc .smc-commentary-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .18);
  color: white;
  font-size: 30px;
  text-shadow: 0 1px 8px black;
}

.smc .smc-commentary-preview-copy h3 {
  font-size: 20px;
  margin: 0 0 8px;
}

.smc .smc-commentary-preview-copy p {
  color: var(--smc-muted);
  font-size: 15px;
  line-height: 1.6;
}

.smc .smc-commentary-preview-copy .smc-button-link {
  padding-bottom: 0;
  font-size: 15px;
}

.smc .smc-commentary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 24px;
  border-top: 1px solid var(--smc-line);
  background: var(--smc-alt);
}

.smc .smc-commentary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.smc .smc-commentary-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--smc-line);
  border-radius: 6px;
  color: var(--smc-muted);
  font-size: 12px;
  text-decoration: none;
}

.smc .smc-commentary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
}

.smc .smc-commentary-symbols {
  display: flex;
  flex: 1 1 160px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
}

.smc .smc-commentary-symbols a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--smc-muted);
  font: 500 11px/1.4 var(--smc-mono);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.smc .smc-commentary-symbols a:hover,
.smc .smc-commentary-symbols a:focus-visible { color: var(--smc-acc); }

.smc .smc-commentary-comments {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .smc .smc-commentary-header {
    padding: 20px 20px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .smc .smc-commentary-body {
    padding: 0 20px 20px;
  }

  .smc .smc-commentary-preview {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .smc .smc-commentary-thumbnail {
    max-width: 360px;
  }

  .smc .smc-commentary-footer {
    padding: 12px 20px;
  }

  .smc .smc-commentary-actions {
    margin-left: 0;
  }
}

.smc .smc-community-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--smc-radius);
  overflow: hidden;
}

.smc .smc-community-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.smc .smc-community-video>div {
  width: 100%;
  height: 100%;
}

.smc .smc-community-meta,
.smc .smc-community .metadata {
  color: var(--smc-muted);
  font-size: 14px;
}

.smc .smc-community-meta-row,
.smc .smc-community .metadata {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.smc .smc-community a.chip {
  min-height: 44px;
  padding: 8px 12px;
}

.smc .smc-community .metadata {
  margin-top: 6px;
}

.smc .smc-community .metadata a {
  color: inherit;
}

.smc .smc-community-comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--smc-line);
}

.smc .smc-community-notice {
  padding: 16px 20px;
  border: 1px solid var(--smc-line);
  border-left: 4px solid var(--smc-acc);
  border-radius: 8px;
  background: var(--smc-alt);
}

.smc .smc-community-danger {
  color: var(--smc-danger);
}

.smc .smc-community-content {
  max-width: 100%;
}

.smc .smc-commentary-detail {
  display: grid;
  gap: 28px;
}

.smc .smc-commentary-detail>* {
  margin-top: 0;
}

.smc .smc-commentary-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
}

.smc .smc-commentary-neighbours {
  gap: 4px;
}

.smc .smc-commentary-neighbours a {
  min-width: 60px;
}

@media (min-width: 1280px) {
  .smc .smc-commentary-detail:has(>.smc-commentary-reading.has-scrollspy)>.smc-commentary-navigation {
    margin-right: calc(210px + 28px);
  }
}

.smc .smc-commentary-detail .smc-commentary-heading {
  display: grid;
  gap: 12px;
}

.smc .smc-commentary-detail .smc-page-title {
  font-size: clamp(28px, 3vw, 42px);
  margin: 0;
  overflow-wrap: anywhere;
}

.smc .smc-commentary-detail>.smc-community-comments {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--smc-line);
  border-radius: var(--smc-radius);
  background: var(--smc-card);
}

.smc .smc-commentary-detail .smc-community-notice {
  font-size: 14px;
  line-height: 1.6;
}

.smc .smc-commentary-gate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.smc .smc-commentary-gate h2 {
  font-size: 24px;
}

.smc .smc-community .smc-commentary-gate>* {
  margin: 0;
}

.smc .smc-commentary-gate p {
  color: var(--smc-muted);
}

.smc .smc-community .smc-prose {
  overflow-wrap: anywhere;
}

.smc .smc-community .smc-prose img,
.smc .smc-community .smc-prose iframe {
  max-width: 100%;
}

.smc .smc-community .smc-prose pre {
  overflow-x: auto;
  padding: 16px;
  background: var(--smc-alt);
  border-radius: 8px;
}

.smc .smc-community .smc-prose blockquote {
  margin: 16px 0;
  padding: 8px 20px;
  border-left: 3px solid var(--smc-acc);
  color: var(--smc-muted);
}

.smc .smc-community-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.smc .smc-community-search {
  flex: 1 1 360px;
}

.smc .smc-community-search input {
  flex: 1 1 200px;
  width: auto;
  min-width: 0;
}

.smc .smc-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--smc-line);
  border-radius: var(--smc-radius);
}

.smc .smc-community-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
}

.smc .smc-community-table th,
.smc .smc-community-table td {
  padding: 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--smc-line);
}

.smc .smc-community-table th {
  font-size: 14px;
  font-weight: 600;
  background: var(--smc-alt);
}

.smc .smc-community-table tr:last-child td {
  border-bottom: 0;
}

.smc .smc-community-table h5 {
  font: 600 17px/1.4 var(--smc-body);
  margin: 0 0 6px;
}

.smc .smc-community-table .activity-column {
  width: 26%;
}

.smc .smc-community-table small {
  display: block;
  color: var(--smc-muted);
}

.smc .smc-community-table .counter-column {
  text-align: center;
  width: 80px;
}

.smc .smc-community .topic-indicator {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--smc-line);
}

.smc .smc-community .topic-indicator.has-new {
  background: var(--smc-acc);
}

.smc .smc-community .indicator-column {
  width: 20px;
  padding-right: 0;
}

.smc .smc-community .member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
}

.smc .smc-community .forum-subchannel ul {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-size: 14px;
}

.smc .smc-discussion-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: start;
}

.smc .smc-discussion-layout>aside {
  grid-column: 2;
  grid-row: 1;
}

.smc .smc-discussion-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.smc .smc-community .forum-post {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--smc-line);
}

.smc .smc-community .forum-post.is-guarded {
  background: var(--smc-alt);
}

.smc .smc-community .avatar img,
.smc .smc-community-avatar {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.smc .smc-community .author {
  font-weight: 600;
}

.smc .smc-community .text {
  margin-top: 16px;
}

.smc .smc-community .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.smc .smc-community .actions .smc-button {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.smc .smc-community .reply-form {
  margin-block: 28px;
}

.smc .smc-community textarea.autoExpand {
  min-height: 96px;
  overflow-y: hidden;
}

.smc .smc-community .smc-topic-controls {
  margin-bottom: 24px;
}

.smc .smc-community-pagination {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-block: 24px;
}

.smc .smc-community .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.smc .smc-community .pagination a,
.smc .smc-community .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--smc-line);
  border-radius: 8px;
  text-decoration: none;
}

.smc .smc-community .pagination .active a {
  background: var(--smc-acc);
  color: var(--smc-acc-ink);
  border-color: var(--smc-acc);
}

.smc .smc-community .pagination .disabled {
  color: var(--smc-muted);
}

.smc .smc-community .pagination .interval {
  padding: 8px;
  color: var(--smc-muted);
}

@media (max-width: 900px) {
  .smc .smc-discussion-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .smc .smc-discussion-layout>aside,
  .smc .smc-discussion-main {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .smc .smc-commentary-detail>.smc-community-comments {
    padding: 20px;
  }

  .smc .smc-community .forum-post {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .smc .smc-community .avatar img {
    width: 32px;
    height: 32px;
  }
}
