:root {
  --blue: rgb(45, 41, 161);
  --blue-2: #1f2a78;
  --blue-soft: #e9e8ff;
  --orange: #ff7a18;
  --orange-soft: #fff0e5;
  --teal: #18a999;
  --green: #22a85a;
  --ink: #202635;
  --muted: #667085;
  --line: #d9deea;
  --line-strong: #c9cfe2;
  --surface: #ffffff;
  --background: #f5f7fb;
  --danger: #c2410c;
  --shadow: 0 14px 38px rgba(24, 34, 66, 0.1);
  --radius: 8px;
  --topbar-h: 76px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--ink);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(45, 41, 161, 0.045), transparent 230px),
    var(--background);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
  overflow-x: hidden;
}

.welcome-app {
  background: #06081d;
}

.welcome-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: 28px clamp(18px, 4vw, 58px);
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 122, 24, 0.32), transparent 24%),
    radial-gradient(circle at 82% 22%, rgba(20, 185, 255, 0.3), transparent 28%),
    linear-gradient(135deg, #090b2c 0%, #17135b 45%, #06172d 100%);
}

.welcome-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.welcome-grid {
  position: absolute;
  inset: -20%;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(900px) rotateX(58deg) translateY(18%);
  transform-origin: center bottom;
}

.welcome-orbit,
.welcome-ribbon {
  position: absolute;
  pointer-events: none;
}

.welcome-orbit {
  width: 58vw;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 0 40px rgba(89, 199, 255, 0.14);
  animation: welcomeSpin 24s linear infinite;
}

.orbit-a {
  right: -16vw;
  top: 8vh;
}

.orbit-b {
  left: -22vw;
  bottom: -20vh;
  animation-duration: 32s;
  animation-direction: reverse;
}

.welcome-ribbon {
  width: 52vw;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 24, 0.95), rgba(55, 214, 255, 0.9), transparent);
  filter: drop-shadow(0 0 16px rgba(255, 122, 24, 0.75));
  animation: welcomeDrift 7s ease-in-out infinite alternate;
}

.ribbon-a {
  left: 8vw;
  top: 28vh;
  transform: rotate(-12deg);
}

.ribbon-b {
  right: 4vw;
  bottom: 24vh;
  transform: rotate(9deg);
  animation-delay: -2s;
}

.welcome-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.welcome-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.welcome-brand img {
  width: 112px;
  height: 56px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
}

.welcome-brand strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.welcome-brand small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

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

.welcome-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.8fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: clamp(46px, 8vh, 92px) 0 34px;
}

.welcome-copy {
  max-width: 760px;
}

.welcome-signal {
  margin: 0 0 18px;
  color: #ffd8bf;
  font-size: 15px;
  font-weight: 850;
}

.welcome-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: 72px;
  line-height: 1.02;
  font-weight: 950;
}

.welcome-copy > p:not(.welcome-signal) {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  font-weight: 650;
}

.welcome-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.welcome-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a18, #ff9a3d);
  color: #10152d;
  box-shadow: 0 22px 48px rgba(255, 122, 24, 0.32);
  font-size: 18px;
  font-weight: 950;
}

.welcome-cta:hover {
  transform: translateY(-2px);
}

.welcome-note {
  max-width: 360px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 720;
}

.welcome-console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(9, 12, 46, 0.74);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.console-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
}

.console-head span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff7a18;
}

.console-head span:nth-child(2) {
  background: #28d2ff;
}

.console-head span:nth-child(3) {
  background: #58e884;
}

.console-head strong {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.feature-viewport {
  overflow: hidden;
}

.feature-track {
  display: flex;
  width: 400%;
  animation: welcomeCarousel 18s infinite;
}

.feature-slide {
  display: grid;
  min-width: 25%;
  min-height: 360px;
  align-content: center;
  gap: 18px;
  padding: 34px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 122, 24, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(45, 41, 161, 0.72), rgba(4, 21, 53, 0.76));
}

.feature-pulse {
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffb47a;
}

.feature-slide h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
}

.feature-slide p {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  font-weight: 650;
}

.welcome-topic-strip {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.welcome-topic-strip button {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  font-weight: 780;
}

.welcome-topic-strip span {
  color: #ffb47a;
  white-space: nowrap;
}

.welcome-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 760;
}

/* Minimal welcome surface */
.welcome-app {
  background: #fff;
}

