/* Icons (IconHelper): 24px grid, 1.75 stroke, currentColor, so they follow the text colour in light and
   dark. Sized in em through :where() (zero specificity) so any component can set its own size. */
:where(.icon) {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.25em;
}

/* An icon beside a text label in a button or link: one row, centred, a small gap. */
:where(.button, .chart-stage__share, .chart-stage__back, .performance-control__perform):has(> .icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

/* The overflow button holds only an icon (its accessible name is "More"). */
.chart-stage__options > summary .icon {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: baseline;
}

/* The close button of the share sheet: an icon in a 44px target. */
.share-sheet__close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
}

.share-sheet__close .icon {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: baseline;
}

@media print {
  .icon {
    display: none;
  }
}
