/* ============================================================
   Space — Design System CSS
   ============================================================ */

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

/* Tokens */
:root {
  --bg: #F2F0EC;
  --white: #FFFFFF;
  --surface-2: #E8E5DF;
  --border: #DDD9D2;
  --border-2: #C4BFB5;
  --text: #141920;
  --text-2: #4E5A68;
  --text-3: #8E99A6;

  --teal: #0C9487;
  --teal-dark: #0A7A6D;
  --teal-bg: #DEF0ED;
  --teal-t: #053D38;
  --teal-b: #7FD5CC;

  --amber: #D4720A;
  --amber-bg: #FEF0D8;
  --amber-t: #6B3305;
  --amber-b: #F5C27A;

  --green: #0A7842;
  --green-bg: #D6F4E6;
  --green-t: #044522;
  --green-b: #6ECFA0;

  --purple: #5E22CC;
  --purple-bg: #ECEAFE;
  --purple-t: #32107A;
  --purple-b: #B09EEE;

  --pink: #B01A56;
  --pink-bg: #FCE6F0;
  --pink-t: #6E0D35;
  --pink-b: #ED93B1;

  --coral: #8F2C0B;
  --coral-bg: #FFECE4;
  --coral-t: #5A1A06;
  --coral-b: #F0A07A;

  --gray-mid: #6B7280;
  --gray-bg: #ECEAE6;
  --gray-t: #373E4A;
  --gray-b: #B4B2A9;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  --z-dropdown: 200;
  --z-sticky: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
}

/* Base */
html { font-size: 14px; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Ramp system — applied via data-ramp="<color>" */
[data-ramp="teal"]   { --ramp: var(--teal);    --ramp-bg: var(--teal-bg);   --ramp-t: var(--teal-t);   --ramp-b: var(--teal-b); }
[data-ramp="amber"]  { --ramp: var(--amber);   --ramp-bg: var(--amber-bg);  --ramp-t: var(--amber-t);  --ramp-b: var(--amber-b); }
[data-ramp="green"]  { --ramp: var(--green);   --ramp-bg: var(--green-bg);  --ramp-t: var(--green-t);  --ramp-b: var(--green-b); }
[data-ramp="purple"] { --ramp: var(--purple);  --ramp-bg: var(--purple-bg); --ramp-t: var(--purple-t); --ramp-b: var(--purple-b); }
[data-ramp="pink"]   { --ramp: var(--pink);    --ramp-bg: var(--pink-bg);   --ramp-t: var(--pink-t);   --ramp-b: var(--pink-b); }
[data-ramp="coral"]  { --ramp: var(--coral);   --ramp-bg: var(--coral-bg);  --ramp-t: var(--coral-t);  --ramp-b: var(--coral-b); }
[data-ramp="gray"]   { --ramp: var(--gray-mid); --ramp-bg: var(--gray-bg);  --ramp-t: var(--gray-t);   --ramp-b: var(--gray-b); }

/* ============================================================
   Layout
   ============================================================ */

.topnav {
  height: 52px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.nav-logo {
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-logo em { color: var(--teal); font-style: normal; }

.nav-spacer { flex: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal-bg);
  color: var(--teal-t);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid var(--teal-b);
  flex-shrink: 0;
  transition: background .12s;
}
.nav-avatar:hover { background: #C2E8E4; }

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 52px);
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidenav {
  background: var(--white);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sn-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  scrollbar-width: none;
}
.sn-main::-webkit-scrollbar { display: none; }

.sn-context {
  padding: 0 20px 4px;
  font-size: 9px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.6;
}

.sn-propose-btn {
  display: flex;
  margin: 8px 8px 0;
  width: calc(100% - 16px);
  justify-content: center;
  font-size: 12px;
}

.sn-user-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
}

.sn-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal-bg);
  color: var(--teal-t);
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--teal-b);
  user-select: none;
  letter-spacing: .02em;
}

