/* ============================================================
   Testimonials · request-card product UI (Figma + app continuity)
   Namespace: .pw-tst*
   Layout knobs: DialKit “Testimonials” → CSS vars in pw-dial.css
   ============================================================ */

.pw-tst-section {
  width: 100%;
  padding-top: var(--pw-dial-section-between, 2rem);
  padding-bottom: var(--pw-dial-pad-section-large, 4rem);
  color: #fff;
  overflow: visible;
}

.pw-tst-section .container-large,
.pw-tst-section .padding-global {
  width: 100%;
  overflow: visible;
}

/* Full-bleed marquee may escape max-width shell */
.pw-tst {
  overflow: visible;
}

@media (max-width: 700px) {
  .pw-tst {
    gap: 0;
  }

  .pw-tst-head {
    margin-bottom: var(--pw-dial-tst-mobile-heading-logos-gap, 1.25rem);
  }

  .pw-tst-marquee {
    margin-bottom: var(--pw-dial-tst-stack-gap, 2.5rem);
  }
}

.pw-tst {
  width: 100%;
  max-width: var(--pw-dial-tst-max-width, 72rem);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--pw-dial-tst-stack-gap, 2.5rem);
  box-sizing: border-box;
}

/* Keep the rendered testimonial groups above the body-level ambient. */
.pw-tst-head,
.pw-tst-marquee,
.pw-tst-grid {
  position: relative;
  z-index: 1;
}

/* ---- Section head ---- */
.pw-tst-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2.5rem;
  align-items: start;
}

.pw-tst-head__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.pw-tst-head__badge-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #ff4701;
  box-shadow: 0 0 0 3px rgba(255, 71, 1, 0.2);
}

.pw-tst-head__badge-stars {
  color: var(--pw-dial-tst-star-color, #ff4701);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.pw-tst-head__title {
  margin: 0 0 -1rem;
  padding-bottom: 1rem;
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
  font-size: clamp(1.85rem, 4vw, var(--pw-dial-tst-intro-heading-size, 2.75rem));
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
  max-width: var(--pw-dial-tst-intro-heading-max, var(--pw-dial-tst-heading-max, 27.6rem));
}

.pw-tst-head__sub {
  margin: 0 0 1.25rem;
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
  font-size: var(--pw-dial-tst-intro-copy-size, 0.95rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.58);
  max-width: var(--pw-dial-tst-intro-copy-max, 28.5rem);
}

.pw-tst-head__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ---- Logos ---- */
.pw-tst-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  opacity: 0.55;
}

.pw-tst-logos__img {
  height: 22px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  opacity: 0.9;
}

/* ---- Grid · equal-height cards ---- */
.pw-tst-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--pw-dial-tst-grid-gap, 1.35rem);
  /* Equal row heights — neighbor cards match the tallest */
  align-items: stretch;
}

@media (min-width: 860px) {
  .pw-tst-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pw-tst-grid__cell,
.pw-tst-grid__motion {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pw-tst-grid__motion > .pw-tst-card {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
}

/* ---- Card shell (app paper) ---- */
.pw-tst-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
}

.pw-tst-card__shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: var(--pw-dial-tst-card-min-h, 0px);
  padding: var(--pw-dial-tst-shell-pad, 14px);
  border-radius: var(--pw-dial-tst-shell-radius, 24px);
  background: var(--pw-dial-tst-shell-outer, #1c1c1c);
  box-shadow: inset 0 0 0 1px var(--pw-dial-tst-shell-border, #ffffff0f);
  box-sizing: border-box;
}

.pw-tst-card--modal .pw-tst-card__shell {
  min-height: 0;
  max-height: min(88vh, 720px);
}

/* Header — fixed min height so avatar + name row never jumps across cards */
.pw-tst-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pw-dial-tst-header-gap, 12px);
  padding: var(--pw-dial-tst-header-pad, 8px);
  margin-bottom: var(--pw-dial-tst-header-mb, 4px);
  min-height: calc(
    var(--pw-dial-tst-avatar-size, 37px) + 16px
  );
  box-sizing: border-box;
}

.pw-tst-card__who {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--pw-dial-tst-header-who-gap, 10px);
  flex: 1 1 auto;
  min-width: 0;
}

/* Profile always left of name */
.pw-tst-card__who > .pw-tst-avatar {
  order: -1;
  flex-shrink: 0;
}

