/* The preview marks the resting position and the component's default 96px range. */
body:has(.magnet-demo-title) { padding: clamp(1rem, 4.5vw, 4rem); color: #151515; }
main:has(> .magnet-demo-title) { max-width: 64rem; }
main:has(> .magnet-demo-title) > p { margin-bottom: clamp(1.75rem, 4vw, 3.75rem); font-size: .84rem; }
.magnet-demo-title { margin: 0 0 .45em; font: 650 clamp(2.5rem, 5.6vw, 5rem)/1 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.065em; }
.sample-bed:has(.magnet-demo), .sample-content:has(> .magnet-demo) { display: block; max-width: none; padding: 0; border: 0; box-shadow: none; background: transparent; }
.magnet-demo { min-width: 0; color: #181818; background: white; font: 400 1rem/1.5 Inter, "Helvetica Neue", Arial, sans-serif; }
main > .magnet-demo { border: 1px solid #c9c9c9; border-radius: .8rem; overflow: hidden; }
.magnet-demo-stage {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-height: clamp(19rem, 46vh, 30rem);
  padding: 2.5rem 2rem;
  overflow: clip;
  background: radial-gradient(circle, #cfcfcf .8px, transparent .9px) center / 15px 15px, #f5f5f5;
}
.magnet-demo-origin { display: inline-grid; position: relative; isolation: isolate; min-width: 0; max-width: 100%; }
.magnet-demo-origin::before, .magnet-demo-origin::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.magnet-demo-origin::before {
  inset: -96px;
  border: 1px dashed #a3a3a3;
  border-radius: 96px;
  background: #fff7;
}
.magnet-demo-origin::after { inset: 0; border: 1px solid #777; border-radius: 999px; }
.magnet-demo:has(.magnet-demo-toggle input:not(:checked)) .magnet-demo-origin::before,
.magnet-demo:has(.magnet-demo-toggle input:not(:checked)) .magnet-demo-origin::after { visibility: hidden; }
.magnet-demo-origin [data-magnet-action] { font-size: clamp(1rem, 1rem + .65vw, 1.5rem); }
.magnet-demo-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .3rem 1.5rem;
  padding: .65rem clamp(1rem, 2.5vw, 1.8rem);
  border-top: 1px solid #d1d1d1;
}
.magnet-demo-tip { margin: 0; color: #535353; font-size: .85rem; }
.magnet-demo-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.6rem;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
}
.magnet-demo-toggle input { position: absolute; width: 1px; height: 1px; margin: 0; clip-path: inset(50%); }
.magnet-demo-toggle span { display: grid; align-items: center; box-sizing: border-box; width: 2rem; height: 1.2rem; padding: 2px; border: 1px solid #8c8c8c; border-radius: 1rem; background: #ddd; }
.magnet-demo-toggle span::after { content: ""; width: .74rem; height: .74rem; border-radius: 50%; background: white; }
.magnet-demo-toggle input:checked + span { justify-content: end; border-color: #181818; background: #181818; }
.magnet-demo-toggle input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 3px; }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .magnet-demo-tip { display: none; }
  .magnet-demo-tools { justify-content: flex-end; }
}
@media (forced-colors: active) {
  .magnet-demo-toggle span::after { forced-color-adjust: none; background: ButtonText; }
  .magnet-demo-toggle input:checked + span { outline: 1px solid Highlight; }
}
