/* Qava — Premium Community landing section styles (extracted from community-chat-prototype). */
/* Vars scoped to the community section so they never leak onto the rest of the landing page. */
.landing-section {
  --display: "Libre Caslon Display", "Canela", "Canela Deck", "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --ink: #111827;
  --muted: #6b6b6b;
  --hairline: rgba(17, 24, 39, 0.08);
  --panel: #ffffff;
  --panel-soft: #fafafa;
  --accent: #111827;
}

    .landing-section {
      width: min(1040px, calc(100vw - 120px));
      margin: 52px auto 0;
      text-align: center;
      position: relative;
    }

    /* When relocated into the marketing hero column (by landing-community.js),
       fit the column width instead of the standalone 1040px so it centres with
       the rest of the hero content rather than overflowing to the right. */
    .hero-content > .landing-section {
      width: 100%;
      margin: 44px auto 8px;
    }

    .landing-section-head {
      margin-bottom: 0;
      text-align: center;
    }

    .landing-kicker {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #6b6b6b;
      margin-bottom: 4px;
    }

    .landing-title {
      font-family: var(--display);
      font-size: clamp(26px, 2.6vw, 36px);
      font-weight: 400;
      letter-spacing: -0.012em;
      line-height: 1.05;
      margin-bottom: 4px;
    }

    .landing-sub {
      font-size: 13px;
      font-weight: 300;
      color: #6b6b6b;
      line-height: 1.35;
      margin-bottom: 12px;
      max-width: 480px;
      margin-left: auto;
      margin-right: auto;
    }

    .landing-thread-wrap {
      position: relative;
      width: min(680px, 100%);
      margin: 0 auto;
    }

    .landing-thread-wrap .landing-thread-controls {
      position: absolute;
      top: -34px;
      right: 0;
      z-index: 5;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .landing-thread-wrap .thread-display-menu-slot {
      position: static;
    }

    .landing-opener-nav {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border: 1px solid rgba(17, 24, 39, 0.08);
      background: rgba(255, 255, 255, 0.72);
      border-radius: 7px;
      color: #9ca3af;
      cursor: pointer;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }

    .landing-opener-nav:hover,
    .landing-opener-nav.is-active {
      color: #4b5563;
      border-color: rgba(17, 24, 39, 0.14);
      background: #fff;
    }

    .landing-opener-nav svg {
      width: 15px;
      height: 15px;
    }

    .landing-thread-shell {
      width: 100%;
      margin: 0;
      border: 1px solid var(--hairline);
      border-radius: 8px;
      background: #ffffff;
      box-shadow: 0 12px 32px rgba(17,24,39,0.05);
      overflow: hidden;
      text-align: left;
      transition: box-shadow 0.22s ease;
      cursor: pointer;
      position: relative;
    }

    .landing-thread-shell:hover {
      box-shadow: 0 14px 36px rgba(17,24,39,0.07);
    }

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

    @keyframes threadReplyIn {
      from {
        opacity: 0;
        transform: translateX(var(--seq-x, 56px));
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes threadSeqPop {
      from {
        opacity: 0;
        transform: scale(0.88);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    @media (prefers-reduced-motion: no-preference) {
      .landing-thread-shell[data-thread-anim-pending="1"]:not(.is-live-done) .thread-seq-hidden {
        display: none !important;
      }

      .landing-thread-shell.is-live-pending .thread-seq-hidden {
        display: none !important;
      }

      .thread-seq-reveal {
        animation: threadSeqIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
      }

      .thread-seq-reply.thread-seq-reveal {
        animation-name: threadReplyIn;
        animation-duration: 0.52s;
        animation-delay: var(--seq-delay, 0ms);
        animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
      }

      .thread-seq-pop {
        animation: threadSeqPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
      }

      .landing-thread-shell.is-live-pending .landing-opener-carousel .thread-seq-hidden {
        opacity: 0;
      }

      .landing-thread-shell.is-carousel-revealing .landing-opener-slide.is-seq-active .thread-replies-wrap > .reply.thread-seq-hidden,
      .landing-thread-shell.is-carousel-revealing .landing-opener-slide.is-seq-active .reply-more.thread-seq-hidden {
        display: none !important;
      }

      .landing-thread-shell.is-live-done .landing-opener-slide .thread-post {
        opacity: 1;
        transform: none;
      }
    }

    .landing-thread-scroll {
      position: relative;
      padding: 14px 16px 0;
      overflow: hidden;
      background: #fff;
    }

    .landing-thread-scroll::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 72px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.88) 52%, #fff 100%);
      pointer-events: none;
      z-index: 1;
      opacity: 0;
      transition: opacity 0.22s ease;
    }

    .landing-thread-scroll.is-bottom-faded::after {
      opacity: 1;
    }

    .landing-thread-pause-indicator {
      position: absolute;
      right: 12px;
      bottom: 8px;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      color: #9ca3af;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s ease;
    }

    .landing-thread-pause-indicator svg {
      width: 14px;
      height: 14px;
    }

    .landing-thread-shell.is-carousel-paused .landing-thread-pause-indicator {
      opacity: 1;
    }

    body.pref-thread-compact .landing-thread-scroll {
      --landing-compact-height: 248px;
      height: var(--landing-compact-height);
    }

    body.pref-thread-compact .landing-opener-carousel,
    body.pref-thread-compact .landing-opener-track {
      height: 100%;
    }

    body.pref-thread-compact .landing-opener-slide {
      height: 100%;
      min-height: 100%;
      background: #fff;
    }

    body.pref-thread-compact .landing-opener-slide .thread-post {
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    body.pref-thread-compact .landing-opener-slide .thread-body {
      overflow: hidden;
    }

    body.pref-thread-compact .landing-opener-slide .attach-chips {
      margin-top: 8px;
      margin-bottom: 0;
    }

    body.pref-thread-compact .landing-opener-slide .thread-replies-toggle {
      flex: 0 0 auto;
      margin-top: auto;
      padding: 4px 0 12px;
      text-align: left;
      background: #fff;
      border: 0;
      -webkit-appearance: none;
      appearance: none;
    }

    .landing-section .thread-replies-toggle {
      background: #fff;
      border: 0;
      -webkit-appearance: none;
      appearance: none;
    }

    .landing-section .thread-replies-toggle:hover {
      background: #fff;
    }

    body:not(.pref-thread-compact) .landing-thread-scroll {
      --landing-expanded-height: 500px;
      height: var(--landing-expanded-height);
    }

    body:not(.pref-thread-compact) .landing-section .reply-more {
      display: none;
    }

    body:not(.pref-thread-compact) .landing-opener-carousel,
    body:not(.pref-thread-compact) .landing-opener-track {
      height: 100%;
    }

    body:not(.pref-thread-compact) .landing-opener-slide {
      min-height: 100%;
    }

    .landing-section .thread-post {
      padding-bottom: 0;
      margin-bottom: 0;
      border-bottom: 0;
    }

    .thread-detail .thread-post {
      padding-bottom: 14px;
      margin-bottom: 0;
      border-bottom: 0;
    }

    .landing-section .thread-meta,
    .thread-detail .thread-meta {
      gap: 8px;
      margin-bottom: 8px;
    }

    .landing-section .thread-meta .avatar,
    .thread-detail .thread-meta .avatar {
      width: 26px;
      height: 26px;
      font-size: 11px;
    }

    .landing-section .meta-top,
    .thread-detail .meta-top {
      font-size: 11px;
      line-height: 1.3;
    }

    .landing-section .meta-sub,
    .thread-detail .meta-sub {
      font-size: 10px;
      margin-top: 1px;
    }

    .landing-section .thread-tags,
    .thread-detail .thread-tags {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      margin-left: auto;
      align-items: flex-start;
    }

    .landing-section .thread-tag,
    .thread-detail .thread-tag {
      font-size: 9px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #fff;
      background: #111827;
      border-radius: 4px;
      padding: 3px 8px;
      white-space: nowrap;
    }

    .landing-section .attach-chips,
    .thread-detail .attach-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
      margin-bottom: 0;
      max-width: 100%;
    }

    .thread-detail .thread-post .attach-chips {
      margin-bottom: 12px;
    }

    .landing-section .meta-top,
    .landing-section .reply-meta,
    .thread-detail .meta-top,
    .thread-detail .reply-meta {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 100%;
    }

    .landing-opener-carousel {
      overflow: hidden;
    }

    .landing-opener-track {
      display: flex;
      transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: transform;
    }

    .landing-opener-track.is-loop-resetting {
      transition: none;
    }

    .landing-opener-slide {
      flex: 0 0 100%;
      width: 100%;
      min-width: 100%;
      display: flex;
      flex-direction: column;
    }

    .landing-opener-slide[data-open-chat] {
      cursor: pointer;
    }

    @media (prefers-reduced-motion: reduce) {
      .landing-opener-track {
        transition: none;
      }
    }

    .landing-section .attach-chip,
    .thread-detail .attach-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 10px;
      font-weight: 400;
      color: #374151;
      background: #f9fafb;
      border: 1px solid rgba(17, 24, 39, 0.08);
      border-radius: 5px;
      padding: 4px 8px;
    }

    .landing-section .attach-chip svg,
    .thread-detail .attach-chip svg {
      width: 11px;
      height: 11px;
      color: #6b7280;
      flex-shrink: 0;
    }

    .landing-section .thread-title,
    .thread-detail .thread-title {
      font-family: var(--display);
      font-size: 17px;
      font-weight: 400;
      line-height: 1.2;
      letter-spacing: -0.01em;
      margin-top: 4px;
      margin-bottom: 6px;
    }

    .landing-section .thread-body,
    .thread-detail .thread-body {
      font-size: 12px;
      line-height: 1.5;
    }

    .landing-section .thread-body ul,
    .thread-detail .thread-body ul {
      margin: 6px 0 0 16px;
    }

    .landing-section .thread-body li,
    .thread-detail .thread-body li {
      margin-bottom: 4px;
    }

    .landing-section .thread-body p + p,
    .thread-detail .thread-body p + p { margin-top: 6px; }

    .landing-section .thread-stats {
      gap: 10px;
      margin-top: 8px;
      font-size: 10px;
    }

    .landing-section .reply,
    .thread-detail .reply,
    .feed-item .reply {
      gap: 12px;
      padding: 10px 8px 5px 6px;
      border-top: 1px solid rgba(17,24,39,0.06);
      border-left: 2px solid transparent;
      transition: border-color 0.18s ease, background 0.18s ease;
    }

    .landing-section .reply > div:not(.avatar),
    .thread-detail .reply > div:not(.avatar),
    .feed-item .reply > div:not(.avatar) {
      min-width: 0;
      padding-right: 2px;
    }

    .landing-section .reply:hover,
    .thread-detail .reply:hover,
    .feed-item .reply:hover {
      border-left-color: transparent;
      background: rgba(17, 24, 39, 0.015);
    }

    .landing-section .reply-more,
    .thread-detail .reply-more,
    .feed-replies-more {
      display: flex;
      align-items: center;
      margin: 0;
      padding: 9px 8px 9px 6px;
      font-size: 10px;
      font-weight: 400;
      line-height: 1.2;
      color: #6b7280;
      border-top: 1px solid rgba(17,24,39,0.06);
      border-bottom: 1px solid rgba(17,24,39,0.06);
    }

    .landing-section .reply .attach-chips,
    .thread-detail .reply .attach-chips {
      margin-top: 4px;
      margin-bottom: 6px;
    }

    .landing-section .reply .avatar,
    .thread-detail .reply .avatar,
    .feed-item .reply .avatar {
      width: 22px;
      height: 22px;
      font-size: 9px;
    }

    .landing-section .reply-meta,
    .thread-detail .reply-meta,
    .feed-item .reply-meta {
      font-size: 10px;
      margin-bottom: 2px;
    }

    .landing-section .reply-body,
    .thread-detail .reply-body,
    .feed-item .reply-body {
      margin-top: 8px;
      font-size: 12px;
      line-height: 1.45;
    }

    .landing-section .reply-body ul,
    .thread-detail .reply-body ul,
    .feed-item .reply-body ul {
      margin: 4px 0 0 16px;
    }

    .landing-section .reply-body li,
    .thread-detail .reply-body li,
    .feed-item .reply-body li {
      margin-bottom: 3px;
    }

    .landing-section .reply-body p,
    .thread-detail .reply-body p,
    .feed-item .reply-body p {
      margin: 0;
    }

    .landing-section .reply-body p + p,
    .landing-section .reply-body p + ul,
    .thread-detail .reply-body p + p,
    .thread-detail .reply-body p + ul,
    .feed-item .reply-body p + p,
    .feed-item .reply-body p + ul {
      margin-top: 10px;
    }

    .landing-section .reply-body a,
    .thread-detail .reply-body a,
    .thread-detail .thread-body a,
    .feed-item .reply-body a {
      color: #2563eb;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    #view-thread .thread-replies-wrap {
      display: block !important;
    }

    #view-thread .thread-replies-toggle {
      display: none;
    }

    #view-thread .reply-more {
      display: none !important;
    }

    .reply-mention {
      font-weight: 500;
      color: #111827;
      background: rgba(17, 24, 39, 0.06);
      border-radius: 3px;
      padding: 0 2px;
      white-space: nowrap;
    }

    .reply-mention:not(.is-external) {
      cursor: pointer;
    }

    .reply-mention:not(.is-external):hover {
      background: rgba(17, 24, 39, 0.1);
    }

    .landing-section .reply-time,
    .thread-detail .reply-time,
    .feed-item .reply-time {
      font-size: 10px;
      font-weight: 300;
      color: #9ca3af;
      white-space: nowrap;
    }

    .reply-heart {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-top: 4px;
      padding: 0;
      border: 0;
      background: transparent;
      font-size: 10px;
      font-weight: 400;
      line-height: 1;
      color: #9ca3af;
      cursor: pointer;
    }

    .reply-heart svg {
      width: 12px;
      height: 12px;
      stroke: #9ca3af;
      fill: none;
      flex-shrink: 0;
      display: block;
    }

    .reply-heart span {
      display: block;
      line-height: 1;
    }

    .landing-section .reply-heart,
    .thread-detail .reply-heart,
    .feed-item .reply-heart {
      margin-top: 3px;
    }

    .reply-actions-row .reply-heart,
    .thread-op-actions .reply-heart {
      margin-top: 0;
      font-size: 10px;
      line-height: 1;
      color: #6b7280;
    }

    .reply-heart.is-active {
      color: #111827;
    }

    .reply-heart.is-active svg {
      stroke: #111827;
    }

    .landing-section .reply-highlight,
    .thread-detail .reply-highlight {
      display: block;
      margin: 0 0 4px;
      padding: 0;
      border: 0;
      font: inherit;
      color: inherit;
    }

    .landing-section .thread-premium-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin-top: 0;
      padding: 9px 14px;
      border-top: 0;
      background: #fff;
      font-size: 10px;
      font-weight: 300;
      color: #6b7280;
    }

    body.pref-thread-compact .thread-replies-wrap:not(.is-collapsed) {
      border-bottom: 1px solid var(--hairline);
    }

    .landing-section .thread-premium-bar svg {
      width: 11px;
      height: 11px;
      color: #9ca3af;
      flex-shrink: 0;
    }

    .landing-section .thread-premium-bar strong {
      font-weight: 500;
      color: #4b5563;
    }

    .landing-cta-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin-top: 16px;
      flex-wrap: wrap;
    }

    .landing-cta-row .btn {
      border-radius: 6px;
    }

    .landing-cta-row .btn-ghost {
      background: #ffffff;
    }

    .landing-cta-row .btn-ghost:hover {
      background: #ffffff;
      border-color: rgba(17,24,39,0.28);
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 8px 14px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 400;
      cursor: pointer;
      border: 1px solid transparent;
      transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    }

    .btn-primary {
      background: #2b2b2b;
      color: #fff;
      border-color: #2b2b2b;
    }

    .btn-primary:hover { background: #000; border-color: #000; }

    .btn-ghost {
      background: transparent;
      color: #111827;
      border-color: rgba(17,24,39,0.14);
    }

    .btn-ghost:hover { border-color: rgba(17,24,39,0.28); }

    .thread-page-bar .back-chat-link {
      margin-bottom: 0;
    }

    .back-chat-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 18px;
      padding: 0;
      border: 0;
      background: none;
      font: inherit;
      font-size: 13px;
      font-weight: 400;
      color: #6b7280;
      cursor: pointer;
      transition: color 0.18s ease;
    }

    .back-chat-link:hover {
      color: #111827;
    }

    /* Thread components */
    .thread-post {
      padding-bottom: 18px;
      margin-bottom: 18px;
      border-bottom: 1px solid var(--hairline);
    }

    .thread-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
    }

    .avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: #e8e8e8;
      flex-shrink: 0;
      display: grid;
      place-items: center;
      font-family: var(--display);
      font-size: 13px;
      font-weight: 400;
      color: #111827;
      letter-spacing: -0.01em;
    }

    .meta-lines { min-width: 0; }

    .meta-top {
      font-size: 12px;
      font-weight: 400;
      color: #4b5563;
      line-height: 1.35;
    }

    .meta-top strong { font-weight: 500; color: #111827; }

    .meta-sub {
      font-size: 11px;
      font-weight: 300;
      color: #9ca3af;
      margin-top: 2px;
    }

    .thread-title {
      font-family: var(--display);
      font-size: 22px;
      line-height: 1.2;
      letter-spacing: -0.01em;
      margin-bottom: 10px;
    }

    .thread-body {
      font-size: 15px;
      line-height: 1.65;
      font-weight: 300;
      color: #2e2e2e;
    }

    .thread-body p + p { margin-top: 10px; }

    .thread-body ul {
      margin: 10px 0 0 18px;
    }

    .thread-body li { margin-bottom: 6px; }

    .thread-body a {
      color: #111827;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .thread-stats {
      display: flex;
      gap: 14px;
      margin-top: 14px;
      font-size: 12px;
      color: #6b7280;
      font-weight: 300;
    }

    .reply {
      display: flex;
      gap: 10px;
      padding: 14px 0;
      border-top: 1px solid rgba(17,24,39,0.06);
    }

    .reply .avatar { width: 28px; height: 28px; font-size: 11px; }

    .reply-body {
      flex: 1;
      min-width: 0;
      font-size: 14px;
      line-height: 1.6;
      font-weight: 300;
      color: #2e2e2e;
    }

    .reply-meta {
      font-size: 11px;
      color: #9ca3af;
      margin-bottom: 4px;
    }

    .reply-meta strong { color: #4b5563; font-weight: 500; }

    /* Chat page */
    .chat-page {
      width: min(680px, 100%);
      margin: 48px auto 100px;
    }

    .chat-head {
      margin-bottom: 20px;
    }

    .chat-head-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .thread-page-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 18px;
    }

    .thread-display-menu {
      position: relative;
      flex-shrink: 0;
    }

    .thread-display-trigger {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border: 1px solid rgba(17, 24, 39, 0.08);
      background: rgba(255, 255, 255, 0.72);
      border-radius: 7px;
      color: #9ca3af;
      cursor: pointer;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }

    .thread-display-trigger:hover,
    .thread-display-trigger[aria-expanded="true"] {
      color: #4b5563;
      border-color: rgba(17, 24, 39, 0.14);
      background: #fff;
    }

    .thread-display-trigger svg {
      width: 15px;
      height: 15px;
    }

    .thread-display-panel {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      min-width: 214px;
      padding: 4px;
      border: 1px solid rgba(17, 24, 39, 0.1);
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 10px 28px rgba(17, 24, 39, 0.1);
      z-index: 3000;
    }

    .thread-display-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 10px;
      border-radius: 7px;
      cursor: pointer;
      user-select: none;
    }

    .thread-display-option:hover {
      background: rgba(17, 24, 39, 0.035);
    }

    .thread-display-option-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 400;
      color: #374151;
      line-height: 1.2;
    }

    .thread-display-option-label svg {
      width: 15px;
      height: 15px;
      color: #6b7280;
      flex-shrink: 0;
    }

    .thread-display-option input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .toggle-switch {
      width: 36px;
      height: 20px;
      border-radius: 999px;
      background: #e5e7eb;
      position: relative;
      flex-shrink: 0;
      transition: background 0.15s ease;
    }

    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 1px 2px rgba(17, 24, 39, 0.18);
      transition: transform 0.15s ease;
    }

    .thread-display-option input:checked + .toggle-switch {
      background: #111827;
    }

    .thread-display-option input:checked + .toggle-switch::after {
      transform: translateX(16px);
    }

    .thread-replies-toggle {
      display: block;
      width: 100%;
      margin: 0;
      padding: 10px 10px;
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 12px;
      font-weight: 400;
      color: #6b7280;
      text-align: left;
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease;
    }

    .thread-replies-toggle:hover {
      color: #111827;
      background: transparent;
    }

    body.pref-thread-compact .thread-replies-wrap.is-collapsed {
      display: none;
    }

    body:not(.pref-thread-compact) .thread-replies-wrap {
      display: block;
    }

    .landing-opener-slide .thread-replies-toggle {
      flex: 0 0 auto;
      margin: 10px 0 0;
    }

    body.pref-thread-small-text .thread-detail .thread-title,
    body.pref-thread-small-text .landing-section .thread-title,
    body.pref-thread-small-text .feed-item h3,
    body.pref-thread-small-text .feed-opener h3 {
      font-size: 15px;
    }

    body.pref-thread-small-text .thread-detail .thread-body,
    body.pref-thread-small-text .thread-detail .reply-body,
    body.pref-thread-small-text .landing-section .thread-body,
    body.pref-thread-small-text .landing-section .reply-body,
    body.pref-thread-small-text .feed-excerpt,
    body.pref-thread-small-text .thread-detail .meta-top,
    body.pref-thread-small-text .thread-detail .reply-meta,
    body.pref-thread-small-text .landing-section .meta-top,
    body.pref-thread-small-text .landing-section .reply-meta {
      font-size: 11px;
    }

    body.pref-thread-full-width .chat-page {
      width: min(960px, calc(100vw - 48px));
    }

    body.pref-thread-full-width .landing-section {
      width: min(1200px, calc(100vw - 48px));
    }

    /* When relocated into the centred hero column (max-width 980px), the
       full-width frame is wider than its parent, so plain `margin: auto` can't
       centre it and it overflows to the right. Break it out and centre it on
       the viewport instead. The hero column is itself viewport-centred, so its
       horizontal midpoint matches the viewport's. */
    body.pref-thread-full-width .hero-content > .landing-section {
      width: min(1200px, calc(100vw - 48px));
      max-width: none;
      margin-top: 44px;
      margin-bottom: 8px;
      margin-left: 50%;
      transform: translateX(-50%);
    }

    body.pref-thread-full-width .landing-thread-wrap {
      width: min(960px, 100%);
    }

    body.pref-thread-full-width .landing-thread-shell {
      width: 100%;
    }

    .chat-head h1 {
      font-family: var(--display);
      font-size: clamp(28px, 3.2vw, 36px);
      font-weight: 400;
      letter-spacing: -0.02em;
      line-height: 1.05;
      margin-bottom: 6px;
    }

    .chat-head p {
      font-size: 13px;
      font-weight: 300;
      color: #6b6b6b;
      line-height: 1.45;
      max-width: 520px;
      margin-bottom: 0;
    }

    .composer-card,
    .feed-card {
      border: 1px solid var(--hairline);
      border-radius: 10px;
      background: rgba(255,255,255,0.82);
      box-shadow: 0 8px 24px rgba(17,24,39,0.04);
    }

    .composer-card {
      padding: 12px 14px 10px;
      margin-bottom: 16px;
      background: var(--panel-soft);
    }

    .composer-card .avatar {
      width: 24px;
      height: 24px;
      font-size: 10px;
    }

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

    .composer-top-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    .composer-lock {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      color: #9ca3af;
      font-weight: 300;
    }

    .composer-lock svg {
      width: 12px;
      height: 12px;
    }

    .composer-fields {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .composer-field-label {
      display: block;
      margin-bottom: 4px;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
    }

    .composer-field-input {
      position: relative;
      border: 1px solid rgba(17, 24, 39, 0.1);
      border-radius: 8px;
      background: #fff;
      overflow: visible;
      transition: border-color 0.12s ease;
    }

    .composer-field-input:focus-within {
      border-color: #111827;
    }

    .reply-box .input-with-gate {
      border: 1px solid rgba(17, 24, 39, 0.1);
      border-radius: 8px;
      background: #fff;
      overflow: visible;
      transition: border-color 0.12s ease;
    }

    .reply-box .input-with-gate:focus-within {
      border-color: #111827;
    }

    .composer-field-input:has(:disabled) {
      background: #fafafa;
    }

    .composer-title {
      width: 100%;
      border: 0;
      padding: 10px 12px;
      font-family: var(--display);
      font-size: 15px;
      line-height: 1.25;
      font-weight: 400;
      letter-spacing: -0.01em;
      color: #111827;
      background: transparent;
      outline: none;
      box-shadow: none;
      -webkit-appearance: none;
      appearance: none;
    }

    .composer-title:focus,
    .composer-title:focus-visible {
      outline: none;
      box-shadow: none;
    }

    .composer-title:disabled {
      color: #9ca3af;
      cursor: not-allowed;
    }

    .composer-title::placeholder,
    .composer-input::placeholder {
      color: #9ca3af;
      font-weight: 300;
      opacity: 1;
    }

    .composer-title::placeholder {
      font-family: inherit;
      font-size: 15px;
      line-height: 1.25;
      letter-spacing: -0.01em;
    }

    .composer-input::placeholder {
      font-size: 13px;
      line-height: 1.5;
    }

    .composer-input {
      width: 100%;
      min-height: 88px;
      resize: vertical;
      border: 0;
      border-radius: 0;
      padding: 10px 12px;
      font: inherit;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 300;
      color: #111827;
      background: transparent;
      outline: none;
      box-shadow: none;
      -webkit-appearance: none;
      appearance: none;
    }

    .composer-input[contenteditable] {
      overflow-y: auto;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .composer-input[contenteditable]:empty::before {
      content: attr(data-placeholder);
      color: #9ca3af;
      -webkit-text-fill-color: #9ca3af;
      font-weight: 300;
      pointer-events: none;
    }

    .composer-input[contenteditable] strong,
    .composer-input[contenteditable] b {
      font-weight: 600;
    }

    .composer-input[contenteditable] a {
      color: #111827;
      text-decoration: underline;
      text-underline-offset: 2px;
      cursor: pointer;
    }

    .input-with-gate:not(.is-enabled):not(.has-draft):not(.is-editing) .composer-input[contenteditable]:empty::before {
      opacity: 0;
    }

    .composer-input:focus,
    .composer-input:focus-visible {
      outline: none;
      box-shadow: none;
    }

    .composer-input:disabled,
    .composer-input[contenteditable="false"] {
      color: #9ca3af;
      cursor: not-allowed;
    }

    .input-with-gate:not(.is-enabled):not(.has-draft):not(.is-editing) .composer-input {
      color: transparent;
      -webkit-text-fill-color: transparent;
      caret-color: transparent;
    }

    .input-with-gate:not(.is-enabled):not(.has-draft):not(.is-editing) .composer-input::placeholder {
      opacity: 0;
    }

    .input-with-gate.has-draft .composer-input,
    .input-with-gate.is-enabled .composer-input,
    .input-with-gate.is-editing .composer-input {
      color: #111827;
      -webkit-text-fill-color: #111827;
      caret-color: auto;
    }

    .input-with-gate.is-enabled .composer-input[contenteditable]:empty::before,
    .input-with-gate.is-editing .composer-input[contenteditable]:empty::before,
    .input-with-gate.has-draft .composer-input[contenteditable]:empty::before {
      color: #9ca3af;
      -webkit-text-fill-color: #9ca3af;
    }

    .input-with-gate {
      position: relative;
    }

    .input-gate-prompt {
      position: absolute;
      inset: 0;
      padding: 10px 12px;
      pointer-events: none;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 300;
      color: #9ca3af;
      -webkit-text-fill-color: #9ca3af;
    }

    .input-gate-prompt a {
      pointer-events: auto;
      color: #9ca3af;
      -webkit-text-fill-color: #9ca3af;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .input-gate-prompt a:hover {
      color: #6b7280;
      -webkit-text-fill-color: #6b7280;
    }

    .input-with-gate.is-enabled .input-gate-prompt {
      display: none;
    }

    .input-with-gate.has-draft .input-gate-prompt,
    .input-with-gate.is-editing .input-gate-prompt {
      display: none;
    }

    .input-with-gate.has-draft .composer-input:disabled,
    .input-with-gate.has-draft .composer-input[contenteditable="false"],
    .input-with-gate.has-draft textarea:disabled {
      color: #374151;
      -webkit-text-fill-color: #374151;
    }

    .composer-fields.has-draft .composer-title:disabled {
      color: #374151;
      -webkit-text-fill-color: #374151;
    }

    .composer-attachments {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    .composer-attachments:empty {
      display: none;
    }

    .composer-attach-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid rgba(17, 24, 39, 0.1);
      background: #fafafa;
      border-radius: 999px;
      padding: 3px 8px 3px 6px;
      font-size: 11px;
      color: #4b5563;
    }

    .composer-attach-chip svg {
      width: 12px;
      height: 12px;
      flex-shrink: 0;
      color: #9ca3af;
    }

    .composer-attach-remove {
      border: 0;
      background: transparent;
      color: #9ca3af;
      cursor: pointer;
      padding: 0 2px;
      font-size: 14px;
      line-height: 1;
    }

    .composer-attach-remove:hover {
      color: #111827;
    }

    .composer-collab-box {
      margin-bottom: 16px;
      padding: 14px 16px;
      border-radius: 10px;
      background: #111827;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .composer-collab-left {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }

    .composer-collab-heading {
      margin: 0;
      font-family: var(--display);
      font-size: clamp(22px, 2.35vw, 30px);
      font-weight: 400;
      letter-spacing: -0.02em;
      line-height: 1.05;
      color: rgba(255, 255, 255, 0.92);
      white-space: nowrap;
    }

    .composer-collab-cta {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 14px;
      border: 1px solid #fff;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 400;
      line-height: 1.2;
      color: #111827;
      background: #fff;
      text-decoration: none;
      transition: background 0.15s ease, border-color 0.15s ease;
      white-space: nowrap;
    }

    .composer-collab-cta:hover {
      background: #f3f4f6;
      border-color: #f3f4f6;
    }

    .composer-collab-right {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .composer-collab-right-heading {
      margin: 0;
      font-size: 13px;
      font-weight: 400;
      line-height: 1.4;
      color: rgba(255, 255, 255, 0.92);
      text-align: center;
      width: calc(92px * 3 + 8px * 2);
    }

    .composer-collab-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
    }

    .composer-collab-btn {
      display: inline-flex;
      flex: 0 0 92px;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 92px;
      padding: 10px 8px;
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 10px;
      font: inherit;
      font-size: 12px;
      font-weight: 400;
      line-height: 1.2;
      color: #fff;
      background: transparent;
      text-decoration: none;
      transition: background 0.15s ease, border-color 0.15s ease;
    }

    .composer-collab-btn svg {
      width: 18px;
      height: 18px;
      opacity: 0.9;
    }

    .composer-collab-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.38);
    }

    .feed-excerpt strong,
    .thread-body strong {
      font-weight: 500;
    }

    .composer-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 8px;
      flex-wrap: wrap;
    }

    .toolbar {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: wrap;
    }

    .tool-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border: 1px solid rgba(17,24,39,0.08);
      background: #fff;
      color: #6b7280;
      border-radius: 6px;
      padding: 0;
      cursor: pointer;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }

    .tool-btn svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    .tool-btn:hover:not(:disabled) {
      color: #111827;
      border-color: rgba(17,24,39,0.16);
      background: #fafafa;
    }

    .tool-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .composer-footer {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    .word-count {
      font-size: 11px;
      color: #9ca3af;
      font-weight: 300;
      white-space: nowrap;
    }

    .word-count.is-over { color: #b91c1c; }

    .btn-post {
      padding: 3px 9px;
      font-size: 12px;
      border-radius: 5px;
    }

    .composer-suggestions {
      display: none;
    }

    .composer-try-asking-wrap {
      position: relative;
    }

    .composer-try-asking-trigger {
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 11px;
      color: #6b7280;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
      padding: 0;
    }

    .composer-try-asking-trigger:hover,
    .composer-try-asking-wrap.is-open .composer-try-asking-trigger {
      color: #111827;
    }

    .composer-try-asking-menu {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      z-index: 60;
      min-width: 200px;
      background: #fff;
      border: 1px solid #111827;
      border-radius: 8px;
      padding: 4px;
      box-shadow: 0 12px 32px rgba(17,24,39,0.12);
    }

    .composer-try-asking-menu[hidden] {
      display: none !important;
    }

    .composer-try-asking-menu-label {
      padding: 6px 10px 4px;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
    }

    .try-asking-option {
      display: block;
      width: 100%;
      padding: 8px 10px;
      border: 0;
      border-radius: 5px;
      background: transparent;
      font: inherit;
      font-size: 12px;
      color: #111827;
      text-align: left;
      cursor: pointer;
    }

    .try-asking-option:hover {
      background: rgba(17,24,39,0.04);
    }

    .try-asking-more-items[hidden] {
      display: none !important;
    }

    .composer-agenda {
      margin-top: 10px;
    }

    .composer-agenda-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
    }

    .composer-agenda-header-left {
      display: flex;
      align-items: baseline;
      gap: 6px;
    }

    .composer-agenda-label {
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
    }

    .composer-agenda-hint {
      font-size: 10px;
      color: #9ca3af;
      font-weight: 300;
    }

    .composer-tags-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }

    .composer-tags {
      display: contents;
    }

    .tag-pill.is-extra {
      display: none;
    }

    .composer-agenda.is-expanded .tag-pill.is-extra {
      display: inline-flex;
    }

    .composer-topics-more {
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 11px;
      color: #6b7280;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
      padding: 4px 0;
      line-height: 1.25;
    }

    .composer-agenda.is-expanded .composer-topics-more {
      display: none;
    }

    .composer-suggestions-label {
      width: 100%;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
      margin-bottom: 1px;
    }

    .suggestion-pill {
      border: 1px solid rgba(17, 24, 39, 0.1);
      background: #fafafa;
      color: #4b5563;
      border-radius: 999px;
      padding: 2px 9px;
      font: inherit;
      font-size: 11px;
      font-weight: 400;
      line-height: 1.25;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .suggestion-pill:hover {
      background: #f3f4f6;
      border-color: rgba(17, 24, 39, 0.16);
      color: #111827;
    }

    .feed-card { overflow: hidden; }

    .feed-section-wrap {
      position: relative;
    }

    .feed-display-menu-row {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 6px;
    }

    .feed-header {
      padding: 12px 16px 14px;
      background: var(--panel-soft);
      border-bottom: 0;
    }

    .feed-section-label {
      display: block;
      margin-bottom: 6px;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
    }

    .feed-section-title {
      margin: 0 0 5px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.35;
      letter-spacing: -0.01em;
      color: #111827;
    }

    .feed-section-body {
      margin: 0;
      font-size: 12px;
      font-weight: 300;
      color: #9ca3af;
      line-height: 1.45;
    }

    /* Discussions shell: header/toolbar stay framed; threads are separate cards. */
    .feed-section-wrap > .feed-card {
      border: 0;
      background: transparent;
      box-shadow: none;
      overflow: visible;
    }

    .feed-header {
      border: 1px solid var(--hairline);
      border-bottom: 0;
      border-radius: 10px 10px 0 0;
      background: var(--panel-soft);
    }

    .feed-toolbar {
      border: 1px solid var(--hairline);
      border-top: 1px solid rgba(17, 24, 39, 0.06);
      border-radius: 0 0 10px 10px;
      background: rgba(255, 255, 255, 0.92);
      margin-bottom: 0;
    }

    .feed-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 16px 0 8px;
      background: transparent;
    }

    .feed-item {
      display: block;
      padding: 0;
      border: 1px solid var(--hairline);
      border-radius: 10px;
      background: #ffffff;
      overflow: hidden;
      transition: background 0.15s ease;
    }

    .feed-item + .feed-item {
      border-top: 1px solid var(--hairline);
      padding-top: 0;
    }

    .feed-opener {
      display: block;
      padding: 14px 16px 10px;
      color: inherit;
      text-decoration: none;
      cursor: pointer;
      background: var(--panel-soft);
      transition: background 0.15s ease;
    }

    .feed-opener:hover {
      background: #f3f4f6;
    }

    .feed-replies {
      padding: 0 8px 10px 16px;
      background: #ffffff;
    }

    .feed-inline-reply {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 10px 12px 12px;
      border-top: 1px solid rgba(17, 24, 39, 0.06);
      background: #fff;
    }

    .feed-inline-reply .avatar {
      width: 28px;
      height: 28px;
      font-size: 11px;
    }

    .feed-inline-reply-field {
      flex: 1;
      min-width: 0;
    }

    .feed-inline-reply .feed-reply-input {
      min-height: 36px;
      max-height: 120px;
      overflow-y: auto;
      padding: 8px 10px;
      border: 1px solid rgba(17, 24, 39, 0.1);
      border-radius: 6px;
      font-size: 12px;
      font-weight: 300;
      line-height: 1.4;
      outline: none;
      background: #fff;
    }

    .feed-inline-reply .feed-reply-input:focus {
      border-color: #111827;
    }

    .feed-inline-reply .input-with-gate:not(.is-enabled) .feed-reply-input {
      cursor: pointer;
      background: #fafafa;
    }

    .feed-item .reply {
      padding-left: 0;
    }

    .feed-replies-more {
      display: block;
      padding: 8px 8px 4px 6px;
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 11px;
      font-weight: 400;
      color: #6b7280;
      text-align: left;
      cursor: pointer;
      transition: color 0.15s ease;
    }

    .feed-replies-more:hover {
      color: #111827;
    }

    .feed-opener h3 {
      font-family: var(--display);
      font-size: 18px;
      line-height: 1.2;
      margin: 6px 0 4px;
      font-weight: 400;
    }

    .feed-excerpt {
      font-size: 13px;
      line-height: 1.45;
      color: #4b5563;
      font-weight: 300;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .feed-stats {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 8px;
      font-size: 11px;
      color: #6b7280;
      font-weight: 400;
    }

    .feed-stat {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      line-height: 1;
    }

    .feed-stat svg {
      width: 12px;
      height: 12px;
      flex-shrink: 0;
      stroke: currentColor;
      fill: none;
    }

    .feed-stat span {
      display: block;
      line-height: 12px;
      transform: translateY(0.5px);
    }

    .feed-item .avatar {
      width: 26px;
      height: 26px;
      font-size: 10px;
    }

    .feed-item .meta-top {
      font-size: 11px;
    }

    .feed-item .meta-sub {
      font-size: 10px;
    }

    /* Thread detail page inside chat */
    .thread-detail {
      padding: 14px 16px 0;
    }

    .reply-time {
      font-size: 10px;
      font-weight: 300;
      color: #9ca3af;
      white-space: nowrap;
    }

    .reply-box {
      padding: 12px 14px 10px;
      border-top: 1px solid rgba(17, 24, 39, 0.06);
    }

    .reply-box .avatar {
      width: 24px;
      height: 24px;
      font-size: 10px;
    }

    .reply-box .composer-actions {
      margin-top: 8px;
    }

    @media (max-width: 860px) {
      .landing-section,
      .landing-howitworks-wrap,
      .landing-opener-carousel,
      .chat-page { width: calc(100vw - 32px); }
      .header-center { display: none; }
      .header-container { top: 78px; }
    }

    @media (max-width: 520px) {
      .composer-collab-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
      }

      .composer-collab-right {
        align-items: center;
        width: 100%;
      }

      .composer-collab-right-heading {
        text-align: center;
      }

      .composer-collab-actions {
        justify-content: center;
      }

      .landing-section .meta-lines {
        min-width: 0;
        flex: 1;
      }

      .landing-section .thread-meta {
        flex-wrap: nowrap;
      }

      .landing-section .thread-tags {
        display: none;
      }

      .landing-section .meta-top,
      .landing-section .reply-meta {
        font-size: 10px;
      }
    }

    /* Enhancements */
    .feed-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 16px;
    }

    .feed-toolbar label {
      font-size: 11px;
      color: #6b7280;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .feed-toolbar select {
      font: inherit;
      font-size: 11px;
      border: 1px solid rgba(17,24,39,0.1);
      border-radius: 6px;
      padding: 4px 8px;
      background: #fff;
      outline: none;
    }

    .feed-toolbar select:focus,
    .feed-toolbar select:active {
      border-color: #111827;
    }

    .feed-sort-wrap {
      position: relative;
    }

    .feed-sort-trigger {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font: inherit;
      font-size: 11px;
      color: #111827;
      border: 1px solid rgba(17,24,39,0.1);
      border-radius: 6px;
      padding: 4px 8px;
      background: #fff;
      cursor: pointer;
      outline: none;
      transition: border-color 0.12s ease;
    }

    .feed-sort-trigger:hover {
      border-color: rgba(17,24,39,0.2);
    }

    .feed-sort-trigger[aria-expanded="true"] {
      border-color: #111827;
    }

    .feed-sort-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #111827;
      flex-shrink: 0;
    }

    .feed-sort-icon svg {
      width: 12px;
      height: 12px;
    }

    .feed-sort-menu {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      z-index: 40;
      min-width: 140px;
      background: #fff;
      border: 1px solid #111827;
      border-radius: 8px;
      padding: 4px;
      box-shadow: 0 8px 24px rgba(17,24,39,0.08);
    }

    .feed-sort-menu[hidden] {
      display: none;
    }

    .feed-sort-option {
      display: block;
      width: 100%;
      padding: 7px 10px;
      border: 0;
      border-radius: 5px;
      background: transparent;
      font: inherit;
      font-size: 11px;
      color: #111827;
      text-align: left;
      cursor: pointer;
    }

    .feed-sort-option:hover,
    .feed-sort-option.is-selected {
      background: rgba(17,24,39,0.04);
    }

    .feed-opener-meta-row {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 6px;
    }

    .feed-opener-meta-row .meta-lines { flex: 1; min-width: 0; }

    .feed-tag-pill {
      font-size: 9px;
      font-weight: 500;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #6b7280;
      background: rgba(17,24,39,0.04);
      border-radius: 4px;
      padding: 3px 6px;
      white-space: nowrap;
    }

    .feed-stat-time {
      margin-left: auto;
      font-size: 10px;
      color: #9ca3af;
    }

    .feed-item.has-unread .feed-opener h3::after {
      content: '';
      display: inline-block;
      width: 6px;
      height: 6px;
      margin-left: 6px;
      border-radius: 50%;
      background: #111827;
      vertical-align: middle;
    }

    .feed-unread { color: #111827; font-weight: 500; }

    body.pref-thread-compact .feed-item .feed-excerpt,
    body.pref-thread-compact .feed-item .feed-replies {
      display: none !important;
    }

    .thread-post.is-op {
      background: rgba(17,24,39,0.02);
      border-radius: 8px;
      padding: 14px 12px;
      margin: 0 -4px 14px;
    }

    .thread-op-actions, .reply-actions-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .thread-op-heart, .thread-action-btn, .reply-to-btn, .reply-save-btn, .mark-best-btn, .report-btn, .thread-edit-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 0;
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 10px;
      line-height: 1;
      color: #6b7280;
      cursor: pointer;
    }

    .thread-op-heart svg { width: 12px; height: 12px; }

    .thread-op-heart.is-active, .thread-action-btn.is-active, .reply-save-btn.is-active { color: #111827; }

    .member-link {
      padding: 0;
      border: 0;
      background: transparent;
      font: inherit;
      font-weight: 500;
      color: inherit;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .reply.is-nested {
      margin-left: 12px;
    }

    .reply.is-best-answer {
      background: rgba(17,24,39,0.02);
      border-radius: 6px;
    }

    .best-answer-badge {
      font-size: 9px;
      font-weight: 500;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #111827;
    }

    .thread-empty-state {
      padding: 20px 16px;
      text-align: center;
      font-size: 13px;
      color: #6b7280;
      border-top: 1px solid rgba(17,24,39,0.06);
    }

    .thread-bridge-actions {
      padding: 14px 16px;
      border-top: 1px solid rgba(17, 24, 39, 0.06);
      border-bottom: 1px solid rgba(17, 24, 39, 0.06);
      background: rgba(17, 24, 39, 0.015);
      text-align: center;
    }

    .thread-bridge-label {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 400;
      letter-spacing: 0.01em;
      text-transform: none;
      color: #9ca3af;
      margin: 0;
      text-decoration: none;
      cursor: pointer;
      transition: color 0.15s ease;
    }

    .thread-bridge-label:hover {
      color: #111827;
    }

    .thread-bridge-icon {
      width: 12px;
      height: 12px;
      flex-shrink: 0;
    }

    .thread-bridge-actions + .reply-box-sticky-wrap {
      border-top: 0;
      box-shadow: none;
    }

    .thread-bridge-actions + .reply-box-sticky-wrap .reply-box {
      border-top: 0;
    }

    #view-thread .thread-detail + .reply-box-sticky-wrap {
      border-top: 0;
      box-shadow: none;
    }

    #view-thread .thread-detail + .reply-box-sticky-wrap .reply-box {
      border-top: 0;
    }

    .thread-bridge-btns {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .thread-bridge-btn {
      display: inline-flex;
      align-items: center;
      padding: 7px 12px;
      border: 1px solid rgba(17,24,39,0.12);
      border-radius: 6px;
      background: #fff;
      font-size: 11px;
      color: #111827;
      cursor: pointer;
      text-decoration: none;
    }

    .thread-bridge-btn:hover { background: rgba(17,24,39,0.03); }

    .reply-box-sticky-wrap {
      position: sticky;
      bottom: 0;
      z-index: 20;
      background: #fff;
      border-top: 1px solid rgba(17,24,39,0.06);
      box-shadow: 0 -8px 24px rgba(17,24,39,0.04);
    }

    .composer-tags-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }

    .tag-pill {
      border: 1px solid rgba(17,24,39,0.1);
      background: #fff;
      border-radius: 999px;
      padding: 4px 10px;
      font: inherit;
      font-size: 11px;
      color: #6b7280;
      cursor: pointer;
    }

    .tag-pill.is-selected {
      background: #111827;
      border-color: #111827;
      color: #fff;
    }

    .composer-draft-row {
      display: flex;
      justify-content: flex-end;
      margin-top: 6px;
    }

    .save-draft-btn {
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 11px;
      color: #6b7280;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    #mentionDropdown.mention-dropdown {
      position: fixed;
      z-index: 4000;
      min-width: 220px;
      max-width: min(360px, calc(100vw - 24px));
      max-height: 260px;
      display: flex;
      flex-direction: column;
      background: #fff;
      border: 1px solid #111827;
      border-radius: 8px;
      box-shadow: 0 12px 32px rgba(17,24,39,0.12);
      overflow: hidden;
    }

    .mention-dropdown[hidden] {
      display: none !important;
    }

    .mention-dropdown-header {
      padding: 8px 12px 6px;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
      border-bottom: 1px solid rgba(17,24,39,0.06);
    }

    .mention-list {
      overflow-y: auto;
      max-height: 160px;
    }

    .mention-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 8px 12px;
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 12px;
      text-align: left;
      cursor: pointer;
      color: #111827;
    }

    .mention-option:hover,
    .mention-option.is-highlighted {
      background: rgba(17,24,39,0.04);
    }

    .mention-option-role {
      font-size: 10px;
      color: #9ca3af;
      margin-left: 8px;
      white-space: nowrap;
    }

    .mention-invite {
      border-top: 1px solid rgba(17,24,39,0.06);
      padding: 10px 12px;
      background: rgba(17,24,39,0.015);
    }

    .mention-invite-label {
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #6b7280;
      margin-bottom: 6px;
    }

    .mention-invite-form {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .mention-invite-form input {
      flex: 1;
      min-width: 0;
      font: inherit;
      font-size: 12px;
      border: 1px solid rgba(17,24,39,0.1);
      border-radius: 6px;
      padding: 6px 8px;
      outline: none;
    }

    .mention-invite-form input:focus {
      border-color: #111827;
    }

    .mention-invite-btn {
      flex-shrink: 0;
      border: 1px solid #111827;
      border-radius: 6px;
      background: #111827;
      color: #fff;
      font: inherit;
      font-size: 11px;
      padding: 6px 10px;
      cursor: pointer;
      white-space: nowrap;
    }

    .mention-invite-btn:hover {
      background: #000;
    }

    .mention-empty {
      padding: 10px 12px;
      font-size: 12px;
      color: #9ca3af;
    }

    #mentionInviteToast.mention-invite-toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 5000;
      max-width: min(420px, calc(100vw - 32px));
      padding: 12px 16px;
      background: #111827;
      color: #fff;
      border-radius: 10px;
      font-size: 12px;
      line-height: 1.45;
      box-shadow: 0 12px 32px rgba(17,24,39,0.2);
    }

    .mention-invite-toast[hidden] {
      display: none !important;
    }

    .mention-invite-toast strong {
      display: block;
      font-weight: 500;
      margin-bottom: 2px;
    }

    .mention-invite-toast span {
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .reply-mention.is-external {
      background: rgba(17,24,39,0.04);
      border: 1px dashed rgba(17,24,39,0.14);
      cursor: default;
    }

    .input-with-gate { position: relative; }

    .proto-modal {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(255, 255, 255, 0.52);
      backdrop-filter: blur(14px) saturate(150%);
      -webkit-backdrop-filter: blur(14px) saturate(150%);
    }

    #reportModal.proto-modal.qava-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(255, 255, 255, 0.52);
      backdrop-filter: blur(14px) saturate(150%);
      -webkit-backdrop-filter: blur(14px) saturate(150%);
    }

    .proto-modal[hidden],
    #reportModal.proto-modal[hidden] { display: none !important; }

    html.is-modal-open,
    body.is-modal-open {
      overflow: hidden;
    }

    .proto-modal-card {
      width: min(420px, 100%);
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(17, 24, 39, 0.08);
      border-radius: 12px;
      padding: 20px;
      box-shadow: 0 24px 60px rgba(17, 24, 39, 0.16);
    }

    .proto-modal-card h3 {
      font-family: var(--display);
      font-size: 20px;
      font-weight: 400;
      margin-bottom: 12px;
    }

    .proto-modal-close {
      float: right;
      border: 0;
      background: transparent;
      font-size: 18px;
      cursor: pointer;
      color: #6b7280;
    }

    .report-modal-sub {
      font-size: 12px;
      color: #6b7280;
      line-height: 1.45;
      margin-bottom: 16px;
    }

    .report-field {
      margin-bottom: 14px;
    }

    .report-field select,
    .report-field textarea {
      width: 100%;
      font: inherit;
      font-size: 13px;
      line-height: 1.5;
      color: #111827;
      border: 1px solid rgba(17, 24, 39, 0.1);
      border-radius: 8px;
      padding: 10px 12px;
      background: #fff;
      outline: none;
      transition: border-color 0.12s ease;
    }

    .report-category-wrap {
      position: relative;
    }

    .report-category-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      width: 100%;
      font: inherit;
      font-size: 13px;
      line-height: 1.5;
      color: #111827;
      border: 1px solid rgba(17, 24, 39, 0.1);
      border-radius: 8px;
      padding: 10px 12px;
      background: #fff;
      cursor: pointer;
      outline: none;
      transition: border-color 0.12s ease;
      text-align: left;
    }

    .report-category-trigger:hover {
      border-color: rgba(17, 24, 39, 0.2);
    }

    .report-category-trigger[aria-expanded="true"] {
      border-color: #111827;
    }

    .report-category-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #111827;
      flex-shrink: 0;
    }

    .report-category-icon svg {
      width: 12px;
      height: 12px;
    }

    .report-category-menu {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      z-index: 2;
      background: #fff;
      border: 1px solid #111827;
      border-radius: 8px;
      padding: 4px;
      box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
    }

    .report-category-menu[hidden] {
      display: none;
    }

    .report-category-option {
      display: block;
      width: 100%;
      padding: 8px 10px;
      border: 0;
      border-radius: 5px;
      background: transparent;
      font: inherit;
      font-size: 13px;
      color: #111827;
      text-align: left;
      cursor: pointer;
    }

    .report-category-option:hover,
    .report-category-option.is-selected {
      background: rgba(17, 24, 39, 0.04);
    }

    .report-field select:focus,
    .report-field textarea:focus {
      border-color: #111827;
    }

    .report-field textarea {
      min-height: 96px;
      resize: vertical;
      font-weight: 300;
    }

    .report-field textarea::placeholder {
      color: #9ca3af;
    }

    .report-submit-row {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 4px;
    }

    .report-cancel-btn {
      padding: 8px 14px;
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 12px;
      color: #6b7280;
      cursor: pointer;
    }

    .report-cancel-btn:hover {
      color: #111827;
    }

    .reply.is-hidden,
    .thread-post.is-hidden {
      display: none !important;
    }

    /* User profile page */
    .profile-card {
      padding: 0;
    }

    .profile-page {
      padding: 20px 18px 24px;
    }

    .profile-hero {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 14px;
    }

    .profile-avatar {
      width: 56px;
      height: 56px;
      font-size: 18px;
      flex: 0 0 auto;
      overflow: hidden;
    }

    /* Photo avatar (falls back to initials when no photo) */
    .avatar { overflow: hidden; }
    .avatar img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      object-position: var(--avatar-pos, 50% 50%);
      display: block;
      aspect-ratio: 1 / 1;
    }

    .profile-identity h1 {
      font-family: var(--display);
      font-size: 24px;
      font-weight: 400;
      line-height: 1.15;
      margin-bottom: 2px;
    }

    .profile-role {
      font-size: 12px;
      color: #6b7280;
      font-weight: 300;
    }

    .profile-bio {
      font-size: 13px;
      line-height: 1.55;
      color: #4b5563;
      margin-bottom: 16px;
      max-width: 52ch;
    }

    .profile-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 22px;
      padding-bottom: 20px;
      border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    }

    .profile-stat {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 88px;
      padding: 10px 12px;
      border: 1px solid rgba(17, 24, 39, 0.08);
      border-radius: 8px;
      background: rgba(17, 24, 39, 0.02);
    }

    .profile-stat strong {
      font-family: var(--display);
      font-size: 18px;
      font-weight: 400;
      color: #111827;
    }

    .profile-stat span {
      font-size: 10px;
      color: #9ca3af;
      letter-spacing: 0.02em;
    }

    .profile-section {
      margin-bottom: 20px;
    }

    .profile-section:last-child {
      margin-bottom: 0;
    }

    .profile-section-label {
      display: block;
      margin-bottom: 8px;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #9ca3af;
    }

    .profile-thread-list,
    .profile-reply-list,
    .profile-saved-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .profile-thread-item,
    .profile-reply-item,
    .profile-saved-item {
      display: block;
      width: 100%;
      padding: 12px 14px;
      border: 1px solid rgba(17, 24, 39, 0.08);
      border-radius: 8px;
      background: #fff;
      text-align: left;
      cursor: pointer;
      transition: border-color 0.15s ease, background 0.15s ease;
      font: inherit;
      font-weight: 300;
    }

    .profile-thread-item:hover,
    .profile-reply-item:hover,
    .profile-saved-item:hover {
      border-color: rgba(17, 24, 39, 0.14);
      background: rgba(17, 24, 39, 0.02);
    }

    .profile-saved-type {
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: #9ca3af;
      margin-bottom: 4px;
    }

    .profile-thread-item h3,
    .profile-reply-item h3,
    .profile-saved-item h3 {
      font-family: var(--display);
      font-size: 15px;
      font-weight: 400;
      line-height: 1.35;
      margin-bottom: 4px;
      color: #111827;
    }

    .profile-thread-meta,
    .profile-reply-meta {
      font-size: 11px;
      color: #9ca3af;
      font-weight: 300;
    }

    .profile-reply-excerpt {
      font-size: 12px;
      line-height: 1.45;
      font-weight: 300;
      color: #2e2e2e;
      margin-top: 6px;
    }

    .profile-reply-excerpt .reply-mention {
      font-weight: 500;
    }

    .profile-empty-note {
      font-size: 12px;
      color: #9ca3af;
      font-weight: 300;
    }