.welcome-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  padding: 26px clamp(18px, 5vw, 72px);
  color: #111827;
  background:
    linear-gradient(120deg, rgba(45, 41, 161, 0.08), transparent 28%),
    linear-gradient(300deg, rgba(255, 122, 24, 0.08), transparent 32%),
    #fff;
}

.welcome-nav {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.welcome-brand {
  color: #111827;
}

.welcome-brand img {
  width: 104px;
  height: 52px;
  border-color: var(--line);
  background: #fff;
}

.welcome-brand strong {
  font-size: 22px;
  color: var(--blue);
}

.welcome-brand small {
  color: var(--muted);
}

.welcome-ghost {
  border-color: var(--line);
  background: #fff;
  color: #202635;
}

.welcome-hero {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 0;
  padding: 70px 0 56px;
  text-align: center;
}

.welcome-copy {
  display: grid;
  justify-items: center;
  max-width: 920px;
}

.welcome-copy h1 {
  max-width: 920px;
  color: #111827;
  font-size: 68px;
  line-height: 1.04;
  font-weight: 850;
}

.welcome-copy > p:not(.welcome-signal) {
  max-width: 680px;
  margin: 22px 0 0;
  color: #475467;
  font-size: 19px;
  font-weight: 550;
}

.welcome-cta-row {
  justify-content: center;
  margin-top: 34px;
}

.welcome-cta {
  min-height: 50px;
  padding: 0 22px;
  border-color: #111827;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: none;
  font-size: 15px;
  font-weight: 760;
}

.welcome-cta:hover {
  background: var(--blue);
}

.welcome-feature-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 44px;
  color: #475467;
}

.welcome-feature-line span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 680;
}

.welcome-feature-line span:nth-child(2n) {
  border-color: rgba(255, 122, 24, 0.28);
}

.welcome-footer {
  color: #667085;
}

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

@keyframes welcomeDrift {
  from {
    translate: -18px 0;
    opacity: 0.45;
  }
  to {
    translate: 18px 0;
    opacity: 0.95;
  }
}

