.demo {
  outline: 1px dashed hsl(0, 0%, 50%);
  padding: 1rem;
  position: relative;

  &::before {
    content: "Preview";
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    background-color: navy;
    padding: 0.35em;
    border-radius: 0.25em;
    line-height: 1;
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75em;
  }
}

.demo article * + * {
  margin-top: 1em;
}

.demo article > a {
  display: inline-block;
}

.demo hr {
  border-style: dashed;
  border-color: navy;
  margin: 8vh 5vw;
}

.demo header {
  display: grid;
  gap: 1rem;
  background-color: scale-color(navy, $lightness: 95%);
  place-items: center;
  text-align: center;
  min-height: 20vh;
  padding: 1rem;
}

.demo > ul:not([role]) {
  display: grid;
  gap: 1em;
}

.demo ul[role] {
  list-style: none;
  padding: 0;
  margin: 0;
}

.demo-card-grid {
  ul {
    display: grid;
    grid-gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20ch), 1fr));
  }

  li {
    border-radius: 0.5rem;
    box-shadow: 0 0 0.25rem rgba(black, 0.3);

    img {
      width: 100%;
      object-fit: cover;
      aspect-ratio: 4/3;
      max-height: 25vh;
    }

    > img:first-child {
      border-radius: 0.5rem 0.5rem 0 0;
    }

    > *:not(img) {
      margin-left: 1rem;
      margin-right: 1rem;
    }

    > :last-child:not(img) {
      margin-bottom: 1rem;
    }
  }
}

.demo-navigation-links {
  ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    text-align: center;
  }
}

.demo-collapsible-faqs {
  details{
    & + details {
      margin-top: 1rem;
    }

    summary {
      font-weight: bold;
      cursor: pointer;

      &:focus {
        outline: 1px solid currentColor;
      }
    }
  }
}

.demo-contact-form {
  form {
    label {
      display: block;
    }
    input,
    textarea {
      display: block;
      margin-bottom: 1rem;
    }
  }
}

.demo-social-icon-links {
  ul {
    display: grid;
    gap: 0.5rem;
  }

  a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
      text-decoration-style: wavy;
    }

    svg {
      margin-right: 0.5em;
    }
  }
}

.demo-article {
  article {
    margin: 2rem auto;
    width: min(80ch, 100%);
  }
}

.demo-address {
  address {
    a {
      display: block;
    }
  }
}

.demo-sidebar {
  --gap: 1rem;

  .container {
    display: grid;
    grid-gap: var(--gap);
    grid-template-columns: minmax(min(50vw, 25ch), 1fr) fit-content(20ch);
    width: min(100%, 60ch);
    margin: 2rem auto;
  }

  aside {
    border-left: 1px solid lightslategray;
    padding-left: var(--gap);
  }
}