.sn-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sn-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sn-user-role {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.sn-section { margin-bottom: 8px; }

.sn-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 0 20px;
  margin-bottom: 4px;
  display: block;
}

.sn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 16px;
  margin: 1px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: background .1s, color .1s;
}
.sn-item:hover { background: var(--bg); color: var(--text); }
.sn-item.active { background: var(--teal-bg); color: var(--teal-t); font-weight: 500; }
.sn-item svg { flex-shrink: 0; opacity: .65; }
.sn-item.active svg { opacity: 1; }

.sn-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 16px 16px;
}

.sn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 16px;
  margin: 1px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: background .1s, color .1s;
  min-width: 0;
}
.sn-group:hover { background: var(--bg); color: var(--text); }
.sn-group.active { background: var(--ramp-bg); color: var(--ramp-t); font-weight: 500; }

.sng-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ramp);
  flex-shrink: 0;
}

.sng-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sng-count {
  font-size: 10px;
  font-weight: 600;
  background: var(--ramp);
  color: white;
  border-radius: var(--r-pill);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.6;
}

.sn-explore-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 16px;
  margin: 8px 8px 0;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: none;
  transition: background .1s, color .1s, border-color .1s;
  border: 1px dashed var(--border);
}
.sn-explore-link:hover { background: var(--bg); color: var(--text-2); border-color: var(--border-2); }

/* ============================================================
   Inputs
   ============================================================ */

.input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--teal); background: var(--white); }
.input::placeholder { color: var(--text-3); }
textarea.input { resize: none; min-height: 72px; }

/* ============================================================
   Radio option groups (cor / tipo)
   ============================================================ */

.cor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cor-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  background: var(--white);
  transition: border-color .15s, background .15s, color .15s;
}
.cor-option:has(input:checked) {
  border-color: var(--ramp, var(--teal-b));
  background: var(--ramp-bg, var(--teal-bg));
  color: var(--ramp-t, var(--teal-t));
}
.cor-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cor-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ramp);
  flex-shrink: 0;
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 13px; font-weight: 500; color: var(--text); }
.card-body { padding: 20px; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background .12s, border-color .12s;
  border: 1px solid transparent;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal-bg);
  color: var(--teal-t);
  border-color: var(--teal-b);
}
.btn-primary:hover { background: #C2E8E4; }

.btn-secondary {
  background: var(--white);
  color: var(--text-2);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--border-2); }

.btn-ghost {
  background: none;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); }

.btn-ramp {
  background: var(--ramp-bg);
  color: var(--ramp-t);
  border-color: var(--ramp-b);
}
.btn-ramp:hover { filter: brightness(0.94); }

.btn-amber {
  background: var(--amber-bg);
  color: var(--amber-t);
  border-color: var(--amber-b);
}
.btn-amber:hover { filter: brightness(0.96); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }

.gph-leave-btn {
  font-size: 12px;
  color: var(--text-3);
}
.gph-leave-btn:hover {
  color: var(--text-2);
  background: var(--bg);
}

/* ============================================================
   Badges
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.6;
}

.b-teal   { background: var(--teal-bg);   color: var(--teal-t); }
.b-amber  { background: var(--amber-bg);  color: var(--amber-t); }
.b-green  { background: var(--green-bg);  color: var(--green-t); }
.b-purple { background: var(--purple-bg); color: var(--purple-t); }
.b-gray   { background: var(--gray-bg);   color: var(--gray-t); }

/* ============================================================
   Group Cards
   ============================================================ */

.groups-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.group-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 3px 12px rgba(20, 25, 32, .08);
}

.gc-stripe {
  width: 4px;
  flex-shrink: 0;
  background: var(--ramp);
}

.gc-body {
  flex: 1;
  padding: 18px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gc-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  text-wrap: balance;
}

.gc-unread {
  font-size: 11px;
  font-weight: 600;
  background: var(--ramp);
  color: white;
  border-radius: var(--r-pill);
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.6;
  margin-top: 2px;
}