@keyframes welcomeCarousel {
  0%,
  18% {
    transform: translateX(0);
  }
  25%,
  43% {
    transform: translateX(-25%);
  }
  50%,
  68% {
    transform: translateX(-50%);
  }
  75%,
  93% {
    transform: translateX(-75%);
  }
  100% {
    transform: translateX(0);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: var(--topbar-h);
  padding: 12px 32px;
  border-bottom: 1px solid rgba(45, 41, 161, 0.16);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand-logo {
  width: 92px;
  height: 48px;
  border: 1px solid #d7d5f4;
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
}

.brand-title {
  display: block;
  color: var(--blue);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.05;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.nav-button,
.ghost-button,
.primary-button,
.danger-button,
.icon-button,
.chip-button,
.seg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-button {
  padding: 0 15px;
  color: #2e3442;
  background: transparent;
  font-weight: 750;
}

.nav-button:hover,
.nav-button.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  overflow: hidden;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.lang-switch button {
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.lang-switch button.active {
  color: #fff;
  background: var(--blue);
}

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--blue);
}

.icon-button:hover {
  border-color: rgba(45, 41, 161, 0.35);
  background: var(--blue-soft);
}

.badge-count {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid #d8d6fb;
  border-radius: 999px;
  background: #fff2e7;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  user-select: none;
}

.avatar.small {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.avatar.tiny {
  width: 24px;
  height: 24px;
  border-width: 1px;
  font-size: 11px;
}

.avatar.large {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar[data-profile] {
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.avatar[data-profile]:hover,
.avatar[data-profile]:focus-visible {
  border-color: rgba(45, 41, 161, 0.52);
  box-shadow: 0 0 0 4px rgba(45, 41, 161, 0.08);
  outline: none;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 270px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.menu-header {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.menu-title {
  color: var(--ink);
  font-weight: 850;
}

.menu-note {
  color: var(--muted);
  font-size: 12px;
}

.menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #344054;
  text-align: left;
  font-weight: 700;
}

.menu-item:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 32px 44px;
}

.layout.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.layout.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  align-self: start;
  max-height: calc(100vh - var(--topbar-h) - 36px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.side-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 500;
}

.sidebar.collapsed {
  padding: 10px 8px;
}

.sidebar.collapsed .side-toggle {
  justify-content: center;
}

.sidebar.collapsed .side-toggle span,
.sidebar.collapsed .side-heading span,
.sidebar.collapsed .side-link span:not(.side-count),
.sidebar.collapsed .category-link span:nth-child(2),
.sidebar.collapsed .side-count {
  display: none;
}

.sidebar.collapsed .side-link,
.sidebar.collapsed .category-link {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 9px;
}

.sidebar.collapsed .category-link.child {
  padding-left: 9px;
}

.sidebar.collapsed .side-heading {
  justify-content: center;
  padding: 8px 0;
}

.side-section {
  padding: 8px 0;
}

.side-section + .side-section {
  border-top: 1px solid var(--line);
}

.side-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: #5b6475;
  font-size: 15px;
  font-weight: 500;
}

.side-link,
.category-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #4e5564;
  text-align: left;
  font-size: 15px;
  font-weight: 400;
}

.side-link:hover,
.side-link.active,
.category-link:hover,
.category-link.active {
  background: #d9f1ff;
  color: var(--blue);
}

.side-link.admin {
  color: #5b5867;
}

.side-link.admin:hover,
.side-link.admin.active {
  background: #f0f0f2;
}

.side-count {
  justify-self: end;
  min-width: 18px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 500;
}

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

.category-link.child {
  padding-left: 32px;
  font-size: 14px;
  font-weight: 400;
  color: #2366a4;
}

.category-link.child .category-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.category-link.parent {
  font-weight: 500;
}

.category-link.parent.expanded {
  background: #eef8ff;
  color: var(--blue);
}

.main {
  min-width: 0;
}

.main-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.main-stack > *,
.main > * {
  min-width: 0;
}

.hero-panel,
.section-panel,
.topic-detail,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(18, 30, 80, 0.05);
}

.hero-panel {
  overflow: hidden;
  border-top: 5px solid var(--blue);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: center;
  padding: 34px;
  background:
    linear-gradient(110deg, rgba(45, 41, 161, 0.08), transparent 58%),
    linear-gradient(180deg, #fff, #fbfcff);
}

.hero-title {
  margin: 0;
  color: var(--blue);
  font-size: 34px;
  line-height: 1.16;
  font-weight: 900;
}

.hero-copy {
  max-width: 880px;
  margin: 14px 0 0;
  color: #596273;
  font-size: 17px;
  font-weight: 650;
}

.hero-actions,
.toolbar,
.button-row,
.topic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 2px;
  align-self: center;
}

.topic-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-top: 22px;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.role-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.role-form select {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.hero-graphic {
  position: relative;
  min-height: 230px;
  padding: 22px;
  border: 1px solid rgba(45, 41, 161, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 122, 24, 0.22), transparent 28%),
    linear-gradient(135deg, #222160 0%, #2d29a1 52%, #1594d2 100%);
  color: #fff;
  overflow: hidden;
}

.hero-graphic::before,
.hero-graphic::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
}

.hero-graphic::before {
  inset: 22px 22px auto auto;
  width: 42%;
  height: 48%;
}

.hero-graphic::after {
  left: 28px;
  right: 46px;
  bottom: 34px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-graphic-title {
  position: relative;
  z-index: 1;
  max-width: 350px;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 900;
}

.hero-graphic-title span {
  display: block;
  color: #ffcfb2;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  padding: 18px 34px 28px;
}

.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-value {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.core-features {
  border-top: 3px solid rgba(45, 41, 161, 0.18);
}

.core-feature-grid,
.category-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.category-hub-grid + .category-hub-grid {
  margin-top: 16px;
}

.category-hub-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-hub-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.core-feature-card,
.taxonomy-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 156px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--feature-color, var(--category-color, var(--blue)));
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.core-feature-card:hover,
.taxonomy-card:hover,
.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 41, 161, 0.34);
  box-shadow: 0 12px 28px rgba(45, 41, 161, 0.11);
}

.core-feature-card h3,
.taxonomy-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 920;
}

.core-feature-card p,
.taxonomy-card p {
  margin: 0;
  color: #5b6475;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 680;
}

.subcategory-card {
  text-align: left;
}

.section-panel {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  color: var(--blue);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 900;
}

.section-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.primary-button {
  min-height: 40px;
  padding: 0 15px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 850;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #252189;
}

.ghost-button,
.chip-button,
.seg-button {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--line);
  background: #fff;
  color: #344054;
  font-weight: 760;
}

.ghost-button:hover,
.chip-button:hover,
.seg-button:hover,
.seg-button.active {
  border-color: rgba(45, 41, 161, 0.35);
  background: var(--blue-soft);
  color: var(--blue);
}

