/* ==========================================================================
   SALAM SOVEREIGN COMMUNITY FORUM — DESIGN SYSTEM
   Modeled directly on Signal Community (community.signalusers.org) & Telegram
   ========================================================================== */

:root {
  --bg-canvas: #FAFAF8;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F4F4F0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FBFBFA;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --accent-gold: #E1B12C;
  --accent-gold-dark: #C6951B;
  --accent-gold-light: #FEF9EE;
  
  --accent-emerald: #0D5A4D;
  --accent-emerald-light: #ECFDF5;
  --accent-emerald-border: #10B981;
  
  --accent-slate: #1E293B;
  --accent-blue: #2563EB;
  --accent-red: #EF4444;

  --border-subtle: #E2E8F0;
  --border-card: #E5E7EB;
  --border-focus: #E1B12C;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-composer: 0 20px 30px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-arabic: 'Tajawal', 'Cairo', sans-serif;
}

[dir="rtl"] {
  --font-sans: var(--font-arabic);
  --font-heading: var(--font-arabic);
}

/* Strict Hidden Utility */
[hidden], .is-hidden {
  display: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   HEADER & TOP NAVIGATION
   ========================================================================== */

.forum-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.return-main-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  transition: all 0.15s ease;
}

.return-main-link:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.header-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

[dir="rtl"] .search-input {
  padding: 0.55rem 2.4rem 0.55rem 1rem;
}

.search-input:focus {
  background: var(--bg-surface);
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(225, 177, 44, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

[dir="rtl"] .search-icon {
  left: auto;
  right: 0.85rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-new-topic {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-gold);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-new-topic:hover {
  background: var(--accent-gold-dark);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO / BANNER STRIP
   ========================================================================== */

.forum-banner {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.75rem 1.5rem;
}

.banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.banner-copy h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.banner-copy p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 680px;
}

.banner-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.banner-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.stat-desc {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   MAIN LAYOUT (CATEGORIES SIDEBAR + TOPIC FEED)
   ========================================================================== */

.forum-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  width: 100%;
}

/* SIDEBAR: CATEGORIES */

.forum-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

[dir="rtl"] .category-link {
  text-align: right;
}

.category-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.category-link.is-active {
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.category-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

/* TOPIC FEED & TABS */

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.feed-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-full);
}

.feed-tab {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.feed-tab.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* TOPIC LIST TABLE */

.topics-table {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.topic-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
  cursor: pointer;
}

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

.topic-row:hover {
  background-color: var(--bg-card-hover);
}

.topic-row.is-pinned {
  background-color: #FEFCF6;
  border-left: 3px solid var(--accent-gold);
}

[dir="rtl"] .topic-row.is-pinned {
  border-left: none;
  border-right: 3px solid var(--accent-gold);
}

/* VOTE BUTTON */

.vote-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.vote-box:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
  transform: scale(1.04);
}

.vote-box:active {
  transform: scale(0.96);
}

.vote-box.has-voted {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #FFFFFF;
}

.vote-arrow {
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 700;
}

.vote-count {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
}

.topic-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.topic-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.topic-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.topic-row:hover .topic-title {
  color: var(--accent-gold-dark);
}

.badge-pinned {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.topic-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.topic-author {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.author-avatar {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--accent-slate);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.topic-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-replies, .stat-views {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

/* ==========================================================================
   IN-FORUM THREAD READER (IN-CANVAS VIEW)
   ========================================================================== */

.thread-reader {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.thread-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.btn-back-feed {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  transition: all 0.15s ease;
}

.btn-back-feed:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.thread-title-area {
  flex: 1;
}

.thread-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.thread-body {
  font-size: 0.98rem;
  color: var(--text-primary);
  line-height: 1.7;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.thread-body p {
  margin-bottom: 1rem;
}

.thread-body code {
  background: var(--bg-subtle);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--accent-slate);
}

.thread-body pre {
  background: #0F172A;
  color: #F8FAFC;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1rem;
}

.thread-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.thread-body blockquote {
  border-left: 3px solid var(--accent-gold);
  padding-left: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}

[dir="rtl"] .thread-body blockquote {
  border-left: none;
  border-right: 3px solid var(--accent-gold);
  padding-left: 0;
  padding-right: 1rem;
}

/* REPLIES SECTION */

.replies-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.replies-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.reply-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reply-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.reply-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reply-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* INLINE REPLY BOX */

.reply-composer-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.reply-inputs-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reply-name-input {
  max-width: 240px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.reply-textarea {
  width: 100%;
  min-height: 75px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
}

.reply-textarea:focus, .reply-name-input:focus {
  border-color: var(--accent-gold);
}

.btn-post-reply {
  align-self: flex-end;
  background: var(--accent-gold);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.btn-post-reply:hover {
  background: var(--accent-gold-dark);
}

/* ==========================================================================
   DISCOURSE-STYLE DOCKED BOTTOM COMPOSER
   ========================================================================== */

.discourse-composer {
  position: fixed;
  bottom: 0;
  right: 2rem;
  width: 720px;
  max-width: calc(100vw - 4rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-composer);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.2s ease;
  transform: translateY(0);
}

[dir="rtl"] .discourse-composer {
  right: auto;
  left: 2rem;
}

.discourse-composer.is-minimized {
  height: 48px !important;
  overflow: hidden;
}

.composer-top-bar {
  background: var(--bg-subtle);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.composer-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.composer-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-composer-ctl {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-composer-ctl:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.composer-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 60vh;
  overflow-y: auto;
}

.composer-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.composer-field {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.composer-field:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(225, 177, 44, 0.12);
}

/* MARKDOWN TOOLBAR */

.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}

.btn-tool {
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-tool:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.composer-textarea {
  min-height: 140px;
  resize: vertical;
}

.composer-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.composer-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-discard-composer {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

.btn-discard-composer:hover {
  color: var(--accent-red);
}

.btn-publish-topic {
  background: var(--accent-gold);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.btn-publish-topic:hover {
  background: var(--accent-gold-dark);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.forum-toast-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

[dir="rtl"] .forum-toast-container {
  left: auto;
  right: 2rem;
}

.forum-toast {
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.forum-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: #FFFFFF;
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* RESPONSIVE */

@media (max-width: 960px) {
  .forum-container {
    grid-template-columns: 1fr;
  }

  .forum-sidebar {
    order: 2;
  }

  .topic-row {
    grid-template-columns: auto 1fr;
  }

  .topic-stats {
    display: none;
  }

  .discourse-composer {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: none;
  }

  [dir="rtl"] .discourse-composer {
    right: 0.75rem;
    left: 0.75rem;
  }
}

@media (max-width: 640px) {
  .header-search {
    display: none;
  }

  .banner-stats {
    display: none;
  }

  .composer-inputs-row {
    grid-template-columns: 1fr;
  }
}
