/* poll-charts.css: the three poll charts in one frame. Every chart reads the same way:
   a kicker naming what was measured, the takeaway as its title, one key row, a plot of one size,
   and the source line. Grey is every other answer; the cover's gradient is the one in focus.
   The page supplies --u (one Figma pixel); the plot scales with the frame through --pu. */
.pc {
  --pw: 680;
  --ph: 440;
  container-type: inline-size;
  width: calc(var(--pw) * var(--u, 1px));
  max-width: 100%;
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}
.pc.narrow {
  width: 100%;
}
@media (max-width: 960px) {
  .pc {
    width: 100%;
  }
}
.pc-head {
  margin: 0;
}
.pc-k {
  margin: 0;
  font: 600 max(11px, calc(13 * var(--u, 1px))) / 1.4 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9c9caa;
}
.pc-t {
  margin: max(4px, calc(6 * var(--u, 1px))) 0 0;
  font: 600 max(15px, calc(20 * var(--u, 1px))) / 1.35 Inter, sans-serif;
  letter-spacing: -.01em;
  color: #252530;
  text-wrap: balance;
}

/* the key. The label in focus sits on a pale pill in the cover's two temperatures, drawn with the cards'
   gradient hairline, so the eye ties the words to the pane, the strips or the bar they name */
.pc-key {
  display: flex;
  flex-wrap: wrap;
  gap: max(4px, calc(6 * var(--u, 1px))) max(3px, calc(4 * var(--u, 1px)));
  margin: max(12px, calc(16 * var(--u, 1px))) 0 0
    min(-10px, calc(-12 * var(--u, 1px)));
  padding: 0;
  list-style: none;
}
.pc-key button,
.pc-key .st {
  all: unset;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: max(6px, calc(8 * var(--u, 1px)));
  padding: max(4px, calc(5 * var(--u, 1px))) max(10px, calc(12 * var(--u, 1px)));
  border-radius: 999px;
  font: 600 max(13px, calc(16 * var(--u, 1px))) / 1.5 Inter, sans-serif;
  color: #8e8e9a;
  transition: color .35s ease;
}
.pc-key button {
  cursor: pointer;
}
.pc-key .st {
  color: #474747;
}
.pc-key button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(90deg, #f1f4fe, #fef2ee) padding-box,
    linear-gradient(90deg, #bcccf7, #f4c2b5) border-box;
  box-shadow: 0 1px 3px rgba(60, 64, 140, 0.06);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity .4s ease, transform .45s cubic-bezier(0.16, 1, 0.3, 1);
}
.pc-key li.on button::before {
  opacity: 1;
  transform: none;
}
.pc-key li.on button {
  color: #15151e;
  font-weight: 700;
}
.pc-key button:focus-visible {
  outline: 2px solid #2f66c4;
  outline-offset: 3px;
}
.pc-key .sw {
  flex: none;
  width: max(9px, calc(11 * var(--u, 1px)));
  height: max(9px, calc(11 * var(--u, 1px)));
  border-radius: 3px;
  background: #dcdce3;
  transition: background .35s ease;
}
.pc-key li.on .sw:not(.fixed),
.pc-key .sw.g {
  background: linear-gradient(135deg, #f7a695 0%, #d5b4d6 45%, #8daef3 100%);
}
.pc-key .sw.grey {
  background: #c9c9d2;
}

.pc-plot {
  --pu: calc(100cqw / var(--pw));
  position: relative;
  margin-top: max(16px, calc(26 * var(--u, 1px)));
  height: calc(var(--ph) * var(--pu));
}
.pc-plot > svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pc-src {
  margin: max(12px, calc(18 * var(--u, 1px))) 0 0;
  font: 500 max(12px, calc(13 * var(--u, 1px))) / 1.5 Inter, sans-serif;
  color: #a9a9b4;
}
.pc [data-i] {
  cursor: pointer;
}

/* the staircase (Figure 4): frosted panes, heights to scale, cut straight at the base; each pane blurs
   the ones behind it. Every value sits at one inset from its pane's top-left corner. */
.pc-st {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pc-stp {
  position: absolute;
  left: calc(var(--x) * var(--pu));
  top: calc(var(--y) * var(--pu));
  width: calc(var(--w) * var(--pu));
  height: calc((var(--ph) + 140) * var(--pu));
  border-radius: calc(15 * var(--pu));
  transform-origin: 0 0;
  transform: translateY(calc(var(--lift, 0px) + var(--rise, 0px)))
    skewY(var(--a));
  background: linear-gradient(
    180deg,
    rgba(247, 247, 250, 0.84),
    rgba(233, 233, 239, 0.8)
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.78), -8px 0 22px
    rgba(37, 37, 48, 0.06);
  transition: transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 110ms);
}
.pc-st.settled .pc-stp {
  transition-duration: 450ms;
  transition-delay: 0ms;
}
.pc-stp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .5s ease;
  background: linear-gradient(
    165deg,
    rgba(247, 166, 149, 0.93) 0%,
    rgba(213, 180, 214, 0.9) 34%,
    rgba(141, 174, 243, 0.93) 72%
  );
}
.pc-stp.on::before {
  opacity: 1;
}
.pc-stp:hover {
  --lift: calc(-14 * var(--pu));
}
.pc.pre .pc-stp {
  --rise: calc(170 * var(--pu));
}
.pc-st {
  transition: opacity 900ms ease;
}
.pc.pre .pc-st {
  opacity: 0;
}
.pc-stv {
  position: absolute;
  z-index: 1;
  left: calc(var(--vx) * var(--pu));
  top: calc(var(--vy) * var(--pu));
  transform: translateY(-100%);
  white-space: nowrap;
  pointer-events: none;
  font: 600 calc(var(--fs) * var(--pu)) / 1 "Funnel Display", sans-serif;
  letter-spacing: -.02em;
  color: #9c9caa;
  transition: color .45s ease;
}
.pc-stp.on .pc-stv {
  color: #fff;
}
/* labels: "pane", the answer written on its pane under the value */
.pc-stl {
  position: absolute;
  z-index: 1;
  left: calc(var(--lx) * var(--pu));
  top: calc(var(--ly) * var(--pu));
  width: calc(var(--lw) * var(--pu));
  pointer-events: none;
  font: 600 max(9.5px, calc(var(--lfs) * var(--pu))) / 1.2 Inter, sans-serif;
  color: #6b6b82;
  text-wrap: pretty;
  transition: color .45s ease;
}
.pc-stp.on .pc-stl {
  color: #fff;
}
/* labels: "base", a row under the plot with one answer under each pane's left edge */
.pc-base {
  position: relative;
  height: calc(58 * var(--pu, 1px));
  margin-top: max(8px, calc(10 * var(--u, 1px)));
}
.pc-base span {
  position: absolute;
  top: 0;
  font: 600 max(10px, calc(11.5 * var(--pu, 1px))) / 1.25 Inter, sans-serif;
  color: #9a9aa6;
  text-wrap: pretty;
  transition: color .35s ease;
}
.pc-base span.on {
  color: #252530;
}
/* labels: "side", a numbered list beside a narrower plot; the panes keep only their values */
.pc-list {
  position: absolute;
  left: calc(100% + max(18px, calc(26 * var(--u, 1px))));
  width: calc(51.5% - max(18px, calc(26 * var(--u, 1px))));
  top: calc(6 * var(--pu, 1px));
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: max(10px, calc(14 * var(--u, 1px)));
}
.pc-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: max(8px, calc(10 * var(--u, 1px)));
  align-items: baseline;
  font: 600 max(13px, calc(16 * var(--u, 1px))) / 1.35 Inter, sans-serif;
  color: #9898a4;
  transition: color .35s ease;
}
.pc-list li b {
  font: 600 max(15px, calc(20 * var(--u, 1px))) / 1 "Funnel Display", sans-serif;
  letter-spacing: -.02em;
  color: #b4b4be;
  transition: color .35s ease;
}
.pc-list li.on,
.pc-list li.on b {
  color: #252530;
}
.pc-list li.sum {
  display: block;
  margin-top: max(2px, calc(4 * var(--u, 1px)));
  padding-top: max(10px, calc(14 * var(--u, 1px)));
  border-top: 1px solid rgba(37, 37, 48, 0.1);
  font-weight: 500;
  color: #3b3b4c;
}
.pc-list li.sum b {
  font-size: inherit;
  color: #15151e;
}
.pc.held .pc-key button,
.pc.held .pc-list li {
  cursor: default;
}
.pc-list li:focus-visible {
  outline: 2px solid #2f66c4;
  outline-offset: 3px;
  border-radius: 4px;
}
/* labels: "lines", the answer in focus in the plot's empty top-right, joined to its pane by an elbow line in the
   page's two temperatures (the cards' bar). Only the pane in focus shows its pair: the line draws, then the words
   fade in; the pair before it fades out. Nothing shows until the panes have settled. */