.gc-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
}

.gc-activity {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

.gc-feed-who {
  font-size: 11px;
  font-weight: 500;
  color: var(--ramp);
  margin-bottom: 3px;
}

.gc-feed-title {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.gc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gc-members {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.gc-time {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

/* ============================================================
   Page layout helpers
   ============================================================ */

.main-content {
  padding: 40px 48px;
  max-width: 860px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.page-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}

/* ============================================================
   Empty state
   ============================================================ */

.empty-state {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 64px 48px;
  text-align: center;
  max-width: 480px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  background: var(--teal-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.empty-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  text-wrap: balance;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .main-content { padding: 32px 32px; }
}

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }

  .sidenav {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    width: 280px;
    height: calc(100vh - 52px);
    z-index: var(--z-dropdown);
    box-shadow: 4px 0 24px rgba(20, 25, 32, .12);
    border-right: 1px solid var(--border);
  }
  .sidenav.open { display: flex; }

  .main-content { padding: 24px 20px; }

  .page-header { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .main-content { padding: 20px 16px; }
  .empty-state { padding: 40px 24px; }
}

/* ============================================================
   Badge: ramp-aware variant
   ============================================================ */

.b-ramp { background: var(--ramp-bg); color: var(--ramp-t); }

/* ============================================================
   Group header (forum page)
   ============================================================ */

.group-header {
  background: var(--ramp-bg);
  border-bottom: 1px solid var(--ramp-b);
  padding: 28px 48px 24px;
}

.gh-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.gh-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ramp-t);
  line-height: 1.25;
  text-wrap: balance;
}

.gh-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
  max-width: 560px;
}

.gh-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gh-stat {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.gh-sep {
  color: var(--border-2);
  font-size: 12px;
  user-select: none;
}

/* ============================================================
   Thread list
   ============================================================ */

.conversa-list-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.conversa-row {
  display: grid;
  grid-template-columns: 1fr 68px 108px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.conversa-row:last-child { border-bottom: none; }
.conversa-row:hover { background: var(--bg); }
.conversa-row--pinned { background: var(--ramp-bg); }
.conversa-row--pinned:hover { filter: brightness(0.97); }

.tr-main {
  min-width: 0;
  padding-right: 16px;
}

.tr-title-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 4px;
}

.tr-pin-badge {
  flex-shrink: 0;
  font-size: 9px;
  padding: 1px 6px;
  line-height: 1.5;
  background: white !important;
  color: var(--ramp-t) !important;
  border: 1px solid var(--ramp-b);
}

.tr-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversa-row--pinned .tr-title { color: var(--ramp-t); }

.tr-author {
  font-size: 11px;
  font-weight: 500;
  color: var(--ramp);
}

.tr-replies {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
}

.tr-time {
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
  white-space: nowrap;
}

/* ============================================================
   Responsive — grupo additions
   ============================================================ */

@media (max-width: 900px) {
  .group-header { padding: 24px 32px 20px; }
}

@media (max-width: 768px) {
  .group-header { padding: 20px 20px 16px; }
  .gh-name { font-size: 22px; }

  .conversa-row { grid-template-columns: 1fr 90px; }
  .tr-replies { display: none; }
}

@media (max-width: 480px) {
  .group-header { padding: 16px 16px 14px; }

  .conversa-row { grid-template-columns: 1fr; }
  .tr-title { white-space: normal; overflow: visible; }
  .tr-time { display: none; }
}

/* ============================================================
   Explore page — search row
   ============================================================ */

.explore-search-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.fs-wrap {
  position: relative;
  flex: 1;
}

.fs-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.filter-search {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 12px 9px 34px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: var(--text);
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.filter-search:focus {
  outline: none;
  border-color: var(--teal);
}
.filter-search::placeholder { color: var(--text-3); }
.filter-search::-webkit-search-cancel-button { cursor: pointer; }

.explore-result-count {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   Explore page — grid + cards
   ============================================================ */

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.group-grid-card {
  background: var(--white);
  border-top: 3px solid var(--ramp);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-right-color .15s, border-bottom-color .15s, border-left-color .15s, box-shadow .15s;
}
.group-grid-card:hover {
  border-right-color: var(--border-2);
  border-bottom-color: var(--border-2);
  border-left-color: var(--border-2);
  box-shadow: 0 3px 12px rgba(20, 25, 32, .08);
}

.ggc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ggc-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  text-wrap: balance;
  margin: 0;
}

.ggc-name-link {
  color: inherit;
  text-decoration: none;
  transition: color .12s;
}
.ggc-name-link:hover { color: var(--ramp); }

.ggc-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  flex: 1;
}

.ggc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ggc-tag {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  line-height: 1.5;
}

.ggc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.ggc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.ggc-members {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ggc-sep {
  font-size: 11px;
  color: var(--border-2);
  flex-shrink: 0;
}

/* No-results state */
.explore-no-results {
  padding: 52px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.enr-icon {
  width: 44px;
  height: 44px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  margin-bottom: 4px;
}

.enr-msg {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .explore-search-row { flex-wrap: wrap; gap: 8px; }
  .explore-result-count { order: -1; }
}

@media (max-width: 480px) {
  .ggc-footer { flex-wrap: wrap; gap: 8px; }
}

/* ============================================================
   Motion — reduced-motion override
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================================
   Topic header (conversa detail page)
   ============================================================ */

.topic-header {
  background: var(--ramp-bg);
  border-bottom: 1px solid var(--ramp-b);
  padding: 20px 48px 22px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ramp-t);
  opacity: 0.65;
  margin-bottom: 12px;
  text-decoration: none;
  transition: opacity .12s;
}
.breadcrumb:hover { opacity: 1; }

.th-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ramp-t);
  line-height: 1.3;
  text-wrap: balance;
  margin-bottom: 12px;
}

.th-pin {
  font-size: 9px;
  padding: 1px 6px;
  line-height: 1.6;
  vertical-align: middle;
  margin-right: 7px;
  position: relative;
  top: -1px;
}

.th-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   Post cards (OP + replies)
   ============================================================ */

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ramp-bg);
  color: var(--ramp-t);
  border: 1.5px solid var(--ramp-b);
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  text-decoration: none;
}