.pw-tst-card__name {
  margin: 0;
  font-size: var(--pw-dial-tst-name-size, 18px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pw-tst-card__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pw-tst-stars {
  display: inline-flex;
  align-items: center;
  gap: var(--pw-dial-tst-star-gap, 2px);
  padding: var(--pw-dial-tst-star-pad-y, 6px) var(--pw-dial-tst-star-pad-x, 10px);
  border-radius: 999px;
  /* App chip chrome: wash + ~6% white hairline (demo board / request detail) */
  background: var(--pw-dial-tst-star-bg, #ffffff0a);
  box-shadow: inset 0 0 0 1px var(--pw-dial-tst-star-border, #ffffff0f);
  color: var(--pw-dial-tst-star-color, #ff4701);
  line-height: 1;
}

.pw-tst-stars__star {
  width: var(--pw-dial-tst-star-size, 11px);
  height: var(--pw-dial-tst-star-size, 11px);
  display: block;
  flex-shrink: 0;
}

.pw-tst-card__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.pw-tst-card__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Avatar */
.pw-tst-avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: var(--pw-dial-tst-avatar-size, 37px);
  height: var(--pw-dial-tst-avatar-size, 37px);
  border-radius: 999px;
  overflow: hidden;
  background: #2a2a2a;
  filter: var(--pw-dial-tst-photo-filter, none);
}

.pw-tst-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Red photo wash removed — avatars show natural color */
.pw-tst-avatar__wash {
  display: none !important;
}

.pw-tst-avatar__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: #ff4701;
}

/* Body fills equal-height card; solid product paper */
.pw-tst-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  height: 100%;
  /* Top + sides only — no bottom pad (foot/EXPAND sits absolute) */
  padding: var(--pw-dial-tst-body-pad-y, 18px) var(--pw-dial-tst-body-pad-x, 18px) 0;
  border-radius: calc(var(--pw-dial-tst-shell-radius, 24px) - 4px);
  background: var(--pw-dial-tst-shell-body, #0e0e0e);
  box-shadow: inset 0 0 0 1px var(--pw-dial-tst-shell-body-border, #ffffff0a);
  overflow: hidden;
}

.pw-tst-card__main {
  /* Hug content by default; grid cards grow so quote wells equalize (below) */
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/*
  Grid row: equal-height cards already stretch.
  Grow the quote well so a short quote matches its tall neighbor;
  chips + comments stay content-sized under it (no mid-card void).
*/
.pw-tst-card--grid .pw-tst-card__main {
  flex: 1 1 auto;
  min-height: 0;
}

.pw-tst-card--grid .pw-tst-quote {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.pw-tst-card--grid .pw-tst-chips,
.pw-tst-card--grid .pw-tst-comments {
  flex: 0 0 auto;
}

/*
  Foot = absolute bottom fade stack; EXPAND sits inside the same surface.
*/
.pw-tst-card__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: var(--pw-dial-tst-fade-z, 12);
  height: var(--pw-dial-tst-fade-h, 161px);
  pointer-events: none; /* fade is decorative; button re-enables hits */
  background: linear-gradient(
    180deg,
    color-mix(
      in srgb,
      var(--pw-dial-tst-fade-color, #0c0c0c) 0%,
      transparent
    )
      var(--pw-dial-tst-fade-start, 0%),
    color-mix(
      in srgb,
      var(--pw-dial-tst-fade-color, #0c0c0c) 64%,
      transparent
    )
      var(--pw-dial-tst-fade-mid, 56%),
    var(--pw-dial-tst-fade-color, #0c0c0c)
      var(--pw-dial-tst-fade-end, 100%)
  );
  border-radius: 0 0 calc(var(--pw-dial-tst-shell-radius, 24px) - 4px)
    calc(var(--pw-dial-tst-shell-radius, 24px) - 4px);
}

.pw-tst-card--modal .pw-tst-card__body {
  overflow: auto;
  /* Expand/modal keeps a light bottom pad for activity row only */
  padding-bottom: 20px;
}

/* Quote well — full width of body; min-h 0 hugs text unless dial minHeightPx. */
.pw-tst-quote {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  margin-bottom: var(--pw-dial-tst-quote-mb, 16px);
  padding: var(--pw-dial-tst-quote-pad-y, 12px) var(--pw-dial-tst-quote-pad-x, 14px);
  border-radius: var(--pw-dial-tst-quote-radius, 12px);
  background: var(--pw-dial-tst-quote-bg, transparent);
  box-shadow: inset 0 0 0 1px var(--pw-dial-tst-quote-border, #ffffff0f);
  border: 0;
  min-height: var(--pw-dial-tst-quote-min-h, 0px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.pw-tst-quote__text {
  margin: 0;
  width: 100%;
  font-size: var(--pw-dial-tst-quote-size, 20px);
  font-weight: var(--pw-dial-tst-quote-weight, 500);
  line-height: var(--pw-dial-tst-quote-lh, 1.45);
  letter-spacing: -0.015em;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pw-tst-quote__hl {
  color: var(--pw-dial-tst-quote-hl, #ff4701);
}

/* Chips */
.pw-tst-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pw-dial-tst-chip-gap, 6px);
  align-items: center;
}

.pw-tst-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--pw-dial-tst-chip-icon-gap, 6px);
  height: var(--pw-dial-tst-chip-h, 32px);
  padding: 0 var(--pw-dial-tst-chip-pad-r, 12px) 0 var(--pw-dial-tst-chip-pad-l, 8px);
  border-radius: 999px;
  background: var(--pw-dial-tst-chip-bg, #ffffff0a);
  box-shadow: inset 0 0 0 1px var(--pw-dial-tst-chip-border, #ffffff0f);
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--pw-dial-tst-chip-size, 13px);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.pw-tst-chip__svg {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.pw-tst-chip__logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* YC orange square mark — slightly tighter crop */
.pw-tst-chip__logo--yc {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/*
  Comments sit directly under chips (no equal-height void).
  Card shell still stretches; content hugs top so no mid-card dead space.
*/
.pw-tst-comments {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  padding-top: var(--pw-dial-tst-comments-mt, 14px);
  border-top: 0;
  background: transparent;
  position: relative;
  flex: 0 0 auto;
}

/* Contracted grid: space Comments label → teaser */
.pw-tst-comments--masked .pw-tst-comments__label {
  position: relative;
  z-index: 3;
  margin-bottom: 16px;
}

/* Contracted: only one line of body peeks (name row always visible) */
.pw-tst-comments--masked .pw-tst-comments__peek {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pw-tst-comments__divider {
  flex-shrink: 0;
  width: 100%;
  height: 0;
  margin: var(--pw-dial-tst-divider-top, 12px) 0
    var(--pw-dial-tst-divider-bottom, 12px);
  border: 0;
  border-top: 1px solid var(--pw-dial-tst-divider-color, #ffffff14);
}

.pw-tst-comments__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--pw-dial-tst-comments-label-mb, 10px);
  font-size: var(--pw-dial-tst-comments-label-size, 13px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.pw-tst-comments__ico {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.55);
}

/*
  Collapsed preview — same grammar as expanded:
  [avatar]  name · time
            one-line body + fade
*/
.pw-tst-comments__preview {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--pw-dial-tst-teaser-gap, 10px);
  min-width: 0;
  width: 100%;
}

.pw-tst-comments__preview > .pw-tst-avatar {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  margin-top: 1px;
}

.pw-tst-comments__preview-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pw-tst-comments__teaser {
  position: relative;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  min-height: var(--pw-dial-tst-teaser-min-h, 28px);
  min-width: 0;
}

.pw-tst-comments__teaser-name {
  font-size: var(--pw-dial-tst-teaser-name-size, 14px);
  font-weight: 500;
  color: #fff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-tst-comments__teaser-time {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Exactly one line of comment text; L→R fade on collapsed grid only */
.pw-tst-comments__line-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.pw-tst-comments__line {
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: #d6d6d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.pw-tst-comments__line-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* Dial: start / mid / end % + color (defaults match body paper) */
  background: linear-gradient(
    to right,
    transparent 0%,
    transparent var(--pw-dial-tst-line-fade-start, 22%),
    color-mix(
      in srgb,
      var(--pw-dial-tst-line-fade-color, var(--pw-dial-tst-shell-body, #0e0e0e)) 50%,
      transparent
    )
      var(--pw-dial-tst-line-fade-mid, 58%),
    var(--pw-dial-tst-line-fade-color, var(--pw-dial-tst-shell-body, #0e0e0e))
      var(--pw-dial-tst-line-fade-end, 100%)
  );
}

/*
  Full thread — match dashboard CommentThread:
  flex gap-3 · avatar 36 · name text-sm semibold · time #6a6a6a
  bubble: rounded-xl bg #1a1a1a · NO border · px-3.5 py-2.5 · text #d6d6d6
*/
.pw-tst-thread {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px; /* gap-3 */
  width: 100%;
  min-width: 0;
}

.pw-tst-thread > .pw-tst-avatar {
  flex-shrink: 0;
  margin-top: 2px; /* mt-0.5 */
}

.pw-tst-thread__col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pw-tst-thread__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px; /* gap-x-2 gap-y-0.5 */
  margin-bottom: 4px; /* mb-1 */
  min-width: 0;
}

.pw-tst-thread__author {
  font-size: 0.875rem; /* text-sm */
  font-weight: 600;
  color: #fff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-tst-thread__time {
  flex-shrink: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #6a6a6a;
}

/* Dashboard: rounded-xl bg-[#1a1a1a] px-3.5 py-2.5 — no border / no inset ring
   Force dark fill so Webflow / UA never paints a light paper bubble. */
.pw-tst-thread__bubble {
  width: 100%;
  box-sizing: border-box;
  padding: var(--pw-dial-tst-bubble-pad-y, 10px) var(--pw-dial-tst-bubble-pad-x, 14px);
  border-radius: 12px;
  border: 0;
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  box-shadow: none;
  font-size: 0.875rem; /* text-sm */
  font-weight: 500;
  line-height: 1.625; /* leading-relaxed */
  color: #d6d6d6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pw-tst-thread__bubble .pw-tst-prose,
.pw-tst-thread__bubble .pw-tst-prose--plain {
  background: transparent !important;
  color: inherit;
  margin: 0;
}

/* Modal never shows collapsed line-fade */
.pw-tst-card--modal .pw-tst-comments__line-fade {
  display: none;
}

.pw-tst-thread__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px; /* mt-1.5 */
  font-size: 12px;
  color: #8a8a8a;
  user-select: none;
}

/* App: h-7 w-7 circle · transparent · icon perfectly centered */
.pw-tst-thread__react {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent !important;
  background-color: transparent !important;
  color: #8a8a8a;
  font-size: 0; /* kill glyph baseline drift from emoji fallback */
  line-height: 0;
  cursor: pointer;
  box-shadow: none;
  vertical-align: middle;
}

.pw-tst-thread__react-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  line-height: 0;
  flex-shrink: 0;
}

.pw-tst-thread__react-ico svg {
  display: block;
  width: 14px;
  height: 14px;
}

.pw-tst-thread__react:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #fff;
}

.pw-tst-thread__dot {
  opacity: 0.5;
}

/* EXPAND — absolute on the fade, bottom-centered */
.pw-tst-expand {
  position: absolute;
  left: 50%;
  bottom: var(--pw-dial-tst-expand-mt, 8px);
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: var(--pw-dial-tst-expand-pad-y, 6px) var(--pw-dial-tst-expand-pad-x, 12px);
  border: 0;
  background: transparent;
  color: var(--pw-dial-tst-expand-color, #ffffffbf);
  font-family: ui-monospace, "Geist Mono", "SF Mono", Menlo, monospace;
  font-size: var(--pw-dial-tst-expand-size, 13px);
  font-weight: 500;
  letter-spacing: var(--pw-dial-tst-expand-tracking, 0.08em);
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.15s ease;
}

.pw-tst-expand:hover,
.pw-tst-expand:focus-visible {
  color: #fff;
  outline: none;
}

/* ---- Modal ---- */
.pw-tst-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.pw-tst-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.pw-tst-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  max-height: min(94vh, 820px);
  outline: none;
  overflow: hidden;
  border-radius: 24px;
}

.pw-tst-modal__panel .pw-tst-card__shell {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

/*
  During shared-layout morph, force expand body to block-flow so
  flex reproject does not stack chips over the quote.
*/
.pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__body,
.pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__body--expand {
  display: block !important;
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__main {
  display: block !important;
  flex: none !important;
  height: auto !important;
  overflow: visible !important;
}

.pw-tst-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .pw-tst-card__shell {
    min-height: min(var(--pw-dial-tst-card-min-h, 520px), 24rem);
  }

  .pw-tst-head__title {
    max-width: none;
  }
}

/* ============================================================
   EXPAND-only demo comments (app-parity easter egg)
   Grid cards never render these nodes.
   ============================================================ */

.pw-tst-demo-comments {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.pw-tst-comments--demo {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pw-tst-demo-comments__thread-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

/* Attachments */
.pw-tst-attach {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.pw-tst-attach__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pw-tst-attach__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.pw-tst-attach__add {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #c8c8c8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pw-tst-attach__add:hover {
  color: #fff;
}

.pw-tst-attach__empty {
  margin: 0;
  font-size: 12px;
  color: #6a6a6a;
  line-height: 1.4;
}

.pw-tst-attach__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-tst-attach__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.pw-tst-attach__thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.pw-tst-attach__file-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.pw-tst-attach__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pw-tst-attach__name {
  font-size: 13px;
  font-weight: 500;
  color: #e6e6e6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-tst-attach__size {
  font-size: 11px;
  color: #6a6a6a;
  font-variant-numeric: tabular-nums;
}

.pw-tst-attach__remove {
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

.pw-tst-attach__remove:hover {
  color: #ff5a67;
}

/* Composer (CommentComposer parity) */
.pw-tst-composer {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161616;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.15s ease;
}

.pw-tst-composer:not(.is-expanded):hover {
  background: #1a1a1a;
}

.pw-tst-composer.is-expanded {
  border-color: rgba(255, 71, 1, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 71, 1, 0.12);
}

.pw-tst-composer__field {
  position: relative;
  min-height: 44px;
  cursor: text;
}

.pw-tst-composer__idle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.875rem;
  color: #8a8a8a;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-tst-composer__idle.has-draft {
  color: #e6e6e6;
}

.pw-tst-composer__editor-wrap {
  min-height: 0;
}

.pw-tst-composer__editor {
  outline: none;
  min-height: 88px;
  max-height: 240px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.625;
  color: #e6e6e6;
}

.pw-tst-composer__editor p {
  margin: 0 0 0.4em;
}

.pw-tst-composer__editor p:last-child {
  margin-bottom: 0;
}

.pw-tst-composer__editor .mention {
  display: inline;
  color: #ff4701;
  font-weight: 600;
  background: rgba(255, 71, 1, 0.12);
  border-radius: 4px;
  padding: 0 3px;
}

.pw-tst-composer__editor .pw-tst-link,
.pw-tst-prose a {
  color: #7eb6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pw-tst-composer__editor p.is-empty:first-child::before,
.pw-tst-composer__editor p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #6a6a6a;
  pointer-events: none;
  height: 0;
}

.pw-tst-composer__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pw-tst-composer__save {
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: #ff4701;
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
}

.pw-tst-composer__save:hover {
  filter: brightness(1.05);
}

.pw-tst-composer__discard {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #4f4c4c;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
}

.pw-tst-composer__discard:hover {
  background: #5c5959;
}

.pw-tst-composer__attach {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0.75;
}

.pw-tst-composer__attach:hover {
  opacity: 1;
}

.pw-tst-composer__watch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8a8a8a;
  cursor: pointer;
  user-select: none;
}

.pw-tst-composer__watch input {
  width: 14px;
  height: 14px;
  accent-color: #ff4701;
}

/* Toolbar */
.pw-tst-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 8px 10px 0;
}

.pw-tst-toolbar__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c8c8c8;
  font-size: 13px;
  font-weight: 600;
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  padding: 0 6px;
}

.pw-tst-toolbar__btn:hover,
.pw-tst-toolbar__btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pw-tst-toolbar__sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

.pw-tst-toolbar__pop {
  position: relative;
}

.pw-tst-toolbar__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  padding: 8px;
  border-radius: 12px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.pw-tst-toolbar__panel--link {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 220px;
}

.pw-tst-toolbar__link-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0e0e0e;
  color: #e6e6e6;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.pw-tst-toolbar__link-go {
  border: 0;
  border-radius: 6px;
  background: #ff4701;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}

.pw-tst-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  width: 240px;
}

.pw-tst-emoji-grid__btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.pw-tst-emoji-grid__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Thread extras */
.pw-tst-thread-face {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  margin-top: 2px;
}

.pw-tst-thread-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pw-tst-thread-face__fb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #ff4701;
}

.pw-tst-prose {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.625;
  color: #d6d6d6;
  overflow-wrap: anywhere;
}

.pw-tst-prose--plain {
  white-space: pre-wrap;
}

.pw-tst-prose p {
  margin: 0 0 0.4em;
}

.pw-tst-prose p:last-child {
  margin-bottom: 0;
}

.pw-tst-prose .mention {
  color: #ff4701;
  font-weight: 600;
  background: rgba(255, 71, 1, 0.12);
  border-radius: 4px;
  padding: 0 3px;
}

.pw-tst-prose ul,
.pw-tst-prose ol {
  margin: 0.35em 0;
  padding-left: 1.25em;
}

.pw-tst-thread__edit {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #6a6a6a;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  font-size: 13px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.pw-tst-thread:hover .pw-tst-thread__edit {
  opacity: 1;
}

.pw-tst-thread__edit:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.pw-tst-thread__edit-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-tst-thread__edit-area {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 12px;
  background: #201d1d;
  color: #e6e6e6;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 10px 12px;
  resize: vertical;
  min-height: 88px;
}

.pw-tst-thread__edit-actions {
  display: flex;
  gap: 8px;
}

.pw-tst-thread__reply,
.pw-tst-thread__delete {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent !important;
  background-color: transparent !important;
  font-size: 12px;
  color: #8a8a8a;
  cursor: pointer;
  padding: 0;
  text-underline-offset: 2px;
  box-shadow: none;
}

.pw-tst-thread__reply:hover {
  color: #fff;
  text-decoration: underline;
}

.pw-tst-thread__delete:hover,
.pw-tst-thread__delete.is-danger {
  color: #ff5a67;
  text-decoration: underline;
}

.pw-tst-react-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent !important;
  background-color: transparent !important;
  color: #c8c8c8;
  font-size: 13px;
  cursor: pointer;
  box-shadow: none;
}

.pw-tst-react-chip:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pw-tst-react-chip.is-mine {
  border-color: rgba(87, 155, 255, 0.5);
  background: rgba(87, 155, 255, 0.15);
}

.pw-tst-react-chip__n {
  font-size: 11px;
  color: #8a8a8a;
}

.pw-tst-react-pop {
  position: relative;
}

.pw-tst-react-pop__panel {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 20;
  padding: 8px;
  border-radius: 12px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* @mention menu */
.pw-tst-mention-menu {
  min-width: 220px;
  max-width: 280px;
  padding: 6px;
  border-radius: 12px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pw-tst-mention-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #e6e6e6;
}

.pw-tst-mention-menu__item:hover,
.pw-tst-mention-menu__item.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.pw-tst-mention-menu__av {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.pw-tst-mention-menu__av--fallback {
  display: grid;
  place-items: center;
  background: #ff4701;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.pw-tst-mention-menu__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.pw-tst-mention-menu__name {
  font-size: 13px;
  font-weight: 600;
}

.pw-tst-mention-menu__sub {
  font-size: 11px;
  color: #8a8a8a;
}

/* Modal body scrolls with taller comment island */
.pw-tst-card--modal .pw-tst-card__body {
  max-height: min(78vh, 640px);
}

.pw-tst-card--modal .pw-tst-card__main {
  overflow: visible;
}

/* ============================================================
   Dashboard paper RequestDetail (EXPAND only) — pixel parity
   Outer #1C1C1C · Inner #0E0E0E r24 · CommentComposer chrome
   ============================================================ */

.pw-rd {
  width: 100%;
  max-height: min(94vh, 820px);
  display: flex;
  flex-direction: column;
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
  color: #fff;
}

.pw-rd__outer {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: #1c1c1c;
  padding: 14px;
  border-radius: 24px;
  box-sizing: border-box;
}

.pw-rd__chrome {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 6px 14px;
  flex-shrink: 0;
}

.pw-rd__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #fff;
}

.pw-rd__chrome-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
}

.pw-rd__icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9a9a9a;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.pw-rd__icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.pw-rd__inner {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 24px;
  background: #0e0e0e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 20px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.pw-rd__loading-text {
  margin: 0;
  color: #8a8a8a;
  font-size: 13px;
}

/* Status / people chips */
.pw-rd__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.pw-rd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 500;
  color: #e6e6e6;
  white-space: nowrap;
}

.pw-rd-chip--status {
  gap: 8px;
}

.pw-rd-chip--mini {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  vertical-align: middle;
}

.pw-rd-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #6a6a6a;
  flex-shrink: 0;
}

.pw-rd-chip__dot--normal {
  background: #8b8bff;
}

.pw-rd-face {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pw-rd-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pw-rd-face__fb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  background: #ff4701;
  color: #fff;
}

/* Meta fields */
.pw-rd__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pw-rd__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #9a9a9a;
}

.pw-rd__control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #080808;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 500;
  color: #e6e6e6;
}

.pw-rd__control-ico {
  color: #ff4701;
  font-size: 12px;
}

.pw-rd__control-caret {
  margin-left: auto;
  color: #6a6a6a;
  font-size: 12px;
}

/* Brief */
.pw-rd__brief {
  margin-top: 16px;
}

.pw-rd__brief-label {
  margin-bottom: 6px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.pw-rd__brief-box {
  border-radius: 12px;
  background: #080808;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  min-height: 120px;
  box-sizing: border-box;
}

.pw-rd__brief-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: #e6e6e6;
  letter-spacing: -0.01em;
}

/* Attachments */
.pw-rd__attach {
  margin-top: 16px;
}

.pw-rd__attach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pw-rd__attach-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

.pw-rd__muted-ico {
  color: #9a9a9a;
}

.pw-rd__count {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #9a9a9a;
}

.pw-rd__add {
  appearance: none;
  height: 32px;
  border-radius: 8px;
  border: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pw-rd__add:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pw-rd__attach-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pw-rd__attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #161616;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.pw-rd__thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.pw-rd__file-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.pw-rd__attach-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pw-rd__attach-name {
  font-size: 13px;
  font-weight: 500;
  color: #e6e6e6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-rd__attach-size {
  font-size: 11px;
  color: #6a6a6a;
  font-variant-numeric: tabular-nums;
}

.pw-rd__attach-x {
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}

.pw-rd__attach-x:hover {
  color: #ff5a67;
}

/* Comments section */
.pw-rd__comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pw-rd__comments-head {
  margin-bottom: 12px;
}

.pw-rd__comments-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.pw-rd__thread-wrap {
  margin-top: 32px; /* className mb-8 on composer → 2rem gap before thread */
}

/* Composer — exact dashboard tokens */
.pw-rd-composer {
  width: 100%;
  overflow: hidden;
  border-radius: 12px; /* rounded-xl */
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161616;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.15s ease;
  box-sizing: border-box;
}

.pw-rd-composer:not(.is-expanded):hover {
  background: #1a1a1a;
}

.pw-rd-composer.is-expanded {
  border-color: rgba(255, 71, 1, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 71, 1, 0.12);
}

.pw-rd-composer__field {
  position: relative;
  min-height: 42px;
}

.pw-rd-composer__field.is-idle {
  cursor: text;
  outline: none;
}

/* Collapsed-only label (not in the TipTap doc). Expanded uses CSS placeholder. */
.pw-rd-composer__idle {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 14px; /* px-3.5 */
  font-size: 0.875rem;
  color: #9a9a9a;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw-rd-composer__idle.has-draft {
  color: #ffffff;
}

/*
  App pattern: editor always in the tree.
  Collapsed → clip to 42px. Expanded → full min-height + TipTap placeholder.
*/
.pw-rd-composer__editor-wrap {
  position: relative;
  overflow: hidden;
}

.pw-rd-composer:not(.is-expanded) .pw-rd-composer__editor-wrap {
  max-height: 42px;
  min-height: 42px;
  opacity: 0;
  pointer-events: none;
}

.pw-rd-composer:not(.is-expanded) .pw-rd-composer__editor-wrap .ProseMirror,
.pw-rd-composer:not(.is-expanded) .pw-rd-composer__editor-wrap .pw-rd-editor {
  min-height: 42px !important;
  max-height: 42px !important;
  overflow: hidden !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.pw-rd-composer.is-expanded .pw-rd-composer__editor-wrap,
.pw-rd-composer__editor-wrap.is-open {
  max-height: none;
  min-height: 0;
  opacity: 1;
  pointer-events: auto;
}

.pw-rd-composer.is-expanded .pw-rd-composer__editor-wrap .ProseMirror,
.pw-rd-composer.is-expanded .pw-rd-composer__editor-wrap .pw-rd-editor {
  min-height: 88px;
  max-height: 240px;
  color: #ffffff !important;
}

.pw-rd-editor,
.pw-rd-composer .ProseMirror {
  outline: none;
  min-height: 88px;
  max-height: 240px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.625;
  /* Typed comment text — white (app parity; never muted gray) */
  color: #ffffff !important;
  caret-color: #ffffff;
}

.pw-rd-editor p,
.pw-rd-composer .ProseMirror p {
  margin: 0 0 0.35em;
  color: inherit;
}

.pw-rd-editor p:last-child,
.pw-rd-composer .ProseMirror p:last-child {
  margin-bottom: 0;
}

/*
  TipTap Placeholder decoration only (dashboard globals.css).
  NEVER real document text — class is is-editor-empty on empty first p.
*/
.pw-rd-editor p.is-editor-empty:first-child::before,
.pw-rd-composer .ProseMirror p.is-editor-empty:first-child::before,
.pw-rd-editor p.is-empty:first-child::before,
.pw-rd-composer .ProseMirror p.is-empty:first-child::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0 auto auto 0;
  max-width: 100%;
  color: #9a9a9a;
  pointer-events: none;
  white-space: pre-wrap;
  opacity: 0.85;
}

.pw-rd-editor p.is-editor-empty:first-child,
.pw-rd-composer .ProseMirror p.is-editor-empty:first-child,
.pw-rd-editor p.is-empty:first-child,
.pw-rd-composer .ProseMirror p.is-empty:first-child {
  position: relative;
}

.pw-rd-editor .mention,
.pw-rd-composer .mention {
  color: #ff4701;
  font-weight: 600;
  background: rgba(255, 71, 1, 0.12);
  border-radius: 4px;
  padding: 0 3px;
}

.pw-rd-link {
  color: #7eb6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pw-rd-composer__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px; /* gap-2.5 */
  padding: 10px 12px; /* py-2.5 px-3 */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Button primary square · secondary pill (dashboard beUI) */
.pw-rd-btn-primary {
  appearance: none;
  border: 0;
  border-radius: 0; /* square */
  background: #ff4701;
  color: #080808;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.pw-rd-btn-primary:hover {
  filter: brightness(1.1);
}

.pw-rd-btn-primary--sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.pw-rd-btn-secondary {
  appearance: none;
  border: 0;
  border-radius: 24px; /* pill */
  background: #4f4c4c;
  color: #f4f4f4;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.pw-rd-btn-secondary:hover {
  filter: brightness(1.1);
}

.pw-rd-composer__clip {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
  opacity: 0.7;
  padding: 4px;
}

.pw-rd-composer__clip:hover {
  opacity: 1;
}

.pw-rd-composer__watch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9a9a9a;
  cursor: pointer;
  user-select: none;
}

.pw-rd-composer__watch input {
  width: 14px;
  height: 14px;
  accent-color: #ff4701;
}

/* Toolbar */
.pw-rd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pw-rd-tool {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c8c8c8;
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 6px;
  cursor: pointer;
}

.pw-rd-tool:hover,
.pw-rd-tool.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pw-rd-tool__b {
  font-size: 13px;
  font-weight: 600;
}

.pw-rd-tool__i {
  font-size: 13px;
  font-style: italic;
}

.pw-rd-tool__caret {
  font-size: 9px;
  opacity: 0.6;
}

.pw-rd-tool-pop {
  position: relative;
}

.pw-rd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 160px;
  padding: 4px;
  border-radius: 12px;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pw-rd-menu--emoji {
  padding: 8px;
  min-width: 0;
}

.pw-rd-menu--link {
  flex-direction: row;
  align-items: center;
  min-width: 240px;
  gap: 6px;
  padding: 8px;
}

.pw-rd-menu__item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  color: #e6e6e6;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.pw-rd-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pw-rd-menu__input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: #080808;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #e6e6e6;
  font-size: 12px;
  padding: 6px 8px;
}

/* System activity */
.pw-rd__activity {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;
  padding-top: 4px;
}

.pw-rd__activity-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8a8a8a;
}

.pw-rd__activity-text strong {
  font-weight: 600;
  color: #c8c8c8;
}

.pw-rd__activity-time {
  flex-shrink: 0;
  font-size: 11px;
  color: #555;
  font-variant-numeric: tabular-nums;
}

.pw-rd__footer-hint {
  display: none;
}

@media (max-width: 520px) {
  .pw-rd__meta {
    grid-template-columns: 1fr;
  }
  .pw-rd__outer {
    padding: 12px;
  }
  .pw-rd__inner {
    padding: 16px;
  }
  .pw-rd__title {
    font-size: 17px;
  }
}

/* ---- EXPAND: original card shell + interactive comments ----
   Body is the only scrollport. Everything stays in normal block flow while
   the outer shell performs the shared-layout morph.
*/
.pw-tst-card--expand {
  height: auto !important;
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
}

.pw-tst-card--expand .pw-tst-card__shell {
  height: auto !important;
  max-height: inherit;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pw-tst-card--expand .pw-tst-card__header {
  flex: 0 0 auto;
}

.pw-tst-card--expand .pw-tst-card__body,
.pw-tst-card--expand .pw-tst-card__body--expand {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: block !important;
  padding-bottom: 20px !important;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 22px,
    #000 calc(100% - 34px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 22px,
    #000 calc(100% - 34px),
    transparent 100%
  );
}

.pw-tst-card--expand .pw-tst-card__main {
  display: block !important;
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  position: relative;
}

/* Force vertical stack — no absolute / no flex-crush */
.pw-tst-card--expand .pw-tst-quote,
.pw-tst-card--expand .pw-tst-chips,
.pw-tst-card--expand .pw-rd__comments--in-card,
.pw-tst-card--expand .pw-rd-composer,
.pw-tst-card--expand .pw-rd__thread-wrap,
.pw-tst-card--expand .pw-rd__activity {
  position: static !important;
  float: none !important;
  transform: none !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  flex: none !important;
  overflow: visible !important;
  z-index: auto !important;
  box-sizing: border-box;
}

.pw-tst-card--expand .pw-tst-quote {
  display: block !important;
  margin: 0 0 16px !important;
}

.pw-tst-card--expand .pw-tst-quote__text {
  position: static !important;
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

.pw-tst-card--expand .pw-tst-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  margin: 0 0 4px !important;
}

.pw-rd__attach--in-card {
  margin-top: 18px;
}

.pw-rd__comments--in-card {
  display: block !important;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.pw-rd__comments--in-card .pw-rd__comments-title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

/* Composer grows in flow; overflow hidden only for spring children */
.pw-tst-card--expand .pw-rd-composer {
  display: block !important;
  overflow: hidden !important;
  margin-top: 0;
}

.pw-rd-chip--testimonials {
  gap: 5px;
  color: #e6e6e6;
}

.pw-rd-chip__star {
  color: #ff4701;
  flex-shrink: 0;
}

/* Composer anim wrapper (height spring) — app CommentComposer pattern */
.pw-rd-composer__anim {
  overflow: hidden;
  position: relative;
  flex: none;
}

.pw-rd-composer {
  will-change: border-color, box-shadow;
}

.pw-rd-composer.is-expanded .pw-rd-composer__field {
  min-height: 0;
  cursor: text;
}

/* Activity: 20px bottom · no timestamp */
.pw-tst-card--expand .pw-rd__activity {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 20px !important;
  padding-top: 4px;
}

.pw-tst-card--expand .pw-rd__activity-time {
  display: none !important;
}

/* Rich emoji picker */
.pw-rd-emoji {
  width: 280px;
  max-width: min(280px, 80vw);
  padding: 4px;
}

.pw-rd-emoji__label {
  margin: 6px 4px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.pw-rd-emoji__grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.pw-rd-emoji__grid--scroll {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 0;
}

.pw-rd-emoji__btn {
  appearance: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.pw-rd-emoji__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pw-rd-menu--emoji {
  padding: 8px;
  min-width: 0;
  width: auto;
}

/* Expanded testimonial: the body is the sole scrollport. */
.pw-tst-card--expand .pw-tst-card__foot,
.pw-tst-card--expand .pw-tst-card__fade,
.pw-tst-card--expand .pw-tst-comments__line-fade {
  display: none !important;
}

.pw-tst-modal__panel {
  height: auto;
  max-height: min(90dvh, 820px);
}

.pw-tst-modal__panel .pw-tst-card--expand,
.pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__shell {
  width: 100%;
  height: auto !important;
  min-height: 0;
  max-height: min(90dvh, 820px) !important;
  overflow: hidden;
}

.pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__body,
.pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__body--expand {
  display: block !important;
  flex: 0 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(min(90dvh, 820px) - 76px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

@media (max-width: 991px) {
  .pw-tst-head__title {
    max-width: var(--pw-dial-tst-intro-heading-max, 27.6rem);
    font-size: clamp(1.65rem, 6.75vw, 2.25rem);
  }

  .pw-tst-head__title .pw-tst-head__line {
    display: block !important;
    white-space: nowrap;
  }

  .pw-tst-modal {
    padding: 8px;
  }

  .pw-tst-modal__panel {
    height: auto;
    max-height: calc(100dvh - 16px);
  }

  .pw-tst-modal__panel .pw-tst-card--expand,
  .pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__shell {
    max-height: calc(100dvh - 16px) !important;
  }

  .pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__body,
  .pw-tst-modal__panel .pw-tst-card--expand .pw-tst-card__body--expand {
    max-height: calc(100dvh - 92px) !important;
  }

  /* Sixteen pixels prevents Safari from zooming when the editor is tapped. */
  .pw-rd-editor,
  .pw-rd-composer .ProseMirror {
    font-size: 16px;
  }
}