.pc-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.pc-lines .ln {
  pointer-events: none;
}
.pc-lines .ln.on {
  pointer-events: auto;
  cursor: pointer;
}
.pc .lnp {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  opacity: 0;
  transition: stroke-dashoffset 0s linear .25s, opacity .2s ease;
}
.pc .lnd {
  fill: #fff;
  stroke: #f58c74;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity .2s ease;
}
.pc .lnl {
  font-size: 16px;
  font-weight: 600;
  fill: #252530;
  opacity: 0;
  transition: opacity .2s ease;
}
.pc .ln.on .lnp {
  stroke-dashoffset: 0;
  opacity: 1;
  transition: stroke-dashoffset 520ms cubic-bezier(0.16, 1, 0.3, 1) 80ms,
    opacity .15s ease 80ms;
}
.pc .ln.on .lnd {
  opacity: 1;
  transition: opacity .2s ease 60ms;
}
.pc .ln.on .lnl {
  opacity: 1;
  transition: opacity .35s ease 420ms;
}
.pc-st:not(.settled) ~ .pc-lines .ln .lnp {
  stroke-dashoffset: var(--len, 1000);
  opacity: 0;
}
.pc-st:not(.settled) ~ .pc-lines .ln .lnd,
.pc-st:not(.settled) ~ .pc-lines .ln .lnl {
  opacity: 0;
}
/* labels: "callout", one line above the plot naming the answer in focus */
.pc-callout {
  margin: max(14px, calc(18 * var(--u, 1px))) 0 0;
  font: 600 max(15px, calc(20 * var(--u, 1px))) / 1.4 Inter, sans-serif;
  color: #252530;
  min-height: 1.4em;
}
.pc-callout b {
  font: 600 max(20px, calc(28 * var(--u, 1px))) / 1 "Funnel Display", sans-serif;
  letter-spacing: -.02em;
  margin-right: .3em;
  vertical-align: -.04em;
}
.pc.lb-callout .pc-plot {
  margin-top: max(10px, calc(14 * var(--u, 1px)));
}