.danger-button {
  min-height: 40px;
  padding: 0 14px;
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--danger);
  font-weight: 800;
}

.tiny-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.tiny-button:hover {
  color: var(--blue);
  border-color: rgba(45, 41, 161, 0.38);
}

.topic-list {
  display: grid;
  gap: 10px;
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.topic-row:hover {
  border-color: rgba(45, 41, 161, 0.35);
  box-shadow: 0 8px 24px rgba(45, 41, 161, 0.08);
}

.topic-title {
  margin: 0;
  color: #202635;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 880;
}

.topic-row:hover .topic-title {
  color: var(--blue);
}

.topic-meta,
.comment-meta,
.small-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.topic-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.topic-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.tag,
.status-pill,
.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.topic-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--blue-soft);
  color: var(--blue);
}

.tag {
  background: #f2f4f7;
  color: #4b5565;
}

.category-pill {
  color: #fff;
}

.status-pill {
  background: var(--orange-soft);
  color: #b45309;
}

.status-pill.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-card,
.profile-card,
.admin-card,
.message-card,
.review-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.category-card {
  display: grid;
  gap: 12px;
  border-top: 4px solid var(--category-color, var(--blue));
}

.category-card h3,
.profile-card h3,
.admin-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.category-card p,
.profile-card p,
.admin-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.profile-hero-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.avatar-upload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.profile-stat {
  margin: 10px 0 4px;
  color: var(--blue);
  font-size: 36px;
  line-height: 1;
  font-weight: 950;
}

.public-profile-hero .section-subtitle {
  margin-top: 4px;
}

.setting-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.setting-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.setting-toggle span {
  display: grid;
  gap: 2px;
}

.setting-toggle strong {
  color: #344054;
  font-size: 14px;
}

.setting-toggle small,
.user-row > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.user-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.user-row-button {
  grid-template-columns: 42px minmax(0, 1fr);
  width: 100%;
  color: inherit;
  text-align: left;
}

.user-row-button:hover,
.user-row:hover {
  border-color: rgba(45, 41, 161, 0.28);
  background: #fbfcff;
}

.user-row-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.user-row-main > span,
.user-row-button > div {
  min-width: 0;
}

.user-row > div > strong,
.user-row > div > span,
.user-row-main strong,
.user-row-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-main strong {
  color: #1f2937;
  font-size: 14px;
  font-weight: 900;
}

.user-row-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.child-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Admin user management */
.admin-user-list {
  display: grid;
  gap: 10px;
}
.admin-user-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.admin-user-card.banned {
  background: #fef2f2;
  border-color: #fecaca;
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}
.admin-user-info strong {
  display: block;
}
.admin-user-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.security-overview-panel {
  border-top: 4px solid var(--blue);
}

.security-alert-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.security-alert-list.compact {
  margin-top: 12px;
}

.security-alert-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
}

.security-alert-card h3 {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 17px;
}

.security-alert-card p {
  margin: 0;
  color: var(--muted);
}

.security-alert-card.danger {
  border-left-color: var(--danger);
  background: #fff7ed;
}

.security-alert-card.danger h3 {
  color: var(--danger);
}

.security-alert-card.warning {
  border-left-color: var(--orange);
  background: var(--orange-soft);
}

.security-alert-card.warning h3 {
  color: #b45309;
}

.security-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.security-alert-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.security-warning {
  background: #fef3c7;
  color: #92400e;
}

.security-danger {
  background: #fee2e2;
  color: var(--danger);
}

.tiny-select {
  min-height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.admin-user-search {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  width: 280px;
  max-width: 100%;
}

/* Topbar global search */
.top-search-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-search-input {
  width: 180px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--background);
  font-size: 13px;
  color: var(--ink);
}
.top-search-input::placeholder {
  color: var(--muted);
}
.top-search-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(45, 41, 161, 0.12);
}

