/* Ready result page styles copied from the pre-redesign Profile AI result UI. */
.audience-content-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 12px;
}

.audience-content-plan-table {
  display: grid;
  gap: 10px;
}

.audience-content-plan-head,
.audience-content-plan-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(320px, 1.35fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.audience-content-plan-head {
  padding: 0 16px;
  color: #6753f5;
  font-size: 12px;
  line-height: 16px;
  font-weight: 850;
  text-transform: uppercase;
}

.audience-content-plan-row {
  min-width: 0;
  padding: 16px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%);
}

.audience-content-plan-segment {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-weight: 800;
}

.audience-content-plan-main,
.audience-content-plan-more {
  min-width: 0;
}

.audience-content-plan-main h5 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 18px;
  line-height: 25px;
  font-weight: 750;
}

.audience-content-plan-main em {
  display: block;
  color: #5f667a;
  font-size: 14px;
  line-height: 20px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.audience-content-plan-main em b {
  display: block;
  margin-bottom: 3px;
  color: #6753f5;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}

.audience-content-plan-extra {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience-content-plan-extra li {
  position: relative;
  padding-left: 16px;
  color: #303444;
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.audience-content-plan-extra li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6753f5;
}

.audience-content-report-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.audience-content-report-kicker span,
.audience-content-report-audience-code {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0edff;
  color: #6753f5;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.audience-content-plan-note {
  max-width: 720px;
  margin: 0 0 12px;
  color: #5f667a;
  font-size: 14px;
  line-height: 20px;
}

.audience-content-actions {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #ebe8fb;
}

.audience-content-actions .audience-overview-title {
  margin-bottom: 10px;
}

.audience-content-report-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%);
}

.audience-content-report-grid h5 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
  line-height: 24px;
  font-weight: 750;
}

.audience-content-report-grid p {
  margin: 0 0 10px;
  color: #5f667a;
  font-size: 14px;
  line-height: 20px;
}

.audience-content-report-grid em,
.audience-content-report-grid small {
  display: block;
  color: #6b7280;
  font-size: 13px;
  line-height: 18px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.audience-content-report-grid em {
  padding-top: 10px;
  border-top: 1px solid #f0edff;
  color: #4f5668;
  font-weight: 650;
}

.audience-content-report-grid em b {
  display: block;
  margin-bottom: 4px;
  color: #6753f5;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}

.audience-content-report-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  color: #6f7485;
  font-weight: 700;
}

.audience-content-report-grid small {
  margin-top: 8px;
}

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

.audience-anti-list article {
  position: relative;
  min-width: 0;
  padding: 12px 14px 12px 34px;
  border: 1px solid #f0e5d8;
  border-radius: 8px;
  background: #fffaf5;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.audience-anti-list article::before {
  content: "!";
  position: absolute;
  left: 12px;
  top: 12px;
  color: #b45309;
  font-weight: 800;
}

.audience-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
  min-width: 0;
}

.audience-overview-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e4e1f5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(44, 38, 84, 0.055);
}


.audience-overview-card--summary,
.audience-overview-card--opportunity-map,
.audience-overview-card--segments,
.audience-overview-card--groups,
.audience-overview-card--differences,
.audience-overview-card--priorities,
.audience-overview-card--checks,
.audience-overview-card--matrix,
.audience-overview-card--silicon,
.audience-overview-card--roles,
.audience-overview-card--content-report,
.audience-overview-card--do-not-mix {
  grid-column: 1 / -1;
}

.audience-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.audience-overview-head span {
  display: inline-flex;
  margin-bottom: 5px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.audience-overview-head h3,
.audience-overview-title h3 {
  margin: 0;
  color: #111421;
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
}

.audience-overview-head em {
  align-self: flex-start;
  color: #656a7a;
  font-size: 12px;
  line-height: 17px;
  font-style: normal;
}

.audience-overview-card--summary > p {
  max-width: 1120px;
  margin: 0 0 14px;
  color: #303444;
  font-size: 16px;
  line-height: 25px;
}

.audience-executive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.audience-executive-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e6e2fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbfaff 0%, #ffffff 100%);
}