.post-author {
  font-size: 13px;
  font-weight: 500;
  color: var(--ramp);
  line-height: 1;
  text-decoration: none;
}

.post-author:hover {
  text-decoration: underline;
}

.post-time {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
  white-space: nowrap;
}

.post-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}
.post-body p { margin-bottom: 12px; }
.post-body p:last-child { margin-bottom: 0; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Replies section
   ============================================================ */

.replies-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .04em;
}
.replies-divider::before,
.replies-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.replies-divider::before { flex: 0 0 0px; }

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  transition: border-color .15s;
}
.reply-card:target {
  border-color: var(--teal-b);
  box-shadow: 0 0 0 3px var(--teal-bg);
}

/* ============================================================
   Reply composer
   ============================================================ */

.reply-composer {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-top: 28px;
  transition: border-color .15s;
}
.reply-composer:focus-within {
  border-color: var(--teal-b);
}

.rc-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 10px;
  display: block;
}

.rc-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  resize: none;
  min-height: 88px;
  transition: background .15s, border-color .15s;
}
.rc-textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--teal);
}
.rc-textarea::placeholder { color: var(--text-3); }

.rc-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 8px;
}

/* ============================================================
   Responsive — topic page
   ============================================================ */

@media (max-width: 900px) {
  .topic-header { padding: 18px 32px 20px; }
}

@media (max-width: 768px) {
  .topic-header { padding: 16px 20px 18px; }
  .th-title { font-size: 18px; }
  .post-card { padding: 18px 18px; }
}

