/* The population pyramid. Plain CSS in a file of its own for each chart form (decision 0012), so that changing one
   form never changes another form's frozen embeds (decision 0009). Uses the house tokens. */

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Population pyramid ------------------------------------------------------------ */

.py svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Two drawings; the container's width decides which is shown. */
.py .narrow {
  display: none;
}

@container (max-width: 30rem) {
  .py .wide {
    display: none;
  }

  .py .narrow {
    display: block;
  }
}

.py .grid {
  stroke: var(--grid);
  stroke-width: 1;
}

.py .tick {
  fill: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.py .age {
  fill: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.py .side {
  fill: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}

.py .men {
  fill: var(--series-1);
}

.py .women {
  fill: var(--series-2);
}
