/* The waffle chart. 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. */

.wf {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: flex-start;
  font-size: 15px;
}

.wf .grid {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  width: min(100%, 260px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf .sq {
  aspect-ratio: 1;
  border-radius: 2px;
}

.wf .g1,
.wf .g1.sw {
  background: var(--series-1);
}

.wf .g2 {
  background: var(--series-2);
}

.wf .g3 {
  background: var(--series-3);
}

.wf .g4 {
  background: var(--series-4);
}

.wf .g5 {
  background: var(--series-5);
}

.wf .legend {
  display: flex;
  flex: 1 1 12rem;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf .legend li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  column-gap: 10px;
  align-items: baseline;
  color: var(--ink-2);
}

.wf .sw {
  align-self: center;
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.wf .gv {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.wf .hl .gl {
  color: var(--ink);
  font-weight: 600;
}

.wf .unit {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* The share card: larger squares and type. */
.wf-card {
  gap: 24px 44px;
  font-size: 28px;
}

.wf-card .grid {
  gap: 6px;
  width: 540px;
}

.wf-card .sq {
  border-radius: 4px;
}

.wf-card .legend {
  flex: 1 1 300px;
  gap: 24px;
}

.wf-card .legend li {
  grid-template-columns: 26px 1fr auto;
  column-gap: 16px;
}

.wf-card .sw {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

.wf-card .unit {
  font-size: 22px;
}