/* Pin dropdown */
.pin-dropdown {
  position: relative;
  display: inline-flex;
}
.pin-dropdown summary {
  list-style: none;
  cursor: pointer;
}
.pin-dropdown summary::-webkit-details-marker {
  display: none;
}
.pin-options {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 80px;
}
.pin-option {
  display: block;
  width: 100%;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.pin-option:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

/* QA status badges */
.qa-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.qa-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.qa-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--background);
}
.qa-status-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.qa-status-chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.qa-status-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.qa-status-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* QA filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.qa-filter-chip {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.qa-filter-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.qa-filter-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.required-mark {
  color: #dc2626;
  font-weight: 900;
}

.field input,
.field textarea,
.field select,
.search-input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.field input,
.field select,
.search-input {
  min-height: 42px;
  padding: 0 12px;
}

.field input[type="file"] {
  padding: 8px 10px;
}

.field textarea {
  min-height: 138px;
  padding: 10px 12px;
  resize: vertical;
}

.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.password-input-wrap input {
  min-width: 0;
}

.password-toggle {
  width: 42px;
  height: 42px;
}

.password-strength {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.password-strength span {
  height: 6px;
  border-radius: 999px;
  background: #e4e7ec;
}

.password-strength[data-level="2"] span:nth-child(-n + 1),
.password-strength[data-level="3"] span:nth-child(-n + 2) {
  background: #ff7a18;
}

.password-strength[data-level="4"] span:nth-child(-n + 3) {
  background: #0984cc;
}

.password-strength[data-level="5"] span {
  background: #2d29a1;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.field-note[data-state="ok"] {
  color: #087443;
}

.field-note[data-state="error"] {
  color: #b42318;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label-row label {
  margin: 0;
}

.segmented-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented-field label {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 820;
  cursor: pointer;
}

.segmented-field label.active,
.segmented-field label:hover {
  border-color: rgba(45, 41, 161, 0.36);
  background: var(--blue-soft);
  color: var(--blue);
}

.segmented-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.markdown-editor-field {
  gap: 8px;
}

.markdown-editor-field .field-label-row {
  align-items: flex-start;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.editor-format-select {
  width: 85px;
  min-height: 32px;
  padding: 0 22px 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
}

.editor-toolbar-button {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  color: #5a6472;
}

.editor-toolbar-button .icon {
  width: 18px;
  height: 18px;
}

.editor-toolbar-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.editor-toolbar-button:hover,
.editor-toolbar-button:focus-visible {
  border-color: rgba(45, 41, 161, 0.28);
  background: #eef8ff;
  color: var(--blue);
}

.emoji-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  padding: 8px;
  border: 1px solid rgba(45, 41, 161, 0.12);
  border-radius: var(--radius);
  background: #fbfcff;
}

.emoji-panel[hidden] {
  display: none;
}

.emoji-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.emoji-button:hover,
.emoji-button:focus-visible {
  border-color: rgba(45, 41, 161, 0.24);
  background: var(--blue-soft);
}

.rich-body-editor {
  min-height: 260px;
  max-height: 46vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
  color: #344054;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  outline: none;
}

.rich-body-editor:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 41, 161, 0.12);
}

.rich-body-editor:empty::before {
  content: attr(data-placeholder);
  color: #98a2b3;
  pointer-events: none;
}

.rich-body-editor h1,
.rich-body-editor h2,
.rich-body-editor h3,
.rich-body-editor h4,
.rich-body-editor h5,
.rich-body-editor h6 {
  margin: 10px 0 6px;
  color: #202635;
  line-height: 1.25;
}

.rich-body-editor h1 { font-size: 28px; }
.rich-body-editor h2 { font-size: 24px; }
.rich-body-editor h3 { font-size: 20px; }
.rich-body-editor h4 { font-size: 17px; }
.rich-body-editor h5 { font-size: 15px; color: #4e5564; }
.rich-body-editor h6 { font-size: 14px; color: #667085; }

.rich-body-editor blockquote {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 4px solid rgba(45, 41, 161, 0.34);
  border-radius: 0 8px 8px 0;
  background: #f5f8ff;
  color: #4e5564;
}

.rich-body-editor pre {
  overflow: auto;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(45, 41, 161, 0.12);
  border-radius: 8px;
  background: #101828;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.rich-body-editor code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(45, 41, 161, 0.08);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.rich-body-editor a,
.markdown-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.editor-image-card {
  position: relative;
  display: inline-grid;
  max-width: min(100%, 560px);
  margin: 10px 0;
  vertical-align: middle;
}

.editor-image-card img {
  max-width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18, 30, 80, 0.08);
}

.editor-file-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 460px);
  margin: 8px 0;
  padding: 9px 42px 9px 12px;
  border: 1px solid rgba(45, 41, 161, 0.16);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(18, 30, 80, 0.07);
  vertical-align: middle;
}