.audience-executive-grid > article > span {
  display: inline-flex;
  margin-bottom: 7px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.audience-executive-grid h4 .audience-segment-ref {
  text-transform: none;
}

.audience-executive-grid h4 .audience-segment-ref__label,
.audience-executive-grid h4 .audience-executive-title-text {
  overflow-wrap: break-word;
  word-break: normal;
}

.audience-executive-grid h4 {
  margin: 0 0 8px;
  color: #111421;
  font-size: 17px;
  line-height: 23px;
  font-weight: 900;
}

.audience-executive-grid p {
  margin: 0;
  color: #303444;
  font-size: 14px;
  line-height: 21px;
}

.audience-executive-grid small {
  display: block;
  margin-top: 10px;
  color: #656a7a;
  font-size: 13px;
  line-height: 18px;
}

.audience-overview-group-cards,
.audience-overview-priority-grid,
.audience-overview-difference-list,
.audience-overview-mix-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audience-overview-group-cards article,
.audience-overview-priority-grid article,
.audience-overview-difference-list article,
.audience-overview-mix-list article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e6e2fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-overview-group-cards article {
  border-color: var(--segment-color, #e6e2fb);
  background: linear-gradient(135deg, var(--segment-soft, #f7f4ff) 0%, #ffffff 100%);
}

.audience-overview-group-cards h4,
.audience-overview-mix-list strong {
  margin: 0 0 8px;
  color: #111421;
  font-size: 15px;
  line-height: 21px;
  font-weight: 900;
}

.audience-overview-group-cards p,
.audience-overview-priority-grid p,
.audience-overview-difference-list article,
.audience-overview-mix-list p {
  margin: 0;
  color: #303444;
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}

.audience-overview-priority-grid span {
  display: inline-flex;
  margin-bottom: 8px;
}

.audience-overview-title--compact {
  margin: 4px 0 10px;
}

.audience-overview-title--compact h3 {
  font-size: 17px;
  line-height: 23px;
}

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

.audience-overview-findings article,
.audience-segment-action-table article,
.audience-overview-checks article,
.audience-overview-roles article {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #fbfaff;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.audience-overview-title {
  margin-bottom: 10px;
}

.audience-overview-title p {
  max-width: 620px;
  margin: 5px 0 0;
  color: #656a7a;
  font-size: 13px;
  line-height: 19px;
}

.audience-segment-map {
  position: relative;
  height: 360px;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #ded8fb calc(50% - 1px), #ded8fb calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent calc(50% - 1px), #ded8fb calc(50% - 1px), #ded8fb calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(#f0eef9 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, #f0eef9 1px, transparent 1px) 0 0 / 25% 100%,
    #fbfaff;
}

.audience-segment-map-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.audience-segment-map-guide span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f2ff;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 850;
}

.audience-segment-map .axis-x,
.audience-segment-map .axis-y {
  position: absolute;
  z-index: 1;
  color: #656a7a;
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.audience-segment-map .axis-x {
  right: 12px;
  bottom: 10px;
}

.audience-segment-map .axis-y {
  top: 12px;
  left: 12px;
}

.audience-segment-map .axis-origin {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  color: #8b8fa1;
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.audience-segment-map article {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
  justify-items: center;
  width: 68px;
  min-width: 0;
  min-height: 54px;
  padding: 7px 8px;
  border: 1px solid var(--segment-soft, #ebe8fb);
  border-left: 4px solid var(--segment-color, #5f4ce3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #202331;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 30px rgba(30, 24, 80, 0.12);
  z-index: 2;
}

.audience-segment-map article b {
  display: inline-flex;
  justify-content: center;
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--segment-color, #5f4ce3);
  color: #ffffff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.audience-segment-map article strong {
  min-width: 0;
  color: #111421;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.audience-segment-map article span {
  color: var(--segment-color, #5f4ce3);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.audience-segment-map article .audience-segment-ref {
  color: var(--segment-color, #5f4ce3);
  font-size: inherit;
  line-height: inherit;
}

.audience-segment-map article .audience-segment-ref__code,
.audience-segment-map-legend .audience-segment-ref__code {
  min-width: 30px;
  padding: 2px 7px;
  background: var(--segment-color, #5f4ce3);
  color: #ffffff;
  font-size: 11px;
  line-height: 14px;
}

.audience-segment-map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.audience-segment-map-legend article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--segment-soft, #ebe8fb);
  border-left: 4px solid var(--segment-color, #5f4ce3);
  border-radius: 8px;
  background: #ffffff;
}

.audience-segment-map-legend b {
  display: inline-flex;
  justify-content: center;
  min-width: 30px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--segment-color, #5f4ce3);
  color: #ffffff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.audience-segment-map-legend strong {
  min-width: 0;
  color: #111421;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audience-segment-map-legend span,
.audience-segment-map-legend small {
  grid-column: 2;
  min-width: 0;
  color: #656a7a;
  font-size: 12px;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.audience-segment-map-legend span {
  color: var(--segment-color, #5f4ce3);
  font-weight: 850;
}

.audience-segment-map-legend .audience-segment-ref {
  grid-column: 1;
  color: var(--segment-color, #5f4ce3);
  font-size: inherit;
  line-height: inherit;
}

.audience-segment-map-legend .audience-segment-ref__code {
  grid-column: auto;
  margin-bottom: 0;
}

.audience-segment-map-note {
  max-width: 860px;
  margin: 10px 0 0;
  color: #656a7a;
  font-size: 13px;
  line-height: 19px;
}

.audience-segment-action-table,
.audience-overview-checks,
.audience-overview-roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audience-segment-action-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow: visible;
}

.audience-action-head {
  display: none;
}

.audience-action-head span {
  padding: 0 10px 8px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.audience-segment-action-table article {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.1fr);
  gap: 8px 12px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #ebe8fb;
  background: #ffffff;
  border-radius: 8px;
}

.audience-segment-action-table article > * {
  min-width: 0;
  padding: 0;
}

.audience-segment-action-table em {
  color: #656a7a;
  font-size: 13px;
  line-height: 19px;
  font-style: normal;
}

.audience-segment-action-table strong,
.audience-overview-checks strong,
.audience-overview-roles strong,
.audience-strategy-matrix article strong {
  display: block;
  margin-bottom: 6px;
  color: #202331;
  font-size: 14px;
  line-height: 19px;
  font-weight: 800;
}

.audience-segment-action-table strong b,
.audience-strategy-matrix article strong b,
.audience-overview-checks span b,
.audience-mix-risks strong b {
  display: inline-flex;
  justify-content: center;
  min-width: 32px;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--segment-soft, #f0edff);
  color: var(--segment-color, #5f4ce3);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-segment-ref {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
  color: #202331;
  text-decoration: none;
  vertical-align: middle;
  cursor: help;
  outline: none;
}

.audience-segment-ref:focus-visible .audience-segment-ref__code {
  box-shadow: 0 0 0 3px rgba(95, 76, 227, 0.18);
}

.audience-segment-ref__code {
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  min-width: 32px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--segment-soft, #f0edff);
  color: var(--segment-color, #5f4ce3);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-segment-ref__label {
  min-width: 0;
  color: inherit;
  overflow-wrap: break-word;
  word-break: normal;
}

.audience-segment-ref--compact {
  gap: 6px;
}

.audience-segment-ref--compact .audience-segment-ref__code {
  min-width: 30px;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 14px;
}

.audience-segment-ref--code-only {
  gap: 0;
}

.audience-segment-ref--map {
  justify-content: center;
}

.audience-segment-action-table .audience-segment-ref,
.audience-overview-checks .audience-segment-ref,
.audience-strategy-matrix .audience-segment-ref,
.audience-similar-pair .audience-segment-ref {
  margin-bottom: 0;
}

.audience-segment-pair-ref {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.audience-segment-pair-ref__plus {
  color: #8b8fa1;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
}

.audience-executive-title-text {
  display: block;
  margin-top: 6px;
  text-transform: none;
}

.audience-segment-popover {
  position: fixed;
  z-index: 12000;
  width: min(520px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #202331;
  box-shadow: 0 18px 44px rgba(30, 24, 80, 0.18);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.audience-segment-popover.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.audience-segment-popover.is-above {
  transform: translateY(-8px) scale(0.98);
  transform-origin: bottom center;
}

.audience-segment-popover.is-visible.is-above {
  transform: translateY(0) scale(1);
}

.audience-segment-popover[hidden] {
  display: none;
}

.audience-segment-popover__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.audience-segment-popover__head > span {
  display: inline-flex;
  justify-content: center;
  min-width: 38px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--segment-soft, #f0edff);
  color: var(--segment-color, #5f4ce3);
  font-size: 13px;
  line-height: 17px;
  font-weight: 950;
}

.audience-segment-popover small {
  display: block;
  margin-bottom: 3px;
  color: #656a7a;
  font-size: 11px;
  line-height: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.audience-segment-popover h4,
.audience-segment-popover p,
.audience-segment-popover dl,
.audience-segment-popover dd {
  margin: 0;
}

.audience-segment-popover h4 {
  color: #111421;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audience-segment-popover p {
  margin-bottom: 10px;
  color: #4f5465;
  font-size: 13px;
  line-height: 18px;
}

.audience-segment-popover dl {
  display: grid;
  gap: 8px;
}

.audience-segment-popover dt {
  margin-bottom: 2px;
  color: var(--segment-color, #5f4ce3);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.audience-segment-popover dd {
  color: #202331;
  font-size: 12px;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.audience-segment-popover-card {
  min-height: 0;
  height: auto;
  padding: 18px;
  border-color: rgba(95, 76, 227, 0.16);
  border-radius: 18px;
  box-shadow: none;
}

.audience-segment-popover-card:hover {
  transform: none;
}

.audience-segment-popover-card .card-header {
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 14px;
}

.audience-segment-popover-card .card-img {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
}

.audience-segment-popover-card .card-header-title {
  font-size: 18px;
  line-height: 24px;
}

.audience-segment-popover-card .card-header-info p {
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 18px;
}

.audience-segment-popover-card .card-status {
  color: var(--segment-color, var(--accent));
  font-size: 18px;
  line-height: 24px;
  white-space: nowrap;
}

.audience-segment-popover-card .info-like {
  gap: 8px;
}

.audience-segment-popover-card .info-like > span {
  font-size: 13px;
  line-height: 18px;
}

.audience-segment-popover-card .tag {
  background: #ffffff;
  max-width: 100%;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.audience-segment-popover-card .cluster-card-actions {
  margin-top: 14px;
  gap: 10px;
}

.audience-segment-popover-card .cluster-card-actions > button {
  flex: 1 1 0;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 18px;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .audience-segment-popover {
    width: calc(100vw - 20px);
  }

  .audience-segment-popover-card {
    padding: 16px;
  }

  .audience-segment-popover-card .card-header {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .audience-segment-popover-card .card-img {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .audience-segment-popover-card .card-status {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 20px;
    line-height: 26px;
    text-align: left;
  }

  .audience-segment-popover-card .card-header-title {
    font-size: 18px;
    line-height: 24px;
  }
}

.audience-segment-action-table span,
.audience-overview-checks span {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.audience-segment-action-table .audience-segment-ref__code,
.audience-overview-checks .audience-segment-ref__code,
.audience-strategy-matrix .audience-segment-ref__code,
.audience-similar-pair .audience-segment-ref__code {
  margin-bottom: 0;
  color: var(--segment-color, #5f4ce3);
  font-size: 12px;
  line-height: 16px;
}

.audience-segment-action-table .audience-segment-ref,
.audience-overview-checks .audience-segment-ref,
.audience-strategy-matrix .audience-segment-ref,
.audience-similar-pair .audience-segment-ref {
  margin-bottom: 0;
  color: inherit;
}

.audience-segment-action-table .audience-segment-ref__label,
.audience-overview-checks .audience-segment-ref__label,
.audience-strategy-matrix .audience-segment-ref__label,
.audience-similar-pair .audience-segment-ref__label {
  display: inline;
  margin-bottom: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.audience-segment-action-table p,
.audience-overview-checks p {
  margin: 0;
}

.audience-silicon-note {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #e6e2fb;
  border-radius: 8px;
  background: #fbfaff;
}

.audience-silicon-note strong {
  display: block;
  margin-bottom: 5px;
  color: #111421;
  font-size: 14px;
  line-height: 19px;
  font-weight: 900;
}

.audience-silicon-note p {
  max-width: 1040px;
  margin: 0;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
}

.audience-silicon-note small {
  display: block;
  margin-top: 5px;
  color: #656a7a;
  font-size: 12px;
  line-height: 17px;
}

.audience-silicon-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.audience-silicon-dashboard article {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7f4ff 100%);
}

.audience-silicon-dashboard span {
  display: block;
  margin-bottom: 5px;
  color: #5f4ce3;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.audience-silicon-dashboard strong {
  display: block;
  min-height: 38px;
  color: #111421;
  font-size: 15px;
  line-height: 19px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audience-silicon-dashboard b {
  display: inline-flex;
  margin-top: 8px;
  color: #18a999;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
}

.audience-silicon-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.audience-silicon-actions article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e6e2fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-silicon-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #5f4ce3;
  color: #ffffff;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
}

.audience-silicon-actions strong {
  display: block;
  margin-bottom: 5px;
  color: #111421;
  font-size: 14px;
  line-height: 19px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audience-silicon-actions p {
  margin: 0;
  color: #303444;
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.audience-silicon-bars {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-silicon-bars article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px 10px;
  align-items: center;
  padding: 2px 0;
}

.audience-silicon-bars span {
  grid-column: 1 / -1;
  min-width: 0;
  color: #202331;
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.audience-silicon-bars div {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeafc;
}

.audience-silicon-bars i {
  display: block;
  width: var(--score, 60%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18a999 0%, #5f4ce3 100%);
}

.audience-silicon-bars b {
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  text-align: right;
}

.audience-silicon-priorities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.audience-silicon-priorities article {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-silicon-priorities span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0edff;
  color: #5f4ce3;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.audience-silicon-priorities strong {
  display: block;
  margin-bottom: 6px;
  color: #111421;
  font-size: 14px;
  line-height: 19px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audience-silicon-priorities p {
  margin: 0;
  color: #303444;
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.audience-silicon-priorities b {
  display: inline-flex;
  margin-top: 8px;
  color: #18a999;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-silicon-context {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #fbfaff;
}

.audience-silicon-context > strong {
  display: block;
  margin-bottom: 10px;
  color: #111421;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}

.audience-silicon-context > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.audience-silicon-context article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-silicon-context h4 {
  margin: 0 0 6px;
  color: #111421;
  font-size: 14px;
  line-height: 19px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.audience-silicon-context span {
  display: block;
  margin-bottom: 6px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.audience-silicon-context p {
  margin: 0;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.audience-silicon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 10px;
}

.audience-silicon-column {
  min-width: 0;
}

.audience-silicon-column > h4 {
  margin: 0 0 8px;
  color: #111421;
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.audience-silicon-tests,
.audience-silicon-interests {
  display: grid;
  gap: 12px;
}

.audience-insight-card--hidden-interests .audience-silicon-interests {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-silicon-tests article,
.audience-silicon-interests article {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%);
  overflow-wrap: anywhere;
}

.audience-silicon-tests article > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.audience-silicon-tests article > div:first-child b {
  display: inline-flex;
  justify-content: center;
  min-width: 36px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #5f4ce3;
  color: #ffffff;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-silicon-tests article > div:first-child span,
.audience-silicon-interests article > span {
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-silicon-tests h5,
.audience-silicon-interests h5 {
  margin: 0 0 7px;
  color: #111421;
  font-size: 15px;
  line-height: 21px;
  font-weight: 900;
}

.audience-silicon-tests p,
.audience-silicon-interests p {
  margin: 0 0 6px;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
}

.audience-silicon-tests p strong,
.audience-silicon-interests p strong {
  color: #111421;
  font-weight: 900;
}

.audience-silicon-tests em,
.audience-silicon-interests em {
  display: block;
  margin-top: 6px;
  color: #202331;
  font-size: 13px;
  line-height: 19px;
  font-style: normal;
  font-weight: 800;
}

.audience-silicon-interests article > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0;
}

.audience-silicon-interests article > div b {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f0edff;
  color: #5f4ce3;
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.audience-silicon-tests small {
  display: block;
  margin-top: 7px;
  color: #656a7a;
  font-size: 12px;
  line-height: 16px;
}

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

.audience-silicon-meter span {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeafc;
}

.audience-silicon-meter span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--score, 60%);
  border-radius: inherit;
  background: linear-gradient(90deg, #18a999 0%, #5f4ce3 100%);
}

.audience-silicon-meter b {
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-strategy-matrix {
  max-width: 100%;
  overflow-x: auto;
}

.audience-strategy-head,
.audience-strategy-matrix article {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(5, minmax(110px, 1fr));
  gap: 8px;
  min-width: 760px;
}

.audience-strategy-head span {
  padding: 0 8px 8px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.audience-strategy-matrix article {
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #f0eef9;
}

.audience-strategy-matrix article strong {
  min-width: 0;
  padding: 0 8px;
  overflow-wrap: anywhere;
}

.audience-strategy-matrix article span {
  display: inline-flex;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 999px;
  background: #f4f2ff;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.audience-strategy-matrix article span.is-strong {
  background: #5f4ce3;
  color: #ffffff;
}

.audience-strategy-matrix article span.is-low {
  background: #f3f4f6;
  color: #6b7280;
}

.audience-overview-roles ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.audience-overview-roles li {
  color: #303444;
  font-size: 13px;
  line-height: 19px;
}

.audience-mix-risks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.audience-mix-risks article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #fbfaff;
}

.audience-mix-risks article > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.audience-mix-risks strong {
  display: inline-flex;
  align-items: center;
  color: #202331;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.audience-mix-risks article > div > span {
  color: #8b8fa1;
  font-weight: 800;
}

.audience-mix-risks p {
  margin: 0;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
}

.audience-mix-risks em {
  display: block;
  margin-top: 8px;
  color: #656a7a;
  font-size: 12px;
  line-height: 16px;
  font-style: normal;
  font-weight: 800;
}

.audience-similar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 8px;
}

.audience-similar-list article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbfaff 0%, #ffffff 100%);
}

.audience-similar-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.audience-similar-pair strong {
  display: inline-flex;
  align-items: center;
  color: #202331;
  font-size: 13px;
  line-height: 18px;
  font-weight: 900;
}

.audience-similar-pair strong b {
  display: inline-flex;
  justify-content: center;
  min-width: 32px;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--segment-soft, #f0edff);
  color: var(--segment-color, #5f4ce3);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-similar-pair > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f2ff;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.audience-similar-list h4 {
  margin: 0 0 7px;
  color: #111421;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}

.audience-similar-list p {
  margin: 0 0 8px;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
}

.audience-similar-list small,
.audience-similar-list em {
  display: block;
  margin-top: 6px;
  color: #656a7a;
  font-size: 12px;
  line-height: 16px;
  font-style: normal;
}

.audience-similar-list em {
  color: #202331;
  font-weight: 800;
}

.audience-similar-table {
  display: grid;
  gap: 10px;
}

.audience-similar-table article {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-similar-table article:last-child {
  margin-bottom: 0;
}

.audience-similar-table .audience-similar-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 0;
}

.audience-similar-table .audience-similar-pair > div {
  display: grid;
  gap: 6px;
}

.audience-similar-table .audience-similar-pair strong {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}

.audience-similar-table .audience-segment-ref {
  max-width: 100%;
}

.audience-similar-table .audience-segment-ref__label {
  overflow-wrap: break-word;
  word-break: normal;
}

.audience-similar-closeness {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 164px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4f2ff;
  color: #5f4ce3;
  font-size: 13px;
  line-height: 17px;
  font-weight: 900;
  text-align: center;
}

.audience-similar-closeness b {
  display: block;
  margin-bottom: 2px;
  color: #77718f;
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.audience-similar-columns section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #f0edfb;
  border-radius: 8px;
  background: #fbfbff;
}

.audience-similar-columns h4 {
  margin: 0 0 8px;
  color: #111421;
  font-size: 13px;
  line-height: 18px;
  font-weight: 900;
}

.audience-similar-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience-similar-traits li {
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: #303444;
  font-size: 13px;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.audience-similar-table p,
.audience-similar-table em {
  margin: 0;
  color: #303444;
  font-size: 13px;
  line-height: 19px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.audience-similar-table em {
  padding-top: 2px;
  color: #202331;
}

.audience-similar-table em b {
  color: #5f4ce3;
  font-style: normal;
  font-weight: 900;
}

.audience-common {
  margin: 14px 0 18px;
}

.audience-common[hidden] {
  display: none;
}

.audience-common-summary {
  padding: 16px 18px;
  border: 1px solid #e5e1fb;
  border-left: 5px solid #6a59f6;
  border-radius: 10px;
  background: #fbfaff;
  box-shadow: 0 10px 24px rgba(49, 40, 120, 0.05);
}

.audience-common-summary__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.audience-common-summary__head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #efeaff;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 850;
  text-transform: uppercase;
}

.audience-common-summary h3 {
  margin: 0 0 4px;
  color: #171a28;
  font-size: 20px;
  line-height: 26px;
}

.audience-common-summary__head p {
  margin: 0;
  color: #656a7a;
  font-size: 14px;
  line-height: 20px;
}

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

.audience-common-summary__grid article {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #ebe8fb;
  border-radius: 8px;
  background: #ffffff;
}

.audience-common-summary__grid strong {
  display: block;
  margin-bottom: 5px;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 850;
  text-transform: uppercase;
}

.audience-common-summary__grid p {
  margin: 0;
  color: #303444;
  font-size: 14px;
  line-height: 20px;
}

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

.segments-loading-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  padding: 18px 20px;
  border: 1px solid rgba(95, 76, 227, 0.16);
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  background: #f4f1ff;
  color: var(--active-text);
}

.segments-loading-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 68px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.segments-loading-card__content {
  min-width: 0;
}

.segments-loading-card h3 {
  margin: 0 0 4px;
  color: var(--active-text);
  font-size: 20px;
  line-height: 26px;
  font-weight: 650;
}

.segments-loading-card p {
  margin: 0;
  color: #5f667a;
  font-size: 16px;
  line-height: 22px;
}

.cluster-card, .cluster-card-dis {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(95, 76, 227, 0.08);
  background: linear-gradient(135deg, var(--segment-soft, var(--lavender)) 0%, var(--lavender) 62%, #ffffff 150%);
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cluster-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--segment-color, var(--accent));
}

.card-header {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
  margin-bottom: 24px;
}

.card-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: #d8d8d8;
  flex: 0 0 120px;
  margin-right: 0;
}

.card-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.card-status {
  margin-left: 0;
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: var(--active-text);
  display: flex;
  align-self: start;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.card-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cluster-card-label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 3px;
  color: var(--segment-color, var(--accent));
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cluster-card-label span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--segment-color, var(--accent));
}

.card-header-info p {
  font-size: 17px;
  line-height: 24px;
  margin-bottom: 0;
}

.card-header-title {
  display: block;
  font-weight: 500;
  font-size: 20px;
  line-height: 28px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.info-like .info-dislike {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.info-tags {
  display: flex;
  flex-direction: row;
  flex-flow: wrap;
  gap: 8px
}

.info-like .info-dislike {
  gap: 8px;
}

.info-like>span {
  font-size: 17px;
  line-height: 24px;
  margin-bottom: 8px;
}

.info-dislike>span {
  font-size: 17px;
  line-height: 24px;
  margin-bottom: 8px;
}

.btn-dis {
  pointer-events: none;
  cursor: default;
}

.tag {
  padding: 8px 16px;
  background: var(--white);
  border-radius: 16px;
  font-family: Manrope;
  font-size: 15px;
  line-height: 20px;
}

.cluster-card:hover {
  transform: translateY(-4px);
}

.cluster-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.cluster-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d8d8d8;
  object-fit: cover;
}

.cluster-info h4 {
  font-size: 18px;
  margin-bottom: 4px;
}

.cluster-info p {
  font-size: 14px;
  margin: 0;
  color: var(--muted);
}

.cluster-share {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.cluster-tags-section {
  margin-bottom: 16px;
}

.cluster-tags-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cluster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cluster-card-actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cluster-card button, .cluster-card-dis button  {
  align-self: flex-start;
}

.cluster-card-actions > button {
  margin-top: 0;
  flex: 1 1 240px;
}

.cluster-card-secondary {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid #cdc7ff;
}

.result-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.result-mode-tabs button {
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid #d8d1ff;
  border-radius: 999px;
  background: #ffffff;
  color: #5f4ce3;
  font-size: 15px;
  line-height: 20px;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.result-mode-tabs button.active,
.result-mode-tabs button[aria-selected="true"] {
  border-color: #5f4ce3;
  background: linear-gradient(135deg, #6a5af9 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.2);
}

.result-mode-tabs button:focus-visible,
.content-generation-panel button:focus-visible,
.content-generation-panel input:focus-visible,
.content-generation-panel textarea:focus-visible {
  outline: 3px solid rgba(95, 76, 227, 0.24);
  outline-offset: 2px;
}

.result-mode-note {
  max-width: 1180px;
  margin: 0 0 22px;
  color: #4f5668;
  font-size: 16px;
  line-height: 24px;
}

.content-generation-panel[hidden],
.content-generation-auth[hidden],
.content-generation-workspace[hidden] {
  display: none !important;
}

.content-generation-panel {
  min-width: 0;
  padding: 0;
}

.content-generation-auth {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid #e4e1f5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(39, 32, 91, 0.08);
}

.content-generation-auth h3,
.content-generation-auth p {
  margin: 0;
}

.content-generation-auth h3 {
  color: #171a28;
  font-size: 22px;
  line-height: 28px;
  font-weight: 850;
}

.content-generation-auth p {
  color: #5f667a;
  font-size: 15px;
  line-height: 22px;
}

.content-generation-auth button,
.content-generation-primary {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6a5af9 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 15px;
  line-height: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.2);
}

.content-generation-workspace {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #e8e4fb;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8f6ff 0%, #fcfbff 100%);
}

/* ---- Studio grid (one screen, inner scroll) ---- */
.cg-grid {
  display: grid;
  grid-template-columns: minmax(248px, 0.82fr) minmax(0, 1.7fr) minmax(312px, 1fr);
  gap: 14px;
  height: clamp(480px, calc(100vh - 300px), 820px);
}

.cg-rail,
.cg-canvas,
.cg-ai {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid #e6e1fb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(43, 36, 95, 0.06);
}

.cg-rail-head,
.cg-ai-head {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.cg-rail-head h4,
.cg-canvas-head h4,
.cg-ai-head h4 {
  margin: 0;
  color: #202331;
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}

.cg-ai-head p {
  margin: 4px 0 0;
  color: #656a7a;
  font-size: 12px;
  line-height: 17px;
}

/* ---- Ideas rail ---- */
.cg-rail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 3px;
}

.content-generation-ideas-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.content-generation-idea {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid #e7e2fb;
  border-radius: 10px;
  background: #ffffff;
  color: #202331;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.content-generation-idea:hover {
  border-color: #cfc6fb;
  background: #fbfaff;
}

.content-generation-idea.active {
  border-color: #6a5af9;
  background: #f3f0ff;
  box-shadow: 0 6px 16px rgba(106, 90, 249, 0.14);
}

.content-generation-idea span {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ece8ff;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.content-generation-idea.active span {
  background: linear-gradient(135deg, #6a5af9 0%, #4f46e5 100%);
  color: #ffffff;
}

.content-generation-idea strong {
  min-width: 0;
  color: #202331;
  font-size: 14px;
  line-height: 19px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.content-generation-idea em {
  min-width: 0;
  color: #5f667a;
  font-size: 12px;
  line-height: 17px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.content-generation-panel.is-loading .content-generation-ideas-list:empty {
  display: grid;
  gap: 8px;
}

.content-generation-panel.is-loading .content-generation-ideas-list:empty::before,
.content-generation-panel.is-loading .content-generation-ideas-list:empty::after {
  content: "";
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(100deg, #f1eefb 30%, #e7e1fb 50%, #f1eefb 70%);
  background-size: 200% 100%;
  animation: cgShimmer 1.2s ease-in-out infinite;
}

@keyframes cgShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Rail footer (idea controls) ---- */
.cg-rail-foot {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eeeafc;
}

.cg-goal {
  display: grid;
  gap: 5px;
}

.cg-goal span {
  color: #6b7280;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.cg-goal input {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  border: 1px solid #ddd8f8;
  border-radius: 10px;
  color: #202331;
  font: inherit;
  font-size: 14px;
  line-height: 18px;
}

.cg-rail-actions {
  display: grid;
  gap: 8px;
}

.cg-add-idea,
.cg-regen {
  width: 100%;
  min-height: 42px;
}

.cg-regen::before {
  content: "\21bb";
  margin-right: 7px;
  font-weight: 900;
}

/* ---- Custom idea form ---- */
.content-generation-custom-idea[hidden] {
  display: none !important;
}

.content-generation-custom-idea {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ddd8f8;
  border-radius: 10px;
  background: #fbfaff;
}

.content-generation-custom-idea label {
  display: grid;
  gap: 6px;
}

.content-generation-custom-idea span {
  color: #4f5668;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.content-generation-custom-idea textarea {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #ddd8f8;
  border-radius: 8px;
  color: #202331;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  resize: vertical;
}

.cg-custom-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

/* ---- Media tray ---- */
.cg-media {
  display: grid;
  gap: 10px;
}

.content-generation-image-dropzone {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px dashed #bdb4ff;
  border-radius: 10px;
  background: #fbfaff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.content-generation-image-dropzone.is-dragover,
.content-generation-image-dropzone:focus-within {
  border-color: #6a5af9;
  background: #f3f0ff;
}

.content-generation-image-dropzone span {
  color: #5f4ce3;
  font-size: 13px;
  line-height: 18px;
  font-weight: 850;
}

.content-generation-image-dropzone strong {
  color: #656a7a;
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.content-generation-image-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.content-generation-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-generation-image-preview:empty {
  display: none;
}

.content-generation-image-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-width: min(220px, 100%);
  padding: 6px;
  border: 1px solid #e7e2fb;
  border-radius: 10px;
  background: #ffffff;
}

.content-generation-image-item img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f0ff;
}

.content-generation-image-item span {
  min-width: 0;
  color: #202331;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-generation-image-item button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e2ddfb;
  border-radius: 999px;
  background: #ffffff;
  color: #5f4ce3;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.content-generation-image-item button:hover {
  border-color: #6a5af9;
  background: #f3f0ff;
}

/* ---- Source notes ---- */
.cg-notes {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cg-notes:empty {
  display: none;
}

.cg-notes li {
  position: relative;
  padding-left: 16px;
  color: #6b7280;
  font-size: 12px;
  line-height: 17px;
}

.cg-notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #c4bbf6;
}

/* ---- Canvas / editor ---- */
.cg-canvas-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cg-canvas-titles {
  min-width: 0;
}

.cg-canvas-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cg-canvas-head p {
  margin: 4px 0 0;
  color: #656a7a;
  font-size: 12px;
  line-height: 17px;
}

.cg-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 4px 11px;
  border-radius: 999px;
  background: #f1eeff;
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cg-source-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6a5af9;
}

.cg-save {
  flex: 0 0 auto;
  width: auto;
  min-height: 40px;
  padding: 9px 18px;
}

.cg-editor {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #e3def5;
  border-radius: 12px;
  background: #ffffff;
  color: #202331;
  font-family: inherit;
  font-size: 16px;
  line-height: 26px;
  resize: none;
  overflow: auto;
  overflow-wrap: anywhere;
}

.cg-editor:focus {
  border-color: #b7adf6;
}

.cg-canvas-foot {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.cg-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cg-tool {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #e2ddfb;
  border-radius: 999px;
  background: #ffffff;
  color: #5f4ce3;
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.cg-tool:hover:not(:disabled) {
  border-color: #6a5af9;
  background: #f3f0ff;
}

.cg-tool:disabled {
  opacity: 0.45;
  cursor: default;
}

.cg-tools-sep {
  width: 1px;
  height: 22px;
  background: #ebe7f8;
}

/* ---- Status slot ---- */
.content-generation-status {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #e4e0ff;
  border-radius: 10px;
  background: #fbfaff;
  color: #5f667a;
  font-size: 13px;
  line-height: 18px;
}

.content-generation-status:empty {
  display: none;
}

.content-generation-status.success {
  border-color: #c5ead2;
  background: #f3fbf6;
  color: #326b46;
}

.content-generation-status.error {
  border-color: #f3b5aa;
  background: #fff7f5;
  color: #b42318;
}

.content-generation-status.has-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.content-generation-status-action {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* ---- AI dock ---- */
.content-generation-ai-log {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid #ebe7f8;
  border-radius: 12px;
  background: #faf9ff;
}

.content-generation-ai-message {
  display: grid;
  gap: 5px;
  max-width: 94%;
  padding: 10px 12px;
  border: 1px solid #e5e0fb;
  border-radius: 12px;
  background: #ffffff;
  color: #202331;
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.content-generation-ai-message.user {
  justify-self: end;
  border-color: #6a5af9;
  background: #f3f0ff;
}

.content-generation-ai-message.error {
  border-color: #f3b5aa;
  background: #fff7f5;
  color: #8a1f14;
}

.content-generation-ai-message strong,
.content-generation-ai-message p {
  margin: 0;
}

.content-generation-ai-message strong {
  color: #5f4ce3;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
}

.content-generation-ai-message.user strong {
  color: #4338ca;
}

.content-generation-ai-message.error strong {
  color: #b42318;
}

.content-generation-ai-attachments {
  display: grid;
  gap: 6px;
}

.content-generation-ai-attachment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.content-generation-ai-attachment img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.content-generation-ai-attachment span {
  min-width: 0;
  color: #202331;
  font-size: 12px;
  line-height: 16px;
  overflow-wrap: anywhere;
}

/* ---- Modern composer ---- */
.content-generation-ai-form {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.content-generation-image-preview--chat {
  margin: 0;
}

.cg-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px;
  border: 1px solid #ddd8f8;
  border-radius: 16px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cg-composer:focus-within {
  border-color: #6a5af9;
  box-shadow: 0 0 0 3px rgba(106, 90, 249, 0.12);
}

.cg-attach {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: transparent;
  color: #6a5af9;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cg-attach:hover,
.cg-attach:focus-within {
  background: #f3f0ff;
}

.cg-attach svg {
  width: 18px;
  height: 18px;
}

.cg-attach input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cg-composer textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  max-height: 120px;
  padding: 9px 4px;
  border: 0;
  background: transparent;
  color: #202331;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  resize: none;
  outline: none;
}

.cg-send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6a5af9 0%, #4f46e5 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
  transition: opacity 0.15s ease, transform 0.05s ease;
}

.cg-send:hover:not(:disabled) {
  transform: translateY(-1px);
}

.cg-send:disabled {
  cursor: wait;
  opacity: 0.6;
}

.cg-send svg {
  width: 18px;
  height: 18px;
}

/* ---- Buttons base ---- */
.content-generation-secondary {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #d8d1ff;
  border-radius: 999px;
  background: #ffffff;
  color: #5f4ce3;
  font: inherit;
  font-size: 14px;
  line-height: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.content-generation-secondary:hover {
  border-color: #6a5af9;
  background: #f3f0ff;
}

.content-generation-primary:disabled,
.content-generation-secondary:disabled {
  cursor: wait;
  opacity: 0.62;
}

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .cg-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    height: auto;
  }

  .cg-ai {
    grid-column: 1 / -1;
  }

  .cg-rail,
  .cg-canvas,
  .cg-ai {
    overflow: visible;
  }

  .cg-rail-scroll {
    overflow: visible;
  }

  .cg-editor {
    min-height: 320px;
  }

  .content-generation-ai-log {
    min-height: 280px;
    max-height: 420px;
  }
}

@media (max-width: 780px) {
  .result-mode-tabs {
    width: 100%;
  }

  .result-mode-tabs button {
    flex: 1 1 210px;
  }

  .content-generation-workspace {
    padding: 12px;
  }

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

  .cg-canvas-head {
    flex-direction: column;
  }

  .cg-save {
    width: 100%;
  }

  .cg-custom-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
