/* =========================================================
   GENERIC: Top row layout (Percentiles + Scores same height)
   Use for ALL panels (Emotionality, Social index, etc.)
========================================================= */

/* Make both top panels fill their column height (generic selector) */
.tc__row > .tc__col--grow > .panel,
.tc__row > .tc__col--side > .panel,
.tc__row > .bar__col--side > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tc__row .panel-bd {
  flex: 1 1 auto;
}

/* Keep the bargraph from collapsing */
.tc__barGraph {
  flex: 1 1 auto;
  min-height: 220px;
}

/* Responsive stacking */
@media (max-width: 980px) {
  .tc__row {
    flex-wrap: wrap;
  }
  .tc__col--side {
    flex: 1 1 360px;
    min-width: 300px;
  }
}
/* =========================================================
   GENERIC: Percentile ladder (BAR VERSION)
========================================================= */

.pct {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pct__title {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  opacity: 0.9;
}

.pct__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.pct__label {
  flex: 0 0 110px;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.92);
}

/* =========================================================
   BAR TRACK
========================================================= */

.pct__bar {
  position: relative;
  flex: 1 1 auto;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: visible;
}

/* =========================================================
   BAR FILL (reuses pct__dot element)
========================================================= */

.pct__dot {
  position: absolute;
  left: 0 !important;
  top: 0 !important;

  height: 100%;
  width: calc(var(--pct, 0) * 1%);
  max-width: 100%;

  border-radius: 999px;
  background: var(--fill);

  border: 0;
  box-shadow: none;
  transform: none !important;

  z-index: 1;
}

/* remove pie internals completely */
.pct__dot::after {
  content: none;
}

/* =========================================================
   VALUE PILL (percentile at end of bar)
========================================================= */

.pct__dotVal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);

  padding: 3px 8px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 900;
  line-height: 1;

  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);

  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.pct__dotVal > span:first-child {
  font-size: 1em;
}

/* ordinal suffix */
.pct__suf {
  font-size: 0.75em;
  line-height: 1;
  margin-left: 1px;
  position: relative;
  top: -0.3em;
  opacity: 0.85;
}

/* =========================================================
   SMALL VALUES → PUSH VALUE OUTSIDE BAR
========================================================= */

.pct__dotVal.is-outside {
  right: auto;
  left: 100%;
  margin-left: 8px;
  transform: translateY(-50%);
}

/* =========================================================
   FOOTNOTE
========================================================= */

.pct__foot {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 100;
}

.pct__link {
  color: #00ffbf;
  font-weight: 900;
}

/* =========================================================
   EMOTION COLORS (unchanged)
========================================================= */

.pct__dot--anger {
  --fill: #ff4d4d;
}

.pct__dot--anxiety {
  --fill: #ffb020;
}

.pct__dot--disgust {
  --fill: #7dff6a;
}

.pct__dot--grievance {
  --fill: #a48bff;
}

/* Optional extra personas */
.pct__dot--i {
  --fill: #00ffbf;
}
.pct__dot--they {
  --fill: #33a1ff;
}
.pct__dot--friend {
  --fill: #ff5bd6;
}
.pct__dot--we {
  --fill: #ffd54a;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 720px) {
  .pct__row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .pct__label {
    flex: 1 1 100%;
  }
}
