.rcard {
  position: relative;
  background: #F3F6F9;
  border: 1px solid #E7EAEE;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* This square reads a touch deeper than the first square: a stronger teal/blue
   wash with less exposed off-white. Scoped to .rcard so the first square is
   unaffected. */
.rcard .sol-ribbon {
  width: 80%;
  height: 90%;
  right: -9%;
  top: -14%;
  background: linear-gradient(
    90deg,
    rgba(22, 168, 139, 0),
    rgba(22, 168, 139, 0.34) 27%,
    rgba(31, 169, 214, 0.38) 57%,
    rgba(87, 198, 240, 0.34) 84%,
    rgba(87, 198, 240, 0)
  );
  filter: blur(57px);
}

.rcard .sol-glow {
  width: 52%;
  height: 66%;
  left: -13%;
  bottom: -23%;
  opacity: 0.33;
}

.rhead {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 18px 0;
  gap: 10px;
}

.rtitle {
  font-size: 26px;
  font-weight: 600;
  color: #0E1320;
  line-height: 1.3;
  max-width: 100%;
}

.rexp {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #F2F4F7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475467;
  font-size: 16px;
  flex: none;
  cursor: pointer;
}

.rstage {
  position: relative;
  flex: 1;
  min-height: 300px;
  margin: 8px 12px 12px;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 8px 24px;
  box-sizing: border-box;
}

.rblob {
  position: absolute;
  border-radius: 50%;
  filter: blur(44px);
  pointer-events: none;
}

.rb1 {
  top: -8%;
  left: -8%;
  width: 220px;
  height: 220px;
  background: #7FD3BD;
  opacity: 0.55;
}

.rb2 {
  top: 30%;
  right: -18%;
  width: 220px;
  height: 220px;
  background: #B1A8EE;
  opacity: 0.5;
}

.rb3 {
  bottom: -10%;
  left: 18%;
  width: 220px;
  height: 220px;
  background: #F2A99F;
  opacity: 0.5;
}

.rfloater {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  backdrop-filter: blur(26px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 12px 30px rgba(14, 19, 32, 0.12),
    0 2px 8px rgba(14, 19, 32, 0.06);
  opacity: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rcard.in .rfloater {
  opacity: 1;
}

.rcard.in .f2 {
  transition-delay: 0.18s;
}

.f1 {
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

.f1-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.f1-head-txt {
  min-width: 0;
}

.f1-metric-lbl {
  font-size: 13px;
  font-weight: 600;
  color: #0E1320;
  line-height: 1.2;
}

.f1-metric-val {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.2;
  margin-top: 3px;
}

.f1-meter-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0E1320;
  margin-bottom: 7px;
}

.f1-gauge {
  font-size: 15px;
  line-height: 1;
  color: #475467;
}

.f1-bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #EDEFF2;
  overflow: hidden;
}

/* Hover top-up: the scroll animation writes the resting fill into the
 * --bar-fill custom property (see results.js). CSS then computes `width`
 * from that variable — at rest, width == --bar-fill; on hover, width ==
 * --bar-fill + 6% (capped at 100% so it never exceeds the track). Both
 * the scroll transition and the hover top-up flow through the SAME
 * `width` property + `transition: width …`, so they never fight.
 *
 * Trigger is on the whole .rcard ("Interpretable, actionable insights"
 * square), not the 8px bar strip — the tiny bar was too small a target
 * to hover reliably. Hovering anywhere on the card tops up both bars. */

.f1-bar-pos {
  height: 100%;
  width: var(--bar-fill, 0%);
  background: #0F8C72;
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.f1-bar-neg {
  height: 100%;
  width: var(--bar-fill, 0%);
  background: #C44545;
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.rcard:hover .f1-bar-pos,
.rcard:hover .f1-bar-neg {
  width: min(calc(var(--bar-fill, 0%) + 6%), 100%);
}

.f1-collab-num {
  font-size: 24px;
  font-weight: 700;
  color: #0E1320;
  line-height: 1;
  margin-top: 3px;
  font-feature-settings: "tnum";
}

.f1-collab .flabel-sub {
  font-weight: 600;
}

.f2 {
  padding: 0;
}

.f2-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #8A9099;
}

.f2-spark {
  font-size: 13px;
  line-height: 1;
  color: #0E1320;
}

.fsec {
  padding: 5px 14px;
}

.fdiv {
  height: 1px;
  background: rgba(14, 19, 32, 0.08);
}

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

.ficon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #14A08B 0%, #2A8FE0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.flbl-wrap {
  flex: 1;
  min-width: 0;
}

.flabel-main {
  font-size: 14px;
  font-weight: 600;
  color: #0E1320;
  line-height: 1.25;
}

.f1-info {
  flex: 1;
  min-width: 0;
}

.flabel-sub {
  font-size: 11px;
  color: #6B7280;
  line-height: 1.2;
  margin-top: 2px;
}

.ftotal {
  font-size: 9.5px;
  color: #6B7280;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: #F4F6F8;
  padding: 4px 8px;
  border-radius: 6px;
  flex: none;
}

.fbody {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fdonut {
  position: relative;
  width: 62px;
  height: 62px;
  flex: none;
}

.fdonut svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ring-bg {
  stroke: #EEF0F3;
  fill: none;
}

.ring-pos {
  stroke: #0F8C72;
  fill: none;
  stroke-linecap: round;
}

.ring-neg {
  stroke: #C44545;
  fill: none;
  stroke-linecap: round;
}

.fdonut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fdonut-num {
  font-size: 22px;
  font-weight: 600;
  color: #0E1320;
  line-height: 1;
}

.fdonut-lbl {
  font-size: 8px;
  font-weight: 600;
  color: #6B7280;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.flegend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.flrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.fldot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.flname {
  color: #1C2230;
  font-weight: 500;
  min-width: 56px;
}

.flbar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #F0F2F5;
  overflow: hidden;
}

.flbar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.flpct {
  font-size: 11px;
  color: #1C2230;
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

.ftag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.7px;
  color: #C44545;
  background: #FDECEC;
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.ftag-good {
  color: #0F8C72;
  background: #E4F6F1;
}

.ftext {
  font-size: 12.5px;
  color: #1C2230;
  line-height: 1.45;
  font-weight: 400;
}

.faction {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #16A88B;
  cursor: pointer;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .rfloater,
  .ring-pos,
  .ring-neg,
  .flbar-fill {
    transition: none !important;
  }
  .rcard.in .rfloater {
    opacity: 1;
  }
}
