:root {
  --forum-bg: #030914;
  --forum-surface: rgba(11, 20, 34, 0.84);
  --forum-surface-strong: rgba(14, 24, 40, 0.96);
  --forum-surface-soft: rgba(18, 30, 48, 0.68);
  --forum-border: rgba(147, 178, 219, 0.13);
  --forum-border-strong: rgba(71, 133, 255, 0.34);
  --forum-text: #f8fafc;
  --forum-muted: rgba(226, 232, 240, 0.62);
  --forum-faint: rgba(226, 232, 240, 0.44);
  --forum-blue: #126bff;
  --forum-blue-light: #5a95ff;
  --forum-green: #18d39b;
  --forum-gold: #f5a524;
}

.forum-premium-page {
  min-height: 100vh;
  color: var(--forum-text);
  background:
    radial-gradient(circle at 74% 8%, rgba(18, 107, 255, 0.12), transparent 31rem),
    radial-gradient(circle at 14% 36%, rgba(47, 125, 255, 0.06), transparent 26rem),
    linear-gradient(180deg, #020711, var(--forum-bg) 42%, #020812);
}

.forum-premium-page #particles-canvas {
  opacity: 0.16;
}

.forum-premium-page #page-forum {
  min-height: calc(100vh - 70px);
  padding: 0;
}

.forum-premium-page #forumMainContainer {
  width: 100%;
  max-width: none;
  padding: 0;
}

.forum-shell,
.forum-shell *,
#topicModal,
#topicModal * {
  box-sizing: border-box;
  min-width: 0;
}

.forum-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.forum-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.forum-eyebrow {
  display: block;
  margin-bottom: 11px;
  color: var(--forum-green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forum-header h1,
.category-page-header h1,
.forum-topic-detail-header h1 {
  margin: 0;
  color: var(--forum-text);
  font-weight: 880;
  line-height: 1.04;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.forum-header h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.forum-header p,
.category-page-header p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--forum-muted);
  font-size: 15px;
  line-height: 1.6;
}

.forum-new-topic-btn,
.forum-secondary-btn {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(123, 167, 255, 0.26);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #126bff, #2f7dff);
  box-shadow: 0 16px 42px rgba(18, 107, 255, 0.28);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
}

.forum-new-topic-btn:hover,
.forum-secondary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 20px 52px rgba(18, 107, 255, 0.36);
}

.forum-new-topic-btn.compact {
  min-height: 44px;
  padding-inline: 19px;
  box-shadow: 0 12px 34px rgba(18, 107, 255, 0.24);
}

