:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #0b0e14;
  color: #eef1f7;
  --bg: #0b0e14;
  --panel: #121720;
  --panel-raised: #171d28;
  --border: #27303d;
  --muted: #8d98aa;
  --soft: #c3cad6;
  --accent: #8b7cff;
  --accent-bright: #a99eff;
  --green: #4dd599;
  --orange: #ffb86b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.topbar {
  align-items: center;
  background: rgb(11 14 20 / 92%);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  height: 4.5rem;
  padding: 0 2.25rem;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 1.12rem;
  font-weight: 750;
  gap: 0.65rem;
  text-decoration: none;
}
.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), #6de1d3);
  border-radius: 0.7rem;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}
.search-box {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  margin: 0 auto;
  max-width: 32rem;
  padding: 0.55rem 1rem;
  width: 100%;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(139 124 255 / 15%);
}
.search-box input {
  background: transparent;
  border: 0;
  color: #fff;
  min-width: 0;
  outline: 0;
  width: 100%;
}
.search-box input::placeholder {
  color: #657083;
}
.topbar-actions {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}
.status-pill {
  background: rgb(77 213 153 / 10%);
  border: 1px solid rgb(77 213 153 / 28%);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.72rem;
  padding: 0.38rem 0.65rem;
  white-space: nowrap;
}
.founder-badge {
  background: rgb(255 184 107 / 13%);
  border: 1px solid rgb(255 184 107 / 38%);
  border-radius: 999px;
  color: var(--orange);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.35rem;
  padding: 0.18rem 0.45rem;
  vertical-align: middle;
}
.icon-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  display: none;
  font-size: 1.2rem;
  padding: 0.4rem;
}

.app-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr) 18rem;
  margin: 0 auto;
  max-width: 1340px;
  min-height: calc(100vh - 4.5rem);
}
.sidebar {
  border-right: 1px solid var(--border);
  padding: 2rem 1rem 1rem 1.5rem;
}
.nav-list {
  display: grid;
  gap: 0.35rem;
}
.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.7rem;
  color: var(--muted);
  display: flex;
  font-size: 0.94rem;
  gap: 0.8rem;
  padding: 0.78rem 0.85rem;
  text-align: left;
  width: 100%;
}
.nav-item:hover,
.nav-item:focus-visible,
.nav-item.active {
  background: var(--panel-raised);
  color: #fff;
  outline: 0;
}
.nav-item.active {
  box-shadow: inset 2px 0 var(--accent);
}
.nav-item > span:first-child {
  font-size: 1.2rem;
  width: 1.15rem;
}
.nav-count {
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  margin-left: auto;
  padding: 0.15rem 0.42rem;
}
.sidebar-profile {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.65rem;
  margin-top: 2.5rem;
  padding: 1.25rem 0.4rem 0.2rem;
}
.sidebar-profile strong,
.sidebar-profile span {
  display: block;
  font-size: 0.76rem;
}
.sidebar-profile strong {
  font-size: 0.8rem;
}
.sidebar-profile div:nth-child(2) span {
  color: var(--muted);
  margin-top: 0.2rem;
}
.online-dot {
  background: var(--green);
  border: 2px solid var(--bg);
  border-radius: 50%;
  height: 0.6rem;
  margin-left: auto;
  width: 0.6rem;
}
.sidebar-note {
  color: #687487;
  font-size: 0.76rem;
  line-height: 1.5;
  margin: 1.2rem 0.4rem;
}

.content {
  min-width: 0;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}
.view-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.view-header h1 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  margin: 0;
}
.view-header p {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0.4rem 0 0;
}
.eyebrow {
  color: var(--accent-bright);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}
.card-pad {
  padding: 1.15rem 1.25rem;
}
.button {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0.55rem;
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.58rem 0.8rem;
}
.button:hover,
.button:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  outline: 0;
}
.button.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--soft);
}
.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: var(--accent);
  color: #fff;
}