@media (max-width: 480px) {
  .topic-header { padding: 14px 16px 16px; }
  .post-card { padding: 14px 16px; }
  .reply-card { padding: 13px 14px; }
  .reply-composer { padding: 14px 16px; }
  .post-time { display: none; }
}

/* ============================================================
   Topnav breadcrumb
   ============================================================ */

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  margin-left: 6px;
  min-width: 0;
  overflow: hidden;
}

.nbc-item {
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  transition: color .1s;
  flex-shrink: 0;
}
.nbc-item:hover { color: var(--text-2); }

.nbc-sep {
  color: var(--border-2);
  user-select: none;
  font-size: 11px;
  flex-shrink: 0;
}

.nbc-current {
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ============================================================
   Two-column layout — group pages
   ============================================================ */

.layout--group {
  grid-template-columns: 220px 1fr;
}

/* ============================================================
   Group page header — identity + horizontal tabs
   ============================================================ */

.group-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Identity row */
.gph-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 36px 20px;
}

.gph-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--r-lg);
  background: var(--ramp-bg);
  color: var(--ramp-t);
  border: 1.5px solid var(--ramp-b);
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.gph-info {
  flex: 1;
  min-width: 0;
}

.gph-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 5px;
  text-wrap: balance;
}

.gph-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gph-desc-link {
  text-decoration: none;
  transition: color .12s;
}
.gph-desc-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border-2);
}
.gph-desc-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.gph-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}

.gph-meta strong {
  font-weight: 500;
  color: var(--text-2);
}

.gph-meta-sep {
  color: var(--border-2);
}

/* Action buttons */
.gph-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.gph-role-badge {
  font-size: 11px;
  font-weight: 500;
}

/* Horizontal tabs */
.gph-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 28px;
  border-top: 1px solid var(--border);
}

.gph-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.gph-tab:hover { color: var(--text-2); }
.gph-tab:focus-visible {
  outline: 2px solid var(--ramp);
  outline-offset: -2px;
  border-radius: 4px;
}
.gph-tab.active {
  color: var(--ramp);
  font-weight: 500;
  border-bottom-color: var(--ramp);
}

.gph-tab-count {
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-3);
  border-radius: var(--r-pill);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1.7;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.gph-tab.active .gph-tab-count {
  background: var(--ramp-bg);
  color: var(--ramp-t);
}

/* ============================================================
   Profile page header — Pessoa identity
   ============================================================ */

.profile-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pph-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 36px;
}

.pph-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--teal-bg);
  color: var(--teal-t);
  border: 1.5px solid var(--teal-b);
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.pph-avatar-img {
  object-fit: cover;
}

.pph-info {
  flex: 1;
  min-width: 0;
}

.pph-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 4px;
  text-wrap: balance;
}

.pph-handle {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.pph-bio {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============================================================
   Group content area
   ============================================================ */

.group-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.gco-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 36px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}

.gco-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-wrap: balance;
}

.gco-title-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}

.gco-body {
  padding: 24px 36px 48px;
}

