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

body {
  background: #f8fafc;
  color: #1e293b;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 19px;
}

#root {
  display: flex;
  height: 100dvh;
  overflow: hidden;
  width: 100vw;
}

main,
main > div,
.responsive-grid > *,
.grid-auto > * {
  min-width: 0;
}

::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

input[type='range'] {
  accent-color: #3b82f6;
  cursor: pointer;
  width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
}

pre,
code {
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.math-block,
div[style*='fontFamily: monospace'],
[role='math'] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

table {
  display: block;
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

svg,
canvas {
  max-width: 100%;
}

a {
  color: #3b82f6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .responsive-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 600px) {
  button,
  input[type='range'] {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .callout-box {
    border-left-width: 4px !important;
    padding: 12px 14px !important;
  }
}

/* Token colors for code blocks. */
.kw {
  color: #c792ea;
}

.fn {
  color: #82aaff;
}

.st {
  color: #c3e88d;
}

.cm {
  color: #546e7a;
  font-style: italic;
}

.nb {
  color: #f78c6c;
}

.cl {
  color: #ffcb6b;
}

.op {
  color: #89ddff;
}