.forum-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.forum-stat-card {
  min-height: 88px;
  padding: 17px;
  border: 1px solid var(--forum-border);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  background: linear-gradient(145deg, rgba(17, 29, 47, 0.88), rgba(8, 17, 30, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
}

.forum-stat-icon,
.forum-category-icon,
.forum-topic-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.forum-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #8ab3ff;
  background: rgba(47, 125, 255, 0.12);
}

.forum-stat-icon.green {
  color: #42dfb1;
  background: rgba(24, 211, 155, 0.11);
}

.forum-stat-icon.purple {
  color: #a990ff;
  background: rgba(139, 92, 246, 0.12);
}

.forum-stat-icon.gold {
  color: #ffbc4d;
  background: rgba(245, 165, 36, 0.12);
}

.forum-stat-card strong {
  display: block;
  color: var(--forum-text);
  font-size: 21px;
  font-weight: 880;
  line-height: 1;
}

.forum-stat-card span:last-child {
  display: block;
  margin-top: 7px;
  color: var(--forum-muted);
  font-size: 12px;
  line-height: 1.2;
}

.forum-icon {
  width: 1em;
  height: 1em;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: inherit;
}

.forum-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.forum-section + .forum-section {
  margin-top: 36px;
}

.forum-section-heading {
  min-height: 40px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.forum-section-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #76a5ff;
}

.forum-section-heading .forum-icon {
  width: 19px;
  height: 19px;
}

.forum-section-heading h2,
.forum-replies-section h2 {
  margin: 0;
  color: var(--forum-text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.forum-category-list,
.forum-topic-list,
.forum-reply-list {
  display: grid;
  gap: 12px;
}

.forum-category-card,
.forum-topic-row {
  position: relative;
  min-width: 0;
  border: 1px solid var(--forum-border);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--category-color, #2f7dff) 4%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(15, 26, 43, 0.9), rgba(7, 15, 27, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  cursor: pointer;
  outline: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.forum-category-card {
  min-height: 98px;
  padding: 17px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 76px 76px 172px 18px;
  gap: 15px;
  align-items: center;
}

.forum-category-card:hover,
.forum-category-card:focus-visible,
.forum-topic-row:hover,
.forum-topic-row:focus-visible {
  transform: translateY(-2px);
  border-color: var(--forum-border-strong);
  box-shadow: 0 20px 58px rgba(3, 13, 31, 0.46), 0 10px 38px rgba(18, 107, 255, 0.08);
}

.forum-category-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: color-mix(in srgb, var(--category-color, #2f7dff) 76%, white);
  background: color-mix(in srgb, var(--category-color, #2f7dff) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--category-color, #2f7dff) 20%, transparent);
}

.forum-category-icon .forum-icon {
  width: 23px;
  height: 23px;
}

.forum-category-copy h3,
.forum-topic-main h3 {
  margin: 0;
  color: var(--forum-text);
  overflow-wrap: break-word;
}

.forum-category-copy h3 {
  font-size: 15px;
  font-weight: 830;
  letter-spacing: -0.02em;
}

.forum-category-copy p {
  max-width: 610px;
  margin: 5px 0 0;
  color: var(--forum-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.forum-category-metric {
  text-align: center;
}

.forum-category-metric strong,
.forum-topic-stat strong {
  display: block;
  color: var(--forum-text);
  font-size: 15px;
  font-weight: 850;
}

.forum-category-metric span,
.forum-topic-stat span,
.forum-category-last small {
  display: block;
  margin-top: 4px;
  color: var(--forum-faint);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.forum-category-last {
  padding-left: 15px;
  border-left: 1px solid var(--forum-border);
}

.forum-category-last strong {
  display: block;
  margin-top: 5px;
  color: rgba(248, 250, 252, 0.82);
  font-size: 11px;
  font-weight: 750;
}

.forum-category-last > span {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--forum-muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forum-row-arrow {
  color: rgba(147, 178, 219, 0.58);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.forum-topic-row {
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 82px 98px 18px;
  gap: 13px;
  align-items: center;
}

.forum-topic-icon {
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--category-color, #2f7dff) 22%, transparent);
  border-radius: 13px;
  color: color-mix(in srgb, var(--category-color, #2f7dff) 78%, white);
  background: color-mix(in srgb, var(--category-color, #2f7dff) 12%, transparent);
}

.forum-topic-icon .forum-icon {
  width: 19px;
  height: 19px;
}

.forum-topic-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.forum-topic-main h3 {
  font-size: 14px;
  font-weight: 820;
  line-height: 1.35;
}

.forum-topic-meta {
  margin-top: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--forum-faint);
  font-size: 10px;
}

.forum-user-avatar {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(123, 167, 255, 0.25);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(135deg, #174eaf, #123168);
  background-position: center;
  background-size: cover;
  font-size: 10px;
  font-weight: 850;
}

.forum-user-avatar.tiny {
  width: 21px;
  height: 21px;
  font-size: 7px;
}

.forum-category-chip,
.forum-topic-label,
.forum-reply-context {
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(71, 133, 255, 0.24);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #84adff;
  background: rgba(18, 107, 255, 0.09);
  font-size: 9px;
  font-weight: 800;
}

.forum-topic-label.muted,
.forum-reply-context {
  color: var(--forum-muted);
  border-color: var(--forum-border);
  background: rgba(255, 255, 255, 0.035);
}

.forum-topic-stat {
  text-align: right;
}

.forum-search-field {
  min-height: 40px;
  width: min(330px, 100%);
  padding: 0 13px;
  border: 1px solid var(--forum-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--forum-faint);
  background: rgba(6, 14, 26, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.forum-search-field:focus-within {
  border-color: rgba(71, 133, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(18, 107, 255, 0.08);
}

.forum-search-field .forum-icon {
  width: 16px;
  height: 16px;
}

.forum-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--forum-text);
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.forum-search-field input::placeholder {
  color: var(--forum-faint);
}

.forum-breadcrumb {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--forum-faint);
  font-size: 11px;
  overflow: hidden;
}

.forum-breadcrumb a {
  color: #79a6ff;
  text-decoration: none;
  white-space: nowrap;
}

.forum-breadcrumb strong {
  color: rgba(248, 250, 252, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-page-header {
  margin-bottom: 25px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.category-page-header h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.category-page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.category-follow-btn {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--forum-border);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(248, 250, 252, 0.84);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.category-follow-btn.is-following {
  color: #ffc45c;
  border-color: rgba(245, 165, 36, 0.25);
  background: rgba(245, 165, 36, 0.08);
}

.category-follow-btn .forum-icon {
  width: 15px;
  height: 15px;
}

.forum-category-toolbar {
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid var(--forum-border);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10, 18, 31, 0.66);
}

.forum-search-field.wide {
  width: min(370px, 100%);
}

.topic-filters {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topic-filters::-webkit-scrollbar {
  display: none;
}

.topic-filters button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  flex: 0 0 auto;
  color: var(--forum-muted);
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.topic-filters button.active {
  color: #8eb6ff;
  background: rgba(18, 107, 255, 0.11);
  box-shadow: inset 0 -2px 0 var(--forum-blue);
}

.forum-topic-detail,
.forum-reply-card,
.forum-reply-box,
.forum-reply-locked {
  border: 1px solid var(--forum-border);
  background: linear-gradient(145deg, rgba(14, 25, 42, 0.9), rgba(7, 15, 27, 0.91));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.026);
  backdrop-filter: blur(18px);
}

.forum-topic-detail {
  padding: clamp(22px, 3.4vw, 34px);
  border-radius: 21px;
  margin-bottom: 26px;
}

.forum-topic-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--forum-border);
}

.forum-topic-detail-header h1 {
  margin-top: 9px;
  font-size: clamp(29px, 4vw, 45px);
}

.forum-topic-detail-stats {
  display: flex;
  gap: 20px;
  color: var(--forum-faint);
  font-size: 10px;
  text-align: center;
}

.forum-topic-detail-stats span {
  min-width: 74px;
}

.forum-topic-detail-stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--forum-text);
  font-size: 16px;
}

.forum-topic-author {
  margin: 21px 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.forum-topic-author strong,
.forum-reply-head strong {
  display: block;
  color: var(--forum-text);
  font-size: 12px;
}

.forum-topic-author span,
.forum-reply-head span {
  display: block;
  margin-top: 3px;
  color: var(--forum-faint);
  font-size: 10px;
}

.forum-role-badge {
  display: inline-flex !important;
  align-items: center;
  min-height: 20px;
  margin-right: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(47, 125, 255, .35);
  border-radius: 999px;
  background: rgba(47, 125, 255, .1);
  color: #9ac5ff !important;
  font-size: .63rem !important;
  font-weight: 800;
}
.forum-role-badge.role-ceo { border-color: rgba(24, 211, 155, .48); color: #72ecc7 !important; }
.forum-role-badge.role-platform { border-color: rgba(139, 92, 246, .48); color: #c2aaff !important; }
.forum-role-badge.role-forum { border-color: rgba(24, 211, 155, .45); color: #67e9c2 !important; }
.forum-role-badge.role-blog { border-color: rgba(34, 211, 238, .45); color: #80eaf5 !important; }
.forum-role-badge.role-professor { border-color: rgba(125, 211, 252, .45); color: #b7e8ff !important; }
.forum-role-badge.role-student,
.forum-role-badge.role-custom { border-color: rgba(148, 163, 184, .3); color: #cbd5e1 !important; }

.forum-topic-content,
.forum-reply-content {
  color: rgba(238, 244, 252, 0.78);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.forum-topic-content p,
.forum-reply-content p {
  margin: 0 0 12px;
}

.forum-topic-content p:last-child,
.forum-reply-content p:last-child {
  margin-bottom: 0;
}

.forum-topic-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.forum-topic-tags span {
  padding: 6px 9px;
  border: 1px solid rgba(71, 133, 255, 0.18);
  border-radius: 999px;
  color: #78a6ff;
  background: rgba(18, 107, 255, 0.07);
  font-size: 9px;
  font-weight: 750;
}

.forum-topic-actions,
.forum-reply-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.forum-topic-actions button,
.forum-reply-actions button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid var(--forum-border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(238, 244, 252, 0.76);
  background: rgba(255, 255, 255, 0.025);
  font: inherit;
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
}

.forum-topic-actions .forum-icon,
.forum-reply-actions .forum-icon {
  width: 14px;
  height: 14px;
  color: #6fa0ff;
}

.forum-replies-section {
  margin-bottom: 18px;
}

.forum-replies-section > header {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.forum-replies-section select {
  min-height: 36px;
  padding: 0 31px 0 12px;
  border: 1px solid var(--forum-border);
  border-radius: 10px;
  color: rgba(248, 250, 252, 0.75);
  background: #091323;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
}

.forum-reply-card {
  padding: 17px;
  border-radius: 16px;
}

.forum-reply-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forum-reply-head > div {
  flex: 1;
}

.forum-reply-context {
  flex: 0 0 auto;
}

.forum-reply-actions {
  margin-top: 13px;
}

.forum-reply-box {
  position: sticky;
  bottom: 12px;
  z-index: 4;
  padding: 11px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.forum-reply-compose {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.forum-reply-box textarea {
  min-height: 42px;
  max-height: 160px;
  padding: 11px 12px;
  border: 0;
  outline: 0;
  resize: vertical;
  color: var(--forum-text);
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.forum-reply-attachments-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 4px;
}

.forum-reply-attachments-toolbar input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.forum-reply-attachments-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #77aaff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.forum-reply-attachments-toolbar label svg {
  width: 16px;
  height: 16px;
}

.forum-reply-attachments-toolbar small {
  color: var(--forum-muted);
  font-size: 10px;
}

.forum-reply-attachment-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.forum-reply-attachment-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(112, 153, 207, 0.2);
  border-radius: 10px;
  background: rgba(3, 15, 31, 0.72);
}

.forum-reply-attachment-list article > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  color: #ff8797;
  background: rgba(226, 58, 79, 0.13);
  font-size: 9px;
  font-weight: 900;
}

.forum-reply-attachment-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-reply-attachment-list div {
  min-width: 0;
  display: grid;
}

.forum-reply-attachment-list strong,
.forum-reply-attachment-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-reply-attachment-list strong {
  font-size: 10px;
}

.forum-reply-attachment-list small {
  color: var(--forum-muted);
  font-size: 9px;
}

.forum-reply-attachment-list button {
  min-height: 26px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--forum-muted);
  background: transparent;
  cursor: pointer;
}

.forum-reply-attachment-list button svg {
  width: 14px;
  height: 14px;
}

.forum-reply-box > .forum-reply-submit,
.forum-reply-locked button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #126bff, #2f7dff);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.forum-reply-locked {
  padding: 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--forum-muted);
}

.forum-reply-locked strong {
  color: var(--forum-text);
}

.forum-reply-locked span {
  flex: 1;
  font-size: 11px;
}

.forum-replies-preview {
  position: relative;
  min-height: 180px;
  padding: 15px;
  border: 1px solid var(--forum-border);
  border-radius: 16px;
  display: grid;
  gap: 9px;
  overflow: hidden;
  background: rgba(7, 15, 27, 0.74);
}

.forum-replies-preview div {
  height: 48px;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(71, 95, 130, 0.16), rgba(71, 95, 130, 0.08));
  filter: blur(2px);
}

.forum-replies-preview strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--forum-text);
  background: rgba(3, 9, 20, 0.48);
  font-size: 12px;
}

.forum-empty-inline,
.forum-empty-state,
.forum-route-loading {
  border: 1px solid var(--forum-border);
  border-radius: 17px;
  color: var(--forum-muted);
  background: rgba(9, 18, 31, 0.7);
}

.forum-empty-inline {
  padding: 24px;
  text-align: center;
  font-size: 12px;
}

.forum-empty-state {
  min-height: 360px;
  padding: 30px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.forum-empty-state.compact {
  min-height: 240px;
}

.forum-empty-state > .forum-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  color: #679bff;
}

.forum-empty-state h1,
.forum-empty-state h2 {
  margin: 0;
  color: var(--forum-text);
  font-size: 22px;
}

.forum-empty-state p {
  max-width: 460px;
  margin: 9px 0 18px;
  line-height: 1.6;
}

.forum-route-loading {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.forum-route-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f8cff;
  animation: forumPulse 1s ease-in-out infinite;
}

.forum-route-loading span:nth-child(2) {
  animation-delay: 0.14s;
}

.forum-route-loading span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes forumPulse {
  0%, 100% { opacity: 0.28; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-5px); }
}

.topic-create-overlay {
  z-index: 6500;
  padding: clamp(16px, 3vw, 32px);
  overflow: hidden;
  background: rgba(0, 5, 13, 0.78);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}

body.topic-modal-open {
  overflow: hidden;
}

.topic-create-dialog {
  position: relative;
  width: min(740px, 100%);
  max-height: 86vh;
  overflow: hidden;
  border: 1px solid rgba(92, 147, 230, 0.3);
  border-radius: 24px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 82% 0, rgba(21, 103, 255, 0.17), transparent 25rem),
    linear-gradient(145deg, rgba(8, 22, 40, 0.99), rgba(4, 14, 26, 0.995));
  box-shadow:
    0 44px 120px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(31, 113, 255, 0.05) inset,
    0 0 68px rgba(10, 94, 255, 0.08);
  transform: translateY(22px) scale(0.975);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.topic-create-overlay.active .topic-create-dialog {
  transform: translateY(0) scale(1);
}

.topic-create-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 62%, rgba(47, 125, 255, 0.035) 62.3%, transparent 63%),
    linear-gradient(118deg, transparent 70%, rgba(47, 125, 255, 0.045) 70.3%, transparent 71%);
}

.topic-create-dialog > form {
  display: flex;
  max-height: 86vh;
  min-height: 0;
  flex-direction: column;
}

.topic-create-header {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  gap: 20px;
  align-items: center;
  flex: 0 0 auto;
  padding: 25px 26px 23px;
  border-bottom: 1px solid rgba(122, 157, 202, 0.16);
  background: linear-gradient(112deg, rgba(7, 21, 37, 0.7), rgba(12, 39, 72, 0.24));
}

.topic-create-hero-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(66, 139, 255, 0.82);
  border-radius: 19px;
  color: #4f91ff;
  background: linear-gradient(145deg, rgba(29, 98, 219, 0.28), rgba(13, 46, 91, 0.42));
  box-shadow: 0 16px 44px rgba(18, 107, 255, 0.2), inset 0 0 24px rgba(35, 112, 255, 0.08);
}

.topic-create-hero-icon svg {
  width: 36px;
  height: 36px;
}

.topic-create-heading {
  min-width: 0;
}

.topic-create-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #438dff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#topicModal .topic-create-heading h2 {
  margin: 0;
  color: #fbfdff;
  font-size: clamp(25px, 4vw, 32px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

#topicModal .topic-create-heading p {
  max-width: 470px;
  margin: 9px 0 0;
  color: rgba(223, 233, 247, 0.7);
  font-size: 13px;
  line-height: 1.5;
}

.topic-create-close {
  display: grid;
  width: 42px;
  height: 42px;
  align-self: start;
  place-items: center;
  border: 1px solid rgba(148, 176, 215, 0.11);
  border-radius: 50%;
  color: rgba(241, 246, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.topic-create-close:hover {
  border-color: rgba(113, 163, 245, 0.36);
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(4deg);
}

.topic-create-close:disabled {
  cursor: wait;
  opacity: 0.45;
}

.topic-create-close svg {
  width: 20px;
  height: 20px;
}

.topic-create-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px 26px 8px;
  scrollbar-color: rgba(66, 132, 235, 0.48) transparent;
  scrollbar-width: thin;
}

.topic-create-body::-webkit-scrollbar {
  width: 7px;
}

.topic-create-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(66, 132, 235, 0.42);
}

.topic-create-row {
  display: grid;
  grid-template-columns: minmax(158px, 0.7fr) minmax(0, 1.7fr);
  gap: 24px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid rgba(124, 156, 199, 0.1);
}

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

.topic-create-context {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding-top: 8px;
}

.topic-create-context-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #438dff;
}

.topic-create-context-icon svg {
  width: 20px;
  height: 20px;
}

.topic-create-context label {
  display: block;
  color: #f4f8ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.topic-create-context label span {
  color: rgba(220, 230, 245, 0.57);
  font-weight: 600;
}

.topic-create-context p {
  margin: 6px 0 0;
  color: rgba(211, 224, 242, 0.57);
  font-size: 11px;
  line-height: 1.52;
}

.topic-create-control {
  min-width: 0;
}

.topic-input-shell,
.topic-textarea-shell,
.topic-tags-shell {
  position: relative;
  width: 100%;
  border: 1px solid rgba(132, 166, 212, 0.24);
  border-radius: 14px;
  color: #f8fbff;
  background: rgba(3, 13, 25, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.topic-input-shell:focus-within,
.topic-textarea-shell:focus-within,
.topic-tags-shell:focus-within {
  border-color: rgba(54, 129, 255, 0.83);
  background: rgba(4, 17, 33, 0.94);
  box-shadow: 0 0 0 3px rgba(27, 105, 239, 0.12), 0 16px 36px rgba(0, 0, 0, 0.15);
}

.topic-create-row.is-invalid .topic-input-shell,
.topic-create-row.is-invalid .topic-textarea-shell,
.topic-create-row.is-invalid .topic-tags-shell {
  border-color: rgba(255, 91, 111, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 71, 95, 0.08);
}

.topic-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #438dff;
  pointer-events: none;
  transform: translateY(-50%);
}

.topic-input-icon svg,
.topic-select-chevron svg {
  width: 18px;
  height: 18px;
}

#topicModal input,
#topicModal select,
#topicModal textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #f7faff;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

#topicModal input::placeholder,
#topicModal textarea::placeholder {
  color: rgba(199, 214, 236, 0.46);
}

#topicModal input:disabled,
#topicModal select:disabled,
#topicModal textarea:disabled {
  cursor: wait;
  opacity: 0.65;
}

#topicModal #topicTitle,
#topicModal #topicCategory {
  min-height: 51px;
  padding: 12px 74px 12px 44px;
}

#topicModal #topicCategory {
  padding-right: 42px;
  color-scheme: dark;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

#topicModal #topicCategory option {
  color: #f7faff;
  background: #071422;
}

.topic-select-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  color: rgba(226, 236, 249, 0.8);
  pointer-events: none;
  transform: translateY(-50%);
}

.topic-character-counter {
  position: absolute;
  top: 50%;
  right: 13px;
  color: rgba(222, 232, 246, 0.68);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transform: translateY(-50%);
}

.topic-textarea-shell {
  overflow: hidden;
}

.topic-textarea-shell .topic-input-icon {
  top: 17px;
  transform: none;
}

#topicModal #topicContent {
  display: block;
  min-height: 150px;
  padding: 15px 55px 50px 44px;
  line-height: 1.62;
  resize: vertical;
}

.topic-textarea-shell .topic-character-counter {
  top: 17px;
  transform: none;
}

.topic-content-guidance {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-top: 1px solid rgba(123, 157, 205, 0.16);
  color: rgba(222, 232, 246, 0.67);
  background: rgba(7, 22, 38, 0.84);
  font-size: 10px;
  pointer-events: none;
}

.topic-content-guidance > span:first-child {
  display: grid;
  color: #1ed59d;
}

.topic-content-guidance svg {
  width: 15px;
  height: 15px;
}

.topic-tags-shell {
  display: flex;
  min-height: 88px;
  align-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px 35px;
}

.topic-tags-list {
  display: contents;
}

.topic-tag-chip {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(64, 133, 255, 0.32);
  border-radius: 999px;
  color: #dceaff;
  background: linear-gradient(135deg, rgba(20, 87, 200, 0.5), rgba(18, 65, 138, 0.44));
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.topic-tag-chip button {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(227, 238, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.topic-tag-chip button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.topic-tag-chip svg {
  width: 11px;
  height: 11px;
}

#topicModal #topicTagEntry {
  width: auto;
  min-width: 180px;
  flex: 1 1 180px;
  padding: 8px 2px;
}

.topic-tags-footer {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(123, 157, 205, 0.13);
  color: rgba(208, 221, 240, 0.49);
  font-size: 9px;
}

.topic-tags-footer strong {
  color: rgba(224, 233, 247, 0.74);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.topic-attachment-dropzone {
  display: grid;
  min-height: 126px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px dashed rgba(79, 145, 255, 0.42);
  border-radius: 15px;
  color: rgba(222, 233, 248, 0.72);
  text-align: center;
  background: linear-gradient(145deg, rgba(13, 51, 96, 0.22), rgba(4, 15, 28, 0.55));
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.topic-attachment-dropzone:hover,
.topic-attachment-dropzone:focus-visible,
.topic-attachment-dropzone.is-dragging {
  border-color: rgba(79, 145, 255, 0.9);
  outline: 0;
  background: rgba(20, 78, 167, 0.2);
  transform: translateY(-1px);
}

.topic-create-row.is-invalid .topic-attachment-dropzone {
  border-color: rgba(255, 91, 111, 0.78);
}

.topic-attachment-dropzone-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: #4f91ff;
  background: rgba(43, 111, 229, 0.16);
}

.topic-attachment-dropzone-icon svg {
  width: 21px;
  height: 21px;
}

.topic-attachment-dropzone strong {
  color: #f2f7ff;
  font-size: 12px;
}

.topic-attachment-dropzone > span:not(.topic-attachment-dropzone-icon) {
  font-size: 10px;
}

.topic-attachment-dropzone small {
  margin-top: 4px;
  color: rgba(205, 219, 239, 0.5);
  font-size: 9px;
}

.topic-attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.topic-attachment-list:empty {
  display: none;
}

.topic-attachment-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(123, 157, 205, 0.15);
  border-radius: 12px;
  background: rgba(5, 18, 32, 0.76);
}

.topic-attachment-preview {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border-radius: 9px;
  color: #ff929e;
  background: rgba(255, 76, 94, 0.1);
  font-size: 9px;
  font-weight: 900;
}

.topic-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-attachment-meta {
  min-width: 0;
}

.topic-attachment-meta strong,
.topic-attachment-meta > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-attachment-meta strong {
  color: #eef5ff;
  font-size: 10px;
}

.topic-attachment-meta > span {
  margin-top: 3px;
  color: rgba(206, 220, 239, 0.56);
  font-size: 9px;
}

.topic-attachment-progress {
  height: 3px;
  margin-top: 6px !important;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.topic-attachment-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2568ff, #35a3ff);
  transition: width 0.25s ease;
}

.topic-attachment-item > button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 117, 137, 0.15);
  border-radius: 9px;
  color: rgba(255, 157, 171, 0.82);
  background: rgba(255, 77, 100, 0.05);
  cursor: pointer;
}

.topic-attachment-item > button svg {
  width: 14px;
  height: 14px;
}

.forum-content-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  gap: 10px;
  margin-top: 18px;
}

.forum-content-attachment {
  overflow: hidden;
  border: 1px solid rgba(83, 137, 215, 0.2);
  border-radius: 12px;
  color: #dceaff;
  text-decoration: none;
  background: rgba(5, 19, 35, 0.72);
}

.forum-content-attachment.image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.forum-content-attachment.image span {
  display: block;
  overflow: hidden;
  padding: 8px 10px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-content-attachment.pdf {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 11px;
}

.forum-content-attachment.pdf > span {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 9px;
  color: #ff9aa7;
  background: rgba(255, 76, 94, 0.12);
  font-size: 9px;
  font-weight: 900;
}

.forum-content-attachment.pdf strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-field-error {
  min-height: 0;
  margin: 0;
  color: #ff7e91;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.topic-field-error:not(:empty) {
  min-height: 18px;
  padding: 5px 3px 0;
}

.topic-create-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid rgba(122, 157, 202, 0.16);
  background: rgba(4, 14, 26, 0.92);
}

.topic-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.topic-action svg {
  width: 17px;
  height: 17px;
}

.topic-action:hover:not(:disabled) {
  transform: translateY(-1px);
}

.topic-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.topic-action-cancel {
  border: 1px solid rgba(132, 166, 212, 0.18);
  color: rgba(237, 243, 252, 0.82);
  background: rgba(255, 255, 255, 0.045);
}

.topic-action-cancel:hover:not(:disabled) {
  border-color: rgba(155, 185, 226, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.topic-action-publish {
  min-width: 170px;
  border: 1px solid rgba(111, 166, 255, 0.48);
  color: #fff;
  background: linear-gradient(135deg, #275cff, #2f8cff);
  box-shadow: 0 15px 36px rgba(31, 103, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.topic-action-publish:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 18px 42px rgba(31, 103, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.topic-submit-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: topicSubmitSpin 0.7s linear infinite;
}

@keyframes topicSubmitSpin {
  to { transform: rotate(360deg); }
}

.topic-create-security {
  display: flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid rgba(122, 157, 202, 0.1);
  color: rgba(205, 219, 239, 0.48);
  background: rgba(3, 12, 22, 0.94);
  font-size: 9px;
}

.topic-create-security > span:first-child {
  display: grid;
}

.topic-create-security svg {
  width: 13px;
  height: 13px;
}

.topic-discard-layer[hidden] {
  display: none;
}

.topic-discard-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: inherit;
  background: rgba(0, 7, 16, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topic-discard-card {
  width: min(390px, 100%);
  padding: 25px;
  border: 1px solid rgba(255, 128, 145, 0.24);
  border-radius: 19px;
  text-align: center;
  background: linear-gradient(145deg, #0b1b2d, #071321);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  animation: topicDiscardIn 0.2s ease-out;
}

@keyframes topicDiscardIn {
  from { opacity: 0; transform: translateY(9px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.topic-discard-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid rgba(255, 110, 130, 0.24);
  border-radius: 15px;
  color: #ff7b90;
  background: rgba(255, 70, 94, 0.09);
}

.topic-discard-icon svg {
  width: 23px;
  height: 23px;
}

#topicModal .topic-discard-card h3 {
  margin: 0;
  color: #fff;
  font-size: 19px;
  letter-spacing: -0.025em;
}

#topicModal .topic-discard-card p {
  margin: 8px 0 20px;
  color: rgba(220, 231, 246, 0.65);
  font-size: 12px;
  line-height: 1.5;
}

.topic-discard-card > div {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.topic-discard-card button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

#topicContinueEditing {
  border: 1px solid rgba(134, 169, 216, 0.22);
  color: #e9f1ff;
  background: rgba(255, 255, 255, 0.05);
}

#topicConfirmDiscard {
  border: 1px solid rgba(255, 109, 130, 0.35);
  color: #fff;
  background: linear-gradient(135deg, #d9435a, #f05a70);
}

#topicModal button:focus-visible,
#topicModal input:focus-visible,
#topicModal select:focus-visible,
#topicModal textarea:focus-visible {
  outline: 2px solid #6aa2ff;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .topic-create-overlay {
    padding: 10px;
  }

  .topic-create-dialog,
  .topic-create-dialog > form {
    max-height: 94vh;
  }

  .topic-create-dialog {
    width: 100%;
    border-radius: 20px;
  }

  .topic-create-header {
    grid-template-columns: 54px minmax(0, 1fr) 38px;
    gap: 13px;
    padding: 18px 16px;
  }

  .topic-create-hero-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .topic-create-hero-icon svg {
    width: 27px;
    height: 27px;
  }

  #topicModal .topic-create-heading h2 {
    font-size: 23px;
  }

  #topicModal .topic-create-heading p {
    display: none;
  }

  .topic-create-close {
    width: 38px;
    height: 38px;
  }

  .topic-create-body {
    padding: 5px 16px 8px;
  }

  .topic-create-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px 0;
  }

  .topic-create-context {
    padding-top: 0;
  }

  .topic-create-context p {
    margin-top: 3px;
  }

  .topic-create-footer {
    padding: 13px 16px;
  }

  .topic-action {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 13px;
  }

  .topic-action-publish {
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .topic-create-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .topic-create-dialog {
    max-height: 96vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .topic-create-dialog > form {
    max-height: 96vh;
  }

  .topic-create-header {
    grid-template-columns: 46px minmax(0, 1fr) 36px;
    padding: 15px 14px;
  }

  .topic-create-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  #topicModal .topic-create-heading h2 {
    font-size: 21px;
  }

  .topic-create-eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .topic-create-body {
    padding-inline: 14px;
  }

  .topic-create-footer {
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
  }

  .topic-action {
    min-height: 43px;
    font-size: 11px;
  }

  .topic-create-security {
    display: none;
  }

  #topicModal #topicContent {
    min-height: 132px;
  }

  .topic-tags-footer span {
    max-width: 220px;
  }
}

@media (max-width: 980px) {
  .forum-category-card {
    grid-template-columns: 52px minmax(0, 1fr) 18px;
  }

  .forum-category-metric,
  .forum-category-last {
    display: none;
  }

  .forum-category-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .forum-search-field.wide {
    width: 100%;
  }

  .topic-filters {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .forum-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-topic-row {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
  }

  .forum-topic-stat {
    display: none;
  }

  .forum-topic-detail-header {
    grid-template-columns: 1fr;
  }

  .forum-topic-detail-stats {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .forum-shell {
    width: min(100% - 22px, 1180px);
    padding: 30px 0 64px;
  }

  .forum-header,
  .category-page-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .forum-header .forum-new-topic-btn {
    width: 100%;
  }

  .category-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .forum-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .forum-section-heading .forum-search-field {
    width: 100%;
  }

  .forum-category-card {
    min-height: 88px;
    padding: 14px;
    grid-template-columns: 46px minmax(0, 1fr) 14px;
    gap: 11px;
  }

  .forum-category-icon {
    width: 46px;
    height: 46px;
  }

  .forum-topic-row {
    min-height: 74px;
    padding: 12px;
    grid-template-columns: 40px minmax(0, 1fr) 14px;
    gap: 10px;
  }

  .forum-topic-icon {
    width: 40px;
    height: 40px;
  }

  .forum-topic-detail {
    padding: 20px;
    border-radius: 17px;
  }

  .forum-topic-detail-stats {
    gap: 10px;
  }

  .forum-topic-detail-stats span {
    min-width: 0;
    flex: 1;
  }

  .forum-reply-box {
    position: static;
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .forum-reply-box > .forum-reply-submit {
    grid-column: 1 / -1;
    width: 100%;
  }

  .forum-reply-attachment-list {
    grid-template-columns: 1fr;
  }

  .forum-reply-locked {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .forum-stats-grid {
    gap: 8px;
  }

  .forum-stat-card {
    min-height: 76px;
    padding: 11px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
  }

  .forum-stat-icon {
    width: 38px;
    height: 38px;
  }

  .forum-stat-card strong {
    font-size: 17px;
  }

  .forum-stat-card span:last-child {
    margin-top: 5px;
    font-size: 9px;
  }

  .category-page-actions {
    grid-template-columns: 1fr;
  }

  .forum-category-copy p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .forum-topic-meta > span:nth-of-type(2),
  .forum-category-chip {
    display: none;
  }

  .forum-topic-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .forum-breadcrumb {
    margin-bottom: 17px;
  }

  .forum-replies-section > header {
    align-items: stretch;
    flex-direction: column;
  }

  .forum-replies-section select {
    width: 100%;
  }

  .forum-topic-actions,
  .forum-reply-actions {
    flex-wrap: wrap;
  }

  #topicModal .modal {
    padding: 21px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .forum-category-card,
  .forum-topic-row,
  .forum-new-topic-btn,
  .forum-secondary-btn,
  .forum-route-loading span,
  .topic-create-dialog,
  .topic-create-close,
  .topic-action,
  .topic-discard-card,
  .topic-submit-spinner {
    transition: none !important;
    animation: none !important;
  }
}

.forum-member-link {
  color: inherit;
  text-decoration: none;
}

.forum-member-link:hover strong,
.forum-member-link:hover > span:last-child,
.forum-last-user:hover {
  color: #82b8ff;
}

.forum-member-avatar-link {
  display: inline-flex;
  border-radius: 50%;
}

.forum-member-name-link {
  display: inline-flex;
}

.forum-last-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
