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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: .24em;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

[id] {
  scroll-margin-top: 1.25rem;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, figure {
  margin: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(.85rem, 2.8vw, 2rem);
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.demo-wrap {
  width: min(100% - clamp(2rem, 10vw, 9rem), 1240px);
  margin-inline: auto;
}

.demo-skip {
  position: absolute;
  z-index: 2;
  inset: .5rem auto auto .5rem;
  transform: translateY(calc(-100% - 1rem));
  padding: .65rem 1rem;
  background: var(--paper);
  color: var(--ink);
}

.demo-skip:focus {
  transform: none;
}

.demo-notice,
.demo-footer {
  background: #e8ebf2;
  color: #293043;
  font-size: .875rem;
}

.demo-notice > div,
.demo-footer > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .2rem 1.25rem;
}

.demo-notice a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  font-weight: 700;
}

.demo-notice p,
.demo-footer p {
  margin: 0;
}

.demo-footer {
  padding-block: clamp(1.5rem, 4vw, 3rem);
}

.demo-footer p + a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  font-weight: 700;
}

@media (max-width: 390px) {
  .demo-notice .demo-wrap {
    font-size: .75rem;
    gap: .15rem .5rem;
  }
}
