* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.axes-demo {
  min-height: 100vh;
  width: 100%;
  overflow: auto;
  padding: 32px;
  background: #fafbfd;
  color: #1f2e42;
  line-height: 1.5;
}

.axes-demo header,
.axes-controls,
.axes-legend,
.axes-note {
  max-width: 900px;
}

.axes-demo h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.axes-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 20px 32px;
  margin: 28px 0;
}

.axes-controls fieldset {
  border: 0;
}

.axes-line-width {
  grid-column: 1 / -1;
}

.axes-controls legend {
  margin-bottom: 8px;
}

.axes-controls button {
  padding: 8px 14px;
  border: 1px solid #c5cedb;
  background: white;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.axes-controls button[aria-pressed='true'] {
  background: #234c91;
  border-color: #234c91;
  color: white;
}

.axes-controls input {
  display: block;
  width: 100%;
  margin-top: 12px;
  accent-color: #234c91;
}

.axes-controls output {
  font-variant-numeric: tabular-nums;
}

.axes-canvas {
  overflow: auto;
  margin: 16px 0;
  border: 1px solid #dce2eb;
  width: fit-content;
  max-width: 100%;
  background: white;
}

.axes-legend,
.axes-note {
  color: #526278;
  font-size: 14px;
}

@media (max-width: 640px) {
  .axes-demo {
    padding: 20px;
  }

  .axes-controls {
    grid-template-columns: 1fr;
  }
}