.sobre-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .sobre-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Markdown renderizado na descrição da aba Sobre */
.sobre-descricao > :first-child { margin-top: 0; }
.sobre-descricao > :last-child { margin-bottom: 0; }
.sobre-descricao p { margin: 0 0 1em; }
.sobre-descricao h1,
.sobre-descricao h2,
.sobre-descricao h3,
.sobre-descricao h4,
.sobre-descricao h5,
.sobre-descricao h6 {
  font-family: var(--font-sans, inherit);
  line-height: 1.3;
  margin: 1.4em 0 .5em;
}
.sobre-descricao ul,
.sobre-descricao ol { margin: 0 0 1em; padding-left: 1.4em; }
.sobre-descricao li { margin-bottom: .3em; }
.sobre-descricao blockquote {
  margin: 0 0 1em;
  padding-left: 14px;
  border-left: 3px solid var(--border);
  color: var(--text-2);
}
.sobre-descricao code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: var(--bg-2, #f5f5f5);
  padding: .12em .35em;
  border-radius: 4px;
}
.sobre-descricao pre {
  background: var(--bg-2, #f5f5f5);
  padding: 12px 14px;
  border-radius: var(--r-md);
  overflow-x: auto;
  margin: 0 0 1em;
}
.sobre-descricao pre code { background: none; padding: 0; }
.sobre-descricao a { color: var(--ramp); }
.sobre-descricao img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 0 0 1em;
}
.sobre-descricao table,
.pagina-corpo table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1em;
  font-size: 14px;
}
.sobre-descricao th,
.sobre-descricao td,
.pagina-corpo th,
.pagina-corpo td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.sobre-descricao th,
.pagina-corpo th { background: var(--bg-2, #f5f5f5); font-weight: 600; }

/* Topic page content area */
.group-content--topic .topic-header {
  padding: 20px 36px 22px;
}

.group-content--topic .gco-body {
  padding: 28px 36px 56px;
}

/* Página com árvore de navegação lateral */
.pagina-com-arvore {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
}
.pagina-com-arvore .pagina-principal { min-width: 0; }
.pagina-arvore-col {
  position: sticky;
  top: 20px;
  align-self: start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 16px;
}
.pagina-arvore-lista {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.pagina-arvore-item {
  display: block;
  padding: 5px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  border-left: 2px solid transparent;
}
.pagina-arvore-item:hover { background: var(--bg-2, #f5f5f5); color: var(--text); }
.pagina-arvore-item.active {
  color: var(--ramp);
  font-weight: 600;
  border-left-color: var(--ramp);
  background: var(--bg-2, #f5f5f5);
}
.pagina-arvore-secao { margin-top: 12px; }
.pagina-arvore-secao-nome {
  display: block;
  padding: 0 10px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
}

@media (max-width: 860px) {
  .pagina-com-arvore { grid-template-columns: 1fr; }
  .pagina-arvore-col { position: static; }
}

/* ============================================================
   Thread list — header row
   ============================================================ */

.conversa-list-header {
  display: grid;
  grid-template-columns: 1fr 80px 110px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.tlh-topic,
.tlh-replies,
.tlh-time {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.5;
}

.tlh-replies { text-align: center; }
.tlh-time { text-align: right; }

/* Update conversa-row to match header columns */
.conversa-row {
  grid-template-columns: 1fr 80px 110px;
}

/* ============================================================
   Responsive — group layout
   ============================================================ */

@media (max-width: 1024px) {
  .gph-identity { padding: 20px 24px 16px; }
  .gph-tabs { padding: 0 16px; }
  .gco-header,
  .gco-body,
  .group-content--topic .topic-header,
  .group-content--topic .gco-body {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  .layout--group {
    grid-template-columns: 220px 1fr;
  }
  .conversa-row { grid-template-columns: 1fr 90px; }
  .conversa-list-header { grid-template-columns: 1fr 90px; }
  .tlh-replies { display: none; }
  .tr-replies { display: none; }
}

@media (max-width: 480px) {
  .layout--group {
    grid-template-columns: 1fr;
  }
  .gph-identity { padding: 16px 20px 14px; gap: 12px; }
  .gph-avatar { width: 48px; height: 48px; font-size: 14px; }
  .gph-name { font-size: 18px; }
  .gph-actions { display: none; }
  .gph-tabs { padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .gph-tabs::-webkit-scrollbar { display: none; }
  .conversa-row { grid-template-columns: 1fr; }
  .conversa-list-header { display: none; }
  .gco-header { padding: 16px 20px 14px; }
  .gco-body { padding: 16px 20px 32px; }
  .group-content--topic .topic-header { padding: 14px 20px 16px; }
  .group-content--topic .gco-body { padding: 16px 20px 32px; }
}