.editor-file-card a,
.markdown-file-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--blue);
  font-weight: 820;
}

.editor-file-card a span,
.markdown-file-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-image-remove,
.editor-file-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(180, 35, 24, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--danger);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}

.editor-file-remove {
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
}

.editor-image-remove .icon,
.editor-file-remove .icon {
  width: 15px;
  height: 15px;
}

.editor-collapsed-summary {
  display: none;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px dashed rgba(45, 41, 161, 0.25);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 820;
  text-align: left;
}

.body-editor-shell.is-minimized .rich-body-editor,
.body-editor-shell.is-minimized .field-note {
  display: none;
}

.body-editor-shell.is-minimized .editor-collapsed-summary {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 41, 161, 0.12);
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.topic-detail {
  padding: 24px;
}

.topic-detail-title {
  margin: 0;
  color: var(--blue);
  font-size: 30px;
  line-height: 1.18;
  font-weight: 900;
}

.topic-body,
.comment-body {
  color: #344054;
  font-size: 15px;
  font-weight: 590;
  white-space: pre-wrap;
}

.topic-body {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.topic-source-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 41, 161, 0.14);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: #344054;
  font-size: 13px;
  font-weight: 720;
}

.topic-source-info strong {
  color: var(--blue);
}

.topic-source-info a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.markdown-body {
  display: grid;
  gap: 10px;
  white-space: normal;
}

.markdown-body p,
.markdown-body ul,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 0;
}

.markdown-body ul {
  padding-left: 22px;
}

.markdown-body blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid rgba(45, 41, 161, 0.34);
  border-radius: 0 8px 8px 0;
  background: #f5f8ff;
  color: #4e5564;
}

.markdown-body pre {
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(45, 41, 161, 0.12);
  border-radius: 8px;
  background: #101828;
  color: #f8fafc;
  white-space: pre-wrap;
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(45, 41, 161, 0.08);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.markdown-file-link {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(45, 41, 161, 0.16);
  border-radius: 9px;
  background: #fbfcff;
  text-decoration: none;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: #202635;
  line-height: 1.28;
}
.markdown-body h1 { font-size: 28px; }
.markdown-body h2 { font-size: 24px; }
.markdown-body h3 { font-size: 20px; }
.markdown-body h4 { font-size: 17px; }
.markdown-body h5 { font-size: 15px; color: #4e5564; }
.markdown-body h6 { font-size: 14px; color: #667085; }

.markdown-image {
  display: block;
  max-width: min(100%, 760px);
  max-height: 520px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
}

/* Tables */
.markdown-table,
.editor-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 14px;
}
.markdown-table th,
.editor-table th {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--line);
}
.markdown-table td,
.editor-table td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.markdown-table tr:nth-child(even) td {
  background: var(--background);
}

/* Table row/column edit handles */
.editor-table th,
.editor-table td {
  position: relative;
}
.table-row-del,
.table-col-del {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--danger);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.table-row-del {
  right: 2px;
}
.table-col-del {
  right: 2px;
}
.editor-table td:hover .table-row-del,
.editor-table th:hover .table-col-del {
  display: inline-flex;
}
.table-row-add,
.table-col-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--background);
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin: 2px;
  vertical-align: middle;
}
.table-row-add {
  margin-right: 4px;
}
.table-row-add:hover,
.table-col-add:hover,
.table-row-del:hover,
.table-col-del:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

/* Table grid picker */
.table-picker {
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 220px;
}
.table-picker-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.table-picker-grid {
  display: grid;
  grid-template-columns: repeat(10, 18px);
  gap: 3px;
}
.table-picker-cell {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  transition: background 0.08s;
}
.table-picker-cell.selected {
  background: var(--blue-soft);
  border-color: var(--blue);
}

/* Alignment divs in markdown body */
.markdown-body > div[style*="text-align"] {
  display: grid;
  gap: 10px;
}
.markdown-body > div[style*="text-align"] > p {
  margin: 0;
}

/* Editor separator */
.editor-separator {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 2px;
  align-self: center;
}

