/* Slices into bars: a thin pie on a warm white page, one accent for the largest share, and a short line of type
   under it. */
:root {
  --page: #f3f0e8;          /* the page */
  --ink: #141414;           /* the outlines, the names, the shares */
  --muted: #8e8a82;         /* the line of type under the chart */
  --guide: #d6d1c6;         /* the hairline circle that stays where the pie was */
  --accent: #ff4d1a;        /* the largest slice and its share */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(18px, 4svh, 40px);
  padding: 32px 16px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------- the chart */
.figure {
  display: block;
  width: min(calc(100vw - 32px), 1060px, var(--fit, 9999px));
  height: auto;
  overflow: visible;
  color: var(--ink);
}

.guide {
  fill: none;
  stroke: var(--guide);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.slice {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.slice--accent {
  fill: var(--accent);
  stroke: var(--accent);
}

.label {
  fill: var(--ink);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  letter-spacing: 0.01em;
  user-select: none;
  -webkit-user-select: none;
}

.label--share {
  font-variant-numeric: tabular-nums;
  dominant-baseline: central;
}

.label--accent {
  fill: var(--accent);
}

/* ---------------------------------------------------------------- the type */
.caption {
  display: flex;
  align-items: baseline;
  gap: 0.36em;
  margin: 0;
  font-size: clamp(15px, 1.8vw, 20px);
  line-height: 1.2;
  user-select: none;
  -webkit-user-select: none;
}

.caption__name {
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: 0.01em;
}

.caption__note {
  font-weight: 360;
  color: var(--muted);
}