.composer {
  padding: 1.15rem 1.25rem 0.85rem;
}
.profile-summary-head {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}
.profile-summary-head > div {
  flex: 1;
  min-width: 0;
}
.profile-summary-head strong,
.profile-summary-head span {
  display: block;
}
.profile-summary-head span,
.profile-summary-links span {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
.profile-summary p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.8rem 0 0;
}
.profile-summary-links {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.action-notice {
  color: var(--green);
  font-size: 0.78rem;
  margin: -0.6rem 0 1rem;
}
.composer-row {
  display: flex;
  gap: 0.75rem;
}
.composer textarea {
  background: transparent;
  border: 0;
  color: #fff;
  min-height: 3.5rem;
  outline: 0;
  padding: 0.2rem 0;
  resize: vertical;
  width: 100%;
}
.composer textarea::placeholder {
  color: #657083;
}
.composer-footer {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}
.composer-tools {
  display: flex;
  gap: 0.45rem;
}
.tool-button {
  background: transparent;
  border: 0;
  border-radius: 0.4rem;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
}
.tool-button:hover,
.tool-button:focus-visible {
  background: var(--panel-raised);
  color: var(--accent-bright);
  outline: 0;
}
.char-count {
  color: #657083;
  font-size: 0.7rem;
}

.post-header,
.topic-header {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}
.avatar {
  align-items: center;
  background: linear-gradient(135deg, #4151a1, #7c5ca8);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 750;
  height: 2.35rem;
  justify-content: center;
  width: 2.35rem;
}
.avatar-s {
  background: linear-gradient(135deg, #986a55, #c49358);
}
.avatar-green {
  background: linear-gradient(135deg, #277c6d, #65b896);
}
.avatar-orange {
  background: linear-gradient(135deg, #ac603e, #e49d56);
}
.post-author {
  min-width: 0;
}
.post-author strong {
  font-size: 0.84rem;
}
.post-author span {
  color: var(--muted);
  font-size: 0.72rem;
  margin-left: 0.3rem;
}
.post-body {
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0.9rem 0;
}
.post-body a {
  color: var(--accent-bright);
}
.post-actions {
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1.2rem;
  padding: 0.7rem 1.25rem;
}
.post-action {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.25rem 0;
}
.post-action:hover,
.post-action:focus-visible {
  color: var(--accent-bright);
  outline: 0;
}
.topic-card {
  background: linear-gradient(
    120deg,
    rgb(139 124 255 / 12%),
    rgb(77 213 153 / 5%)
  );
  border-color: rgb(139 124 255 / 35%);
}
.topic-label {
  color: var(--accent-bright);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.topic-title {
  font-size: 1rem;
  margin: 0.6rem 0 0.3rem;
}
.topic-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.right-rail {
  border-left: 1px solid var(--border);
  padding: 2rem 1.25rem;
}
.rail-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  margin-bottom: 1rem;
  padding: 1rem;
}
.rail-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.rail-title h2,
.support-rail h2 {
  font-size: 0.94rem;
  margin: 0;
}
.rail-title button {
  background: transparent;
  border: 0;
  color: var(--accent-bright);
  font-size: 0.7rem;
  padding: 0.2rem;
}
.space-row {
  align-items: center;
  border-top: 1px solid var(--border);
  color: #fff;
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  text-decoration: none;
}
.space-row strong,
.space-row small {
  display: block;
}
.space-row strong {
  font-size: 0.76rem;
}
.space-row small {
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 0.2rem;
}
.space-icon {
  align-items: center;
  border-radius: 0.5rem;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}
.purple {
  background: rgb(139 124 255 / 20%);
  color: var(--accent-bright);
}
.green {
  background: rgb(77 213 153 / 15%);
  color: var(--green);
}
.orange {
  background: rgb(255 184 107 / 15%);
  color: var(--orange);
}
.support-rail p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}
.support-link {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--soft);
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
}
.support-link:hover,
.support-link:focus-visible {
  border-color: var(--accent);
  color: #fff;
  outline: 0;
}
.support-link-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.support-link-primary:hover,
.support-link-primary:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}
.demo-disclaimer {
  color: #687487;
  font-size: 0.68rem;
  line-height: 1.5;
  margin: 1rem 0.3rem;
}

.profile-banner {
  background: linear-gradient(115deg, #212642, #1a2630);
  height: 8rem;
}
.profile-info {
  padding: 0 1.25rem 1.25rem;
  position: relative;
}
.profile-info .avatar {
  border: 4px solid var(--panel);
  height: 4.5rem;
  margin-top: -2.25rem;
  width: 4.5rem;
}
.profile-actions {
  float: right;
  margin-top: 0.8rem;
}
.profile-info h2 {
  font-size: 1.15rem;
  margin: 0.7rem 0 0.2rem;
}
.profile-info p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.3rem 0;
}
.profile-stats {
  display: flex;
  gap: 1.4rem;
  margin-top: 1rem;
}
.profile-stats strong,
.profile-stats span {
  display: block;
}
.profile-stats strong {
  font-size: 0.82rem;
}
.profile-stats span {
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 0.2rem;
}
.explore-grid,
.group-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.explore-card,
.group-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1rem;
}
.explore-card h3,
.group-card h3 {
  font-size: 0.9rem;
  margin: 0.7rem 0 0.3rem;
}
.explore-card p,
.group-card p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  margin: 0 0 0.8rem;
}
.conversation-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  min-height: 29rem;
}
.conversation-list {
  border-right: 1px solid var(--border);
  padding: 0.5rem;
}
.conversation-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.65rem;
  display: flex;
  gap: 0.55rem;
  padding: 0.65rem 0.5rem;
  text-align: left;
  width: 100%;
}
.conversation-item.active,
.conversation-item:hover,
.conversation-item:focus-visible {
  background: var(--panel-raised);
  outline: 0;
}
.conversation-item .avatar {
  height: 1.85rem;
  width: 1.85rem;
}
.conversation-item strong,
.conversation-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-item strong {
  font-size: 0.72rem;
}
.conversation-item span {
  color: var(--muted);
  font-size: 0.65rem;
  margin-top: 0.15rem;
  max-width: 7rem;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
}
.chat-header strong,
.chat-header span {
  display: block;
}
.chat-header strong {
  font-size: 0.8rem;
}
.chat-header span {
  color: var(--muted);
  font-size: 0.66rem;
  margin-top: 0.15rem;
}
.chat-mode {
  color: var(--green) !important;
  margin-left: auto;
}
.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: flex-end;
  overflow: auto;
  padding: 1rem;
}
.message {
  background: var(--panel-raised);
  border-radius: 0.8rem 0.8rem 0.8rem 0.15rem;
  max-width: 75%;
  padding: 0.65rem 0.8rem;
}
.message.mine {
  align-self: flex-end;
  background: rgb(139 124 255 / 22%);
  border-radius: 0.8rem 0.8rem 0.15rem 0.8rem;
}
.message p {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0;
}
.message time {
  color: var(--muted);
  display: block;
  font-size: 0.6rem;
  margin-top: 0.3rem;
}
.chat-compose {
  border-top: 1px solid var(--border);
  padding: 0.75rem;
}
.chat-tools {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.chat-hint {
  color: var(--muted);
  font-size: 0.65rem;
}
.chat-compose form {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}
.chat-compose input {
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: #fff;
  min-width: 0;
  outline: 0;
  padding: 0.6rem 0.7rem;
  width: 100%;
}
.chat-compose input:focus {
  border-color: var(--accent);
}
.mode-switcher {
  align-items: center;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  display: flex;
  gap: 0.3rem;
  margin: 0 1rem 1rem;
  padding: 0.25rem;
}
.mode-switcher button {
  background: transparent;
  border: 0;
  border-radius: 0.35rem;
  color: var(--muted);
  flex: 1;
  font-size: 0.65rem;
  padding: 0.45rem;
}
.mode-switcher button.active {
  background: var(--accent);
  color: #fff;
}
.private-space-label {
  color: var(--soft);
  flex: 1;
  font-size: 0.68rem;
  padding: 0.45rem;
  text-align: center;
}
.mode-hint {
  margin: -0.65rem 1rem 0.75rem;
  text-align: center;
}
.attachment {
  align-items: center;
  background: rgb(77 213 153 / 10%);
  border: 1px solid rgb(77 213 153 / 25%);
  border-radius: 0.5rem;
  color: var(--green);
  display: flex;
  font-size: 0.68rem;
  gap: 0.4rem;
  margin: 0 1rem 0.75rem;
  padding: 0.5rem 0.6rem;
}

.support-prompt {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  position: fixed;
  right: 1.5rem;
  top: 5.5rem;
  width: min(32rem, calc(100vw - 3rem));
  z-index: 10;
}
.support-prompt[hidden] {
  display: none;
}
.support-dialog {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 0.8rem;
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 50%);
  padding: 1.5rem;
  pointer-events: auto;
  position: relative;
  width: 100%;
}
.support-dialog h2 {
  margin: 0.2rem 0 0.7rem;
}
.support-dialog p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0.7rem;
}
.support-prompt-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.4rem;
  padding: 0.2rem;
  position: absolute;
  right: 0.8rem;
  top: 0.7rem;
}
.support-prompt-close:hover,
.support-prompt-close:focus-visible,
.support-prompt-secondary:hover,
.support-prompt-secondary:focus-visible {
  color: var(--accent-bright);
  outline: 0;
}
.support-prompt-secondary {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0;
  text-decoration: underline;
}

@media (max-width: 68rem) {
  .app-layout {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
  .right-rail {
    display: none;
  }
}
@media (max-width: 48rem) {
  .topbar {
    gap: 0.7rem;
    padding: 0 1rem;
  }
  .topbar .support-link {
    display: none;
  }
  .status-pill {
    font-size: 0.65rem;
  }
  .icon-button {
    display: block;
  }
  .sidebar {
    border-right: 0;
    display: none;
  }
  .app-layout {
    display: block;
  }
  .content {
    padding: 1.25rem 0.85rem;
  }
  .explore-grid,
  .group-grid {
    grid-template-columns: 1fr;
  }
  .conversation-layout {
    grid-template-columns: 9.5rem minmax(0, 1fr);
  }
}
@media (max-width: 34rem) {
  .search-box {
    display: none;
  }
  .topbar {
    justify-content: space-between;
  }
  .conversation-layout {
    grid-template-columns: 1fr;
  }
  .conversation-list {
    border-bottom: 1px solid var(--border);
    border-right: 0;
    display: flex;
    overflow-x: auto;
  }
  .conversation-item {
    min-width: 8.5rem;
  }
  .chat-messages {
    min-height: 15rem;
  }
}