/* File preview cards */
.file-preview-card {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.file-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--background);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.file-preview-header .icon {
  width: 18px;
  height: 18px;
}
.file-download-btn {
  margin-left: auto;
  padding: 2px 10px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.file-download-btn:hover {
  background: var(--blue-soft);
}
.file-preview-iframe {
  width: 100%;
  height: 500px;
  border: 0;
  background: #fff;
}
.file-preview-office {
  min-height: 80px;
}
.file-preview-icon {
  font-size: 20px;
}
.file-preview-body {
  padding: 16px 12px;
  text-align: center;
}

/* Terms of Service */
.terms-box {
  max-height: 200px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
  margin: 8px 0;
}
.terms-box h2 { font-size: 16px; margin: 0 0 8px; }
.terms-box h3 { font-size: 14px; margin: 10px 0 4px; color: var(--blue); }
.terms-box p, .terms-box li { font-size: 13px; line-height: 1.7; margin: 4px 0; color: #4e5564; }
.terms-box ul { padding-left: 18px; margin: 4px 0; }
.terms-updated { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

.modal-terms {
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.modal-terms .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.modal-terms .terms-box {
  max-height: none;
  overflow: visible;
}
.terms-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

.terms-agree-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  margin: 8px 0;
}
.terms-countdown {
  min-width: 160px;
}
.terms-countdown-text {
  font-size: 13px;
  color: var(--danger);
  font-weight: 600;
}
.terms-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.terms-check-label input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ai-moderation-box {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(45, 41, 161, 0.16);
  border-radius: var(--radius);
  background: #fbfcff;
}

.ai-moderation-box p {
  margin: 8px 0 0;
  color: #4e5564;
  font-size: 13px;
  font-weight: 650;
}

.comment-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.comment-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.accepted-answer {
  border-color: rgba(34, 168, 90, 0.35);
  background: #f0fff6;
}

.comment-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 180px));
  gap: 10px;
  margin-top: 10px;
}

.comment-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
  background: #fbfcff;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.empty-state.compact {
  min-height: 76px;
  padding: 14px;
}

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  gap: 18px;
}

.auth-wrap.single {
  grid-template-columns: minmax(0, 760px);
}

.auth-panel {
  padding: 24px;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.activation-box {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(45, 41, 161, 0.18);
  border-radius: var(--radius);
  background: #fbfcff;
}

.activation-box h3 {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.34);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(520px, 100vw);
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -24px 0 45px rgba(15, 23, 42, 0.16);
}

.drawer-head,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-body,
.modal-body {
  padding: 18px;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal.modal-editor-fullscreen {
  inset: 18px;
  left: 18px;
  top: 18px;
  width: auto;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  transform: none;
}

.modal.modal-editor-fullscreen .modal-body {
  overflow: auto;
}

.modal.modal-editor-fullscreen .form-grid {
  align-content: start;
}

.modal.modal-editor-fullscreen .rich-body-editor {
  min-height: 58vh;
  max-height: none;
}

.modal.modal-editor-fullscreen .editor-image-card img {
  max-height: 64vh;
}

.notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 110;
  max-width: 420px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 41, 161, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 760;
}

.notice.error {
  border-color: #fdba74;
  color: var(--danger);
}

.risk-warnings {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.risk-warning {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 122, 24, 0.35);
  border-radius: var(--radius);
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 720;
}

.risk-warning strong {
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(45, 41, 161, 0.28);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 75;
  width: min(840px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(45, 41, 161, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(45, 41, 161, 0.08), rgba(255, 122, 24, 0.08));
  color: var(--blue);
}

.chat-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.chat-body h3 {
  margin: 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

.conversation-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.conversation-shell.compact {
  min-height: 520px;
  border: 0;
  border-radius: 0;
}

.conversation-list {
  overflow: auto;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #f8f9ff;
}

.conversation-list h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

.conversation-button {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #2f3544;
  text-align: left;
}

.conversation-button .avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.conversation-button:hover,
.conversation-button.active {
  border-color: rgba(45, 41, 161, 0.18);
  background: #fff;
}

.conversation-button span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.conversation-button strong,
.conversation-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-button strong {
  color: #1f2937;
  font-size: 14px;
  font-weight: 900;
}

.conversation-button small,
.conversation-button em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.conversation-button b {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
}

.conversation-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.conversation-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.conversation-thread-head .avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.conversation-thread-head strong,
.conversation-thread-head span {
  display: block;
}

.conversation-thread-head strong {
  color: var(--ink);
  font-weight: 900;
}

.conversation-thread-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.message-bubbles {
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(45, 41, 161, 0.035), rgba(255, 122, 24, 0.035)),
    #fbfcff;
}

.message-bubble {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.message-bubble.outgoing {
  justify-content: flex-end;
}

.message-bubble > div {
  max-width: min(70%, 520px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 34, 66, 0.06);
}

.message-bubble > .avatar {
  margin-bottom: 2px;
}

.message-bubble.outgoing > div {
  border-color: rgba(45, 41, 161, 0.2);
  background: var(--blue);
  color: #fff;
}

.message-bubble p {
  margin: 0;
  white-space: pre-wrap;
  font-weight: 650;
}

.message-bubble span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.message-bubble.outgoing span {
  color: rgba(255, 255, 255, 0.68);
}

.conversation-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.conversation-compose-wrap {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
}

/* Chat search */
.chat-search-bar {
  padding: 6px 8px;
}
.chat-search-input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--background);
}
.chat-search-input:focus {
  outline: none;
  border-color: var(--blue);
}
.chat-search-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 10px;
}

