*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fafafa;
}

.demo-header {
  padding: 1rem 1.25rem;
  background: #111;
  color: #f5f5f5;
}

.demo-header a {
  color: #93c5fd;
}

.demo-header a:hover {
  color: #bfdbfe;
}

.demo-main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.25rem;
}

.demo-note {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: light-dark(#fef9c3, #1e293b);
  border: 1px solid light-dark(#eab308, #334155);
  border-radius: 6px;
  font-size: 0.9rem;
  color: light-dark(#171717, #f5f5f5);
}

.demo-note.support {
  background: light-dark(#e0f2fe, #1e293b);
  border-color: #38bdf8;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

code {
  font-size: 0.9em;
  background: light-dark(#eee, #334155);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 4px;
  background: #7c3aed;
  color: #fff;
  vertical-align: middle;
}

/* Shown at bottom of each demo: escaped as &lt; &gt; &amp; inside <pre> */
.demo-source {
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  border: 1px solid #334155;
}

.demo-source h2 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.demo-source pre {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.demo-source code {
  display: block;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre;
  background: transparent;
  color: inherit;
  border-radius: 0;
}