/* SVG plots (the strips, the bars): one viewBox unit is one plot unit */
.pc svg text {
  font-family: Inter, sans-serif;
}
.pc .glass rect {
  transition: opacity .5s ease;
}
.pc .glass .c {
  opacity: 0;
}
.pc .glass.on .c {
  opacity: 1;
}
.pc .slbl {
  font-size: 16px;
  font-weight: 600;
  fill: #303038;
  transition: fill .35s ease;
}
.pc .val {
  font-family: "Funnel Display", sans-serif;
  font-weight: 600;
  fill: #b4b4be;
  transition: fill .35s ease, opacity .5s ease .55s;
}
.pc .on .val,
.pc .val.on {
  fill: #303030;
}

/* the strips grow from the left, a stage at a time, and their values follow */
.pc .strip {
  transform-box: fill-box;
  transform-origin: 0 50%;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms);
}
.pc.pre .strip {
  transform: scaleX(0);
}
.pc.pre .val {
  opacity: 0;
}

/* the ownership figure's bars grow from the left, a pair at a time; the stage in focus is full strength */
.pc .gb {
  transform-box: fill-box;
  transform-origin: 0 50%;
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    opacity .4s ease;
}
.pc.pre .gb {
  transform: scaleX(0);
}
.pc .grp .gb {
  opacity: 0.55;
}
.pc .grp.on .gb {
  opacity: 1;
}
.pc .slbl[data-i] {
  fill: #8e8e9a;
  cursor: pointer;
}
.pc .slbl[data-i].on {
  fill: #252530;
}

@media (prefers-reduced-motion: reduce) {
  .pc * {
    transition: none !important;
  }
  .pc.pre .pc-stp {
    --rise: 0px;
  }
}