.conversation-compose textarea {
  min-height: 48px;
  max-height: 120px;
  resize: vertical;
}

.conversation-compose [data-risk-preview] {
  grid-column: 1 / -1;
}

.ad-carousel {
  overflow: hidden;
  border: 1px solid rgba(45, 41, 161, 0.18);
  border-radius: var(--radius);
  background: #10152d;
}

.ad-track {
  display: flex;
  transition: transform 420ms ease;
}

.ad-slide {
  min-width: 100%;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(45, 41, 161, 0.98), rgba(12, 20, 56, 0.94)),
    radial-gradient(circle at 82% 20%, rgba(255, 122, 24, 0.55), transparent 30%);
}

.ad-slide.alt {
  background:
    linear-gradient(135deg, rgba(9, 132, 204, 0.95), rgba(45, 41, 161, 0.96)),
    radial-gradient(circle at 18% 20%, rgba(255, 122, 24, 0.5), transparent 32%);
}

.ad-slide h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 900;
}

.ad-slide p {
  max-width: 780px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
}

.ad-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #10152d;
}

.ad-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.ad-dot.active {
  background: var(--orange);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 24px 32px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 1100px) {
  .welcome-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 54px;
  }

  .welcome-copy h1 {
    font-size: 56px;
  }

  .feature-slide h2 {
    font-size: 32px;
  }

  .conversation-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 18px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .layout.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .sidebar.collapsed {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
  }

  .sidebar.collapsed .side-section {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 0;
    border-top: 0;
  }

  .sidebar.collapsed .side-link,
  .sidebar.collapsed .category-link,
  .sidebar.collapsed .side-toggle {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .hero-inner,
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-hero-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .metrics-grid,
  .core-feature-grid,
  .category-hub-grid,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .welcome-page {
    padding: 18px;
  }

  .welcome-nav,
  .welcome-actions,
  .welcome-cta-row,
  .welcome-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .welcome-actions .lang-switch,
  .welcome-ghost,
  .welcome-cta {
    width: 100%;
  }

  .welcome-copy h1 {
    font-size: 38px;
  }

  .welcome-copy > p:not(.welcome-signal) {
    font-size: 16px;
  }

  .feature-slide {
    min-height: 310px;
    padding: 22px;
  }

  .feature-slide h2 {
    font-size: 27px;
  }

  .conversation-shell,
  .conversation-shell.compact {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .conversation-list {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .message-bubble > div {
    max-width: 88%;
  }

  .conversation-compose {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: 76px;
    height: 42px;
  }

  .brand-title {
    font-size: 18px;
  }

  .top-nav {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .markdown-editor-field .field-label-row {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-toolbar {
    justify-content: flex-start;
  }

  .nav-button {
    flex: 0 0 auto;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-title,
  .hero-copy,
  .section-title,
  .topic-detail-title,
  .topic-title {
    overflow-wrap: anywhere;
  }

  .hero-inner,
  .topic-detail,
  .section-panel,
  .auth-panel {
    padding: 16px;
  }

  .hero-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-switch {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions > button,
  .auth-switch > button,
  .button-row > button,
  .topic-actions > button {
    width: 100%;
  }

  .menu-panel {
    position: fixed;
    top: 132px;
    left: 18px;
    right: 18px;
    width: auto;
  }

  .metrics-grid,
  .core-feature-grid,
  .category-hub-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid.two,
  .filters {
    grid-template-columns: 1fr;
  }

  .avatar-upload-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

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

  .user-row > button:not(.user-row-main) {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chat-panel {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

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

  .topic-detail-title {
    font-size: 23px;
  }
}
