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

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

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

input, button {
  font: inherit;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}


p, h1, h2, h3, h4 {
  overflow-wrap: break-word;
}

header {
  box-shadow: 0px -1px 13px 0px rgba(0,0,0,0.1);
  padding: 1rem;

  nav {
    .menu {
      margin-top: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;

      a {
        text-decoration: none;
      }

      a:visited {
        color: inherit;
      }

      > a:last-of-type {
        margin-left: auto;
      }

      .active {
        font-weight: bold;
      }
    }
  }
}

main {
  section:first-of-type {
    margin-top: 1rem;
  }

  section:last-of-type {
    margin-bottom: 0px;
  }
}

section {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

small, figcaption {
  font-size: 0.8rem;
}

figure {
  margin-bottom: 2rem;
}
figcaption {
  margin-top: 0.3rem;
}

h2 {
  font-size: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-weight: normal;
}
small.tag + h2 {
  margin-top: 0.3rem;
}
h3 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

p, ul {
  margin-bottom: 1rem;
}
ul:last-child, p:last-child {
  margin-bottom: 0px;
}
p:has(+ ul) {
  margin-bottom: 0.5rem;
}

ul {
  li::marker {
    color: green;
  }
}

a + small {
  display: block;
  margin-top: 0.3rem;
}

article {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

footer {
  padding-top: 2rem;
  padding-bottom: 0.5rem;
  background-color: black;
  color: white;
  padding: 1rem;

  a {
    color: white;
    text-decoration: none;
  }

  a:hover {
    color: white;
    text-decoration: underline;
  }

  h1 {
    margin-top: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
  }
}

/* Components */

.lead {
  font-size: 1.3rem;
}

.btn {
  display: inline-block;
  text-decoration: none;

  padding: 5px 30px;

  img {
    display: inline-block;
    vertical-align: middle;
  }
}

.btn-lg {
  padding: 7px 40px;
  font-size: 1.25rem;
  font-weight: 600;
}

.btn-purple {
  border-radius: 24px;
  border: 2px solid #7c42e9 !important;
}

.btn-purple:hover {
  text-decoration: underline;
}

.btn-purple.active {
  border-radius: 24px;
  color: white;
  background-color: #7c42e9;
}

.btn-full-purple, .btn-full-purple:hover {
  border-radius: 24px;
  color: white;
  background-color: #7c42e9;
  border: 2px solid #7c42e9 !important;

  &:visited {
    color: white;
  }
}

.desktop {
  display: none;
}

.mt-0-5 {
  margin-top: 0.5rem;
}
.mt-1 {
  margin-top: 1rem;
}
.mt-1-5 {
  margin-top: 1.5rem;
}
.mt-3 {
  margin-top: 3rem;
}

.mb-0-5 {
  margin-bottom: 0.5rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-1-5 {
  margin-bottom: 1.5rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.widget-types {
  article {
    padding: 1rem;
    border: 1px solid lightgray;
    border-radius: 5px;
    margin-top: 1rem;
  }
}

.bg {
  background-color: #ece8fc;
}

.tag {
  background-color: green;
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-weight: bold;
  display: inline-block;
}

.feature {
  h3 {
    font-size: 1.1rem;
  }

  figure {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
}

.hint {
  display: flex;
  border: 1px solid lightgray;
  background-color: aliceblue;
  padding: 0.8rem;
  border-radius: 3px;

  img {
    padding: 0.8rem;
    padding-left: 0.5rem;
  }
}

.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;

  img {
    max-width: 120px;
  }
}

.reference {
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem 1.8rem;
  background-color: #fff2d8;
  border-radius: 25px;

  .meta {
    * {
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
    }
  }
}

.rating {
  display: inline-block;
  padding: 0.5rem;
  border: 1px solid black;
  border-radius: 4px;
  text-align: center;

  img {
    display: inline-block;
  }
}

.cta {
  background-color: #ece8fc;
  padding-top: 2.5rem;
  text-align: center;
}

.functions {
  figure {
    margin-top: 1.5rem;
  }
}

.billing-switch {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;

  label {
    padding: 5px 20px;
    border: 2px solid #7c42e9;
    border-radius: 24px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
  }
}

#billing-monthly:checked ~ .billing-toggle label[for="billing-monthly"],
#billing-yearly:checked ~ .billing-toggle label[for="billing-yearly"] {
  background-color: #7c42e9;
  color: white;
}

#billing-monthly:focus-visible ~ .billing-toggle label[for="billing-monthly"],
#billing-yearly:focus-visible ~ .billing-toggle label[for="billing-yearly"] {
  outline: 2px solid black;
  outline-offset: 2px;
}

#billing-monthly:checked ~ .price-list .yearly-only,
#billing-yearly:checked ~ .price-list .monthly-only {
  display: none;
}

.price-list {
  .offer {
    position: relative;
    flex: 1;
    padding: 1.5rem;
    border: 1px solid lightgray;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 1rem;
  }

  .offer.recommended {
    border-color: #7c42e9;
  }

  .tag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #7c42e9;
  }

  .illustration {
    width: 100px;
    margin-bottom: 1rem;
  }

  ul {
    list-style-type: none;
    padding-left: 0px;
    margin-bottom: 1rem;
  }

  li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;

    img {
      display: inline-block;
      margin-right: 0.5rem;
    }
  }

  li.with-note {
    flex-wrap: wrap;

    small {
      flex-basis: 100%;
      color: gray;
    }
  }

  li.unavailable {
    color: gray;
  }

  h2 {
    margin-top: 0.5rem;
  }

  .price {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }

  .note-green {
    color: green;
    margin-bottom: 0.5rem;
  }

  .note-muted {
    color: gray;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .btn {
    display: block;
    margin-top: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
  }
}

.free-plan {
  padding: 1.5rem;
  border: 1px solid lightgray;
  border-radius: 4px;
}

.avatar {
  width: 20px;
  border-radius: 100%;
  display: inline-block;
  vertical-align: middle;
}

.post-container {
  div:first-child > img {
    margin-bottom: 2rem;
  }
}

.blog-categories {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.post-excerpt {
  margin-bottom: 2rem;
  img {
    display: inline-block;
  }
}

.post-title {
  font-weight: normal;
  font-size: 1.8rem;

  a {
    text-decoration: none;
    color: black;
  }
}

.d-inline-block {
  display: inline-block;
}

.registration-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;

  div {
    flex: 1;
    box-shadow: 0 0 0 1px rgba(20,20,31,0.05),0 1px 3px 0 rgba(20,20,31,0.15);
    padding: 1.5rem;

    img, ol {
      margin-bottom: 1rem;
    }
  }
}

.border-bottom {
  padding-bottom: 0.3em;
  border-bottom: 1px solid lightgrey;
}

.newsletter-subscription {
  display: flex;
  justify-content: center;
  padding-bottom: 3em;

  form {
    flex: 1;
    max-width: 320px;

    input {
      display: block;
      width: 100%;
      padding: 7px 16px;
      font-size: 14px;
      line-height: 24px;
      color: #555;
      background-color: #fff;
      background-image: none;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
      height: auto;
      margin-bottom: 0.8em;
    }

    button {
      border: 0;
      background-color: #7C42E9;
      color: #FFFFFF;
      width: 100%;
      text-align: center;
      font-family: Open Sans, Arial, sans-serif;
      display: inline-block;
      line-height: 1.42857143;
      text-align: center;
      white-space: nowrap;
      cursor: pointer;
      border-radius: 3px;
      font-size: 13px;
      font-weight: 600;
      padding: 10px 16px;
    }
  }
}

/* Blog article content (Markdown posts) */
.post-note {
  background: #f4effd;
  border-left: 4px solid #7c42e9;
  padding: 0.8rem 1rem;
  margin: 1rem 0 1.5rem;
}

.post-container {
  img {
    max-width: 100%;
    height: auto;
  }

  figure {
    margin: 1.5rem 0;
  }

  figcaption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.4rem;
  }

  blockquote {
    background: #f4effd;
    border-left: 4px solid #7c42e9;
    margin: 1.5rem 0;
    padding: 0.8rem 1rem;
  }

  table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    display: block;
    overflow-x: auto;
  }

  th, td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: top;
  }

  th {
    background: #f6f6f8;
  }

  pre {
    background: #f6f6f8;
    padding: 0.8rem 1rem;
    overflow-x: auto;
  }
}
